1 /* $NetBSD: int_mwgwtypes.h,v 1.7 2014/07/25 21:43:13 joerg Exp $ */ 2 3 /*- 4 * Copyright (c) 2014 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Matt Thomas of 3am Software Foundry. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 #ifndef _ARM_INT_MWGWTYPES_H_ 33 #define _ARM_INT_MWGWTYPES_H_ 34 35 #ifdef __UINT_FAST64_TYPE__ 36 #include <sys/common_int_mwgwtypes.h> 37 #else 38 /* 39 * 7.18.1 Integer types 40 */ 41 42 /* 7.18.1.2 Minimum-width integer types */ 43 44 #ifndef __INT_LEAST8_TYPE__ 45 # define __INT_LEAST8_TYPE__ signed char 46 #endif 47 #ifndef __UINT_LEAST8_TYPE__ 48 # define __UINT_LEAST8_TYPE__ unsigned char 49 #endif 50 #ifndef __INT_LEAST16_TYPE__ 51 # define __INT_LEAST16_TYPE__ short int 52 #endif 53 #ifndef __UINT_LEAST16_TYPE__ 54 # define __UINT_LEAST16_TYPE__ short unsigned int 55 #endif 56 #ifndef __INT_LEAST32_TYPE__ 57 # define __INT_LEAST32_TYPE__ int 58 #endif 59 #ifndef __UINT_LEAST32_TYPE__ 60 # define __UINT_LEAST32_TYPE__ unsigned int 61 #endif 62 #ifndef __INT_LEAST64_TYPE__ 63 # define __INT_LEAST64_TYPE__ long long int 64 #endif 65 #ifndef __UINT_LEAST64_TYPE__ 66 # define __UINT_LEAST64_TYPE__ long long unsigned int 67 #endif 68 69 typedef __INT_LEAST8_TYPE__ int_least8_t; 70 typedef __UINT_LEAST8_TYPE__ uint_least8_t; 71 typedef __INT_LEAST16_TYPE__ int_least16_t; 72 typedef __UINT_LEAST16_TYPE__ uint_least16_t; 73 typedef __INT_LEAST32_TYPE__ int_least32_t; 74 typedef __UINT_LEAST32_TYPE__ uint_least32_t; 75 typedef __INT_LEAST64_TYPE__ int_least64_t; 76 typedef __UINT_LEAST64_TYPE__ uint_least64_t; 77 78 /* 7.18.1.3 Fastest minimum-width integer types */ 79 80 #ifndef __INT_FAST8_TYPE__ 81 # define __INT_FAST8_TYPE__ int 82 #endif 83 #ifndef __UINT_FAST8_TYPE__ 84 # define __UINT_FAST8_TYPE__ unsigned int 85 #endif 86 #ifndef __INT_FAST16_TYPE__ 87 # define __INT_FAST16_TYPE__ int 88 #endif 89 #ifndef __UINT_FAST16_TYPE__ 90 # define __UINT_FAST16_TYPE__ unsigned int 91 #endif 92 #ifndef __INT_FAST32_TYPE__ 93 # define __INT_FAST32_TYPE__ int 94 #endif 95 #ifndef __UINT_FAST32_TYPE__ 96 # define __UINT_FAST32_TYPE__ unsigned int 97 #endif 98 #ifndef __INT_FAST64_TYPE__ 99 # define __INT_FAST64_TYPE__ long long int 100 #endif 101 #ifndef __UINT_FAST64_TYPE__ 102 # define __UINT_FAST64_TYPE__ long long unsigned int 103 #endif 104 105 typedef __INT_FAST8_TYPE__ int_fast8_t; 106 typedef __UINT_FAST8_TYPE__ uint_fast8_t; 107 typedef __INT_FAST16_TYPE__ int_fast16_t; 108 typedef __UINT_FAST16_TYPE__ uint_fast16_t; 109 typedef __INT_FAST32_TYPE__ int_fast32_t; 110 typedef __UINT_FAST32_TYPE__ uint_fast32_t; 111 typedef __INT_FAST64_TYPE__ int_fast64_t; 112 typedef __UINT_FAST64_TYPE__ uint_fast64_t; 113 114 /* 7.18.1.5 Greatest-width integer types */ 115 116 #ifndef __INTMAX_TYPE__ 117 # define __INTMAX_TYPE__ long long int 118 #endif 119 #ifndef __UINTMAX_TYPE__ 120 # define __UINTMAX_TYPE__ unsigned __INTMAX_TYPE__ 121 #endif 122 123 typedef __INTMAX_TYPE__ intmax_t; 124 typedef __UINTMAX_TYPE__ uintmax_t; 125 #endif 126 127 #endif /* !_ARM_INT_MWGWTYPES_H_ */ 128