bugGNU Scientific Library - Bugs: bug #24548, Missing extern "C" in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #24548: Missing extern "C" in sys/ functions

Submitted by:  -Deleted Account- <bjg>
Submitted on:  Mon 13 Oct 2008 02:38:25 PM UTC  
 
Category: BuildSeverity: 2 - Minor
Operating System: Status: Fixed
Assigned to: NoneOpen/Closed: Closed
Release: 1.11

Mon 13 Oct 2008 03:48:24 PM UTC, comment #1:

fixed by 8ca0a83ae408ad4bcd2b33e214067f621defacaa
[the cblas tests don't compile with a C++ compiler due to use of C-style enums but the library itself and the other tests do]

-Deleted Account- <bjg>
Mon 13 Oct 2008 02:38:25 PM UTC, original submission:

From: "Joshua Shaffer" <jbs3600@gmail.com>
To: -unavailable-
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

===============================================================================================================================

-Deleted Account- <bjg>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 13 Oct 2008 03:48:24 PM UTCbjgStatusConfirmed=>Fixed
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1