stdint.h revision 6d6731adc0cd0fb249a2b73a575e5ab2204643cc
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 */ 28a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifndef _STDINT_H 29a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#define _STDINT_H 30a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 31a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#include <stddef.h> 32a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#include <sys/_types.h> 33a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 34a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) 35a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define __STDINT_LIMITS 36a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 37a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 38a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) 39a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define __STDINT_MACROS 40a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 41a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 42a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int8_t int8_t; 43a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint8_t uint8_t; 44a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int16_t int16_t; 45a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint16_t uint16_t; 46a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int32_t int32_t; 47a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint32_t uint32_t; 48a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __int64_t int64_t; 49a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef __uint64_t uint64_t; 50a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 51a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* 52a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * int8_t & uint8_t 53a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */ 54a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 55a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int8_t int_least8_t; 56a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int8_t int_fast8_t; 57a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 58a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint8_t uint_least8_t; 59a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint8_t uint_fast8_t; 60a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 61a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_LIMITS 62a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT8_MIN (-128) 63a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT8_MAX (127) 64a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST8_MIN INT8_MIN 65a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST8_MAX INT8_MAX 66a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST8_MIN INT8_MIN 67a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST8_MAX INT8_MAX 68a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 69a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT8_MAX (255U) 70a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST8_MAX UINT8_MAX 71a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST8_MAX UINT8_MAX 72a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 73a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 74a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_MACROS 75a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT8_C(c) c 76a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST8_C(c) INT8_C(c) 77a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST8_C(c) INT8_C(c) 78a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 79a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT8_C(c) c ## U 80a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST8_C(c) UINT8_C(c) 81a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST8_C(c) UINT8_C(c) 82a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 83a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 84a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* 85a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * int16_t & uint16_t 86a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */ 87a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 88a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int16_t int_least16_t; 89a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t int_fast16_t; 90a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 91a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint16_t uint_least16_t; 92a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t uint_fast16_t; 93a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 94a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_LIMITS 95a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT16_MIN (-32768) 96a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT16_MAX (32767) 97a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST16_MIN INT16_MIN 98a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST16_MAX INT16_MAX 99a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST16_MIN INT32_MIN 100a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST16_MAX INT32_MAX 101a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 102a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT16_MAX (65535U) 103a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST16_MAX UINT16_MAX 104a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST16_MAX UINT32_MAX 105a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 106a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 107a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_MACROS 108a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT16_C(c) c 109a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST16_C(c) INT16_C(c) 110a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST16_C(c) INT32_C(c) 111a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 112a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT16_C(c) c ## U 113a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST16_C(c) UINT16_C(c) 114a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST16_C(c) UINT32_C(c) 115a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 116a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 117a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* 118a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * int32_t & uint32_t 119a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */ 120a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 121a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t int_least32_t; 122a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int32_t int_fast32_t; 123a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 124a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t uint_least32_t; 125a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint32_t uint_fast32_t; 126a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 127a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_LIMITS 128a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT32_MIN (-2147483647-1) 129a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT32_MAX (2147483647) 130a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST32_MIN INT32_MIN 131a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST32_MAX INT32_MAX 132a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST32_MIN INT32_MIN 133a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST32_MAX INT32_MAX 134a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 135a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT32_MAX (4294967295U) 136a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST32_MAX UINT32_MAX 137a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST32_MAX UINT32_MAX 138a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 139a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 140a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_MACROS 141a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT32_C(c) c 142a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST32_C(c) INT32_C(c) 143a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST32_C(c) INT32_C(c) 144a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 145a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT32_C(c) c ## U 146a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST32_C(c) UINT32_C(c) 147a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST32_C(c) UINT32_C(c) 148a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 149a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 150a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* 151a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * int64_t 152a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */ 1536d6731adc0cd0fb249a2b73a575e5ab2204643ccElliott Hughes 154a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int64_t int_least64_t; 155a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int64_t int_fast64_t; 156a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 157a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t uint_least64_t; 158a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t uint_fast64_t; 159a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 160a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_LIMITS 161a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT64_MIN (__INT64_C(-9223372036854775807)-1) 162a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT64_MAX (__INT64_C(9223372036854775807)) 163a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST64_MIN INT64_MIN 164a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST64_MAX INT64_MAX 165a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST64_MIN INT64_MIN 166a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST64_MAX INT64_MAX 167a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT64_MAX (__UINT64_C(18446744073709551615)) 168a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 169a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST64_MAX UINT64_MAX 170a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST64_MAX UINT64_MAX 171a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 172a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 1738b3cea67326c1afb9b7815ae042819c0c3a1f144David 'Digit' Turner#define __INT64_C(c) c ## LL 1748b3cea67326c1afb9b7815ae042819c0c3a1f144David 'Digit' Turner#define __UINT64_C(c) c ## ULL 1758b3cea67326c1afb9b7815ae042819c0c3a1f144David 'Digit' Turner 176a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifdef __STDINT_MACROS 177a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT64_C(c) __INT64_C(c) 178a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_LEAST64_C(c) INT64_C(c) 179a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INT_FAST64_C(c) INT64_C(c) 180a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 181a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT64_C(c) __UINT64_C(c) 182a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_LEAST64_C(c) UINT64_C(c) 183a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINT_FAST64_C(c) UINT64_C(c) 184a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 185a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 186a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define __PRI64_RANK "ll" 187a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define __PRIFAST_RANK "" 188a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define __PRIPTR_RANK "" 189a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 190a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* 191a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * intptr_t & uintptr_t 192a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */ 193a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 194a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int intptr_t; 195a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef unsigned int uintptr_t; 196a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 19708ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#ifdef __STDINT_LIMITS 198a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INTPTR_MIN INT32_MIN 199a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INTPTR_MAX INT32_MAX 200a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINTPTR_MAX UINT32_MAX 20108ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner# define PTRDIFF_MIN INT32_MIN 20208ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner# define PTRDIFF_MAX INT32_MAX 20308ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#endif 20408ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner 20508ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#ifdef __STDINT_MACROS 206a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define INTPTR_C(c) INT32_C(c) 207a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define UINTPTR_C(c) UINT32_C(c) 208a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project# define PTRDIFF_C(c) INT32_C(c) 20908ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#endif 21008ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner 211a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* 212a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project * intmax_t & uintmax_t 213a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project */ 214a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 215a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef uint64_t uintmax_t; 216a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef int64_t intmax_t; 217a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 21808ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#ifdef __STDINT_LIMITS 21908ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner# define INTMAX_MIN INT64_MIN 22008ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner# define INTMAX_MAX INT64_MAX 22108ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner# define UINTMAX_MAX UINT64_MAX 22208ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#endif 223a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 2240e5411b4ba15946bde04c7ee69b0c20129443b36David 'Digit' Turner#ifdef __STDINT_MACROS 22508ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner# define INTMAX_C(c) INT64_C(c) 22608ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner# define UINTMAX_C(c) UINT64_C(c) 22708ff1a647484e67f23d1d8a0364b2e930dd2b9daDavid 'Digit' Turner#endif 228a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 229a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* size_t is defined by the GCC-specific <stddef.h> */ 230a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#ifndef _SSIZE_T_DEFINED_ 231a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#define _SSIZE_T_DEFINED_ 232a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Projecttypedef long int ssize_t; 233a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif 234a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 235a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#define _BITSIZE 32 236a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 237a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project/* Keep the kernel from trying to define these types... */ 238a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#define __BIT_TYPES_DEFINED__ 239a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project 240a27d2baa0c1a2ec70f47ea9199b1dd6762c8a34The Android Open Source Project#endif /* _STDINT_H */ 241