[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

iswblank: fix link error in C++ mode

From: Bruno Haible
Subject: iswblank: fix link error in C++ mode
Date: Sat, 25 Dec 2010 16:56:05 +0100
User-agent: KMail/1.9.9

On Solaris 8 with gcc I'm seeing this link error:

g++      -o test-wctype-c++ test-wctype-c++.o ../gllib/libgnu.a  -lrt 
Undefined                       first referenced
 symbol                             in file
iswblank(long)                      test-wctype-c++.o
ld: fatal: Symbol referencing errors. No output written to test-wctype-c++
collect2: ld returned 1 exit status
*** Error code 1

The cause is C++ name mangling. This fixes it:

2010-12-25  Bruno Haible  <address@hidden>

        iswblank: Fix C++ link error on Solaris 8.
        * lib/wctype.in.h (iswblank): Declare using _GL_FUNCDECL_RPL or

--- lib/wctype.in.h.orig        Sat Dec 25 16:53:32 2010
+++ lib/wctype.in.h     Sat Dec 25 16:52:22 2010
@@ -284,9 +284,9 @@
 #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
 #   define iswblank rpl_iswblank
 #  endif
-extern int rpl_iswblank (wint_t wc);
+_GL_FUNCDECL_RPL (iswblank, int, (wint_t wc));
 # else
-extern int iswblank (wint_t wc);
+_GL_FUNCDECL_SYS (iswblank, int, (wint_t wc));
 # endif

reply via email to

[Prev in Thread] Current Thread [Next in Thread]