1*a149c522Smaya /* $NetBSD: stdint.h,v 1.8 2018/11/06 16:26:44 maya Exp $ */ 2fe3c9ceaSkleink 3fe3c9ceaSkleink /*- 47b3b6476Skleink * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. 5fe3c9ceaSkleink * All rights reserved. 6fe3c9ceaSkleink * 7fe3c9ceaSkleink * This code is derived from software contributed to The NetBSD Foundation 8fe3c9ceaSkleink * by Klaus Klein. 9fe3c9ceaSkleink * 10fe3c9ceaSkleink * Redistribution and use in source and binary forms, with or without 11fe3c9ceaSkleink * modification, are permitted provided that the following conditions 12fe3c9ceaSkleink * are met: 13fe3c9ceaSkleink * 1. Redistributions of source code must retain the above copyright 14fe3c9ceaSkleink * notice, this list of conditions and the following disclaimer. 15fe3c9ceaSkleink * 2. Redistributions in binary form must reproduce the above copyright 16fe3c9ceaSkleink * notice, this list of conditions and the following disclaimer in the 17fe3c9ceaSkleink * documentation and/or other materials provided with the distribution. 18fe3c9ceaSkleink * 19fe3c9ceaSkleink * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20fe3c9ceaSkleink * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21fe3c9ceaSkleink * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22fe3c9ceaSkleink * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23fe3c9ceaSkleink * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24fe3c9ceaSkleink * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25fe3c9ceaSkleink * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26fe3c9ceaSkleink * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27fe3c9ceaSkleink * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28fe3c9ceaSkleink * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29fe3c9ceaSkleink * POSSIBILITY OF SUCH DAMAGE. 30fe3c9ceaSkleink */ 31fe3c9ceaSkleink 32fe3c9ceaSkleink #ifndef _SYS_STDINT_H_ 33fe3c9ceaSkleink #define _SYS_STDINT_H_ 34fe3c9ceaSkleink 3558a82aeeSkleink #include <sys/cdefs.h> 36fe3c9ceaSkleink #include <machine/int_types.h> 37fe3c9ceaSkleink 38*a149c522Smaya #ifndef _BSD_INT8_T_ 39fe3c9ceaSkleink typedef __int8_t int8_t; 40*a149c522Smaya #define _BSD_INT8_T_ 41fe3c9ceaSkleink #endif 42fe3c9ceaSkleink 43*a149c522Smaya #ifndef _BSD_UINT8_T_ 44fe3c9ceaSkleink typedef __uint8_t uint8_t; 45*a149c522Smaya #define _BSD_UINT8_T_ 46fe3c9ceaSkleink #endif 47fe3c9ceaSkleink 48*a149c522Smaya #ifndef _BSD_INT16_T_ 49fe3c9ceaSkleink typedef __int16_t int16_t; 50*a149c522Smaya #define _BSD_INT16_T_ 51fe3c9ceaSkleink #endif 52fe3c9ceaSkleink 53*a149c522Smaya #ifndef _BSD_UINT16_T_ 54fe3c9ceaSkleink typedef __uint16_t uint16_t; 55*a149c522Smaya #define _BSD_UINT16_T_ 56fe3c9ceaSkleink #endif 57fe3c9ceaSkleink 58*a149c522Smaya #ifndef _BSD_INT32_T_ 59fe3c9ceaSkleink typedef __int32_t int32_t; 60*a149c522Smaya #define _BSD_INT32_T_ 61fe3c9ceaSkleink #endif 62fe3c9ceaSkleink 63*a149c522Smaya #ifndef _BSD_UINT32_T_ 64fe3c9ceaSkleink typedef __uint32_t uint32_t; 65*a149c522Smaya #define _BSD_UINT32_T_ 66fe3c9ceaSkleink #endif 67fe3c9ceaSkleink 68*a149c522Smaya #ifndef _BSD_INT64_T_ 69fe3c9ceaSkleink typedef __int64_t int64_t; 70*a149c522Smaya #define _BSD_INT64_T_ 71fe3c9ceaSkleink #endif 72fe3c9ceaSkleink 73*a149c522Smaya #ifndef _BSD_UINT64_T_ 74fe3c9ceaSkleink typedef __uint64_t uint64_t; 75*a149c522Smaya #define _BSD_UINT64_T_ 76fe3c9ceaSkleink #endif 77fe3c9ceaSkleink 78*a149c522Smaya #ifndef _BSD_INTPTR_T_ 79fe3c9ceaSkleink typedef __intptr_t intptr_t; 80*a149c522Smaya #define _BSD_INTPTR_T_ 81fe3c9ceaSkleink #endif 82fe3c9ceaSkleink 83*a149c522Smaya #ifndef _BSD_UINTPTR_T_ 84fe3c9ceaSkleink typedef __uintptr_t uintptr_t; 85*a149c522Smaya #define _BSD_UINTPTR_T_ 86fe3c9ceaSkleink #endif 87fe3c9ceaSkleink 88fe3c9ceaSkleink #include <machine/int_mwgwtypes.h> 89fe3c9ceaSkleink 90728755b0Sjoerg #if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) || \ 91728755b0Sjoerg (__cplusplus >= 201103L) 92fe3c9ceaSkleink #include <machine/int_limits.h> 93fe3c9ceaSkleink #endif 94fe3c9ceaSkleink 95728755b0Sjoerg #if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) || \ 96728755b0Sjoerg (__cplusplus >= 201103L) 97fe3c9ceaSkleink #include <machine/int_const.h> 98fe3c9ceaSkleink #endif 99fe3c9ceaSkleink 1007b3b6476Skleink #include <machine/wchar_limits.h> 1017b3b6476Skleink 102fe3c9ceaSkleink #endif /* !_SYS_STDINT_H_ */ 103