1 #ifndef _FAKE_DEFINES_H 2 #define _FAKE_DEFINES_H 3 4 #define NULL 0 5 #define BUFSIZ 1024 6 #define FOPEN_MAX 20 7 #define FILENAME_MAX 1024 8 9 #ifndef SEEK_SET 10 #define SEEK_SET 0 /* set file offset to offset */ 11 #endif 12 #ifndef SEEK_CUR 13 #define SEEK_CUR 1 /* set file offset to current plus offset */ 14 #endif 15 #ifndef SEEK_END 16 #define SEEK_END 2 /* set file offset to EOF plus offset */ 17 #endif 18 19 #define __LITTLE_ENDIAN 1234 20 #define LITTLE_ENDIAN __LITTLE_ENDIAN 21 #define __BIG_ENDIAN 4321 22 #define BIG_ENDIAN __BIG_ENDIAN 23 #define __BYTE_ORDER __LITTLE_ENDIAN 24 #define BYTE_ORDER __BYTE_ORDER 25 26 #define EXIT_FAILURE 1 27 #define EXIT_SUCCESS 0 28 29 #define UCHAR_MAX 255 30 #define USHRT_MAX 65535 31 #define UINT_MAX 4294967295U 32 #define RAND_MAX 32767 33 #define INT_MAX 32767 34 35 /* C99 inttypes.h defines */ 36 #define PRId8 "d" 37 #define PRIi8 "i" 38 #define PRIo8 "o" 39 #define PRIu8 "u" 40 #define PRIx8 "x" 41 #define PRIX8 "X" 42 #define PRId16 "d" 43 #define PRIi16 "i" 44 #define PRIo16 "o" 45 #define PRIu16 "u" 46 #define PRIx16 "x" 47 #define PRIX16 "X" 48 #define PRId32 "d" 49 #define PRIi32 "i" 50 #define PRIo32 "o" 51 #define PRIu32 "u" 52 #define PRIx32 "x" 53 #define PRIX32 "X" 54 #define PRId64 "d" 55 #define PRIi64 "i" 56 #define PRIo64 "o" 57 #define PRIu64 "u" 58 #define PRIx64 "x" 59 #define PRIX64 "X" 60 #define PRIdLEAST8 "d" 61 #define PRIiLEAST8 "i" 62 #define PRIoLEAST8 "o" 63 #define PRIuLEAST8 "u" 64 #define PRIxLEAST8 "x" 65 #define PRIXLEAST8 "X" 66 #define PRIdLEAST16 "d" 67 #define PRIiLEAST16 "i" 68 #define PRIoLEAST16 "o" 69 #define PRIuLEAST16 "u" 70 #define PRIxLEAST16 "x" 71 #define PRIXLEAST16 "X" 72 #define PRIdLEAST32 "d" 73 #define PRIiLEAST32 "i" 74 #define PRIoLEAST32 "o" 75 #define PRIuLEAST32 "u" 76 #define PRIxLEAST32 "x" 77 #define PRIXLEAST32 "X" 78 #define PRIdLEAST64 "d" 79 #define PRIiLEAST64 "i" 80 #define PRIoLEAST64 "o" 81 #define PRIuLEAST64 "u" 82 #define PRIxLEAST64 "x" 83 #define PRIXLEAST64 "X" 84 #define PRIdFAST8 "d" 85 #define PRIiFAST8 "i" 86 #define PRIoFAST8 "o" 87 #define PRIuFAST8 "u" 88 #define PRIxFAST8 "x" 89 #define PRIXFAST8 "X" 90 #define PRIdFAST16 "d" 91 #define PRIiFAST16 "i" 92 #define PRIoFAST16 "o" 93 #define PRIuFAST16 "u" 94 #define PRIxFAST16 "x" 95 #define PRIXFAST16 "X" 96 #define PRIdFAST32 "d" 97 #define PRIiFAST32 "i" 98 #define PRIoFAST32 "o" 99 #define PRIuFAST32 "u" 100 #define PRIxFAST32 "x" 101 #define PRIXFAST32 "X" 102 #define PRIdFAST64 "d" 103 #define PRIiFAST64 "i" 104 #define PRIoFAST64 "o" 105 #define PRIuFAST64 "u" 106 #define PRIxFAST64 "x" 107 #define PRIXFAST64 "X" 108 #define PRIdPTR "d" 109 #define PRIiPTR "i" 110 #define PRIoPTR "o" 111 #define PRIuPTR "u" 112 #define PRIxPTR "x" 113 #define PRIXPTR "X" 114 #define PRIdMAX "d" 115 #define PRIiMAX "i" 116 #define PRIoMAX "o" 117 #define PRIuMAX "u" 118 #define PRIxMAX "x" 119 #define PRIXMAX "X" 120 #define SCNd8 "d" 121 #define SCNi8 "i" 122 #define SCNo8 "o" 123 #define SCNu8 "u" 124 #define SCNx8 "x" 125 #define SCNd16 "d" 126 #define SCNi16 "i" 127 #define SCNo16 "o" 128 #define SCNu16 "u" 129 #define SCNx16 "x" 130 #define SCNd32 "d" 131 #define SCNi32 "i" 132 #define SCNo32 "o" 133 #define SCNu32 "u" 134 #define SCNx32 "x" 135 #define SCNd64 "d" 136 #define SCNi64 "i" 137 #define SCNo64 "o" 138 #define SCNu64 "u" 139 #define SCNx64 "x" 140 #define SCNdLEAST8 "d" 141 #define SCNiLEAST8 "i" 142 #define SCNoLEAST8 "o" 143 #define SCNuLEAST8 "u" 144 #define SCNxLEAST8 "x" 145 #define SCNdLEAST16 "d" 146 #define SCNiLEAST16 "i" 147 #define SCNoLEAST16 "o" 148 #define SCNuLEAST16 "u" 149 #define SCNxLEAST16 "x" 150 #define SCNdLEAST32 "d" 151 #define SCNiLEAST32 "i" 152 #define SCNoLEAST32 "o" 153 #define SCNuLEAST32 "u" 154 #define SCNxLEAST32 "x" 155 #define SCNdLEAST64 "d" 156 #define SCNiLEAST64 "i" 157 #define SCNoLEAST64 "o" 158 #define SCNuLEAST64 "u" 159 #define SCNxLEAST64 "x" 160 #define SCNdFAST8 "d" 161 #define SCNiFAST8 "i" 162 #define SCNoFAST8 "o" 163 #define SCNuFAST8 "u" 164 #define SCNxFAST8 "x" 165 #define SCNdFAST16 "d" 166 #define SCNiFAST16 "i" 167 #define SCNoFAST16 "o" 168 #define SCNuFAST16 "u" 169 #define SCNxFAST16 "x" 170 #define SCNdFAST32 "d" 171 #define SCNiFAST32 "i" 172 #define SCNoFAST32 "o" 173 #define SCNuFAST32 "u" 174 #define SCNxFAST32 "x" 175 #define SCNdFAST64 "d" 176 #define SCNiFAST64 "i" 177 #define SCNoFAST64 "o" 178 #define SCNuFAST64 "u" 179 #define SCNxFAST64 "x" 180 #define SCNdPTR "d" 181 #define SCNiPTR "i" 182 #define SCNoPTR "o" 183 #define SCNuPTR "u" 184 #define SCNxPTR "x" 185 #define SCNdMAX "d" 186 #define SCNiMAX "i" 187 #define SCNoMAX "o" 188 #define SCNuMAX "u" 189 #define SCNxMAX "x" 190 191 /* C99 stdbool.h defines */ 192 #define __bool_true_false_are_defined 1 193 #define false 0 194 #define true 1 195 196 /* va_arg macros and type*/ 197 #define va_start(_ap, _type) __builtin_va_start((_ap)) 198 #define va_arg(_ap, _type) __builtin_va_arg((_ap)) 199 #define va_end(_list) 200 201 #endif 202 203 /* Vectors */ 204 #define __m128 int 205 #define __m128_u int 206 #define __m128d int 207 #define __m128d_u int 208 #define __m128i int 209 #define __m128i_u int 210 #define __m256 int 211 #define __m256_u int 212 #define __m256d int 213 #define __m256d_u int 214 #define __m256i int 215 #define __m256i_u int 216 #define __m512 int 217 #define __m512_u int 218 #define __m512d int 219 #define __m512d_u int 220 #define __m512i int 221 #define __m512i_u int 222