codegen: add a 'size' argument to ALU_WRITES_FLAGS
[ajla.git] / config-m.h
blobb2b637c9ea07f111fe08c8f6e1eed8dcbb25edae
1 /*
2 * Copyright (C) 2024 Mikulas Patocka
4 * This file is part of Ajla.
6 * Ajla is free software: you can redistribute it and/or modify it under the
7 * terms of the GNU General Public License as published by the Free Software
8 * Foundation, either version 3 of the License, or (at your option) any later
9 * version.
11 * Ajla is distributed in the hope that it will be useful, but WITHOUT ANY
12 * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
13 * A PARTICULAR PURPOSE. See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * Ajla. If not, see <https://www.gnu.org/licenses/>.
19 #if defined(__hpux) && !defined(__LP64__)
20 #define _LARGEFILE64_SOURCE 1
21 #else
22 #define _FILE_OFFSET_BITS 64
23 #define _TIME_BITS 64
24 #endif
26 #ifdef __hpux
27 #define _XOPEN_SOURCE_EXTENDED 1
28 #endif
30 #ifdef __APPLE__
31 #define _DARWIN_UNLIMITED_SELECT
32 #endif
34 #if defined(__TURBOC__) || defined(__BORLANDC__)
35 #include <_defs.h>
36 #endif
38 #if defined _MSC_VER
39 #define _CRT_SECURE_NO_WARNINGS
40 #pragma warning(disable: 4018 4022 4054 4055 4090 4100 4101 4127 4132 4146 4152 4189 4244 4245 4267 4305 4306 4307 4310 4324 4702 4706 4761 4820)
41 #endif
43 #if defined(__DOS__) || defined(__DJGPP__)
44 #define OS_DOS
45 #endif
47 #if defined(__EMX__) || defined(__OS2__)
48 #define OS_OS2
49 #endif
51 #if defined(__CYGWIN__)
52 #define OS_CYGWIN
53 #elif defined(_WIN32)
54 #define OS_WIN32
55 #endif
57 #include "version.h"
59 #ifdef HAVE_CONFIG_H
61 #include "config.h"
63 #if defined(malloc)
64 #undef malloc
65 #endif
67 #else
69 #if defined(OS_DOS) || defined(OS_OS2)
70 #define CONFIG_LITTLE_ENDIAN 1
71 #elif defined(_M_ALPHA) || defined(_M_ARM) || defined(_M_IA64) || defined(_M_IX86) || defined(_M_X64)
72 #define CONFIG_LITTLE_ENDIAN 1
73 #endif
75 #define SIZEOF_UNSIGNED_SHORT 2
76 #define SIZEOF_UNSIGNED 4
77 #if (defined(__WATCOMC__) && __WATCOMC__ >= 1220) || defined(__IBMC__)
78 #define SIZEOF_UNSIGNED_LONG_LONG 8
79 #define HAVE_LONG_LONG 1
80 #endif
82 #if defined(OS_OS2) || (defined(OS_WIN32) && !defined(_WIN64))
83 #define SIZEOF_VOID_P 4
84 #define SIZEOF_SIZE_T 4
85 #elif defined(OS_WIN32) && defined(_WIN64)
86 #define SIZEOF_VOID_P 8
87 #define SIZEOF_SIZE_T 8
88 #endif
90 #define HAVE_STDLIB_H 1
91 #define HAVE_STRING_H 1
92 #if defined(__STDC__) && __STDC_VERSION__ >= 199901
93 #define HAVE_STDBOOL_H 1
94 #define HAVE_STDINT_H 1
95 #define HAVE_INTTYPES_H 1
96 #define HAVE_INT64_T_UINT64_T 1
97 #elif defined(_MSC_VER) && _MSC_VER >= 1600
98 /* I'm not sure about versions */
99 #define HAVE_STDINT_H 1
100 #define HAVE_INT64_T_UINT64_T 1
101 #endif
103 #if defined(_MSC_VER) && _MSC_VER >= 1600
104 #define HAVE___THREAD __declspec(thread)
105 #endif
107 #if defined(__STDC__) && __STDC_VERSION__ >= 199901
108 #elif defined(__cplusplus)
109 #elif defined(__WATCOMC__) && __WATCOMC__ >= 1220
110 #elif defined(__IBMC__) || defined(_MSC_VER)
111 #define inline __inline
112 #elif defined(__BORLANDC__) && __BORLANDC__ >= 0x550 /* not sure */
113 #define inline __inline
114 #else
115 #define inline
116 #endif
119 #define HAVE_FOPEN 1
120 #define HAVE_GETENV 1
121 #define HAVE_STRERROR 1
122 #if defined(_MSC_VER) && _MSC_VER >= 1600
123 #define HAVE_STRNLEN 1
124 #define HAVE_MODFF 1
125 #endif
126 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
127 #define HAVE_VSNPRINTF 1
128 #endif
130 #if !(defined(__BORLANDC__) || (defined _MSC_VER && _MSC_VER < 1600))
131 #define HAVE_FABSF 1
132 #define HAVE_FREXPF 1
133 #define HAVE_LDEXPF 1
134 #define HAVE_POWF 1
135 #endif
137 #if defined(_MSC_VER) || defined(__BORLANDC__)
138 #define ssize_t intptr_t
139 #endif
141 #if defined(OS_WIN32) && defined(_MT)
142 #define HAVE__BEGINTHREADEX 1
143 #endif
145 #endif