This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch for libstdc++-v3 on HP-UX
- From: Steve Ellcey <sje at cup dot hp dot com>
- To: bkoz at redhat dot com, dave at hiauly1 dot hia dot nrc dot ca, gcc-patches at gcc dot gnu dot org, libstdc++ at gcc dot gnu dot org
- Date: Mon, 28 Apr 2008 09:24:29 -0700 (PDT)
- Subject: Patch for libstdc++-v3 on HP-UX
- Reply-to: sje at cup dot hp dot com
The libstdc++-v3 library is not building on HP-UX due to this patch:
| 2008-04-23 Benjamin Kosnik <bkoz@redhat.com>
|
| * config/os/hpux/os_defines.h: Use _GLIBCXX_BEGIN_NAMESPACE,
| _GLIBCXX_BEGIN_EXTERN_C, etc.
The problem is that these macros are defined in c++config but c++config
includes the hpux/os_defines.h file before it defines the macros. I
suppose we could try changing c++config to define the macros before
including the system specific headers but that might just cause more
problems on other platforms. My proposal is to just not use the macros.
OK for checkin?
Tested on IA64 and PA HP-UX.
Steve Ellcey
sje@cup.hp.com
2008-04-28 Steve Ellcey <sje@cup.hp.com>
* config/os/hpux/os_defines.h: Remove macro usage.
Index: config/os/hpux/os_defines.h
===================================================================
--- config/os/hpux/os_defines.h (revision 134735)
+++ config/os/hpux/os_defines.h (working copy)
@@ -62,23 +62,23 @@
We also force _GLIBCXX_USE_LONG_LONG here so that we don't have
to bastardize configure to deal with this sillyness. */
-_GLIBCXX_BEGIN_NAMESPACE(std)
-_GLIBCXX_BEGIN_EXTERN_C
+namespace std {
+ extern "C" {
#ifndef __LP64__
- __extension__ long long strtoll (const char *, char **, int)
- __asm ("__strtoll");
- __extension__ unsigned long long strtoull (const char *, char **, int)
- __asm ("__strtoull");
+ __extension__ long long strtoll (const char *, char **, int)
+ __asm ("__strtoll");
+ __extension__ unsigned long long strtoull (const char *, char **, int)
+ __asm ("__strtoull");
#else
- __extension__ long long strtoll (const char *, char **, int)
- __asm ("strtol");
- __extension__ unsigned long long strtoull (const char *, char **, int)
- __asm ("strtoul");
+ __extension__ long long strtoll (const char *, char **, int)
+ __asm ("strtol");
+ __extension__ unsigned long long strtoull (const char *, char **, int)
+ __asm ("strtoul");
#endif
-_GLIBCXX_END_EXTERN_C
-_GLIBCXX_END_NAMESPACE
+ }
+}
#define _GLIBCXX_USE_LONG_LONG 1