annotate lib/stdint_.h @ 6861:b82bca6af622

Take into account ISO C 99 TC1.
author Bruno Haible <bruno@clisp.org>
date Fri, 23 Jun 2006 14:58:59 +0000
parents e2c19cb657e7
children 45234a95d079
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6511
23e64dcfa86c Cosmetic tweak of SIZE_MAX.
Bruno Haible <bruno@clisp.org>
parents: 6510
diff changeset
1 /* Copyright (C) 2001-2002, 2004-2006 Free Software Foundation, Inc.
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 Written by Bruno Haible, Sam Steingold, Peter Burwood.
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 This file is part of gnulib.
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
5 This program is free software; you can redistribute it and/or modify
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6 it under the terms of the GNU General Public License as published by
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
7 the Free Software Foundation; either version 2, or (at your option)
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8 any later version.
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
9
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 This program is distributed in the hope that it will be useful,
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 GNU General Public License for more details.
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
14
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 You should have received a copy of the GNU General Public License
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 along with this program; if not, write to the Free Software Foundation,
5848
a48fb0e98c8c *** empty log message ***
Paul Eggert <eggert@cs.ucla.edu>
parents: 5713
diff changeset
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 #ifndef _STDINT_H
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 #define _STDINT_H
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
21
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 /*
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 * ISO C 99 <stdint.h> for platforms that lack it.
6768
296aceb85024 Shorter URL.
Bruno Haible <bruno@clisp.org>
parents: 6722
diff changeset
24 * <http://www.opengroup.org/susv3xbd/stdint.h.html>
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
25 */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
26
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 /* Get wchar_t, WCHAR_MIN, WCHAR_MAX. */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 #include <stddef.h>
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
29 /* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
30 #include <limits.h>
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
32 /* Get those types that are already defined in other system include files. */
6836
e2c19cb657e7 Tweak for FreeBSD.
Bruno Haible <bruno@clisp.org>
parents: 6835
diff changeset
33 #if defined(__FreeBSD__) && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
34 # include <sys/inttypes.h>
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
35 #endif
6722
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
36 #if defined(__OpenBSD__)
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
37 /* In OpenBSD 3.8, <sys/types.h> includes <machine/types.h>, which defines
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
38 int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
39 <inttypes.h> includes <machine/types.h> and also defines intptr_t and
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
40 uintptr_t. */
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
41 # include <sys/types.h>
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
42 # if @HAVE_INTTYPES_H@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
43 # include @FULL_PATH_INTTYPES_H@
6722
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
44 # endif
106fa2e6b67f Fix for OpenBSD.
Bruno Haible <bruno@clisp.org>
parents: 6552
diff changeset
45 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
46 #if defined(__linux__) && @HAVE_SYS_BITYPES_H@
6510
0e8512b50591 Support for Linux libc4 and libc5.
Bruno Haible <bruno@clisp.org>
parents: 6459
diff changeset
47 /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
0e8512b50591 Support for Linux libc4 and libc5.
Bruno Haible <bruno@clisp.org>
parents: 6459
diff changeset
48 int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
0e8512b50591 Support for Linux libc4 and libc5.
Bruno Haible <bruno@clisp.org>
parents: 6459
diff changeset
49 included by <sys/types.h>. */
0e8512b50591 Support for Linux libc4 and libc5.
Bruno Haible <bruno@clisp.org>
parents: 6459
diff changeset
50 # include <sys/bitypes.h>
0e8512b50591 Support for Linux libc4 and libc5.
Bruno Haible <bruno@clisp.org>
parents: 6459
diff changeset
51 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
52 #if defined(__sun) && @HAVE_SYS_INTTYPES_H@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX.
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 But note that <sys/int_types.h> contains only the type definitions! */
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
56 # include <sys/inttypes.h>
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
58 #if (defined(__hpux) || defined(_AIX)) && @HAVE_INTTYPES_H@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
59 /* HP-UX 10 <inttypes.h> has nearly everything, except UINT_LEAST8_MAX,
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
60 UINT_FAST8_MAX, PTRDIFF_MIN, PTRDIFF_MAX. */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
61 /* AIX 4 <inttypes.h> has nearly everything, except INTPTR_MIN, INTPTR_MAX,
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
62 UINTPTR_MAX, PTRDIFF_MIN, PTRDIFF_MAX. */
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
63 # include @FULL_PATH_INTTYPES_H@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
64 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
65 #if @HAVE_STDINT_H@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
66 /* Other systems may have an incomplete <stdint.h>. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
67 # include @FULL_PATH_STDINT_H@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
68 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
69
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
70 /* 7.18.1.1. Exact-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
71
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
72 /* Here we assume a standard architecture where the hardware integer
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
73 types have 8, 16, 32, optionally 64 bits. */
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
74
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
75 #if !@HAVE_INT8_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
76 typedef signed char int8_t;
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
77 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
78 #if !@HAVE_UINT8_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
79 typedef unsigned char uint8_t;
6835
d238fb8227ce Tweak for Solaris 2.5.1.
Bruno Haible <bruno@clisp.org>
parents: 6826
diff changeset
80 # define _UINT8_T /* avoid collision with Solaris 2.5.1 <pthread.h> */
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
81 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
82
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
83 #if !@HAVE_INT16_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 typedef short int16_t;
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
86 #if !@HAVE_UINT16_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
87 typedef unsigned short uint16_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
88 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
89
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
90 #if !@HAVE_INT32_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
91 typedef int int32_t;
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
92 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
93 #if !@HAVE_UINT32_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
94 typedef unsigned int uint32_t;
6835
d238fb8227ce Tweak for Solaris 2.5.1.
Bruno Haible <bruno@clisp.org>
parents: 6826
diff changeset
95 # define _UINT32_T /* avoid collision with Solaris 2.5.1 <pthread.h> */
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
96 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
97
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
98 #if @HAVE_INT64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
99 # define _STDINT_H_HAVE_INT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
100 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
101 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
102 typedef long int64_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
103 # define _STDINT_H_HAVE_INT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
104 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
105 typedef long long int64_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
106 # define _STDINT_H_HAVE_INT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
107 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
108 typedef __int64 int64_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
109 # define _STDINT_H_HAVE_INT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
110 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
111 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
112 #if @HAVE_UINT64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
113 # define _STDINT_H_HAVE_UINT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
114 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
115 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
116 typedef unsigned long uint64_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
117 # define _STDINT_H_HAVE_UINT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
118 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
119 typedef unsigned long long uint64_t;
6835
d238fb8227ce Tweak for Solaris 2.5.1.
Bruno Haible <bruno@clisp.org>
parents: 6826
diff changeset
120 # define _UINT64_T /* avoid collision with Solaris 2.5.1 <pthread.h> */
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
121 # define _STDINT_H_HAVE_UINT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
122 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
123 typedef unsigned __int64 uint64_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
124 # define _STDINT_H_HAVE_UINT64 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
125 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
126 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
127
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
128 /* 7.18.1.2. Minimum-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
129
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
130 /* Here we assume a standard architecture where the hardware integer
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
131 types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
132 are the same as the corresponding N_t types. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
133
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
134 #if !@HAVE_INT_LEAST8_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
135 typedef int8_t int_least8_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
136 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
137 #if !@HAVE_UINT_LEAST8_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
138 typedef uint8_t uint_least8_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
139 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
140
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
141 #if !@HAVE_INT_LEAST16_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
142 typedef int16_t int_least16_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
143 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
144 #if !@HAVE_UINT_LEAST16_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
145 typedef uint16_t uint_least16_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
146 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
147
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
148 #if !@HAVE_INT_LEAST32_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
149 typedef int32_t int_least32_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
150 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
151 #if !@HAVE_UINT_LEAST32_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
152 typedef uint32_t uint_least32_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
153 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
154
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
155 #if !@HAVE_INT_LEAST64_T@ && _STDINT_H_HAVE_INT64
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
156 typedef int64_t int_least64_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
157 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
158 #if !@HAVE_UINT_LEAST64_T@ && _STDINT_H_HAVE_UINT64
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
159 typedef uint64_t uint_least64_t;
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
160 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
161
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
162 /* 7.18.1.3. Fastest minimum-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
163
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
164 /* Note: Other <stdint.h> substitutes may define these types differently.
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
165 It is not recommended to use these types in public header files. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
166
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
167 /* Here we assume a standard architecture where the hardware integer
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
168 types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
169 are taken from the same list of types. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
170
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
171 /* On alpha processors, int32_t variables are slower than int64_t variables,
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
172 due to the necessary zap instructions. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
173 #if defined __alpha
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
174 # define _STDINT_H_INT64_FASTER_THAN_INT32 1
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
175 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
176
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
177 #if !@HAVE_INT_FAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
178 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
179 typedef int64_t int_fast8_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
180 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
181 typedef int32_t int_fast8_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
182 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
183 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
184 #if !@HAVE_UINT_FAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
185 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
186 typedef uint64_t uint_fast8_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
187 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
188 typedef uint32_t uint_fast8_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
189 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
190 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
191
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
192 #if !@HAVE_INT_FAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
193 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
194 typedef int64_t int_fast16_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
195 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
196 typedef int32_t int_fast16_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
197 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
198 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
199 #if !@HAVE_UINT_FAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
200 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
201 typedef uint64_t uint_fast16_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
202 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
203 typedef uint32_t uint_fast16_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
204 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
205 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
206
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
207 #if !@HAVE_INT_FAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
208 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
209 typedef int64_t int_fast32_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
210 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
211 typedef int32_t int_fast32_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
212 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
213 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
214 #if !@HAVE_UINT_FAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
215 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
216 typedef uint64_t uint_fast32_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
217 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
218 typedef uint32_t uint_fast32_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
219 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
220 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
221
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
222 #if !@HAVE_INT_FAST64_T@ && _STDINT_H_HAVE_INT64
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
223 typedef int64_t int_fast64_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
224 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
225 #if !@HAVE_UINT_FAST64_T@ && _STDINT_H_HAVE_UINT64
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
226 typedef uint64_t uint_fast64_t;
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
227 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
228
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
229 /* 7.18.1.4. Integer types capable of holding object pointers */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
230
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
231 /* On some platforms (like IRIX6 MIPS with -n32) sizeof(void*) < sizeof(long),
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
232 but this doesn't matter here. */
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
233 #if !@HAVE_INTPTR_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
234 typedef long intptr_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
235 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
236 #if !@HAVE_UINTPTR_T@
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
237 typedef unsigned long uintptr_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
238 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
239
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
240 /* 7.18.1.5. Greatest-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
241
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
242 /* Note: These types are compiler dependent. It may be unwise to use them in
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
243 public header files. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
244
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
245 #if !@HAVE_INTMAX_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
246 # ifdef _STDINT_H_HAVE_INT64
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
247 typedef int64_t intmax_t;
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
248 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
249 typedef int32_t intmax_t;
6459
a7256b0c876a * stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5880
diff changeset
250 # endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
251 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
252 #if !@HAVE_UINTMAX_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
253 # ifdef _STDINT_H_HAVE_UINT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
254 typedef uint64_t uintmax_t;
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
255 # else
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
256 typedef uint32_t uintmax_t;
6459
a7256b0c876a * stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5880
diff changeset
257 # endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
258 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
259
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
260 /* 7.18.2. Limits of specified-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
261
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
262 #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS)
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
263
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
264 /* 7.18.2.1. Limits of exact-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
265
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
266 /* Here we assume a standard architecture where the hardware integer
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
267 types have 8, 16, 32, optionally 64 bits. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
268
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
269 #if @HAVE_INT8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
270 # ifndef INT8_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
271 # define INT8_MIN (-1 << (@BITSIZEOF_INT8_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
272 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
273 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
274 # define INT8_MIN -128
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
275 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
276 #if @HAVE_INT8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
277 # ifndef INT8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
278 # define INT8_MAX (~ (-1 << (@BITSIZEOF_INT8_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
279 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
280 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
281 # define INT8_MAX 127
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
282 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
283 #if @HAVE_UINT8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
284 # ifndef UINT8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
285 # if @BITSIZEOF_UINT8_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
286 # define UINT8_MAX (((1 << (@BITSIZEOF_UINT8_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
287 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
288 # define UINT8_MAX (((1U << (@BITSIZEOF_UINT8_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
289 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
290 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
291 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
292 # define UINT8_MAX 255
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
293 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
294
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
295 #if @HAVE_INT16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
296 # ifndef INT16_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
297 # define INT16_MIN (-1 << (@BITSIZEOF_INT16_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
298 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
299 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
300 # define INT16_MIN -32768
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
301 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
302 #if @HAVE_INT16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
303 # ifndef INT16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
304 # define INT16_MAX (~ (-1 << (@BITSIZEOF_INT16_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
305 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
306 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
307 # define INT16_MAX 32767
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
308 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
309 #if @HAVE_UINT16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
310 # ifndef UINT16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
311 # if @BITSIZEOF_UINT16_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
312 # define UINT16_MAX (((1 << (@BITSIZEOF_UINT16_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
313 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
314 # define UINT16_MAX (((1U << (@BITSIZEOF_UINT16_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
315 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
316 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
317 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
318 # define UINT16_MAX 65535
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
319 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
320
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
321 #if @HAVE_INT32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
322 # ifndef INT32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
323 # define INT32_MIN (-1 << (@BITSIZEOF_INT32_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
324 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
325 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
326 # define INT32_MIN (~INT32_MAX)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
327 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
328 #if @HAVE_INT32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
329 # ifndef INT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
330 # define INT32_MAX (~ (-1 << (@BITSIZEOF_INT32_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
331 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
332 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
333 # define INT32_MAX 2147483647
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
334 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
335 #if @HAVE_UINT32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
336 # ifndef UINT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
337 # if @BITSIZEOF_UINT32_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
338 # define UINT32_MAX (((1 << (@BITSIZEOF_UINT32_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
339 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
340 # define UINT32_MAX (((1U << (@BITSIZEOF_UINT32_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
341 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
342 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
343 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
344 # define UINT32_MAX 4294967295U
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
345 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
346
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
347 #if @HAVE_INT64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
348 # ifndef INT64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
349 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
350 # define INT64_MIN (-1L << (@BITSIZEOF_INT64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
351 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
352 # define INT64_MIN (-1LL << (@BITSIZEOF_INT64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
353 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
354 # define INT64_MIN (-1i64 << (@BITSIZEOF_INT64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
355 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
356 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
357 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
358 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
359 # define INT64_MIN (~INT64_MAX)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
360 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
361 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
362 #if @HAVE_INT64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
363 # ifndef INT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
364 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
365 # define INT64_MAX (~ (-1L << (@BITSIZEOF_INT64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
366 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
367 # define INT64_MAX (~ (-1LL << (@BITSIZEOF_INT64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
368 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
369 # define INT64_MAX (~ (-1i64 << (@BITSIZEOF_INT64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
370 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
371 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
372 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
373 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
374 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
375 # define INT64_MAX 9223372036854775807L
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
376 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
377 # define INT64_MAX 9223372036854775807LL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
378 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
379 # define INT64_MAX 9223372036854775807i64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
380 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
381 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
382 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
383 #if @HAVE_UINT64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
384 # ifndef UINT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
385 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
386 # define UINT64_MAX (((1UL << (@BITSIZEOF_UINT64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
387 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
388 # define UINT64_MAX (((1ULL << (@BITSIZEOF_UINT64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
389 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
390 # define UINT64_MAX (((1ui64 << (@BITSIZEOF_UINT64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
391 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
392 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
393 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
394 # ifdef _STDINT_H_HAVE_UINT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
395 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
396 # define UINT64_MAX 18446744073709551615UL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
397 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
398 # define UINT64_MAX 18446744073709551615ULL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
399 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
400 # define UINT64_MAX 18446744073709551615ui64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
401 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
402 # endif
5880
f403eaab7742 Simplify the #ifdefs.
Bruno Haible <bruno@clisp.org>
parents: 5879
diff changeset
403 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
404
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
405 /* 7.18.2.2. Limits of minimum-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
406
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
407 /* Here we assume a standard architecture where the hardware integer
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
408 types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
409 are the same as the corresponding N_t types. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
410
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
411 #if @HAVE_INT_LEAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
412 # ifndef INT_LEAST8_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
413 # define INT_LEAST8_MIN (-1 << (@BITSIZEOF_INT_LEAST8_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
414 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
415 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
416 # define INT_LEAST8_MIN INT8_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
417 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
418 #if @HAVE_INT_LEAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
419 # ifndef INT_LEAST8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
420 # define INT_LEAST8_MAX (~ (-1 << (@BITSIZEOF_INT_LEAST8_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
421 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
422 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
423 # define INT_LEAST8_MAX INT8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
424 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
425 #if @HAVE_UINT_LEAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
426 # ifndef UINT_LEAST8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
427 # if @BITSIZEOF_UINT_LEAST8_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
428 # define UINT_LEAST8_MAX (((1 << (@BITSIZEOF_UINT_LEAST8_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
429 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
430 # define UINT_LEAST8_MAX (((1U << (@BITSIZEOF_UINT_LEAST8_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
431 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
432 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
433 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
434 # define UINT_LEAST8_MAX UINT8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
435 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
436
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
437 #if @HAVE_INT_LEAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
438 # ifndef INT_LEAST16_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
439 # define INT_LEAST16_MIN (-1 << (@BITSIZEOF_INT_LEAST16_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
440 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
441 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
442 # define INT_LEAST16_MIN INT16_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
443 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
444 #if @HAVE_INT_LEAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
445 # ifndef INT_LEAST16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
446 # define INT_LEAST16_MAX (~ (-1 << (@BITSIZEOF_INT_LEAST16_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
447 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
448 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
449 # define INT_LEAST16_MAX INT16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
450 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
451 #if @HAVE_UINT_LEAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
452 # ifndef UINT_LEAST16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
453 # if @BITSIZEOF_UINT_LEAST16_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
454 # define UINT_LEAST16_MAX (((1 << (@BITSIZEOF_UINT_LEAST16_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
455 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
456 # define UINT_LEAST16_MAX (((1U << (@BITSIZEOF_UINT_LEAST16_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
457 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
458 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
459 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
460 # define UINT_LEAST16_MAX UINT16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
461 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
462
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
463 #if @HAVE_INT_LEAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
464 # ifndef INT_LEAST32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
465 # define INT_LEAST32_MIN (-1 << (@BITSIZEOF_INT_LEAST32_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
466 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
467 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
468 # define INT_LEAST32_MIN INT32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
469 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
470 #if @HAVE_INT_LEAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
471 # ifndef INT_LEAST32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
472 # define INT_LEAST32_MAX (~ (-1 << (@BITSIZEOF_INT_LEAST32_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
473 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
474 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
475 # define INT_LEAST32_MAX INT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
476 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
477 #if @HAVE_UINT_LEAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
478 # ifndef UINT_LEAST32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
479 # if @BITSIZEOF_UINT_LEAST32_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
480 # define UINT_LEAST32_MAX (((1 << (@BITSIZEOF_UINT_LEAST32_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
481 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
482 # define UINT_LEAST32_MAX (((1U << (@BITSIZEOF_UINT_LEAST32_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
483 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
484 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
485 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
486 # define UINT_LEAST32_MAX UINT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
487 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
488
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
489 #if @HAVE_INT_LEAST64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
490 # ifndef INT_LEAST64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
491 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
492 # define INT_LEAST64_MIN (-1L << (@BITSIZEOF_INT_LEAST64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
493 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
494 # define INT_LEAST64_MIN (-1LL << (@BITSIZEOF_INT_LEAST64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
495 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
496 # define INT_LEAST64_MIN (-1i64 << (@BITSIZEOF_INT_LEAST64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
497 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
498 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
499 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
500 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
501 # define INT_LEAST64_MIN INT64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
502 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
503 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
504 #if @HAVE_INT_LEAST64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
505 # ifndef INT_LEAST64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
506 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
507 # define INT_LEAST64_MAX (~ (-1L << (@BITSIZEOF_INT_LEAST64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
508 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
509 # define INT_LEAST64_MAX (~ (-1LL << (@BITSIZEOF_INT_LEAST64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
510 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
511 # define INT_LEAST64_MAX (~ (-1i64 << (@BITSIZEOF_INT_LEAST64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
512 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
513 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
514 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
515 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
516 # define INT_LEAST64_MAX INT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
517 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
518 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
519 #if @HAVE_UINT_LEAST64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
520 # ifndef UINT_LEAST64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
521 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
522 # define UINT_LEAST64_MAX (((1UL << (@BITSIZEOF_UINT_LEAST64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
523 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
524 # define UINT_LEAST64_MAX (((1ULL << (@BITSIZEOF_UINT_LEAST64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
525 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
526 # define UINT_LEAST64_MAX (((1ui64 << (@BITSIZEOF_UINT_LEAST64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
527 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
528 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
529 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
530 # ifdef _STDINT_H_HAVE_UINT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
531 # define UINT_LEAST64_MAX UINT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
532 # endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
533 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
534
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
535 /* 7.18.2.3. Limits of fastest minimum-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
536
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
537 /* Here we assume a standard architecture where the hardware integer
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
538 types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
539 are taken from the same list of types. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
540
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
541 #if @HAVE_INT_FAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
542 # ifndef INT_FAST8_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
543 # define INT_FAST8_MIN (-1L << (@BITSIZEOF_INT_FAST8_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
544 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
545 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
546 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
547 # define INT_FAST8_MIN INT64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
548 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
549 # define INT_FAST8_MIN INT32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
550 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
551 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
552 #if @HAVE_INT_FAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
553 # ifndef INT_FAST8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
554 # define INT_FAST8_MAX (~ (-1L << (@BITSIZEOF_INT_FAST8_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
555 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
556 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
557 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
558 # define INT_FAST8_MAX INT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
559 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
560 # define INT_FAST8_MAX INT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
561 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
562 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
563 #if @HAVE_UINT_FAST8_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
564 # ifndef UINT_FAST8_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
565 # if @BITSIZEOF_UINT_FAST8_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
566 # define UINT_FAST8_MAX (((1 << (@BITSIZEOF_UINT_FAST8_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
567 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
568 # define UINT_FAST8_MAX (((1UL << (@BITSIZEOF_UINT_FAST8_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
569 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
570 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
571 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
572 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
573 # define UINT_FAST8_MAX UINT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
574 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
575 # define UINT_FAST8_MAX UINT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
576 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
577 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
578
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
579 #if @HAVE_INT_FAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
580 # ifndef INT_FAST16_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
581 # define INT_FAST16_MIN (-1L << (@BITSIZEOF_INT_FAST16_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
582 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
583 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
584 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
585 # define INT_FAST16_MIN INT64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
586 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
587 # define INT_FAST16_MIN INT32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
588 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
589 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
590 #if @HAVE_INT_FAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
591 # ifndef INT_FAST16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
592 # define INT_FAST16_MAX (~ (-1L << (@BITSIZEOF_INT_FAST16_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
593 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
594 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
595 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
596 # define INT_FAST16_MAX INT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
597 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
598 # define INT_FAST16_MAX INT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
599 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
600 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
601 #if @HAVE_UINT_FAST16_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
602 # ifndef UINT_FAST16_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
603 # if @BITSIZEOF_UINT_FAST16_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
604 # define UINT_FAST16_MAX (((1 << (@BITSIZEOF_UINT_FAST16_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
605 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
606 # define UINT_FAST16_MAX (((1UL << (@BITSIZEOF_UINT_FAST16_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
607 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
608 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
609 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
610 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
611 # define UINT_FAST16_MAX UINT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
612 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
613 # define UINT_FAST16_MAX UINT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
614 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
615 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
616
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
617 #if @HAVE_INT_FAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
618 # ifndef INT_FAST32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
619 # define INT_FAST32_MIN (-1L << (@BITSIZEOF_INT_FAST32_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
620 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
621 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
622 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
623 # define INT_FAST32_MIN INT64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
624 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
625 # define INT_FAST32_MIN INT32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
626 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
627 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
628 #if @HAVE_INT_FAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
629 # ifndef INT_FAST32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
630 # define INT_FAST32_MAX (~ (-1L << (@BITSIZEOF_INT_FAST32_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
631 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
632 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
633 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
634 # define INT_FAST32_MAX INT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
635 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
636 # define INT_FAST32_MAX INT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
637 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
638 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
639 #if @HAVE_UINT_FAST32_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
640 # ifndef UINT_FAST32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
641 # if @BITSIZEOF_UINT_FAST32_T@ < @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
642 # define UINT_FAST32_MAX (((1 << (@BITSIZEOF_UINT_FAST32_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
643 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
644 # define UINT_FAST32_MAX (((1UL << (@BITSIZEOF_UINT_FAST32_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
645 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
646 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
647 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
648 # if _STDINT_H_INT64_FASTER_THAN_INT32
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
649 # define UINT_FAST32_MAX UINT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
650 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
651 # define UINT_FAST32_MAX UINT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
652 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
653 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
654
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
655 #if @HAVE_INT_FAST64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
656 # ifndef INT_FAST64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
657 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
658 # define INT_FAST64_MIN (-1L << (@BITSIZEOF_INT_FAST64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
659 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
660 # define INT_FAST64_MIN (-1LL << (@BITSIZEOF_INT_FAST64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
661 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
662 # define INT_FAST64_MIN (-1i64 << (@BITSIZEOF_INT_FAST64_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
663 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
664 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
665 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
666 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
667 # define INT_FAST64_MIN INT64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
668 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
669 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
670 #if @HAVE_INT_FAST64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
671 # ifndef INT_FAST64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
672 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
673 # define INT_FAST64_MAX (~ (-1L << (@BITSIZEOF_INT_FAST64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
674 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
675 # define INT_FAST64_MAX (~ (-1LL << (@BITSIZEOF_INT_FAST64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
676 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
677 # define INT_FAST64_MAX (~ (-1i64 << (@BITSIZEOF_INT_FAST64_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
678 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
679 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
680 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
681 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
682 # define INT_FAST64_MAX INT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
683 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
684 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
685 #if @HAVE_UINT_FAST64_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
686 # ifndef UINT_FAST64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
687 # if @HAVE_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
688 # define UINT_FAST64_MAX (((1UL << (@BITSIZEOF_UINT_FAST64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
689 # elif @HAVE_LONG_LONG_64BIT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
690 # define UINT_FAST64_MAX (((1ULL << (@BITSIZEOF_UINT_FAST64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
691 # elif defined _MSC_VER
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
692 # define UINT_FAST64_MAX (((1ui64 << (@BITSIZEOF_UINT_FAST64_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
693 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
694 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
695 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
696 # ifdef _STDINT_H_HAVE_UINT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
697 # define UINT_FAST64_MAX UINT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
698 # endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
699 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
700
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
701 /* 7.18.2.4. Limits of integer types capable of holding object pointers */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
702
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
703 #if @HAVE_INTPTR_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
704 # ifndef INTPTR_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
705 # if @BITSIZEOF_INTPTR_T@ > @BITSIZEOF_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
706 # define INTPTR_MIN (-1LL << (@BITSIZEOF_INTPTR_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
707 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
708 # define INTPTR_MIN (-1L << (@BITSIZEOF_INTPTR_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
709 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
710 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
711 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
712 # define INTPTR_MIN LONG_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
713 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
714 #if @HAVE_INTPTR_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
715 # ifndef INTPTR_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
716 # if @BITSIZEOF_INTPTR_T@ > @BITSIZEOF_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
717 # define INTPTR_MAX (~ (-1LL << (@BITSIZEOF_INTPTR_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
718 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
719 # define INTPTR_MAX (~ (-1L << (@BITSIZEOF_INTPTR_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
720 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
721 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
722 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
723 # define INTPTR_MAX LONG_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
724 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
725 #if @HAVE_UINTPTR_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
726 # ifndef UINTPTR_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
727 # if @BITSIZEOF_UINTPTR_T@ > @BITSIZEOF_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
728 # define UINTPTR_MAX (((1ULL << (@BITSIZEOF_UINTPTR_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
729 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
730 # define UINTPTR_MAX (((1UL << (@BITSIZEOF_UINTPTR_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
731 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
732 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
733 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
734 # define UINTPTR_MAX ULONG_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
735 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
736
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
737 /* 7.18.2.5. Limits of greatest-width integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
738
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
739 #if @HAVE_INTMAX_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
740 # ifndef INTMAX_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
741 # if @BITSIZEOF_INTMAX_T@ > @BITSIZEOF_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
742 # define INTMAX_MIN (-1LL << (@BITSIZEOF_INTMAX_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
743 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
744 # define INTMAX_MIN (-1L << (@BITSIZEOF_INTMAX_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
745 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
746 # endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
747 #else
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
748 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
749 # define INTMAX_MIN INT64_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
750 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
751 # define INTMAX_MIN INT32_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
752 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
753 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
754 #if @HAVE_INTMAX_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
755 # ifndef INTMAX_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
756 # if @BITSIZEOF_INTMAX_T@ > @BITSIZEOF_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
757 # define INTMAX_MAX (~ (-1LL << (@BITSIZEOF_INTMAX_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
758 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
759 # define INTMAX_MAX (~ (-1L << (@BITSIZEOF_INTMAX_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
760 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
761 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
762 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
763 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
764 # define INTMAX_MAX INT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
765 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
766 # define INTMAX_MAX INT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
767 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
768 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
769 #if @HAVE_UINTMAX_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
770 # ifndef UINTMAX_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
771 # if @BITSIZEOF_UINTMAX_T@ > @BITSIZEOF_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
772 # define UINTMAX_MAX (((1ULL << (@BITSIZEOF_UINTMAX_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
773 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
774 # define UINTMAX_MAX (((1UL << (@BITSIZEOF_UINTMAX_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
775 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
776 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
777 #else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
778 # ifdef _STDINT_H_HAVE_INT64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
779 # define UINTMAX_MAX UINT64_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
780 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
781 # define UINTMAX_MAX UINT32_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
782 # endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
783 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
784
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
785 /* 7.18.3. Limits of other integer types */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
786
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
787 /* ptrdiff_t limits */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
788 #ifndef PTRDIFF_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
789 # if @BITSIZEOF_PTRDIFF_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_PTRDIFF_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
790 # define PTRDIFF_MIN (-1L << (@BITSIZEOF_PTRDIFF_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
791 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
792 # define PTRDIFF_MIN (-1 << (@BITSIZEOF_PTRDIFF_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
793 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
794 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
795 #ifndef PTRDIFF_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
796 # if @BITSIZEOF_PTRDIFF_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_PTRDIFF_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
797 # define PTRDIFF_MAX (~ (-1L << (@BITSIZEOF_PTRDIFF_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
798 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
799 # define PTRDIFF_MAX (~ (-1 << (@BITSIZEOF_PTRDIFF_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
800 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
801 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
802
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
803 /* sig_atomic_t limits */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
804 #ifndef SIG_ATOMIC_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
805 # if @HAVE_SIGNED_SIG_ATOMIC_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
806 # if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
807 # define SIG_ATOMIC_MIN (-1L << (@BITSIZEOF_SIG_ATOMIC_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
808 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
809 # define SIG_ATOMIC_MIN (-1 << (@BITSIZEOF_SIG_ATOMIC_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
810 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
811 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
812 # if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
813 # define SIG_ATOMIC_MIN 0UL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
814 # elif @BITSIZEOF_SIG_ATOMIC_T@ >= @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
815 # define SIG_ATOMIC_MIN 0U
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
816 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
817 # define SIG_ATOMIC_MIN 0
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
818 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
819 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
820 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
821 #ifndef SIG_ATOMIC_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
822 # if @HAVE_SIGNED_SIG_ATOMIC_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
823 # if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
824 # define SIG_ATOMIC_MAX (~ (-1L << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
825 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
826 # define SIG_ATOMIC_MAX (~ (-1 << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
827 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
828 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
829 # if @BITSIZEOF_SIG_ATOMIC_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_SIG_ATOMIC_T_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
830 # define SIG_ATOMIC_MAX (((1UL << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
831 # elif @BITSIZEOF_SIG_ATOMIC_T@ >= @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
832 # define SIG_ATOMIC_MAX (((1U << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
833 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
834 # define SIG_ATOMIC_MAX (((1 << (@BITSIZEOF_SIG_ATOMIC_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
835 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
836 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
837 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
838
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
839 /* size_t limit */
6511
23e64dcfa86c Cosmetic tweak of SIZE_MAX.
Bruno Haible <bruno@clisp.org>
parents: 6510
diff changeset
840 #ifndef SIZE_MAX /* SIZE_MAX may also be defined in config.h. */
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
841 # if @BITSIZEOF_SIZE_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_SIZE_T_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
842 # define SIZE_MAX (((1UL << (@BITSIZEOF_SIZE_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
843 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
844 # define SIZE_MAX (((1U << (@BITSIZEOF_SIZE_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
845 # endif
6459
a7256b0c876a * stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
Paul Eggert <eggert@cs.ucla.edu>
parents: 5880
diff changeset
846 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
847
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
848 /* wchar_t limits may already be defined in <stddef.h>. */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
849 #ifndef WCHAR_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
850 # if @HAVE_SIGNED_WCHAR_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
851 # if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WCHAR_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
852 # define WCHAR_MIN (-1L << (@BITSIZEOF_WCHAR_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
853 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
854 # define WCHAR_MIN (-1 << (@BITSIZEOF_WCHAR_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
855 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
856 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
857 # if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WCHAR_T_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
858 # define WCHAR_MIN 0UL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
859 # elif @BITSIZEOF_WCHAR_T@ >= @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
860 # define WCHAR_MIN 0U
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
861 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
862 # define WCHAR_MIN 0
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
863 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
864 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
865 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
866 #ifndef WCHAR_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
867 # if @HAVE_SIGNED_WCHAR_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
868 # if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WCHAR_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
869 # define WCHAR_MAX (~ (-1L << (@BITSIZEOF_WCHAR_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
870 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
871 # define WCHAR_MAX (~ (-1 << (@BITSIZEOF_WCHAR_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
872 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
873 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
874 # if @BITSIZEOF_WCHAR_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WCHAR_T_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
875 # define WCHAR_MAX (((1UL << (@BITSIZEOF_WCHAR_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
876 # elif @BITSIZEOF_WCHAR_T@ >= @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
877 # define WCHAR_MAX (((1U << (@BITSIZEOF_WCHAR_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
878 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
879 # define WCHAR_MAX (((1 << (@BITSIZEOF_WCHAR_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
880 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
881 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
882 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
883
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
884 /* wint_t limits */
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
885 #ifndef WINT_MIN
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
886 # if @HAVE_SIGNED_WINT_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
887 # if @BITSIZEOF_WINT_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WINT_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
888 # define WINT_MIN (-1L << (@BITSIZEOF_WINT_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
889 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
890 # define WINT_MIN (-1 << (@BITSIZEOF_WINT_T@ - 1))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
891 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
892 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
893 # if @BITSIZEOF_WINT_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WINT_T_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
894 # define WINT_MIN 0UL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
895 # elif @BITSIZEOF_WINT_T@ >= @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
896 # define WINT_MIN 0U
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
897 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
898 # define WINT_MIN 0
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
899 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
900 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
901 #endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
902 #ifndef WINT_MAX
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
903 # if @HAVE_SIGNED_WINT_T@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
904 # if @BITSIZEOF_WINT_T@ > @BITSIZEOF_LONG@ || @SAME_TYPE_WINT_T_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
905 # define WINT_MAX (~ (-1L << (@BITSIZEOF_WINT_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
906 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
907 # define WINT_MAX (~ (-1 << (@BITSIZEOF_WINT_T@ - 1)))
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
908 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
909 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
910 # if @BITSIZEOF_WINT_T@ > @BITSIZEOF_UNSIGNED_LONG@ || @SAME_TYPE_WINT_T_UNSIGNED_LONG@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
911 # define WINT_MAX (((1UL << (@BITSIZEOF_WINT_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
912 # elif @BITSIZEOF_WINT_T@ >= @BITSIZEOF_UNSIGNED_INT@
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
913 # define WINT_MAX (((1U << (@BITSIZEOF_WINT_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
914 # else
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
915 # define WINT_MAX (((1 << (@BITSIZEOF_WINT_T@ - 1)) - 1) * 2 + 1)
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
916 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
917 # endif
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
918 #endif
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
919
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
920 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
921
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
922 /* 7.18.4. Macros for integer constants */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
923
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
924 #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS)
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
925
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
926 /* 7.18.4.1. Macros for minimum-width integer constants */
6861
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
927 /* According to ISO C 99 Technical Corrigendum 1 */
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
928
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
929 #undef INT8_C
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
930 #undef UINT8_C
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
931 #define INT8_C(x) x
6861
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
932 #if @HAVE_UINT8_T@
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
933 # if @BITSIZEOF_UINT8_T@ < @BITSIZEOF_UNSIGNED_INT@
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
934 # define UINT8_C(x) x
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
935 # else
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
936 # define UINT8_C(x) x##U
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
937 # endif
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
938 #else
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
939 # define UINT8_C(x) x
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
940 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
941
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
942 #undef INT16_C
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
943 #undef UINT16_C
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
944 #define INT16_C(x) x
6861
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
945 #if @HAVE_UINT16_T@
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
946 # if @BITSIZEOF_UINT16_T@ < @BITSIZEOF_UNSIGNED_INT@
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
947 # define UINT16_C(x) x
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
948 # else
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
949 # define UINT16_C(x) x##U
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
950 # endif
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
951 #else
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
952 # define UINT16_C(x) x
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
953 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
954
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
955 #undef INT32_C
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
956 #undef UINT32_C
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
957 #define INT32_C(x) x
6861
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
958 #if @HAVE_UINT32_T@
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
959 # if @BITSIZEOF_UINT32_T@ < @BITSIZEOF_UNSIGNED_INT@
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
960 # define UINT32_C(x) x
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
961 # else
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
962 # define UINT32_C(x) x##U
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
963 # endif
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
964 #else
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
965 # define UINT32_C(x) x
b82bca6af622 Take into account ISO C 99 TC1.
Bruno Haible <bruno@clisp.org>
parents: 6836
diff changeset
966 #endif
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
967
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
968 #undef INT64_C
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
969 #undef UINT64_C
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
970 #if @HAVE_LONG_64BIT@
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
971 # define INT64_C(x) x##L
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
972 # define UINT64_C(x) x##UL
5713
b91d73b06792 Rename HAVE_LONGLONG_64BIT to HAVE_LONG_LONG_64BIT.
Bruno Haible <bruno@clisp.org>
parents: 5219
diff changeset
973 #elif @HAVE_LONG_LONG_64BIT@
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
974 # define INT64_C(x) x##LL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
975 # define UINT64_C(x) x##ULL
5850
1b7017c2d9b8 Add support for 64-bit integers in the MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
976 #elif defined(_MSC_VER)
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
977 # define INT64_C(x) x##i64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
978 # define UINT64_C(x) x##ui64
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
979 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
980
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
981 /* 7.18.4.2. Macros for greatest-width integer constants */
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
982
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
983 #undef INTMAX_C
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
984 #undef UINTMAX_C
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
985 #if @HAVE_LONG_64BIT@
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
986 # define INTMAX_C(x) x##L
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
987 # define UINTMAX_C(x) x##UL
5713
b91d73b06792 Rename HAVE_LONGLONG_64BIT to HAVE_LONG_LONG_64BIT.
Bruno Haible <bruno@clisp.org>
parents: 5219
diff changeset
988 #elif @HAVE_LONG_LONG_64BIT@
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
989 # define INTMAX_C(x) x##LL
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
990 # define UINTMAX_C(x) x##ULL
5850
1b7017c2d9b8 Add support for 64-bit integers in the MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents: 5848
diff changeset
991 #elif defined(_MSC_VER)
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
992 # define INTMAX_C(x) x##i64
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
993 # define UINTMAX_C(x) x##ui64
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
994 #else
6826
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
995 # define INTMAX_C(x) x
e896d59bd228 Rewrite module 'stdint' to be fully autoconfiguring.
Bruno Haible <bruno@clisp.org>
parents: 6790
diff changeset
996 # define UINTMAX_C(x) x##U
5219
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
997 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
998
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
999 #endif
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1000
fcff9e1a6e22 New module 'stdint'.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1001 #endif /* _STDINT_H */