wok-next view syslinux/stuff/slitaz-next/miniacc.h @ rev 21096

Update SliTaz syslinuxes
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue Jan 01 13:15:54 2019 +0200 (2019-01-01)
parents d4a1a09fab2c
children
line source
1 /* ACC --- Automatic Compiler Configuration
3 This file is part of the UPX executable compressor.
5 Copyright (C) 1996-2018 Markus Franz Xaver Johannes Oberhumer
6 All Rights Reserved.
8 UPX and the UCL library are free software; you can redistribute them
9 and/or modify them under the terms of the GNU General Public License as
10 published by the Free Software Foundation; either version 2 of
11 the License, or (at your option) any later version.
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with this program; see the file COPYING.
20 If not, write to the Free Software Foundation, Inc.,
21 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 Markus F.X.J. Oberhumer
24 <markus@oberhumer.com>
25 http://www.oberhumer.com/
26 */
28 #ifndef __ACC_H_INCLUDED
29 #define __ACC_H_INCLUDED 1
30 #define ACC_VERSION 20170301L
31 #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
32 # define __CYGWIN__ __CYGWIN32__
33 #endif
34 #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
35 # define _ALL_SOURCE 1
36 #endif
37 #if defined(__mips__) && defined(__R5900__)
38 # if !defined(__LONG_MAX__)
39 # define __LONG_MAX__ 9223372036854775807L
40 # endif
41 #endif
42 #if 0
43 #elif !defined(__ACC_LANG_OVERRIDE)
44 #if (defined(__clang__) || defined(__GNUC__)) && defined(__ASSEMBLER__)
45 # if (__ASSEMBLER__+0) <= 0
46 # error "__ASSEMBLER__"
47 # else
48 # define ACC_LANG_ASSEMBLER 1
49 # endif
50 #elif defined(__cplusplus)
51 # if (__cplusplus+0) <= 0
52 # error "__cplusplus"
53 # elif (__cplusplus < 199711L)
54 # define ACC_LANG_CXX 1
55 # elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1
56 # define ACC_LANG_CXX _MSVC_LANG
57 # else
58 # define ACC_LANG_CXX __cplusplus
59 # endif
60 # define ACC_LANG_CPLUSPLUS ACC_LANG_CXX
61 #else
62 # if defined(__STDC_VERSION__) && (__STDC_VERSION__+0 >= 199409L)
63 # define ACC_LANG_C __STDC_VERSION__
64 # else
65 # define ACC_LANG_C 1
66 # endif
67 #endif
68 #endif
69 #if !defined(ACC_CFG_NO_DISABLE_WUNDEF)
70 #if defined(__ARMCC_VERSION)
71 # pragma diag_suppress 193
72 #elif defined(__clang__) && defined(__clang_minor__)
73 # pragma clang diagnostic ignored "-Wundef"
74 #elif defined(__INTEL_COMPILER)
75 # pragma warning(disable: 193)
76 #elif defined(__KEIL__) && defined(__C166__)
77 # pragma warning disable = 322
78 #elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__)
79 # if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2))
80 # pragma GCC diagnostic ignored "-Wundef"
81 # endif
82 #elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
83 # if ((_MSC_VER-0) >= 1300)
84 # pragma warning(disable: 4668)
85 # endif
86 #endif
87 #endif
88 #if 0 && defined(__POCC__) && defined(_WIN32)
89 # if (__POCC__ >= 400)
90 # pragma warn(disable: 2216)
91 # endif
92 #endif
93 #if 0 && defined(__WATCOMC__)
94 # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
95 # pragma warning 203 9
96 # endif
97 #endif
98 #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
99 # pragma option -h
100 #endif
101 #if !(ACC_CFG_NO_DISABLE_WCRTNONSTDC)
102 #ifndef _CRT_NONSTDC_NO_DEPRECATE
103 #define _CRT_NONSTDC_NO_DEPRECATE 1
104 #endif
105 #ifndef _CRT_NONSTDC_NO_WARNINGS
106 #define _CRT_NONSTDC_NO_WARNINGS 1
107 #endif
108 #ifndef _CRT_SECURE_NO_DEPRECATE
109 #define _CRT_SECURE_NO_DEPRECATE 1
110 #endif
111 #ifndef _CRT_SECURE_NO_WARNINGS
112 #define _CRT_SECURE_NO_WARNINGS 1
113 #endif
114 #endif
115 #if (ACC_CFG_NO_CONFIG_HEADER)
116 #elif defined(ACC_CFG_CONFIG_HEADER)
117 # include ACC_CFG_CONFIG_HEADER
118 #else
119 #endif
120 #if (ACC_CFG_NO_LIMITS_H)
121 #elif (ACC_LIBC_NAKED) || (ACC_BROKEN_LIMITS_H)
122 #ifndef __ACC_FALLBACK_LIMITS_H_INCLUDED
123 #define __ACC_FALLBACK_LIMITS_H_INCLUDED 1
124 #undef CHAR_BIT
125 #define CHAR_BIT 8
126 #ifndef MB_LEN_MAX
127 #define MB_LEN_MAX 1
128 #endif
129 #ifndef __SCHAR_MAX__
130 #define __SCHAR_MAX__ 127
131 #endif
132 #ifndef __SHRT_MAX__
133 #define __SHRT_MAX__ 32767
134 #endif
135 #ifndef __INT_MAX__
136 #define __INT_MAX__ 2147483647
137 #endif
138 #ifndef __LONG_MAX__
139 #if defined(_ILP32) || defined(__ILP32__)
140 #define __LONG_MAX__ 2147483647L
141 #elif defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__)
142 #define __LONG_MAX__ 9223372036854775807L
143 #else
144 #define __LONG_MAX__ 2147483647L
145 #endif
146 #endif
147 #undef SCHAR_MIN
148 #undef SCHAR_MAX
149 #undef UCHAR_MAX
150 #define SCHAR_MIN (-1 - SCHAR_MAX)
151 #define SCHAR_MAX (__SCHAR_MAX__)
152 #define UCHAR_MAX (SCHAR_MAX * 2 + 1)
153 #undef SHRT_MIN
154 #undef SHRT_MAX
155 #undef USHRT_MAX
156 #define SHRT_MIN (-1 - SHRT_MAX)
157 #define SHRT_MAX (__SHRT_MAX__)
158 #if ((__INT_MAX__) == (__SHRT_MAX__))
159 #define USHRT_MAX (SHRT_MAX * 2U + 1U)
160 #else
161 #define USHRT_MAX (SHRT_MAX * 2 + 1)
162 #endif
163 #undef INT_MIN
164 #undef INT_MAX
165 #undef UINT_MAX
166 #define INT_MIN (-1 - INT_MAX)
167 #define INT_MAX (__INT_MAX__)
168 #define UINT_MAX (INT_MAX * 2U + 1U)
169 #undef LONG_MIN
170 #undef LONG_MAX
171 #undef ULONG_MAX
172 #define LONG_MIN (-1L - LONG_MAX)
173 #define LONG_MAX ((__LONG_MAX__) + 0L)
174 #define ULONG_MAX (LONG_MAX * 2UL + 1UL)
175 #undef CHAR_MIN
176 #undef CHAR_MAX
177 #if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED)
178 #define CHAR_MIN 0
179 #define CHAR_MAX UCHAR_MAX
180 #else
181 #define CHAR_MIN SCHAR_MIN
182 #define CHAR_MAX SCHAR_MAX
183 #endif
184 #endif
185 #else
186 # include <limits.h>
187 #endif
188 #if 0
189 #define ACC_0xffffUL 0xfffful
190 #define ACC_0xffffffffUL 0xfffffffful
191 #else
192 #define ACC_0xffffUL 65535ul
193 #define ACC_0xffffffffUL 4294967295ul
194 #endif
195 #define ACC_0xffffL ACC_0xffffUL
196 #define ACC_0xffffffffL ACC_0xffffffffUL
197 #if (ACC_0xffffL == ACC_0xffffffffL)
198 # error "your preprocessor is broken 1"
199 #endif
200 #if (16ul * 16384ul != 262144ul)
201 # error "your preprocessor is broken 2"
202 #endif
203 #if 0
204 #if (32767 >= 4294967295ul)
205 # error "your preprocessor is broken 3"
206 #endif
207 #if (65535u >= 4294967295ul)
208 # error "your preprocessor is broken 4"
209 #endif
210 #endif
211 #if defined(__COUNTER__)
212 # ifndef ACC_CFG_USE_COUNTER
213 # define ACC_CFG_USE_COUNTER 1
214 # endif
215 #else
216 # undef ACC_CFG_USE_COUNTER
217 #endif
218 #if (UINT_MAX == ACC_0xffffL)
219 #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
220 # if !defined(MSDOS)
221 # define MSDOS 1
222 # endif
223 # if !defined(_MSDOS)
224 # define _MSDOS 1
225 # endif
226 #elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
227 # if (__VERSION == 520) && (MB_LEN_MAX == 1)
228 # if !defined(__AZTEC_C__)
229 # define __AZTEC_C__ __VERSION
230 # endif
231 # if !defined(__DOS__)
232 # define __DOS__ 1
233 # endif
234 # endif
235 #endif
236 #endif
237 #if (UINT_MAX == ACC_0xffffL)
238 #if defined(_MSC_VER) && defined(M_I86HM)
239 # define ptrdiff_t long
240 # define _PTRDIFF_T_DEFINED 1
241 #endif
242 #endif
243 #if (UINT_MAX == ACC_0xffffL)
244 # undef __ACC_RENAME_A
245 # undef __ACC_RENAME_B
246 # if defined(__AZTEC_C__) && defined(__DOS__)
247 # define __ACC_RENAME_A 1
248 # elif defined(_MSC_VER) && defined(MSDOS)
249 # if (_MSC_VER < 600)
250 # define __ACC_RENAME_A 1
251 # elif (_MSC_VER < 700)
252 # define __ACC_RENAME_B 1
253 # endif
254 # elif defined(__TSC__) && defined(__OS2__)
255 # define __ACC_RENAME_A 1
256 # elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
257 # define __ACC_RENAME_A 1
258 # elif defined(__PACIFIC__) && defined(DOS)
259 # if !defined(__far)
260 # define __far far
261 # endif
262 # if !defined(__near)
263 # define __near near
264 # endif
265 # endif
266 # if defined(__ACC_RENAME_A)
267 # if !defined(__cdecl)
268 # define __cdecl cdecl
269 # endif
270 # if !defined(__far)
271 # define __far far
272 # endif
273 # if !defined(__huge)
274 # define __huge huge
275 # endif
276 # if !defined(__near)
277 # define __near near
278 # endif
279 # if !defined(__pascal)
280 # define __pascal pascal
281 # endif
282 # if !defined(__huge)
283 # define __huge huge
284 # endif
285 # elif defined(__ACC_RENAME_B)
286 # if !defined(__cdecl)
287 # define __cdecl _cdecl
288 # endif
289 # if !defined(__far)
290 # define __far _far
291 # endif
292 # if !defined(__huge)
293 # define __huge _huge
294 # endif
295 # if !defined(__near)
296 # define __near _near
297 # endif
298 # if !defined(__pascal)
299 # define __pascal _pascal
300 # endif
301 # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
302 # if !defined(__cdecl)
303 # define __cdecl cdecl
304 # endif
305 # if !defined(__pascal)
306 # define __pascal pascal
307 # endif
308 # endif
309 # undef __ACC_RENAME_A
310 # undef __ACC_RENAME_B
311 #endif
312 #if (UINT_MAX == ACC_0xffffL)
313 #if defined(__AZTEC_C__) && defined(__DOS__)
314 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
315 #elif defined(_MSC_VER) && defined(MSDOS)
316 # if (_MSC_VER < 600)
317 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
318 # endif
319 # if (_MSC_VER < 700)
320 # define ACC_BROKEN_INTEGRAL_PROMOTION 1
321 # define ACC_BROKEN_SIZEOF 1
322 # endif
323 #elif defined(__PACIFIC__) && defined(DOS)
324 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
325 #elif defined(__TURBOC__) && defined(__MSDOS__)
326 # if (__TURBOC__ < 0x0150)
327 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
328 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
329 # define ACC_BROKEN_INTEGRAL_PROMOTION 1
330 # endif
331 # if (__TURBOC__ < 0x0200)
332 # define ACC_BROKEN_SIZEOF 1
333 # endif
334 # if (__TURBOC__ < 0x0400) && defined(__cplusplus)
335 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
336 # endif
337 #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
338 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
339 # define ACC_BROKEN_SIZEOF 1
340 #endif
341 #endif
342 #if defined(__WATCOMC__) && (__WATCOMC__ < 900)
343 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
344 #endif
345 #if defined(_CRAY) && defined(_CRAY1)
346 # define ACC_BROKEN_SIGNED_RIGHT_SHIFT 1
347 #endif
348 #define ACC_PP_STRINGIZE(x) #x
349 #define ACC_PP_MACRO_EXPAND(x) ACC_PP_STRINGIZE(x)
350 #define ACC_PP_CONCAT0() /*empty*/
351 #define ACC_PP_CONCAT1(a) a
352 #define ACC_PP_CONCAT2(a,b) a ## b
353 #define ACC_PP_CONCAT3(a,b,c) a ## b ## c
354 #define ACC_PP_CONCAT4(a,b,c,d) a ## b ## c ## d
355 #define ACC_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
356 #define ACC_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f
357 #define ACC_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g
358 #define ACC_PP_ECONCAT0() ACC_PP_CONCAT0()
359 #define ACC_PP_ECONCAT1(a) ACC_PP_CONCAT1(a)
360 #define ACC_PP_ECONCAT2(a,b) ACC_PP_CONCAT2(a,b)
361 #define ACC_PP_ECONCAT3(a,b,c) ACC_PP_CONCAT3(a,b,c)
362 #define ACC_PP_ECONCAT4(a,b,c,d) ACC_PP_CONCAT4(a,b,c,d)
363 #define ACC_PP_ECONCAT5(a,b,c,d,e) ACC_PP_CONCAT5(a,b,c,d,e)
364 #define ACC_PP_ECONCAT6(a,b,c,d,e,f) ACC_PP_CONCAT6(a,b,c,d,e,f)
365 #define ACC_PP_ECONCAT7(a,b,c,d,e,f,g) ACC_PP_CONCAT7(a,b,c,d,e,f,g)
366 #define ACC_PP_EMPTY /*empty*/
367 #define ACC_PP_EMPTY0() /*empty*/
368 #define ACC_PP_EMPTY1(a) /*empty*/
369 #define ACC_PP_EMPTY2(a,b) /*empty*/
370 #define ACC_PP_EMPTY3(a,b,c) /*empty*/
371 #define ACC_PP_EMPTY4(a,b,c,d) /*empty*/
372 #define ACC_PP_EMPTY5(a,b,c,d,e) /*empty*/
373 #define ACC_PP_EMPTY6(a,b,c,d,e,f) /*empty*/
374 #define ACC_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/
375 #if 1
376 #define ACC_CPP_STRINGIZE(x) #x
377 #define ACC_CPP_MACRO_EXPAND(x) ACC_CPP_STRINGIZE(x)
378 #define ACC_CPP_CONCAT2(a,b) a ## b
379 #define ACC_CPP_CONCAT3(a,b,c) a ## b ## c
380 #define ACC_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
381 #define ACC_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
382 #define ACC_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f
383 #define ACC_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g
384 #define ACC_CPP_ECONCAT2(a,b) ACC_CPP_CONCAT2(a,b)
385 #define ACC_CPP_ECONCAT3(a,b,c) ACC_CPP_CONCAT3(a,b,c)
386 #define ACC_CPP_ECONCAT4(a,b,c,d) ACC_CPP_CONCAT4(a,b,c,d)
387 #define ACC_CPP_ECONCAT5(a,b,c,d,e) ACC_CPP_CONCAT5(a,b,c,d,e)
388 #define ACC_CPP_ECONCAT6(a,b,c,d,e,f) ACC_CPP_CONCAT6(a,b,c,d,e,f)
389 #define ACC_CPP_ECONCAT7(a,b,c,d,e,f,g) ACC_CPP_CONCAT7(a,b,c,d,e,f,g)
390 #endif
391 #define __ACC_MASK_GEN(o,b) (((((o) << ((b)-((b)!=0))) - (o)) << 1) + (o)*((b)!=0))
392 #if 1 && defined(__cplusplus)
393 # if !defined(__STDC_CONSTANT_MACROS)
394 # define __STDC_CONSTANT_MACROS 1
395 # endif
396 # if !defined(__STDC_LIMIT_MACROS)
397 # define __STDC_LIMIT_MACROS 1
398 # endif
399 #endif
400 #if defined(__cplusplus)
401 # define ACC_EXTERN_C extern "C"
402 # define ACC_EXTERN_C_BEGIN extern "C" {
403 # define ACC_EXTERN_C_END }
404 #else
405 # define ACC_EXTERN_C extern
406 # define ACC_EXTERN_C_BEGIN /*empty*/
407 # define ACC_EXTERN_C_END /*empty*/
408 #endif
409 #if !defined(__ACC_OS_OVERRIDE)
410 #if (ACC_OS_FREESTANDING)
411 # define ACC_INFO_OS "freestanding"
412 #elif (ACC_OS_EMBEDDED)
413 # define ACC_INFO_OS "embedded"
414 #elif 1 && defined(__IAR_SYSTEMS_ICC__)
415 # define ACC_OS_EMBEDDED 1
416 # define ACC_INFO_OS "embedded"
417 #elif defined(__CYGWIN__) && defined(__GNUC__)
418 # define ACC_OS_CYGWIN 1
419 # define ACC_INFO_OS "cygwin"
420 #elif defined(__EMX__) && defined(__GNUC__)
421 # define ACC_OS_EMX 1
422 # define ACC_INFO_OS "emx"
423 #elif defined(__BEOS__)
424 # define ACC_OS_BEOS 1
425 # define ACC_INFO_OS "beos"
426 #elif defined(__Lynx__)
427 # define ACC_OS_LYNXOS 1
428 # define ACC_INFO_OS "lynxos"
429 #elif defined(__OS400__)
430 # define ACC_OS_OS400 1
431 # define ACC_INFO_OS "os400"
432 #elif defined(__QNX__)
433 # define ACC_OS_QNX 1
434 # define ACC_INFO_OS "qnx"
435 #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
436 # define ACC_OS_DOS32 1
437 # define ACC_INFO_OS "dos32"
438 #elif defined(__BORLANDC__) && defined(__DPMI16__)
439 # define ACC_OS_DOS16 1
440 # define ACC_INFO_OS "dos16"
441 #elif defined(__ZTC__) && defined(DOS386)
442 # define ACC_OS_DOS32 1
443 # define ACC_INFO_OS "dos32"
444 #elif defined(__OS2__) || defined(__OS2V2__)
445 # if (UINT_MAX == ACC_0xffffL)
446 # define ACC_OS_OS216 1
447 # define ACC_INFO_OS "os216"
448 # elif (UINT_MAX == ACC_0xffffffffL)
449 # define ACC_OS_OS2 1
450 # define ACC_INFO_OS "os2"
451 # else
452 # error "check your limits.h header"
453 # endif
454 #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
455 # define ACC_OS_WIN64 1
456 # define ACC_INFO_OS "win64"
457 #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
458 # define ACC_OS_WIN32 1
459 # define ACC_INFO_OS "win32"
460 #elif defined(__MWERKS__) && defined(__INTEL__)
461 # define ACC_OS_WIN32 1
462 # define ACC_INFO_OS "win32"
463 #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
464 # if (UINT_MAX == ACC_0xffffL)
465 # define ACC_OS_WIN16 1
466 # define ACC_INFO_OS "win16"
467 # elif (UINT_MAX == ACC_0xffffffffL)
468 # define ACC_OS_WIN32 1
469 # define ACC_INFO_OS "win32"
470 # else
471 # error "check your limits.h header"
472 # endif
473 #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
474 # if (UINT_MAX == ACC_0xffffL)
475 # define ACC_OS_DOS16 1
476 # define ACC_INFO_OS "dos16"
477 # elif (UINT_MAX == ACC_0xffffffffL)
478 # define ACC_OS_DOS32 1
479 # define ACC_INFO_OS "dos32"
480 # else
481 # error "check your limits.h header"
482 # endif
483 #elif defined(__WATCOMC__)
484 # if defined(__NT__) && (UINT_MAX == ACC_0xffffL)
485 # define ACC_OS_DOS16 1
486 # define ACC_INFO_OS "dos16"
487 # elif defined(__NT__) && (__WATCOMC__ < 1100)
488 # define ACC_OS_WIN32 1
489 # define ACC_INFO_OS "win32"
490 # elif defined(__linux__) || defined(__LINUX__)
491 # define ACC_OS_POSIX 1
492 # define ACC_INFO_OS "posix"
493 # else
494 # error "please specify a target using the -bt compiler option"
495 # endif
496 #elif defined(__palmos__)
497 # define ACC_OS_PALMOS 1
498 # define ACC_INFO_OS "palmos"
499 #elif defined(__TOS__) || defined(__atarist__)
500 # define ACC_OS_TOS 1
501 # define ACC_INFO_OS "tos"
502 #elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__)
503 # define ACC_OS_MACCLASSIC 1
504 # define ACC_INFO_OS "macclassic"
505 #elif defined(__VMS)
506 # define ACC_OS_VMS 1
507 # define ACC_INFO_OS "vms"
508 #elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)
509 # define ACC_OS_CONSOLE 1
510 # define ACC_OS_CONSOLE_PS2 1
511 # define ACC_INFO_OS "console"
512 # define ACC_INFO_OS_CONSOLE "ps2"
513 #elif defined(__mips__) && defined(__psp__)
514 # define ACC_OS_CONSOLE 1
515 # define ACC_OS_CONSOLE_PSP 1
516 # define ACC_INFO_OS "console"
517 # define ACC_INFO_OS_CONSOLE "psp"
518 #else
519 # define ACC_OS_POSIX 1
520 # define ACC_INFO_OS "posix"
521 #endif
522 #if (ACC_OS_POSIX)
523 # if defined(_AIX) || defined(__AIX__) || defined(__aix__)
524 # define ACC_OS_POSIX_AIX 1
525 # define ACC_INFO_OS_POSIX "aix"
526 # elif defined(__FreeBSD__)
527 # define ACC_OS_POSIX_FREEBSD 1
528 # define ACC_INFO_OS_POSIX "freebsd"
529 # elif defined(__hpux__) || defined(__hpux)
530 # define ACC_OS_POSIX_HPUX 1
531 # define ACC_INFO_OS_POSIX "hpux"
532 # elif defined(__INTERIX)
533 # define ACC_OS_POSIX_INTERIX 1
534 # define ACC_INFO_OS_POSIX "interix"
535 # elif defined(__IRIX__) || defined(__irix__)
536 # define ACC_OS_POSIX_IRIX 1
537 # define ACC_INFO_OS_POSIX "irix"
538 # elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
539 # define ACC_OS_POSIX_LINUX 1
540 # define ACC_INFO_OS_POSIX "linux"
541 # elif defined(__APPLE__) && defined(__MACH__)
542 # if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000)
543 # define ACC_OS_POSIX_DARWIN 1040
544 # define ACC_INFO_OS_POSIX "darwin_iphone"
545 # elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040)
546 # define ACC_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
547 # define ACC_INFO_OS_POSIX "darwin"
548 # else
549 # define ACC_OS_POSIX_DARWIN 1
550 # define ACC_INFO_OS_POSIX "darwin"
551 # endif
552 # define ACC_OS_POSIX_MACOSX ACC_OS_POSIX_DARWIN
553 # elif defined(__minix__) || defined(__minix)
554 # define ACC_OS_POSIX_MINIX 1
555 # define ACC_INFO_OS_POSIX "minix"
556 # elif defined(__NetBSD__)
557 # define ACC_OS_POSIX_NETBSD 1
558 # define ACC_INFO_OS_POSIX "netbsd"
559 # elif defined(__OpenBSD__)
560 # define ACC_OS_POSIX_OPENBSD 1
561 # define ACC_INFO_OS_POSIX "openbsd"
562 # elif defined(__osf__)
563 # define ACC_OS_POSIX_OSF 1
564 # define ACC_INFO_OS_POSIX "osf"
565 # elif defined(__solaris__) || defined(__sun)
566 # if defined(__SVR4) || defined(__svr4__)
567 # define ACC_OS_POSIX_SOLARIS 1
568 # define ACC_INFO_OS_POSIX "solaris"
569 # else
570 # define ACC_OS_POSIX_SUNOS 1
571 # define ACC_INFO_OS_POSIX "sunos"
572 # endif
573 # elif defined(__ultrix__) || defined(__ultrix)
574 # define ACC_OS_POSIX_ULTRIX 1
575 # define ACC_INFO_OS_POSIX "ultrix"
576 # elif defined(_UNICOS)
577 # define ACC_OS_POSIX_UNICOS 1
578 # define ACC_INFO_OS_POSIX "unicos"
579 # else
580 # define ACC_OS_POSIX_UNKNOWN 1
581 # define ACC_INFO_OS_POSIX "unknown"
582 # endif
583 #endif
584 #endif
585 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
586 # if (UINT_MAX != ACC_0xffffL)
587 # error "unexpected configuration - check your compiler defines"
588 # endif
589 # if (ULONG_MAX != ACC_0xffffffffL)
590 # error "unexpected configuration - check your compiler defines"
591 # endif
592 #endif
593 #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32 || ACC_OS_WIN64)
594 # if (UINT_MAX != ACC_0xffffffffL)
595 # error "unexpected configuration - check your compiler defines"
596 # endif
597 # if (ULONG_MAX != ACC_0xffffffffL)
598 # error "unexpected configuration - check your compiler defines"
599 # endif
600 #endif
601 #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
602 # define ACC_CC_CILLY 1
603 # define ACC_INFO_CC "Cilly"
604 # if defined(__CILLY__)
605 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__CILLY__)
606 # else
607 # define ACC_INFO_CCVER "unknown"
608 # endif
609 #elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
610 # define ACC_CC_SDCC 1
611 # define ACC_INFO_CC "sdcc"
612 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(SDCC)
613 #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
614 # define ACC_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0))
615 # define ACC_INFO_CC "Pathscale C"
616 # define ACC_INFO_CCVER __PATHSCALE__
617 # if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
618 # define ACC_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
619 # endif
620 #elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0)
621 # define ACC_CC_INTELC __INTEL_COMPILER
622 # define ACC_INFO_CC "Intel C"
623 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__INTEL_COMPILER)
624 # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
625 # define ACC_CC_INTELC_MSC _MSC_VER
626 # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
627 # define ACC_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
628 # endif
629 #elif defined(__POCC__) && defined(_WIN32)
630 # define ACC_CC_PELLESC 1
631 # define ACC_INFO_CC "Pelles C"
632 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__POCC__)
633 #elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
634 # if defined(__GNUC_PATCHLEVEL__)
635 # define ACC_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
636 # else
637 # define ACC_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
638 # endif
639 # define ACC_CC_ARMCC __ARMCC_VERSION
640 # define ACC_INFO_CC "ARM C Compiler"
641 # define ACC_INFO_CCVER __VERSION__
642 #elif defined(__clang__) && defined(__c2__) && defined(__c2_version__) && defined(_MSC_VER)
643 # define ACC_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
644 # define ACC_CC_CLANG_C2 _MSC_VER
645 # define ACC_CC_CLANG_VENDOR_MICROSOFT 1
646 # define ACC_INFO_CC "clang/c2"
647 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__c2_version__)
648 #elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__)
649 # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
650 # define ACC_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
651 # else
652 # define ACC_CC_CLANG 0x010000L
653 # endif
654 # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
655 # define ACC_CC_CLANG_MSC _MSC_VER
656 # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
657 # define ACC_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
658 # endif
659 # if defined(__APPLE_CC__)
660 # define ACC_CC_CLANG_VENDOR_APPLE 1
661 # define ACC_INFO_CC "clang/apple"
662 # else
663 # define ACC_CC_CLANG_VENDOR_LLVM 1
664 # define ACC_INFO_CC "clang"
665 # endif
666 # if defined(__clang_version__)
667 # define ACC_INFO_CCVER __clang_version__
668 # else
669 # define ACC_INFO_CCVER __VERSION__
670 # endif
671 #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
672 # if defined(__GNUC_PATCHLEVEL__)
673 # define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
674 # else
675 # define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
676 # endif
677 # define ACC_CC_LLVM ACC_CC_LLVM_GNUC
678 # define ACC_INFO_CC "llvm-gcc"
679 # define ACC_INFO_CCVER __VERSION__
680 #elif defined(__ACK__) && defined(_ACK)
681 # define ACC_CC_ACK 1
682 # define ACC_INFO_CC "Amsterdam Compiler Kit C"
683 # define ACC_INFO_CCVER "unknown"
684 #elif defined(__ARMCC_VERSION) && !defined(__GNUC__)
685 # define ACC_CC_ARMCC __ARMCC_VERSION
686 # define ACC_CC_ARMCC_ARMCC __ARMCC_VERSION
687 # define ACC_INFO_CC "ARM C Compiler"
688 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ARMCC_VERSION)
689 #elif defined(__AZTEC_C__)
690 # define ACC_CC_AZTECC 1
691 # define ACC_INFO_CC "Aztec C"
692 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__AZTEC_C__)
693 #elif defined(__CODEGEARC__)
694 # define ACC_CC_CODEGEARC 1
695 # define ACC_INFO_CC "CodeGear C"
696 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__CODEGEARC__)
697 #elif defined(__BORLANDC__)
698 # define ACC_CC_BORLANDC 1
699 # define ACC_INFO_CC "Borland C"
700 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__BORLANDC__)
701 #elif defined(_CRAYC) && defined(_RELEASE)
702 # define ACC_CC_CRAYC 1
703 # define ACC_INFO_CC "Cray C"
704 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_RELEASE)
705 #elif defined(__DMC__) && defined(__SC__)
706 # define ACC_CC_DMC 1
707 # define ACC_INFO_CC "Digital Mars C"
708 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DMC__)
709 #elif defined(__DECC)
710 # define ACC_CC_DECC 1
711 # define ACC_INFO_CC "DEC C"
712 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DECC)
713 #elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0)
714 # define ACC_CC_GHS 1
715 # define ACC_INFO_CC "Green Hills C"
716 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER)
717 # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
718 # define ACC_CC_GHS_MSC _MSC_VER
719 # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
720 # define ACC_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
721 # endif
722 #elif defined(__HIGHC__)
723 # define ACC_CC_HIGHC 1
724 # define ACC_INFO_CC "MetaWare High C"
725 # define ACC_INFO_CCVER "unknown"
726 #elif defined(__HP_aCC) && ((__HP_aCC-0) > 0)
727 # define ACC_CC_HPACC __HP_aCC
728 # define ACC_INFO_CC "HP aCC"
729 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__HP_aCC)
730 #elif defined(__IAR_SYSTEMS_ICC__)
731 # define ACC_CC_IARC 1
732 # define ACC_INFO_CC "IAR C"
733 # if defined(__VER__)
734 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__VER__)
735 # else
736 # define ACC_INFO_CCVER "unknown"
737 # endif
738 #elif defined(__IBMC__) && ((__IBMC__-0) > 0)
739 # define ACC_CC_IBMC __IBMC__
740 # define ACC_INFO_CC "IBM C"
741 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMC__)
742 #elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0)
743 # define ACC_CC_IBMC __IBMCPP__
744 # define ACC_INFO_CC "IBM C"
745 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMCPP__)
746 #elif defined(__KEIL__) && defined(__C166__)
747 # define ACC_CC_KEILC 1
748 # define ACC_INFO_CC "Keil C"
749 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__C166__)
750 #elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
751 # define ACC_CC_LCCWIN32 1
752 # define ACC_INFO_CC "lcc-win32"
753 # define ACC_INFO_CCVER "unknown"
754 #elif defined(__LCC__)
755 # define ACC_CC_LCC 1
756 # define ACC_INFO_CC "lcc"
757 # if defined(__LCC_VERSION__)
758 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__LCC_VERSION__)
759 # else
760 # define ACC_INFO_CCVER "unknown"
761 # endif
762 #elif defined(__MWERKS__) && ((__MWERKS__-0) > 0)
763 # define ACC_CC_MWERKS __MWERKS__
764 # define ACC_INFO_CC "Metrowerks C"
765 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__MWERKS__)
766 #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
767 # define ACC_CC_NDPC 1
768 # define ACC_INFO_CC "Microway NDP C"
769 # define ACC_INFO_CCVER "unknown"
770 #elif defined(__PACIFIC__)
771 # define ACC_CC_PACIFICC 1
772 # define ACC_INFO_CC "Pacific C"
773 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PACIFIC__)
774 #elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__)
775 # if defined(__PGIC_PATCHLEVEL__)
776 # define ACC_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0))
777 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PGIC__) "." ACC_PP_MACRO_EXPAND(__PGIC_MINOR__) "." ACC_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__)
778 # else
779 # define ACC_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100)
780 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PGIC__) "." ACC_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0"
781 # endif
782 # define ACC_INFO_CC "Portland Group PGI C"
783 #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
784 # define ACC_CC_PGI 1
785 # define ACC_INFO_CC "Portland Group PGI C"
786 # define ACC_INFO_CCVER "unknown"
787 #elif defined(__PUREC__) && defined(__TOS__)
788 # define ACC_CC_PUREC 1
789 # define ACC_INFO_CC "Pure C"
790 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PUREC__)
791 #elif defined(__SC__) && defined(__ZTC__)
792 # define ACC_CC_SYMANTECC 1
793 # define ACC_INFO_CC "Symantec C"
794 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SC__)
795 #elif defined(__SUNPRO_C)
796 # define ACC_INFO_CC "SunPro C"
797 # if ((__SUNPRO_C-0) > 0)
798 # define ACC_CC_SUNPROC __SUNPRO_C
799 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_C)
800 # else
801 # define ACC_CC_SUNPROC 1
802 # define ACC_INFO_CCVER "unknown"
803 # endif
804 #elif defined(__SUNPRO_CC)
805 # define ACC_INFO_CC "SunPro C"
806 # if ((__SUNPRO_CC-0) > 0)
807 # define ACC_CC_SUNPROC __SUNPRO_CC
808 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_CC)
809 # else
810 # define ACC_CC_SUNPROC 1
811 # define ACC_INFO_CCVER "unknown"
812 # endif
813 #elif defined(__TINYC__)
814 # define ACC_CC_TINYC 1
815 # define ACC_INFO_CC "Tiny C"
816 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TINYC__)
817 #elif defined(__TSC__)
818 # define ACC_CC_TOPSPEEDC 1
819 # define ACC_INFO_CC "TopSpeed C"
820 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TSC__)
821 #elif defined(__WATCOMC__)
822 # define ACC_CC_WATCOMC 1
823 # define ACC_INFO_CC "Watcom C"
824 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__WATCOMC__)
825 #elif defined(__TURBOC__)
826 # define ACC_CC_TURBOC 1
827 # define ACC_INFO_CC "Turbo C"
828 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TURBOC__)
829 #elif defined(__ZTC__)
830 # define ACC_CC_ZORTECHC 1
831 # define ACC_INFO_CC "Zortech C"
832 # if ((__ZTC__-0) == 0x310)
833 # define ACC_INFO_CCVER "0x310"
834 # else
835 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ZTC__)
836 # endif
837 #elif defined(__GNUC__) && defined(__VERSION__)
838 # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
839 # define ACC_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
840 # elif defined(__GNUC_MINOR__)
841 # define ACC_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
842 # else
843 # define ACC_CC_GNUC (__GNUC__ * 0x10000L)
844 # endif
845 # define ACC_INFO_CC "gcc"
846 # define ACC_INFO_CCVER __VERSION__
847 #elif defined(_MSC_VER) && ((_MSC_VER-0) > 0)
848 # define ACC_CC_MSC _MSC_VER
849 # define ACC_INFO_CC "Microsoft C"
850 # if defined(_MSC_FULL_VER)
851 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) "." ACC_PP_MACRO_EXPAND(_MSC_FULL_VER)
852 # else
853 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER)
854 # endif
855 #else
856 # define ACC_CC_UNKNOWN 1
857 # define ACC_INFO_CC "unknown"
858 # define ACC_INFO_CCVER "unknown"
859 #endif
860 #if (ACC_CC_GNUC) && defined(__OPEN64__)
861 # if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__)
862 # define ACC_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0))
863 # define ACC_CC_OPEN64_GNUC ACC_CC_GNUC
864 # endif
865 #endif
866 #if (ACC_CC_GNUC) && defined(__PCC__)
867 # if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__)
868 # define ACC_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0))
869 # define ACC_CC_PCC_GNUC ACC_CC_GNUC
870 # endif
871 #endif
872 #if 0 && (ACC_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
873 # error "ACC_CC_MSC: _MSC_FULL_VER is not defined"
874 #endif
875 #if !defined(__ACC_ARCH_OVERRIDE) && !(ACC_ARCH_GENERIC) && defined(_CRAY)
876 # if (UINT_MAX > ACC_0xffffffffL) && defined(_CRAY)
877 # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
878 # define ACC_ARCH_CRAY_MPP 1
879 # elif defined(_CRAY1)
880 # define ACC_ARCH_CRAY_PVP 1
881 # endif
882 # endif
883 #endif
884 #if !defined(__ACC_ARCH_OVERRIDE)
885 #if (ACC_ARCH_GENERIC)
886 # define ACC_INFO_ARCH "generic"
887 #elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
888 # define ACC_ARCH_I086 1
889 # define ACC_INFO_ARCH "i086"
890 #elif defined(__aarch64__) || defined(_M_ARM64)
891 # define ACC_ARCH_ARM64 1
892 # define ACC_INFO_ARCH "arm64"
893 #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
894 # define ACC_ARCH_ALPHA 1
895 # define ACC_INFO_ARCH "alpha"
896 #elif (ACC_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
897 # define ACC_ARCH_ALPHA 1
898 # define ACC_INFO_ARCH "alpha"
899 #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
900 # define ACC_ARCH_AMD64 1
901 # define ACC_INFO_ARCH "amd64"
902 #elif defined(__arm__) || defined(_M_ARM)
903 # define ACC_ARCH_ARM 1
904 # define ACC_INFO_ARCH "arm"
905 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
906 # define ACC_ARCH_ARM 1
907 # define ACC_INFO_ARCH "arm"
908 #elif (UINT_MAX <= ACC_0xffffL) && defined(__AVR__)
909 # define ACC_ARCH_AVR 1
910 # define ACC_INFO_ARCH "avr"
911 #elif defined(__avr32__) || defined(__AVR32__)
912 # define ACC_ARCH_AVR32 1
913 # define ACC_INFO_ARCH "avr32"
914 #elif defined(__bfin__)
915 # define ACC_ARCH_BLACKFIN 1
916 # define ACC_INFO_ARCH "blackfin"
917 #elif (UINT_MAX == ACC_0xffffL) && defined(__C166__)
918 # define ACC_ARCH_C166 1
919 # define ACC_INFO_ARCH "c166"
920 #elif defined(__cris__)
921 # define ACC_ARCH_CRIS 1
922 # define ACC_INFO_ARCH "cris"
923 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
924 # define ACC_ARCH_EZ80 1
925 # define ACC_INFO_ARCH "ez80"
926 #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
927 # define ACC_ARCH_H8300 1
928 # define ACC_INFO_ARCH "h8300"
929 #elif defined(__hppa__) || defined(__hppa)
930 # define ACC_ARCH_HPPA 1
931 # define ACC_INFO_ARCH "hppa"
932 #elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
933 # define ACC_ARCH_I386 1
934 # define ACC_ARCH_IA32 1
935 # define ACC_INFO_ARCH "i386"
936 #elif (ACC_CC_ZORTECHC && defined(__I86__))
937 # define ACC_ARCH_I386 1
938 # define ACC_ARCH_IA32 1
939 # define ACC_INFO_ARCH "i386"
940 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
941 # define ACC_ARCH_I386 1
942 # define ACC_ARCH_IA32 1
943 # define ACC_INFO_ARCH "i386"
944 #elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
945 # define ACC_ARCH_IA64 1
946 # define ACC_INFO_ARCH "ia64"
947 #elif (UINT_MAX == ACC_0xffffL) && defined(__m32c__)
948 # define ACC_ARCH_M16C 1
949 # define ACC_INFO_ARCH "m16c"
950 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
951 # define ACC_ARCH_M16C 1
952 # define ACC_INFO_ARCH "m16c"
953 #elif defined(__m32r__)
954 # define ACC_ARCH_M32R 1
955 # define ACC_INFO_ARCH "m32r"
956 #elif (ACC_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
957 # define ACC_ARCH_M68K 1
958 # define ACC_INFO_ARCH "m68k"
959 #elif (UINT_MAX == ACC_0xffffL) && defined(__C251__)
960 # define ACC_ARCH_MCS251 1
961 # define ACC_INFO_ARCH "mcs251"
962 #elif (UINT_MAX == ACC_0xffffL) && defined(__C51__)
963 # define ACC_ARCH_MCS51 1
964 # define ACC_INFO_ARCH "mcs51"
965 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
966 # define ACC_ARCH_MCS51 1
967 # define ACC_INFO_ARCH "mcs51"
968 #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
969 # define ACC_ARCH_MIPS 1
970 # define ACC_INFO_ARCH "mips"
971 #elif (UINT_MAX == ACC_0xffffL) && defined(__MSP430__)
972 # define ACC_ARCH_MSP430 1
973 # define ACC_INFO_ARCH "msp430"
974 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
975 # define ACC_ARCH_MSP430 1
976 # define ACC_INFO_ARCH "msp430"
977 #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
978 # define ACC_ARCH_POWERPC 1
979 # define ACC_INFO_ARCH "powerpc"
980 #elif defined(__powerpc64__) || defined(__powerpc64) || defined(__ppc64__) || defined(__PPC64__)
981 # define ACC_ARCH_POWERPC 1
982 # define ACC_INFO_ARCH "powerpc"
983 #elif defined(__powerpc64le__) || defined(__powerpc64le) || defined(__ppc64le__) || defined(__PPC64LE__)
984 # define ACC_ARCH_POWERPC 1
985 # define ACC_INFO_ARCH "powerpc"
986 #elif defined(__riscv)
987 # define ACC_ARCH_RISCV 1
988 # define ACC_INFO_ARCH "riscv"
989 #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
990 # define ACC_ARCH_S390 1
991 # define ACC_INFO_ARCH "s390"
992 #elif defined(__sh__) || defined(_M_SH)
993 # define ACC_ARCH_SH 1
994 # define ACC_INFO_ARCH "sh"
995 #elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
996 # define ACC_ARCH_SPARC 1
997 # define ACC_INFO_ARCH "sparc"
998 #elif defined(__SPU__)
999 # define ACC_ARCH_SPU 1
1000 # define ACC_INFO_ARCH "spu"
1001 #elif (UINT_MAX == ACC_0xffffL) && defined(__z80)
1002 # define ACC_ARCH_Z80 1
1003 # define ACC_INFO_ARCH "z80"
1004 #elif (ACC_ARCH_CRAY_PVP)
1005 # if defined(_CRAYSV1)
1006 # define ACC_ARCH_CRAY_SV1 1
1007 # define ACC_INFO_ARCH "cray_sv1"
1008 # elif (_ADDR64)
1009 # define ACC_ARCH_CRAY_T90 1
1010 # define ACC_INFO_ARCH "cray_t90"
1011 # elif (_ADDR32)
1012 # define ACC_ARCH_CRAY_YMP 1
1013 # define ACC_INFO_ARCH "cray_ymp"
1014 # else
1015 # define ACC_ARCH_CRAY_XMP 1
1016 # define ACC_INFO_ARCH "cray_xmp"
1017 # endif
1018 #else
1019 # define ACC_ARCH_UNKNOWN 1
1020 # define ACC_INFO_ARCH "unknown"
1021 #endif
1022 #endif
1023 #if !defined(ACC_ARCH_ARM_THUMB2)
1024 #if (ACC_ARCH_ARM)
1025 # if defined(__thumb__) || defined(__thumb) || defined(_M_THUMB)
1026 # if defined(__thumb2__)
1027 # define ACC_ARCH_ARM_THUMB2 1
1028 # elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4)
1029 # define ACC_ARCH_ARM_THUMB2 1
1030 # elif 1 && defined(_MSC_VER) && defined(_M_THUMB) && ((_M_THUMB)+0 >= 7)
1031 # define ACC_ARCH_ARM_THUMB2 1
1032 # endif
1033 # endif
1034 #endif
1035 #endif
1036 #if (ACC_ARCH_ARM_THUMB2)
1037 # undef ACC_INFO_ARCH
1038 # define ACC_INFO_ARCH "arm_thumb2"
1039 #endif
1040 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_DOS32 || ACC_OS_OS2)
1041 # error "FIXME - missing define for CPU architecture"
1042 #endif
1043 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN32)
1044 # error "FIXME - missing ACC_OS_WIN32 define for CPU architecture"
1045 #endif
1046 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN64)
1047 # error "FIXME - missing ACC_OS_WIN64 define for CPU architecture"
1048 #endif
1049 #if (ACC_OS_OS216 || ACC_OS_WIN16)
1050 # define ACC_ARCH_I086PM 1
1051 #elif 1 && (ACC_OS_DOS16 && defined(BLX286))
1052 # define ACC_ARCH_I086PM 1
1053 #elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
1054 # define ACC_ARCH_I086PM 1
1055 #elif 1 && (ACC_OS_DOS16 && ACC_CC_BORLANDC && defined(__DPMI16__))
1056 # define ACC_ARCH_I086PM 1
1057 #endif
1058 #if (ACC_ARCH_AMD64 && !ACC_ARCH_X64)
1059 # define ACC_ARCH_X64 1
1060 #elif (!ACC_ARCH_AMD64 && ACC_ARCH_X64) && defined(__ACC_ARCH_OVERRIDE)
1061 # define ACC_ARCH_AMD64 1
1062 #endif
1063 #if (ACC_ARCH_ARM64 && !ACC_ARCH_AARCH64)
1064 # define ACC_ARCH_AARCH64 1
1065 #elif (!ACC_ARCH_ARM64 && ACC_ARCH_AARCH64) && defined(__ACC_ARCH_OVERRIDE)
1066 # define ACC_ARCH_ARM64 1
1067 #endif
1068 #if (ACC_ARCH_I386 && !ACC_ARCH_X86)
1069 # define ACC_ARCH_X86 1
1070 #elif (!ACC_ARCH_I386 && ACC_ARCH_X86) && defined(__ACC_ARCH_OVERRIDE)
1071 # define ACC_ARCH_I386 1
1072 #endif
1073 #if (ACC_ARCH_AMD64 && !ACC_ARCH_X64) || (!ACC_ARCH_AMD64 && ACC_ARCH_X64)
1074 # error "unexpected configuration - check your compiler defines"
1075 #endif
1076 #if (ACC_ARCH_ARM64 && !ACC_ARCH_AARCH64) || (!ACC_ARCH_ARM64 && ACC_ARCH_AARCH64)
1077 # error "unexpected configuration - check your compiler defines"
1078 #endif
1079 #if (ACC_ARCH_I386 && !ACC_ARCH_X86) || (!ACC_ARCH_I386 && ACC_ARCH_X86)
1080 # error "unexpected configuration - check your compiler defines"
1081 #endif
1082 #if (ACC_ARCH_ARM_THUMB1 && !ACC_ARCH_ARM)
1083 # error "unexpected configuration - check your compiler defines"
1084 #endif
1085 #if (ACC_ARCH_ARM_THUMB2 && !ACC_ARCH_ARM)
1086 # error "unexpected configuration - check your compiler defines"
1087 #endif
1088 #if (ACC_ARCH_ARM_THUMB1 && ACC_ARCH_ARM_THUMB2)
1089 # error "unexpected configuration - check your compiler defines"
1090 #endif
1091 #if (ACC_ARCH_I086PM && !ACC_ARCH_I086)
1092 # error "unexpected configuration - check your compiler defines"
1093 #endif
1094 #if (ACC_ARCH_I086)
1095 # if (UINT_MAX != ACC_0xffffL)
1096 # error "unexpected configuration - check your compiler defines"
1097 # endif
1098 # if (ULONG_MAX != ACC_0xffffffffL)
1099 # error "unexpected configuration - check your compiler defines"
1100 # endif
1101 #endif
1102 #if (ACC_ARCH_I386)
1103 # if (UINT_MAX != ACC_0xffffL) && defined(__i386_int16__)
1104 # error "unexpected configuration - check your compiler defines"
1105 # endif
1106 # if (UINT_MAX != ACC_0xffffffffL) && !defined(__i386_int16__)
1107 # error "unexpected configuration - check your compiler defines"
1108 # endif
1109 # if (ULONG_MAX != ACC_0xffffffffL)
1110 # error "unexpected configuration - check your compiler defines"
1111 # endif
1112 #endif
1113 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386)
1114 # if !defined(ACC_TARGET_FEATURE_SSE2)
1115 # if defined(__SSE2__)
1116 # define ACC_TARGET_FEATURE_SSE2 1
1117 # elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2))
1118 # define ACC_TARGET_FEATURE_SSE2 1
1119 # elif (ACC_CC_INTELC_MSC || ACC_CC_MSC) && defined(_M_AMD64)
1120 # define ACC_TARGET_FEATURE_SSE2 1
1121 # endif
1122 # endif
1123 # if !defined(ACC_TARGET_FEATURE_SSSE3)
1124 # if (ACC_TARGET_FEATURE_SSE2)
1125 # if defined(__SSSE3__)
1126 # define ACC_TARGET_FEATURE_SSSE3 1
1127 # elif defined(_MSC_VER) && defined(__AVX__)
1128 # define ACC_TARGET_FEATURE_SSSE3 1
1129 # endif
1130 # endif
1131 # endif
1132 # if !defined(ACC_TARGET_FEATURE_SSE4_2)
1133 # if (ACC_TARGET_FEATURE_SSSE3)
1134 # if defined(__SSE4_2__)
1135 # define ACC_TARGET_FEATURE_SSE4_2 1
1136 # endif
1137 # endif
1138 # endif
1139 # if !defined(ACC_TARGET_FEATURE_AVX)
1140 # if (ACC_TARGET_FEATURE_SSSE3)
1141 # if defined(__AVX__)
1142 # define ACC_TARGET_FEATURE_AVX 1
1143 # endif
1144 # endif
1145 # endif
1146 # if !defined(ACC_TARGET_FEATURE_AVX2)
1147 # if (ACC_TARGET_FEATURE_AVX)
1148 # if defined(__AVX2__)
1149 # define ACC_TARGET_FEATURE_AVX2 1
1150 # endif
1151 # endif
1152 # endif
1153 #endif
1154 #if (ACC_TARGET_FEATURE_SSSE3 && !(ACC_TARGET_FEATURE_SSE2))
1155 # error "unexpected configuration - check your compiler defines"
1156 #endif
1157 #if (ACC_TARGET_FEATURE_SSE4_2 && !(ACC_TARGET_FEATURE_SSSE3))
1158 # error "unexpected configuration - check your compiler defines"
1159 #endif
1160 #if (ACC_TARGET_FEATURE_AVX && !(ACC_TARGET_FEATURE_SSSE3))
1161 # error "unexpected configuration - check your compiler defines"
1162 #endif
1163 #if (ACC_TARGET_FEATURE_AVX2 && !(ACC_TARGET_FEATURE_AVX))
1164 # error "unexpected configuration - check your compiler defines"
1165 #endif
1166 #if (ACC_ARCH_ARM)
1167 # if !defined(ACC_TARGET_FEATURE_NEON)
1168 # if defined(__ARM_NEON) && ((__ARM_NEON)+0)
1169 # define ACC_TARGET_FEATURE_NEON 1
1170 # elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0)
1171 # define ACC_TARGET_FEATURE_NEON 1
1172 # elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0)
1173 # define ACC_TARGET_FEATURE_NEON 1
1174 # endif
1175 # endif
1176 #elif (ACC_ARCH_ARM64)
1177 # if !defined(ACC_TARGET_FEATURE_NEON)
1178 # if 1
1179 # define ACC_TARGET_FEATURE_NEON 1
1180 # endif
1181 # endif
1182 #endif
1183 #if 0
1184 #elif !defined(__ACC_MM_OVERRIDE)
1185 #if (ACC_ARCH_I086)
1186 #if (UINT_MAX != ACC_0xffffL)
1187 # error "unexpected configuration - check your compiler defines"
1188 #endif
1189 #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
1190 # define ACC_MM_TINY 1
1191 #elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
1192 # define ACC_MM_HUGE 1
1193 #elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
1194 # define ACC_MM_SMALL 1
1195 #elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
1196 # define ACC_MM_MEDIUM 1
1197 #elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
1198 # define ACC_MM_COMPACT 1
1199 #elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
1200 # define ACC_MM_LARGE 1
1201 #elif (ACC_CC_AZTECC)
1202 # if defined(_LARGE_CODE) && defined(_LARGE_DATA)
1203 # define ACC_MM_LARGE 1
1204 # elif defined(_LARGE_CODE)
1205 # define ACC_MM_MEDIUM 1
1206 # elif defined(_LARGE_DATA)
1207 # define ACC_MM_COMPACT 1
1208 # else
1209 # define ACC_MM_SMALL 1
1210 # endif
1211 #elif (ACC_CC_ZORTECHC && defined(__VCM__))
1212 # define ACC_MM_LARGE 1
1213 #else
1214 # error "unknown ACC_ARCH_I086 memory model"
1215 #endif
1216 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
1217 #define ACC_HAVE_MM_HUGE_PTR 1
1218 #define ACC_HAVE_MM_HUGE_ARRAY 1
1219 #if (ACC_MM_TINY)
1220 # undef ACC_HAVE_MM_HUGE_ARRAY
1221 #endif
1222 #if (ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_ZORTECHC)
1223 # undef ACC_HAVE_MM_HUGE_PTR
1224 # undef ACC_HAVE_MM_HUGE_ARRAY
1225 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
1226 # undef ACC_HAVE_MM_HUGE_ARRAY
1227 #elif (ACC_CC_MSC && defined(_QC))
1228 # undef ACC_HAVE_MM_HUGE_ARRAY
1229 # if (_MSC_VER < 600)
1230 # undef ACC_HAVE_MM_HUGE_PTR
1231 # endif
1232 #elif (ACC_CC_TURBOC && (__TURBOC__ < 0x0295))
1233 # undef ACC_HAVE_MM_HUGE_ARRAY
1234 #endif
1235 #if (ACC_ARCH_I086PM) && !(ACC_HAVE_MM_HUGE_PTR)
1236 # if (ACC_OS_DOS16)
1237 # error "unexpected configuration - check your compiler defines"
1238 # elif (ACC_CC_ZORTECHC)
1239 # else
1240 # error "unexpected configuration - check your compiler defines"
1241 # endif
1242 #endif
1243 #if defined(__cplusplus)
1244 extern "C" {
1245 #endif
1246 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
1247 extern void __near __cdecl _AHSHIFT(void);
1248 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1249 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
1250 extern void __near __cdecl _AHSHIFT(void);
1251 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1252 #elif (ACC_CC_MSC || ACC_CC_TOPSPEEDC)
1253 extern void __near __cdecl _AHSHIFT(void);
1254 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1255 #elif (ACC_CC_TURBOC && (__TURBOC__ >= 0x0295))
1256 extern void __near __cdecl _AHSHIFT(void);
1257 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1258 #elif ((ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_TURBOC) && ACC_OS_DOS16)
1259 # define ACC_MM_AHSHIFT 12
1260 #elif (ACC_CC_WATCOMC)
1261 extern unsigned char _HShift;
1262 # define ACC_MM_AHSHIFT ((unsigned) _HShift)
1263 #else
1264 # error "FIXME - implement ACC_MM_AHSHIFT"
1265 #endif
1266 #if defined(__cplusplus)
1268 #endif
1269 #endif
1270 #elif (ACC_ARCH_C166)
1271 #if !defined(__MODEL__)
1272 # error "FIXME - ACC_ARCH_C166 __MODEL__"
1273 #elif ((__MODEL__) == 0)
1274 # define ACC_MM_SMALL 1
1275 #elif ((__MODEL__) == 1)
1276 # define ACC_MM_SMALL 1
1277 #elif ((__MODEL__) == 2)
1278 # define ACC_MM_LARGE 1
1279 #elif ((__MODEL__) == 3)
1280 # define ACC_MM_TINY 1
1281 #elif ((__MODEL__) == 4)
1282 # define ACC_MM_XTINY 1
1283 #elif ((__MODEL__) == 5)
1284 # define ACC_MM_XSMALL 1
1285 #else
1286 # error "FIXME - ACC_ARCH_C166 __MODEL__"
1287 #endif
1288 #elif (ACC_ARCH_MCS251)
1289 #if !defined(__MODEL__)
1290 # error "FIXME - ACC_ARCH_MCS251 __MODEL__"
1291 #elif ((__MODEL__) == 0)
1292 # define ACC_MM_SMALL 1
1293 #elif ((__MODEL__) == 2)
1294 # define ACC_MM_LARGE 1
1295 #elif ((__MODEL__) == 3)
1296 # define ACC_MM_TINY 1
1297 #elif ((__MODEL__) == 4)
1298 # define ACC_MM_XTINY 1
1299 #elif ((__MODEL__) == 5)
1300 # define ACC_MM_XSMALL 1
1301 #else
1302 # error "FIXME - ACC_ARCH_MCS251 __MODEL__"
1303 #endif
1304 #elif (ACC_ARCH_MCS51)
1305 #if !defined(__MODEL__)
1306 # error "FIXME - ACC_ARCH_MCS51 __MODEL__"
1307 #elif ((__MODEL__) == 1)
1308 # define ACC_MM_SMALL 1
1309 #elif ((__MODEL__) == 2)
1310 # define ACC_MM_LARGE 1
1311 #elif ((__MODEL__) == 3)
1312 # define ACC_MM_TINY 1
1313 #elif ((__MODEL__) == 4)
1314 # define ACC_MM_XTINY 1
1315 #elif ((__MODEL__) == 5)
1316 # define ACC_MM_XSMALL 1
1317 #else
1318 # error "FIXME - ACC_ARCH_MCS51 __MODEL__"
1319 #endif
1320 #elif (ACC_ARCH_CRAY_PVP)
1321 # define ACC_MM_PVP 1
1322 #else
1323 # define ACC_MM_FLAT 1
1324 #endif
1325 #if (ACC_MM_COMPACT)
1326 # define ACC_INFO_MM "compact"
1327 #elif (ACC_MM_FLAT)
1328 # define ACC_INFO_MM "flat"
1329 #elif (ACC_MM_HUGE)
1330 # define ACC_INFO_MM "huge"
1331 #elif (ACC_MM_LARGE)
1332 # define ACC_INFO_MM "large"
1333 #elif (ACC_MM_MEDIUM)
1334 # define ACC_INFO_MM "medium"
1335 #elif (ACC_MM_PVP)
1336 # define ACC_INFO_MM "pvp"
1337 #elif (ACC_MM_SMALL)
1338 # define ACC_INFO_MM "small"
1339 #elif (ACC_MM_TINY)
1340 # define ACC_INFO_MM "tiny"
1341 #else
1342 # error "unknown memory model"
1343 #endif
1344 #endif
1345 #if !defined(__acc_gnuc_extension__)
1346 #if (ACC_CC_GNUC >= 0x020800ul)
1347 # define __acc_gnuc_extension__ __extension__
1348 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1349 # define __acc_gnuc_extension__ __extension__
1350 #elif (ACC_CC_IBMC >= 600)
1351 # define __acc_gnuc_extension__ __extension__
1352 #endif
1353 #endif
1354 #if !defined(__acc_gnuc_extension__)
1355 # define __acc_gnuc_extension__ /*empty*/
1356 #endif
1357 #if !defined(acc_has_builtin)
1358 #if (ACC_CC_CLANG) && defined(__has_builtin)
1359 # define acc_has_builtin __has_builtin
1360 #endif
1361 #endif
1362 #if !defined(acc_has_builtin)
1363 # define acc_has_builtin(x) 0
1364 #endif
1365 #if !defined(acc_has_attribute)
1366 #if (ACC_CC_CLANG) && defined(__has_attribute)
1367 # define acc_has_attribute __has_attribute
1368 #endif
1369 #endif
1370 #if !defined(acc_has_attribute)
1371 # define acc_has_attribute(x) 0
1372 #endif
1373 #if !defined(acc_has_declspec_attribute)
1374 #if (ACC_CC_CLANG) && defined(__has_declspec_attribute)
1375 # define acc_has_declspec_attribute __has_declspec_attribute
1376 #endif
1377 #endif
1378 #if !defined(acc_has_declspec_attribute)
1379 # define acc_has_declspec_attribute(x) 0
1380 #endif
1381 #if !defined(acc_has_feature)
1382 #if (ACC_CC_CLANG) && defined(__has_feature)
1383 # define acc_has_feature __has_feature
1384 #endif
1385 #endif
1386 #if !defined(acc_has_feature)
1387 # define acc_has_feature(x) 0
1388 #endif
1389 #if !defined(acc_has_extension)
1390 #if (ACC_CC_CLANG) && defined(__has_extension)
1391 # define acc_has_extension __has_extension
1392 #elif (ACC_CC_CLANG) && defined(__has_feature)
1393 # define acc_has_extension __has_feature
1394 #endif
1395 #endif
1396 #if !defined(acc_has_extension)
1397 # define acc_has_extension(x) 0
1398 #endif
1399 #if !defined(ACC_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0
1400 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
1401 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1402 # elif (ACC_CC_INTELC && (__INTEL_COMPILER < 1200))
1403 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1404 # else
1405 # define ACC_CFG_USE_NEW_STYLE_CASTS 1
1406 # endif
1407 #endif
1408 #if !defined(ACC_CFG_USE_NEW_STYLE_CASTS)
1409 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1410 #endif
1411 #if !defined(__cplusplus)
1412 # if defined(ACC_CFG_USE_NEW_STYLE_CASTS)
1413 # undef ACC_CFG_USE_NEW_STYLE_CASTS
1414 # endif
1415 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1416 #endif
1417 #if !defined(ACC_REINTERPRET_CAST)
1418 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1419 # define ACC_REINTERPRET_CAST(t,e) (reinterpret_cast<t> (e))
1420 # endif
1421 #endif
1422 #if !defined(ACC_REINTERPRET_CAST)
1423 # define ACC_REINTERPRET_CAST(t,e) ((t) (e))
1424 #endif
1425 #if !defined(ACC_STATIC_CAST)
1426 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1427 # define ACC_STATIC_CAST(t,e) (static_cast<t> (e))
1428 # endif
1429 #endif
1430 #if !defined(ACC_STATIC_CAST)
1431 # define ACC_STATIC_CAST(t,e) ((t) (e))
1432 #endif
1433 #if !defined(ACC_STATIC_CAST2)
1434 # define ACC_STATIC_CAST2(t1,t2,e) ACC_STATIC_CAST(t1, ACC_STATIC_CAST(t2, e))
1435 #endif
1436 #if !defined(ACC_UNCONST_CAST)
1437 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1438 # define ACC_UNCONST_CAST(t,e) (const_cast<t> (e))
1439 # elif (ACC_HAVE_MM_HUGE_PTR)
1440 # define ACC_UNCONST_CAST(t,e) ((t) (e))
1441 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1442 # define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((acc_uintptr_t) ((const void *) (e)))))
1443 # endif
1444 #endif
1445 #if !defined(ACC_UNCONST_CAST)
1446 # define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e))))
1447 #endif
1448 #if !defined(ACC_UNCONST_VOLATILE_CAST)
1449 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1450 # define ACC_UNCONST_VOLATILE_CAST(t,e) (const_cast<t> (e))
1451 # elif (ACC_HAVE_MM_HUGE_PTR)
1452 # define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) (e))
1453 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1454 # define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((acc_uintptr_t) ((volatile const void *) (e)))))
1455 # endif
1456 #endif
1457 #if !defined(ACC_UNCONST_VOLATILE_CAST)
1458 # define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e))))
1459 #endif
1460 #if !defined(ACC_UNVOLATILE_CAST)
1461 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1462 # define ACC_UNVOLATILE_CAST(t,e) (const_cast<t> (e))
1463 # elif (ACC_HAVE_MM_HUGE_PTR)
1464 # define ACC_UNVOLATILE_CAST(t,e) ((t) (e))
1465 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1466 # define ACC_UNVOLATILE_CAST(t,e) ((t) ((void *) ((acc_uintptr_t) ((volatile void *) (e)))))
1467 # endif
1468 #endif
1469 #if !defined(ACC_UNVOLATILE_CAST)
1470 # define ACC_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e))))
1471 #endif
1472 #if !defined(ACC_UNVOLATILE_CONST_CAST)
1473 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1474 # define ACC_UNVOLATILE_CONST_CAST(t,e) (const_cast<t> (e))
1475 # elif (ACC_HAVE_MM_HUGE_PTR)
1476 # define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) (e))
1477 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1478 # define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((acc_uintptr_t) ((volatile const void *) (e)))))
1479 # endif
1480 #endif
1481 #if !defined(ACC_UNVOLATILE_CONST_CAST)
1482 # define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e))))
1483 #endif
1484 #if !defined(ACC_PCAST)
1485 # if (ACC_HAVE_MM_HUGE_PTR)
1486 # define ACC_PCAST(t,e) ((t) (e))
1487 # endif
1488 #endif
1489 #if !defined(ACC_PCAST)
1490 # define ACC_PCAST(t,e) ACC_STATIC_CAST(t, ACC_STATIC_CAST(void *, e))
1491 #endif
1492 #if !defined(ACC_CCAST)
1493 # if (ACC_HAVE_MM_HUGE_PTR)
1494 # define ACC_CCAST(t,e) ((t) (e))
1495 # endif
1496 #endif
1497 #if !defined(ACC_CCAST)
1498 # define ACC_CCAST(t,e) ACC_STATIC_CAST(t, ACC_STATIC_CAST(const void *, e))
1499 #endif
1500 #if !defined(ACC_ICONV)
1501 # define ACC_ICONV(t,e) ACC_STATIC_CAST(t, e)
1502 #endif
1503 #if !defined(ACC_ICAST)
1504 # define ACC_ICAST(t,e) ACC_STATIC_CAST(t, e)
1505 #endif
1506 #if !defined(ACC_ITRUNC)
1507 # define ACC_ITRUNC(t,e) ACC_STATIC_CAST(t, e)
1508 #endif
1509 #if !defined(__acc_cte)
1510 # if (ACC_CC_MSC || ACC_CC_WATCOMC)
1511 # define __acc_cte(e) ((void)0,(e))
1512 # elif 1
1513 # define __acc_cte(e) ((void)0,(e))
1514 # endif
1515 #endif
1516 #if !defined(__acc_cte)
1517 # define __acc_cte(e) (e)
1518 #endif
1519 #if !defined(ACC_BLOCK_BEGIN)
1520 # define ACC_BLOCK_BEGIN do {
1521 # define ACC_BLOCK_END } while __acc_cte(0)
1522 #endif
1523 #if !defined(ACC_UNUSED)
1524 # if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
1525 # define ACC_UNUSED(var) ((void) &var)
1526 # elif (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PELLESC || ACC_CC_TURBOC)
1527 # define ACC_UNUSED(var) if (&var) ; else
1528 # elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030200ul))
1529 # define ACC_UNUSED(var) ((void) &var)
1530 # elif (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1531 # define ACC_UNUSED(var) ((void) var)
1532 # elif (ACC_CC_MSC && (_MSC_VER < 900))
1533 # define ACC_UNUSED(var) if (&var) ; else
1534 # elif (ACC_CC_KEILC)
1535 # define ACC_UNUSED(var) {extern int acc_unused__[1-2*!(sizeof(var)>0)]; (void)acc_unused__;}
1536 # elif (ACC_CC_PACIFICC)
1537 # define ACC_UNUSED(var) ((void) sizeof(var))
1538 # elif (ACC_CC_WATCOMC) && defined(__cplusplus)
1539 # define ACC_UNUSED(var) ((void) var)
1540 # else
1541 # define ACC_UNUSED(var) ((void) &var)
1542 # endif
1543 #endif
1544 #if !defined(ACC_UNUSED_RESULT)
1545 # define ACC_UNUSED_RESULT(var) ACC_UNUSED(var)
1546 #endif
1547 #if !defined(ACC_UNUSED_FUNC)
1548 # if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
1549 # define ACC_UNUSED_FUNC(func) ((void) func)
1550 # elif (ACC_CC_BORLANDC || ACC_CC_NDPC || ACC_CC_TURBOC)
1551 # define ACC_UNUSED_FUNC(func) if (func) ; else
1552 # elif (ACC_CC_CLANG || ACC_CC_LLVM)
1553 # define ACC_UNUSED_FUNC(func) ((void) &func)
1554 # elif (ACC_CC_MSC && (_MSC_VER < 900))
1555 # define ACC_UNUSED_FUNC(func) if (func) ; else
1556 # elif (ACC_CC_MSC)
1557 # define ACC_UNUSED_FUNC(func) ((void) &func)
1558 # elif (ACC_CC_KEILC || ACC_CC_PELLESC)
1559 # define ACC_UNUSED_FUNC(func) {extern int acc_unused__[1-2*!(sizeof((int)func)>0)]; (void)acc_unused__;}
1560 # else
1561 # define ACC_UNUSED_FUNC(func) ((void) func)
1562 # endif
1563 #endif
1564 #if !defined(ACC_UNUSED_LABEL)
1565 # if (ACC_CC_CLANG >= 0x020800ul)
1566 # define ACC_UNUSED_LABEL(l) (__acc_gnuc_extension__ ((void) ((const void *) &&l)))
1567 # elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_INTELC || ACC_CC_WATCOMC)
1568 # define ACC_UNUSED_LABEL(l) if __acc_cte(0) goto l
1569 # else
1570 # define ACC_UNUSED_LABEL(l) switch (0) case 1:goto l
1571 # endif
1572 #endif
1573 #if !defined(ACC_DEFINE_UNINITIALIZED_VAR)
1574 # if 0
1575 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var
1576 # elif 0 && (ACC_CC_GNUC)
1577 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var
1578 # else
1579 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
1580 # endif
1581 #endif
1582 #if !defined(__acc_inline)
1583 #if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
1584 #elif defined(__cplusplus)
1585 # define __acc_inline inline
1586 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
1587 # define __acc_inline inline
1588 #elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
1589 # define __acc_inline __inline
1590 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
1591 # define __acc_inline __inline__
1592 #elif (ACC_CC_DMC)
1593 # define __acc_inline __inline
1594 #elif (ACC_CC_GHS)
1595 # define __acc_inline __inline__
1596 #elif (ACC_CC_IBMC >= 600)
1597 # define __acc_inline __inline__
1598 #elif (ACC_CC_INTELC)
1599 # define __acc_inline __inline
1600 #elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x2405))
1601 # define __acc_inline __inline
1602 #elif (ACC_CC_MSC && (_MSC_VER >= 900))
1603 # define __acc_inline __inline
1604 #elif (ACC_CC_SUNPROC >= 0x5100)
1605 # define __acc_inline __inline__
1606 #endif
1607 #endif
1608 #if defined(__acc_inline)
1609 # ifndef __acc_HAVE_inline
1610 # define __acc_HAVE_inline 1
1611 # endif
1612 #else
1613 # define __acc_inline /*empty*/
1614 #endif
1615 #if !defined(__acc_forceinline)
1616 #if (ACC_CC_GNUC >= 0x030200ul)
1617 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1618 #elif (ACC_CC_IBMC >= 700)
1619 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1620 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
1621 # define __acc_forceinline __forceinline
1622 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1623 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1624 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1625 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1626 #elif (ACC_CC_MSC && (_MSC_VER >= 1200))
1627 # define __acc_forceinline __forceinline
1628 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1629 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1630 #elif (ACC_CC_SUNPROC >= 0x5100)
1631 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1632 #endif
1633 #endif
1634 #if defined(__acc_forceinline)
1635 # ifndef __acc_HAVE_forceinline
1636 # define __acc_HAVE_forceinline 1
1637 # endif
1638 #else
1639 # define __acc_forceinline __acc_inline
1640 #endif
1641 #if !defined(__acc_noinline)
1642 #if 1 && (ACC_ARCH_I386) && (ACC_CC_GNUC >= 0x040000ul) && (ACC_CC_GNUC < 0x040003ul)
1643 # define __acc_noinline __attribute__((__noinline__,__used__))
1644 #elif (ACC_CC_GNUC >= 0x030200ul)
1645 # define __acc_noinline __attribute__((__noinline__))
1646 #elif (ACC_CC_IBMC >= 700)
1647 # define __acc_noinline __attribute__((__noinline__))
1648 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
1649 # define __acc_noinline __declspec(noinline)
1650 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1651 # define __acc_noinline __attribute__((__noinline__))
1652 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1653 # define __acc_noinline __attribute__((__noinline__))
1654 #elif (ACC_CC_MSC && (_MSC_VER >= 1300))
1655 # define __acc_noinline __declspec(noinline)
1656 #elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3200) && (ACC_OS_WIN32 || ACC_OS_WIN64))
1657 # if defined(__cplusplus)
1658 # else
1659 # define __acc_noinline __declspec(noinline)
1660 # endif
1661 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1662 # define __acc_noinline __attribute__((__noinline__))
1663 #elif (ACC_CC_SUNPROC >= 0x5100)
1664 # define __acc_noinline __attribute__((__noinline__))
1665 #endif
1666 #endif
1667 #if defined(__acc_noinline)
1668 # ifndef __acc_HAVE_noinline
1669 # define __acc_HAVE_noinline 1
1670 # endif
1671 #else
1672 # define __acc_noinline /*empty*/
1673 #endif
1674 #if (__acc_HAVE_forceinline || __acc_HAVE_noinline) && !(__acc_HAVE_inline)
1675 # error "unexpected configuration - check your compiler defines"
1676 #endif
1677 #if !defined(__acc_static_inline)
1678 #if (ACC_CC_IBMC)
1679 # define __acc_static_inline __acc_gnuc_extension__ static __acc_inline
1680 #endif
1681 #endif
1682 #if !defined(__acc_static_inline)
1683 # define __acc_static_inline static __acc_inline
1684 #endif
1685 #if !defined(__acc_static_forceinline)
1686 #if (ACC_CC_IBMC)
1687 # define __acc_static_forceinline __acc_gnuc_extension__ static __acc_forceinline
1688 #endif
1689 #endif
1690 #if !defined(__acc_static_forceinline)
1691 # define __acc_static_forceinline static __acc_forceinline
1692 #endif
1693 #if !defined(__acc_static_noinline)
1694 #if (ACC_CC_IBMC)
1695 # define __acc_static_noinline __acc_gnuc_extension__ static __acc_noinline
1696 #endif
1697 #endif
1698 #if !defined(__acc_static_noinline)
1699 # define __acc_static_noinline static __acc_noinline
1700 #endif
1701 #if !defined(__acc_c99_extern_inline)
1702 #if defined(__GNUC_GNU_INLINE__)
1703 # define __acc_c99_extern_inline __acc_inline
1704 #elif defined(__GNUC_STDC_INLINE__)
1705 # define __acc_c99_extern_inline extern __acc_inline
1706 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
1707 # define __acc_c99_extern_inline extern __acc_inline
1708 #endif
1709 #if !defined(__acc_c99_extern_inline) && (__acc_HAVE_inline)
1710 # define __acc_c99_extern_inline __acc_inline
1711 #endif
1712 #endif
1713 #if defined(__acc_c99_extern_inline)
1714 # ifndef __acc_HAVE_c99_extern_inline
1715 # define __acc_HAVE_c99_extern_inline 1
1716 # endif
1717 #else
1718 # define __acc_c99_extern_inline /*empty*/
1719 #endif
1720 #if !defined(__acc_may_alias)
1721 #if (ACC_CC_GNUC >= 0x030400ul)
1722 # define __acc_may_alias __attribute__((__may_alias__))
1723 #elif (ACC_CC_CLANG >= 0x020900ul)
1724 # define __acc_may_alias __attribute__((__may_alias__))
1725 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0
1726 # define __acc_may_alias __attribute__((__may_alias__))
1727 #elif (ACC_CC_PGI >= 0x0d0a00ul) && 0
1728 # define __acc_may_alias __attribute__((__may_alias__))
1729 #endif
1730 #endif
1731 #if defined(__acc_may_alias)
1732 # ifndef __acc_HAVE_may_alias
1733 # define __acc_HAVE_may_alias 1
1734 # endif
1735 #else
1736 # define __acc_may_alias /*empty*/
1737 #endif
1738 #if !defined(__acc_noreturn)
1739 #if (ACC_CC_GNUC >= 0x020700ul)
1740 # define __acc_noreturn __attribute__((__noreturn__))
1741 #elif (ACC_CC_IBMC >= 700)
1742 # define __acc_noreturn __attribute__((__noreturn__))
1743 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
1744 # define __acc_noreturn __declspec(noreturn)
1745 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
1746 # define __acc_noreturn __attribute__((__noreturn__))
1747 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1748 # define __acc_noreturn __attribute__((__noreturn__))
1749 #elif (ACC_CC_MSC && (_MSC_VER >= 1200))
1750 # define __acc_noreturn __declspec(noreturn)
1751 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1752 # define __acc_noreturn __attribute__((__noreturn__))
1753 #endif
1754 #endif
1755 #if defined(__acc_noreturn)
1756 # ifndef __acc_HAVE_noreturn
1757 # define __acc_HAVE_noreturn 1
1758 # endif
1759 #else
1760 # define __acc_noreturn /*empty*/
1761 #endif
1762 #if !defined(__acc_nothrow)
1763 #if (ACC_CC_GNUC >= 0x030300ul)
1764 # define __acc_nothrow __attribute__((__nothrow__))
1765 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus)
1766 # define __acc_nothrow __declspec(nothrow)
1767 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900))
1768 # define __acc_nothrow __attribute__((__nothrow__))
1769 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1770 # define __acc_nothrow __attribute__((__nothrow__))
1771 #elif (ACC_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
1772 # define __acc_nothrow __declspec(nothrow)
1773 #endif
1774 #endif
1775 #if defined(__acc_nothrow)
1776 # ifndef __acc_HAVE_nothrow
1777 # define __acc_HAVE_nothrow 1
1778 # endif
1779 #else
1780 # define __acc_nothrow /*empty*/
1781 #endif
1782 #if !defined(__acc_restrict)
1783 #if (ACC_CC_GNUC >= 0x030400ul)
1784 # define __acc_restrict __restrict__
1785 #elif (ACC_CC_IBMC >= 800) && !defined(__cplusplus)
1786 # define __acc_restrict __restrict__
1787 #elif (ACC_CC_IBMC >= 1210)
1788 # define __acc_restrict __restrict__
1789 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
1790 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
1791 # define __acc_restrict __restrict__
1792 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM)
1793 # define __acc_restrict __restrict__
1794 #elif (ACC_CC_MSC && (_MSC_VER >= 1400))
1795 # define __acc_restrict __restrict
1796 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1797 # define __acc_restrict __restrict__
1798 #endif
1799 #endif
1800 #if defined(__acc_restrict)
1801 # ifndef __acc_HAVE_restrict
1802 # define __acc_HAVE_restrict 1
1803 # endif
1804 #else
1805 # define __acc_restrict /*empty*/
1806 #endif
1807 #if !defined(__acc_alignof)
1808 #if (ACC_CC_ARMCC || ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
1809 # define __acc_alignof(e) __alignof__(e)
1810 #elif (ACC_CC_GHS) && !defined(__cplusplus)
1811 # define __acc_alignof(e) __alignof__(e)
1812 #elif (ACC_CC_IBMC >= 600)
1813 # define __acc_alignof(e) (__acc_gnuc_extension__ __alignof__(e))
1814 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700))
1815 # define __acc_alignof(e) __alignof__(e)
1816 #elif (ACC_CC_MSC && (_MSC_VER >= 1300))
1817 # define __acc_alignof(e) __alignof(e)
1818 #elif (ACC_CC_SUNPROC >= 0x5100)
1819 # define __acc_alignof(e) __alignof__(e)
1820 #endif
1821 #endif
1822 #if defined(__acc_alignof)
1823 # ifndef __acc_HAVE_alignof
1824 # define __acc_HAVE_alignof 1
1825 # endif
1826 #endif
1827 #if !defined(__acc_struct_packed)
1828 #if (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
1829 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
1830 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
1831 #elif (ACC_CC_PCC && (ACC_CC_PCC < 0x010100ul))
1832 #elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
1833 #elif (ACC_CC_GNUC >= 0x030400ul) && !(ACC_CC_PCC_GNUC) && (ACC_ARCH_AMD64 || ACC_ARCH_I386)
1834 # define __acc_struct_packed(s) struct s {
1835 # define __acc_struct_packed_end() } __attribute__((__gcc_struct__,__packed__));
1836 # define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__gcc_struct__,__packed__));
1837 #elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || (ACC_CC_PGI >= 0x0d0a00ul) || (ACC_CC_SUNPROC >= 0x5100))
1838 # define __acc_struct_packed(s) struct s {
1839 # define __acc_struct_packed_end() } __attribute__((__packed__));
1840 # define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__packed__));
1841 #elif (ACC_CC_IBMC >= 700)
1842 # define __acc_struct_packed(s) __acc_gnuc_extension__ struct s {
1843 # define __acc_struct_packed_end() } __attribute__((__packed__));
1844 # define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__packed__));
1845 #elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300))
1846 # define __acc_struct_packed(s) __pragma(pack(push,1)) struct s {
1847 # define __acc_struct_packed_end() } __pragma(pack(pop));
1848 #elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 900))
1849 # define __acc_struct_packed(s) _Packed struct s {
1850 # define __acc_struct_packed_end() };
1851 #endif
1852 #endif
1853 #if defined(__acc_struct_packed) && !defined(__acc_struct_packed_ma)
1854 # define __acc_struct_packed_ma(s) __acc_struct_packed(s)
1855 #endif
1856 #if defined(__acc_struct_packed_end) && !defined(__acc_struct_packed_ma_end)
1857 # define __acc_struct_packed_ma_end() __acc_struct_packed_end()
1858 #endif
1859 #if !defined(__acc_byte_struct)
1860 #if defined(__acc_struct_packed)
1861 # define __acc_byte_struct(s,n) __acc_struct_packed(s) unsigned char a[n]; __acc_struct_packed_end()
1862 # define __acc_byte_struct_ma(s,n) __acc_struct_packed_ma(s) unsigned char a[n]; __acc_struct_packed_ma_end()
1863 #elif (ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_PGI || (ACC_CC_SUNPROC >= 0x5100))
1864 # define __acc_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__));
1865 # define __acc_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __acc_may_alias __attribute__((__packed__));
1866 #endif
1867 #endif
1868 #if defined(__acc_byte_struct) && !defined(__acc_byte_struct_ma)
1869 # define __acc_byte_struct_ma(s,n) __acc_byte_struct(s,n)
1870 #endif
1871 #if !defined(__acc_struct_align16) && (__acc_HAVE_alignof)
1872 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x030000ul))
1873 #elif (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
1874 #elif (ACC_CC_CILLY || ACC_CC_PCC)
1875 #elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300))
1876 # define __acc_struct_align16(s) struct __declspec(align(16)) s {
1877 # define __acc_struct_align16_end() };
1878 # define __acc_struct_align32(s) struct __declspec(align(32)) s {
1879 # define __acc_struct_align32_end() };
1880 # define __acc_struct_align64(s) struct __declspec(align(64)) s {
1881 # define __acc_struct_align64_end() };
1882 #elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_GNUC || (ACC_CC_IBMC >= 700) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1883 # define __acc_struct_align16(s) struct s {
1884 # define __acc_struct_align16_end() } __attribute__((__aligned__(16)));
1885 # define __acc_struct_align32(s) struct s {
1886 # define __acc_struct_align32_end() } __attribute__((__aligned__(32)));
1887 # define __acc_struct_align64(s) struct s {
1888 # define __acc_struct_align64_end() } __attribute__((__aligned__(64)));
1889 #endif
1890 #endif
1891 #if !defined(__acc_union_um)
1892 #if (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
1893 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
1894 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
1895 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER < 810))
1896 #elif (ACC_CC_PCC && (ACC_CC_PCC < 0x010100ul))
1897 #elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
1898 #elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || (ACC_CC_PGI >= 0x0d0a00ul) || (ACC_CC_SUNPROC >= 0x5100))
1899 # define __acc_union_am(s) union s {
1900 # define __acc_union_am_end() } __acc_may_alias;
1901 # define __acc_union_um(s) union s {
1902 # define __acc_union_um_end() } __acc_may_alias __attribute__((__packed__));
1903 #elif (ACC_CC_IBMC >= 700)
1904 # define __acc_union_am(s) __acc_gnuc_extension__ union s {
1905 # define __acc_union_am_end() } __acc_may_alias;
1906 # define __acc_union_um(s) __acc_gnuc_extension__ union s {
1907 # define __acc_union_um_end() } __acc_may_alias __attribute__((__packed__));
1908 #elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300))
1909 # define __acc_union_um(s) __pragma(pack(push,1)) union s {
1910 # define __acc_union_um_end() } __pragma(pack(pop));
1911 #elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 900))
1912 # define __acc_union_um(s) _Packed union s {
1913 # define __acc_union_um_end() };
1914 #endif
1915 #endif
1916 #if !defined(__acc_union_am)
1917 # define __acc_union_am(s) union s {
1918 # define __acc_union_am_end() };
1919 #endif
1920 #if !defined(__acc_constructor)
1921 #if (ACC_CC_GNUC >= 0x030400ul)
1922 # define __acc_constructor __attribute__((__constructor__,__used__))
1923 #elif (ACC_CC_GNUC >= 0x020700ul)
1924 # define __acc_constructor __attribute__((__constructor__))
1925 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1926 # define __acc_constructor __attribute__((__constructor__,__used__))
1927 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1928 # define __acc_constructor __attribute__((__constructor__))
1929 #endif
1930 #endif
1931 #if defined(__acc_constructor)
1932 # ifndef __acc_HAVE_constructor
1933 # define __acc_HAVE_constructor 1
1934 # endif
1935 #endif
1936 #if !defined(__acc_destructor)
1937 #if (ACC_CC_GNUC >= 0x030400ul)
1938 # define __acc_destructor __attribute__((__destructor__,__used__))
1939 #elif (ACC_CC_GNUC >= 0x020700ul)
1940 # define __acc_destructor __attribute__((__destructor__))
1941 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1942 # define __acc_destructor __attribute__((__destructor__,__used__))
1943 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1944 # define __acc_destructor __attribute__((__destructor__))
1945 #endif
1946 #endif
1947 #if defined(__acc_destructor)
1948 # ifndef __acc_HAVE_destructor
1949 # define __acc_HAVE_destructor 1
1950 # endif
1951 #endif
1952 #if (__acc_HAVE_destructor) && !(__acc_HAVE_constructor)
1953 # error "unexpected configuration - check your compiler defines"
1954 #endif
1955 #if !defined(__acc_likely) && !defined(__acc_unlikely)
1956 #if (ACC_CC_GNUC >= 0x030200ul)
1957 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1958 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1959 #elif (ACC_CC_IBMC >= 1010)
1960 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1961 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1962 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800))
1963 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1964 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1965 #elif (ACC_CC_CLANG && ACC_CC_CLANG_C2)
1966 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1967 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1968 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1969 #endif
1970 #endif
1971 #if defined(__acc_likely)
1972 # ifndef __acc_HAVE_likely
1973 # define __acc_HAVE_likely 1
1974 # endif
1975 #else
1976 # define __acc_likely(e) (e)
1977 #endif
1978 #if defined(__acc_very_likely)
1979 # ifndef __acc_HAVE_very_likely
1980 # define __acc_HAVE_very_likely 1
1981 # endif
1982 #else
1983 # define __acc_very_likely(e) __acc_likely(e)
1984 #endif
1985 #if defined(__acc_unlikely)
1986 # ifndef __acc_HAVE_unlikely
1987 # define __acc_HAVE_unlikely 1
1988 # endif
1989 #else
1990 # define __acc_unlikely(e) (e)
1991 #endif
1992 #if defined(__acc_very_unlikely)
1993 # ifndef __acc_HAVE_very_unlikely
1994 # define __acc_HAVE_very_unlikely 1
1995 # endif
1996 #else
1997 # define __acc_very_unlikely(e) __acc_unlikely(e)
1998 #endif
1999 #if !defined(__acc_loop_forever)
2000 # if (ACC_CC_IBMC)
2001 # define __acc_loop_forever() ACC_BLOCK_BEGIN for (;;) { ; } ACC_BLOCK_END
2002 # else
2003 # define __acc_loop_forever() do { ; } while __acc_cte(1)
2004 # endif
2005 #endif
2006 #if !defined(__acc_unreachable)
2007 #if (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x020800ul)) && acc_has_builtin(__builtin_unreachable)
2008 # define __acc_unreachable() __builtin_unreachable();
2009 #elif (ACC_CC_GNUC >= 0x040500ul)
2010 # define __acc_unreachable() __builtin_unreachable();
2011 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1
2012 # define __acc_unreachable() __builtin_unreachable();
2013 #endif
2014 #endif
2015 #if defined(__acc_unreachable)
2016 # ifndef __acc_HAVE_unreachable
2017 # define __acc_HAVE_unreachable 1
2018 # endif
2019 #else
2020 # if 0
2021 # define __acc_unreachable() ((void)0);
2022 # else
2023 # define __acc_unreachable() __acc_loop_forever();
2024 # endif
2025 #endif
2026 #if !defined(acc_unused_funcs_impl)
2027 # if 1 && (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020700ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
2028 # define acc_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f
2029 # elif 1 && (ACC_CC_BORLANDC || ACC_CC_GNUC)
2030 # define acc_unused_funcs_impl(r,f) static r f
2031 # else
2032 # define acc_unused_funcs_impl(r,f) __acc_static_forceinline r f
2033 # endif
2034 #endif
2035 #ifndef __ACC_CTA_NAME
2036 #if (ACC_CFG_USE_COUNTER)
2037 # define __ACC_CTA_NAME(a) ACC_PP_ECONCAT2(a,__COUNTER__)
2038 #else
2039 # define __ACC_CTA_NAME(a) ACC_PP_ECONCAT2(a,__LINE__)
2040 #endif
2041 #endif
2042 #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
2043 # if (ACC_CC_AZTECC || ACC_CC_ZORTECHC)
2044 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-!(e)]; ACC_EXTERN_C_END
2045 # elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
2046 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1u-2*!(e)]; ACC_EXTERN_C_END
2047 # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
2048 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-!(e)]; ACC_EXTERN_C_END
2049 # elif (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020900ul)) && defined(__cplusplus)
2050 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN int __ACC_CTA_NAME(acc_cta_f__)(int [1-2*!(e)]); ACC_EXTERN_C_END
2051 # elif (ACC_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
2052 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN enum {__ACC_CTA_NAME(acc_cta_e__)=1/!!(e)} __attribute__((__unused__)); ACC_EXTERN_C_END
2053 # else
2054 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-2*!(e)]; ACC_EXTERN_C_END
2055 # endif
2056 #endif
2057 #if !defined(ACC_COMPILE_TIME_ASSERT)
2058 # if (ACC_CC_AZTECC)
2059 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-!(e)];}
2060 # elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030000ul))
2061 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
2062 # elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
2063 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
2064 # elif (ACC_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
2065 # define ACC_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));}
2066 # elif (ACC_CC_GNUC >= 0x040700ul) && (ACC_CFG_USE_COUNTER) && defined(__cplusplus)
2067 # define ACC_COMPILE_TIME_ASSERT(e) {enum {__ACC_CTA_NAME(acc_cta_e__)=1/!!(e)} __attribute__((__unused__));}
2068 # elif (ACC_CC_GNUC >= 0x040700ul)
2069 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
2070 # elif (ACC_CC_MSC && (_MSC_VER < 900))
2071 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
2072 # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
2073 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
2074 # else
2075 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)];}
2076 # endif
2077 #endif
2078 #if (ACC_LANG_ASSEMBLER)
2079 # undef ACC_COMPILE_TIME_ASSERT_HEADER
2080 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) /*empty*/
2081 #else
2082 ACC_COMPILE_TIME_ASSERT_HEADER(1 == 1)
2083 #if defined(__cplusplus)
2084 extern "C" { ACC_COMPILE_TIME_ASSERT_HEADER(2 == 2) }
2085 #endif
2086 ACC_COMPILE_TIME_ASSERT_HEADER(3 == 3)
2087 #endif
2088 #if (ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
2089 # if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC)
2090 # elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
2091 # define __acc_cdecl __cdecl
2092 # define __acc_cdecl_atexit /*empty*/
2093 # define __acc_cdecl_main __cdecl
2094 # if (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
2095 # define __acc_cdecl_qsort __pascal
2096 # elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
2097 # define __acc_cdecl_qsort _stdcall
2098 # else
2099 # define __acc_cdecl_qsort __cdecl
2100 # endif
2101 # elif (ACC_CC_WATCOMC)
2102 # define __acc_cdecl __cdecl
2103 # else
2104 # define __acc_cdecl __cdecl
2105 # define __acc_cdecl_atexit __cdecl
2106 # define __acc_cdecl_main __cdecl
2107 # define __acc_cdecl_qsort __cdecl
2108 # endif
2109 # if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC || ACC_CC_WATCOMC)
2110 # elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
2111 # define __acc_cdecl_sighandler __pascal
2112 # elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
2113 # define __acc_cdecl_sighandler _stdcall
2114 # elif (ACC_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
2115 # define __acc_cdecl_sighandler __clrcall
2116 # elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
2117 # if defined(_DLL)
2118 # define __acc_cdecl_sighandler _far _cdecl _loadds
2119 # elif defined(_MT)
2120 # define __acc_cdecl_sighandler _far _cdecl
2121 # else
2122 # define __acc_cdecl_sighandler _cdecl
2123 # endif
2124 # else
2125 # define __acc_cdecl_sighandler __cdecl
2126 # endif
2127 #elif (ACC_ARCH_I386) && (ACC_CC_WATCOMC)
2128 # define __acc_cdecl __cdecl
2129 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
2130 # define __acc_cdecl cdecl
2131 #endif
2132 #if !defined(__acc_cdecl)
2133 # define __acc_cdecl /*empty*/
2134 #endif
2135 #if !defined(__acc_cdecl_atexit)
2136 # define __acc_cdecl_atexit /*empty*/
2137 #endif
2138 #if !defined(__acc_cdecl_main)
2139 # define __acc_cdecl_main /*empty*/
2140 #endif
2141 #if !defined(__acc_cdecl_qsort)
2142 # define __acc_cdecl_qsort /*empty*/
2143 #endif
2144 #if !defined(__acc_cdecl_sighandler)
2145 # define __acc_cdecl_sighandler /*empty*/
2146 #endif
2147 #if !defined(__acc_cdecl_va)
2148 # define __acc_cdecl_va __acc_cdecl
2149 #endif
2150 #if !(ACC_CFG_NO_WINDOWS_H)
2151 #if !defined(ACC_HAVE_WINDOWS_H)
2152 #if (ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)) || ACC_OS_WIN32 || ACC_OS_WIN64)
2153 # if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
2154 # elif ((ACC_OS_WIN32 && defined(__PW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x030000ul)))
2155 # elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul)))
2156 # else
2157 # define ACC_HAVE_WINDOWS_H 1
2158 # endif
2159 #endif
2160 #endif
2161 #endif
2162 #define ACC_SIZEOF_CHAR 1
2163 #ifndef ACC_SIZEOF_SHORT
2164 #if defined(SIZEOF_SHORT)
2165 # define ACC_SIZEOF_SHORT (SIZEOF_SHORT)
2166 #elif defined(__SIZEOF_SHORT__)
2167 # define ACC_SIZEOF_SHORT (__SIZEOF_SHORT__)
2168 #endif
2169 #endif
2170 #ifndef ACC_SIZEOF_INT
2171 #if defined(SIZEOF_INT)
2172 # define ACC_SIZEOF_INT (SIZEOF_INT)
2173 #elif defined(__SIZEOF_INT__)
2174 # define ACC_SIZEOF_INT (__SIZEOF_INT__)
2175 #endif
2176 #endif
2177 #ifndef ACC_SIZEOF_LONG
2178 #if defined(SIZEOF_LONG)
2179 # define ACC_SIZEOF_LONG (SIZEOF_LONG)
2180 #elif defined(__SIZEOF_LONG__)
2181 # define ACC_SIZEOF_LONG (__SIZEOF_LONG__)
2182 #endif
2183 #endif
2184 #ifndef ACC_SIZEOF_LONG_LONG
2185 #if defined(SIZEOF_LONG_LONG)
2186 # define ACC_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
2187 #elif defined(__SIZEOF_LONG_LONG__)
2188 # define ACC_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__)
2189 #endif
2190 #endif
2191 #ifndef ACC_SIZEOF___INT16
2192 #if defined(SIZEOF___INT16)
2193 # define ACC_SIZEOF___INT16 (SIZEOF___INT16)
2194 #endif
2195 #endif
2196 #ifndef ACC_SIZEOF___INT32
2197 #if defined(SIZEOF___INT32)
2198 # define ACC_SIZEOF___INT32 (SIZEOF___INT32)
2199 #endif
2200 #endif
2201 #ifndef ACC_SIZEOF___INT64
2202 #if defined(SIZEOF___INT64)
2203 # define ACC_SIZEOF___INT64 (SIZEOF___INT64)
2204 #endif
2205 #endif
2206 #ifndef ACC_SIZEOF_VOID_P
2207 #if defined(SIZEOF_VOID_P)
2208 # define ACC_SIZEOF_VOID_P (SIZEOF_VOID_P)
2209 #elif defined(__SIZEOF_POINTER__)
2210 # define ACC_SIZEOF_VOID_P (__SIZEOF_POINTER__)
2211 #endif
2212 #endif
2213 #ifndef ACC_SIZEOF_SIZE_T
2214 #if defined(SIZEOF_SIZE_T)
2215 # define ACC_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
2216 #elif defined(__SIZEOF_SIZE_T__)
2217 # define ACC_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__)
2218 #endif
2219 #endif
2220 #ifndef ACC_SIZEOF_PTRDIFF_T
2221 #if defined(SIZEOF_PTRDIFF_T)
2222 # define ACC_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
2223 #elif defined(__SIZEOF_PTRDIFF_T__)
2224 # define ACC_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__)
2225 #endif
2226 #endif
2227 #define __ACC_LSR(x,b) (((x)+0ul) >> (b))
2228 #if !defined(ACC_SIZEOF_SHORT)
2229 # if (ACC_ARCH_CRAY_PVP)
2230 # define ACC_SIZEOF_SHORT 8
2231 # elif (USHRT_MAX == ACC_0xffffL)
2232 # define ACC_SIZEOF_SHORT 2
2233 # elif (__ACC_LSR(USHRT_MAX,7) == 1)
2234 # define ACC_SIZEOF_SHORT 1
2235 # elif (__ACC_LSR(USHRT_MAX,15) == 1)
2236 # define ACC_SIZEOF_SHORT 2
2237 # elif (__ACC_LSR(USHRT_MAX,31) == 1)
2238 # define ACC_SIZEOF_SHORT 4
2239 # elif (__ACC_LSR(USHRT_MAX,63) == 1)
2240 # define ACC_SIZEOF_SHORT 8
2241 # elif (__ACC_LSR(USHRT_MAX,127) == 1)
2242 # define ACC_SIZEOF_SHORT 16
2243 # else
2244 # error "ACC_SIZEOF_SHORT"
2245 # endif
2246 #endif
2247 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_SHORT == sizeof(short))
2248 #if !defined(ACC_SIZEOF_INT)
2249 # if (ACC_ARCH_CRAY_PVP)
2250 # define ACC_SIZEOF_INT 8
2251 # elif (UINT_MAX == ACC_0xffffL)
2252 # define ACC_SIZEOF_INT 2
2253 # elif (UINT_MAX == ACC_0xffffffffL)
2254 # define ACC_SIZEOF_INT 4
2255 # elif (__ACC_LSR(UINT_MAX,7) == 1)
2256 # define ACC_SIZEOF_INT 1
2257 # elif (__ACC_LSR(UINT_MAX,15) == 1)
2258 # define ACC_SIZEOF_INT 2
2259 # elif (__ACC_LSR(UINT_MAX,31) == 1)
2260 # define ACC_SIZEOF_INT 4
2261 # elif (__ACC_LSR(UINT_MAX,63) == 1)
2262 # define ACC_SIZEOF_INT 8
2263 # elif (__ACC_LSR(UINT_MAX,127) == 1)
2264 # define ACC_SIZEOF_INT 16
2265 # else
2266 # error "ACC_SIZEOF_INT"
2267 # endif
2268 #endif
2269 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_INT == sizeof(int))
2270 #if !defined(ACC_SIZEOF_LONG)
2271 # if (ULONG_MAX == ACC_0xffffffffL)
2272 # define ACC_SIZEOF_LONG 4
2273 # elif (__ACC_LSR(ULONG_MAX,7) == 1)
2274 # define ACC_SIZEOF_LONG 1
2275 # elif (__ACC_LSR(ULONG_MAX,15) == 1)
2276 # define ACC_SIZEOF_LONG 2
2277 # elif (__ACC_LSR(ULONG_MAX,31) == 1)
2278 # define ACC_SIZEOF_LONG 4
2279 # elif (__ACC_LSR(ULONG_MAX,39) == 1)
2280 # define ACC_SIZEOF_LONG 5
2281 # elif (__ACC_LSR(ULONG_MAX,63) == 1)
2282 # define ACC_SIZEOF_LONG 8
2283 # elif (__ACC_LSR(ULONG_MAX,127) == 1)
2284 # define ACC_SIZEOF_LONG 16
2285 # else
2286 # error "ACC_SIZEOF_LONG"
2287 # endif
2288 #endif
2289 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_LONG == sizeof(long))
2290 #if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
2291 #if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
2292 # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
2293 # if (ACC_CC_GNUC >= 0x030300ul)
2294 # if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0))
2295 # define ACC_SIZEOF_LONG_LONG ACC_SIZEOF_LONG
2296 # elif (__ACC_LSR(__LONG_LONG_MAX__,30) == 1)
2297 # define ACC_SIZEOF_LONG_LONG 4
2298 # endif
2299 # endif
2300 # endif
2301 #endif
2302 #endif
2303 #if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
2304 #if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
2305 #if (ACC_ARCH_I086 && ACC_CC_DMC)
2306 #elif (ACC_CC_CILLY) && defined(__GNUC__)
2307 # define ACC_SIZEOF_LONG_LONG 8
2308 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
2309 # define ACC_SIZEOF_LONG_LONG 8
2310 #elif ((ACC_OS_WIN32 || ACC_OS_WIN64 || defined(_WIN32)) && ACC_CC_MSC && (_MSC_VER >= 1400))
2311 # define ACC_SIZEOF_LONG_LONG 8
2312 #elif (ACC_OS_WIN64 || defined(_WIN64))
2313 # define ACC_SIZEOF___INT64 8
2314 #elif (ACC_ARCH_I386 && (ACC_CC_DMC))
2315 # define ACC_SIZEOF_LONG_LONG 8
2316 #elif (ACC_ARCH_I386 && (ACC_CC_SYMANTECC && (__SC__ >= 0x700)))
2317 # define ACC_SIZEOF_LONG_LONG 8
2318 #elif (ACC_ARCH_I386 && (ACC_CC_INTELC && defined(__linux__)))
2319 # define ACC_SIZEOF_LONG_LONG 8
2320 #elif (ACC_ARCH_I386 && (ACC_CC_MWERKS || ACC_CC_PELLESC || ACC_CC_PGI || ACC_CC_SUNPROC))
2321 # define ACC_SIZEOF_LONG_LONG 8
2322 #elif (ACC_ARCH_I386 && (ACC_CC_INTELC || ACC_CC_MSC))
2323 # define ACC_SIZEOF___INT64 8
2324 #elif ((ACC_OS_WIN32 || defined(_WIN32)) && (ACC_CC_MSC))
2325 # define ACC_SIZEOF___INT64 8
2326 #elif (ACC_ARCH_I386 && (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
2327 # define ACC_SIZEOF___INT64 8
2328 #elif (ACC_ARCH_I386 && (ACC_CC_WATCOMC && (__WATCOMC__ >= 1100)))
2329 # define ACC_SIZEOF___INT64 8
2330 #elif (ACC_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64))
2331 # define ACC_SIZEOF_LONG_LONG 8
2332 #elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64))
2333 # define ACC_SIZEOF___INT64 8
2334 #elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
2335 # define ACC_SIZEOF_LONG_LONG 8
2336 #elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64)
2337 # define ACC_SIZEOF_LONG_LONG 8
2338 #elif (ACC_CC_SDCC) && (ACC_SIZEOF_INT == 2)
2339 #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
2340 # define ACC_SIZEOF_LONG_LONG 8
2341 #endif
2342 #endif
2343 #endif
2344 #if defined(__cplusplus) && (ACC_CC_GNUC)
2345 # if (ACC_CC_GNUC < 0x020800ul)
2346 # undef ACC_SIZEOF_LONG_LONG
2347 # endif
2348 #endif
2349 #if (ACC_CFG_NO_LONG_LONG)
2350 # undef ACC_SIZEOF_LONG_LONG
2351 #elif defined(__NO_LONG_LONG)
2352 # undef ACC_SIZEOF_LONG_LONG
2353 #elif defined(_NO_LONGLONG)
2354 # undef ACC_SIZEOF_LONG_LONG
2355 #endif
2356 #if !defined(ACC_WORDSIZE)
2357 #if (ACC_ARCH_ALPHA)
2358 # define ACC_WORDSIZE 8
2359 #elif (ACC_ARCH_AMD64)
2360 # define ACC_WORDSIZE 8
2361 #elif (ACC_ARCH_ARM64)
2362 # define ACC_WORDSIZE 8
2363 #elif (ACC_ARCH_AVR)
2364 # define ACC_WORDSIZE 1
2365 #elif (ACC_ARCH_H8300)
2366 # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
2367 # define ACC_WORDSIZE 4
2368 # else
2369 # define ACC_WORDSIZE 2
2370 # endif
2371 #elif (ACC_ARCH_I086)
2372 # define ACC_WORDSIZE 2
2373 #elif (ACC_ARCH_IA64)
2374 # define ACC_WORDSIZE 8
2375 #elif (ACC_ARCH_M16C)
2376 # define ACC_WORDSIZE 2
2377 #elif (ACC_ARCH_SPU)
2378 # define ACC_WORDSIZE 4
2379 #elif (ACC_ARCH_Z80)
2380 # define ACC_WORDSIZE 1
2381 #elif (ACC_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
2382 # define ACC_WORDSIZE 8
2383 #elif (ACC_OS_OS400 || defined(__OS400__))
2384 # define ACC_WORDSIZE 8
2385 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
2386 # define ACC_WORDSIZE 8
2387 #endif
2388 #endif
2389 #if !defined(ACC_SIZEOF_VOID_P)
2390 #if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32)
2391 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4)
2392 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
2393 # define ACC_SIZEOF_VOID_P 4
2394 #elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64)
2395 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8)
2396 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
2397 # define ACC_SIZEOF_VOID_P 8
2398 #elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
2399 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
2400 # define ACC_SIZEOF_VOID_P 8
2401 #elif defined(__LP64__) || defined(__LP64) || defined(_LP64)
2402 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
2403 # define ACC_SIZEOF_VOID_P 8
2404 #elif (ACC_ARCH_AVR)
2405 # define ACC_SIZEOF_VOID_P 2
2406 #elif (ACC_ARCH_C166 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251 || ACC_ARCH_MSP430)
2407 # define ACC_SIZEOF_VOID_P 2
2408 #elif (ACC_ARCH_H8300)
2409 # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
2410 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_WORDSIZE == 4)
2411 # if defined(__NORMAL_MODE__)
2412 # define ACC_SIZEOF_VOID_P 2
2413 # else
2414 # define ACC_SIZEOF_VOID_P 4
2415 # endif
2416 # else
2417 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_WORDSIZE == 2)
2418 # define ACC_SIZEOF_VOID_P 2
2419 # endif
2420 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x040000ul)) && (ACC_SIZEOF_INT == 4)
2421 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_INT
2422 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_INT
2423 # endif
2424 #elif (ACC_ARCH_I086)
2425 # if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
2426 # define ACC_SIZEOF_VOID_P 2
2427 # elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
2428 # define ACC_SIZEOF_VOID_P 4
2429 # else
2430 # error "invalid ACC_ARCH_I086 memory model"
2431 # endif
2432 #elif (ACC_ARCH_M16C)
2433 # if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
2434 # define ACC_SIZEOF_VOID_P 4
2435 # else
2436 # define ACC_SIZEOF_VOID_P 2
2437 # endif
2438 #elif (ACC_ARCH_SPU)
2439 # define ACC_SIZEOF_VOID_P 4
2440 #elif (ACC_ARCH_Z80)
2441 # define ACC_SIZEOF_VOID_P 2
2442 #elif (ACC_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
2443 # define ACC_SIZEOF_VOID_P 4
2444 #elif (ACC_OS_OS400 || defined(__OS400__))
2445 # if defined(__LLP64_IFC__)
2446 # define ACC_SIZEOF_VOID_P 8
2447 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
2448 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
2449 # else
2450 # define ACC_SIZEOF_VOID_P 16
2451 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
2452 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
2453 # endif
2454 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
2455 # define ACC_SIZEOF_VOID_P 8
2456 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
2457 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
2458 #endif
2459 #endif
2460 #if !defined(ACC_SIZEOF_VOID_P)
2461 # define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG
2462 #endif
2463 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_VOID_P == sizeof(void *))
2464 #if !defined(ACC_SIZEOF_SIZE_T)
2465 #if (ACC_ARCH_I086 || ACC_ARCH_M16C)
2466 # define ACC_SIZEOF_SIZE_T 2
2467 #endif
2468 #endif
2469 #if !defined(ACC_SIZEOF_SIZE_T)
2470 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_VOID_P
2471 #endif
2472 #if defined(offsetof)
2473 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_SIZE_T == sizeof(size_t))
2474 #endif
2475 #if !defined(ACC_SIZEOF_PTRDIFF_T)
2476 #if (ACC_ARCH_I086)
2477 # if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM || ACC_MM_HUGE)
2478 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_VOID_P
2479 # elif (ACC_MM_COMPACT || ACC_MM_LARGE)
2480 # if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
2481 # define ACC_SIZEOF_PTRDIFF_T 4
2482 # else
2483 # define ACC_SIZEOF_PTRDIFF_T 2
2484 # endif
2485 # else
2486 # error "invalid ACC_ARCH_I086 memory model"
2487 # endif
2488 #endif
2489 #endif
2490 #if !defined(ACC_SIZEOF_PTRDIFF_T)
2491 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_SIZE_T
2492 #endif
2493 #if defined(offsetof)
2494 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
2495 #endif
2496 #if !defined(ACC_WORDSIZE)
2497 # define ACC_WORDSIZE ACC_SIZEOF_VOID_P
2498 #endif
2499 #if (ACC_ABI_NEUTRAL_ENDIAN)
2500 # undef ACC_ABI_BIG_ENDIAN
2501 # undef ACC_ABI_LITTLE_ENDIAN
2502 #elif !(ACC_ABI_BIG_ENDIAN) && !(ACC_ABI_LITTLE_ENDIAN)
2503 #if (ACC_ARCH_ALPHA) && (ACC_ARCH_CRAY_MPP)
2504 # define ACC_ABI_BIG_ENDIAN 1
2505 #elif (ACC_ARCH_IA64) && (ACC_OS_POSIX_LINUX || ACC_OS_WIN64)
2506 # define ACC_ABI_LITTLE_ENDIAN 1
2507 #elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430 || ACC_ARCH_RISCV)
2508 # define ACC_ABI_LITTLE_ENDIAN 1
2509 #elif (ACC_ARCH_AVR32 || ACC_ARCH_M68K || ACC_ARCH_S390 || ACC_ARCH_SPU)
2510 # define ACC_ABI_BIG_ENDIAN 1
2511 #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
2512 # if (__LITTLE_ENDIAN__ == 1)
2513 # define ACC_ABI_LITTLE_ENDIAN 1
2514 # else
2515 # define ACC_ABI_BIG_ENDIAN 1
2516 # endif
2517 #elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
2518 # define ACC_ABI_BIG_ENDIAN 1
2519 #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
2520 # define ACC_ABI_LITTLE_ENDIAN 1
2521 #elif 1 && (ACC_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0)
2522 # define ACC_ABI_BIG_ENDIAN 1
2523 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
2524 # define ACC_ABI_BIG_ENDIAN 1
2525 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
2526 # define ACC_ABI_LITTLE_ENDIAN 1
2527 #elif 1 && (ACC_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32)
2528 # define ACC_ABI_LITTLE_ENDIAN 1
2529 #elif 1 && (ACC_ARCH_ARM && ACC_CC_ARMCC_ARMCC)
2530 # if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
2531 # error "unexpected configuration - check your compiler defines"
2532 # elif defined(__BIG_ENDIAN)
2533 # define ACC_ABI_BIG_ENDIAN 1
2534 # else
2535 # define ACC_ABI_LITTLE_ENDIAN 1
2536 # endif
2537 # define ACC_ABI_LITTLE_ENDIAN 1
2538 #elif 1 && (ACC_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0)
2539 # define ACC_ABI_BIG_ENDIAN 1
2540 #elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__)
2541 # define ACC_ABI_BIG_ENDIAN 1
2542 #elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__)
2543 # define ACC_ABI_LITTLE_ENDIAN 1
2544 #elif 1 && (ACC_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32)
2545 # define ACC_ABI_LITTLE_ENDIAN 1
2546 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
2547 # define ACC_ABI_BIG_ENDIAN 1
2548 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
2549 # define ACC_ABI_LITTLE_ENDIAN 1
2550 #endif
2551 #endif
2552 #if (ACC_ABI_BIG_ENDIAN) && (ACC_ABI_LITTLE_ENDIAN)
2553 # error "unexpected configuration - check your compiler defines"
2554 #endif
2555 #if (ACC_ABI_BIG_ENDIAN)
2556 # define ACC_INFO_ABI_ENDIAN "be"
2557 #elif (ACC_ABI_LITTLE_ENDIAN)
2558 # define ACC_INFO_ABI_ENDIAN "le"
2559 #elif (ACC_ABI_NEUTRAL_ENDIAN)
2560 # define ACC_INFO_ABI_ENDIAN "neutral"
2561 #endif
2562 #if (ACC_SIZEOF_INT == 1 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
2563 # define ACC_ABI_I8LP16 1
2564 # define ACC_INFO_ABI_PM "i8lp16"
2565 #elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
2566 # define ACC_ABI_ILP16 1
2567 # define ACC_INFO_ABI_PM "ilp16"
2568 #elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4)
2569 # define ACC_ABI_LP32 1
2570 # define ACC_INFO_ABI_PM "lp32"
2571 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4)
2572 # define ACC_ABI_ILP32 1
2573 # define ACC_INFO_ABI_PM "ilp32"
2574 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 8 && ACC_SIZEOF_SIZE_T == 8)
2575 # define ACC_ABI_LLP64 1
2576 # define ACC_INFO_ABI_PM "llp64"
2577 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
2578 # define ACC_ABI_LP64 1
2579 # define ACC_INFO_ABI_PM "lp64"
2580 #elif (ACC_SIZEOF_INT == 8 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
2581 # define ACC_ABI_ILP64 1
2582 # define ACC_INFO_ABI_PM "ilp64"
2583 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 4)
2584 # define ACC_ABI_IP32L64 1
2585 # define ACC_INFO_ABI_PM "ip32l64"
2586 #endif
2587 #if (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_VOID_P == 4 && ACC_WORDSIZE == 8)
2588 # define ACC_ABI_IP32W64 1
2589 # ifndef ACC_INFO_ABI_PM
2590 # define ACC_INFO_ABI_PM "ip32w64"
2591 # endif
2592 #endif
2593 #if 0
2594 #elif !defined(__ACC_LIBC_OVERRIDE)
2595 #if (ACC_LIBC_NAKED)
2596 # define ACC_INFO_LIBC "naked"
2597 #elif (ACC_LIBC_FREESTANDING)
2598 # define ACC_INFO_LIBC "freestanding"
2599 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
2600 # define ACC_INFO_LIBC "mfreestanding"
2601 #elif (ACC_LIBC_ISOC90)
2602 # define ACC_INFO_LIBC "isoc90"
2603 #elif (ACC_LIBC_ISOC99)
2604 # define ACC_INFO_LIBC "isoc99"
2605 #elif (ACC_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION)
2606 # define ACC_LIBC_ISOC90 1
2607 # define ACC_INFO_LIBC "isoc90"
2608 #elif defined(__dietlibc__)
2609 # define ACC_LIBC_DIETLIBC 1
2610 # define ACC_INFO_LIBC "dietlibc"
2611 #elif defined(_NEWLIB_VERSION)
2612 # define ACC_LIBC_NEWLIB 1
2613 # define ACC_INFO_LIBC "newlib"
2614 #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
2615 # if defined(__UCLIBC_SUBLEVEL__)
2616 # define ACC_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0))
2617 # else
2618 # define ACC_LIBC_UCLIBC 0x00090bL
2619 # endif
2620 # define ACC_INFO_LIBC "uc" "libc"
2621 #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
2622 # define ACC_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100)
2623 # define ACC_INFO_LIBC "glibc"
2624 #elif (ACC_CC_MWERKS) && defined(__MSL__)
2625 # define ACC_LIBC_MSL __MSL__
2626 # define ACC_INFO_LIBC "msl"
2627 #elif 1 && defined(__IAR_SYSTEMS_ICC__)
2628 # define ACC_LIBC_ISOC90 1
2629 # define ACC_INFO_LIBC "isoc90"
2630 #else
2631 # define ACC_LIBC_DEFAULT 1
2632 # define ACC_INFO_LIBC "default"
2633 #endif
2634 #endif
2635 #if (ACC_ARCH_I386 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
2636 # define ACC_ASM_SYNTAX_MSC 1
2637 #elif (ACC_OS_WIN64 && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
2638 #elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC == 0x011f00ul))
2639 #elif (ACC_ARCH_I386 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
2640 # define ACC_ASM_SYNTAX_GNUC 1
2641 #elif (ACC_ARCH_AMD64 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
2642 # define ACC_ASM_SYNTAX_GNUC 1
2643 #elif (ACC_CC_GNUC)
2644 # define ACC_ASM_SYNTAX_GNUC 1
2645 #endif
2646 #if (ACC_ASM_SYNTAX_GNUC)
2647 #if (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
2648 # define __ACC_ASM_CLOBBER "ax"
2649 # define __ACC_ASM_CLOBBER_LIST_CC /*empty*/
2650 # define __ACC_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/
2651 # define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/
2652 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 1000))
2653 # define __ACC_ASM_CLOBBER "memory"
2654 # define __ACC_ASM_CLOBBER_LIST_CC /*empty*/
2655 # define __ACC_ASM_CLOBBER_LIST_CC_MEMORY : "memory"
2656 # define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/
2657 #else
2658 # define __ACC_ASM_CLOBBER "cc", "memory"
2659 # define __ACC_ASM_CLOBBER_LIST_CC : "cc"
2660 # define __ACC_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory"
2661 # define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/
2662 #endif
2663 #endif
2664 #if (ACC_ARCH_ALPHA)
2665 # define ACC_OPT_AVOID_UINT_INDEX 1
2666 #elif (ACC_ARCH_AMD64)
2667 # define ACC_OPT_AVOID_INT_INDEX 1
2668 # define ACC_OPT_AVOID_UINT_INDEX 1
2669 # ifndef ACC_OPT_UNALIGNED16
2670 # define ACC_OPT_UNALIGNED16 1
2671 # endif
2672 # ifndef ACC_OPT_UNALIGNED32
2673 # define ACC_OPT_UNALIGNED32 1
2674 # endif
2675 # ifndef ACC_OPT_UNALIGNED64
2676 # define ACC_OPT_UNALIGNED64 1
2677 # endif
2678 #elif (ACC_ARCH_ARM)
2679 # if defined(__ARM_FEATURE_UNALIGNED)
2680 # if ((__ARM_FEATURE_UNALIGNED)+0)
2681 # ifndef ACC_OPT_UNALIGNED16
2682 # define ACC_OPT_UNALIGNED16 1
2683 # endif
2684 # ifndef ACC_OPT_UNALIGNED32
2685 # define ACC_OPT_UNALIGNED32 1
2686 # endif
2687 # endif
2688 # elif 1 && (ACC_ARCH_ARM_THUMB2)
2689 # ifndef ACC_OPT_UNALIGNED16
2690 # define ACC_OPT_UNALIGNED16 1
2691 # endif
2692 # ifndef ACC_OPT_UNALIGNED32
2693 # define ACC_OPT_UNALIGNED32 1
2694 # endif
2695 # elif 1 && defined(__ARM_ARCH) && ((__ARM_ARCH)+0 >= 7)
2696 # ifndef ACC_OPT_UNALIGNED16
2697 # define ACC_OPT_UNALIGNED16 1
2698 # endif
2699 # ifndef ACC_OPT_UNALIGNED32
2700 # define ACC_OPT_UNALIGNED32 1
2701 # endif
2702 # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7)
2703 # ifndef ACC_OPT_UNALIGNED16
2704 # define ACC_OPT_UNALIGNED16 1
2705 # endif
2706 # ifndef ACC_OPT_UNALIGNED32
2707 # define ACC_OPT_UNALIGNED32 1
2708 # endif
2709 # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R))
2710 # ifndef ACC_OPT_UNALIGNED16
2711 # define ACC_OPT_UNALIGNED16 1
2712 # endif
2713 # ifndef ACC_OPT_UNALIGNED32
2714 # define ACC_OPT_UNALIGNED32 1
2715 # endif
2716 # elif 1 && defined(_MSC_VER) && defined(_M_ARM) && ((_M_ARM)+0 >= 7)
2717 # ifndef ACC_OPT_UNALIGNED16
2718 # define ACC_OPT_UNALIGNED16 1
2719 # endif
2720 # ifndef ACC_OPT_UNALIGNED32
2721 # define ACC_OPT_UNALIGNED32 1
2722 # endif
2723 # endif
2724 #elif (ACC_ARCH_ARM64)
2725 # ifndef ACC_OPT_UNALIGNED16
2726 # define ACC_OPT_UNALIGNED16 1
2727 # endif
2728 # ifndef ACC_OPT_UNALIGNED32
2729 # define ACC_OPT_UNALIGNED32 1
2730 # endif
2731 # ifndef ACC_OPT_UNALIGNED64
2732 # define ACC_OPT_UNALIGNED64 1
2733 # endif
2734 #elif (ACC_ARCH_CRIS)
2735 # ifndef ACC_OPT_UNALIGNED16
2736 # define ACC_OPT_UNALIGNED16 1
2737 # endif
2738 # ifndef ACC_OPT_UNALIGNED32
2739 # define ACC_OPT_UNALIGNED32 1
2740 # endif
2741 #elif (ACC_ARCH_I386)
2742 # ifndef ACC_OPT_UNALIGNED16
2743 # define ACC_OPT_UNALIGNED16 1
2744 # endif
2745 # ifndef ACC_OPT_UNALIGNED32
2746 # define ACC_OPT_UNALIGNED32 1
2747 # endif
2748 #elif (ACC_ARCH_IA64)
2749 # define ACC_OPT_AVOID_INT_INDEX 1
2750 # define ACC_OPT_AVOID_UINT_INDEX 1
2751 # define ACC_OPT_PREFER_POSTINC 1
2752 #elif (ACC_ARCH_M68K)
2753 # define ACC_OPT_PREFER_POSTINC 1
2754 # define ACC_OPT_PREFER_PREDEC 1
2755 # if defined(__mc68020__) && !defined(__mcoldfire__)
2756 # ifndef ACC_OPT_UNALIGNED16
2757 # define ACC_OPT_UNALIGNED16 1
2758 # endif
2759 # ifndef ACC_OPT_UNALIGNED32
2760 # define ACC_OPT_UNALIGNED32 1
2761 # endif
2762 # endif
2763 #elif (ACC_ARCH_MIPS)
2764 # define ACC_OPT_AVOID_UINT_INDEX 1
2765 #elif (ACC_ARCH_POWERPC)
2766 # define ACC_OPT_PREFER_PREINC 1
2767 # define ACC_OPT_PREFER_PREDEC 1
2768 # if (ACC_ABI_BIG_ENDIAN) || (ACC_WORDSIZE == 8)
2769 # ifndef ACC_OPT_UNALIGNED16
2770 # define ACC_OPT_UNALIGNED16 1
2771 # endif
2772 # ifndef ACC_OPT_UNALIGNED32
2773 # define ACC_OPT_UNALIGNED32 1
2774 # endif
2775 # if (ACC_WORDSIZE == 8)
2776 # ifndef ACC_OPT_UNALIGNED64
2777 # define ACC_OPT_UNALIGNED64 1
2778 # endif
2779 # endif
2780 # endif
2781 #elif (ACC_ARCH_RISCV)
2782 # define ACC_OPT_AVOID_UINT_INDEX 1
2783 # ifndef ACC_OPT_UNALIGNED16
2784 # define ACC_OPT_UNALIGNED16 1
2785 # endif
2786 # ifndef ACC_OPT_UNALIGNED32
2787 # define ACC_OPT_UNALIGNED32 1
2788 # endif
2789 # if (ACC_WORDSIZE == 8)
2790 # ifndef ACC_OPT_UNALIGNED64
2791 # define ACC_OPT_UNALIGNED64 1
2792 # endif
2793 # endif
2794 #elif (ACC_ARCH_S390)
2795 # ifndef ACC_OPT_UNALIGNED16
2796 # define ACC_OPT_UNALIGNED16 1
2797 # endif
2798 # ifndef ACC_OPT_UNALIGNED32
2799 # define ACC_OPT_UNALIGNED32 1
2800 # endif
2801 # if (ACC_WORDSIZE == 8)
2802 # ifndef ACC_OPT_UNALIGNED64
2803 # define ACC_OPT_UNALIGNED64 1
2804 # endif
2805 # endif
2806 #elif (ACC_ARCH_SH)
2807 # define ACC_OPT_PREFER_POSTINC 1
2808 # define ACC_OPT_PREFER_PREDEC 1
2809 #endif
2810 #ifndef ACC_CFG_NO_INLINE_ASM
2811 #if (ACC_ABI_NEUTRAL_ENDIAN) || (ACC_ARCH_GENERIC)
2812 # define ACC_CFG_NO_INLINE_ASM 1
2813 #elif (ACC_CC_LLVM)
2814 # define ACC_CFG_NO_INLINE_ASM 1
2815 #endif
2816 #endif
2817 #if (ACC_CFG_NO_INLINE_ASM)
2818 # undef ACC_ASM_SYNTAX_MSC
2819 # undef ACC_ASM_SYNTAX_GNUC
2820 # undef __ACC_ASM_CLOBBER
2821 # undef __ACC_ASM_CLOBBER_LIST_CC
2822 # undef __ACC_ASM_CLOBBER_LIST_CC_MEMORY
2823 # undef __ACC_ASM_CLOBBER_LIST_EMPTY
2824 #endif
2825 #ifndef ACC_CFG_NO_UNALIGNED
2826 #if (ACC_ABI_NEUTRAL_ENDIAN) || (ACC_ARCH_GENERIC)
2827 # define ACC_CFG_NO_UNALIGNED 1
2828 #endif
2829 #endif
2830 #if (ACC_CFG_NO_UNALIGNED)
2831 # undef ACC_OPT_UNALIGNED16
2832 # undef ACC_OPT_UNALIGNED32
2833 # undef ACC_OPT_UNALIGNED64
2834 #endif
2835 #if defined(__ACC_INFOSTR_MM)
2836 #elif (ACC_MM_FLAT) && (defined(__ACC_INFOSTR_PM) || defined(ACC_INFO_ABI_PM))
2837 # define __ACC_INFOSTR_MM ""
2838 #elif defined(ACC_INFO_MM)
2839 # define __ACC_INFOSTR_MM "." ACC_INFO_MM
2840 #else
2841 # define __ACC_INFOSTR_MM ""
2842 #endif
2843 #if defined(__ACC_INFOSTR_PM)
2844 #elif defined(ACC_INFO_ABI_PM)
2845 # define __ACC_INFOSTR_PM "." ACC_INFO_ABI_PM
2846 #else
2847 # define __ACC_INFOSTR_PM ""
2848 #endif
2849 #if defined(__ACC_INFOSTR_ENDIAN)
2850 #elif defined(ACC_INFO_ABI_ENDIAN)
2851 # define __ACC_INFOSTR_ENDIAN "." ACC_INFO_ABI_ENDIAN
2852 #else
2853 # define __ACC_INFOSTR_ENDIAN ""
2854 #endif
2855 #if defined(__ACC_INFOSTR_OSNAME)
2856 #elif defined(ACC_INFO_OS_CONSOLE)
2857 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_CONSOLE
2858 #elif defined(ACC_INFO_OS_POSIX)
2859 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_POSIX
2860 #else
2861 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS
2862 #endif
2863 #if defined(__ACC_INFOSTR_LIBC)
2864 #elif defined(ACC_INFO_LIBC)
2865 # define __ACC_INFOSTR_LIBC "." ACC_INFO_LIBC
2866 #else
2867 # define __ACC_INFOSTR_LIBC ""
2868 #endif
2869 #if defined(__ACC_INFOSTR_CCVER)
2870 #elif defined(ACC_INFO_CCVER)
2871 # define __ACC_INFOSTR_CCVER " " ACC_INFO_CCVER
2872 #else
2873 # define __ACC_INFOSTR_CCVER ""
2874 #endif
2875 #define ACC_INFO_STRING \
2876 ACC_INFO_ARCH __ACC_INFOSTR_MM __ACC_INFOSTR_PM __ACC_INFOSTR_ENDIAN \
2877 " " __ACC_INFOSTR_OSNAME __ACC_INFOSTR_LIBC " " ACC_INFO_CC __ACC_INFOSTR_CCVER
2878 #if !(ACC_CFG_SKIP_ACC_TYPES)
2879 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0))
2880 # error "missing defines for sizes"
2881 #endif
2882 #if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0))
2883 # error "missing defines for sizes"
2884 #endif
2885 #define ACC_TYPEOF_CHAR 1u
2886 #define ACC_TYPEOF_SHORT 2u
2887 #define ACC_TYPEOF_INT 3u
2888 #define ACC_TYPEOF_LONG 4u
2889 #define ACC_TYPEOF_LONG_LONG 5u
2890 #define ACC_TYPEOF___INT8 17u
2891 #define ACC_TYPEOF___INT16 18u
2892 #define ACC_TYPEOF___INT32 19u
2893 #define ACC_TYPEOF___INT64 20u
2894 #define ACC_TYPEOF___INT128 21u
2895 #define ACC_TYPEOF___INT256 22u
2896 #define ACC_TYPEOF___MODE_QI 33u
2897 #define ACC_TYPEOF___MODE_HI 34u
2898 #define ACC_TYPEOF___MODE_SI 35u
2899 #define ACC_TYPEOF___MODE_DI 36u
2900 #define ACC_TYPEOF___MODE_TI 37u
2901 #define ACC_TYPEOF_CHAR_P 129u
2902 #if !defined(acc_llong_t)
2903 #if (ACC_SIZEOF_LONG_LONG+0 > 0)
2904 # if !(ACC_LANG_ASSEMBLER)
2905 __acc_gnuc_extension__ typedef long long acc_llong_t__;
2906 __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t__;
2907 # endif
2908 # define acc_llong_t acc_llong_t__
2909 # define acc_ullong_t acc_ullong_t__
2910 #endif
2911 #endif
2912 #if !defined(acc_int16e_t)
2913 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) && (ACC_SIZEOF_SHORT != 2)
2914 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T
2915 #endif
2916 #if (ACC_SIZEOF_LONG == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
2917 # define acc_int16e_t long
2918 # define acc_uint16e_t unsigned long
2919 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_LONG
2920 #elif (ACC_SIZEOF_INT == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
2921 # define acc_int16e_t int
2922 # define acc_uint16e_t unsigned int
2923 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_INT
2924 #elif (ACC_SIZEOF_SHORT == 2)
2925 # define acc_int16e_t short int
2926 # define acc_uint16e_t unsigned short int
2927 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_SHORT
2928 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM)
2929 # if !(ACC_LANG_ASSEMBLER)
2930 typedef int acc_int16e_hi_t__ __attribute__((__mode__(__HI__)));
2931 typedef unsigned int acc_uint16e_hi_t__ __attribute__((__mode__(__HI__)));
2932 # endif
2933 # define acc_int16e_t acc_int16e_hi_t__
2934 # define acc_uint16e_t acc_uint16e_hi_t__
2935 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___MODE_HI
2936 #elif (ACC_SIZEOF___INT16 == 2)
2937 # define acc_int16e_t __int16
2938 # define acc_uint16e_t unsigned __int16
2939 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___INT16
2940 #else
2941 #endif
2942 #endif
2943 #if defined(acc_int16e_t)
2944 # define ACC_SIZEOF_ACC_INT16E_T 2
2945 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == 2)
2946 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T)
2947 #endif
2948 #if !defined(acc_int32e_t)
2949 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) && (ACC_SIZEOF_INT != 4)
2950 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T
2951 #endif
2952 #if (ACC_SIZEOF_LONG == 4) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT)
2953 # define acc_int32e_t long int
2954 # define acc_uint32e_t unsigned long int
2955 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG
2956 #elif (ACC_SIZEOF_INT == 4)
2957 # define acc_int32e_t int
2958 # define acc_uint32e_t unsigned int
2959 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_INT
2960 #elif (ACC_SIZEOF_SHORT == 4)
2961 # define acc_int32e_t short int
2962 # define acc_uint32e_t unsigned short int
2963 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_SHORT
2964 #elif (ACC_SIZEOF_LONG_LONG == 4)
2965 # define acc_int32e_t acc_llong_t
2966 # define acc_uint32e_t acc_ullong_t
2967 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG_LONG
2968 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
2969 # if !(ACC_LANG_ASSEMBLER)
2970 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
2971 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
2972 # endif
2973 # define acc_int32e_t acc_int32e_si_t__
2974 # define acc_uint32e_t acc_uint32e_si_t__
2975 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
2976 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
2977 # if !(ACC_LANG_ASSEMBLER)
2978 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
2979 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
2980 # endif
2981 # define acc_int32e_t acc_int32e_si_t__
2982 # define acc_uint32e_t acc_uint32e_si_t__
2983 # define ACC_INT32_C(c) (c##LL)
2984 # define ACC_UINT32_C(c) (c##ULL)
2985 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
2986 #elif (ACC_SIZEOF___INT32 == 4)
2987 # define acc_int32e_t __int32
2988 # define acc_uint32e_t unsigned __int32
2989 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___INT32
2990 #else
2991 #endif
2992 #endif
2993 #if defined(acc_int32e_t)
2994 # define ACC_SIZEOF_ACC_INT32E_T 4
2995 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == 4)
2996 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T)
2997 #endif
2998 #if !defined(acc_int64e_t)
2999 #if (ACC_SIZEOF___INT64 == 8)
3000 # if (ACC_CC_BORLANDC) && !defined(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T)
3001 # define ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
3002 # endif
3003 #endif
3004 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && (ACC_SIZEOF_LONG_LONG != 8)
3005 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
3006 #endif
3007 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) && (ACC_SIZEOF___INT64 != 8)
3008 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
3009 #endif
3010 #if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3011 # define acc_int64e_t int
3012 # define acc_uint64e_t unsigned int
3013 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_INT
3014 #elif (ACC_SIZEOF_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64)
3015 # define acc_int64e_t long int
3016 # define acc_uint64e_t unsigned long int
3017 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG
3018 #elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64)
3019 # define acc_int64e_t acc_llong_t
3020 # define acc_uint64e_t acc_ullong_t
3021 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG_LONG
3022 # if (ACC_CC_BORLANDC)
3023 # define ACC_INT64_C(c) ((c) + 0ll)
3024 # define ACC_UINT64_C(c) ((c) + 0ull)
3025 # elif 0
3026 # define ACC_INT64_C(c) (__acc_gnuc_extension__ (c##LL))
3027 # define ACC_UINT64_C(c) (__acc_gnuc_extension__ (c##ULL))
3028 # else
3029 # define ACC_INT64_C(c) (c##LL)
3030 # define ACC_UINT64_C(c) (c##ULL)
3031 # endif
3032 #elif (ACC_SIZEOF___INT64 == 8)
3033 # define acc_int64e_t __int64
3034 # define acc_uint64e_t unsigned __int64
3035 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
3036 # if (ACC_CC_BORLANDC)
3037 # define ACC_INT64_C(c) ((c) + 0i64)
3038 # define ACC_UINT64_C(c) ((c) + 0ui64)
3039 # else
3040 # define ACC_INT64_C(c) (c##i64)
3041 # define ACC_UINT64_C(c) (c##ui64)
3042 # endif
3043 #else
3044 #endif
3045 #endif
3046 #if defined(acc_int64e_t)
3047 # define ACC_SIZEOF_ACC_INT64E_T 8
3048 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == 8)
3049 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T)
3050 #endif
3051 #if !defined(acc_int32l_t)
3052 #if defined(acc_int32e_t)
3053 # define acc_int32l_t acc_int32e_t
3054 # define acc_uint32l_t acc_uint32e_t
3055 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T
3056 # define ACC_TYPEOF_ACC_INT32L_T ACC_TYPEOF_ACC_INT32E_T
3057 #elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3058 # define acc_int32l_t int
3059 # define acc_uint32l_t unsigned int
3060 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT
3061 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_INT
3062 #elif (ACC_SIZEOF_LONG >= 4)
3063 # define acc_int32l_t long int
3064 # define acc_uint32l_t unsigned long int
3065 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG
3066 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_LONG
3067 #else
3068 # error "acc_int32l_t"
3069 #endif
3070 #endif
3071 #if 1
3072 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) >= 4)
3073 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T)
3074 #endif
3075 #if !defined(acc_int64l_t)
3076 #if defined(acc_int64e_t)
3077 # define acc_int64l_t acc_int64e_t
3078 # define acc_uint64l_t acc_uint64e_t
3079 # define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T
3080 # define ACC_TYPEOF_ACC_INT64L_T ACC_TYPEOF_ACC_INT64E_T
3081 #else
3082 #endif
3083 #endif
3084 #if defined(acc_int64l_t)
3085 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) >= 8)
3086 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T)
3087 #endif
3088 #if !defined(acc_int32f_t)
3089 #if (ACC_SIZEOF_SIZE_T >= 8)
3090 # define acc_int32f_t acc_int64l_t
3091 # define acc_uint32f_t acc_uint64l_t
3092 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T
3093 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT64L_T
3094 #else
3095 # define acc_int32f_t acc_int32l_t
3096 # define acc_uint32f_t acc_uint32l_t
3097 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T
3098 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT32L_T
3099 #endif
3100 #endif
3101 #if 1
3102 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) >= 4)
3103 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T)
3104 #endif
3105 #if !defined(acc_int64f_t)
3106 #if defined(acc_int64l_t)
3107 # define acc_int64f_t acc_int64l_t
3108 # define acc_uint64f_t acc_uint64l_t
3109 # define ACC_SIZEOF_ACC_INT64F_T ACC_SIZEOF_ACC_INT64L_T
3110 # define ACC_TYPEOF_ACC_INT64F_T ACC_TYPEOF_ACC_INT64L_T
3111 #else
3112 #endif
3113 #endif
3114 #if defined(acc_int64f_t)
3115 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) >= 8)
3116 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T)
3117 #endif
3118 #if !defined(acc_intptr_t)
3119 #if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16))
3120 # define __ACC_INTPTR_T_IS_POINTER 1
3121 # if !(ACC_LANG_ASSEMBLER)
3122 typedef char * acc_intptr_t;
3123 typedef char * acc_uintptr_t;
3124 # endif
3125 # define acc_intptr_t acc_intptr_t
3126 # define acc_uintptr_t acc_uintptr_t
3127 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P
3128 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_CHAR_P
3129 #elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4))
3130 # if !(ACC_LANG_ASSEMBLER)
3131 typedef __w64 int acc_intptr_t;
3132 typedef __w64 unsigned int acc_uintptr_t;
3133 # endif
3134 # define acc_intptr_t acc_intptr_t
3135 # define acc_uintptr_t acc_uintptr_t
3136 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
3137 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
3138 #elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P)
3139 # define acc_intptr_t short
3140 # define acc_uintptr_t unsigned short
3141 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT
3142 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_SHORT
3143 #elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3144 # define acc_intptr_t int
3145 # define acc_uintptr_t unsigned int
3146 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
3147 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
3148 #elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P)
3149 # define acc_intptr_t long
3150 # define acc_uintptr_t unsigned long
3151 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG
3152 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_LONG
3153 #elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P)
3154 # define acc_intptr_t acc_int64l_t
3155 # define acc_uintptr_t acc_uint64l_t
3156 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T
3157 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_ACC_INT64L_T
3158 #else
3159 # error "acc_intptr_t"
3160 #endif
3161 #endif
3162 #if 1
3163 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) >= sizeof(void *))
3164 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t))
3165 #endif
3166 #if !defined(acc_word_t)
3167 #if defined(ACC_WORDSIZE) && (ACC_WORDSIZE+0 > 0)
3168 #if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !(__ACC_INTPTR_T_IS_POINTER)
3169 # define acc_word_t acc_uintptr_t
3170 # define acc_sword_t acc_intptr_t
3171 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T
3172 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_ACC_INTPTR_T
3173 #elif (ACC_WORDSIZE == ACC_SIZEOF_LONG)
3174 # define acc_word_t unsigned long
3175 # define acc_sword_t long
3176 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG
3177 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_LONG
3178 #elif (ACC_WORDSIZE == ACC_SIZEOF_INT)
3179 # define acc_word_t unsigned int
3180 # define acc_sword_t int
3181 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT
3182 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_INT
3183 #elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT)
3184 # define acc_word_t unsigned short
3185 # define acc_sword_t short
3186 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT
3187 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_SHORT
3188 #elif (ACC_WORDSIZE == 1)
3189 # define acc_word_t unsigned char
3190 # define acc_sword_t signed char
3191 # define ACC_SIZEOF_ACC_WORD_T 1
3192 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_CHAR
3193 #elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T)
3194 # define acc_word_t acc_uint64l_t
3195 # define acc_sword_t acc_int64l_t
3196 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
3197 # define ACC_TYPEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
3198 #elif (ACC_ARCH_SPU) && (ACC_CC_GNUC)
3199 #if 0
3200 # if !(ACC_LANG_ASSEMBLER)
3201 typedef unsigned acc_word_t __attribute__((__mode__(__V16QI__)));
3202 typedef int acc_sword_t __attribute__((__mode__(__V16QI__)));
3203 # endif
3204 # define acc_word_t acc_word_t
3205 # define acc_sword_t acc_sword_t
3206 # define ACC_SIZEOF_ACC_WORD_T 16
3207 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF___MODE_V16QI
3208 #endif
3209 #else
3210 # error "acc_word_t"
3211 #endif
3212 #endif
3213 #endif
3214 #if 1 && defined(acc_word_t)
3215 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_word_t) == ACC_WORDSIZE)
3216 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_sword_t) == ACC_WORDSIZE)
3217 #endif
3218 #if 1
3219 #define acc_int8_t signed char
3220 #define acc_uint8_t unsigned char
3221 #define ACC_SIZEOF_ACC_INT8_T 1
3222 #define ACC_TYPEOF_ACC_INT8_T ACC_TYPEOF_CHAR
3223 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == 1)
3224 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == sizeof(acc_uint8_t))
3225 #endif
3226 #if defined(acc_int16e_t)
3227 #define acc_int16_t acc_int16e_t
3228 #define acc_uint16_t acc_uint16e_t
3229 #define ACC_SIZEOF_ACC_INT16_T ACC_SIZEOF_ACC_INT16E_T
3230 #define ACC_TYPEOF_ACC_INT16_T ACC_TYPEOF_ACC_INT16E_T
3231 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == 2)
3232 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == sizeof(acc_uint16_t))
3233 #endif
3234 #if defined(acc_int32e_t)
3235 #define acc_int32_t acc_int32e_t
3236 #define acc_uint32_t acc_uint32e_t
3237 #define ACC_SIZEOF_ACC_INT32_T ACC_SIZEOF_ACC_INT32E_T
3238 #define ACC_TYPEOF_ACC_INT32_T ACC_TYPEOF_ACC_INT32E_T
3239 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == 4)
3240 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == sizeof(acc_uint32_t))
3241 #endif
3242 #if defined(acc_int64e_t)
3243 #define acc_int64_t acc_int64e_t
3244 #define acc_uint64_t acc_uint64e_t
3245 #define ACC_SIZEOF_ACC_INT64_T ACC_SIZEOF_ACC_INT64E_T
3246 #define ACC_TYPEOF_ACC_INT64_T ACC_TYPEOF_ACC_INT64E_T
3247 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == 8)
3248 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == sizeof(acc_uint64_t))
3249 #endif
3250 #if 1
3251 #define acc_int_least32_t acc_int32l_t
3252 #define acc_uint_least32_t acc_uint32l_t
3253 #define ACC_SIZEOF_ACC_INT_LEAST32_T ACC_SIZEOF_ACC_INT32L_T
3254 #define ACC_TYPEOF_ACC_INT_LEAST32_T ACC_TYPEOF_ACC_INT32L_T
3255 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) >= 4)
3256 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) == sizeof(acc_uint_least32_t))
3257 #endif
3258 #if defined(acc_int64l_t)
3259 #define acc_int_least64_t acc_int64l_t
3260 #define acc_uint_least64_t acc_uint64l_t
3261 #define ACC_SIZEOF_ACC_INT_LEAST64_T ACC_SIZEOF_ACC_INT64L_T
3262 #define ACC_TYPEOF_ACC_INT_LEAST64_T ACC_TYPEOF_ACC_INT64L_T
3263 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) >= 8)
3264 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) == sizeof(acc_uint_least64_t))
3265 #endif
3266 #if 1
3267 #define acc_int_fast32_t acc_int32f_t
3268 #define acc_uint_fast32_t acc_uint32f_t
3269 #define ACC_SIZEOF_ACC_INT_FAST32_T ACC_SIZEOF_ACC_INT32F_T
3270 #define ACC_TYPEOF_ACC_INT_FAST32_T ACC_TYPEOF_ACC_INT32F_T
3271 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) >= 4)
3272 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) == sizeof(acc_uint_fast32_t))
3273 #endif
3274 #if defined(acc_int64f_t)
3275 #define acc_int_fast64_t acc_int64f_t
3276 #define acc_uint_fast64_t acc_uint64f_t
3277 #define ACC_SIZEOF_ACC_INT_FAST64_T ACC_SIZEOF_ACC_INT64F_T
3278 #define ACC_TYPEOF_ACC_INT_FAST64_T ACC_TYPEOF_ACC_INT64F_T
3279 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) >= 8)
3280 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast64_t))
3281 #endif
3282 #if !defined(ACC_INT16_C)
3283 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2)
3284 # define ACC_INT16_C(c) ((c) + 0)
3285 # define ACC_UINT16_C(c) ((c) + 0U)
3286 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2)
3287 # define ACC_INT16_C(c) ((c) + 0L)
3288 # define ACC_UINT16_C(c) ((c) + 0UL)
3289 # elif (ACC_SIZEOF_INT >= 2)
3290 # define ACC_INT16_C(c) (c)
3291 # define ACC_UINT16_C(c) (c##U)
3292 # elif (ACC_SIZEOF_LONG >= 2)
3293 # define ACC_INT16_C(c) (c##L)
3294 # define ACC_UINT16_C(c) (c##UL)
3295 # else
3296 # error "ACC_INT16_C"
3297 # endif
3298 #endif
3299 #if !defined(ACC_INT32_C)
3300 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4)
3301 # define ACC_INT32_C(c) ((c) + 0)
3302 # define ACC_UINT32_C(c) ((c) + 0U)
3303 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4)
3304 # define ACC_INT32_C(c) ((c) + 0L)
3305 # define ACC_UINT32_C(c) ((c) + 0UL)
3306 # elif (ACC_SIZEOF_INT >= 4)
3307 # define ACC_INT32_C(c) (c)
3308 # define ACC_UINT32_C(c) (c##U)
3309 # elif (ACC_SIZEOF_LONG >= 4)
3310 # define ACC_INT32_C(c) (c##L)
3311 # define ACC_UINT32_C(c) (c##UL)
3312 # elif (ACC_SIZEOF_LONG_LONG >= 4)
3313 # define ACC_INT32_C(c) (c##LL)
3314 # define ACC_UINT32_C(c) (c##ULL)
3315 # else
3316 # error "ACC_INT32_C"
3317 # endif
3318 #endif
3319 #if !defined(ACC_INT64_C) && defined(acc_int64l_t)
3320 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8)
3321 # define ACC_INT64_C(c) ((c) + 0)
3322 # define ACC_UINT64_C(c) ((c) + 0U)
3323 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8)
3324 # define ACC_INT64_C(c) ((c) + 0L)
3325 # define ACC_UINT64_C(c) ((c) + 0UL)
3326 # elif (ACC_SIZEOF_INT >= 8)
3327 # define ACC_INT64_C(c) (c)
3328 # define ACC_UINT64_C(c) (c##U)
3329 # elif (ACC_SIZEOF_LONG >= 8)
3330 # define ACC_INT64_C(c) (c##L)
3331 # define ACC_UINT64_C(c) (c##UL)
3332 # else
3333 # error "ACC_INT64_C"
3334 # endif
3335 #endif
3336 #endif
3337 #if (ACC_CFG_NO_CONFIG_HEADER)
3338 #elif defined(ACC_CFG_CONFIG_HEADER)
3339 #else
3340 #if !(ACC_CFG_AUTO_NO_HEADERS)
3341 #if (ACC_LIBC_NAKED)
3342 #elif (ACC_LIBC_FREESTANDING)
3343 # define HAVE_LIMITS_H 1
3344 # define HAVE_STDARG_H 1
3345 # define HAVE_STDDEF_H 1
3346 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
3347 # define HAVE_LIMITS_H 1
3348 # define HAVE_SETJMP_H 1
3349 # define HAVE_STDARG_H 1
3350 # define HAVE_STDDEF_H 1
3351 # define HAVE_STDIO_H 1
3352 # define HAVE_STRING_H 1
3353 #else
3354 #define STDC_HEADERS 1
3355 #define HAVE_ASSERT_H 1
3356 #define HAVE_CTYPE_H 1
3357 #define HAVE_DIRENT_H 1
3358 #define HAVE_ERRNO_H 1
3359 #define HAVE_FCNTL_H 1
3360 #define HAVE_FLOAT_H 1
3361 #define HAVE_LIMITS_H 1
3362 #define HAVE_MALLOC_H 1
3363 #define HAVE_MEMORY_H 1
3364 #define HAVE_SETJMP_H 1
3365 #define HAVE_SIGNAL_H 1
3366 #define HAVE_STDARG_H 1
3367 #define HAVE_STDDEF_H 1
3368 #define HAVE_STDIO_H 1
3369 #define HAVE_STDLIB_H 1
3370 #define HAVE_STRING_H 1
3371 #define HAVE_TIME_H 1
3372 #define HAVE_UNISTD_H 1
3373 #define HAVE_UTIME_H 1
3374 #define HAVE_SYS_STAT_H 1
3375 #define HAVE_SYS_TIME_H 1
3376 #define HAVE_SYS_TYPES_H 1
3377 #if (ACC_OS_POSIX)
3378 # if (ACC_OS_POSIX_AIX)
3379 # define HAVE_SYS_RESOURCE_H 1
3380 # elif (ACC_OS_POSIX_DARWIN || ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD)
3381 # define HAVE_STRINGS_H 1
3382 # undef HAVE_MALLOC_H
3383 # elif (ACC_OS_POSIX_HPUX || ACC_OS_POSIX_INTERIX)
3384 # define HAVE_ALLOCA_H 1
3385 # elif (ACC_OS_POSIX_DARWIN && ACC_LIBC_MSL)
3386 # undef HAVE_SYS_TIME_H
3387 # undef HAVE_SYS_TYPES_H
3388 # elif (ACC_OS_POSIX_SOLARIS || ACC_OS_POSIX_SUNOS)
3389 # define HAVE_ALLOCA_H 1
3390 # endif
3391 # if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
3392 # define HAVE_STRINGS_H 1
3393 # define HAVE_SYS_MMAN_H 1
3394 # define HAVE_SYS_RESOURCE_H 1
3395 # define HAVE_SYS_WAIT_H 1
3396 # endif
3397 # if (ACC_LIBC_NEWLIB)
3398 # undef HAVE_STRINGS_H
3399 # endif
3400 #elif (ACC_OS_CYGWIN)
3401 # define HAVE_IO_H 1
3402 #elif (ACC_OS_EMX)
3403 # define HAVE_ALLOCA_H 1
3404 # define HAVE_IO_H 1
3405 #elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
3406 # if !defined(__MINT__)
3407 # undef HAVE_MALLOC_H
3408 # endif
3409 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
3410 # undef HAVE_DIRENT_H
3411 # undef HAVE_FCNTL_H
3412 # undef HAVE_MALLOC_H
3413 # undef HAVE_MEMORY_H
3414 # undef HAVE_UNISTD_H
3415 # undef HAVE_UTIME_H
3416 # undef HAVE_SYS_STAT_H
3417 # undef HAVE_SYS_TIME_H
3418 # undef HAVE_SYS_TYPES_H
3419 #endif
3420 #if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
3421 #define HAVE_CONIO_H 1
3422 #define HAVE_DIRECT_H 1
3423 #define HAVE_DOS_H 1
3424 #define HAVE_IO_H 1
3425 #define HAVE_SHARE_H 1
3426 #if (ACC_CC_AZTECC)
3427 # undef HAVE_CONIO_H
3428 # undef HAVE_DIRECT_H
3429 # undef HAVE_DIRENT_H
3430 # undef HAVE_MALLOC_H
3431 # undef HAVE_SHARE_H
3432 # undef HAVE_UNISTD_H
3433 # undef HAVE_UTIME_H
3434 # undef HAVE_SYS_STAT_H
3435 # undef HAVE_SYS_TIME_H
3436 # undef HAVE_SYS_TYPES_H
3437 #elif (ACC_CC_BORLANDC)
3438 # undef HAVE_UNISTD_H
3439 # undef HAVE_SYS_TIME_H
3440 # if (ACC_OS_WIN32 || ACC_OS_WIN64)
3441 # undef HAVE_DIRENT_H
3442 # endif
3443 # if (__BORLANDC__ < 0x0400)
3444 # undef HAVE_DIRENT_H
3445 # undef HAVE_UTIME_H
3446 # endif
3447 #elif (ACC_CC_DMC)
3448 # undef HAVE_DIRENT_H
3449 # undef HAVE_UNISTD_H
3450 # define HAVE_SYS_DIRENT_H 1
3451 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3452 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
3453 # define HAVE_ALLOCA_H 1
3454 # undef HAVE_DIRENT_H
3455 # undef HAVE_UNISTD_H
3456 #elif (ACC_CC_IBMC && ACC_OS_OS2)
3457 # undef HAVE_DOS_H
3458 # undef HAVE_DIRENT_H
3459 # undef HAVE_UNISTD_H
3460 # undef HAVE_UTIME_H
3461 # undef HAVE_SYS_TIME_H
3462 # define HAVE_SYS_UTIME_H 1
3463 #elif (ACC_CC_CLANG_C2 || ACC_CC_CLANG_MSC || ACC_CC_GHS || ACC_CC_INTELC_MSC || ACC_CC_MSC)
3464 # undef HAVE_DIRENT_H
3465 # undef HAVE_UNISTD_H
3466 # undef HAVE_UTIME_H
3467 # undef HAVE_SYS_TIME_H
3468 # define HAVE_SYS_UTIME_H 1
3469 #elif (ACC_CC_LCCWIN32)
3470 # undef HAVE_DIRENT_H
3471 # undef HAVE_DOS_H
3472 # undef HAVE_UNISTD_H
3473 # undef HAVE_SYS_TIME_H
3474 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
3475 # undef HAVE_UTIME_H
3476 # define HAVE_SYS_UTIME_H 1
3477 #elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
3478 # define HAVE_ALLOCA_H 1
3479 # undef HAVE_DOS_H
3480 # undef HAVE_SHARE_H
3481 # undef HAVE_SYS_TIME_H
3482 #elif (ACC_CC_NDPC)
3483 # undef HAVE_DIRENT_H
3484 # undef HAVE_DOS_H
3485 # undef HAVE_UNISTD_H
3486 # undef HAVE_UTIME_H
3487 # undef HAVE_SYS_TIME_H
3488 #elif (ACC_CC_PACIFICC)
3489 # undef HAVE_DIRECT_H
3490 # undef HAVE_DIRENT_H
3491 # undef HAVE_FCNTL_H
3492 # undef HAVE_IO_H
3493 # undef HAVE_MALLOC_H
3494 # undef HAVE_MEMORY_H
3495 # undef HAVE_SHARE_H
3496 # undef HAVE_UNISTD_H
3497 # undef HAVE_UTIME_H
3498 # undef HAVE_SYS_STAT_H
3499 # undef HAVE_SYS_TIME_H
3500 # undef HAVE_SYS_TYPES_H
3501 #elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
3502 # undef HAVE_DIRENT_H
3503 # undef HAVE_DOS_H
3504 # undef HAVE_MALLOC_H
3505 # undef HAVE_SHARE_H
3506 # undef HAVE_UNISTD_H
3507 # undef HAVE_UTIME_H
3508 # undef HAVE_SYS_TIME_H
3509 # if (__POCC__ < 280)
3510 # else
3511 # define HAVE_SYS_UTIME_H 1
3512 # endif
3513 #elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
3514 # undef HAVE_UTIME_H
3515 # define HAVE_SYS_UTIME_H 1
3516 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
3517 #elif (ACC_CC_SYMANTECC)
3518 # undef HAVE_DIRENT_H
3519 # undef HAVE_UNISTD_H
3520 # if (__SC__ < 0x700)
3521 # undef HAVE_UTIME_H
3522 # undef HAVE_SYS_TIME_H
3523 # endif
3524 #elif (ACC_CC_TOPSPEEDC)
3525 # undef HAVE_DIRENT_H
3526 # undef HAVE_UNISTD_H
3527 # undef HAVE_UTIME_H
3528 # undef HAVE_SYS_STAT_H
3529 # undef HAVE_SYS_TIME_H
3530 # undef HAVE_SYS_TYPES_H
3531 #elif (ACC_CC_TURBOC)
3532 # undef HAVE_UNISTD_H
3533 # undef HAVE_SYS_TIME_H
3534 # undef HAVE_SYS_TYPES_H
3535 # if (ACC_OS_WIN32 || ACC_OS_WIN64)
3536 # undef HAVE_DIRENT_H
3537 # endif
3538 # if (__TURBOC__ < 0x0200)
3539 # undef HAVE_SIGNAL_H
3540 # endif
3541 # if (__TURBOC__ < 0x0400)
3542 # undef HAVE_DIRECT_H
3543 # undef HAVE_DIRENT_H
3544 # undef HAVE_MALLOC_H
3545 # undef HAVE_MEMORY_H
3546 # undef HAVE_UTIME_H
3547 # endif
3548 #elif (ACC_CC_WATCOMC)
3549 # undef HAVE_DIRENT_H
3550 # undef HAVE_UTIME_H
3551 # undef HAVE_SYS_TIME_H
3552 # define HAVE_SYS_UTIME_H 1
3553 # if (__WATCOMC__ < 950)
3554 # undef HAVE_UNISTD_H
3555 # endif
3556 #elif (ACC_CC_ZORTECHC)
3557 # undef HAVE_DIRENT_H
3558 # undef HAVE_MEMORY_H
3559 # undef HAVE_UNISTD_H
3560 # undef HAVE_UTIME_H
3561 # undef HAVE_SYS_TIME_H
3562 #endif
3563 #endif
3564 #if (ACC_OS_CONSOLE)
3565 # undef HAVE_DIRENT_H
3566 #endif
3567 #if (ACC_OS_EMBEDDED)
3568 # undef HAVE_DIRENT_H
3569 #endif
3570 #if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
3571 # undef HAVE_DIRENT_H
3572 # undef HAVE_FCNTL_H
3573 # undef HAVE_MALLOC_H
3574 # undef HAVE_UNISTD_H
3575 # undef HAVE_UTIME_H
3576 # undef HAVE_SYS_STAT_H
3577 # undef HAVE_SYS_TIME_H
3578 # undef HAVE_SYS_TYPES_H
3579 #endif
3580 #if (ACC_LIBC_GLIBC >= 0x020100ul)
3581 # define HAVE_STDINT_H 1
3582 #elif (ACC_LIBC_DIETLIBC)
3583 # undef HAVE_STDINT_H
3584 #elif (ACC_LIBC_UCLIBC)
3585 # define HAVE_STDINT_H 1
3586 #elif (ACC_CC_BORLANDC) && (__BORLANDC__ >= 0x560)
3587 # undef HAVE_STDINT_H
3588 #elif (ACC_CC_DMC) && (__DMC__ >= 0x825)
3589 # define HAVE_STDINT_H 1
3590 #endif
3591 #if (HAVE_SYS_TIME_H && HAVE_TIME_H)
3592 # define TIME_WITH_SYS_TIME 1
3593 #endif
3594 #endif
3595 #endif
3596 #if !(ACC_CFG_AUTO_NO_FUNCTIONS)
3597 #if (ACC_LIBC_NAKED)
3598 #elif (ACC_LIBC_FREESTANDING)
3599 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
3600 # define HAVE_LONGJMP 1
3601 # define HAVE_MEMCMP 1
3602 # define HAVE_MEMCPY 1
3603 # define HAVE_MEMMOVE 1
3604 # define HAVE_MEMSET 1
3605 # define HAVE_SETJMP 1
3606 #else
3607 #define HAVE_ACCESS 1
3608 #define HAVE_ALLOCA 1
3609 #define HAVE_ATEXIT 1
3610 #define HAVE_ATOI 1
3611 #define HAVE_ATOL 1
3612 #define HAVE_CHMOD 1
3613 #define HAVE_CHOWN 1
3614 #define HAVE_CTIME 1
3615 #define HAVE_DIFFTIME 1
3616 #define HAVE_FILENO 1
3617 #define HAVE_FSTAT 1
3618 #define HAVE_GETENV 1
3619 #define HAVE_GETTIMEOFDAY 1
3620 #define HAVE_GMTIME 1
3621 #define HAVE_ISATTY 1
3622 #define HAVE_LOCALTIME 1
3623 #define HAVE_LONGJMP 1
3624 #define HAVE_LSTAT 1
3625 #define HAVE_MEMCMP 1
3626 #define HAVE_MEMCPY 1
3627 #define HAVE_MEMMOVE 1
3628 #define HAVE_MEMSET 1
3629 #define HAVE_MKDIR 1
3630 #define HAVE_MKTIME 1
3631 #define HAVE_QSORT 1
3632 #define HAVE_RAISE 1
3633 #define HAVE_RMDIR 1
3634 #define HAVE_SETJMP 1
3635 #define HAVE_SIGNAL 1
3636 #define HAVE_SNPRINTF 1
3637 #define HAVE_STAT 1
3638 #define HAVE_STRCHR 1
3639 #define HAVE_STRDUP 1
3640 #define HAVE_STRERROR 1
3641 #define HAVE_STRFTIME 1
3642 #define HAVE_STRRCHR 1
3643 #define HAVE_STRSTR 1
3644 #define HAVE_TIME 1
3645 #define HAVE_UMASK 1
3646 #define HAVE_UTIME 1
3647 #define HAVE_VSNPRINTF 1
3648 #if (ACC_OS_BEOS || ACC_OS_CYGWIN || ACC_OS_POSIX || ACC_OS_QNX || ACC_OS_VMS)
3649 # define HAVE_STRCASECMP 1
3650 # define HAVE_STRNCASECMP 1
3651 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
3652 # define HAVE_STRCASECMP 1
3653 # define HAVE_STRNCASECMP 1
3654 #else
3655 # define HAVE_STRICMP 1
3656 # define HAVE_STRNICMP 1
3657 #endif
3658 #if (ACC_OS_POSIX)
3659 # if (ACC_OS_POSIX_AIX)
3660 # define HAVE_GETRUSAGE 1
3661 # elif (ACC_OS_POSIX_DARWIN && ACC_LIBC_MSL)
3662 # undef HAVE_CHOWN
3663 # undef HAVE_LSTAT
3664 # elif (ACC_OS_POSIX_UNICOS)
3665 # undef HAVE_ALLOCA
3666 # undef HAVE_SNPRINTF
3667 # undef HAVE_VSNPRINTF
3668 # endif
3669 # if (ACC_CC_TINYC)
3670 # undef HAVE_ALLOCA
3671 # endif
3672 # if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
3673 # define HAVE_GETRUSAGE 1
3674 # define HAVE_GETPAGESIZE 1
3675 # define HAVE_MMAP 1
3676 # define HAVE_MPROTECT 1
3677 # define HAVE_MUNMAP 1
3678 # endif
3679 #elif (ACC_OS_CYGWIN)
3680 # if (ACC_CC_GNUC < 0x025a00ul)
3681 # undef HAVE_GETTIMEOFDAY
3682 # undef HAVE_LSTAT
3683 # endif
3684 # if (ACC_CC_GNUC < 0x025f00ul)
3685 # undef HAVE_SNPRINTF
3686 # undef HAVE_VSNPRINTF
3687 # endif
3688 #elif (ACC_OS_EMX)
3689 # undef HAVE_CHOWN
3690 # undef HAVE_LSTAT
3691 #elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
3692 # if !defined(__MINT__)
3693 # undef HAVE_SNPRINTF
3694 # undef HAVE_VSNPRINTF
3695 # endif
3696 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
3697 # undef HAVE_ALLOCA
3698 # undef HAVE_ACCESS
3699 # undef HAVE_CHMOD
3700 # undef HAVE_CHOWN
3701 # undef HAVE_FSTAT
3702 # undef HAVE_GETTIMEOFDAY
3703 # undef HAVE_LSTAT
3704 # undef HAVE_SNPRINTF
3705 # undef HAVE_UMASK
3706 # undef HAVE_UTIME
3707 # undef HAVE_VSNPRINTF
3708 #endif
3709 #if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
3710 #undef HAVE_CHOWN
3711 #undef HAVE_GETTIMEOFDAY
3712 #undef HAVE_LSTAT
3713 #undef HAVE_UMASK
3714 #if (ACC_CC_AZTECC)
3715 # undef HAVE_ALLOCA
3716 # undef HAVE_DIFFTIME
3717 # undef HAVE_FSTAT
3718 # undef HAVE_STRDUP
3719 # undef HAVE_SNPRINTF
3720 # undef HAVE_UTIME
3721 # undef HAVE_VSNPRINTF
3722 #elif (ACC_CC_BORLANDC)
3723 # if (__BORLANDC__ < 0x0400)
3724 # undef HAVE_ALLOCA
3725 # undef HAVE_UTIME
3726 # endif
3727 # if ((__BORLANDC__ < 0x0410) && ACC_OS_WIN16)
3728 # undef HAVE_ALLOCA
3729 # endif
3730 # if (__BORLANDC__ < 0x0550)
3731 # undef HAVE_SNPRINTF
3732 # undef HAVE_VSNPRINTF
3733 # endif
3734 #elif (ACC_CC_DMC)
3735 # if (ACC_OS_WIN16)
3736 # undef HAVE_ALLOCA
3737 # endif
3738 # define snprintf _snprintf
3739 # define vsnprintf _vsnprintf
3740 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3741 # undef HAVE_SNPRINTF
3742 # undef HAVE_VSNPRINTF
3743 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
3744 # undef HAVE_SNPRINTF
3745 # undef HAVE_VSNPRINTF
3746 #elif (ACC_CC_GHS)
3747 # undef HAVE_ALLOCA
3748 # ifndef snprintf
3749 # define snprintf _snprintf
3750 # endif
3751 # ifndef vsnprintf
3752 # define vsnprintf _vsnprintf
3753 # endif
3754 #elif (ACC_CC_IBMC)
3755 # undef HAVE_SNPRINTF
3756 # undef HAVE_VSNPRINTF
3757 #elif (ACC_CC_CLANG_MSC || ACC_CC_INTELC_MSC)
3758 # ifndef snprintf
3759 # define snprintf _snprintf
3760 # endif
3761 # ifndef vsnprintf
3762 # define vsnprintf _vsnprintf
3763 # endif
3764 #elif (ACC_CC_LCCWIN32)
3765 # define utime _utime
3766 #elif (ACC_CC_CLANG_C2 || ACC_CC_MSC)
3767 # if (_MSC_VER < 600)
3768 # undef HAVE_STRFTIME
3769 # endif
3770 # if (_MSC_VER < 700)
3771 # undef HAVE_SNPRINTF
3772 # undef HAVE_VSNPRINTF
3773 # elif (_MSC_VER < 1500)
3774 # ifndef snprintf
3775 # define snprintf _snprintf
3776 # endif
3777 # ifndef vsnprintf
3778 # define vsnprintf _vsnprintf
3779 # endif
3780 # elif (_MSC_VER < 1900)
3781 # ifndef snprintf
3782 # define snprintf _snprintf
3783 # endif
3784 # endif
3785 # if ((_MSC_VER < 800) && ACC_OS_WIN16)
3786 # undef HAVE_ALLOCA
3787 # endif
3788 # if (ACC_ARCH_I086) && defined(__cplusplus)
3789 # undef HAVE_LONGJMP
3790 # undef HAVE_SETJMP
3791 # endif
3792 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
3793 # if (ACC_CC_GNUC < 0x025f00ul)
3794 # undef HAVE_SNPRINTF
3795 # undef HAVE_VSNPRINTF
3796 # else
3797 # define snprintf _snprintf
3798 # define vsnprintf _vsnprintf
3799 # endif
3800 #elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
3801 # if (__MSL__ < 0x8000ul)
3802 # undef HAVE_CHMOD
3803 # endif
3804 #elif (ACC_CC_NDPC)
3805 # undef HAVE_ALLOCA
3806 # undef HAVE_SNPRINTF
3807 # undef HAVE_STRNICMP
3808 # undef HAVE_UTIME
3809 # undef HAVE_VSNPRINTF
3810 # if defined(__cplusplus)
3811 # undef HAVE_STAT
3812 # endif
3813 #elif (ACC_CC_PACIFICC)
3814 # undef HAVE_ACCESS
3815 # undef HAVE_ALLOCA
3816 # undef HAVE_CHMOD
3817 # undef HAVE_DIFFTIME
3818 # undef HAVE_FSTAT
3819 # undef HAVE_MKTIME
3820 # undef HAVE_RAISE
3821 # undef HAVE_SNPRINTF
3822 # undef HAVE_STRFTIME
3823 # undef HAVE_UTIME
3824 # undef HAVE_VSNPRINTF
3825 #elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
3826 # if (__POCC__ < 280)
3827 # define alloca _alloca
3828 # undef HAVE_UTIME
3829 # endif
3830 #elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
3831 # define snprintf _snprintf
3832 # define vsnprintf _vsnprintf
3833 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
3834 # undef HAVE_SNPRINTF
3835 # undef HAVE_VSNPRINTF
3836 #elif (ACC_CC_SYMANTECC)
3837 # if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
3838 # undef HAVE_ALLOCA
3839 # endif
3840 # if (__SC__ < 0x600)
3841 # undef HAVE_SNPRINTF
3842 # undef HAVE_VSNPRINTF
3843 # else
3844 # define snprintf _snprintf
3845 # define vsnprintf _vsnprintf
3846 # endif
3847 # if (__SC__ < 0x700)
3848 # undef HAVE_DIFFTIME
3849 # undef HAVE_UTIME
3850 # endif
3851 #elif (ACC_CC_TOPSPEEDC)
3852 # undef HAVE_SNPRINTF
3853 # undef HAVE_VSNPRINTF
3854 #elif (ACC_CC_TURBOC)
3855 # undef HAVE_ALLOCA
3856 # undef HAVE_SNPRINTF
3857 # undef HAVE_VSNPRINTF
3858 # if (__TURBOC__ < 0x0200)
3859 # undef HAVE_RAISE
3860 # undef HAVE_SIGNAL
3861 # endif
3862 # if (__TURBOC__ < 0x0295)
3863 # undef HAVE_MKTIME
3864 # undef HAVE_STRFTIME
3865 # endif
3866 # if (__TURBOC__ < 0x0400)
3867 # undef HAVE_UTIME
3868 # endif
3869 #elif (ACC_CC_WATCOMC)
3870 # if (__WATCOMC__ < 1100)
3871 # undef HAVE_SNPRINTF
3872 # undef HAVE_VSNPRINTF
3873 # elif (__WATCOMC__ < 1200)
3874 # define snprintf _snprintf
3875 # define vsnprintf _vsnprintf
3876 # endif
3877 #elif (ACC_CC_ZORTECHC)
3878 # if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
3879 # undef HAVE_ALLOCA
3880 # endif
3881 # undef HAVE_DIFFTIME
3882 # undef HAVE_SNPRINTF
3883 # undef HAVE_UTIME
3884 # undef HAVE_VSNPRINTF
3885 #endif
3886 #endif
3887 #if (ACC_OS_CONSOLE)
3888 # undef HAVE_ACCESS
3889 # undef HAVE_CHMOD
3890 # undef HAVE_CHOWN
3891 # undef HAVE_GETTIMEOFDAY
3892 # undef HAVE_LSTAT
3893 # undef HAVE_TIME
3894 # undef HAVE_UMASK
3895 # undef HAVE_UTIME
3896 #endif
3897 #if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
3898 # undef HAVE_ACCESS
3899 # undef HAVE_CHMOD
3900 # undef HAVE_CHOWN
3901 # undef HAVE_FILENO
3902 # undef HAVE_FSTAT
3903 # undef HAVE_GETTIMEOFDAY
3904 # undef HAVE_LSTAT
3905 # undef HAVE_STAT
3906 # undef HAVE_UMASK
3907 # undef HAVE_UTIME
3908 # if 1
3909 # undef HAVE_ALLOCA
3910 # undef HAVE_ISATTY
3911 # undef HAVE_MKDIR
3912 # undef HAVE_RMDIR
3913 # undef HAVE_STRDUP
3914 # undef HAVE_STRICMP
3915 # undef HAVE_STRNICMP
3916 # endif
3917 #endif
3918 #endif
3919 #endif
3920 #if !(ACC_CFG_AUTO_NO_SIZES)
3921 #if !defined(SIZEOF_SHORT) && defined(ACC_SIZEOF_SHORT)
3922 # define SIZEOF_SHORT ACC_SIZEOF_SHORT
3923 #endif
3924 #if !defined(SIZEOF_INT) && defined(ACC_SIZEOF_INT)
3925 # define SIZEOF_INT ACC_SIZEOF_INT
3926 #endif
3927 #if !defined(SIZEOF_LONG) && defined(ACC_SIZEOF_LONG)
3928 # define SIZEOF_LONG ACC_SIZEOF_LONG
3929 #endif
3930 #if !defined(SIZEOF_LONG_LONG) && defined(ACC_SIZEOF_LONG_LONG)
3931 # define SIZEOF_LONG_LONG ACC_SIZEOF_LONG_LONG
3932 #endif
3933 #if !defined(SIZEOF___INT32) && defined(ACC_SIZEOF___INT32)
3934 # define SIZEOF___INT32 ACC_SIZEOF___INT32
3935 #endif
3936 #if !defined(SIZEOF___INT64) && defined(ACC_SIZEOF___INT64)
3937 # define SIZEOF___INT64 ACC_SIZEOF___INT64
3938 #endif
3939 #if !defined(SIZEOF_VOID_P) && defined(ACC_SIZEOF_VOID_P)
3940 # define SIZEOF_VOID_P ACC_SIZEOF_VOID_P
3941 #endif
3942 #if !defined(SIZEOF_SIZE_T) && defined(ACC_SIZEOF_SIZE_T)
3943 # define SIZEOF_SIZE_T ACC_SIZEOF_SIZE_T
3944 #endif
3945 #if !defined(SIZEOF_PTRDIFF_T) && defined(ACC_SIZEOF_PTRDIFF_T)
3946 # define SIZEOF_PTRDIFF_T ACC_SIZEOF_PTRDIFF_T
3947 #endif
3948 #endif
3949 #if (HAVE_SIGNAL) && !defined(RETSIGTYPE)
3950 # define RETSIGTYPE void
3951 #endif
3952 #endif
3953 #if !(ACC_LANG_ASSEMBLER)
3954 #if !(ACC_CFG_SKIP_ACC_TYPES)
3955 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
3956 # define acc_signo_t acc_int32e_t
3957 #endif
3958 #if !defined(acc_signo_t)
3959 # define acc_signo_t int
3960 #endif
3961 #if defined(__cplusplus)
3962 extern "C" {
3963 #endif
3964 #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
3965 typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t);
3966 #else
3967 typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
3968 #endif
3969 #if defined(__cplusplus)
3971 #endif
3972 # if !(ACC_CFG_SKIP_ACC_UA)
3973 #if !defined(__acc_ua_volatile)
3974 # define __acc_ua_volatile volatile
3975 #endif
3976 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
3977 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
3978 #elif (ACC_CC_INTELC) && defined(_WIN32)
3979 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
3980 #elif (ACC_CC_LLVM)
3981 #elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
3982 #if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
3983 typedef struct { __acc_ua_volatile acc_uint16e_t v __attribute__((__packed__)); } __acc_ua16_t;
3984 # define __acc_ua16_t __acc_ua16_t
3985 #endif
3986 #if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
3987 typedef struct { __acc_ua_volatile acc_uint32e_t v __attribute__((__packed__)); } __acc_ua32_t;
3988 # define __acc_ua32_t __acc_ua32_t
3989 #endif
3990 #if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
3991 typedef struct { __acc_ua_volatile acc_uint64l_t v __attribute__((__packed__)); } __acc_ua64_t;
3992 # define __acc_ua64_t __acc_ua64_t
3993 #endif
3994 #endif
3995 #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
3996 #if 0
3997 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p))
3998 #define ACC_UA_SET16(p,v) ((* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint16e_t) (v))
3999 #else
4000 #define ACC_UA_GET16(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint16e_t*, __acc_ua_volatile const void*, p))
4001 #define ACC_UA_SET16(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint16e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint16e_t, v))
4002 #endif
4003 #if (ACC_ABI_BIG_ENDIAN)
4004 # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p)
4005 # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v)
4006 #elif (ACC_ABI_LITTLE_ENDIAN)
4007 # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p)
4008 # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v)
4009 #endif
4010 #if (__acc_HAVE_forceinline)
4011 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4012 #if !defined(ACC_UA_GET_LE16)
4013 __acc_static_forceinline
4014 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4015 __attribute__((__unused__))
4016 #endif
4017 unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
4018 __acc_ua_volatile const acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint16e_t*, pp);
4019 unsigned long v;
4020 __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4021 return v;
4023 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
4024 #endif
4025 #if !defined(ACC_UA_SET_LE16)
4026 __acc_static_forceinline
4027 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4028 __attribute__((__unused__))
4029 #endif
4030 void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
4031 __acc_ua_volatile acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint16e_t*, pp);
4032 __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4034 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v)
4035 #endif
4036 #endif
4037 #endif
4038 #if !defined(ACC_UA_COPY16)
4039 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
4040 #endif
4041 #endif
4042 #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
4043 #if 0
4044 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p))
4045 #define ACC_UA_SET32(p,v) ((* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint32e_t) (v))
4046 #else
4047 #define ACC_UA_GET32(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint32e_t*, __acc_ua_volatile const void*, p))
4048 #define ACC_UA_SET32(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint32e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint32e_t, v))
4049 #endif
4050 #if (ACC_ABI_BIG_ENDIAN)
4051 # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p)
4052 # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v)
4053 #elif (ACC_ABI_LITTLE_ENDIAN)
4054 # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p)
4055 # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v)
4056 #endif
4057 #if (__acc_HAVE_forceinline)
4058 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4059 #if !defined(ACC_UA_GET_LE32)
4060 __acc_static_forceinline
4061 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4062 __attribute__((__unused__))
4063 #endif
4064 unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
4065 __acc_ua_volatile const acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint32e_t*, pp);
4066 unsigned long v;
4067 __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4068 return v;
4070 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
4071 #endif
4072 #if !defined(ACC_UA_SET_LE32)
4073 __acc_static_forceinline
4074 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4075 __attribute__((__unused__))
4076 #endif
4077 void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
4078 __acc_ua_volatile acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint32e_t*, pp);
4079 __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4081 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v)
4082 #endif
4083 #endif
4084 #endif
4085 #if !defined(ACC_UA_COPY32)
4086 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
4087 #endif
4088 #endif
4089 #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
4090 #if 0
4091 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p))
4092 #define ACC_UA_SET64(p,v) ((* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p)) = (acc_uint64l_t) (v))
4093 #else
4094 #define ACC_UA_GET64(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint64l_t*, __acc_ua_volatile const void*, p))
4095 #define ACC_UA_SET64(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint64l_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint64l_t, v))
4096 #endif
4097 #if (ACC_ABI_BIG_ENDIAN)
4098 # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p)
4099 # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v)
4100 #elif (ACC_ABI_LITTLE_ENDIAN)
4101 # define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
4102 # define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
4103 #endif
4104 #if !defined(ACC_UA_COPY64)
4105 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
4106 #endif
4107 #endif
4108 # endif
4109 #endif
4110 #endif
4111 #endif
4112 #if defined(ACC_WANT_ACC_TYPE_H)
4113 # undef ACC_WANT_ACC_TYPE_H
4114 # if (ACC_CFG_SKIP_ACC_TYPES)
4115 # error "ACC_WANT_ACC_TYPE_H with ACC_CFG_SKIP_ACC_TYPES"
4116 # endif
4117 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0))
4118 # error "missing defines for sizes"
4119 #endif
4120 #if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0))
4121 # error "missing defines for sizes"
4122 #endif
4123 #define ACC_TYPEOF_CHAR 1u
4124 #define ACC_TYPEOF_SHORT 2u
4125 #define ACC_TYPEOF_INT 3u
4126 #define ACC_TYPEOF_LONG 4u
4127 #define ACC_TYPEOF_LONG_LONG 5u
4128 #define ACC_TYPEOF___INT8 17u
4129 #define ACC_TYPEOF___INT16 18u
4130 #define ACC_TYPEOF___INT32 19u
4131 #define ACC_TYPEOF___INT64 20u
4132 #define ACC_TYPEOF___INT128 21u
4133 #define ACC_TYPEOF___INT256 22u
4134 #define ACC_TYPEOF___MODE_QI 33u
4135 #define ACC_TYPEOF___MODE_HI 34u
4136 #define ACC_TYPEOF___MODE_SI 35u
4137 #define ACC_TYPEOF___MODE_DI 36u
4138 #define ACC_TYPEOF___MODE_TI 37u
4139 #define ACC_TYPEOF_CHAR_P 129u
4140 #if !defined(acc_llong_t)
4141 #if (ACC_SIZEOF_LONG_LONG+0 > 0)
4142 # if !(ACC_LANG_ASSEMBLER)
4143 __acc_gnuc_extension__ typedef long long acc_llong_t__;
4144 __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t__;
4145 # endif
4146 # define acc_llong_t acc_llong_t__
4147 # define acc_ullong_t acc_ullong_t__
4148 #endif
4149 #endif
4150 #if !defined(acc_int16e_t)
4151 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) && (ACC_SIZEOF_SHORT != 2)
4152 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T
4153 #endif
4154 #if (ACC_SIZEOF_LONG == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
4155 # define acc_int16e_t long
4156 # define acc_uint16e_t unsigned long
4157 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_LONG
4158 #elif (ACC_SIZEOF_INT == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
4159 # define acc_int16e_t int
4160 # define acc_uint16e_t unsigned int
4161 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_INT
4162 #elif (ACC_SIZEOF_SHORT == 2)
4163 # define acc_int16e_t short int
4164 # define acc_uint16e_t unsigned short int
4165 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_SHORT
4166 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM)
4167 # if !(ACC_LANG_ASSEMBLER)
4168 typedef int acc_int16e_hi_t__ __attribute__((__mode__(__HI__)));
4169 typedef unsigned int acc_uint16e_hi_t__ __attribute__((__mode__(__HI__)));
4170 # endif
4171 # define acc_int16e_t acc_int16e_hi_t__
4172 # define acc_uint16e_t acc_uint16e_hi_t__
4173 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___MODE_HI
4174 #elif (ACC_SIZEOF___INT16 == 2)
4175 # define acc_int16e_t __int16
4176 # define acc_uint16e_t unsigned __int16
4177 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___INT16
4178 #else
4179 #endif
4180 #endif
4181 #if defined(acc_int16e_t)
4182 # define ACC_SIZEOF_ACC_INT16E_T 2
4183 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == 2)
4184 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T)
4185 #endif
4186 #if !defined(acc_int32e_t)
4187 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) && (ACC_SIZEOF_INT != 4)
4188 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T
4189 #endif
4190 #if (ACC_SIZEOF_LONG == 4) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT)
4191 # define acc_int32e_t long int
4192 # define acc_uint32e_t unsigned long int
4193 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG
4194 #elif (ACC_SIZEOF_INT == 4)
4195 # define acc_int32e_t int
4196 # define acc_uint32e_t unsigned int
4197 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_INT
4198 #elif (ACC_SIZEOF_SHORT == 4)
4199 # define acc_int32e_t short int
4200 # define acc_uint32e_t unsigned short int
4201 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_SHORT
4202 #elif (ACC_SIZEOF_LONG_LONG == 4)
4203 # define acc_int32e_t acc_llong_t
4204 # define acc_uint32e_t acc_ullong_t
4205 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG_LONG
4206 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
4207 # if !(ACC_LANG_ASSEMBLER)
4208 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
4209 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
4210 # endif
4211 # define acc_int32e_t acc_int32e_si_t__
4212 # define acc_uint32e_t acc_uint32e_si_t__
4213 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
4214 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
4215 # if !(ACC_LANG_ASSEMBLER)
4216 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
4217 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
4218 # endif
4219 # define acc_int32e_t acc_int32e_si_t__
4220 # define acc_uint32e_t acc_uint32e_si_t__
4221 # define ACC_INT32_C(c) (c##LL)
4222 # define ACC_UINT32_C(c) (c##ULL)
4223 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
4224 #elif (ACC_SIZEOF___INT32 == 4)
4225 # define acc_int32e_t __int32
4226 # define acc_uint32e_t unsigned __int32
4227 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___INT32
4228 #else
4229 #endif
4230 #endif
4231 #if defined(acc_int32e_t)
4232 # define ACC_SIZEOF_ACC_INT32E_T 4
4233 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == 4)
4234 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T)
4235 #endif
4236 #if !defined(acc_int64e_t)
4237 #if (ACC_SIZEOF___INT64 == 8)
4238 # if (ACC_CC_BORLANDC) && !defined(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T)
4239 # define ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
4240 # endif
4241 #endif
4242 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && (ACC_SIZEOF_LONG_LONG != 8)
4243 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
4244 #endif
4245 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) && (ACC_SIZEOF___INT64 != 8)
4246 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
4247 #endif
4248 #if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
4249 # define acc_int64e_t int
4250 # define acc_uint64e_t unsigned int
4251 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_INT
4252 #elif (ACC_SIZEOF_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64)
4253 # define acc_int64e_t long int
4254 # define acc_uint64e_t unsigned long int
4255 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG
4256 #elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64)
4257 # define acc_int64e_t acc_llong_t
4258 # define acc_uint64e_t acc_ullong_t
4259 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG_LONG
4260 # if (ACC_CC_BORLANDC)
4261 # define ACC_INT64_C(c) ((c) + 0ll)
4262 # define ACC_UINT64_C(c) ((c) + 0ull)
4263 # elif 0
4264 # define ACC_INT64_C(c) (__acc_gnuc_extension__ (c##LL))
4265 # define ACC_UINT64_C(c) (__acc_gnuc_extension__ (c##ULL))
4266 # else
4267 # define ACC_INT64_C(c) (c##LL)
4268 # define ACC_UINT64_C(c) (c##ULL)
4269 # endif
4270 #elif (ACC_SIZEOF___INT64 == 8)
4271 # define acc_int64e_t __int64
4272 # define acc_uint64e_t unsigned __int64
4273 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
4274 # if (ACC_CC_BORLANDC)
4275 # define ACC_INT64_C(c) ((c) + 0i64)
4276 # define ACC_UINT64_C(c) ((c) + 0ui64)
4277 # else
4278 # define ACC_INT64_C(c) (c##i64)
4279 # define ACC_UINT64_C(c) (c##ui64)
4280 # endif
4281 #else
4282 #endif
4283 #endif
4284 #if defined(acc_int64e_t)
4285 # define ACC_SIZEOF_ACC_INT64E_T 8
4286 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == 8)
4287 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T)
4288 #endif
4289 #if !defined(acc_int32l_t)
4290 #if defined(acc_int32e_t)
4291 # define acc_int32l_t acc_int32e_t
4292 # define acc_uint32l_t acc_uint32e_t
4293 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T
4294 # define ACC_TYPEOF_ACC_INT32L_T ACC_TYPEOF_ACC_INT32E_T
4295 #elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
4296 # define acc_int32l_t int
4297 # define acc_uint32l_t unsigned int
4298 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT
4299 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_INT
4300 #elif (ACC_SIZEOF_LONG >= 4)
4301 # define acc_int32l_t long int
4302 # define acc_uint32l_t unsigned long int
4303 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG
4304 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_LONG
4305 #else
4306 # error "acc_int32l_t"
4307 #endif
4308 #endif
4309 #if 1
4310 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) >= 4)
4311 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T)
4312 #endif
4313 #if !defined(acc_int64l_t)
4314 #if defined(acc_int64e_t)
4315 # define acc_int64l_t acc_int64e_t
4316 # define acc_uint64l_t acc_uint64e_t
4317 # define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T
4318 # define ACC_TYPEOF_ACC_INT64L_T ACC_TYPEOF_ACC_INT64E_T
4319 #else
4320 #endif
4321 #endif
4322 #if defined(acc_int64l_t)
4323 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) >= 8)
4324 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T)
4325 #endif
4326 #if !defined(acc_int32f_t)
4327 #if (ACC_SIZEOF_SIZE_T >= 8)
4328 # define acc_int32f_t acc_int64l_t
4329 # define acc_uint32f_t acc_uint64l_t
4330 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T
4331 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT64L_T
4332 #else
4333 # define acc_int32f_t acc_int32l_t
4334 # define acc_uint32f_t acc_uint32l_t
4335 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T
4336 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT32L_T
4337 #endif
4338 #endif
4339 #if 1
4340 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) >= 4)
4341 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T)
4342 #endif
4343 #if !defined(acc_int64f_t)
4344 #if defined(acc_int64l_t)
4345 # define acc_int64f_t acc_int64l_t
4346 # define acc_uint64f_t acc_uint64l_t
4347 # define ACC_SIZEOF_ACC_INT64F_T ACC_SIZEOF_ACC_INT64L_T
4348 # define ACC_TYPEOF_ACC_INT64F_T ACC_TYPEOF_ACC_INT64L_T
4349 #else
4350 #endif
4351 #endif
4352 #if defined(acc_int64f_t)
4353 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) >= 8)
4354 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T)
4355 #endif
4356 #if !defined(acc_intptr_t)
4357 #if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16))
4358 # define __ACC_INTPTR_T_IS_POINTER 1
4359 # if !(ACC_LANG_ASSEMBLER)
4360 typedef char * acc_intptr_t;
4361 typedef char * acc_uintptr_t;
4362 # endif
4363 # define acc_intptr_t acc_intptr_t
4364 # define acc_uintptr_t acc_uintptr_t
4365 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P
4366 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_CHAR_P
4367 #elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4))
4368 # if !(ACC_LANG_ASSEMBLER)
4369 typedef __w64 int acc_intptr_t;
4370 typedef __w64 unsigned int acc_uintptr_t;
4371 # endif
4372 # define acc_intptr_t acc_intptr_t
4373 # define acc_uintptr_t acc_uintptr_t
4374 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
4375 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
4376 #elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P)
4377 # define acc_intptr_t short
4378 # define acc_uintptr_t unsigned short
4379 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT
4380 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_SHORT
4381 #elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
4382 # define acc_intptr_t int
4383 # define acc_uintptr_t unsigned int
4384 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
4385 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
4386 #elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P)
4387 # define acc_intptr_t long
4388 # define acc_uintptr_t unsigned long
4389 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG
4390 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_LONG
4391 #elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P)
4392 # define acc_intptr_t acc_int64l_t
4393 # define acc_uintptr_t acc_uint64l_t
4394 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T
4395 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_ACC_INT64L_T
4396 #else
4397 # error "acc_intptr_t"
4398 #endif
4399 #endif
4400 #if 1
4401 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) >= sizeof(void *))
4402 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t))
4403 #endif
4404 #if !defined(acc_word_t)
4405 #if defined(ACC_WORDSIZE) && (ACC_WORDSIZE+0 > 0)
4406 #if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !(__ACC_INTPTR_T_IS_POINTER)
4407 # define acc_word_t acc_uintptr_t
4408 # define acc_sword_t acc_intptr_t
4409 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T
4410 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_ACC_INTPTR_T
4411 #elif (ACC_WORDSIZE == ACC_SIZEOF_LONG)
4412 # define acc_word_t unsigned long
4413 # define acc_sword_t long
4414 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG
4415 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_LONG
4416 #elif (ACC_WORDSIZE == ACC_SIZEOF_INT)
4417 # define acc_word_t unsigned int
4418 # define acc_sword_t int
4419 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT
4420 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_INT
4421 #elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT)
4422 # define acc_word_t unsigned short
4423 # define acc_sword_t short
4424 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT
4425 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_SHORT
4426 #elif (ACC_WORDSIZE == 1)
4427 # define acc_word_t unsigned char
4428 # define acc_sword_t signed char
4429 # define ACC_SIZEOF_ACC_WORD_T 1
4430 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_CHAR
4431 #elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T)
4432 # define acc_word_t acc_uint64l_t
4433 # define acc_sword_t acc_int64l_t
4434 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
4435 # define ACC_TYPEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
4436 #elif (ACC_ARCH_SPU) && (ACC_CC_GNUC)
4437 #if 0
4438 # if !(ACC_LANG_ASSEMBLER)
4439 typedef unsigned acc_word_t __attribute__((__mode__(__V16QI__)));
4440 typedef int acc_sword_t __attribute__((__mode__(__V16QI__)));
4441 # endif
4442 # define acc_word_t acc_word_t
4443 # define acc_sword_t acc_sword_t
4444 # define ACC_SIZEOF_ACC_WORD_T 16
4445 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF___MODE_V16QI
4446 #endif
4447 #else
4448 # error "acc_word_t"
4449 #endif
4450 #endif
4451 #endif
4452 #if 1 && defined(acc_word_t)
4453 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_word_t) == ACC_WORDSIZE)
4454 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_sword_t) == ACC_WORDSIZE)
4455 #endif
4456 #if 1
4457 #define acc_int8_t signed char
4458 #define acc_uint8_t unsigned char
4459 #define ACC_SIZEOF_ACC_INT8_T 1
4460 #define ACC_TYPEOF_ACC_INT8_T ACC_TYPEOF_CHAR
4461 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == 1)
4462 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == sizeof(acc_uint8_t))
4463 #endif
4464 #if defined(acc_int16e_t)
4465 #define acc_int16_t acc_int16e_t
4466 #define acc_uint16_t acc_uint16e_t
4467 #define ACC_SIZEOF_ACC_INT16_T ACC_SIZEOF_ACC_INT16E_T
4468 #define ACC_TYPEOF_ACC_INT16_T ACC_TYPEOF_ACC_INT16E_T
4469 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == 2)
4470 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == sizeof(acc_uint16_t))
4471 #endif
4472 #if defined(acc_int32e_t)
4473 #define acc_int32_t acc_int32e_t
4474 #define acc_uint32_t acc_uint32e_t
4475 #define ACC_SIZEOF_ACC_INT32_T ACC_SIZEOF_ACC_INT32E_T
4476 #define ACC_TYPEOF_ACC_INT32_T ACC_TYPEOF_ACC_INT32E_T
4477 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == 4)
4478 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == sizeof(acc_uint32_t))
4479 #endif
4480 #if defined(acc_int64e_t)
4481 #define acc_int64_t acc_int64e_t
4482 #define acc_uint64_t acc_uint64e_t
4483 #define ACC_SIZEOF_ACC_INT64_T ACC_SIZEOF_ACC_INT64E_T
4484 #define ACC_TYPEOF_ACC_INT64_T ACC_TYPEOF_ACC_INT64E_T
4485 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == 8)
4486 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == sizeof(acc_uint64_t))
4487 #endif
4488 #if 1
4489 #define acc_int_least32_t acc_int32l_t
4490 #define acc_uint_least32_t acc_uint32l_t
4491 #define ACC_SIZEOF_ACC_INT_LEAST32_T ACC_SIZEOF_ACC_INT32L_T
4492 #define ACC_TYPEOF_ACC_INT_LEAST32_T ACC_TYPEOF_ACC_INT32L_T
4493 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) >= 4)
4494 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) == sizeof(acc_uint_least32_t))
4495 #endif
4496 #if defined(acc_int64l_t)
4497 #define acc_int_least64_t acc_int64l_t
4498 #define acc_uint_least64_t acc_uint64l_t
4499 #define ACC_SIZEOF_ACC_INT_LEAST64_T ACC_SIZEOF_ACC_INT64L_T
4500 #define ACC_TYPEOF_ACC_INT_LEAST64_T ACC_TYPEOF_ACC_INT64L_T
4501 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) >= 8)
4502 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) == sizeof(acc_uint_least64_t))
4503 #endif
4504 #if 1
4505 #define acc_int_fast32_t acc_int32f_t
4506 #define acc_uint_fast32_t acc_uint32f_t
4507 #define ACC_SIZEOF_ACC_INT_FAST32_T ACC_SIZEOF_ACC_INT32F_T
4508 #define ACC_TYPEOF_ACC_INT_FAST32_T ACC_TYPEOF_ACC_INT32F_T
4509 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) >= 4)
4510 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) == sizeof(acc_uint_fast32_t))
4511 #endif
4512 #if defined(acc_int64f_t)
4513 #define acc_int_fast64_t acc_int64f_t
4514 #define acc_uint_fast64_t acc_uint64f_t
4515 #define ACC_SIZEOF_ACC_INT_FAST64_T ACC_SIZEOF_ACC_INT64F_T
4516 #define ACC_TYPEOF_ACC_INT_FAST64_T ACC_TYPEOF_ACC_INT64F_T
4517 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) >= 8)
4518 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast64_t))
4519 #endif
4520 #if !defined(ACC_INT16_C)
4521 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2)
4522 # define ACC_INT16_C(c) ((c) + 0)
4523 # define ACC_UINT16_C(c) ((c) + 0U)
4524 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2)
4525 # define ACC_INT16_C(c) ((c) + 0L)
4526 # define ACC_UINT16_C(c) ((c) + 0UL)
4527 # elif (ACC_SIZEOF_INT >= 2)
4528 # define ACC_INT16_C(c) (c)
4529 # define ACC_UINT16_C(c) (c##U)
4530 # elif (ACC_SIZEOF_LONG >= 2)
4531 # define ACC_INT16_C(c) (c##L)
4532 # define ACC_UINT16_C(c) (c##UL)
4533 # else
4534 # error "ACC_INT16_C"
4535 # endif
4536 #endif
4537 #if !defined(ACC_INT32_C)
4538 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4)
4539 # define ACC_INT32_C(c) ((c) + 0)
4540 # define ACC_UINT32_C(c) ((c) + 0U)
4541 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4)
4542 # define ACC_INT32_C(c) ((c) + 0L)
4543 # define ACC_UINT32_C(c) ((c) + 0UL)
4544 # elif (ACC_SIZEOF_INT >= 4)
4545 # define ACC_INT32_C(c) (c)
4546 # define ACC_UINT32_C(c) (c##U)
4547 # elif (ACC_SIZEOF_LONG >= 4)
4548 # define ACC_INT32_C(c) (c##L)
4549 # define ACC_UINT32_C(c) (c##UL)
4550 # elif (ACC_SIZEOF_LONG_LONG >= 4)
4551 # define ACC_INT32_C(c) (c##LL)
4552 # define ACC_UINT32_C(c) (c##ULL)
4553 # else
4554 # error "ACC_INT32_C"
4555 # endif
4556 #endif
4557 #if !defined(ACC_INT64_C) && defined(acc_int64l_t)
4558 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8)
4559 # define ACC_INT64_C(c) ((c) + 0)
4560 # define ACC_UINT64_C(c) ((c) + 0U)
4561 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8)
4562 # define ACC_INT64_C(c) ((c) + 0L)
4563 # define ACC_UINT64_C(c) ((c) + 0UL)
4564 # elif (ACC_SIZEOF_INT >= 8)
4565 # define ACC_INT64_C(c) (c)
4566 # define ACC_UINT64_C(c) (c##U)
4567 # elif (ACC_SIZEOF_LONG >= 8)
4568 # define ACC_INT64_C(c) (c##L)
4569 # define ACC_UINT64_C(c) (c##UL)
4570 # else
4571 # error "ACC_INT64_C"
4572 # endif
4573 #endif
4574 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
4575 # define acc_signo_t acc_int32e_t
4576 #endif
4577 #if !defined(acc_signo_t)
4578 # define acc_signo_t int
4579 #endif
4580 #if defined(__cplusplus)
4581 extern "C" {
4582 #endif
4583 #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
4584 typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t);
4585 #else
4586 typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
4587 #endif
4588 #if defined(__cplusplus)
4590 #endif
4591 # if !(ACC_CFG_SKIP_ACC_UA)
4592 #if !defined(__acc_ua_volatile)
4593 # define __acc_ua_volatile volatile
4594 #endif
4595 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
4596 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
4597 #elif (ACC_CC_INTELC) && defined(_WIN32)
4598 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
4599 #elif (ACC_CC_LLVM)
4600 #elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
4601 #if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
4602 typedef struct { __acc_ua_volatile acc_uint16e_t v __attribute__((__packed__)); } __acc_ua16_t;
4603 # define __acc_ua16_t __acc_ua16_t
4604 #endif
4605 #if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
4606 typedef struct { __acc_ua_volatile acc_uint32e_t v __attribute__((__packed__)); } __acc_ua32_t;
4607 # define __acc_ua32_t __acc_ua32_t
4608 #endif
4609 #if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
4610 typedef struct { __acc_ua_volatile acc_uint64l_t v __attribute__((__packed__)); } __acc_ua64_t;
4611 # define __acc_ua64_t __acc_ua64_t
4612 #endif
4613 #endif
4614 #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
4615 #if 0
4616 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p))
4617 #define ACC_UA_SET16(p,v) ((* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint16e_t) (v))
4618 #else
4619 #define ACC_UA_GET16(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint16e_t*, __acc_ua_volatile const void*, p))
4620 #define ACC_UA_SET16(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint16e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint16e_t, v))
4621 #endif
4622 #if (ACC_ABI_BIG_ENDIAN)
4623 # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p)
4624 # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v)
4625 #elif (ACC_ABI_LITTLE_ENDIAN)
4626 # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p)
4627 # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v)
4628 #endif
4629 #if (__acc_HAVE_forceinline)
4630 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4631 #if !defined(ACC_UA_GET_LE16)
4632 __acc_static_forceinline
4633 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4634 __attribute__((__unused__))
4635 #endif
4636 unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
4637 __acc_ua_volatile const acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint16e_t*, pp);
4638 unsigned long v;
4639 __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4640 return v;
4642 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
4643 #endif
4644 #if !defined(ACC_UA_SET_LE16)
4645 __acc_static_forceinline
4646 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4647 __attribute__((__unused__))
4648 #endif
4649 void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
4650 __acc_ua_volatile acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint16e_t*, pp);
4651 __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4653 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v)
4654 #endif
4655 #endif
4656 #endif
4657 #if !defined(ACC_UA_COPY16)
4658 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
4659 #endif
4660 #endif
4661 #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
4662 #if 0
4663 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p))
4664 #define ACC_UA_SET32(p,v) ((* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint32e_t) (v))
4665 #else
4666 #define ACC_UA_GET32(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint32e_t*, __acc_ua_volatile const void*, p))
4667 #define ACC_UA_SET32(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint32e_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint32e_t, v))
4668 #endif
4669 #if (ACC_ABI_BIG_ENDIAN)
4670 # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p)
4671 # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v)
4672 #elif (ACC_ABI_LITTLE_ENDIAN)
4673 # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p)
4674 # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v)
4675 #endif
4676 #if (__acc_HAVE_forceinline)
4677 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4678 #if !defined(ACC_UA_GET_LE32)
4679 __acc_static_forceinline
4680 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4681 __attribute__((__unused__))
4682 #endif
4683 unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
4684 __acc_ua_volatile const acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint32e_t*, pp);
4685 unsigned long v;
4686 __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4687 return v;
4689 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
4690 #endif
4691 #if !defined(ACC_UA_SET_LE32)
4692 __acc_static_forceinline
4693 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4694 __attribute__((__unused__))
4695 #endif
4696 void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
4697 __acc_ua_volatile acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint32e_t*, pp);
4698 __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4700 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v)
4701 #endif
4702 #endif
4703 #endif
4704 #if !defined(ACC_UA_COPY32)
4705 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
4706 #endif
4707 #endif
4708 #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
4709 #if 0
4710 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p))
4711 #define ACC_UA_SET64(p,v) ((* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p)) = (acc_uint64l_t) (v))
4712 #else
4713 #define ACC_UA_GET64(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint64l_t*, __acc_ua_volatile const void*, p))
4714 #define ACC_UA_SET64(p,v) (* ACC_STATIC_CAST2(__acc_ua_volatile acc_uint64l_t*, __acc_ua_volatile void*, p) = ACC_ITRUNC(acc_uint64l_t, v))
4715 #endif
4716 #if (ACC_ABI_BIG_ENDIAN)
4717 # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p)
4718 # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v)
4719 #elif (ACC_ABI_LITTLE_ENDIAN)
4720 # define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
4721 # define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
4722 #endif
4723 #if !defined(ACC_UA_COPY64)
4724 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
4725 #endif
4726 #endif
4727 # endif
4728 #endif
4729 #if defined(ACC_WANT_ACC_INCD_H)
4730 # undef ACC_WANT_ACC_INCD_H
4731 #ifndef __ACC_INCD_H_INCLUDED
4732 #define __ACC_INCD_H_INCLUDED 1
4733 #if (ACC_LIBC_NAKED)
4734 #ifndef __ACC_FALLBACK_STDDEF_H_INCLUDED
4735 #define __ACC_FALLBACK_STDDEF_H_INCLUDED 1
4736 #if defined(__PTRDIFF_TYPE__)
4737 typedef __PTRDIFF_TYPE__ acc_fallback_ptrdiff_t;
4738 #elif defined(__MIPS_PSX2__)
4739 typedef int acc_fallback_ptrdiff_t;
4740 #else
4741 typedef long acc_fallback_ptrdiff_t;
4742 #endif
4743 #if defined(__SIZE_TYPE__)
4744 typedef __SIZE_TYPE__ acc_fallback_size_t;
4745 #elif defined(__MIPS_PSX2__)
4746 typedef unsigned int acc_fallback_size_t;
4747 #else
4748 typedef unsigned long acc_fallback_size_t;
4749 #endif
4750 #if !defined(ptrdiff_t)
4751 typedef acc_fallback_ptrdiff_t ptrdiff_t;
4752 #ifndef _PTRDIFF_T_DEFINED
4753 #define _PTRDIFF_T_DEFINED 1
4754 #endif
4755 #endif
4756 #if !defined(size_t)
4757 typedef acc_fallback_size_t size_t;
4758 #ifndef _SIZE_T_DEFINED
4759 #define _SIZE_T_DEFINED 1
4760 #endif
4761 #endif
4762 #if !defined(__cplusplus) && !defined(wchar_t)
4763 typedef unsigned short wchar_t;
4764 #ifndef _WCHAR_T_DEFINED
4765 #define _WCHAR_T_DEFINED 1
4766 #endif
4767 #endif
4768 #ifndef NULL
4769 #if defined(__cplusplus) && defined(__GNUC__) && (__GNUC__ >= 4)
4770 #define NULL __null
4771 #elif defined(__cplusplus)
4772 #define NULL 0
4773 #else
4774 #define NULL ((void*)0)
4775 #endif
4776 #endif
4777 #ifndef offsetof
4778 #define offsetof(s,m) ((size_t)((ptrdiff_t)&(((s*)0)->m)))
4779 #endif
4780 #endif
4781 #elif (ACC_LIBC_FREESTANDING)
4782 # if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0)
4783 # include <stddef.h>
4784 # endif
4785 # if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0)
4786 # include <stdint.h>
4787 # endif
4788 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
4789 # if defined(HAVE_STDIO_H) && (HAVE_STDIO_H+0)
4790 # include <stdio.h>
4791 # endif
4792 # if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0)
4793 # include <stddef.h>
4794 # endif
4795 # if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0)
4796 # include <stdint.h>
4797 # endif
4798 #else
4799 #include <stdio.h>
4800 #if defined(HAVE_TIME_H) && (HAVE_TIME_H+0) && defined(__MSL__) && defined(__cplusplus)
4801 # include <time.h>
4802 #endif
4803 #if defined(HAVE_SYS_TYPES_H) && (HAVE_SYS_TYPES_H+0)
4804 # include <sys/types.h>
4805 #endif
4806 #if defined(HAVE_SYS_STAT_H) && (HAVE_SYS_STAT_H+0)
4807 # include <sys/stat.h>
4808 #endif
4809 #if defined(STDC_HEADERS) && (STDC_HEADERS+0)
4810 # include <stdlib.h>
4811 #elif defined(HAVE_STDLIB_H) && (HAVE_STDLIB_H+0)
4812 # include <stdlib.h>
4813 #endif
4814 #include <stddef.h>
4815 #if defined(HAVE_STRING_H) && (HAVE_STRING_H+0)
4816 # if defined(STDC_HEADERS) && (STDC_HEADERS+0)
4817 # elif defined(HAVE_MEMORY_H) && (HAVE_MEMORY_H+0)
4818 # include <memory.h>
4819 # endif
4820 # include <string.h>
4821 #endif
4822 #if defined(HAVE_STRINGS_H) && (HAVE_STRINGS_H+0)
4823 # include <strings.h>
4824 #endif
4825 #if defined(HAVE_INTTYPES_H) && (HAVE_INTTYPES_H+0)
4826 # include <inttypes.h>
4827 #endif
4828 #if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0)
4829 # include <stdint.h>
4830 #endif
4831 #if defined(HAVE_UNISTD_H) && (HAVE_UNISTD_H+0)
4832 # include <unistd.h>
4833 #endif
4834 #endif
4835 #endif
4836 #endif
4837 #if defined(ACC_WANT_ACC_INCE_H)
4838 # undef ACC_WANT_ACC_INCE_H
4839 #ifndef __ACC_INCE_H_INCLUDED
4840 #define __ACC_INCE_H_INCLUDED 1
4841 #if (ACC_LIBC_NAKED)
4842 #elif (ACC_LIBC_FREESTANDING)
4843 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
4844 # if (HAVE_SETJMP_H)
4845 # include <setjmp.h>
4846 # endif
4847 #else
4848 #if (HAVE_STDARG_H)
4849 # include <stdarg.h>
4850 #endif
4851 #if (HAVE_CTYPE_H)
4852 # include <ctype.h>
4853 #endif
4854 #if (HAVE_ERRNO_H)
4855 # include <errno.h>
4856 #endif
4857 #if (HAVE_MALLOC_H)
4858 # include <malloc.h>
4859 #endif
4860 #if (HAVE_ALLOCA_H)
4861 # include <alloca.h>
4862 #endif
4863 #if (HAVE_FCNTL_H)
4864 # include <fcntl.h>
4865 #endif
4866 #if (HAVE_DIRENT_H)
4867 # include <dirent.h>
4868 #endif
4869 #if (HAVE_SETJMP_H)
4870 # include <setjmp.h>
4871 #endif
4872 #if (HAVE_SIGNAL_H)
4873 # include <signal.h>
4874 #endif
4875 #if (HAVE_SYS_TIME_H && HAVE_TIME_H)
4876 # include <sys/time.h>
4877 # include <time.h>
4878 #elif (HAVE_TIME_H)
4879 # include <time.h>
4880 #endif
4881 #if (HAVE_UTIME_H)
4882 # include <utime.h>
4883 #elif (HAVE_SYS_UTIME_H)
4884 # include <sys/utime.h>
4885 #endif
4886 #if (HAVE_IO_H)
4887 # include <io.h>
4888 #endif
4889 #if (HAVE_DOS_H)
4890 # include <dos.h>
4891 #endif
4892 #if (HAVE_DIRECT_H)
4893 # include <direct.h>
4894 #endif
4895 #if (HAVE_SHARE_H)
4896 # include <share.h>
4897 #endif
4898 #if (ACC_CC_NDPC)
4899 # include <os.h>
4900 #endif
4901 #if defined(__TOS__) && (defined(__PUREC__) || defined(__TURBOC__))
4902 # include <ext.h>
4903 #endif
4904 #endif
4905 #endif
4906 #endif
4907 #if defined(ACC_WANT_ACC_INCI_H)
4908 # undef ACC_WANT_ACC_INCI_H
4909 #ifndef __ACC_INCI_H_INCLUDED
4910 #define __ACC_INCI_H_INCLUDED 1
4911 #if (ACC_LIBC_NAKED)
4912 #elif (ACC_LIBC_FREESTANDING)
4913 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
4914 #else
4915 #if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
4916 # include <tos.h>
4917 #elif (ACC_HAVE_WINDOWS_H)
4918 # if 1 && !defined(WIN32_LEAN_AND_MEAN)
4919 # define WIN32_LEAN_AND_MEAN 1
4920 # endif
4921 # if 1 && !defined(_WIN32_WINNT)
4922 # define _WIN32_WINNT 0x0400
4923 # endif
4924 # include <windows.h>
4925 # if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
4926 # include <dir.h>
4927 # endif
4928 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_WIN16)
4929 # if (ACC_CC_AZTECC)
4930 # include <model.h>
4931 # include <stat.h>
4932 # elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
4933 # include <alloc.h>
4934 # include <dir.h>
4935 # elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
4936 # include <sys/exceptn.h>
4937 # elif (ACC_CC_PACIFICC)
4938 # include <unixio.h>
4939 # include <stat.h>
4940 # include <sys.h>
4941 # elif (ACC_CC_WATCOMC)
4942 # include <i86.h>
4943 # endif
4944 #elif (ACC_OS_OS216)
4945 # if (ACC_CC_WATCOMC)
4946 # include <i86.h>
4947 # endif
4948 #endif
4949 #if (HAVE_SYS_MMAN_H)
4950 # include <sys/mman.h>
4951 #endif
4952 #if (HAVE_SYS_RESOURCE_H)
4953 # include <sys/resource.h>
4954 #endif
4955 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
4956 # if defined(FP_OFF)
4957 # define ACC_PTR_FP_OFF(x) FP_OFF(x)
4958 # elif defined(_FP_OFF)
4959 # define ACC_PTR_FP_OFF(x) _FP_OFF(x)
4960 # else
4961 # define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
4962 # endif
4963 # if defined(FP_SEG)
4964 # define ACC_PTR_FP_SEG(x) FP_SEG(x)
4965 # elif defined(_FP_SEG)
4966 # define ACC_PTR_FP_SEG(x) _FP_SEG(x)
4967 # else
4968 # define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
4969 # endif
4970 # if defined(MK_FP)
4971 # define ACC_PTR_MK_FP(s,o) MK_FP(s,o)
4972 # elif defined(_MK_FP)
4973 # define ACC_PTR_MK_FP(s,o) _MK_FP(s,o)
4974 # else
4975 # define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
4976 # endif
4977 # if 0
4978 # undef ACC_PTR_FP_OFF
4979 # undef ACC_PTR_FP_SEG
4980 # undef ACC_PTR_MK_FP
4981 # define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
4982 # define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
4983 # define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
4984 # endif
4985 #endif
4986 #endif
4987 #endif
4988 #endif
4989 #if defined(ACC_WANT_ACC_LIB_H)
4990 # undef ACC_WANT_ACC_LIB_H
4991 #ifndef __ACC_LIB_H_INCLUDED
4992 #define __ACC_LIB_H_INCLUDED 1
4993 #if !defined(__ACCLIB_FUNCNAME)
4994 # define __ACCLIB_FUNCNAME(f) f
4995 #endif
4996 #if !defined(ACCLIB_EXTERN)
4997 # define ACCLIB_EXTERN(r,f) extern r __ACCLIB_FUNCNAME(f)
4998 #endif
4999 #if !defined(ACCLIB_EXTERN_NOINLINE)
5000 # if defined(__acc_noinline)
5001 # define ACCLIB_EXTERN_NOINLINE(r,f) extern __acc_noinline r __ACCLIB_FUNCNAME(f)
5002 # else
5003 # define ACCLIB_EXTERN_NOINLINE(r,f) extern r __ACCLIB_FUNCNAME(f)
5004 # endif
5005 #endif
5006 #if (ACC_SIZEOF_LONG > ACC_SIZEOF_VOID_P)
5007 # define acclib_handle_t long
5008 #else
5009 # define acclib_handle_t acc_intptr_t
5010 #endif
5011 #if 0
5012 ACCLIB_EXTERN(int, acc_ascii_digit) (int);
5013 ACCLIB_EXTERN(int, acc_ascii_islower) (int);
5014 ACCLIB_EXTERN(int, acc_ascii_isupper) (int);
5015 ACCLIB_EXTERN(int, acc_ascii_tolower) (int);
5016 ACCLIB_EXTERN(int, acc_ascii_toupper) (int);
5017 ACCLIB_EXTERN(int, acc_ascii_utolower) (int);
5018 ACCLIB_EXTERN(int, acc_ascii_utoupper) (int);
5019 #endif
5020 #define acc_ascii_isdigit(c) ((ACC_ICAST(unsigned, c) - 48) < 10)
5021 #define acc_ascii_islower(c) ((ACC_ICAST(unsigned, c) - 97) < 26)
5022 #define acc_ascii_isupper(c) ((ACC_ICAST(unsigned, c) - 65) < 26)
5023 #define acc_ascii_tolower(c) (ACC_ICAST(int, c) + (acc_ascii_isupper(c) << 5))
5024 #define acc_ascii_toupper(c) (ACC_ICAST(int, c) - (acc_ascii_islower(c) << 5))
5025 #define acc_ascii_utolower(c) acc_ascii_tolower(ACC_ITRUNC(unsigned char, c))
5026 #define acc_ascii_utoupper(c) acc_ascii_toupper(ACC_ITRUNC(unsigned char, c))
5027 #ifndef acc_hsize_t
5028 #if (ACC_HAVE_MM_HUGE_PTR)
5029 # define acc_hsize_t unsigned long
5030 # define acc_hvoid_p void __huge *
5031 # define acc_hchar_p char __huge *
5032 # define acc_hchar_pp char __huge * __huge *
5033 # define acc_hbyte_p unsigned char __huge *
5034 #else
5035 # define acc_hsize_t size_t
5036 # define acc_hvoid_p void *
5037 # define acc_hchar_p char *
5038 # define acc_hchar_pp char **
5039 # define acc_hbyte_p unsigned char *
5040 #endif
5041 #endif
5042 ACCLIB_EXTERN(acc_hvoid_p, acc_halloc) (acc_hsize_t);
5043 ACCLIB_EXTERN(void, acc_hfree) (acc_hvoid_p);
5044 #if (ACC_OS_DOS16 || ACC_OS_OS216)
5045 ACCLIB_EXTERN(void __far*, acc_dos_alloc) (unsigned long);
5046 ACCLIB_EXTERN(int, acc_dos_free) (void __far*);
5047 #endif
5048 ACCLIB_EXTERN(int, acc_hmemcmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5049 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5050 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5051 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemset) (acc_hvoid_p, int, acc_hsize_t);
5052 ACCLIB_EXTERN(acc_hsize_t, acc_hstrlen) (const acc_hchar_p);
5053 ACCLIB_EXTERN(int, acc_hstrcmp) (const acc_hchar_p, const acc_hchar_p);
5054 ACCLIB_EXTERN(int, acc_hstrncmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5055 ACCLIB_EXTERN(int, acc_ascii_hstricmp) (const acc_hchar_p, const acc_hchar_p);
5056 ACCLIB_EXTERN(int, acc_ascii_hstrnicmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5057 ACCLIB_EXTERN(int, acc_ascii_hmemicmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5058 ACCLIB_EXTERN(acc_hchar_p, acc_hstrstr) (const acc_hchar_p, const acc_hchar_p);
5059 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstristr) (const acc_hchar_p, const acc_hchar_p);
5060 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
5061 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemimem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
5062 ACCLIB_EXTERN(acc_hchar_p, acc_hstrcpy) (acc_hchar_p, const acc_hchar_p);
5063 ACCLIB_EXTERN(acc_hchar_p, acc_hstrcat) (acc_hchar_p, const acc_hchar_p);
5064 ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5065 ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5066 ACCLIB_EXTERN(int, acc_hstrscpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5067 ACCLIB_EXTERN(int, acc_hstrscat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5068 ACCLIB_EXTERN(acc_hchar_p, acc_hstrccpy) (acc_hchar_p, const acc_hchar_p, int);
5069 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemccpy) (acc_hvoid_p, const acc_hvoid_p, int, acc_hsize_t);
5070 ACCLIB_EXTERN(acc_hchar_p, acc_hstrchr) (const acc_hchar_p, int);
5071 ACCLIB_EXTERN(acc_hchar_p, acc_hstrrchr) (const acc_hchar_p, int);
5072 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrichr) (const acc_hchar_p, int);
5073 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrrichr) (const acc_hchar_p, int);
5074 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemchr) (const acc_hvoid_p, int, acc_hsize_t);
5075 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemrchr) (const acc_hvoid_p, int, acc_hsize_t);
5076 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemichr) (const acc_hvoid_p, int, acc_hsize_t);
5077 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemrichr) (const acc_hvoid_p, int, acc_hsize_t);
5078 ACCLIB_EXTERN(acc_hsize_t, acc_hstrspn) (const acc_hchar_p, const acc_hchar_p);
5079 ACCLIB_EXTERN(acc_hsize_t, acc_hstrrspn) (const acc_hchar_p, const acc_hchar_p);
5080 ACCLIB_EXTERN(acc_hsize_t, acc_hstrcspn) (const acc_hchar_p, const acc_hchar_p);
5081 ACCLIB_EXTERN(acc_hsize_t, acc_hstrrcspn) (const acc_hchar_p, const acc_hchar_p);
5082 ACCLIB_EXTERN(acc_hchar_p, acc_hstrpbrk) (const acc_hchar_p, const acc_hchar_p);
5083 ACCLIB_EXTERN(acc_hchar_p, acc_hstrrpbrk) (const acc_hchar_p, const acc_hchar_p);
5084 ACCLIB_EXTERN(acc_hchar_p, acc_hstrsep) (acc_hchar_pp, const acc_hchar_p);
5085 ACCLIB_EXTERN(acc_hchar_p, acc_hstrrsep) (acc_hchar_pp, const acc_hchar_p);
5086 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrlwr) (acc_hchar_p);
5087 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrupr) (acc_hchar_p);
5088 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemlwr) (acc_hvoid_p, acc_hsize_t);
5089 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemupr) (acc_hvoid_p, acc_hsize_t);
5090 ACCLIB_EXTERN(acc_hsize_t, acc_hfread) (void *, acc_hvoid_p, acc_hsize_t);
5091 ACCLIB_EXTERN(acc_hsize_t, acc_hfwrite) (void *, const acc_hvoid_p, acc_hsize_t);
5092 #if (ACC_HAVE_MM_HUGE_PTR)
5093 ACCLIB_EXTERN(long, acc_hread) (int, acc_hvoid_p, long);
5094 ACCLIB_EXTERN(long, acc_hwrite) (int, const acc_hvoid_p, long);
5095 #endif
5096 ACCLIB_EXTERN(long, acc_safe_hread) (int, acc_hvoid_p, long);
5097 ACCLIB_EXTERN(long, acc_safe_hwrite) (int, const acc_hvoid_p, long);
5098 ACCLIB_EXTERN(unsigned, acc_ua_get_be16) (const acc_hvoid_p);
5099 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_be24) (const acc_hvoid_p);
5100 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_be32) (const acc_hvoid_p);
5101 ACCLIB_EXTERN(void, acc_ua_set_be16) (acc_hvoid_p, unsigned);
5102 ACCLIB_EXTERN(void, acc_ua_set_be24) (acc_hvoid_p, acc_uint32l_t);
5103 ACCLIB_EXTERN(void, acc_ua_set_be32) (acc_hvoid_p, acc_uint32l_t);
5104 ACCLIB_EXTERN(unsigned, acc_ua_get_le16) (const acc_hvoid_p);
5105 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_le24) (const acc_hvoid_p);
5106 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_le32) (const acc_hvoid_p);
5107 ACCLIB_EXTERN(void, acc_ua_set_le16) (acc_hvoid_p, unsigned);
5108 ACCLIB_EXTERN(void, acc_ua_set_le24) (acc_hvoid_p, acc_uint32l_t);
5109 ACCLIB_EXTERN(void, acc_ua_set_le32) (acc_hvoid_p, acc_uint32l_t);
5110 #if defined(acc_int64l_t)
5111 ACCLIB_EXTERN(acc_uint64l_t, acc_ua_get_be64) (const acc_hvoid_p);
5112 ACCLIB_EXTERN(void, acc_ua_set_be64) (acc_hvoid_p, acc_uint64l_t);
5113 ACCLIB_EXTERN(acc_uint64l_t, acc_ua_get_le64) (const acc_hvoid_p);
5114 ACCLIB_EXTERN(void, acc_ua_set_le64) (acc_hvoid_p, acc_uint64l_t);
5115 #endif
5116 ACCLIB_EXTERN_NOINLINE(short, acc_vget_short) (short, int);
5117 ACCLIB_EXTERN_NOINLINE(int, acc_vget_int) (int, int);
5118 ACCLIB_EXTERN_NOINLINE(long, acc_vget_long) (long, int);
5119 #if defined(acc_int64l_t)
5120 ACCLIB_EXTERN_NOINLINE(acc_int64l_t, acc_vget_acc_int64l_t) (acc_int64l_t, int);
5121 #endif
5122 ACCLIB_EXTERN_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t, int);
5123 #if !(ACC_CFG_NO_FLOAT)
5124 ACCLIB_EXTERN_NOINLINE(float, acc_vget_float) (float, int);
5125 #endif
5126 #if !(ACC_CFG_NO_DOUBLE)
5127 ACCLIB_EXTERN_NOINLINE(double, acc_vget_double) (double, int);
5128 #endif
5129 ACCLIB_EXTERN_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_p) (acc_hvoid_p, int);
5130 ACCLIB_EXTERN_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p, int);
5131 #if !defined(ACC_FN_PATH_MAX)
5132 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
5133 # define ACC_FN_PATH_MAX 143
5134 #elif (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN32 || ACC_OS_WIN64)
5135 # define ACC_FN_PATH_MAX 259
5136 #elif (ACC_OS_TOS)
5137 # define ACC_FN_PATH_MAX 259
5138 #endif
5139 #endif
5140 #if !defined(ACC_FN_PATH_MAX)
5141 # define ACC_FN_PATH_MAX 1023
5142 #endif
5143 #if !defined(ACC_FN_NAME_MAX)
5144 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
5145 # define ACC_FN_NAME_MAX 12
5146 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
5147 # define ACC_FN_NAME_MAX 12
5148 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
5149 #elif (ACC_OS_DOS32)
5150 # define ACC_FN_NAME_MAX 12
5151 #endif
5152 #endif
5153 #if !defined(ACC_FN_NAME_MAX)
5154 # define ACC_FN_NAME_MAX ACC_FN_PATH_MAX
5155 #endif
5156 #define ACC_FNMATCH_NOESCAPE 1
5157 #define ACC_FNMATCH_PATHNAME 2
5158 #define ACC_FNMATCH_PATHSTAR 4
5159 #define ACC_FNMATCH_PERIOD 8
5160 #define ACC_FNMATCH_ASCII_CASEFOLD 16
5161 ACCLIB_EXTERN(int, acc_fnmatch) (const acc_hchar_p, const acc_hchar_p, int);
5162 #undef __ACCLIB_USE_OPENDIR
5163 #if (HAVE_DIRENT_H || ACC_CC_WATCOMC)
5164 # define __ACCLIB_USE_OPENDIR 1
5165 # if (ACC_OS_DOS32 && defined(__BORLANDC__))
5166 # elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
5167 # elif (ACC_OS_OS2 || ACC_OS_OS216)
5168 # elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
5169 # elif (ACC_OS_WIN32 && !(ACC_HAVE_WINDOWS_H))
5170 # elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_TOS || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
5171 # undef __ACCLIB_USE_OPENDIR
5172 # endif
5173 #endif
5174 typedef struct
5176 #if defined(__ACCLIB_USE_OPENDIR)
5177 void* u_dirp;
5178 # if (ACC_CC_WATCOMC)
5179 unsigned short f_time;
5180 unsigned short f_date;
5181 unsigned long f_size;
5182 # endif
5183 char f_name[ACC_FN_NAME_MAX+1];
5184 #elif (ACC_OS_WIN32 || ACC_OS_WIN64)
5185 acclib_handle_t u_handle;
5186 unsigned f_attr;
5187 unsigned f_size_low;
5188 unsigned f_size_high;
5189 char f_name[ACC_FN_NAME_MAX+1];
5190 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_TOS || ACC_OS_WIN16)
5191 char u_dta[21];
5192 unsigned char f_attr;
5193 unsigned short f_time;
5194 unsigned short f_date;
5195 unsigned short f_size_low;
5196 unsigned short f_size_high;
5197 char f_name[ACC_FN_NAME_MAX+1];
5198 char u_dirp;
5199 #else
5200 void* u_dirp;
5201 char f_name[ACC_FN_NAME_MAX+1];
5202 #endif
5203 } acc_dir_t;
5204 #ifndef acc_dir_p
5205 #define acc_dir_p acc_dir_t *
5206 #endif
5207 ACCLIB_EXTERN(int, acc_opendir) (acc_dir_p, const char*);
5208 ACCLIB_EXTERN(int, acc_readdir) (acc_dir_p);
5209 ACCLIB_EXTERN(int, acc_closedir) (acc_dir_p);
5210 #if (ACC_CC_GNUC) && (defined(__CYGWIN__) || defined(__MINGW32__))
5211 # define acc_alloca(x) __builtin_alloca((x))
5212 #elif (ACC_CC_GNUC) && (ACC_OS_CONSOLE_PS2)
5213 # define acc_alloca(x) __builtin_alloca((x))
5214 #elif (ACC_CC_BORLANDC || ACC_CC_LCC) && defined(__linux__)
5215 #elif (HAVE_ALLOCA)
5216 # define acc_alloca(x) ACC_STATIC_CAST(void *, alloca((x)))
5217 #endif
5218 #if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
5219 # define acc_stackavail() stackavail()
5220 #elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0410))
5221 # define acc_stackavail() stackavail()
5222 #elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0400))
5223 # if (ACC_OS_WIN16) && (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
5224 # else
5225 # define acc_stackavail() stackavail()
5226 # endif
5227 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_DMC || ACC_CC_SYMANTECC))
5228 # define acc_stackavail() stackavail()
5229 #elif ((ACC_ARCH_I086) && ACC_CC_MSC && (_MSC_VER >= 700))
5230 # define acc_stackavail() _stackavail()
5231 #elif ((ACC_ARCH_I086) && ACC_CC_MSC)
5232 # define acc_stackavail() stackavail()
5233 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && ACC_CC_TURBOC && (__TURBOC__ >= 0x0450))
5234 # define acc_stackavail() stackavail()
5235 #elif (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ >= 0x0400))
5236 ACC_EXTERN_C size_t __cdecl stackavail(void);
5237 # define acc_stackavail() stackavail()
5238 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_WATCOMC))
5239 # define acc_stackavail() stackavail()
5240 #elif (ACC_ARCH_I086 && ACC_CC_ZORTECHC)
5241 # define acc_stackavail() _chkstack()
5242 #endif
5243 ACCLIB_EXTERN(acc_intptr_t, acc_get_osfhandle) (int);
5244 ACCLIB_EXTERN(const char *, acc_getenv) (const char *);
5245 ACCLIB_EXTERN(int, acc_isatty) (int);
5246 ACCLIB_EXTERN(int, acc_mkdir) (const char*, unsigned);
5247 ACCLIB_EXTERN(int, acc_rmdir) (const char*);
5248 ACCLIB_EXTERN(int, acc_response) (int*, char***);
5249 ACCLIB_EXTERN(int, acc_set_binmode) (int, int);
5250 #if defined(acc_int32e_t)
5251 ACCLIB_EXTERN(acc_int32e_t, acc_muldiv32s) (acc_int32e_t, acc_int32e_t, acc_int32e_t);
5252 ACCLIB_EXTERN(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t, acc_uint32e_t, acc_uint32e_t);
5253 #endif
5254 ACCLIB_EXTERN(void, acc_wildargv) (int*, char***);
5255 ACCLIB_EXTERN_NOINLINE(void, acc_debug_break) (void);
5256 ACCLIB_EXTERN_NOINLINE(void, acc_debug_nop) (void);
5257 ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_query) (void);
5258 ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_enable) (int);
5259 ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_qemu) (void);
5260 ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void);
5261 #if defined(acc_int32e_t)
5262 ACCLIB_EXTERN(int, acc_tsc_read) (acc_uint32e_t*);
5263 #endif
5264 struct acc_pclock_handle_t;
5265 struct acc_pclock_t;
5266 typedef struct acc_pclock_handle_t acc_pclock_handle_t;
5267 typedef struct acc_pclock_t acc_pclock_t;
5268 #ifndef acc_pclock_handle_p
5269 #define acc_pclock_handle_p acc_pclock_handle_t *
5270 #endif
5271 #ifndef acc_pclock_p
5272 #define acc_pclock_p acc_pclock_t *
5273 #endif
5274 #define ACC_PCLOCK_REALTIME 0
5275 #define ACC_PCLOCK_MONOTONIC 1
5276 #define ACC_PCLOCK_PROCESS_CPUTIME_ID 2
5277 #define ACC_PCLOCK_THREAD_CPUTIME_ID 3
5278 typedef int (*acc_pclock_gettime_t) (acc_pclock_handle_p, acc_pclock_p);
5279 struct acc_pclock_handle_t {
5280 acclib_handle_t h;
5281 int mode;
5282 int read_error;
5283 const char* name;
5284 acc_pclock_gettime_t gettime;
5285 #if defined(acc_int64l_t)
5286 acc_uint64l_t ticks_base;
5287 #endif
5288 };
5289 struct acc_pclock_t {
5290 #if defined(acc_int64l_t)
5291 acc_int64l_t tv_sec;
5292 #else
5293 acc_int32l_t tv_sec_high;
5294 acc_uint32l_t tv_sec_low;
5295 #endif
5296 acc_uint32l_t tv_nsec;
5297 };
5298 ACCLIB_EXTERN(int, acc_pclock_open) (acc_pclock_handle_p, int);
5299 ACCLIB_EXTERN(int, acc_pclock_open_default) (acc_pclock_handle_p);
5300 ACCLIB_EXTERN(int, acc_pclock_close) (acc_pclock_handle_p);
5301 ACCLIB_EXTERN(void, acc_pclock_read) (acc_pclock_handle_p, acc_pclock_p);
5302 #if !(ACC_CFG_NO_DOUBLE)
5303 ACCLIB_EXTERN(double, acc_pclock_get_elapsed) (acc_pclock_handle_p, const acc_pclock_p, const acc_pclock_p);
5304 #endif
5305 ACCLIB_EXTERN(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p, unsigned);
5306 struct acc_getopt_t;
5307 typedef struct acc_getopt_t acc_getopt_t;
5308 #ifndef acc_getopt_p
5309 #define acc_getopt_p acc_getopt_t *
5310 #endif
5311 struct acc_getopt_longopt_t;
5312 typedef struct acc_getopt_longopt_t acc_getopt_longopt_t;
5313 #ifndef acc_getopt_longopt_p
5314 #define acc_getopt_longopt_p acc_getopt_longopt_t *
5315 #endif
5316 struct acc_getopt_longopt_t {
5317 const char* name;
5318 int has_arg;
5319 int* flag;
5320 int val;
5321 };
5322 typedef void (*acc_getopt_opterr_t)(acc_getopt_p, const char*, void *);
5323 struct acc_getopt_t {
5324 void *user;
5325 const char *progname;
5326 int bad_option;
5327 char *optarg;
5328 acc_getopt_opterr_t opterr;
5329 int optind;
5330 int optopt;
5331 int errcount;
5332 int argc; char** argv;
5333 int eof; int shortpos;
5334 int pending_rotate_first, pending_rotate_middle;
5335 };
5336 enum { ACC_GETOPT_NO_ARG, ACC_GETOPT_REQUIRED_ARG, ACC_GETOPT_OPTIONAL_ARG, ACC_GETOPT_EXACT_ARG = 0x10 };
5337 enum { ACC_GETOPT_PERMUTE, ACC_GETOPT_RETURN_IN_ORDER, ACC_GETOPT_REQUIRE_ORDER };
5338 ACCLIB_EXTERN(void, acc_getopt_init) (acc_getopt_p g,
5339 int start_argc, int argc, char** argv);
5340 ACCLIB_EXTERN(int, acc_getopt) (acc_getopt_p g,
5341 const char* shortopts,
5342 const acc_getopt_longopt_p longopts,
5343 int* longind);
5344 typedef struct {
5345 acc_uint32l_t seed;
5346 } acc_rand31_t;
5347 #ifndef acc_rand31_p
5348 #define acc_rand31_p acc_rand31_t *
5349 #endif
5350 ACCLIB_EXTERN(void, acc_srand31) (acc_rand31_p, acc_uint32l_t);
5351 ACCLIB_EXTERN(acc_uint32l_t, acc_rand31) (acc_rand31_p);
5352 #if defined(acc_int64l_t)
5353 typedef struct {
5354 acc_uint64l_t seed;
5355 } acc_rand48_t;
5356 #ifndef acc_rand48_p
5357 #define acc_rand48_p acc_rand48_t *
5358 #endif
5359 ACCLIB_EXTERN(void, acc_srand48) (acc_rand48_p, acc_uint32l_t);
5360 ACCLIB_EXTERN(acc_uint32l_t, acc_rand48) (acc_rand48_p);
5361 ACCLIB_EXTERN(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p);
5362 #endif
5363 #if defined(acc_int64l_t)
5364 typedef struct {
5365 acc_uint64l_t seed;
5366 } acc_rand64_t;
5367 #ifndef acc_rand64_p
5368 #define acc_rand64_p acc_rand64_t *
5369 #endif
5370 ACCLIB_EXTERN(void, acc_srand64) (acc_rand64_p, acc_uint64l_t);
5371 ACCLIB_EXTERN(acc_uint32l_t, acc_rand64) (acc_rand64_p);
5372 ACCLIB_EXTERN(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p);
5373 #endif
5374 typedef struct {
5375 unsigned n;
5376 acc_uint32l_t s[624];
5377 } acc_randmt_t;
5378 #ifndef acc_randmt_p
5379 #define acc_randmt_p acc_randmt_t *
5380 #endif
5381 ACCLIB_EXTERN(void, acc_srandmt) (acc_randmt_p, acc_uint32l_t);
5382 ACCLIB_EXTERN(acc_uint32l_t, acc_randmt) (acc_randmt_p);
5383 ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p);
5384 #if defined(acc_int64l_t)
5385 typedef struct {
5386 unsigned n;
5387 acc_uint64l_t s[312];
5388 } acc_randmt64_t;
5389 #ifndef acc_randmt64_p
5390 #define acc_randmt64_p acc_randmt64_t *
5391 #endif
5392 ACCLIB_EXTERN(void, acc_srandmt64) (acc_randmt64_p, acc_uint64l_t);
5393 ACCLIB_EXTERN(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p);
5394 #endif
5395 #define ACC_SPAWN_P_WAIT 0
5396 #define ACC_SPAWN_P_NOWAIT 1
5397 ACCLIB_EXTERN(int, acc_spawnv) (int mode, const char* fn, const char* const * argv);
5398 ACCLIB_EXTERN(int, acc_spawnvp) (int mode, const char* fn, const char* const * argv);
5399 ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * argv, const char * const envp);
5400 #endif
5401 #endif
5402 #if defined(ACC_WANT_ACC_CXX_H)
5403 # undef ACC_WANT_ACC_CXX_H
5404 #ifndef __ACC_CXX_H_INCLUDED
5405 #define __ACC_CXX_H_INCLUDED 1
5406 #if defined(__cplusplus)
5407 #if defined(ACC_CXX_NOTHROW)
5408 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
5409 #elif (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
5410 #elif (ACC_CC_GHS && !defined(__EXCEPTIONS))
5411 #elif (ACC_CC_HIGHC)
5412 #elif (ACC_CC_MSC && (_MSC_VER < 1100))
5413 #elif (ACC_CC_NDPC)
5414 #elif (ACC_CC_TURBOC)
5415 #elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND))
5416 #elif (ACC_CC_ZORTECHC)
5417 #else
5418 # define ACC_CXX_NOTHROW throw()
5419 #endif
5420 #if !defined(ACC_CXX_NOTHROW)
5421 # define ACC_CXX_NOTHROW /*empty*/
5422 #endif
5423 #if defined(__ACC_CXX_DO_NEW)
5424 #elif (ACC_CC_GHS || ACC_CC_NDPC || ACC_CC_PGI)
5425 # define __ACC_CXX_DO_NEW { return 0; }
5426 #elif ((ACC_CC_BORLANDC || ACC_CC_TURBOC) && ACC_ARCH_I086)
5427 # define __ACC_CXX_DO_NEW { return 0; }
5428 #else
5429 # define __ACC_CXX_DO_NEW ;
5430 #endif
5431 #if defined(__ACC_CXX_DO_DELETE)
5432 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
5433 # define __ACC_CXX_DO_DELETE { }
5434 #else
5435 # define __ACC_CXX_DO_DELETE ACC_CXX_NOTHROW { }
5436 #endif
5437 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
5438 #elif (ACC_CC_MSC && ACC_MM_HUGE)
5439 # define ACC_CXX_DISABLE_NEW_DELETE private:
5440 #elif (ACC_CC_MSC && (_MSC_VER < 1100))
5441 #elif (ACC_CC_NDPC)
5442 #elif (ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
5443 #elif (ACC_CC_TURBOC)
5444 #elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
5445 #else
5446 # define __ACC_CXX_HAVE_ARRAY_NEW 1
5447 #endif
5448 #if (__ACC_CXX_HAVE_ARRAY_NEW)
5449 # define __ACC_CXX_HAVE_PLACEMENT_NEW 1
5450 #endif
5451 #if (__ACC_CXX_HAVE_PLACEMENT_NEW)
5452 # if (ACC_CC_GNUC >= 0x030000ul)
5453 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5454 # elif (ACC_CC_INTELC)
5455 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5456 # elif (ACC_CC_MSC && (_MSC_VER >= 1200))
5457 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5458 # elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
5459 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5460 # elif (ACC_CC_PGI)
5461 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5462 # endif
5463 #endif
5464 #if defined(ACC_CXX_DISABLE_NEW_DELETE)
5465 #elif defined(new) || defined(delete)
5466 # define ACC_CXX_DISABLE_NEW_DELETE private:
5467 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025b00ul))
5468 # define ACC_CXX_DISABLE_NEW_DELETE private:
5469 #elif (ACC_CC_HIGHC)
5470 # define ACC_CXX_DISABLE_NEW_DELETE private:
5471 #elif !(__ACC_CXX_HAVE_ARRAY_NEW)
5472 # define ACC_CXX_DISABLE_NEW_DELETE \
5473 protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
5474 protected: static void* operator new(size_t) __ACC_CXX_DO_NEW \
5475 private:
5476 #else
5477 # define ACC_CXX_DISABLE_NEW_DELETE \
5478 protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
5479 static void operator delete[](void*) __ACC_CXX_DO_DELETE \
5480 private: static void* operator new(size_t) __ACC_CXX_DO_NEW \
5481 static void* operator new[](size_t) __ACC_CXX_DO_NEW
5482 #endif
5483 #if defined(ACC_CXX_TRIGGER_FUNCTION)
5484 #else
5485 # define ACC_CXX_TRIGGER_FUNCTION \
5486 protected: virtual const void* acc_cxx_trigger_function() const; \
5487 private:
5488 #endif
5489 #if defined(ACC_CXX_TRIGGER_FUNCTION_IMPL)
5490 #else
5491 # define ACC_CXX_TRIGGER_FUNCTION_IMPL(klass) \
5492 const void* klass::acc_cxx_trigger_function() const { return ACC_STATIC_CAST(const void *, 0); }
5493 #endif
5494 #endif
5495 #endif
5496 #endif
5497 #if defined(ACC_WANT_ACC_CHK_CH)
5498 # undef ACC_WANT_ACC_CHK_CH
5499 #if !defined(ACCCHK_ASSERT)
5500 # define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
5501 #endif
5502 #if !defined(ACCCHK_ASSERT_SIGN_T)
5503 # define ACCCHK_ASSERT_SIGN_T(type,relop) \
5504 ACCCHK_ASSERT( ACC_STATIC_CAST(type, -1) relop ACC_STATIC_CAST(type, 0)) \
5505 ACCCHK_ASSERT( ACC_STATIC_CAST(type, ~ACC_STATIC_CAST(type, 0)) relop ACC_STATIC_CAST(type, 0)) \
5506 ACCCHK_ASSERT( ACC_STATIC_CAST(type, ~ACC_STATIC_CAST(type, 0)) == ACC_STATIC_CAST(type, -1))
5507 #endif
5508 #if !defined(ACCCHK_ASSERT_IS_SIGNED_T)
5509 # define ACCCHK_ASSERT_IS_SIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,<)
5510 #endif
5511 #if !defined(ACCCHK_ASSERT_IS_UNSIGNED_T)
5512 # if (ACC_BROKEN_INTEGRAL_PROMOTION)
5513 # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) \
5514 ACCCHK_ASSERT( ACC_STATIC_CAST(type, -1) > ACC_STATIC_CAST(type, 0) )
5515 # else
5516 # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,>)
5517 # endif
5518 #endif
5519 #if defined(ACCCHK_CFG_PEDANTIC)
5520 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550) && (__BORLANDC__ < 0x0560))
5521 # pragma option push -w-8055
5522 #elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0550))
5523 # pragma option push -w-osh
5524 #endif
5525 #endif
5526 #if (ACC_0xffffffffL - ACC_UINT32_C(4294967294) != 1)
5527 # error "preprocessor error"
5528 #endif
5529 #if (ACC_0xffffffffL - ACC_UINT32_C(0xfffffffd) != 2)
5530 # error "preprocessor error"
5531 #endif
5532 #if +0
5533 # error "preprocessor error"
5534 #endif
5535 #if -0
5536 # error "preprocessor error"
5537 #endif
5538 #if +0 != 0
5539 # error "preprocessor error"
5540 #endif
5541 #if -0 != 0
5542 # error "preprocessor error"
5543 #endif
5544 #define ACCCHK_VAL 1
5545 #define ACCCHK_TMP1 ACCCHK_VAL
5546 #undef ACCCHK_VAL
5547 #define ACCCHK_VAL 2
5548 #define ACCCHK_TMP2 ACCCHK_VAL
5549 #if (ACCCHK_TMP1 != 2)
5550 # error "preprocessor error 3a"
5551 #endif
5552 #if (ACCCHK_TMP2 != 2)
5553 # error "preprocessor error 3b"
5554 #endif
5555 #undef ACCCHK_VAL
5556 #if (ACCCHK_TMP2)
5557 # error "preprocessor error 3c"
5558 #endif
5559 #if (ACCCHK_TMP2 + 0 != 0)
5560 # error "preprocessor error 3d"
5561 #endif
5562 #undef ACCCHK_TMP1
5563 #undef ACCCHK_TMP2
5564 #if 0 || defined(ACCCHK_CFG_PEDANTIC)
5565 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZINT)
5566 ACCCHK_ASSERT((_MIPS_SZINT) == 8 * sizeof(int))
5567 # endif
5568 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZLONG)
5569 ACCCHK_ASSERT((_MIPS_SZLONG) == 8 * sizeof(long))
5570 # endif
5571 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZPTR)
5572 ACCCHK_ASSERT((_MIPS_SZPTR) == 8 * sizeof(void *))
5573 # endif
5574 #endif
5575 ACCCHK_ASSERT(1 == 1)
5576 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,1) == 1u)
5577 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,2) == 3u)
5578 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,3) == 7u)
5579 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,8) == 255u)
5580 #if (ACC_SIZEOF_INT >= 2)
5581 ACCCHK_ASSERT(__ACC_MASK_GEN(1,15) == 32767)
5582 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,16) == 0xffffU)
5583 ACCCHK_ASSERT(__ACC_MASK_GEN(0u,16) == 0u)
5584 #endif
5585 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,16) == 0xffffUL)
5586 ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,16) == 0ul)
5587 #if (ACC_SIZEOF_INT >= 4)
5588 ACCCHK_ASSERT(__ACC_MASK_GEN(1,31) == 2147483647)
5589 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,32) == 0xffffffffU)
5590 ACCCHK_ASSERT(__ACC_MASK_GEN(0u,32) == 0u)
5591 #endif
5592 #if (ACC_SIZEOF_LONG >= 4)
5593 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,32) == 0xffffffffUL)
5594 ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,32) == 0ul)
5595 #endif
5596 #if (ACC_SIZEOF_LONG >= 8)
5597 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,64) == 0xffffffffffffffffUL)
5598 ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,64) == 0ul)
5599 #endif
5600 #if !(ACC_BROKEN_INTEGRAL_PROMOTION)
5601 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,ACC_SIZEOF_INT*8) == ~0u)
5602 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,ACC_SIZEOF_LONG*8) == ~0ul)
5603 #endif
5604 #if 1
5605 ACCCHK_ASSERT(__ACC_MASK_GEN(0,0) == 0)
5606 ACCCHK_ASSERT(__ACC_MASK_GEN(1,0) == 0)
5607 ACCCHK_ASSERT(__ACC_MASK_GEN(2,0) == 0)
5608 ACCCHK_ASSERT(__ACC_MASK_GEN(4,0) == 0)
5609 #endif
5610 #if 1
5611 ACCCHK_ASSERT(__ACC_MASK_GEN(2,1) == 2)
5612 ACCCHK_ASSERT(__ACC_MASK_GEN(4,1) == 4)
5613 ACCCHK_ASSERT(__ACC_MASK_GEN(8,1) == 8)
5614 ACCCHK_ASSERT(__ACC_MASK_GEN(2,2) == 2+4)
5615 ACCCHK_ASSERT(__ACC_MASK_GEN(4,2) == 4+8)
5616 ACCCHK_ASSERT(__ACC_MASK_GEN(8,2) == 8+16)
5617 ACCCHK_ASSERT(__ACC_MASK_GEN(2,3) == 2+4+8)
5618 ACCCHK_ASSERT(__ACC_MASK_GEN(4,3) == 4+8+16)
5619 ACCCHK_ASSERT(__ACC_MASK_GEN(8,3) == 8+16+32)
5620 ACCCHK_ASSERT(__ACC_MASK_GEN(7,1) == 7)
5621 ACCCHK_ASSERT(__ACC_MASK_GEN(7,2) == 7+14)
5622 ACCCHK_ASSERT(__ACC_MASK_GEN(7,3) == 7+14+28)
5623 #endif
5624 #if !(ACC_BROKEN_SIGNED_RIGHT_SHIFT)
5625 ACCCHK_ASSERT(((-1) >> 7) == -1)
5626 #endif
5627 ACCCHK_ASSERT(((1) >> 7) == 0)
5628 #if (ACC_CC_INTELC && (__INTEL_COMPILER >= 900))
5629 # pragma warning(push)
5630 # pragma warning(disable: 1025)
5631 #endif
5632 ACCCHK_ASSERT((~0l & ~0) == ~0l)
5633 ACCCHK_ASSERT((~0l & ~0u) == ~0u)
5634 ACCCHK_ASSERT((~0ul & ~0) == ~0ul)
5635 ACCCHK_ASSERT((~0ul & ~0u) == ~0u)
5636 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
5637 #elif (ACC_SIZEOF_INT == 2)
5638 ACCCHK_ASSERT((~0l & ~0u) == 0xffffU)
5639 ACCCHK_ASSERT((~0ul & ~0u) == 0xffffU)
5640 #elif (ACC_SIZEOF_INT == 4)
5641 ACCCHK_ASSERT((~0l & ~0u) == 0xffffffffU)
5642 ACCCHK_ASSERT((~0ul & ~0u) == 0xffffffffU)
5643 #endif
5644 #if (ACC_CC_INTELC && (__INTEL_COMPILER >= 900))
5645 # pragma warning(pop)
5646 #endif
5647 ACCCHK_ASSERT_IS_SIGNED_T(signed char)
5648 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned char)
5649 ACCCHK_ASSERT(sizeof(signed char) == sizeof(char))
5650 ACCCHK_ASSERT(sizeof(unsigned char) == sizeof(char))
5651 ACCCHK_ASSERT(sizeof(char) == 1)
5652 #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
5653 #else
5654 ACCCHK_ASSERT(sizeof(char) == sizeof(ACC_STATIC_CAST(char, 0)))
5655 #endif
5656 #if defined(__cplusplus)
5657 ACCCHK_ASSERT(sizeof('\0') == sizeof(char))
5658 #else
5659 # if (ACC_CC_DMC)
5660 # else
5661 ACCCHK_ASSERT(sizeof('\0') == sizeof(int))
5662 # endif
5663 #endif
5664 #if defined(__acc_alignof)
5665 ACCCHK_ASSERT(__acc_alignof(char) == 1)
5666 ACCCHK_ASSERT(__acc_alignof(signed char) == 1)
5667 ACCCHK_ASSERT(__acc_alignof(unsigned char) == 1)
5668 #if defined(acc_int16e_t)
5669 ACCCHK_ASSERT(__acc_alignof(acc_int16e_t) >= 1)
5670 ACCCHK_ASSERT(__acc_alignof(acc_int16e_t) <= 2)
5671 #endif
5672 #if defined(acc_int32e_t)
5673 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) >= 1)
5674 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) <= 4)
5675 #endif
5676 #endif
5677 ACCCHK_ASSERT_IS_SIGNED_T(short)
5678 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned short)
5679 ACCCHK_ASSERT(sizeof(short) == sizeof(unsigned short))
5680 #if !(ACC_ABI_I8LP16)
5681 ACCCHK_ASSERT(sizeof(short) >= 2)
5682 #endif
5683 ACCCHK_ASSERT(sizeof(short) >= sizeof(char))
5684 #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
5685 #else
5686 ACCCHK_ASSERT(sizeof(short) == sizeof(ACC_STATIC_CAST(short, 0)))
5687 #endif
5688 #if (ACC_SIZEOF_SHORT > 0)
5689 ACCCHK_ASSERT(sizeof(short) == ACC_SIZEOF_SHORT)
5690 #endif
5691 ACCCHK_ASSERT_IS_SIGNED_T(int)
5692 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned int)
5693 ACCCHK_ASSERT(sizeof(int) == sizeof(unsigned int))
5694 #if !(ACC_ABI_I8LP16)
5695 ACCCHK_ASSERT(sizeof(int) >= 2)
5696 #endif
5697 ACCCHK_ASSERT(sizeof(int) >= sizeof(short))
5698 ACCCHK_ASSERT(sizeof(int) == sizeof(0))
5699 ACCCHK_ASSERT(sizeof(int) == sizeof(ACC_STATIC_CAST(int, 0)))
5700 #if (ACC_SIZEOF_INT > 0)
5701 ACCCHK_ASSERT(sizeof(int) == ACC_SIZEOF_INT)
5702 #endif
5703 ACCCHK_ASSERT(sizeof(0) == sizeof(int))
5704 ACCCHK_ASSERT_IS_SIGNED_T(long)
5705 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned long)
5706 ACCCHK_ASSERT(sizeof(long) == sizeof(unsigned long))
5707 #if !(ACC_ABI_I8LP16)
5708 ACCCHK_ASSERT(sizeof(long) >= 4)
5709 #endif
5710 ACCCHK_ASSERT(sizeof(long) >= sizeof(int))
5711 ACCCHK_ASSERT(sizeof(long) == sizeof(0L))
5712 ACCCHK_ASSERT(sizeof(long) == sizeof(ACC_STATIC_CAST(long, 0)))
5713 #if (ACC_SIZEOF_LONG > 0)
5714 ACCCHK_ASSERT(sizeof(long) == ACC_SIZEOF_LONG)
5715 #endif
5716 ACCCHK_ASSERT(sizeof(0L) == sizeof(long))
5717 ACCCHK_ASSERT_IS_UNSIGNED_T(size_t)
5718 ACCCHK_ASSERT(sizeof(size_t) >= sizeof(int))
5719 ACCCHK_ASSERT(sizeof(size_t) == sizeof(sizeof(0)))
5720 #if (ACC_SIZEOF_SIZE_T > 0)
5721 ACCCHK_ASSERT(sizeof(size_t) == ACC_SIZEOF_SIZE_T)
5722 #endif
5723 ACCCHK_ASSERT_IS_SIGNED_T(ptrdiff_t)
5724 ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(int))
5725 ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t))
5726 #if !(ACC_BROKEN_SIZEOF)
5727 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(ACC_STATIC_CAST(char*, 0) - ACC_STATIC_CAST(char*, 0)))
5728 # if (ACC_HAVE_MM_HUGE_PTR)
5729 ACCCHK_ASSERT(4 == sizeof(ACC_STATIC_CAST(char __huge*, 0) - ACC_STATIC_CAST(char __huge*, 0)))
5730 # endif
5731 #endif
5732 #if (ACC_SIZEOF_PTRDIFF_T > 0)
5733 ACCCHK_ASSERT(sizeof(ptrdiff_t) == ACC_SIZEOF_PTRDIFF_T)
5734 #endif
5735 ACCCHK_ASSERT(sizeof(void*) >= sizeof(char*))
5736 #if (ACC_SIZEOF_VOID_P > 0)
5737 ACCCHK_ASSERT(sizeof(void*) == ACC_SIZEOF_VOID_P)
5738 ACCCHK_ASSERT(sizeof(char*) == ACC_SIZEOF_VOID_P)
5739 #endif
5740 #if (ACC_HAVE_MM_HUGE_PTR)
5741 ACCCHK_ASSERT(4 == sizeof(void __huge*))
5742 ACCCHK_ASSERT(4 == sizeof(char __huge*))
5743 #endif
5744 #if (ACC_ABI_I8LP16)
5745 ACCCHK_ASSERT((((1u << 7) + 1) >> 7) == 1)
5746 ACCCHK_ASSERT((((1ul << 15) + 1) >> 15) == 1)
5747 #else
5748 ACCCHK_ASSERT((((1u << 15) + 1) >> 15) == 1)
5749 ACCCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1)
5750 #endif
5751 #if defined(ACCCHK_CFG_PEDANTIC)
5752 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
5753 #else
5754 ACCCHK_ASSERT((1 << (8*ACC_SIZEOF_INT-1)) < 0)
5755 #endif
5756 #endif
5757 ACCCHK_ASSERT((1u << (8*ACC_SIZEOF_INT-1)) > 0)
5758 #if defined(ACCCHK_CFG_PEDANTIC)
5759 ACCCHK_ASSERT((1l << (8*ACC_SIZEOF_LONG-1)) < 0)
5760 #endif
5761 ACCCHK_ASSERT((1ul << (8*ACC_SIZEOF_LONG-1)) > 0)
5762 #if defined(acc_int16e_t)
5763 ACCCHK_ASSERT(sizeof(acc_int16e_t) == 2)
5764 ACCCHK_ASSERT(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T)
5765 ACCCHK_ASSERT(sizeof(acc_uint16e_t) == 2)
5766 ACCCHK_ASSERT(sizeof(acc_int16e_t) == sizeof(acc_uint16e_t))
5767 ACCCHK_ASSERT_IS_SIGNED_T(acc_int16e_t)
5768 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint16e_t)
5769 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
5770 #else
5771 ACCCHK_ASSERT((ACC_STATIC_CAST(acc_uint16e_t, (~ACC_STATIC_CAST(acc_uint16e_t,0ul))) >> 15) == 1)
5772 #endif
5773 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_int16e_t, (1 + ~ACC_STATIC_CAST(acc_int16e_t, 0))) == 0)
5774 #if defined(ACCCHK_CFG_PEDANTIC)
5775 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_uint16e_t, (1 + ~ACC_STATIC_CAST(acc_uint16e_t, 0))) == 0)
5776 #endif
5777 #endif
5778 #if defined(acc_int32e_t)
5779 ACCCHK_ASSERT(sizeof(acc_int32e_t) == 4)
5780 ACCCHK_ASSERT(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T)
5781 ACCCHK_ASSERT(sizeof(acc_uint32e_t) == 4)
5782 ACCCHK_ASSERT(sizeof(acc_int32e_t) == sizeof(acc_uint32e_t))
5783 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32e_t)
5784 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32e_t, 1) << 30) + 1) >> 30) == 1)
5785 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32e_t)
5786 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32e_t, 1) << 31) + 1) >> 31) == 1)
5787 ACCCHK_ASSERT((ACC_STATIC_CAST(acc_uint32e_t, (~ACC_STATIC_CAST(acc_uint32e_t, 0ul))) >> 31) == 1)
5788 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_int32e_t, (1 + ~ACC_STATIC_CAST(acc_int32e_t, 0))) == 0)
5789 #if defined(ACCCHK_CFG_PEDANTIC)
5790 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_uint32e_t, (1 + ~ACC_STATIC_CAST(acc_uint32e_t, 0))) == 0)
5791 #endif
5792 #endif
5793 #if defined(acc_int32e_t)
5794 ACCCHK_ASSERT(sizeof(acc_int32l_t) >= sizeof(acc_int32e_t))
5795 #endif
5796 ACCCHK_ASSERT(sizeof(acc_int32l_t) >= 4)
5797 ACCCHK_ASSERT(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T)
5798 ACCCHK_ASSERT(sizeof(acc_uint32l_t) >= 4)
5799 ACCCHK_ASSERT(sizeof(acc_int32l_t) == sizeof(acc_uint32l_t))
5800 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32l_t)
5801 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32l_t, 1) << 30) + 1) >> 30) == 1)
5802 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32l_t)
5803 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32l_t, 1) << 31) + 1) >> 31) == 1)
5804 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(int))
5805 #if defined(acc_int32e_t)
5806 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32e_t))
5807 #endif
5808 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t))
5809 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= 4)
5810 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t))
5811 ACCCHK_ASSERT(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T)
5812 ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= 4)
5813 ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= sizeof(acc_uint32l_t))
5814 ACCCHK_ASSERT(sizeof(acc_int32f_t) == sizeof(acc_uint32f_t))
5815 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32f_t)
5816 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32f_t, 1) << 30) + 1) >> 30) == 1)
5817 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32f_t)
5818 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32f_t, 1) << 31) + 1) >> 31) == 1)
5819 #if defined(acc_int64e_t)
5820 ACCCHK_ASSERT(sizeof(acc_int64e_t) == 8)
5821 ACCCHK_ASSERT(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T)
5822 ACCCHK_ASSERT(sizeof(acc_uint64e_t) == 8)
5823 ACCCHK_ASSERT(sizeof(acc_int64e_t) == sizeof(acc_uint64e_t))
5824 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64e_t)
5825 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
5826 #else
5827 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64e_t)
5828 #endif
5829 #endif
5830 #if defined(acc_int64l_t)
5831 #if defined(acc_int64e_t)
5832 ACCCHK_ASSERT(sizeof(acc_int64l_t) >= sizeof(acc_int64e_t))
5833 #endif
5834 ACCCHK_ASSERT(sizeof(acc_int64l_t) >= 8)
5835 ACCCHK_ASSERT(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T)
5836 ACCCHK_ASSERT(sizeof(acc_uint64l_t) >= 8)
5837 ACCCHK_ASSERT(sizeof(acc_int64l_t) == sizeof(acc_uint64l_t))
5838 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64l_t)
5839 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int64l_t, 1) << 62) + 1) >> 62) == 1)
5840 ACCCHK_ASSERT(((( ACC_INT64_C(1) << 62) + 1) >> 62) == 1)
5841 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
5842 #else
5843 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64l_t)
5844 ACCCHK_ASSERT(ACC_UINT64_C(18446744073709551615) > 0)
5845 #endif
5846 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint64l_t, 1) << 63) + 1) >> 63) == 1)
5847 ACCCHK_ASSERT(((( ACC_UINT64_C(1) << 63) + 1) >> 63) == 1)
5848 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020600ul))
5849 ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > ACC_INT64_C(0))
5850 #else
5851 ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > 0)
5852 #endif
5853 ACCCHK_ASSERT(ACC_INT64_C(-9223372036854775807) - 1 < 0)
5854 ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483629) == 721)
5855 ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483647) == 1)
5856 ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483629) == 721)
5857 ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483647) == 1)
5858 #endif
5859 #if defined(acc_int64f_t)
5860 #if defined(acc_int64e_t)
5861 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64e_t))
5862 #endif
5863 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64l_t))
5864 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= 8)
5865 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64l_t))
5866 ACCCHK_ASSERT(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T)
5867 ACCCHK_ASSERT(sizeof(acc_uint64f_t) >= 8)
5868 ACCCHK_ASSERT(sizeof(acc_uint64f_t) >= sizeof(acc_uint64l_t))
5869 ACCCHK_ASSERT(sizeof(acc_int64f_t) == sizeof(acc_uint64f_t))
5870 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64f_t)
5871 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
5872 #else
5873 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64f_t)
5874 #endif
5875 #endif
5876 #if !defined(__ACC_INTPTR_T_IS_POINTER)
5877 ACCCHK_ASSERT_IS_SIGNED_T(acc_intptr_t)
5878 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uintptr_t)
5879 #endif
5880 ACCCHK_ASSERT(sizeof(acc_intptr_t) >= sizeof(void *))
5881 ACCCHK_ASSERT(sizeof(acc_intptr_t) == ACC_SIZEOF_ACC_INTPTR_T)
5882 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t))
5883 #if defined(acc_word_t)
5884 ACCCHK_ASSERT(ACC_WORDSIZE == ACC_SIZEOF_ACC_WORD_T)
5885 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_word_t)
5886 ACCCHK_ASSERT_IS_SIGNED_T(acc_sword_t)
5887 ACCCHK_ASSERT(sizeof(acc_word_t) == ACC_SIZEOF_ACC_WORD_T)
5888 ACCCHK_ASSERT(sizeof(acc_word_t) == sizeof(acc_sword_t))
5889 #endif
5890 ACCCHK_ASSERT(sizeof(acc_int8_t) == 1)
5891 ACCCHK_ASSERT(sizeof(acc_uint8_t) == 1)
5892 ACCCHK_ASSERT(sizeof(acc_int8_t) == sizeof(acc_uint8_t))
5893 ACCCHK_ASSERT_IS_SIGNED_T(acc_int8_t)
5894 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint8_t)
5895 #if defined(ACC_INT16_C)
5896 ACCCHK_ASSERT(sizeof(ACC_INT16_C(0)) >= 2)
5897 ACCCHK_ASSERT(sizeof(ACC_UINT16_C(0)) >= 2)
5898 ACCCHK_ASSERT((ACC_UINT16_C(0xffff) >> 15) == 1)
5899 #endif
5900 #if defined(ACC_INT32_C)
5901 ACCCHK_ASSERT(sizeof(ACC_INT32_C(0)) >= 4)
5902 ACCCHK_ASSERT(sizeof(ACC_UINT32_C(0)) >= 4)
5903 ACCCHK_ASSERT((ACC_UINT32_C(0xffffffff) >> 31) == 1)
5904 #endif
5905 #if defined(ACC_INT64_C)
5906 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0560))
5907 #else
5908 ACCCHK_ASSERT(sizeof(ACC_INT64_C(0)) >= 8)
5909 ACCCHK_ASSERT(sizeof(ACC_UINT64_C(0)) >= 8)
5910 #endif
5911 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) >> 63) == 1)
5912 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0) == ACC_UINT64_C(0xffffffffffffffff))
5913 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0l) == ACC_UINT64_C(0xffffffffffffffff))
5914 #if (ACC_SIZEOF_INT == 4)
5915 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
5916 # else
5917 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & (~0u+0u)) == 0xffffffffu)
5918 # endif
5919 #endif
5920 #if (ACC_SIZEOF_LONG == 4)
5921 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
5922 # else
5923 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & (~0ul+0ul)) == 0xfffffffful)
5924 # endif
5925 #endif
5926 #endif
5927 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
5928 ACCCHK_ASSERT(sizeof(void*) == 2)
5929 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 2)
5930 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
5931 ACCCHK_ASSERT(sizeof(void*) == 4)
5932 #endif
5933 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_COMPACT)
5934 ACCCHK_ASSERT(sizeof(void (*)(void)) == 2)
5935 #elif (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE)
5936 ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
5937 #endif
5938 #if (ACC_ABI_ILP32)
5939 ACCCHK_ASSERT(sizeof(int) == 4)
5940 ACCCHK_ASSERT(sizeof(long) == 4)
5941 ACCCHK_ASSERT(sizeof(void*) == 4)
5942 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5943 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5944 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5945 #endif
5946 #if (ACC_ABI_ILP64)
5947 ACCCHK_ASSERT(sizeof(int) == 8)
5948 ACCCHK_ASSERT(sizeof(long) == 8)
5949 ACCCHK_ASSERT(sizeof(void*) == 8)
5950 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5951 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5952 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5953 #endif
5954 #if (ACC_ABI_IP32L64)
5955 ACCCHK_ASSERT(sizeof(int) == 4)
5956 ACCCHK_ASSERT(sizeof(long) == 8)
5957 ACCCHK_ASSERT(sizeof(void*) == 4)
5958 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5959 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5960 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5961 #endif
5962 #if (ACC_ABI_LLP64)
5963 ACCCHK_ASSERT(sizeof(int) == 4)
5964 ACCCHK_ASSERT(sizeof(long) == 4)
5965 ACCCHK_ASSERT(sizeof(void*) == 8)
5966 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5967 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5968 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5969 #endif
5970 #if (ACC_ABI_LP32)
5971 ACCCHK_ASSERT(sizeof(int) == 2)
5972 ACCCHK_ASSERT(sizeof(long) == 4)
5973 ACCCHK_ASSERT(sizeof(void*) == 4)
5974 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5975 #endif
5976 #if (ACC_ABI_LP64)
5977 ACCCHK_ASSERT(sizeof(int) == 4)
5978 ACCCHK_ASSERT(sizeof(long) == 8)
5979 ACCCHK_ASSERT(sizeof(void*) == 8)
5980 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5981 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5982 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5983 #endif
5984 #if (ACC_ABI_IP32W64)
5985 ACCCHK_ASSERT(sizeof(int) == 4)
5986 ACCCHK_ASSERT(sizeof(void*) == 4)
5987 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5988 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5989 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5990 ACCCHK_ASSERT(ACC_WORDSIZE == 8)
5991 #endif
5992 #if (ACC_ARCH_I086)
5993 ACCCHK_ASSERT(sizeof(size_t) == 2)
5994 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5995 #elif (ACC_ARCH_I386 || ACC_ARCH_M68K)
5996 ACCCHK_ASSERT(sizeof(size_t) == 4)
5997 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
5998 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5999 #endif
6000 #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32)
6001 ACCCHK_ASSERT(sizeof(size_t) == 4)
6002 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
6003 ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
6004 #elif (ACC_OS_WIN64)
6005 ACCCHK_ASSERT(sizeof(size_t) == 8)
6006 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 8)
6007 ACCCHK_ASSERT(sizeof(void (*)(void)) == 8)
6008 #endif
6009 #if (ACC_CC_NDPC)
6010 #elif (ACC_SIZEOF_INT > 1)
6011 ACCCHK_ASSERT( ACC_STATIC_CAST(int, ACC_STATIC_CAST(unsigned char, ACC_STATIC_CAST(signed char, -1))) == 255)
6012 #endif
6013 #if defined(ACCCHK_CFG_PEDANTIC)
6014 #if (ACC_CC_KEILC)
6015 #elif (ACC_CC_NDPC)
6016 #elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (ACC_SIZEOF_INT > 1)
6017 ACCCHK_ASSERT( ((ACC_STATIC_CAST(unsigned char, 128)) << ACC_STATIC_CAST(int, (8*sizeof(int)-8))) < 0)
6018 #endif
6019 #endif
6020 #if defined(ACCCHK_CFG_PEDANTIC)
6021 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
6022 # pragma option pop
6023 #endif
6024 #endif
6025 #endif
6026 #if defined(ACC_WANT_ACCLIB_UA)
6027 # undef ACC_WANT_ACCLIB_UA
6028 #define __ACCLIB_UA_CH_INCLUDED 1
6029 #if !defined(ACCLIB_PUBLIC)
6030 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6031 #endif
6032 ACCLIB_PUBLIC(unsigned, acc_ua_get_be16) (const acc_hvoid_p p)
6034 #if defined(ACC_UA_GET_BE16)
6035 return ACC_UA_GET_BE16(p);
6036 #else
6037 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6038 return ACC_ICONV(unsigned, b[1]) | (ACC_ICONV(unsigned, b[0]) << 8);
6039 #endif
6041 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be24) (const acc_hvoid_p p)
6043 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6044 return ACC_ICONV(acc_uint32l_t, b[2]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[0]) << 16);
6046 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be32) (const acc_hvoid_p p)
6048 #if defined(ACC_UA_GET_BE32)
6049 return ACC_UA_GET_BE32(p);
6050 #else
6051 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6052 return ACC_ICONV(acc_uint32l_t, b[3]) | (ACC_ICONV(acc_uint32l_t, b[2]) << 8) | (ACC_ICONV(acc_uint32l_t, b[1]) << 16) | (ACC_ICONV(acc_uint32l_t, b[0]) << 24);
6053 #endif
6055 ACCLIB_PUBLIC(void, acc_ua_set_be16) (acc_hvoid_p p, unsigned v)
6057 #if defined(ACC_UA_SET_BE16)
6058 ACC_UA_SET_BE16(p, v);
6059 #else
6060 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6061 b[1] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6062 b[0] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6063 #endif
6065 ACCLIB_PUBLIC(void, acc_ua_set_be24) (acc_hvoid_p p, acc_uint32l_t v)
6067 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6068 b[2] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6069 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6070 b[0] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6072 ACCLIB_PUBLIC(void, acc_ua_set_be32) (acc_hvoid_p p, acc_uint32l_t v)
6074 #if defined(ACC_UA_SET_BE32)
6075 ACC_UA_SET_BE32(p, v);
6076 #else
6077 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6078 b[3] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6079 b[2] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6080 b[1] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6081 b[0] = ACC_ICONV(unsigned char, (v >> 24) & 0xff);
6082 #endif
6084 ACCLIB_PUBLIC(unsigned, acc_ua_get_le16) (const acc_hvoid_p p)
6086 #if defined(ACC_UA_GET_LE16)
6087 return ACC_UA_GET_LE16(p);
6088 #else
6089 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6090 return ACC_ICONV(unsigned, b[0]) | (ACC_ICONV(unsigned, b[1]) << 8);
6091 #endif
6093 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le24) (const acc_hvoid_p p)
6095 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6096 return ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16);
6098 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le32) (const acc_hvoid_p p)
6100 #if defined(ACC_UA_GET_LE32)
6101 return ACC_UA_GET_LE32(p);
6102 #else
6103 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6104 return ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16) | (ACC_ICONV(acc_uint32l_t, b[3]) << 24);
6105 #endif
6107 ACCLIB_PUBLIC(void, acc_ua_set_le16) (acc_hvoid_p p, unsigned v)
6109 #if defined(ACC_UA_SET_LE16)
6110 ACC_UA_SET_LE16(p, v);
6111 #else
6112 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6113 b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6114 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6115 #endif
6117 ACCLIB_PUBLIC(void, acc_ua_set_le24) (acc_hvoid_p p, acc_uint32l_t v)
6119 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6120 b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6121 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6122 b[2] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6124 ACCLIB_PUBLIC(void, acc_ua_set_le32) (acc_hvoid_p p, acc_uint32l_t v)
6126 #if defined(ACC_UA_SET_LE32)
6127 ACC_UA_SET_LE32(p, v);
6128 #else
6129 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6130 b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6131 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6132 b[2] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6133 b[3] = ACC_ICONV(unsigned char, (v >> 24) & 0xff);
6134 #endif
6136 #if defined(acc_int64l_t)
6137 ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_be64) (const acc_hvoid_p p)
6139 #if defined(ACC_UA_GET_BE64)
6140 return ACC_UA_GET_BE64(p);
6141 #elif defined(ACC_UA_GET_BE32)
6142 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6143 acc_uint32e_t v0, v1;
6144 v1 = ACC_UA_GET_BE32(b + 0);
6145 v0 = ACC_UA_GET_BE32(b + 4);
6146 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6147 #elif (ACC_WORDSIZE >= 8)
6148 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6149 return (ACC_ICONV(acc_uint64l_t, b[7])) | (ACC_ICONV(acc_uint64l_t, b[6]) << 8) | (ACC_ICONV(acc_uint64l_t, b[5]) << 16) | (ACC_ICONV(acc_uint64l_t, b[4]) << 24) | (ACC_ICONV(acc_uint64l_t, b[3]) << 32) | (ACC_ICONV(acc_uint64l_t, b[2]) << 40) | (ACC_ICONV(acc_uint64l_t, b[1]) << 48) | (ACC_ICONV(acc_uint64l_t, b[0]) << 56);
6150 #else
6151 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6152 acc_uint32l_t v0, v1;
6153 v1 = ACC_ICONV(acc_uint32l_t, b[3]) | (ACC_ICONV(acc_uint32l_t, b[2]) << 8) | (ACC_ICONV(acc_uint32l_t, b[1]) << 16) | (ACC_ICONV(acc_uint32l_t, b[0]) << 24);
6154 b += 4;
6155 v0 = ACC_ICONV(acc_uint32l_t, b[3]) | (ACC_ICONV(acc_uint32l_t, b[2]) << 8) | (ACC_ICONV(acc_uint32l_t, b[1]) << 16) | (ACC_ICONV(acc_uint32l_t, b[0]) << 24);
6156 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6157 #endif
6159 ACCLIB_PUBLIC(void, acc_ua_set_be64) (acc_hvoid_p p, acc_uint64l_t v)
6161 #if defined(ACC_UA_SET_BE64)
6162 ACC_UA_SET_BE64(p, v);
6163 #elif defined(ACC_UA_SET_BE32)
6164 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6165 ACC_UA_SET_BE32(b + 4, v);
6166 v >>= 32;
6167 ACC_UA_SET_BE32(b + 0, v);
6168 #elif (ACC_WORDSIZE >= 8)
6169 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6170 b[7] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6171 b[6] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6172 b[5] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6173 b[4] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6174 b[3] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6175 b[2] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6176 b[1] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6177 b[0] = ACC_ITRUNC(unsigned char, v);
6178 #else
6179 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6180 acc_uint32l_t x;
6181 x = ACC_ITRUNC(acc_uint32l_t, v);
6182 b[7] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6183 b[6] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6184 b[5] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6185 b[4] = ACC_ITRUNC(unsigned char, x);
6186 v >>= 32;
6187 x = ACC_ITRUNC(acc_uint32l_t, v);
6188 b[3] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6189 b[2] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6190 b[1] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6191 b[0] = ACC_ITRUNC(unsigned char, x);
6192 #endif
6194 #endif
6195 #if defined(acc_int64l_t)
6196 ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_le64) (const acc_hvoid_p p)
6198 #if defined(ACC_UA_GET_LE64)
6199 return ACC_UA_GET_LE64(p);
6200 #elif defined(ACC_UA_GET_LE32)
6201 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6202 acc_uint32e_t v0, v1;
6203 v0 = ACC_UA_GET_LE32(b + 0);
6204 v1 = ACC_UA_GET_LE32(b + 4);
6205 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6206 #elif (ACC_WORDSIZE >= 8)
6207 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6208 return ACC_ICONV(acc_uint64l_t, b[0]) | (ACC_ICONV(acc_uint64l_t, b[1]) << 8) | (ACC_ICONV(acc_uint64l_t, b[2]) << 16) | (ACC_ICONV(acc_uint64l_t, b[3]) << 24) | (ACC_ICONV(acc_uint64l_t, b[4]) << 32) | (ACC_ICONV(acc_uint64l_t, b[5]) << 40) | (ACC_ICONV(acc_uint64l_t, b[6]) << 48) | (ACC_ICONV(acc_uint64l_t, b[7]) << 56);
6209 #else
6210 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6211 acc_uint32l_t v0, v1;
6212 v0 = ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16) | (ACC_ICONV(acc_uint32l_t, b[3]) << 24);
6213 b += 4;
6214 v1 = ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16) | (ACC_ICONV(acc_uint32l_t, b[3]) << 24);
6215 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6216 #endif
6218 ACCLIB_PUBLIC(void, acc_ua_set_le64) (acc_hvoid_p p, acc_uint64l_t v)
6220 #if defined(ACC_UA_SET_LE64)
6221 ACC_UA_SET_LE64(p, v);
6222 #elif defined(ACC_UA_SET_LE32)
6223 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6224 ACC_UA_SET_LE32(b + 0, v);
6225 v >>= 32;
6226 ACC_UA_SET_LE32(b + 4, v);
6227 #elif (ACC_WORDSIZE >= 8)
6228 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6229 b[0] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6230 b[1] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6231 b[2] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6232 b[3] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6233 b[4] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6234 b[5] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6235 b[6] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6236 b[7] = ACC_ITRUNC(unsigned char, v);
6237 #else
6238 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6239 acc_uint32l_t x;
6240 x = ACC_ITRUNC(acc_uint32l_t, v);
6241 b[0] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6242 b[1] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6243 b[2] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6244 b[3] = ACC_ITRUNC(unsigned char, x);
6245 v >>= 32;
6246 x = ACC_ITRUNC(acc_uint32l_t, v);
6247 b[4] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6248 b[5] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6249 b[6] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6250 b[7] = ACC_ITRUNC(unsigned char, x);
6251 #endif
6253 #endif
6254 #endif
6255 #if defined(ACC_WANT_ACCLIB_VGET)
6256 # undef ACC_WANT_ACCLIB_VGET
6257 #define __ACCLIB_VGET_CH_INCLUDED 1
6258 #if !defined(ACCLIB_PUBLIC)
6259 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6260 #endif
6261 #if !defined(ACCLIB_PUBLIC_NOINLINE)
6262 # if !defined(__acc_noinline)
6263 # define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
6264 # elif (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
6265 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
6266 # else
6267 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
6268 # endif
6269 #endif
6270 extern void* volatile acc_vget_ptr__;
6271 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
6272 void* volatile __attribute__((__used__)) acc_vget_ptr__ = ACC_STATIC_CAST(void *, 0);
6273 #else
6274 void* volatile acc_vget_ptr__ = ACC_STATIC_CAST(void *, 0);
6275 #endif
6276 #ifndef __ACCLIB_VGET_BODY
6277 #define __ACCLIB_VGET_BODY(T) \
6278 if __acc_unlikely(acc_vget_ptr__) { \
6279 typedef T __acc_may_alias TT; \
6280 unsigned char e; expr &= 255; e = ACC_STATIC_CAST(unsigned char, expr); \
6281 * ACC_STATIC_CAST(TT *, acc_vget_ptr__) = v; \
6282 * ACC_STATIC_CAST(unsigned char *, acc_vget_ptr__) = e; \
6283 v = * ACC_STATIC_CAST(TT *, acc_vget_ptr__); \
6284 } \
6285 return v;
6286 #endif
6287 ACCLIB_PUBLIC_NOINLINE(short, acc_vget_short) (short v, int expr)
6289 __ACCLIB_VGET_BODY(short)
6291 ACCLIB_PUBLIC_NOINLINE(int, acc_vget_int) (int v, int expr)
6293 __ACCLIB_VGET_BODY(int)
6295 ACCLIB_PUBLIC_NOINLINE(long, acc_vget_long) (long v, int expr)
6297 __ACCLIB_VGET_BODY(long)
6299 #if defined(acc_int64l_t)
6300 ACCLIB_PUBLIC_NOINLINE(acc_int64l_t, acc_vget_acc_int64l_t) (acc_int64l_t v, int expr)
6302 __ACCLIB_VGET_BODY(acc_int64l_t)
6304 #endif
6305 ACCLIB_PUBLIC_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t v, int expr)
6307 __ACCLIB_VGET_BODY(acc_hsize_t)
6309 #if !(ACC_CFG_NO_DOUBLE)
6310 ACCLIB_PUBLIC_NOINLINE(double, acc_vget_double) (double v, int expr)
6312 __ACCLIB_VGET_BODY(double)
6314 #endif
6315 ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_p) (acc_hvoid_p v, int expr)
6317 __ACCLIB_VGET_BODY(acc_hvoid_p)
6319 #if (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) && !defined(__cplusplus)
6320 ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p vv, int expr)
6322 acc_hvoid_p v = (acc_hvoid_p) vv;
6323 __ACCLIB_VGET_BODY(acc_hvoid_p)
6325 #else
6326 ACCLIB_PUBLIC_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p v, int expr)
6328 __ACCLIB_VGET_BODY(const acc_hvoid_p)
6330 #endif
6331 #endif
6332 #if defined(ACC_WANT_ACCLIB_HMEMCPY)
6333 # undef ACC_WANT_ACCLIB_HMEMCPY
6334 #define __ACCLIB_HMEMCPY_CH_INCLUDED 1
6335 #if !defined(ACCLIB_PUBLIC)
6336 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6337 #endif
6338 ACCLIB_PUBLIC(int, acc_hmemcmp) (const acc_hvoid_p s1, const acc_hvoid_p s2, acc_hsize_t len)
6340 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCMP)
6341 const acc_hbyte_p p1 = ACC_STATIC_CAST(const acc_hbyte_p, s1);
6342 const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, s2);
6343 if __acc_likely(len > 0) do
6345 int d = *p1 - *p2;
6346 if (d != 0)
6347 return d;
6348 p1++; p2++;
6349 } while __acc_likely(--len > 0);
6350 return 0;
6351 #else
6352 return memcmp(s1, s2, len);
6353 #endif
6355 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len)
6357 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCPY)
6358 acc_hbyte_p p1 = ACC_STATIC_CAST(acc_hbyte_p, dest);
6359 const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, src);
6360 if (!(len > 0) || p1 == p2)
6361 return dest;
6362 do
6363 *p1++ = *p2++;
6364 while __acc_likely(--len > 0);
6365 return dest;
6366 #else
6367 return memcpy(dest, src, len);
6368 #endif
6370 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len)
6372 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMMOVE)
6373 acc_hbyte_p p1 = ACC_STATIC_CAST(acc_hbyte_p, dest);
6374 const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, src);
6375 if (!(len > 0) || p1 == p2)
6376 return dest;
6377 if (p1 < p2)
6379 do
6380 *p1++ = *p2++;
6381 while __acc_likely(--len > 0);
6383 else
6385 p1 += len;
6386 p2 += len;
6387 do
6388 *--p1 = *--p2;
6389 while __acc_likely(--len > 0);
6391 return dest;
6392 #else
6393 return memmove(dest, src, len);
6394 #endif
6396 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemset) (acc_hvoid_p s, int cc, acc_hsize_t len)
6398 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET)
6399 acc_hbyte_p p = ACC_STATIC_CAST(acc_hbyte_p, s);
6400 unsigned char c = ACC_ITRUNC(unsigned char, cc);
6401 if __acc_likely(len > 0) do
6402 *p++ = c;
6403 while __acc_likely(--len > 0);
6404 return s;
6405 #else
6406 return memset(s, cc, len);
6407 #endif
6409 #endif
6410 #if defined(ACC_WANT_ACCLIB_RAND)
6411 # undef ACC_WANT_ACCLIB_RAND
6412 #define __ACCLIB_RAND_CH_INCLUDED 1
6413 #if !defined(ACCLIB_PUBLIC)
6414 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6415 #endif
6416 ACCLIB_PUBLIC(void, acc_srand31) (acc_rand31_p r, acc_uint32l_t seed)
6418 r->seed = seed & ACC_UINT32_C(0xffffffff);
6420 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand31) (acc_rand31_p r)
6422 r->seed = r->seed * ACC_UINT32_C(1103515245) + 12345;
6423 r->seed &= ACC_UINT32_C(0x7fffffff);
6424 return r->seed;
6426 #if defined(acc_int64l_t)
6427 ACCLIB_PUBLIC(void, acc_srand48) (acc_rand48_p r, acc_uint32l_t seed)
6429 r->seed = seed & ACC_UINT32_C(0xffffffff);
6430 r->seed <<= 16; r->seed |= 0x330e;
6432 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48) (acc_rand48_p r)
6434 acc_uint64l_t a;
6435 r->seed = r->seed * ACC_UINT64_C(25214903917) + 11;
6436 r->seed &= ACC_UINT64_C(0xffffffffffff);
6437 a = r->seed >> 17;
6438 return ACC_STATIC_CAST(acc_uint32l_t, a);
6440 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p r)
6442 acc_uint64l_t a;
6443 r->seed = r->seed * ACC_UINT64_C(25214903917) + 11;
6444 r->seed &= ACC_UINT64_C(0xffffffffffff);
6445 a = r->seed >> 16;
6446 return ACC_STATIC_CAST(acc_uint32l_t, a);
6448 #endif
6449 #if defined(acc_int64l_t)
6450 ACCLIB_PUBLIC(void, acc_srand64) (acc_rand64_p r, acc_uint64l_t seed)
6452 r->seed = seed & ACC_UINT64_C(0xffffffffffffffff);
6454 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64) (acc_rand64_p r)
6456 acc_uint64l_t a;
6457 r->seed = r->seed * ACC_UINT64_C(6364136223846793005) + 1;
6458 #if (ACC_SIZEOF_ACC_INT64L_T > 8)
6459 r->seed &= ACC_UINT64_C(0xffffffffffffffff);
6460 #endif
6461 a = r->seed >> 33;
6462 return ACC_STATIC_CAST(acc_uint32l_t, a);
6464 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p r)
6466 acc_uint64l_t a;
6467 r->seed = r->seed * ACC_UINT64_C(6364136223846793005) + 1;
6468 #if (ACC_SIZEOF_ACC_INT64L_T > 8)
6469 r->seed &= ACC_UINT64_C(0xffffffffffffffff);
6470 #endif
6471 a = r->seed >> 32;
6472 return ACC_STATIC_CAST(acc_uint32l_t, a);
6474 #endif
6475 ACCLIB_PUBLIC(void, acc_srandmt) (acc_randmt_p r, acc_uint32l_t seed)
6477 unsigned i = 0;
6478 do {
6479 r->s[i++] = (seed &= ACC_UINT32_C(0xffffffff));
6480 seed ^= seed >> 30;
6481 seed = seed * ACC_UINT32_C(0x6c078965) + i;
6482 } while (i != 624);
6483 r->n = i;
6485 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt) (acc_randmt_p r)
6487 return (__ACCLIB_FUNCNAME(acc_randmt_r32)(r)) >> 1;
6489 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p r)
6491 acc_uint32l_t v;
6492 if __acc_unlikely(r->n == 624) {
6493 unsigned i = 0, j;
6494 r->n = 0;
6495 do {
6496 j = i - 623; if (ACC_STATIC_CAST(int, j) < 0) j += 624;
6497 v = (r->s[i] & ACC_UINT32_C(0x80000000)) ^ (r->s[j] & ACC_UINT32_C(0x7fffffff));
6498 j = i - 227; if (ACC_STATIC_CAST(int, j) < 0) j += 624;
6499 r->s[i] = r->s[j] ^ (v >> 1);
6500 if (v & 1) r->s[i] ^= ACC_UINT32_C(0x9908b0df);
6501 } while (++i != 624);
6503 { unsigned i = r->n++; v = r->s[i]; }
6504 v ^= v >> 11; v ^= (v & ACC_UINT32_C(0x013a58ad)) << 7;
6505 v ^= (v & ACC_UINT32_C(0x0001df8c)) << 15; v ^= v >> 18;
6506 return v;
6508 #if defined(acc_int64l_t)
6509 ACCLIB_PUBLIC(void, acc_srandmt64) (acc_randmt64_p r, acc_uint64l_t seed)
6511 unsigned i = 0;
6512 do {
6513 r->s[i++] = (seed &= ACC_UINT64_C(0xffffffffffffffff));
6514 seed ^= seed >> 62;
6515 seed = seed * ACC_UINT64_C(0x5851f42d4c957f2d) + i;
6516 } while (i != 312);
6517 r->n = i;
6519 #if 0
6520 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt64) (acc_randmt64_p r)
6522 acc_uint64l_t v;
6523 v = (__ACCLIB_FUNCNAME(acc_randmt64_r64)(r)) >> 33;
6524 return ACC_STATIC_CAST(acc_uint32l_t, v);
6526 #endif
6527 ACCLIB_PUBLIC(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p r)
6529 acc_uint64l_t v;
6530 if __acc_unlikely(r->n == 312) {
6531 unsigned i = 0, j;
6532 r->n = 0;
6533 do {
6534 j = i - 311; if (ACC_STATIC_CAST(int, j) < 0) j += 312;
6535 v = (r->s[i] & ACC_UINT64_C(0xffffffff80000000)) ^ (r->s[j] & ACC_UINT64_C(0x7fffffff));
6536 j = i - 156; if (ACC_STATIC_CAST(int, j) < 0) j += 312;
6537 r->s[i] = r->s[j] ^ (v >> 1);
6538 if (v & 1) r->s[i] ^= ACC_UINT64_C(0xb5026f5aa96619e9);
6539 } while (++i != 312);
6541 { unsigned i = r->n++; v = r->s[i]; }
6542 v ^= (v & ACC_UINT64_C(0xaaaaaaaaa0000000)) >> 29;
6543 v ^= (v & ACC_UINT64_C(0x38eb3ffff6d3)) << 17;
6544 v ^= (v & ACC_UINT64_C(0x7ffbf77)) << 37;
6545 return v ^ (v >> 43);
6547 #endif
6548 #endif
6549 #if defined(ACC_WANT_ACCLIB_RDTSC)
6550 # undef ACC_WANT_ACCLIB_RDTSC
6551 #define __ACCLIB_RDTSC_CH_INCLUDED 1
6552 #if !defined(ACCLIB_PUBLIC)
6553 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6554 #endif
6555 #if defined(acc_int32e_t)
6556 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
6557 # pragma warn(push)
6558 # pragma warn(disable:2007)
6559 #endif
6560 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6561 #if (ACC_ARCH_AMD64 && ACC_CC_INTELC)
6562 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "memory", "rax", "rdx"
6563 #elif (ACC_ARCH_AMD64)
6564 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "rax", "rdx"
6565 #elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
6566 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "ax", "dx"
6567 #elif (ACC_ARCH_I386 && ACC_CC_INTELC)
6568 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "memory", "eax", "edx"
6569 #else
6570 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "eax", "edx"
6571 #endif
6572 #endif
6573 ACCLIB_PUBLIC(int, acc_tsc_read) (acc_uint32e_t* t)
6575 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6576 __asm__ __volatile__(
6577 "clc \n" ".byte 0x0f,0x31\n"
6578 "movl %%eax,(%0)\n" "movl %%edx,4(%0)\n"
6579 __ACCLIB_RDTSC_REGS
6580 );
6581 return 0;
6582 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
6583 ACC_UNUSED(t);
6584 __asm {
6585 mov ecx, t
6586 clc
6587 # if (ACC_CC_MSC && (_MSC_VER < 1200))
6588 _emit 0x0f
6589 _emit 0x31
6590 # else
6591 rdtsc
6592 # endif
6593 mov [ecx], eax
6594 mov [ecx+4], edx
6596 return 0;
6597 #else
6598 t[0] = t[1] = 0; return -1;
6599 #endif
6601 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
6602 # pragma warn(pop)
6603 #endif
6604 #endif
6605 #endif
6606 #if defined(ACC_WANT_ACCLIB_DOSALLOC)
6607 # undef ACC_WANT_ACCLIB_DOSALLOC
6608 #define __ACCLIB_DOSALLOC_CH_INCLUDED 1
6609 #if !defined(ACCLIB_PUBLIC)
6610 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6611 #endif
6612 #if (ACC_OS_OS216)
6613 ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
6614 ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
6615 #endif
6616 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
6617 #if !(ACC_CC_AZTECC)
6618 ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
6620 void __far* p = 0;
6621 union REGS ri, ro;
6622 if ((long)size <= 0)
6623 return p;
6624 size = (size + 15) >> 4;
6625 if (size > 0xffffu)
6626 return p;
6627 ri.x.ax = 0x4800;
6628 ri.x.bx = (unsigned short) size;
6629 int86(0x21, &ri, &ro);
6630 if ((ro.x.cflag & 1) == 0)
6631 p = (void __far*) ACC_PTR_MK_FP(ro.x.ax, 0);
6632 return p;
6634 ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
6636 union REGS ri, ro;
6637 struct SREGS rs;
6638 if (!p)
6639 return 0;
6640 if (ACC_PTR_FP_OFF(p) != 0)
6641 return -1;
6642 segread(&rs);
6643 ri.x.ax = 0x4900;
6644 rs.es = ACC_PTR_FP_SEG(p);
6645 int86x(0x21, &ri, &ro, &rs);
6646 if (ro.x.cflag & 1)
6647 return -1;
6648 return 0;
6650 #endif
6651 #endif
6652 #if (ACC_OS_OS216)
6653 ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
6655 void __far* p = 0;
6656 unsigned short sel = 0;
6657 if ((long)size <= 0)
6658 return p;
6659 if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
6660 p = (void __far*) ACC_PTR_MK_FP(sel, 0);
6661 return p;
6663 ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
6665 if (!p)
6666 return 0;
6667 if (ACC_PTR_FP_OFF(p) != 0)
6668 return -1;
6669 if (DosFreeSeg(ACC_PTR_FP_SEG(p)) != 0)
6670 return -1;
6671 return 0;
6673 #endif
6674 #endif
6675 #if defined(ACC_WANT_ACCLIB_GETOPT)
6676 # undef ACC_WANT_ACCLIB_GETOPT
6677 #define __ACCLIB_GETOPT_CH_INCLUDED 1
6678 #if !defined(ACCLIB_PUBLIC)
6679 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6680 #endif
6681 ACCLIB_PUBLIC(void, acc_getopt_init) (acc_getopt_p g,
6682 int start_argc, int argc, char** argv)
6684 memset(g, 0, sizeof(*g));
6685 g->optind = start_argc;
6686 g->argc = argc; g->argv = argv;
6687 g->optopt = -1;
6689 static int __ACCLIB_FUNCNAME(acc_getopt_rotate) (char** p, int first, int middle, int last)
6691 int i = middle, n = middle - first;
6692 if (first >= middle || middle >= last) return 0;
6693 for (;;)
6695 char* t = p[first]; p[first] = p[i]; p[i] = t;
6696 if (++first == middle)
6698 if (++i == last) break;
6699 middle = i;
6701 else if (++i == last)
6702 i = middle;
6704 return n;
6706 static int __ACCLIB_FUNCNAME(acc_getopt_perror) (acc_getopt_p g, int ret, const char* f, ...)
6708 if (g->opterr)
6710 #if (HAVE_STDARG_H)
6711 struct { va_list ap; } s;
6712 va_start(s.ap, f);
6713 g->opterr(g, f, &s);
6714 va_end(s.ap);
6715 #else
6716 g->opterr(g, f, NULL);
6717 #endif
6719 ++g->errcount;
6720 return ret;
6722 ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
6723 const char* shortopts,
6724 const acc_getopt_longopt_p longopts,
6725 int* longind)
6727 #define pe __ACCLIB_FUNCNAME(acc_getopt_perror)
6728 int ordering = ACC_GETOPT_PERMUTE;
6729 int missing_arg_ret = g->bad_option;
6730 char* a;
6731 if (shortopts)
6733 if (*shortopts == '-' || *shortopts == '+')
6734 ordering = *shortopts++ == '-' ? ACC_GETOPT_RETURN_IN_ORDER : ACC_GETOPT_REQUIRE_ORDER;
6735 if (*shortopts == ':')
6736 missing_arg_ret = *shortopts++;
6738 g->optarg = NULL;
6739 if (g->optopt == -1)
6740 g->optopt = g->bad_option;
6741 if (longind)
6742 *longind = -1;
6743 if (g->eof)
6744 return -1;
6745 if (g->shortpos)
6746 goto acc_label_next_shortopt;
6747 g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind);
6748 g->pending_rotate_first = g->pending_rotate_middle = g->optind;
6749 if (ordering == ACC_GETOPT_PERMUTE)
6751 while (g->optind < g->argc && !(g->argv[g->optind][0] == '-' && g->argv[g->optind][1]))
6752 ++g->optind;
6753 g->pending_rotate_middle = g->optind;
6755 if (g->optind >= g->argc)
6757 g->optind = g->pending_rotate_first;
6758 goto acc_label_eof;
6760 a = g->argv[g->optind];
6761 if (a[0] == '-' && a[1] == '-')
6763 size_t l = 0;
6764 const acc_getopt_longopt_p o;
6765 const acc_getopt_longopt_p o1 = NULL;
6766 const acc_getopt_longopt_p o2 = NULL;
6767 int need_exact = 0;
6768 ++g->optind;
6769 if (!a[2])
6770 goto acc_label_eof;
6771 for (a += 2; a[l] && a[l] != '=' && a[l] != '#'; )
6772 ++l;
6773 for (o = longopts; l && o && o->name; ++o)
6775 if (strncmp(a, o->name, l) != 0)
6776 continue;
6777 if (!o->name[l])
6778 goto acc_label_found_o;
6779 need_exact |= o->has_arg & ACC_GETOPT_EXACT_ARG;
6780 if (o1) o2 = o;
6781 else o1 = o;
6783 if (!o1 || need_exact)
6784 return pe(g, g->bad_option, "unrecognized option '--%s'", a);
6785 if (o2)
6786 return pe(g, g->bad_option, "option '--%s' is ambiguous (could be '--%s' or '--%s')", a, o1->name, o2->name);
6787 o = o1;
6788 acc_label_found_o:
6789 a += l;
6790 switch (o->has_arg & 0x2f)
6792 case ACC_GETOPT_OPTIONAL_ARG:
6793 if (a[0])
6794 g->optarg = a + 1;
6795 break;
6796 case ACC_GETOPT_REQUIRED_ARG:
6797 if (a[0])
6798 g->optarg = a + 1;
6799 else if (g->optind < g->argc)
6800 g->optarg = g->argv[g->optind++];
6801 if (!g->optarg)
6802 return pe(g, missing_arg_ret, "option '--%s' requires an argument", o->name);
6803 break;
6804 case ACC_GETOPT_REQUIRED_ARG | 0x20:
6805 if (a[0] && a[1])
6806 g->optarg = a + 1;
6807 if (!g->optarg)
6808 return pe(g, missing_arg_ret, "option '--%s=' requires an argument", o->name);
6809 break;
6810 default:
6811 if (a[0])
6812 return pe(g, g->bad_option, "option '--%s' doesn't allow an argument", o->name);
6813 break;
6815 if (longind)
6816 *longind = (int) (o - longopts);
6817 if (o->flag)
6819 *o->flag = o->val;
6820 return 0;
6822 return o->val;
6824 if (a[0] == '-' && a[1])
6826 unsigned char c;
6827 const char* s;
6828 acc_label_next_shortopt:
6829 a = g->argv[g->optind] + ++g->shortpos;
6830 c = (unsigned char) *a++; s = NULL;
6831 if (c != ':' && shortopts)
6832 s = strchr(shortopts, c);
6833 if (!s || s[1] != ':')
6835 if (!a[0])
6836 { ++g->optind; g->shortpos = 0; }
6837 if (!s)
6839 g->optopt = c;
6840 return pe(g, g->bad_option, "invalid option '-%c'", c);
6843 else
6845 ++g->optind; g->shortpos = 0;
6846 if (a[0])
6847 g->optarg = a;
6848 else if (s[2] != ':')
6850 if (g->optind < g->argc)
6851 g->optarg = g->argv[g->optind++];
6852 else
6854 g->optopt = c;
6855 return pe(g, missing_arg_ret, "option '-%c' requires an argument", c);
6859 return c;
6861 if (ordering == ACC_GETOPT_RETURN_IN_ORDER)
6863 ++g->optind;
6864 g->optarg = a;
6865 return 1;
6867 acc_label_eof:
6868 g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind);
6869 g->pending_rotate_first = g->pending_rotate_middle = g->optind;
6870 g->eof = 1;
6871 return -1;
6872 #undef pe
6874 #endif
6875 #if defined(ACC_WANT_ACCLIB_HALLOC)
6876 # undef ACC_WANT_ACCLIB_HALLOC
6877 #define __ACCLIB_HALLOC_CH_INCLUDED 1
6878 #if !defined(ACCLIB_PUBLIC)
6879 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6880 #endif
6881 #if (ACC_HAVE_MM_HUGE_PTR)
6882 #if 1 && (ACC_OS_DOS16 && defined(BLX286))
6883 # define __ACCLIB_HALLOC_USE_DAH 1
6884 #elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
6885 # define __ACCLIB_HALLOC_USE_DAH 1
6886 #elif 1 && (ACC_OS_OS216)
6887 # define __ACCLIB_HALLOC_USE_DAH 1
6888 #elif 1 && (ACC_OS_WIN16)
6889 # define __ACCLIB_HALLOC_USE_GA 1
6890 #elif 1 && (ACC_OS_DOS16) && (ACC_CC_BORLANDC) && defined(__DPMI16__)
6891 # define __ACCLIB_HALLOC_USE_GA 1
6892 #endif
6893 #endif
6894 #if (__ACCLIB_HALLOC_USE_DAH)
6895 #if 0 && (ACC_OS_OS216)
6896 #include <os2.h>
6897 #else
6898 ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
6899 ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
6900 #endif
6901 #endif
6902 #if (__ACCLIB_HALLOC_USE_GA)
6903 #if 0
6904 #define STRICT 1
6905 #include <windows.h>
6906 #else
6907 ACC_EXTERN_C const void __near* __far __pascal GlobalAlloc(unsigned, unsigned long);
6908 ACC_EXTERN_C const void __near* __far __pascal GlobalFree(const void __near*);
6909 ACC_EXTERN_C unsigned long __far __pascal GlobalHandle(unsigned);
6910 ACC_EXTERN_C void __far* __far __pascal GlobalLock(const void __near*);
6911 ACC_EXTERN_C int __far __pascal GlobalUnlock(const void __near*);
6912 #endif
6913 #endif
6914 ACCLIB_PUBLIC(acc_hvoid_p, acc_halloc) (acc_hsize_t size)
6916 acc_hvoid_p p = ACC_STATIC_CAST(acc_hvoid_p, 0);
6917 if (!(size > 0))
6918 return p;
6919 #if 0 && defined(__palmos__)
6920 p = MemPtrNew(size);
6921 #elif !(ACC_HAVE_MM_HUGE_PTR)
6922 if (size < ACC_STATIC_CAST(size_t, -1))
6923 p = malloc(ACC_STATIC_CAST(size_t, size));
6924 #else
6925 if (ACC_STATIC_CAST(long, size) <= 0)
6926 return p;
6928 #if (__ACCLIB_HALLOC_USE_DAH)
6929 unsigned short sel = 0;
6930 if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
6931 p = (acc_hvoid_p) ACC_PTR_MK_FP(sel, 0);
6932 #elif (__ACCLIB_HALLOC_USE_GA)
6933 const void __near* h = GlobalAlloc(2, size);
6934 if (h) {
6935 p = GlobalLock(h);
6936 if (p && ACC_PTR_FP_OFF(p) != 0) {
6937 GlobalUnlock(h);
6938 p = 0;
6940 if (!p)
6941 GlobalFree(h);
6943 #elif (ACC_CC_MSC && (_MSC_VER >= 700))
6944 p = _halloc(size, 1);
6945 #elif (ACC_CC_MSC || ACC_CC_WATCOMC)
6946 p = halloc(size, 1);
6947 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
6948 p = farmalloc(size);
6949 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
6950 p = farmalloc(size);
6951 #elif (ACC_CC_AZTECC)
6952 p = lmalloc(size);
6953 #else
6954 if (size < ACC_STATIC_CAST(size_t, -1))
6955 p = malloc(ACC_STATIC_CAST(size_t, size));
6956 #endif
6958 #endif
6959 return p;
6961 ACCLIB_PUBLIC(void, acc_hfree) (acc_hvoid_p p)
6963 if (!p)
6964 return;
6965 #if 0 && defined(__palmos__)
6966 MemPtrFree(p);
6967 #elif !(ACC_HAVE_MM_HUGE_PTR)
6968 free(p);
6969 #else
6970 #if (__ACCLIB_HALLOC_USE_DAH)
6971 if (ACC_PTR_FP_OFF(p) == 0)
6972 DosFreeSeg((unsigned short) ACC_PTR_FP_SEG(p));
6973 #elif (__ACCLIB_HALLOC_USE_GA)
6974 if (ACC_PTR_FP_OFF(p) == 0) {
6975 const void __near* h = (const void __near*) (unsigned) GlobalHandle(ACC_PTR_FP_SEG(p));
6976 if (h) {
6977 GlobalUnlock(h);
6978 GlobalFree(h);
6981 #elif (ACC_CC_MSC && (_MSC_VER >= 700))
6982 _hfree(p);
6983 #elif (ACC_CC_MSC || ACC_CC_WATCOMC)
6984 hfree(p);
6985 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
6986 farfree((void __far*) p);
6987 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
6988 farfree((void __far*) p);
6989 #elif (ACC_CC_AZTECC)
6990 lfree(p);
6991 #else
6992 free(p);
6993 #endif
6994 #endif
6996 #endif
6997 #if defined(ACC_WANT_ACCLIB_HFREAD)
6998 # undef ACC_WANT_ACCLIB_HFREAD
6999 #define __ACCLIB_HFREAD_CH_INCLUDED 1
7000 #if !defined(ACCLIB_PUBLIC)
7001 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7002 #endif
7003 ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (void* vfp, acc_hvoid_p buf, acc_hsize_t size)
7005 FILE* fp = ACC_STATIC_CAST(FILE *, vfp);
7006 #if (ACC_HAVE_MM_HUGE_PTR)
7007 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
7008 #define __ACCLIB_REQUIRE_HMEMCPY_CH 1
7009 unsigned char tmp[512];
7010 acc_hsize_t l = 0;
7011 while (l < size)
7013 size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
7014 n = fread(tmp, 1, n, fp);
7015 if (n == 0)
7016 break;
7017 __ACCLIB_FUNCNAME(acc_hmemcpy)((acc_hbyte_p)buf + l, tmp, (acc_hsize_t)n);
7018 l += n;
7020 return l;
7021 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
7022 acc_hbyte_p b = (acc_hbyte_p) buf;
7023 acc_hsize_t l = 0;
7024 while (l < size)
7026 size_t n;
7027 n = ACC_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
7028 if ((acc_hsize_t) n > size - l)
7029 n = (size_t) (size - l);
7030 n = fread((void __far*)b, 1, n, fp);
7031 if (n == 0)
7032 break;
7033 b += n; l += n;
7035 return l;
7036 #else
7037 # error "unknown memory model"
7038 #endif
7039 #else
7040 return fread(buf, 1, size, fp);
7041 #endif
7043 ACCLIB_PUBLIC(acc_hsize_t, acc_hfwrite) (void* vfp, const acc_hvoid_p buf, acc_hsize_t size)
7045 FILE* fp = ACC_STATIC_CAST(FILE *, vfp);
7046 #if (ACC_HAVE_MM_HUGE_PTR)
7047 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
7048 #define __ACCLIB_REQUIRE_HMEMCPY_CH 1
7049 unsigned char tmp[512];
7050 acc_hsize_t l = 0;
7051 while (l < size)
7053 size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
7054 __ACCLIB_FUNCNAME(acc_hmemcpy)(tmp, (const acc_hbyte_p)buf + l, (acc_hsize_t)n);
7055 n = fwrite(tmp, 1, n, fp);
7056 if (n == 0)
7057 break;
7058 l += n;
7060 return l;
7061 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
7062 const acc_hbyte_p b = (const acc_hbyte_p) buf;
7063 acc_hsize_t l = 0;
7064 while (l < size)
7066 size_t n;
7067 n = ACC_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
7068 if ((acc_hsize_t) n > size - l)
7069 n = (size_t) (size - l);
7070 n = fwrite((void __far*)b, 1, n, fp);
7071 if (n == 0)
7072 break;
7073 b += n; l += n;
7075 return l;
7076 #else
7077 # error "unknown memory model"
7078 #endif
7079 #else
7080 return fwrite(buf, 1, size, fp);
7081 #endif
7083 #endif
7084 #if defined(ACC_WANT_ACCLIB_HSREAD)
7085 # undef ACC_WANT_ACCLIB_HSREAD
7086 #define __ACCLIB_HSREAD_CH_INCLUDED 1
7087 #if !defined(ACCLIB_PUBLIC)
7088 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7089 #endif
7090 ACCLIB_PUBLIC(long, acc_safe_hread) (int fd, acc_hvoid_p buf, long size)
7092 acc_hbyte_p b = (acc_hbyte_p) buf;
7093 long l = 0;
7094 int saved_errno;
7095 saved_errno = errno;
7096 while (l < size)
7098 long n = size - l;
7099 #if (ACC_HAVE_MM_HUGE_PTR)
7100 # define __ACCLIB_REQUIRE_HREAD_CH 1
7101 errno = 0; n = acc_hread(fd, b, n);
7102 #elif (ACC_OS_DOS32) && defined(__DJGPP__)
7103 errno = 0; n = _read(fd, b, n);
7104 #else
7105 errno = 0; n = read(fd, b, n);
7106 #endif
7107 if (n == 0)
7108 break;
7109 if (n < 0) {
7110 #if defined(EAGAIN)
7111 if (errno == (EAGAIN)) continue;
7112 #endif
7113 #if defined(EINTR)
7114 if (errno == (EINTR)) continue;
7115 #endif
7116 if (errno == 0) errno = 1;
7117 return l;
7119 b += n; l += n;
7121 errno = saved_errno;
7122 return l;
7124 ACCLIB_PUBLIC(long, acc_safe_hwrite) (int fd, const acc_hvoid_p buf, long size)
7126 const acc_hbyte_p b = (const acc_hbyte_p) buf;
7127 long l = 0;
7128 int saved_errno;
7129 saved_errno = errno;
7130 while (l < size)
7132 long n = size - l;
7133 #if (ACC_HAVE_MM_HUGE_PTR)
7134 # define __ACCLIB_REQUIRE_HREAD_CH 1
7135 errno = 0; n = acc_hwrite(fd, b, n);
7136 #elif (ACC_OS_DOS32) && defined(__DJGPP__)
7137 errno = 0; n = _write(fd, b, n);
7138 #else
7139 errno = 0; n = write(fd, b, n);
7140 #endif
7141 if (n == 0)
7142 break;
7143 if (n < 0) {
7144 #if defined(EAGAIN)
7145 if (errno == (EAGAIN)) continue;
7146 #endif
7147 #if defined(EINTR)
7148 if (errno == (EINTR)) continue;
7149 #endif
7150 if (errno == 0) errno = 1;
7151 return l;
7153 b += n; l += n;
7155 errno = saved_errno;
7156 return l;
7158 #endif
7159 #if defined(ACC_WANT_ACCLIB_PCLOCK)
7160 # undef ACC_WANT_ACCLIB_PCLOCK
7161 #define __ACCLIB_PCLOCK_CH_INCLUDED 1
7162 #if !defined(ACCLIB_PUBLIC)
7163 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7164 #endif
7165 #if 1 && (ACC_OS_POSIX_LINUX && ACC_ARCH_AMD64 && ACC_ASM_SYNTAX_GNUC && !ACC_CFG_NO_SYSCALL)
7166 #ifndef acc_pclock_syscall_clock_gettime
7167 #define acc_pclock_syscall_clock_gettime acc_pclock_syscall_clock_gettime
7168 #endif
7169 __acc_static_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts)
7171 unsigned long r = 228;
7172 __asm__ __volatile__("syscall\n" : "=a" (r), "=m" (*ts) : "0" (r), "D" (clockid), "S" (ts) __ACC_ASM_CLOBBER_LIST_CC);
7173 return ACC_ICAST(long, r);
7175 #endif
7176 #if 1 && (ACC_OS_POSIX_LINUX && ACC_ARCH_I386 && ACC_ASM_SYNTAX_GNUC && !ACC_CFG_NO_SYSCALL) && defined(acc_int64l_t)
7177 #ifndef acc_pclock_syscall_clock_gettime
7178 #define acc_pclock_syscall_clock_gettime acc_pclock_syscall_clock_gettime
7179 #endif
7180 __acc_static_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts)
7182 unsigned long r = 265;
7183 __asm__ __volatile__("pushl %%ebx\n pushl %%edx\n popl %%ebx\n int $0x80\n popl %%ebx\n": "=a" (r), "=m" (*ts) : "0" (r), "d" (clockid), "c" (ts) __ACC_ASM_CLOBBER_LIST_CC);
7184 return ACC_ICAST(long, r);
7186 #endif
7187 #if 0 && defined(acc_pclock_syscall_clock_gettime)
7188 #ifndef acc_pclock_read_clock_gettime_r_syscall
7189 #define acc_pclock_read_clock_gettime_r_syscall acc_pclock_read_clock_gettime_r_syscall
7190 #endif
7191 static int acc_pclock_read_clock_gettime_r_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7193 struct timespec ts;
7194 if (acc_pclock_syscall_clock_gettime(0, &ts) != 0)
7195 return -1;
7196 c->tv_sec = ts.tv_sec;
7197 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7198 ACC_UNUSED(h); return 0;
7200 #endif
7201 #if (HAVE_GETTIMEOFDAY)
7202 #ifndef acc_pclock_read_gettimeofday
7203 #define acc_pclock_read_gettimeofday acc_pclock_read_gettimeofday
7204 #endif
7205 static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h, acc_pclock_p c)
7207 struct timeval tv;
7208 if (gettimeofday(&tv, NULL) != 0)
7209 return -1;
7210 #if defined(acc_int64l_t)
7211 c->tv_sec = tv.tv_sec;
7212 #else
7213 c->tv_sec_high = 0;
7214 c->tv_sec_low = tv.tv_sec;
7215 #endif
7216 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (tv.tv_usec * 1000u));
7217 ACC_UNUSED(h); return 0;
7219 #endif
7220 #if defined(CLOCKS_PER_SEC) && !(ACC_CFG_NO_DOUBLE)
7221 #ifndef acc_pclock_read_clock
7222 #define acc_pclock_read_clock acc_pclock_read_clock
7223 #endif
7224 static int acc_pclock_read_clock(acc_pclock_handle_p h, acc_pclock_p c)
7226 clock_t ticks;
7227 double secs;
7228 #if defined(acc_int64l_t)
7229 acc_uint64l_t nsecs;
7230 ticks = clock();
7231 secs = ACC_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC);
7232 nsecs = ACC_STATIC_CAST(acc_uint64l_t, (secs * 1000000000.0));
7233 c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (nsecs / 1000000000ul));
7234 nsecs = (nsecs % 1000000000ul);
7235 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, nsecs);
7236 #else
7237 ticks = clock();
7238 secs = ACC_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC);
7239 c->tv_sec_high = 0;
7240 c->tv_sec_low = ACC_STATIC_CAST(acc_uint32l_t, (secs + 0.5));
7241 c->tv_nsec = 0;
7242 #endif
7243 ACC_UNUSED(h); return 0;
7245 #endif
7246 #if 1 && defined(acc_pclock_syscall_clock_gettime)
7247 #ifndef acc_pclock_read_clock_gettime_m_syscall
7248 #define acc_pclock_read_clock_gettime_m_syscall acc_pclock_read_clock_gettime_m_syscall
7249 #endif
7250 static int acc_pclock_read_clock_gettime_m_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7252 struct timespec ts;
7253 if (acc_pclock_syscall_clock_gettime(1, &ts) != 0)
7254 return -1;
7255 c->tv_sec = ts.tv_sec;
7256 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7257 ACC_UNUSED(h); return 0;
7259 #endif
7260 #if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) && defined(UCLOCKS_PER_SEC) && !(ACC_CFG_NO_DOUBLE)
7261 #ifndef acc_pclock_read_uclock
7262 #define acc_pclock_read_uclock acc_pclock_read_uclock
7263 #endif
7264 static int acc_pclock_read_uclock(acc_pclock_handle_p h, acc_pclock_p c)
7266 acc_uint64l_t ticks;
7267 double secs;
7268 acc_uint64l_t nsecs;
7269 ticks = uclock();
7270 secs = ACC_STATIC_CAST(double, ticks) / (UCLOCKS_PER_SEC);
7271 nsecs = ACC_STATIC_CAST(acc_uint64l_t, (secs * 1000000000.0));
7272 c->tv_sec = nsecs / 1000000000ul;
7273 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (nsecs % 1000000000ul));
7274 ACC_UNUSED(h); return 0;
7276 #endif
7277 #if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) && defined(acc_int64l_t)
7278 #ifndef acc_pclock_read_clock_gettime_p_libc
7279 #define acc_pclock_read_clock_gettime_p_libc acc_pclock_read_clock_gettime_p_libc
7280 #endif
7281 static int acc_pclock_read_clock_gettime_p_libc(acc_pclock_handle_p h, acc_pclock_p c)
7283 struct timespec ts;
7284 if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) != 0)
7285 return -1;
7286 c->tv_sec = ts.tv_sec;
7287 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7288 ACC_UNUSED(h); return 0;
7290 #endif
7291 #if 1 && defined(acc_pclock_syscall_clock_gettime)
7292 #ifndef acc_pclock_read_clock_gettime_p_syscall
7293 #define acc_pclock_read_clock_gettime_p_syscall acc_pclock_read_clock_gettime_p_syscall
7294 #endif
7295 static int acc_pclock_read_clock_gettime_p_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7297 struct timespec ts;
7298 if (acc_pclock_syscall_clock_gettime(2, &ts) != 0)
7299 return -1;
7300 c->tv_sec = ts.tv_sec;
7301 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7302 ACC_UNUSED(h); return 0;
7304 #endif
7305 #if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
7306 #ifndef acc_pclock_read_getprocesstimes
7307 #define acc_pclock_read_getprocesstimes acc_pclock_read_getprocesstimes
7308 #endif
7309 static int acc_pclock_read_getprocesstimes(acc_pclock_handle_p h, acc_pclock_p c)
7311 FILETIME ct, et, kt, ut;
7312 acc_uint64l_t ticks;
7313 if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut) == 0)
7314 return -1;
7315 ticks = (ACC_STATIC_CAST(acc_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime;
7316 if __acc_unlikely(h->ticks_base == 0)
7317 h->ticks_base = ticks;
7318 else
7319 ticks -= h->ticks_base;
7320 c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (ticks / 10000000ul));
7321 ticks = (ticks % 10000000ul) * 100u;
7322 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ticks);
7323 ACC_UNUSED(h); return 0;
7325 #endif
7326 #if (HAVE_GETRUSAGE) && defined(RUSAGE_SELF)
7327 #ifndef acc_pclock_read_getrusage
7328 #define acc_pclock_read_getrusage acc_pclock_read_getrusage
7329 #endif
7330 static int acc_pclock_read_getrusage(acc_pclock_handle_p h, acc_pclock_p c)
7332 struct rusage ru;
7333 if (getrusage(RUSAGE_SELF, &ru) != 0)
7334 return -1;
7335 #if defined(acc_int64l_t)
7336 c->tv_sec = ru.ru_utime.tv_sec;
7337 #else
7338 c->tv_sec_high = 0;
7339 c->tv_sec_low = ru.ru_utime.tv_sec;
7340 #endif
7341 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (ru.ru_utime.tv_usec * 1000u));
7342 ACC_UNUSED(h); return 0;
7344 #endif
7345 #if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(acc_int64l_t)
7346 #ifndef acc_pclock_read_clock_gettime_t_libc
7347 #define acc_pclock_read_clock_gettime_t_libc acc_pclock_read_clock_gettime_t_libc
7348 #endif
7349 static int acc_pclock_read_clock_gettime_t_libc(acc_pclock_handle_p h, acc_pclock_p c)
7351 struct timespec ts;
7352 if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0)
7353 return -1;
7354 c->tv_sec = ts.tv_sec;
7355 c->tv_nsec = (acc_uint32l_t) ts.tv_nsec;
7356 ACC_UNUSED(h); return 0;
7358 #endif
7359 #if 1 && defined(acc_pclock_syscall_clock_gettime)
7360 #ifndef acc_pclock_read_clock_gettime_t_syscall
7361 #define acc_pclock_read_clock_gettime_t_syscall acc_pclock_read_clock_gettime_t_syscall
7362 #endif
7363 static int acc_pclock_read_clock_gettime_t_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7365 struct timespec ts;
7366 if (acc_pclock_syscall_clock_gettime(3, &ts) != 0)
7367 return -1;
7368 c->tv_sec = ts.tv_sec;
7369 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7370 ACC_UNUSED(h); return 0;
7372 #endif
7373 #if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
7374 #ifndef acc_pclock_read_getthreadtimes
7375 #define acc_pclock_read_getthreadtimes acc_pclock_read_getthreadtimes
7376 #endif
7377 static int acc_pclock_read_getthreadtimes(acc_pclock_handle_p h, acc_pclock_p c)
7379 FILETIME ct, et, kt, ut;
7380 acc_uint64l_t ticks;
7381 if (GetThreadTimes(GetCurrentThread(), &ct, &et, &kt, &ut) == 0)
7382 return -1;
7383 ticks = (ACC_STATIC_CAST(acc_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime;
7384 if __acc_unlikely(h->ticks_base == 0)
7385 h->ticks_base = ticks;
7386 else
7387 ticks -= h->ticks_base;
7388 c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (ticks / 10000000ul));
7389 ticks = (ticks % 10000000ul) * 100u;
7390 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ticks);
7391 ACC_UNUSED(h); return 0;
7393 #endif
7394 ACCLIB_PUBLIC(int, acc_pclock_open) (acc_pclock_handle_p h, int mode)
7396 acc_pclock_t c;
7397 int i;
7398 h->h = ACC_STATIC_CAST(acclib_handle_t, 0);
7399 h->mode = -1;
7400 h->read_error = 2;
7401 h->name = NULL;
7402 h->gettime = ACC_STATIC_CAST(acc_pclock_gettime_t, 0);
7403 #if defined(acc_int64l_t)
7404 h->ticks_base = 0;
7405 #endif
7406 switch (mode)
7408 case ACC_PCLOCK_REALTIME:
7409 # if defined(acc_pclock_read_clock_gettime_r_syscall)
7410 if (acc_pclock_read_clock_gettime_r_syscall(h, &c) == 0) {
7411 h->gettime = acc_pclock_read_clock_gettime_r_syscall;
7412 h->name = "CLOCK_REALTIME/syscall";
7413 break;
7415 # endif
7416 # if defined(acc_pclock_read_gettimeofday)
7417 if (acc_pclock_read_gettimeofday(h, &c) == 0) {
7418 h->gettime = acc_pclock_read_gettimeofday;
7419 h->name = "gettimeofday";
7420 break;
7422 # endif
7423 break;
7424 case ACC_PCLOCK_MONOTONIC:
7425 # if defined(acc_pclock_read_clock_gettime_m_syscall)
7426 if (acc_pclock_read_clock_gettime_m_syscall(h, &c) == 0) {
7427 h->gettime = acc_pclock_read_clock_gettime_m_syscall;
7428 h->name = "CLOCK_MONOTONIC/syscall";
7429 break;
7431 # endif
7432 # if defined(acc_pclock_read_uclock)
7433 if (acc_pclock_read_uclock(h, &c) == 0) {
7434 h->gettime = acc_pclock_read_uclock;
7435 h->name = "uclock";
7436 break;
7438 # endif
7439 # if defined(acc_pclock_read_clock)
7440 if (acc_pclock_read_clock(h, &c) == 0) {
7441 h->gettime = acc_pclock_read_clock;
7442 h->name = "clock";
7443 break;
7445 # endif
7446 break;
7447 case ACC_PCLOCK_PROCESS_CPUTIME_ID:
7448 # if defined(acc_pclock_read_getprocesstimes)
7449 if (acc_pclock_read_getprocesstimes(h, &c) == 0) {
7450 h->gettime = acc_pclock_read_getprocesstimes;
7451 h->name = "GetProcessTimes";
7452 break;
7454 # endif
7455 # if defined(acc_pclock_read_clock_gettime_p_syscall)
7456 if (acc_pclock_read_clock_gettime_p_syscall(h, &c) == 0) {
7457 h->gettime = acc_pclock_read_clock_gettime_p_syscall;
7458 h->name = "CLOCK_PROCESS_CPUTIME_ID/syscall";
7459 break;
7461 # endif
7462 # if defined(acc_pclock_read_clock_gettime_p_libc)
7463 if (acc_pclock_read_clock_gettime_p_libc(h, &c) == 0) {
7464 h->gettime = acc_pclock_read_clock_gettime_p_libc;
7465 h->name = "CLOCK_PROCESS_CPUTIME_ID/libc";
7466 break;
7468 # endif
7469 # if defined(acc_pclock_read_getrusage)
7470 if (acc_pclock_read_getrusage(h, &c) == 0) {
7471 h->gettime = acc_pclock_read_getrusage;
7472 h->name = "getrusage";
7473 break;
7475 # endif
7476 break;
7477 case ACC_PCLOCK_THREAD_CPUTIME_ID:
7478 # if defined(acc_pclock_read_getthreadtimes)
7479 if (acc_pclock_read_getthreadtimes(h, &c) == 0) {
7480 h->gettime = acc_pclock_read_getthreadtimes;
7481 h->name = "GetThreadTimes";
7483 # endif
7484 # if defined(acc_pclock_read_clock_gettime_t_syscall)
7485 if (acc_pclock_read_clock_gettime_t_syscall(h, &c) == 0) {
7486 h->gettime = acc_pclock_read_clock_gettime_t_syscall;
7487 h->name = "CLOCK_THREAD_CPUTIME_ID/syscall";
7488 break;
7490 # endif
7491 # if defined(acc_pclock_read_clock_gettime_t_libc)
7492 if (acc_pclock_read_clock_gettime_t_libc(h, &c) == 0) {
7493 h->gettime = acc_pclock_read_clock_gettime_t_libc;
7494 h->name = "CLOCK_THREAD_CPUTIME_ID/libc";
7495 break;
7497 # endif
7498 break;
7500 if (!h->gettime)
7501 return -1;
7502 if (!h->h)
7503 h->h = ACC_STATIC_CAST(acclib_handle_t, 1);
7504 h->mode = mode;
7505 h->read_error = 0;
7506 if (!h->name)
7507 h->name = "unknown";
7508 for (i = 0; i < 10; i++) {
7509 __ACCLIB_FUNCNAME(acc_pclock_read)(h, &c);
7511 return 0;
7513 ACCLIB_PUBLIC(int, acc_pclock_open_default) (acc_pclock_handle_p h)
7515 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_PROCESS_CPUTIME_ID) == 0)
7516 return 0;
7517 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_MONOTONIC) == 0)
7518 return 0;
7519 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_REALTIME) == 0)
7520 return 0;
7521 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_THREAD_CPUTIME_ID) == 0)
7522 return 0;
7523 return -1;
7525 ACCLIB_PUBLIC(int, acc_pclock_close) (acc_pclock_handle_p h)
7527 h->h = ACC_STATIC_CAST(acclib_handle_t, 0);
7528 h->mode = -1;
7529 h->name = NULL;
7530 h->gettime = ACC_STATIC_CAST(acc_pclock_gettime_t, 0);
7531 return 0;
7533 ACCLIB_PUBLIC(void, acc_pclock_read) (acc_pclock_handle_p h, acc_pclock_p c)
7535 if (h->gettime) {
7536 if (h->gettime(h, c) == 0)
7537 return;
7539 h->read_error = 1;
7540 #if defined(acc_int64l_t)
7541 c->tv_sec = 0;
7542 #else
7543 c->tv_sec_high = 0;
7544 c->tv_sec_low = 0;
7545 #endif
7546 c->tv_nsec = 0;
7548 #if !(ACC_CFG_NO_DOUBLE)
7549 ACCLIB_PUBLIC(double, acc_pclock_get_elapsed) (acc_pclock_handle_p h, const acc_pclock_p start, const acc_pclock_p stop)
7551 if (!h->h) { h->mode = -1; return 0.0; }
7553 #if 1 && (ACC_ARCH_I386 && ACC_CC_GNUC) && defined(__STRICT_ALIGNMENT__)
7554 float tstop, tstart;
7555 tstop = ACC_STATIC_CAST(float, (stop->tv_sec + stop->tv_nsec / 1000000000.0));
7556 tstart = ACC_STATIC_CAST(float, (start->tv_sec + start->tv_nsec / 1000000000.0));
7557 #elif defined(acc_int64l_t)
7558 double tstop, tstart;
7559 #if 1 && (ACC_CC_INTELC)
7560 { acc_int64l_t a = stop->tv_sec; acc_uint32l_t b = stop->tv_nsec;
7561 tstop = a + b / 1000000000.0; }
7562 { acc_int64l_t a = start->tv_sec; acc_uint32l_t b = start->tv_nsec;
7563 tstart = a + b / 1000000000.0; }
7564 #else
7565 tstop = stop->tv_sec + stop->tv_nsec / 1000000000.0;
7566 tstart = start->tv_sec + start->tv_nsec / 1000000000.0;
7567 #endif
7568 #else
7569 double tstop, tstart;
7570 tstop = stop->tv_sec_low + stop->tv_nsec / 1000000000.0;
7571 tstart = start->tv_sec_low + start->tv_nsec / 1000000000.0;
7572 #endif
7573 return tstop - tstart;
7576 #endif
7577 ACCLIB_PUBLIC(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p h, unsigned flags)
7579 ACC_UNUSED(h); ACC_UNUSED(flags);
7580 return -1;
7582 #endif
7583 #if defined(ACC_WANT_ACCLIB_MISC)
7584 # undef ACC_WANT_ACCLIB_MISC
7585 #define __ACCLIB_MISC_CH_INCLUDED 1
7586 #if !defined(ACCLIB_PUBLIC)
7587 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7588 #endif
7589 #if !defined(ACCLIB_PUBLIC_NOINLINE)
7590 # if !defined(__acc_noinline)
7591 # define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
7592 # elif (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
7593 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
7594 # else
7595 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
7596 # endif
7597 #endif
7598 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
7599 # pragma warn(push)
7600 # pragma warn(disable:2007)
7601 #endif
7602 ACCLIB_PUBLIC(const char *, acc_getenv) (const char *s)
7604 #if (HAVE_GETENV)
7605 return getenv(s);
7606 #else
7607 ACC_UNUSED(s); return ACC_STATIC_CAST(const char *, 0);
7608 #endif
7610 ACCLIB_PUBLIC(acc_intptr_t, acc_get_osfhandle) (int fd)
7612 if (fd < 0)
7613 return -1;
7614 #if (ACC_OS_CYGWIN)
7615 return get_osfhandle(fd);
7616 #elif (ACC_OS_EMX && defined(__RSXNT__))
7617 return -1;
7618 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
7619 return -1;
7620 #elif (ACC_OS_WIN32 || ACC_OS_WIN64)
7621 # if (ACC_CC_PELLESC && (__POCC__ < 280))
7622 return -1;
7623 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
7624 return -1;
7625 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
7626 return _os_handle(fd);
7627 # else
7628 return _get_osfhandle(fd);
7629 # endif
7630 #else
7631 return fd;
7632 #endif
7634 ACCLIB_PUBLIC(int, acc_set_binmode) (int fd, int binary)
7636 #if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
7637 FILE* fp; int old_binary;
7638 if (fd == STDIN_FILENO) fp = stdin;
7639 else if (fd == STDOUT_FILENO) fp = stdout;
7640 else if (fd == STDERR_FILENO) fp = stderr;
7641 else return -1;
7642 old_binary = fp->__mode.__binary;
7643 __set_binmode(fp, binary ? 1 : 0);
7644 return old_binary ? 1 : 0;
7645 #elif (ACC_ARCH_M68K && ACC_OS_TOS)
7646 ACC_UNUSED(fd); ACC_UNUSED(binary);
7647 return -1;
7648 #elif (ACC_OS_DOS16 && (ACC_CC_AZTECC || ACC_CC_PACIFICC))
7649 ACC_UNUSED(fd); ACC_UNUSED(binary);
7650 return -1;
7651 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
7652 int r; unsigned old_flags = __djgpp_hwint_flags;
7653 ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
7654 ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
7655 if (fd < 0) return -1;
7656 r = setmode(fd, binary ? O_BINARY : O_TEXT);
7657 if ((old_flags & 1u) != (__djgpp_hwint_flags & 1u))
7658 __djgpp_set_ctrl_c(!(old_flags & 1));
7659 if (r == -1) return -1;
7660 return (r & O_TEXT) ? 0 : 1;
7661 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
7662 if (fd < 0) return -1;
7663 ACC_UNUSED(binary);
7664 return 1;
7665 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
7666 FILE* fp; int r;
7667 if (fd == fileno(stdin)) fp = stdin;
7668 else if (fd == fileno(stdout)) fp = stdout;
7669 else if (fd == fileno(stderr)) fp = stderr;
7670 else return -1;
7671 r = _setmode(fp, binary ? _BINARY : _TEXT);
7672 if (r == -1) return -1;
7673 return (r & _BINARY) ? 1 : 0;
7674 #elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
7675 ACC_UNUSED(fd); ACC_UNUSED(binary);
7676 return -1;
7677 #elif (ACC_OS_CYGWIN && (ACC_CC_GNUC < 0x025a00ul))
7678 ACC_UNUSED(fd); ACC_UNUSED(binary);
7679 return -1;
7680 #elif (ACC_OS_CYGWIN || ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
7681 int r;
7682 #if !(ACC_CC_ZORTECHC)
7683 ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
7684 #endif
7685 ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
7686 if (fd < 0) return -1;
7687 r = setmode(fd, binary ? O_BINARY : O_TEXT);
7688 if (r == -1) return -1;
7689 return (r & O_TEXT) ? 0 : 1;
7690 #else
7691 if (fd < 0) return -1;
7692 ACC_UNUSED(binary);
7693 return 1;
7694 #endif
7696 ACCLIB_PUBLIC(int, acc_isatty) (int fd)
7698 if (fd < 0)
7699 return 0;
7700 #if (ACC_OS_DOS16 && !(ACC_CC_AZTECC))
7702 union REGS ri, ro;
7703 ri.x.ax = 0x4400; ri.x.bx = fd;
7704 int86(0x21, &ri, &ro);
7705 if ((ro.x.cflag & 1) == 0)
7706 if ((ro.x.ax & 0x83) != 0x83)
7707 return 0;
7709 #elif (ACC_OS_DOS32 && ACC_CC_WATCOMC)
7711 union REGS ri, ro;
7712 ri.w.ax = 0x4400; ri.w.bx = ACC_STATIC_CAST(unsigned short, fd);
7713 int386(0x21, &ri, &ro);
7714 if ((ro.w.cflag & 1) == 0)
7715 if ((ro.w.ax & 0x83) != 0x83)
7716 return 0;
7718 #elif (ACC_HAVE_WINDOWS_H)
7720 acc_intptr_t h = __ACCLIB_FUNCNAME(acc_get_osfhandle)(fd);
7721 ACC_COMPILE_TIME_ASSERT(sizeof(h) == sizeof(HANDLE))
7722 if (h != -1)
7724 DWORD d = 0;
7725 if (GetConsoleMode(ACC_REINTERPRET_CAST(HANDLE, h), &d) == 0)
7726 return 0;
7729 #endif
7730 #if (HAVE_ISATTY)
7731 return (isatty(fd)) ? 1 : 0;
7732 #else
7733 return 0;
7734 #endif
7736 ACCLIB_PUBLIC(int, acc_mkdir) (const char* name, unsigned mode)
7738 #if !(HAVE_MKDIR)
7739 ACC_UNUSED(name); ACC_UNUSED(mode);
7740 return -1;
7741 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
7742 ACC_UNUSED(mode);
7743 return Dcreate(name);
7744 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
7745 return mkdir(name, mode);
7746 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
7747 return mkdir(name, mode);
7748 #elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC))
7749 ACC_UNUSED(mode);
7750 return mkdir(ACC_UNCONST_CAST(char *, name));
7751 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
7752 ACC_UNUSED(mode);
7753 return mkdir(name);
7754 #elif (ACC_CC_WATCOMC)
7755 return mkdir(name, ACC_STATIC_CAST(mode_t, mode));
7756 #else
7757 return mkdir(name, mode);
7758 #endif
7760 ACCLIB_PUBLIC(int, acc_rmdir) (const char* name)
7762 #if !(HAVE_RMDIR)
7763 ACC_UNUSED(name);
7764 return -1;
7765 #elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC))
7766 return rmdir(ACC_UNCONST_CAST(char *, name));
7767 #else
7768 return rmdir(name);
7769 #endif
7771 #if defined(acc_int32e_t)
7772 ACCLIB_PUBLIC(acc_int32e_t, acc_muldiv32s) (acc_int32e_t a, acc_int32e_t b, acc_int32e_t x)
7774 acc_int32e_t r = 0;
7775 if __acc_likely(x != 0)
7777 #if defined(acc_int64l_t)
7778 acc_int64l_t rr = (ACC_ICONV(acc_int64l_t, a) * b) / x;
7779 r = ACC_ITRUNC(acc_int32e_t, rr);
7780 #else
7781 ACC_UNUSED(a); ACC_UNUSED(b);
7782 #endif
7784 return r;
7786 ACCLIB_PUBLIC(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t a, acc_uint32e_t b, acc_uint32e_t x)
7788 acc_uint32e_t r = 0;
7789 if __acc_likely(x != 0)
7791 #if defined(acc_int64l_t)
7792 acc_uint64l_t rr = (ACC_ICONV(acc_uint64l_t, a) * b) / x;
7793 r = ACC_ITRUNC(acc_uint32e_t, rr);
7794 #else
7795 ACC_UNUSED(a); ACC_UNUSED(b);
7796 #endif
7798 return r;
7800 #endif
7801 #if (ACC_OS_WIN16)
7802 ACC_EXTERN_C void __far __pascal DebugBreak(void);
7803 #endif
7804 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_break) (void)
7806 #if (ACC_OS_WIN16)
7807 DebugBreak();
7808 #elif (ACC_ARCH_I086)
7809 #elif (ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H)
7810 DebugBreak();
7811 #elif (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7812 __asm__ __volatile__("int $3\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7813 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
7814 __asm { int 3 }
7815 #elif (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H)
7816 DebugBreak();
7817 #else
7818 volatile acc_intptr_t a = -1;
7819 * ACC_STATIC_CAST(volatile unsigned long *, ACC_REINTERPRET_CAST(volatile void *, a)) = ~0ul;
7820 #endif
7822 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_nop) (void)
7825 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void)
7827 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7828 # if (ACC_ARCH_AMD64)
7829 acc_uint64e_t r = 0;
7830 # else
7831 size_t r = 0;
7832 # endif
7833 __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7834 return ACC_ICONV(int, (r >> 18) & 1);
7835 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
7836 unsigned long r;
7837 __asm {
7838 pushf
7839 pop eax
7840 mov r,eax
7842 return ACC_ICONV(int, (r >> 18) & 1);
7843 #else
7844 return -1;
7845 #endif
7847 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_enable) (int v)
7849 #if (ACC_ARCH_AMD64) && (ACC_ASM_SYNTAX_GNUC)
7850 if (v) {
7851 __asm__ __volatile__("pushf\n orl $262144,(%%rsp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7852 } else {
7853 __asm__ __volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7855 return 0;
7856 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7857 if (v) {
7858 __asm__ __volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7859 } else {
7860 __asm__ __volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7862 return 0;
7863 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
7864 if (v) { __asm {
7865 pushf
7866 or dword ptr [esp],262144
7867 popf
7868 }} else { __asm {
7869 pushf
7870 and dword ptr [esp],-262145
7871 popf
7872 }}
7873 return 0;
7874 #else
7875 ACC_UNUSED(v); return -1;
7876 #endif
7878 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_qemu) (void)
7880 unsigned r = 0;
7881 #if (ACC_OS_POSIX_LINUX || ACC_OS_WIN32 || ACC_OS_WIN64)
7882 const char* p;
7883 p = __ACCLIB_FUNCNAME(acc_getenv)(ACC_PP_STRINGIZE(ACC_ENV_RUNNING_ON_QEMU));
7884 if (p) {
7885 if (p[0] == 0) r = 0;
7886 else if ((p[0] >= '0' && p[0] <= '9') && p[1] == 0) r = ACC_ICAST(unsigned, p[0]) - '0';
7887 else r = 1;
7889 #endif
7890 return r;
7892 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void)
7894 #if (ACC_ARCH_AMD64 && ACC_ABI_ILP32)
7895 return 0;
7896 #elif (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7897 volatile size_t a[6];
7898 size_t r = 0;
7899 a[0] = 0x1001; a[1] = 0; a[2] = 0; a[3] = 0; a[4] = 0; a[5] = 0;
7900 # if (ACC_ARCH_AMD64)
7901 __asm__ __volatile__(".byte 0x48,0xc1,0xc7,0x03,0x48,0xc1,0xc7,0x0d,0x48,0xc1,0xc7,0x3d,0x48,0xc1,0xc7,0x33,0x48,0x87,0xdb\n" : "=d" (r) : "a" (&a[0]), "d" (r) __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7902 # elif (ACC_ARCH_I386)
7903 __asm__ __volatile__(".byte 0xc1,0xc7,0x03,0xc1,0xc7,0x0d,0xc1,0xc7,0x1d,0xc1,0xc7,0x13,0x87,0xdb\n" : "=d" (r) : "a" (&a[0]), "d" (r) __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7904 # endif
7905 return ACC_ITRUNC(unsigned, r);
7906 #else
7907 return 0;
7908 #endif
7910 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
7911 # pragma warn(pop)
7912 #endif
7913 #endif
7914 #if defined(ACC_WANT_ACCLIB_WILDARGV)
7915 # undef ACC_WANT_ACCLIB_WILDARGV
7916 #define __ACCLIB_WILDARGV_CH_INCLUDED 1
7917 #if !defined(ACCLIB_PUBLIC)
7918 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7919 #endif
7920 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
7921 #if 0 && (ACC_CC_MSC)
7922 ACC_EXTERN_C int __acc_cdecl __setargv(void);
7923 ACC_EXTERN_C int __acc_cdecl _setargv(void);
7924 ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
7925 #endif
7926 #endif
7927 #if (ACC_OS_WIN32 || ACC_OS_WIN64)
7928 #if (ACC_CC_MSC && (_MSC_VER >= 1900))
7929 #elif (ACC_CC_INTELC || ACC_CC_MSC)
7930 ACC_EXTERN_C int __acc_cdecl __setargv(void);
7931 ACC_EXTERN_C int __acc_cdecl _setargv(void);
7932 ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
7933 #endif
7934 #endif
7935 #if (ACC_OS_EMX)
7936 #define __ACCLIB_HAVE_ACC_WILDARGV 1
7937 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
7939 if (argc && argv) {
7940 _response(argc, argv);
7941 _wildcard(argc, argv);
7944 #endif
7945 #if (ACC_OS_CONSOLE_PSP) && defined(__PSPSDK_DEBUG__)
7946 #define __ACCLIB_HAVE_ACC_WILDARGV 1
7947 ACC_EXTERN_C int acc_psp_init_module(int*, char***, int);
7948 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
7950 acc_psp_init_module(argc, argv, -1);
7952 #endif
7953 #if !(__ACCLIB_HAVE_ACC_WILDARGV)
7954 #define __ACCLIB_HAVE_ACC_WILDARGV 1
7955 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
7957 #if 1 && (ACC_ARCH_I086PM)
7958 if (ACC_MM_AHSHIFT != 3) { exit(1); }
7959 #elif 1 && (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
7960 __binmode(1);
7961 if (isatty(1)) __set_binmode(stdout, 0);
7962 if (isatty(2)) __set_binmode(stderr, 0);
7963 #endif
7964 ACC_UNUSED(argc); ACC_UNUSED(argv);
7966 #endif
7967 #endif
7969 /* vim:set ts=4 sw=4 et: */