]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
os_defines.h: Include <sys/_inttypes.h.
authorJeff Law <law@redhat.com>
Sat, 22 Dec 2001 00:42:46 +0000 (17:42 -0700)
committerJeff Law <law@gcc.gnu.org>
Sat, 22 Dec 2001 00:42:46 +0000 (17:42 -0700)
        * 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

libstdc++-v3/ChangeLog
libstdc++-v3/config/os/hpux/bits/os_defines.h

index 7198acf928d1e28679283a904046f0ab607ee442..1332b802117339ca738727ac0e8993e6aca700ca 100644 (file)
@@ -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.
index d7045d0a16e454c86b2dc077cdd342b78cef859f..323c0c66d71be2c01ecbdc822a41c5e065527b07 100644 (file)
 #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