aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3/config/os/hpux/bits/os_defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/config/os/hpux/bits/os_defines.h')
-rw-r--r--libstdc++-v3/config/os/hpux/bits/os_defines.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/libstdc++-v3/config/os/hpux/bits/os_defines.h b/libstdc++-v3/config/os/hpux/bits/os_defines.h
index efc5e7abf4d..c8a6c9df8a7 100644
--- a/libstdc++-v3/config/os/hpux/bits/os_defines.h
+++ b/libstdc++-v3/config/os/hpux/bits/os_defines.h
@@ -39,6 +39,9 @@
#define __glibcpp_wchar_t_is_signed false
+// Use macro form of ctype functions to ensure __SB_masks is defined.
+#define _SB_CTYPE_MACROS 1
+
/* HP-UX, for reasons unknown choose to use a different name for
the string to [unsigned] long long conversion routines.
@@ -60,10 +63,17 @@
We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
to bastardize configure to deal with this sillyness. */
namespace std {
+#ifndef __LP64__
__extension__ extern "C" long long strtoll (const char *, char **, int)
__asm ("__strtoll");
__extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
__asm ("__strtoull");
+#else
+ __extension__ extern "C" long long strtoll (const char *, char **, int)
+ __asm ("strtol");
+ __extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
+ __asm ("strtoul");
+#endif
}
#define _GLIBCPP_USE_LONG_LONG 1
#endif