Patchwork [v3] libstdc++/47560

login
register
mail settings
Submitter Benjamin Kosnik
Date Feb. 7, 2011, 8:08 p.m.
Message ID <20110207120844.54a10a23@shotwell>
Download mbox | patch
Permalink /patch/82129/
State New
Headers show

Comments

Benjamin Kosnik - Feb. 7, 2011, 8:08 p.m.
This first patch did not fix the issue. Guarding C++ keywords like
"namespace" etc by __cplusplus should fix it.

-benjamin

> tested x86/linux

Patch

2011-02-07  Benjamin Kosnik  <bkoz@redhat.com>

	    PR libstdc++/47560 try two
	    * config/os/hpux/os_defines.h: Guard for C++.

Index: config/os/hpux/os_defines.h
===================================================================
--- config/os/hpux/os_defines.h	(revision 169894)
+++ config/os/hpux/os_defines.h	(working copy)
@@ -58,10 +58,11 @@ 
    We also force _GLIBCXX_USE_LONG_LONG here so that we don't have
    to bastardize configure to deal with this sillyness.  */
 
+#ifdef __cplusplus
 namespace std
 {
-_GLIBCXX_BEGIN_EXTERN_C
-
+  extern "C" 
+  {
 #ifndef __LP64__
   __extension__ long long strtoll (const char *, char **, int)
     __asm  ("__strtoll");
@@ -73,9 +74,9 @@ 
   __extension__ unsigned long long strtoull (const char *, char **, int)
     __asm  ("strtoul");
 #endif
-
-_GLIBCXX_END_EXTERN_C
+  }
 } // namespace std
+#endif // __cplusplus
 
 #define _GLIBCXX_USE_LONG_LONG 1