stdint.h revision 93514
10SN/A/*- 23261SN/A * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> 30SN/A * All rights reserved. 40SN/A * 50SN/A * Redistribution and use in source and binary forms, with or without 60SN/A * modification, are permitted provided that the following conditions 72362SN/A * are met: 80SN/A * 1. Redistributions of source code must retain the above copyright 92362SN/A * notice, this list of conditions and the following disclaimer. 100SN/A * 2. Redistributions in binary form must reproduce the above copyright 110SN/A * notice, this list of conditions and the following disclaimer in the 120SN/A * documentation and/or other materials provided with the distribution. 130SN/A * 140SN/A * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 150SN/A * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 160SN/A * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 170SN/A * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 180SN/A * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 190SN/A * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 200SN/A * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 212362SN/A * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 222362SN/A * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 232362SN/A * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 240SN/A * SUCH DAMAGE. 250SN/A * 260SN/A * $FreeBSD: head/sys/sys/stdint.h 93514 2002-04-01 08:12:25Z mike $ 270SN/A */ 280SN/A 290SN/A#ifndef _SYS_STDINT_H_ 300SN/A#define _SYS_STDINT_H_ 310SN/A 320SN/A#include <sys/cdefs.h> 330SN/A 340SN/A#include <machine/ansi.h> 350SN/A#include <machine/limits.h> 360SN/A 372850SN/A#ifndef _INT8_T_DECLARED 380SN/Atypedef __int8_t int8_t; 390SN/A#define _INT8_T_DECLARED 400SN/A#endif 419464SN/A 420SN/A#ifndef _INT16_T_DECLARED 430SN/Atypedef __int16_t int16_t; 440SN/A#define _INT16_T_DECLARED 450SN/A#endif 460SN/A 470SN/A#ifndef _INT32_T_DECLARED 480SN/Atypedef __int32_t int32_t; 490SN/A#define _INT32_T_DECLARED 500SN/A#endif 510SN/A 520SN/A#ifndef _INT64_T_DECLARED 530SN/Atypedef __int64_t int64_t; 540SN/A#define _INT64_T_DECLARED 550SN/A#endif 560SN/A 570SN/A#ifndef _UINT8_T_DECLARED 580SN/Atypedef __uint8_t uint8_t; 590SN/A#define _UINT8_T_DECLARED 600SN/A#endif 610SN/A 620SN/A#ifndef _UINT16_T_DECLARED 630SN/Atypedef __uint16_t uint16_t; 640SN/A#define _UINT16_T_DECLARED 650SN/A#endif 660SN/A 67#ifndef _UINT32_T_DECLARED 68typedef __uint32_t uint32_t; 69#define _UINT32_T_DECLARED 70#endif 71 72#ifndef _UINT64_T_DECLARED 73typedef __uint64_t uint64_t; 74#define _UINT64_T_DECLARED 75#endif 76 77typedef __int_least8_t int_least8_t; 78typedef __int_least16_t int_least16_t; 79typedef __int_least32_t int_least32_t; 80typedef __int_least64_t int_least64_t; 81 82typedef __uint_least8_t uint_least8_t; 83typedef __uint_least16_t uint_least16_t; 84typedef __uint_least32_t uint_least32_t; 85typedef __uint_least64_t uint_least64_t; 86 87typedef __int_fast8_t int_fast8_t; 88typedef __int_fast16_t int_fast16_t; 89typedef __int_fast32_t int_fast32_t; 90typedef __int_fast64_t int_fast64_t; 91 92typedef __uint_fast8_t uint_fast8_t; 93typedef __uint_fast16_t uint_fast16_t; 94typedef __uint_fast32_t uint_fast32_t; 95typedef __uint_fast64_t uint_fast64_t; 96 97typedef __intmax_t intmax_t; 98typedef __uintmax_t uintmax_t; 99 100#ifndef _INTPTR_T_DECLARED 101typedef __intptr_t intptr_t; 102typedef __uintptr_t uintptr_t; 103#define _INTPTR_T_DECLARED 104#endif 105 106#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) 107#define INT8_C(c) __INT8_C(c) 108#define INT16_C(c) __INT16_C(c) 109#define INT32_C(c) __INT32_C(c) 110#define INT64_C(c) __INT64_C(c) 111 112#define UINT8_C(c) __UINT8_C(c) 113#define UINT16_C(c) __UINT16_C(c) 114#define UINT32_C(c) __UINT32_C(c) 115#define UINT64_C(c) __UINT64_C(c) 116 117#define INTMAX_C(c) __INTMAX_C(c) 118#define UINTMAX_C(c) __UINTMAX_C(c) 119#endif /* !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) */ 120 121#endif /* !_SYS_STDINT_H_ */ 122