stdint.h revision e2a292d278b94fec3d078b1f1b27c1f89942c276
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> 33a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#include <sys/_types.h> 34a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 35a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int8_t int8_t; 36a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint8_t uint8_t; 37e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 38a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int16_t int16_t; 39a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint16_t uint16_t; 40e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 41a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int32_t int32_t; 42a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint32_t uint32_t; 43e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 44a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int64_t int64_t; 45a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint64_t uint64_t; 46a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 47a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int8_t int_least8_t; 48a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int8_t int_fast8_t; 49a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 50a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint8_t uint_least8_t; 51a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint8_t uint_fast8_t; 52a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 53a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int16_t int_least16_t; 54a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t int_fast16_t; 55a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 56a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint16_t uint_least16_t; 57a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t uint_fast16_t; 58a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 59a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t int_least32_t; 60a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t int_fast32_t; 61a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 62a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t uint_least32_t; 63a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t uint_fast32_t; 64a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 65a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int64_t int_least64_t; 66a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int64_t int_fast64_t; 67a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 68a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t uint_least64_t; 69a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t uint_fast64_t; 70a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 710a9c615a899daa37b671711acc2c9be0a245919fPavel Chupin#ifdef __LP64__ 72e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughestypedef long intptr_t; 73e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughestypedef unsigned long uintptr_t; 740a9c615a899daa37b671711acc2c9be0a245919fPavel Chupin#else 75a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int intptr_t; 76a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef unsigned int uintptr_t; 7708ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#endif 7808ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner 79e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughestypedef uint64_t uintmax_t; 80e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughestypedef int64_t intmax_t; 81debc021491530ff014166d48232b906d66a62b54Serban Constantinescu 82e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes/* Keep the kernel from trying to define these types... */ 83e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define __BIT_TYPES_DEFINED__ 84debc021491530ff014166d48232b906d66a62b54Serban Constantinescu 85e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_C(c) c 86e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_C(c) INT8_C(c) 87e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_C(c) INT8_C(c) 88a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 89e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT8_C(c) c 90e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST8_C(c) UINT8_C(c) 91e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST8_C(c) UINT8_C(c) 92a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 93e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_C(c) c 94e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_C(c) INT16_C(c) 95e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_C(c) INT32_C(c) 96a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 97e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT16_C(c) c 98e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST16_C(c) UINT16_C(c) 99e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST16_C(c) UINT32_C(c) 100e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_C(c) c 101e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_C(c) INT32_C(c) 102e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_C(c) INT32_C(c) 103a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 104e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT32_C(c) c ## U 105e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST32_C(c) UINT32_C(c) 106e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST32_C(c) UINT32_C(c) 107e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_C(c) INT64_C(c) 108e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_C(c) INT64_C(c) 1097c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes 110e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST64_C(c) UINT64_C(c) 111e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST64_C(c) UINT64_C(c) 1127c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes 113e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_C(c) INT64_C(c) 114e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINTMAX_C(c) UINT64_C(c) 1157c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes 116e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#ifdef __LP64__ 117e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INT64_C(c) c ## L 118e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define UINT64_C(c) c ## UL 119e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INTPTR_C(c) INT64_C(c) 120e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define UINTPTR_C(c) UINT64_C(c) 121e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define PTRDIFF_C(c) INT64_C(c) 122e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#else 123e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INT64_C(c) c ## LL 124e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define UINT64_C(c) c ## ULL 125e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INTPTR_C(c) INT32_C(c) 126e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define UINTPTR_C(c) UINT32_C(c) 127e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define PTRDIFF_C(c) INT32_C(c) 128e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#endif 129e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 130e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_MIN (-128) 131e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT8_MAX (127) 132e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_MIN INT8_MIN 133e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST8_MAX INT8_MAX 134e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_MIN INT8_MIN 135e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST8_MAX INT8_MAX 136e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 137e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT8_MAX (255) 138e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST8_MAX UINT8_MAX 139e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST8_MAX UINT8_MAX 140e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 141e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_MIN (-32768) 142e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT16_MAX (32767) 143e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_MIN INT16_MIN 144e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST16_MAX INT16_MAX 145e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_MIN INT32_MIN 146e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST16_MAX INT32_MAX 147e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 148e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT16_MAX (65535) 149e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST16_MAX UINT16_MAX 150e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST16_MAX UINT32_MAX 151e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 152e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_MIN (-2147483647-1) 153e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT32_MAX (2147483647) 154e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_MIN INT32_MIN 155e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST32_MAX INT32_MAX 156e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_MIN INT32_MIN 157e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST32_MAX INT32_MAX 158e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 159e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT32_MAX (4294967295U) 160e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST32_MAX UINT32_MAX 161e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST32_MAX UINT32_MAX 162e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 163e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT64_MIN (INT64_C(-9223372036854775807)-1) 164e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT64_MAX (INT64_C(9223372036854775807)) 165e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_MIN INT64_MIN 166e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_LEAST64_MAX INT64_MAX 167e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_MIN INT64_MIN 168e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INT_FAST64_MAX INT64_MAX 169e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT64_MAX (UINT64_C(18446744073709551615)) 170e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 171e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_LEAST64_MAX UINT64_MAX 172e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINT_FAST64_MAX UINT64_MAX 173e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 174e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_MIN INT64_MIN 175e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define INTMAX_MAX INT64_MAX 176e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define UINTMAX_MAX UINT64_MAX 177e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 178e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define SIG_ATOMIC_MAX INT32_MAX 179e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define SIG_ATOMIC_MIN INT32_MIN 180e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 181e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#ifndef WCHAR_MAX /* These might also have been defined by <wchar.h>. */ 182e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define WCHAR_MAX INT32_MAX 183e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define WCHAR_MIN INT32_MIN 184e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#endif 185e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes 186e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define WINT_MAX INT32_MAX 187e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#define WINT_MIN INT32_MIN 1887c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes 189e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#ifdef __LP64__ 190e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INTPTR_MIN INT64_MIN 191e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INTPTR_MAX INT64_MAX 192e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define UINTPTR_MAX UINT64_MAX 193e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define PTRDIFF_MIN INT64_MIN 194e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define PTRDIFF_MAX INT64_MAX 195e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define SIZE_MAX UINT64_MAX 196e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes#else 197e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INTPTR_MIN INT32_MIN 198e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define INTPTR_MAX INT32_MAX 199e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define UINTPTR_MAX UINT32_MAX 200e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define PTRDIFF_MIN INT32_MIN 201e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define PTRDIFF_MAX INT32_MAX 202e2a292d278b94fec3d078b1f1b27c1f89942c276Elliott Hughes# define SIZE_MAX UINT32_MAX 2037c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes#endif 2047c89506e3af3ee97691a98329f0d7b5edef49218Elliott Hughes 205a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif /* _STDINT_H */ 206