stdint.h revision 203e13d97de840e01eded6a267fef9f245cf3a15
1a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/*
2a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * Copyright (C) 2008 The Android Open Source Project
3a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * All rights reserved.
4a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *
5a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * Redistribution and use in source and binary forms, with or without
6a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * modification, are permitted provided that the following conditions
7a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * are met:
8a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *  * Redistributions of source code must retain the above copyright
9a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *    notice, this list of conditions and the following disclaimer.
10a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *  * Redistributions in binary form must reproduce the above copyright
11a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *    notice, this list of conditions and the following disclaimer in
12a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *    the documentation and/or other materials provided with the
13a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *    distribution.
14a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project *
15a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
18a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
19a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
20a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
21a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
22a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
23a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
24a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
25a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * SUCH DAMAGE.
27a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */
28a9a02acc9f5d7b13c742172fe1763840eecd8578Elliott Hughes
29a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifndef _STDINT_H
30a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#define _STDINT_H
31a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
325704c423c81790195161c1757ae79da188590c51Elliott Hughes#include <bits/wchar_limits.h>
33a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#include <stddef.h>
34203e13d97de840e01eded6a267fef9f245cf3a15Elliott Hughes#include <sys/cdefs.h>
359f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes
365470c183611737af5ec954984e4bdb5da8c99b73Elliott Hughestypedef signed char __int8_t;
379f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned char __uint8_t;
389f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef short __int16_t;
399f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned short __uint16_t;
409f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef int __int32_t;
419f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned int __uint32_t;
429f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#if __LP64__
439f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef long __int64_t;
449f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned long __uint64_t;
459f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#else
469f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef long long __int64_t;
479f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned long long __uint64_t;
489f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#endif
499f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes
509f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#if __LP64__
519f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef long __intptr_t;
529f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned long __uintptr_t;
539f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#else
549f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef int __intptr_t;
559f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned int __uintptr_t;
569f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#endif
57a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
58a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int8_t      int8_t;
59a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint8_t     uint8_t;
60e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
61a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int16_t     int16_t;
62a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint16_t    uint16_t;
63e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
64a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int32_t     int32_t;
65a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint32_t    uint32_t;
66e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
67a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int64_t     int64_t;
68a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint64_t    uint64_t;
69a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
709f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef __intptr_t    intptr_t;
719f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef __uintptr_t   uintptr_t;
729f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes
73a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int8_t        int_least8_t;
74a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint8_t       uint_least8_t;
75a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
76a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int16_t       int_least16_t;
77a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint16_t      uint_least16_t;
78a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
79a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t       int_least32_t;
80a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t      uint_least32_t;
81a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
82a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int64_t       int_least64_t;
83a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t      uint_least64_t;
84da030de702b756077fec536ed139e7ea38b51022Calin Juravle
85da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int8_t        int_fast8_t;
86da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint8_t       uint_fast8_t;
87da030de702b756077fec536ed139e7ea38b51022Calin Juravle
88da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int64_t       int_fast64_t;
89a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t      uint_fast64_t;
90a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
9183c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__LP64__)
92da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int64_t       int_fast16_t;
93da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint64_t      uint_fast16_t;
94da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int64_t       int_fast32_t;
95da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint64_t      uint_fast32_t;
96da030de702b756077fec536ed139e7ea38b51022Calin Juravle#else
97da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int32_t       int_fast16_t;
98da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint32_t      uint_fast16_t;
99da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int32_t       int_fast32_t;
100da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint32_t      uint_fast32_t;
101da030de702b756077fec536ed139e7ea38b51022Calin Juravle#endif
102da030de702b756077fec536ed139e7ea38b51022Calin Juravle
1039f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef uint64_t      uintmax_t;
1049f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef int64_t       intmax_t;
105debc021491530ff014166d48232b906d66a62b54Serban Constantinescu
106e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes/* Keep the kernel from trying to define these types... */
107e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define __BIT_TYPES_DEFINED__
108debc021491530ff014166d48232b906d66a62b54Serban Constantinescu
109e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_C(c)         c
110e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_C(c)   INT8_C(c)
111e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_C(c)    INT8_C(c)
112a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
113e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT8_C(c)        c
114e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST8_C(c)  UINT8_C(c)
115e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST8_C(c)   UINT8_C(c)
116a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
117e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_C(c)        c
118e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_C(c)  INT16_C(c)
119e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_C(c)   INT32_C(c)
120a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
121e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT16_C(c)       c
122e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST16_C(c) UINT16_C(c)
123e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST16_C(c)  UINT32_C(c)
124e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_C(c)        c
125e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_C(c)  INT32_C(c)
126e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_C(c)   INT32_C(c)
127a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
128e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT32_C(c)       c ## U
129e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST32_C(c) UINT32_C(c)
130e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST32_C(c)  UINT32_C(c)
131e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_C(c)  INT64_C(c)
132e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_C(c)   INT64_C(c)
1337c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
134e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST64_C(c) UINT64_C(c)
135e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST64_C(c)  UINT64_C(c)
1367c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
137e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_C(c)       INT64_C(c)
138e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINTMAX_C(c)      UINT64_C(c)
1397c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
14083c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__LP64__)
141e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INT64_C(c)      c ## L
142e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINT64_C(c)     c ## UL
143e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_C(c)     INT64_C(c)
144e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_C(c)    UINT64_C(c)
145e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_C(c)    INT64_C(c)
146e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#else
147e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INT64_C(c)      c ## LL
148e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINT64_C(c)     c ## ULL
149e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_C(c)     INT32_C(c)
150e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_C(c)    UINT32_C(c)
151e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_C(c)    INT32_C(c)
152e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#endif
153e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
154e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_MIN         (-128)
155e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_MAX         (127)
156e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_MIN   INT8_MIN
157e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_MAX   INT8_MAX
158e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_MIN    INT8_MIN
159e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_MAX    INT8_MAX
160e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
161e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT8_MAX        (255)
162e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST8_MAX  UINT8_MAX
163e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST8_MAX   UINT8_MAX
164e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
165e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_MIN        (-32768)
166e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_MAX        (32767)
167e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_MIN  INT16_MIN
168e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_MAX  INT16_MAX
169e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_MIN   INT32_MIN
170e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_MAX   INT32_MAX
171e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
172e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT16_MAX       (65535)
173e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST16_MAX UINT16_MAX
174e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST16_MAX  UINT32_MAX
175e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
176e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_MIN        (-2147483647-1)
177e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_MAX        (2147483647)
178e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_MIN  INT32_MIN
179e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_MAX  INT32_MAX
180e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_MIN   INT32_MIN
181e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_MAX   INT32_MAX
182e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
183e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT32_MAX       (4294967295U)
184e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST32_MAX UINT32_MAX
185e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST32_MAX  UINT32_MAX
186e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
187e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT64_MIN        (INT64_C(-9223372036854775807)-1)
188e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT64_MAX        (INT64_C(9223372036854775807))
189e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_MIN  INT64_MIN
190e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_MAX  INT64_MAX
191e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_MIN   INT64_MIN
192e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_MAX   INT64_MAX
193e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT64_MAX       (UINT64_C(18446744073709551615))
194e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
195e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST64_MAX UINT64_MAX
196e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST64_MAX  UINT64_MAX
197e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
198e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_MIN       INT64_MIN
199e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_MAX       INT64_MAX
200e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINTMAX_MAX      UINT64_MAX
201e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
202e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define SIG_ATOMIC_MAX   INT32_MAX
203e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define SIG_ATOMIC_MIN   INT32_MIN
204e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
20583c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__WINT_UNSIGNED__)
20683c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#  define WINT_MAX       UINT32_MAX
207ee7f1b5946dffa3aa95394b8cf6f15527f1068ebDan Albert#  define WINT_MIN       0
20883c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#else
20983c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#  define WINT_MAX       INT32_MAX
21083c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#  define WINT_MIN       INT32_MIN
211e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#endif
212e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
21383c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__LP64__)
214e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MIN     INT64_MIN
215e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MAX     INT64_MAX
216e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_MAX    UINT64_MAX
217e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MIN    INT64_MIN
218e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MAX    INT64_MAX
219e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define SIZE_MAX       UINT64_MAX
220e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#else
221e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MIN     INT32_MIN
222e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MAX     INT32_MAX
223e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_MAX    UINT32_MAX
224e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MIN    INT32_MIN
225e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MAX    INT32_MAX
226e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define SIZE_MAX       UINT32_MAX
2277c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes#endif
2287c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
229a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif /* _STDINT_H */
230