1 /* ACC --- Automatic Compiler Configuration
3 This file is part of the lzop file compressor.
5 Copyright (C) 1996-2017 Markus Franz Xaver Johannes Oberhumer
8 lzop and the LZO 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/opensource/lzop/
29 #ifndef __ACC_H_INCLUDED
30 #define __ACC_H_INCLUDED 1
31 #define ACC_VERSION 20170808L
32 #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
33 # define __CYGWIN__ __CYGWIN32__
35 #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
36 # define _ALL_SOURCE 1
38 #if defined(__mips__) && defined(__R5900__)
39 # if !defined(__LONG_MAX__)
40 # define __LONG_MAX__ 9223372036854775807L
44 #elif !defined(__ACC_LANG_OVERRIDE)
45 #if (defined(__clang__) || defined(__GNUC__)) && defined(__ASSEMBLER__)
46 # if (__ASSEMBLER__+0) <= 0
47 # error "__ASSEMBLER__"
49 # define ACC_LANG_ASSEMBLER 1
51 #elif defined(__cplusplus)
52 # if (__cplusplus+0) <= 0
54 # elif (__cplusplus < 199711L)
55 # define ACC_LANG_CXX 1
56 # elif defined(_MSC_VER) && defined(_MSVC_LANG) && (_MSVC_LANG+0 >= 201402L) && 1
57 # define ACC_LANG_CXX _MSVC_LANG
59 # define ACC_LANG_CXX __cplusplus
61 # define ACC_LANG_CPLUSPLUS ACC_LANG_CXX
63 # if defined(__STDC_VERSION__) && (__STDC_VERSION__+0 >= 199409L)
64 # define ACC_LANG_C __STDC_VERSION__
70 #if !defined(ACC_CFG_NO_DISABLE_WUNDEF)
71 #if defined(__ARMCC_VERSION)
72 # pragma diag_suppress 193
73 #elif defined(__clang__) && defined(__clang_minor__)
74 # pragma clang diagnostic ignored "-Wundef"
75 #elif defined(__INTEL_COMPILER)
76 # pragma warning(disable: 193)
77 #elif defined(__KEIL__) && defined(__C166__)
78 # pragma warning disable = 322
79 #elif defined(__GNUC__) && defined(__GNUC_MINOR__) && !defined(__PATHSCALE__)
80 # if ((__GNUC__-0) >= 5 || ((__GNUC__-0) == 4 && (__GNUC_MINOR__-0) >= 2))
81 # pragma GCC diagnostic ignored "-Wundef"
83 #elif defined(_MSC_VER) && !defined(__clang__) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
84 # if ((_MSC_VER-0) >= 1300)
85 # pragma warning(disable: 4668)
89 #if 0 && defined(__POCC__) && defined(_WIN32)
90 # if (__POCC__ >= 400)
91 # pragma warn(disable: 2216)
94 #if 0 && defined(__WATCOMC__)
95 # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
96 # pragma warning 203 9
99 #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
102 #if !(ACC_CFG_NO_DISABLE_WCRTNONSTDC)
103 #ifndef _CRT_NONSTDC_NO_DEPRECATE
104 #define _CRT_NONSTDC_NO_DEPRECATE 1
106 #ifndef _CRT_NONSTDC_NO_WARNINGS
107 #define _CRT_NONSTDC_NO_WARNINGS 1
109 #ifndef _CRT_SECURE_NO_DEPRECATE
110 #define _CRT_SECURE_NO_DEPRECATE 1
112 #ifndef _CRT_SECURE_NO_WARNINGS
113 #define _CRT_SECURE_NO_WARNINGS 1
116 #if (ACC_CFG_NO_CONFIG_HEADER)
117 #elif defined(ACC_CFG_CONFIG_HEADER)
118 # include ACC_CFG_CONFIG_HEADER
121 #if (ACC_CFG_NO_LIMITS_H)
122 #elif (ACC_LIBC_NAKED) || (ACC_BROKEN_LIMITS_H)
123 #ifndef __ACC_FALLBACK_LIMITS_H_INCLUDED
124 #define __ACC_FALLBACK_LIMITS_H_INCLUDED 1
130 #ifndef __SCHAR_MAX__
131 #define __SCHAR_MAX__ 127
134 #define __SHRT_MAX__ 32767
137 #define __INT_MAX__ 2147483647
140 #if defined(_ILP32) || defined(__ILP32__)
141 #define __LONG_MAX__ 2147483647L
142 #elif defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__)
143 #define __LONG_MAX__ 9223372036854775807L
145 #define __LONG_MAX__ 2147483647L
151 #define SCHAR_MIN (-1 - SCHAR_MAX)
152 #define SCHAR_MAX (__SCHAR_MAX__)
153 #define UCHAR_MAX (SCHAR_MAX * 2 + 1)
157 #define SHRT_MIN (-1 - SHRT_MAX)
158 #define SHRT_MAX (__SHRT_MAX__)
159 #if ((__INT_MAX__) == (__SHRT_MAX__))
160 #define USHRT_MAX (SHRT_MAX * 2U + 1U)
162 #define USHRT_MAX (SHRT_MAX * 2 + 1)
167 #define INT_MIN (-1 - INT_MAX)
168 #define INT_MAX (__INT_MAX__)
169 #define UINT_MAX (INT_MAX * 2U + 1U)
173 #define LONG_MIN (-1L - LONG_MAX)
174 #define LONG_MAX ((__LONG_MAX__) + 0L)
175 #define ULONG_MAX (LONG_MAX * 2UL + 1UL)
178 #if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED)
180 #define CHAR_MAX UCHAR_MAX
182 #define CHAR_MIN SCHAR_MIN
183 #define CHAR_MAX SCHAR_MAX
190 #define ACC_0xffffUL 0xfffful
191 #define ACC_0xffffffffUL 0xfffffffful
193 #define ACC_0xffffUL 65535ul
194 #define ACC_0xffffffffUL 4294967295ul
196 #define ACC_0xffffL ACC_0xffffUL
197 #define ACC_0xffffffffL ACC_0xffffffffUL
198 #if (ACC_0xffffL == ACC_0xffffffffL)
199 # error "your preprocessor is broken 1"
201 #if (16ul * 16384ul != 262144ul)
202 # error "your preprocessor is broken 2"
205 #if (32767 >= 4294967295ul)
206 # error "your preprocessor is broken 3"
208 #if (65535u >= 4294967295ul)
209 # error "your preprocessor is broken 4"
212 #if defined(__COUNTER__)
213 # ifndef ACC_CFG_USE_COUNTER
214 # define ACC_CFG_USE_COUNTER 1
217 # undef ACC_CFG_USE_COUNTER
219 #if (UINT_MAX == ACC_0xffffL)
220 #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
224 # if !defined(_MSDOS)
227 #elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
228 # if (__VERSION == 520) && (MB_LEN_MAX == 1)
229 # if !defined(__AZTEC_C__)
230 # define __AZTEC_C__ __VERSION
232 # if !defined(__DOS__)
238 #if (UINT_MAX == ACC_0xffffL)
239 #if defined(_MSC_VER) && defined(M_I86HM)
240 # define ptrdiff_t long
241 # define _PTRDIFF_T_DEFINED 1
244 #if (UINT_MAX == ACC_0xffffL)
245 # undef __ACC_RENAME_A
246 # undef __ACC_RENAME_B
247 # if defined(__AZTEC_C__) && defined(__DOS__)
248 # define __ACC_RENAME_A 1
249 # elif defined(_MSC_VER) && defined(MSDOS)
250 # if (_MSC_VER < 600)
251 # define __ACC_RENAME_A 1
252 # elif (_MSC_VER < 700)
253 # define __ACC_RENAME_B 1
255 # elif defined(__TSC__) && defined(__OS2__)
256 # define __ACC_RENAME_A 1
257 # elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
258 # define __ACC_RENAME_A 1
259 # elif defined(__PACIFIC__) && defined(DOS)
263 # if !defined(__near)
267 # if defined(__ACC_RENAME_A)
268 # if !defined(__cdecl)
269 # define __cdecl cdecl
274 # if !defined(__huge)
277 # if !defined(__near)
280 # if !defined(__pascal)
281 # define __pascal pascal
283 # if !defined(__huge)
286 # elif defined(__ACC_RENAME_B)
287 # if !defined(__cdecl)
288 # define __cdecl _cdecl
293 # if !defined(__huge)
294 # define __huge _huge
296 # if !defined(__near)
297 # define __near _near
299 # if !defined(__pascal)
300 # define __pascal _pascal
302 # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
303 # if !defined(__cdecl)
304 # define __cdecl cdecl
306 # if !defined(__pascal)
307 # define __pascal pascal
310 # undef __ACC_RENAME_A
311 # undef __ACC_RENAME_B
313 #if (UINT_MAX == ACC_0xffffL)
314 #if defined(__AZTEC_C__) && defined(__DOS__)
315 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
316 #elif defined(_MSC_VER) && defined(MSDOS)
317 # if (_MSC_VER < 600)
318 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
320 # if (_MSC_VER < 700)
321 # define ACC_BROKEN_INTEGRAL_PROMOTION 1
322 # define ACC_BROKEN_SIZEOF 1
324 #elif defined(__PACIFIC__) && defined(DOS)
325 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
326 #elif defined(__TURBOC__) && defined(__MSDOS__)
327 # if (__TURBOC__ < 0x0150)
328 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
329 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
330 # define ACC_BROKEN_INTEGRAL_PROMOTION 1
332 # if (__TURBOC__ < 0x0200)
333 # define ACC_BROKEN_SIZEOF 1
335 # if (__TURBOC__ < 0x0400) && defined(__cplusplus)
336 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
338 #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
339 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
340 # define ACC_BROKEN_SIZEOF 1
343 #if defined(__WATCOMC__) && (__WATCOMC__ < 900)
344 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
346 #if defined(_CRAY) && defined(_CRAY1)
347 # define ACC_BROKEN_SIGNED_RIGHT_SHIFT 1
349 #define ACC_PP_STRINGIZE(x) #x
350 #define ACC_PP_MACRO_EXPAND(x) ACC_PP_STRINGIZE(x)
351 #define ACC_PP_CONCAT0() /*empty*/
352 #define ACC_PP_CONCAT1(a) a
353 #define ACC_PP_CONCAT2(a,b) a ## b
354 #define ACC_PP_CONCAT3(a,b,c) a ## b ## c
355 #define ACC_PP_CONCAT4(a,b,c,d) a ## b ## c ## d
356 #define ACC_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
357 #define ACC_PP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f
358 #define ACC_PP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g
359 #define ACC_PP_ECONCAT0() ACC_PP_CONCAT0()
360 #define ACC_PP_ECONCAT1(a) ACC_PP_CONCAT1(a)
361 #define ACC_PP_ECONCAT2(a,b) ACC_PP_CONCAT2(a,b)
362 #define ACC_PP_ECONCAT3(a,b,c) ACC_PP_CONCAT3(a,b,c)
363 #define ACC_PP_ECONCAT4(a,b,c,d) ACC_PP_CONCAT4(a,b,c,d)
364 #define ACC_PP_ECONCAT5(a,b,c,d,e) ACC_PP_CONCAT5(a,b,c,d,e)
365 #define ACC_PP_ECONCAT6(a,b,c,d,e,f) ACC_PP_CONCAT6(a,b,c,d,e,f)
366 #define ACC_PP_ECONCAT7(a,b,c,d,e,f,g) ACC_PP_CONCAT7(a,b,c,d,e,f,g)
367 #define ACC_PP_EMPTY /*empty*/
368 #define ACC_PP_EMPTY0() /*empty*/
369 #define ACC_PP_EMPTY1(a) /*empty*/
370 #define ACC_PP_EMPTY2(a,b) /*empty*/
371 #define ACC_PP_EMPTY3(a,b,c) /*empty*/
372 #define ACC_PP_EMPTY4(a,b,c,d) /*empty*/
373 #define ACC_PP_EMPTY5(a,b,c,d,e) /*empty*/
374 #define ACC_PP_EMPTY6(a,b,c,d,e,f) /*empty*/
375 #define ACC_PP_EMPTY7(a,b,c,d,e,f,g) /*empty*/
377 #define ACC_CPP_STRINGIZE(x) #x
378 #define ACC_CPP_MACRO_EXPAND(x) ACC_CPP_STRINGIZE(x)
379 #define ACC_CPP_CONCAT2(a,b) a ## b
380 #define ACC_CPP_CONCAT3(a,b,c) a ## b ## c
381 #define ACC_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
382 #define ACC_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
383 #define ACC_CPP_CONCAT6(a,b,c,d,e,f) a ## b ## c ## d ## e ## f
384 #define ACC_CPP_CONCAT7(a,b,c,d,e,f,g) a ## b ## c ## d ## e ## f ## g
385 #define ACC_CPP_ECONCAT2(a,b) ACC_CPP_CONCAT2(a,b)
386 #define ACC_CPP_ECONCAT3(a,b,c) ACC_CPP_CONCAT3(a,b,c)
387 #define ACC_CPP_ECONCAT4(a,b,c,d) ACC_CPP_CONCAT4(a,b,c,d)
388 #define ACC_CPP_ECONCAT5(a,b,c,d,e) ACC_CPP_CONCAT5(a,b,c,d,e)
389 #define ACC_CPP_ECONCAT6(a,b,c,d,e,f) ACC_CPP_CONCAT6(a,b,c,d,e,f)
390 #define ACC_CPP_ECONCAT7(a,b,c,d,e,f,g) ACC_CPP_CONCAT7(a,b,c,d,e,f,g)
392 #define __ACC_MASK_GEN(o,b) (((((o) << ((b)-((b)!=0))) - (o)) << 1) + (o)*((b)!=0))
393 #if 1 && defined(__cplusplus)
394 # if !defined(__STDC_CONSTANT_MACROS)
395 # define __STDC_CONSTANT_MACROS 1
397 # if !defined(__STDC_LIMIT_MACROS)
398 # define __STDC_LIMIT_MACROS 1
401 #if defined(__cplusplus)
402 # define ACC_EXTERN_C extern "C"
403 # define ACC_EXTERN_C_BEGIN extern "C" {
404 # define ACC_EXTERN_C_END }
406 # define ACC_EXTERN_C extern
407 # define ACC_EXTERN_C_BEGIN /*empty*/
408 # define ACC_EXTERN_C_END /*empty*/
410 #if !defined(__ACC_OS_OVERRIDE)
411 #if (ACC_OS_FREESTANDING)
412 # define ACC_INFO_OS "freestanding"
413 #elif (ACC_OS_EMBEDDED)
414 # define ACC_INFO_OS "embedded"
415 #elif 1 && defined(__IAR_SYSTEMS_ICC__)
416 # define ACC_OS_EMBEDDED 1
417 # define ACC_INFO_OS "embedded"
418 #elif defined(__CYGWIN__) && defined(__GNUC__)
419 # define ACC_OS_CYGWIN 1
420 # define ACC_INFO_OS "cygwin"
421 #elif defined(__EMX__) && defined(__GNUC__)
422 # define ACC_OS_EMX 1
423 # define ACC_INFO_OS "emx"
424 #elif defined(__BEOS__)
425 # define ACC_OS_BEOS 1
426 # define ACC_INFO_OS "beos"
427 #elif defined(__Lynx__)
428 # define ACC_OS_LYNXOS 1
429 # define ACC_INFO_OS "lynxos"
430 #elif defined(__OS400__)
431 # define ACC_OS_OS400 1
432 # define ACC_INFO_OS "os400"
433 #elif defined(__QNX__)
434 # define ACC_OS_QNX 1
435 # define ACC_INFO_OS "qnx"
436 #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
437 # define ACC_OS_DOS32 1
438 # define ACC_INFO_OS "dos32"
439 #elif defined(__BORLANDC__) && defined(__DPMI16__)
440 # define ACC_OS_DOS16 1
441 # define ACC_INFO_OS "dos16"
442 #elif defined(__ZTC__) && defined(DOS386)
443 # define ACC_OS_DOS32 1
444 # define ACC_INFO_OS "dos32"
445 #elif defined(__OS2__) || defined(__OS2V2__)
446 # if (UINT_MAX == ACC_0xffffL)
447 # define ACC_OS_OS216 1
448 # define ACC_INFO_OS "os216"
449 # elif (UINT_MAX == ACC_0xffffffffL)
450 # define ACC_OS_OS2 1
451 # define ACC_INFO_OS "os2"
453 # error "check your limits.h header"
455 #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
456 # define ACC_OS_WIN64 1
457 # define ACC_INFO_OS "win64"
458 #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
459 # define ACC_OS_WIN32 1
460 # define ACC_INFO_OS "win32"
461 #elif defined(__MWERKS__) && defined(__INTEL__)
462 # define ACC_OS_WIN32 1
463 # define ACC_INFO_OS "win32"
464 #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
465 # if (UINT_MAX == ACC_0xffffL)
466 # define ACC_OS_WIN16 1
467 # define ACC_INFO_OS "win16"
468 # elif (UINT_MAX == ACC_0xffffffffL)
469 # define ACC_OS_WIN32 1
470 # define ACC_INFO_OS "win32"
472 # error "check your limits.h header"
474 #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
475 # if (UINT_MAX == ACC_0xffffL)
476 # define ACC_OS_DOS16 1
477 # define ACC_INFO_OS "dos16"
478 # elif (UINT_MAX == ACC_0xffffffffL)
479 # define ACC_OS_DOS32 1
480 # define ACC_INFO_OS "dos32"
482 # error "check your limits.h header"
484 #elif defined(__WATCOMC__)
485 # if defined(__NT__) && (UINT_MAX == ACC_0xffffL)
486 # define ACC_OS_DOS16 1
487 # define ACC_INFO_OS "dos16"
488 # elif defined(__NT__) && (__WATCOMC__ < 1100)
489 # define ACC_OS_WIN32 1
490 # define ACC_INFO_OS "win32"
491 # elif defined(__linux__) || defined(__LINUX__)
492 # define ACC_OS_POSIX 1
493 # define ACC_INFO_OS "posix"
495 # error "please specify a target using the -bt compiler option"
497 #elif defined(__palmos__)
498 # define ACC_OS_PALMOS 1
499 # define ACC_INFO_OS "palmos"
500 #elif defined(__TOS__) || defined(__atarist__)
501 # define ACC_OS_TOS 1
502 # define ACC_INFO_OS "tos"
503 #elif defined(macintosh) && !defined(__arm__) && !defined(__i386__) && !defined(__ppc__) && !defined(__x64_64__)
504 # define ACC_OS_MACCLASSIC 1
505 # define ACC_INFO_OS "macclassic"
507 # define ACC_OS_VMS 1
508 # define ACC_INFO_OS "vms"
509 #elif (defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__)
510 # define ACC_OS_CONSOLE 1
511 # define ACC_OS_CONSOLE_PS2 1
512 # define ACC_INFO_OS "console"
513 # define ACC_INFO_OS_CONSOLE "ps2"
514 #elif defined(__mips__) && defined(__psp__)
515 # define ACC_OS_CONSOLE 1
516 # define ACC_OS_CONSOLE_PSP 1
517 # define ACC_INFO_OS "console"
518 # define ACC_INFO_OS_CONSOLE "psp"
520 # define ACC_OS_POSIX 1
521 # define ACC_INFO_OS "posix"
524 # if defined(_AIX) || defined(__AIX__) || defined(__aix__)
525 # define ACC_OS_POSIX_AIX 1
526 # define ACC_INFO_OS_POSIX "aix"
527 # elif defined(__FreeBSD__)
528 # define ACC_OS_POSIX_FREEBSD 1
529 # define ACC_INFO_OS_POSIX "freebsd"
530 # elif defined(__hpux__) || defined(__hpux)
531 # define ACC_OS_POSIX_HPUX 1
532 # define ACC_INFO_OS_POSIX "hpux"
533 # elif defined(__INTERIX)
534 # define ACC_OS_POSIX_INTERIX 1
535 # define ACC_INFO_OS_POSIX "interix"
536 # elif defined(__IRIX__) || defined(__irix__)
537 # define ACC_OS_POSIX_IRIX 1
538 # define ACC_INFO_OS_POSIX "irix"
539 # elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
540 # define ACC_OS_POSIX_LINUX 1
541 # define ACC_INFO_OS_POSIX "linux"
542 # elif defined(__APPLE__) && defined(__MACH__)
543 # if ((__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__-0) >= 20000)
544 # define ACC_OS_POSIX_DARWIN 1040
545 # define ACC_INFO_OS_POSIX "darwin_iphone"
546 # elif ((__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__-0) >= 1040)
547 # define ACC_OS_POSIX_DARWIN __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
548 # define ACC_INFO_OS_POSIX "darwin"
550 # define ACC_OS_POSIX_DARWIN 1
551 # define ACC_INFO_OS_POSIX "darwin"
553 # define ACC_OS_POSIX_MACOSX ACC_OS_POSIX_DARWIN
554 # elif defined(__minix__) || defined(__minix)
555 # define ACC_OS_POSIX_MINIX 1
556 # define ACC_INFO_OS_POSIX "minix"
557 # elif defined(__NetBSD__)
558 # define ACC_OS_POSIX_NETBSD 1
559 # define ACC_INFO_OS_POSIX "netbsd"
560 # elif defined(__OpenBSD__)
561 # define ACC_OS_POSIX_OPENBSD 1
562 # define ACC_INFO_OS_POSIX "openbsd"
563 # elif defined(__osf__)
564 # define ACC_OS_POSIX_OSF 1
565 # define ACC_INFO_OS_POSIX "osf"
566 # elif defined(__solaris__) || defined(__sun)
567 # if defined(__SVR4) || defined(__svr4__)
568 # define ACC_OS_POSIX_SOLARIS 1
569 # define ACC_INFO_OS_POSIX "solaris"
571 # define ACC_OS_POSIX_SUNOS 1
572 # define ACC_INFO_OS_POSIX "sunos"
574 # elif defined(__ultrix__) || defined(__ultrix)
575 # define ACC_OS_POSIX_ULTRIX 1
576 # define ACC_INFO_OS_POSIX "ultrix"
577 # elif defined(_UNICOS)
578 # define ACC_OS_POSIX_UNICOS 1
579 # define ACC_INFO_OS_POSIX "unicos"
581 # define ACC_OS_POSIX_UNKNOWN 1
582 # define ACC_INFO_OS_POSIX "unknown"
586 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
587 # if (UINT_MAX != ACC_0xffffL)
588 # error "unexpected configuration - check your compiler defines"
590 # if (ULONG_MAX != ACC_0xffffffffL)
591 # error "unexpected configuration - check your compiler defines"
594 #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32 || ACC_OS_WIN64)
595 # if (UINT_MAX != ACC_0xffffffffL)
596 # error "unexpected configuration - check your compiler defines"
598 # if (ULONG_MAX != ACC_0xffffffffL)
599 # error "unexpected configuration - check your compiler defines"
602 #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
603 # define ACC_CC_CILLY 1
604 # define ACC_INFO_CC "Cilly"
605 # if defined(__CILLY__)
606 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__CILLY__)
608 # define ACC_INFO_CCVER "unknown"
610 #elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
611 # define ACC_CC_SDCC 1
612 # define ACC_INFO_CC "sdcc"
613 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(SDCC)
614 #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
615 # define ACC_CC_PATHSCALE (__PATHCC__ * 0x10000L + (__PATHCC_MINOR__-0) * 0x100 + (__PATHCC_PATCHLEVEL__-0))
616 # define ACC_INFO_CC "Pathscale C"
617 # define ACC_INFO_CCVER __PATHSCALE__
618 # if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
619 # define ACC_CC_PATHSCALE_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
621 #elif defined(__INTEL_COMPILER) && ((__INTEL_COMPILER-0) > 0)
622 # define ACC_CC_INTELC __INTEL_COMPILER
623 # define ACC_INFO_CC "Intel C"
624 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__INTEL_COMPILER)
625 # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
626 # define ACC_CC_INTELC_MSC _MSC_VER
627 # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
628 # define ACC_CC_INTELC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
630 #elif defined(__POCC__) && defined(_WIN32)
631 # define ACC_CC_PELLESC 1
632 # define ACC_INFO_CC "Pelles C"
633 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__POCC__)
634 #elif defined(__ARMCC_VERSION) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
635 # if defined(__GNUC_PATCHLEVEL__)
636 # define ACC_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
638 # define ACC_CC_ARMCC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
640 # define ACC_CC_ARMCC __ARMCC_VERSION
641 # define ACC_INFO_CC "ARM C Compiler"
642 # define ACC_INFO_CCVER __VERSION__
643 #elif defined(__clang__) && defined(__c2__) && defined(__c2_version__) && defined(_MSC_VER)
644 # define ACC_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
645 # define ACC_CC_CLANG_C2 _MSC_VER
646 # define ACC_CC_CLANG_VENDOR_MICROSOFT 1
647 # define ACC_INFO_CC "clang/c2"
648 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__c2_version__)
649 #elif defined(__clang__) && defined(__llvm__) && defined(__VERSION__)
650 # if defined(__clang_major__) && defined(__clang_minor__) && defined(__clang_patchlevel__)
651 # define ACC_CC_CLANG (__clang_major__ * 0x10000L + (__clang_minor__-0) * 0x100 + (__clang_patchlevel__-0))
653 # define ACC_CC_CLANG 0x010000L
655 # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
656 # define ACC_CC_CLANG_MSC _MSC_VER
657 # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
658 # define ACC_CC_CLANG_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
660 # if defined(__APPLE_CC__)
661 # define ACC_CC_CLANG_VENDOR_APPLE 1
662 # define ACC_INFO_CC "clang/apple"
664 # define ACC_CC_CLANG_VENDOR_LLVM 1
665 # define ACC_INFO_CC "clang"
667 # if defined(__clang_version__)
668 # define ACC_INFO_CCVER __clang_version__
670 # define ACC_INFO_CCVER __VERSION__
672 #elif defined(__llvm__) && defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
673 # if defined(__GNUC_PATCHLEVEL__)
674 # define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
676 # define ACC_CC_LLVM_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
678 # define ACC_CC_LLVM ACC_CC_LLVM_GNUC
679 # define ACC_INFO_CC "llvm-gcc"
680 # define ACC_INFO_CCVER __VERSION__
681 #elif defined(__ACK__) && defined(_ACK)
682 # define ACC_CC_ACK 1
683 # define ACC_INFO_CC "Amsterdam Compiler Kit C"
684 # define ACC_INFO_CCVER "unknown"
685 #elif defined(__ARMCC_VERSION) && !defined(__GNUC__)
686 # define ACC_CC_ARMCC __ARMCC_VERSION
687 # define ACC_CC_ARMCC_ARMCC __ARMCC_VERSION
688 # define ACC_INFO_CC "ARM C Compiler"
689 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ARMCC_VERSION)
690 #elif defined(__AZTEC_C__)
691 # define ACC_CC_AZTECC 1
692 # define ACC_INFO_CC "Aztec C"
693 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__AZTEC_C__)
694 #elif defined(__CODEGEARC__)
695 # define ACC_CC_CODEGEARC 1
696 # define ACC_INFO_CC "CodeGear C"
697 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__CODEGEARC__)
698 #elif defined(__BORLANDC__)
699 # define ACC_CC_BORLANDC 1
700 # define ACC_INFO_CC "Borland C"
701 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__BORLANDC__)
702 #elif defined(_CRAYC) && defined(_RELEASE)
703 # define ACC_CC_CRAYC 1
704 # define ACC_INFO_CC "Cray C"
705 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_RELEASE)
706 #elif defined(__DMC__) && defined(__SC__)
707 # define ACC_CC_DMC 1
708 # define ACC_INFO_CC "Digital Mars C"
709 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DMC__)
710 #elif defined(__DECC)
711 # define ACC_CC_DECC 1
712 # define ACC_INFO_CC "DEC C"
713 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DECC)
714 #elif (defined(__ghs) || defined(__ghs__)) && defined(__GHS_VERSION_NUMBER) && ((__GHS_VERSION_NUMBER-0) > 0)
715 # define ACC_CC_GHS 1
716 # define ACC_INFO_CC "Green Hills C"
717 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__GHS_VERSION_NUMBER)
718 # if defined(_MSC_VER) && ((_MSC_VER-0) > 0)
719 # define ACC_CC_GHS_MSC _MSC_VER
720 # elif defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__VERSION__)
721 # define ACC_CC_GHS_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
723 #elif defined(__HIGHC__)
724 # define ACC_CC_HIGHC 1
725 # define ACC_INFO_CC "MetaWare High C"
726 # define ACC_INFO_CCVER "unknown"
727 #elif defined(__HP_aCC) && ((__HP_aCC-0) > 0)
728 # define ACC_CC_HPACC __HP_aCC
729 # define ACC_INFO_CC "HP aCC"
730 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__HP_aCC)
731 #elif defined(__IAR_SYSTEMS_ICC__)
732 # define ACC_CC_IARC 1
733 # define ACC_INFO_CC "IAR C"
734 # if defined(__VER__)
735 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__VER__)
737 # define ACC_INFO_CCVER "unknown"
739 #elif defined(__IBMC__) && ((__IBMC__-0) > 0)
740 # define ACC_CC_IBMC __IBMC__
741 # define ACC_INFO_CC "IBM C"
742 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMC__)
743 #elif defined(__IBMCPP__) && ((__IBMCPP__-0) > 0)
744 # define ACC_CC_IBMC __IBMCPP__
745 # define ACC_INFO_CC "IBM C"
746 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMCPP__)
747 #elif defined(__KEIL__) && defined(__C166__)
748 # define ACC_CC_KEILC 1
749 # define ACC_INFO_CC "Keil C"
750 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__C166__)
751 #elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
752 # define ACC_CC_LCCWIN32 1
753 # define ACC_INFO_CC "lcc-win32"
754 # define ACC_INFO_CCVER "unknown"
755 #elif defined(__LCC__)
756 # define ACC_CC_LCC 1
757 # define ACC_INFO_CC "lcc"
758 # if defined(__LCC_VERSION__)
759 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__LCC_VERSION__)
761 # define ACC_INFO_CCVER "unknown"
763 #elif defined(__MWERKS__) && ((__MWERKS__-0) > 0)
764 # define ACC_CC_MWERKS __MWERKS__
765 # define ACC_INFO_CC "Metrowerks C"
766 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__MWERKS__)
767 #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
768 # define ACC_CC_NDPC 1
769 # define ACC_INFO_CC "Microway NDP C"
770 # define ACC_INFO_CCVER "unknown"
771 #elif defined(__PACIFIC__)
772 # define ACC_CC_PACIFICC 1
773 # define ACC_INFO_CC "Pacific C"
774 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PACIFIC__)
775 #elif defined(__PGI) && defined(__PGIC__) && defined(__PGIC_MINOR__)
776 # if defined(__PGIC_PATCHLEVEL__)
777 # define ACC_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100 + (__PGIC_PATCHLEVEL__-0))
778 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PGIC__) "." ACC_PP_MACRO_EXPAND(__PGIC_MINOR__) "." ACC_PP_MACRO_EXPAND(__PGIC_PATCHLEVEL__)
780 # define ACC_CC_PGI (__PGIC__ * 0x10000L + (__PGIC_MINOR__-0) * 0x100)
781 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PGIC__) "." ACC_PP_MACRO_EXPAND(__PGIC_MINOR__) ".0"
783 # define ACC_INFO_CC "Portland Group PGI C"
784 #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
785 # define ACC_CC_PGI 1
786 # define ACC_INFO_CC "Portland Group PGI C"
787 # define ACC_INFO_CCVER "unknown"
788 #elif defined(__PUREC__) && defined(__TOS__)
789 # define ACC_CC_PUREC 1
790 # define ACC_INFO_CC "Pure C"
791 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PUREC__)
792 #elif defined(__SC__) && defined(__ZTC__)
793 # define ACC_CC_SYMANTECC 1
794 # define ACC_INFO_CC "Symantec C"
795 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SC__)
796 #elif defined(__SUNPRO_C)
797 # define ACC_INFO_CC "SunPro C"
798 # if ((__SUNPRO_C-0) > 0)
799 # define ACC_CC_SUNPROC __SUNPRO_C
800 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_C)
802 # define ACC_CC_SUNPROC 1
803 # define ACC_INFO_CCVER "unknown"
805 #elif defined(__SUNPRO_CC)
806 # define ACC_INFO_CC "SunPro C"
807 # if ((__SUNPRO_CC-0) > 0)
808 # define ACC_CC_SUNPROC __SUNPRO_CC
809 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_CC)
811 # define ACC_CC_SUNPROC 1
812 # define ACC_INFO_CCVER "unknown"
814 #elif defined(__TINYC__)
815 # define ACC_CC_TINYC 1
816 # define ACC_INFO_CC "Tiny C"
817 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TINYC__)
818 #elif defined(__TSC__)
819 # define ACC_CC_TOPSPEEDC 1
820 # define ACC_INFO_CC "TopSpeed C"
821 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TSC__)
822 #elif defined(__WATCOMC__)
823 # define ACC_CC_WATCOMC 1
824 # define ACC_INFO_CC "Watcom C"
825 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__WATCOMC__)
826 #elif defined(__TURBOC__)
827 # define ACC_CC_TURBOC 1
828 # define ACC_INFO_CC "Turbo C"
829 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TURBOC__)
830 #elif defined(__ZTC__)
831 # define ACC_CC_ZORTECHC 1
832 # define ACC_INFO_CC "Zortech C"
833 # if ((__ZTC__-0) == 0x310)
834 # define ACC_INFO_CCVER "0x310"
836 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ZTC__)
838 #elif defined(__GNUC__) && defined(__VERSION__)
839 # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
840 # define ACC_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100 + (__GNUC_PATCHLEVEL__-0))
841 # elif defined(__GNUC_MINOR__)
842 # define ACC_CC_GNUC (__GNUC__ * 0x10000L + (__GNUC_MINOR__-0) * 0x100)
844 # define ACC_CC_GNUC (__GNUC__ * 0x10000L)
846 # define ACC_INFO_CC "gcc"
847 # define ACC_INFO_CCVER __VERSION__
848 #elif defined(_MSC_VER) && ((_MSC_VER-0) > 0)
849 # define ACC_CC_MSC _MSC_VER
850 # define ACC_INFO_CC "Microsoft C"
851 # if defined(_MSC_FULL_VER)
852 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) "." ACC_PP_MACRO_EXPAND(_MSC_FULL_VER)
854 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER)
857 # define ACC_CC_UNKNOWN 1
858 # define ACC_INFO_CC "unknown"
859 # define ACC_INFO_CCVER "unknown"
861 #if (ACC_CC_GNUC) && defined(__OPEN64__)
862 # if defined(__OPENCC__) && defined(__OPENCC_MINOR__) && defined(__OPENCC_PATCHLEVEL__)
863 # define ACC_CC_OPEN64 (__OPENCC__ * 0x10000L + (__OPENCC_MINOR__-0) * 0x100 + (__OPENCC_PATCHLEVEL__-0))
864 # define ACC_CC_OPEN64_GNUC ACC_CC_GNUC
867 #if (ACC_CC_GNUC) && defined(__PCC__)
868 # if defined(__PCC__) && defined(__PCC_MINOR__) && defined(__PCC_MINORMINOR__)
869 # define ACC_CC_PCC (__PCC__ * 0x10000L + (__PCC_MINOR__-0) * 0x100 + (__PCC_MINORMINOR__-0))
870 # define ACC_CC_PCC_GNUC ACC_CC_GNUC
873 #if 0 && (ACC_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
874 # error "ACC_CC_MSC: _MSC_FULL_VER is not defined"
876 #if !defined(__ACC_ARCH_OVERRIDE) && !(ACC_ARCH_GENERIC) && defined(_CRAY)
877 # if (UINT_MAX > ACC_0xffffffffL) && defined(_CRAY)
878 # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
879 # define ACC_ARCH_CRAY_MPP 1
880 # elif defined(_CRAY1)
881 # define ACC_ARCH_CRAY_PVP 1
885 #if !defined(__ACC_ARCH_OVERRIDE)
886 #if (ACC_ARCH_GENERIC)
887 # define ACC_INFO_ARCH "generic"
888 #elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
889 # define ACC_ARCH_I086 1
890 # define ACC_INFO_ARCH "i086"
891 #elif defined(__aarch64__) || defined(_M_ARM64)
892 # define ACC_ARCH_ARM64 1
893 # define ACC_INFO_ARCH "arm64"
894 #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
895 # define ACC_ARCH_ALPHA 1
896 # define ACC_INFO_ARCH "alpha"
897 #elif (ACC_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
898 # define ACC_ARCH_ALPHA 1
899 # define ACC_INFO_ARCH "alpha"
900 #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
901 # define ACC_ARCH_AMD64 1
902 # define ACC_INFO_ARCH "amd64"
903 #elif defined(__arm__) || defined(_M_ARM)
904 # define ACC_ARCH_ARM 1
905 # define ACC_INFO_ARCH "arm"
906 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
907 # define ACC_ARCH_ARM 1
908 # define ACC_INFO_ARCH "arm"
909 #elif (UINT_MAX <= ACC_0xffffL) && defined(__AVR__)
910 # define ACC_ARCH_AVR 1
911 # define ACC_INFO_ARCH "avr"
912 #elif defined(__avr32__) || defined(__AVR32__)
913 # define ACC_ARCH_AVR32 1
914 # define ACC_INFO_ARCH "avr32"
915 #elif defined(__bfin__)
916 # define ACC_ARCH_BLACKFIN 1
917 # define ACC_INFO_ARCH "blackfin"
918 #elif (UINT_MAX == ACC_0xffffL) && defined(__C166__)
919 # define ACC_ARCH_C166 1
920 # define ACC_INFO_ARCH "c166"
921 #elif defined(__cris__)
922 # define ACC_ARCH_CRIS 1
923 # define ACC_INFO_ARCH "cris"
924 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
925 # define ACC_ARCH_EZ80 1
926 # define ACC_INFO_ARCH "ez80"
927 #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
928 # define ACC_ARCH_H8300 1
929 # define ACC_INFO_ARCH "h8300"
930 #elif defined(__hppa__) || defined(__hppa)
931 # define ACC_ARCH_HPPA 1
932 # define ACC_INFO_ARCH "hppa"
933 #elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
934 # define ACC_ARCH_I386 1
935 # define ACC_ARCH_IA32 1
936 # define ACC_INFO_ARCH "i386"
937 #elif (ACC_CC_ZORTECHC && defined(__I86__))
938 # define ACC_ARCH_I386 1
939 # define ACC_ARCH_IA32 1
940 # define ACC_INFO_ARCH "i386"
941 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
942 # define ACC_ARCH_I386 1
943 # define ACC_ARCH_IA32 1
944 # define ACC_INFO_ARCH "i386"
945 #elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
946 # define ACC_ARCH_IA64 1
947 # define ACC_INFO_ARCH "ia64"
948 #elif (UINT_MAX == ACC_0xffffL) && defined(__m32c__)
949 # define ACC_ARCH_M16C 1
950 # define ACC_INFO_ARCH "m16c"
951 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
952 # define ACC_ARCH_M16C 1
953 # define ACC_INFO_ARCH "m16c"
954 #elif defined(__m32r__)
955 # define ACC_ARCH_M32R 1
956 # define ACC_INFO_ARCH "m32r"
957 #elif (ACC_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
958 # define ACC_ARCH_M68K 1
959 # define ACC_INFO_ARCH "m68k"
960 #elif (UINT_MAX == ACC_0xffffL) && defined(__C251__)
961 # define ACC_ARCH_MCS251 1
962 # define ACC_INFO_ARCH "mcs251"
963 #elif (UINT_MAX == ACC_0xffffL) && defined(__C51__)
964 # define ACC_ARCH_MCS51 1
965 # define ACC_INFO_ARCH "mcs51"
966 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
967 # define ACC_ARCH_MCS51 1
968 # define ACC_INFO_ARCH "mcs51"
969 #elif defined(__microblaze__) || defined(__MICROBLAZE__)
970 # define ACC_ARCH_MICROBLAZE 1
971 # define ACC_INFO_ARCH "microblaze"
972 #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
973 # define ACC_ARCH_MIPS 1
974 # define ACC_INFO_ARCH "mips"
975 #elif (UINT_MAX == ACC_0xffffL) && defined(__MSP430__)
976 # define ACC_ARCH_MSP430 1
977 # define ACC_INFO_ARCH "msp430"
978 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
979 # define ACC_ARCH_MSP430 1
980 # define ACC_INFO_ARCH "msp430"
981 #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
982 # define ACC_ARCH_POWERPC 1
983 # define ACC_INFO_ARCH "powerpc"
984 #elif defined(__powerpc64__) || defined(__powerpc64) || defined(__ppc64__) || defined(__PPC64__)
985 # define ACC_ARCH_POWERPC 1
986 # define ACC_INFO_ARCH "powerpc"
987 #elif defined(__powerpc64le__) || defined(__powerpc64le) || defined(__ppc64le__) || defined(__PPC64LE__)
988 # define ACC_ARCH_POWERPC 1
989 # define ACC_INFO_ARCH "powerpc"
990 #elif defined(__riscv)
991 # define ACC_ARCH_RISCV 1
992 # define ACC_INFO_ARCH "riscv"
993 #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
994 # define ACC_ARCH_S390 1
995 # define ACC_INFO_ARCH "s390"
996 #elif defined(__sh__) || defined(_M_SH)
997 # define ACC_ARCH_SH 1
998 # define ACC_INFO_ARCH "sh"
999 #elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
1000 # define ACC_ARCH_SPARC 1
1001 # define ACC_INFO_ARCH "sparc"
1002 #elif defined(__SPU__)
1003 # define ACC_ARCH_SPU 1
1004 # define ACC_INFO_ARCH "spu"
1005 #elif (UINT_MAX == ACC_0xffffL) && defined(__z80)
1006 # define ACC_ARCH_Z80 1
1007 # define ACC_INFO_ARCH "z80"
1008 #elif (ACC_ARCH_CRAY_PVP)
1009 # if defined(_CRAYSV1)
1010 # define ACC_ARCH_CRAY_SV1 1
1011 # define ACC_INFO_ARCH "cray_sv1"
1013 # define ACC_ARCH_CRAY_T90 1
1014 # define ACC_INFO_ARCH "cray_t90"
1016 # define ACC_ARCH_CRAY_YMP 1
1017 # define ACC_INFO_ARCH "cray_ymp"
1019 # define ACC_ARCH_CRAY_XMP 1
1020 # define ACC_INFO_ARCH "cray_xmp"
1023 # define ACC_ARCH_UNKNOWN 1
1024 # define ACC_INFO_ARCH "unknown"
1027 #if !defined(ACC_ARCH_ARM_THUMB2)
1029 # if defined(__thumb__) || defined(__thumb) || defined(_M_THUMB)
1030 # if defined(__thumb2__)
1031 # define ACC_ARCH_ARM_THUMB2 1
1032 # elif 1 && defined(__TARGET_ARCH_THUMB) && ((__TARGET_ARCH_THUMB)+0 >= 4)
1033 # define ACC_ARCH_ARM_THUMB2 1
1034 # elif 1 && defined(_MSC_VER) && defined(_M_THUMB) && ((_M_THUMB)+0 >= 7)
1035 # define ACC_ARCH_ARM_THUMB2 1
1040 #if (ACC_ARCH_ARM_THUMB2)
1041 # undef ACC_INFO_ARCH
1042 # define ACC_INFO_ARCH "arm_thumb2"
1044 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_DOS32 || ACC_OS_OS2)
1045 # error "FIXME - missing define for CPU architecture"
1047 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN32)
1048 # error "FIXME - missing ACC_OS_WIN32 define for CPU architecture"
1050 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN64)
1051 # error "FIXME - missing ACC_OS_WIN64 define for CPU architecture"
1053 #if (ACC_OS_OS216 || ACC_OS_WIN16)
1054 # define ACC_ARCH_I086PM 1
1055 #elif 1 && (ACC_OS_DOS16 && defined(BLX286))
1056 # define ACC_ARCH_I086PM 1
1057 #elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
1058 # define ACC_ARCH_I086PM 1
1059 #elif 1 && (ACC_OS_DOS16 && ACC_CC_BORLANDC && defined(__DPMI16__))
1060 # define ACC_ARCH_I086PM 1
1062 #if (ACC_ARCH_AMD64 && !ACC_ARCH_X64)
1063 # define ACC_ARCH_X64 1
1064 #elif (!ACC_ARCH_AMD64 && ACC_ARCH_X64) && defined(__ACC_ARCH_OVERRIDE)
1065 # define ACC_ARCH_AMD64 1
1067 #if (ACC_ARCH_ARM64 && !ACC_ARCH_AARCH64)
1068 # define ACC_ARCH_AARCH64 1
1069 #elif (!ACC_ARCH_ARM64 && ACC_ARCH_AARCH64) && defined(__ACC_ARCH_OVERRIDE)
1070 # define ACC_ARCH_ARM64 1
1072 #if (ACC_ARCH_I386 && !ACC_ARCH_X86)
1073 # define ACC_ARCH_X86 1
1074 #elif (!ACC_ARCH_I386 && ACC_ARCH_X86) && defined(__ACC_ARCH_OVERRIDE)
1075 # define ACC_ARCH_I386 1
1077 #if (ACC_ARCH_AMD64 && !ACC_ARCH_X64) || (!ACC_ARCH_AMD64 && ACC_ARCH_X64)
1078 # error "unexpected configuration - check your compiler defines"
1080 #if (ACC_ARCH_ARM64 && !ACC_ARCH_AARCH64) || (!ACC_ARCH_ARM64 && ACC_ARCH_AARCH64)
1081 # error "unexpected configuration - check your compiler defines"
1083 #if (ACC_ARCH_I386 && !ACC_ARCH_X86) || (!ACC_ARCH_I386 && ACC_ARCH_X86)
1084 # error "unexpected configuration - check your compiler defines"
1086 #if (ACC_ARCH_ARM_THUMB1 && !ACC_ARCH_ARM)
1087 # error "unexpected configuration - check your compiler defines"
1089 #if (ACC_ARCH_ARM_THUMB2 && !ACC_ARCH_ARM)
1090 # error "unexpected configuration - check your compiler defines"
1092 #if (ACC_ARCH_ARM_THUMB1 && ACC_ARCH_ARM_THUMB2)
1093 # error "unexpected configuration - check your compiler defines"
1095 #if (ACC_ARCH_I086PM && !ACC_ARCH_I086)
1096 # error "unexpected configuration - check your compiler defines"
1099 # if (UINT_MAX != ACC_0xffffL)
1100 # error "unexpected configuration - check your compiler defines"
1102 # if (ULONG_MAX != ACC_0xffffffffL)
1103 # error "unexpected configuration - check your compiler defines"
1107 # if (UINT_MAX != ACC_0xffffL) && defined(__i386_int16__)
1108 # error "unexpected configuration - check your compiler defines"
1110 # if (UINT_MAX != ACC_0xffffffffL) && !defined(__i386_int16__)
1111 # error "unexpected configuration - check your compiler defines"
1113 # if (ULONG_MAX != ACC_0xffffffffL)
1114 # error "unexpected configuration - check your compiler defines"
1117 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386)
1118 # if !defined(ACC_TARGET_FEATURE_SSE2)
1119 # if defined(__SSE2__)
1120 # define ACC_TARGET_FEATURE_SSE2 1
1121 # elif defined(_MSC_VER) && (defined(_M_IX86_FP) && ((_M_IX86_FP)+0 >= 2))
1122 # define ACC_TARGET_FEATURE_SSE2 1
1123 # elif (ACC_CC_INTELC_MSC || ACC_CC_MSC) && defined(_M_AMD64)
1124 # define ACC_TARGET_FEATURE_SSE2 1
1127 # if !defined(ACC_TARGET_FEATURE_SSSE3)
1128 # if (ACC_TARGET_FEATURE_SSE2)
1129 # if defined(__SSSE3__)
1130 # define ACC_TARGET_FEATURE_SSSE3 1
1131 # elif defined(_MSC_VER) && defined(__AVX__)
1132 # define ACC_TARGET_FEATURE_SSSE3 1
1136 # if !defined(ACC_TARGET_FEATURE_SSE4_2)
1137 # if (ACC_TARGET_FEATURE_SSSE3)
1138 # if defined(__SSE4_2__)
1139 # define ACC_TARGET_FEATURE_SSE4_2 1
1143 # if !defined(ACC_TARGET_FEATURE_AVX)
1144 # if (ACC_TARGET_FEATURE_SSSE3)
1145 # if defined(__AVX__)
1146 # define ACC_TARGET_FEATURE_AVX 1
1150 # if !defined(ACC_TARGET_FEATURE_AVX2)
1151 # if (ACC_TARGET_FEATURE_AVX)
1152 # if defined(__AVX2__)
1153 # define ACC_TARGET_FEATURE_AVX2 1
1158 #if (ACC_TARGET_FEATURE_SSSE3 && !(ACC_TARGET_FEATURE_SSE2))
1159 # error "unexpected configuration - check your compiler defines"
1161 #if (ACC_TARGET_FEATURE_SSE4_2 && !(ACC_TARGET_FEATURE_SSSE3))
1162 # error "unexpected configuration - check your compiler defines"
1164 #if (ACC_TARGET_FEATURE_AVX && !(ACC_TARGET_FEATURE_SSSE3))
1165 # error "unexpected configuration - check your compiler defines"
1167 #if (ACC_TARGET_FEATURE_AVX2 && !(ACC_TARGET_FEATURE_AVX))
1168 # error "unexpected configuration - check your compiler defines"
1171 # if !defined(ACC_TARGET_FEATURE_NEON)
1172 # if defined(__ARM_NEON) && ((__ARM_NEON)+0)
1173 # define ACC_TARGET_FEATURE_NEON 1
1174 # elif 1 && defined(__ARM_NEON__) && ((__ARM_NEON__)+0)
1175 # define ACC_TARGET_FEATURE_NEON 1
1176 # elif 1 && defined(__TARGET_FEATURE_NEON) && ((__TARGET_FEATURE_NEON)+0)
1177 # define ACC_TARGET_FEATURE_NEON 1
1180 #elif (ACC_ARCH_ARM64)
1181 # if !defined(ACC_TARGET_FEATURE_NEON)
1183 # define ACC_TARGET_FEATURE_NEON 1
1188 #elif !defined(__ACC_MM_OVERRIDE)
1190 #if (UINT_MAX != ACC_0xffffL)
1191 # error "unexpected configuration - check your compiler defines"
1193 #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
1194 # define ACC_MM_TINY 1
1195 #elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
1196 # define ACC_MM_HUGE 1
1197 #elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
1198 # define ACC_MM_SMALL 1
1199 #elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
1200 # define ACC_MM_MEDIUM 1
1201 #elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
1202 # define ACC_MM_COMPACT 1
1203 #elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
1204 # define ACC_MM_LARGE 1
1205 #elif (ACC_CC_AZTECC)
1206 # if defined(_LARGE_CODE) && defined(_LARGE_DATA)
1207 # define ACC_MM_LARGE 1
1208 # elif defined(_LARGE_CODE)
1209 # define ACC_MM_MEDIUM 1
1210 # elif defined(_LARGE_DATA)
1211 # define ACC_MM_COMPACT 1
1213 # define ACC_MM_SMALL 1
1215 #elif (ACC_CC_ZORTECHC && defined(__VCM__))
1216 # define ACC_MM_LARGE 1
1218 # error "unknown ACC_ARCH_I086 memory model"
1220 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
1221 #define ACC_HAVE_MM_HUGE_PTR 1
1222 #define ACC_HAVE_MM_HUGE_ARRAY 1
1224 # undef ACC_HAVE_MM_HUGE_ARRAY
1226 #if (ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_ZORTECHC)
1227 # undef ACC_HAVE_MM_HUGE_PTR
1228 # undef ACC_HAVE_MM_HUGE_ARRAY
1229 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
1230 # undef ACC_HAVE_MM_HUGE_ARRAY
1231 #elif (ACC_CC_MSC && defined(_QC))
1232 # undef ACC_HAVE_MM_HUGE_ARRAY
1233 # if (_MSC_VER < 600)
1234 # undef ACC_HAVE_MM_HUGE_PTR
1236 #elif (ACC_CC_TURBOC && (__TURBOC__ < 0x0295))
1237 # undef ACC_HAVE_MM_HUGE_ARRAY
1239 #if (ACC_ARCH_I086PM) && !(ACC_HAVE_MM_HUGE_PTR)
1241 # error "unexpected configuration - check your compiler defines"
1242 # elif (ACC_CC_ZORTECHC)
1244 # error "unexpected configuration - check your compiler defines"
1247 #if defined(__cplusplus)
1250 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
1251 extern void __near __cdecl _AHSHIFT(void);
1252 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1253 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
1254 extern void __near __cdecl _AHSHIFT(void);
1255 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1256 #elif (ACC_CC_MSC || ACC_CC_TOPSPEEDC)
1257 extern void __near __cdecl _AHSHIFT(void);
1258 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1259 #elif (ACC_CC_TURBOC && (__TURBOC__ >= 0x0295))
1260 extern void __near __cdecl _AHSHIFT(void);
1261 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
1262 #elif ((ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_TURBOC) && ACC_OS_DOS16)
1263 # define ACC_MM_AHSHIFT 12
1264 #elif (ACC_CC_WATCOMC)
1265 extern unsigned char _HShift;
1266 # define ACC_MM_AHSHIFT ((unsigned) _HShift)
1268 # error "FIXME - implement ACC_MM_AHSHIFT"
1270 #if defined(__cplusplus)
1274 #elif (ACC_ARCH_C166)
1275 #if !defined(__MODEL__)
1276 # error "FIXME - ACC_ARCH_C166 __MODEL__"
1277 #elif ((__MODEL__) == 0)
1278 # define ACC_MM_SMALL 1
1279 #elif ((__MODEL__) == 1)
1280 # define ACC_MM_SMALL 1
1281 #elif ((__MODEL__) == 2)
1282 # define ACC_MM_LARGE 1
1283 #elif ((__MODEL__) == 3)
1284 # define ACC_MM_TINY 1
1285 #elif ((__MODEL__) == 4)
1286 # define ACC_MM_XTINY 1
1287 #elif ((__MODEL__) == 5)
1288 # define ACC_MM_XSMALL 1
1290 # error "FIXME - ACC_ARCH_C166 __MODEL__"
1292 #elif (ACC_ARCH_MCS251)
1293 #if !defined(__MODEL__)
1294 # error "FIXME - ACC_ARCH_MCS251 __MODEL__"
1295 #elif ((__MODEL__) == 0)
1296 # define ACC_MM_SMALL 1
1297 #elif ((__MODEL__) == 2)
1298 # define ACC_MM_LARGE 1
1299 #elif ((__MODEL__) == 3)
1300 # define ACC_MM_TINY 1
1301 #elif ((__MODEL__) == 4)
1302 # define ACC_MM_XTINY 1
1303 #elif ((__MODEL__) == 5)
1304 # define ACC_MM_XSMALL 1
1306 # error "FIXME - ACC_ARCH_MCS251 __MODEL__"
1308 #elif (ACC_ARCH_MCS51)
1309 #if !defined(__MODEL__)
1310 # error "FIXME - ACC_ARCH_MCS51 __MODEL__"
1311 #elif ((__MODEL__) == 1)
1312 # define ACC_MM_SMALL 1
1313 #elif ((__MODEL__) == 2)
1314 # define ACC_MM_LARGE 1
1315 #elif ((__MODEL__) == 3)
1316 # define ACC_MM_TINY 1
1317 #elif ((__MODEL__) == 4)
1318 # define ACC_MM_XTINY 1
1319 #elif ((__MODEL__) == 5)
1320 # define ACC_MM_XSMALL 1
1322 # error "FIXME - ACC_ARCH_MCS51 __MODEL__"
1324 #elif (ACC_ARCH_CRAY_PVP)
1325 # define ACC_MM_PVP 1
1327 # define ACC_MM_FLAT 1
1329 #if (ACC_MM_COMPACT)
1330 # define ACC_INFO_MM "compact"
1332 # define ACC_INFO_MM "flat"
1334 # define ACC_INFO_MM "huge"
1335 #elif (ACC_MM_LARGE)
1336 # define ACC_INFO_MM "large"
1337 #elif (ACC_MM_MEDIUM)
1338 # define ACC_INFO_MM "medium"
1340 # define ACC_INFO_MM "pvp"
1341 #elif (ACC_MM_SMALL)
1342 # define ACC_INFO_MM "small"
1344 # define ACC_INFO_MM "tiny"
1346 # error "unknown memory model"
1349 #if !defined(__acc_gnuc_extension__)
1350 #if (ACC_CC_GNUC >= 0x020800ul)
1351 # define __acc_gnuc_extension__ __extension__
1352 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1353 # define __acc_gnuc_extension__ __extension__
1354 #elif (ACC_CC_IBMC >= 600)
1355 # define __acc_gnuc_extension__ __extension__
1358 #if !defined(__acc_gnuc_extension__)
1359 # define __acc_gnuc_extension__ /*empty*/
1361 #if !defined(acc_has_builtin)
1362 #if (ACC_CC_CLANG) && defined(__has_builtin)
1363 # define acc_has_builtin __has_builtin
1366 #if !defined(acc_has_builtin)
1367 # define acc_has_builtin(x) 0
1369 #if !defined(acc_has_attribute)
1370 #if (ACC_CC_CLANG) && defined(__has_attribute)
1371 # define acc_has_attribute __has_attribute
1374 #if !defined(acc_has_attribute)
1375 # define acc_has_attribute(x) 0
1377 #if !defined(acc_has_declspec_attribute)
1378 #if (ACC_CC_CLANG) && defined(__has_declspec_attribute)
1379 # define acc_has_declspec_attribute __has_declspec_attribute
1382 #if !defined(acc_has_declspec_attribute)
1383 # define acc_has_declspec_attribute(x) 0
1385 #if !defined(acc_has_feature)
1386 #if (ACC_CC_CLANG) && defined(__has_feature)
1387 # define acc_has_feature __has_feature
1390 #if !defined(acc_has_feature)
1391 # define acc_has_feature(x) 0
1393 #if !defined(acc_has_extension)
1394 #if (ACC_CC_CLANG) && defined(__has_extension)
1395 # define acc_has_extension __has_extension
1396 #elif (ACC_CC_CLANG) && defined(__has_feature)
1397 # define acc_has_extension __has_feature
1400 #if !defined(acc_has_extension)
1401 # define acc_has_extension(x) 0
1403 #if !defined(ACC_CFG_USE_NEW_STYLE_CASTS) && defined(__cplusplus) && 0
1404 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
1405 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1406 # elif (ACC_CC_INTELC && (__INTEL_COMPILER < 1200))
1407 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1409 # define ACC_CFG_USE_NEW_STYLE_CASTS 1
1412 #if !defined(ACC_CFG_USE_NEW_STYLE_CASTS)
1413 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1415 #if !defined(__cplusplus)
1416 # if defined(ACC_CFG_USE_NEW_STYLE_CASTS)
1417 # undef ACC_CFG_USE_NEW_STYLE_CASTS
1419 # define ACC_CFG_USE_NEW_STYLE_CASTS 0
1421 #if !defined(ACC_REINTERPRET_CAST)
1422 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1423 # define ACC_REINTERPRET_CAST(t,e) (reinterpret_cast<t> (e))
1426 #if !defined(ACC_REINTERPRET_CAST)
1427 # define ACC_REINTERPRET_CAST(t,e) ((t) (e))
1429 #if !defined(ACC_STATIC_CAST)
1430 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1431 # define ACC_STATIC_CAST(t,e) (static_cast<t> (e))
1434 #if !defined(ACC_STATIC_CAST)
1435 # define ACC_STATIC_CAST(t,e) ((t) (e))
1437 #if !defined(ACC_STATIC_CAST2)
1438 # define ACC_STATIC_CAST2(t1,t2,e) ACC_STATIC_CAST(t1, ACC_STATIC_CAST(t2, e))
1440 #if !defined(ACC_UNCONST_CAST)
1441 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1442 # define ACC_UNCONST_CAST(t,e) (const_cast<t> (e))
1443 # elif (ACC_HAVE_MM_HUGE_PTR)
1444 # define ACC_UNCONST_CAST(t,e) ((t) (e))
1445 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1446 # define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((acc_uintptr_t) ((const void *) (e)))))
1449 #if !defined(ACC_UNCONST_CAST)
1450 # define ACC_UNCONST_CAST(t,e) ((t) ((void *) ((const void *) (e))))
1452 #if !defined(ACC_UNCONST_VOLATILE_CAST)
1453 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1454 # define ACC_UNCONST_VOLATILE_CAST(t,e) (const_cast<t> (e))
1455 # elif (ACC_HAVE_MM_HUGE_PTR)
1456 # define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) (e))
1457 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1458 # define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((acc_uintptr_t) ((volatile const void *) (e)))))
1461 #if !defined(ACC_UNCONST_VOLATILE_CAST)
1462 # define ACC_UNCONST_VOLATILE_CAST(t,e) ((t) ((volatile void *) ((volatile const void *) (e))))
1464 #if !defined(ACC_UNVOLATILE_CAST)
1465 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1466 # define ACC_UNVOLATILE_CAST(t,e) (const_cast<t> (e))
1467 # elif (ACC_HAVE_MM_HUGE_PTR)
1468 # define ACC_UNVOLATILE_CAST(t,e) ((t) (e))
1469 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1470 # define ACC_UNVOLATILE_CAST(t,e) ((t) ((void *) ((acc_uintptr_t) ((volatile void *) (e)))))
1473 #if !defined(ACC_UNVOLATILE_CAST)
1474 # define ACC_UNVOLATILE_CAST(t,e) ((t) ((void *) ((volatile void *) (e))))
1476 #if !defined(ACC_UNVOLATILE_CONST_CAST)
1477 # if (ACC_CFG_USE_NEW_STYLE_CASTS)
1478 # define ACC_UNVOLATILE_CONST_CAST(t,e) (const_cast<t> (e))
1479 # elif (ACC_HAVE_MM_HUGE_PTR)
1480 # define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) (e))
1481 # elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1482 # define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((acc_uintptr_t) ((volatile const void *) (e)))))
1485 #if !defined(ACC_UNVOLATILE_CONST_CAST)
1486 # define ACC_UNVOLATILE_CONST_CAST(t,e) ((t) ((const void *) ((volatile const void *) (e))))
1488 #if !defined(ACC_PCAST)
1489 # if (ACC_HAVE_MM_HUGE_PTR)
1490 # define ACC_PCAST(t,e) ((t) (e))
1493 #if !defined(ACC_PCAST)
1494 # define ACC_PCAST(t,e) ACC_STATIC_CAST(t, ACC_STATIC_CAST(void *, e))
1496 #if !defined(ACC_CCAST)
1497 # if (ACC_HAVE_MM_HUGE_PTR)
1498 # define ACC_CCAST(t,e) ((t) (e))
1501 #if !defined(ACC_CCAST)
1502 # define ACC_CCAST(t,e) ACC_STATIC_CAST(t, ACC_STATIC_CAST(const void *, e))
1504 #if !defined(ACC_ICONV)
1505 # define ACC_ICONV(t,e) ACC_STATIC_CAST(t, e)
1507 #if !defined(ACC_ICAST)
1508 # define ACC_ICAST(t,e) ACC_STATIC_CAST(t, e)
1510 #if !defined(ACC_ITRUNC)
1511 # define ACC_ITRUNC(t,e) ACC_STATIC_CAST(t, e)
1513 #if !defined(__acc_cte)
1514 # if (ACC_CC_MSC || ACC_CC_WATCOMC)
1515 # define __acc_cte(e) ((void)0,(e))
1517 # define __acc_cte(e) ((void)0,(e))
1520 #if !defined(__acc_cte)
1521 # define __acc_cte(e) (e)
1523 #if !defined(ACC_BLOCK_BEGIN)
1524 # define ACC_BLOCK_BEGIN do {
1525 # define ACC_BLOCK_END } while __acc_cte(0)
1527 #if !defined(ACC_UNUSED)
1528 # if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
1529 # define ACC_UNUSED(var) ((void) &var)
1530 # elif (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PELLESC || ACC_CC_TURBOC)
1531 # define ACC_UNUSED(var) if (&var) ; else
1532 # elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030200ul))
1533 # define ACC_UNUSED(var) ((void) &var)
1534 # elif (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1535 # define ACC_UNUSED(var) ((void) var)
1536 # elif (ACC_CC_MSC && (_MSC_VER < 900))
1537 # define ACC_UNUSED(var) if (&var) ; else
1538 # elif (ACC_CC_KEILC)
1539 # define ACC_UNUSED(var) {extern int acc_unused__[1-2*!(sizeof(var)>0)]; (void)acc_unused__;}
1540 # elif (ACC_CC_PACIFICC)
1541 # define ACC_UNUSED(var) ((void) sizeof(var))
1542 # elif (ACC_CC_WATCOMC) && defined(__cplusplus)
1543 # define ACC_UNUSED(var) ((void) var)
1545 # define ACC_UNUSED(var) ((void) &var)
1548 #if !defined(ACC_UNUSED_RESULT)
1549 # define ACC_UNUSED_RESULT(var) ACC_UNUSED(var)
1551 #if !defined(ACC_UNUSED_FUNC)
1552 # if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
1553 # define ACC_UNUSED_FUNC(func) ((void) func)
1554 # elif (ACC_CC_BORLANDC || ACC_CC_NDPC || ACC_CC_TURBOC)
1555 # define ACC_UNUSED_FUNC(func) if (func) ; else
1556 # elif (ACC_CC_CLANG || ACC_CC_LLVM)
1557 # define ACC_UNUSED_FUNC(func) ((void) &func)
1558 # elif (ACC_CC_MSC && (_MSC_VER < 900))
1559 # define ACC_UNUSED_FUNC(func) if (func) ; else
1561 # define ACC_UNUSED_FUNC(func) ((void) &func)
1562 # elif (ACC_CC_KEILC || ACC_CC_PELLESC)
1563 # define ACC_UNUSED_FUNC(func) {extern int acc_unused__[1-2*!(sizeof((int)func)>0)]; (void)acc_unused__;}
1565 # define ACC_UNUSED_FUNC(func) ((void) func)
1568 #if !defined(ACC_UNUSED_LABEL)
1569 # if (ACC_CC_CLANG >= 0x020800ul)
1570 # define ACC_UNUSED_LABEL(l) (__acc_gnuc_extension__ ((void) ((const void *) &&l)))
1571 # elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_INTELC || ACC_CC_WATCOMC)
1572 # define ACC_UNUSED_LABEL(l) if __acc_cte(0) goto l
1574 # define ACC_UNUSED_LABEL(l) switch (0) case 1:goto l
1577 #if !defined(ACC_DEFINE_UNINITIALIZED_VAR)
1579 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var
1580 # elif 0 && (ACC_CC_GNUC)
1581 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var
1583 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
1586 #if !defined(__acc_inline)
1587 #if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
1588 #elif defined(__cplusplus)
1589 # define __acc_inline inline
1590 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
1591 # define __acc_inline inline
1592 #elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
1593 # define __acc_inline __inline
1594 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
1595 # define __acc_inline __inline__
1597 # define __acc_inline __inline
1599 # define __acc_inline __inline__
1600 #elif (ACC_CC_IBMC >= 600)
1601 # define __acc_inline __inline__
1602 #elif (ACC_CC_INTELC)
1603 # define __acc_inline __inline
1604 #elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x2405))
1605 # define __acc_inline __inline
1606 #elif (ACC_CC_MSC && (_MSC_VER >= 900))
1607 # define __acc_inline __inline
1608 #elif (ACC_CC_SUNPROC >= 0x5100)
1609 # define __acc_inline __inline__
1612 #if defined(__acc_inline)
1613 # ifndef __acc_HAVE_inline
1614 # define __acc_HAVE_inline 1
1617 # define __acc_inline /*empty*/
1619 #if !defined(__acc_forceinline)
1620 #if (ACC_CC_GNUC >= 0x030200ul)
1621 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1622 #elif (ACC_CC_IBMC >= 700)
1623 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1624 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
1625 # define __acc_forceinline __forceinline
1626 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1627 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1628 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1629 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1630 #elif (ACC_CC_MSC && (_MSC_VER >= 1200))
1631 # define __acc_forceinline __forceinline
1632 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1633 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1634 #elif (ACC_CC_SUNPROC >= 0x5100)
1635 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1638 #if defined(__acc_forceinline)
1639 # ifndef __acc_HAVE_forceinline
1640 # define __acc_HAVE_forceinline 1
1643 # define __acc_forceinline __acc_inline
1645 #if !defined(__acc_noinline)
1646 #if 1 && (ACC_ARCH_I386) && (ACC_CC_GNUC >= 0x040000ul) && (ACC_CC_GNUC < 0x040003ul)
1647 # define __acc_noinline __attribute__((__noinline__,__used__))
1648 #elif (ACC_CC_GNUC >= 0x030200ul)
1649 # define __acc_noinline __attribute__((__noinline__))
1650 #elif (ACC_CC_IBMC >= 700)
1651 # define __acc_noinline __attribute__((__noinline__))
1652 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
1653 # define __acc_noinline __declspec(noinline)
1654 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1655 # define __acc_noinline __attribute__((__noinline__))
1656 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1657 # define __acc_noinline __attribute__((__noinline__))
1658 #elif (ACC_CC_MSC && (_MSC_VER >= 1300))
1659 # define __acc_noinline __declspec(noinline)
1660 #elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3200) && (ACC_OS_WIN32 || ACC_OS_WIN64))
1661 # if defined(__cplusplus)
1663 # define __acc_noinline __declspec(noinline)
1665 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1666 # define __acc_noinline __attribute__((__noinline__))
1667 #elif (ACC_CC_SUNPROC >= 0x5100)
1668 # define __acc_noinline __attribute__((__noinline__))
1671 #if defined(__acc_noinline)
1672 # ifndef __acc_HAVE_noinline
1673 # define __acc_HAVE_noinline 1
1676 # define __acc_noinline /*empty*/
1678 #if (__acc_HAVE_forceinline || __acc_HAVE_noinline) && !(__acc_HAVE_inline)
1679 # error "unexpected configuration - check your compiler defines"
1681 #if !defined(__acc_static_inline)
1683 # define __acc_static_inline __acc_gnuc_extension__ static __acc_inline
1686 #if !defined(__acc_static_inline)
1687 # define __acc_static_inline static __acc_inline
1689 #if !defined(__acc_static_forceinline)
1691 # define __acc_static_forceinline __acc_gnuc_extension__ static __acc_forceinline
1694 #if !defined(__acc_static_forceinline)
1695 # define __acc_static_forceinline static __acc_forceinline
1697 #if !defined(__acc_static_noinline)
1699 # define __acc_static_noinline __acc_gnuc_extension__ static __acc_noinline
1702 #if !defined(__acc_static_noinline)
1703 # define __acc_static_noinline static __acc_noinline
1705 #if !defined(__acc_c99_extern_inline)
1706 #if defined(__GNUC_GNU_INLINE__)
1707 # define __acc_c99_extern_inline __acc_inline
1708 #elif defined(__GNUC_STDC_INLINE__)
1709 # define __acc_c99_extern_inline extern __acc_inline
1710 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__-0 >= 199901L)
1711 # define __acc_c99_extern_inline extern __acc_inline
1713 #if !defined(__acc_c99_extern_inline) && (__acc_HAVE_inline)
1714 # define __acc_c99_extern_inline __acc_inline
1717 #if defined(__acc_c99_extern_inline)
1718 # ifndef __acc_HAVE_c99_extern_inline
1719 # define __acc_HAVE_c99_extern_inline 1
1722 # define __acc_c99_extern_inline /*empty*/
1724 #if !defined(__acc_may_alias)
1725 #if (ACC_CC_GNUC >= 0x030400ul)
1726 # define __acc_may_alias __attribute__((__may_alias__))
1727 #elif (ACC_CC_CLANG >= 0x020900ul)
1728 # define __acc_may_alias __attribute__((__may_alias__))
1729 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1210)) && 0
1730 # define __acc_may_alias __attribute__((__may_alias__))
1731 #elif (ACC_CC_PGI >= 0x0d0a00ul) && 0
1732 # define __acc_may_alias __attribute__((__may_alias__))
1735 #if defined(__acc_may_alias)
1736 # ifndef __acc_HAVE_may_alias
1737 # define __acc_HAVE_may_alias 1
1740 # define __acc_may_alias /*empty*/
1742 #if !defined(__acc_noreturn)
1743 #if (ACC_CC_GNUC >= 0x020700ul)
1744 # define __acc_noreturn __attribute__((__noreturn__))
1745 #elif (ACC_CC_IBMC >= 700)
1746 # define __acc_noreturn __attribute__((__noreturn__))
1747 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450))
1748 # define __acc_noreturn __declspec(noreturn)
1749 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
1750 # define __acc_noreturn __attribute__((__noreturn__))
1751 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1752 # define __acc_noreturn __attribute__((__noreturn__))
1753 #elif (ACC_CC_MSC && (_MSC_VER >= 1200))
1754 # define __acc_noreturn __declspec(noreturn)
1755 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1756 # define __acc_noreturn __attribute__((__noreturn__))
1759 #if defined(__acc_noreturn)
1760 # ifndef __acc_HAVE_noreturn
1761 # define __acc_HAVE_noreturn 1
1764 # define __acc_noreturn /*empty*/
1766 #if !defined(__acc_nothrow)
1767 #if (ACC_CC_GNUC >= 0x030300ul)
1768 # define __acc_nothrow __attribute__((__nothrow__))
1769 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 450)) && defined(__cplusplus)
1770 # define __acc_nothrow __declspec(nothrow)
1771 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 900))
1772 # define __acc_nothrow __attribute__((__nothrow__))
1773 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1774 # define __acc_nothrow __attribute__((__nothrow__))
1775 #elif (ACC_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
1776 # define __acc_nothrow __declspec(nothrow)
1779 #if defined(__acc_nothrow)
1780 # ifndef __acc_HAVE_nothrow
1781 # define __acc_HAVE_nothrow 1
1784 # define __acc_nothrow /*empty*/
1786 #if !defined(__acc_restrict)
1787 #if (ACC_CC_GNUC >= 0x030400ul)
1788 # define __acc_restrict __restrict__
1789 #elif (ACC_CC_IBMC >= 800) && !defined(__cplusplus)
1790 # define __acc_restrict __restrict__
1791 #elif (ACC_CC_IBMC >= 1210)
1792 # define __acc_restrict __restrict__
1793 #elif (ACC_CC_INTELC_MSC && (__INTEL_COMPILER >= 600))
1794 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 600))
1795 # define __acc_restrict __restrict__
1796 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM)
1797 # define __acc_restrict __restrict__
1798 #elif (ACC_CC_MSC && (_MSC_VER >= 1400))
1799 # define __acc_restrict __restrict
1800 #elif (ACC_CC_PGI >= 0x0d0a00ul)
1801 # define __acc_restrict __restrict__
1804 #if defined(__acc_restrict)
1805 # ifndef __acc_HAVE_restrict
1806 # define __acc_HAVE_restrict 1
1809 # define __acc_restrict /*empty*/
1811 #if !defined(__acc_alignof)
1812 #if (ACC_CC_ARMCC || ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
1813 # define __acc_alignof(e) __alignof__(e)
1814 #elif (ACC_CC_GHS) && !defined(__cplusplus)
1815 # define __acc_alignof(e) __alignof__(e)
1816 #elif (ACC_CC_IBMC >= 600)
1817 # define __acc_alignof(e) (__acc_gnuc_extension__ __alignof__(e))
1818 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700))
1819 # define __acc_alignof(e) __alignof__(e)
1820 #elif (ACC_CC_MSC && (_MSC_VER >= 1300))
1821 # define __acc_alignof(e) __alignof(e)
1822 #elif (ACC_CC_SUNPROC >= 0x5100)
1823 # define __acc_alignof(e) __alignof__(e)
1826 #if defined(__acc_alignof)
1827 # ifndef __acc_HAVE_alignof
1828 # define __acc_HAVE_alignof 1
1831 #if !defined(__acc_struct_packed)
1832 #if (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
1833 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
1834 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
1835 #elif (ACC_CC_PCC && (ACC_CC_PCC < 0x010100ul))
1836 #elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
1837 #elif (ACC_CC_GNUC >= 0x030400ul) && !(ACC_CC_PCC_GNUC) && (ACC_ARCH_AMD64 || ACC_ARCH_I386)
1838 # define __acc_struct_packed(s) struct s {
1839 # define __acc_struct_packed_end() } __attribute__((__gcc_struct__,__packed__));
1840 # define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__gcc_struct__,__packed__));
1841 #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))
1842 # define __acc_struct_packed(s) 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_IBMC >= 700)
1846 # define __acc_struct_packed(s) __acc_gnuc_extension__ struct s {
1847 # define __acc_struct_packed_end() } __attribute__((__packed__));
1848 # define __acc_struct_packed_ma_end() } __acc_may_alias __attribute__((__packed__));
1849 #elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300))
1850 # define __acc_struct_packed(s) __pragma(pack(push,1)) struct s {
1851 # define __acc_struct_packed_end() } __pragma(pack(pop));
1852 #elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 900))
1853 # define __acc_struct_packed(s) _Packed struct s {
1854 # define __acc_struct_packed_end() };
1857 #if defined(__acc_struct_packed) && !defined(__acc_struct_packed_ma)
1858 # define __acc_struct_packed_ma(s) __acc_struct_packed(s)
1860 #if defined(__acc_struct_packed_end) && !defined(__acc_struct_packed_ma_end)
1861 # define __acc_struct_packed_ma_end() __acc_struct_packed_end()
1863 #if !defined(__acc_byte_struct)
1864 #if defined(__acc_struct_packed)
1865 # define __acc_byte_struct(s,n) __acc_struct_packed(s) unsigned char a[n]; __acc_struct_packed_end()
1866 # define __acc_byte_struct_ma(s,n) __acc_struct_packed_ma(s) unsigned char a[n]; __acc_struct_packed_ma_end()
1867 #elif (ACC_CC_CILLY || ACC_CC_CLANG || ACC_CC_PGI || (ACC_CC_SUNPROC >= 0x5100))
1868 # define __acc_byte_struct(s,n) struct s { unsigned char a[n]; } __attribute__((__packed__));
1869 # define __acc_byte_struct_ma(s,n) struct s { unsigned char a[n]; } __acc_may_alias __attribute__((__packed__));
1872 #if defined(__acc_byte_struct) && !defined(__acc_byte_struct_ma)
1873 # define __acc_byte_struct_ma(s,n) __acc_byte_struct(s,n)
1875 #if !defined(__acc_struct_align16) && (__acc_HAVE_alignof)
1876 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x030000ul))
1877 #elif (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
1878 #elif (ACC_CC_CILLY || ACC_CC_PCC)
1879 #elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300))
1880 # define __acc_struct_align16(s) struct __declspec(align(16)) s {
1881 # define __acc_struct_align16_end() };
1882 # define __acc_struct_align32(s) struct __declspec(align(32)) s {
1883 # define __acc_struct_align32_end() };
1884 # define __acc_struct_align64(s) struct __declspec(align(64)) s {
1885 # define __acc_struct_align64_end() };
1886 #elif (ACC_CC_ARMCC || ACC_CC_CLANG || ACC_CC_GNUC || (ACC_CC_IBMC >= 700) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1887 # define __acc_struct_align16(s) struct s {
1888 # define __acc_struct_align16_end() } __attribute__((__aligned__(16)));
1889 # define __acc_struct_align32(s) struct s {
1890 # define __acc_struct_align32_end() } __attribute__((__aligned__(32)));
1891 # define __acc_struct_align64(s) struct s {
1892 # define __acc_struct_align64_end() } __attribute__((__aligned__(64)));
1895 #if !defined(__acc_union_um)
1896 #if (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020800ul)) && defined(__cplusplus)
1897 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
1898 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
1899 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER < 810))
1900 #elif (ACC_CC_PCC && (ACC_CC_PCC < 0x010100ul))
1901 #elif (ACC_CC_SUNPROC && (ACC_CC_SUNPROC < 0x5110)) && !defined(__cplusplus)
1902 #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))
1903 # define __acc_union_am(s) union s {
1904 # define __acc_union_am_end() } __acc_may_alias;
1905 # define __acc_union_um(s) union s {
1906 # define __acc_union_um_end() } __acc_may_alias __attribute__((__packed__));
1907 #elif (ACC_CC_IBMC >= 700)
1908 # define __acc_union_am(s) __acc_gnuc_extension__ union s {
1909 # define __acc_union_am_end() } __acc_may_alias;
1910 # define __acc_union_um(s) __acc_gnuc_extension__ union s {
1911 # define __acc_union_um_end() } __acc_may_alias __attribute__((__packed__));
1912 #elif (ACC_CC_INTELC_MSC) || (ACC_CC_MSC && (_MSC_VER >= 1300))
1913 # define __acc_union_um(s) __pragma(pack(push,1)) union s {
1914 # define __acc_union_um_end() } __pragma(pack(pop));
1915 #elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 900))
1916 # define __acc_union_um(s) _Packed union s {
1917 # define __acc_union_um_end() };
1920 #if !defined(__acc_union_am)
1921 # define __acc_union_am(s) union s {
1922 # define __acc_union_am_end() };
1924 #if !defined(__acc_constructor)
1925 #if (ACC_CC_GNUC >= 0x030400ul)
1926 # define __acc_constructor __attribute__((__constructor__,__used__))
1927 #elif (ACC_CC_GNUC >= 0x020700ul)
1928 # define __acc_constructor __attribute__((__constructor__))
1929 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1930 # define __acc_constructor __attribute__((__constructor__,__used__))
1931 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1932 # define __acc_constructor __attribute__((__constructor__))
1935 #if defined(__acc_constructor)
1936 # ifndef __acc_HAVE_constructor
1937 # define __acc_HAVE_constructor 1
1940 #if !defined(__acc_destructor)
1941 #if (ACC_CC_GNUC >= 0x030400ul)
1942 # define __acc_destructor __attribute__((__destructor__,__used__))
1943 #elif (ACC_CC_GNUC >= 0x020700ul)
1944 # define __acc_destructor __attribute__((__destructor__))
1945 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 800))
1946 # define __acc_destructor __attribute__((__destructor__,__used__))
1947 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1948 # define __acc_destructor __attribute__((__destructor__))
1951 #if defined(__acc_destructor)
1952 # ifndef __acc_HAVE_destructor
1953 # define __acc_HAVE_destructor 1
1956 #if (__acc_HAVE_destructor) && !(__acc_HAVE_constructor)
1957 # error "unexpected configuration - check your compiler defines"
1959 #if !defined(__acc_likely) && !defined(__acc_unlikely)
1960 #if (ACC_CC_GNUC >= 0x030200ul)
1961 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1962 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1963 #elif (ACC_CC_IBMC >= 1010)
1964 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1965 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1966 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800))
1967 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1968 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1969 #elif (ACC_CC_CLANG && ACC_CC_CLANG_C2)
1970 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1971 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1972 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1975 #if defined(__acc_likely)
1976 # ifndef __acc_HAVE_likely
1977 # define __acc_HAVE_likely 1
1980 # define __acc_likely(e) (e)
1982 #if defined(__acc_very_likely)
1983 # ifndef __acc_HAVE_very_likely
1984 # define __acc_HAVE_very_likely 1
1987 # define __acc_very_likely(e) __acc_likely(e)
1989 #if defined(__acc_unlikely)
1990 # ifndef __acc_HAVE_unlikely
1991 # define __acc_HAVE_unlikely 1
1994 # define __acc_unlikely(e) (e)
1996 #if defined(__acc_very_unlikely)
1997 # ifndef __acc_HAVE_very_unlikely
1998 # define __acc_HAVE_very_unlikely 1
2001 # define __acc_very_unlikely(e) __acc_unlikely(e)
2003 #if !defined(__acc_loop_forever)
2005 # define __acc_loop_forever() ACC_BLOCK_BEGIN for (;;) { ; } ACC_BLOCK_END
2007 # define __acc_loop_forever() do { ; } while __acc_cte(1)
2010 #if !defined(__acc_unreachable)
2011 #if (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x020800ul)) && acc_has_builtin(__builtin_unreachable)
2012 # define __acc_unreachable() __builtin_unreachable();
2013 #elif (ACC_CC_GNUC >= 0x040500ul)
2014 # define __acc_unreachable() __builtin_unreachable();
2015 #elif (ACC_CC_INTELC_GNUC && (__INTEL_COMPILER >= 1300)) && 1
2016 # define __acc_unreachable() __builtin_unreachable();
2019 #if defined(__acc_unreachable)
2020 # ifndef __acc_HAVE_unreachable
2021 # define __acc_HAVE_unreachable 1
2025 # define __acc_unreachable() ((void)0);
2027 # define __acc_unreachable() __acc_loop_forever();
2030 #if !defined(acc_unused_funcs_impl)
2031 # 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)
2032 # define acc_unused_funcs_impl(r,f) static r __attribute__((__unused__)) f
2033 # elif 1 && (ACC_CC_BORLANDC || ACC_CC_GNUC)
2034 # define acc_unused_funcs_impl(r,f) static r f
2036 # define acc_unused_funcs_impl(r,f) __acc_static_forceinline r f
2039 #ifndef __ACC_CTA_NAME
2040 #if (ACC_CFG_USE_COUNTER)
2041 # define __ACC_CTA_NAME(a) ACC_PP_ECONCAT2(a,__COUNTER__)
2043 # define __ACC_CTA_NAME(a) ACC_PP_ECONCAT2(a,__LINE__)
2046 #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
2047 # if (ACC_CC_AZTECC || ACC_CC_ZORTECHC)
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_DMC || ACC_CC_SYMANTECC)
2050 # 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
2051 # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
2052 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) ACC_EXTERN_C_BEGIN extern int __ACC_CTA_NAME(acc_cta__)[1-!(e)]; ACC_EXTERN_C_END
2053 # elif (ACC_CC_CLANG && (ACC_CC_CLANG < 0x020900ul)) && defined(__cplusplus)
2054 # 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
2055 # elif (ACC_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
2056 # 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
2058 # 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
2061 #if !defined(ACC_COMPILE_TIME_ASSERT)
2062 # if (ACC_CC_AZTECC)
2063 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-!(e)];}
2064 # elif (ACC_CC_CLANG && (ACC_CC_CLANG >= 0x030000ul))
2065 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
2066 # elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
2067 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
2068 # elif (ACC_CC_GNUC) && defined(__CHECKER__) && defined(__SPARSE_CHECKER__)
2069 # define ACC_COMPILE_TIME_ASSERT(e) {(void) (0/!!(e));}
2070 # elif (ACC_CC_GNUC >= 0x040700ul) && (ACC_CFG_USE_COUNTER) && defined(__cplusplus)
2071 # define ACC_COMPILE_TIME_ASSERT(e) {enum {__ACC_CTA_NAME(acc_cta_e__)=1/!!(e)} __attribute__((__unused__));}
2072 # elif (ACC_CC_GNUC >= 0x040700ul)
2073 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)] __attribute__((__unused__));}
2074 # elif (ACC_CC_MSC && (_MSC_VER < 900))
2075 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
2076 # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
2077 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
2079 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __ACC_CTA_NAME(acc_cta_t__)[1-2*!(e)];}
2082 #if (ACC_LANG_ASSEMBLER)
2083 # undef ACC_COMPILE_TIME_ASSERT_HEADER
2084 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) /*empty*/
2086 ACC_COMPILE_TIME_ASSERT_HEADER(1 == 1)
2087 #if defined(__cplusplus)
2088 extern "C" { ACC_COMPILE_TIME_ASSERT_HEADER(2 == 2) }
2090 ACC_COMPILE_TIME_ASSERT_HEADER(3 == 3)
2092 #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)
2093 # if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC)
2094 # elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
2095 # define __acc_cdecl __cdecl
2096 # define __acc_cdecl_atexit /*empty*/
2097 # define __acc_cdecl_main __cdecl
2098 # if (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
2099 # define __acc_cdecl_qsort __pascal
2100 # elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
2101 # define __acc_cdecl_qsort _stdcall
2103 # define __acc_cdecl_qsort __cdecl
2105 # elif (ACC_CC_WATCOMC)
2106 # define __acc_cdecl __cdecl
2108 # define __acc_cdecl __cdecl
2109 # define __acc_cdecl_atexit __cdecl
2110 # define __acc_cdecl_main __cdecl
2111 # define __acc_cdecl_qsort __cdecl
2113 # if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC || ACC_CC_WATCOMC)
2114 # elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
2115 # define __acc_cdecl_sighandler __pascal
2116 # elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
2117 # define __acc_cdecl_sighandler _stdcall
2118 # elif (ACC_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
2119 # define __acc_cdecl_sighandler __clrcall
2120 # elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
2122 # define __acc_cdecl_sighandler _far _cdecl _loadds
2124 # define __acc_cdecl_sighandler _far _cdecl
2126 # define __acc_cdecl_sighandler _cdecl
2129 # define __acc_cdecl_sighandler __cdecl
2131 #elif (ACC_ARCH_I386) && (ACC_CC_WATCOMC)
2132 # define __acc_cdecl __cdecl
2133 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
2134 # define __acc_cdecl cdecl
2136 #if !defined(__acc_cdecl)
2137 # define __acc_cdecl /*empty*/
2139 #if !defined(__acc_cdecl_atexit)
2140 # define __acc_cdecl_atexit /*empty*/
2142 #if !defined(__acc_cdecl_main)
2143 # define __acc_cdecl_main /*empty*/
2145 #if !defined(__acc_cdecl_qsort)
2146 # define __acc_cdecl_qsort /*empty*/
2148 #if !defined(__acc_cdecl_sighandler)
2149 # define __acc_cdecl_sighandler /*empty*/
2151 #if !defined(__acc_cdecl_va)
2152 # define __acc_cdecl_va __acc_cdecl
2154 #if !(ACC_CFG_NO_WINDOWS_H)
2155 #if !defined(ACC_HAVE_WINDOWS_H)
2156 #if (ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)) || ACC_OS_WIN32 || ACC_OS_WIN64)
2157 # if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
2158 # elif ((ACC_OS_WIN32 && defined(__PW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x030000ul)))
2159 # elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul)))
2161 # define ACC_HAVE_WINDOWS_H 1
2166 #define ACC_SIZEOF_CHAR 1
2167 #ifndef ACC_SIZEOF_SHORT
2168 #if defined(SIZEOF_SHORT)
2169 # define ACC_SIZEOF_SHORT (SIZEOF_SHORT)
2170 #elif defined(__SIZEOF_SHORT__)
2171 # define ACC_SIZEOF_SHORT (__SIZEOF_SHORT__)
2174 #ifndef ACC_SIZEOF_INT
2175 #if defined(SIZEOF_INT)
2176 # define ACC_SIZEOF_INT (SIZEOF_INT)
2177 #elif defined(__SIZEOF_INT__)
2178 # define ACC_SIZEOF_INT (__SIZEOF_INT__)
2181 #ifndef ACC_SIZEOF_LONG
2182 #if defined(SIZEOF_LONG)
2183 # define ACC_SIZEOF_LONG (SIZEOF_LONG)
2184 #elif defined(__SIZEOF_LONG__)
2185 # define ACC_SIZEOF_LONG (__SIZEOF_LONG__)
2188 #ifndef ACC_SIZEOF_LONG_LONG
2189 #if defined(SIZEOF_LONG_LONG)
2190 # define ACC_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
2191 #elif defined(__SIZEOF_LONG_LONG__)
2192 # define ACC_SIZEOF_LONG_LONG (__SIZEOF_LONG_LONG__)
2195 #ifndef ACC_SIZEOF___INT16
2196 #if defined(SIZEOF___INT16)
2197 # define ACC_SIZEOF___INT16 (SIZEOF___INT16)
2200 #ifndef ACC_SIZEOF___INT32
2201 #if defined(SIZEOF___INT32)
2202 # define ACC_SIZEOF___INT32 (SIZEOF___INT32)
2205 #ifndef ACC_SIZEOF___INT64
2206 #if defined(SIZEOF___INT64)
2207 # define ACC_SIZEOF___INT64 (SIZEOF___INT64)
2210 #ifndef ACC_SIZEOF_VOID_P
2211 #if defined(SIZEOF_VOID_P)
2212 # define ACC_SIZEOF_VOID_P (SIZEOF_VOID_P)
2213 #elif defined(__SIZEOF_POINTER__)
2214 # define ACC_SIZEOF_VOID_P (__SIZEOF_POINTER__)
2217 #ifndef ACC_SIZEOF_SIZE_T
2218 #if defined(SIZEOF_SIZE_T)
2219 # define ACC_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
2220 #elif defined(__SIZEOF_SIZE_T__)
2221 # define ACC_SIZEOF_SIZE_T (__SIZEOF_SIZE_T__)
2224 #ifndef ACC_SIZEOF_PTRDIFF_T
2225 #if defined(SIZEOF_PTRDIFF_T)
2226 # define ACC_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
2227 #elif defined(__SIZEOF_PTRDIFF_T__)
2228 # define ACC_SIZEOF_PTRDIFF_T (__SIZEOF_PTRDIFF_T__)
2231 #define __ACC_LSR(x,b) (((x)+0ul) >> (b))
2232 #if !defined(ACC_SIZEOF_SHORT)
2233 # if (ACC_ARCH_CRAY_PVP)
2234 # define ACC_SIZEOF_SHORT 8
2235 # elif (USHRT_MAX == ACC_0xffffL)
2236 # define ACC_SIZEOF_SHORT 2
2237 # elif (__ACC_LSR(USHRT_MAX,7) == 1)
2238 # define ACC_SIZEOF_SHORT 1
2239 # elif (__ACC_LSR(USHRT_MAX,15) == 1)
2240 # define ACC_SIZEOF_SHORT 2
2241 # elif (__ACC_LSR(USHRT_MAX,31) == 1)
2242 # define ACC_SIZEOF_SHORT 4
2243 # elif (__ACC_LSR(USHRT_MAX,63) == 1)
2244 # define ACC_SIZEOF_SHORT 8
2245 # elif (__ACC_LSR(USHRT_MAX,127) == 1)
2246 # define ACC_SIZEOF_SHORT 16
2248 # error "ACC_SIZEOF_SHORT"
2251 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_SHORT == sizeof(short))
2252 #if !defined(ACC_SIZEOF_INT)
2253 # if (ACC_ARCH_CRAY_PVP)
2254 # define ACC_SIZEOF_INT 8
2255 # elif (UINT_MAX == ACC_0xffffL)
2256 # define ACC_SIZEOF_INT 2
2257 # elif (UINT_MAX == ACC_0xffffffffL)
2258 # define ACC_SIZEOF_INT 4
2259 # elif (__ACC_LSR(UINT_MAX,7) == 1)
2260 # define ACC_SIZEOF_INT 1
2261 # elif (__ACC_LSR(UINT_MAX,15) == 1)
2262 # define ACC_SIZEOF_INT 2
2263 # elif (__ACC_LSR(UINT_MAX,31) == 1)
2264 # define ACC_SIZEOF_INT 4
2265 # elif (__ACC_LSR(UINT_MAX,63) == 1)
2266 # define ACC_SIZEOF_INT 8
2267 # elif (__ACC_LSR(UINT_MAX,127) == 1)
2268 # define ACC_SIZEOF_INT 16
2270 # error "ACC_SIZEOF_INT"
2273 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_INT == sizeof(int))
2274 #if !defined(ACC_SIZEOF_LONG)
2275 # if (ULONG_MAX == ACC_0xffffffffL)
2276 # define ACC_SIZEOF_LONG 4
2277 # elif (__ACC_LSR(ULONG_MAX,7) == 1)
2278 # define ACC_SIZEOF_LONG 1
2279 # elif (__ACC_LSR(ULONG_MAX,15) == 1)
2280 # define ACC_SIZEOF_LONG 2
2281 # elif (__ACC_LSR(ULONG_MAX,31) == 1)
2282 # define ACC_SIZEOF_LONG 4
2283 # elif (__ACC_LSR(ULONG_MAX,39) == 1)
2284 # define ACC_SIZEOF_LONG 5
2285 # elif (__ACC_LSR(ULONG_MAX,63) == 1)
2286 # define ACC_SIZEOF_LONG 8
2287 # elif (__ACC_LSR(ULONG_MAX,127) == 1)
2288 # define ACC_SIZEOF_LONG 16
2290 # error "ACC_SIZEOF_LONG"
2293 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_LONG == sizeof(long))
2294 #if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
2295 #if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
2296 # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
2297 # if (ACC_CC_GNUC >= 0x030300ul)
2298 # if ((__LONG_MAX__-0) == (__LONG_LONG_MAX__-0))
2299 # define ACC_SIZEOF_LONG_LONG ACC_SIZEOF_LONG
2300 # elif (__ACC_LSR(__LONG_LONG_MAX__,30) == 1)
2301 # define ACC_SIZEOF_LONG_LONG 4
2307 #if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
2308 #if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
2309 #if (ACC_ARCH_I086 && ACC_CC_DMC)
2310 #elif (ACC_CC_CILLY) && defined(__GNUC__)
2311 # define ACC_SIZEOF_LONG_LONG 8
2312 #elif (ACC_CC_ARMCC_GNUC || ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
2313 # define ACC_SIZEOF_LONG_LONG 8
2314 #elif ((ACC_OS_WIN32 || ACC_OS_WIN64 || defined(_WIN32)) && ACC_CC_MSC && (_MSC_VER >= 1400))
2315 # define ACC_SIZEOF_LONG_LONG 8
2316 #elif (ACC_OS_WIN64 || defined(_WIN64))
2317 # define ACC_SIZEOF___INT64 8
2318 #elif (ACC_ARCH_I386 && (ACC_CC_DMC))
2319 # define ACC_SIZEOF_LONG_LONG 8
2320 #elif (ACC_ARCH_I386 && (ACC_CC_SYMANTECC && (__SC__ >= 0x700)))
2321 # define ACC_SIZEOF_LONG_LONG 8
2322 #elif (ACC_ARCH_I386 && (ACC_CC_INTELC && defined(__linux__)))
2323 # define ACC_SIZEOF_LONG_LONG 8
2324 #elif (ACC_ARCH_I386 && (ACC_CC_MWERKS || ACC_CC_PELLESC || ACC_CC_PGI || ACC_CC_SUNPROC))
2325 # define ACC_SIZEOF_LONG_LONG 8
2326 #elif (ACC_ARCH_I386 && (ACC_CC_INTELC || ACC_CC_MSC))
2327 # define ACC_SIZEOF___INT64 8
2328 #elif ((ACC_OS_WIN32 || defined(_WIN32)) && (ACC_CC_MSC))
2329 # define ACC_SIZEOF___INT64 8
2330 #elif (ACC_ARCH_I386 && (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
2331 # define ACC_SIZEOF___INT64 8
2332 #elif (ACC_ARCH_I386 && (ACC_CC_WATCOMC && (__WATCOMC__ >= 1100)))
2333 # define ACC_SIZEOF___INT64 8
2334 #elif (ACC_CC_GHS && defined(__LLONG_BIT) && ((__LLONG_BIT-0) == 64))
2335 # define ACC_SIZEOF_LONG_LONG 8
2336 #elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && ((_INTEGRAL_MAX_BITS-0) == 64))
2337 # define ACC_SIZEOF___INT64 8
2338 #elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
2339 # define ACC_SIZEOF_LONG_LONG 8
2340 #elif (defined(__vms) || defined(__VMS)) && ((__INITIAL_POINTER_SIZE-0) == 64)
2341 # define ACC_SIZEOF_LONG_LONG 8
2342 #elif (ACC_CC_SDCC) && (ACC_SIZEOF_INT == 2)
2343 #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
2344 # define ACC_SIZEOF_LONG_LONG 8
2348 #if defined(__cplusplus) && (ACC_CC_GNUC)
2349 # if (ACC_CC_GNUC < 0x020800ul)
2350 # undef ACC_SIZEOF_LONG_LONG
2353 #if (ACC_CFG_NO_LONG_LONG)
2354 # undef ACC_SIZEOF_LONG_LONG
2355 #elif defined(__NO_LONG_LONG)
2356 # undef ACC_SIZEOF_LONG_LONG
2357 #elif defined(_NO_LONGLONG)
2358 # undef ACC_SIZEOF_LONG_LONG
2360 #if !defined(ACC_WORDSIZE)
2361 #if (ACC_ARCH_ALPHA)
2362 # define ACC_WORDSIZE 8
2363 #elif (ACC_ARCH_AMD64)
2364 # define ACC_WORDSIZE 8
2365 #elif (ACC_ARCH_ARM64)
2366 # define ACC_WORDSIZE 8
2367 #elif (ACC_ARCH_AVR)
2368 # define ACC_WORDSIZE 1
2369 #elif (ACC_ARCH_H8300)
2370 # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
2371 # define ACC_WORDSIZE 4
2373 # define ACC_WORDSIZE 2
2375 #elif (ACC_ARCH_I086)
2376 # define ACC_WORDSIZE 2
2377 #elif (ACC_ARCH_IA64)
2378 # define ACC_WORDSIZE 8
2379 #elif (ACC_ARCH_M16C)
2380 # define ACC_WORDSIZE 2
2381 #elif (ACC_ARCH_SPU)
2382 # define ACC_WORDSIZE 4
2383 #elif (ACC_ARCH_Z80)
2384 # define ACC_WORDSIZE 1
2385 #elif (ACC_ARCH_MIPS) && (ACC_SIZEOF_LONG == 8) && (defined(__R5900) || defined(__MIPS_PSX2__))
2386 # define ACC_WORDSIZE 8
2387 #elif (ACC_ARCH_MIPS) && (ACC_SIZEOF_LONG == 4) && defined(__mips64) && defined(_MIPS_SIM) && defined(_ABIN32) && (_MIPS_SIM+0 == _ABIN32+0)
2388 # define ACC_WORDSIZE 8
2389 #elif (ACC_OS_OS400 || defined(__OS400__))
2390 # define ACC_WORDSIZE 8
2391 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
2392 # define ACC_WORDSIZE 8
2395 #if !defined(ACC_SIZEOF_VOID_P)
2396 #if defined(__ILP32__) || defined(__ILP32) || defined(_ILP32)
2397 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 4)
2398 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
2399 # define ACC_SIZEOF_VOID_P 4
2400 #elif defined(__ILP64__) || defined(__ILP64) || defined(_ILP64)
2401 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(int) == 8)
2402 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
2403 # define ACC_SIZEOF_VOID_P 8
2404 #elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
2405 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 4)
2406 # define ACC_SIZEOF_VOID_P 8
2407 #elif defined(__LP64__) || defined(__LP64) || defined(_LP64)
2408 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(long) == 8)
2409 # define ACC_SIZEOF_VOID_P 8
2410 #elif (ACC_ARCH_AVR)
2411 # define ACC_SIZEOF_VOID_P 2
2412 #elif (ACC_ARCH_C166 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251 || ACC_ARCH_MSP430)
2413 # define ACC_SIZEOF_VOID_P 2
2414 #elif (ACC_ARCH_H8300)
2415 # if defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
2416 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_WORDSIZE == 4)
2417 # if defined(__NORMAL_MODE__)
2418 # define ACC_SIZEOF_VOID_P 2
2420 # define ACC_SIZEOF_VOID_P 4
2423 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_WORDSIZE == 2)
2424 # define ACC_SIZEOF_VOID_P 2
2426 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x040000ul)) && (ACC_SIZEOF_INT == 4)
2427 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_INT
2428 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_INT
2430 #elif (ACC_ARCH_I086)
2431 # if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
2432 # define ACC_SIZEOF_VOID_P 2
2433 # elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
2434 # define ACC_SIZEOF_VOID_P 4
2436 # error "invalid ACC_ARCH_I086 memory model"
2438 #elif (ACC_ARCH_M16C)
2439 # if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
2440 # define ACC_SIZEOF_VOID_P 4
2442 # define ACC_SIZEOF_VOID_P 2
2444 #elif (ACC_ARCH_SPU)
2445 # define ACC_SIZEOF_VOID_P 4
2446 #elif (ACC_ARCH_Z80)
2447 # define ACC_SIZEOF_VOID_P 2
2448 #elif (ACC_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
2449 # define ACC_SIZEOF_VOID_P 4
2450 #elif (ACC_OS_OS400 || defined(__OS400__))
2451 # if defined(__LLP64_IFC__)
2452 # define ACC_SIZEOF_VOID_P 8
2453 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
2454 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
2456 # define ACC_SIZEOF_VOID_P 16
2457 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
2458 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
2460 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
2461 # define ACC_SIZEOF_VOID_P 8
2462 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
2463 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
2466 #if !defined(ACC_SIZEOF_VOID_P)
2467 # define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG
2469 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_VOID_P == sizeof(void *))
2470 #if !defined(ACC_SIZEOF_SIZE_T)
2471 #if (ACC_ARCH_I086 || ACC_ARCH_M16C)
2472 # define ACC_SIZEOF_SIZE_T 2
2475 #if !defined(ACC_SIZEOF_SIZE_T)
2476 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_VOID_P
2478 #if defined(offsetof)
2479 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_SIZE_T == sizeof(size_t))
2481 #if !defined(ACC_SIZEOF_PTRDIFF_T)
2483 # if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM || ACC_MM_HUGE)
2484 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_VOID_P
2485 # elif (ACC_MM_COMPACT || ACC_MM_LARGE)
2486 # if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
2487 # define ACC_SIZEOF_PTRDIFF_T 4
2489 # define ACC_SIZEOF_PTRDIFF_T 2
2492 # error "invalid ACC_ARCH_I086 memory model"
2496 #if !defined(ACC_SIZEOF_PTRDIFF_T)
2497 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_SIZE_T
2499 #if defined(offsetof)
2500 ACC_COMPILE_TIME_ASSERT_HEADER(ACC_SIZEOF_PTRDIFF_T == sizeof(ptrdiff_t))
2502 #if !defined(ACC_WORDSIZE)
2503 # define ACC_WORDSIZE ACC_SIZEOF_VOID_P
2505 #if (ACC_ABI_NEUTRAL_ENDIAN)
2506 # undef ACC_ABI_BIG_ENDIAN
2507 # undef ACC_ABI_LITTLE_ENDIAN
2508 #elif !(ACC_ABI_BIG_ENDIAN) && !(ACC_ABI_LITTLE_ENDIAN)
2509 #if (ACC_ARCH_ALPHA) && (ACC_ARCH_CRAY_MPP)
2510 # define ACC_ABI_BIG_ENDIAN 1
2511 #elif (ACC_ARCH_IA64) && (ACC_OS_POSIX_LINUX || ACC_OS_WIN64)
2512 # define ACC_ABI_LITTLE_ENDIAN 1
2513 #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)
2514 # define ACC_ABI_LITTLE_ENDIAN 1
2515 #elif (ACC_ARCH_AVR32 || ACC_ARCH_M68K || ACC_ARCH_S390 || ACC_ARCH_SPU)
2516 # define ACC_ABI_BIG_ENDIAN 1
2517 #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
2518 # if (__LITTLE_ENDIAN__ == 1)
2519 # define ACC_ABI_LITTLE_ENDIAN 1
2521 # define ACC_ABI_BIG_ENDIAN 1
2523 #elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
2524 # define ACC_ABI_BIG_ENDIAN 1
2525 #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
2526 # define ACC_ABI_LITTLE_ENDIAN 1
2527 #elif 1 && (ACC_ARCH_ARM) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0)
2528 # define ACC_ABI_BIG_ENDIAN 1
2529 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
2530 # define ACC_ABI_BIG_ENDIAN 1
2531 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
2532 # define ACC_ABI_LITTLE_ENDIAN 1
2533 #elif 1 && (ACC_ARCH_ARM) && defined(_MSC_VER) && defined(_WIN32)
2534 # define ACC_ABI_LITTLE_ENDIAN 1
2535 #elif 1 && (ACC_ARCH_ARM && ACC_CC_ARMCC_ARMCC)
2536 # if defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN)
2537 # error "unexpected configuration - check your compiler defines"
2538 # elif defined(__BIG_ENDIAN)
2539 # define ACC_ABI_BIG_ENDIAN 1
2541 # define ACC_ABI_LITTLE_ENDIAN 1
2543 # define ACC_ABI_LITTLE_ENDIAN 1
2544 #elif 1 && (ACC_ARCH_ARM64) && defined(__ARM_BIG_ENDIAN) && ((__ARM_BIG_ENDIAN)+0)
2545 # define ACC_ABI_BIG_ENDIAN 1
2546 #elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EB__) && !defined(__AARCH64EL__)
2547 # define ACC_ABI_BIG_ENDIAN 1
2548 #elif 1 && (ACC_ARCH_ARM64) && defined(__AARCH64EL__) && !defined(__AARCH64EB__)
2549 # define ACC_ABI_LITTLE_ENDIAN 1
2550 #elif 1 && (ACC_ARCH_ARM64) && defined(_MSC_VER) && defined(_WIN32)
2551 # define ACC_ABI_LITTLE_ENDIAN 1
2552 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
2553 # define ACC_ABI_BIG_ENDIAN 1
2554 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
2555 # define ACC_ABI_LITTLE_ENDIAN 1
2558 #if (ACC_ABI_BIG_ENDIAN) && (ACC_ABI_LITTLE_ENDIAN)
2559 # error "unexpected configuration - check your compiler defines"
2561 #if (ACC_ABI_BIG_ENDIAN)
2562 # define ACC_INFO_ABI_ENDIAN "be"
2563 #elif (ACC_ABI_LITTLE_ENDIAN)
2564 # define ACC_INFO_ABI_ENDIAN "le"
2565 #elif (ACC_ABI_NEUTRAL_ENDIAN)
2566 # define ACC_INFO_ABI_ENDIAN "neutral"
2568 #if (ACC_SIZEOF_INT == 1 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
2569 # define ACC_ABI_I8LP16 1
2570 # define ACC_INFO_ABI_PM "i8lp16"
2571 #elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
2572 # define ACC_ABI_ILP16 1
2573 # define ACC_INFO_ABI_PM "ilp16"
2574 #elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4)
2575 # define ACC_ABI_LP32 1
2576 # define ACC_INFO_ABI_PM "lp32"
2577 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4)
2578 # define ACC_ABI_ILP32 1
2579 # define ACC_INFO_ABI_PM "ilp32"
2580 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 8 && ACC_SIZEOF_SIZE_T == 8)
2581 # define ACC_ABI_LLP64 1
2582 # define ACC_INFO_ABI_PM "llp64"
2583 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
2584 # define ACC_ABI_LP64 1
2585 # define ACC_INFO_ABI_PM "lp64"
2586 #elif (ACC_SIZEOF_INT == 8 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
2587 # define ACC_ABI_ILP64 1
2588 # define ACC_INFO_ABI_PM "ilp64"
2589 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 4)
2590 # define ACC_ABI_IP32L64 1
2591 # define ACC_INFO_ABI_PM "ip32l64"
2593 #if (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_VOID_P == 4 && ACC_WORDSIZE == 8)
2594 # define ACC_ABI_IP32W64 1
2595 # ifndef ACC_INFO_ABI_PM
2596 # define ACC_INFO_ABI_PM "ip32w64"
2600 #elif !defined(__ACC_LIBC_OVERRIDE)
2601 #if (ACC_LIBC_NAKED)
2602 # define ACC_INFO_LIBC "naked"
2603 #elif (ACC_LIBC_FREESTANDING)
2604 # define ACC_INFO_LIBC "freestanding"
2605 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
2606 # define ACC_INFO_LIBC "mfreestanding"
2607 #elif (ACC_LIBC_ISOC90)
2608 # define ACC_INFO_LIBC "isoc90"
2609 #elif (ACC_LIBC_ISOC99)
2610 # define ACC_INFO_LIBC "isoc99"
2611 #elif (ACC_CC_ARMCC_ARMCC) && defined(__ARMCLIB_VERSION)
2612 # define ACC_LIBC_ISOC90 1
2613 # define ACC_INFO_LIBC "isoc90"
2614 #elif defined(__dietlibc__)
2615 # define ACC_LIBC_DIETLIBC 1
2616 # define ACC_INFO_LIBC "dietlibc"
2617 #elif defined(_NEWLIB_VERSION)
2618 # define ACC_LIBC_NEWLIB 1
2619 # define ACC_INFO_LIBC "newlib"
2620 #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
2621 # if defined(__UCLIBC_SUBLEVEL__)
2622 # define ACC_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + (__UCLIBC_MINOR__-0) * 0x100 + (__UCLIBC_SUBLEVEL__-0))
2624 # define ACC_LIBC_UCLIBC 0x00090bL
2626 # define ACC_INFO_LIBC "uc" "libc"
2627 #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
2628 # define ACC_LIBC_GLIBC (__GLIBC__ * 0x10000L + (__GLIBC_MINOR__-0) * 0x100)
2629 # define ACC_INFO_LIBC "glibc"
2630 #elif (ACC_CC_MWERKS) && defined(__MSL__)
2631 # define ACC_LIBC_MSL __MSL__
2632 # define ACC_INFO_LIBC "msl"
2633 #elif 1 && defined(__IAR_SYSTEMS_ICC__)
2634 # define ACC_LIBC_ISOC90 1
2635 # define ACC_INFO_LIBC "isoc90"
2637 # define ACC_LIBC_DEFAULT 1
2638 # define ACC_INFO_LIBC "default"
2641 #if (ACC_ARCH_I386 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
2642 # define ACC_ASM_SYNTAX_MSC 1
2643 #elif (ACC_OS_WIN64 && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
2644 #elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC == 0x011f00ul))
2645 #elif (ACC_ARCH_I386 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
2646 # define ACC_ASM_SYNTAX_GNUC 1
2647 #elif (ACC_ARCH_AMD64 && (ACC_CC_CLANG || ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
2648 # define ACC_ASM_SYNTAX_GNUC 1
2650 # define ACC_ASM_SYNTAX_GNUC 1
2652 #if (ACC_ASM_SYNTAX_GNUC)
2653 #if (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
2654 # define __ACC_ASM_CLOBBER "ax"
2655 # define __ACC_ASM_CLOBBER_LIST_CC /*empty*/
2656 # define __ACC_ASM_CLOBBER_LIST_CC_MEMORY /*empty*/
2657 # define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/
2658 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 1000))
2659 # define __ACC_ASM_CLOBBER "memory"
2660 # define __ACC_ASM_CLOBBER_LIST_CC /*empty*/
2661 # define __ACC_ASM_CLOBBER_LIST_CC_MEMORY : "memory"
2662 # define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/
2664 # define __ACC_ASM_CLOBBER "cc", "memory"
2665 # define __ACC_ASM_CLOBBER_LIST_CC : "cc"
2666 # define __ACC_ASM_CLOBBER_LIST_CC_MEMORY : "cc", "memory"
2667 # define __ACC_ASM_CLOBBER_LIST_EMPTY /*empty*/
2670 #if (ACC_ARCH_ALPHA)
2671 # define ACC_OPT_AVOID_UINT_INDEX 1
2672 #elif (ACC_ARCH_AMD64)
2673 # define ACC_OPT_AVOID_INT_INDEX 1
2674 # define ACC_OPT_AVOID_UINT_INDEX 1
2675 # ifndef ACC_OPT_UNALIGNED16
2676 # define ACC_OPT_UNALIGNED16 1
2678 # ifndef ACC_OPT_UNALIGNED32
2679 # define ACC_OPT_UNALIGNED32 1
2681 # ifndef ACC_OPT_UNALIGNED64
2682 # define ACC_OPT_UNALIGNED64 1
2684 #elif (ACC_ARCH_ARM)
2685 # if defined(__ARM_FEATURE_UNALIGNED)
2686 # if ((__ARM_FEATURE_UNALIGNED)+0)
2687 # ifndef ACC_OPT_UNALIGNED16
2688 # define ACC_OPT_UNALIGNED16 1
2690 # ifndef ACC_OPT_UNALIGNED32
2691 # define ACC_OPT_UNALIGNED32 1
2694 # elif 1 && (ACC_ARCH_ARM_THUMB2)
2695 # ifndef ACC_OPT_UNALIGNED16
2696 # define ACC_OPT_UNALIGNED16 1
2698 # ifndef ACC_OPT_UNALIGNED32
2699 # define ACC_OPT_UNALIGNED32 1
2701 # elif 1 && defined(__ARM_ARCH) && ((__ARM_ARCH)+0 >= 7)
2702 # ifndef ACC_OPT_UNALIGNED16
2703 # define ACC_OPT_UNALIGNED16 1
2705 # ifndef ACC_OPT_UNALIGNED32
2706 # define ACC_OPT_UNALIGNED32 1
2708 # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 7)
2709 # ifndef ACC_OPT_UNALIGNED16
2710 # define ACC_OPT_UNALIGNED16 1
2712 # ifndef ACC_OPT_UNALIGNED32
2713 # define ACC_OPT_UNALIGNED32 1
2715 # elif 1 && defined(__TARGET_ARCH_ARM) && ((__TARGET_ARCH_ARM)+0 >= 6) && (defined(__TARGET_PROFILE_A) || defined(__TARGET_PROFILE_R))
2716 # ifndef ACC_OPT_UNALIGNED16
2717 # define ACC_OPT_UNALIGNED16 1
2719 # ifndef ACC_OPT_UNALIGNED32
2720 # define ACC_OPT_UNALIGNED32 1
2722 # elif 1 && defined(_MSC_VER) && defined(_M_ARM) && ((_M_ARM)+0 >= 7)
2723 # ifndef ACC_OPT_UNALIGNED16
2724 # define ACC_OPT_UNALIGNED16 1
2726 # ifndef ACC_OPT_UNALIGNED32
2727 # define ACC_OPT_UNALIGNED32 1
2730 #elif (ACC_ARCH_ARM64)
2731 # ifndef ACC_OPT_UNALIGNED16
2732 # define ACC_OPT_UNALIGNED16 1
2734 # ifndef ACC_OPT_UNALIGNED32
2735 # define ACC_OPT_UNALIGNED32 1
2737 # ifndef ACC_OPT_UNALIGNED64
2738 # define ACC_OPT_UNALIGNED64 1
2740 #elif (ACC_ARCH_CRIS)
2741 # ifndef ACC_OPT_UNALIGNED16
2742 # define ACC_OPT_UNALIGNED16 1
2744 # ifndef ACC_OPT_UNALIGNED32
2745 # define ACC_OPT_UNALIGNED32 1
2747 #elif (ACC_ARCH_I386)
2748 # ifndef ACC_OPT_UNALIGNED16
2749 # define ACC_OPT_UNALIGNED16 1
2751 # ifndef ACC_OPT_UNALIGNED32
2752 # define ACC_OPT_UNALIGNED32 1
2754 #elif (ACC_ARCH_IA64)
2755 # define ACC_OPT_AVOID_INT_INDEX 1
2756 # define ACC_OPT_AVOID_UINT_INDEX 1
2757 # define ACC_OPT_PREFER_POSTINC 1
2758 #elif (ACC_ARCH_M68K)
2759 # define ACC_OPT_PREFER_POSTINC 1
2760 # define ACC_OPT_PREFER_PREDEC 1
2761 # if defined(__mc68020__) && !defined(__mcoldfire__)
2762 # ifndef ACC_OPT_UNALIGNED16
2763 # define ACC_OPT_UNALIGNED16 1
2765 # ifndef ACC_OPT_UNALIGNED32
2766 # define ACC_OPT_UNALIGNED32 1
2769 #elif (ACC_ARCH_MIPS)
2770 # define ACC_OPT_AVOID_UINT_INDEX 1
2771 #elif (ACC_ARCH_POWERPC)
2772 # define ACC_OPT_PREFER_PREINC 1
2773 # define ACC_OPT_PREFER_PREDEC 1
2774 # if (ACC_ABI_BIG_ENDIAN) || (ACC_WORDSIZE == 8)
2775 # ifndef ACC_OPT_UNALIGNED16
2776 # define ACC_OPT_UNALIGNED16 1
2778 # ifndef ACC_OPT_UNALIGNED32
2779 # define ACC_OPT_UNALIGNED32 1
2781 # if (ACC_WORDSIZE == 8)
2782 # ifndef ACC_OPT_UNALIGNED64
2783 # define ACC_OPT_UNALIGNED64 1
2787 #elif (ACC_ARCH_RISCV)
2788 # define ACC_OPT_AVOID_UINT_INDEX 1
2789 # ifndef ACC_OPT_UNALIGNED16
2790 # define ACC_OPT_UNALIGNED16 1
2792 # ifndef ACC_OPT_UNALIGNED32
2793 # define ACC_OPT_UNALIGNED32 1
2795 # if (ACC_WORDSIZE == 8)
2796 # ifndef ACC_OPT_UNALIGNED64
2797 # define ACC_OPT_UNALIGNED64 1
2800 #elif (ACC_ARCH_S390)
2801 # ifndef ACC_OPT_UNALIGNED16
2802 # define ACC_OPT_UNALIGNED16 1
2804 # ifndef ACC_OPT_UNALIGNED32
2805 # define ACC_OPT_UNALIGNED32 1
2807 # if (ACC_WORDSIZE == 8)
2808 # ifndef ACC_OPT_UNALIGNED64
2809 # define ACC_OPT_UNALIGNED64 1
2813 # define ACC_OPT_PREFER_POSTINC 1
2814 # define ACC_OPT_PREFER_PREDEC 1
2816 #ifndef ACC_CFG_NO_INLINE_ASM
2817 #if (ACC_ABI_NEUTRAL_ENDIAN) || (ACC_ARCH_GENERIC)
2818 # define ACC_CFG_NO_INLINE_ASM 1
2820 # define ACC_CFG_NO_INLINE_ASM 1
2823 #if (ACC_CFG_NO_INLINE_ASM)
2824 # undef ACC_ASM_SYNTAX_MSC
2825 # undef ACC_ASM_SYNTAX_GNUC
2826 # undef __ACC_ASM_CLOBBER
2827 # undef __ACC_ASM_CLOBBER_LIST_CC
2828 # undef __ACC_ASM_CLOBBER_LIST_CC_MEMORY
2829 # undef __ACC_ASM_CLOBBER_LIST_EMPTY
2831 #ifndef ACC_CFG_NO_UNALIGNED
2832 #if (ACC_ABI_NEUTRAL_ENDIAN) || (ACC_ARCH_GENERIC)
2833 # define ACC_CFG_NO_UNALIGNED 1
2836 #if (ACC_CFG_NO_UNALIGNED)
2837 # undef ACC_OPT_UNALIGNED16
2838 # undef ACC_OPT_UNALIGNED32
2839 # undef ACC_OPT_UNALIGNED64
2841 #if defined(__ACC_INFOSTR_MM)
2842 #elif (ACC_MM_FLAT) && (defined(__ACC_INFOSTR_PM) || defined(ACC_INFO_ABI_PM))
2843 # define __ACC_INFOSTR_MM ""
2844 #elif defined(ACC_INFO_MM)
2845 # define __ACC_INFOSTR_MM "." ACC_INFO_MM
2847 # define __ACC_INFOSTR_MM ""
2849 #if defined(__ACC_INFOSTR_PM)
2850 #elif defined(ACC_INFO_ABI_PM)
2851 # define __ACC_INFOSTR_PM "." ACC_INFO_ABI_PM
2853 # define __ACC_INFOSTR_PM ""
2855 #if defined(__ACC_INFOSTR_ENDIAN)
2856 #elif defined(ACC_INFO_ABI_ENDIAN)
2857 # define __ACC_INFOSTR_ENDIAN "." ACC_INFO_ABI_ENDIAN
2859 # define __ACC_INFOSTR_ENDIAN ""
2861 #if defined(__ACC_INFOSTR_OSNAME)
2862 #elif defined(ACC_INFO_OS_CONSOLE)
2863 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_CONSOLE
2864 #elif defined(ACC_INFO_OS_POSIX)
2865 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_POSIX
2867 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS
2869 #if defined(__ACC_INFOSTR_LIBC)
2870 #elif defined(ACC_INFO_LIBC)
2871 # define __ACC_INFOSTR_LIBC "." ACC_INFO_LIBC
2873 # define __ACC_INFOSTR_LIBC ""
2875 #if defined(__ACC_INFOSTR_CCVER)
2876 #elif defined(ACC_INFO_CCVER)
2877 # define __ACC_INFOSTR_CCVER " " ACC_INFO_CCVER
2879 # define __ACC_INFOSTR_CCVER ""
2881 #define ACC_INFO_STRING \
2882 ACC_INFO_ARCH __ACC_INFOSTR_MM __ACC_INFOSTR_PM __ACC_INFOSTR_ENDIAN \
2883 " " __ACC_INFOSTR_OSNAME __ACC_INFOSTR_LIBC " " ACC_INFO_CC __ACC_INFOSTR_CCVER
2884 #if !(ACC_CFG_SKIP_ACC_TYPES)
2885 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0))
2886 # error "missing defines for sizes"
2888 #if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0))
2889 # error "missing defines for sizes"
2891 #define ACC_TYPEOF_CHAR 1u
2892 #define ACC_TYPEOF_SHORT 2u
2893 #define ACC_TYPEOF_INT 3u
2894 #define ACC_TYPEOF_LONG 4u
2895 #define ACC_TYPEOF_LONG_LONG 5u
2896 #define ACC_TYPEOF___INT8 17u
2897 #define ACC_TYPEOF___INT16 18u
2898 #define ACC_TYPEOF___INT32 19u
2899 #define ACC_TYPEOF___INT64 20u
2900 #define ACC_TYPEOF___INT128 21u
2901 #define ACC_TYPEOF___INT256 22u
2902 #define ACC_TYPEOF___MODE_QI 33u
2903 #define ACC_TYPEOF___MODE_HI 34u
2904 #define ACC_TYPEOF___MODE_SI 35u
2905 #define ACC_TYPEOF___MODE_DI 36u
2906 #define ACC_TYPEOF___MODE_TI 37u
2907 #define ACC_TYPEOF_CHAR_P 129u
2908 #if !defined(acc_llong_t)
2909 #if (ACC_SIZEOF_LONG_LONG+0 > 0)
2910 # if !(ACC_LANG_ASSEMBLER)
2911 __acc_gnuc_extension__ typedef long long acc_llong_t__;
2912 __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t__;
2914 # define acc_llong_t acc_llong_t__
2915 # define acc_ullong_t acc_ullong_t__
2918 #if !defined(acc_int16e_t)
2919 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) && (ACC_SIZEOF_SHORT != 2)
2920 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T
2922 #if (ACC_SIZEOF_LONG == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
2923 # define acc_int16e_t long
2924 # define acc_uint16e_t unsigned long
2925 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_LONG
2926 #elif (ACC_SIZEOF_INT == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
2927 # define acc_int16e_t int
2928 # define acc_uint16e_t unsigned int
2929 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_INT
2930 #elif (ACC_SIZEOF_SHORT == 2)
2931 # define acc_int16e_t short int
2932 # define acc_uint16e_t unsigned short int
2933 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_SHORT
2934 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM)
2935 # if !(ACC_LANG_ASSEMBLER)
2936 typedef int acc_int16e_hi_t__ __attribute__((__mode__(__HI__)));
2937 typedef unsigned int acc_uint16e_hi_t__ __attribute__((__mode__(__HI__)));
2939 # define acc_int16e_t acc_int16e_hi_t__
2940 # define acc_uint16e_t acc_uint16e_hi_t__
2941 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___MODE_HI
2942 #elif (ACC_SIZEOF___INT16 == 2)
2943 # define acc_int16e_t __int16
2944 # define acc_uint16e_t unsigned __int16
2945 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___INT16
2949 #if defined(acc_int16e_t)
2950 # define ACC_SIZEOF_ACC_INT16E_T 2
2951 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == 2)
2952 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T)
2954 #if !defined(acc_int32e_t)
2955 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) && (ACC_SIZEOF_INT != 4)
2956 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T
2958 #if (ACC_SIZEOF_LONG == 4) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT)
2959 # define acc_int32e_t long int
2960 # define acc_uint32e_t unsigned long int
2961 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG
2962 #elif (ACC_SIZEOF_INT == 4)
2963 # define acc_int32e_t int
2964 # define acc_uint32e_t unsigned int
2965 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_INT
2966 #elif (ACC_SIZEOF_SHORT == 4)
2967 # define acc_int32e_t short int
2968 # define acc_uint32e_t unsigned short int
2969 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_SHORT
2970 #elif (ACC_SIZEOF_LONG_LONG == 4)
2971 # define acc_int32e_t acc_llong_t
2972 # define acc_uint32e_t acc_ullong_t
2973 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG_LONG
2974 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
2975 # if !(ACC_LANG_ASSEMBLER)
2976 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
2977 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
2979 # define acc_int32e_t acc_int32e_si_t__
2980 # define acc_uint32e_t acc_uint32e_si_t__
2981 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
2982 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
2983 # if !(ACC_LANG_ASSEMBLER)
2984 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
2985 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
2987 # define acc_int32e_t acc_int32e_si_t__
2988 # define acc_uint32e_t acc_uint32e_si_t__
2989 # define ACC_INT32_C(c) (c##LL)
2990 # define ACC_UINT32_C(c) (c##ULL)
2991 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
2992 #elif (ACC_SIZEOF___INT32 == 4)
2993 # define acc_int32e_t __int32
2994 # define acc_uint32e_t unsigned __int32
2995 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___INT32
2999 #if defined(acc_int32e_t)
3000 # define ACC_SIZEOF_ACC_INT32E_T 4
3001 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == 4)
3002 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T)
3004 #if !defined(acc_int64e_t)
3005 #if (ACC_SIZEOF___INT64 == 8)
3006 # if (ACC_CC_BORLANDC) && !defined(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T)
3007 # define ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
3010 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && (ACC_SIZEOF_LONG_LONG != 8)
3011 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
3013 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) && (ACC_SIZEOF___INT64 != 8)
3014 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
3016 #if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3017 # define acc_int64e_t int
3018 # define acc_uint64e_t unsigned int
3019 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_INT
3020 #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)
3021 # define acc_int64e_t long int
3022 # define acc_uint64e_t unsigned long int
3023 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG
3024 #elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64)
3025 # define acc_int64e_t acc_llong_t
3026 # define acc_uint64e_t acc_ullong_t
3027 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG_LONG
3028 # if (ACC_CC_BORLANDC)
3029 # define ACC_INT64_C(c) ((c) + 0ll)
3030 # define ACC_UINT64_C(c) ((c) + 0ull)
3032 # define ACC_INT64_C(c) (__acc_gnuc_extension__ (c##LL))
3033 # define ACC_UINT64_C(c) (__acc_gnuc_extension__ (c##ULL))
3035 # define ACC_INT64_C(c) (c##LL)
3036 # define ACC_UINT64_C(c) (c##ULL)
3038 #elif (ACC_SIZEOF___INT64 == 8)
3039 # define acc_int64e_t __int64
3040 # define acc_uint64e_t unsigned __int64
3041 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
3042 # if (ACC_CC_BORLANDC)
3043 # define ACC_INT64_C(c) ((c) + 0i64)
3044 # define ACC_UINT64_C(c) ((c) + 0ui64)
3046 # define ACC_INT64_C(c) (c##i64)
3047 # define ACC_UINT64_C(c) (c##ui64)
3052 #if defined(acc_int64e_t)
3053 # define ACC_SIZEOF_ACC_INT64E_T 8
3054 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == 8)
3055 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T)
3057 #if !defined(acc_int32l_t)
3058 #if defined(acc_int32e_t)
3059 # define acc_int32l_t acc_int32e_t
3060 # define acc_uint32l_t acc_uint32e_t
3061 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T
3062 # define ACC_TYPEOF_ACC_INT32L_T ACC_TYPEOF_ACC_INT32E_T
3063 #elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3064 # define acc_int32l_t int
3065 # define acc_uint32l_t unsigned int
3066 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT
3067 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_INT
3068 #elif (ACC_SIZEOF_LONG >= 4)
3069 # define acc_int32l_t long int
3070 # define acc_uint32l_t unsigned long int
3071 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG
3072 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_LONG
3074 # error "acc_int32l_t"
3078 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) >= 4)
3079 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T)
3081 #if !defined(acc_int64l_t)
3082 #if defined(acc_int64e_t)
3083 # define acc_int64l_t acc_int64e_t
3084 # define acc_uint64l_t acc_uint64e_t
3085 # define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T
3086 # define ACC_TYPEOF_ACC_INT64L_T ACC_TYPEOF_ACC_INT64E_T
3090 #if defined(acc_int64l_t)
3091 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) >= 8)
3092 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T)
3094 #if !defined(acc_int32f_t)
3095 #if (ACC_SIZEOF_SIZE_T >= 8)
3096 # define acc_int32f_t acc_int64l_t
3097 # define acc_uint32f_t acc_uint64l_t
3098 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T
3099 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT64L_T
3101 # define acc_int32f_t acc_int32l_t
3102 # define acc_uint32f_t acc_uint32l_t
3103 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T
3104 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT32L_T
3108 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) >= 4)
3109 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T)
3111 #if !defined(acc_int64f_t)
3112 #if defined(acc_int64l_t)
3113 # define acc_int64f_t acc_int64l_t
3114 # define acc_uint64f_t acc_uint64l_t
3115 # define ACC_SIZEOF_ACC_INT64F_T ACC_SIZEOF_ACC_INT64L_T
3116 # define ACC_TYPEOF_ACC_INT64F_T ACC_TYPEOF_ACC_INT64L_T
3120 #if defined(acc_int64f_t)
3121 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) >= 8)
3122 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T)
3124 #if !defined(acc_intptr_t)
3125 #if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16))
3126 # define __ACC_INTPTR_T_IS_POINTER 1
3127 # if !(ACC_LANG_ASSEMBLER)
3128 typedef char * acc_intptr_t;
3129 typedef char * acc_uintptr_t;
3131 # define acc_intptr_t acc_intptr_t
3132 # define acc_uintptr_t acc_uintptr_t
3133 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P
3134 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_CHAR_P
3135 #elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4))
3136 # if !(ACC_LANG_ASSEMBLER)
3137 typedef __w64 int acc_intptr_t;
3138 typedef __w64 unsigned int acc_uintptr_t;
3140 # define acc_intptr_t acc_intptr_t
3141 # define acc_uintptr_t acc_uintptr_t
3142 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
3143 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
3144 #elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P)
3145 # define acc_intptr_t short
3146 # define acc_uintptr_t unsigned short
3147 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT
3148 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_SHORT
3149 #elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3150 # define acc_intptr_t int
3151 # define acc_uintptr_t unsigned int
3152 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
3153 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
3154 #elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P)
3155 # define acc_intptr_t long
3156 # define acc_uintptr_t unsigned long
3157 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG
3158 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_LONG
3159 #elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P)
3160 # define acc_intptr_t acc_int64l_t
3161 # define acc_uintptr_t acc_uint64l_t
3162 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T
3163 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_ACC_INT64L_T
3165 # error "acc_intptr_t"
3169 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) >= sizeof(void *))
3170 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t))
3172 #if !defined(acc_word_t)
3173 #if defined(ACC_WORDSIZE) && (ACC_WORDSIZE+0 > 0)
3174 #if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !(__ACC_INTPTR_T_IS_POINTER)
3175 # define acc_word_t acc_uintptr_t
3176 # define acc_sword_t acc_intptr_t
3177 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T
3178 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_ACC_INTPTR_T
3179 #elif (ACC_WORDSIZE == ACC_SIZEOF_LONG)
3180 # define acc_word_t unsigned long
3181 # define acc_sword_t long
3182 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG
3183 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_LONG
3184 #elif (ACC_WORDSIZE == ACC_SIZEOF_INT)
3185 # define acc_word_t unsigned int
3186 # define acc_sword_t int
3187 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT
3188 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_INT
3189 #elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT)
3190 # define acc_word_t unsigned short
3191 # define acc_sword_t short
3192 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT
3193 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_SHORT
3194 #elif (ACC_WORDSIZE == 1)
3195 # define acc_word_t unsigned char
3196 # define acc_sword_t signed char
3197 # define ACC_SIZEOF_ACC_WORD_T 1
3198 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_CHAR
3199 #elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T)
3200 # define acc_word_t acc_uint64l_t
3201 # define acc_sword_t acc_int64l_t
3202 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
3203 # define ACC_TYPEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
3204 #elif (ACC_ARCH_SPU) && (ACC_CC_GNUC)
3206 # if !(ACC_LANG_ASSEMBLER)
3207 typedef unsigned acc_word_t __attribute__((__mode__(__V16QI__)));
3208 typedef int acc_sword_t __attribute__((__mode__(__V16QI__)));
3210 # define acc_word_t acc_word_t
3211 # define acc_sword_t acc_sword_t
3212 # define ACC_SIZEOF_ACC_WORD_T 16
3213 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF___MODE_V16QI
3216 # error "acc_word_t"
3220 #if 1 && defined(acc_word_t)
3221 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_word_t) == ACC_WORDSIZE)
3222 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_sword_t) == ACC_WORDSIZE)
3225 #define acc_int8_t signed char
3226 #define acc_uint8_t unsigned char
3227 #define ACC_SIZEOF_ACC_INT8_T 1
3228 #define ACC_TYPEOF_ACC_INT8_T ACC_TYPEOF_CHAR
3229 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == 1)
3230 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == sizeof(acc_uint8_t))
3232 #if defined(acc_int16e_t)
3233 #define acc_int16_t acc_int16e_t
3234 #define acc_uint16_t acc_uint16e_t
3235 #define ACC_SIZEOF_ACC_INT16_T ACC_SIZEOF_ACC_INT16E_T
3236 #define ACC_TYPEOF_ACC_INT16_T ACC_TYPEOF_ACC_INT16E_T
3237 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == 2)
3238 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == sizeof(acc_uint16_t))
3240 #if defined(acc_int32e_t)
3241 #define acc_int32_t acc_int32e_t
3242 #define acc_uint32_t acc_uint32e_t
3243 #define ACC_SIZEOF_ACC_INT32_T ACC_SIZEOF_ACC_INT32E_T
3244 #define ACC_TYPEOF_ACC_INT32_T ACC_TYPEOF_ACC_INT32E_T
3245 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == 4)
3246 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == sizeof(acc_uint32_t))
3248 #if defined(acc_int64e_t)
3249 #define acc_int64_t acc_int64e_t
3250 #define acc_uint64_t acc_uint64e_t
3251 #define ACC_SIZEOF_ACC_INT64_T ACC_SIZEOF_ACC_INT64E_T
3252 #define ACC_TYPEOF_ACC_INT64_T ACC_TYPEOF_ACC_INT64E_T
3253 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == 8)
3254 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == sizeof(acc_uint64_t))
3257 #define acc_int_least32_t acc_int32l_t
3258 #define acc_uint_least32_t acc_uint32l_t
3259 #define ACC_SIZEOF_ACC_INT_LEAST32_T ACC_SIZEOF_ACC_INT32L_T
3260 #define ACC_TYPEOF_ACC_INT_LEAST32_T ACC_TYPEOF_ACC_INT32L_T
3261 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) >= 4)
3262 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) == sizeof(acc_uint_least32_t))
3264 #if defined(acc_int64l_t)
3265 #define acc_int_least64_t acc_int64l_t
3266 #define acc_uint_least64_t acc_uint64l_t
3267 #define ACC_SIZEOF_ACC_INT_LEAST64_T ACC_SIZEOF_ACC_INT64L_T
3268 #define ACC_TYPEOF_ACC_INT_LEAST64_T ACC_TYPEOF_ACC_INT64L_T
3269 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) >= 8)
3270 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) == sizeof(acc_uint_least64_t))
3273 #define acc_int_fast32_t acc_int32f_t
3274 #define acc_uint_fast32_t acc_uint32f_t
3275 #define ACC_SIZEOF_ACC_INT_FAST32_T ACC_SIZEOF_ACC_INT32F_T
3276 #define ACC_TYPEOF_ACC_INT_FAST32_T ACC_TYPEOF_ACC_INT32F_T
3277 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) >= 4)
3278 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) == sizeof(acc_uint_fast32_t))
3280 #if defined(acc_int64f_t)
3281 #define acc_int_fast64_t acc_int64f_t
3282 #define acc_uint_fast64_t acc_uint64f_t
3283 #define ACC_SIZEOF_ACC_INT_FAST64_T ACC_SIZEOF_ACC_INT64F_T
3284 #define ACC_TYPEOF_ACC_INT_FAST64_T ACC_TYPEOF_ACC_INT64F_T
3285 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) >= 8)
3286 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast64_t))
3288 #if !defined(ACC_INT16_C)
3289 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2)
3290 # define ACC_INT16_C(c) ((c) + 0)
3291 # define ACC_UINT16_C(c) ((c) + 0U)
3292 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2)
3293 # define ACC_INT16_C(c) ((c) + 0L)
3294 # define ACC_UINT16_C(c) ((c) + 0UL)
3295 # elif (ACC_SIZEOF_INT >= 2)
3296 # define ACC_INT16_C(c) (c)
3297 # define ACC_UINT16_C(c) (c##U)
3298 # elif (ACC_SIZEOF_LONG >= 2)
3299 # define ACC_INT16_C(c) (c##L)
3300 # define ACC_UINT16_C(c) (c##UL)
3302 # error "ACC_INT16_C"
3305 #if !defined(ACC_INT32_C)
3306 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4)
3307 # define ACC_INT32_C(c) ((c) + 0)
3308 # define ACC_UINT32_C(c) ((c) + 0U)
3309 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4)
3310 # define ACC_INT32_C(c) ((c) + 0L)
3311 # define ACC_UINT32_C(c) ((c) + 0UL)
3312 # elif (ACC_SIZEOF_INT >= 4)
3313 # define ACC_INT32_C(c) (c)
3314 # define ACC_UINT32_C(c) (c##U)
3315 # elif (ACC_SIZEOF_LONG >= 4)
3316 # define ACC_INT32_C(c) (c##L)
3317 # define ACC_UINT32_C(c) (c##UL)
3318 # elif (ACC_SIZEOF_LONG_LONG >= 4)
3319 # define ACC_INT32_C(c) (c##LL)
3320 # define ACC_UINT32_C(c) (c##ULL)
3322 # error "ACC_INT32_C"
3325 #if !defined(ACC_INT64_C) && defined(acc_int64l_t)
3326 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8)
3327 # define ACC_INT64_C(c) ((c) + 0)
3328 # define ACC_UINT64_C(c) ((c) + 0U)
3329 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8)
3330 # define ACC_INT64_C(c) ((c) + 0L)
3331 # define ACC_UINT64_C(c) ((c) + 0UL)
3332 # elif (ACC_SIZEOF_INT >= 8)
3333 # define ACC_INT64_C(c) (c)
3334 # define ACC_UINT64_C(c) (c##U)
3335 # elif (ACC_SIZEOF_LONG >= 8)
3336 # define ACC_INT64_C(c) (c##L)
3337 # define ACC_UINT64_C(c) (c##UL)
3339 # error "ACC_INT64_C"
3343 #if (ACC_CFG_NO_CONFIG_HEADER)
3344 #elif defined(ACC_CFG_CONFIG_HEADER)
3346 #if !(ACC_CFG_AUTO_NO_HEADERS)
3347 #if (ACC_LIBC_NAKED)
3348 #elif (ACC_LIBC_FREESTANDING)
3349 # define HAVE_LIMITS_H 1
3350 # define HAVE_STDARG_H 1
3351 # define HAVE_STDDEF_H 1
3352 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
3353 # define HAVE_LIMITS_H 1
3354 # define HAVE_SETJMP_H 1
3355 # define HAVE_STDARG_H 1
3356 # define HAVE_STDDEF_H 1
3357 # define HAVE_STDIO_H 1
3358 # define HAVE_STRING_H 1
3360 #define STDC_HEADERS 1
3361 #define HAVE_ASSERT_H 1
3362 #define HAVE_CTYPE_H 1
3363 #define HAVE_DIRENT_H 1
3364 #define HAVE_ERRNO_H 1
3365 #define HAVE_FCNTL_H 1
3366 #define HAVE_FLOAT_H 1
3367 #define HAVE_LIMITS_H 1
3368 #define HAVE_MALLOC_H 1
3369 #define HAVE_MEMORY_H 1
3370 #define HAVE_SETJMP_H 1
3371 #define HAVE_SIGNAL_H 1
3372 #define HAVE_STDARG_H 1
3373 #define HAVE_STDDEF_H 1
3374 #define HAVE_STDIO_H 1
3375 #define HAVE_STDLIB_H 1
3376 #define HAVE_STRING_H 1
3377 #define HAVE_TIME_H 1
3378 #define HAVE_UNISTD_H 1
3379 #define HAVE_UTIME_H 1
3380 #define HAVE_SYS_STAT_H 1
3381 #define HAVE_SYS_TIME_H 1
3382 #define HAVE_SYS_TYPES_H 1
3384 # if (ACC_OS_POSIX_AIX)
3385 # define HAVE_SYS_RESOURCE_H 1
3386 # elif (ACC_OS_POSIX_DARWIN || ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD)
3387 # define HAVE_STRINGS_H 1
3388 # undef HAVE_MALLOC_H
3389 # elif (ACC_OS_POSIX_HPUX || ACC_OS_POSIX_INTERIX)
3390 # define HAVE_ALLOCA_H 1
3391 # elif (ACC_OS_POSIX_DARWIN && ACC_LIBC_MSL)
3392 # undef HAVE_SYS_TIME_H
3393 # undef HAVE_SYS_TYPES_H
3394 # elif (ACC_OS_POSIX_SOLARIS || ACC_OS_POSIX_SUNOS)
3395 # define HAVE_ALLOCA_H 1
3397 # if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
3398 # define HAVE_STRINGS_H 1
3399 # define HAVE_SYS_MMAN_H 1
3400 # define HAVE_SYS_RESOURCE_H 1
3401 # define HAVE_SYS_WAIT_H 1
3403 # if (ACC_LIBC_NEWLIB)
3404 # undef HAVE_STRINGS_H
3406 #elif (ACC_OS_CYGWIN)
3407 # define HAVE_IO_H 1
3409 # define HAVE_ALLOCA_H 1
3410 # define HAVE_IO_H 1
3411 #elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
3412 # if !defined(__MINT__)
3413 # undef HAVE_MALLOC_H
3415 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
3416 # undef HAVE_DIRENT_H
3417 # undef HAVE_FCNTL_H
3418 # undef HAVE_MALLOC_H
3419 # undef HAVE_MEMORY_H
3420 # undef HAVE_UNISTD_H
3421 # undef HAVE_UTIME_H
3422 # undef HAVE_SYS_STAT_H
3423 # undef HAVE_SYS_TIME_H
3424 # undef HAVE_SYS_TYPES_H
3426 #if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
3427 #define HAVE_CONIO_H 1
3428 #define HAVE_DIRECT_H 1
3429 #define HAVE_DOS_H 1
3431 #define HAVE_SHARE_H 1
3433 # undef HAVE_CONIO_H
3434 # undef HAVE_DIRECT_H
3435 # undef HAVE_DIRENT_H
3436 # undef HAVE_MALLOC_H
3437 # undef HAVE_SHARE_H
3438 # undef HAVE_UNISTD_H
3439 # undef HAVE_UTIME_H
3440 # undef HAVE_SYS_STAT_H
3441 # undef HAVE_SYS_TIME_H
3442 # undef HAVE_SYS_TYPES_H
3443 #elif (ACC_CC_BORLANDC)
3444 # undef HAVE_UNISTD_H
3445 # undef HAVE_SYS_TIME_H
3446 # if (ACC_OS_WIN32 || ACC_OS_WIN64)
3447 # undef HAVE_DIRENT_H
3449 # if (__BORLANDC__ < 0x0400)
3450 # undef HAVE_DIRENT_H
3451 # undef HAVE_UTIME_H
3454 # undef HAVE_DIRENT_H
3455 # undef HAVE_UNISTD_H
3456 # define HAVE_SYS_DIRENT_H 1
3457 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3458 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
3459 # define HAVE_ALLOCA_H 1
3460 # undef HAVE_DIRENT_H
3461 # undef HAVE_UNISTD_H
3462 #elif (ACC_CC_IBMC && ACC_OS_OS2)
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_CLANG_C2 || ACC_CC_CLANG_MSC || ACC_CC_GHS || ACC_CC_INTELC_MSC || ACC_CC_MSC)
3470 # undef HAVE_DIRENT_H
3471 # undef HAVE_UNISTD_H
3472 # undef HAVE_UTIME_H
3473 # undef HAVE_SYS_TIME_H
3474 # define HAVE_SYS_UTIME_H 1
3475 #elif (ACC_CC_LCCWIN32)
3476 # undef HAVE_DIRENT_H
3478 # undef HAVE_UNISTD_H
3479 # undef HAVE_SYS_TIME_H
3480 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
3481 # undef HAVE_UTIME_H
3482 # define HAVE_SYS_UTIME_H 1
3483 #elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
3484 # define HAVE_ALLOCA_H 1
3486 # undef HAVE_SHARE_H
3487 # undef HAVE_SYS_TIME_H
3489 # undef HAVE_DIRENT_H
3491 # undef HAVE_UNISTD_H
3492 # undef HAVE_UTIME_H
3493 # undef HAVE_SYS_TIME_H
3494 #elif (ACC_CC_PACIFICC)
3495 # undef HAVE_DIRECT_H
3496 # undef HAVE_DIRENT_H
3497 # undef HAVE_FCNTL_H
3499 # undef HAVE_MALLOC_H
3500 # undef HAVE_MEMORY_H
3501 # undef HAVE_SHARE_H
3502 # undef HAVE_UNISTD_H
3503 # undef HAVE_UTIME_H
3504 # undef HAVE_SYS_STAT_H
3505 # undef HAVE_SYS_TIME_H
3506 # undef HAVE_SYS_TYPES_H
3507 #elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
3508 # undef HAVE_DIRENT_H
3510 # undef HAVE_MALLOC_H
3511 # undef HAVE_SHARE_H
3512 # undef HAVE_UNISTD_H
3513 # undef HAVE_UTIME_H
3514 # undef HAVE_SYS_TIME_H
3515 # if (__POCC__ < 280)
3517 # define HAVE_SYS_UTIME_H 1
3519 #elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
3520 # undef HAVE_UTIME_H
3521 # define HAVE_SYS_UTIME_H 1
3522 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
3523 #elif (ACC_CC_SYMANTECC)
3524 # undef HAVE_DIRENT_H
3525 # undef HAVE_UNISTD_H
3526 # if (__SC__ < 0x700)
3527 # undef HAVE_UTIME_H
3528 # undef HAVE_SYS_TIME_H
3530 #elif (ACC_CC_TOPSPEEDC)
3531 # undef HAVE_DIRENT_H
3532 # undef HAVE_UNISTD_H
3533 # undef HAVE_UTIME_H
3534 # undef HAVE_SYS_STAT_H
3535 # undef HAVE_SYS_TIME_H
3536 # undef HAVE_SYS_TYPES_H
3537 #elif (ACC_CC_TURBOC)
3538 # undef HAVE_UNISTD_H
3539 # undef HAVE_SYS_TIME_H
3540 # undef HAVE_SYS_TYPES_H
3541 # if (ACC_OS_WIN32 || ACC_OS_WIN64)
3542 # undef HAVE_DIRENT_H
3544 # if (__TURBOC__ < 0x0200)
3545 # undef HAVE_SIGNAL_H
3547 # if (__TURBOC__ < 0x0400)
3548 # undef HAVE_DIRECT_H
3549 # undef HAVE_DIRENT_H
3550 # undef HAVE_MALLOC_H
3551 # undef HAVE_MEMORY_H
3552 # undef HAVE_UTIME_H
3554 #elif (ACC_CC_WATCOMC)
3555 # undef HAVE_DIRENT_H
3556 # undef HAVE_UTIME_H
3557 # undef HAVE_SYS_TIME_H
3558 # define HAVE_SYS_UTIME_H 1
3559 # if (__WATCOMC__ < 950)
3560 # undef HAVE_UNISTD_H
3562 #elif (ACC_CC_ZORTECHC)
3563 # undef HAVE_DIRENT_H
3564 # undef HAVE_MEMORY_H
3565 # undef HAVE_UNISTD_H
3566 # undef HAVE_UTIME_H
3567 # undef HAVE_SYS_TIME_H
3570 #if (ACC_OS_CONSOLE)
3571 # undef HAVE_DIRENT_H
3573 #if (ACC_OS_EMBEDDED)
3574 # undef HAVE_DIRENT_H
3576 #if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
3577 # undef HAVE_DIRENT_H
3578 # undef HAVE_FCNTL_H
3579 # undef HAVE_MALLOC_H
3580 # undef HAVE_UNISTD_H
3581 # undef HAVE_UTIME_H
3582 # undef HAVE_SYS_STAT_H
3583 # undef HAVE_SYS_TIME_H
3584 # undef HAVE_SYS_TYPES_H
3586 #if (ACC_LIBC_GLIBC >= 0x020100ul)
3587 # define HAVE_STDINT_H 1
3588 #elif (ACC_LIBC_DIETLIBC)
3589 # undef HAVE_STDINT_H
3590 #elif (ACC_LIBC_UCLIBC)
3591 # define HAVE_STDINT_H 1
3592 #elif (ACC_CC_BORLANDC) && (__BORLANDC__ >= 0x560)
3593 # undef HAVE_STDINT_H
3594 #elif (ACC_CC_DMC) && (__DMC__ >= 0x825)
3595 # define HAVE_STDINT_H 1
3597 #if (HAVE_SYS_TIME_H && HAVE_TIME_H)
3598 # define TIME_WITH_SYS_TIME 1
3602 #if !(ACC_CFG_AUTO_NO_FUNCTIONS)
3603 #if (ACC_LIBC_NAKED)
3604 #elif (ACC_LIBC_FREESTANDING)
3605 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
3606 # define HAVE_LONGJMP 1
3607 # define HAVE_MEMCMP 1
3608 # define HAVE_MEMCPY 1
3609 # define HAVE_MEMMOVE 1
3610 # define HAVE_MEMSET 1
3611 # define HAVE_SETJMP 1
3613 #define HAVE_ACCESS 1
3614 #define HAVE_ALLOCA 1
3615 #define HAVE_ATEXIT 1
3618 #define HAVE_CHMOD 1
3619 #define HAVE_CHOWN 1
3620 #define HAVE_CTIME 1
3621 #define HAVE_DIFFTIME 1
3622 #define HAVE_FILENO 1
3623 #define HAVE_FSTAT 1
3624 #define HAVE_GETENV 1
3625 #define HAVE_GETTIMEOFDAY 1
3626 #define HAVE_GMTIME 1
3627 #define HAVE_ISATTY 1
3628 #define HAVE_LOCALTIME 1
3629 #define HAVE_LONGJMP 1
3630 #define HAVE_LSTAT 1
3631 #define HAVE_MEMCMP 1
3632 #define HAVE_MEMCPY 1
3633 #define HAVE_MEMMOVE 1
3634 #define HAVE_MEMSET 1
3635 #define HAVE_MKDIR 1
3636 #define HAVE_MKTIME 1
3637 #define HAVE_QSORT 1
3638 #define HAVE_RAISE 1
3639 #define HAVE_RMDIR 1
3640 #define HAVE_SETJMP 1
3641 #define HAVE_SIGNAL 1
3642 #define HAVE_SNPRINTF 1
3644 #define HAVE_STRCHR 1
3645 #define HAVE_STRDUP 1
3646 #define HAVE_STRERROR 1
3647 #define HAVE_STRFTIME 1
3648 #define HAVE_STRRCHR 1
3649 #define HAVE_STRSTR 1
3651 #define HAVE_UMASK 1
3652 #define HAVE_UTIME 1
3653 #define HAVE_VSNPRINTF 1
3654 #if (ACC_OS_BEOS || ACC_OS_CYGWIN || ACC_OS_POSIX || ACC_OS_QNX || ACC_OS_VMS)
3655 # define HAVE_STRCASECMP 1
3656 # define HAVE_STRNCASECMP 1
3657 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
3658 # define HAVE_STRCASECMP 1
3659 # define HAVE_STRNCASECMP 1
3661 # define HAVE_STRICMP 1
3662 # define HAVE_STRNICMP 1
3665 # if (ACC_OS_POSIX_AIX)
3666 # define HAVE_GETRUSAGE 1
3667 # elif (ACC_OS_POSIX_DARWIN && ACC_LIBC_MSL)
3670 # elif (ACC_OS_POSIX_UNICOS)
3672 # undef HAVE_SNPRINTF
3673 # undef HAVE_VSNPRINTF
3678 # if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
3679 # define HAVE_GETRUSAGE 1
3680 # define HAVE_GETPAGESIZE 1
3681 # define HAVE_MMAP 1
3682 # define HAVE_MPROTECT 1
3683 # define HAVE_MUNMAP 1
3685 #elif (ACC_OS_CYGWIN)
3686 # if (ACC_CC_GNUC < 0x025a00ul)
3687 # undef HAVE_GETTIMEOFDAY
3690 # if (ACC_CC_GNUC < 0x025f00ul)
3691 # undef HAVE_SNPRINTF
3692 # undef HAVE_VSNPRINTF
3697 #elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
3698 # if !defined(__MINT__)
3699 # undef HAVE_SNPRINTF
3700 # undef HAVE_VSNPRINTF
3702 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
3708 # undef HAVE_GETTIMEOFDAY
3710 # undef HAVE_SNPRINTF
3713 # undef HAVE_VSNPRINTF
3715 #if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
3717 #undef HAVE_GETTIMEOFDAY
3722 # undef HAVE_DIFFTIME
3725 # undef HAVE_SNPRINTF
3727 # undef HAVE_VSNPRINTF
3728 #elif (ACC_CC_BORLANDC)
3729 # if (__BORLANDC__ < 0x0400)
3733 # if ((__BORLANDC__ < 0x0410) && ACC_OS_WIN16)
3736 # if (__BORLANDC__ < 0x0550)
3737 # undef HAVE_SNPRINTF
3738 # undef HAVE_VSNPRINTF
3744 # define snprintf _snprintf
3745 # define vsnprintf _vsnprintf
3746 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3747 # undef HAVE_SNPRINTF
3748 # undef HAVE_VSNPRINTF
3749 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
3750 # undef HAVE_SNPRINTF
3751 # undef HAVE_VSNPRINTF
3755 # define snprintf _snprintf
3758 # define vsnprintf _vsnprintf
3761 # undef HAVE_SNPRINTF
3762 # undef HAVE_VSNPRINTF
3763 #elif (ACC_CC_CLANG_MSC || ACC_CC_INTELC_MSC)
3765 # define snprintf _snprintf
3768 # define vsnprintf _vsnprintf
3770 #elif (ACC_CC_LCCWIN32)
3771 # define utime _utime
3772 #elif (ACC_CC_CLANG_C2 || ACC_CC_MSC)
3773 # if (_MSC_VER < 600)
3774 # undef HAVE_STRFTIME
3776 # if (_MSC_VER < 700)
3777 # undef HAVE_SNPRINTF
3778 # undef HAVE_VSNPRINTF
3779 # elif (_MSC_VER < 1500)
3781 # define snprintf _snprintf
3784 # define vsnprintf _vsnprintf
3786 # elif (_MSC_VER < 1900)
3788 # define snprintf _snprintf
3791 # if ((_MSC_VER < 800) && ACC_OS_WIN16)
3794 # if (ACC_ARCH_I086) && defined(__cplusplus)
3795 # undef HAVE_LONGJMP
3798 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
3799 # if (ACC_CC_GNUC < 0x025f00ul)
3800 # undef HAVE_SNPRINTF
3801 # undef HAVE_VSNPRINTF
3803 # define snprintf _snprintf
3804 # define vsnprintf _vsnprintf
3806 #elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
3807 # if (__MSL__ < 0x8000ul)
3812 # undef HAVE_SNPRINTF
3813 # undef HAVE_STRNICMP
3815 # undef HAVE_VSNPRINTF
3816 # if defined(__cplusplus)
3819 #elif (ACC_CC_PACIFICC)
3823 # undef HAVE_DIFFTIME
3827 # undef HAVE_SNPRINTF
3828 # undef HAVE_STRFTIME
3830 # undef HAVE_VSNPRINTF
3831 #elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
3832 # if (__POCC__ < 280)
3833 # define alloca _alloca
3836 #elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
3837 # define snprintf _snprintf
3838 # define vsnprintf _vsnprintf
3839 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
3840 # undef HAVE_SNPRINTF
3841 # undef HAVE_VSNPRINTF
3842 #elif (ACC_CC_SYMANTECC)
3843 # if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
3846 # if (__SC__ < 0x600)
3847 # undef HAVE_SNPRINTF
3848 # undef HAVE_VSNPRINTF
3850 # define snprintf _snprintf
3851 # define vsnprintf _vsnprintf
3853 # if (__SC__ < 0x700)
3854 # undef HAVE_DIFFTIME
3857 #elif (ACC_CC_TOPSPEEDC)
3858 # undef HAVE_SNPRINTF
3859 # undef HAVE_VSNPRINTF
3860 #elif (ACC_CC_TURBOC)
3862 # undef HAVE_SNPRINTF
3863 # undef HAVE_VSNPRINTF
3864 # if (__TURBOC__ < 0x0200)
3868 # if (__TURBOC__ < 0x0295)
3870 # undef HAVE_STRFTIME
3872 # if (__TURBOC__ < 0x0400)
3875 #elif (ACC_CC_WATCOMC)
3876 # if (__WATCOMC__ < 1100)
3877 # undef HAVE_SNPRINTF
3878 # undef HAVE_VSNPRINTF
3879 # elif (__WATCOMC__ < 1200)
3880 # define snprintf _snprintf
3881 # define vsnprintf _vsnprintf
3883 #elif (ACC_CC_ZORTECHC)
3884 # if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
3887 # undef HAVE_DIFFTIME
3888 # undef HAVE_SNPRINTF
3890 # undef HAVE_VSNPRINTF
3893 #if (ACC_OS_CONSOLE)
3897 # undef HAVE_GETTIMEOFDAY
3903 #if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
3909 # undef HAVE_GETTIMEOFDAY
3920 # undef HAVE_STRICMP
3921 # undef HAVE_STRNICMP
3926 #if !(ACC_CFG_AUTO_NO_SIZES)
3927 #if !defined(SIZEOF_SHORT) && defined(ACC_SIZEOF_SHORT)
3928 # define SIZEOF_SHORT ACC_SIZEOF_SHORT
3930 #if !defined(SIZEOF_INT) && defined(ACC_SIZEOF_INT)
3931 # define SIZEOF_INT ACC_SIZEOF_INT
3933 #if !defined(SIZEOF_LONG) && defined(ACC_SIZEOF_LONG)
3934 # define SIZEOF_LONG ACC_SIZEOF_LONG
3936 #if !defined(SIZEOF_LONG_LONG) && defined(ACC_SIZEOF_LONG_LONG)
3937 # define SIZEOF_LONG_LONG ACC_SIZEOF_LONG_LONG
3939 #if !defined(SIZEOF___INT32) && defined(ACC_SIZEOF___INT32)
3940 # define SIZEOF___INT32 ACC_SIZEOF___INT32
3942 #if !defined(SIZEOF___INT64) && defined(ACC_SIZEOF___INT64)
3943 # define SIZEOF___INT64 ACC_SIZEOF___INT64
3945 #if !defined(SIZEOF_VOID_P) && defined(ACC_SIZEOF_VOID_P)
3946 # define SIZEOF_VOID_P ACC_SIZEOF_VOID_P
3948 #if !defined(SIZEOF_SIZE_T) && defined(ACC_SIZEOF_SIZE_T)
3949 # define SIZEOF_SIZE_T ACC_SIZEOF_SIZE_T
3951 #if !defined(SIZEOF_PTRDIFF_T) && defined(ACC_SIZEOF_PTRDIFF_T)
3952 # define SIZEOF_PTRDIFF_T ACC_SIZEOF_PTRDIFF_T
3955 #if (HAVE_SIGNAL) && !defined(RETSIGTYPE)
3956 # define RETSIGTYPE void
3959 #if !(ACC_LANG_ASSEMBLER)
3960 #if !(ACC_CFG_SKIP_ACC_TYPES)
3961 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
3962 # define acc_signo_t acc_int32e_t
3964 #if !defined(acc_signo_t)
3965 # define acc_signo_t int
3967 #if defined(__cplusplus)
3970 #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
3971 typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t);
3973 typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
3975 #if defined(__cplusplus)
3978 # if !(ACC_CFG_SKIP_ACC_UA)
3979 #if !defined(__acc_ua_volatile)
3980 # define __acc_ua_volatile volatile
3982 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
3983 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
3984 #elif (ACC_CC_INTELC) && defined(_WIN32)
3985 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
3987 #elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
3988 #if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
3989 typedef struct { __acc_ua_volatile acc_uint16e_t v __attribute__((__packed__)); } __acc_ua16_t;
3990 # define __acc_ua16_t __acc_ua16_t
3992 #if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
3993 typedef struct { __acc_ua_volatile acc_uint32e_t v __attribute__((__packed__)); } __acc_ua32_t;
3994 # define __acc_ua32_t __acc_ua32_t
3996 #if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
3997 typedef struct { __acc_ua_volatile acc_uint64l_t v __attribute__((__packed__)); } __acc_ua64_t;
3998 # define __acc_ua64_t __acc_ua64_t
4001 #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
4003 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p))
4004 #define ACC_UA_SET16(p,v) ((* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint16e_t) (v))
4006 #define ACC_UA_GET16(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint16e_t*, __acc_ua_volatile const void*, p))
4007 #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))
4009 #if (ACC_ABI_BIG_ENDIAN)
4010 # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p)
4011 # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v)
4012 #elif (ACC_ABI_LITTLE_ENDIAN)
4013 # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p)
4014 # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v)
4016 #if (__acc_HAVE_forceinline)
4017 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4018 #if !defined(ACC_UA_GET_LE16)
4019 __acc_static_forceinline
4020 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4021 __attribute__((__unused__))
4023 unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
4024 __acc_ua_volatile const acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint16e_t*, pp);
4026 __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4029 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
4031 #if !defined(ACC_UA_SET_LE16)
4032 __acc_static_forceinline
4033 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4034 __attribute__((__unused__))
4036 void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
4037 __acc_ua_volatile acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint16e_t*, pp);
4038 __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4040 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v)
4044 #if !defined(ACC_UA_COPY16)
4045 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
4048 #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
4050 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p))
4051 #define ACC_UA_SET32(p,v) ((* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint32e_t) (v))
4053 #define ACC_UA_GET32(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint32e_t*, __acc_ua_volatile const void*, p))
4054 #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))
4056 #if (ACC_ABI_BIG_ENDIAN)
4057 # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p)
4058 # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v)
4059 #elif (ACC_ABI_LITTLE_ENDIAN)
4060 # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p)
4061 # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v)
4063 #if (__acc_HAVE_forceinline)
4064 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4065 #if !defined(ACC_UA_GET_LE32)
4066 __acc_static_forceinline
4067 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4068 __attribute__((__unused__))
4070 unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
4071 __acc_ua_volatile const acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint32e_t*, pp);
4073 __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4076 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
4078 #if !defined(ACC_UA_SET_LE32)
4079 __acc_static_forceinline
4080 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4081 __attribute__((__unused__))
4083 void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
4084 __acc_ua_volatile acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint32e_t*, pp);
4085 __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4087 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v)
4091 #if !defined(ACC_UA_COPY32)
4092 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
4095 #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
4097 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p))
4098 #define ACC_UA_SET64(p,v) ((* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p)) = (acc_uint64l_t) (v))
4100 #define ACC_UA_GET64(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint64l_t*, __acc_ua_volatile const void*, p))
4101 #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))
4103 #if (ACC_ABI_BIG_ENDIAN)
4104 # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p)
4105 # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v)
4106 #elif (ACC_ABI_LITTLE_ENDIAN)
4107 # define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
4108 # define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
4110 #if !defined(ACC_UA_COPY64)
4111 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
4118 #if defined(ACC_WANT_ACC_TYPE_H)
4119 # undef ACC_WANT_ACC_TYPE_H
4120 # if (ACC_CFG_SKIP_ACC_TYPES)
4121 # error "ACC_WANT_ACC_TYPE_H with ACC_CFG_SKIP_ACC_TYPES"
4123 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0))
4124 # error "missing defines for sizes"
4126 #if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0))
4127 # error "missing defines for sizes"
4129 #define ACC_TYPEOF_CHAR 1u
4130 #define ACC_TYPEOF_SHORT 2u
4131 #define ACC_TYPEOF_INT 3u
4132 #define ACC_TYPEOF_LONG 4u
4133 #define ACC_TYPEOF_LONG_LONG 5u
4134 #define ACC_TYPEOF___INT8 17u
4135 #define ACC_TYPEOF___INT16 18u
4136 #define ACC_TYPEOF___INT32 19u
4137 #define ACC_TYPEOF___INT64 20u
4138 #define ACC_TYPEOF___INT128 21u
4139 #define ACC_TYPEOF___INT256 22u
4140 #define ACC_TYPEOF___MODE_QI 33u
4141 #define ACC_TYPEOF___MODE_HI 34u
4142 #define ACC_TYPEOF___MODE_SI 35u
4143 #define ACC_TYPEOF___MODE_DI 36u
4144 #define ACC_TYPEOF___MODE_TI 37u
4145 #define ACC_TYPEOF_CHAR_P 129u
4146 #if !defined(acc_llong_t)
4147 #if (ACC_SIZEOF_LONG_LONG+0 > 0)
4148 # if !(ACC_LANG_ASSEMBLER)
4149 __acc_gnuc_extension__ typedef long long acc_llong_t__;
4150 __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t__;
4152 # define acc_llong_t acc_llong_t__
4153 # define acc_ullong_t acc_ullong_t__
4156 #if !defined(acc_int16e_t)
4157 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT) && (ACC_SIZEOF_SHORT != 2)
4158 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T
4160 #if (ACC_SIZEOF_LONG == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
4161 # define acc_int16e_t long
4162 # define acc_uint16e_t unsigned long
4163 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_LONG
4164 #elif (ACC_SIZEOF_INT == 2) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT16E_T == ACC_TYPEOF_SHORT)
4165 # define acc_int16e_t int
4166 # define acc_uint16e_t unsigned int
4167 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_INT
4168 #elif (ACC_SIZEOF_SHORT == 2)
4169 # define acc_int16e_t short int
4170 # define acc_uint16e_t unsigned short int
4171 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF_SHORT
4172 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM)
4173 # if !(ACC_LANG_ASSEMBLER)
4174 typedef int acc_int16e_hi_t__ __attribute__((__mode__(__HI__)));
4175 typedef unsigned int acc_uint16e_hi_t__ __attribute__((__mode__(__HI__)));
4177 # define acc_int16e_t acc_int16e_hi_t__
4178 # define acc_uint16e_t acc_uint16e_hi_t__
4179 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___MODE_HI
4180 #elif (ACC_SIZEOF___INT16 == 2)
4181 # define acc_int16e_t __int16
4182 # define acc_uint16e_t unsigned __int16
4183 # define ACC_TYPEOF_ACC_INT16E_T ACC_TYPEOF___INT16
4187 #if defined(acc_int16e_t)
4188 # define ACC_SIZEOF_ACC_INT16E_T 2
4189 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == 2)
4190 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T)
4192 #if !defined(acc_int32e_t)
4193 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT) && (ACC_SIZEOF_INT != 4)
4194 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T
4196 #if (ACC_SIZEOF_LONG == 4) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT32E_T == ACC_TYPEOF_INT)
4197 # define acc_int32e_t long int
4198 # define acc_uint32e_t unsigned long int
4199 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG
4200 #elif (ACC_SIZEOF_INT == 4)
4201 # define acc_int32e_t int
4202 # define acc_uint32e_t unsigned int
4203 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_INT
4204 #elif (ACC_SIZEOF_SHORT == 4)
4205 # define acc_int32e_t short int
4206 # define acc_uint32e_t unsigned short int
4207 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_SHORT
4208 #elif (ACC_SIZEOF_LONG_LONG == 4)
4209 # define acc_int32e_t acc_llong_t
4210 # define acc_uint32e_t acc_ullong_t
4211 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF_LONG_LONG
4212 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x025f00ul) || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
4213 # if !(ACC_LANG_ASSEMBLER)
4214 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
4215 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
4217 # define acc_int32e_t acc_int32e_si_t__
4218 # define acc_uint32e_t acc_uint32e_si_t__
4219 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
4220 #elif 1 && !(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
4221 # if !(ACC_LANG_ASSEMBLER)
4222 typedef int acc_int32e_si_t__ __attribute__((__mode__(__SI__)));
4223 typedef unsigned int acc_uint32e_si_t__ __attribute__((__mode__(__SI__)));
4225 # define acc_int32e_t acc_int32e_si_t__
4226 # define acc_uint32e_t acc_uint32e_si_t__
4227 # define ACC_INT32_C(c) (c##LL)
4228 # define ACC_UINT32_C(c) (c##ULL)
4229 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___MODE_SI
4230 #elif (ACC_SIZEOF___INT32 == 4)
4231 # define acc_int32e_t __int32
4232 # define acc_uint32e_t unsigned __int32
4233 # define ACC_TYPEOF_ACC_INT32E_T ACC_TYPEOF___INT32
4237 #if defined(acc_int32e_t)
4238 # define ACC_SIZEOF_ACC_INT32E_T 4
4239 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == 4)
4240 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T)
4242 #if !defined(acc_int64e_t)
4243 #if (ACC_SIZEOF___INT64 == 8)
4244 # if (ACC_CC_BORLANDC) && !defined(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T)
4245 # define ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
4248 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF_LONG_LONG) && (ACC_SIZEOF_LONG_LONG != 8)
4249 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
4251 #if (ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64) && (ACC_SIZEOF___INT64 != 8)
4252 # undef ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T
4254 #if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
4255 # define acc_int64e_t int
4256 # define acc_uint64e_t unsigned int
4257 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_INT
4258 #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)
4259 # define acc_int64e_t long int
4260 # define acc_uint64e_t unsigned long int
4261 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG
4262 #elif (ACC_SIZEOF_LONG_LONG == 8) && !(ACC_CFG_PREFER_TYPEOF_ACC_INT64E_T == ACC_TYPEOF___INT64)
4263 # define acc_int64e_t acc_llong_t
4264 # define acc_uint64e_t acc_ullong_t
4265 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF_LONG_LONG
4266 # if (ACC_CC_BORLANDC)
4267 # define ACC_INT64_C(c) ((c) + 0ll)
4268 # define ACC_UINT64_C(c) ((c) + 0ull)
4270 # define ACC_INT64_C(c) (__acc_gnuc_extension__ (c##LL))
4271 # define ACC_UINT64_C(c) (__acc_gnuc_extension__ (c##ULL))
4273 # define ACC_INT64_C(c) (c##LL)
4274 # define ACC_UINT64_C(c) (c##ULL)
4276 #elif (ACC_SIZEOF___INT64 == 8)
4277 # define acc_int64e_t __int64
4278 # define acc_uint64e_t unsigned __int64
4279 # define ACC_TYPEOF_ACC_INT64E_T ACC_TYPEOF___INT64
4280 # if (ACC_CC_BORLANDC)
4281 # define ACC_INT64_C(c) ((c) + 0i64)
4282 # define ACC_UINT64_C(c) ((c) + 0ui64)
4284 # define ACC_INT64_C(c) (c##i64)
4285 # define ACC_UINT64_C(c) (c##ui64)
4290 #if defined(acc_int64e_t)
4291 # define ACC_SIZEOF_ACC_INT64E_T 8
4292 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == 8)
4293 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T)
4295 #if !defined(acc_int32l_t)
4296 #if defined(acc_int32e_t)
4297 # define acc_int32l_t acc_int32e_t
4298 # define acc_uint32l_t acc_uint32e_t
4299 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T
4300 # define ACC_TYPEOF_ACC_INT32L_T ACC_TYPEOF_ACC_INT32E_T
4301 #elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
4302 # define acc_int32l_t int
4303 # define acc_uint32l_t unsigned int
4304 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT
4305 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_INT
4306 #elif (ACC_SIZEOF_LONG >= 4)
4307 # define acc_int32l_t long int
4308 # define acc_uint32l_t unsigned long int
4309 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG
4310 # define ACC_TYPEOF_ACC_INT32L_T ACC_SIZEOF_LONG
4312 # error "acc_int32l_t"
4316 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) >= 4)
4317 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T)
4319 #if !defined(acc_int64l_t)
4320 #if defined(acc_int64e_t)
4321 # define acc_int64l_t acc_int64e_t
4322 # define acc_uint64l_t acc_uint64e_t
4323 # define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T
4324 # define ACC_TYPEOF_ACC_INT64L_T ACC_TYPEOF_ACC_INT64E_T
4328 #if defined(acc_int64l_t)
4329 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) >= 8)
4330 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T)
4332 #if !defined(acc_int32f_t)
4333 #if (ACC_SIZEOF_SIZE_T >= 8)
4334 # define acc_int32f_t acc_int64l_t
4335 # define acc_uint32f_t acc_uint64l_t
4336 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T
4337 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT64L_T
4339 # define acc_int32f_t acc_int32l_t
4340 # define acc_uint32f_t acc_uint32l_t
4341 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T
4342 # define ACC_TYPEOF_ACC_INT32F_T ACC_TYPEOF_ACC_INT32L_T
4346 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) >= 4)
4347 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T)
4349 #if !defined(acc_int64f_t)
4350 #if defined(acc_int64l_t)
4351 # define acc_int64f_t acc_int64l_t
4352 # define acc_uint64f_t acc_uint64l_t
4353 # define ACC_SIZEOF_ACC_INT64F_T ACC_SIZEOF_ACC_INT64L_T
4354 # define ACC_TYPEOF_ACC_INT64F_T ACC_TYPEOF_ACC_INT64L_T
4358 #if defined(acc_int64f_t)
4359 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) >= 8)
4360 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T)
4362 #if !defined(acc_intptr_t)
4363 #if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16))
4364 # define __ACC_INTPTR_T_IS_POINTER 1
4365 # if !(ACC_LANG_ASSEMBLER)
4366 typedef char * acc_intptr_t;
4367 typedef char * acc_uintptr_t;
4369 # define acc_intptr_t acc_intptr_t
4370 # define acc_uintptr_t acc_uintptr_t
4371 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P
4372 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_CHAR_P
4373 #elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4))
4374 # if !(ACC_LANG_ASSEMBLER)
4375 typedef __w64 int acc_intptr_t;
4376 typedef __w64 unsigned int acc_uintptr_t;
4378 # define acc_intptr_t acc_intptr_t
4379 # define acc_uintptr_t acc_uintptr_t
4380 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
4381 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
4382 #elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P)
4383 # define acc_intptr_t short
4384 # define acc_uintptr_t unsigned short
4385 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT
4386 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_SHORT
4387 #elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
4388 # define acc_intptr_t int
4389 # define acc_uintptr_t unsigned int
4390 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
4391 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_INT
4392 #elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P)
4393 # define acc_intptr_t long
4394 # define acc_uintptr_t unsigned long
4395 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG
4396 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_LONG
4397 #elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P)
4398 # define acc_intptr_t acc_int64l_t
4399 # define acc_uintptr_t acc_uint64l_t
4400 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T
4401 # define ACC_TYPEOF_ACC_INTPTR_T ACC_TYPEOF_ACC_INT64L_T
4403 # error "acc_intptr_t"
4407 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) >= sizeof(void *))
4408 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t))
4410 #if !defined(acc_word_t)
4411 #if defined(ACC_WORDSIZE) && (ACC_WORDSIZE+0 > 0)
4412 #if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !(__ACC_INTPTR_T_IS_POINTER)
4413 # define acc_word_t acc_uintptr_t
4414 # define acc_sword_t acc_intptr_t
4415 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T
4416 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_ACC_INTPTR_T
4417 #elif (ACC_WORDSIZE == ACC_SIZEOF_LONG)
4418 # define acc_word_t unsigned long
4419 # define acc_sword_t long
4420 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG
4421 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_LONG
4422 #elif (ACC_WORDSIZE == ACC_SIZEOF_INT)
4423 # define acc_word_t unsigned int
4424 # define acc_sword_t int
4425 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT
4426 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_INT
4427 #elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT)
4428 # define acc_word_t unsigned short
4429 # define acc_sword_t short
4430 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT
4431 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_SHORT
4432 #elif (ACC_WORDSIZE == 1)
4433 # define acc_word_t unsigned char
4434 # define acc_sword_t signed char
4435 # define ACC_SIZEOF_ACC_WORD_T 1
4436 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF_CHAR
4437 #elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T)
4438 # define acc_word_t acc_uint64l_t
4439 # define acc_sword_t acc_int64l_t
4440 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
4441 # define ACC_TYPEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
4442 #elif (ACC_ARCH_SPU) && (ACC_CC_GNUC)
4444 # if !(ACC_LANG_ASSEMBLER)
4445 typedef unsigned acc_word_t __attribute__((__mode__(__V16QI__)));
4446 typedef int acc_sword_t __attribute__((__mode__(__V16QI__)));
4448 # define acc_word_t acc_word_t
4449 # define acc_sword_t acc_sword_t
4450 # define ACC_SIZEOF_ACC_WORD_T 16
4451 # define ACC_TYPEOF_ACC_WORD_T ACC_TYPEOF___MODE_V16QI
4454 # error "acc_word_t"
4458 #if 1 && defined(acc_word_t)
4459 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_word_t) == ACC_WORDSIZE)
4460 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_sword_t) == ACC_WORDSIZE)
4463 #define acc_int8_t signed char
4464 #define acc_uint8_t unsigned char
4465 #define ACC_SIZEOF_ACC_INT8_T 1
4466 #define ACC_TYPEOF_ACC_INT8_T ACC_TYPEOF_CHAR
4467 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == 1)
4468 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int8_t) == sizeof(acc_uint8_t))
4470 #if defined(acc_int16e_t)
4471 #define acc_int16_t acc_int16e_t
4472 #define acc_uint16_t acc_uint16e_t
4473 #define ACC_SIZEOF_ACC_INT16_T ACC_SIZEOF_ACC_INT16E_T
4474 #define ACC_TYPEOF_ACC_INT16_T ACC_TYPEOF_ACC_INT16E_T
4475 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == 2)
4476 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int16_t) == sizeof(acc_uint16_t))
4478 #if defined(acc_int32e_t)
4479 #define acc_int32_t acc_int32e_t
4480 #define acc_uint32_t acc_uint32e_t
4481 #define ACC_SIZEOF_ACC_INT32_T ACC_SIZEOF_ACC_INT32E_T
4482 #define ACC_TYPEOF_ACC_INT32_T ACC_TYPEOF_ACC_INT32E_T
4483 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == 4)
4484 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int32_t) == sizeof(acc_uint32_t))
4486 #if defined(acc_int64e_t)
4487 #define acc_int64_t acc_int64e_t
4488 #define acc_uint64_t acc_uint64e_t
4489 #define ACC_SIZEOF_ACC_INT64_T ACC_SIZEOF_ACC_INT64E_T
4490 #define ACC_TYPEOF_ACC_INT64_T ACC_TYPEOF_ACC_INT64E_T
4491 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == 8)
4492 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int64_t) == sizeof(acc_uint64_t))
4495 #define acc_int_least32_t acc_int32l_t
4496 #define acc_uint_least32_t acc_uint32l_t
4497 #define ACC_SIZEOF_ACC_INT_LEAST32_T ACC_SIZEOF_ACC_INT32L_T
4498 #define ACC_TYPEOF_ACC_INT_LEAST32_T ACC_TYPEOF_ACC_INT32L_T
4499 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) >= 4)
4500 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least32_t) == sizeof(acc_uint_least32_t))
4502 #if defined(acc_int64l_t)
4503 #define acc_int_least64_t acc_int64l_t
4504 #define acc_uint_least64_t acc_uint64l_t
4505 #define ACC_SIZEOF_ACC_INT_LEAST64_T ACC_SIZEOF_ACC_INT64L_T
4506 #define ACC_TYPEOF_ACC_INT_LEAST64_T ACC_TYPEOF_ACC_INT64L_T
4507 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) >= 8)
4508 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_least64_t) == sizeof(acc_uint_least64_t))
4511 #define acc_int_fast32_t acc_int32f_t
4512 #define acc_uint_fast32_t acc_uint32f_t
4513 #define ACC_SIZEOF_ACC_INT_FAST32_T ACC_SIZEOF_ACC_INT32F_T
4514 #define ACC_TYPEOF_ACC_INT_FAST32_T ACC_TYPEOF_ACC_INT32F_T
4515 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) >= 4)
4516 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast32_t) == sizeof(acc_uint_fast32_t))
4518 #if defined(acc_int64f_t)
4519 #define acc_int_fast64_t acc_int64f_t
4520 #define acc_uint_fast64_t acc_uint64f_t
4521 #define ACC_SIZEOF_ACC_INT_FAST64_T ACC_SIZEOF_ACC_INT64F_T
4522 #define ACC_TYPEOF_ACC_INT_FAST64_T ACC_TYPEOF_ACC_INT64F_T
4523 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) >= 8)
4524 ACC_COMPILE_TIME_ASSERT_HEADER(sizeof(acc_int_fast64_t) == sizeof(acc_uint_fast64_t))
4526 #if !defined(ACC_INT16_C)
4527 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2)
4528 # define ACC_INT16_C(c) ((c) + 0)
4529 # define ACC_UINT16_C(c) ((c) + 0U)
4530 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2)
4531 # define ACC_INT16_C(c) ((c) + 0L)
4532 # define ACC_UINT16_C(c) ((c) + 0UL)
4533 # elif (ACC_SIZEOF_INT >= 2)
4534 # define ACC_INT16_C(c) (c)
4535 # define ACC_UINT16_C(c) (c##U)
4536 # elif (ACC_SIZEOF_LONG >= 2)
4537 # define ACC_INT16_C(c) (c##L)
4538 # define ACC_UINT16_C(c) (c##UL)
4540 # error "ACC_INT16_C"
4543 #if !defined(ACC_INT32_C)
4544 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4)
4545 # define ACC_INT32_C(c) ((c) + 0)
4546 # define ACC_UINT32_C(c) ((c) + 0U)
4547 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4)
4548 # define ACC_INT32_C(c) ((c) + 0L)
4549 # define ACC_UINT32_C(c) ((c) + 0UL)
4550 # elif (ACC_SIZEOF_INT >= 4)
4551 # define ACC_INT32_C(c) (c)
4552 # define ACC_UINT32_C(c) (c##U)
4553 # elif (ACC_SIZEOF_LONG >= 4)
4554 # define ACC_INT32_C(c) (c##L)
4555 # define ACC_UINT32_C(c) (c##UL)
4556 # elif (ACC_SIZEOF_LONG_LONG >= 4)
4557 # define ACC_INT32_C(c) (c##LL)
4558 # define ACC_UINT32_C(c) (c##ULL)
4560 # error "ACC_INT32_C"
4563 #if !defined(ACC_INT64_C) && defined(acc_int64l_t)
4564 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8)
4565 # define ACC_INT64_C(c) ((c) + 0)
4566 # define ACC_UINT64_C(c) ((c) + 0U)
4567 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8)
4568 # define ACC_INT64_C(c) ((c) + 0L)
4569 # define ACC_UINT64_C(c) ((c) + 0UL)
4570 # elif (ACC_SIZEOF_INT >= 8)
4571 # define ACC_INT64_C(c) (c)
4572 # define ACC_UINT64_C(c) (c##U)
4573 # elif (ACC_SIZEOF_LONG >= 8)
4574 # define ACC_INT64_C(c) (c##L)
4575 # define ACC_UINT64_C(c) (c##UL)
4577 # error "ACC_INT64_C"
4580 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
4581 # define acc_signo_t acc_int32e_t
4583 #if !defined(acc_signo_t)
4584 # define acc_signo_t int
4586 #if defined(__cplusplus)
4589 #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
4590 typedef void __acc_cdecl_sighandler (*acc_sighandler_t)(acc_signo_t);
4592 typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t);
4594 #if defined(__cplusplus)
4597 # if !(ACC_CFG_SKIP_ACC_UA)
4598 #if !defined(__acc_ua_volatile)
4599 # define __acc_ua_volatile volatile
4601 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
4602 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
4603 #elif (ACC_CC_INTELC) && defined(_WIN32)
4604 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
4606 #elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
4607 #if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
4608 typedef struct { __acc_ua_volatile acc_uint16e_t v __attribute__((__packed__)); } __acc_ua16_t;
4609 # define __acc_ua16_t __acc_ua16_t
4611 #if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
4612 typedef struct { __acc_ua_volatile acc_uint32e_t v __attribute__((__packed__)); } __acc_ua32_t;
4613 # define __acc_ua32_t __acc_ua32_t
4615 #if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
4616 typedef struct { __acc_ua_volatile acc_uint64l_t v __attribute__((__packed__)); } __acc_ua64_t;
4617 # define __acc_ua64_t __acc_ua64_t
4620 #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
4622 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p))
4623 #define ACC_UA_SET16(p,v) ((* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint16e_t) (v))
4625 #define ACC_UA_GET16(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint16e_t*, __acc_ua_volatile const void*, p))
4626 #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))
4628 #if (ACC_ABI_BIG_ENDIAN)
4629 # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p)
4630 # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v)
4631 #elif (ACC_ABI_LITTLE_ENDIAN)
4632 # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p)
4633 # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v)
4635 #if (__acc_HAVE_forceinline)
4636 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4637 #if !defined(ACC_UA_GET_LE16)
4638 __acc_static_forceinline
4639 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4640 __attribute__((__unused__))
4642 unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile const void* pp) {
4643 __acc_ua_volatile const acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint16e_t*, pp);
4645 __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4648 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
4650 #if !defined(ACC_UA_SET_LE16)
4651 __acc_static_forceinline
4652 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4653 __attribute__((__unused__))
4655 void __ACC_UA_SET_LE16(__acc_ua_volatile void* pp, unsigned long v) {
4656 __acc_ua_volatile acc_uint16e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint16e_t*, pp);
4657 __asm__ __volatile__("sthbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4659 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v)
4663 #if !defined(ACC_UA_COPY16)
4664 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
4667 #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
4669 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p))
4670 #define ACC_UA_SET32(p,v) ((* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p)) = (acc_uint32e_t) (v))
4672 #define ACC_UA_GET32(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint32e_t*, __acc_ua_volatile const void*, p))
4673 #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))
4675 #if (ACC_ABI_BIG_ENDIAN)
4676 # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p)
4677 # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v)
4678 #elif (ACC_ABI_LITTLE_ENDIAN)
4679 # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p)
4680 # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v)
4682 #if (__acc_HAVE_forceinline)
4683 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_ASM_SYNTAX_GNUC) && (ACC_CC_GNUC)
4684 #if !defined(ACC_UA_GET_LE32)
4685 __acc_static_forceinline
4686 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4687 __attribute__((__unused__))
4689 unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile const void* pp) {
4690 __acc_ua_volatile const acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile const acc_uint32e_t*, pp);
4692 __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p));
4695 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
4697 #if !defined(ACC_UA_SET_LE32)
4698 __acc_static_forceinline
4699 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x020800ul) || ACC_CC_INTELC_GNUC || ACC_CC_LLVM)
4700 __attribute__((__unused__))
4702 void __ACC_UA_SET_LE32(__acc_ua_volatile void* pp, unsigned long v) {
4703 __acc_ua_volatile acc_uint32e_t* p = ACC_STATIC_CAST(__acc_ua_volatile acc_uint32e_t*, pp);
4704 __asm__ __volatile__("stwbrx %2,0,%1" : "=m" (*p) : "r" (p), "r" (v));
4706 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v)
4710 #if !defined(ACC_UA_COPY32)
4711 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
4714 #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
4716 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p))
4717 #define ACC_UA_SET64(p,v) ((* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p)) = (acc_uint64l_t) (v))
4719 #define ACC_UA_GET64(p) (* ACC_STATIC_CAST2(__acc_ua_volatile const acc_uint64l_t*, __acc_ua_volatile const void*, p))
4720 #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))
4722 #if (ACC_ABI_BIG_ENDIAN)
4723 # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p)
4724 # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v)
4725 #elif (ACC_ABI_LITTLE_ENDIAN)
4726 # define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
4727 # define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
4729 #if !defined(ACC_UA_COPY64)
4730 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
4735 #if defined(ACC_WANT_ACC_INCD_H)
4736 # undef ACC_WANT_ACC_INCD_H
4737 #ifndef __ACC_INCD_H_INCLUDED
4738 #define __ACC_INCD_H_INCLUDED 1
4739 #if (ACC_LIBC_NAKED)
4740 #ifndef __ACC_FALLBACK_STDDEF_H_INCLUDED
4741 #define __ACC_FALLBACK_STDDEF_H_INCLUDED 1
4742 #if defined(__PTRDIFF_TYPE__)
4743 typedef __PTRDIFF_TYPE__ acc_fallback_ptrdiff_t;
4744 #elif defined(__MIPS_PSX2__)
4745 typedef int acc_fallback_ptrdiff_t;
4747 typedef long acc_fallback_ptrdiff_t;
4749 #if defined(__SIZE_TYPE__)
4750 typedef __SIZE_TYPE__ acc_fallback_size_t;
4751 #elif defined(__MIPS_PSX2__)
4752 typedef unsigned int acc_fallback_size_t;
4754 typedef unsigned long acc_fallback_size_t;
4756 #if !defined(ptrdiff_t)
4757 typedef acc_fallback_ptrdiff_t ptrdiff_t;
4758 #ifndef _PTRDIFF_T_DEFINED
4759 #define _PTRDIFF_T_DEFINED 1
4762 #if !defined(size_t)
4763 typedef acc_fallback_size_t size_t;
4764 #ifndef _SIZE_T_DEFINED
4765 #define _SIZE_T_DEFINED 1
4768 #if !defined(__cplusplus) && !defined(wchar_t)
4769 typedef unsigned short wchar_t;
4770 #ifndef _WCHAR_T_DEFINED
4771 #define _WCHAR_T_DEFINED 1
4775 #if defined(__cplusplus) && defined(__GNUC__) && (__GNUC__ >= 4)
4777 #elif defined(__cplusplus)
4780 #define NULL ((void*)0)
4784 #define offsetof(s,m) ((size_t)((ptrdiff_t)&(((s*)0)->m)))
4787 #elif (ACC_LIBC_FREESTANDING)
4788 # if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0)
4789 # include <stddef.h>
4791 # if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0)
4792 # include <stdint.h>
4794 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
4795 # if defined(HAVE_STDIO_H) && (HAVE_STDIO_H+0)
4798 # if defined(HAVE_STDDEF_H) && (HAVE_STDDEF_H+0)
4799 # include <stddef.h>
4801 # if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0)
4802 # include <stdint.h>
4806 #if defined(HAVE_TIME_H) && (HAVE_TIME_H+0) && defined(__MSL__) && defined(__cplusplus)
4809 #if defined(HAVE_SYS_TYPES_H) && (HAVE_SYS_TYPES_H+0)
4810 # include <sys/types.h>
4812 #if defined(HAVE_SYS_STAT_H) && (HAVE_SYS_STAT_H+0)
4813 # include <sys/stat.h>
4815 #if defined(STDC_HEADERS) && (STDC_HEADERS+0)
4816 # include <stdlib.h>
4817 #elif defined(HAVE_STDLIB_H) && (HAVE_STDLIB_H+0)
4818 # include <stdlib.h>
4821 #if defined(HAVE_STRING_H) && (HAVE_STRING_H+0)
4822 # if defined(STDC_HEADERS) && (STDC_HEADERS+0)
4823 # elif defined(HAVE_MEMORY_H) && (HAVE_MEMORY_H+0)
4824 # include <memory.h>
4826 # include <string.h>
4828 #if defined(HAVE_STRINGS_H) && (HAVE_STRINGS_H+0)
4829 # include <strings.h>
4831 #if defined(HAVE_INTTYPES_H) && (HAVE_INTTYPES_H+0)
4832 # include <inttypes.h>
4834 #if defined(HAVE_STDINT_H) && (HAVE_STDINT_H+0)
4835 # include <stdint.h>
4837 #if defined(HAVE_UNISTD_H) && (HAVE_UNISTD_H+0)
4838 # include <unistd.h>
4843 #if defined(ACC_WANT_ACC_INCE_H)
4844 # undef ACC_WANT_ACC_INCE_H
4845 #ifndef __ACC_INCE_H_INCLUDED
4846 #define __ACC_INCE_H_INCLUDED 1
4847 #if (ACC_LIBC_NAKED)
4848 #elif (ACC_LIBC_FREESTANDING)
4849 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
4850 # if (HAVE_SETJMP_H)
4851 # include <setjmp.h>
4855 # include <stdarg.h>
4864 # include <malloc.h>
4867 # include <alloca.h>
4873 # include <dirent.h>
4876 # include <setjmp.h>
4879 # include <signal.h>
4881 #if (HAVE_SYS_TIME_H && HAVE_TIME_H)
4882 # include <sys/time.h>
4889 #elif (HAVE_SYS_UTIME_H)
4890 # include <sys/utime.h>
4899 # include <direct.h>
4907 #if defined(__TOS__) && (defined(__PUREC__) || defined(__TURBOC__))
4913 #if defined(ACC_WANT_ACC_INCI_H)
4914 # undef ACC_WANT_ACC_INCI_H
4915 #ifndef __ACC_INCI_H_INCLUDED
4916 #define __ACC_INCI_H_INCLUDED 1
4917 #if (ACC_LIBC_NAKED)
4918 #elif (ACC_LIBC_FREESTANDING)
4919 #elif (ACC_LIBC_MOSTLY_FREESTANDING)
4921 #if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
4923 #elif (ACC_HAVE_WINDOWS_H)
4924 # if 1 && !defined(WIN32_LEAN_AND_MEAN)
4925 # define WIN32_LEAN_AND_MEAN 1
4927 # if 1 && !defined(_WIN32_WINNT)
4928 # define _WIN32_WINNT 0x0400
4930 # include <windows.h>
4931 # if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
4934 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_WIN16)
4935 # if (ACC_CC_AZTECC)
4938 # elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
4941 # elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
4942 # include <sys/exceptn.h>
4943 # elif (ACC_CC_PACIFICC)
4944 # include <unixio.h>
4947 # elif (ACC_CC_WATCOMC)
4950 #elif (ACC_OS_OS216)
4951 # if (ACC_CC_WATCOMC)
4955 #if (HAVE_SYS_MMAN_H)
4956 # include <sys/mman.h>
4958 #if (HAVE_SYS_RESOURCE_H)
4959 # include <sys/resource.h>
4961 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
4962 # if defined(FP_OFF)
4963 # define ACC_PTR_FP_OFF(x) FP_OFF(x)
4964 # elif defined(_FP_OFF)
4965 # define ACC_PTR_FP_OFF(x) _FP_OFF(x)
4967 # define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
4969 # if defined(FP_SEG)
4970 # define ACC_PTR_FP_SEG(x) FP_SEG(x)
4971 # elif defined(_FP_SEG)
4972 # define ACC_PTR_FP_SEG(x) _FP_SEG(x)
4974 # define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
4977 # define ACC_PTR_MK_FP(s,o) MK_FP(s,o)
4978 # elif defined(_MK_FP)
4979 # define ACC_PTR_MK_FP(s,o) _MK_FP(s,o)
4981 # define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
4984 # undef ACC_PTR_FP_OFF
4985 # undef ACC_PTR_FP_SEG
4986 # undef ACC_PTR_MK_FP
4987 # define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
4988 # define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
4989 # define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
4995 #if defined(ACC_WANT_ACC_LIB_H)
4996 # undef ACC_WANT_ACC_LIB_H
4997 #ifndef __ACC_LIB_H_INCLUDED
4998 #define __ACC_LIB_H_INCLUDED 1
4999 #if !defined(__ACCLIB_FUNCNAME)
5000 # define __ACCLIB_FUNCNAME(f) f
5002 #if !defined(ACCLIB_EXTERN)
5003 # define ACCLIB_EXTERN(r,f) extern r __ACCLIB_FUNCNAME(f)
5005 #if !defined(ACCLIB_EXTERN_NOINLINE)
5006 # if defined(__acc_noinline)
5007 # define ACCLIB_EXTERN_NOINLINE(r,f) extern __acc_noinline r __ACCLIB_FUNCNAME(f)
5009 # define ACCLIB_EXTERN_NOINLINE(r,f) extern r __ACCLIB_FUNCNAME(f)
5012 #if (ACC_SIZEOF_LONG > ACC_SIZEOF_VOID_P)
5013 # define acclib_handle_t long
5015 # define acclib_handle_t acc_intptr_t
5018 ACCLIB_EXTERN(int, acc_ascii_digit) (int);
5019 ACCLIB_EXTERN(int, acc_ascii_islower) (int);
5020 ACCLIB_EXTERN(int, acc_ascii_isupper) (int);
5021 ACCLIB_EXTERN(int, acc_ascii_tolower) (int);
5022 ACCLIB_EXTERN(int, acc_ascii_toupper) (int);
5023 ACCLIB_EXTERN(int, acc_ascii_utolower) (int);
5024 ACCLIB_EXTERN(int, acc_ascii_utoupper) (int);
5026 #define acc_ascii_isdigit(c) ((ACC_ICAST(unsigned, c) - 48) < 10)
5027 #define acc_ascii_islower(c) ((ACC_ICAST(unsigned, c) - 97) < 26)
5028 #define acc_ascii_isupper(c) ((ACC_ICAST(unsigned, c) - 65) < 26)
5029 #define acc_ascii_tolower(c) (ACC_ICAST(int, c) + (acc_ascii_isupper(c) << 5))
5030 #define acc_ascii_toupper(c) (ACC_ICAST(int, c) - (acc_ascii_islower(c) << 5))
5031 #define acc_ascii_utolower(c) acc_ascii_tolower(ACC_ITRUNC(unsigned char, c))
5032 #define acc_ascii_utoupper(c) acc_ascii_toupper(ACC_ITRUNC(unsigned char, c))
5034 #if (ACC_HAVE_MM_HUGE_PTR)
5035 # define acc_hsize_t unsigned long
5036 # define acc_hvoid_p void __huge *
5037 # define acc_hchar_p char __huge *
5038 # define acc_hchar_pp char __huge * __huge *
5039 # define acc_hbyte_p unsigned char __huge *
5041 # define acc_hsize_t size_t
5042 # define acc_hvoid_p void *
5043 # define acc_hchar_p char *
5044 # define acc_hchar_pp char **
5045 # define acc_hbyte_p unsigned char *
5048 ACCLIB_EXTERN(acc_hvoid_p, acc_halloc) (acc_hsize_t);
5049 ACCLIB_EXTERN(void, acc_hfree) (acc_hvoid_p);
5050 #if (ACC_OS_DOS16 || ACC_OS_OS216)
5051 ACCLIB_EXTERN(void __far*, acc_dos_alloc) (unsigned long);
5052 ACCLIB_EXTERN(int, acc_dos_free) (void __far*);
5054 ACCLIB_EXTERN(int, acc_hmemcmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5055 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5056 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5057 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemset) (acc_hvoid_p, int, acc_hsize_t);
5058 ACCLIB_EXTERN(acc_hsize_t, acc_hstrlen) (const acc_hchar_p);
5059 ACCLIB_EXTERN(int, acc_hstrcmp) (const acc_hchar_p, const acc_hchar_p);
5060 ACCLIB_EXTERN(int, acc_hstrncmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5061 ACCLIB_EXTERN(int, acc_ascii_hstricmp) (const acc_hchar_p, const acc_hchar_p);
5062 ACCLIB_EXTERN(int, acc_ascii_hstrnicmp)(const acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5063 ACCLIB_EXTERN(int, acc_ascii_hmemicmp) (const acc_hvoid_p, const acc_hvoid_p, acc_hsize_t);
5064 ACCLIB_EXTERN(acc_hchar_p, acc_hstrstr) (const acc_hchar_p, const acc_hchar_p);
5065 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstristr) (const acc_hchar_p, const acc_hchar_p);
5066 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemmem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
5067 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemimem) (const acc_hvoid_p, acc_hsize_t, const acc_hvoid_p, acc_hsize_t);
5068 ACCLIB_EXTERN(acc_hchar_p, acc_hstrcpy) (acc_hchar_p, const acc_hchar_p);
5069 ACCLIB_EXTERN(acc_hchar_p, acc_hstrcat) (acc_hchar_p, const acc_hchar_p);
5070 ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5071 ACCLIB_EXTERN(acc_hsize_t, acc_hstrlcat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5072 ACCLIB_EXTERN(int, acc_hstrscpy) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5073 ACCLIB_EXTERN(int, acc_hstrscat) (acc_hchar_p, const acc_hchar_p, acc_hsize_t);
5074 ACCLIB_EXTERN(acc_hchar_p, acc_hstrccpy) (acc_hchar_p, const acc_hchar_p, int);
5075 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemccpy) (acc_hvoid_p, const acc_hvoid_p, int, acc_hsize_t);
5076 ACCLIB_EXTERN(acc_hchar_p, acc_hstrchr) (const acc_hchar_p, int);
5077 ACCLIB_EXTERN(acc_hchar_p, acc_hstrrchr) (const acc_hchar_p, int);
5078 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrichr) (const acc_hchar_p, int);
5079 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrrichr) (const acc_hchar_p, int);
5080 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemchr) (const acc_hvoid_p, int, acc_hsize_t);
5081 ACCLIB_EXTERN(acc_hvoid_p, acc_hmemrchr) (const acc_hvoid_p, int, acc_hsize_t);
5082 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemichr) (const acc_hvoid_p, int, acc_hsize_t);
5083 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemrichr) (const acc_hvoid_p, int, acc_hsize_t);
5084 ACCLIB_EXTERN(acc_hsize_t, acc_hstrspn) (const acc_hchar_p, const acc_hchar_p);
5085 ACCLIB_EXTERN(acc_hsize_t, acc_hstrrspn) (const acc_hchar_p, const acc_hchar_p);
5086 ACCLIB_EXTERN(acc_hsize_t, acc_hstrcspn) (const acc_hchar_p, const acc_hchar_p);
5087 ACCLIB_EXTERN(acc_hsize_t, acc_hstrrcspn) (const acc_hchar_p, const acc_hchar_p);
5088 ACCLIB_EXTERN(acc_hchar_p, acc_hstrpbrk) (const acc_hchar_p, const acc_hchar_p);
5089 ACCLIB_EXTERN(acc_hchar_p, acc_hstrrpbrk) (const acc_hchar_p, const acc_hchar_p);
5090 ACCLIB_EXTERN(acc_hchar_p, acc_hstrsep) (acc_hchar_pp, const acc_hchar_p);
5091 ACCLIB_EXTERN(acc_hchar_p, acc_hstrrsep) (acc_hchar_pp, const acc_hchar_p);
5092 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrlwr) (acc_hchar_p);
5093 ACCLIB_EXTERN(acc_hchar_p, acc_ascii_hstrupr) (acc_hchar_p);
5094 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemlwr) (acc_hvoid_p, acc_hsize_t);
5095 ACCLIB_EXTERN(acc_hvoid_p, acc_ascii_hmemupr) (acc_hvoid_p, acc_hsize_t);
5096 ACCLIB_EXTERN(acc_hsize_t, acc_hfread) (void *, acc_hvoid_p, acc_hsize_t);
5097 ACCLIB_EXTERN(acc_hsize_t, acc_hfwrite) (void *, const acc_hvoid_p, acc_hsize_t);
5098 #if (ACC_HAVE_MM_HUGE_PTR)
5099 ACCLIB_EXTERN(long, acc_hread) (int, acc_hvoid_p, long);
5100 ACCLIB_EXTERN(long, acc_hwrite) (int, const acc_hvoid_p, long);
5102 ACCLIB_EXTERN(long, acc_safe_hread) (int, acc_hvoid_p, long);
5103 ACCLIB_EXTERN(long, acc_safe_hwrite) (int, const acc_hvoid_p, long);
5104 ACCLIB_EXTERN(unsigned, acc_ua_get_be16) (const acc_hvoid_p);
5105 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_be24) (const acc_hvoid_p);
5106 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_be32) (const acc_hvoid_p);
5107 ACCLIB_EXTERN(void, acc_ua_set_be16) (acc_hvoid_p, unsigned);
5108 ACCLIB_EXTERN(void, acc_ua_set_be24) (acc_hvoid_p, acc_uint32l_t);
5109 ACCLIB_EXTERN(void, acc_ua_set_be32) (acc_hvoid_p, acc_uint32l_t);
5110 ACCLIB_EXTERN(unsigned, acc_ua_get_le16) (const acc_hvoid_p);
5111 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_le24) (const acc_hvoid_p);
5112 ACCLIB_EXTERN(acc_uint32l_t, acc_ua_get_le32) (const acc_hvoid_p);
5113 ACCLIB_EXTERN(void, acc_ua_set_le16) (acc_hvoid_p, unsigned);
5114 ACCLIB_EXTERN(void, acc_ua_set_le24) (acc_hvoid_p, acc_uint32l_t);
5115 ACCLIB_EXTERN(void, acc_ua_set_le32) (acc_hvoid_p, acc_uint32l_t);
5116 #if defined(acc_int64l_t)
5117 ACCLIB_EXTERN(acc_uint64l_t, acc_ua_get_be64) (const acc_hvoid_p);
5118 ACCLIB_EXTERN(void, acc_ua_set_be64) (acc_hvoid_p, acc_uint64l_t);
5119 ACCLIB_EXTERN(acc_uint64l_t, acc_ua_get_le64) (const acc_hvoid_p);
5120 ACCLIB_EXTERN(void, acc_ua_set_le64) (acc_hvoid_p, acc_uint64l_t);
5122 ACCLIB_EXTERN_NOINLINE(short, acc_vget_short) (short, int);
5123 ACCLIB_EXTERN_NOINLINE(int, acc_vget_int) (int, int);
5124 ACCLIB_EXTERN_NOINLINE(long, acc_vget_long) (long, int);
5125 #if defined(acc_int64l_t)
5126 ACCLIB_EXTERN_NOINLINE(acc_int64l_t, acc_vget_acc_int64l_t) (acc_int64l_t, int);
5128 ACCLIB_EXTERN_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t, int);
5129 #if !(ACC_CFG_NO_FLOAT)
5130 ACCLIB_EXTERN_NOINLINE(float, acc_vget_float) (float, int);
5132 #if !(ACC_CFG_NO_DOUBLE)
5133 ACCLIB_EXTERN_NOINLINE(double, acc_vget_double) (double, int);
5135 ACCLIB_EXTERN_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_p) (acc_hvoid_p, int);
5136 ACCLIB_EXTERN_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p, int);
5137 #if !defined(ACC_FN_PATH_MAX)
5138 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
5139 # define ACC_FN_PATH_MAX 143
5140 #elif (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN32 || ACC_OS_WIN64)
5141 # define ACC_FN_PATH_MAX 259
5143 # define ACC_FN_PATH_MAX 259
5146 #if !defined(ACC_FN_PATH_MAX)
5147 # define ACC_FN_PATH_MAX 1023
5149 #if !defined(ACC_FN_NAME_MAX)
5150 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
5151 # define ACC_FN_NAME_MAX 12
5152 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
5153 # define ACC_FN_NAME_MAX 12
5154 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
5155 #elif (ACC_OS_DOS32)
5156 # define ACC_FN_NAME_MAX 12
5159 #if !defined(ACC_FN_NAME_MAX)
5160 # define ACC_FN_NAME_MAX ACC_FN_PATH_MAX
5162 #define ACC_FNMATCH_NOESCAPE 1
5163 #define ACC_FNMATCH_PATHNAME 2
5164 #define ACC_FNMATCH_PATHSTAR 4
5165 #define ACC_FNMATCH_PERIOD 8
5166 #define ACC_FNMATCH_ASCII_CASEFOLD 16
5167 ACCLIB_EXTERN(int, acc_fnmatch) (const acc_hchar_p, const acc_hchar_p, int);
5168 #undef __ACCLIB_USE_OPENDIR
5169 #if (HAVE_DIRENT_H || ACC_CC_WATCOMC)
5170 # define __ACCLIB_USE_OPENDIR 1
5171 # if (ACC_OS_DOS32 && defined(__BORLANDC__))
5172 # elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
5173 # elif (ACC_OS_OS2 || ACC_OS_OS216)
5174 # elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
5175 # elif (ACC_OS_WIN32 && !(ACC_HAVE_WINDOWS_H))
5176 # 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)
5177 # undef __ACCLIB_USE_OPENDIR
5182 #if defined(__ACCLIB_USE_OPENDIR)
5184 # if (ACC_CC_WATCOMC)
5185 unsigned short f_time;
5186 unsigned short f_date;
5187 unsigned long f_size;
5189 char f_name[ACC_FN_NAME_MAX+1];
5190 #elif (ACC_OS_WIN32 || ACC_OS_WIN64)
5191 acclib_handle_t u_handle;
5193 unsigned f_size_low;
5194 unsigned f_size_high;
5195 char f_name[ACC_FN_NAME_MAX+1];
5196 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_TOS || ACC_OS_WIN16)
5198 unsigned char f_attr;
5199 unsigned short f_time;
5200 unsigned short f_date;
5201 unsigned short f_size_low;
5202 unsigned short f_size_high;
5203 char f_name[ACC_FN_NAME_MAX+1];
5207 char f_name[ACC_FN_NAME_MAX+1];
5211 #define acc_dir_p acc_dir_t *
5213 ACCLIB_EXTERN(int, acc_opendir) (acc_dir_p, const char*);
5214 ACCLIB_EXTERN(int, acc_readdir) (acc_dir_p);
5215 ACCLIB_EXTERN(int, acc_closedir) (acc_dir_p);
5216 #if (ACC_CC_GNUC) && (defined(__CYGWIN__) || defined(__MINGW32__))
5217 # define acc_alloca(x) __builtin_alloca((x))
5218 #elif (ACC_CC_GNUC) && (ACC_OS_CONSOLE_PS2)
5219 # define acc_alloca(x) __builtin_alloca((x))
5220 #elif (ACC_CC_BORLANDC || ACC_CC_LCC) && defined(__linux__)
5222 # define acc_alloca(x) ACC_STATIC_CAST(void *, alloca((x)))
5224 #if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
5225 # define acc_stackavail() stackavail()
5226 #elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0410))
5227 # define acc_stackavail() stackavail()
5228 #elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0400))
5229 # if (ACC_OS_WIN16) && (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
5231 # define acc_stackavail() stackavail()
5233 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_DMC || ACC_CC_SYMANTECC))
5234 # define acc_stackavail() stackavail()
5235 #elif ((ACC_ARCH_I086) && ACC_CC_MSC && (_MSC_VER >= 700))
5236 # define acc_stackavail() _stackavail()
5237 #elif ((ACC_ARCH_I086) && ACC_CC_MSC)
5238 # define acc_stackavail() stackavail()
5239 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && ACC_CC_TURBOC && (__TURBOC__ >= 0x0450))
5240 # define acc_stackavail() stackavail()
5241 #elif (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ >= 0x0400))
5242 ACC_EXTERN_C size_t __cdecl stackavail(void);
5243 # define acc_stackavail() stackavail()
5244 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_WATCOMC))
5245 # define acc_stackavail() stackavail()
5246 #elif (ACC_ARCH_I086 && ACC_CC_ZORTECHC)
5247 # define acc_stackavail() _chkstack()
5249 ACCLIB_EXTERN(acc_intptr_t, acc_get_osfhandle) (int);
5250 ACCLIB_EXTERN(const char *, acc_getenv) (const char *);
5251 ACCLIB_EXTERN(int, acc_isatty) (int);
5252 ACCLIB_EXTERN(int, acc_mkdir) (const char*, unsigned);
5253 ACCLIB_EXTERN(int, acc_rmdir) (const char*);
5254 ACCLIB_EXTERN(int, acc_response) (int*, char***);
5255 ACCLIB_EXTERN(int, acc_set_binmode) (int, int);
5256 #if defined(acc_int32e_t)
5257 ACCLIB_EXTERN(acc_int32e_t, acc_muldiv32s) (acc_int32e_t, acc_int32e_t, acc_int32e_t);
5258 ACCLIB_EXTERN(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t, acc_uint32e_t, acc_uint32e_t);
5260 ACCLIB_EXTERN(void, acc_wildargv) (int*, char***);
5261 ACCLIB_EXTERN_NOINLINE(void, acc_debug_break) (void);
5262 ACCLIB_EXTERN_NOINLINE(void, acc_debug_nop) (void);
5263 ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_query) (void);
5264 ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_enable) (int);
5265 ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_qemu) (void);
5266 ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void);
5267 #if defined(acc_int32e_t)
5268 ACCLIB_EXTERN(int, acc_tsc_read) (acc_uint32e_t*);
5270 struct acc_pclock_handle_t;
5271 struct acc_pclock_t;
5272 typedef struct acc_pclock_handle_t acc_pclock_handle_t;
5273 typedef struct acc_pclock_t acc_pclock_t;
5274 #ifndef acc_pclock_handle_p
5275 #define acc_pclock_handle_p acc_pclock_handle_t *
5277 #ifndef acc_pclock_p
5278 #define acc_pclock_p acc_pclock_t *
5280 #define ACC_PCLOCK_REALTIME 0
5281 #define ACC_PCLOCK_MONOTONIC 1
5282 #define ACC_PCLOCK_PROCESS_CPUTIME_ID 2
5283 #define ACC_PCLOCK_THREAD_CPUTIME_ID 3
5284 typedef int (*acc_pclock_gettime_t) (acc_pclock_handle_p, acc_pclock_p);
5285 struct acc_pclock_handle_t {
5290 acc_pclock_gettime_t gettime;
5291 #if defined(acc_int64l_t)
5292 acc_uint64l_t ticks_base;
5295 struct acc_pclock_t {
5296 #if defined(acc_int64l_t)
5297 acc_int64l_t tv_sec;
5299 acc_int32l_t tv_sec_high;
5300 acc_uint32l_t tv_sec_low;
5302 acc_uint32l_t tv_nsec;
5304 ACCLIB_EXTERN(int, acc_pclock_open) (acc_pclock_handle_p, int);
5305 ACCLIB_EXTERN(int, acc_pclock_open_default) (acc_pclock_handle_p);
5306 ACCLIB_EXTERN(int, acc_pclock_close) (acc_pclock_handle_p);
5307 ACCLIB_EXTERN(void, acc_pclock_read) (acc_pclock_handle_p, acc_pclock_p);
5308 #if !(ACC_CFG_NO_DOUBLE)
5309 ACCLIB_EXTERN(double, acc_pclock_get_elapsed) (acc_pclock_handle_p, const acc_pclock_p, const acc_pclock_p);
5311 ACCLIB_EXTERN(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p, unsigned);
5312 struct acc_getopt_t;
5313 typedef struct acc_getopt_t acc_getopt_t;
5314 #ifndef acc_getopt_p
5315 #define acc_getopt_p acc_getopt_t *
5317 struct acc_getopt_longopt_t;
5318 typedef struct acc_getopt_longopt_t acc_getopt_longopt_t;
5319 #ifndef acc_getopt_longopt_p
5320 #define acc_getopt_longopt_p acc_getopt_longopt_t *
5322 struct acc_getopt_longopt_t {
5328 typedef void (*acc_getopt_opterr_t)(acc_getopt_p, const char*, void *);
5329 struct acc_getopt_t {
5331 const char *progname;
5334 acc_getopt_opterr_t opterr;
5338 int argc; char** argv;
5339 int eof; int shortpos;
5340 int pending_rotate_first, pending_rotate_middle;
5342 enum { ACC_GETOPT_NO_ARG, ACC_GETOPT_REQUIRED_ARG, ACC_GETOPT_OPTIONAL_ARG, ACC_GETOPT_EXACT_ARG = 0x10 };
5343 enum { ACC_GETOPT_PERMUTE, ACC_GETOPT_RETURN_IN_ORDER, ACC_GETOPT_REQUIRE_ORDER };
5344 ACCLIB_EXTERN(void, acc_getopt_init) (acc_getopt_p g,
5345 int start_argc, int argc, char** argv);
5346 ACCLIB_EXTERN(int, acc_getopt) (acc_getopt_p g,
5347 const char* shortopts,
5348 const acc_getopt_longopt_p longopts,
5353 #ifndef acc_rand31_p
5354 #define acc_rand31_p acc_rand31_t *
5356 ACCLIB_EXTERN(void, acc_srand31) (acc_rand31_p, acc_uint32l_t);
5357 ACCLIB_EXTERN(acc_uint32l_t, acc_rand31) (acc_rand31_p);
5358 #if defined(acc_int64l_t)
5362 #ifndef acc_rand48_p
5363 #define acc_rand48_p acc_rand48_t *
5365 ACCLIB_EXTERN(void, acc_srand48) (acc_rand48_p, acc_uint32l_t);
5366 ACCLIB_EXTERN(acc_uint32l_t, acc_rand48) (acc_rand48_p);
5367 ACCLIB_EXTERN(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p);
5369 #if defined(acc_int64l_t)
5373 #ifndef acc_rand64_p
5374 #define acc_rand64_p acc_rand64_t *
5376 ACCLIB_EXTERN(void, acc_srand64) (acc_rand64_p, acc_uint64l_t);
5377 ACCLIB_EXTERN(acc_uint32l_t, acc_rand64) (acc_rand64_p);
5378 ACCLIB_EXTERN(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p);
5382 acc_uint32l_t s[624];
5384 #ifndef acc_randmt_p
5385 #define acc_randmt_p acc_randmt_t *
5387 ACCLIB_EXTERN(void, acc_srandmt) (acc_randmt_p, acc_uint32l_t);
5388 ACCLIB_EXTERN(acc_uint32l_t, acc_randmt) (acc_randmt_p);
5389 ACCLIB_EXTERN(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p);
5390 #if defined(acc_int64l_t)
5393 acc_uint64l_t s[312];
5395 #ifndef acc_randmt64_p
5396 #define acc_randmt64_p acc_randmt64_t *
5398 ACCLIB_EXTERN(void, acc_srandmt64) (acc_randmt64_p, acc_uint64l_t);
5399 ACCLIB_EXTERN(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p);
5401 #define ACC_SPAWN_P_WAIT 0
5402 #define ACC_SPAWN_P_NOWAIT 1
5403 ACCLIB_EXTERN(int, acc_spawnv) (int mode, const char* fn, const char* const * argv);
5404 ACCLIB_EXTERN(int, acc_spawnvp) (int mode, const char* fn, const char* const * argv);
5405 ACCLIB_EXTERN(int, acc_spawnve) (int mode, const char* fn, const char* const * argv, const char * const envp);
5408 #if defined(ACC_WANT_ACC_CXX_H)
5409 # undef ACC_WANT_ACC_CXX_H
5410 #ifndef __ACC_CXX_H_INCLUDED
5411 #define __ACC_CXX_H_INCLUDED 1
5412 #if defined(__cplusplus)
5413 #if defined(ACC_CXX_NOTHROW)
5414 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
5415 #elif (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
5416 #elif (ACC_CC_GHS && !defined(__EXCEPTIONS))
5417 #elif (ACC_CC_HIGHC)
5418 #elif (ACC_CC_MSC && (_MSC_VER < 1100))
5420 #elif (ACC_CC_TURBOC)
5421 #elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND))
5422 #elif (ACC_CC_ZORTECHC)
5424 # define ACC_CXX_NOTHROW throw()
5426 #if !defined(ACC_CXX_NOTHROW)
5427 # define ACC_CXX_NOTHROW /*empty*/
5429 #if defined(__ACC_CXX_DO_NEW)
5430 #elif (ACC_CC_GHS || ACC_CC_NDPC || ACC_CC_PGI)
5431 # define __ACC_CXX_DO_NEW { return 0; }
5432 #elif ((ACC_CC_BORLANDC || ACC_CC_TURBOC) && ACC_ARCH_I086)
5433 # define __ACC_CXX_DO_NEW { return 0; }
5435 # define __ACC_CXX_DO_NEW ;
5437 #if defined(__ACC_CXX_DO_DELETE)
5438 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
5439 # define __ACC_CXX_DO_DELETE { }
5441 # define __ACC_CXX_DO_DELETE ACC_CXX_NOTHROW { }
5443 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
5444 #elif (ACC_CC_MSC && ACC_MM_HUGE)
5445 # define ACC_CXX_DISABLE_NEW_DELETE private:
5446 #elif (ACC_CC_MSC && (_MSC_VER < 1100))
5448 #elif (ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
5449 #elif (ACC_CC_TURBOC)
5450 #elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
5452 # define __ACC_CXX_HAVE_ARRAY_NEW 1
5454 #if (__ACC_CXX_HAVE_ARRAY_NEW)
5455 # define __ACC_CXX_HAVE_PLACEMENT_NEW 1
5457 #if (__ACC_CXX_HAVE_PLACEMENT_NEW)
5458 # if (ACC_CC_GNUC >= 0x030000ul)
5459 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5460 # elif (ACC_CC_INTELC)
5461 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5462 # elif (ACC_CC_MSC && (_MSC_VER >= 1200))
5463 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5464 # elif (ACC_CC_CLANG || ACC_CC_LLVM || ACC_CC_PATHSCALE)
5465 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5467 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
5470 #if defined(ACC_CXX_DISABLE_NEW_DELETE)
5471 #elif defined(new) || defined(delete)
5472 # define ACC_CXX_DISABLE_NEW_DELETE private:
5473 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025b00ul))
5474 # define ACC_CXX_DISABLE_NEW_DELETE private:
5475 #elif (ACC_CC_HIGHC)
5476 # define ACC_CXX_DISABLE_NEW_DELETE private:
5477 #elif !(__ACC_CXX_HAVE_ARRAY_NEW)
5478 # define ACC_CXX_DISABLE_NEW_DELETE \
5479 protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
5480 protected: static void* operator new(size_t) __ACC_CXX_DO_NEW \
5483 # define ACC_CXX_DISABLE_NEW_DELETE \
5484 protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
5485 static void operator delete[](void*) __ACC_CXX_DO_DELETE \
5486 private: static void* operator new(size_t) __ACC_CXX_DO_NEW \
5487 static void* operator new[](size_t) __ACC_CXX_DO_NEW
5489 #if defined(ACC_CXX_TRIGGER_FUNCTION)
5491 # define ACC_CXX_TRIGGER_FUNCTION \
5492 protected: virtual const void* acc_cxx_trigger_function() const; \
5495 #if defined(ACC_CXX_TRIGGER_FUNCTION_IMPL)
5497 # define ACC_CXX_TRIGGER_FUNCTION_IMPL(klass) \
5498 const void* klass::acc_cxx_trigger_function() const { return ACC_STATIC_CAST(const void *, 0); }
5503 #if defined(ACC_WANT_ACC_CHK_CH)
5504 # undef ACC_WANT_ACC_CHK_CH
5505 #if !defined(ACCCHK_ASSERT)
5506 # define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
5508 #if !defined(ACCCHK_ASSERT_SIGN_T)
5509 # define ACCCHK_ASSERT_SIGN_T(type,relop) \
5510 ACCCHK_ASSERT( ACC_STATIC_CAST(type, -1) relop ACC_STATIC_CAST(type, 0)) \
5511 ACCCHK_ASSERT( ACC_STATIC_CAST(type, ~ACC_STATIC_CAST(type, 0)) relop ACC_STATIC_CAST(type, 0)) \
5512 ACCCHK_ASSERT( ACC_STATIC_CAST(type, ~ACC_STATIC_CAST(type, 0)) == ACC_STATIC_CAST(type, -1))
5514 #if !defined(ACCCHK_ASSERT_IS_SIGNED_T)
5515 # define ACCCHK_ASSERT_IS_SIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,<)
5517 #if !defined(ACCCHK_ASSERT_IS_UNSIGNED_T)
5518 # if (ACC_BROKEN_INTEGRAL_PROMOTION)
5519 # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) \
5520 ACCCHK_ASSERT( ACC_STATIC_CAST(type, -1) > ACC_STATIC_CAST(type, 0) )
5522 # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,>)
5525 #if defined(ACCCHK_CFG_PEDANTIC)
5526 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550) && (__BORLANDC__ < 0x0560))
5527 # pragma option push -w-8055
5528 #elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0550))
5529 # pragma option push -w-osh
5532 #if (ACC_0xffffffffL - ACC_UINT32_C(4294967294) != 1)
5533 # error "preprocessor error"
5535 #if (ACC_0xffffffffL - ACC_UINT32_C(0xfffffffd) != 2)
5536 # error "preprocessor error"
5539 # error "preprocessor error"
5542 # error "preprocessor error"
5545 # error "preprocessor error"
5548 # error "preprocessor error"
5550 #define ACCCHK_VAL 1
5551 #define ACCCHK_TMP1 ACCCHK_VAL
5553 #define ACCCHK_VAL 2
5554 #define ACCCHK_TMP2 ACCCHK_VAL
5555 #if (ACCCHK_TMP1 != 2)
5556 # error "preprocessor error 3a"
5558 #if (ACCCHK_TMP2 != 2)
5559 # error "preprocessor error 3b"
5563 # error "preprocessor error 3c"
5565 #if (ACCCHK_TMP2 + 0 != 0)
5566 # error "preprocessor error 3d"
5570 #if 0 || defined(ACCCHK_CFG_PEDANTIC)
5571 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZINT)
5572 ACCCHK_ASSERT((_MIPS_SZINT) == 8 * sizeof(int))
5574 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZLONG)
5575 ACCCHK_ASSERT((_MIPS_SZLONG) == 8 * sizeof(long))
5577 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZPTR)
5578 ACCCHK_ASSERT((_MIPS_SZPTR) == 8 * sizeof(void *))
5581 ACCCHK_ASSERT(1 == 1)
5582 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,1) == 1u)
5583 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,2) == 3u)
5584 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,3) == 7u)
5585 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,8) == 255u)
5586 #if (ACC_SIZEOF_INT >= 2)
5587 ACCCHK_ASSERT(__ACC_MASK_GEN(1,15) == 32767)
5588 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,16) == 0xffffU)
5589 ACCCHK_ASSERT(__ACC_MASK_GEN(0u,16) == 0u)
5591 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,16) == 0xffffUL)
5592 ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,16) == 0ul)
5593 #if (ACC_SIZEOF_INT >= 4)
5594 ACCCHK_ASSERT(__ACC_MASK_GEN(1,31) == 2147483647)
5595 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,32) == 0xffffffffU)
5596 ACCCHK_ASSERT(__ACC_MASK_GEN(0u,32) == 0u)
5598 #if (ACC_SIZEOF_LONG >= 4)
5599 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,32) == 0xffffffffUL)
5600 ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,32) == 0ul)
5602 #if (ACC_SIZEOF_LONG >= 8)
5603 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,64) == 0xffffffffffffffffUL)
5604 ACCCHK_ASSERT(__ACC_MASK_GEN(0ul,64) == 0ul)
5606 #if !(ACC_BROKEN_INTEGRAL_PROMOTION)
5607 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,ACC_SIZEOF_INT*8) == ~0u)
5608 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,ACC_SIZEOF_LONG*8) == ~0ul)
5611 ACCCHK_ASSERT(__ACC_MASK_GEN(0,0) == 0)
5612 ACCCHK_ASSERT(__ACC_MASK_GEN(1,0) == 0)
5613 ACCCHK_ASSERT(__ACC_MASK_GEN(2,0) == 0)
5614 ACCCHK_ASSERT(__ACC_MASK_GEN(4,0) == 0)
5617 ACCCHK_ASSERT(__ACC_MASK_GEN(2,1) == 2)
5618 ACCCHK_ASSERT(__ACC_MASK_GEN(4,1) == 4)
5619 ACCCHK_ASSERT(__ACC_MASK_GEN(8,1) == 8)
5620 ACCCHK_ASSERT(__ACC_MASK_GEN(2,2) == 2+4)
5621 ACCCHK_ASSERT(__ACC_MASK_GEN(4,2) == 4+8)
5622 ACCCHK_ASSERT(__ACC_MASK_GEN(8,2) == 8+16)
5623 ACCCHK_ASSERT(__ACC_MASK_GEN(2,3) == 2+4+8)
5624 ACCCHK_ASSERT(__ACC_MASK_GEN(4,3) == 4+8+16)
5625 ACCCHK_ASSERT(__ACC_MASK_GEN(8,3) == 8+16+32)
5626 ACCCHK_ASSERT(__ACC_MASK_GEN(7,1) == 7)
5627 ACCCHK_ASSERT(__ACC_MASK_GEN(7,2) == 7+14)
5628 ACCCHK_ASSERT(__ACC_MASK_GEN(7,3) == 7+14+28)
5630 #if !(ACC_BROKEN_SIGNED_RIGHT_SHIFT)
5631 ACCCHK_ASSERT(((-1) >> 7) == -1)
5633 ACCCHK_ASSERT(((1) >> 7) == 0)
5634 #if (ACC_CC_INTELC && (__INTEL_COMPILER >= 900))
5635 # pragma warning(push)
5636 # pragma warning(disable: 1025)
5638 ACCCHK_ASSERT((~0l & ~0) == ~0l)
5639 ACCCHK_ASSERT((~0l & ~0u) == ~0u)
5640 ACCCHK_ASSERT((~0ul & ~0) == ~0ul)
5641 ACCCHK_ASSERT((~0ul & ~0u) == ~0u)
5642 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
5643 #elif (ACC_SIZEOF_INT == 2)
5644 ACCCHK_ASSERT((~0l & ~0u) == 0xffffU)
5645 ACCCHK_ASSERT((~0ul & ~0u) == 0xffffU)
5646 #elif (ACC_SIZEOF_INT == 4)
5647 ACCCHK_ASSERT((~0l & ~0u) == 0xffffffffU)
5648 ACCCHK_ASSERT((~0ul & ~0u) == 0xffffffffU)
5650 #if (ACC_CC_INTELC && (__INTEL_COMPILER >= 900))
5651 # pragma warning(pop)
5653 ACCCHK_ASSERT_IS_SIGNED_T(signed char)
5654 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned char)
5655 ACCCHK_ASSERT(sizeof(signed char) == sizeof(char))
5656 ACCCHK_ASSERT(sizeof(unsigned char) == sizeof(char))
5657 ACCCHK_ASSERT(sizeof(char) == 1)
5658 #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
5660 ACCCHK_ASSERT(sizeof(char) == sizeof(ACC_STATIC_CAST(char, 0)))
5662 #if defined(__cplusplus)
5663 ACCCHK_ASSERT(sizeof('\0') == sizeof(char))
5667 ACCCHK_ASSERT(sizeof('\0') == sizeof(int))
5670 #if defined(__acc_alignof)
5671 ACCCHK_ASSERT(__acc_alignof(char) == 1)
5672 ACCCHK_ASSERT(__acc_alignof(signed char) == 1)
5673 ACCCHK_ASSERT(__acc_alignof(unsigned char) == 1)
5674 #if defined(acc_int16e_t)
5675 ACCCHK_ASSERT(__acc_alignof(acc_int16e_t) >= 1)
5676 ACCCHK_ASSERT(__acc_alignof(acc_int16e_t) <= 2)
5678 #if defined(acc_int32e_t)
5679 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) >= 1)
5680 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) <= 4)
5683 ACCCHK_ASSERT_IS_SIGNED_T(short)
5684 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned short)
5685 ACCCHK_ASSERT(sizeof(short) == sizeof(unsigned short))
5686 #if !(ACC_ABI_I8LP16)
5687 ACCCHK_ASSERT(sizeof(short) >= 2)
5689 ACCCHK_ASSERT(sizeof(short) >= sizeof(char))
5690 #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
5692 ACCCHK_ASSERT(sizeof(short) == sizeof(ACC_STATIC_CAST(short, 0)))
5694 #if (ACC_SIZEOF_SHORT > 0)
5695 ACCCHK_ASSERT(sizeof(short) == ACC_SIZEOF_SHORT)
5697 ACCCHK_ASSERT_IS_SIGNED_T(int)
5698 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned int)
5699 ACCCHK_ASSERT(sizeof(int) == sizeof(unsigned int))
5700 #if !(ACC_ABI_I8LP16)
5701 ACCCHK_ASSERT(sizeof(int) >= 2)
5703 ACCCHK_ASSERT(sizeof(int) >= sizeof(short))
5704 ACCCHK_ASSERT(sizeof(int) == sizeof(0))
5705 ACCCHK_ASSERT(sizeof(int) == sizeof(ACC_STATIC_CAST(int, 0)))
5706 #if (ACC_SIZEOF_INT > 0)
5707 ACCCHK_ASSERT(sizeof(int) == ACC_SIZEOF_INT)
5709 ACCCHK_ASSERT(sizeof(0) == sizeof(int))
5710 ACCCHK_ASSERT_IS_SIGNED_T(long)
5711 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned long)
5712 ACCCHK_ASSERT(sizeof(long) == sizeof(unsigned long))
5713 #if !(ACC_ABI_I8LP16)
5714 ACCCHK_ASSERT(sizeof(long) >= 4)
5716 ACCCHK_ASSERT(sizeof(long) >= sizeof(int))
5717 ACCCHK_ASSERT(sizeof(long) == sizeof(0L))
5718 ACCCHK_ASSERT(sizeof(long) == sizeof(ACC_STATIC_CAST(long, 0)))
5719 #if (ACC_SIZEOF_LONG > 0)
5720 ACCCHK_ASSERT(sizeof(long) == ACC_SIZEOF_LONG)
5722 ACCCHK_ASSERT(sizeof(0L) == sizeof(long))
5723 ACCCHK_ASSERT_IS_UNSIGNED_T(size_t)
5724 ACCCHK_ASSERT(sizeof(size_t) >= sizeof(int))
5725 ACCCHK_ASSERT(sizeof(size_t) == sizeof(sizeof(0)))
5726 #if (ACC_SIZEOF_SIZE_T > 0)
5727 ACCCHK_ASSERT(sizeof(size_t) == ACC_SIZEOF_SIZE_T)
5729 ACCCHK_ASSERT_IS_SIGNED_T(ptrdiff_t)
5730 ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(int))
5731 ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t))
5732 #if !(ACC_BROKEN_SIZEOF)
5733 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(ACC_STATIC_CAST(char*, 0) - ACC_STATIC_CAST(char*, 0)))
5734 # if (ACC_HAVE_MM_HUGE_PTR)
5735 ACCCHK_ASSERT(4 == sizeof(ACC_STATIC_CAST(char __huge*, 0) - ACC_STATIC_CAST(char __huge*, 0)))
5738 #if (ACC_SIZEOF_PTRDIFF_T > 0)
5739 ACCCHK_ASSERT(sizeof(ptrdiff_t) == ACC_SIZEOF_PTRDIFF_T)
5741 ACCCHK_ASSERT(sizeof(void*) >= sizeof(char*))
5742 #if (ACC_SIZEOF_VOID_P > 0)
5743 ACCCHK_ASSERT(sizeof(void*) == ACC_SIZEOF_VOID_P)
5744 ACCCHK_ASSERT(sizeof(char*) == ACC_SIZEOF_VOID_P)
5746 #if (ACC_HAVE_MM_HUGE_PTR)
5747 ACCCHK_ASSERT(4 == sizeof(void __huge*))
5748 ACCCHK_ASSERT(4 == sizeof(char __huge*))
5750 #if (ACC_ABI_I8LP16)
5751 ACCCHK_ASSERT((((1u << 7) + 1) >> 7) == 1)
5752 ACCCHK_ASSERT((((1ul << 15) + 1) >> 15) == 1)
5754 ACCCHK_ASSERT((((1u << 15) + 1) >> 15) == 1)
5755 ACCCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1)
5757 #if defined(ACCCHK_CFG_PEDANTIC)
5758 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
5760 ACCCHK_ASSERT((1 << (8*ACC_SIZEOF_INT-1)) < 0)
5763 ACCCHK_ASSERT((1u << (8*ACC_SIZEOF_INT-1)) > 0)
5764 #if defined(ACCCHK_CFG_PEDANTIC)
5765 ACCCHK_ASSERT((1l << (8*ACC_SIZEOF_LONG-1)) < 0)
5767 ACCCHK_ASSERT((1ul << (8*ACC_SIZEOF_LONG-1)) > 0)
5768 #if defined(acc_int16e_t)
5769 ACCCHK_ASSERT(sizeof(acc_int16e_t) == 2)
5770 ACCCHK_ASSERT(sizeof(acc_int16e_t) == ACC_SIZEOF_ACC_INT16E_T)
5771 ACCCHK_ASSERT(sizeof(acc_uint16e_t) == 2)
5772 ACCCHK_ASSERT(sizeof(acc_int16e_t) == sizeof(acc_uint16e_t))
5773 ACCCHK_ASSERT_IS_SIGNED_T(acc_int16e_t)
5774 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint16e_t)
5775 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
5777 ACCCHK_ASSERT((ACC_STATIC_CAST(acc_uint16e_t, (~ACC_STATIC_CAST(acc_uint16e_t,0ul))) >> 15) == 1)
5779 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_int16e_t, (1 + ~ACC_STATIC_CAST(acc_int16e_t, 0))) == 0)
5780 #if defined(ACCCHK_CFG_PEDANTIC)
5781 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_uint16e_t, (1 + ~ACC_STATIC_CAST(acc_uint16e_t, 0))) == 0)
5784 #if defined(acc_int32e_t)
5785 ACCCHK_ASSERT(sizeof(acc_int32e_t) == 4)
5786 ACCCHK_ASSERT(sizeof(acc_int32e_t) == ACC_SIZEOF_ACC_INT32E_T)
5787 ACCCHK_ASSERT(sizeof(acc_uint32e_t) == 4)
5788 ACCCHK_ASSERT(sizeof(acc_int32e_t) == sizeof(acc_uint32e_t))
5789 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32e_t)
5790 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32e_t, 1) << 30) + 1) >> 30) == 1)
5791 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32e_t)
5792 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32e_t, 1) << 31) + 1) >> 31) == 1)
5793 ACCCHK_ASSERT((ACC_STATIC_CAST(acc_uint32e_t, (~ACC_STATIC_CAST(acc_uint32e_t, 0ul))) >> 31) == 1)
5794 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_int32e_t, (1 + ~ACC_STATIC_CAST(acc_int32e_t, 0))) == 0)
5795 #if defined(ACCCHK_CFG_PEDANTIC)
5796 ACCCHK_ASSERT( ACC_STATIC_CAST(acc_uint32e_t, (1 + ~ACC_STATIC_CAST(acc_uint32e_t, 0))) == 0)
5799 #if defined(acc_int32e_t)
5800 ACCCHK_ASSERT(sizeof(acc_int32l_t) >= sizeof(acc_int32e_t))
5802 ACCCHK_ASSERT(sizeof(acc_int32l_t) >= 4)
5803 ACCCHK_ASSERT(sizeof(acc_int32l_t) == ACC_SIZEOF_ACC_INT32L_T)
5804 ACCCHK_ASSERT(sizeof(acc_uint32l_t) >= 4)
5805 ACCCHK_ASSERT(sizeof(acc_int32l_t) == sizeof(acc_uint32l_t))
5806 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32l_t)
5807 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32l_t, 1) << 30) + 1) >> 30) == 1)
5808 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32l_t)
5809 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32l_t, 1) << 31) + 1) >> 31) == 1)
5810 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(int))
5811 #if defined(acc_int32e_t)
5812 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32e_t))
5814 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t))
5815 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= 4)
5816 ACCCHK_ASSERT(sizeof(acc_int32f_t) >= sizeof(acc_int32l_t))
5817 ACCCHK_ASSERT(sizeof(acc_int32f_t) == ACC_SIZEOF_ACC_INT32F_T)
5818 ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= 4)
5819 ACCCHK_ASSERT(sizeof(acc_uint32f_t) >= sizeof(acc_uint32l_t))
5820 ACCCHK_ASSERT(sizeof(acc_int32f_t) == sizeof(acc_uint32f_t))
5821 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32f_t)
5822 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int32f_t, 1) << 30) + 1) >> 30) == 1)
5823 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32f_t)
5824 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint32f_t, 1) << 31) + 1) >> 31) == 1)
5825 #if defined(acc_int64e_t)
5826 ACCCHK_ASSERT(sizeof(acc_int64e_t) == 8)
5827 ACCCHK_ASSERT(sizeof(acc_int64e_t) == ACC_SIZEOF_ACC_INT64E_T)
5828 ACCCHK_ASSERT(sizeof(acc_uint64e_t) == 8)
5829 ACCCHK_ASSERT(sizeof(acc_int64e_t) == sizeof(acc_uint64e_t))
5830 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64e_t)
5831 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
5833 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64e_t)
5836 #if defined(acc_int64l_t)
5837 #if defined(acc_int64e_t)
5838 ACCCHK_ASSERT(sizeof(acc_int64l_t) >= sizeof(acc_int64e_t))
5840 ACCCHK_ASSERT(sizeof(acc_int64l_t) >= 8)
5841 ACCCHK_ASSERT(sizeof(acc_int64l_t) == ACC_SIZEOF_ACC_INT64L_T)
5842 ACCCHK_ASSERT(sizeof(acc_uint64l_t) >= 8)
5843 ACCCHK_ASSERT(sizeof(acc_int64l_t) == sizeof(acc_uint64l_t))
5844 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64l_t)
5845 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_int64l_t, 1) << 62) + 1) >> 62) == 1)
5846 ACCCHK_ASSERT(((( ACC_INT64_C(1) << 62) + 1) >> 62) == 1)
5847 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
5849 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64l_t)
5850 ACCCHK_ASSERT(ACC_UINT64_C(18446744073709551615) > 0)
5852 ACCCHK_ASSERT(((( ACC_STATIC_CAST(acc_uint64l_t, 1) << 63) + 1) >> 63) == 1)
5853 ACCCHK_ASSERT(((( ACC_UINT64_C(1) << 63) + 1) >> 63) == 1)
5854 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020600ul))
5855 ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > ACC_INT64_C(0))
5857 ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > 0)
5859 ACCCHK_ASSERT(ACC_INT64_C(-9223372036854775807) - 1 < 0)
5860 ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483629) == 721)
5861 ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483647) == 1)
5862 ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483629) == 721)
5863 ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483647) == 1)
5865 #if defined(acc_int64f_t)
5866 #if defined(acc_int64e_t)
5867 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64e_t))
5869 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64l_t))
5870 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= 8)
5871 ACCCHK_ASSERT(sizeof(acc_int64f_t) >= sizeof(acc_int64l_t))
5872 ACCCHK_ASSERT(sizeof(acc_int64f_t) == ACC_SIZEOF_ACC_INT64F_T)
5873 ACCCHK_ASSERT(sizeof(acc_uint64f_t) >= 8)
5874 ACCCHK_ASSERT(sizeof(acc_uint64f_t) >= sizeof(acc_uint64l_t))
5875 ACCCHK_ASSERT(sizeof(acc_int64f_t) == sizeof(acc_uint64f_t))
5876 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64f_t)
5877 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
5879 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64f_t)
5882 #if !defined(__ACC_INTPTR_T_IS_POINTER)
5883 ACCCHK_ASSERT_IS_SIGNED_T(acc_intptr_t)
5884 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uintptr_t)
5886 ACCCHK_ASSERT(sizeof(acc_intptr_t) >= sizeof(void *))
5887 ACCCHK_ASSERT(sizeof(acc_intptr_t) == ACC_SIZEOF_ACC_INTPTR_T)
5888 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(acc_uintptr_t))
5889 #if defined(acc_word_t)
5890 ACCCHK_ASSERT(ACC_WORDSIZE == ACC_SIZEOF_ACC_WORD_T)
5891 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_word_t)
5892 ACCCHK_ASSERT_IS_SIGNED_T(acc_sword_t)
5893 ACCCHK_ASSERT(sizeof(acc_word_t) == ACC_SIZEOF_ACC_WORD_T)
5894 ACCCHK_ASSERT(sizeof(acc_word_t) == sizeof(acc_sword_t))
5896 ACCCHK_ASSERT(sizeof(acc_int8_t) == 1)
5897 ACCCHK_ASSERT(sizeof(acc_uint8_t) == 1)
5898 ACCCHK_ASSERT(sizeof(acc_int8_t) == sizeof(acc_uint8_t))
5899 ACCCHK_ASSERT_IS_SIGNED_T(acc_int8_t)
5900 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint8_t)
5901 #if defined(ACC_INT16_C)
5902 ACCCHK_ASSERT(sizeof(ACC_INT16_C(0)) >= 2)
5903 ACCCHK_ASSERT(sizeof(ACC_UINT16_C(0)) >= 2)
5904 ACCCHK_ASSERT((ACC_UINT16_C(0xffff) >> 15) == 1)
5906 #if defined(ACC_INT32_C)
5907 ACCCHK_ASSERT(sizeof(ACC_INT32_C(0)) >= 4)
5908 ACCCHK_ASSERT(sizeof(ACC_UINT32_C(0)) >= 4)
5909 ACCCHK_ASSERT((ACC_UINT32_C(0xffffffff) >> 31) == 1)
5911 #if defined(ACC_INT64_C)
5912 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0560))
5914 ACCCHK_ASSERT(sizeof(ACC_INT64_C(0)) >= 8)
5915 ACCCHK_ASSERT(sizeof(ACC_UINT64_C(0)) >= 8)
5917 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) >> 63) == 1)
5918 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0) == ACC_UINT64_C(0xffffffffffffffff))
5919 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0l) == ACC_UINT64_C(0xffffffffffffffff))
5920 #if (ACC_SIZEOF_INT == 4)
5921 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
5923 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & (~0u+0u)) == 0xffffffffu)
5926 #if (ACC_SIZEOF_LONG == 4)
5927 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
5929 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & (~0ul+0ul)) == 0xfffffffful)
5933 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
5934 ACCCHK_ASSERT(sizeof(void*) == 2)
5935 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 2)
5936 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
5937 ACCCHK_ASSERT(sizeof(void*) == 4)
5939 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_COMPACT)
5940 ACCCHK_ASSERT(sizeof(void (*)(void)) == 2)
5941 #elif (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE)
5942 ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
5945 ACCCHK_ASSERT(sizeof(int) == 4)
5946 ACCCHK_ASSERT(sizeof(long) == 4)
5947 ACCCHK_ASSERT(sizeof(void*) == 4)
5948 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5949 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5950 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5953 ACCCHK_ASSERT(sizeof(int) == 8)
5954 ACCCHK_ASSERT(sizeof(long) == 8)
5955 ACCCHK_ASSERT(sizeof(void*) == 8)
5956 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5957 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5958 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5960 #if (ACC_ABI_IP32L64)
5961 ACCCHK_ASSERT(sizeof(int) == 4)
5962 ACCCHK_ASSERT(sizeof(long) == 8)
5963 ACCCHK_ASSERT(sizeof(void*) == 4)
5964 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5965 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5966 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5969 ACCCHK_ASSERT(sizeof(int) == 4)
5970 ACCCHK_ASSERT(sizeof(long) == 4)
5971 ACCCHK_ASSERT(sizeof(void*) == 8)
5972 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5973 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5974 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5977 ACCCHK_ASSERT(sizeof(int) == 2)
5978 ACCCHK_ASSERT(sizeof(long) == 4)
5979 ACCCHK_ASSERT(sizeof(void*) == 4)
5980 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5983 ACCCHK_ASSERT(sizeof(int) == 4)
5984 ACCCHK_ASSERT(sizeof(long) == 8)
5985 ACCCHK_ASSERT(sizeof(void*) == 8)
5986 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5987 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5988 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5990 #if (ACC_ABI_IP32W64)
5991 ACCCHK_ASSERT(sizeof(int) == 4)
5992 ACCCHK_ASSERT(sizeof(void*) == 4)
5993 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
5994 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
5995 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
5996 ACCCHK_ASSERT(ACC_WORDSIZE == 8)
5999 ACCCHK_ASSERT(sizeof(size_t) == 2)
6000 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
6001 #elif (ACC_ARCH_I386 || ACC_ARCH_M68K)
6002 ACCCHK_ASSERT(sizeof(size_t) == 4)
6003 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
6004 ACCCHK_ASSERT(sizeof(acc_intptr_t) == sizeof(void *))
6006 #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32)
6007 ACCCHK_ASSERT(sizeof(size_t) == 4)
6008 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
6009 ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
6010 #elif (ACC_OS_WIN64)
6011 ACCCHK_ASSERT(sizeof(size_t) == 8)
6012 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 8)
6013 ACCCHK_ASSERT(sizeof(void (*)(void)) == 8)
6016 #elif (ACC_SIZEOF_INT > 1)
6017 ACCCHK_ASSERT( ACC_STATIC_CAST(int, ACC_STATIC_CAST(unsigned char, ACC_STATIC_CAST(signed char, -1))) == 255)
6019 #if defined(ACCCHK_CFG_PEDANTIC)
6022 #elif !(ACC_BROKEN_INTEGRAL_PROMOTION) && (ACC_SIZEOF_INT > 1)
6023 ACCCHK_ASSERT( ((ACC_STATIC_CAST(unsigned char, 128)) << ACC_STATIC_CAST(int, (8*sizeof(int)-8))) < 0)
6026 #if defined(ACCCHK_CFG_PEDANTIC)
6027 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
6032 #if defined(ACC_WANT_ACCLIB_UA)
6033 # undef ACC_WANT_ACCLIB_UA
6034 #define __ACCLIB_UA_CH_INCLUDED 1
6035 #if !defined(ACCLIB_PUBLIC)
6036 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6038 ACCLIB_PUBLIC(unsigned, acc_ua_get_be16) (const acc_hvoid_p p)
6040 #if defined(ACC_UA_GET_BE16)
6041 return ACC_UA_GET_BE16(p);
6043 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6044 return ACC_ICONV(unsigned, b[1]) | (ACC_ICONV(unsigned, b[0]) << 8);
6047 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be24) (const acc_hvoid_p p)
6049 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6050 return ACC_ICONV(acc_uint32l_t, b[2]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[0]) << 16);
6052 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be32) (const acc_hvoid_p p)
6054 #if defined(ACC_UA_GET_BE32)
6055 return ACC_UA_GET_BE32(p);
6057 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6058 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);
6061 ACCLIB_PUBLIC(void, acc_ua_set_be16) (acc_hvoid_p p, unsigned v)
6063 #if defined(ACC_UA_SET_BE16)
6064 ACC_UA_SET_BE16(p, v);
6066 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6067 b[1] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6068 b[0] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6071 ACCLIB_PUBLIC(void, acc_ua_set_be24) (acc_hvoid_p p, acc_uint32l_t v)
6073 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6074 b[2] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6075 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6076 b[0] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6078 ACCLIB_PUBLIC(void, acc_ua_set_be32) (acc_hvoid_p p, acc_uint32l_t v)
6080 #if defined(ACC_UA_SET_BE32)
6081 ACC_UA_SET_BE32(p, v);
6083 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6084 b[3] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6085 b[2] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6086 b[1] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6087 b[0] = ACC_ICONV(unsigned char, (v >> 24) & 0xff);
6090 ACCLIB_PUBLIC(unsigned, acc_ua_get_le16) (const acc_hvoid_p p)
6092 #if defined(ACC_UA_GET_LE16)
6093 return ACC_UA_GET_LE16(p);
6095 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6096 return ACC_ICONV(unsigned, b[0]) | (ACC_ICONV(unsigned, b[1]) << 8);
6099 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le24) (const acc_hvoid_p p)
6101 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6102 return ACC_ICONV(acc_uint32l_t, b[0]) | (ACC_ICONV(acc_uint32l_t, b[1]) << 8) | (ACC_ICONV(acc_uint32l_t, b[2]) << 16);
6104 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le32) (const acc_hvoid_p p)
6106 #if defined(ACC_UA_GET_LE32)
6107 return ACC_UA_GET_LE32(p);
6109 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6110 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);
6113 ACCLIB_PUBLIC(void, acc_ua_set_le16) (acc_hvoid_p p, unsigned v)
6115 #if defined(ACC_UA_SET_LE16)
6116 ACC_UA_SET_LE16(p, v);
6118 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6119 b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6120 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6123 ACCLIB_PUBLIC(void, acc_ua_set_le24) (acc_hvoid_p p, acc_uint32l_t v)
6125 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6126 b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6127 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6128 b[2] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6130 ACCLIB_PUBLIC(void, acc_ua_set_le32) (acc_hvoid_p p, acc_uint32l_t v)
6132 #if defined(ACC_UA_SET_LE32)
6133 ACC_UA_SET_LE32(p, v);
6135 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6136 b[0] = ACC_ICONV(unsigned char, (v >> 0) & 0xff);
6137 b[1] = ACC_ICONV(unsigned char, (v >> 8) & 0xff);
6138 b[2] = ACC_ICONV(unsigned char, (v >> 16) & 0xff);
6139 b[3] = ACC_ICONV(unsigned char, (v >> 24) & 0xff);
6142 #if defined(acc_int64l_t)
6143 ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_be64) (const acc_hvoid_p p)
6145 #if defined(ACC_UA_GET_BE64)
6146 return ACC_UA_GET_BE64(p);
6147 #elif defined(ACC_UA_GET_BE32)
6148 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6149 acc_uint32e_t v0, v1;
6150 v1 = ACC_UA_GET_BE32(b + 0);
6151 v0 = ACC_UA_GET_BE32(b + 4);
6152 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6153 #elif (ACC_WORDSIZE >= 8)
6154 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6155 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);
6157 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6158 acc_uint32l_t v0, v1;
6159 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);
6161 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);
6162 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6165 ACCLIB_PUBLIC(void, acc_ua_set_be64) (acc_hvoid_p p, acc_uint64l_t v)
6167 #if defined(ACC_UA_SET_BE64)
6168 ACC_UA_SET_BE64(p, v);
6169 #elif defined(ACC_UA_SET_BE32)
6170 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6171 ACC_UA_SET_BE32(b + 4, v);
6173 ACC_UA_SET_BE32(b + 0, v);
6174 #elif (ACC_WORDSIZE >= 8)
6175 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6176 b[7] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6177 b[6] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6178 b[5] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6179 b[4] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6180 b[3] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6181 b[2] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6182 b[1] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6183 b[0] = ACC_ITRUNC(unsigned char, v);
6185 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6187 x = ACC_ITRUNC(acc_uint32l_t, v);
6188 b[7] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6189 b[6] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6190 b[5] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6191 b[4] = ACC_ITRUNC(unsigned char, x);
6193 x = ACC_ITRUNC(acc_uint32l_t, v);
6194 b[3] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6195 b[2] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6196 b[1] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6197 b[0] = ACC_ITRUNC(unsigned char, x);
6201 #if defined(acc_int64l_t)
6202 ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_le64) (const acc_hvoid_p p)
6204 #if defined(ACC_UA_GET_LE64)
6205 return ACC_UA_GET_LE64(p);
6206 #elif defined(ACC_UA_GET_LE32)
6207 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6208 acc_uint32e_t v0, v1;
6209 v0 = ACC_UA_GET_LE32(b + 0);
6210 v1 = ACC_UA_GET_LE32(b + 4);
6211 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6212 #elif (ACC_WORDSIZE >= 8)
6213 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6214 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);
6216 const acc_hbyte_p b = ACC_CCAST(const acc_hbyte_p, p);
6217 acc_uint32l_t v0, v1;
6218 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);
6220 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);
6221 return ACC_ICONV(acc_uint64l_t, v0) | (ACC_ICONV(acc_uint64l_t, v1) << 32);
6224 ACCLIB_PUBLIC(void, acc_ua_set_le64) (acc_hvoid_p p, acc_uint64l_t v)
6226 #if defined(ACC_UA_SET_LE64)
6227 ACC_UA_SET_LE64(p, v);
6228 #elif defined(ACC_UA_SET_LE32)
6229 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6230 ACC_UA_SET_LE32(b + 0, v);
6232 ACC_UA_SET_LE32(b + 4, v);
6233 #elif (ACC_WORDSIZE >= 8)
6234 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6235 b[0] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6236 b[1] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6237 b[2] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6238 b[3] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6239 b[4] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6240 b[5] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6241 b[6] = ACC_ITRUNC(unsigned char, v); v >>= 8;
6242 b[7] = ACC_ITRUNC(unsigned char, v);
6244 acc_hbyte_p b = ACC_PCAST(acc_hbyte_p, p);
6246 x = ACC_ITRUNC(acc_uint32l_t, v);
6247 b[0] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6248 b[1] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6249 b[2] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6250 b[3] = ACC_ITRUNC(unsigned char, x);
6252 x = ACC_ITRUNC(acc_uint32l_t, v);
6253 b[4] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6254 b[5] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6255 b[6] = ACC_ITRUNC(unsigned char, x); x >>= 8;
6256 b[7] = ACC_ITRUNC(unsigned char, x);
6261 #if defined(ACC_WANT_ACCLIB_VGET)
6262 # undef ACC_WANT_ACCLIB_VGET
6263 #define __ACCLIB_VGET_CH_INCLUDED 1
6264 #if !defined(ACCLIB_PUBLIC)
6265 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6267 #if !defined(ACCLIB_PUBLIC_NOINLINE)
6268 # if !defined(__acc_noinline)
6269 # define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
6270 # elif (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
6271 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
6273 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
6276 extern void* volatile acc_vget_ptr__;
6277 #if (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
6278 void* volatile __attribute__((__used__)) acc_vget_ptr__ = ACC_STATIC_CAST(void *, 0);
6280 void* volatile acc_vget_ptr__ = ACC_STATIC_CAST(void *, 0);
6282 #ifndef __ACCLIB_VGET_BODY
6283 #define __ACCLIB_VGET_BODY(T) \
6284 if __acc_unlikely(acc_vget_ptr__) { \
6285 typedef T __acc_may_alias TT; \
6286 unsigned char e; expr &= 255; e = ACC_STATIC_CAST(unsigned char, expr); \
6287 * ACC_STATIC_CAST(TT *, acc_vget_ptr__) = v; \
6288 * ACC_STATIC_CAST(unsigned char *, acc_vget_ptr__) = e; \
6289 v = * ACC_STATIC_CAST(TT *, acc_vget_ptr__); \
6293 ACCLIB_PUBLIC_NOINLINE(short, acc_vget_short) (short v, int expr)
6295 __ACCLIB_VGET_BODY(short)
6297 ACCLIB_PUBLIC_NOINLINE(int, acc_vget_int) (int v, int expr)
6299 __ACCLIB_VGET_BODY(int)
6301 ACCLIB_PUBLIC_NOINLINE(long, acc_vget_long) (long v, int expr)
6303 __ACCLIB_VGET_BODY(long)
6305 #if defined(acc_int64l_t)
6306 ACCLIB_PUBLIC_NOINLINE(acc_int64l_t, acc_vget_acc_int64l_t) (acc_int64l_t v, int expr)
6308 __ACCLIB_VGET_BODY(acc_int64l_t)
6311 ACCLIB_PUBLIC_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t v, int expr)
6313 __ACCLIB_VGET_BODY(acc_hsize_t)
6315 #if !(ACC_CFG_NO_DOUBLE)
6316 ACCLIB_PUBLIC_NOINLINE(double, acc_vget_double) (double v, int expr)
6318 __ACCLIB_VGET_BODY(double)
6321 ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_p) (acc_hvoid_p v, int expr)
6323 __ACCLIB_VGET_BODY(acc_hvoid_p)
6325 #if (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) && !defined(__cplusplus)
6326 ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p vv, int expr)
6328 acc_hvoid_p v = (acc_hvoid_p) vv;
6329 __ACCLIB_VGET_BODY(acc_hvoid_p)
6332 ACCLIB_PUBLIC_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p v, int expr)
6334 __ACCLIB_VGET_BODY(const acc_hvoid_p)
6338 #if defined(ACC_WANT_ACCLIB_HMEMCPY)
6339 # undef ACC_WANT_ACCLIB_HMEMCPY
6340 #define __ACCLIB_HMEMCPY_CH_INCLUDED 1
6341 #if !defined(ACCLIB_PUBLIC)
6342 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6344 ACCLIB_PUBLIC(int, acc_hmemcmp) (const acc_hvoid_p s1, const acc_hvoid_p s2, acc_hsize_t len)
6346 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCMP)
6347 const acc_hbyte_p p1 = ACC_STATIC_CAST(const acc_hbyte_p, s1);
6348 const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, s2);
6349 if __acc_likely(len > 0) do
6355 } while __acc_likely(--len > 0);
6358 return memcmp(s1, s2, len);
6361 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len)
6363 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMCPY)
6364 acc_hbyte_p p1 = ACC_STATIC_CAST(acc_hbyte_p, dest);
6365 const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, src);
6366 if (!(len > 0) || p1 == p2)
6370 while __acc_likely(--len > 0);
6373 return memcpy(dest, src, len);
6376 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len)
6378 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMMOVE)
6379 acc_hbyte_p p1 = ACC_STATIC_CAST(acc_hbyte_p, dest);
6380 const acc_hbyte_p p2 = ACC_STATIC_CAST(const acc_hbyte_p, src);
6381 if (!(len > 0) || p1 == p2)
6387 while __acc_likely(--len > 0);
6395 while __acc_likely(--len > 0);
6399 return memmove(dest, src, len);
6402 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemset) (acc_hvoid_p s, int cc, acc_hsize_t len)
6404 #if (ACC_HAVE_MM_HUGE_PTR) || !(HAVE_MEMSET)
6405 acc_hbyte_p p = ACC_STATIC_CAST(acc_hbyte_p, s);
6406 unsigned char c = ACC_ITRUNC(unsigned char, cc);
6407 if __acc_likely(len > 0) do
6409 while __acc_likely(--len > 0);
6412 return memset(s, cc, len);
6416 #if defined(ACC_WANT_ACCLIB_RAND)
6417 # undef ACC_WANT_ACCLIB_RAND
6418 #define __ACCLIB_RAND_CH_INCLUDED 1
6419 #if !defined(ACCLIB_PUBLIC)
6420 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6422 ACCLIB_PUBLIC(void, acc_srand31) (acc_rand31_p r, acc_uint32l_t seed)
6424 r->seed = seed & ACC_UINT32_C(0xffffffff);
6426 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand31) (acc_rand31_p r)
6428 r->seed = r->seed * ACC_UINT32_C(1103515245) + 12345;
6429 r->seed &= ACC_UINT32_C(0x7fffffff);
6432 #if defined(acc_int64l_t)
6433 ACCLIB_PUBLIC(void, acc_srand48) (acc_rand48_p r, acc_uint32l_t seed)
6435 r->seed = seed & ACC_UINT32_C(0xffffffff);
6436 r->seed <<= 16; r->seed |= 0x330e;
6438 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48) (acc_rand48_p r)
6441 r->seed = r->seed * ACC_UINT64_C(25214903917) + 11;
6442 r->seed &= ACC_UINT64_C(0xffffffffffff);
6444 return ACC_STATIC_CAST(acc_uint32l_t, a);
6446 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p r)
6449 r->seed = r->seed * ACC_UINT64_C(25214903917) + 11;
6450 r->seed &= ACC_UINT64_C(0xffffffffffff);
6452 return ACC_STATIC_CAST(acc_uint32l_t, a);
6455 #if defined(acc_int64l_t)
6456 ACCLIB_PUBLIC(void, acc_srand64) (acc_rand64_p r, acc_uint64l_t seed)
6458 r->seed = seed & ACC_UINT64_C(0xffffffffffffffff);
6460 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64) (acc_rand64_p r)
6463 r->seed = r->seed * ACC_UINT64_C(6364136223846793005) + 1;
6464 #if (ACC_SIZEOF_ACC_INT64L_T > 8)
6465 r->seed &= ACC_UINT64_C(0xffffffffffffffff);
6468 return ACC_STATIC_CAST(acc_uint32l_t, a);
6470 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p r)
6473 r->seed = r->seed * ACC_UINT64_C(6364136223846793005) + 1;
6474 #if (ACC_SIZEOF_ACC_INT64L_T > 8)
6475 r->seed &= ACC_UINT64_C(0xffffffffffffffff);
6478 return ACC_STATIC_CAST(acc_uint32l_t, a);
6481 ACCLIB_PUBLIC(void, acc_srandmt) (acc_randmt_p r, acc_uint32l_t seed)
6485 r->s[i++] = (seed &= ACC_UINT32_C(0xffffffff));
6487 seed = seed * ACC_UINT32_C(0x6c078965) + i;
6491 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt) (acc_randmt_p r)
6493 return (__ACCLIB_FUNCNAME(acc_randmt_r32)(r)) >> 1;
6495 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p r)
6498 if __acc_unlikely(r->n == 624) {
6502 j = i - 623; if (ACC_STATIC_CAST(int, j) < 0) j += 624;
6503 v = (r->s[i] & ACC_UINT32_C(0x80000000)) ^ (r->s[j] & ACC_UINT32_C(0x7fffffff));
6504 j = i - 227; if (ACC_STATIC_CAST(int, j) < 0) j += 624;
6505 r->s[i] = r->s[j] ^ (v >> 1);
6506 if (v & 1) r->s[i] ^= ACC_UINT32_C(0x9908b0df);
6507 } while (++i != 624);
6509 { unsigned i = r->n++; v = r->s[i]; }
6510 v ^= v >> 11; v ^= (v & ACC_UINT32_C(0x013a58ad)) << 7;
6511 v ^= (v & ACC_UINT32_C(0x0001df8c)) << 15; v ^= v >> 18;
6514 #if defined(acc_int64l_t)
6515 ACCLIB_PUBLIC(void, acc_srandmt64) (acc_randmt64_p r, acc_uint64l_t seed)
6519 r->s[i++] = (seed &= ACC_UINT64_C(0xffffffffffffffff));
6521 seed = seed * ACC_UINT64_C(0x5851f42d4c957f2d) + i;
6526 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt64) (acc_randmt64_p r)
6529 v = (__ACCLIB_FUNCNAME(acc_randmt64_r64)(r)) >> 33;
6530 return ACC_STATIC_CAST(acc_uint32l_t, v);
6533 ACCLIB_PUBLIC(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p r)
6536 if __acc_unlikely(r->n == 312) {
6540 j = i - 311; if (ACC_STATIC_CAST(int, j) < 0) j += 312;
6541 v = (r->s[i] & ACC_UINT64_C(0xffffffff80000000)) ^ (r->s[j] & ACC_UINT64_C(0x7fffffff));
6542 j = i - 156; if (ACC_STATIC_CAST(int, j) < 0) j += 312;
6543 r->s[i] = r->s[j] ^ (v >> 1);
6544 if (v & 1) r->s[i] ^= ACC_UINT64_C(0xb5026f5aa96619e9);
6545 } while (++i != 312);
6547 { unsigned i = r->n++; v = r->s[i]; }
6548 v ^= (v & ACC_UINT64_C(0xaaaaaaaaa0000000)) >> 29;
6549 v ^= (v & ACC_UINT64_C(0x38eb3ffff6d3)) << 17;
6550 v ^= (v & ACC_UINT64_C(0x7ffbf77)) << 37;
6551 return v ^ (v >> 43);
6555 #if defined(ACC_WANT_ACCLIB_RDTSC)
6556 # undef ACC_WANT_ACCLIB_RDTSC
6557 #define __ACCLIB_RDTSC_CH_INCLUDED 1
6558 #if !defined(ACCLIB_PUBLIC)
6559 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6561 #if defined(acc_int32e_t)
6562 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
6564 # pragma warn(disable:2007)
6566 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6567 #if (ACC_ARCH_AMD64 && ACC_CC_INTELC)
6568 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "memory", "rax", "rdx"
6569 #elif (ACC_ARCH_AMD64)
6570 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "rax", "rdx"
6571 #elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
6572 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "ax", "dx"
6573 #elif (ACC_ARCH_I386 && ACC_CC_INTELC)
6574 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "memory", "eax", "edx"
6576 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "eax", "edx"
6579 ACCLIB_PUBLIC(int, acc_tsc_read) (acc_uint32e_t* t)
6581 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6582 __asm__ __volatile__(
6583 "clc \n" ".byte 0x0f,0x31\n"
6584 "movl %%eax,(%0)\n" "movl %%edx,4(%0)\n"
6588 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
6593 # if (ACC_CC_MSC && (_MSC_VER < 1200))
6604 t[0] = t[1] = 0; return -1;
6607 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
6612 #if defined(ACC_WANT_ACCLIB_DOSALLOC)
6613 # undef ACC_WANT_ACCLIB_DOSALLOC
6614 #define __ACCLIB_DOSALLOC_CH_INCLUDED 1
6615 #if !defined(ACCLIB_PUBLIC)
6616 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6619 ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
6620 ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
6622 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
6623 #if !(ACC_CC_AZTECC)
6624 ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
6628 if ((long)size <= 0)
6630 size = (size + 15) >> 4;
6634 ri.x.bx = (unsigned short) size;
6635 int86(0x21, &ri, &ro);
6636 if ((ro.x.cflag & 1) == 0)
6637 p = (void __far*) ACC_PTR_MK_FP(ro.x.ax, 0);
6640 ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
6646 if (ACC_PTR_FP_OFF(p) != 0)
6650 rs.es = ACC_PTR_FP_SEG(p);
6651 int86x(0x21, &ri, &ro, &rs);
6659 ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size)
6662 unsigned short sel = 0;
6663 if ((long)size <= 0)
6665 if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
6666 p = (void __far*) ACC_PTR_MK_FP(sel, 0);
6669 ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p)
6673 if (ACC_PTR_FP_OFF(p) != 0)
6675 if (DosFreeSeg(ACC_PTR_FP_SEG(p)) != 0)
6681 #if defined(ACC_WANT_ACCLIB_GETOPT)
6682 # undef ACC_WANT_ACCLIB_GETOPT
6683 #define __ACCLIB_GETOPT_CH_INCLUDED 1
6684 #if !defined(ACCLIB_PUBLIC)
6685 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6687 ACCLIB_PUBLIC(void, acc_getopt_init) (acc_getopt_p g,
6688 int start_argc, int argc, char** argv)
6690 memset(g, 0, sizeof(*g));
6691 g->optind = start_argc;
6692 g->argc = argc; g->argv = argv;
6695 static int __ACCLIB_FUNCNAME(acc_getopt_rotate) (char** p, int first, int middle, int last)
6697 int i = middle, n = middle - first;
6698 if (first >= middle || middle >= last) return 0;
6701 char* t = p[first]; p[first] = p[i]; p[i] = t;
6702 if (++first == middle)
6704 if (++i == last) break;
6707 else if (++i == last)
6712 static int __ACCLIB_FUNCNAME(acc_getopt_perror) (acc_getopt_p g, int ret, const char* f, ...)
6717 struct { va_list ap; } s;
6719 g->opterr(g, f, &s);
6722 g->opterr(g, f, NULL);
6728 ACCLIB_PUBLIC(int, acc_getopt) (acc_getopt_p g,
6729 const char* shortopts,
6730 const acc_getopt_longopt_p longopts,
6733 #define pe __ACCLIB_FUNCNAME(acc_getopt_perror)
6734 int ordering = ACC_GETOPT_PERMUTE;
6735 int missing_arg_ret = g->bad_option;
6739 if (*shortopts == '-' || *shortopts == '+')
6740 ordering = *shortopts++ == '-' ? ACC_GETOPT_RETURN_IN_ORDER : ACC_GETOPT_REQUIRE_ORDER;
6741 if (*shortopts == ':')
6742 missing_arg_ret = *shortopts++;
6745 if (g->optopt == -1)
6746 g->optopt = g->bad_option;
6752 goto acc_label_next_shortopt;
6753 g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind);
6754 g->pending_rotate_first = g->pending_rotate_middle = g->optind;
6755 if (ordering == ACC_GETOPT_PERMUTE)
6757 while (g->optind < g->argc && !(g->argv[g->optind][0] == '-' && g->argv[g->optind][1]))
6759 g->pending_rotate_middle = g->optind;
6761 if (g->optind >= g->argc)
6763 g->optind = g->pending_rotate_first;
6766 a = g->argv[g->optind];
6767 if (a[0] == '-' && a[1] == '-')
6770 const acc_getopt_longopt_p o;
6771 const acc_getopt_longopt_p o1 = NULL;
6772 const acc_getopt_longopt_p o2 = NULL;
6777 for (a += 2; a[l] && a[l] != '=' && a[l] != '#'; )
6779 for (o = longopts; l && o && o->name; ++o)
6781 if (strncmp(a, o->name, l) != 0)
6784 goto acc_label_found_o;
6785 need_exact |= o->has_arg & ACC_GETOPT_EXACT_ARG;
6789 if (!o1 || need_exact)
6790 return pe(g, g->bad_option, "unrecognized option '--%s'", a);
6792 return pe(g, g->bad_option, "option '--%s' is ambiguous (could be '--%s' or '--%s')", a, o1->name, o2->name);
6796 switch (o->has_arg & 0x2f)
6798 case ACC_GETOPT_OPTIONAL_ARG:
6802 case ACC_GETOPT_REQUIRED_ARG:
6805 else if (g->optind < g->argc)
6806 g->optarg = g->argv[g->optind++];
6808 return pe(g, missing_arg_ret, "option '--%s' requires an argument", o->name);
6810 case ACC_GETOPT_REQUIRED_ARG | 0x20:
6814 return pe(g, missing_arg_ret, "option '--%s=' requires an argument", o->name);
6818 return pe(g, g->bad_option, "option '--%s' doesn't allow an argument", o->name);
6822 *longind = (int) (o - longopts);
6830 if (a[0] == '-' && a[1])
6834 acc_label_next_shortopt:
6835 a = g->argv[g->optind] + ++g->shortpos;
6836 c = (unsigned char) *a++; s = NULL;
6837 if (c != ':' && shortopts)
6838 s = strchr(shortopts, c);
6839 if (!s || s[1] != ':')
6842 { ++g->optind; g->shortpos = 0; }
6846 return pe(g, g->bad_option, "invalid option '-%c'", c);
6851 ++g->optind; g->shortpos = 0;
6854 else if (s[2] != ':')
6856 if (g->optind < g->argc)
6857 g->optarg = g->argv[g->optind++];
6861 return pe(g, missing_arg_ret, "option '-%c' requires an argument", c);
6867 if (ordering == ACC_GETOPT_RETURN_IN_ORDER)
6874 g->optind -= __ACCLIB_FUNCNAME(acc_getopt_rotate)(g->argv, g->pending_rotate_first, g->pending_rotate_middle, g->optind);
6875 g->pending_rotate_first = g->pending_rotate_middle = g->optind;
6881 #if defined(ACC_WANT_ACCLIB_HALLOC)
6882 # undef ACC_WANT_ACCLIB_HALLOC
6883 #define __ACCLIB_HALLOC_CH_INCLUDED 1
6884 #if !defined(ACCLIB_PUBLIC)
6885 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6887 #if (ACC_HAVE_MM_HUGE_PTR)
6888 #if 1 && (ACC_OS_DOS16 && defined(BLX286))
6889 # define __ACCLIB_HALLOC_USE_DAH 1
6890 #elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
6891 # define __ACCLIB_HALLOC_USE_DAH 1
6892 #elif 1 && (ACC_OS_OS216)
6893 # define __ACCLIB_HALLOC_USE_DAH 1
6894 #elif 1 && (ACC_OS_WIN16)
6895 # define __ACCLIB_HALLOC_USE_GA 1
6896 #elif 1 && (ACC_OS_DOS16) && (ACC_CC_BORLANDC) && defined(__DPMI16__)
6897 # define __ACCLIB_HALLOC_USE_GA 1
6900 #if (__ACCLIB_HALLOC_USE_DAH)
6901 #if 0 && (ACC_OS_OS216)
6904 ACC_EXTERN_C unsigned short __far __pascal DosAllocHuge(unsigned short, unsigned short, unsigned short __far *, unsigned short, unsigned short);
6905 ACC_EXTERN_C unsigned short __far __pascal DosFreeSeg(unsigned short);
6908 #if (__ACCLIB_HALLOC_USE_GA)
6911 #include <windows.h>
6913 ACC_EXTERN_C const void __near* __far __pascal GlobalAlloc(unsigned, unsigned long);
6914 ACC_EXTERN_C const void __near* __far __pascal GlobalFree(const void __near*);
6915 ACC_EXTERN_C unsigned long __far __pascal GlobalHandle(unsigned);
6916 ACC_EXTERN_C void __far* __far __pascal GlobalLock(const void __near*);
6917 ACC_EXTERN_C int __far __pascal GlobalUnlock(const void __near*);
6920 ACCLIB_PUBLIC(acc_hvoid_p, acc_halloc) (acc_hsize_t size)
6922 acc_hvoid_p p = ACC_STATIC_CAST(acc_hvoid_p, 0);
6925 #if 0 && defined(__palmos__)
6926 p = MemPtrNew(size);
6927 #elif !(ACC_HAVE_MM_HUGE_PTR)
6928 if (size < ACC_STATIC_CAST(size_t, -1))
6929 p = malloc(ACC_STATIC_CAST(size_t, size));
6931 if (ACC_STATIC_CAST(long, size) <= 0)
6934 #if (__ACCLIB_HALLOC_USE_DAH)
6935 unsigned short sel = 0;
6936 if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0)
6937 p = (acc_hvoid_p) ACC_PTR_MK_FP(sel, 0);
6938 #elif (__ACCLIB_HALLOC_USE_GA)
6939 const void __near* h = GlobalAlloc(2, size);
6942 if (p && ACC_PTR_FP_OFF(p) != 0) {
6949 #elif (ACC_CC_MSC && (_MSC_VER >= 700))
6950 p = _halloc(size, 1);
6951 #elif (ACC_CC_MSC || ACC_CC_WATCOMC)
6952 p = halloc(size, 1);
6953 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
6954 p = farmalloc(size);
6955 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
6956 p = farmalloc(size);
6957 #elif (ACC_CC_AZTECC)
6960 if (size < ACC_STATIC_CAST(size_t, -1))
6961 p = malloc(ACC_STATIC_CAST(size_t, size));
6967 ACCLIB_PUBLIC(void, acc_hfree) (acc_hvoid_p p)
6971 #if 0 && defined(__palmos__)
6973 #elif !(ACC_HAVE_MM_HUGE_PTR)
6976 #if (__ACCLIB_HALLOC_USE_DAH)
6977 if (ACC_PTR_FP_OFF(p) == 0)
6978 DosFreeSeg((unsigned short) ACC_PTR_FP_SEG(p));
6979 #elif (__ACCLIB_HALLOC_USE_GA)
6980 if (ACC_PTR_FP_OFF(p) == 0) {
6981 const void __near* h = (const void __near*) (unsigned) GlobalHandle(ACC_PTR_FP_SEG(p));
6987 #elif (ACC_CC_MSC && (_MSC_VER >= 700))
6989 #elif (ACC_CC_MSC || ACC_CC_WATCOMC)
6991 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
6992 farfree((void __far*) p);
6993 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
6994 farfree((void __far*) p);
6995 #elif (ACC_CC_AZTECC)
7003 #if defined(ACC_WANT_ACCLIB_HFREAD)
7004 # undef ACC_WANT_ACCLIB_HFREAD
7005 #define __ACCLIB_HFREAD_CH_INCLUDED 1
7006 #if !defined(ACCLIB_PUBLIC)
7007 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7009 ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (void* vfp, acc_hvoid_p buf, acc_hsize_t size)
7011 FILE* fp = ACC_STATIC_CAST(FILE *, vfp);
7012 #if (ACC_HAVE_MM_HUGE_PTR)
7013 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
7014 #define __ACCLIB_REQUIRE_HMEMCPY_CH 1
7015 unsigned char tmp[512];
7019 size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
7020 n = fread(tmp, 1, n, fp);
7023 __ACCLIB_FUNCNAME(acc_hmemcpy)((acc_hbyte_p)buf + l, tmp, (acc_hsize_t)n);
7027 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
7028 acc_hbyte_p b = (acc_hbyte_p) buf;
7033 n = ACC_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
7034 if ((acc_hsize_t) n > size - l)
7035 n = (size_t) (size - l);
7036 n = fread((void __far*)b, 1, n, fp);
7043 # error "unknown memory model"
7046 return fread(buf, 1, size, fp);
7049 ACCLIB_PUBLIC(acc_hsize_t, acc_hfwrite) (void* vfp, const acc_hvoid_p buf, acc_hsize_t size)
7051 FILE* fp = ACC_STATIC_CAST(FILE *, vfp);
7052 #if (ACC_HAVE_MM_HUGE_PTR)
7053 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
7054 #define __ACCLIB_REQUIRE_HMEMCPY_CH 1
7055 unsigned char tmp[512];
7059 size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l);
7060 __ACCLIB_FUNCNAME(acc_hmemcpy)(tmp, (const acc_hbyte_p)buf + l, (acc_hsize_t)n);
7061 n = fwrite(tmp, 1, n, fp);
7067 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
7068 const acc_hbyte_p b = (const acc_hbyte_p) buf;
7073 n = ACC_PTR_FP_OFF(b); n = (n <= 1) ? 0x8000u : (0u - n);
7074 if ((acc_hsize_t) n > size - l)
7075 n = (size_t) (size - l);
7076 n = fwrite((void __far*)b, 1, n, fp);
7083 # error "unknown memory model"
7086 return fwrite(buf, 1, size, fp);
7090 #if defined(ACC_WANT_ACCLIB_HSREAD)
7091 # undef ACC_WANT_ACCLIB_HSREAD
7092 #define __ACCLIB_HSREAD_CH_INCLUDED 1
7093 #if !defined(ACCLIB_PUBLIC)
7094 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7096 ACCLIB_PUBLIC(long, acc_safe_hread) (int fd, acc_hvoid_p buf, long size)
7098 acc_hbyte_p b = (acc_hbyte_p) buf;
7101 saved_errno = errno;
7105 #if (ACC_HAVE_MM_HUGE_PTR)
7106 # define __ACCLIB_REQUIRE_HREAD_CH 1
7107 errno = 0; n = acc_hread(fd, b, n);
7108 #elif (ACC_OS_DOS32) && defined(__DJGPP__)
7109 errno = 0; n = _read(fd, b, n);
7111 errno = 0; n = read(fd, b, n);
7117 if (errno == (EAGAIN)) continue;
7120 if (errno == (EINTR)) continue;
7122 if (errno == 0) errno = 1;
7127 errno = saved_errno;
7130 ACCLIB_PUBLIC(long, acc_safe_hwrite) (int fd, const acc_hvoid_p buf, long size)
7132 const acc_hbyte_p b = (const acc_hbyte_p) buf;
7135 saved_errno = errno;
7139 #if (ACC_HAVE_MM_HUGE_PTR)
7140 # define __ACCLIB_REQUIRE_HREAD_CH 1
7141 errno = 0; n = acc_hwrite(fd, b, n);
7142 #elif (ACC_OS_DOS32) && defined(__DJGPP__)
7143 errno = 0; n = _write(fd, b, n);
7145 errno = 0; n = write(fd, b, n);
7151 if (errno == (EAGAIN)) continue;
7154 if (errno == (EINTR)) continue;
7156 if (errno == 0) errno = 1;
7161 errno = saved_errno;
7165 #if defined(ACC_WANT_ACCLIB_PCLOCK)
7166 # undef ACC_WANT_ACCLIB_PCLOCK
7167 #define __ACCLIB_PCLOCK_CH_INCLUDED 1
7168 #if !defined(ACCLIB_PUBLIC)
7169 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7171 #if 1 && (ACC_OS_POSIX_LINUX && ACC_ARCH_AMD64 && ACC_ASM_SYNTAX_GNUC && !ACC_CFG_NO_SYSCALL)
7172 #ifndef acc_pclock_syscall_clock_gettime
7173 #define acc_pclock_syscall_clock_gettime acc_pclock_syscall_clock_gettime
7175 __acc_static_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts)
7177 unsigned long r = 228;
7178 __asm__ __volatile__("syscall\n" : "=a" (r), "=m" (*ts) : "0" (r), "D" (clockid), "S" (ts) __ACC_ASM_CLOBBER_LIST_CC);
7179 return ACC_ICAST(long, r);
7182 #if 1 && (ACC_OS_POSIX_LINUX && ACC_ARCH_I386 && ACC_ASM_SYNTAX_GNUC && !ACC_CFG_NO_SYSCALL) && defined(acc_int64l_t)
7183 #ifndef acc_pclock_syscall_clock_gettime
7184 #define acc_pclock_syscall_clock_gettime acc_pclock_syscall_clock_gettime
7186 __acc_static_noinline long acc_pclock_syscall_clock_gettime(long clockid, struct timespec *ts)
7188 unsigned long r = 265;
7189 __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);
7190 return ACC_ICAST(long, r);
7193 #if 0 && defined(acc_pclock_syscall_clock_gettime)
7194 #ifndef acc_pclock_read_clock_gettime_r_syscall
7195 #define acc_pclock_read_clock_gettime_r_syscall acc_pclock_read_clock_gettime_r_syscall
7197 static int acc_pclock_read_clock_gettime_r_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7200 if (acc_pclock_syscall_clock_gettime(0, &ts) != 0)
7202 c->tv_sec = ts.tv_sec;
7203 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7204 ACC_UNUSED(h); return 0;
7207 #if (HAVE_GETTIMEOFDAY)
7208 #ifndef acc_pclock_read_gettimeofday
7209 #define acc_pclock_read_gettimeofday acc_pclock_read_gettimeofday
7211 static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h, acc_pclock_p c)
7214 if (gettimeofday(&tv, NULL) != 0)
7216 #if defined(acc_int64l_t)
7217 c->tv_sec = tv.tv_sec;
7220 c->tv_sec_low = tv.tv_sec;
7222 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (tv.tv_usec * 1000u));
7223 ACC_UNUSED(h); return 0;
7226 #if defined(CLOCKS_PER_SEC) && !(ACC_CFG_NO_DOUBLE)
7227 #ifndef acc_pclock_read_clock
7228 #define acc_pclock_read_clock acc_pclock_read_clock
7230 static int acc_pclock_read_clock(acc_pclock_handle_p h, acc_pclock_p c)
7234 #if defined(acc_int64l_t)
7235 acc_uint64l_t nsecs;
7237 secs = ACC_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC);
7238 nsecs = ACC_STATIC_CAST(acc_uint64l_t, (secs * 1000000000.0));
7239 c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (nsecs / 1000000000ul));
7240 nsecs = (nsecs % 1000000000ul);
7241 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, nsecs);
7244 secs = ACC_STATIC_CAST(double, ticks) / (CLOCKS_PER_SEC);
7246 c->tv_sec_low = ACC_STATIC_CAST(acc_uint32l_t, (secs + 0.5));
7249 ACC_UNUSED(h); return 0;
7252 #if 1 && defined(acc_pclock_syscall_clock_gettime)
7253 #ifndef acc_pclock_read_clock_gettime_m_syscall
7254 #define acc_pclock_read_clock_gettime_m_syscall acc_pclock_read_clock_gettime_m_syscall
7256 static int acc_pclock_read_clock_gettime_m_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7259 if (acc_pclock_syscall_clock_gettime(1, &ts) != 0)
7261 c->tv_sec = ts.tv_sec;
7262 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7263 ACC_UNUSED(h); return 0;
7266 #if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) && defined(UCLOCKS_PER_SEC) && !(ACC_CFG_NO_DOUBLE)
7267 #ifndef acc_pclock_read_uclock
7268 #define acc_pclock_read_uclock acc_pclock_read_uclock
7270 static int acc_pclock_read_uclock(acc_pclock_handle_p h, acc_pclock_p c)
7272 acc_uint64l_t ticks;
7274 acc_uint64l_t nsecs;
7276 secs = ACC_STATIC_CAST(double, ticks) / (UCLOCKS_PER_SEC);
7277 nsecs = ACC_STATIC_CAST(acc_uint64l_t, (secs * 1000000000.0));
7278 c->tv_sec = nsecs / 1000000000ul;
7279 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (nsecs % 1000000000ul));
7280 ACC_UNUSED(h); return 0;
7283 #if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) && defined(acc_int64l_t)
7284 #ifndef acc_pclock_read_clock_gettime_p_libc
7285 #define acc_pclock_read_clock_gettime_p_libc acc_pclock_read_clock_gettime_p_libc
7287 static int acc_pclock_read_clock_gettime_p_libc(acc_pclock_handle_p h, acc_pclock_p c)
7290 if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) != 0)
7292 c->tv_sec = ts.tv_sec;
7293 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7294 ACC_UNUSED(h); return 0;
7297 #if 1 && defined(acc_pclock_syscall_clock_gettime)
7298 #ifndef acc_pclock_read_clock_gettime_p_syscall
7299 #define acc_pclock_read_clock_gettime_p_syscall acc_pclock_read_clock_gettime_p_syscall
7301 static int acc_pclock_read_clock_gettime_p_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7304 if (acc_pclock_syscall_clock_gettime(2, &ts) != 0)
7306 c->tv_sec = ts.tv_sec;
7307 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7308 ACC_UNUSED(h); return 0;
7311 #if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
7312 #ifndef acc_pclock_read_getprocesstimes
7313 #define acc_pclock_read_getprocesstimes acc_pclock_read_getprocesstimes
7315 static int acc_pclock_read_getprocesstimes(acc_pclock_handle_p h, acc_pclock_p c)
7317 FILETIME ct, et, kt, ut;
7318 acc_uint64l_t ticks;
7319 if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut) == 0)
7321 ticks = (ACC_STATIC_CAST(acc_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime;
7322 if __acc_unlikely(h->ticks_base == 0)
7323 h->ticks_base = ticks;
7325 ticks -= h->ticks_base;
7326 c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (ticks / 10000000ul));
7327 ticks = (ticks % 10000000ul) * 100u;
7328 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ticks);
7329 ACC_UNUSED(h); return 0;
7332 #if (HAVE_GETRUSAGE) && defined(RUSAGE_SELF)
7333 #ifndef acc_pclock_read_getrusage
7334 #define acc_pclock_read_getrusage acc_pclock_read_getrusage
7336 static int acc_pclock_read_getrusage(acc_pclock_handle_p h, acc_pclock_p c)
7339 if (getrusage(RUSAGE_SELF, &ru) != 0)
7341 #if defined(acc_int64l_t)
7342 c->tv_sec = ru.ru_utime.tv_sec;
7345 c->tv_sec_low = ru.ru_utime.tv_sec;
7347 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, (ru.ru_utime.tv_usec * 1000u));
7348 ACC_UNUSED(h); return 0;
7351 #if 1 && (HAVE_CLOCK_GETTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(acc_int64l_t)
7352 #ifndef acc_pclock_read_clock_gettime_t_libc
7353 #define acc_pclock_read_clock_gettime_t_libc acc_pclock_read_clock_gettime_t_libc
7355 static int acc_pclock_read_clock_gettime_t_libc(acc_pclock_handle_p h, acc_pclock_p c)
7358 if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0)
7360 c->tv_sec = ts.tv_sec;
7361 c->tv_nsec = (acc_uint32l_t) ts.tv_nsec;
7362 ACC_UNUSED(h); return 0;
7365 #if 1 && defined(acc_pclock_syscall_clock_gettime)
7366 #ifndef acc_pclock_read_clock_gettime_t_syscall
7367 #define acc_pclock_read_clock_gettime_t_syscall acc_pclock_read_clock_gettime_t_syscall
7369 static int acc_pclock_read_clock_gettime_t_syscall(acc_pclock_handle_p h, acc_pclock_p c)
7372 if (acc_pclock_syscall_clock_gettime(3, &ts) != 0)
7374 c->tv_sec = ts.tv_sec;
7375 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ts.tv_nsec);
7376 ACC_UNUSED(h); return 0;
7379 #if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
7380 #ifndef acc_pclock_read_getthreadtimes
7381 #define acc_pclock_read_getthreadtimes acc_pclock_read_getthreadtimes
7383 static int acc_pclock_read_getthreadtimes(acc_pclock_handle_p h, acc_pclock_p c)
7385 FILETIME ct, et, kt, ut;
7386 acc_uint64l_t ticks;
7387 if (GetThreadTimes(GetCurrentThread(), &ct, &et, &kt, &ut) == 0)
7389 ticks = (ACC_STATIC_CAST(acc_uint64l_t, ut.dwHighDateTime) << 32) | ut.dwLowDateTime;
7390 if __acc_unlikely(h->ticks_base == 0)
7391 h->ticks_base = ticks;
7393 ticks -= h->ticks_base;
7394 c->tv_sec = ACC_STATIC_CAST(acc_int64l_t, (ticks / 10000000ul));
7395 ticks = (ticks % 10000000ul) * 100u;
7396 c->tv_nsec = ACC_STATIC_CAST(acc_uint32l_t, ticks);
7397 ACC_UNUSED(h); return 0;
7400 ACCLIB_PUBLIC(int, acc_pclock_open) (acc_pclock_handle_p h, int mode)
7404 h->h = ACC_STATIC_CAST(acclib_handle_t, 0);
7408 h->gettime = ACC_STATIC_CAST(acc_pclock_gettime_t, 0);
7409 #if defined(acc_int64l_t)
7414 case ACC_PCLOCK_REALTIME:
7415 # if defined(acc_pclock_read_clock_gettime_r_syscall)
7416 if (acc_pclock_read_clock_gettime_r_syscall(h, &c) == 0) {
7417 h->gettime = acc_pclock_read_clock_gettime_r_syscall;
7418 h->name = "CLOCK_REALTIME/syscall";
7422 # if defined(acc_pclock_read_gettimeofday)
7423 if (acc_pclock_read_gettimeofday(h, &c) == 0) {
7424 h->gettime = acc_pclock_read_gettimeofday;
7425 h->name = "gettimeofday";
7430 case ACC_PCLOCK_MONOTONIC:
7431 # if defined(acc_pclock_read_clock_gettime_m_syscall)
7432 if (acc_pclock_read_clock_gettime_m_syscall(h, &c) == 0) {
7433 h->gettime = acc_pclock_read_clock_gettime_m_syscall;
7434 h->name = "CLOCK_MONOTONIC/syscall";
7438 # if defined(acc_pclock_read_uclock)
7439 if (acc_pclock_read_uclock(h, &c) == 0) {
7440 h->gettime = acc_pclock_read_uclock;
7445 # if defined(acc_pclock_read_clock)
7446 if (acc_pclock_read_clock(h, &c) == 0) {
7447 h->gettime = acc_pclock_read_clock;
7453 case ACC_PCLOCK_PROCESS_CPUTIME_ID:
7454 # if defined(acc_pclock_read_getprocesstimes)
7455 if (acc_pclock_read_getprocesstimes(h, &c) == 0) {
7456 h->gettime = acc_pclock_read_getprocesstimes;
7457 h->name = "GetProcessTimes";
7461 # if defined(acc_pclock_read_clock_gettime_p_syscall)
7462 if (acc_pclock_read_clock_gettime_p_syscall(h, &c) == 0) {
7463 h->gettime = acc_pclock_read_clock_gettime_p_syscall;
7464 h->name = "CLOCK_PROCESS_CPUTIME_ID/syscall";
7468 # if defined(acc_pclock_read_clock_gettime_p_libc)
7469 if (acc_pclock_read_clock_gettime_p_libc(h, &c) == 0) {
7470 h->gettime = acc_pclock_read_clock_gettime_p_libc;
7471 h->name = "CLOCK_PROCESS_CPUTIME_ID/libc";
7475 # if defined(acc_pclock_read_getrusage)
7476 if (acc_pclock_read_getrusage(h, &c) == 0) {
7477 h->gettime = acc_pclock_read_getrusage;
7478 h->name = "getrusage";
7483 case ACC_PCLOCK_THREAD_CPUTIME_ID:
7484 # if defined(acc_pclock_read_getthreadtimes)
7485 if (acc_pclock_read_getthreadtimes(h, &c) == 0) {
7486 h->gettime = acc_pclock_read_getthreadtimes;
7487 h->name = "GetThreadTimes";
7490 # if defined(acc_pclock_read_clock_gettime_t_syscall)
7491 if (acc_pclock_read_clock_gettime_t_syscall(h, &c) == 0) {
7492 h->gettime = acc_pclock_read_clock_gettime_t_syscall;
7493 h->name = "CLOCK_THREAD_CPUTIME_ID/syscall";
7497 # if defined(acc_pclock_read_clock_gettime_t_libc)
7498 if (acc_pclock_read_clock_gettime_t_libc(h, &c) == 0) {
7499 h->gettime = acc_pclock_read_clock_gettime_t_libc;
7500 h->name = "CLOCK_THREAD_CPUTIME_ID/libc";
7509 h->h = ACC_STATIC_CAST(acclib_handle_t, 1);
7513 h->name = "unknown";
7514 for (i = 0; i < 10; i++) {
7515 __ACCLIB_FUNCNAME(acc_pclock_read)(h, &c);
7519 ACCLIB_PUBLIC(int, acc_pclock_open_default) (acc_pclock_handle_p h)
7521 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_PROCESS_CPUTIME_ID) == 0)
7523 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_MONOTONIC) == 0)
7525 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_REALTIME) == 0)
7527 if (__ACCLIB_FUNCNAME(acc_pclock_open)(h, ACC_PCLOCK_THREAD_CPUTIME_ID) == 0)
7531 ACCLIB_PUBLIC(int, acc_pclock_close) (acc_pclock_handle_p h)
7533 h->h = ACC_STATIC_CAST(acclib_handle_t, 0);
7536 h->gettime = ACC_STATIC_CAST(acc_pclock_gettime_t, 0);
7539 ACCLIB_PUBLIC(void, acc_pclock_read) (acc_pclock_handle_p h, acc_pclock_p c)
7542 if (h->gettime(h, c) == 0)
7546 #if defined(acc_int64l_t)
7554 #if !(ACC_CFG_NO_DOUBLE)
7555 ACCLIB_PUBLIC(double, acc_pclock_get_elapsed) (acc_pclock_handle_p h, const acc_pclock_p start, const acc_pclock_p stop)
7557 if (!h->h) { h->mode = -1; return 0.0; }
7559 #if 1 && (ACC_ARCH_I386 && ACC_CC_GNUC) && defined(__STRICT_ALIGNMENT__)
7560 float tstop, tstart;
7561 tstop = ACC_STATIC_CAST(float, (stop->tv_sec + stop->tv_nsec / 1000000000.0));
7562 tstart = ACC_STATIC_CAST(float, (start->tv_sec + start->tv_nsec / 1000000000.0));
7563 #elif defined(acc_int64l_t)
7564 double tstop, tstart;
7565 #if 1 && (ACC_CC_INTELC)
7566 { acc_int64l_t a = stop->tv_sec; acc_uint32l_t b = stop->tv_nsec;
7567 tstop = a + b / 1000000000.0; }
7568 { acc_int64l_t a = start->tv_sec; acc_uint32l_t b = start->tv_nsec;
7569 tstart = a + b / 1000000000.0; }
7571 tstop = stop->tv_sec + stop->tv_nsec / 1000000000.0;
7572 tstart = start->tv_sec + start->tv_nsec / 1000000000.0;
7575 double tstop, tstart;
7576 tstop = stop->tv_sec_low + stop->tv_nsec / 1000000000.0;
7577 tstart = start->tv_sec_low + start->tv_nsec / 1000000000.0;
7579 return tstop - tstart;
7583 ACCLIB_PUBLIC(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p h, unsigned flags)
7585 ACC_UNUSED(h); ACC_UNUSED(flags);
7589 #if defined(ACC_WANT_ACCLIB_MISC)
7590 # undef ACC_WANT_ACCLIB_MISC
7591 #define __ACCLIB_MISC_CH_INCLUDED 1
7592 #if !defined(ACCLIB_PUBLIC)
7593 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7595 #if !defined(ACCLIB_PUBLIC_NOINLINE)
7596 # if !defined(__acc_noinline)
7597 # define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
7598 # elif (ACC_CC_CLANG || (ACC_CC_GNUC >= 0x030400ul) || ACC_CC_LLVM)
7599 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
7601 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
7604 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
7606 # pragma warn(disable:2007)
7608 ACCLIB_PUBLIC(const char *, acc_getenv) (const char *s)
7613 ACC_UNUSED(s); return ACC_STATIC_CAST(const char *, 0);
7616 ACCLIB_PUBLIC(acc_intptr_t, acc_get_osfhandle) (int fd)
7621 return get_osfhandle(fd);
7622 #elif (ACC_OS_EMX && defined(__RSXNT__))
7624 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
7626 #elif (ACC_OS_WIN32 || ACC_OS_WIN64)
7627 # if (ACC_CC_PELLESC && (__POCC__ < 280))
7629 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
7631 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
7632 return _os_handle(fd);
7634 return _get_osfhandle(fd);
7640 ACCLIB_PUBLIC(int, acc_set_binmode) (int fd, int binary)
7642 #if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
7643 FILE* fp; int old_binary;
7644 if (fd == STDIN_FILENO) fp = stdin;
7645 else if (fd == STDOUT_FILENO) fp = stdout;
7646 else if (fd == STDERR_FILENO) fp = stderr;
7648 old_binary = fp->__mode.__binary;
7649 __set_binmode(fp, binary ? 1 : 0);
7650 return old_binary ? 1 : 0;
7651 #elif (ACC_ARCH_M68K && ACC_OS_TOS)
7652 ACC_UNUSED(fd); ACC_UNUSED(binary);
7654 #elif (ACC_OS_DOS16 && (ACC_CC_AZTECC || ACC_CC_PACIFICC))
7655 ACC_UNUSED(fd); ACC_UNUSED(binary);
7657 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
7658 int r; unsigned old_flags = __djgpp_hwint_flags;
7659 ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
7660 ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
7661 if (fd < 0) return -1;
7662 r = setmode(fd, binary ? O_BINARY : O_TEXT);
7663 if ((old_flags & 1u) != (__djgpp_hwint_flags & 1u))
7664 __djgpp_set_ctrl_c(!(old_flags & 1));
7665 if (r == -1) return -1;
7666 return (r & O_TEXT) ? 0 : 1;
7667 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
7668 if (fd < 0) return -1;
7671 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
7673 if (fd == fileno(stdin)) fp = stdin;
7674 else if (fd == fileno(stdout)) fp = stdout;
7675 else if (fd == fileno(stderr)) fp = stderr;
7677 r = _setmode(fp, binary ? _BINARY : _TEXT);
7678 if (r == -1) return -1;
7679 return (r & _BINARY) ? 1 : 0;
7680 #elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
7681 ACC_UNUSED(fd); ACC_UNUSED(binary);
7683 #elif (ACC_OS_CYGWIN && (ACC_CC_GNUC < 0x025a00ul))
7684 ACC_UNUSED(fd); ACC_UNUSED(binary);
7686 #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)
7688 #if !(ACC_CC_ZORTECHC)
7689 ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
7691 ACC_COMPILE_TIME_ASSERT(O_TEXT > 0)
7692 if (fd < 0) return -1;
7693 r = setmode(fd, binary ? O_BINARY : O_TEXT);
7694 if (r == -1) return -1;
7695 return (r & O_TEXT) ? 0 : 1;
7697 if (fd < 0) return -1;
7702 ACCLIB_PUBLIC(int, acc_isatty) (int fd)
7706 #if (ACC_OS_DOS16 && !(ACC_CC_AZTECC))
7709 ri.x.ax = 0x4400; ri.x.bx = fd;
7710 int86(0x21, &ri, &ro);
7711 if ((ro.x.cflag & 1) == 0)
7712 if ((ro.x.ax & 0x83) != 0x83)
7715 #elif (ACC_OS_DOS32 && ACC_CC_WATCOMC)
7718 ri.w.ax = 0x4400; ri.w.bx = ACC_STATIC_CAST(unsigned short, fd);
7719 int386(0x21, &ri, &ro);
7720 if ((ro.w.cflag & 1) == 0)
7721 if ((ro.w.ax & 0x83) != 0x83)
7724 #elif (ACC_HAVE_WINDOWS_H)
7726 acc_intptr_t h = __ACCLIB_FUNCNAME(acc_get_osfhandle)(fd);
7727 ACC_COMPILE_TIME_ASSERT(sizeof(h) == sizeof(HANDLE))
7731 if (GetConsoleMode(ACC_REINTERPRET_CAST(HANDLE, h), &d) == 0)
7737 return (isatty(fd)) ? 1 : 0;
7742 ACCLIB_PUBLIC(int, acc_mkdir) (const char* name, unsigned mode)
7745 ACC_UNUSED(name); ACC_UNUSED(mode);
7747 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
7749 return Dcreate(name);
7750 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
7751 return mkdir(name, mode);
7752 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
7753 return mkdir(name, mode);
7754 #elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC))
7756 return mkdir(ACC_UNCONST_CAST(char *, name));
7757 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
7760 #elif (ACC_CC_WATCOMC)
7761 return mkdir(name, ACC_STATIC_CAST(mode_t, mode));
7763 return mkdir(name, mode);
7766 ACCLIB_PUBLIC(int, acc_rmdir) (const char* name)
7771 #elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC))
7772 return rmdir(ACC_UNCONST_CAST(char *, name));
7777 #if defined(acc_int32e_t)
7778 ACCLIB_PUBLIC(acc_int32e_t, acc_muldiv32s) (acc_int32e_t a, acc_int32e_t b, acc_int32e_t x)
7781 if __acc_likely(x != 0)
7783 #if defined(acc_int64l_t)
7784 acc_int64l_t rr = (ACC_ICONV(acc_int64l_t, a) * b) / x;
7785 r = ACC_ITRUNC(acc_int32e_t, rr);
7787 ACC_UNUSED(a); ACC_UNUSED(b);
7792 ACCLIB_PUBLIC(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t a, acc_uint32e_t b, acc_uint32e_t x)
7794 acc_uint32e_t r = 0;
7795 if __acc_likely(x != 0)
7797 #if defined(acc_int64l_t)
7798 acc_uint64l_t rr = (ACC_ICONV(acc_uint64l_t, a) * b) / x;
7799 r = ACC_ITRUNC(acc_uint32e_t, rr);
7801 ACC_UNUSED(a); ACC_UNUSED(b);
7808 ACC_EXTERN_C void __far __pascal DebugBreak(void);
7810 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_break) (void)
7814 #elif (ACC_ARCH_I086)
7815 #elif (ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H)
7817 #elif (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7818 __asm__ __volatile__("int $3\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7819 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
7821 #elif (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H)
7824 volatile acc_intptr_t a = -1;
7825 * ACC_STATIC_CAST(volatile unsigned long *, ACC_REINTERPRET_CAST(volatile void *, a)) = ~0ul;
7828 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_nop) (void)
7831 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void)
7833 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7834 # if (ACC_ARCH_AMD64)
7835 acc_uint64e_t r = 0;
7839 __asm__ __volatile__("pushf\n pop %0\n" : "=a" (r) : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7840 return ACC_ICONV(int, (r >> 18) & 1);
7841 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
7848 return ACC_ICONV(int, (r >> 18) & 1);
7853 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_enable) (int v)
7855 #if (ACC_ARCH_AMD64) && (ACC_ASM_SYNTAX_GNUC)
7857 __asm__ __volatile__("pushf\n orl $262144,(%%rsp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7859 __asm__ __volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7862 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7864 __asm__ __volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7866 __asm__ __volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : __ACC_ASM_CLOBBER_LIST_CC_MEMORY);
7869 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
7872 or dword ptr [esp],262144
7876 and dword ptr [esp],-262145
7881 ACC_UNUSED(v); return -1;
7884 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_qemu) (void)
7887 #if (ACC_OS_POSIX_LINUX || ACC_OS_WIN32 || ACC_OS_WIN64)
7889 p = __ACCLIB_FUNCNAME(acc_getenv)(ACC_PP_STRINGIZE(ACC_ENV_RUNNING_ON_QEMU));
7891 if (p[0] == 0) r = 0;
7892 else if ((p[0] >= '0' && p[0] <= '9') && p[1] == 0) r = ACC_ICAST(unsigned, p[0]) - '0';
7898 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void)
7900 #if (ACC_ARCH_AMD64 && ACC_ABI_ILP32)
7902 #elif (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
7903 volatile size_t a[6];
7905 a[0] = 0x1001; a[1] = 0; a[2] = 0; a[3] = 0; a[4] = 0; a[5] = 0;
7906 # if (ACC_ARCH_AMD64)
7907 __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);
7908 # elif (ACC_ARCH_I386)
7909 __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);
7911 return ACC_ITRUNC(unsigned, r);
7916 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
7920 #if defined(ACC_WANT_ACCLIB_WILDARGV)
7921 # undef ACC_WANT_ACCLIB_WILDARGV
7922 #define __ACCLIB_WILDARGV_CH_INCLUDED 1
7923 #if !defined(ACCLIB_PUBLIC)
7924 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
7926 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
7927 #if 0 && (ACC_CC_MSC)
7928 ACC_EXTERN_C int __acc_cdecl __setargv(void);
7929 ACC_EXTERN_C int __acc_cdecl _setargv(void);
7930 ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
7933 #if (ACC_OS_WIN32 || ACC_OS_WIN64)
7934 #if (ACC_CC_MSC && (_MSC_VER >= 1900))
7935 #elif (ACC_CC_INTELC || ACC_CC_MSC)
7936 ACC_EXTERN_C int __acc_cdecl __setargv(void);
7937 ACC_EXTERN_C int __acc_cdecl _setargv(void);
7938 ACC_EXTERN_C int __acc_cdecl _setargv(void) { return __setargv(); }
7942 #define __ACCLIB_HAVE_ACC_WILDARGV 1
7943 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
7946 _response(argc, argv);
7947 _wildcard(argc, argv);
7951 #if (ACC_OS_CONSOLE_PSP) && defined(__PSPSDK_DEBUG__)
7952 #define __ACCLIB_HAVE_ACC_WILDARGV 1
7953 ACC_EXTERN_C int acc_psp_init_module(int*, char***, int);
7954 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
7956 acc_psp_init_module(argc, argv, -1);
7959 #if !(__ACCLIB_HAVE_ACC_WILDARGV)
7960 #define __ACCLIB_HAVE_ACC_WILDARGV 1
7961 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv)
7963 #if 1 && (ACC_ARCH_I086PM)
7964 if (ACC_MM_AHSHIFT != 3) { exit(1); }
7965 #elif 1 && (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
7967 if (isatty(1)) __set_binmode(stdout, 0);
7968 if (isatty(2)) __set_binmode(stderr, 0);
7970 ACC_UNUSED(argc); ACC_UNUSED(argv);
7975 /* vim:set ts=4 sw=4 et: */