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
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
22 #define _FILE_OFFSET_BITS 64
27 #define _XOPEN_SOURCE_EXTENDED 1
31 #define _DARWIN_UNLIMITED_SELECT
34 #if defined(__TURBOC__) || defined(__BORLANDC__)
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)
43 #if defined(__DOS__) || defined(__DJGPP__)
47 #if defined(__EMX__) || defined(__OS2__)
51 #if defined(__CYGWIN__)
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
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
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
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
103 #if defined(_MSC_VER) && _MSC_VER >= 1600
104 #define HAVE___THREAD __declspec(thread)
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
120 #define HAVE_GETENV 1
121 #define HAVE_STRERROR 1
122 #if defined(_MSC_VER) && _MSC_VER >= 1600
123 #define HAVE_STRNLEN 1
126 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
127 #define HAVE_VSNPRINTF 1
130 #if !(defined(__BORLANDC__) || (defined _MSC_VER && _MSC_VER < 1600))
132 #define HAVE_FREXPF 1
133 #define HAVE_LDEXPF 1
137 #if defined(_MSC_VER) || defined(__BORLANDC__)
138 #define ssize_t intptr_t
141 #if defined(OS_WIN32) && defined(_MT)
142 #define HAVE__BEGINTHREADEX 1