diff options
author | Jeff Law <law@redhat.com> | 2001-12-23 18:45:29 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2001-12-23 18:45:29 -0700 |
commit | b6e220169cd0b67067e1c4929eb08b964191aa1b (patch) | |
tree | 24d16ceb1abf477028e86e1ed86aa5c729a79b09 | |
parent | 6eb5351149fbe37f06c43bacb968e71bd73dfbb5 (diff) | |
download | gcc-b6e220169cd0b67067e1c4929eb08b964191aa1b.zip gcc-b6e220169cd0b67067e1c4929eb08b964191aa1b.tar.gz gcc-b6e220169cd0b67067e1c4929eb08b964191aa1b.tar.bz2 |
os_defines.h: Do not include <_sys/inttypes.h>.
* 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.
From-SVN: r48293
-rw-r--r-- | libstdc++-v3/ChangeLog | 6 | ||||
-rw-r--r-- | libstdc++-v3/config/os/hpux/bits/os_defines.h | 18 |
2 files changed, 15 insertions, 9 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b6a91b4..ed0be81 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +Sun Dec 23 18:47:24 2001 Jeffrey A Law (law@redhat.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. + 2001-12-22 Richard Henderson <rth@redhat.com> * configure.target (CPULIMITSH): Fix typo in alpha case. diff --git a/libstdc++-v3/config/os/hpux/bits/os_defines.h b/libstdc++-v3/config/os/hpux/bits/os_defines.h index 322bb56..29b32ea 100644 --- a/libstdc++-v3/config/os/hpux/bits/os_defines.h +++ b/libstdc++-v3/config/os/hpux/bits/os_defines.h @@ -51,23 +51,23 @@ <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. + probably do not want. So we don't want to include it 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. + 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. */ -#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) + extern "C" unsigned 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 |