* [v3] libstdc++/47560
@ 2011-02-01 17:15 Benjamin Kosnik
2011-02-07 20:08 ` Benjamin Kosnik
0 siblings, 1 reply; 2+ messages in thread
From: Benjamin Kosnik @ 2011-02-01 17:15 UTC (permalink / raw)
To: gcc-patches, libstdc++
[-- Attachment #1: Type: text/plain, Size: 268 bytes --]
Oops: quick audit on config/* directory shows that there was some
spurious artifact from the recent namespace re-write.
Actually, this is better than before because there's no need for a
duplicate _GLIBCXX_VISIBILITY_PSEUDO definition.
tested x86/linux
-benjamin
[-- Attachment #2: 20110201-1.patch --]
[-- Type: text/x-patch, Size: 1588 bytes --]
2011-02-01 Benjamin Kosnik <bkoz@redhat.com>
PR libstdc++/47560
* config/os/hpux/os_defines.h: Remove use of macros on namespace.
Index: config/os/hpux/os_defines.h
===================================================================
--- config/os/hpux/os_defines.h (revision 169490)
+++ config/os/hpux/os_defines.h (working copy)
@@ -1,6 +1,6 @@
// Specific definitions for HPUX -*- C++ -*-
-// Copyright (C) 2000, 2002, 2004, 2005, 2008, 2009, 2010
+// Copyright (C) 2000, 2002, 2004, 2005, 2008, 2009, 2010, 2011
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -37,11 +37,6 @@
// Use macro form of ctype functions to ensure __SB_masks is defined.
#define _SB_CTYPE_MACROS 1
-// This would be defaulted in the main c++config header if we didn't
-// define it here, but it has to be defined before we can use the
-// namespace macros, so we have to define it to nothing here instead.
-#define _GLIBCXX_PSEUDO_VISIBILITY(V)
-
/* HP-UX, for reasons unknown choose to use a different name for
the string to [unsigned] long long conversion routines.
@@ -63,9 +58,8 @@
We also force _GLIBCXX_USE_LONG_LONG here so that we don't have
to bastardize configure to deal with this sillyness. */
-namespace std _GLIBCXX_VISIBILITY(default)
+namespace std
{
-_GLIBCXX_BEGIN_NAMESPACE_VERSION
_GLIBCXX_BEGIN_EXTERN_C
#ifndef __LP64__
@@ -81,8 +75,7 @@
#endif
_GLIBCXX_END_EXTERN_C
-_GLIBCXX_END_NAMESPACE_VERSION
-} // namespace
+} // namespace std
#define _GLIBCXX_USE_LONG_LONG 1
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [v3] libstdc++/47560
2011-02-01 17:15 [v3] libstdc++/47560 Benjamin Kosnik
@ 2011-02-07 20:08 ` Benjamin Kosnik
0 siblings, 0 replies; 2+ messages in thread
From: Benjamin Kosnik @ 2011-02-07 20:08 UTC (permalink / raw)
To: gcc-patches, libstdc++
[-- Attachment #1: Type: text/plain, Size: 146 bytes --]
This first patch did not fix the issue. Guarding C++ keywords like
"namespace" etc by __cplusplus should fix it.
-benjamin
> tested x86/linux
[-- Attachment #2: 20110207-1.patch --]
[-- Type: text/x-patch, Size: 913 bytes --]
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-02-07 20:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01 17:15 [v3] libstdc++/47560 Benjamin Kosnik
2011-02-07 20:08 ` Benjamin Kosnik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).