diff options
author | Jeff Law <law@redhat.com> | 2001-12-21 17:42:46 -0700 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 2001-12-21 17:42:46 -0700 |
commit | 4585ae3de289f2174e3c294c6cad953d086d8a8f (patch) | |
tree | 466dfaf8e60d97857a783b501005eec5828af6e2 | |
parent | 415f500c764abd8c051f9c380c9d4adbb6e47759 (diff) | |
download | gcc-4585ae3de289f2174e3c294c6cad953d086d8a8f.zip gcc-4585ae3de289f2174e3c294c6cad953d086d8a8f.tar.gz gcc-4585ae3de289f2174e3c294c6cad953d086d8a8f.tar.bz2 |
os_defines.h: Include <sys/_inttypes.h.
* config/os/hpux/bits/os_defines.h: Include <sys/_inttypes.h.
Define strtoll and strtoull. Provide prototypes for
__strtoll and __strtoull. Define _GLIBCPP_USE_LONG_LONG
unconditionally.
From-SVN: r48260
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/config/os/hpux/bits/os_defines.h | 23 |
2 files changed, 28 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 7198acf..1332b80 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ Fri Dec 21 17:35:21 2001 Jeffrey A Law (law@redhat.com) + * config/os/hpux/bits/os_defines.h: Include <sys/_inttypes.h. + Define strtoll and strtoull. Provide prototypes for + __strtoll and __strtoull. Define _GLIBCPP_USE_LONG_LONG + unconditionally. + * src/locale-inst.cc: Include <bits/std_cstdlib.h> * configure.target: Fix typo in hpux case. diff --git a/libstdc++-v3/config/os/hpux/bits/os_defines.h b/libstdc++-v3/config/os/hpux/bits/os_defines.h index d7045d0..323c0c6 100644 --- a/libstdc++-v3/config/os/hpux/bits/os_defines.h +++ b/libstdc++-v3/config/os/hpux/bits/os_defines.h @@ -43,4 +43,27 @@ #define __glibcpp_long_bits 64 #endif +/* HP-UX, for reasons unknown choose to use a different name for + the string to [unsigned] long long conversion routines. + + Furthermore, instead of having the prototypes in stdlib.h like + everyone else, they put them into a non-standard header + <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> +#define strtoll __strtoll +#define strtoull __strtoull +extern intmax_t __strtoll (const char *, char**, int); +extern uintmax_t __strtoull (const char *, char**, int); +#define _GLIBCPP_USE_LONG_LONG 1 #endif |