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
32a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#include <stddef.h>
3383c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#include <machine/wchar_limits.h>
349f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes
359f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef __signed char __int8_t;
369f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned char __uint8_t;
379f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef short __int16_t;
389f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned short __uint16_t;
399f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef int __int32_t;
409f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned int __uint32_t;
419f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#if __LP64__
429f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef long __int64_t;
439f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned long __uint64_t;
449f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#else
459f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef long long __int64_t;
469f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned long long __uint64_t;
479f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#endif
489f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes
499f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#if __LP64__
509f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef long __intptr_t;
519f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned long __uintptr_t;
529f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#else
539f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef int __intptr_t;
549f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef unsigned int __uintptr_t;
559f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes#endif
56a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
57a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int8_t      int8_t;
58a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint8_t     uint8_t;
59e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
60a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int16_t     int16_t;
61a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint16_t    uint16_t;
62e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
63a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int32_t     int32_t;
64a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint32_t    uint32_t;
65e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
66a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int64_t     int64_t;
67a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint64_t    uint64_t;
68a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
699f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef __intptr_t    intptr_t;
709f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef __uintptr_t   uintptr_t;
719f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughes
72a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int8_t        int_least8_t;
73a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint8_t       uint_least8_t;
74a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
75a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int16_t       int_least16_t;
76a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint16_t      uint_least16_t;
77a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
78a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t       int_least32_t;
79a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t      uint_least32_t;
80a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
81a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int64_t       int_least64_t;
82a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t      uint_least64_t;
83da030de702b756077fec536ed139e7ea38b51022Calin Juravle
84da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int8_t        int_fast8_t;
85da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint8_t       uint_fast8_t;
86da030de702b756077fec536ed139e7ea38b51022Calin Juravle
87da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int64_t       int_fast64_t;
88a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t      uint_fast64_t;
89a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
9083c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__LP64__)
91da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int64_t       int_fast16_t;
92da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint64_t      uint_fast16_t;
93da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int64_t       int_fast32_t;
94da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint64_t      uint_fast32_t;
95da030de702b756077fec536ed139e7ea38b51022Calin Juravle#else
96da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int32_t       int_fast16_t;
97da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint32_t      uint_fast16_t;
98da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef int32_t       int_fast32_t;
99da030de702b756077fec536ed139e7ea38b51022Calin Juravletypedef uint32_t      uint_fast32_t;
100da030de702b756077fec536ed139e7ea38b51022Calin Juravle#endif
101da030de702b756077fec536ed139e7ea38b51022Calin Juravle
1029f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef uint64_t      uintmax_t;
1039f87a0b285128542a221f2b69d3b959a4e33c054Elliott Hughestypedef int64_t       intmax_t;
104debc021491530ff014166d48232b906d66a62b54Serban Constantinescu
105e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes/* Keep the kernel from trying to define these types... */
106e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define __BIT_TYPES_DEFINED__
107debc021491530ff014166d48232b906d66a62b54Serban Constantinescu
108e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_C(c)         c
109e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_C(c)   INT8_C(c)
110e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_C(c)    INT8_C(c)
111a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
112e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT8_C(c)        c
113e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST8_C(c)  UINT8_C(c)
114e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST8_C(c)   UINT8_C(c)
115a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
116e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_C(c)        c
117e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_C(c)  INT16_C(c)
118e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_C(c)   INT32_C(c)
119a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
120e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT16_C(c)       c
121e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST16_C(c) UINT16_C(c)
122e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST16_C(c)  UINT32_C(c)
123e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_C(c)        c
124e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_C(c)  INT32_C(c)
125e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_C(c)   INT32_C(c)
126a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project
127e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT32_C(c)       c ## U
128e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST32_C(c) UINT32_C(c)
129e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST32_C(c)  UINT32_C(c)
130e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_C(c)  INT64_C(c)
131e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_C(c)   INT64_C(c)
1327c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
133e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST64_C(c) UINT64_C(c)
134e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST64_C(c)  UINT64_C(c)
1357c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
136e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_C(c)       INT64_C(c)
137e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINTMAX_C(c)      UINT64_C(c)
1387c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
13983c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__LP64__)
140e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INT64_C(c)      c ## L
141e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINT64_C(c)     c ## UL
142e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_C(c)     INT64_C(c)
143e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_C(c)    UINT64_C(c)
144e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_C(c)    INT64_C(c)
145e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#else
146e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INT64_C(c)      c ## LL
147e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINT64_C(c)     c ## ULL
148e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_C(c)     INT32_C(c)
149e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_C(c)    UINT32_C(c)
150e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_C(c)    INT32_C(c)
151e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#endif
152e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
153e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_MIN         (-128)
154e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_MAX         (127)
155e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_MIN   INT8_MIN
156e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_MAX   INT8_MAX
157e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_MIN    INT8_MIN
158e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_MAX    INT8_MAX
159e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
160e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT8_MAX        (255)
161e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST8_MAX  UINT8_MAX
162e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST8_MAX   UINT8_MAX
163e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
164e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_MIN        (-32768)
165e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_MAX        (32767)
166e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_MIN  INT16_MIN
167e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_MAX  INT16_MAX
168e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_MIN   INT32_MIN
169e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_MAX   INT32_MAX
170e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
171e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT16_MAX       (65535)
172e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST16_MAX UINT16_MAX
173e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST16_MAX  UINT32_MAX
174e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
175e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_MIN        (-2147483647-1)
176e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_MAX        (2147483647)
177e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_MIN  INT32_MIN
178e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_MAX  INT32_MAX
179e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_MIN   INT32_MIN
180e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_MAX   INT32_MAX
181e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
182e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT32_MAX       (4294967295U)
183e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST32_MAX UINT32_MAX
184e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST32_MAX  UINT32_MAX
185e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
186e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT64_MIN        (INT64_C(-9223372036854775807)-1)
187e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT64_MAX        (INT64_C(9223372036854775807))
188e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_MIN  INT64_MIN
189e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_MAX  INT64_MAX
190e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_MIN   INT64_MIN
191e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_MAX   INT64_MAX
192e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT64_MAX       (UINT64_C(18446744073709551615))
193e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
194e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST64_MAX UINT64_MAX
195e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST64_MAX  UINT64_MAX
196e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
197e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_MIN       INT64_MIN
198e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_MAX       INT64_MAX
199e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINTMAX_MAX      UINT64_MAX
200e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
201e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define SIG_ATOMIC_MAX   INT32_MAX
202e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define SIG_ATOMIC_MIN   INT32_MIN
203e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
20483c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__WINT_UNSIGNED__)
20583c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#  define WINT_MAX       UINT32_MAX
206ee7f1b5946dffa3aa95394b8cf6f15527f1068ebDan Albert#  define WINT_MIN       0
20783c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#else
20883c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#  define WINT_MAX       INT32_MAX
20983c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#  define WINT_MIN       INT32_MIN
210e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#endif
211e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes
21283c07b5e50207458445262ed10b79aa6b2d2d0ceElliott Hughes#if defined(__LP64__)
213e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MIN     INT64_MIN
214e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MAX     INT64_MAX
215e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_MAX    UINT64_MAX
216e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MIN    INT64_MIN
217e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MAX    INT64_MAX
218e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define SIZE_MAX       UINT64_MAX
219e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#else
220e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MIN     INT32_MIN
221e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define INTPTR_MAX     INT32_MAX
222e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define UINTPTR_MAX    UINT32_MAX
223e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MIN    INT32_MIN
224e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define PTRDIFF_MAX    INT32_MAX
225e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#  define SIZE_MAX       UINT32_MAX
2267c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes#endif
2277c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes
228a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif /* _STDINT_H */
229