This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Further hpux libstdc++-v3 cleanups
- From: law at redhat dot com
- To: gcc-patches at gcc dot gnu dot org
- Date: Sun, 23 Dec 2001 18:42:30 -0700
- Subject: Further hpux libstdc++-v3 cleanups
- Reply-to: law at redhat dot com
* config/os/hpux/bits/os_defines.h: Do not include <_sys/inttypes.h>.
Twiddle return types for strtoll and strtoull to avoid using
intmax_t and uintmax-t.
Index: config/os/hpux/bits/os_defines.h
===================================================================
RCS file: /cvs/cvsfiles/devo/libstdc++-v3/config/os/hpux/bits/os_defines.h,v
retrieving revision 1.2.16.3
diff -c -3 -p -r1.2.16.3 os_defines.h
*** os_defines.h 2001/12/22 16:49:45 1.2.16.3
--- os_defines.h 2001/12/24 01:41:18
***************
*** 51,73 ****
<inttypes.h>. Ugh.
<inttypes.h> defines a variety of things, some of which we
! probably do not want. So we just provide prototypes for
! the functions we care about here.
! However, to do that, we must include <sys/_inttypes.h> to get
! intmax_t and uintmax_t. Luckily <sys/_inttypes.h> looks a
! lot cleaner as far as namespace pollution is concerned.
We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
to bastardize configure to deal with this sillyness. */
- #include <sys/_inttypes.h>
namespace std {
extern "C" long long strtoll (const char *, char **, int)
__asm ("__strtoll");
! extern "C" long long strtoull (const char *, char **, int)
__asm ("__strtoull");
}
- extern intmax_t __strtoll (const char *, char**, int);
- extern uintmax_t __strtoull (const char *, char**, int);
#define _GLIBCPP_USE_LONG_LONG 1
#endif
--- 51,73 ----
<inttypes.h>. Ugh.
<inttypes.h> defines a variety of things, some of which we
! probably do not want. So we don't want to include it here.
! Luckily we can just declare strtoll and strtoull with the
! __asm extension which effectively renames calls at the
! source level without namespace pollution.
+ Also note that the compiler defines _INCLUDE_LONGLONG for C++
+ unconditionally, which makes intmax_t and uintmax_t long long
+ types.
+
We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
to bastardize configure to deal with this sillyness. */
namespace std {
extern "C" long long strtoll (const char *, char **, int)
__asm ("__strtoll");
! extern "C" unsigned long long strtoull (const char *, char **, int)
__asm ("__strtoull");
}
#define _GLIBCPP_USE_LONG_LONG 1
#endif