1 /* ACC --- Automatic Compiler Configuration
3 This file is part of the LZO real-time data compression library.
5 Copyright (C) 2008 Markus Franz Xaver Johannes Oberhumer
6 Copyright (C) 2007 Markus Franz Xaver Johannes Oberhumer
7 Copyright (C) 2006 Markus Franz Xaver Johannes Oberhumer
8 Copyright (C) 2005 Markus Franz Xaver Johannes Oberhumer
9 Copyright (C) 2004 Markus Franz Xaver Johannes Oberhumer
10 Copyright (C) 2003 Markus Franz Xaver Johannes Oberhumer
11 Copyright (C) 2002 Markus Franz Xaver Johannes Oberhumer
12 Copyright (C) 2001 Markus Franz Xaver Johannes Oberhumer
13 Copyright (C) 2000 Markus Franz Xaver Johannes Oberhumer
14 Copyright (C) 1999 Markus Franz Xaver Johannes Oberhumer
15 Copyright (C) 1998 Markus Franz Xaver Johannes Oberhumer
16 Copyright (C) 1997 Markus Franz Xaver Johannes Oberhumer
17 Copyright (C) 1996 Markus Franz Xaver Johannes Oberhumer
20 The LZO library is free software; you can redistribute it and/or
21 modify it under the terms of the GNU General Public License as
22 published by the Free Software Foundation; either version 2 of
23 the License, or (at your option) any later version.
25 The LZO library is distributed in the hope that it will be useful,
26 but WITHOUT ANY WARRANTY; without even the implied warranty of
27 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 GNU General Public License for more details.
30 You should have received a copy of the GNU General Public License
31 along with the LZO library; see the file COPYING.
32 If not, write to the Free Software Foundation, Inc.,
33 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
35 Markus F.X.J. Oberhumer
36 <markus@oberhumer.com>
37 http://www.oberhumer.com/opensource/lzo/
41 #ifndef __ACC_H_INCLUDED
42 #define __ACC_H_INCLUDED 1
43 #define ACC_VERSION 20080430L
44 #if defined(__CYGWIN32__) && !defined(__CYGWIN__)
45 # define __CYGWIN__ __CYGWIN32__
47 #if defined(__IBMCPP__) && !defined(__IBMC__)
48 # define __IBMC__ __IBMCPP__
50 #if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER)
51 # define __INTEL_COMPILER __ICL
53 #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE)
54 # define _ALL_SOURCE 1
56 #if defined(__mips__) && defined(__R5900__)
57 # if !defined(__LONG_MAX__)
58 # define __LONG_MAX__ 9223372036854775807L
61 #if defined(__INTEL_COMPILER) && defined(__linux__)
62 # pragma warning(disable: 193)
64 #if defined(__KEIL__) && defined(__C166__)
65 # pragma warning disable = 322
66 #elif 0 && defined(__C251__)
67 # pragma warning disable = 322
69 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__)
70 # if (_MSC_VER >= 1300)
71 # pragma warning(disable: 4668)
74 #if defined(__POCC__) && defined(_WIN32)
75 # if (__POCC__ >= 400)
76 # pragma warn(disable: 2216)
79 #if 0 && defined(__WATCOMC__)
80 # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060)
81 # pragma warning 203 9
84 #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__)
87 #if defined(ACC_CFG_NO_CONFIG_HEADER)
88 #elif defined(ACC_CFG_CONFIG_HEADER)
89 # include ACC_CFG_CONFIG_HEADER
92 #if defined(ACC_CFG_NO_LIMITS_H)
93 #elif defined(ACC_LIBC_NAKED) || defined(ACC_BROKEN_LIMITS_H)
94 #ifndef __ACC_FALLBACK_LIMITS_H_INCLUDED
95 #define __ACC_FALLBACK_LIMITS_H_INCLUDED
101 #ifndef __SCHAR_MAX__
102 #define __SCHAR_MAX__ 127
105 #define __SHRT_MAX__ 32767
108 #define __INT_MAX__ 2147483647
111 #if defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__)
112 #define __LONG_MAX__ 9223372036854775807L
114 #define __LONG_MAX__ 2147483647L
120 #define SCHAR_MIN (-1 - SCHAR_MAX)
121 #define SCHAR_MAX (__SCHAR_MAX__)
122 #define UCHAR_MAX (SCHAR_MAX * 2 + 1)
126 #define SHRT_MIN (-1 - SHRT_MAX)
127 #define SHRT_MAX (__SHRT_MAX__)
128 #if ((__INT_MAX__) == (__SHRT_MAX__))
129 #define USHRT_MAX (SHRT_MAX * 2U + 1U)
131 #define USHRT_MAX (SHRT_MAX * 2 + 1)
136 #define INT_MIN (-1 - INT_MAX)
137 #define INT_MAX (__INT_MAX__)
138 #define UINT_MAX (INT_MAX * 2U + 1U)
142 #define LONG_MIN (-1L - LONG_MAX)
143 #define LONG_MAX ((__LONG_MAX__) + 0L)
144 #define ULONG_MAX (LONG_MAX * 2UL + 1UL)
147 #if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED)
149 #define CHAR_MAX UCHAR_MAX
151 #define CHAR_MIN SCHAR_MIN
152 #define CHAR_MAX SCHAR_MAX
159 #define ACC_0xffffL 0xfffful
160 #define ACC_0xffffffffL 0xfffffffful
162 #define ACC_0xffffL 65535ul
163 #define ACC_0xffffffffL 4294967295ul
165 #if (ACC_0xffffL == ACC_0xffffffffL)
166 # error "your preprocessor is broken 1"
168 #if (16ul * 16384ul != 262144ul)
169 # error "your preprocessor is broken 2"
172 #if (32767 >= 4294967295ul)
173 # error "your preprocessor is broken 3"
175 #if (65535u >= 4294967295ul)
176 # error "your preprocessor is broken 4"
179 #if (UINT_MAX == ACC_0xffffL)
180 #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__)
184 # if !defined(_MSDOS)
187 #elif 0 && defined(__VERSION) && defined(MB_LEN_MAX)
188 # if (__VERSION == 520) && (MB_LEN_MAX == 1)
189 # if !defined(__AZTEC_C__)
190 # define __AZTEC_C__ __VERSION
192 # if !defined(__DOS__)
198 #if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == ACC_0xffffL)
199 # define ptrdiff_t long
200 # define _PTRDIFF_T_DEFINED
202 #if (UINT_MAX == ACC_0xffffL)
203 # undef __ACC_RENAME_A
204 # undef __ACC_RENAME_B
205 # if defined(__AZTEC_C__) && defined(__DOS__)
206 # define __ACC_RENAME_A 1
207 # elif defined(_MSC_VER) && defined(MSDOS)
208 # if (_MSC_VER < 600)
209 # define __ACC_RENAME_A 1
210 # elif (_MSC_VER < 700)
211 # define __ACC_RENAME_B 1
213 # elif defined(__TSC__) && defined(__OS2__)
214 # define __ACC_RENAME_A 1
215 # elif defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0410)
216 # define __ACC_RENAME_A 1
217 # elif defined(__PACIFIC__) && defined(DOS)
221 # if !defined(__near)
225 # if defined(__ACC_RENAME_A)
226 # if !defined(__cdecl)
227 # define __cdecl cdecl
232 # if !defined(__huge)
235 # if !defined(__near)
238 # if !defined(__pascal)
239 # define __pascal pascal
241 # if !defined(__huge)
244 # elif defined(__ACC_RENAME_B)
245 # if !defined(__cdecl)
246 # define __cdecl _cdecl
251 # if !defined(__huge)
252 # define __huge _huge
254 # if !defined(__near)
255 # define __near _near
257 # if !defined(__pascal)
258 # define __pascal _pascal
260 # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
261 # if !defined(__cdecl)
262 # define __cdecl cdecl
264 # if !defined(__pascal)
265 # define __pascal pascal
268 # undef __ACC_RENAME_A
269 # undef __ACC_RENAME_B
271 #if (UINT_MAX == ACC_0xffffL)
272 #if defined(__AZTEC_C__) && defined(__DOS__)
273 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
274 #elif defined(_MSC_VER) && defined(MSDOS)
275 # if (_MSC_VER < 600)
276 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
278 # if (_MSC_VER < 700)
279 # define ACC_BROKEN_INTEGRAL_PROMOTION 1
280 # define ACC_BROKEN_SIZEOF 1
282 #elif defined(__PACIFIC__) && defined(DOS)
283 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
284 #elif defined(__TURBOC__) && defined(__MSDOS__)
285 # if (__TURBOC__ < 0x0150)
286 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
287 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
288 # define ACC_BROKEN_INTEGRAL_PROMOTION 1
290 # if (__TURBOC__ < 0x0200)
291 # define ACC_BROKEN_SIZEOF 1
293 # if (__TURBOC__ < 0x0400) && defined(__cplusplus)
294 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
296 #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__)
297 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1
298 # define ACC_BROKEN_SIZEOF 1
301 #if defined(__WATCOMC__) && (__WATCOMC__ < 900)
302 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1
304 #if defined(_CRAY) && defined(_CRAY1)
305 # define ACC_BROKEN_SIGNED_RIGHT_SHIFT 1
307 #define ACC_PP_STRINGIZE(x) #x
308 #define ACC_PP_MACRO_EXPAND(x) ACC_PP_STRINGIZE(x)
309 #define ACC_PP_CONCAT2(a,b) a ## b
310 #define ACC_PP_CONCAT3(a,b,c) a ## b ## c
311 #define ACC_PP_CONCAT4(a,b,c,d) a ## b ## c ## d
312 #define ACC_PP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
313 #define ACC_PP_ECONCAT2(a,b) ACC_PP_CONCAT2(a,b)
314 #define ACC_PP_ECONCAT3(a,b,c) ACC_PP_CONCAT3(a,b,c)
315 #define ACC_PP_ECONCAT4(a,b,c,d) ACC_PP_CONCAT4(a,b,c,d)
316 #define ACC_PP_ECONCAT5(a,b,c,d,e) ACC_PP_CONCAT5(a,b,c,d,e)
318 #define ACC_CPP_STRINGIZE(x) #x
319 #define ACC_CPP_MACRO_EXPAND(x) ACC_CPP_STRINGIZE(x)
320 #define ACC_CPP_CONCAT2(a,b) a ## b
321 #define ACC_CPP_CONCAT3(a,b,c) a ## b ## c
322 #define ACC_CPP_CONCAT4(a,b,c,d) a ## b ## c ## d
323 #define ACC_CPP_CONCAT5(a,b,c,d,e) a ## b ## c ## d ## e
324 #define ACC_CPP_ECONCAT2(a,b) ACC_CPP_CONCAT2(a,b)
325 #define ACC_CPP_ECONCAT3(a,b,c) ACC_CPP_CONCAT3(a,b,c)
326 #define ACC_CPP_ECONCAT4(a,b,c,d) ACC_CPP_CONCAT4(a,b,c,d)
327 #define ACC_CPP_ECONCAT5(a,b,c,d,e) ACC_CPP_CONCAT5(a,b,c,d,e)
329 #define __ACC_MASK_GEN(o,b) (((((o) << ((b)-1)) - (o)) << 1) + (o))
330 #if 1 && defined(__cplusplus)
331 # if !defined(__STDC_CONSTANT_MACROS)
332 # define __STDC_CONSTANT_MACROS 1
334 # if !defined(__STDC_LIMIT_MACROS)
335 # define __STDC_LIMIT_MACROS 1
338 #if defined(__cplusplus)
339 # define ACC_EXTERN_C extern "C"
341 # define ACC_EXTERN_C extern
343 #if !defined(__ACC_OS_OVERRIDE)
344 #if defined(ACC_OS_FREESTANDING)
345 # define ACC_INFO_OS "freestanding"
346 #elif defined(ACC_OS_EMBEDDED)
347 # define ACC_INFO_OS "embedded"
348 #elif 1 && defined(__IAR_SYSTEMS_ICC__)
349 # define ACC_OS_EMBEDDED 1
350 # define ACC_INFO_OS "embedded"
351 #elif defined(__CYGWIN__) && defined(__GNUC__)
352 # define ACC_OS_CYGWIN 1
353 # define ACC_INFO_OS "cygwin"
354 #elif defined(__EMX__) && defined(__GNUC__)
355 # define ACC_OS_EMX 1
356 # define ACC_INFO_OS "emx"
357 #elif defined(__BEOS__)
358 # define ACC_OS_BEOS 1
359 # define ACC_INFO_OS "beos"
360 #elif defined(__Lynx__)
361 # define ACC_OS_LYNXOS 1
362 # define ACC_INFO_OS "lynxos"
363 #elif defined(__OS400__)
364 # define ACC_OS_OS400 1
365 # define ACC_INFO_OS "os400"
366 #elif defined(__QNX__)
367 # define ACC_OS_QNX 1
368 # define ACC_INFO_OS "qnx"
369 #elif defined(__BORLANDC__) && defined(__DPMI32__) && (__BORLANDC__ >= 0x0460)
370 # define ACC_OS_DOS32 1
371 # define ACC_INFO_OS "dos32"
372 #elif defined(__BORLANDC__) && defined(__DPMI16__)
373 # define ACC_OS_DOS16 1
374 # define ACC_INFO_OS "dos16"
375 #elif defined(__ZTC__) && defined(DOS386)
376 # define ACC_OS_DOS32 1
377 # define ACC_INFO_OS "dos32"
378 #elif defined(__OS2__) || defined(__OS2V2__)
379 # if (UINT_MAX == ACC_0xffffL)
380 # define ACC_OS_OS216 1
381 # define ACC_INFO_OS "os216"
382 # elif (UINT_MAX == ACC_0xffffffffL)
383 # define ACC_OS_OS2 1
384 # define ACC_INFO_OS "os2"
386 # error "check your limits.h header"
388 #elif defined(__WIN64__) || defined(_WIN64) || defined(WIN64)
389 # define ACC_OS_WIN64 1
390 # define ACC_INFO_OS "win64"
391 #elif defined(__WIN32__) || defined(_WIN32) || defined(WIN32) || defined(__WINDOWS_386__)
392 # define ACC_OS_WIN32 1
393 # define ACC_INFO_OS "win32"
394 #elif defined(__MWERKS__) && defined(__INTEL__)
395 # define ACC_OS_WIN32 1
396 # define ACC_INFO_OS "win32"
397 #elif defined(__WINDOWS__) || defined(_WINDOWS) || defined(_Windows)
398 # if (UINT_MAX == ACC_0xffffL)
399 # define ACC_OS_WIN16 1
400 # define ACC_INFO_OS "win16"
401 # elif (UINT_MAX == ACC_0xffffffffL)
402 # define ACC_OS_WIN32 1
403 # define ACC_INFO_OS "win32"
405 # error "check your limits.h header"
407 #elif defined(__DOS__) || defined(__MSDOS__) || defined(_MSDOS) || defined(MSDOS) || (defined(__PACIFIC__) && defined(DOS))
408 # if (UINT_MAX == ACC_0xffffL)
409 # define ACC_OS_DOS16 1
410 # define ACC_INFO_OS "dos16"
411 # elif (UINT_MAX == ACC_0xffffffffL)
412 # define ACC_OS_DOS32 1
413 # define ACC_INFO_OS "dos32"
415 # error "check your limits.h header"
417 #elif defined(__WATCOMC__)
418 # if defined(__NT__) && (UINT_MAX == ACC_0xffffL)
419 # define ACC_OS_DOS16 1
420 # define ACC_INFO_OS "dos16"
421 # elif defined(__NT__) && (__WATCOMC__ < 1100)
422 # define ACC_OS_WIN32 1
423 # define ACC_INFO_OS "win32"
424 # elif defined(__linux__) || defined(__LINUX__)
425 # define ACC_OS_POSIX 1
426 # define ACC_INFO_OS "posix"
428 # error "please specify a target using the -bt compiler option"
430 #elif defined(__palmos__)
431 # define ACC_OS_PALMOS 1
432 # define ACC_INFO_OS "palmos"
433 #elif defined(__TOS__) || defined(__atarist__)
434 # define ACC_OS_TOS 1
435 # define ACC_INFO_OS "tos"
436 #elif defined(macintosh) && !defined(__ppc__)
437 # define ACC_OS_MACCLASSIC 1
438 # define ACC_INFO_OS "macclassic"
440 # define ACC_OS_VMS 1
441 # define ACC_INFO_OS "vms"
442 #elif ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
443 # define ACC_OS_CONSOLE 1
444 # define ACC_OS_CONSOLE_PS2 1
445 # define ACC_INFO_OS "console"
446 # define ACC_INFO_OS_CONSOLE "ps2"
447 #elif (defined(__mips__) && defined(__psp__))
448 # define ACC_OS_CONSOLE 1
449 # define ACC_OS_CONSOLE_PSP 1
450 # define ACC_INFO_OS "console"
451 # define ACC_INFO_OS_CONSOLE "psp"
453 # define ACC_OS_POSIX 1
454 # define ACC_INFO_OS "posix"
457 # if defined(_AIX) || defined(__AIX__) || defined(__aix__)
458 # define ACC_OS_POSIX_AIX 1
459 # define ACC_INFO_OS_POSIX "aix"
460 # elif defined(__FreeBSD__)
461 # define ACC_OS_POSIX_FREEBSD 1
462 # define ACC_INFO_OS_POSIX "freebsd"
463 # elif defined(__hpux__) || defined(__hpux)
464 # define ACC_OS_POSIX_HPUX 1
465 # define ACC_INFO_OS_POSIX "hpux"
466 # elif defined(__INTERIX)
467 # define ACC_OS_POSIX_INTERIX 1
468 # define ACC_INFO_OS_POSIX "interix"
469 # elif defined(__IRIX__) || defined(__irix__)
470 # define ACC_OS_POSIX_IRIX 1
471 # define ACC_INFO_OS_POSIX "irix"
472 # elif defined(__linux__) || defined(__linux) || defined(__LINUX__)
473 # define ACC_OS_POSIX_LINUX 1
474 # define ACC_INFO_OS_POSIX "linux"
475 # elif defined(__APPLE__) || defined(__MACOS__)
476 # define ACC_OS_POSIX_MACOSX 1
477 # define ACC_INFO_OS_POSIX "macosx"
478 # elif defined(__minix__) || defined(__minix)
479 # define ACC_OS_POSIX_MINIX 1
480 # define ACC_INFO_OS_POSIX "minix"
481 # elif defined(__NetBSD__)
482 # define ACC_OS_POSIX_NETBSD 1
483 # define ACC_INFO_OS_POSIX "netbsd"
484 # elif defined(__OpenBSD__)
485 # define ACC_OS_POSIX_OPENBSD 1
486 # define ACC_INFO_OS_POSIX "openbsd"
487 # elif defined(__osf__)
488 # define ACC_OS_POSIX_OSF 1
489 # define ACC_INFO_OS_POSIX "osf"
490 # elif defined(__solaris__) || defined(__sun)
491 # if defined(__SVR4) || defined(__svr4__)
492 # define ACC_OS_POSIX_SOLARIS 1
493 # define ACC_INFO_OS_POSIX "solaris"
495 # define ACC_OS_POSIX_SUNOS 1
496 # define ACC_INFO_OS_POSIX "sunos"
498 # elif defined(__ultrix__) || defined(__ultrix)
499 # define ACC_OS_POSIX_ULTRIX 1
500 # define ACC_INFO_OS_POSIX "ultrix"
501 # elif defined(_UNICOS)
502 # define ACC_OS_POSIX_UNICOS 1
503 # define ACC_INFO_OS_POSIX "unicos"
505 # define ACC_OS_POSIX_UNKNOWN 1
506 # define ACC_INFO_OS_POSIX "unknown"
510 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
511 # if (UINT_MAX != ACC_0xffffL)
512 # error "this should not happen"
514 # if (ULONG_MAX != ACC_0xffffffffL)
515 # error "this should not happen"
518 #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32 || ACC_OS_WIN64)
519 # if (UINT_MAX != ACC_0xffffffffL)
520 # error "this should not happen"
522 # if (ULONG_MAX != ACC_0xffffffffL)
523 # error "this should not happen"
526 #if defined(CIL) && defined(_GNUCC) && defined(__GNUC__)
527 # define ACC_CC_CILLY 1
528 # define ACC_INFO_CC "Cilly"
529 # if defined(__CILLY__)
530 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__CILLY__)
532 # define ACC_INFO_CCVER "unknown"
534 #elif 0 && defined(SDCC) && defined(__VERSION__) && !defined(__GNUC__)
535 # define ACC_CC_SDCC 1
536 # define ACC_INFO_CC "sdcc"
537 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(SDCC)
538 #elif defined(__PATHSCALE__) && defined(__PATHCC_PATCHLEVEL__)
539 # define ACC_CC_PATHSCALE (__PATHCC__ * 0x10000L + __PATHCC_MINOR__ * 0x100 + __PATHCC_PATCHLEVEL__)
540 # define ACC_INFO_CC "Pathscale C"
541 # define ACC_INFO_CCVER __PATHSCALE__
542 #elif defined(__INTEL_COMPILER)
543 # define ACC_CC_INTELC 1
544 # define ACC_INFO_CC "Intel C"
545 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__INTEL_COMPILER)
546 # if defined(_WIN32) || defined(_WIN64)
547 # define ACC_CC_SYNTAX_MSC 1
549 # define ACC_CC_SYNTAX_GNUC 1
551 #elif defined(__POCC__) && defined(_WIN32)
552 # define ACC_CC_PELLESC 1
553 # define ACC_INFO_CC "Pelles C"
554 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__POCC__)
555 #elif defined(__llvm__) && defined(__GNUC__) && defined(__VERSION__)
556 # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
557 # define ACC_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
559 # define ACC_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
561 # define ACC_INFO_CC "llvm-gcc"
562 # define ACC_INFO_CCVER __VERSION__
563 #elif defined(__GNUC__) && defined(__VERSION__)
564 # if defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
565 # define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100 + __GNUC_PATCHLEVEL__)
566 # elif defined(__GNUC_MINOR__)
567 # define ACC_CC_GNUC (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100)
569 # define ACC_CC_GNUC (__GNUC__ * 0x10000L)
571 # define ACC_INFO_CC "gcc"
572 # define ACC_INFO_CCVER __VERSION__
573 #elif defined(__ACK__) && defined(_ACK)
574 # define ACC_CC_ACK 1
575 # define ACC_INFO_CC "Amsterdam Compiler Kit C"
576 # define ACC_INFO_CCVER "unknown"
577 #elif defined(__AZTEC_C__)
578 # define ACC_CC_AZTECC 1
579 # define ACC_INFO_CC "Aztec C"
580 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__AZTEC_C__)
581 #elif defined(__BORLANDC__)
582 # define ACC_CC_BORLANDC 1
583 # define ACC_INFO_CC "Borland C"
584 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__BORLANDC__)
585 #elif defined(_CRAYC) && defined(_RELEASE)
586 # define ACC_CC_CRAYC 1
587 # define ACC_INFO_CC "Cray C"
588 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_RELEASE)
589 #elif defined(__DMC__) && defined(__SC__)
590 # define ACC_CC_DMC 1
591 # define ACC_INFO_CC "Digital Mars C"
592 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DMC__)
593 #elif defined(__DECC)
594 # define ACC_CC_DECC 1
595 # define ACC_INFO_CC "DEC C"
596 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__DECC)
597 #elif defined(__HIGHC__)
598 # define ACC_CC_HIGHC 1
599 # define ACC_INFO_CC "MetaWare High C"
600 # define ACC_INFO_CCVER "unknown"
601 #elif defined(__IAR_SYSTEMS_ICC__)
602 # define ACC_CC_IARC 1
603 # define ACC_INFO_CC "IAR C"
604 # if defined(__VER__)
605 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__VER__)
607 # define ACC_INFO_CCVER "unknown"
609 #elif defined(__IBMC__)
610 # define ACC_CC_IBMC 1
611 # define ACC_INFO_CC "IBM C"
612 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__IBMC__)
613 #elif defined(__KEIL__) && defined(__C166__)
614 # define ACC_CC_KEILC 1
615 # define ACC_INFO_CC "Keil C"
616 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__C166__)
617 #elif defined(__LCC__) && defined(_WIN32) && defined(__LCCOPTIMLEVEL)
618 # define ACC_CC_LCCWIN32 1
619 # define ACC_INFO_CC "lcc-win32"
620 # define ACC_INFO_CCVER "unknown"
621 #elif defined(__LCC__)
622 # define ACC_CC_LCC 1
623 # define ACC_INFO_CC "lcc"
624 # if defined(__LCC_VERSION__)
625 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__LCC_VERSION__)
627 # define ACC_INFO_CCVER "unknown"
629 #elif defined(_MSC_VER)
630 # define ACC_CC_MSC 1
631 # define ACC_INFO_CC "Microsoft C"
632 # if defined(_MSC_FULL_VER)
633 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) "." ACC_PP_MACRO_EXPAND(_MSC_FULL_VER)
635 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER)
637 #elif defined(__MWERKS__)
638 # define ACC_CC_MWERKS 1
639 # define ACC_INFO_CC "Metrowerks C"
640 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__MWERKS__)
641 #elif (defined(__NDPC__) || defined(__NDPX__)) && defined(__i386)
642 # define ACC_CC_NDPC 1
643 # define ACC_INFO_CC "Microway NDP C"
644 # define ACC_INFO_CCVER "unknown"
645 #elif defined(__PACIFIC__)
646 # define ACC_CC_PACIFICC 1
647 # define ACC_INFO_CC "Pacific C"
648 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PACIFIC__)
649 #elif defined(__PGI) && (defined(__linux__) || defined(__WIN32__))
650 # define ACC_CC_PGI 1
651 # define ACC_INFO_CC "Portland Group PGI C"
652 # define ACC_INFO_CCVER "unknown"
653 #elif defined(__PUREC__) && defined(__TOS__)
654 # define ACC_CC_PUREC 1
655 # define ACC_INFO_CC "Pure C"
656 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__PUREC__)
657 #elif defined(__SC__) && defined(__ZTC__)
658 # define ACC_CC_SYMANTECC 1
659 # define ACC_INFO_CC "Symantec C"
660 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SC__)
661 #elif defined(__SUNPRO_C)
662 # define ACC_INFO_CC "SunPro C"
663 # if ((__SUNPRO_C)+0 > 0)
664 # define ACC_CC_SUNPROC __SUNPRO_C
665 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_C)
667 # define ACC_CC_SUNPROC 1
668 # define ACC_INFO_CCVER "unknown"
670 #elif defined(__SUNPRO_CC)
671 # define ACC_INFO_CC "SunPro C"
672 # if ((__SUNPRO_CC)+0 > 0)
673 # define ACC_CC_SUNPROC __SUNPRO_CC
674 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__SUNPRO_CC)
676 # define ACC_CC_SUNPROC 1
677 # define ACC_INFO_CCVER "unknown"
679 #elif defined(__TINYC__)
680 # define ACC_CC_TINYC 1
681 # define ACC_INFO_CC "Tiny C"
682 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TINYC__)
683 #elif defined(__TSC__)
684 # define ACC_CC_TOPSPEEDC 1
685 # define ACC_INFO_CC "TopSpeed C"
686 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TSC__)
687 #elif defined(__WATCOMC__)
688 # define ACC_CC_WATCOMC 1
689 # define ACC_INFO_CC "Watcom C"
690 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__WATCOMC__)
691 #elif defined(__TURBOC__)
692 # define ACC_CC_TURBOC 1
693 # define ACC_INFO_CC "Turbo C"
694 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__TURBOC__)
695 #elif defined(__ZTC__)
696 # define ACC_CC_ZORTECHC 1
697 # define ACC_INFO_CC "Zortech C"
698 # if (__ZTC__ == 0x310)
699 # define ACC_INFO_CCVER "0x310"
701 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ZTC__)
704 # define ACC_CC_UNKNOWN 1
705 # define ACC_INFO_CC "unknown"
706 # define ACC_INFO_CCVER "unknown"
708 #if 0 && (ACC_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER)
709 # error "ACC_CC_MSC: _MSC_FULL_VER is not defined"
711 #if !defined(__ACC_ARCH_OVERRIDE) && !defined(ACC_ARCH_GENERIC) && defined(_CRAY)
712 # if (UINT_MAX > ACC_0xffffffffL) && defined(_CRAY)
713 # if defined(_CRAYMPP) || defined(_CRAYT3D) || defined(_CRAYT3E)
714 # define ACC_ARCH_CRAY_MPP 1
715 # elif defined(_CRAY1)
716 # define ACC_ARCH_CRAY_PVP 1
720 #if !defined(__ACC_ARCH_OVERRIDE)
721 #if defined(ACC_ARCH_GENERIC)
722 # define ACC_INFO_ARCH "generic"
723 #elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
724 # define ACC_ARCH_I086 1
725 # define ACC_ARCH_IA16 1
726 # define ACC_INFO_ARCH "i086"
727 #elif defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA)
728 # define ACC_ARCH_ALPHA 1
729 # define ACC_INFO_ARCH "alpha"
730 #elif (ACC_ARCH_CRAY_MPP) && (defined(_CRAYT3D) || defined(_CRAYT3E))
731 # define ACC_ARCH_ALPHA 1
732 # define ACC_INFO_ARCH "alpha"
733 #elif defined(__amd64__) || defined(__x86_64__) || defined(_M_AMD64)
734 # define ACC_ARCH_AMD64 1
735 # define ACC_INFO_ARCH "amd64"
736 #elif defined(__thumb__) || (defined(_M_ARM) && defined(_M_THUMB))
737 # define ACC_ARCH_ARM 1
738 # define ACC_ARCH_ARM_THUMB 1
739 # define ACC_INFO_ARCH "arm_thumb"
740 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCARM__)
741 # define ACC_ARCH_ARM 1
742 # if defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 1)
743 # define ACC_ARCH_ARM_THUMB 1
744 # define ACC_INFO_ARCH "arm_thumb"
745 # elif defined(__CPU_MODE__) && ((__CPU_MODE__)+0 == 2)
746 # define ACC_INFO_ARCH "arm"
748 # define ACC_INFO_ARCH "arm"
750 #elif defined(__arm__) || defined(_M_ARM)
751 # define ACC_ARCH_ARM 1
752 # define ACC_INFO_ARCH "arm"
753 #elif (UINT_MAX <= ACC_0xffffL) && defined(__AVR__)
754 # define ACC_ARCH_AVR 1
755 # define ACC_INFO_ARCH "avr"
756 #elif defined(__bfin__)
757 # define ACC_ARCH_BLACKFIN 1
758 # define ACC_INFO_ARCH "blackfin"
759 #elif (UINT_MAX == ACC_0xffffL) && defined(__C166__)
760 # define ACC_ARCH_C166 1
761 # define ACC_INFO_ARCH "c166"
762 #elif defined(__cris__)
763 # define ACC_ARCH_CRIS 1
764 # define ACC_INFO_ARCH "cris"
765 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCEZ80__)
766 # define ACC_ARCH_EZ80 1
767 # define ACC_INFO_ARCH "ez80"
768 #elif defined(__H8300__) || defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
769 # define ACC_ARCH_H8300 1
770 # define ACC_INFO_ARCH "h8300"
771 #elif defined(__hppa__) || defined(__hppa)
772 # define ACC_ARCH_HPPA 1
773 # define ACC_INFO_ARCH "hppa"
774 #elif defined(__386__) || defined(__i386__) || defined(__i386) || defined(_M_IX86) || defined(_M_I386)
775 # define ACC_ARCH_I386 1
776 # define ACC_ARCH_IA32 1
777 # define ACC_INFO_ARCH "i386"
778 #elif (ACC_CC_ZORTECHC && defined(__I86__))
779 # define ACC_ARCH_I386 1
780 # define ACC_ARCH_IA32 1
781 # define ACC_INFO_ARCH "i386"
782 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
783 # define ACC_ARCH_I386 1
784 # define ACC_ARCH_IA32 1
785 # define ACC_INFO_ARCH "i386"
786 #elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
787 # define ACC_ARCH_IA64 1
788 # define ACC_INFO_ARCH "ia64"
789 #elif (UINT_MAX == ACC_0xffffL) && defined(__m32c__)
790 # define ACC_ARCH_M16C 1
791 # define ACC_INFO_ARCH "m16c"
792 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICCM16C__)
793 # define ACC_ARCH_M16C 1
794 # define ACC_INFO_ARCH "m16c"
795 #elif defined(__m32r__)
796 # define ACC_ARCH_M32R 1
797 # define ACC_INFO_ARCH "m32r"
798 #elif (ACC_OS_TOS) || defined(__m68k__) || defined(__m68000__) || defined(__mc68000__) || defined(__mc68020__) || defined(_M_M68K)
799 # define ACC_ARCH_M68K 1
800 # define ACC_INFO_ARCH "m68k"
801 #elif (UINT_MAX == ACC_0xffffL) && defined(__C251__)
802 # define ACC_ARCH_MCS251 1
803 # define ACC_INFO_ARCH "mcs251"
804 #elif (UINT_MAX == ACC_0xffffL) && defined(__C51__)
805 # define ACC_ARCH_MCS51 1
806 # define ACC_INFO_ARCH "mcs51"
807 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC8051__)
808 # define ACC_ARCH_MCS51 1
809 # define ACC_INFO_ARCH "mcs51"
810 #elif defined(__mips__) || defined(__mips) || defined(_MIPS_ARCH) || defined(_M_MRX000)
811 # define ACC_ARCH_MIPS 1
812 # define ACC_INFO_ARCH "mips"
813 #elif (UINT_MAX == ACC_0xffffL) && defined(__MSP430__)
814 # define ACC_ARCH_MSP430 1
815 # define ACC_INFO_ARCH "msp430"
816 #elif defined(__IAR_SYSTEMS_ICC__) && defined(__ICC430__)
817 # define ACC_ARCH_MSP430 1
818 # define ACC_INFO_ARCH "msp430"
819 #elif defined(__powerpc__) || defined(__powerpc) || defined(__ppc__) || defined(__PPC__) || defined(_M_PPC) || defined(_ARCH_PPC) || defined(_ARCH_PWR)
820 # define ACC_ARCH_POWERPC 1
821 # define ACC_INFO_ARCH "powerpc"
822 #elif defined(__s390__) || defined(__s390) || defined(__s390x__) || defined(__s390x)
823 # define ACC_ARCH_S390 1
824 # define ACC_INFO_ARCH "s390"
825 #elif defined(__sh__) || defined(_M_SH)
826 # define ACC_ARCH_SH 1
827 # define ACC_INFO_ARCH "sh"
828 #elif defined(__sparc__) || defined(__sparc) || defined(__sparcv8)
829 # define ACC_ARCH_SPARC 1
830 # define ACC_INFO_ARCH "sparc"
831 #elif defined(__SPU__)
832 # define ACC_ARCH_SPU 1
833 # define ACC_INFO_ARCH "spu"
834 #elif (UINT_MAX == ACC_0xffffL) && defined(__z80)
835 # define ACC_ARCH_Z80 1
836 # define ACC_INFO_ARCH "z80"
837 #elif (ACC_ARCH_CRAY_PVP)
838 # if defined(_CRAYSV1)
839 # define ACC_ARCH_CRAY_SV1 1
840 # define ACC_INFO_ARCH "cray_sv1"
842 # define ACC_ARCH_CRAY_T90 1
843 # define ACC_INFO_ARCH "cray_t90"
845 # define ACC_ARCH_CRAY_YMP 1
846 # define ACC_INFO_ARCH "cray_ymp"
848 # define ACC_ARCH_CRAY_XMP 1
849 # define ACC_INFO_ARCH "cray_xmp"
852 # define ACC_ARCH_UNKNOWN 1
853 # define ACC_INFO_ARCH "unknown"
856 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_DOS32 || ACC_OS_OS2)
857 # error "FIXME - missing define for CPU architecture"
859 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN32)
860 # error "FIXME - missing WIN32 define for CPU architecture"
862 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN64)
863 # error "FIXME - missing WIN64 define for CPU architecture"
865 #if (ACC_OS_OS216 || ACC_OS_WIN16)
866 # define ACC_ARCH_I086PM 1
867 # define ACC_ARCH_IA16PM 1
868 #elif 1 && (ACC_OS_DOS16 && defined(BLX286))
869 # define ACC_ARCH_I086PM 1
870 # define ACC_ARCH_IA16PM 1
871 #elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
872 # define ACC_ARCH_I086PM 1
873 # define ACC_ARCH_IA16PM 1
874 #elif 1 && (ACC_OS_DOS16 && ACC_CC_BORLANDC && defined(__DPMI16__))
875 # define ACC_ARCH_I086PM 1
876 # define ACC_ARCH_IA16PM 1
878 #if defined(ACC_ARCH_ARM_THUMB) && !defined(ACC_ARCH_ARM)
879 # error "this should not happen"
881 #if defined(ACC_ARCH_I086PM) && !defined(ACC_ARCH_I086)
882 # error "this should not happen"
885 # if (UINT_MAX != ACC_0xffffL)
886 # error "this should not happen"
888 # if (ULONG_MAX != ACC_0xffffffffL)
889 # error "this should not happen"
893 # if (UINT_MAX != ACC_0xffffL) && defined(__i386_int16__)
894 # error "this should not happen"
896 # if (UINT_MAX != ACC_0xffffffffL) && !defined(__i386_int16__)
897 # error "this should not happen"
899 # if (ULONG_MAX != ACC_0xffffffffL)
900 # error "this should not happen"
903 #if !defined(__ACC_MM_OVERRIDE)
905 #if (UINT_MAX != ACC_0xffffL)
906 # error "this should not happen"
908 #if defined(__TINY__) || defined(M_I86TM) || defined(_M_I86TM)
909 # define ACC_MM_TINY 1
910 #elif defined(__HUGE__) || defined(_HUGE_) || defined(M_I86HM) || defined(_M_I86HM)
911 # define ACC_MM_HUGE 1
912 #elif defined(__SMALL__) || defined(M_I86SM) || defined(_M_I86SM) || defined(SMALL_MODEL)
913 # define ACC_MM_SMALL 1
914 #elif defined(__MEDIUM__) || defined(M_I86MM) || defined(_M_I86MM)
915 # define ACC_MM_MEDIUM 1
916 #elif defined(__COMPACT__) || defined(M_I86CM) || defined(_M_I86CM)
917 # define ACC_MM_COMPACT 1
918 #elif defined(__LARGE__) || defined(M_I86LM) || defined(_M_I86LM) || defined(LARGE_MODEL)
919 # define ACC_MM_LARGE 1
920 #elif (ACC_CC_AZTECC)
921 # if defined(_LARGE_CODE) && defined(_LARGE_DATA)
922 # define ACC_MM_LARGE 1
923 # elif defined(_LARGE_CODE)
924 # define ACC_MM_MEDIUM 1
925 # elif defined(_LARGE_DATA)
926 # define ACC_MM_COMPACT 1
928 # define ACC_MM_SMALL 1
930 #elif (ACC_CC_ZORTECHC && defined(__VCM__))
931 # define ACC_MM_LARGE 1
933 # error "unknown memory model"
935 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
936 #define ACC_HAVE_MM_HUGE_PTR 1
937 #define ACC_HAVE_MM_HUGE_ARRAY 1
939 # undef ACC_HAVE_MM_HUGE_ARRAY
941 #if (ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_ZORTECHC)
942 # undef ACC_HAVE_MM_HUGE_PTR
943 # undef ACC_HAVE_MM_HUGE_ARRAY
944 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
945 # undef ACC_HAVE_MM_HUGE_ARRAY
946 #elif (ACC_CC_MSC && defined(_QC))
947 # undef ACC_HAVE_MM_HUGE_ARRAY
948 # if (_MSC_VER < 600)
949 # undef ACC_HAVE_MM_HUGE_PTR
951 #elif (ACC_CC_TURBOC && (__TURBOC__ < 0x0295))
952 # undef ACC_HAVE_MM_HUGE_ARRAY
954 #if (ACC_ARCH_I086PM) && !defined(ACC_HAVE_MM_HUGE_PTR)
956 # error "this should not happen"
957 # elif (ACC_CC_ZORTECHC)
959 # error "this should not happen"
965 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0200))
966 extern void __near __cdecl
_AHSHIFT(void);
967 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
968 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
969 extern void __near __cdecl
_AHSHIFT(void);
970 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
971 #elif (ACC_CC_MSC || ACC_CC_TOPSPEEDC)
972 extern void __near __cdecl
_AHSHIFT(void);
973 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
974 #elif (ACC_CC_TURBOC && (__TURBOC__ >= 0x0295))
975 extern void __near __cdecl
_AHSHIFT(void);
976 # define ACC_MM_AHSHIFT ((unsigned) _AHSHIFT)
977 #elif ((ACC_CC_AZTECC || ACC_CC_PACIFICC || ACC_CC_TURBOC) && ACC_OS_DOS16)
978 # define ACC_MM_AHSHIFT 12
979 #elif (ACC_CC_WATCOMC)
980 extern unsigned char _HShift
;
981 # define ACC_MM_AHSHIFT ((unsigned) _HShift)
983 # error "FIXME - implement ACC_MM_AHSHIFT"
989 #elif (ACC_ARCH_C166)
990 #if !defined(__MODEL__)
991 # error "FIXME - C166 __MODEL__"
992 #elif ((__MODEL__) == 0)
993 # define ACC_MM_SMALL 1
994 #elif ((__MODEL__) == 1)
995 # define ACC_MM_SMALL 1
996 #elif ((__MODEL__) == 2)
997 # define ACC_MM_LARGE 1
998 #elif ((__MODEL__) == 3)
999 # define ACC_MM_TINY 1
1000 #elif ((__MODEL__) == 4)
1001 # define ACC_MM_XTINY 1
1002 #elif ((__MODEL__) == 5)
1003 # define ACC_MM_XSMALL 1
1005 # error "FIXME - C166 __MODEL__"
1007 #elif (ACC_ARCH_MCS251)
1008 #if !defined(__MODEL__)
1009 # error "FIXME - MCS251 __MODEL__"
1010 #elif ((__MODEL__) == 0)
1011 # define ACC_MM_SMALL 1
1012 #elif ((__MODEL__) == 2)
1013 # define ACC_MM_LARGE 1
1014 #elif ((__MODEL__) == 3)
1015 # define ACC_MM_TINY 1
1016 #elif ((__MODEL__) == 4)
1017 # define ACC_MM_XTINY 1
1018 #elif ((__MODEL__) == 5)
1019 # define ACC_MM_XSMALL 1
1021 # error "FIXME - MCS251 __MODEL__"
1023 #elif (ACC_ARCH_MCS51)
1024 #if !defined(__MODEL__)
1025 # error "FIXME - MCS51 __MODEL__"
1026 #elif ((__MODEL__) == 1)
1027 # define ACC_MM_SMALL 1
1028 #elif ((__MODEL__) == 2)
1029 # define ACC_MM_LARGE 1
1030 #elif ((__MODEL__) == 3)
1031 # define ACC_MM_TINY 1
1032 #elif ((__MODEL__) == 4)
1033 # define ACC_MM_XTINY 1
1034 #elif ((__MODEL__) == 5)
1035 # define ACC_MM_XSMALL 1
1037 # error "FIXME - MCS51 __MODEL__"
1039 #elif (ACC_ARCH_CRAY_PVP)
1040 # define ACC_MM_PVP 1
1042 # define ACC_MM_FLAT 1
1044 #if (ACC_MM_COMPACT)
1045 # define ACC_INFO_MM "compact"
1047 # define ACC_INFO_MM "flat"
1049 # define ACC_INFO_MM "huge"
1050 #elif (ACC_MM_LARGE)
1051 # define ACC_INFO_MM "large"
1052 #elif (ACC_MM_MEDIUM)
1053 # define ACC_INFO_MM "medium"
1055 # define ACC_INFO_MM "pvp"
1056 #elif (ACC_MM_SMALL)
1057 # define ACC_INFO_MM "small"
1059 # define ACC_INFO_MM "tiny"
1061 # error "unknown memory model"
1064 #if defined(SIZEOF_SHORT)
1065 # define ACC_SIZEOF_SHORT (SIZEOF_SHORT)
1067 #if defined(SIZEOF_INT)
1068 # define ACC_SIZEOF_INT (SIZEOF_INT)
1070 #if defined(SIZEOF_LONG)
1071 # define ACC_SIZEOF_LONG (SIZEOF_LONG)
1073 #if defined(SIZEOF_LONG_LONG)
1074 # define ACC_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG)
1076 #if defined(SIZEOF___INT16)
1077 # define ACC_SIZEOF___INT16 (SIZEOF___INT16)
1079 #if defined(SIZEOF___INT32)
1080 # define ACC_SIZEOF___INT32 (SIZEOF___INT32)
1082 #if defined(SIZEOF___INT64)
1083 # define ACC_SIZEOF___INT64 (SIZEOF___INT64)
1085 #if defined(SIZEOF_VOID_P)
1086 # define ACC_SIZEOF_VOID_P (SIZEOF_VOID_P)
1088 #if defined(SIZEOF_SIZE_T)
1089 # define ACC_SIZEOF_SIZE_T (SIZEOF_SIZE_T)
1091 #if defined(SIZEOF_PTRDIFF_T)
1092 # define ACC_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T)
1094 #define __ACC_LSR(x,b) (((x)+0ul) >> (b))
1095 #if !defined(ACC_SIZEOF_SHORT)
1096 # if (ACC_ARCH_CRAY_PVP)
1097 # define ACC_SIZEOF_SHORT 8
1098 # elif (USHRT_MAX == ACC_0xffffL)
1099 # define ACC_SIZEOF_SHORT 2
1100 # elif (__ACC_LSR(USHRT_MAX,7) == 1)
1101 # define ACC_SIZEOF_SHORT 1
1102 # elif (__ACC_LSR(USHRT_MAX,15) == 1)
1103 # define ACC_SIZEOF_SHORT 2
1104 # elif (__ACC_LSR(USHRT_MAX,31) == 1)
1105 # define ACC_SIZEOF_SHORT 4
1106 # elif (__ACC_LSR(USHRT_MAX,63) == 1)
1107 # define ACC_SIZEOF_SHORT 8
1108 # elif (__ACC_LSR(USHRT_MAX,127) == 1)
1109 # define ACC_SIZEOF_SHORT 16
1111 # error "ACC_SIZEOF_SHORT"
1114 #if !defined(ACC_SIZEOF_INT)
1115 # if (ACC_ARCH_CRAY_PVP)
1116 # define ACC_SIZEOF_INT 8
1117 # elif (UINT_MAX == ACC_0xffffL)
1118 # define ACC_SIZEOF_INT 2
1119 # elif (UINT_MAX == ACC_0xffffffffL)
1120 # define ACC_SIZEOF_INT 4
1121 # elif (__ACC_LSR(UINT_MAX,7) == 1)
1122 # define ACC_SIZEOF_INT 1
1123 # elif (__ACC_LSR(UINT_MAX,15) == 1)
1124 # define ACC_SIZEOF_INT 2
1125 # elif (__ACC_LSR(UINT_MAX,31) == 1)
1126 # define ACC_SIZEOF_INT 4
1127 # elif (__ACC_LSR(UINT_MAX,63) == 1)
1128 # define ACC_SIZEOF_INT 8
1129 # elif (__ACC_LSR(UINT_MAX,127) == 1)
1130 # define ACC_SIZEOF_INT 16
1132 # error "ACC_SIZEOF_INT"
1135 #if !defined(ACC_SIZEOF_LONG)
1136 # if (ULONG_MAX == ACC_0xffffffffL)
1137 # define ACC_SIZEOF_LONG 4
1138 # elif (__ACC_LSR(ULONG_MAX,7) == 1)
1139 # define ACC_SIZEOF_LONG 1
1140 # elif (__ACC_LSR(ULONG_MAX,15) == 1)
1141 # define ACC_SIZEOF_LONG 2
1142 # elif (__ACC_LSR(ULONG_MAX,31) == 1)
1143 # define ACC_SIZEOF_LONG 4
1144 # elif (__ACC_LSR(ULONG_MAX,63) == 1)
1145 # define ACC_SIZEOF_LONG 8
1146 # elif (__ACC_LSR(ULONG_MAX,127) == 1)
1147 # define ACC_SIZEOF_LONG 16
1149 # error "ACC_SIZEOF_LONG"
1152 #if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
1153 #if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
1154 # if defined(__LONG_MAX__) && defined(__LONG_LONG_MAX__)
1155 # if (ACC_CC_GNUC >= 0x030300ul)
1156 # if ((__LONG_MAX__)+0 == (__LONG_LONG_MAX__)+0)
1157 # define ACC_SIZEOF_LONG_LONG ACC_SIZEOF_LONG
1158 # elif (__ACC_LSR(__LONG_LONG_MAX__,30) == 1)
1159 # define ACC_SIZEOF_LONG_LONG 4
1165 #if !defined(ACC_SIZEOF_LONG_LONG) && !defined(ACC_SIZEOF___INT64)
1166 #if (ACC_SIZEOF_LONG > 0 && ACC_SIZEOF_LONG < 8)
1167 #if (ACC_ARCH_I086 && ACC_CC_DMC)
1168 #elif (ACC_CC_CILLY) && defined(__GNUC__)
1169 # define ACC_SIZEOF_LONG_LONG 8
1170 #elif (ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1171 # define ACC_SIZEOF_LONG_LONG 8
1172 #elif ((ACC_OS_WIN32 || ACC_OS_WIN64 || defined(_WIN32)) && ACC_CC_MSC && (_MSC_VER >= 1400))
1173 # define ACC_SIZEOF_LONG_LONG 8
1174 #elif (ACC_OS_WIN64 || defined(_WIN64))
1175 # define ACC_SIZEOF___INT64 8
1176 #elif (ACC_ARCH_I386 && (ACC_CC_DMC))
1177 # define ACC_SIZEOF_LONG_LONG 8
1178 #elif (ACC_ARCH_I386 && (ACC_CC_SYMANTECC && (__SC__ >= 0x700)))
1179 # define ACC_SIZEOF_LONG_LONG 8
1180 #elif (ACC_ARCH_I386 && (ACC_CC_INTELC && defined(__linux__)))
1181 # define ACC_SIZEOF_LONG_LONG 8
1182 #elif (ACC_ARCH_I386 && (ACC_CC_MWERKS || ACC_CC_PELLESC || ACC_CC_PGI || ACC_CC_SUNPROC))
1183 # define ACC_SIZEOF_LONG_LONG 8
1184 #elif (ACC_ARCH_I386 && (ACC_CC_INTELC || ACC_CC_MSC))
1185 # define ACC_SIZEOF___INT64 8
1186 #elif ((ACC_OS_WIN32 || defined(_WIN32)) && (ACC_CC_MSC))
1187 # define ACC_SIZEOF___INT64 8
1188 #elif (ACC_ARCH_I386 && (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0520)))
1189 # define ACC_SIZEOF___INT64 8
1190 #elif (ACC_ARCH_I386 && (ACC_CC_WATCOMC && (__WATCOMC__ >= 1100)))
1191 # define ACC_SIZEOF___INT64 8
1192 #elif (ACC_CC_WATCOMC && defined(_INTEGRAL_MAX_BITS) && (_INTEGRAL_MAX_BITS == 64))
1193 # define ACC_SIZEOF___INT64 8
1194 #elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
1195 # define ACC_SIZEOF_LONG_LONG 8
1196 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
1197 # define ACC_SIZEOF_LONG_LONG 8
1198 #elif (ACC_CC_SDCC) && (ACC_SIZEOF_INT == 2)
1199 #elif 1 && defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
1200 # define ACC_SIZEOF_LONG_LONG 8
1204 #if defined(__cplusplus) && defined(ACC_CC_GNUC)
1205 # if (ACC_CC_GNUC < 0x020800ul)
1206 # undef ACC_SIZEOF_LONG_LONG
1209 #if defined(ACC_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG)
1210 # undef ACC_SIZEOF_LONG_LONG
1212 #if !defined(ACC_SIZEOF_VOID_P)
1214 # define __ACC_WORDSIZE 2
1215 # if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
1216 # define ACC_SIZEOF_VOID_P 2
1217 # elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
1218 # define ACC_SIZEOF_VOID_P 4
1222 #elif (ACC_ARCH_AVR || ACC_ARCH_Z80)
1223 # define __ACC_WORDSIZE 1
1224 # define ACC_SIZEOF_VOID_P 2
1225 #elif (ACC_ARCH_C166 || ACC_ARCH_MCS51 || ACC_ARCH_MCS251 || ACC_ARCH_MSP430)
1226 # define ACC_SIZEOF_VOID_P 2
1227 #elif (ACC_ARCH_H8300)
1228 # if defined(__NORMAL_MODE__)
1229 # define __ACC_WORDSIZE 4
1230 # define ACC_SIZEOF_VOID_P 2
1231 # elif defined(__H8300H__) || defined(__H8300S__) || defined(__H8300SX__)
1232 # define __ACC_WORDSIZE 4
1233 # define ACC_SIZEOF_VOID_P 4
1235 # define __ACC_WORDSIZE 2
1236 # define ACC_SIZEOF_VOID_P 2
1238 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x040000ul)) && (ACC_SIZEOF_INT == 4)
1239 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_INT
1240 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_INT
1242 #elif (ACC_ARCH_M16C)
1243 # define __ACC_WORDSIZE 2
1244 # if defined(__m32c_cpu__) || defined(__m32cm_cpu__)
1245 # define ACC_SIZEOF_VOID_P 4
1247 # define ACC_SIZEOF_VOID_P 2
1249 #elif (ACC_SIZEOF_LONG == 8) && ((defined(__mips__) && defined(__R5900__)) || defined(__MIPS_PSX2__))
1250 # define __ACC_WORDSIZE 8
1251 # define ACC_SIZEOF_VOID_P 4
1252 #elif defined(__LLP64__) || defined(__LLP64) || defined(_LLP64) || defined(_WIN64)
1253 # define __ACC_WORDSIZE 8
1254 # define ACC_SIZEOF_VOID_P 8
1255 #elif (ACC_OS_OS400 || defined(__OS400__)) && defined(__LLP64_IFC__)
1256 # define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG
1257 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
1258 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
1259 #elif (ACC_OS_OS400 || defined(__OS400__))
1260 # define __ACC_WORDSIZE ACC_SIZEOF_LONG
1261 # define ACC_SIZEOF_VOID_P 16
1262 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
1263 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
1264 #elif (defined(__vms) || defined(__VMS)) && (__INITIAL_POINTER_SIZE+0 == 64)
1265 # define ACC_SIZEOF_VOID_P 8
1266 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_LONG
1267 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_LONG
1268 #elif (ACC_ARCH_SPU)
1270 # define __ACC_WORDSIZE 16
1272 # define ACC_SIZEOF_VOID_P 4
1274 # define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG
1277 #if !defined(ACC_WORDSIZE)
1278 # if defined(__ACC_WORDSIZE)
1279 # define ACC_WORDSIZE __ACC_WORDSIZE
1281 # define ACC_WORDSIZE ACC_SIZEOF_VOID_P
1284 #if !defined(ACC_SIZEOF_SIZE_T)
1285 #if (ACC_ARCH_I086 || ACC_ARCH_M16C)
1286 # define ACC_SIZEOF_SIZE_T 2
1288 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_VOID_P
1291 #if !defined(ACC_SIZEOF_PTRDIFF_T)
1293 # if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM || ACC_MM_HUGE)
1294 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_VOID_P
1295 # elif (ACC_MM_COMPACT || ACC_MM_LARGE)
1296 # if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
1297 # define ACC_SIZEOF_PTRDIFF_T 4
1299 # define ACC_SIZEOF_PTRDIFF_T 2
1305 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_SIZE_T
1308 #if defined(ACC_ABI_NEUTRAL_ENDIAN)
1309 # undef ACC_ABI_BIG_ENDIAN
1310 # undef ACC_ABI_LITTLE_ENDIAN
1311 #elif !defined(ACC_ABI_BIG_ENDIAN) && !defined(ACC_ABI_LITTLE_ENDIAN)
1312 #if (ACC_ARCH_ALPHA) && (ACC_ARCH_CRAY_MPP)
1313 # define ACC_ABI_BIG_ENDIAN 1
1314 #elif (ACC_ARCH_ALPHA || ACC_ARCH_AMD64 || ACC_ARCH_BLACKFIN || ACC_ARCH_CRIS || ACC_ARCH_I086 || ACC_ARCH_I386 || ACC_ARCH_MSP430)
1315 # define ACC_ABI_LITTLE_ENDIAN 1
1316 #elif (ACC_ARCH_M68K || ACC_ARCH_S390)
1317 # define ACC_ABI_BIG_ENDIAN 1
1318 #elif 1 && defined(__IAR_SYSTEMS_ICC__) && defined(__LITTLE_ENDIAN__)
1319 # if (__LITTLE_ENDIAN__ == 1)
1320 # define ACC_ABI_LITTLE_ENDIAN 1
1322 # define ACC_ABI_BIG_ENDIAN 1
1324 #elif 1 && defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)
1325 # define ACC_ABI_BIG_ENDIAN 1
1326 #elif 1 && defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)
1327 # define ACC_ABI_LITTLE_ENDIAN 1
1328 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEB__) && !defined(__ARMEL__)
1329 # define ACC_ABI_BIG_ENDIAN 1
1330 #elif 1 && (ACC_ARCH_ARM) && defined(__ARMEL__) && !defined(__ARMEB__)
1331 # define ACC_ABI_LITTLE_ENDIAN 1
1332 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEB__) && !defined(__MIPSEL__)
1333 # define ACC_ABI_BIG_ENDIAN 1
1334 #elif 1 && (ACC_ARCH_MIPS) && defined(__MIPSEL__) && !defined(__MIPSEB__)
1335 # define ACC_ABI_LITTLE_ENDIAN 1
1338 #if defined(ACC_ABI_BIG_ENDIAN) && defined(ACC_ABI_LITTLE_ENDIAN)
1339 # error "this should not happen"
1341 #if defined(ACC_ABI_BIG_ENDIAN)
1342 # define ACC_INFO_ABI_ENDIAN "be"
1343 #elif defined(ACC_ABI_LITTLE_ENDIAN)
1344 # define ACC_INFO_ABI_ENDIAN "le"
1345 #elif defined(ACC_ABI_NEUTRAL_ENDIAN)
1346 # define ACC_INFO_ABI_ENDIAN "neutral"
1348 #if (ACC_SIZEOF_INT == 1 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
1349 # define ACC_ABI_I8LP16 1
1350 # define ACC_INFO_ABI_PM "i8lp16"
1351 #elif (ACC_SIZEOF_INT == 2 && ACC_SIZEOF_LONG == 2 && ACC_SIZEOF_VOID_P == 2)
1352 # define ACC_ABI_ILP16 1
1353 # define ACC_INFO_ABI_PM "ilp16"
1354 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 4)
1355 # define ACC_ABI_ILP32 1
1356 # define ACC_INFO_ABI_PM "ilp32"
1357 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 4 && ACC_SIZEOF_VOID_P == 8 && ACC_SIZEOF_SIZE_T == 8)
1358 # define ACC_ABI_LLP64 1
1359 # define ACC_INFO_ABI_PM "llp64"
1360 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
1361 # define ACC_ABI_LP64 1
1362 # define ACC_INFO_ABI_PM "lp64"
1363 #elif (ACC_SIZEOF_INT == 8 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 8)
1364 # define ACC_ABI_ILP64 1
1365 # define ACC_INFO_ABI_PM "ilp64"
1366 #elif (ACC_SIZEOF_INT == 4 && ACC_SIZEOF_LONG == 8 && ACC_SIZEOF_VOID_P == 4)
1367 # define ACC_ABI_IP32L64 1
1368 # define ACC_INFO_ABI_PM "ip32l64"
1370 #if !defined(__ACC_LIBC_OVERRIDE)
1371 #if defined(ACC_LIBC_NAKED)
1372 # define ACC_INFO_LIBC "naked"
1373 #elif defined(ACC_LIBC_FREESTANDING)
1374 # define ACC_INFO_LIBC "freestanding"
1375 #elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
1376 # define ACC_INFO_LIBC "mfreestanding"
1377 #elif defined(ACC_LIBC_ISOC90)
1378 # define ACC_INFO_LIBC "isoc90"
1379 #elif defined(ACC_LIBC_ISOC99)
1380 # define ACC_INFO_LIBC "isoc99"
1381 #elif defined(__dietlibc__)
1382 # define ACC_LIBC_DIETLIBC 1
1383 # define ACC_INFO_LIBC "dietlibc"
1384 #elif defined(_NEWLIB_VERSION)
1385 # define ACC_LIBC_NEWLIB 1
1386 # define ACC_INFO_LIBC "newlib"
1387 #elif defined(__UCLIBC__) && defined(__UCLIBC_MAJOR__) && defined(__UCLIBC_MINOR__)
1388 # if defined(__UCLIBC_SUBLEVEL__)
1389 # define ACC_LIBC_UCLIBC (__UCLIBC_MAJOR__ * 0x10000L + __UCLIBC_MINOR__ * 0x100 + __UCLIBC_SUBLEVEL__)
1391 # define ACC_LIBC_UCLIBC 0x00090bL
1393 # define ACC_INFO_LIBC "uclibc"
1394 #elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
1395 # define ACC_LIBC_GLIBC (__GLIBC__ * 0x10000L + __GLIBC_MINOR__ * 0x100)
1396 # define ACC_INFO_LIBC "glibc"
1397 #elif (ACC_CC_MWERKS) && defined(__MSL__)
1398 # define ACC_LIBC_MSL __MSL__
1399 # define ACC_INFO_LIBC "msl"
1400 #elif 1 && defined(__IAR_SYSTEMS_ICC__)
1401 # define ACC_LIBC_ISOC90 1
1402 # define ACC_INFO_LIBC "isoc90"
1404 # define ACC_LIBC_DEFAULT 1
1405 # define ACC_INFO_LIBC "default"
1408 #if !defined(__acc_gnuc_extension__)
1409 #if (ACC_CC_GNUC >= 0x020800ul)
1410 # define __acc_gnuc_extension__ __extension__
1411 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1412 # define __acc_gnuc_extension__ __extension__
1414 # define __acc_gnuc_extension__
1417 #if !defined(__acc_ua_volatile)
1418 # define __acc_ua_volatile volatile
1420 #if !defined(__acc_alignof)
1421 #if (ACC_CC_CILLY || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
1422 # define __acc_alignof(e) __alignof__(e)
1423 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 700))
1424 # define __acc_alignof(e) __alignof__(e)
1425 #elif (ACC_CC_MSC && (_MSC_VER >= 1300))
1426 # define __acc_alignof(e) __alignof(e)
1429 #if defined(__acc_alignof)
1430 # define __acc_HAVE_alignof 1
1432 #if !defined(__acc_constructor)
1433 #if (ACC_CC_GNUC >= 0x030400ul)
1434 # define __acc_constructor __attribute__((__constructor__,__used__))
1435 #elif (ACC_CC_GNUC >= 0x020700ul)
1436 # define __acc_constructor __attribute__((__constructor__))
1437 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1438 # define __acc_constructor __attribute__((__constructor__))
1441 #if defined(__acc_constructor)
1442 # define __acc_HAVE_constructor 1
1444 #if !defined(__acc_destructor)
1445 #if (ACC_CC_GNUC >= 0x030400ul)
1446 # define __acc_destructor __attribute__((__destructor__,__used__))
1447 #elif (ACC_CC_GNUC >= 0x020700ul)
1448 # define __acc_destructor __attribute__((__destructor__))
1449 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1450 # define __acc_destructor __attribute__((__destructor__))
1453 #if defined(__acc_destructor)
1454 # define __acc_HAVE_destructor 1
1456 #if defined(__acc_HAVE_destructor) && !defined(__acc_HAVE_constructor)
1457 # error "this should not happen"
1459 #if !defined(__acc_inline)
1460 #if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
1461 #elif defined(__cplusplus)
1462 # define __acc_inline inline
1463 #elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550))
1464 # define __acc_inline __inline
1465 #elif (ACC_CC_CILLY || ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE || ACC_CC_PGI)
1466 # define __acc_inline __inline__
1468 # define __acc_inline __inline
1469 #elif (ACC_CC_INTELC)
1470 # define __acc_inline __inline
1471 #elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x2405))
1472 # define __acc_inline __inline
1473 #elif (ACC_CC_MSC && (_MSC_VER >= 900))
1474 # define __acc_inline __inline
1475 #elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
1476 # define __acc_inline inline
1479 #if defined(__acc_inline)
1480 # define __acc_HAVE_inline 1
1482 # define __acc_inline
1484 #if !defined(__acc_forceinline)
1485 #if (ACC_CC_GNUC >= 0x030200ul)
1486 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1487 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC)
1488 # define __acc_forceinline __forceinline
1489 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC)
1490 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1491 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1492 # define __acc_forceinline __inline__ __attribute__((__always_inline__))
1493 #elif (ACC_CC_MSC && (_MSC_VER >= 1200))
1494 # define __acc_forceinline __forceinline
1497 #if defined(__acc_forceinline)
1498 # define __acc_HAVE_forceinline 1
1500 # define __acc_forceinline
1502 #if !defined(__acc_noinline)
1503 #if 1 && (ACC_ARCH_I386) && (ACC_CC_GNUC >= 0x040000ul) && (ACC_CC_GNUC < 0x040003ul)
1504 # define __acc_noinline __attribute__((__noinline__,__used__))
1505 #elif (ACC_CC_GNUC >= 0x030200ul)
1506 # define __acc_noinline __attribute__((__noinline__))
1507 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_MSC)
1508 # define __acc_noinline __declspec(noinline)
1509 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC)
1510 # define __acc_noinline __attribute__((__noinline__))
1511 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1512 # define __acc_noinline __attribute__((__noinline__))
1513 #elif (ACC_CC_MSC && (_MSC_VER >= 1300))
1514 # define __acc_noinline __declspec(noinline)
1515 #elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3200) && (ACC_OS_WIN32 || ACC_OS_WIN64))
1516 # if defined(__cplusplus)
1518 # define __acc_noinline __declspec(noinline)
1522 #if defined(__acc_noinline)
1523 # define __acc_HAVE_noinline 1
1525 # define __acc_noinline
1527 #if (defined(__acc_HAVE_forceinline) || defined(__acc_HAVE_noinline)) && !defined(__acc_HAVE_inline)
1528 # error "this should not happen"
1530 #if !defined(__acc_noreturn)
1531 #if (ACC_CC_GNUC >= 0x020700ul)
1532 # define __acc_noreturn __attribute__((__noreturn__))
1533 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC)
1534 # define __acc_noreturn __declspec(noreturn)
1535 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_GNUC)
1536 # define __acc_noreturn __attribute__((__noreturn__))
1537 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1538 # define __acc_noreturn __attribute__((__noreturn__))
1539 #elif (ACC_CC_MSC && (_MSC_VER >= 1200))
1540 # define __acc_noreturn __declspec(noreturn)
1543 #if defined(__acc_noreturn)
1544 # define __acc_HAVE_noreturn 1
1546 # define __acc_noreturn
1548 #if !defined(__acc_nothrow)
1549 #if (ACC_CC_GNUC >= 0x030300ul)
1550 # define __acc_nothrow __attribute__((__nothrow__))
1551 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 450) && ACC_CC_SYNTAX_MSC) && defined(__cplusplus)
1552 # define __acc_nothrow __declspec(nothrow)
1553 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800) && ACC_CC_SYNTAX_GNUC)
1554 # define __acc_nothrow __attribute__((__nothrow__))
1555 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1556 # define __acc_nothrow __attribute__((__nothrow__))
1557 #elif (ACC_CC_MSC && (_MSC_VER >= 1200)) && defined(__cplusplus)
1558 # define __acc_nothrow __declspec(nothrow)
1561 #if defined(__acc_nothrow)
1562 # define __acc_HAVE_nothrow 1
1564 # define __acc_nothrow
1566 #if !defined(__acc_restrict)
1567 #if (ACC_CC_GNUC >= 0x030400ul)
1568 # define __acc_restrict __restrict__
1569 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 600) && ACC_CC_SYNTAX_GNUC)
1570 # define __acc_restrict __restrict__
1572 # define __acc_restrict __restrict__
1573 #elif (ACC_CC_MSC && (_MSC_VER >= 1400))
1574 # define __acc_restrict __restrict
1577 #if defined(__acc_restrict)
1578 # define __acc_HAVE_restrict 1
1580 # define __acc_restrict
1582 #if !defined(__acc_likely) && !defined(__acc_unlikely)
1583 #if (ACC_CC_GNUC >= 0x030200ul)
1584 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1585 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1586 #elif (ACC_CC_INTELC && (__INTEL_COMPILER >= 800))
1587 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1588 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1589 #elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
1590 # define __acc_likely(e) (__builtin_expect(!!(e),1))
1591 # define __acc_unlikely(e) (__builtin_expect(!!(e),0))
1594 #if defined(__acc_likely)
1595 # define __acc_HAVE_likely 1
1597 # define __acc_likely(e) (e)
1599 #if defined(__acc_unlikely)
1600 # define __acc_HAVE_unlikely 1
1602 # define __acc_unlikely(e) (e)
1604 #if !defined(ACC_UNUSED)
1605 # if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
1606 # define ACC_UNUSED(var) ((void) &var)
1607 # elif (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PELLESC || ACC_CC_TURBOC)
1608 # define ACC_UNUSED(var) if (&var) ; else
1609 # elif (ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
1610 # define ACC_UNUSED(var) ((void) var)
1611 # elif (ACC_CC_MSC && (_MSC_VER < 900))
1612 # define ACC_UNUSED(var) if (&var) ; else
1613 # elif (ACC_CC_KEILC)
1614 # define ACC_UNUSED(var) {extern int __acc_unused[1-2*!(sizeof(var)>0)];}
1615 # elif (ACC_CC_PACIFICC)
1616 # define ACC_UNUSED(var) ((void) sizeof(var))
1617 # elif (ACC_CC_WATCOMC) && defined(__cplusplus)
1618 # define ACC_UNUSED(var) ((void) var)
1620 # define ACC_UNUSED(var) ((void) &var)
1623 #if !defined(ACC_UNUSED_FUNC)
1624 # if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0600))
1625 # define ACC_UNUSED_FUNC(func) ((void) func)
1626 # elif (ACC_CC_BORLANDC || ACC_CC_NDPC || ACC_CC_TURBOC)
1627 # define ACC_UNUSED_FUNC(func) if (func) ; else
1628 # elif (ACC_CC_LLVM)
1629 # define ACC_UNUSED_FUNC(func) ((void) &func)
1630 # elif (ACC_CC_MSC && (_MSC_VER < 900))
1631 # define ACC_UNUSED_FUNC(func) if (func) ; else
1633 # define ACC_UNUSED_FUNC(func) ((void) &func)
1634 # elif (ACC_CC_KEILC || ACC_CC_PELLESC)
1635 # define ACC_UNUSED_FUNC(func) {extern int __acc_unused[1-2*!(sizeof((int)func)>0)];}
1637 # define ACC_UNUSED_FUNC(func) ((void) func)
1640 #if !defined(ACC_UNUSED_LABEL)
1641 # if (ACC_CC_WATCOMC) && defined(__cplusplus)
1642 # define ACC_UNUSED_LABEL(l) switch(0) case 1:goto l
1643 # elif (ACC_CC_INTELC || ACC_CC_WATCOMC)
1644 # define ACC_UNUSED_LABEL(l) if (0) goto l
1646 # define ACC_UNUSED_LABEL(l) switch(0) case 1:goto l
1649 #if !defined(ACC_DEFINE_UNINITIALIZED_VAR)
1651 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var
1652 # elif 0 && (ACC_CC_GNUC)
1653 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = var
1655 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init
1658 #if !defined(ACC_COMPILE_TIME_ASSERT_HEADER)
1659 # if (ACC_CC_AZTECC || ACC_CC_ZORTECHC)
1660 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)];
1661 # elif (ACC_CC_DMC || ACC_CC_SYMANTECC)
1662 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1u-2*!(e)];
1663 # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
1664 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-!(e)];
1666 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-2*!(e)];
1669 #if !defined(ACC_COMPILE_TIME_ASSERT)
1670 # if (ACC_CC_AZTECC)
1671 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-!(e)];}
1672 # elif (ACC_CC_DMC || ACC_CC_PACIFICC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
1673 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
1674 # elif (ACC_CC_MSC && (_MSC_VER < 900))
1675 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
1676 # elif (ACC_CC_TURBOC && (__TURBOC__ == 0x0295))
1677 # define ACC_COMPILE_TIME_ASSERT(e) switch(0) case 1:case !(e):break;
1679 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-2*!(e)];}
1682 #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)
1683 # if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC)
1684 # elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
1685 # define __acc_cdecl __cdecl
1686 # define __acc_cdecl_atexit
1687 # define __acc_cdecl_main __cdecl
1688 # if (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
1689 # define __acc_cdecl_qsort __pascal
1690 # elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
1691 # define __acc_cdecl_qsort _stdcall
1693 # define __acc_cdecl_qsort __cdecl
1695 # elif (ACC_CC_WATCOMC)
1696 # define __acc_cdecl __cdecl
1698 # define __acc_cdecl __cdecl
1699 # define __acc_cdecl_atexit __cdecl
1700 # define __acc_cdecl_main __cdecl
1701 # define __acc_cdecl_qsort __cdecl
1703 # if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_NDPC || ACC_CC_PACIFICC || ACC_CC_WATCOMC)
1704 # elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
1705 # define __acc_cdecl_sighandler __pascal
1706 # elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
1707 # define __acc_cdecl_sighandler _stdcall
1708 # elif (ACC_CC_MSC && (_MSC_VER >= 1400)) && defined(_M_CEE_PURE)
1709 # define __acc_cdecl_sighandler __clrcall
1710 # elif (ACC_CC_MSC && (_MSC_VER >= 600 && _MSC_VER < 700))
1712 # define __acc_cdecl_sighandler _far _cdecl _loadds
1714 # define __acc_cdecl_sighandler _far _cdecl
1716 # define __acc_cdecl_sighandler _cdecl
1719 # define __acc_cdecl_sighandler __cdecl
1721 #elif (ACC_ARCH_I386) && (ACC_CC_WATCOMC)
1722 # define __acc_cdecl __cdecl
1723 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
1724 # define __acc_cdecl cdecl
1726 #if !defined(__acc_cdecl)
1727 # define __acc_cdecl
1729 #if !defined(__acc_cdecl_atexit)
1730 # define __acc_cdecl_atexit
1732 #if !defined(__acc_cdecl_main)
1733 # define __acc_cdecl_main
1735 #if !defined(__acc_cdecl_qsort)
1736 # define __acc_cdecl_qsort
1738 #if !defined(__acc_cdecl_sighandler)
1739 # define __acc_cdecl_sighandler
1741 #if !defined(__acc_cdecl_va)
1742 # define __acc_cdecl_va __acc_cdecl
1744 #if !defined(ACC_CFG_NO_WINDOWS_H)
1745 #if (ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)) || ACC_OS_WIN32 || ACC_OS_WIN64)
1746 # if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
1747 # elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
1748 # elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul)))
1750 # define ACC_HAVE_WINDOWS_H 1
1754 #if (ACC_ARCH_ALPHA)
1755 # define ACC_OPT_AVOID_UINT_INDEX 1
1756 # define ACC_OPT_AVOID_SHORT 1
1757 # define ACC_OPT_AVOID_USHORT 1
1758 #elif (ACC_ARCH_AMD64)
1759 # define ACC_OPT_AVOID_INT_INDEX 1
1760 # define ACC_OPT_AVOID_UINT_INDEX 1
1761 # define ACC_OPT_UNALIGNED16 1
1762 # define ACC_OPT_UNALIGNED32 1
1763 # define ACC_OPT_UNALIGNED64 1
1764 #elif (ACC_ARCH_ARM && ACC_ARCH_ARM_THUMB)
1765 #elif (ACC_ARCH_ARM)
1766 # define ACC_OPT_AVOID_SHORT 1
1767 # define ACC_OPT_AVOID_USHORT 1
1768 #elif (ACC_ARCH_CRIS)
1769 # define ACC_OPT_UNALIGNED16 1
1770 # define ACC_OPT_UNALIGNED32 1
1771 #elif (ACC_ARCH_I386)
1772 # define ACC_OPT_UNALIGNED16 1
1773 # define ACC_OPT_UNALIGNED32 1
1774 #elif (ACC_ARCH_IA64)
1775 # define ACC_OPT_AVOID_INT_INDEX 1
1776 # define ACC_OPT_AVOID_UINT_INDEX 1
1777 # define ACC_OPT_PREFER_POSTINC 1
1778 #elif (ACC_ARCH_M68K)
1779 # define ACC_OPT_PREFER_POSTINC 1
1780 # define ACC_OPT_PREFER_PREDEC 1
1781 # if defined(__mc68020__) && !defined(__mcoldfire__)
1782 # define ACC_OPT_UNALIGNED16 1
1783 # define ACC_OPT_UNALIGNED32 1
1785 #elif (ACC_ARCH_MIPS)
1786 # define ACC_OPT_AVOID_UINT_INDEX 1
1787 #elif (ACC_ARCH_POWERPC)
1788 # define ACC_OPT_PREFER_PREINC 1
1789 # define ACC_OPT_PREFER_PREDEC 1
1790 # if defined(ACC_ABI_BIG_ENDIAN)
1791 # define ACC_OPT_UNALIGNED16 1
1792 # define ACC_OPT_UNALIGNED32 1
1794 #elif (ACC_ARCH_S390)
1795 # define ACC_OPT_UNALIGNED16 1
1796 # define ACC_OPT_UNALIGNED32 1
1797 # if (ACC_SIZEOF_SIZE_T == 8)
1798 # define ACC_OPT_UNALIGNED64 1
1801 # define ACC_OPT_PREFER_POSTINC 1
1802 # define ACC_OPT_PREFER_PREDEC 1
1804 #if !defined(ACC_CFG_NO_INLINE_ASM)
1805 #if defined(ACC_CC_LLVM)
1806 # define ACC_CFG_NO_INLINE_ASM 1
1809 #if !defined(ACC_CFG_NO_UNALIGNED)
1810 #if defined(ACC_ABI_NEUTRAL_ENDIAN) || defined(ACC_ARCH_GENERIC)
1811 # define ACC_CFG_NO_UNALIGNED 1
1814 #if defined(ACC_CFG_NO_UNALIGNED)
1815 # undef ACC_OPT_UNALIGNED16
1816 # undef ACC_OPT_UNALIGNED32
1817 # undef ACC_OPT_UNALIGNED64
1819 #if defined(ACC_CFG_NO_INLINE_ASM)
1820 #elif (ACC_ARCH_I386 && (ACC_OS_DOS32 || ACC_OS_WIN32) && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
1821 # define ACC_ASM_SYNTAX_MSC 1
1822 #elif (ACC_OS_WIN64 && (ACC_CC_DMC || ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC))
1823 #elif (ACC_ARCH_I386 && (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
1824 # define ACC_ASM_SYNTAX_GNUC 1
1825 #elif (ACC_ARCH_AMD64 && (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE))
1826 # define ACC_ASM_SYNTAX_GNUC 1
1828 #if (ACC_ASM_SYNTAX_GNUC)
1829 #if (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
1830 # define __ACC_ASM_CLOBBER "ax"
1831 #elif (ACC_CC_INTELC)
1832 # define __ACC_ASM_CLOBBER "memory"
1834 # define __ACC_ASM_CLOBBER "cc", "memory"
1837 #if defined(__ACC_INFOSTR_MM)
1838 #elif (ACC_MM_FLAT) && (defined(__ACC_INFOSTR_PM) || defined(ACC_INFO_ABI_PM))
1839 # define __ACC_INFOSTR_MM ""
1840 #elif defined(ACC_INFO_MM)
1841 # define __ACC_INFOSTR_MM "." ACC_INFO_MM
1843 # define __ACC_INFOSTR_MM ""
1845 #if defined(__ACC_INFOSTR_PM)
1846 #elif defined(ACC_INFO_ABI_PM)
1847 # define __ACC_INFOSTR_PM "." ACC_INFO_ABI_PM
1849 # define __ACC_INFOSTR_PM ""
1851 #if defined(__ACC_INFOSTR_ENDIAN)
1852 #elif defined(ACC_INFO_ABI_ENDIAN)
1853 # define __ACC_INFOSTR_ENDIAN "." ACC_INFO_ABI_ENDIAN
1855 # define __ACC_INFOSTR_ENDIAN ""
1857 #if defined(__ACC_INFOSTR_OSNAME)
1858 #elif defined(ACC_INFO_OS_CONSOLE)
1859 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_CONSOLE
1860 #elif defined(ACC_INFO_OS_POSIX)
1861 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS "." ACC_INFO_OS_POSIX
1863 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS
1865 #if defined(__ACC_INFOSTR_LIBC)
1866 #elif defined(ACC_INFO_LIBC)
1867 # define __ACC_INFOSTR_LIBC "." ACC_INFO_LIBC
1869 # define __ACC_INFOSTR_LIBC ""
1871 #if defined(__ACC_INFOSTR_CCVER)
1872 #elif defined(ACC_INFO_CCVER)
1873 # define __ACC_INFOSTR_CCVER " " ACC_INFO_CCVER
1875 # define __ACC_INFOSTR_CCVER ""
1877 #define ACC_INFO_STRING \
1878 ACC_INFO_ARCH __ACC_INFOSTR_MM __ACC_INFOSTR_PM __ACC_INFOSTR_ENDIAN \
1879 " " __ACC_INFOSTR_OSNAME __ACC_INFOSTR_LIBC " " ACC_INFO_CC __ACC_INFOSTR_CCVER
1880 #if defined(ACC_CFG_NO_CONFIG_HEADER)
1881 #elif defined(ACC_CFG_CONFIG_HEADER)
1883 #if !defined(ACC_CFG_AUTO_NO_HEADERS)
1884 #if defined(ACC_LIBC_NAKED)
1885 #elif defined(ACC_LIBC_FREESTANDING)
1886 # define HAVE_LIMITS_H 1
1887 # define HAVE_STDARG_H 1
1888 # define HAVE_STDDEF_H 1
1889 #elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
1890 # define HAVE_LIMITS_H 1
1891 # define HAVE_SETJMP_H 1
1892 # define HAVE_STDARG_H 1
1893 # define HAVE_STDDEF_H 1
1894 # define HAVE_STDIO_H 1
1895 # define HAVE_STRING_H 1
1897 #define STDC_HEADERS 1
1898 #define HAVE_ASSERT_H 1
1899 #define HAVE_CTYPE_H 1
1900 #define HAVE_DIRENT_H 1
1901 #define HAVE_ERRNO_H 1
1902 #define HAVE_FCNTL_H 1
1903 #define HAVE_FLOAT_H 1
1904 #define HAVE_LIMITS_H 1
1905 #define HAVE_MALLOC_H 1
1906 #define HAVE_MEMORY_H 1
1907 #define HAVE_SETJMP_H 1
1908 #define HAVE_SIGNAL_H 1
1909 #define HAVE_STDARG_H 1
1910 #define HAVE_STDDEF_H 1
1911 #define HAVE_STDIO_H 1
1912 #define HAVE_STDLIB_H 1
1913 #define HAVE_STRING_H 1
1914 #define HAVE_TIME_H 1
1915 #define HAVE_UNISTD_H 1
1916 #define HAVE_UTIME_H 1
1917 #define HAVE_SYS_STAT_H 1
1918 #define HAVE_SYS_TIME_H 1
1919 #define HAVE_SYS_TYPES_H 1
1921 # if (ACC_OS_POSIX_AIX)
1922 # define HAVE_SYS_RESOURCE_H 1
1923 # elif (ACC_OS_POSIX_FREEBSD || ACC_OS_POSIX_MACOSX || ACC_OS_POSIX_NETBSD || ACC_OS_POSIX_OPENBSD)
1924 # define HAVE_STRINGS_H 1
1925 # undef HAVE_MALLOC_H
1926 # elif (ACC_OS_POSIX_HPUX || ACC_OS_POSIX_INTERIX)
1927 # define HAVE_ALLOCA_H 1
1928 # elif (ACC_OS_POSIX_MACOSX && ACC_LIBC_MSL)
1929 # undef HAVE_SYS_TIME_H
1930 # undef HAVE_SYS_TYPES_H
1931 # elif (ACC_OS_POSIX_SOLARIS || ACC_OS_POSIX_SUNOS)
1932 # define HAVE_ALLOCA_H 1
1934 # if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
1935 # define HAVE_STRINGS_H 1
1936 # define HAVE_SYS_MMAN_H 1
1937 # define HAVE_SYS_RESOURCE_H 1
1938 # define HAVE_SYS_WAIT_H 1
1940 # if (ACC_LIBC_NEWLIB)
1941 # undef HAVE_STRINGS_H
1943 #elif (ACC_OS_CYGWIN)
1944 # define HAVE_IO_H 1
1946 # define HAVE_ALLOCA_H 1
1947 # define HAVE_IO_H 1
1948 #elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
1949 # if !defined(__MINT__)
1950 # undef HAVE_MALLOC_H
1952 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
1953 # undef HAVE_DIRENT_H
1954 # undef HAVE_FCNTL_H
1955 # undef HAVE_MALLOC_H
1956 # undef HAVE_MEMORY_H
1957 # undef HAVE_UNISTD_H
1958 # undef HAVE_UTIME_H
1959 # undef HAVE_SYS_STAT_H
1960 # undef HAVE_SYS_TIME_H
1961 # undef HAVE_SYS_TYPES_H
1963 #if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
1964 #define HAVE_CONIO_H 1
1965 #define HAVE_DIRECT_H 1
1966 #define HAVE_DOS_H 1
1968 #define HAVE_SHARE_H 1
1970 # undef HAVE_CONIO_H
1971 # undef HAVE_DIRECT_H
1972 # undef HAVE_DIRENT_H
1973 # undef HAVE_MALLOC_H
1974 # undef HAVE_SHARE_H
1975 # undef HAVE_UNISTD_H
1976 # undef HAVE_UTIME_H
1977 # undef HAVE_SYS_STAT_H
1978 # undef HAVE_SYS_TIME_H
1979 # undef HAVE_SYS_TYPES_H
1980 #elif (ACC_CC_BORLANDC)
1981 # undef HAVE_UNISTD_H
1982 # undef HAVE_SYS_TIME_H
1983 # if (ACC_OS_WIN32 || ACC_OS_WIN64)
1984 # undef HAVE_DIRENT_H
1986 # if (__BORLANDC__ < 0x0400)
1987 # undef HAVE_DIRENT_H
1988 # undef HAVE_UTIME_H
1991 # undef HAVE_DIRENT_H
1992 # undef HAVE_UNISTD_H
1993 # define HAVE_SYS_DIRENT_H 1
1994 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
1995 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
1996 # define HAVE_ALLOCA_H 1
1997 # undef HAVE_DIRENT_H
1998 # undef HAVE_UNISTD_H
1999 #elif (ACC_CC_IBMC && ACC_OS_OS2)
2001 # undef HAVE_DIRENT_H
2002 # undef HAVE_UNISTD_H
2003 # undef HAVE_UTIME_H
2004 # undef HAVE_SYS_TIME_H
2005 # define HAVE_SYS_UTIME_H 1
2006 #elif (ACC_CC_INTELC || ACC_CC_MSC)
2007 # undef HAVE_DIRENT_H
2008 # undef HAVE_UNISTD_H
2009 # undef HAVE_UTIME_H
2010 # undef HAVE_SYS_TIME_H
2011 # define HAVE_SYS_UTIME_H 1
2012 #elif (ACC_CC_LCCWIN32)
2013 # undef HAVE_DIRENT_H
2015 # undef HAVE_UNISTD_H
2016 # undef HAVE_SYS_TIME_H
2017 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
2018 # undef HAVE_UTIME_H
2019 # define HAVE_SYS_UTIME_H 1
2020 #elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
2021 # define HAVE_ALLOCA_H 1
2023 # undef HAVE_SHARE_H
2024 # undef HAVE_SYS_TIME_H
2026 # undef HAVE_DIRENT_H
2028 # undef HAVE_UNISTD_H
2029 # undef HAVE_UTIME_H
2030 # undef HAVE_SYS_TIME_H
2031 #elif (ACC_CC_PACIFICC)
2032 # undef HAVE_DIRECT_H
2033 # undef HAVE_DIRENT_H
2034 # undef HAVE_FCNTL_H
2036 # undef HAVE_MALLOC_H
2037 # undef HAVE_MEMORY_H
2038 # undef HAVE_SHARE_H
2039 # undef HAVE_UNISTD_H
2040 # undef HAVE_UTIME_H
2041 # undef HAVE_SYS_STAT_H
2042 # undef HAVE_SYS_TIME_H
2043 # undef HAVE_SYS_TYPES_H
2044 #elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
2045 # undef HAVE_DIRENT_H
2047 # undef HAVE_MALLOC_H
2048 # undef HAVE_SHARE_H
2049 # undef HAVE_UNISTD_H
2050 # undef HAVE_UTIME_H
2051 # undef HAVE_SYS_TIME_H
2052 # if (__POCC__ < 280)
2054 # define HAVE_SYS_UTIME_H 1
2056 #elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
2057 # undef HAVE_UTIME_H
2058 # define HAVE_SYS_UTIME_H 1
2059 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
2060 #elif (ACC_CC_SYMANTECC)
2061 # undef HAVE_DIRENT_H
2062 # undef HAVE_UNISTD_H
2063 # if (__SC__ < 0x700)
2064 # undef HAVE_UTIME_H
2065 # undef HAVE_SYS_TIME_H
2067 #elif (ACC_CC_TOPSPEEDC)
2068 # undef HAVE_DIRENT_H
2069 # undef HAVE_UNISTD_H
2070 # undef HAVE_UTIME_H
2071 # undef HAVE_SYS_STAT_H
2072 # undef HAVE_SYS_TIME_H
2073 # undef HAVE_SYS_TYPES_H
2074 #elif (ACC_CC_TURBOC)
2075 # undef HAVE_UNISTD_H
2076 # undef HAVE_SYS_TIME_H
2077 # undef HAVE_SYS_TYPES_H
2078 # if (ACC_OS_WIN32 || ACC_OS_WIN64)
2079 # undef HAVE_DIRENT_H
2081 # if (__TURBOC__ < 0x0200)
2082 # undef HAVE_SIGNAL_H
2084 # if (__TURBOC__ < 0x0400)
2085 # undef HAVE_DIRECT_H
2086 # undef HAVE_DIRENT_H
2087 # undef HAVE_MALLOC_H
2088 # undef HAVE_MEMORY_H
2089 # undef HAVE_UTIME_H
2091 #elif (ACC_CC_WATCOMC)
2092 # undef HAVE_DIRENT_H
2093 # undef HAVE_UTIME_H
2094 # undef HAVE_SYS_TIME_H
2095 # define HAVE_SYS_UTIME_H 1
2096 # if (__WATCOMC__ < 950)
2097 # undef HAVE_UNISTD_H
2099 #elif (ACC_CC_ZORTECHC)
2100 # undef HAVE_DIRENT_H
2101 # undef HAVE_MEMORY_H
2102 # undef HAVE_UNISTD_H
2103 # undef HAVE_UTIME_H
2104 # undef HAVE_SYS_TIME_H
2107 #if (ACC_OS_CONSOLE)
2108 # undef HAVE_DIRENT_H
2110 #if (ACC_OS_EMBEDDED)
2111 # undef HAVE_DIRENT_H
2113 #if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
2114 # undef HAVE_DIRENT_H
2115 # undef HAVE_FCNTL_H
2116 # undef HAVE_MALLOC_H
2117 # undef HAVE_UNISTD_H
2118 # undef HAVE_UTIME_H
2119 # undef HAVE_SYS_STAT_H
2120 # undef HAVE_SYS_TIME_H
2121 # undef HAVE_SYS_TYPES_H
2123 #if (ACC_LIBC_GLIBC >= 0x020100ul)
2124 # define HAVE_STDINT_H 1
2125 #elif (ACC_LIBC_DIETLIBC)
2126 # undef HAVE_STDINT_H
2127 #elif (ACC_LIBC_UCLIBC)
2128 # define HAVE_STDINT_H 1
2129 #elif (ACC_CC_BORLANDC) && (__BORLANDC__ >= 0x560)
2130 # undef HAVE_STDINT_H
2131 #elif (ACC_CC_DMC) && (__DMC__ >= 0x825)
2132 # define HAVE_STDINT_H 1
2134 #if (HAVE_SYS_TIME_H && HAVE_TIME_H)
2135 # define TIME_WITH_SYS_TIME 1
2139 #if !defined(ACC_CFG_AUTO_NO_FUNCTIONS)
2140 #if defined(ACC_LIBC_NAKED)
2141 #elif defined(ACC_LIBC_FREESTANDING)
2142 #elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
2143 # define HAVE_LONGJMP 1
2144 # define HAVE_MEMCMP 1
2145 # define HAVE_MEMCPY 1
2146 # define HAVE_MEMMOVE 1
2147 # define HAVE_MEMSET 1
2148 # define HAVE_SETJMP 1
2150 #define HAVE_ACCESS 1
2151 #define HAVE_ALLOCA 1
2152 #define HAVE_ATEXIT 1
2155 #define HAVE_CHMOD 1
2156 #define HAVE_CHOWN 1
2157 #define HAVE_CTIME 1
2158 #define HAVE_DIFFTIME 1
2159 #define HAVE_FILENO 1
2160 #define HAVE_FSTAT 1
2161 #define HAVE_GETENV 1
2162 #define HAVE_GETTIMEOFDAY 1
2163 #define HAVE_GMTIME 1
2164 #define HAVE_ISATTY 1
2165 #define HAVE_LOCALTIME 1
2166 #define HAVE_LONGJMP 1
2167 #define HAVE_LSTAT 1
2168 #define HAVE_MEMCMP 1
2169 #define HAVE_MEMCPY 1
2170 #define HAVE_MEMMOVE 1
2171 #define HAVE_MEMSET 1
2172 #define HAVE_MKDIR 1
2173 #define HAVE_MKTIME 1
2174 #define HAVE_QSORT 1
2175 #define HAVE_RAISE 1
2176 #define HAVE_RMDIR 1
2177 #define HAVE_SETJMP 1
2178 #define HAVE_SIGNAL 1
2179 #define HAVE_SNPRINTF 1
2181 #define HAVE_STRCHR 1
2182 #define HAVE_STRDUP 1
2183 #define HAVE_STRERROR 1
2184 #define HAVE_STRFTIME 1
2185 #define HAVE_STRRCHR 1
2186 #define HAVE_STRSTR 1
2188 #define HAVE_UMASK 1
2189 #define HAVE_UTIME 1
2190 #define HAVE_VSNPRINTF 1
2191 #if (ACC_OS_BEOS || ACC_OS_CYGWIN || ACC_OS_POSIX || ACC_OS_QNX || ACC_OS_VMS)
2192 # define HAVE_STRCASECMP 1
2193 # define HAVE_STRNCASECMP 1
2194 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
2195 # define HAVE_STRCASECMP 1
2196 # define HAVE_STRNCASECMP 1
2198 # define HAVE_STRICMP 1
2199 # define HAVE_STRNICMP 1
2202 # if (ACC_OS_POSIX_AIX)
2203 # define HAVE_GETRUSAGE 1
2204 # elif (ACC_OS_POSIX_MACOSX && ACC_LIBC_MSL)
2207 # elif (ACC_OS_POSIX_UNICOS)
2209 # undef HAVE_SNPRINTF
2210 # undef HAVE_VSNPRINTF
2215 # if (ACC_LIBC_DIETLIBC || ACC_LIBC_GLIBC || ACC_LIBC_UCLIBC)
2216 # define HAVE_GETRUSAGE 1
2217 # define HAVE_GETPAGESIZE 1
2218 # define HAVE_MMAP 1
2219 # define HAVE_MPROTECT 1
2220 # define HAVE_MUNMAP 1
2222 #elif (ACC_OS_CYGWIN)
2223 # if (ACC_CC_GNUC < 0x025a00ul)
2224 # undef HAVE_GETTIMEOFDAY
2227 # if (ACC_CC_GNUC < 0x025f00ul)
2228 # undef HAVE_SNPRINTF
2229 # undef HAVE_VSNPRINTF
2234 #elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
2235 # if !defined(__MINT__)
2236 # undef HAVE_SNPRINTF
2237 # undef HAVE_VSNPRINTF
2239 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
2245 # undef HAVE_GETTIMEOFDAY
2247 # undef HAVE_SNPRINTF
2250 # undef HAVE_VSNPRINTF
2252 #if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
2254 #undef HAVE_GETTIMEOFDAY
2259 # undef HAVE_DIFFTIME
2262 # undef HAVE_SNPRINTF
2264 # undef HAVE_VSNPRINTF
2265 #elif (ACC_CC_BORLANDC)
2266 # if (__BORLANDC__ < 0x0400)
2270 # if ((__BORLANDC__ < 0x0410) && ACC_OS_WIN16)
2273 # if (__BORLANDC__ < 0x0550)
2274 # undef HAVE_SNPRINTF
2275 # undef HAVE_VSNPRINTF
2281 # define snprintf _snprintf
2282 # define vsnprintf _vsnprintf
2283 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
2284 # undef HAVE_SNPRINTF
2285 # undef HAVE_VSNPRINTF
2286 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
2287 # undef HAVE_SNPRINTF
2288 # undef HAVE_VSNPRINTF
2290 # undef HAVE_SNPRINTF
2291 # undef HAVE_VSNPRINTF
2292 #elif (ACC_CC_INTELC)
2293 # define snprintf _snprintf
2294 # define vsnprintf _vsnprintf
2295 #elif (ACC_CC_LCCWIN32)
2296 # define utime _utime
2298 # if (_MSC_VER < 600)
2299 # undef HAVE_STRFTIME
2301 # if (_MSC_VER < 700)
2302 # undef HAVE_SNPRINTF
2303 # undef HAVE_VSNPRINTF
2304 # elif (_MSC_VER < 1500)
2305 # define snprintf _snprintf
2306 # define vsnprintf _vsnprintf
2308 # if ((_MSC_VER < 800) && ACC_OS_WIN16)
2311 # if (ACC_ARCH_I086) && defined(__cplusplus)
2312 # undef HAVE_LONGJMP
2315 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
2316 # if (ACC_CC_GNUC < 0x025f00ul)
2317 # undef HAVE_SNPRINTF
2318 # undef HAVE_VSNPRINTF
2320 # define snprintf _snprintf
2321 # define vsnprintf _vsnprintf
2323 #elif (ACC_OS_WIN32 && ACC_LIBC_MSL)
2324 # if (__MSL__ < 0x8000ul)
2329 # undef HAVE_SNPRINTF
2330 # undef HAVE_STRNICMP
2332 # undef HAVE_VSNPRINTF
2333 # if defined(__cplusplus)
2336 #elif (ACC_CC_PACIFICC)
2340 # undef HAVE_DIFFTIME
2344 # undef HAVE_SNPRINTF
2345 # undef HAVE_STRFTIME
2347 # undef HAVE_VSNPRINTF
2348 #elif (ACC_OS_WIN32 && ACC_CC_PELLESC)
2349 # if (__POCC__ < 280)
2350 # define alloca _alloca
2353 #elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
2354 # define snprintf _snprintf
2355 # define vsnprintf _vsnprintf
2356 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
2357 # undef HAVE_SNPRINTF
2358 # undef HAVE_VSNPRINTF
2359 #elif (ACC_CC_SYMANTECC)
2360 # if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
2363 # if (__SC__ < 0x600)
2364 # undef HAVE_SNPRINTF
2365 # undef HAVE_VSNPRINTF
2367 # define snprintf _snprintf
2368 # define vsnprintf _vsnprintf
2370 # if (__SC__ < 0x700)
2371 # undef HAVE_DIFFTIME
2374 #elif (ACC_CC_TOPSPEEDC)
2375 # undef HAVE_SNPRINTF
2376 # undef HAVE_VSNPRINTF
2377 #elif (ACC_CC_TURBOC)
2379 # undef HAVE_SNPRINTF
2380 # undef HAVE_VSNPRINTF
2381 # if (__TURBOC__ < 0x0200)
2385 # if (__TURBOC__ < 0x0295)
2387 # undef HAVE_STRFTIME
2389 # if (__TURBOC__ < 0x0400)
2392 #elif (ACC_CC_WATCOMC)
2393 # if (__WATCOMC__ < 1100)
2394 # undef HAVE_SNPRINTF
2395 # undef HAVE_VSNPRINTF
2396 # elif (__WATCOMC__ < 1200)
2397 # define snprintf _snprintf
2398 # define vsnprintf _vsnprintf
2400 #elif (ACC_CC_ZORTECHC)
2401 # if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE))
2404 # undef HAVE_DIFFTIME
2405 # undef HAVE_SNPRINTF
2407 # undef HAVE_VSNPRINTF
2410 #if (ACC_OS_CONSOLE)
2414 # undef HAVE_GETTIMEOFDAY
2420 #if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99)
2425 # undef HAVE_GETTIMEOFDAY
2436 # undef HAVE_STRICMP
2437 # undef HAVE_STRNICMP
2442 #if !defined(ACC_CFG_AUTO_NO_SIZES)
2443 #if !defined(SIZEOF_SHORT) && defined(ACC_SIZEOF_SHORT)
2444 # define SIZEOF_SHORT ACC_SIZEOF_SHORT
2446 #if !defined(SIZEOF_INT) && defined(ACC_SIZEOF_INT)
2447 # define SIZEOF_INT ACC_SIZEOF_INT
2449 #if !defined(SIZEOF_LONG) && defined(ACC_SIZEOF_LONG)
2450 # define SIZEOF_LONG ACC_SIZEOF_LONG
2452 #if !defined(SIZEOF_LONG_LONG) && defined(ACC_SIZEOF_LONG_LONG)
2453 # define SIZEOF_LONG_LONG ACC_SIZEOF_LONG_LONG
2455 #if !defined(SIZEOF___INT32) && defined(ACC_SIZEOF___INT32)
2456 # define SIZEOF___INT32 ACC_SIZEOF___INT32
2458 #if !defined(SIZEOF___INT64) && defined(ACC_SIZEOF___INT64)
2459 # define SIZEOF___INT64 ACC_SIZEOF___INT64
2461 #if !defined(SIZEOF_VOID_P) && defined(ACC_SIZEOF_VOID_P)
2462 # define SIZEOF_VOID_P ACC_SIZEOF_VOID_P
2464 #if !defined(SIZEOF_SIZE_T) && defined(ACC_SIZEOF_SIZE_T)
2465 # define SIZEOF_SIZE_T ACC_SIZEOF_SIZE_T
2467 #if !defined(SIZEOF_PTRDIFF_T) && defined(ACC_SIZEOF_PTRDIFF_T)
2468 # define SIZEOF_PTRDIFF_T ACC_SIZEOF_PTRDIFF_T
2471 #if defined(HAVE_SIGNAL) && !defined(RETSIGTYPE)
2472 # define RETSIGTYPE void
2475 #if defined(ACC_CFG_NO_ACC_TYPE_H)
2477 #if (ACC_SIZEOF_LONG_LONG+0 > 0)
2478 __acc_gnuc_extension__
typedef long long acc_llong_t
;
2479 __acc_gnuc_extension__
typedef unsigned long long acc_ullong_t
;
2481 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0))
2482 # error "missing defines for sizes"
2484 #if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0))
2485 # error "missing defines for sizes"
2487 #if !defined(acc_int16e_t)
2488 #if (ACC_SIZEOF_LONG == 2)
2489 # define acc_int16e_t long
2490 # define acc_uint16e_t unsigned long
2491 #elif (ACC_SIZEOF_INT == 2)
2492 # define acc_int16e_t int
2493 # define acc_uint16e_t unsigned int
2494 #elif (ACC_SIZEOF_SHORT == 2)
2495 # define acc_int16e_t short int
2496 # define acc_uint16e_t unsigned short int
2497 #elif 1 && !defined(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_GNUC >= 0x025f00ul || ACC_CC_LLVM)
2498 typedef int __acc_int16e_hi_t
__attribute__((__mode__(__HI__
)));
2499 typedef unsigned int __acc_uint16e_hi_t
__attribute__((__mode__(__HI__
)));
2500 # define acc_int16e_t __acc_int16e_hi_t
2501 # define acc_uint16e_t __acc_uint16e_hi_t
2502 #elif (ACC_SIZEOF___INT16 == 2)
2503 # define acc_int16e_t __int16
2504 # define acc_uint16e_t unsigned __int16
2508 #if defined(acc_int16e_t)
2509 # define ACC_SIZEOF_ACC_INT16E_T 2
2511 #if !defined(acc_int32e_t)
2512 #if (ACC_SIZEOF_LONG == 4)
2513 # define acc_int32e_t long int
2514 # define acc_uint32e_t unsigned long int
2515 #elif (ACC_SIZEOF_INT == 4)
2516 # define acc_int32e_t int
2517 # define acc_uint32e_t unsigned int
2518 #elif (ACC_SIZEOF_SHORT == 4)
2519 # define acc_int32e_t short int
2520 # define acc_uint32e_t unsigned short int
2521 #elif (ACC_SIZEOF_LONG_LONG == 4)
2522 # define acc_int32e_t acc_llong_t
2523 # define acc_uint32e_t acc_ullong_t
2524 #elif 1 && !defined(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
2525 typedef int __acc_int32e_si_t
__attribute__((__mode__(__SI__
)));
2526 typedef unsigned int __acc_uint32e_si_t
__attribute__((__mode__(__SI__
)));
2527 # define acc_int32e_t __acc_int32e_si_t
2528 # define acc_uint32e_t __acc_uint32e_si_t
2529 #elif 1 && !defined(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
2530 typedef int __acc_int32e_si_t
__attribute__((__mode__(__SI__
)));
2531 typedef unsigned int __acc_uint32e_si_t
__attribute__((__mode__(__SI__
)));
2532 # define acc_int32e_t __acc_int32e_si_t
2533 # define acc_uint32e_t __acc_uint32e_si_t
2534 # define ACC_INT32_C(c) c##LL
2535 # define ACC_UINT32_C(c) c##ULL
2536 #elif (ACC_SIZEOF___INT32 == 4)
2537 # define acc_int32e_t __int32
2538 # define acc_uint32e_t unsigned __int32
2542 #if defined(acc_int32e_t)
2543 # define ACC_SIZEOF_ACC_INT32E_T 4
2545 #if !defined(acc_int64e_t)
2546 #if (ACC_SIZEOF___INT64 == 8)
2547 # if (ACC_CC_BORLANDC) && !defined(ACC_CFG_TYPE_PREFER___INT64)
2548 # define ACC_CFG_TYPE_PREFER___INT64 1
2551 #if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
2552 # define acc_int64e_t int
2553 # define acc_uint64e_t unsigned int
2554 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_INT
2555 #elif (ACC_SIZEOF_LONG == 8)
2556 # define acc_int64e_t long int
2557 # define acc_uint64e_t unsigned long int
2558 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG
2559 #elif (ACC_SIZEOF_LONG_LONG == 8) && !defined(ACC_CFG_TYPE_PREFER___INT64)
2560 # define acc_int64e_t acc_llong_t
2561 # define acc_uint64e_t acc_ullong_t
2562 # if (ACC_CC_BORLANDC)
2563 # define ACC_INT64_C(c) ((c) + 0ll)
2564 # define ACC_UINT64_C(c) ((c) + 0ull)
2566 # define ACC_INT64_C(c) c##LL
2567 # define ACC_UINT64_C(c) c##ULL
2569 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG_LONG
2570 #elif (ACC_SIZEOF___INT64 == 8)
2571 # define acc_int64e_t __int64
2572 # define acc_uint64e_t unsigned __int64
2573 # if (ACC_CC_BORLANDC)
2574 # define ACC_INT64_C(c) ((c) + 0i64)
2575 # define ACC_UINT64_C(c) ((c) + 0ui64)
2577 # define ACC_INT64_C(c) c##i64
2578 # define ACC_UINT64_C(c) c##ui64
2580 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF___INT64
2584 #if !defined(acc_int32l_t)
2585 #if defined(acc_int32e_t)
2586 # define acc_int32l_t acc_int32e_t
2587 # define acc_uint32l_t acc_uint32e_t
2588 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T
2589 #elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
2590 # define acc_int32l_t int
2591 # define acc_uint32l_t unsigned int
2592 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT
2593 #elif (ACC_SIZEOF_LONG >= 4)
2594 # define acc_int32l_t long int
2595 # define acc_uint32l_t unsigned long int
2596 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG
2598 # error "acc_int32l_t"
2601 #if !defined(acc_int64l_t)
2602 #if defined(acc_int64e_t)
2603 # define acc_int64l_t acc_int64e_t
2604 # define acc_uint64l_t acc_uint64e_t
2605 # define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T
2609 #if !defined(acc_int32f_t)
2610 #if (ACC_SIZEOF_SIZE_T >= 8)
2611 # define acc_int32f_t acc_int64l_t
2612 # define acc_uint32f_t acc_uint64l_t
2613 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T
2615 # define acc_int32f_t acc_int32l_t
2616 # define acc_uint32f_t acc_uint32l_t
2617 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T
2620 #if !defined(acc_intptr_t)
2621 #if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16))
2622 # define __ACC_INTPTR_T_IS_POINTER 1
2623 typedef char* acc_intptr_t
;
2624 typedef char* acc_uintptr_t
;
2625 # define acc_intptr_t acc_intptr_t
2626 # define acc_uintptr_t acc_uintptr_t
2627 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P
2628 #elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4))
2629 typedef __w64
int acc_intptr_t
;
2630 typedef __w64
unsigned int acc_uintptr_t
;
2631 # define acc_intptr_t acc_intptr_t
2632 # define acc_uintptr_t acc_uintptr_t
2633 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
2634 #elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P)
2635 # define acc_intptr_t short
2636 # define acc_uintptr_t unsigned short
2637 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT
2638 #elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
2639 # define acc_intptr_t int
2640 # define acc_uintptr_t unsigned int
2641 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
2642 #elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P)
2643 # define acc_intptr_t long
2644 # define acc_uintptr_t unsigned long
2645 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG
2646 #elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P)
2647 # define acc_intptr_t acc_int64l_t
2648 # define acc_uintptr_t acc_uint64l_t
2649 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T
2651 # error "acc_intptr_t"
2654 #if !defined(acc_word_t)
2655 #if defined(ACC_WORDSIZE) && (ACC_WORDSIZE > 0)
2656 #if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !defined(__ACC_INTPTR_T_IS_POINTER)
2657 # define acc_word_t acc_uintptr_t
2658 # define acc_sword_t acc_intptr_t
2659 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T
2660 #elif (ACC_WORDSIZE == ACC_SIZEOF_LONG)
2661 # define acc_word_t unsigned long
2662 # define acc_sword_t long
2663 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG
2664 #elif (ACC_WORDSIZE == ACC_SIZEOF_INT)
2665 # define acc_word_t unsigned int
2666 # define acc_sword_t int
2667 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT
2668 #elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT)
2669 # define acc_word_t unsigned short
2670 # define acc_sword_t short
2671 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT
2672 #elif (ACC_WORDSIZE == 1)
2673 # define acc_word_t unsigned char
2674 # define acc_sword_t signed char
2675 # define ACC_SIZEOF_ACC_WORD_T 1
2676 #elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T)
2677 # define acc_word_t acc_uint64l_t
2678 # define acc_sword_t acc_int64l_t
2679 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
2680 #elif (ACC_ARCH_SPU) && (ACC_CC_GNUC)
2682 typedef unsigned acc_word_t
__attribute__((__mode__(__V16QI__
)));
2683 typedef int acc_sword_t
__attribute__((__mode__(__V16QI__
)));
2684 # define acc_word_t acc_word_t
2685 # define acc_sword_t acc_sword_t
2686 # define ACC_SIZEOF_ACC_WORD_T 16
2689 # error "acc_word_t"
2693 #if !defined(ACC_INT16_C)
2694 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2)
2695 # define ACC_INT16_C(c) ((c) + 0)
2696 # define ACC_UINT16_C(c) ((c) + 0U)
2697 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2)
2698 # define ACC_INT16_C(c) ((c) + 0L)
2699 # define ACC_UINT16_C(c) ((c) + 0UL)
2700 # elif (ACC_SIZEOF_INT >= 2)
2701 # define ACC_INT16_C(c) c
2702 # define ACC_UINT16_C(c) c##U
2703 # elif (ACC_SIZEOF_LONG >= 2)
2704 # define ACC_INT16_C(c) c##L
2705 # define ACC_UINT16_C(c) c##UL
2707 # error "ACC_INT16_C"
2710 #if !defined(ACC_INT32_C)
2711 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4)
2712 # define ACC_INT32_C(c) ((c) + 0)
2713 # define ACC_UINT32_C(c) ((c) + 0U)
2714 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4)
2715 # define ACC_INT32_C(c) ((c) + 0L)
2716 # define ACC_UINT32_C(c) ((c) + 0UL)
2717 # elif (ACC_SIZEOF_INT >= 4)
2718 # define ACC_INT32_C(c) c
2719 # define ACC_UINT32_C(c) c##U
2720 # elif (ACC_SIZEOF_LONG >= 4)
2721 # define ACC_INT32_C(c) c##L
2722 # define ACC_UINT32_C(c) c##UL
2723 # elif (ACC_SIZEOF_LONG_LONG >= 4)
2724 # define ACC_INT32_C(c) c##LL
2725 # define ACC_UINT32_C(c) c##ULL
2727 # error "ACC_INT32_C"
2730 #if !defined(ACC_INT64_C) && defined(acc_int64l_t)
2731 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8)
2732 # define ACC_INT64_C(c) ((c) + 0)
2733 # define ACC_UINT64_C(c) ((c) + 0U)
2734 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8)
2735 # define ACC_INT64_C(c) ((c) + 0L)
2736 # define ACC_UINT64_C(c) ((c) + 0UL)
2737 # elif (ACC_SIZEOF_INT >= 8)
2738 # define ACC_INT64_C(c) c
2739 # define ACC_UINT64_C(c) c##U
2740 # elif (ACC_SIZEOF_LONG >= 8)
2741 # define ACC_INT64_C(c) c##L
2742 # define ACC_UINT64_C(c) c##UL
2744 # error "ACC_INT64_C"
2747 #if !defined(SIZEOF_ACC_INT16E_T) && defined(ACC_SIZEOF_ACC_INT16E_T)
2748 # define SIZEOF_ACC_INT16E_T ACC_SIZEOF_ACC_INT16E_T
2750 #if !defined(SIZEOF_ACC_INT32E_T) && defined(ACC_SIZEOF_ACC_INT32E_T)
2751 # define SIZEOF_ACC_INT32E_T ACC_SIZEOF_ACC_INT32E_T
2753 #if !defined(SIZEOF_ACC_INT64E_T) && defined(ACC_SIZEOF_ACC_INT64E_T)
2754 # define SIZEOF_ACC_INT64E_T ACC_SIZEOF_ACC_INT64E_T
2756 #if !defined(SIZEOF_ACC_INT32L_T) && defined(ACC_SIZEOF_ACC_INT32L_T)
2757 # define SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32L_T
2759 #if !defined(SIZEOF_ACC_INT64L_T) && defined(ACC_SIZEOF_ACC_INT64L_T)
2760 # define SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64L_T
2762 #if !defined(SIZEOF_ACC_INT32F_T) && defined(ACC_SIZEOF_ACC_INT32F_T)
2763 # define SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32F_T
2765 #if !defined(SIZEOF_ACC_INTPTR_T) && defined(ACC_SIZEOF_ACC_INTPTR_T)
2766 # define SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INTPTR_T
2768 #if !defined(SIZEOF_ACC_WORD_T) && defined(ACC_SIZEOF_ACC_WORD_T)
2769 # define SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_WORD_T
2771 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
2772 # define acc_signo_t acc_int32e_t
2774 #if !defined(acc_signo_t)
2775 # define acc_signo_t int
2777 #if defined(__cplusplus)
2780 #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
2781 typedef void __acc_cdecl_sighandler (*acc_sighandler_t
)(acc_signo_t
);
2782 #elif defined(RETSIGTYPE)
2783 typedef RETSIGTYPE (__acc_cdecl_sighandler
*acc_sighandler_t
)(acc_signo_t
);
2785 typedef void (__acc_cdecl_sighandler
*acc_sighandler_t
)(acc_signo_t
);
2787 #if defined(__cplusplus)
2790 # if defined(ACC_CFG_NO_ACC_UA_H)
2792 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
2793 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
2794 #elif (ACC_CC_INTELC) && defined(_WIN32)
2795 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
2797 #elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
2798 #if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
2799 typedef struct { __acc_ua_volatile acc_uint16e_t v
__attribute__((__packed__
)); } __acc_ua16_t
;
2800 # define __acc_ua16_t __acc_ua16_t
2802 #if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
2803 typedef struct { __acc_ua_volatile acc_uint32e_t v
__attribute__((__packed__
)); } __acc_ua32_t
;
2804 # define __acc_ua32_t __acc_ua32_t
2806 #if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
2807 typedef struct { __acc_ua_volatile acc_uint64l_t v
__attribute__((__packed__
)); } __acc_ua64_t
;
2808 # define __acc_ua64_t __acc_ua64_t
2811 #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
2812 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p))
2813 #define ACC_UA_SET16(p,v) (* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p) = (acc_uint16e_t) (v))
2814 #if (ACC_ABI_BIG_ENDIAN)
2815 # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p)
2816 # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v)
2817 #elif (ACC_ABI_LITTLE_ENDIAN)
2818 # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p)
2819 # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v)
2821 #if !defined(ACC_CFG_NO_INLINE_ASM) && defined(__acc_HAVE_forceinline)
2822 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
2823 #if !defined(ACC_UA_GET_LE16)
2824 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile
const void* pp
);
2825 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile
const void* pp
) {
2826 __acc_ua_volatile
const acc_uint16e_t
* p
= (__acc_ua_volatile
const acc_uint16e_t
*) pp
;
2828 __asm__
__volatile__("lhbrx %0,0,%1" : "=r" (v
) : "r" (p
), "m" (*p
));
2831 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
2833 #if !defined(ACC_UA_SET_LE16)
2834 extern __acc_forceinline
void __ACC_UA_SET_LE16(__acc_ua_volatile
void* pp
, unsigned long v
);
2835 extern __acc_forceinline
void __ACC_UA_SET_LE16(__acc_ua_volatile
void* pp
, unsigned long v
) {
2836 __acc_ua_volatile acc_uint16e_t
* p
= (__acc_ua_volatile acc_uint16e_t
*) pp
;
2837 __asm__
__volatile__("sthbrx %2,0,%1" : "=m" (*p
) : "r" (p
), "r" (v
));
2839 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v)
2843 #if !defined(ACC_UA_COPY16)
2844 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
2847 #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
2848 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p))
2849 #define ACC_UA_SET32(p,v) (* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p) = (acc_uint32e_t) (v))
2850 #if (ACC_ABI_BIG_ENDIAN)
2851 # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p)
2852 # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v)
2853 #elif (ACC_ABI_LITTLE_ENDIAN)
2854 # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p)
2855 # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v)
2857 #if !defined(ACC_CFG_NO_INLINE_ASM) && defined(__acc_HAVE_forceinline)
2858 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
2859 #if !defined(ACC_UA_GET_LE32)
2860 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile
const void* pp
);
2861 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile
const void* pp
) {
2862 __acc_ua_volatile
const acc_uint32e_t
* p
= (__acc_ua_volatile
const acc_uint32e_t
*) pp
;
2864 __asm__
__volatile__("lwbrx %0,0,%1" : "=r" (v
) : "r" (p
), "m" (*p
));
2867 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
2869 #if !defined(ACC_UA_SET_LE32)
2870 extern __acc_forceinline
void __ACC_UA_SET_LE32(__acc_ua_volatile
void* pp
, unsigned long v
);
2871 extern __acc_forceinline
void __ACC_UA_SET_LE32(__acc_ua_volatile
void* pp
, unsigned long v
) {
2872 __acc_ua_volatile acc_uint32e_t
* p
= (__acc_ua_volatile acc_uint32e_t
*) pp
;
2873 __asm__
__volatile__("stwbrx %2,0,%1" : "=m" (*p
) : "r" (p
), "r" (v
));
2875 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v)
2879 #if !defined(ACC_UA_COPY32)
2880 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
2883 #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
2884 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p))
2885 #define ACC_UA_SET64(p,v) (* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p) = (acc_uint64l_t) (v))
2886 #if (ACC_ABI_BIG_ENDIAN)
2887 # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p)
2888 # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v)
2889 #elif (ACC_ABI_LITTLE_ENDIAN)
2890 # define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
2891 # define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
2893 #if !defined(ACC_UA_COPY64)
2894 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
2900 #if defined(ACC_WANT_ACC_TYPE_H)
2901 # undef ACC_WANT_ACC_TYPE_H
2902 # if defined(ACC_CFG_NO_ACC_TYPE_H)
2903 # error "ACC_WANT_ACC_TYPE_H with ACC_CFG_NO_ACC_TYPE_H"
2905 #if (ACC_SIZEOF_LONG_LONG+0 > 0)
2906 __acc_gnuc_extension__
typedef long long acc_llong_t
;
2907 __acc_gnuc_extension__
typedef unsigned long long acc_ullong_t
;
2909 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0))
2910 # error "missing defines for sizes"
2912 #if (!(ACC_SIZEOF_PTRDIFF_T+0 > 0 && ACC_SIZEOF_SIZE_T+0 > 0 && ACC_SIZEOF_VOID_P+0 > 0))
2913 # error "missing defines for sizes"
2915 #if !defined(acc_int16e_t)
2916 #if (ACC_SIZEOF_LONG == 2)
2917 # define acc_int16e_t long
2918 # define acc_uint16e_t unsigned long
2919 #elif (ACC_SIZEOF_INT == 2)
2920 # define acc_int16e_t int
2921 # define acc_uint16e_t unsigned int
2922 #elif (ACC_SIZEOF_SHORT == 2)
2923 # define acc_int16e_t short int
2924 # define acc_uint16e_t unsigned short int
2925 #elif 1 && !defined(ACC_CFG_TYPE_NO_MODE_HI) && (ACC_CC_GNUC >= 0x025f00ul || ACC_CC_LLVM)
2926 typedef int __acc_int16e_hi_t
__attribute__((__mode__(__HI__
)));
2927 typedef unsigned int __acc_uint16e_hi_t
__attribute__((__mode__(__HI__
)));
2928 # define acc_int16e_t __acc_int16e_hi_t
2929 # define acc_uint16e_t __acc_uint16e_hi_t
2930 #elif (ACC_SIZEOF___INT16 == 2)
2931 # define acc_int16e_t __int16
2932 # define acc_uint16e_t unsigned __int16
2936 #if defined(acc_int16e_t)
2937 # define ACC_SIZEOF_ACC_INT16E_T 2
2939 #if !defined(acc_int32e_t)
2940 #if (ACC_SIZEOF_LONG == 4)
2941 # define acc_int32e_t long int
2942 # define acc_uint32e_t unsigned long int
2943 #elif (ACC_SIZEOF_INT == 4)
2944 # define acc_int32e_t int
2945 # define acc_uint32e_t unsigned int
2946 #elif (ACC_SIZEOF_SHORT == 4)
2947 # define acc_int32e_t short int
2948 # define acc_uint32e_t unsigned short int
2949 #elif (ACC_SIZEOF_LONG_LONG == 4)
2950 # define acc_int32e_t acc_llong_t
2951 # define acc_uint32e_t acc_ullong_t
2952 #elif 1 && !defined(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul || ACC_CC_LLVM) && (__INT_MAX__+0 > 2147483647L)
2953 typedef int __acc_int32e_si_t
__attribute__((__mode__(__SI__
)));
2954 typedef unsigned int __acc_uint32e_si_t
__attribute__((__mode__(__SI__
)));
2955 # define acc_int32e_t __acc_int32e_si_t
2956 # define acc_uint32e_t __acc_uint32e_si_t
2957 #elif 1 && !defined(ACC_CFG_TYPE_NO_MODE_SI) && (ACC_CC_GNUC >= 0x025f00ul) && defined(__AVR__) && (__LONG_MAX__+0 == 32767L)
2958 typedef int __acc_int32e_si_t
__attribute__((__mode__(__SI__
)));
2959 typedef unsigned int __acc_uint32e_si_t
__attribute__((__mode__(__SI__
)));
2960 # define acc_int32e_t __acc_int32e_si_t
2961 # define acc_uint32e_t __acc_uint32e_si_t
2962 # define ACC_INT32_C(c) c##LL
2963 # define ACC_UINT32_C(c) c##ULL
2964 #elif (ACC_SIZEOF___INT32 == 4)
2965 # define acc_int32e_t __int32
2966 # define acc_uint32e_t unsigned __int32
2970 #if defined(acc_int32e_t)
2971 # define ACC_SIZEOF_ACC_INT32E_T 4
2973 #if !defined(acc_int64e_t)
2974 #if (ACC_SIZEOF___INT64 == 8)
2975 # if (ACC_CC_BORLANDC) && !defined(ACC_CFG_TYPE_PREFER___INT64)
2976 # define ACC_CFG_TYPE_PREFER___INT64 1
2979 #if (ACC_SIZEOF_INT == 8) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
2980 # define acc_int64e_t int
2981 # define acc_uint64e_t unsigned int
2982 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_INT
2983 #elif (ACC_SIZEOF_LONG == 8)
2984 # define acc_int64e_t long int
2985 # define acc_uint64e_t unsigned long int
2986 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG
2987 #elif (ACC_SIZEOF_LONG_LONG == 8) && !defined(ACC_CFG_TYPE_PREFER___INT64)
2988 # define acc_int64e_t acc_llong_t
2989 # define acc_uint64e_t acc_ullong_t
2990 # if (ACC_CC_BORLANDC)
2991 # define ACC_INT64_C(c) ((c) + 0ll)
2992 # define ACC_UINT64_C(c) ((c) + 0ull)
2994 # define ACC_INT64_C(c) c##LL
2995 # define ACC_UINT64_C(c) c##ULL
2997 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF_LONG_LONG
2998 #elif (ACC_SIZEOF___INT64 == 8)
2999 # define acc_int64e_t __int64
3000 # define acc_uint64e_t unsigned __int64
3001 # if (ACC_CC_BORLANDC)
3002 # define ACC_INT64_C(c) ((c) + 0i64)
3003 # define ACC_UINT64_C(c) ((c) + 0ui64)
3005 # define ACC_INT64_C(c) c##i64
3006 # define ACC_UINT64_C(c) c##ui64
3008 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF___INT64
3012 #if !defined(acc_int32l_t)
3013 #if defined(acc_int32e_t)
3014 # define acc_int32l_t acc_int32e_t
3015 # define acc_uint32l_t acc_uint32e_t
3016 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32E_T
3017 #elif (ACC_SIZEOF_INT >= 4) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3018 # define acc_int32l_t int
3019 # define acc_uint32l_t unsigned int
3020 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_INT
3021 #elif (ACC_SIZEOF_LONG >= 4)
3022 # define acc_int32l_t long int
3023 # define acc_uint32l_t unsigned long int
3024 # define ACC_SIZEOF_ACC_INT32L_T ACC_SIZEOF_LONG
3026 # error "acc_int32l_t"
3029 #if !defined(acc_int64l_t)
3030 #if defined(acc_int64e_t)
3031 # define acc_int64l_t acc_int64e_t
3032 # define acc_uint64l_t acc_uint64e_t
3033 # define ACC_SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64E_T
3037 #if !defined(acc_int32f_t)
3038 #if (ACC_SIZEOF_SIZE_T >= 8)
3039 # define acc_int32f_t acc_int64l_t
3040 # define acc_uint32f_t acc_uint64l_t
3041 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT64L_T
3043 # define acc_int32f_t acc_int32l_t
3044 # define acc_uint32f_t acc_uint32l_t
3045 # define ACC_SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32L_T
3048 #if !defined(acc_intptr_t)
3049 #if 1 && (ACC_OS_OS400 && (ACC_SIZEOF_VOID_P == 16))
3050 # define __ACC_INTPTR_T_IS_POINTER 1
3051 typedef char* acc_intptr_t
;
3052 typedef char* acc_uintptr_t
;
3053 # define acc_intptr_t acc_intptr_t
3054 # define acc_uintptr_t acc_uintptr_t
3055 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_VOID_P
3056 #elif (ACC_CC_MSC && (_MSC_VER >= 1300) && (ACC_SIZEOF_VOID_P == 4) && (ACC_SIZEOF_INT == 4))
3057 typedef __w64
int acc_intptr_t
;
3058 typedef __w64
unsigned int acc_uintptr_t
;
3059 # define acc_intptr_t acc_intptr_t
3060 # define acc_uintptr_t acc_uintptr_t
3061 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
3062 #elif (ACC_SIZEOF_SHORT == ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT > ACC_SIZEOF_VOID_P)
3063 # define acc_intptr_t short
3064 # define acc_uintptr_t unsigned short
3065 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_SHORT
3066 #elif (ACC_SIZEOF_INT >= ACC_SIZEOF_VOID_P) && (ACC_SIZEOF_INT < ACC_SIZEOF_LONG)
3067 # define acc_intptr_t int
3068 # define acc_uintptr_t unsigned int
3069 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_INT
3070 #elif (ACC_SIZEOF_LONG >= ACC_SIZEOF_VOID_P)
3071 # define acc_intptr_t long
3072 # define acc_uintptr_t unsigned long
3073 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_LONG
3074 #elif (ACC_SIZEOF_ACC_INT64L_T >= ACC_SIZEOF_VOID_P)
3075 # define acc_intptr_t acc_int64l_t
3076 # define acc_uintptr_t acc_uint64l_t
3077 # define ACC_SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INT64L_T
3079 # error "acc_intptr_t"
3082 #if !defined(acc_word_t)
3083 #if defined(ACC_WORDSIZE) && (ACC_WORDSIZE > 0)
3084 #if (ACC_WORDSIZE == ACC_SIZEOF_ACC_INTPTR_T) && !defined(__ACC_INTPTR_T_IS_POINTER)
3085 # define acc_word_t acc_uintptr_t
3086 # define acc_sword_t acc_intptr_t
3087 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INTPTR_T
3088 #elif (ACC_WORDSIZE == ACC_SIZEOF_LONG)
3089 # define acc_word_t unsigned long
3090 # define acc_sword_t long
3091 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_LONG
3092 #elif (ACC_WORDSIZE == ACC_SIZEOF_INT)
3093 # define acc_word_t unsigned int
3094 # define acc_sword_t int
3095 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_INT
3096 #elif (ACC_WORDSIZE == ACC_SIZEOF_SHORT)
3097 # define acc_word_t unsigned short
3098 # define acc_sword_t short
3099 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_SHORT
3100 #elif (ACC_WORDSIZE == 1)
3101 # define acc_word_t unsigned char
3102 # define acc_sword_t signed char
3103 # define ACC_SIZEOF_ACC_WORD_T 1
3104 #elif (ACC_WORDSIZE == ACC_SIZEOF_ACC_INT64L_T)
3105 # define acc_word_t acc_uint64l_t
3106 # define acc_sword_t acc_int64l_t
3107 # define ACC_SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_INT64L_T
3108 #elif (ACC_ARCH_SPU) && (ACC_CC_GNUC)
3110 typedef unsigned acc_word_t
__attribute__((__mode__(__V16QI__
)));
3111 typedef int acc_sword_t
__attribute__((__mode__(__V16QI__
)));
3112 # define acc_word_t acc_word_t
3113 # define acc_sword_t acc_sword_t
3114 # define ACC_SIZEOF_ACC_WORD_T 16
3117 # error "acc_word_t"
3121 #if !defined(ACC_INT16_C)
3122 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 2)
3123 # define ACC_INT16_C(c) ((c) + 0)
3124 # define ACC_UINT16_C(c) ((c) + 0U)
3125 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 2)
3126 # define ACC_INT16_C(c) ((c) + 0L)
3127 # define ACC_UINT16_C(c) ((c) + 0UL)
3128 # elif (ACC_SIZEOF_INT >= 2)
3129 # define ACC_INT16_C(c) c
3130 # define ACC_UINT16_C(c) c##U
3131 # elif (ACC_SIZEOF_LONG >= 2)
3132 # define ACC_INT16_C(c) c##L
3133 # define ACC_UINT16_C(c) c##UL
3135 # error "ACC_INT16_C"
3138 #if !defined(ACC_INT32_C)
3139 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 4)
3140 # define ACC_INT32_C(c) ((c) + 0)
3141 # define ACC_UINT32_C(c) ((c) + 0U)
3142 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 4)
3143 # define ACC_INT32_C(c) ((c) + 0L)
3144 # define ACC_UINT32_C(c) ((c) + 0UL)
3145 # elif (ACC_SIZEOF_INT >= 4)
3146 # define ACC_INT32_C(c) c
3147 # define ACC_UINT32_C(c) c##U
3148 # elif (ACC_SIZEOF_LONG >= 4)
3149 # define ACC_INT32_C(c) c##L
3150 # define ACC_UINT32_C(c) c##UL
3151 # elif (ACC_SIZEOF_LONG_LONG >= 4)
3152 # define ACC_INT32_C(c) c##LL
3153 # define ACC_UINT32_C(c) c##ULL
3155 # error "ACC_INT32_C"
3158 #if !defined(ACC_INT64_C) && defined(acc_int64l_t)
3159 # if (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_INT >= 8)
3160 # define ACC_INT64_C(c) ((c) + 0)
3161 # define ACC_UINT64_C(c) ((c) + 0U)
3162 # elif (ACC_BROKEN_INTEGRAL_CONSTANTS) && (ACC_SIZEOF_LONG >= 8)
3163 # define ACC_INT64_C(c) ((c) + 0L)
3164 # define ACC_UINT64_C(c) ((c) + 0UL)
3165 # elif (ACC_SIZEOF_INT >= 8)
3166 # define ACC_INT64_C(c) c
3167 # define ACC_UINT64_C(c) c##U
3168 # elif (ACC_SIZEOF_LONG >= 8)
3169 # define ACC_INT64_C(c) c##L
3170 # define ACC_UINT64_C(c) c##UL
3172 # error "ACC_INT64_C"
3175 #if !defined(SIZEOF_ACC_INT16E_T) && defined(ACC_SIZEOF_ACC_INT16E_T)
3176 # define SIZEOF_ACC_INT16E_T ACC_SIZEOF_ACC_INT16E_T
3178 #if !defined(SIZEOF_ACC_INT32E_T) && defined(ACC_SIZEOF_ACC_INT32E_T)
3179 # define SIZEOF_ACC_INT32E_T ACC_SIZEOF_ACC_INT32E_T
3181 #if !defined(SIZEOF_ACC_INT64E_T) && defined(ACC_SIZEOF_ACC_INT64E_T)
3182 # define SIZEOF_ACC_INT64E_T ACC_SIZEOF_ACC_INT64E_T
3184 #if !defined(SIZEOF_ACC_INT32L_T) && defined(ACC_SIZEOF_ACC_INT32L_T)
3185 # define SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32L_T
3187 #if !defined(SIZEOF_ACC_INT64L_T) && defined(ACC_SIZEOF_ACC_INT64L_T)
3188 # define SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64L_T
3190 #if !defined(SIZEOF_ACC_INT32F_T) && defined(ACC_SIZEOF_ACC_INT32F_T)
3191 # define SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32F_T
3193 #if !defined(SIZEOF_ACC_INTPTR_T) && defined(ACC_SIZEOF_ACC_INTPTR_T)
3194 # define SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INTPTR_T
3196 #if !defined(SIZEOF_ACC_WORD_T) && defined(ACC_SIZEOF_ACC_WORD_T)
3197 # define SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_WORD_T
3199 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4)
3200 # define acc_signo_t acc_int32e_t
3202 #if !defined(acc_signo_t)
3203 # define acc_signo_t int
3205 #if defined(__cplusplus)
3208 #if (ACC_BROKEN_CDECL_ALT_SYNTAX)
3209 typedef void __acc_cdecl_sighandler (*acc_sighandler_t
)(acc_signo_t
);
3210 #elif defined(RETSIGTYPE)
3211 typedef RETSIGTYPE (__acc_cdecl_sighandler
*acc_sighandler_t
)(acc_signo_t
);
3213 typedef void (__acc_cdecl_sighandler
*acc_sighandler_t
)(acc_signo_t
);
3215 #if defined(__cplusplus)
3218 # if !defined(ACC_CFG_NO_ACC_UA_H)
3219 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020700ul))
3220 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul)) && defined(__cplusplus)
3221 #elif (ACC_CC_INTELC) && defined(_WIN32)
3222 #elif (ACC_CC_INTELC && (__INTEL_COMPILER < 700))
3224 #elif (ACC_CC_GNUC || ACC_CC_INTELC || ACC_CC_PATHSCALE)
3225 #if !defined(__acc_ua16_t) && (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
3226 typedef struct { __acc_ua_volatile acc_uint16e_t v
__attribute__((__packed__
)); } __acc_ua16_t
;
3227 # define __acc_ua16_t __acc_ua16_t
3229 #if !defined(__acc_ua32_t) && (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
3230 typedef struct { __acc_ua_volatile acc_uint32e_t v
__attribute__((__packed__
)); } __acc_ua32_t
;
3231 # define __acc_ua32_t __acc_ua32_t
3233 #if !defined(__acc_ua64_t) && (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
3234 typedef struct { __acc_ua_volatile acc_uint64l_t v
__attribute__((__packed__
)); } __acc_ua64_t
;
3235 # define __acc_ua64_t __acc_ua64_t
3238 #if (ACC_OPT_UNALIGNED16) && defined(acc_int16e_t)
3239 #define ACC_UA_GET16(p) (* (__acc_ua_volatile const acc_uint16e_t*) (__acc_ua_volatile const void*) (p))
3240 #define ACC_UA_SET16(p,v) (* (__acc_ua_volatile acc_uint16e_t*) (__acc_ua_volatile void*) (p) = (acc_uint16e_t) (v))
3241 #if (ACC_ABI_BIG_ENDIAN)
3242 # define ACC_UA_GET_BE16(p) ACC_UA_GET16(p)
3243 # define ACC_UA_SET_BE16(p,v) ACC_UA_SET16(p,v)
3244 #elif (ACC_ABI_LITTLE_ENDIAN)
3245 # define ACC_UA_GET_LE16(p) ACC_UA_GET16(p)
3246 # define ACC_UA_SET_LE16(p,v) ACC_UA_SET16(p,v)
3248 #if !defined(ACC_CFG_NO_INLINE_ASM) && defined(__acc_HAVE_forceinline)
3249 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
3250 #if !defined(ACC_UA_GET_LE16)
3251 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile
const void* pp
);
3252 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE16(__acc_ua_volatile
const void* pp
) {
3253 __acc_ua_volatile
const acc_uint16e_t
* p
= (__acc_ua_volatile
const acc_uint16e_t
*) pp
;
3255 __asm__
__volatile__("lhbrx %0,0,%1" : "=r" (v
) : "r" (p
), "m" (*p
));
3258 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p)
3260 #if !defined(ACC_UA_SET_LE16)
3261 extern __acc_forceinline
void __ACC_UA_SET_LE16(__acc_ua_volatile
void* pp
, unsigned long v
);
3262 extern __acc_forceinline
void __ACC_UA_SET_LE16(__acc_ua_volatile
void* pp
, unsigned long v
) {
3263 __acc_ua_volatile acc_uint16e_t
* p
= (__acc_ua_volatile acc_uint16e_t
*) pp
;
3264 __asm__
__volatile__("sthbrx %2,0,%1" : "=m" (*p
) : "r" (p
), "r" (v
));
3266 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v)
3270 #if !defined(ACC_UA_COPY16)
3271 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s))
3274 #if (ACC_OPT_UNALIGNED32) && defined(acc_int32e_t)
3275 #define ACC_UA_GET32(p) (* (__acc_ua_volatile const acc_uint32e_t*) (__acc_ua_volatile const void*) (p))
3276 #define ACC_UA_SET32(p,v) (* (__acc_ua_volatile acc_uint32e_t*) (__acc_ua_volatile void*) (p) = (acc_uint32e_t) (v))
3277 #if (ACC_ABI_BIG_ENDIAN)
3278 # define ACC_UA_GET_BE32(p) ACC_UA_GET32(p)
3279 # define ACC_UA_SET_BE32(p,v) ACC_UA_SET32(p,v)
3280 #elif (ACC_ABI_LITTLE_ENDIAN)
3281 # define ACC_UA_GET_LE32(p) ACC_UA_GET32(p)
3282 # define ACC_UA_SET_LE32(p,v) ACC_UA_SET32(p,v)
3284 #if !defined(ACC_CFG_NO_INLINE_ASM) && defined(__acc_HAVE_forceinline)
3285 #if (ACC_ARCH_POWERPC && ACC_ABI_BIG_ENDIAN) && (ACC_CC_GNUC)
3286 #if !defined(ACC_UA_GET_LE32)
3287 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile
const void* pp
);
3288 extern __acc_forceinline
unsigned long __ACC_UA_GET_LE32(__acc_ua_volatile
const void* pp
) {
3289 __acc_ua_volatile
const acc_uint32e_t
* p
= (__acc_ua_volatile
const acc_uint32e_t
*) pp
;
3291 __asm__
__volatile__("lwbrx %0,0,%1" : "=r" (v
) : "r" (p
), "m" (*p
));
3294 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p)
3296 #if !defined(ACC_UA_SET_LE32)
3297 extern __acc_forceinline
void __ACC_UA_SET_LE32(__acc_ua_volatile
void* pp
, unsigned long v
);
3298 extern __acc_forceinline
void __ACC_UA_SET_LE32(__acc_ua_volatile
void* pp
, unsigned long v
) {
3299 __acc_ua_volatile acc_uint32e_t
* p
= (__acc_ua_volatile acc_uint32e_t
*) pp
;
3300 __asm__
__volatile__("stwbrx %2,0,%1" : "=m" (*p
) : "r" (p
), "r" (v
));
3302 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v)
3306 #if !defined(ACC_UA_COPY32)
3307 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s))
3310 #if (ACC_OPT_UNALIGNED64) && defined(acc_int64l_t)
3311 #define ACC_UA_GET64(p) (* (__acc_ua_volatile const acc_uint64l_t*) (__acc_ua_volatile const void*) (p))
3312 #define ACC_UA_SET64(p,v) (* (__acc_ua_volatile acc_uint64l_t*) (__acc_ua_volatile void*) (p) = (acc_uint64l_t) (v))
3313 #if (ACC_ABI_BIG_ENDIAN)
3314 # define ACC_UA_GET_BE64(p) ACC_UA_GET64(p)
3315 # define ACC_UA_SET_BE64(p,v) ACC_UA_SET64(p,v)
3316 #elif (ACC_ABI_LITTLE_ENDIAN)
3317 # define ACC_UA_GET_LE64(p) ACC_UA_GET64(p)
3318 # define ACC_UA_SET_LE64(p,v) ACC_UA_SET64(p,v)
3320 #if !defined(ACC_UA_COPY64)
3321 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s))
3326 #if defined(ACC_WANT_ACC_INCD_H)
3327 # undef ACC_WANT_ACC_INCD_H
3328 #ifndef __ACC_INCD_H_INCLUDED
3329 #define __ACC_INCD_H_INCLUDED 1
3330 #if defined(ACC_LIBC_NAKED)
3331 #ifndef __ACC_FALLBACK_STDDEF_H_INCLUDED
3332 #define __ACC_FALLBACK_STDDEF_H_INCLUDED
3333 #if defined(__PTRDIFF_TYPE__)
3334 typedef __PTRDIFF_TYPE__ acc_fallback_ptrdiff_t
;
3335 #elif defined(__MIPS_PSX2__)
3336 typedef int acc_fallback_ptrdiff_t
;
3338 typedef long acc_fallback_ptrdiff_t
;
3340 #if defined(__SIZE_TYPE__)
3341 typedef __SIZE_TYPE__ acc_fallback_size_t
;
3342 #elif defined(__MIPS_PSX2__)
3343 typedef unsigned int acc_fallback_size_t
;
3345 typedef unsigned long acc_fallback_size_t
;
3347 #if !defined(ptrdiff_t)
3348 typedef acc_fallback_ptrdiff_t
ptrdiff_t;
3349 #ifndef _PTRDIFF_T_DEFINED
3350 #define _PTRDIFF_T_DEFINED 1
3353 #if !defined(size_t)
3354 typedef acc_fallback_size_t
size_t;
3355 #ifndef _SIZE_T_DEFINED
3356 #define _SIZE_T_DEFINED 1
3359 #if !defined(__cplusplus) && !defined(wchar_t)
3360 typedef unsigned short wchar_t;
3361 #ifndef _WCHAR_T_DEFINED
3362 #define _WCHAR_T_DEFINED 1
3366 #if defined(__cplusplus) && defined(__GNUC__) && (__GNUC__ >= 4)
3368 #elif defined(__cplusplus)
3371 #define NULL ((void*)0)
3375 #define offsetof(s,m) ((size_t)((ptrdiff_t)&(((s*)0)->m)))
3378 #elif defined(ACC_LIBC_FREESTANDING)
3380 # include <stddef.h>
3383 # include <stdint.h>
3385 #elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
3390 # include <stddef.h>
3393 # include <stdint.h>
3397 #if defined(HAVE_TIME_H) && defined(__MSL__) && defined(__cplusplus)
3400 #if HAVE_SYS_TYPES_H
3401 # include <sys/types.h>
3404 # include <sys/stat.h>
3407 # include <stdlib.h>
3408 # include <stddef.h>
3411 # include <stdlib.h>
3415 # if !STDC_HEADERS && HAVE_MEMORY_H
3416 # include <memory.h>
3418 # include <string.h>
3421 # include <strings.h>
3424 # include <inttypes.h>
3427 # include <stdint.h>
3431 # include <unistd.h>
3436 #if defined(ACC_WANT_ACC_INCE_H)
3437 # undef ACC_WANT_ACC_INCE_H
3438 #ifndef __ACC_INCE_H_INCLUDED
3439 #define __ACC_INCE_H_INCLUDED 1
3440 #if defined(ACC_LIBC_NAKED)
3441 #elif defined(ACC_LIBC_FREESTANDING)
3442 #elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
3443 # if defined(HAVE_SETJMP_H)
3444 # include <setjmp.h>
3447 #if defined(HAVE_STDARG_H)
3448 # include <stdarg.h>
3450 #if defined(HAVE_CTYPE_H)
3453 #if defined(HAVE_ERRNO_H)
3456 #if defined(HAVE_MALLOC_H)
3457 # include <malloc.h>
3459 #if defined(HAVE_ALLOCA_H)
3460 # include <alloca.h>
3462 #if defined(HAVE_FCNTL_H)
3465 #if defined(HAVE_DIRENT_H)
3466 # include <dirent.h>
3468 #if defined(HAVE_SETJMP_H)
3469 # include <setjmp.h>
3471 #if defined(HAVE_SIGNAL_H)
3472 # include <signal.h>
3474 #if defined(TIME_WITH_SYS_TIME)
3475 # include <sys/time.h>
3477 #elif defined(HAVE_TIME_H)
3480 #if defined(HAVE_UTIME_H)
3482 #elif defined(HAVE_SYS_UTIME_H)
3483 # include <sys/utime.h>
3485 #if defined(HAVE_IO_H)
3488 #if defined(HAVE_DOS_H)
3491 #if defined(HAVE_DIRECT_H)
3492 # include <direct.h>
3494 #if defined(HAVE_SHARE_H)
3497 #if defined(ACC_CC_NDPC)
3500 #if defined(__TOS__) && (defined(__PUREC__) || defined(__TURBOC__))
3506 #if defined(ACC_WANT_ACC_INCI_H)
3507 # undef ACC_WANT_ACC_INCI_H
3508 #ifndef __ACC_INCI_H_INCLUDED
3509 #define __ACC_INCI_H_INCLUDED 1
3510 #if defined(ACC_LIBC_NAKED)
3511 #elif defined(ACC_LIBC_FREESTANDING)
3512 #elif defined(ACC_LIBC_MOSTLY_FREESTANDING)
3514 #if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
3516 #elif (ACC_HAVE_WINDOWS_H)
3517 # if 1 && !defined(WIN32_LEAN_AND_MEAN)
3518 # define WIN32_LEAN_AND_MEAN 1
3520 # if 1 && !defined(_WIN32_WINNT)
3521 # define _WIN32_WINNT 0x0400
3523 # include <windows.h>
3524 # if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
3527 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_WIN16)
3528 # if (ACC_CC_AZTECC)
3531 # elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
3534 # elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3535 # include <sys/exceptn.h>
3536 # elif (ACC_CC_PACIFICC)
3537 # include <unixio.h>
3540 # elif (ACC_CC_WATCOMC)
3543 #elif (ACC_OS_OS216)
3544 # if (ACC_CC_WATCOMC)
3548 #if defined(HAVE_SYS_MMAN_H)
3549 # include <sys/mman.h>
3551 #if defined(HAVE_SYS_RESOURCE_H)
3552 # include <sys/resource.h>
3554 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
3555 # if defined(FP_OFF)
3556 # define ACC_PTR_FP_OFF(x) FP_OFF(x)
3557 # elif defined(_FP_OFF)
3558 # define ACC_PTR_FP_OFF(x) _FP_OFF(x)
3560 # define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
3562 # if defined(FP_SEG)
3563 # define ACC_PTR_FP_SEG(x) FP_SEG(x)
3564 # elif defined(_FP_SEG)
3565 # define ACC_PTR_FP_SEG(x) _FP_SEG(x)
3567 # define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
3570 # define ACC_PTR_MK_FP(s,o) MK_FP(s,o)
3571 # elif defined(_MK_FP)
3572 # define ACC_PTR_MK_FP(s,o) _MK_FP(s,o)
3574 # define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
3577 # undef ACC_PTR_FP_OFF
3578 # undef ACC_PTR_FP_SEG
3579 # undef ACC_PTR_MK_FP
3580 # define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0])
3581 # define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1])
3582 # define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o)))
3588 #if defined(ACC_WANT_ACC_LIB_H)
3589 # undef ACC_WANT_ACC_LIB_H
3590 #ifndef __ACC_LIB_H_INCLUDED
3591 #define __ACC_LIB_H_INCLUDED 1
3592 #if !defined(__ACCLIB_FUNCNAME)
3593 # define __ACCLIB_FUNCNAME(f) f
3595 #if !defined(ACCLIB_EXTERN)
3596 # define ACCLIB_EXTERN(r,f) extern r __ACCLIB_FUNCNAME(f)
3598 #if !defined(ACCLIB_EXTERN_NOINLINE)
3599 # if defined(__acc_noinline)
3600 # define ACCLIB_EXTERN_NOINLINE(r,f) extern __acc_noinline r __ACCLIB_FUNCNAME(f)
3602 # define ACCLIB_EXTERN_NOINLINE(r,f) extern r __ACCLIB_FUNCNAME(f)
3605 #if !defined(__ACCLIB_CONST_CAST_RETURN)
3606 #if 1 && (ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
3607 # define __ACCLIB_CONST_CAST_RETURN(type,var) return (type) (acc_uintptr_t) (var);
3608 #elif (ACC_CC_GNUC || ACC_CC_LLVM || ACC_CC_PATHSCALE)
3609 # define __ACCLIB_CONST_CAST_RETURN(type,var) \
3610 { union { type a; const type b; } u; u.b = (var); return u.a; }
3612 # define __ACCLIB_CONST_CAST_RETURN(type,var) return (type) (var);
3616 # define acclib_handle_t acc_int64l_t
3617 # define acclib_uhandle_t acc_uint64l_t
3618 #elif (ACC_ARCH_I386 && ACC_CC_MSC && (_MSC_VER >= 1300))
3619 typedef __w64
long acclib_handle_t
;
3620 typedef __w64
unsigned long acclib_uhandle_t
;
3621 # define acclib_handle_t acclib_handle_t
3622 # define acclib_uhandle_t acclib_uhandle_t
3624 # define acclib_handle_t long
3625 # define acclib_uhandle_t unsigned long
3628 ACCLIB_EXTERN(int, acc_ascii_digit
) (int);
3629 ACCLIB_EXTERN(int, acc_ascii_islower
) (int);
3630 ACCLIB_EXTERN(int, acc_ascii_isupper
) (int);
3631 ACCLIB_EXTERN(int, acc_ascii_tolower
) (int);
3632 ACCLIB_EXTERN(int, acc_ascii_toupper
) (int);
3633 ACCLIB_EXTERN(int, acc_ascii_utolower
) (int);
3634 ACCLIB_EXTERN(int, acc_ascii_utoupper
) (int);
3636 #define acc_ascii_isdigit(c) (((unsigned)(c) - 48) < 10)
3637 #define acc_ascii_islower(c) (((unsigned)(c) - 97) < 26)
3638 #define acc_ascii_isupper(c) (((unsigned)(c) - 65) < 26)
3639 #define acc_ascii_tolower(c) ((int)(c) + (acc_ascii_isupper(c) << 5))
3640 #define acc_ascii_toupper(c) ((int)(c) - (acc_ascii_islower(c) << 5))
3641 #define acc_ascii_utolower(c) acc_ascii_tolower((unsigned char)(c))
3642 #define acc_ascii_utoupper(c) acc_ascii_toupper((unsigned char)(c))
3644 #if (ACC_HAVE_MM_HUGE_PTR)
3645 # define acc_hsize_t unsigned long
3646 # define acc_hvoid_p void __huge *
3647 # define acc_hchar_p char __huge *
3648 # define acc_hchar_pp char __huge * __huge *
3649 # define acc_hbyte_p unsigned char __huge *
3651 # define acc_hsize_t size_t
3652 # define acc_hvoid_p void *
3653 # define acc_hchar_p char *
3654 # define acc_hchar_pp char **
3655 # define acc_hbyte_p unsigned char *
3658 ACCLIB_EXTERN(acc_hvoid_p
, acc_halloc
) (acc_hsize_t
);
3659 ACCLIB_EXTERN(void, acc_hfree
) (acc_hvoid_p
);
3660 #if (ACC_OS_DOS16 || ACC_OS_OS216)
3661 ACCLIB_EXTERN(void __far
*, acc_dos_alloc
) (unsigned long);
3662 ACCLIB_EXTERN(int, acc_dos_free
) (void __far
*);
3664 ACCLIB_EXTERN(int, acc_hmemcmp
) (const acc_hvoid_p
, const acc_hvoid_p
, acc_hsize_t
);
3665 ACCLIB_EXTERN(acc_hvoid_p
, acc_hmemcpy
) (acc_hvoid_p
, const acc_hvoid_p
, acc_hsize_t
);
3666 ACCLIB_EXTERN(acc_hvoid_p
, acc_hmemmove
) (acc_hvoid_p
, const acc_hvoid_p
, acc_hsize_t
);
3667 ACCLIB_EXTERN(acc_hvoid_p
, acc_hmemset
) (acc_hvoid_p
, int, acc_hsize_t
);
3668 ACCLIB_EXTERN(acc_hsize_t
, acc_hstrlen
) (const acc_hchar_p
);
3669 ACCLIB_EXTERN(int, acc_hstrcmp
) (const acc_hchar_p
, const acc_hchar_p
);
3670 ACCLIB_EXTERN(int, acc_hstrncmp
)(const acc_hchar_p
, const acc_hchar_p
, acc_hsize_t
);
3671 ACCLIB_EXTERN(int, acc_ascii_hstricmp
) (const acc_hchar_p
, const acc_hchar_p
);
3672 ACCLIB_EXTERN(int, acc_ascii_hstrnicmp
)(const acc_hchar_p
, const acc_hchar_p
, acc_hsize_t
);
3673 ACCLIB_EXTERN(int, acc_ascii_hmemicmp
) (const acc_hvoid_p
, const acc_hvoid_p
, acc_hsize_t
);
3674 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrstr
) (const acc_hchar_p
, const acc_hchar_p
);
3675 ACCLIB_EXTERN(acc_hchar_p
, acc_ascii_hstristr
) (const acc_hchar_p
, const acc_hchar_p
);
3676 ACCLIB_EXTERN(acc_hvoid_p
, acc_hmemmem
) (const acc_hvoid_p
, acc_hsize_t
, const acc_hvoid_p
, acc_hsize_t
);
3677 ACCLIB_EXTERN(acc_hvoid_p
, acc_ascii_hmemimem
) (const acc_hvoid_p
, acc_hsize_t
, const acc_hvoid_p
, acc_hsize_t
);
3678 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrcpy
) (acc_hchar_p
, const acc_hchar_p
);
3679 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrcat
) (acc_hchar_p
, const acc_hchar_p
);
3680 ACCLIB_EXTERN(acc_hsize_t
, acc_hstrlcpy
) (acc_hchar_p
, const acc_hchar_p
, acc_hsize_t
);
3681 ACCLIB_EXTERN(acc_hsize_t
, acc_hstrlcat
) (acc_hchar_p
, const acc_hchar_p
, acc_hsize_t
);
3682 ACCLIB_EXTERN(int, acc_hstrscpy
) (acc_hchar_p
, const acc_hchar_p
, acc_hsize_t
);
3683 ACCLIB_EXTERN(int, acc_hstrscat
) (acc_hchar_p
, const acc_hchar_p
, acc_hsize_t
);
3684 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrccpy
) (acc_hchar_p
, const acc_hchar_p
, int);
3685 ACCLIB_EXTERN(acc_hvoid_p
, acc_hmemccpy
) (acc_hvoid_p
, const acc_hvoid_p
, int, acc_hsize_t
);
3686 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrchr
) (const acc_hchar_p
, int);
3687 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrrchr
) (const acc_hchar_p
, int);
3688 ACCLIB_EXTERN(acc_hchar_p
, acc_ascii_hstrichr
) (const acc_hchar_p
, int);
3689 ACCLIB_EXTERN(acc_hchar_p
, acc_ascii_hstrrichr
) (const acc_hchar_p
, int);
3690 ACCLIB_EXTERN(acc_hvoid_p
, acc_hmemchr
) (const acc_hvoid_p
, int, acc_hsize_t
);
3691 ACCLIB_EXTERN(acc_hvoid_p
, acc_hmemrchr
) (const acc_hvoid_p
, int, acc_hsize_t
);
3692 ACCLIB_EXTERN(acc_hvoid_p
, acc_ascii_hmemichr
) (const acc_hvoid_p
, int, acc_hsize_t
);
3693 ACCLIB_EXTERN(acc_hvoid_p
, acc_ascii_hmemrichr
) (const acc_hvoid_p
, int, acc_hsize_t
);
3694 ACCLIB_EXTERN(acc_hsize_t
, acc_hstrspn
) (const acc_hchar_p
, const acc_hchar_p
);
3695 ACCLIB_EXTERN(acc_hsize_t
, acc_hstrrspn
) (const acc_hchar_p
, const acc_hchar_p
);
3696 ACCLIB_EXTERN(acc_hsize_t
, acc_hstrcspn
) (const acc_hchar_p
, const acc_hchar_p
);
3697 ACCLIB_EXTERN(acc_hsize_t
, acc_hstrrcspn
) (const acc_hchar_p
, const acc_hchar_p
);
3698 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrpbrk
) (const acc_hchar_p
, const acc_hchar_p
);
3699 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrrpbrk
) (const acc_hchar_p
, const acc_hchar_p
);
3700 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrsep
) (acc_hchar_pp
, const acc_hchar_p
);
3701 ACCLIB_EXTERN(acc_hchar_p
, acc_hstrrsep
) (acc_hchar_pp
, const acc_hchar_p
);
3702 ACCLIB_EXTERN(acc_hchar_p
, acc_ascii_hstrlwr
) (acc_hchar_p
);
3703 ACCLIB_EXTERN(acc_hchar_p
, acc_ascii_hstrupr
) (acc_hchar_p
);
3704 ACCLIB_EXTERN(acc_hvoid_p
, acc_ascii_hmemlwr
) (acc_hvoid_p
, acc_hsize_t
);
3705 ACCLIB_EXTERN(acc_hvoid_p
, acc_ascii_hmemupr
) (acc_hvoid_p
, acc_hsize_t
);
3706 ACCLIB_EXTERN(acc_hsize_t
, acc_hfread
) (void *, acc_hvoid_p
, acc_hsize_t
);
3707 ACCLIB_EXTERN(acc_hsize_t
, acc_hfwrite
) (void *, const acc_hvoid_p
, acc_hsize_t
);
3708 #if (ACC_HAVE_MM_HUGE_PTR)
3709 ACCLIB_EXTERN(long, acc_hread
) (int, acc_hvoid_p
, long);
3710 ACCLIB_EXTERN(long, acc_hwrite
) (int, const acc_hvoid_p
, long);
3712 ACCLIB_EXTERN(long, acc_safe_hread
) (int, acc_hvoid_p
, long);
3713 ACCLIB_EXTERN(long, acc_safe_hwrite
) (int, const acc_hvoid_p
, long);
3714 ACCLIB_EXTERN(unsigned, acc_ua_get_be16
) (const acc_hvoid_p
);
3715 ACCLIB_EXTERN(acc_uint32l_t
, acc_ua_get_be24
) (const acc_hvoid_p
);
3716 ACCLIB_EXTERN(acc_uint32l_t
, acc_ua_get_be32
) (const acc_hvoid_p
);
3717 ACCLIB_EXTERN(void, acc_ua_set_be16
) (acc_hvoid_p
, unsigned);
3718 ACCLIB_EXTERN(void, acc_ua_set_be24
) (acc_hvoid_p
, acc_uint32l_t
);
3719 ACCLIB_EXTERN(void, acc_ua_set_be32
) (acc_hvoid_p
, acc_uint32l_t
);
3720 ACCLIB_EXTERN(unsigned, acc_ua_get_le16
) (const acc_hvoid_p
);
3721 ACCLIB_EXTERN(acc_uint32l_t
, acc_ua_get_le24
) (const acc_hvoid_p
);
3722 ACCLIB_EXTERN(acc_uint32l_t
, acc_ua_get_le32
) (const acc_hvoid_p
);
3723 ACCLIB_EXTERN(void, acc_ua_set_le16
) (acc_hvoid_p
, unsigned);
3724 ACCLIB_EXTERN(void, acc_ua_set_le24
) (acc_hvoid_p
, acc_uint32l_t
);
3725 ACCLIB_EXTERN(void, acc_ua_set_le32
) (acc_hvoid_p
, acc_uint32l_t
);
3726 #if defined(acc_int64l_t)
3727 ACCLIB_EXTERN(acc_uint64l_t
, acc_ua_get_be64
) (const acc_hvoid_p
);
3728 ACCLIB_EXTERN(void, acc_ua_set_be64
) (acc_hvoid_p
, acc_uint64l_t
);
3729 ACCLIB_EXTERN(acc_uint64l_t
, acc_ua_get_le64
) (const acc_hvoid_p
);
3730 ACCLIB_EXTERN(void, acc_ua_set_le64
) (acc_hvoid_p
, acc_uint64l_t
);
3732 ACCLIB_EXTERN_NOINLINE(short, acc_vget_short
) (short, int);
3733 ACCLIB_EXTERN_NOINLINE(int, acc_vget_int
) (int, int);
3734 ACCLIB_EXTERN_NOINLINE(long, acc_vget_long
) (long, int);
3735 #if defined(acc_int64l_t)
3736 ACCLIB_EXTERN_NOINLINE(acc_int64l_t
, acc_vget_acc_int64l_t
) (acc_int64l_t
, int);
3738 ACCLIB_EXTERN_NOINLINE(acc_hsize_t
, acc_vget_acc_hsize_t
) (acc_hsize_t
, int);
3739 #if !defined(ACC_CFG_NO_FLOAT)
3740 ACCLIB_EXTERN_NOINLINE(float, acc_vget_float
) (float, int);
3742 #if !defined(ACC_CFG_NO_DOUBLE)
3743 ACCLIB_EXTERN_NOINLINE(double, acc_vget_double
) (double, int);
3745 ACCLIB_EXTERN_NOINLINE(acc_hvoid_p
, acc_vget_acc_hvoid_p
) (acc_hvoid_p
, int);
3746 ACCLIB_EXTERN_NOINLINE(const acc_hvoid_p
, acc_vget_acc_hvoid_cp
) (const acc_hvoid_p
, int);
3747 #if !defined(ACC_FN_PATH_MAX)
3748 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
3749 # define ACC_FN_PATH_MAX 143
3750 #elif (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN32 || ACC_OS_WIN64)
3751 # define ACC_FN_PATH_MAX 259
3753 # define ACC_FN_PATH_MAX 259
3756 #if !defined(ACC_FN_PATH_MAX)
3757 # define ACC_FN_PATH_MAX 1023
3759 #if !defined(ACC_FN_NAME_MAX)
3760 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
3761 # define ACC_FN_NAME_MAX 12
3762 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
3763 # define ACC_FN_NAME_MAX 12
3764 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3765 #elif (ACC_OS_DOS32)
3766 # define ACC_FN_NAME_MAX 12
3769 #if !defined(ACC_FN_NAME_MAX)
3770 # define ACC_FN_NAME_MAX ACC_FN_PATH_MAX
3772 #define ACC_FNMATCH_NOESCAPE 1
3773 #define ACC_FNMATCH_PATHNAME 2
3774 #define ACC_FNMATCH_PATHSTAR 4
3775 #define ACC_FNMATCH_PERIOD 8
3776 #define ACC_FNMATCH_ASCII_CASEFOLD 16
3777 ACCLIB_EXTERN(int, acc_fnmatch
) (const acc_hchar_p
, const acc_hchar_p
, int);
3778 #undef __ACCLIB_USE_OPENDIR
3779 #if (HAVE_DIRENT_H || ACC_CC_WATCOMC)
3780 # define __ACCLIB_USE_OPENDIR 1
3781 # if (ACC_OS_DOS32 && defined(__BORLANDC__))
3782 # elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3783 # elif (ACC_OS_OS2 || ACC_OS_OS216)
3784 # elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC)
3785 # elif (ACC_OS_WIN32 && !defined(ACC_HAVE_WINDOWS_H))
3786 # 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)
3787 # undef __ACCLIB_USE_OPENDIR
3792 #if defined(__ACCLIB_USE_OPENDIR)
3794 # if (ACC_CC_WATCOMC)
3795 unsigned short f_time
;
3796 unsigned short f_date
;
3797 unsigned long f_size
;
3799 char f_name
[ACC_FN_NAME_MAX
+1];
3800 #elif (ACC_OS_WIN32 || ACC_OS_WIN64)
3801 acclib_handle_t u_handle
;
3803 unsigned f_size_low
;
3804 unsigned f_size_high
;
3805 char f_name
[ACC_FN_NAME_MAX
+1];
3806 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_TOS || ACC_OS_WIN16)
3808 unsigned char f_attr
;
3809 unsigned short f_time
;
3810 unsigned short f_date
;
3811 unsigned short f_size_low
;
3812 unsigned short f_size_high
;
3813 char f_name
[ACC_FN_NAME_MAX
+1];
3817 char f_name
[ACC_FN_NAME_MAX
+1];
3821 #define acc_dir_p acc_dir_t *
3823 ACCLIB_EXTERN(int, acc_opendir
) (acc_dir_p
, const char*);
3824 ACCLIB_EXTERN(int, acc_readdir
) (acc_dir_p
);
3825 ACCLIB_EXTERN(int, acc_closedir
) (acc_dir_p
);
3826 #if (ACC_CC_GNUC) && (defined(__CYGWIN__) || defined(__MINGW32__))
3827 # define acc_alloca(x) __builtin_alloca((x))
3828 #elif (ACC_CC_GNUC) && (ACC_OS_CONSOLE_PS2)
3829 # define acc_alloca(x) __builtin_alloca((x))
3830 #elif (ACC_CC_BORLANDC || ACC_CC_LCC) && defined(__linux__)
3832 # define acc_alloca(x) ((void *) (alloca((x))))
3834 #if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
3835 # define acc_stackavail() stackavail()
3836 #elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0410))
3837 # define acc_stackavail() stackavail()
3838 #elif (ACC_ARCH_I086 && ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0400))
3839 # if (ACC_OS_WIN16) && (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
3841 # define acc_stackavail() stackavail()
3843 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_DMC || ACC_CC_SYMANTECC))
3844 # define acc_stackavail() stackavail()
3845 #elif ((ACC_ARCH_I086) && ACC_CC_MSC && (_MSC_VER >= 700))
3846 # define acc_stackavail() _stackavail()
3847 #elif ((ACC_ARCH_I086) && ACC_CC_MSC)
3848 # define acc_stackavail() stackavail()
3849 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && ACC_CC_TURBOC && (__TURBOC__ >= 0x0450))
3850 # define acc_stackavail() stackavail()
3851 #elif (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ >= 0x0400))
3852 ACC_EXTERN_C
size_t __cdecl
stackavail(void);
3853 # define acc_stackavail() stackavail()
3854 #elif ((ACC_ARCH_I086 || ACC_ARCH_I386) && (ACC_CC_WATCOMC))
3855 # define acc_stackavail() stackavail()
3856 #elif (ACC_ARCH_I086 && ACC_CC_ZORTECHC)
3857 # define acc_stackavail() _chkstack()
3859 ACCLIB_EXTERN(acclib_handle_t
, acc_get_osfhandle
) (int);
3860 ACCLIB_EXTERN(const char *, acc_getenv
) (const char *);
3861 ACCLIB_EXTERN(int, acc_isatty
) (int);
3862 ACCLIB_EXTERN(int, acc_mkdir
) (const char*, unsigned);
3863 ACCLIB_EXTERN(int, acc_rmdir
) (const char*);
3864 ACCLIB_EXTERN(int, acc_response
) (int*, char***);
3865 ACCLIB_EXTERN(int, acc_set_binmode
) (int, int);
3866 #if defined(acc_int32e_t)
3867 ACCLIB_EXTERN(acc_int32e_t
, acc_muldiv32s
) (acc_int32e_t
, acc_int32e_t
, acc_int32e_t
);
3868 ACCLIB_EXTERN(acc_uint32e_t
, acc_muldiv32u
) (acc_uint32e_t
, acc_uint32e_t
, acc_uint32e_t
);
3870 ACCLIB_EXTERN(void, acc_wildargv
) (int*, char***);
3871 ACCLIB_EXTERN_NOINLINE(void, acc_debug_break
) (void);
3872 ACCLIB_EXTERN_NOINLINE(void, acc_debug_nop
) (void);
3873 ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_query
) (void);
3874 ACCLIB_EXTERN_NOINLINE(int, acc_debug_align_check_enable
) (int);
3875 ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_qemu
) (void);
3876 ACCLIB_EXTERN_NOINLINE(unsigned, acc_debug_running_on_valgrind
) (void);
3877 #if !defined(acc_int64l_t) || defined(ACC_CFG_NO_DOUBLE)
3878 # undef __ACCLIB_PCLOCK_USE_RDTSC
3879 # undef __ACCLIB_PCLOCK_USE_PERFCTR
3880 # undef __ACCLIB_UCLOCK_USE_RDTSC
3881 # undef __ACCLIB_UCLOCK_USE_PERFCTR
3886 double tsc_to_seconds
;
3887 unsigned cpu_type
, cpu_features
, cpu_khz
, cpu_nrctrs
;
3888 const char* cpu_name
;
3889 } acc_perfctr_handle_t
;
3892 #if (ACC_OS_POSIX_LINUX)
3893 acc_uint64l_t pmc
[18];
3895 acc_uint64l_t pmc
[1];
3897 } acc_perfctr_clock_t
;
3898 #ifndef acc_perfctr_handle_p
3899 #define acc_perfctr_handle_p acc_perfctr_handle_t *
3901 #ifndef acc_perfctr_clock_p
3902 #define acc_perfctr_clock_p acc_perfctr_clock_t *
3904 ACCLIB_EXTERN(int, acc_perfctr_open
) (acc_perfctr_handle_p
);
3905 ACCLIB_EXTERN(int, acc_perfctr_close
) (acc_perfctr_handle_p
);
3906 ACCLIB_EXTERN(void, acc_perfctr_read
) (acc_perfctr_handle_p
, acc_perfctr_clock_p
);
3907 #if !defined(ACC_CFG_NO_DOUBLE)
3908 ACCLIB_EXTERN(double, acc_perfctr_get_elapsed
) (acc_perfctr_handle_p
, const acc_perfctr_clock_p
, const acc_perfctr_clock_p
);
3909 ACCLIB_EXTERN(double, acc_perfctr_get_elapsed_tsc
) (acc_perfctr_handle_p
, acc_uint64l_t
);
3911 ACCLIB_EXTERN(int, acc_perfctr_flush_cpu_cache
) (acc_perfctr_handle_p
, unsigned);
3913 #if defined(acc_int32e_t)
3914 ACCLIB_EXTERN(int, acc_tsc_read
) (acc_uint32e_t
*);
3916 # undef __ACCLIB_PCLOCK_USE_RDTSC
3917 # undef __ACCLIB_UCLOCK_USE_RDTSC
3919 struct acc_pclock_handle_t
;
3920 struct acc_pclock_t
;
3921 typedef struct acc_pclock_handle_t acc_pclock_handle_t
;
3922 typedef struct acc_pclock_t acc_pclock_t
;
3923 #ifndef acc_pclock_handle_p
3924 #define acc_pclock_handle_p acc_pclock_handle_t *
3926 #ifndef acc_pclock_p
3927 #define acc_pclock_p acc_pclock_t *
3929 #define ACC_PCLOCK_REALTIME 0
3930 #define ACC_PCLOCK_MONOTONIC 1
3931 #define ACC_PCLOCK_PROCESS_CPUTIME_ID 2
3932 #define ACC_PCLOCK_THREAD_CPUTIME_ID 3
3933 #define ACC_PCLOCK_REALTIME_HR 4
3934 #define ACC_PCLOCK_MONOTONIC_HR 5
3935 struct acc_pclock_handle_t
{
3939 int (*gettime
) (acc_pclock_handle_p
, acc_pclock_p
);
3940 #if defined(acc_int64l_t)
3941 acc_uint64l_t ticks_base
;
3943 #if defined(__ACCLIB_PCLOCK_USE_PERFCTR)
3944 acc_perfctr_handle_t pch
;
3947 struct acc_pclock_t
{
3948 #if defined(acc_int64l_t)
3949 acc_int64l_t tv_sec
;
3951 acc_int32l_t tv_sec_high
;
3952 acc_uint32l_t tv_sec_low
;
3954 acc_uint32l_t tv_nsec
;
3956 ACCLIB_EXTERN(int, acc_pclock_open
) (acc_pclock_handle_p
, int);
3957 ACCLIB_EXTERN(int, acc_pclock_open_default
) (acc_pclock_handle_p
);
3958 ACCLIB_EXTERN(int, acc_pclock_close
) (acc_pclock_handle_p
);
3959 ACCLIB_EXTERN(void, acc_pclock_read
) (acc_pclock_handle_p
, acc_pclock_p
);
3960 #if !defined(ACC_CFG_NO_DOUBLE)
3961 ACCLIB_EXTERN(double, acc_pclock_get_elapsed
) (acc_pclock_handle_p
, const acc_pclock_p
, const acc_pclock_p
);
3963 ACCLIB_EXTERN(int, acc_pclock_flush_cpu_cache
) (acc_pclock_handle_p
, unsigned);
3964 #if !defined(acc_int64l_t) || defined(ACC_CFG_NO_DOUBLE)
3965 # undef __ACCLIB_UCLOCK_USE_QPC
3966 #elif (ACC_OS_CYGWIN || ACC_OS_EMX || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H)
3967 # define __ACCLIB_UCLOCK_USE_QPC 1
3969 # undef __ACCLIB_UCLOCK_USE_QPC
3975 #if defined(__ACCLIB_UCLOCK_USE_PERFCTR)
3976 acc_perfctr_handle_t pch
;
3978 #if defined(__ACCLIB_UCLOCK_USE_QPC)
3981 } acc_uclock_handle_t
;
3985 #if !(ACC_OS_DOS16 || ACC_OS_WIN16)
3986 # if !defined(ACC_CFG_NO_DOUBLE)
3989 # if defined(acc_int64l_t)
3994 #if defined(__ACCLIB_UCLOCK_USE_RDTSC)
3997 #if defined(__ACCLIB_UCLOCK_USE_PERFCTR)
3998 acc_perfctr_clock_t pcc
;
4000 #if defined(__ACCLIB_UCLOCK_USE_QPC)
4004 #ifndef acc_uclock_handle_p
4005 #define acc_uclock_handle_p acc_uclock_handle_t *
4007 #ifndef acc_uclock_p
4008 #define acc_uclock_p acc_uclock_t *
4010 ACCLIB_EXTERN(int, acc_uclock_open
) (acc_uclock_handle_p
);
4011 ACCLIB_EXTERN(int, acc_uclock_close
) (acc_uclock_handle_p
);
4012 ACCLIB_EXTERN(void, acc_uclock_read
) (acc_uclock_handle_p
, acc_uclock_p
);
4013 #if !defined(ACC_CFG_NO_DOUBLE)
4014 ACCLIB_EXTERN(double, acc_uclock_get_elapsed
) (acc_uclock_handle_p
, const acc_uclock_p
, const acc_uclock_p
);
4016 ACCLIB_EXTERN(int, acc_uclock_flush_cpu_cache
) (acc_uclock_handle_p
, unsigned);
4017 struct acc_getopt_t
;
4018 typedef struct acc_getopt_t acc_getopt_t
;
4019 #ifndef acc_getopt_p
4020 #define acc_getopt_p acc_getopt_t *
4022 struct acc_getopt_longopt_t
;
4023 typedef struct acc_getopt_longopt_t acc_getopt_longopt_t
;
4024 #ifndef acc_getopt_longopt_p
4025 #define acc_getopt_longopt_p acc_getopt_longopt_t *
4027 struct acc_getopt_longopt_t
{
4033 struct acc_getopt_t
{
4036 void (*opterr
)(acc_getopt_p
, const char*, void *);
4040 const char* progname
;
4041 int argc
; char** argv
;
4042 int eof
; int shortpos
;
4043 int pending_rotate_first
, pending_rotate_middle
;
4045 enum { ACC_GETOPT_NO_ARG
, ACC_GETOPT_REQUIRED_ARG
, ACC_GETOPT_OPTIONAL_ARG
, ACC_GETOPT_EXACT_ARG
= 0x10 };
4046 enum { ACC_GETOPT_PERMUTE
, ACC_GETOPT_RETURN_IN_ORDER
, ACC_GETOPT_REQUIRE_ORDER
};
4047 ACCLIB_EXTERN(void, acc_getopt_init
) (acc_getopt_p g
,
4048 int start_argc
, int argc
, char** argv
);
4049 ACCLIB_EXTERN(int, acc_getopt
) (acc_getopt_p g
,
4050 const char* shortopts
,
4051 const acc_getopt_longopt_p longopts
,
4056 #ifndef acc_rand31_p
4057 #define acc_rand31_p acc_rand31_t *
4059 ACCLIB_EXTERN(void, acc_srand31
) (acc_rand31_p
, acc_uint32l_t
);
4060 ACCLIB_EXTERN(acc_uint32l_t
, acc_rand31
) (acc_rand31_p
);
4061 #if defined(acc_int64l_t)
4065 #ifndef acc_rand48_p
4066 #define acc_rand48_p acc_rand48_t *
4068 ACCLIB_EXTERN(void, acc_srand48
) (acc_rand48_p
, acc_uint32l_t
);
4069 ACCLIB_EXTERN(acc_uint32l_t
, acc_rand48
) (acc_rand48_p
);
4070 ACCLIB_EXTERN(acc_uint32l_t
, acc_rand48_r32
) (acc_rand48_p
);
4072 #if defined(acc_int64l_t)
4076 #ifndef acc_rand64_p
4077 #define acc_rand64_p acc_rand64_t *
4079 ACCLIB_EXTERN(void, acc_srand64
) (acc_rand64_p
, acc_uint64l_t
);
4080 ACCLIB_EXTERN(acc_uint32l_t
, acc_rand64
) (acc_rand64_p
);
4081 ACCLIB_EXTERN(acc_uint32l_t
, acc_rand64_r32
) (acc_rand64_p
);
4085 acc_uint32l_t s
[624];
4087 #ifndef acc_randmt_p
4088 #define acc_randmt_p acc_randmt_t *
4090 ACCLIB_EXTERN(void, acc_srandmt
) (acc_randmt_p
, acc_uint32l_t
);
4091 ACCLIB_EXTERN(acc_uint32l_t
, acc_randmt
) (acc_randmt_p
);
4092 ACCLIB_EXTERN(acc_uint32l_t
, acc_randmt_r32
) (acc_randmt_p
);
4093 #if defined(acc_int64l_t)
4096 acc_uint64l_t s
[312];
4098 #ifndef acc_randmt64_p
4099 #define acc_randmt64_p acc_randmt64_t *
4101 ACCLIB_EXTERN(void, acc_srandmt64
) (acc_randmt64_p
, acc_uint64l_t
);
4102 ACCLIB_EXTERN(acc_uint64l_t
, acc_randmt64_r64
) (acc_randmt64_p
);
4104 #define ACC_SPAWN_P_WAIT 0
4105 #define ACC_SPAWN_P_NOWAIT 1
4106 ACCLIB_EXTERN(int, acc_spawnv
) (int mode
, const char* fn
, const char* const * argv
);
4107 ACCLIB_EXTERN(int, acc_spawnvp
) (int mode
, const char* fn
, const char* const * argv
);
4108 ACCLIB_EXTERN(int, acc_spawnve
) (int mode
, const char* fn
, const char* const * argv
, const char * const envp
);
4111 #if defined(ACC_WANT_ACC_CXX_H)
4112 # undef ACC_WANT_ACC_CXX_H
4113 #ifndef __ACC_CXX_H_INCLUDED
4114 #define __ACC_CXX_H_INCLUDED 1
4115 #if defined(__cplusplus)
4116 #if defined(ACC_CXX_NOTHROW)
4117 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
4118 #elif (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
4119 #elif (ACC_CC_HIGHC)
4120 #elif (ACC_CC_MSC && (_MSC_VER < 1100))
4122 #elif (ACC_CC_TURBOC)
4123 #elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND))
4124 #elif (ACC_CC_ZORTECHC)
4126 # define ACC_CXX_NOTHROW throw()
4128 #if !defined(ACC_CXX_NOTHROW)
4129 # define ACC_CXX_NOTHROW
4131 #if defined(__ACC_CXX_DO_NEW)
4132 #elif (ACC_CC_NDPC || ACC_CC_PGI)
4133 # define __ACC_CXX_DO_NEW { return 0; }
4134 #elif ((ACC_CC_BORLANDC || ACC_CC_TURBOC) && ACC_ARCH_I086)
4135 # define __ACC_CXX_DO_NEW { return 0; }
4137 # define __ACC_CXX_DO_NEW ;
4139 #if defined(__ACC_CXX_DO_DELETE)
4140 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
4141 # define __ACC_CXX_DO_DELETE { }
4143 # define __ACC_CXX_DO_DELETE ACC_CXX_NOTHROW { }
4145 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
4146 #elif (ACC_CC_MSC && ACC_MM_HUGE)
4147 # define ACC_CXX_DISABLE_NEW_DELETE private:
4148 #elif (ACC_CC_MSC && (_MSC_VER < 1100))
4150 #elif (ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
4151 #elif (ACC_CC_TURBOC)
4152 #elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
4154 # define __ACC_CXX_HAVE_ARRAY_NEW 1
4156 #if (__ACC_CXX_HAVE_ARRAY_NEW)
4157 # define __ACC_CXX_HAVE_PLACEMENT_NEW 1
4159 #if (__ACC_CXX_HAVE_PLACEMENT_NEW)
4160 # if (ACC_CC_GNUC >= 0x030000ul)
4161 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
4162 # elif (ACC_CC_INTELC)
4163 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
4164 # elif (ACC_CC_MSC && (_MSC_VER >= 1200))
4165 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
4166 # elif (ACC_CC_LLVM || ACC_CC_PATHSCALE)
4167 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
4169 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1
4172 #if defined(ACC_CXX_DISABLE_NEW_DELETE)
4173 #elif defined(new) || defined(delete)
4174 # define ACC_CXX_DISABLE_NEW_DELETE private:
4175 #elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025b00ul))
4176 # define ACC_CXX_DISABLE_NEW_DELETE private:
4177 #elif (ACC_CC_HIGHC)
4178 # define ACC_CXX_DISABLE_NEW_DELETE private:
4179 #elif !defined(__ACC_CXX_HAVE_ARRAY_NEW)
4180 # define ACC_CXX_DISABLE_NEW_DELETE \
4181 protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
4182 protected: static void* operator new(size_t) __ACC_CXX_DO_NEW \
4185 # define ACC_CXX_DISABLE_NEW_DELETE \
4186 protected: static void operator delete(void*) __ACC_CXX_DO_DELETE \
4187 static void operator delete[](void*) __ACC_CXX_DO_DELETE \
4188 private: static void* operator new(size_t) __ACC_CXX_DO_NEW \
4189 static void* operator new[](size_t) __ACC_CXX_DO_NEW
4191 #if defined(ACC_CXX_TRIGGER_FUNCTION)
4193 # define ACC_CXX_TRIGGER_FUNCTION \
4194 protected: virtual const void* acc_cxx_trigger_function() const; \
4197 #if defined(ACC_CXX_TRIGGER_FUNCTION_IMPL)
4199 # define ACC_CXX_TRIGGER_FUNCTION_IMPL(klass) \
4200 const void* klass::acc_cxx_trigger_function() const { return 0; }
4205 #if defined(ACC_WANT_ACC_CHK_CH)
4206 # undef ACC_WANT_ACC_CHK_CH
4207 #if !defined(ACCCHK_ASSERT)
4208 # define ACCCHK_ASSERT(expr) ACC_COMPILE_TIME_ASSERT_HEADER(expr)
4210 #if !defined(ACCCHK_ASSERT_SIGN_T)
4211 # define ACCCHK_ASSERT_SIGN_T(type,relop) \
4212 ACCCHK_ASSERT( (type) (-1) relop (type) 0 ) \
4213 ACCCHK_ASSERT( (type) (~(type)0) relop (type) 0 ) \
4214 ACCCHK_ASSERT( (type) (~(type)0) == (type) (-1) )
4216 #if !defined(ACCCHK_ASSERT_IS_SIGNED_T)
4217 # define ACCCHK_ASSERT_IS_SIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,<)
4219 #if !defined(ACCCHK_ASSERT_IS_UNSIGNED_T)
4220 # if (ACC_BROKEN_INTEGRAL_PROMOTION)
4221 # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) \
4222 ACCCHK_ASSERT( (type) (-1) > (type) 0 )
4224 # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,>)
4227 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0550) && (__BORLANDC__ < 0x0560))
4228 # pragma option push -w-8055
4229 #elif (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0550))
4230 # pragma option push -w-osh
4232 #if (ACC_0xffffffffL - ACC_UINT32_C(4294967294) != 1)
4233 # error "preprocessor error 1"
4235 #if (ACC_0xffffffffL - ACC_UINT32_C(0xfffffffd) != 2)
4236 # error "preprocessor error 2"
4238 #define ACCCHK_VAL 1
4239 #define ACCCHK_TMP1 ACCCHK_VAL
4241 #define ACCCHK_VAL 2
4242 #define ACCCHK_TMP2 ACCCHK_VAL
4243 #if (ACCCHK_TMP1 != 2)
4244 # error "preprocessor error 3a"
4246 #if (ACCCHK_TMP2 != 2)
4247 # error "preprocessor error 3b"
4251 # error "preprocessor error 3c"
4253 #if (ACCCHK_TMP2 + 0 != 0)
4254 # error "preprocessor error 3d"
4258 #if 0 || defined(ACCCHK_CFG_PEDANTIC)
4259 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZINT)
4260 ACCCHK_ASSERT((_MIPS_SZINT
) == 8 * sizeof(int))
4262 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZLONG)
4263 ACCCHK_ASSERT((_MIPS_SZLONG
) == 8 * sizeof(long))
4265 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZPTR)
4266 ACCCHK_ASSERT((_MIPS_SZPTR
) == 8 * sizeof(void *))
4269 ACCCHK_ASSERT(1 == 1)
4270 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,2) == 3)
4271 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,8) == 255)
4272 #if (SIZEOF_INT >= 2)
4273 ACCCHK_ASSERT(__ACC_MASK_GEN(1,15) == 32767)
4274 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,16) == 0xffffU
)
4276 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,16) == 0xffffUL
)
4278 #if (SIZEOF_INT >= 4)
4279 ACCCHK_ASSERT(__ACC_MASK_GEN(1,31) == 2147483647)
4280 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,32) == 0xffffffffU
)
4282 #if (SIZEOF_LONG >= 4)
4283 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,32) == 0xffffffffUL
)
4285 #if (SIZEOF_LONG >= 8)
4286 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,64) == 0xffffffffffffffffUL
)
4288 #if !defined(ACC_BROKEN_INTEGRAL_PROMOTION)
4289 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,SIZEOF_INT
*8) == ~0u)
4290 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,SIZEOF_LONG
*8) == ~0ul)
4292 #if !defined(ACC_BROKEN_SIGNED_RIGHT_SHIFT)
4293 ACCCHK_ASSERT(((-1) >> 7) == -1)
4295 ACCCHK_ASSERT(((1) >> 7) == 0)
4296 ACCCHK_ASSERT((~0l & ~0) == ~0l)
4297 ACCCHK_ASSERT((~0l & ~0u) == ~0u)
4298 ACCCHK_ASSERT((~0ul & ~0) == ~0ul)
4299 ACCCHK_ASSERT((~0ul & ~0u) == ~0u)
4300 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
4301 #elif (SIZEOF_INT == 2)
4302 ACCCHK_ASSERT((~0l & ~0u) == 0xffffU
)
4303 ACCCHK_ASSERT((~0ul & ~0u) == 0xffffU
)
4304 #elif (SIZEOF_INT == 4)
4305 ACCCHK_ASSERT((~0l & ~0u) == 0xffffffffU
)
4306 ACCCHK_ASSERT((~0ul & ~0u) == 0xffffffffU
)
4308 ACCCHK_ASSERT_IS_SIGNED_T(signed char)
4309 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned char)
4310 ACCCHK_ASSERT(sizeof(signed char) == sizeof(char))
4311 ACCCHK_ASSERT(sizeof(unsigned char) == sizeof(char))
4312 ACCCHK_ASSERT(sizeof(char) == 1)
4313 #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
4315 ACCCHK_ASSERT(sizeof(char) == sizeof((char)0))
4317 #if defined(__cplusplus)
4318 ACCCHK_ASSERT(sizeof('\0') == sizeof(char))
4322 ACCCHK_ASSERT(sizeof('\0') == sizeof(int))
4325 #if defined(__acc_alignof)
4326 ACCCHK_ASSERT(__acc_alignof(char) == 1)
4327 ACCCHK_ASSERT(__acc_alignof(signed char) == 1)
4328 ACCCHK_ASSERT(__acc_alignof(unsigned char) == 1)
4329 #if defined(acc_int16e_t)
4330 ACCCHK_ASSERT(__acc_alignof(acc_int16e_t
) >= 1)
4331 ACCCHK_ASSERT(__acc_alignof(acc_int16e_t
) <= 2)
4333 #if defined(acc_int32e_t)
4334 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t
) >= 1)
4335 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t
) <= 4)
4338 ACCCHK_ASSERT_IS_SIGNED_T(short)
4339 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned short)
4340 ACCCHK_ASSERT(sizeof(short) == sizeof(unsigned short))
4341 #if !defined(ACC_ABI_I8LP16)
4342 ACCCHK_ASSERT(sizeof(short) >= 2)
4344 ACCCHK_ASSERT(sizeof(short) >= sizeof(char))
4345 #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L))
4347 ACCCHK_ASSERT(sizeof(short) == sizeof((short)0))
4349 #if (SIZEOF_SHORT > 0)
4350 ACCCHK_ASSERT(sizeof(short) == SIZEOF_SHORT
)
4352 ACCCHK_ASSERT_IS_SIGNED_T(int)
4353 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned int)
4354 ACCCHK_ASSERT(sizeof(int) == sizeof(unsigned int))
4355 #if !defined(ACC_ABI_I8LP16)
4356 ACCCHK_ASSERT(sizeof(int) >= 2)
4358 ACCCHK_ASSERT(sizeof(int) >= sizeof(short))
4359 ACCCHK_ASSERT(sizeof(int) == sizeof(0))
4360 ACCCHK_ASSERT(sizeof(int) == sizeof((int)0))
4361 #if (SIZEOF_INT > 0)
4362 ACCCHK_ASSERT(sizeof(int) == SIZEOF_INT
)
4364 ACCCHK_ASSERT(sizeof(0) == sizeof(int))
4365 ACCCHK_ASSERT_IS_SIGNED_T(long)
4366 ACCCHK_ASSERT_IS_UNSIGNED_T(unsigned long)
4367 ACCCHK_ASSERT(sizeof(long) == sizeof(unsigned long))
4368 #if !defined(ACC_ABI_I8LP16)
4369 ACCCHK_ASSERT(sizeof(long) >= 4)
4371 ACCCHK_ASSERT(sizeof(long) >= sizeof(int))
4372 ACCCHK_ASSERT(sizeof(long) == sizeof(0L))
4373 ACCCHK_ASSERT(sizeof(long) == sizeof((long)0))
4374 #if (SIZEOF_LONG > 0)
4375 ACCCHK_ASSERT(sizeof(long) == SIZEOF_LONG
)
4377 ACCCHK_ASSERT(sizeof(0L) == sizeof(long))
4378 ACCCHK_ASSERT_IS_UNSIGNED_T(size_t)
4379 ACCCHK_ASSERT(sizeof(size_t) >= sizeof(int))
4380 ACCCHK_ASSERT(sizeof(size_t) == sizeof(sizeof(0)))
4381 #if (SIZEOF_SIZE_T > 0)
4382 ACCCHK_ASSERT(sizeof(size_t) == SIZEOF_SIZE_T
)
4384 ACCCHK_ASSERT_IS_SIGNED_T(ptrdiff_t)
4385 ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(int))
4386 ACCCHK_ASSERT(sizeof(ptrdiff_t) >= sizeof(size_t))
4387 #if !defined(ACC_BROKEN_SIZEOF)
4388 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof((char*)0 - (char*)0))
4389 # if (ACC_HAVE_MM_HUGE_PTR)
4390 ACCCHK_ASSERT(4 == sizeof((char __huge
*)0 - (char __huge
*)0))
4393 #if (SIZEOF_PTRDIFF_T > 0)
4394 ACCCHK_ASSERT(sizeof(ptrdiff_t) == SIZEOF_PTRDIFF_T
)
4396 ACCCHK_ASSERT(sizeof(void*) >= sizeof(char*))
4397 #if (SIZEOF_VOID_P > 0)
4398 ACCCHK_ASSERT(sizeof(void*) == SIZEOF_VOID_P
)
4399 ACCCHK_ASSERT(sizeof(char*) == SIZEOF_VOID_P
)
4401 #if (ACC_HAVE_MM_HUGE_PTR)
4402 ACCCHK_ASSERT(4 == sizeof(void __huge
*))
4403 ACCCHK_ASSERT(4 == sizeof(char __huge
*))
4405 #if defined(ACC_ABI_I8LP16)
4406 ACCCHK_ASSERT((((1u << 7) + 1) >> 7) == 1)
4407 ACCCHK_ASSERT((((1ul << 15) + 1) >> 15) == 1)
4409 ACCCHK_ASSERT((((1u << 15) + 1) >> 15) == 1)
4410 ACCCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1)
4412 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
4413 #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
4415 ACCCHK_ASSERT((1 << (8*SIZEOF_INT
-1)) < 0)
4417 ACCCHK_ASSERT((1u << (8*SIZEOF_INT
-1)) > 0)
4418 #if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
4420 ACCCHK_ASSERT((1l << (8*SIZEOF_LONG
-1)) < 0)
4422 ACCCHK_ASSERT((1ul << (8*SIZEOF_LONG
-1)) > 0)
4423 #if defined(acc_int16e_t)
4424 ACCCHK_ASSERT(sizeof(acc_int16e_t
) == 2)
4425 ACCCHK_ASSERT(sizeof(acc_int16e_t
) == SIZEOF_ACC_INT16E_T
)
4426 ACCCHK_ASSERT(sizeof(acc_uint16e_t
) == 2)
4427 ACCCHK_ASSERT(sizeof(acc_int16e_t
) == sizeof(acc_uint16e_t
))
4428 ACCCHK_ASSERT_IS_SIGNED_T(acc_int16e_t
)
4429 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint16e_t
)
4430 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150)
4432 ACCCHK_ASSERT(((acc_uint16e_t
)(~(acc_uint16e_t
)0ul) >> 15) == 1)
4434 ACCCHK_ASSERT( (acc_int16e_t
) (1 + ~(acc_int16e_t
)0) == 0)
4435 #if defined(ACCCHK_CFG_PEDANTIC)
4436 ACCCHK_ASSERT( (acc_uint16e_t
)(1 + ~(acc_uint16e_t
)0) == 0)
4439 #if defined(acc_int32e_t)
4440 ACCCHK_ASSERT(sizeof(acc_int32e_t
) == 4)
4441 ACCCHK_ASSERT(sizeof(acc_int32e_t
) == SIZEOF_ACC_INT32E_T
)
4442 ACCCHK_ASSERT(sizeof(acc_uint32e_t
) == 4)
4443 ACCCHK_ASSERT(sizeof(acc_int32e_t
) == sizeof(acc_uint32e_t
))
4444 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32e_t
)
4445 ACCCHK_ASSERT(((( (acc_int32e_t
)1 << 30) + 1) >> 30) == 1)
4446 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32e_t
)
4447 ACCCHK_ASSERT(((( (acc_uint32e_t
)1 << 31) + 1) >> 31) == 1)
4448 ACCCHK_ASSERT(((acc_uint32e_t
)(~(acc_uint32e_t
)0ul) >> 31) == 1)
4449 ACCCHK_ASSERT( (acc_int32e_t
) (1 + ~(acc_int32e_t
)0) == 0)
4450 #if defined(ACCCHK_CFG_PEDANTIC)
4451 ACCCHK_ASSERT( (acc_uint32e_t
)(1 + ~(acc_uint32e_t
)0) == 0)
4454 #if defined(acc_int32e_t)
4455 ACCCHK_ASSERT(sizeof(acc_int32l_t
) >= sizeof(acc_int32e_t
))
4457 ACCCHK_ASSERT(sizeof(acc_int32l_t
) >= 4)
4458 ACCCHK_ASSERT(sizeof(acc_int32l_t
) == SIZEOF_ACC_INT32L_T
)
4459 ACCCHK_ASSERT(sizeof(acc_uint32l_t
) >= 4)
4460 ACCCHK_ASSERT(sizeof(acc_int32l_t
) == sizeof(acc_uint32l_t
))
4461 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32l_t
)
4462 ACCCHK_ASSERT(((( (acc_int32l_t
)1 << 30) + 1) >> 30) == 1)
4463 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32l_t
)
4464 ACCCHK_ASSERT(((( (acc_uint32l_t
)1 << 31) + 1) >> 31) == 1)
4465 ACCCHK_ASSERT(sizeof(acc_int32f_t
) >= sizeof(int))
4466 #if defined(acc_int32e_t)
4467 ACCCHK_ASSERT(sizeof(acc_int32f_t
) >= sizeof(acc_int32e_t
))
4469 ACCCHK_ASSERT(sizeof(acc_int32f_t
) >= sizeof(acc_int32l_t
))
4470 ACCCHK_ASSERT(sizeof(acc_int32f_t
) >= 4)
4471 ACCCHK_ASSERT(sizeof(acc_int32f_t
) >= sizeof(acc_int32l_t
))
4472 ACCCHK_ASSERT(sizeof(acc_int32f_t
) == SIZEOF_ACC_INT32F_T
)
4473 ACCCHK_ASSERT(sizeof(acc_uint32f_t
) >= 4)
4474 ACCCHK_ASSERT(sizeof(acc_uint32f_t
) >= sizeof(acc_uint32l_t
))
4475 ACCCHK_ASSERT(sizeof(acc_int32f_t
) == sizeof(acc_uint32f_t
))
4476 ACCCHK_ASSERT_IS_SIGNED_T(acc_int32f_t
)
4477 ACCCHK_ASSERT(((( (acc_int32f_t
)1 << 30) + 1) >> 30) == 1)
4478 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint32f_t
)
4479 ACCCHK_ASSERT(((( (acc_uint32f_t
)1 << 31) + 1) >> 31) == 1)
4480 #if defined(acc_int64e_t)
4481 ACCCHK_ASSERT(sizeof(acc_int64e_t
) == 8)
4482 ACCCHK_ASSERT(sizeof(acc_int64e_t
) == SIZEOF_ACC_INT64E_T
)
4483 ACCCHK_ASSERT(sizeof(acc_uint64e_t
) == 8)
4484 ACCCHK_ASSERT(sizeof(acc_int64e_t
) == sizeof(acc_uint64e_t
))
4485 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64e_t
)
4486 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
4488 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64e_t
)
4491 #if defined(acc_int64l_t)
4492 #if defined(acc_int64e_t)
4493 ACCCHK_ASSERT(sizeof(acc_int64l_t
) >= sizeof(acc_int64e_t
))
4495 ACCCHK_ASSERT(sizeof(acc_int64l_t
) >= 8)
4496 ACCCHK_ASSERT(sizeof(acc_int64l_t
) == SIZEOF_ACC_INT64L_T
)
4497 ACCCHK_ASSERT(sizeof(acc_uint64l_t
) >= 8)
4498 ACCCHK_ASSERT(sizeof(acc_int64l_t
) == sizeof(acc_uint64l_t
))
4499 ACCCHK_ASSERT_IS_SIGNED_T(acc_int64l_t
)
4500 ACCCHK_ASSERT(((( (acc_int64l_t
)1 << 62) + 1) >> 62) == 1)
4501 ACCCHK_ASSERT(((( ACC_INT64_C(1) << 62) + 1) >> 62) == 1)
4502 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
4504 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64l_t
)
4505 ACCCHK_ASSERT(ACC_UINT64_C(18446744073709551615) > 0)
4507 ACCCHK_ASSERT(((( (acc_uint64l_t
)1 << 63) + 1) >> 63) == 1)
4508 ACCCHK_ASSERT(((( ACC_UINT64_C(1) << 63) + 1) >> 63) == 1)
4509 #if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020600ul))
4510 ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > ACC_INT64_C(0))
4512 ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > 0)
4514 ACCCHK_ASSERT(ACC_INT64_C(-9223372036854775807) - 1 < 0)
4515 ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483629) == 721)
4516 ACCCHK_ASSERT( ACC_INT64_C(9223372036854775807) % ACC_INT32_C(2147483647) == 1)
4517 ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483629) == 721)
4518 ACCCHK_ASSERT(ACC_UINT64_C(9223372036854775807) % ACC_UINT32_C(2147483647) == 1)
4520 #if !defined(__ACC_INTPTR_T_IS_POINTER)
4521 ACCCHK_ASSERT_IS_SIGNED_T(acc_intptr_t
)
4522 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uintptr_t
)
4524 ACCCHK_ASSERT(sizeof(acc_intptr_t
) >= sizeof(void *))
4525 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == SIZEOF_ACC_INTPTR_T
)
4526 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(acc_uintptr_t
))
4527 #if defined(acc_word_t)
4528 ACCCHK_ASSERT(ACC_WORDSIZE
== SIZEOF_ACC_WORD_T
)
4529 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_word_t
)
4530 ACCCHK_ASSERT_IS_SIGNED_T(acc_sword_t
)
4531 ACCCHK_ASSERT(sizeof(acc_word_t
) == SIZEOF_ACC_WORD_T
)
4532 ACCCHK_ASSERT(sizeof(acc_word_t
) == sizeof(acc_sword_t
))
4534 #if defined(ACC_INT16_C)
4535 ACCCHK_ASSERT(sizeof(ACC_INT16_C(0)) >= 2)
4536 ACCCHK_ASSERT(sizeof(ACC_UINT16_C(0)) >= 2)
4537 ACCCHK_ASSERT((ACC_UINT16_C(0xffff) >> 15) == 1)
4539 #if defined(ACC_INT32_C)
4540 ACCCHK_ASSERT(sizeof(ACC_INT32_C(0)) >= 4)
4541 ACCCHK_ASSERT(sizeof(ACC_UINT32_C(0)) >= 4)
4542 ACCCHK_ASSERT((ACC_UINT32_C(0xffffffff) >> 31) == 1)
4544 #if defined(ACC_INT64_C)
4545 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0560))
4547 ACCCHK_ASSERT(sizeof(ACC_INT64_C(0)) >= 8)
4548 ACCCHK_ASSERT(sizeof(ACC_UINT64_C(0)) >= 8)
4550 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) >> 63) == 1)
4551 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0) == ACC_UINT64_C(0xffffffffffffffff))
4552 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0l) == ACC_UINT64_C(0xffffffffffffffff))
4553 #if (SIZEOF_INT == 4)
4554 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
4556 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0u) == 0xffffffffu
)
4559 #if (SIZEOF_LONG == 4)
4560 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
4562 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0ul) == 0xfffffffful
)
4566 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
4567 ACCCHK_ASSERT(sizeof(void*) == 2)
4568 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 2)
4569 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
4570 ACCCHK_ASSERT(sizeof(void*) == 4)
4572 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_COMPACT)
4573 ACCCHK_ASSERT(sizeof(void (*)(void)) == 2)
4574 #elif (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE)
4575 ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
4578 ACCCHK_ASSERT(sizeof(int) == 4)
4579 ACCCHK_ASSERT(sizeof(long) == 4)
4580 ACCCHK_ASSERT(sizeof(void*) == 4)
4581 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
4582 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
4583 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4586 ACCCHK_ASSERT(sizeof(int) == 8)
4587 ACCCHK_ASSERT(sizeof(long) == 8)
4588 ACCCHK_ASSERT(sizeof(void*) == 8)
4589 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
4590 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
4591 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4593 #if (ACC_ABI_IP32L64)
4594 ACCCHK_ASSERT(sizeof(int) == 4)
4595 ACCCHK_ASSERT(sizeof(long) == 8)
4596 ACCCHK_ASSERT(sizeof(void*) == 4)
4597 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
4598 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
4599 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4602 ACCCHK_ASSERT(sizeof(int) == 4)
4603 ACCCHK_ASSERT(sizeof(long) == 4)
4604 ACCCHK_ASSERT(sizeof(void*) == 8)
4605 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
4606 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
4607 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4610 ACCCHK_ASSERT(sizeof(int) == 2)
4611 ACCCHK_ASSERT(sizeof(long) == 4)
4612 ACCCHK_ASSERT(sizeof(void*) == 4)
4613 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4616 ACCCHK_ASSERT(sizeof(int) == 4)
4617 ACCCHK_ASSERT(sizeof(long) == 8)
4618 ACCCHK_ASSERT(sizeof(void*) == 8)
4619 ACCCHK_ASSERT(sizeof(ptrdiff_t) == sizeof(void*))
4620 ACCCHK_ASSERT(sizeof(size_t) == sizeof(void*))
4621 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4624 ACCCHK_ASSERT(sizeof(size_t) == 2)
4625 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4626 #elif (ACC_ARCH_I386 || ACC_ARCH_M68K)
4627 ACCCHK_ASSERT(sizeof(size_t) == 4)
4628 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
4629 ACCCHK_ASSERT(sizeof(acc_intptr_t
) == sizeof(void *))
4631 #if (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_WIN32)
4632 ACCCHK_ASSERT(sizeof(size_t) == 4)
4633 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 4)
4634 ACCCHK_ASSERT(sizeof(void (*)(void)) == 4)
4635 #elif (ACC_OS_WIN64)
4636 ACCCHK_ASSERT(sizeof(size_t) == 8)
4637 ACCCHK_ASSERT(sizeof(ptrdiff_t) == 8)
4638 ACCCHK_ASSERT(sizeof(void (*)(void)) == 8)
4641 #elif (SIZEOF_INT > 1)
4642 ACCCHK_ASSERT( (int) ((unsigned char) ((signed char) -1)) == 255)
4646 #elif 1 && (ACC_CC_LCC || ACC_CC_LCCWIN32) && !defined(ACCCHK_CFG_PEDANTIC)
4647 #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC)
4648 #elif !defined(ACC_BROKEN_INTEGRAL_PROMOTION) && (SIZEOF_INT > 1)
4649 ACCCHK_ASSERT( (((unsigned char)128) << (int)(8*sizeof(int)-8)) < 0)
4651 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560))
4655 #if defined(ACC_WANT_ACCLIB_UA)
4656 # undef ACC_WANT_ACCLIB_UA
4657 #define __ACCLIB_UA_CH_INCLUDED 1
4658 #if !defined(ACCLIB_PUBLIC)
4659 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
4661 ACCLIB_PUBLIC(unsigned, acc_ua_get_be16
) (const acc_hvoid_p p
)
4663 #if defined(ACC_UA_GET_BE16)
4664 return ACC_UA_GET_BE16(p
);
4666 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4667 return ((unsigned)b
[1]) | ((unsigned)b
[0] << 8);
4670 ACCLIB_PUBLIC(acc_uint32l_t
, acc_ua_get_be24
) (const acc_hvoid_p p
)
4672 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4673 return ((acc_uint32l_t
)b
[2]) | ((acc_uint32l_t
)b
[1] << 8) | ((acc_uint32l_t
)b
[0] << 16);
4675 ACCLIB_PUBLIC(acc_uint32l_t
, acc_ua_get_be32
) (const acc_hvoid_p p
)
4677 #if defined(ACC_UA_GET_BE32)
4678 return ACC_UA_GET_BE32(p
);
4680 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4681 return ((acc_uint32l_t
)b
[3]) | ((acc_uint32l_t
)b
[2] << 8) | ((acc_uint32l_t
)b
[1] << 16) | ((acc_uint32l_t
)b
[0] << 24);
4684 ACCLIB_PUBLIC(void, acc_ua_set_be16
) (acc_hvoid_p p
, unsigned v
)
4686 #if defined(ACC_UA_SET_BE16)
4687 ACC_UA_SET_BE16(p
, v
);
4689 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4690 b
[1] = (unsigned char) ((v
>> 0) & 0xff);
4691 b
[0] = (unsigned char) ((v
>> 8) & 0xff);
4694 ACCLIB_PUBLIC(void, acc_ua_set_be24
) (acc_hvoid_p p
, acc_uint32l_t v
)
4696 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4697 b
[2] = (unsigned char) ((v
>> 0) & 0xff);
4698 b
[1] = (unsigned char) ((v
>> 8) & 0xff);
4699 b
[0] = (unsigned char) ((v
>> 16) & 0xff);
4701 ACCLIB_PUBLIC(void, acc_ua_set_be32
) (acc_hvoid_p p
, acc_uint32l_t v
)
4703 #if defined(ACC_UA_SET_BE32)
4704 ACC_UA_SET_BE32(p
, v
);
4706 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4707 b
[3] = (unsigned char) ((v
>> 0) & 0xff);
4708 b
[2] = (unsigned char) ((v
>> 8) & 0xff);
4709 b
[1] = (unsigned char) ((v
>> 16) & 0xff);
4710 b
[0] = (unsigned char) ((v
>> 24) & 0xff);
4713 ACCLIB_PUBLIC(unsigned, acc_ua_get_le16
) (const acc_hvoid_p p
)
4715 #if defined(ACC_UA_GET_LE16)
4716 return ACC_UA_GET_LE16(p
);
4718 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4719 return ((unsigned)b
[0]) | ((unsigned)b
[1] << 8);
4722 ACCLIB_PUBLIC(acc_uint32l_t
, acc_ua_get_le24
) (const acc_hvoid_p p
)
4724 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4725 return ((acc_uint32l_t
)b
[0]) | ((acc_uint32l_t
)b
[1] << 8) | ((acc_uint32l_t
)b
[2] << 16);
4727 ACCLIB_PUBLIC(acc_uint32l_t
, acc_ua_get_le32
) (const acc_hvoid_p p
)
4729 #if defined(ACC_UA_GET_LE32)
4730 return ACC_UA_GET_LE32(p
);
4732 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4733 return ((acc_uint32l_t
)b
[0]) | ((acc_uint32l_t
)b
[1] << 8) | ((acc_uint32l_t
)b
[2] << 16) | ((acc_uint32l_t
)b
[3] << 24);
4736 ACCLIB_PUBLIC(void, acc_ua_set_le16
) (acc_hvoid_p p
, unsigned v
)
4738 #if defined(ACC_UA_SET_LE16)
4739 ACC_UA_SET_LE16(p
, v
);
4741 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4742 b
[0] = (unsigned char) ((v
>> 0) & 0xff);
4743 b
[1] = (unsigned char) ((v
>> 8) & 0xff);
4746 ACCLIB_PUBLIC(void, acc_ua_set_le24
) (acc_hvoid_p p
, acc_uint32l_t v
)
4748 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4749 b
[0] = (unsigned char) ((v
>> 0) & 0xff);
4750 b
[1] = (unsigned char) ((v
>> 8) & 0xff);
4751 b
[2] = (unsigned char) ((v
>> 16) & 0xff);
4753 ACCLIB_PUBLIC(void, acc_ua_set_le32
) (acc_hvoid_p p
, acc_uint32l_t v
)
4755 #if defined(ACC_UA_SET_LE32)
4756 ACC_UA_SET_LE32(p
, v
);
4758 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4759 b
[0] = (unsigned char) ((v
>> 0) & 0xff);
4760 b
[1] = (unsigned char) ((v
>> 8) & 0xff);
4761 b
[2] = (unsigned char) ((v
>> 16) & 0xff);
4762 b
[3] = (unsigned char) ((v
>> 24) & 0xff);
4765 #if defined(acc_int64l_t)
4766 ACCLIB_PUBLIC(acc_uint64l_t
, acc_ua_get_be64
) (const acc_hvoid_p p
)
4768 #if defined(ACC_UA_GET_BE64)
4769 return ACC_UA_GET_BE64(p
);
4770 #elif defined(ACC_UA_GET_BE32)
4771 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4772 acc_uint32e_t v0
, v1
;
4773 v1
= ACC_UA_GET_BE32(b
+ 0);
4774 v0
= ACC_UA_GET_BE32(b
+ 4);
4775 return ((acc_uint64l_t
)v0
) | ((acc_uint64l_t
)v1
<< 32);
4776 #elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8)
4777 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4778 return ((acc_uint64l_t
)b
[7]) | ((acc_uint64l_t
)b
[6] << 8) | ((acc_uint64l_t
)b
[5] << 16) | ((acc_uint64l_t
)b
[4] << 24) | ((acc_uint64l_t
)b
[3] << 32) | ((acc_uint64l_t
)b
[2] << 40) | ((acc_uint64l_t
)b
[1] << 48) | ((acc_uint64l_t
)b
[0] << 56);
4780 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4781 acc_uint32l_t v0
, v1
;
4782 v1
= ((acc_uint32l_t
)b
[3]) | ((acc_uint32l_t
)b
[2] << 8) | ((acc_uint32l_t
)b
[1] << 16) | ((acc_uint32l_t
)b
[0] << 24);
4784 v0
= ((acc_uint32l_t
)b
[3]) | ((acc_uint32l_t
)b
[2] << 8) | ((acc_uint32l_t
)b
[1] << 16) | ((acc_uint32l_t
)b
[0] << 24);
4785 return ((acc_uint64l_t
)v0
) | ((acc_uint64l_t
)v1
<< 32);
4788 ACCLIB_PUBLIC(void, acc_ua_set_be64
) (acc_hvoid_p p
, acc_uint64l_t v
)
4790 #if defined(ACC_UA_SET_BE64)
4791 ACC_UA_SET_BE64(p
, v
);
4792 #elif defined(ACC_UA_SET_BE32)
4793 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4794 ACC_UA_SET_BE32(b
+ 4, (v
>> 0));
4795 ACC_UA_SET_BE32(b
+ 0, (v
>> 32));
4796 #elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8)
4797 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4798 b
[7] = (unsigned char) ((v
>> 0) & 0xff);
4799 b
[6] = (unsigned char) ((v
>> 8) & 0xff);
4800 b
[5] = (unsigned char) ((v
>> 16) & 0xff);
4801 b
[4] = (unsigned char) ((v
>> 24) & 0xff);
4802 b
[3] = (unsigned char) ((v
>> 32) & 0xff);
4803 b
[2] = (unsigned char) ((v
>> 40) & 0xff);
4804 b
[1] = (unsigned char) ((v
>> 48) & 0xff);
4805 b
[0] = (unsigned char) ((v
>> 56) & 0xff);
4807 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4809 x
= (acc_uint32l_t
) (v
>> 0);
4810 b
[7] = (unsigned char) ((x
>> 0) & 0xff);
4811 b
[6] = (unsigned char) ((x
>> 8) & 0xff);
4812 b
[5] = (unsigned char) ((x
>> 16) & 0xff);
4813 b
[4] = (unsigned char) ((x
>> 24) & 0xff);
4814 x
= (acc_uint32l_t
) (v
>> 32);
4815 b
[3] = (unsigned char) ((x
>> 0) & 0xff);
4816 b
[2] = (unsigned char) ((x
>> 8) & 0xff);
4817 b
[1] = (unsigned char) ((x
>> 16) & 0xff);
4818 b
[0] = (unsigned char) ((x
>> 24) & 0xff);
4822 #if defined(acc_int64l_t)
4823 ACCLIB_PUBLIC(acc_uint64l_t
, acc_ua_get_le64
) (const acc_hvoid_p p
)
4825 #if defined(ACC_UA_GET_LE64)
4826 return ACC_UA_GET_LE64(p
);
4827 #elif defined(ACC_UA_GET_LE32)
4828 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4829 acc_uint32e_t v0
, v1
;
4830 v0
= ACC_UA_GET_LE32(b
+ 0);
4831 v1
= ACC_UA_GET_LE32(b
+ 4);
4832 return ((acc_uint64l_t
)v0
) | ((acc_uint64l_t
)v1
<< 32);
4833 #elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8)
4834 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4835 return ((acc_uint64l_t
)b
[0]) | ((acc_uint64l_t
)b
[1] << 8) | ((acc_uint64l_t
)b
[2] << 16) | ((acc_uint64l_t
)b
[3] << 24) | ((acc_uint64l_t
)b
[4] << 32) | ((acc_uint64l_t
)b
[5] << 40) | ((acc_uint64l_t
)b
[6] << 48) | ((acc_uint64l_t
)b
[7] << 56);
4837 const acc_hbyte_p b
= (const acc_hbyte_p
) p
;
4838 acc_uint32l_t v0
, v1
;
4839 v0
= ((acc_uint32l_t
)b
[0]) | ((acc_uint32l_t
)b
[1] << 8) | ((acc_uint32l_t
)b
[2] << 16) | ((acc_uint32l_t
)b
[3] << 24);
4841 v1
= ((acc_uint32l_t
)b
[0]) | ((acc_uint32l_t
)b
[1] << 8) | ((acc_uint32l_t
)b
[2] << 16) | ((acc_uint32l_t
)b
[3] << 24);
4842 return ((acc_uint64l_t
)v0
) | ((acc_uint64l_t
)v1
<< 32);
4845 ACCLIB_PUBLIC(void, acc_ua_set_le64
) (acc_hvoid_p p
, acc_uint64l_t v
)
4847 #if defined(ACC_UA_SET_LE64)
4848 ACC_UA_SET_LE64(p
, v
);
4849 #elif defined(ACC_UA_SET_LE32)
4850 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4851 ACC_UA_SET_LE32(b
+ 0, (v
>> 0));
4852 ACC_UA_SET_LE32(b
+ 4, (v
>> 32));
4853 #elif (ACC_SIZEOF_LONG >= 8) || (ACC_SIZEOF_SIZE_T >= 8)
4854 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4855 b
[0] = (unsigned char) ((v
>> 0) & 0xff);
4856 b
[1] = (unsigned char) ((v
>> 8) & 0xff);
4857 b
[2] = (unsigned char) ((v
>> 16) & 0xff);
4858 b
[3] = (unsigned char) ((v
>> 24) & 0xff);
4859 b
[4] = (unsigned char) ((v
>> 32) & 0xff);
4860 b
[5] = (unsigned char) ((v
>> 40) & 0xff);
4861 b
[6] = (unsigned char) ((v
>> 48) & 0xff);
4862 b
[7] = (unsigned char) ((v
>> 56) & 0xff);
4864 acc_hbyte_p b
= (acc_hbyte_p
) p
;
4866 x
= (acc_uint32l_t
) (v
>> 0);
4867 b
[0] = (unsigned char) ((x
>> 0) & 0xff);
4868 b
[1] = (unsigned char) ((x
>> 8) & 0xff);
4869 b
[2] = (unsigned char) ((x
>> 16) & 0xff);
4870 b
[3] = (unsigned char) ((x
>> 24) & 0xff);
4871 x
= (acc_uint32l_t
) (v
>> 32);
4872 b
[4] = (unsigned char) ((x
>> 0) & 0xff);
4873 b
[5] = (unsigned char) ((x
>> 8) & 0xff);
4874 b
[6] = (unsigned char) ((x
>> 16) & 0xff);
4875 b
[7] = (unsigned char) ((x
>> 24) & 0xff);
4880 #if defined(ACC_WANT_ACCLIB_VGET)
4881 # undef ACC_WANT_ACCLIB_VGET
4882 #define __ACCLIB_VGET_CH_INCLUDED 1
4883 #if !defined(ACCLIB_PUBLIC)
4884 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
4886 #if !defined(ACCLIB_PUBLIC_NOINLINE)
4887 # if !defined(__acc_noinline)
4888 # define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
4889 # elif (ACC_CC_GNUC >= 0x030400ul) || (ACC_CC_LLVM)
4890 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
4892 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
4895 #if (ACC_CC_GNUC >= 0x030400ul) || (ACC_CC_LLVM)
4896 extern void* volatile __acc_vget_ptr
;
4897 void* volatile __attribute__((__used__
)) __acc_vget_ptr
= (void *) 0;
4899 extern void* volatile __acc_vget_ptr
;
4900 void* volatile __acc_vget_ptr
= (void *) 0;
4902 #ifndef __ACCLIB_VGET_BODY
4903 #define __ACCLIB_VGET_BODY(T) \
4904 if __acc_unlikely(__acc_vget_ptr) { \
4905 * (T *) __acc_vget_ptr = v; \
4906 * (int *) __acc_vget_ptr = expr; \
4907 v = * (T *) __acc_vget_ptr; \
4911 ACCLIB_PUBLIC_NOINLINE(short, acc_vget_short
) (short v
, int expr
)
4913 __ACCLIB_VGET_BODY(short)
4915 ACCLIB_PUBLIC_NOINLINE(int, acc_vget_int
) (int v
, int expr
)
4917 __ACCLIB_VGET_BODY(int)
4919 ACCLIB_PUBLIC_NOINLINE(long, acc_vget_long
) (long v
, int expr
)
4921 __ACCLIB_VGET_BODY(long)
4923 #if defined(acc_int64l_t)
4924 ACCLIB_PUBLIC_NOINLINE(acc_int64l_t
, acc_vget_acc_int64l_t
) (acc_int64l_t v
, int expr
)
4926 __ACCLIB_VGET_BODY(acc_int64l_t
)
4929 ACCLIB_PUBLIC_NOINLINE(acc_hsize_t
, acc_vget_acc_hsize_t
) (acc_hsize_t v
, int expr
)
4931 __ACCLIB_VGET_BODY(acc_hsize_t
)
4933 #if !defined(ACC_CFG_NO_FLOAT)
4934 ACCLIB_PUBLIC_NOINLINE(float, acc_vget_float
) (float v
, int expr
)
4936 __ACCLIB_VGET_BODY(float)
4939 #if !defined(ACC_CFG_NO_DOUBLE)
4940 ACCLIB_PUBLIC_NOINLINE(double, acc_vget_double
) (double v
, int expr
)
4942 __ACCLIB_VGET_BODY(double)
4945 ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p
, acc_vget_acc_hvoid_p
) (acc_hvoid_p v
, int expr
)
4947 __ACCLIB_VGET_BODY(acc_hvoid_p
)
4949 #if (ACC_ARCH_I086 && ACC_CC_TURBOC && (__TURBOC__ == 0x0295)) && !defined(__cplusplus)
4950 ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p
, acc_vget_acc_hvoid_cp
) (const acc_hvoid_p vv
, int expr
)
4952 acc_hvoid_p v
= (acc_hvoid_p
) vv
;
4953 __ACCLIB_VGET_BODY(acc_hvoid_p
)
4956 ACCLIB_PUBLIC_NOINLINE(const acc_hvoid_p
, acc_vget_acc_hvoid_cp
) (const acc_hvoid_p v
, int expr
)
4958 __ACCLIB_VGET_BODY(const acc_hvoid_p
)
4962 #if defined(ACC_WANT_ACCLIB_HMEMCPY)
4963 # undef ACC_WANT_ACCLIB_HMEMCPY
4964 #define __ACCLIB_HMEMCPY_CH_INCLUDED 1
4965 #if !defined(ACCLIB_PUBLIC)
4966 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
4968 ACCLIB_PUBLIC(int, acc_hmemcmp
) (const acc_hvoid_p s1
, const acc_hvoid_p s2
, acc_hsize_t len
)
4970 #if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCMP)
4971 const acc_hbyte_p p1
= (const acc_hbyte_p
) s1
;
4972 const acc_hbyte_p p2
= (const acc_hbyte_p
) s2
;
4973 if __acc_likely(len
> 0) do
4979 } while __acc_likely(--len
> 0);
4982 return memcmp(s1
, s2
, len
);
4985 ACCLIB_PUBLIC(acc_hvoid_p
, acc_hmemcpy
) (acc_hvoid_p dest
, const acc_hvoid_p src
, acc_hsize_t len
)
4987 #if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMCPY)
4988 acc_hbyte_p p1
= (acc_hbyte_p
) dest
;
4989 const acc_hbyte_p p2
= (const acc_hbyte_p
) src
;
4990 if (!(len
> 0) || p1
== p2
)
4994 while __acc_likely(--len
> 0);
4997 return memcpy(dest
, src
, len
);
5000 ACCLIB_PUBLIC(acc_hvoid_p
, acc_hmemmove
) (acc_hvoid_p dest
, const acc_hvoid_p src
, acc_hsize_t len
)
5002 #if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMMOVE)
5003 acc_hbyte_p p1
= (acc_hbyte_p
) dest
;
5004 const acc_hbyte_p p2
= (const acc_hbyte_p
) src
;
5005 if (!(len
> 0) || p1
== p2
)
5011 while __acc_likely(--len
> 0);
5019 while __acc_likely(--len
> 0);
5023 return memmove(dest
, src
, len
);
5026 ACCLIB_PUBLIC(acc_hvoid_p
, acc_hmemset
) (acc_hvoid_p s
, int c
, acc_hsize_t len
)
5028 #if (ACC_HAVE_MM_HUGE_PTR) || !defined(HAVE_MEMSET)
5029 acc_hbyte_p p
= (acc_hbyte_p
) s
;
5030 if __acc_likely(len
> 0) do
5031 *p
++ = (unsigned char) c
;
5032 while __acc_likely(--len
> 0);
5035 return memset(s
, c
, len
);
5039 #if defined(ACC_WANT_ACCLIB_RAND)
5040 # undef ACC_WANT_ACCLIB_RAND
5041 #define __ACCLIB_RAND_CH_INCLUDED 1
5042 #if !defined(ACCLIB_PUBLIC)
5043 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5045 ACCLIB_PUBLIC(void, acc_srand31
) (acc_rand31_p r
, acc_uint32l_t seed
)
5047 r
->seed
= seed
& ACC_UINT32_C(0xffffffff);
5049 ACCLIB_PUBLIC(acc_uint32l_t
, acc_rand31
) (acc_rand31_p r
)
5051 r
->seed
= r
->seed
* ACC_UINT32_C(1103515245) + 12345;
5052 r
->seed
&= ACC_UINT32_C(0x7fffffff);
5055 #if defined(acc_int64l_t)
5056 ACCLIB_PUBLIC(void, acc_srand48
) (acc_rand48_p r
, acc_uint32l_t seed
)
5058 r
->seed
= seed
& ACC_UINT32_C(0xffffffff);
5059 r
->seed
<<= 16; r
->seed
|= 0x330e;
5061 ACCLIB_PUBLIC(acc_uint32l_t
, acc_rand48
) (acc_rand48_p r
)
5063 r
->seed
= r
->seed
* ACC_UINT64_C(25214903917) + 11;
5064 r
->seed
&= ACC_UINT64_C(0xffffffffffff);
5065 return (acc_uint32l_t
) (r
->seed
>> 17);
5067 ACCLIB_PUBLIC(acc_uint32l_t
, acc_rand48_r32
) (acc_rand48_p r
)
5069 r
->seed
= r
->seed
* ACC_UINT64_C(25214903917) + 11;
5070 r
->seed
&= ACC_UINT64_C(0xffffffffffff);
5071 return (acc_uint32l_t
) (r
->seed
>> 16);
5074 #if defined(acc_int64l_t)
5075 ACCLIB_PUBLIC(void, acc_srand64
) (acc_rand64_p r
, acc_uint64l_t seed
)
5077 r
->seed
= seed
& ACC_UINT64_C(0xffffffffffffffff);
5079 ACCLIB_PUBLIC(acc_uint32l_t
, acc_rand64
) (acc_rand64_p r
)
5081 r
->seed
= r
->seed
* ACC_UINT64_C(6364136223846793005) + 1;
5082 #if (ACC_SIZEOF_ACC_INT64L_T > 8)
5083 r
->seed
&= ACC_UINT64_C(0xffffffffffffffff);
5085 return (acc_uint32l_t
) (r
->seed
>> 33);
5087 ACCLIB_PUBLIC(acc_uint32l_t
, acc_rand64_r32
) (acc_rand64_p r
)
5089 r
->seed
= r
->seed
* ACC_UINT64_C(6364136223846793005) + 1;
5090 #if (ACC_SIZEOF_ACC_INT64L_T > 8)
5091 r
->seed
&= ACC_UINT64_C(0xffffffffffffffff);
5093 return (acc_uint32l_t
) (r
->seed
>> 32);
5096 ACCLIB_PUBLIC(void, acc_srandmt
) (acc_randmt_p r
, acc_uint32l_t seed
)
5100 r
->s
[i
++] = (seed
&= ACC_UINT32_C(0xffffffff));
5102 seed
= seed
* ACC_UINT32_C(0x6c078965) + i
;
5106 ACCLIB_PUBLIC(acc_uint32l_t
, acc_randmt
) (acc_randmt_p r
)
5108 return (__ACCLIB_FUNCNAME(acc_randmt_r32
)(r
)) >> 1;
5110 ACCLIB_PUBLIC(acc_uint32l_t
, acc_randmt_r32
) (acc_randmt_p r
)
5113 if __acc_unlikely(r
->n
== 624) {
5117 j
= i
- 623; if (j
< 0) j
+= 624;
5118 v
= (r
->s
[i
] & ACC_UINT32_C(0x80000000)) ^ (r
->s
[j
] & ACC_UINT32_C(0x7fffffff));
5119 j
= i
- 227; if (j
< 0) j
+= 624;
5120 r
->s
[i
] = r
->s
[j
] ^ (v
>> 1);
5121 if (v
& 1) r
->s
[i
] ^= ACC_UINT32_C(0x9908b0df);
5122 } while (++i
!= 624);
5125 v
^= v
>> 11; v
^= (v
& ACC_UINT32_C(0x013a58ad)) << 7;
5126 v
^= (v
& ACC_UINT32_C(0x0001df8c)) << 15; v
^= v
>> 18;
5129 #if defined(acc_int64l_t)
5130 ACCLIB_PUBLIC(void, acc_srandmt64
) (acc_randmt64_p r
, acc_uint64l_t seed
)
5134 r
->s
[i
++] = (seed
&= ACC_UINT64_C(0xffffffffffffffff));
5136 seed
= seed
* ACC_UINT64_C(0x5851f42d4c957f2d) + i
;
5141 ACCLIB_PUBLIC(acc_uint32l_t
, acc_randmt64
) (acc_randmt64_p r
)
5144 v
= (__ACCLIB_FUNCNAME(acc_randmt64_r64
)(r
)) >> 33;
5145 return (acc_uint32l_t
) v
;
5148 ACCLIB_PUBLIC(acc_uint64l_t
, acc_randmt64_r64
) (acc_randmt64_p r
)
5151 if __acc_unlikely(r
->n
== 312) {
5155 j
= i
- 311; if (j
< 0) j
+= 312;
5156 v
= (r
->s
[i
] & ACC_UINT64_C(0xffffffff80000000)) ^ (r
->s
[j
] & ACC_UINT64_C(0x7fffffff));
5157 j
= i
- 156; if (j
< 0) j
+= 312;
5158 r
->s
[i
] = r
->s
[j
] ^ (v
>> 1);
5159 if (v
& 1) r
->s
[i
] ^= ACC_UINT64_C(0xb5026f5aa96619e9);
5160 } while (++i
!= 312);
5163 v
^= (v
& ACC_UINT64_C(0xaaaaaaaaa0000000)) >> 29;
5164 v
^= (v
& ACC_UINT64_C(0x38eb3ffff6d3)) << 17;
5165 v
^= (v
& ACC_UINT64_C(0x7ffbf77)) << 37;
5166 return v
^ (v
>> 43);
5170 #if defined(ACC_WANT_ACCLIB_RDTSC)
5171 # undef ACC_WANT_ACCLIB_RDTSC
5172 #define __ACCLIB_RDTSC_CH_INCLUDED 1
5173 #if !defined(ACCLIB_PUBLIC)
5174 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5176 #if defined(acc_int32e_t)
5177 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
5179 # pragma warn(disable:2007)
5181 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
5182 #if (ACC_ARCH_AMD64 && ACC_CC_PATHSCALE)
5183 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "cc", "memory", "rax", "rdx"
5184 #elif (ACC_ARCH_AMD64 && ACC_CC_INTELC)
5185 # define __ACCLIB_RDTSC_REGS : : "r" (t) : "memory", "rax", "rdx"
5186 #elif (ACC_ARCH_AMD64)
5187 # define __ACCLIB_RDTSC_REGS : : "r" (t) : "cc", "memory", "rax", "rdx"
5188 #elif (ACC_ARCH_I386 && ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul))
5189 # define __ACCLIB_RDTSC_REGS : : "r" (t) : "ax", "dx"
5190 #elif (ACC_ARCH_I386 && ACC_CC_INTELC)
5191 # define __ACCLIB_RDTSC_REGS : : "r" (t) : "memory", "eax", "edx"
5192 #elif (ACC_ARCH_I386 && ACC_CC_PATHSCALE)
5193 # define __ACCLIB_RDTSC_REGS : : "c" (t) : "memory", "eax", "edx"
5195 # define __ACCLIB_RDTSC_REGS : : "r" (t) : "cc", "memory", "eax", "edx"
5198 ACCLIB_PUBLIC(int, acc_tsc_read
) (acc_uint32e_t
* t
)
5200 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
5201 __asm__
__volatile__(
5202 "clc \n" ".byte 0x0f,0x31\n"
5203 "movl %%eax,(%0)\n" "movl %%edx,4(%0)\n"
5207 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
5212 # if (ACC_CC_MSC && (_MSC_VER < 1200))
5223 t
[0] = t
[1] = 0; return -1;
5226 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
5231 #if defined(ACC_WANT_ACCLIB_DOSALLOC)
5232 # undef ACC_WANT_ACCLIB_DOSALLOC
5233 #define __ACCLIB_DOSALLOC_CH_INCLUDED 1
5234 #if !defined(ACCLIB_PUBLIC)
5235 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5238 ACC_EXTERN_C
unsigned short __far __pascal
DosAllocHuge(unsigned short, unsigned short, unsigned short __far
*, unsigned short, unsigned short);
5239 ACC_EXTERN_C
unsigned short __far __pascal
DosFreeSeg(unsigned short);
5241 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
5242 #if !defined(ACC_CC_AZTECC)
5243 ACCLIB_PUBLIC(void __far
*, acc_dos_alloc
) (unsigned long size
)
5247 if ((long)size
<= 0)
5249 size
= (size
+ 15) >> 4;
5253 ri
.x
.bx
= (unsigned short) size
;
5254 int86(0x21, &ri
, &ro
);
5255 if ((ro
.x
.cflag
& 1) == 0)
5256 p
= (void __far
*) ACC_PTR_MK_FP(ro
.x
.ax
, 0);
5259 ACCLIB_PUBLIC(int, acc_dos_free
) (void __far
* p
)
5265 if (ACC_PTR_FP_OFF(p
) != 0)
5269 rs
.es
= ACC_PTR_FP_SEG(p
);
5270 int86x(0x21, &ri
, &ro
, &rs
);
5278 ACCLIB_PUBLIC(void __far
*, acc_dos_alloc
) (unsigned long size
)
5281 unsigned short sel
= 0;
5282 if ((long)size
<= 0)
5284 if (DosAllocHuge((unsigned short)(size
>> 16), (unsigned short)size
, &sel
, 0, 0) == 0)
5285 p
= (void __far
*) ACC_PTR_MK_FP(sel
, 0);
5288 ACCLIB_PUBLIC(int, acc_dos_free
) (void __far
* p
)
5292 if (ACC_PTR_FP_OFF(p
) != 0)
5294 if (DosFreeSeg(ACC_PTR_FP_SEG(p
)) != 0)
5300 #if defined(ACC_WANT_ACCLIB_HALLOC)
5301 # undef ACC_WANT_ACCLIB_HALLOC
5302 #define __ACCLIB_HALLOC_CH_INCLUDED 1
5303 #if !defined(ACCLIB_PUBLIC)
5304 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5306 #if (ACC_HAVE_MM_HUGE_PTR)
5307 #if 1 && (ACC_OS_DOS16 && defined(BLX286))
5308 # define __ACCLIB_HALLOC_USE_DAH 1
5309 #elif 1 && (ACC_OS_DOS16 && defined(DOSX286))
5310 # define __ACCLIB_HALLOC_USE_DAH 1
5311 #elif 1 && (ACC_OS_OS216)
5312 # define __ACCLIB_HALLOC_USE_DAH 1
5313 #elif 1 && (ACC_OS_WIN16)
5314 # define __ACCLIB_HALLOC_USE_GA 1
5315 #elif 1 && (ACC_OS_DOS16) && (ACC_CC_BORLANDC) && defined(__DPMI16__)
5316 # define __ACCLIB_HALLOC_USE_GA 1
5319 #if (__ACCLIB_HALLOC_USE_DAH)
5320 #if 0 && (ACC_OS_OS216)
5323 ACC_EXTERN_C
unsigned short __far __pascal
DosAllocHuge(unsigned short, unsigned short, unsigned short __far
*, unsigned short, unsigned short);
5324 ACC_EXTERN_C
unsigned short __far __pascal
DosFreeSeg(unsigned short);
5327 #if (__ACCLIB_HALLOC_USE_GA)
5330 #include <windows.h>
5332 ACC_EXTERN_C
const void __near
* __far __pascal
GlobalAlloc(unsigned, unsigned long);
5333 ACC_EXTERN_C
const void __near
* __far __pascal
GlobalFree(const void __near
*);
5334 ACC_EXTERN_C
unsigned long __far __pascal
GlobalHandle(unsigned);
5335 ACC_EXTERN_C
void __far
* __far __pascal
GlobalLock(const void __near
*);
5336 ACC_EXTERN_C
int __far __pascal
GlobalUnlock(const void __near
*);
5339 ACCLIB_PUBLIC(acc_hvoid_p
, acc_halloc
) (acc_hsize_t size
)
5344 #if 0 && defined(__palmos__)
5345 p
= MemPtrNew(size
);
5346 #elif !defined(ACC_HAVE_MM_HUGE_PTR)
5347 if (size
< (size_t) -1)
5348 p
= malloc((size_t) size
);
5350 if ((long)size
<= 0)
5353 #if (__ACCLIB_HALLOC_USE_DAH)
5354 unsigned short sel
= 0;
5355 if (DosAllocHuge((unsigned short)(size
>> 16), (unsigned short)size
, &sel
, 0, 0) == 0)
5356 p
= (acc_hvoid_p
) ACC_PTR_MK_FP(sel
, 0);
5357 #elif (__ACCLIB_HALLOC_USE_GA)
5358 const void __near
* h
= GlobalAlloc(2, size
);
5361 if (p
&& ACC_PTR_FP_OFF(p
) != 0) {
5368 #elif (ACC_CC_MSC && (_MSC_VER >= 700))
5369 p
= _halloc(size
, 1);
5370 #elif (ACC_CC_MSC || ACC_CC_WATCOMC)
5371 p
= halloc(size
, 1);
5372 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
5373 p
= farmalloc(size
);
5374 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
5375 p
= farmalloc(size
);
5376 #elif defined(ACC_CC_AZTECC)
5379 if (size
< (size_t) -1)
5380 p
= malloc((size_t) size
);
5386 ACCLIB_PUBLIC(void, acc_hfree
) (acc_hvoid_p p
)
5390 #if 0 && defined(__palmos__)
5392 #elif !defined(ACC_HAVE_MM_HUGE_PTR)
5395 #if (__ACCLIB_HALLOC_USE_DAH)
5396 if (ACC_PTR_FP_OFF(p
) == 0)
5397 DosFreeSeg((unsigned short) ACC_PTR_FP_SEG(p
));
5398 #elif (__ACCLIB_HALLOC_USE_GA)
5399 if (ACC_PTR_FP_OFF(p
) == 0) {
5400 const void __near
* h
= (const void __near
*) (unsigned) GlobalHandle(ACC_PTR_FP_SEG(p
));
5406 #elif (ACC_CC_MSC && (_MSC_VER >= 700))
5408 #elif (ACC_CC_MSC || ACC_CC_WATCOMC)
5410 #elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
5411 farfree((void __far
*) p
);
5412 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
5413 farfree((void __far
*) p
);
5414 #elif defined(ACC_CC_AZTECC)
5422 #if defined(ACC_WANT_ACCLIB_HFREAD)
5423 # undef ACC_WANT_ACCLIB_HFREAD
5424 #define __ACCLIB_HFREAD_CH_INCLUDED 1
5425 #if !defined(ACCLIB_PUBLIC)
5426 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5428 ACCLIB_PUBLIC(acc_hsize_t
, acc_hfread
) (void* vfp
, acc_hvoid_p buf
, acc_hsize_t size
)
5430 FILE* fp
= (FILE *) vfp
;
5431 #if (ACC_HAVE_MM_HUGE_PTR)
5432 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
5433 #define __ACCLIB_REQUIRE_HMEMCPY_CH 1
5434 unsigned char tmp
[512];
5438 size_t n
= size
- l
> sizeof(tmp
) ? sizeof(tmp
) : (size_t) (size
- l
);
5439 n
= fread(tmp
, 1, n
, fp
);
5442 __ACCLIB_FUNCNAME(acc_hmemcpy
)((acc_hbyte_p
)buf
+ l
, tmp
, (acc_hsize_t
)n
);
5446 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
5447 acc_hbyte_p b
= (acc_hbyte_p
) buf
;
5452 n
= ACC_PTR_FP_OFF(b
); n
= (n
<= 1) ? 0x8000u
: (0u - n
);
5453 if ((acc_hsize_t
) n
> size
- l
)
5454 n
= (size_t) (size
- l
);
5455 n
= fread((void __far
*)b
, 1, n
, fp
);
5462 # error "unknown memory model"
5465 return fread(buf
, 1, size
, fp
);
5468 ACCLIB_PUBLIC(acc_hsize_t
, acc_hfwrite
) (void* vfp
, const acc_hvoid_p buf
, acc_hsize_t size
)
5470 FILE* fp
= (FILE *) vfp
;
5471 #if (ACC_HAVE_MM_HUGE_PTR)
5472 #if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
5473 #define __ACCLIB_REQUIRE_HMEMCPY_CH 1
5474 unsigned char tmp
[512];
5478 size_t n
= size
- l
> sizeof(tmp
) ? sizeof(tmp
) : (size_t) (size
- l
);
5479 __ACCLIB_FUNCNAME(acc_hmemcpy
)(tmp
, (const acc_hbyte_p
)buf
+ l
, (acc_hsize_t
)n
);
5480 n
= fwrite(tmp
, 1, n
, fp
);
5486 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
5487 const acc_hbyte_p b
= (const acc_hbyte_p
) buf
;
5492 n
= ACC_PTR_FP_OFF(b
); n
= (n
<= 1) ? 0x8000u
: (0u - n
);
5493 if ((acc_hsize_t
) n
> size
- l
)
5494 n
= (size_t) (size
- l
);
5495 n
= fwrite((void __far
*)b
, 1, n
, fp
);
5502 # error "unknown memory model"
5505 return fwrite(buf
, 1, size
, fp
);
5509 #if defined(ACC_WANT_ACCLIB_HSREAD)
5510 # undef ACC_WANT_ACCLIB_HSREAD
5511 #define __ACCLIB_HSREAD_CH_INCLUDED 1
5512 #if !defined(ACCLIB_PUBLIC)
5513 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5515 ACCLIB_PUBLIC(long, acc_safe_hread
) (int fd
, acc_hvoid_p buf
, long size
)
5517 acc_hbyte_p b
= (acc_hbyte_p
) buf
;
5520 saved_errno
= errno
;
5524 #if (ACC_HAVE_MM_HUGE_PTR)
5525 # define __ACCLIB_REQUIRE_HREAD_CH 1
5526 errno
= 0; n
= acc_hread(fd
, b
, n
);
5527 #elif (ACC_OS_DOS32) && defined(__DJGPP__)
5528 errno
= 0; n
= _read(fd
, b
, n
);
5530 errno
= 0; n
= read(fd
, b
, n
);
5536 if (errno
== (EAGAIN
)) continue;
5539 if (errno
== (EINTR
)) continue;
5541 if (errno
== 0) errno
= 1;
5546 errno
= saved_errno
;
5549 ACCLIB_PUBLIC(long, acc_safe_hwrite
) (int fd
, const acc_hvoid_p buf
, long size
)
5551 const acc_hbyte_p b
= (const acc_hbyte_p
) buf
;
5554 saved_errno
= errno
;
5558 #if (ACC_HAVE_MM_HUGE_PTR)
5559 # define __ACCLIB_REQUIRE_HREAD_CH 1
5560 errno
= 0; n
= acc_hwrite(fd
, b
, n
);
5561 #elif (ACC_OS_DOS32) && defined(__DJGPP__)
5562 errno
= 0; n
= _write(fd
, b
, n
);
5564 errno
= 0; n
= write(fd
, b
, n
);
5570 if (errno
== (EAGAIN
)) continue;
5573 if (errno
== (EINTR
)) continue;
5575 if (errno
== 0) errno
= 1;
5580 errno
= saved_errno
;
5584 #if defined(ACC_WANT_ACCLIB_PCLOCK)
5585 # undef ACC_WANT_ACCLIB_PCLOCK
5586 #define __ACCLIB_PCLOCK_CH_INCLUDED 1
5587 #if !defined(ACCLIB_PUBLIC)
5588 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5590 #if defined(HAVE_GETTIMEOFDAY)
5591 #ifndef acc_pclock_read_gettimeofday
5592 #define acc_pclock_read_gettimeofday acc_pclock_read_gettimeofday
5594 static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h
, acc_pclock_p c
)
5597 if (gettimeofday(&tv
, 0) != 0)
5599 #if defined(acc_int64l_t)
5600 c
->tv_sec
= tv
.tv_sec
;
5603 c
->tv_sec_low
= tv
.tv_sec
;
5605 c
->tv_nsec
= (acc_uint32l_t
) (tv
.tv_usec
* 1000u);
5606 ACC_UNUSED(h
); return 0;
5609 #if defined(CLOCKS_PER_SEC)
5610 #ifndef acc_pclock_read_clock
5611 #define acc_pclock_read_clock acc_pclock_read_clock
5613 static int acc_pclock_read_clock(acc_pclock_handle_p h
, acc_pclock_p c
)
5617 #if defined(acc_int64l_t)
5618 acc_uint64l_t nsecs
;
5620 secs
= (double)ticks
/ (CLOCKS_PER_SEC
);
5621 nsecs
= (acc_uint64l_t
) (secs
* 1000000000.0);
5622 c
->tv_sec
= (acc_int64l_t
) (nsecs
/ 1000000000ul);
5623 c
->tv_nsec
= (acc_uint32l_t
) (nsecs
% 1000000000ul);
5626 secs
= (double)ticks
/ (CLOCKS_PER_SEC
);
5628 c
->tv_sec_low
= (acc_uint32l_t
) (secs
+ 0.5);
5631 ACC_UNUSED(h
); return 0;
5634 #if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) && defined(UCLOCKS_PER_SEC)
5635 #ifndef acc_pclock_read_uclock
5636 #define acc_pclock_read_uclock acc_pclock_read_uclock
5638 static int acc_pclock_read_uclock(acc_pclock_handle_p h
, acc_pclock_p c
)
5640 acc_uint64l_t ticks
;
5642 acc_uint64l_t nsecs
;
5644 secs
= (double)ticks
/ (UCLOCKS_PER_SEC
);
5645 nsecs
= (acc_uint64l_t
) (secs
* 1000000000.0);
5646 c
->tv_sec
= nsecs
/ 1000000000ul;
5647 c
->tv_nsec
= (acc_uint32l_t
) (nsecs
% 1000000000ul);
5648 ACC_UNUSED(h
); return 0;
5651 #if 0 && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_PROCESS_CPUTIME_ID) && defined(acc_int64l_t)
5652 #ifndef acc_pclock_read_clock_gettime_p
5653 #define acc_pclock_read_clock_gettime_p acc_pclock_read_clock_gettime_p
5655 static int acc_pclock_read_clock_gettime_p(acc_pclock_handle_p h
, acc_pclock_p c
)
5658 if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID
, &ts
) != 0)
5660 c
->tv_sec
= ts
.tv_sec
;
5661 c
->tv_nsec
= ts
.tv_nsec
;
5662 ACC_UNUSED(h
); return 0;
5665 #if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
5666 #ifndef acc_pclock_read_getprocesstimes
5667 #define acc_pclock_read_getprocesstimes acc_pclock_read_getprocesstimes
5669 static int acc_pclock_read_getprocesstimes(acc_pclock_handle_p h
, acc_pclock_p c
)
5671 FILETIME ct
, et
, kt
, ut
;
5672 acc_uint64l_t ticks
;
5673 if (GetProcessTimes(GetCurrentProcess(), &ct
, &et
, &kt
, &ut
) == 0)
5675 ticks
= ((acc_uint64l_t
)ut
.dwHighDateTime
<< 32) | ut
.dwLowDateTime
;
5676 if __acc_unlikely(h
->ticks_base
== 0)
5677 h
->ticks_base
= ticks
;
5679 ticks
-= h
->ticks_base
;
5680 c
->tv_sec
= (acc_int64l_t
) (ticks
/ 10000000ul);
5681 c
->tv_nsec
= (acc_uint32l_t
)(ticks
% 10000000ul) * 100u;
5682 ACC_UNUSED(h
); return 0;
5685 #if defined(HAVE_GETRUSAGE) && defined(RUSAGE_SELF)
5686 #ifndef acc_pclock_read_getrusage
5687 #define acc_pclock_read_getrusage acc_pclock_read_getrusage
5689 static int acc_pclock_read_getrusage(acc_pclock_handle_p h
, acc_pclock_p c
)
5692 if (getrusage(RUSAGE_SELF
, &ru
) != 0)
5694 #if defined(acc_int64l_t)
5695 c
->tv_sec
= ru
.ru_utime
.tv_sec
;
5698 c
->tv_sec_low
= ru
.ru_utime
.tv_sec
;
5700 c
->tv_nsec
= (acc_uint32l_t
) (ru
.ru_utime
.tv_usec
* 1000u);
5701 ACC_UNUSED(h
); return 0;
5704 #if (__ACCLIB_PCLOCK_USE_PERFCTR)
5705 #ifndef acc_pclock_read_perfctr
5706 #define acc_pclock_read_perfctr acc_pclock_read_perfctr
5708 static int acc_pclock_read_perfctr(acc_pclock_handle_p h
, acc_pclock_p c
)
5710 acc_perfctr_clock_t pcc
;
5712 acc_uint64l_t nsecs
;
5713 acc_perfctr_read(&h
->pch
, &pcc
);
5714 if __acc_unlikely(h
->ticks_base
== 0)
5715 h
->ticks_base
= pcc
.tsc
;
5717 pcc
.tsc
-= h
->ticks_base
;
5718 secs
= pcc
.tsc
* h
->pch
.tsc_to_seconds
;
5719 nsecs
= (acc_uint64l_t
) (secs
* 1000000000.0);
5720 c
->tv_sec
= nsecs
/ 1000000000ul;
5721 c
->tv_nsec
= (acc_uint32l_t
) (nsecs
% 1000000000ul);
5722 ACC_UNUSED(h
); return 0;
5725 #if 0 && defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_THREAD_CPUTIME_ID) && defined(acc_int64l_t)
5726 #ifndef acc_pclock_read_clock_gettime_t
5727 #define acc_pclock_read_clock_gettime_t acc_pclock_read_clock_gettime_t
5729 static int acc_pclock_read_clock_gettime_t(acc_pclock_handle_p h
, acc_pclock_p c
)
5732 if (clock_gettime(CLOCK_THREAD_CPUTIME_ID
, &ts
) != 0)
5734 c
->tv_sec
= ts
.tv_sec
;
5735 c
->tv_nsec
= ts
.tv_nsec
;
5736 ACC_UNUSED(h
); return 0;
5739 #if (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) && defined(acc_int64l_t)
5740 #ifndef acc_pclock_read_getthreadtimes
5741 #define acc_pclock_read_getthreadtimes acc_pclock_read_getthreadtimes
5743 static int acc_pclock_read_getthreadtimes(acc_pclock_handle_p h
, acc_pclock_p c
)
5745 FILETIME ct
, et
, kt
, ut
;
5746 acc_uint64l_t ticks
;
5747 if (GetThreadTimes(GetCurrentThread(), &ct
, &et
, &kt
, &ut
) == 0)
5749 ticks
= ((acc_uint64l_t
)ut
.dwHighDateTime
<< 32) | ut
.dwLowDateTime
;
5750 if __acc_unlikely(h
->ticks_base
== 0)
5751 h
->ticks_base
= ticks
;
5753 ticks
-= h
->ticks_base
;
5754 c
->tv_sec
= (acc_int64l_t
) (ticks
/ 10000000ul);
5755 c
->tv_nsec
= (acc_uint32l_t
)(ticks
% 10000000ul) * 100;
5756 ACC_UNUSED(h
); return 0;
5759 ACCLIB_PUBLIC(int, acc_pclock_open
) (acc_pclock_handle_p h
, int mode
)
5763 h
->h
= (acclib_handle_t
) 0;
5767 #if defined(acc_int64l_t)
5772 case ACC_PCLOCK_REALTIME_HR
:
5773 # if defined(acc_pclock_read_gettimeofday)
5774 h
->gettime
= acc_pclock_read_gettimeofday
;
5775 h
->name
= "gettimeofday";
5778 case ACC_PCLOCK_REALTIME
:
5779 # if defined(acc_pclock_read_gettimeofday)
5780 h
->gettime
= acc_pclock_read_gettimeofday
;
5781 h
->name
= "gettimeofday";
5784 case ACC_PCLOCK_MONOTONIC_HR
:
5785 # if defined(acc_pclock_read_uclock)
5786 h
->gettime
= acc_pclock_read_uclock
;
5790 case ACC_PCLOCK_MONOTONIC
:
5791 # if defined(acc_pclock_read_clock)
5793 h
->gettime
= acc_pclock_read_clock
;
5798 case ACC_PCLOCK_PROCESS_CPUTIME_ID
:
5799 # if defined(acc_pclock_read_perfctr)
5800 if (acc_perfctr_open(&h
->pch
) == 0) {
5801 h
->gettime
= acc_pclock_read_perfctr
;
5802 h
->name
= "perfctr";
5806 # if defined(acc_pclock_read_getprocesstimes)
5807 if (!h
->gettime
&& acc_pclock_read_getprocesstimes(h
, &c
) == 0) {
5808 h
->gettime
= acc_pclock_read_getprocesstimes
;
5809 h
->name
= "GetProcessTimes";
5813 # if defined(acc_pclock_read_clock_gettime_p)
5814 if (!h
->gettime
&& acc_pclock_read_clock_gettime_p(h
, &c
) == 0) {
5815 h
->gettime
= acc_pclock_read_clock_gettime_p
;
5816 h
->name
= "CLOCK_PROCESS_CPUTIME_ID";
5820 # if defined(acc_pclock_read_getrusage)
5821 h
->gettime
= acc_pclock_read_getrusage
;
5822 h
->name
= "getrusage";
5825 case ACC_PCLOCK_THREAD_CPUTIME_ID
:
5826 # if defined(acc_pclock_read_getthreadtimes)
5827 if (!h
->gettime
&& acc_pclock_read_getthreadtimes(h
, &c
) == 0) {
5828 h
->gettime
= acc_pclock_read_getthreadtimes
;
5829 h
->name
= "GetThreadTimes";
5832 # if defined(acc_pclock_read_clock_gettime_t)
5833 if (!h
->gettime
&& acc_pclock_read_clock_gettime_t(h
, &c
) == 0) {
5834 h
->gettime
= acc_pclock_read_clock_gettime_t
;
5835 h
->name
= "CLOCK_THREAD_CPUTIME_ID";
5844 h
->h
= (acclib_handle_t
) 1;
5847 h
->name
= "unknown";
5848 for (i
= 0; i
< 10; i
++) {
5849 acc_pclock_read(h
, &c
);
5853 ACCLIB_PUBLIC(int, acc_pclock_open_default
) (acc_pclock_handle_p h
)
5855 if (acc_pclock_open(h
, ACC_PCLOCK_PROCESS_CPUTIME_ID
) == 0)
5857 if (acc_pclock_open(h
, ACC_PCLOCK_MONOTONIC_HR
) == 0)
5859 if (acc_pclock_open(h
, ACC_PCLOCK_REALTIME_HR
) == 0)
5861 if (acc_pclock_open(h
, ACC_PCLOCK_MONOTONIC
) == 0)
5863 if (acc_pclock_open(h
, ACC_PCLOCK_REALTIME
) == 0)
5865 if (acc_pclock_open(h
, ACC_PCLOCK_THREAD_CPUTIME_ID
) == 0)
5869 ACCLIB_PUBLIC(int, acc_pclock_close
) (acc_pclock_handle_p h
)
5871 h
->h
= (acclib_handle_t
) 0;
5875 #if (__ACCLIB_PCLOCK_USE_PERFCTR)
5876 acc_perfctr_close(&h
->pch
);
5880 ACCLIB_PUBLIC(void, acc_pclock_read
) (acc_pclock_handle_p h
, acc_pclock_p c
)
5883 if (h
->gettime(h
, c
) == 0)
5886 #if defined(acc_int64l_t)
5894 #if !defined(ACC_CFG_NO_DOUBLE)
5895 ACCLIB_PUBLIC(double, acc_pclock_get_elapsed
) (acc_pclock_handle_p h
, const acc_pclock_p start
, const acc_pclock_p stop
)
5897 double tstop
, tstart
;
5902 #if defined(acc_int64l_t)
5903 tstop
= stop
->tv_sec
+ stop
->tv_nsec
/ 1000000000.0;
5904 tstart
= start
->tv_sec
+ start
->tv_nsec
/ 1000000000.0;
5906 tstop
= stop
->tv_sec_low
+ stop
->tv_nsec
/ 1000000000.0;
5907 tstart
= start
->tv_sec_low
+ start
->tv_nsec
/ 1000000000.0;
5909 return tstop
- tstart
;
5912 ACCLIB_PUBLIC(int, acc_pclock_flush_cpu_cache
) (acc_pclock_handle_p h
, unsigned flags
)
5915 #if (__ACCLIB_PCLOCK_USE_PERFCTR)
5916 return acc_perfctr_flush_cpu_cache(&h
->pch
, flags
);
5919 ACC_UNUSED(h
); ACC_UNUSED(flags
);
5922 #if defined(__ACCLIB_PCLOCK_NEED_WARN_POP)
5923 # if (ACC_CC_MSC && (_MSC_VER >= 1200))
5924 # pragma warning(pop)
5926 # error "__ACCLIB_PCLOCK_NEED_WARN_POP"
5928 # undef __ACCLIB_PCLOCK_NEED_WARN_POP
5931 #if defined(ACC_WANT_ACCLIB_UCLOCK)
5932 # undef ACC_WANT_ACCLIB_UCLOCK
5933 #define __ACCLIB_UCLOCK_CH_INCLUDED 1
5934 #if !defined(ACCLIB_PUBLIC)
5935 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
5937 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
5938 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
5939 #elif (ACC_OS_CYGWIN || ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H)
5940 # if ((ACC_CC_DMC && (__DMC__ < 0x838)) || ACC_CC_LCCWIN32)
5941 # define __ACCLIB_UCLOCK_USE_CLOCK 1
5943 # define __ACCLIB_UCLOCK_USE_WINMM 1
5944 # if (ACC_CC_MSC && (_MSC_VER >= 1200))
5945 # pragma warning(push)
5946 # define __ACCLIB_UCLOCK_NEED_WARN_POP 1
5948 # if (ACC_CC_MSC && (_MSC_VER >= 900))
5949 # pragma warning(disable: 4201)
5950 # elif (ACC_CC_MWERKS)
5951 # define LPUINT __ACC_MMSYSTEM_H_LPUINT
5954 # include <mmsystem.h>
5956 # if (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)
5957 ACC_EXTERN_C
__declspec(dllimport
) unsigned long __stdcall
timeGetTime(void);
5959 ACC_EXTERN_C
unsigned long __stdcall
timeGetTime(void);
5963 # pragma DMC includelib "winmm.lib"
5964 # elif (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC)
5965 # pragma comment(lib, "winmm.lib")
5966 # elif (ACC_CC_MWERKS && (__MWERKS__ >= 0x3000))
5967 # pragma comment(lib, "winmm.lib")
5968 # elif (ACC_CC_SYMANTECC)
5969 # pragma SC includelib "winmm.lib"
5970 # elif (ACC_CC_WATCOMC && (__WATCOMC__ >= 1050))
5971 # pragma library("winmm.lib")
5974 #elif (ACC_OS_CYGWIN || ACC_OS_DOS32 || ACC_OS_EMX || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_TOS || ACC_OS_WIN32 || ACC_OS_WIN64)
5975 # define __ACCLIB_UCLOCK_USE_CLOCK 1
5976 #elif (ACC_OS_CONSOLE) && defined(CLOCKS_PER_SEC)
5977 # define __ACCLIB_UCLOCK_USE_CLOCK 1
5978 #elif (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99) && defined(CLOCKS_PER_SEC)
5979 # define __ACCLIB_UCLOCK_USE_CLOCK 1
5981 #if (__ACCLIB_UCLOCK_USE_CLOCK) && !defined(CLOCKS_PER_SEC)
5982 # if defined(CLK_TCK)
5983 # define CLOCKS_PER_SEC CLK_TCK
5985 # undef __ACCLIB_UCLOCK_USE_CLOCK
5988 #if (__ACCLIB_UCLOCK_USE_GETRUSAGE)
5989 # if !defined(RUSAGE_SELF)
5990 # undef __ACCLIB_UCLOCK_USE_GETRUSAGE
5993 ACCLIB_PUBLIC(int, acc_uclock_open
) (acc_uclock_handle_p h
)
5996 #if (__ACCLIB_UCLOCK_USE_QPC)
5999 h
->h
= (acclib_handle_t
) 1;
6002 #if (__ACCLIB_UCLOCK_USE_PERFCTR)
6004 if (h
->mode
== 0 && acc_perfctr_open(&h
->pch
) == 0)
6007 #if (__ACCLIB_UCLOCK_USE_QPC)
6009 if (h
->mode
== 0 && QueryPerformanceFrequency(&li
) != 0) {
6010 double d
= (double) li
.QuadPart
;
6011 if (d
> 0.0 && QueryPerformanceCounter(&li
) != 0) {
6017 for (i
= 0; i
< 10; i
++) {
6019 acc_uclock_read(h
, &c
);
6023 ACCLIB_PUBLIC(int, acc_uclock_close
) (acc_uclock_handle_p h
)
6025 h
->h
= (acclib_handle_t
) 0;
6028 #if (__ACCLIB_UCLOCK_USE_PERFCTR)
6029 acc_perfctr_close(&h
->pch
);
6033 ACCLIB_PUBLIC(void, acc_uclock_read
) (acc_uclock_handle_p h
, acc_uclock_p c
)
6035 #if (__ACCLIB_UCLOCK_USE_RDTSC)
6036 acc_tsc_read((acc_uint32e_t
*) (void*) &c
->tsc
);
6038 #if (__ACCLIB_UCLOCK_USE_PERFCTR)
6040 acc_perfctr_read(&h
->pch
, &c
->pcc
);
6041 if (h
->mode
> 0 && h
->mode
<= 2)
6045 #if (__ACCLIB_UCLOCK_USE_QPC)
6048 if (QueryPerformanceCounter(&li
) != 0) {
6049 c
->qpc
= (acc_int64l_t
) li
.QuadPart
;
6050 if (h
->mode
> 0 && h
->mode
<= 3)
6053 h
->mode
= 0; h
->qpf
= 0.0; c
->qpc
= 0;
6058 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
6059 # if (ACC_CC_AZTECC)
6063 ri
.x
.ax
= 0x2c00; int86(0x21, &ri
, &ro
);
6064 c
->ticks
.t32
= ro
.h
.ch
*60UL*60UL*100UL + ro
.h
.cl
*60UL*100UL + ro
.h
.dh
*100UL + ro
.h
.dl
;
6066 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
6067 c
->ticks
.t64
= uclock();
6068 #elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t)
6069 c
->ticks
.t64
= clock();
6070 #elif (__ACCLIB_UCLOCK_USE_CLOCK)
6071 c
->ticks
.t32
= clock();
6072 #elif (__ACCLIB_UCLOCK_USE_WINMM)
6073 c
->ticks
.t32
= timeGetTime();
6074 #elif (__ACCLIB_UCLOCK_USE_GETRUSAGE)
6076 if (getrusage(RUSAGE_SELF
, &ru
) != 0) c
->ticks
.td
= 0;
6077 else c
->ticks
.td
= ru
.ru_utime
.tv_sec
+ ru
.ru_utime
.tv_usec
/ 1000000.0;
6078 #elif (HAVE_GETTIMEOFDAY)
6080 if (gettimeofday(&tv
, 0) != 0) c
->ticks
.td
= 0;
6081 else c
->ticks
.td
= tv
.tv_sec
+ tv
.tv_usec
/ 1000000.0;
6088 ACCLIB_PUBLIC(double, acc_uclock_get_elapsed
) (acc_uclock_handle_p h
, const acc_uclock_p start
, const acc_uclock_p stop
)
6095 #if (__ACCLIB_UCLOCK_USE_RDTSC)
6097 if (!h
->name
) h
->name
= "rdtsc";
6098 d
= (double) ((acc_int64l_t
)stop
->tsc
- (acc_int64l_t
)start
->tsc
);
6099 return d
/ 1000000000.0;
6102 #if (__ACCLIB_UCLOCK_USE_PERFCTR)
6103 if (h
->pch
.h
&& h
->mode
== 2) {
6104 if (!h
->name
) h
->name
= "perfctr";
6105 return acc_perfctr_get_elapsed(&h
->pch
, &start
->pcc
, &stop
->pcc
);
6108 #if (__ACCLIB_UCLOCK_USE_QPC)
6109 if (h
->qpf
> 0.0 && h
->mode
== 3) {
6110 if (!h
->name
) h
->name
= "qpc";
6111 if (start
->qpc
== 0 || stop
->qpc
== 0) return 0.0;
6112 return (double) (stop
->qpc
- start
->qpc
) / h
->qpf
;
6115 #if (ACC_OS_DOS16 || ACC_OS_WIN16)
6117 if (!h
->name
) h
->name
= "uclock";
6118 d
= (double) (stop
->ticks
.t32
- start
->ticks
.t32
) / 100.0;
6119 if (d
< 0.0) d
+= 86400.0;
6120 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
6122 if (!h
->name
) h
->name
= "uclock";
6123 d
= (double) (stop
->ticks
.t64
- start
->ticks
.t64
) / (UCLOCKS_PER_SEC
);
6124 #elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t)
6126 if (!h
->name
) h
->name
= "clock";
6129 t
= stop
->ticks
.t64
- start
->ticks
.t64
;
6131 t
+= sizeof(clock_t) == 4 ? ACC_INT64_C(0x100000000) : ACC_INT64_C(0);
6132 d
= (double) t
/ (CLOCKS_PER_SEC
);
6134 #elif (__ACCLIB_UCLOCK_USE_CLOCK)
6136 if (!h
->name
) h
->name
= "clock";
6137 d
= (double) (stop
->ticks
.t32
- start
->ticks
.t32
) / (CLOCKS_PER_SEC
);
6138 #elif (__ACCLIB_UCLOCK_USE_WINMM)
6140 if (!h
->name
) h
->name
= "timeGetTime";
6141 d
= (double) (stop
->ticks
.t32
- start
->ticks
.t32
) / 1000.0;
6142 #elif (__ACCLIB_UCLOCK_USE_GETRUSAGE)
6144 if (!h
->name
) h
->name
= "getrusage";
6145 d
= stop
->ticks
.td
- start
->ticks
.td
;
6146 #elif (HAVE_GETTIMEOFDAY)
6148 if (!h
->name
) h
->name
= "gettimeofday";
6149 d
= stop
->ticks
.td
- start
->ticks
.td
;
6156 ACCLIB_PUBLIC(int, acc_uclock_flush_cpu_cache
) (acc_uclock_handle_p h
, unsigned flags
)
6159 #if (__ACCLIB_UCLOCK_USE_PERFCTR)
6160 return acc_perfctr_flush_cpu_cache(&h
->pch
, flags
);
6163 ACC_UNUSED(h
); ACC_UNUSED(flags
);
6166 #if defined(__ACCLIB_UCLOCK_NEED_WARN_POP)
6167 # if (ACC_CC_MSC && (_MSC_VER >= 1200))
6168 # pragma warning(pop)
6170 # error "__ACCLIB_UCLOCK_NEED_WARN_POP"
6172 # undef __ACCLIB_UCLOCK_NEED_WARN_POP
6175 #if defined(ACC_WANT_ACCLIB_MISC)
6176 # undef ACC_WANT_ACCLIB_MISC
6177 #define __ACCLIB_MISC_CH_INCLUDED 1
6178 #if !defined(ACCLIB_PUBLIC)
6179 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6181 #if !defined(ACCLIB_PUBLIC_NOINLINE)
6182 # if !defined(__acc_noinline)
6183 # define ACCLIB_PUBLIC_NOINLINE(r,f) r __ACCLIB_FUNCNAME(f)
6184 # elif (ACC_CC_GNUC >= 0x030400ul) || (ACC_CC_LLVM)
6185 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline __attribute__((__used__)) r __ACCLIB_FUNCNAME(f)
6187 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f)
6190 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
6192 # pragma warn(disable:2007)
6194 ACCLIB_PUBLIC(const char *, acc_getenv
) (const char *s
)
6196 #if defined(HAVE_GETENV)
6199 ACC_UNUSED(s
); return (const char *) 0;
6202 ACCLIB_PUBLIC(acclib_handle_t
, acc_get_osfhandle
) (int fd
)
6207 return get_osfhandle(fd
);
6208 #elif (ACC_OS_EMX && defined(__RSXNT__))
6210 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
6212 #elif (ACC_OS_WIN32 || ACC_OS_WIN64)
6213 # if (ACC_CC_PELLESC && (__POCC__ < 280))
6215 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
6217 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
6218 return _os_handle(fd
);
6220 return _get_osfhandle(fd
);
6226 ACCLIB_PUBLIC(int, acc_set_binmode
) (int fd
, int binary
)
6228 #if (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
6229 FILE* fp
; int old_binary
;
6230 if (fd
== STDIN_FILENO
) fp
= stdin
;
6231 else if (fd
== STDOUT_FILENO
) fp
= stdout
;
6232 else if (fd
== STDERR_FILENO
) fp
= stderr
;
6234 old_binary
= fp
->__mode
.__binary
;
6235 __set_binmode(fp
, binary
? 1 : 0);
6236 return old_binary
? 1 : 0;
6237 #elif (ACC_ARCH_M68K && ACC_OS_TOS)
6238 ACC_UNUSED(fd
); ACC_UNUSED(binary
);
6240 #elif (ACC_OS_DOS16 && (ACC_CC_AZTECC || ACC_CC_PACIFICC))
6241 ACC_UNUSED(fd
); ACC_UNUSED(binary
);
6243 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
6244 int r
; unsigned old_flags
= __djgpp_hwint_flags
;
6245 ACC_COMPILE_TIME_ASSERT(O_BINARY
> 0)
6246 ACC_COMPILE_TIME_ASSERT(O_TEXT
> 0)
6247 if (fd
< 0) return -1;
6248 r
= setmode(fd
, binary
? O_BINARY
: O_TEXT
);
6249 if ((old_flags
& 1u) != (__djgpp_hwint_flags
& 1u))
6250 __djgpp_set_ctrl_c(!(old_flags
& 1));
6251 if (r
== -1) return -1;
6252 return (r
& O_TEXT
) ? 0 : 1;
6253 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
6254 if (fd
< 0) return -1;
6257 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
6259 if (fd
== fileno(stdin
)) fp
= stdin
;
6260 else if (fd
== fileno(stdout
)) fp
= stdout
;
6261 else if (fd
== fileno(stderr
)) fp
= stderr
;
6263 r
= _setmode(fp
, binary
? _BINARY
: _TEXT
);
6264 if (r
== -1) return -1;
6265 return (r
& _BINARY
) ? 1 : 0;
6266 #elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
6267 ACC_UNUSED(fd
); ACC_UNUSED(binary
);
6269 #elif (ACC_OS_CYGWIN && (ACC_CC_GNUC < 0x025a00ul))
6270 ACC_UNUSED(fd
); ACC_UNUSED(binary
);
6272 #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)
6274 #if !defined(ACC_CC_ZORTECHC)
6275 ACC_COMPILE_TIME_ASSERT(O_BINARY
> 0)
6277 ACC_COMPILE_TIME_ASSERT(O_TEXT
> 0)
6278 if (fd
< 0) return -1;
6279 r
= setmode(fd
, binary
? O_BINARY
: O_TEXT
);
6280 if (r
== -1) return -1;
6281 return (r
& O_TEXT
) ? 0 : 1;
6283 if (fd
< 0) return -1;
6288 ACCLIB_PUBLIC(int, acc_isatty
) (int fd
)
6292 #if (ACC_OS_DOS16 && !defined(ACC_CC_AZTECC))
6295 ri
.x
.ax
= 0x4400; ri
.x
.bx
= fd
;
6296 int86(0x21, &ri
, &ro
);
6297 if ((ro
.x
.cflag
& 1) == 0)
6298 if ((ro
.x
.ax
& 0x83) != 0x83)
6301 #elif (ACC_OS_DOS32 && ACC_CC_WATCOMC)
6304 ri
.w
.ax
= 0x4400; ri
.w
.bx
= (unsigned short) fd
;
6305 int386(0x21, &ri
, &ro
);
6306 if ((ro
.w
.cflag
& 1) == 0)
6307 if ((ro
.w
.ax
& 0x83) != 0x83)
6310 #elif (ACC_HAVE_WINDOWS_H)
6312 acclib_handle_t h
= __ACCLIB_FUNCNAME(acc_get_osfhandle
)(fd
);
6313 if ((HANDLE
)h
!= INVALID_HANDLE_VALUE
)
6316 if (GetConsoleMode((HANDLE
)h
, &d
) == 0)
6321 #if defined(HAVE_ISATTY)
6322 return (isatty(fd
)) ? 1 : 0;
6327 ACCLIB_PUBLIC(int, acc_mkdir
) (const char* name
, unsigned mode
)
6329 #if !defined(HAVE_MKDIR)
6330 ACC_UNUSED(name
); ACC_UNUSED(mode
);
6332 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
6334 return Dcreate(name
);
6335 #elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
6336 return mkdir(name
, mode
);
6337 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
6338 return mkdir(name
, mode
);
6339 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
6341 # if (ACC_CC_HIGHC || ACC_CC_PACIFICC)
6342 return mkdir((char*) name
);
6347 return mkdir(name
, mode
);
6350 ACCLIB_PUBLIC(int, acc_rmdir
) (const char* name
)
6352 #if !defined(HAVE_RMDIR)
6355 #elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC))
6356 return rmdir((char *) name
);
6361 #if defined(acc_int32e_t)
6362 ACCLIB_PUBLIC(acc_int32e_t
, acc_muldiv32s
) (acc_int32e_t a
, acc_int32e_t b
, acc_int32e_t x
)
6365 if __acc_likely(x
!= 0)
6367 #if defined(acc_int64l_t)
6368 r
= (acc_int32e_t
) (((acc_int64l_t
) a
* b
) / x
);
6370 ACC_UNUSED(a
); ACC_UNUSED(b
);
6375 ACCLIB_PUBLIC(acc_uint32e_t
, acc_muldiv32u
) (acc_uint32e_t a
, acc_uint32e_t b
, acc_uint32e_t x
)
6377 acc_uint32e_t r
= 0;
6378 if __acc_likely(x
!= 0)
6380 #if defined(acc_int64l_t)
6381 r
= (acc_uint32e_t
) (((acc_uint64l_t
) a
* b
) / x
);
6383 ACC_UNUSED(a
); ACC_UNUSED(b
);
6390 ACCLIB_PUBLIC_NOINLINE(int, acc_syscall_clock_gettime
) (int c
)
6395 ACC_EXTERN_C
void __far __pascal
DebugBreak(void);
6397 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_break
) (void)
6401 #elif (ACC_ARCH_I086)
6402 #elif (ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H)
6404 #elif defined(ACC_CFG_NO_INLINE_ASM) && (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H)
6406 #elif (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6407 __asm__
__volatile__("int $3\n" : : : __ACC_ASM_CLOBBER
);
6408 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
6410 #elif (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H)
6413 * (volatile int *) 0x1 = -1;
6416 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_nop
) (void)
6419 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query
) (void)
6421 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6423 __asm__
__volatile__("pushf\n pop %0\n" : "=a" (r
) : : __ACC_ASM_CLOBBER
);
6424 return (int)(r
>> 18) & 1;
6425 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
6432 return (int)(r
>> 18) & 1;
6437 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_enable
) (int v
)
6440 #if (ACC_ARCH_AMD64) && (ACC_ASM_SYNTAX_GNUC)
6442 __asm__
__volatile__("pushf\n orl $262144,(%%rsp)\n popf\n" : : : __ACC_ASM_CLOBBER
);
6444 __asm__
__volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : : __ACC_ASM_CLOBBER
);
6447 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6449 __asm__
__volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER
);
6451 __asm__
__volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER
);
6454 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC)
6457 or dword ptr
[esp
],262144
6461 and dword ptr
[esp
],-262145
6468 ACC_UNUSED(v
); return r
;
6470 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_qemu
) (void)
6473 #if (ACC_OS_POSIX_LINUX || ACC_OS_WIN32 || ACC_OS_WIN64)
6475 p
= acc_getenv("ACC_ENV_RUNNING_ON_QEMU");
6477 if (p
[0] == 0) r
= 0;
6478 else if ((p
[0] >= '0' && p
[0] <= '9') && p
[1] == 0) r
= p
[0] - '0';
6484 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_valgrind
) (void)
6486 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC)
6487 volatile unsigned long args
[5] = { 0x1001, 0, 0, 0, 0 };
6488 unsigned long r
= 0;
6489 __asm__
__volatile__(".byte 0xc1,0xc0,0x1d,0xc1,0xc0,0x03,0xc1,0xc8,0x1b,0xc1,0xc8,0x05,0xc1,0xc0,0x0d,0xc1,0xc0,0x13\n" : "=d" (r
) : "a" (&args
[0]), "d" (r
) : __ACC_ASM_CLOBBER
);
6490 return (unsigned) r
;
6495 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290))
6499 #if defined(ACC_WANT_ACCLIB_WILDARGV)
6500 # undef ACC_WANT_ACCLIB_WILDARGV
6501 #define __ACCLIB_WILDARGV_CH_INCLUDED 1
6502 #if !defined(ACCLIB_PUBLIC)
6503 # define ACCLIB_PUBLIC(r,f) r __ACCLIB_FUNCNAME(f)
6505 #if (ACC_OS_DOS16 || ACC_OS216 || ACC_OS_WIN16)
6506 #if 0 && (ACC_CC_MSC)
6507 ACC_EXTERN_C
int __acc_cdecl
__setargv(void);
6508 ACC_EXTERN_C
int __acc_cdecl
_setargv(void);
6509 ACC_EXTERN_C
int __acc_cdecl
_setargv(void) { return __setargv(); }
6512 #if (ACC_OS_WIN32 || ACC_OS_WIN64)
6513 #if (ACC_CC_INTELC || ACC_CC_MSC)
6514 ACC_EXTERN_C
int __acc_cdecl
__setargv(void);
6515 ACC_EXTERN_C
int __acc_cdecl
_setargv(void);
6516 ACC_EXTERN_C
int __acc_cdecl
_setargv(void) { return __setargv(); }
6520 #define __ACCLIB_HAVE_ACC_WILDARGV 1
6521 ACCLIB_PUBLIC(void, acc_wildargv
) (int* argc
, char*** argv
)
6524 _response(argc
, argv
);
6525 _wildcard(argc
, argv
);
6529 #if (ACC_OS_CONSOLE_PSP) && defined(__PSPSDK_DEBUG__)
6530 #define __ACCLIB_HAVE_ACC_WILDARGV 1
6531 ACC_EXTERN_C
int acc_psp_init_module(int*, char***, int);
6532 ACCLIB_PUBLIC(void, acc_wildargv
) (int* argc
, char*** argv
)
6534 acc_psp_init_module(argc
, argv
, -1);
6537 #if !defined(__ACCLIB_HAVE_ACC_WILDARGV)
6538 #define __ACCLIB_HAVE_ACC_WILDARGV 1
6539 ACCLIB_PUBLIC(void, acc_wildargv
) (int* argc
, char*** argv
)
6541 #if 1 && (ACC_ARCH_I086PM)
6542 if (ACC_MM_AHSHIFT
!= 3) { exit(1); }
6543 #elif 1 && (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) && defined(__MINT__)
6545 if (isatty(1)) __set_binmode(stdout
, 0);
6546 if (isatty(2)) __set_binmode(stderr
, 0);
6548 ACC_UNUSED(argc
); ACC_UNUSED(argv
);
6553 /* vim:set ts=4 et: */