From 45e8f6c52e8ff329863f47eaea99aeac0564fb57 Mon Sep 17 00:00:00 2001 From: Jiri Pittner Date: Fri, 17 Nov 2023 23:23:50 +0100 Subject: [PATCH] randdouble etc. can have C++ linkage --- la_random.cc | 2 -- la_random.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/la_random.cc b/la_random.cc index 1266dff..ef8b15d 100644 --- a/la_random.cc +++ b/la_random.cc @@ -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 diff --git a/la_random.h b/la_random.h index 4263d66..3811497 100644 --- a/la_random.h +++ b/la_random.h @@ -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))