[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
waitpid in C++ mode
From: |
Bruno Haible |
Subject: |
waitpid in C++ mode |
Date: |
Fri, 31 Dec 2010 15:38:57 +0100 |
User-agent: |
KMail/1.9.9 |
On HP-UX 11.11 I'm seeing this link failure:
g++ -o test-sys_wait-c++ test-sys_wait-c++.o ../gllib/libgnu.a
/usr/ccs/bin/ld: Invalid symbol type for plabel (test-sys_wait-c++.o, waitpid).
collect2: ld returned 1 exit status
*** Error exit code 1
It's caused by the extern "C" { ... } group that changes the name mangling of
the variable '_ZN6gnulib7waitpidE' to 'waitpid', leading to a collision with
waitpid from libc. The mistake dates back to 2010-09-29.
This fixes it:
2010-12-31 Bruno Haible <address@hidden>
waitpid: Fix link error in C++ mode.
* lib/sys_wait.in.h: Remove extern "C" { ... } group.
--- lib/sys_wait.in.h.orig Fri Dec 31 15:37:11 2010
+++ lib/sys_wait.in.h Fri Dec 31 15:30:18 2010
@@ -108,9 +108,6 @@
#endif
-#ifdef __cplusplus
-extern "C" {
-#endif
/* Declarations of functions. */
@@ -128,9 +125,6 @@
# endif
#endif
-#ifdef __cplusplus
-}
-#endif
#endif /* _GL_SYS_WAIT_H */
#endif /* _GL_SYS_WAIT_H */
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- waitpid in C++ mode,
Bruno Haible <=