![]() | ![]() | ||||||||||||
[bug-gsl] [bug #24548] Missing extern "C" in sys/ functions (2008-10-13)
URL: <http://savannah.gnu.org/bugs/?24548> Summary: Missing extern "C" in sys/ functions Project: GNU Scientific Library Submitted by: bjg Submitted on: Mon 13 Oct 2008 03:38:25 PM BST Category: Build Severity: 2 - Minor Operating System: Status: Confirmed Assigned to: None Open/Closed: Open Release: 1.11 Discussion Lock: Any _______________________________________________________ Details: From: "Joshua Shaffer" <jbs3600@.........> To: bug-gsl@gnu.org Subject: [Bug-gsl] Missing extern "C" because of symbol redefinition. GSL 1.9, g++ (GCC) 4.1.2 20071124 (Red Hat 4.1.2-42) Date: Sat, 11 Oct 2008 15:54:00 -0400 "sys/infnan.c", "sys/hypot.c" and "sys/coerce.c" include forward function symbol declarations that redefine the symbols in the header files. The new definitions drop the extern "C". When compiling with a c++ compiler, the function turns out to have a mangled c++ symbol name yet they are referenced as if they were C symbols. =============================================================================================================================== diff -rb gsl-1.9/rng/file.c gsl-1.9-patched/rng/file.c 30c30 < char * state = r->state; --- > char * state = (char*)(r->state); 47c47 < char * state = r->state; --- > char * state = (char*)(r->state); diff -rb gsl-1.9/sys/coerce.c gsl-1.9-patched/sys/coerce.c 22a23,35 > #undef __BEGIN_DECLS > #undef __END_DECLS > #ifdef __cplusplus > # define __BEGIN_DECLS extern "C" { > # define __END_DECLS } > #else > # define __BEGIN_DECLS /* empty */ > # define __END_DECLS /* empty */ > #endif > > __BEGIN_DECLS > > 54a68 > __END_DECLS diff -rb gsl-1.9/sys/fdiv.c gsl-1.9-patched/sys/fdiv.c 22a23,34 > #undef __BEGIN_DECLS > #undef __END_DECLS > #ifdef __cplusplus > # define __BEGIN_DECLS extern "C" { > # define __END_DECLS } > #else > # define __BEGIN_DECLS /* empty */ > # define __END_DECLS /* empty */ > #endif > > __BEGIN_DECLS > 29a42,43 > > __END_DECLS diff -rb gsl-1.9/sys/hypot.c gsl-1.9-patched/sys/hypot.c 22a23,35 > #undef __BEGIN_DECLS > #undef __END_DECLS > #ifdef __cplusplus > # define __BEGIN_DECLS extern "C" { > # define __END_DECLS } > #else > # define __BEGIN_DECLS /* empty */ > # define __END_DECLS /* empty */ > #endif > > __BEGIN_DECLS > > 48a62 > __END_DECLS diff -rb gsl-1.9/sys/infnan.c gsl-1.9-patched/sys/infnan.c 26a27,39 > #undef __BEGIN_DECLS > #undef __END_DECLS > #ifdef __cplusplus > # define __BEGIN_DECLS extern "C" { > # define __END_DECLS } > #else > # define __BEGIN_DECLS /* empty */ > # define __END_DECLS /* empty */ > #endif > > __BEGIN_DECLS > > 147a161 > __END_DECLS =============================================================================================================================== _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?24548> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
| |||||||||||||
![]() | ![]() |







