]>
Commit | Line | Data |
---|---|---|
0e20c0b5 | 1 | // Specific definitions for HPUX -*- C++ -*- |
598730fe | 2 | |
0e20c0b5 | 3 | // Copyright (C) 2000, 2002 Free Software Foundation, Inc. |
598730fe JL |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
8 | // Free Software Foundation; either version 2, or (at your option) | |
9 | // any later version. | |
10 | ||
11 | // This library is distributed in the hope that it will be useful, | |
12 | // but WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
14 | // GNU General Public License for more details. | |
15 | ||
16 | // You should have received a copy of the GNU General Public License along | |
17 | // with this library; see the file COPYING. If not, write to the Free | |
18 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
19 | // USA. | |
20 | ||
21 | // As a special exception, you may use this file as part of a free software | |
22 | // library without restriction. Specifically, if other files instantiate | |
23 | // templates or use macros or inline functions from this file, or you compile | |
24 | // this file and link it with other files to produce an executable, this | |
25 | // file does not by itself cause the resulting executable to be covered by | |
26 | // the GNU General Public License. This exception does not however | |
27 | // invalidate any other reasons why the executable file might be covered by | |
28 | // the GNU General Public License. | |
29 | ||
598730fe | 30 | #ifndef _GLIBCPP_OS_DEFINES |
0e20c0b5 | 31 | #define _GLIBCPP_OS_DEFINES 1 |
598730fe | 32 | |
f295ecef BK |
33 | // System-specific #define, typedefs, corrections, etc, go here. This |
34 | // file will come before all others. | |
598730fe JL |
35 | |
36 | #define __off_t off_t | |
37 | #define __off64_t off64_t | |
38 | #define __ssize_t ssize_t | |
39 | ||
888d5eaa JDA |
40 | // Use macro form of ctype functions to ensure __SB_masks is defined. |
41 | #define _SB_CTYPE_MACROS 1 | |
42 | ||
4585ae3d JL |
43 | /* HP-UX, for reasons unknown choose to use a different name for |
44 | the string to [unsigned] long long conversion routines. | |
45 | ||
46 | Furthermore, instead of having the prototypes in stdlib.h like | |
47 | everyone else, they put them into a non-standard header | |
48 | <inttypes.h>. Ugh. | |
49 | ||
50 | <inttypes.h> defines a variety of things, some of which we | |
b6e22016 | 51 | probably do not want. So we don't want to include it here. |
4585ae3d | 52 | |
b6e22016 JL |
53 | Luckily we can just declare strtoll and strtoull with the |
54 | __asm extension which effectively renames calls at the | |
55 | source level without namespace pollution. | |
56 | ||
57 | Also note that the compiler defines _INCLUDE_LONGLONG for C++ | |
58 | unconditionally, which makes intmax_t and uintmax_t long long | |
59 | types. | |
4585ae3d JL |
60 | |
61 | We also force _GLIBCPP_USE_LONG_LONG here so that we don't have | |
62 | to bastardize configure to deal with this sillyness. */ | |
0e20c0b5 JH |
63 | namespace std |
64 | { | |
ef290537 | 65 | #ifndef __LP64__ |
0487b51c | 66 | __extension__ extern "C" long long strtoll (const char *, char **, int) |
d599b3fc | 67 | __asm ("__strtoll"); |
0487b51c | 68 | __extension__ extern "C" unsigned long long strtoull (const char *, char **, int) |
d599b3fc | 69 | __asm ("__strtoull"); |
ef290537 SE |
70 | #else |
71 | __extension__ extern "C" long long strtoll (const char *, char **, int) | |
72 | __asm ("strtol"); | |
73 | __extension__ extern "C" unsigned long long strtoull (const char *, char **, int) | |
74 | __asm ("strtoul"); | |
75 | #endif | |
d599b3fc | 76 | } |
0e20c0b5 | 77 | |
4585ae3d | 78 | #define _GLIBCPP_USE_LONG_LONG 1 |
0e20c0b5 JH |
79 | |
80 | // HPUX on IA64 requires vtable to be 64 bit aligned even at 32 bit | |
81 | // mode. We need to pad the vtable structure to achieve this. | |
82 | #if !defined(_LP64) && defined (__ia64__) | |
83 | #define _GLIBCPP_VTABLE_PADDING 8 | |
84 | typedef long int __padding_type; | |
85 | #endif | |
86 | ||
b6ef3ef6 JDA |
87 | /* We need explicit instantiation of the atomicity lock on HPPA if |
88 | there is no weak support. */ | |
89 | #if !defined(_GLIBCPP_SUPPORTS_WEAK) && defined (__hppa__) | |
fa3d9f57 JDA |
90 | #define _GLIBCPP_INST_ATOMICITY_LOCK 1 |
91 | #endif | |
3b87de3d | 92 | #endif |