randdouble etc. can have C++ linkage

This commit is contained in:
Jiri Pittner 2023-11-17 23:23:50 +01:00
parent 6ad9ed5538
commit 45e8f6c52e
2 changed files with 0 additions and 4 deletions

View File

@ -3,10 +3,8 @@
namespace LA {
extern "C" {
WEAK_SYMBOL double randdouble() {return random()/(1.+RAND_MAX);}
WEAK_SYMBOL double randdoublesigned() {return 2.*random()/(1.+RAND_MAX)-1.;}
WEAK_SYMBOL int randint32() {return random();}
}
}//namespace

View File

@ -16,11 +16,9 @@ namespace LA {
#define RANDINT32 randint32
#endif
extern "C" {
extern double randdouble();
extern double randdoublesigned();
extern int randint32();
}
#ifdef __GNUC__
#define WEAK_SYMBOL __attribute__((weak))