randdouble etc. can have C++ linkage
This commit is contained in:
parent
6ad9ed5538
commit
45e8f6c52e
@ -3,10 +3,8 @@
|
|||||||
|
|
||||||
namespace LA {
|
namespace LA {
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
WEAK_SYMBOL double randdouble() {return random()/(1.+RAND_MAX);}
|
WEAK_SYMBOL double randdouble() {return random()/(1.+RAND_MAX);}
|
||||||
WEAK_SYMBOL double randdoublesigned() {return 2.*random()/(1.+RAND_MAX)-1.;}
|
WEAK_SYMBOL double randdoublesigned() {return 2.*random()/(1.+RAND_MAX)-1.;}
|
||||||
WEAK_SYMBOL int randint32() {return random();}
|
WEAK_SYMBOL int randint32() {return random();}
|
||||||
}
|
|
||||||
}//namespace
|
}//namespace
|
||||||
|
|
||||||
|
@ -16,11 +16,9 @@ namespace LA {
|
|||||||
#define RANDINT32 randint32
|
#define RANDINT32 randint32
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
extern "C" {
|
|
||||||
extern double randdouble();
|
extern double randdouble();
|
||||||
extern double randdoublesigned();
|
extern double randdoublesigned();
|
||||||
extern int randint32();
|
extern int randint32();
|
||||||
}
|
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define WEAK_SYMBOL __attribute__((weak))
|
#define WEAK_SYMBOL __attribute__((weak))
|
||||||
|
Loading…
Reference in New Issue
Block a user