[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-gsl] [bug #24548] Missing extern "C" in sys/ functions
From: |
Brian Gough |
Subject: |
[Bug-gsl] [bug #24548] Missing extern "C" in sys/ functions |
Date: |
Mon, 13 Oct 2008 14:38:26 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.16) Gecko/20080716 Fedora/false StumbleUpon/1.73 SeaMonkey/1.1.11 |
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" <address@hidden>
To: address@hidden
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/
- [Bug-gsl] [bug #24548] Missing extern "C" in sys/ functions,
Brian Gough <=