185892Smike/*- 285892Smike * Copyright (c) 2001 Mike Barcroft <mike@FreeBSD.org> 385892Smike * All rights reserved. 485892Smike * 585892Smike * Redistribution and use in source and binary forms, with or without 685892Smike * modification, are permitted provided that the following conditions 785892Smike * are met: 885892Smike * 1. Redistributions of source code must retain the above copyright 985892Smike * notice, this list of conditions and the following disclaimer. 1085892Smike * 2. Redistributions in binary form must reproduce the above copyright 1185892Smike * notice, this list of conditions and the following disclaimer in the 1285892Smike * documentation and/or other materials provided with the distribution. 1385892Smike * 1485892Smike * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 1585892Smike * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 1685892Smike * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 1785892Smike * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 1885892Smike * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 1985892Smike * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 2085892Smike * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 2185892Smike * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 2285892Smike * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 2385892Smike * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 2485892Smike * SUCH DAMAGE. 2585892Smike * 2685892Smike * $FreeBSD$ 2785892Smike */ 2885892Smike 2985892Smike#ifndef _SYS_STDINT_H_ 3085892Smike#define _SYS_STDINT_H_ 3185892Smike 3285892Smike#include <sys/cdefs.h> 33102227Smike#include <sys/_types.h> 3485892Smike 35100882Smike#include <machine/_stdint.h> 36221502Sobrien#include <sys/_stdint.h> 3785892Smike 3885892Smiketypedef __int_least8_t int_least8_t; 3985892Smiketypedef __int_least16_t int_least16_t; 4085892Smiketypedef __int_least32_t int_least32_t; 4185892Smiketypedef __int_least64_t int_least64_t; 4285892Smike 4385892Smiketypedef __uint_least8_t uint_least8_t; 4485892Smiketypedef __uint_least16_t uint_least16_t; 4585892Smiketypedef __uint_least32_t uint_least32_t; 4685892Smiketypedef __uint_least64_t uint_least64_t; 4785892Smike 4885892Smiketypedef __int_fast8_t int_fast8_t; 4985892Smiketypedef __int_fast16_t int_fast16_t; 5085892Smiketypedef __int_fast32_t int_fast32_t; 5185892Smiketypedef __int_fast64_t int_fast64_t; 5285892Smike 5385892Smiketypedef __uint_fast8_t uint_fast8_t; 5485892Smiketypedef __uint_fast16_t uint_fast16_t; 5585892Smiketypedef __uint_fast32_t uint_fast32_t; 5685892Smiketypedef __uint_fast64_t uint_fast64_t; 5785892Smike 58221502Sobrien#ifndef _INTMAX_T_DECLARED 5985892Smiketypedef __intmax_t intmax_t; 60221502Sobrien#define _INTMAX_T_DECLARED 61221502Sobrien#endif 62221502Sobrien#ifndef _UINTMAX_T_DECLARED 6385892Smiketypedef __uintmax_t uintmax_t; 64221502Sobrien#define _UINTMAX_T_DECLARED 6593514Smike#endif 6685892Smike 67228529Stheraven/* GNU and Darwin define this and people seem to think it's portable */ 68228529Stheraven#if defined(UINTPTR_MAX) && defined(UINT64_MAX) && (UINTPTR_MAX == UINT64_MAX) 69228529Stheraven#define __WORDSIZE 64 70228529Stheraven#else 71228529Stheraven#define __WORDSIZE 32 72228529Stheraven#endif 73228529Stheraven 74237517Sandrew/* Limits of wchar_t. */ 75237517Sandrew#define WCHAR_MIN __WCHAR_MIN 76237517Sandrew#define WCHAR_MAX __WCHAR_MAX 77237517Sandrew 7885892Smike#endif /* !_SYS_STDINT_H_ */ 79