1 /* ACC --- Automatic Compiler Configuration 2 3 This file is part of the LZO real-time data compression library. 4 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 18 All Rights Reserved. 19 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. 24 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. 29 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. 34 35 Markus F.X.J. Oberhumer 36 <markus (at) oberhumer.com> 37 http://www.oberhumer.com/opensource/lzo/ 38 */ 39 40 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__ 46 #endif 47 #if defined(__IBMCPP__) && !defined(__IBMC__) 48 # define __IBMC__ __IBMCPP__ 49 #endif 50 #if defined(__ICL) && defined(_WIN32) && !defined(__INTEL_COMPILER) 51 # define __INTEL_COMPILER __ICL 52 #endif 53 #if 1 && defined(__INTERIX) && defined(__GNUC__) && !defined(_ALL_SOURCE) 54 # define _ALL_SOURCE 1 55 #endif 56 #if defined(__mips__) && defined(__R5900__) 57 # if !defined(__LONG_MAX__) 58 # define __LONG_MAX__ 9223372036854775807L 59 # endif 60 #endif 61 #if defined(__INTEL_COMPILER) && defined(__linux__) 62 # pragma warning(disable: 193) 63 #endif 64 #if defined(__KEIL__) && defined(__C166__) 65 # pragma warning disable = 322 66 #elif 0 && defined(__C251__) 67 # pragma warning disable = 322 68 #endif 69 #if defined(_MSC_VER) && !defined(__INTEL_COMPILER) && !defined(__MWERKS__) 70 # if (_MSC_VER >= 1300) 71 # pragma warning(disable: 4668) 72 # endif 73 #endif 74 #if defined(__POCC__) && defined(_WIN32) 75 # if (__POCC__ >= 400) 76 # pragma warn(disable: 2216) 77 # endif 78 #endif 79 #if 0 && defined(__WATCOMC__) 80 # if (__WATCOMC__ >= 1050) && (__WATCOMC__ < 1060) 81 # pragma warning 203 9 82 # endif 83 #endif 84 #if defined(__BORLANDC__) && defined(__MSDOS__) && !defined(__FLAT__) 85 # pragma option -h 86 #endif 87 #if defined(ACC_CFG_NO_CONFIG_HEADER) 88 #elif defined(ACC_CFG_CONFIG_HEADER) 89 # include ACC_CFG_CONFIG_HEADER 90 #else 91 #endif 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 96 #undef CHAR_BIT 97 #define CHAR_BIT 8 98 #ifndef MB_LEN_MAX 99 #define MB_LEN_MAX 1 100 #endif 101 #ifndef __SCHAR_MAX__ 102 #define __SCHAR_MAX__ 127 103 #endif 104 #ifndef __SHRT_MAX__ 105 #define __SHRT_MAX__ 32767 106 #endif 107 #ifndef __INT_MAX__ 108 #define __INT_MAX__ 2147483647 109 #endif 110 #ifndef __LONG_MAX__ 111 #if defined(__alpha__) || defined(_LP64) || defined(__MIPS_PSX2__) 112 #define __LONG_MAX__ 9223372036854775807L 113 #else 114 #define __LONG_MAX__ 2147483647L 115 #endif 116 #endif 117 #undef SCHAR_MIN 118 #undef SCHAR_MAX 119 #undef UCHAR_MAX 120 #define SCHAR_MIN (-1 - SCHAR_MAX) 121 #define SCHAR_MAX (__SCHAR_MAX__) 122 #define UCHAR_MAX (SCHAR_MAX * 2 + 1) 123 #undef SHRT_MIN 124 #undef SHRT_MAX 125 #undef USHRT_MAX 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) 130 #else 131 #define USHRT_MAX (SHRT_MAX * 2 + 1) 132 #endif 133 #undef INT_MIN 134 #undef INT_MAX 135 #undef UINT_MAX 136 #define INT_MIN (-1 - INT_MAX) 137 #define INT_MAX (__INT_MAX__) 138 #define UINT_MAX (INT_MAX * 2U + 1U) 139 #undef LONG_MIN 140 #undef LONG_MAX 141 #undef ULONG_MAX 142 #define LONG_MIN (-1L - LONG_MAX) 143 #define LONG_MAX ((__LONG_MAX__) + 0L) 144 #define ULONG_MAX (LONG_MAX * 2UL + 1UL) 145 #undef CHAR_MIN 146 #undef CHAR_MAX 147 #if defined(__CHAR_UNSIGNED__) || defined(_CHAR_UNSIGNED) 148 #define CHAR_MIN 0 149 #define CHAR_MAX UCHAR_MAX 150 #else 151 #define CHAR_MIN SCHAR_MIN 152 #define CHAR_MAX SCHAR_MAX 153 #endif 154 #endif 155 #else 156 # include <limits.h> 157 #endif 158 #if 0 159 #define ACC_0xffffL 0xfffful 160 #define ACC_0xffffffffL 0xfffffffful 161 #else 162 #define ACC_0xffffL 65535ul 163 #define ACC_0xffffffffL 4294967295ul 164 #endif 165 #if (ACC_0xffffL == ACC_0xffffffffL) 166 # error "your preprocessor is broken 1" 167 #endif 168 #if (16ul * 16384ul != 262144ul) 169 # error "your preprocessor is broken 2" 170 #endif 171 #if 0 172 #if (32767 >= 4294967295ul) 173 # error "your preprocessor is broken 3" 174 #endif 175 #if (65535u >= 4294967295ul) 176 # error "your preprocessor is broken 4" 177 #endif 178 #endif 179 #if (UINT_MAX == ACC_0xffffL) 180 #if defined(__ZTC__) && defined(__I86__) && !defined(__OS2__) 181 # if !defined(MSDOS) 182 # define MSDOS 1 183 # endif 184 # if !defined(_MSDOS) 185 # define _MSDOS 1 186 # endif 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 191 # endif 192 # if !defined(__DOS__) 193 # define __DOS__ 1 194 # endif 195 # endif 196 #endif 197 #endif 198 #if defined(_MSC_VER) && defined(M_I86HM) && (UINT_MAX == ACC_0xffffL) 199 # define ptrdiff_t long 200 # define _PTRDIFF_T_DEFINED 201 #endif 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 212 # endif 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) 218 # if !defined(__far) 219 # define __far far 220 # endif 221 # if !defined(__near) 222 # define __near near 223 # endif 224 # endif 225 # if defined(__ACC_RENAME_A) 226 # if !defined(__cdecl) 227 # define __cdecl cdecl 228 # endif 229 # if !defined(__far) 230 # define __far far 231 # endif 232 # if !defined(__huge) 233 # define __huge huge 234 # endif 235 # if !defined(__near) 236 # define __near near 237 # endif 238 # if !defined(__pascal) 239 # define __pascal pascal 240 # endif 241 # if !defined(__huge) 242 # define __huge huge 243 # endif 244 # elif defined(__ACC_RENAME_B) 245 # if !defined(__cdecl) 246 # define __cdecl _cdecl 247 # endif 248 # if !defined(__far) 249 # define __far _far 250 # endif 251 # if !defined(__huge) 252 # define __huge _huge 253 # endif 254 # if !defined(__near) 255 # define __near _near 256 # endif 257 # if !defined(__pascal) 258 # define __pascal _pascal 259 # endif 260 # elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) 261 # if !defined(__cdecl) 262 # define __cdecl cdecl 263 # endif 264 # if !defined(__pascal) 265 # define __pascal pascal 266 # endif 267 # endif 268 # undef __ACC_RENAME_A 269 # undef __ACC_RENAME_B 270 #endif 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 277 # endif 278 # if (_MSC_VER < 700) 279 # define ACC_BROKEN_INTEGRAL_PROMOTION 1 280 # define ACC_BROKEN_SIZEOF 1 281 # endif 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 289 # endif 290 # if (__TURBOC__ < 0x0200) 291 # define ACC_BROKEN_SIZEOF 1 292 # endif 293 # if (__TURBOC__ < 0x0400) && defined(__cplusplus) 294 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1 295 # endif 296 #elif (defined(__PUREC__) || defined(__TURBOC__)) && defined(__TOS__) 297 # define ACC_BROKEN_CDECL_ALT_SYNTAX 1 298 # define ACC_BROKEN_SIZEOF 1 299 #endif 300 #endif 301 #if defined(__WATCOMC__) && (__WATCOMC__ < 900) 302 # define ACC_BROKEN_INTEGRAL_CONSTANTS 1 303 #endif 304 #if defined(_CRAY) && defined(_CRAY1) 305 # define ACC_BROKEN_SIGNED_RIGHT_SHIFT 1 306 #endif 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) 317 #if 1 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) 328 #endif 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 333 # endif 334 # if !defined(__STDC_LIMIT_MACROS) 335 # define __STDC_LIMIT_MACROS 1 336 # endif 337 #endif 338 #if defined(__cplusplus) 339 # define ACC_EXTERN_C extern "C" 340 #else 341 # define ACC_EXTERN_C extern 342 #endif 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" 385 # else 386 # error "check your limits.h header" 387 # endif 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" 404 # else 405 # error "check your limits.h header" 406 # endif 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" 414 # else 415 # error "check your limits.h header" 416 # endif 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" 427 # else 428 # error "please specify a target using the -bt compiler option" 429 # endif 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" 439 #elif defined(__VMS) 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" 452 #else 453 # define ACC_OS_POSIX 1 454 # define ACC_INFO_OS "posix" 455 #endif 456 #if (ACC_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" 494 # else 495 # define ACC_OS_POSIX_SUNOS 1 496 # define ACC_INFO_OS_POSIX "sunos" 497 # endif 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" 504 # else 505 # define ACC_OS_POSIX_UNKNOWN 1 506 # define ACC_INFO_OS_POSIX "unknown" 507 # endif 508 #endif 509 #endif 510 #if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16) 511 # if (UINT_MAX != ACC_0xffffL) 512 # error "this should not happen" 513 # endif 514 # if (ULONG_MAX != ACC_0xffffffffL) 515 # error "this should not happen" 516 # endif 517 #endif 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" 521 # endif 522 # if (ULONG_MAX != ACC_0xffffffffL) 523 # error "this should not happen" 524 # endif 525 #endif 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__) 531 # else 532 # define ACC_INFO_CCVER "unknown" 533 # endif 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 548 # else 549 # define ACC_CC_SYNTAX_GNUC 1 550 # endif 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__) 558 # else 559 # define ACC_CC_LLVM (__GNUC__ * 0x10000L + __GNUC_MINOR__ * 0x100) 560 # endif 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) 568 # else 569 # define ACC_CC_GNUC (__GNUC__ * 0x10000L) 570 # endif 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__) 606 # else 607 # define ACC_INFO_CCVER "unknown" 608 # endif 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__) 626 # else 627 # define ACC_INFO_CCVER "unknown" 628 # endif 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) 634 # else 635 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(_MSC_VER) 636 # endif 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) 666 # else 667 # define ACC_CC_SUNPROC 1 668 # define ACC_INFO_CCVER "unknown" 669 # endif 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) 675 # else 676 # define ACC_CC_SUNPROC 1 677 # define ACC_INFO_CCVER "unknown" 678 # endif 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" 700 # else 701 # define ACC_INFO_CCVER ACC_PP_MACRO_EXPAND(__ZTC__) 702 # endif 703 #else 704 # define ACC_CC_UNKNOWN 1 705 # define ACC_INFO_CC "unknown" 706 # define ACC_INFO_CCVER "unknown" 707 #endif 708 #if 0 && (ACC_CC_MSC && (_MSC_VER >= 1200)) && !defined(_MSC_FULL_VER) 709 # error "ACC_CC_MSC: _MSC_FULL_VER is not defined" 710 #endif 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 717 # endif 718 # endif 719 #endif 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" 747 # else 748 # define ACC_INFO_ARCH "arm" 749 # endif 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" 841 # elif (_ADDR64) 842 # define ACC_ARCH_CRAY_T90 1 843 # define ACC_INFO_ARCH "cray_t90" 844 # elif (_ADDR32) 845 # define ACC_ARCH_CRAY_YMP 1 846 # define ACC_INFO_ARCH "cray_ymp" 847 # else 848 # define ACC_ARCH_CRAY_XMP 1 849 # define ACC_INFO_ARCH "cray_xmp" 850 # endif 851 #else 852 # define ACC_ARCH_UNKNOWN 1 853 # define ACC_INFO_ARCH "unknown" 854 #endif 855 #endif 856 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_DOS32 || ACC_OS_OS2) 857 # error "FIXME - missing define for CPU architecture" 858 #endif 859 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN32) 860 # error "FIXME - missing WIN32 define for CPU architecture" 861 #endif 862 #if 1 && (ACC_ARCH_UNKNOWN) && (ACC_OS_WIN64) 863 # error "FIXME - missing WIN64 define for CPU architecture" 864 #endif 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 877 #endif 878 #if defined(ACC_ARCH_ARM_THUMB) && !defined(ACC_ARCH_ARM) 879 # error "this should not happen" 880 #endif 881 #if defined(ACC_ARCH_I086PM) && !defined(ACC_ARCH_I086) 882 # error "this should not happen" 883 #endif 884 #if (ACC_ARCH_I086) 885 # if (UINT_MAX != ACC_0xffffL) 886 # error "this should not happen" 887 # endif 888 # if (ULONG_MAX != ACC_0xffffffffL) 889 # error "this should not happen" 890 # endif 891 #endif 892 #if (ACC_ARCH_I386) 893 # if (UINT_MAX != ACC_0xffffL) && defined(__i386_int16__) 894 # error "this should not happen" 895 # endif 896 # if (UINT_MAX != ACC_0xffffffffL) && !defined(__i386_int16__) 897 # error "this should not happen" 898 # endif 899 # if (ULONG_MAX != ACC_0xffffffffL) 900 # error "this should not happen" 901 # endif 902 #endif 903 #if !defined(__ACC_MM_OVERRIDE) 904 #if (ACC_ARCH_I086) 905 #if (UINT_MAX != ACC_0xffffL) 906 # error "this should not happen" 907 #endif 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 927 # else 928 # define ACC_MM_SMALL 1 929 # endif 930 #elif (ACC_CC_ZORTECHC && defined(__VCM__)) 931 # define ACC_MM_LARGE 1 932 #else 933 # error "unknown memory model" 934 #endif 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 938 #if (ACC_MM_TINY) 939 # undef ACC_HAVE_MM_HUGE_ARRAY 940 #endif 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 950 # endif 951 #elif (ACC_CC_TURBOC && (__TURBOC__ < 0x0295)) 952 # undef ACC_HAVE_MM_HUGE_ARRAY 953 #endif 954 #if (ACC_ARCH_I086PM) && !defined(ACC_HAVE_MM_HUGE_PTR) 955 # if (ACC_OS_DOS16) 956 # error "this should not happen" 957 # elif (ACC_CC_ZORTECHC) 958 # else 959 # error "this should not happen" 960 # endif 961 #endif 962 #ifdef __cplusplus 963 extern "C" { 964 #endif 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) 982 #else 983 # error "FIXME - implement ACC_MM_AHSHIFT" 984 #endif 985 #ifdef __cplusplus 986 } 987 #endif 988 #endif 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 1004 #else 1005 # error "FIXME - C166 __MODEL__" 1006 #endif 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 1020 #else 1021 # error "FIXME - MCS251 __MODEL__" 1022 #endif 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 1036 #else 1037 # error "FIXME - MCS51 __MODEL__" 1038 #endif 1039 #elif (ACC_ARCH_CRAY_PVP) 1040 # define ACC_MM_PVP 1 1041 #else 1042 # define ACC_MM_FLAT 1 1043 #endif 1044 #if (ACC_MM_COMPACT) 1045 # define ACC_INFO_MM "compact" 1046 #elif (ACC_MM_FLAT) 1047 # define ACC_INFO_MM "flat" 1048 #elif (ACC_MM_HUGE) 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" 1054 #elif (ACC_MM_PVP) 1055 # define ACC_INFO_MM "pvp" 1056 #elif (ACC_MM_SMALL) 1057 # define ACC_INFO_MM "small" 1058 #elif (ACC_MM_TINY) 1059 # define ACC_INFO_MM "tiny" 1060 #else 1061 # error "unknown memory model" 1062 #endif 1063 #endif 1064 #if defined(SIZEOF_SHORT) 1065 # define ACC_SIZEOF_SHORT (SIZEOF_SHORT) 1066 #endif 1067 #if defined(SIZEOF_INT) 1068 # define ACC_SIZEOF_INT (SIZEOF_INT) 1069 #endif 1070 #if defined(SIZEOF_LONG) 1071 # define ACC_SIZEOF_LONG (SIZEOF_LONG) 1072 #endif 1073 #if defined(SIZEOF_LONG_LONG) 1074 # define ACC_SIZEOF_LONG_LONG (SIZEOF_LONG_LONG) 1075 #endif 1076 #if defined(SIZEOF___INT16) 1077 # define ACC_SIZEOF___INT16 (SIZEOF___INT16) 1078 #endif 1079 #if defined(SIZEOF___INT32) 1080 # define ACC_SIZEOF___INT32 (SIZEOF___INT32) 1081 #endif 1082 #if defined(SIZEOF___INT64) 1083 # define ACC_SIZEOF___INT64 (SIZEOF___INT64) 1084 #endif 1085 #if defined(SIZEOF_VOID_P) 1086 # define ACC_SIZEOF_VOID_P (SIZEOF_VOID_P) 1087 #endif 1088 #if defined(SIZEOF_SIZE_T) 1089 # define ACC_SIZEOF_SIZE_T (SIZEOF_SIZE_T) 1090 #endif 1091 #if defined(SIZEOF_PTRDIFF_T) 1092 # define ACC_SIZEOF_PTRDIFF_T (SIZEOF_PTRDIFF_T) 1093 #endif 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 1110 # else 1111 # error "ACC_SIZEOF_SHORT" 1112 # endif 1113 #endif 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 1131 # else 1132 # error "ACC_SIZEOF_INT" 1133 # endif 1134 #endif 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 1148 # else 1149 # error "ACC_SIZEOF_LONG" 1150 # endif 1151 #endif 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 1160 # endif 1161 # endif 1162 # endif 1163 #endif 1164 #endif 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 1201 #endif 1202 #endif 1203 #endif 1204 #if defined(__cplusplus) && defined(ACC_CC_GNUC) 1205 # if (ACC_CC_GNUC < 0x020800ul) 1206 # undef ACC_SIZEOF_LONG_LONG 1207 # endif 1208 #endif 1209 #if defined(ACC_CFG_NO_LONG_LONG) || defined(__NO_LONG_LONG) 1210 # undef ACC_SIZEOF_LONG_LONG 1211 #endif 1212 #if !defined(ACC_SIZEOF_VOID_P) 1213 #if (ACC_ARCH_I086) 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 1219 # else 1220 # error "ACC_MM" 1221 # endif 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 1234 # else 1235 # define __ACC_WORDSIZE 2 1236 # define ACC_SIZEOF_VOID_P 2 1237 # endif 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 1241 # endif 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 1246 # else 1247 # define ACC_SIZEOF_VOID_P 2 1248 # endif 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) 1269 # if 0 1270 # define __ACC_WORDSIZE 16 1271 # endif 1272 # define ACC_SIZEOF_VOID_P 4 1273 #else 1274 # define ACC_SIZEOF_VOID_P ACC_SIZEOF_LONG 1275 #endif 1276 #endif 1277 #if !defined(ACC_WORDSIZE) 1278 # if defined(__ACC_WORDSIZE) 1279 # define ACC_WORDSIZE __ACC_WORDSIZE 1280 # else 1281 # define ACC_WORDSIZE ACC_SIZEOF_VOID_P 1282 # endif 1283 #endif 1284 #if !defined(ACC_SIZEOF_SIZE_T) 1285 #if (ACC_ARCH_I086 || ACC_ARCH_M16C) 1286 # define ACC_SIZEOF_SIZE_T 2 1287 #else 1288 # define ACC_SIZEOF_SIZE_T ACC_SIZEOF_VOID_P 1289 #endif 1290 #endif 1291 #if !defined(ACC_SIZEOF_PTRDIFF_T) 1292 #if (ACC_ARCH_I086) 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 1298 # else 1299 # define ACC_SIZEOF_PTRDIFF_T 2 1300 # endif 1301 # else 1302 # error "ACC_MM" 1303 # endif 1304 #else 1305 # define ACC_SIZEOF_PTRDIFF_T ACC_SIZEOF_SIZE_T 1306 #endif 1307 #endif 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 1321 # else 1322 # define ACC_ABI_BIG_ENDIAN 1 1323 # endif 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 1336 #endif 1337 #endif 1338 #if defined(ACC_ABI_BIG_ENDIAN) && defined(ACC_ABI_LITTLE_ENDIAN) 1339 # error "this should not happen" 1340 #endif 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" 1347 #endif 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" 1369 #endif 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__) 1390 # else 1391 # define ACC_LIBC_UCLIBC 0x00090bL 1392 # endif 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" 1403 #else 1404 # define ACC_LIBC_DEFAULT 1 1405 # define ACC_INFO_LIBC "default" 1406 #endif 1407 #endif 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__ 1413 #else 1414 # define __acc_gnuc_extension__ 1415 #endif 1416 #endif 1417 #if !defined(__acc_ua_volatile) 1418 # define __acc_ua_volatile volatile 1419 #endif 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) 1427 #endif 1428 #endif 1429 #if defined(__acc_alignof) 1430 # define __acc_HAVE_alignof 1 1431 #endif 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__)) 1439 #endif 1440 #endif 1441 #if defined(__acc_constructor) 1442 # define __acc_HAVE_constructor 1 1443 #endif 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__)) 1451 #endif 1452 #endif 1453 #if defined(__acc_destructor) 1454 # define __acc_HAVE_destructor 1 1455 #endif 1456 #if defined(__acc_HAVE_destructor) && !defined(__acc_HAVE_constructor) 1457 # error "this should not happen" 1458 #endif 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__ 1467 #elif (ACC_CC_DMC) 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 1477 #endif 1478 #endif 1479 #if defined(__acc_inline) 1480 # define __acc_HAVE_inline 1 1481 #else 1482 # define __acc_inline 1483 #endif 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 1495 #endif 1496 #endif 1497 #if defined(__acc_forceinline) 1498 # define __acc_HAVE_forceinline 1 1499 #else 1500 # define __acc_forceinline 1501 #endif 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) 1517 # else 1518 # define __acc_noinline __declspec(noinline) 1519 # endif 1520 #endif 1521 #endif 1522 #if defined(__acc_noinline) 1523 # define __acc_HAVE_noinline 1 1524 #else 1525 # define __acc_noinline 1526 #endif 1527 #if (defined(__acc_HAVE_forceinline) || defined(__acc_HAVE_noinline)) && !defined(__acc_HAVE_inline) 1528 # error "this should not happen" 1529 #endif 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) 1541 #endif 1542 #endif 1543 #if defined(__acc_noreturn) 1544 # define __acc_HAVE_noreturn 1 1545 #else 1546 # define __acc_noreturn 1547 #endif 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) 1559 #endif 1560 #endif 1561 #if defined(__acc_nothrow) 1562 # define __acc_HAVE_nothrow 1 1563 #else 1564 # define __acc_nothrow 1565 #endif 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__ 1571 #elif (ACC_CC_LLVM) 1572 # define __acc_restrict __restrict__ 1573 #elif (ACC_CC_MSC && (_MSC_VER >= 1400)) 1574 # define __acc_restrict __restrict 1575 #endif 1576 #endif 1577 #if defined(__acc_restrict) 1578 # define __acc_HAVE_restrict 1 1579 #else 1580 # define __acc_restrict 1581 #endif 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)) 1592 #endif 1593 #endif 1594 #if defined(__acc_likely) 1595 # define __acc_HAVE_likely 1 1596 #else 1597 # define __acc_likely(e) (e) 1598 #endif 1599 #if defined(__acc_unlikely) 1600 # define __acc_HAVE_unlikely 1 1601 #else 1602 # define __acc_unlikely(e) (e) 1603 #endif 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) 1619 # else 1620 # define ACC_UNUSED(var) ((void) &var) 1621 # endif 1622 #endif 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 1632 # elif (ACC_CC_MSC) 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)];} 1636 # else 1637 # define ACC_UNUSED_FUNC(func) ((void) func) 1638 # endif 1639 #endif 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 1645 # else 1646 # define ACC_UNUSED_LABEL(l) switch(0) case 1:goto l 1647 # endif 1648 #endif 1649 #if !defined(ACC_DEFINE_UNINITIALIZED_VAR) 1650 # if 0 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 1654 # else 1655 # define ACC_DEFINE_UNINITIALIZED_VAR(type,var,init) type var = init 1656 # endif 1657 #endif 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)]; 1665 # else 1666 # define ACC_COMPILE_TIME_ASSERT_HEADER(e) extern int __acc_cta[1-2*!(e)]; 1667 # endif 1668 #endif 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; 1678 # else 1679 # define ACC_COMPILE_TIME_ASSERT(e) {typedef int __acc_cta_t[1-2*!(e)];} 1680 # endif 1681 #endif 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 1692 # else 1693 # define __acc_cdecl_qsort __cdecl 1694 # endif 1695 # elif (ACC_CC_WATCOMC) 1696 # define __acc_cdecl __cdecl 1697 # else 1698 # define __acc_cdecl __cdecl 1699 # define __acc_cdecl_atexit __cdecl 1700 # define __acc_cdecl_main __cdecl 1701 # define __acc_cdecl_qsort __cdecl 1702 # endif 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)) 1711 # if defined(_DLL) 1712 # define __acc_cdecl_sighandler _far _cdecl _loadds 1713 # elif defined(_MT) 1714 # define __acc_cdecl_sighandler _far _cdecl 1715 # else 1716 # define __acc_cdecl_sighandler _cdecl 1717 # endif 1718 # else 1719 # define __acc_cdecl_sighandler __cdecl 1720 # endif 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 1725 #endif 1726 #if !defined(__acc_cdecl) 1727 # define __acc_cdecl 1728 #endif 1729 #if !defined(__acc_cdecl_atexit) 1730 # define __acc_cdecl_atexit 1731 #endif 1732 #if !defined(__acc_cdecl_main) 1733 # define __acc_cdecl_main 1734 #endif 1735 #if !defined(__acc_cdecl_qsort) 1736 # define __acc_cdecl_qsort 1737 #endif 1738 #if !defined(__acc_cdecl_sighandler) 1739 # define __acc_cdecl_sighandler 1740 #endif 1741 #if !defined(__acc_cdecl_va) 1742 # define __acc_cdecl_va __acc_cdecl 1743 #endif 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))) 1749 # else 1750 # define ACC_HAVE_WINDOWS_H 1 1751 # endif 1752 #endif 1753 #endif 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 1784 # endif 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 1793 # endif 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 1799 # endif 1800 #elif (ACC_ARCH_SH) 1801 # define ACC_OPT_PREFER_POSTINC 1 1802 # define ACC_OPT_PREFER_PREDEC 1 1803 #endif 1804 #if !defined(ACC_CFG_NO_INLINE_ASM) 1805 #if defined(ACC_CC_LLVM) 1806 # define ACC_CFG_NO_INLINE_ASM 1 1807 #endif 1808 #endif 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 1812 #endif 1813 #endif 1814 #if defined(ACC_CFG_NO_UNALIGNED) 1815 # undef ACC_OPT_UNALIGNED16 1816 # undef ACC_OPT_UNALIGNED32 1817 # undef ACC_OPT_UNALIGNED64 1818 #endif 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 1827 #endif 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" 1833 #else 1834 # define __ACC_ASM_CLOBBER "cc", "memory" 1835 #endif 1836 #endif 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 1842 #else 1843 # define __ACC_INFOSTR_MM "" 1844 #endif 1845 #if defined(__ACC_INFOSTR_PM) 1846 #elif defined(ACC_INFO_ABI_PM) 1847 # define __ACC_INFOSTR_PM "." ACC_INFO_ABI_PM 1848 #else 1849 # define __ACC_INFOSTR_PM "" 1850 #endif 1851 #if defined(__ACC_INFOSTR_ENDIAN) 1852 #elif defined(ACC_INFO_ABI_ENDIAN) 1853 # define __ACC_INFOSTR_ENDIAN "." ACC_INFO_ABI_ENDIAN 1854 #else 1855 # define __ACC_INFOSTR_ENDIAN "" 1856 #endif 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 1862 #else 1863 # define __ACC_INFOSTR_OSNAME ACC_INFO_OS 1864 #endif 1865 #if defined(__ACC_INFOSTR_LIBC) 1866 #elif defined(ACC_INFO_LIBC) 1867 # define __ACC_INFOSTR_LIBC "." ACC_INFO_LIBC 1868 #else 1869 # define __ACC_INFOSTR_LIBC "" 1870 #endif 1871 #if defined(__ACC_INFOSTR_CCVER) 1872 #elif defined(ACC_INFO_CCVER) 1873 # define __ACC_INFOSTR_CCVER " " ACC_INFO_CCVER 1874 #else 1875 # define __ACC_INFOSTR_CCVER "" 1876 #endif 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) 1882 #else 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 1896 #else 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 1920 #if (ACC_OS_POSIX) 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 1933 # endif 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 1939 # endif 1940 # if (ACC_LIBC_NEWLIB) 1941 # undef HAVE_STRINGS_H 1942 # endif 1943 #elif (ACC_OS_CYGWIN) 1944 # define HAVE_IO_H 1 1945 #elif (ACC_OS_EMX) 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 1951 # endif 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 1962 #endif 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 1967 #define HAVE_IO_H 1 1968 #define HAVE_SHARE_H 1 1969 #if (ACC_CC_AZTECC) 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 1985 # endif 1986 # if (__BORLANDC__ < 0x0400) 1987 # undef HAVE_DIRENT_H 1988 # undef HAVE_UTIME_H 1989 # endif 1990 #elif (ACC_CC_DMC) 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) 2000 # undef HAVE_DOS_H 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 2014 # undef HAVE_DOS_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 2022 # undef HAVE_DOS_H 2023 # undef HAVE_SHARE_H 2024 # undef HAVE_SYS_TIME_H 2025 #elif (ACC_CC_NDPC) 2026 # undef HAVE_DIRENT_H 2027 # undef HAVE_DOS_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 2035 # undef HAVE_IO_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 2046 # undef HAVE_DOS_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) 2053 # else 2054 # define HAVE_SYS_UTIME_H 1 2055 # endif 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 2066 # endif 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 2080 # endif 2081 # if (__TURBOC__ < 0x0200) 2082 # undef HAVE_SIGNAL_H 2083 # endif 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 2090 # endif 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 2098 # endif 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 2105 #endif 2106 #endif 2107 #if (ACC_OS_CONSOLE) 2108 # undef HAVE_DIRENT_H 2109 #endif 2110 #if (ACC_OS_EMBEDDED) 2111 # undef HAVE_DIRENT_H 2112 #endif 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 2122 #endif 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 2133 #endif 2134 #if (HAVE_SYS_TIME_H && HAVE_TIME_H) 2135 # define TIME_WITH_SYS_TIME 1 2136 #endif 2137 #endif 2138 #endif 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 2149 #else 2150 #define HAVE_ACCESS 1 2151 #define HAVE_ALLOCA 1 2152 #define HAVE_ATEXIT 1 2153 #define HAVE_ATOI 1 2154 #define HAVE_ATOL 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 2180 #define HAVE_STAT 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 2187 #define HAVE_TIME 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 2197 #else 2198 # define HAVE_STRICMP 1 2199 # define HAVE_STRNICMP 1 2200 #endif 2201 #if (ACC_OS_POSIX) 2202 # if (ACC_OS_POSIX_AIX) 2203 # define HAVE_GETRUSAGE 1 2204 # elif (ACC_OS_POSIX_MACOSX && ACC_LIBC_MSL) 2205 # undef HAVE_CHOWN 2206 # undef HAVE_LSTAT 2207 # elif (ACC_OS_POSIX_UNICOS) 2208 # undef HAVE_ALLOCA 2209 # undef HAVE_SNPRINTF 2210 # undef HAVE_VSNPRINTF 2211 # endif 2212 # if (ACC_CC_TINYC) 2213 # undef HAVE_ALLOCA 2214 # endif 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 2221 # endif 2222 #elif (ACC_OS_CYGWIN) 2223 # if (ACC_CC_GNUC < 0x025a00ul) 2224 # undef HAVE_GETTIMEOFDAY 2225 # undef HAVE_LSTAT 2226 # endif 2227 # if (ACC_CC_GNUC < 0x025f00ul) 2228 # undef HAVE_SNPRINTF 2229 # undef HAVE_VSNPRINTF 2230 # endif 2231 #elif (ACC_OS_EMX) 2232 # undef HAVE_CHOWN 2233 # undef HAVE_LSTAT 2234 #elif (ACC_ARCH_M68K && ACC_OS_TOS && ACC_CC_GNUC) 2235 # if !defined(__MINT__) 2236 # undef HAVE_SNPRINTF 2237 # undef HAVE_VSNPRINTF 2238 # endif 2239 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC)) 2240 # undef HAVE_ALLOCA 2241 # undef HAVE_ACCESS 2242 # undef HAVE_CHMOD 2243 # undef HAVE_CHOWN 2244 # undef HAVE_FSTAT 2245 # undef HAVE_GETTIMEOFDAY 2246 # undef HAVE_LSTAT 2247 # undef HAVE_SNPRINTF 2248 # undef HAVE_UMASK 2249 # undef HAVE_UTIME 2250 # undef HAVE_VSNPRINTF 2251 #endif 2252 #if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64) 2253 #undef HAVE_CHOWN 2254 #undef HAVE_GETTIMEOFDAY 2255 #undef HAVE_LSTAT 2256 #undef HAVE_UMASK 2257 #if (ACC_CC_AZTECC) 2258 # undef HAVE_ALLOCA 2259 # undef HAVE_DIFFTIME 2260 # undef HAVE_FSTAT 2261 # undef HAVE_STRDUP 2262 # undef HAVE_SNPRINTF 2263 # undef HAVE_UTIME 2264 # undef HAVE_VSNPRINTF 2265 #elif (ACC_CC_BORLANDC) 2266 # if (__BORLANDC__ < 0x0400) 2267 # undef HAVE_ALLOCA 2268 # undef HAVE_UTIME 2269 # endif 2270 # if ((__BORLANDC__ < 0x0410) && ACC_OS_WIN16) 2271 # undef HAVE_ALLOCA 2272 # endif 2273 # if (__BORLANDC__ < 0x0550) 2274 # undef HAVE_SNPRINTF 2275 # undef HAVE_VSNPRINTF 2276 # endif 2277 #elif (ACC_CC_DMC) 2278 # if (ACC_OS_WIN16) 2279 # undef HAVE_ALLOCA 2280 # endif 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 2289 #elif (ACC_CC_IBMC) 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 2297 #elif (ACC_CC_MSC) 2298 # if (_MSC_VER < 600) 2299 # undef HAVE_STRFTIME 2300 # endif 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 2307 # endif 2308 # if ((_MSC_VER < 800) && ACC_OS_WIN16) 2309 # undef HAVE_ALLOCA 2310 # endif 2311 # if (ACC_ARCH_I086) && defined(__cplusplus) 2312 # undef HAVE_LONGJMP 2313 # undef HAVE_SETJMP 2314 # endif 2315 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__) 2316 # if (ACC_CC_GNUC < 0x025f00ul) 2317 # undef HAVE_SNPRINTF 2318 # undef HAVE_VSNPRINTF 2319 # else 2320 # define snprintf _snprintf 2321 # define vsnprintf _vsnprintf 2322 # endif 2323 #elif (ACC_OS_WIN32 && ACC_LIBC_MSL) 2324 # if (__MSL__ < 0x8000ul) 2325 # undef HAVE_CHMOD 2326 # endif 2327 #elif (ACC_CC_NDPC) 2328 # undef HAVE_ALLOCA 2329 # undef HAVE_SNPRINTF 2330 # undef HAVE_STRNICMP 2331 # undef HAVE_UTIME 2332 # undef HAVE_VSNPRINTF 2333 # if defined(__cplusplus) 2334 # undef HAVE_STAT 2335 # endif 2336 #elif (ACC_CC_PACIFICC) 2337 # undef HAVE_ACCESS 2338 # undef HAVE_ALLOCA 2339 # undef HAVE_CHMOD 2340 # undef HAVE_DIFFTIME 2341 # undef HAVE_FSTAT 2342 # undef HAVE_MKTIME 2343 # undef HAVE_RAISE 2344 # undef HAVE_SNPRINTF 2345 # undef HAVE_STRFTIME 2346 # undef HAVE_UTIME 2347 # undef HAVE_VSNPRINTF 2348 #elif (ACC_OS_WIN32 && ACC_CC_PELLESC) 2349 # if (__POCC__ < 280) 2350 # define alloca _alloca 2351 # undef HAVE_UTIME 2352 # endif 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)) 2361 # undef HAVE_ALLOCA 2362 # endif 2363 # if (__SC__ < 0x600) 2364 # undef HAVE_SNPRINTF 2365 # undef HAVE_VSNPRINTF 2366 # else 2367 # define snprintf _snprintf 2368 # define vsnprintf _vsnprintf 2369 # endif 2370 # if (__SC__ < 0x700) 2371 # undef HAVE_DIFFTIME 2372 # undef HAVE_UTIME 2373 # endif 2374 #elif (ACC_CC_TOPSPEEDC) 2375 # undef HAVE_SNPRINTF 2376 # undef HAVE_VSNPRINTF 2377 #elif (ACC_CC_TURBOC) 2378 # undef HAVE_ALLOCA 2379 # undef HAVE_SNPRINTF 2380 # undef HAVE_VSNPRINTF 2381 # if (__TURBOC__ < 0x0200) 2382 # undef HAVE_RAISE 2383 # undef HAVE_SIGNAL 2384 # endif 2385 # if (__TURBOC__ < 0x0295) 2386 # undef HAVE_MKTIME 2387 # undef HAVE_STRFTIME 2388 # endif 2389 # if (__TURBOC__ < 0x0400) 2390 # undef HAVE_UTIME 2391 # endif 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 2399 # endif 2400 #elif (ACC_CC_ZORTECHC) 2401 # if (ACC_OS_WIN16 && (ACC_MM_MEDIUM || ACC_MM_LARGE || ACC_MM_HUGE)) 2402 # undef HAVE_ALLOCA 2403 # endif 2404 # undef HAVE_DIFFTIME 2405 # undef HAVE_SNPRINTF 2406 # undef HAVE_UTIME 2407 # undef HAVE_VSNPRINTF 2408 #endif 2409 #endif 2410 #if (ACC_OS_CONSOLE) 2411 # undef HAVE_ACCESS 2412 # undef HAVE_CHMOD 2413 # undef HAVE_CHOWN 2414 # undef HAVE_GETTIMEOFDAY 2415 # undef HAVE_LSTAT 2416 # undef HAVE_TIME 2417 # undef HAVE_UMASK 2418 # undef HAVE_UTIME 2419 #endif 2420 #if (ACC_LIBC_ISOC90 || ACC_LIBC_ISOC99) 2421 # undef HAVE_ACCESS 2422 # undef HAVE_CHMOD 2423 # undef HAVE_CHOWN 2424 # undef HAVE_FSTAT 2425 # undef HAVE_GETTIMEOFDAY 2426 # undef HAVE_LSTAT 2427 # undef HAVE_STAT 2428 # undef HAVE_UMASK 2429 # undef HAVE_UTIME 2430 # if 1 2431 # undef HAVE_ALLOCA 2432 # undef HAVE_ISATTY 2433 # undef HAVE_MKDIR 2434 # undef HAVE_RMDIR 2435 # undef HAVE_STRDUP 2436 # undef HAVE_STRICMP 2437 # undef HAVE_STRNICMP 2438 # endif 2439 #endif 2440 #endif 2441 #endif 2442 #if !defined(ACC_CFG_AUTO_NO_SIZES) 2443 #if !defined(SIZEOF_SHORT) && defined(ACC_SIZEOF_SHORT) 2444 # define SIZEOF_SHORT ACC_SIZEOF_SHORT 2445 #endif 2446 #if !defined(SIZEOF_INT) && defined(ACC_SIZEOF_INT) 2447 # define SIZEOF_INT ACC_SIZEOF_INT 2448 #endif 2449 #if !defined(SIZEOF_LONG) && defined(ACC_SIZEOF_LONG) 2450 # define SIZEOF_LONG ACC_SIZEOF_LONG 2451 #endif 2452 #if !defined(SIZEOF_LONG_LONG) && defined(ACC_SIZEOF_LONG_LONG) 2453 # define SIZEOF_LONG_LONG ACC_SIZEOF_LONG_LONG 2454 #endif 2455 #if !defined(SIZEOF___INT32) && defined(ACC_SIZEOF___INT32) 2456 # define SIZEOF___INT32 ACC_SIZEOF___INT32 2457 #endif 2458 #if !defined(SIZEOF___INT64) && defined(ACC_SIZEOF___INT64) 2459 # define SIZEOF___INT64 ACC_SIZEOF___INT64 2460 #endif 2461 #if !defined(SIZEOF_VOID_P) && defined(ACC_SIZEOF_VOID_P) 2462 # define SIZEOF_VOID_P ACC_SIZEOF_VOID_P 2463 #endif 2464 #if !defined(SIZEOF_SIZE_T) && defined(ACC_SIZEOF_SIZE_T) 2465 # define SIZEOF_SIZE_T ACC_SIZEOF_SIZE_T 2466 #endif 2467 #if !defined(SIZEOF_PTRDIFF_T) && defined(ACC_SIZEOF_PTRDIFF_T) 2468 # define SIZEOF_PTRDIFF_T ACC_SIZEOF_PTRDIFF_T 2469 #endif 2470 #endif 2471 #if defined(HAVE_SIGNAL) && !defined(RETSIGTYPE) 2472 # define RETSIGTYPE void 2473 #endif 2474 #endif 2475 #if defined(ACC_CFG_NO_ACC_TYPE_H) 2476 #else 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; 2480 #endif 2481 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0)) 2482 # error "missing defines for sizes" 2483 #endif 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" 2486 #endif 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 2505 #else 2506 #endif 2507 #endif 2508 #if defined(acc_int16e_t) 2509 # define ACC_SIZEOF_ACC_INT16E_T 2 2510 #endif 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 2539 #else 2540 #endif 2541 #endif 2542 #if defined(acc_int32e_t) 2543 # define ACC_SIZEOF_ACC_INT32E_T 4 2544 #endif 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 2549 # endif 2550 #endif 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) 2565 # else 2566 # define ACC_INT64_C(c) c##LL 2567 # define ACC_UINT64_C(c) c##ULL 2568 # endif 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) 2576 # else 2577 # define ACC_INT64_C(c) c##i64 2578 # define ACC_UINT64_C(c) c##ui64 2579 # endif 2580 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF___INT64 2581 #else 2582 #endif 2583 #endif 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 2597 #else 2598 # error "acc_int32l_t" 2599 #endif 2600 #endif 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 2606 #else 2607 #endif 2608 #endif 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 2614 #else 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 2618 #endif 2619 #endif 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 2650 #else 2651 # error "acc_intptr_t" 2652 #endif 2653 #endif 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) 2681 #if 0 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 2687 #endif 2688 #else 2689 # error "acc_word_t" 2690 #endif 2691 #endif 2692 #endif 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 2706 # else 2707 # error "ACC_INT16_C" 2708 # endif 2709 #endif 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 2726 # else 2727 # error "ACC_INT32_C" 2728 # endif 2729 #endif 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 2743 # else 2744 # error "ACC_INT64_C" 2745 # endif 2746 #endif 2747 #if !defined(SIZEOF_ACC_INT16E_T) && defined(ACC_SIZEOF_ACC_INT16E_T) 2748 # define SIZEOF_ACC_INT16E_T ACC_SIZEOF_ACC_INT16E_T 2749 #endif 2750 #if !defined(SIZEOF_ACC_INT32E_T) && defined(ACC_SIZEOF_ACC_INT32E_T) 2751 # define SIZEOF_ACC_INT32E_T ACC_SIZEOF_ACC_INT32E_T 2752 #endif 2753 #if !defined(SIZEOF_ACC_INT64E_T) && defined(ACC_SIZEOF_ACC_INT64E_T) 2754 # define SIZEOF_ACC_INT64E_T ACC_SIZEOF_ACC_INT64E_T 2755 #endif 2756 #if !defined(SIZEOF_ACC_INT32L_T) && defined(ACC_SIZEOF_ACC_INT32L_T) 2757 # define SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32L_T 2758 #endif 2759 #if !defined(SIZEOF_ACC_INT64L_T) && defined(ACC_SIZEOF_ACC_INT64L_T) 2760 # define SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64L_T 2761 #endif 2762 #if !defined(SIZEOF_ACC_INT32F_T) && defined(ACC_SIZEOF_ACC_INT32F_T) 2763 # define SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32F_T 2764 #endif 2765 #if !defined(SIZEOF_ACC_INTPTR_T) && defined(ACC_SIZEOF_ACC_INTPTR_T) 2766 # define SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INTPTR_T 2767 #endif 2768 #if !defined(SIZEOF_ACC_WORD_T) && defined(ACC_SIZEOF_ACC_WORD_T) 2769 # define SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_WORD_T 2770 #endif 2771 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4) 2772 # define acc_signo_t acc_int32e_t 2773 #endif 2774 #if !defined(acc_signo_t) 2775 # define acc_signo_t int 2776 #endif 2777 #if defined(__cplusplus) 2778 extern "C" { 2779 #endif 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); 2784 #else 2785 typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); 2786 #endif 2787 #if defined(__cplusplus) 2788 } 2789 #endif 2790 # if defined(ACC_CFG_NO_ACC_UA_H) 2791 # else 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)) 2796 #elif (ACC_CC_LLVM) 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 2801 #endif 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 2805 #endif 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 2809 #endif 2810 #endif 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) 2820 #endif 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; 2827 unsigned long v; 2828 __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); 2829 return v; 2830 } 2831 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p) 2832 #endif 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)); 2838 } 2839 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v) 2840 #endif 2841 #endif 2842 #endif 2843 #if !defined(ACC_UA_COPY16) 2844 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s)) 2845 #endif 2846 #endif 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) 2856 #endif 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; 2863 unsigned long v; 2864 __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); 2865 return v; 2866 } 2867 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p) 2868 #endif 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)); 2874 } 2875 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v) 2876 #endif 2877 #endif 2878 #endif 2879 #if !defined(ACC_UA_COPY32) 2880 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s)) 2881 #endif 2882 #endif 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) 2892 #endif 2893 #if !defined(ACC_UA_COPY64) 2894 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s)) 2895 #endif 2896 #endif 2897 # endif 2898 #endif 2899 #endif 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" 2904 # endif 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; 2908 #endif 2909 #if (!(ACC_SIZEOF_SHORT+0 > 0 && ACC_SIZEOF_INT+0 > 0 && ACC_SIZEOF_LONG+0 > 0)) 2910 # error "missing defines for sizes" 2911 #endif 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" 2914 #endif 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 2933 #else 2934 #endif 2935 #endif 2936 #if defined(acc_int16e_t) 2937 # define ACC_SIZEOF_ACC_INT16E_T 2 2938 #endif 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 2967 #else 2968 #endif 2969 #endif 2970 #if defined(acc_int32e_t) 2971 # define ACC_SIZEOF_ACC_INT32E_T 4 2972 #endif 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 2977 # endif 2978 #endif 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) 2993 # else 2994 # define ACC_INT64_C(c) c##LL 2995 # define ACC_UINT64_C(c) c##ULL 2996 # endif 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) 3004 # else 3005 # define ACC_INT64_C(c) c##i64 3006 # define ACC_UINT64_C(c) c##ui64 3007 # endif 3008 # define ACC_SIZEOF_ACC_INT64E_T ACC_SIZEOF___INT64 3009 #else 3010 #endif 3011 #endif 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 3025 #else 3026 # error "acc_int32l_t" 3027 #endif 3028 #endif 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 3034 #else 3035 #endif 3036 #endif 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 3042 #else 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 3046 #endif 3047 #endif 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 3078 #else 3079 # error "acc_intptr_t" 3080 #endif 3081 #endif 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) 3109 #if 0 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 3115 #endif 3116 #else 3117 # error "acc_word_t" 3118 #endif 3119 #endif 3120 #endif 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 3134 # else 3135 # error "ACC_INT16_C" 3136 # endif 3137 #endif 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 3154 # else 3155 # error "ACC_INT32_C" 3156 # endif 3157 #endif 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 3171 # else 3172 # error "ACC_INT64_C" 3173 # endif 3174 #endif 3175 #if !defined(SIZEOF_ACC_INT16E_T) && defined(ACC_SIZEOF_ACC_INT16E_T) 3176 # define SIZEOF_ACC_INT16E_T ACC_SIZEOF_ACC_INT16E_T 3177 #endif 3178 #if !defined(SIZEOF_ACC_INT32E_T) && defined(ACC_SIZEOF_ACC_INT32E_T) 3179 # define SIZEOF_ACC_INT32E_T ACC_SIZEOF_ACC_INT32E_T 3180 #endif 3181 #if !defined(SIZEOF_ACC_INT64E_T) && defined(ACC_SIZEOF_ACC_INT64E_T) 3182 # define SIZEOF_ACC_INT64E_T ACC_SIZEOF_ACC_INT64E_T 3183 #endif 3184 #if !defined(SIZEOF_ACC_INT32L_T) && defined(ACC_SIZEOF_ACC_INT32L_T) 3185 # define SIZEOF_ACC_INT32L_T ACC_SIZEOF_ACC_INT32L_T 3186 #endif 3187 #if !defined(SIZEOF_ACC_INT64L_T) && defined(ACC_SIZEOF_ACC_INT64L_T) 3188 # define SIZEOF_ACC_INT64L_T ACC_SIZEOF_ACC_INT64L_T 3189 #endif 3190 #if !defined(SIZEOF_ACC_INT32F_T) && defined(ACC_SIZEOF_ACC_INT32F_T) 3191 # define SIZEOF_ACC_INT32F_T ACC_SIZEOF_ACC_INT32F_T 3192 #endif 3193 #if !defined(SIZEOF_ACC_INTPTR_T) && defined(ACC_SIZEOF_ACC_INTPTR_T) 3194 # define SIZEOF_ACC_INTPTR_T ACC_SIZEOF_ACC_INTPTR_T 3195 #endif 3196 #if !defined(SIZEOF_ACC_WORD_T) && defined(ACC_SIZEOF_ACC_WORD_T) 3197 # define SIZEOF_ACC_WORD_T ACC_SIZEOF_ACC_WORD_T 3198 #endif 3199 #if 1 && !defined(acc_signo_t) && defined(__linux__) && defined(__dietlibc__) && (ACC_SIZEOF_INT != 4) 3200 # define acc_signo_t acc_int32e_t 3201 #endif 3202 #if !defined(acc_signo_t) 3203 # define acc_signo_t int 3204 #endif 3205 #if defined(__cplusplus) 3206 extern "C" { 3207 #endif 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); 3212 #else 3213 typedef void (__acc_cdecl_sighandler *acc_sighandler_t)(acc_signo_t); 3214 #endif 3215 #if defined(__cplusplus) 3216 } 3217 #endif 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)) 3223 #elif (ACC_CC_LLVM) 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 3228 #endif 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 3232 #endif 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 3236 #endif 3237 #endif 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) 3247 #endif 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; 3254 unsigned long v; 3255 __asm__ __volatile__("lhbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); 3256 return v; 3257 } 3258 #define ACC_UA_GET_LE16(p) __ACC_UA_GET_LE16(p) 3259 #endif 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)); 3265 } 3266 #define ACC_UA_SET_LE16(p,v) __ACC_UA_SET_LE16(p,v) 3267 #endif 3268 #endif 3269 #endif 3270 #if !defined(ACC_UA_COPY16) 3271 # define ACC_UA_COPY16(d,s) ACC_UA_SET16(d, ACC_UA_GET16(s)) 3272 #endif 3273 #endif 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) 3283 #endif 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; 3290 unsigned long v; 3291 __asm__ __volatile__("lwbrx %0,0,%1" : "=r" (v) : "r" (p), "m" (*p)); 3292 return v; 3293 } 3294 #define ACC_UA_GET_LE32(p) __ACC_UA_GET_LE32(p) 3295 #endif 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)); 3301 } 3302 #define ACC_UA_SET_LE32(p,v) __ACC_UA_SET_LE32(p,v) 3303 #endif 3304 #endif 3305 #endif 3306 #if !defined(ACC_UA_COPY32) 3307 # define ACC_UA_COPY32(d,s) ACC_UA_SET32(d, ACC_UA_GET32(s)) 3308 #endif 3309 #endif 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) 3319 #endif 3320 #if !defined(ACC_UA_COPY64) 3321 # define ACC_UA_COPY64(d,s) ACC_UA_SET64(d, ACC_UA_GET64(s)) 3322 #endif 3323 #endif 3324 # endif 3325 #endif 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; 3337 #else 3338 typedef long acc_fallback_ptrdiff_t; 3339 #endif 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; 3344 #else 3345 typedef unsigned long acc_fallback_size_t; 3346 #endif 3347 #if !defined(ptrdiff_t) 3348 typedef acc_fallback_ptrdiff_t ptrdiff_t; 3349 #ifndef _PTRDIFF_T_DEFINED 3350 #define _PTRDIFF_T_DEFINED 1 3351 #endif 3352 #endif 3353 #if !defined(size_t) 3354 typedef acc_fallback_size_t size_t; 3355 #ifndef _SIZE_T_DEFINED 3356 #define _SIZE_T_DEFINED 1 3357 #endif 3358 #endif 3359 #if !defined(__cplusplus) && !defined(wchar_t) 3360 typedef unsigned short wchar_t; 3361 #ifndef _WCHAR_T_DEFINED 3362 #define _WCHAR_T_DEFINED 1 3363 #endif 3364 #endif 3365 #ifndef NULL 3366 #if defined(__cplusplus) && defined(__GNUC__) && (__GNUC__ >= 4) 3367 #define NULL __null 3368 #elif defined(__cplusplus) 3369 #define NULL 0 3370 #else 3371 #define NULL ((void*)0) 3372 #endif 3373 #endif 3374 #ifndef offsetof 3375 #define offsetof(s,m) ((size_t)((ptrdiff_t)&(((s*)0)->m))) 3376 #endif 3377 #endif 3378 #elif defined(ACC_LIBC_FREESTANDING) 3379 # if HAVE_STDDEF_H 3380 # include <stddef.h> 3381 # endif 3382 # if HAVE_STDINT_H 3383 # include <stdint.h> 3384 # endif 3385 #elif defined(ACC_LIBC_MOSTLY_FREESTANDING) 3386 # if HAVE_STDIO_H 3387 # include <stdio.h> 3388 # endif 3389 # if HAVE_STDDEF_H 3390 # include <stddef.h> 3391 # endif 3392 # if HAVE_STDINT_H 3393 # include <stdint.h> 3394 # endif 3395 #else 3396 #include <stdio.h> 3397 #if defined(HAVE_TIME_H) && defined(__MSL__) && defined(__cplusplus) 3398 # include <time.h> 3399 #endif 3400 #if HAVE_SYS_TYPES_H 3401 # include <sys/types.h> 3402 #endif 3403 #if HAVE_SYS_STAT_H 3404 # include <sys/stat.h> 3405 #endif 3406 #if STDC_HEADERS 3407 # include <stdlib.h> 3408 # include <stddef.h> 3409 #else 3410 # if HAVE_STDLIB_H 3411 # include <stdlib.h> 3412 # endif 3413 #endif 3414 #if HAVE_STRING_H 3415 # if !STDC_HEADERS && HAVE_MEMORY_H 3416 # include <memory.h> 3417 # endif 3418 # include <string.h> 3419 #endif 3420 #if HAVE_STRINGS_H 3421 # include <strings.h> 3422 #endif 3423 #if HAVE_INTTYPES_H 3424 # include <inttypes.h> 3425 #else 3426 # if HAVE_STDINT_H 3427 # include <stdint.h> 3428 # endif 3429 #endif 3430 #if HAVE_UNISTD_H 3431 # include <unistd.h> 3432 #endif 3433 #endif 3434 #endif 3435 #endif 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> 3445 # endif 3446 #else 3447 #if defined(HAVE_STDARG_H) 3448 # include <stdarg.h> 3449 #endif 3450 #if defined(HAVE_CTYPE_H) 3451 # include <ctype.h> 3452 #endif 3453 #if defined(HAVE_ERRNO_H) 3454 # include <errno.h> 3455 #endif 3456 #if defined(HAVE_MALLOC_H) 3457 # include <malloc.h> 3458 #endif 3459 #if defined(HAVE_ALLOCA_H) 3460 # include <alloca.h> 3461 #endif 3462 #if defined(HAVE_FCNTL_H) 3463 # include <fcntl.h> 3464 #endif 3465 #if defined(HAVE_DIRENT_H) 3466 # include <dirent.h> 3467 #endif 3468 #if defined(HAVE_SETJMP_H) 3469 # include <setjmp.h> 3470 #endif 3471 #if defined(HAVE_SIGNAL_H) 3472 # include <signal.h> 3473 #endif 3474 #if defined(TIME_WITH_SYS_TIME) 3475 # include <sys/time.h> 3476 # include <time.h> 3477 #elif defined(HAVE_TIME_H) 3478 # include <time.h> 3479 #endif 3480 #if defined(HAVE_UTIME_H) 3481 # include <utime.h> 3482 #elif defined(HAVE_SYS_UTIME_H) 3483 # include <sys/utime.h> 3484 #endif 3485 #if defined(HAVE_IO_H) 3486 # include <io.h> 3487 #endif 3488 #if defined(HAVE_DOS_H) 3489 # include <dos.h> 3490 #endif 3491 #if defined(HAVE_DIRECT_H) 3492 # include <direct.h> 3493 #endif 3494 #if defined(HAVE_SHARE_H) 3495 # include <share.h> 3496 #endif 3497 #if defined(ACC_CC_NDPC) 3498 # include <os.h> 3499 #endif 3500 #if defined(__TOS__) && (defined(__PUREC__) || defined(__TURBOC__)) 3501 # include <ext.h> 3502 #endif 3503 #endif 3504 #endif 3505 #endif 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) 3513 #else 3514 #if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC)) 3515 # include <tos.h> 3516 #elif (ACC_HAVE_WINDOWS_H) 3517 # if 1 && !defined(WIN32_LEAN_AND_MEAN) 3518 # define WIN32_LEAN_AND_MEAN 1 3519 # endif 3520 # if 1 && !defined(_WIN32_WINNT) 3521 # define _WIN32_WINNT 0x0400 3522 # endif 3523 # include <windows.h> 3524 # if (ACC_CC_BORLANDC || ACC_CC_TURBOC) 3525 # include <dir.h> 3526 # endif 3527 #elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_WIN16) 3528 # if (ACC_CC_AZTECC) 3529 # include <model.h> 3530 # include <stat.h> 3531 # elif (ACC_CC_BORLANDC || ACC_CC_TURBOC) 3532 # include <alloc.h> 3533 # include <dir.h> 3534 # elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__) 3535 # include <sys/exceptn.h> 3536 # elif (ACC_CC_PACIFICC) 3537 # include <unixio.h> 3538 # include <stat.h> 3539 # include <sys.h> 3540 # elif (ACC_CC_WATCOMC) 3541 # include <i86.h> 3542 # endif 3543 #elif (ACC_OS_OS216) 3544 # if (ACC_CC_WATCOMC) 3545 # include <i86.h> 3546 # endif 3547 #endif 3548 #if defined(HAVE_SYS_MMAN_H) 3549 # include <sys/mman.h> 3550 #endif 3551 #if defined(HAVE_SYS_RESOURCE_H) 3552 # include <sys/resource.h> 3553 #endif 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) 3559 # else 3560 # define ACC_PTR_FP_OFF(x) (((const unsigned __far*)&(x))[0]) 3561 # endif 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) 3566 # else 3567 # define ACC_PTR_FP_SEG(x) (((const unsigned __far*)&(x))[1]) 3568 # endif 3569 # if defined(MK_FP) 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) 3573 # else 3574 # define ACC_PTR_MK_FP(s,o) ((void __far*)(((unsigned long)(s)<<16)+(unsigned)(o))) 3575 # endif 3576 # if 0 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))) 3583 # endif 3584 #endif 3585 #endif 3586 #endif 3587 #endif 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 3594 #endif 3595 #if !defined(ACCLIB_EXTERN) 3596 # define ACCLIB_EXTERN(r,f) extern r __ACCLIB_FUNCNAME(f) 3597 #endif 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) 3601 # else 3602 # define ACCLIB_EXTERN_NOINLINE(r,f) extern r __ACCLIB_FUNCNAME(f) 3603 # endif 3604 #endif 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; } 3611 #else 3612 # define __ACCLIB_CONST_CAST_RETURN(type,var) return (type) (var); 3613 #endif 3614 #endif 3615 #if (ACC_OS_WIN64) 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 3623 #else 3624 # define acclib_handle_t long 3625 # define acclib_uhandle_t unsigned long 3626 #endif 3627 #if 0 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); 3635 #endif 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)) 3643 #ifndef acc_hsize_t 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 * 3650 #else 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 * 3656 #endif 3657 #endif 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*); 3663 #endif 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); 3711 #endif 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); 3731 #endif 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); 3737 #endif 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); 3741 #endif 3742 #if !defined(ACC_CFG_NO_DOUBLE) 3743 ACCLIB_EXTERN_NOINLINE(double, acc_vget_double) (double, int); 3744 #endif 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 3752 #elif (ACC_OS_TOS) 3753 # define ACC_FN_PATH_MAX 259 3754 #endif 3755 #endif 3756 #if !defined(ACC_FN_PATH_MAX) 3757 # define ACC_FN_PATH_MAX 1023 3758 #endif 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 3767 #endif 3768 #endif 3769 #if !defined(ACC_FN_NAME_MAX) 3770 # define ACC_FN_NAME_MAX ACC_FN_PATH_MAX 3771 #endif 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 3788 # endif 3789 #endif 3790 typedef struct 3791 { 3792 #if defined(__ACCLIB_USE_OPENDIR) 3793 void* u_dirp; 3794 # if (ACC_CC_WATCOMC) 3795 unsigned short f_time; 3796 unsigned short f_date; 3797 unsigned long f_size; 3798 # endif 3799 char f_name[ACC_FN_NAME_MAX+1]; 3800 #elif (ACC_OS_WIN32 || ACC_OS_WIN64) 3801 acclib_handle_t u_handle; 3802 unsigned f_attr; 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) 3807 char u_dta[21]; 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]; 3814 char u_dirp; 3815 #else 3816 void* u_dirp; 3817 char f_name[ACC_FN_NAME_MAX+1]; 3818 #endif 3819 } acc_dir_t; 3820 #ifndef acc_dir_p 3821 #define acc_dir_p acc_dir_t * 3822 #endif 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__) 3831 #elif (HAVE_ALLOCA) 3832 # define acc_alloca(x) ((void *) (alloca((x)))) 3833 #endif 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) 3840 # else 3841 # define acc_stackavail() stackavail() 3842 # endif 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() 3858 #endif 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); 3869 #endif 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 3882 #else 3883 typedef struct { 3884 void* h; 3885 int mode; 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; 3890 typedef struct { 3891 acc_uint64l_t tsc; 3892 #if (ACC_OS_POSIX_LINUX) 3893 acc_uint64l_t pmc[18]; 3894 #else 3895 acc_uint64l_t pmc[1]; 3896 #endif 3897 } acc_perfctr_clock_t; 3898 #ifndef acc_perfctr_handle_p 3899 #define acc_perfctr_handle_p acc_perfctr_handle_t * 3900 #endif 3901 #ifndef acc_perfctr_clock_p 3902 #define acc_perfctr_clock_p acc_perfctr_clock_t * 3903 #endif 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); 3910 #endif 3911 ACCLIB_EXTERN(int, acc_perfctr_flush_cpu_cache) (acc_perfctr_handle_p, unsigned); 3912 #endif 3913 #if defined(acc_int32e_t) 3914 ACCLIB_EXTERN(int, acc_tsc_read) (acc_uint32e_t*); 3915 #else 3916 # undef __ACCLIB_PCLOCK_USE_RDTSC 3917 # undef __ACCLIB_UCLOCK_USE_RDTSC 3918 #endif 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 * 3925 #endif 3926 #ifndef acc_pclock_p 3927 #define acc_pclock_p acc_pclock_t * 3928 #endif 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 { 3936 acclib_handle_t h; 3937 int mode; 3938 const char* name; 3939 int (*gettime) (acc_pclock_handle_p, acc_pclock_p); 3940 #if defined(acc_int64l_t) 3941 acc_uint64l_t ticks_base; 3942 #endif 3943 #if defined(__ACCLIB_PCLOCK_USE_PERFCTR) 3944 acc_perfctr_handle_t pch; 3945 #endif 3946 }; 3947 struct acc_pclock_t { 3948 #if defined(acc_int64l_t) 3949 acc_int64l_t tv_sec; 3950 #else 3951 acc_int32l_t tv_sec_high; 3952 acc_uint32l_t tv_sec_low; 3953 #endif 3954 acc_uint32l_t tv_nsec; 3955 }; 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); 3962 #endif 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 3968 #else 3969 # undef __ACCLIB_UCLOCK_USE_QPC 3970 #endif 3971 typedef struct { 3972 acclib_handle_t h; 3973 int mode; 3974 const char* name; 3975 #if defined(__ACCLIB_UCLOCK_USE_PERFCTR) 3976 acc_perfctr_handle_t pch; 3977 #endif 3978 #if defined(__ACCLIB_UCLOCK_USE_QPC) 3979 double qpf; 3980 #endif 3981 } acc_uclock_handle_t; 3982 typedef struct { 3983 union { 3984 acc_uint32l_t t32; 3985 #if !(ACC_OS_DOS16 || ACC_OS_WIN16) 3986 # if !defined(ACC_CFG_NO_DOUBLE) 3987 double td; 3988 # endif 3989 # if defined(acc_int64l_t) 3990 acc_int64l_t t64; 3991 # endif 3992 #endif 3993 } ticks; 3994 #if defined(__ACCLIB_UCLOCK_USE_RDTSC) 3995 acc_uint64l_t tsc; 3996 #endif 3997 #if defined(__ACCLIB_UCLOCK_USE_PERFCTR) 3998 acc_perfctr_clock_t pcc; 3999 #endif 4000 #if defined(__ACCLIB_UCLOCK_USE_QPC) 4001 acc_int64l_t qpc; 4002 #endif 4003 } acc_uclock_t; 4004 #ifndef acc_uclock_handle_p 4005 #define acc_uclock_handle_p acc_uclock_handle_t * 4006 #endif 4007 #ifndef acc_uclock_p 4008 #define acc_uclock_p acc_uclock_t * 4009 #endif 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); 4015 #endif 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 * 4021 #endif 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 * 4026 #endif 4027 struct acc_getopt_longopt_t { 4028 const char* name; 4029 int has_arg; 4030 int* flag; 4031 int val; 4032 }; 4033 struct acc_getopt_t { 4034 void *user; 4035 char *optarg; 4036 void (*opterr)(acc_getopt_p, const char*, void *); 4037 int optind; 4038 int optopt; 4039 int errcount; 4040 const char* progname; 4041 int argc; char** argv; 4042 int eof; int shortpos; 4043 int pending_rotate_first, pending_rotate_middle; 4044 }; 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, 4052 int* longind); 4053 typedef struct { 4054 acc_uint32l_t seed; 4055 } acc_rand31_t; 4056 #ifndef acc_rand31_p 4057 #define acc_rand31_p acc_rand31_t * 4058 #endif 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) 4062 typedef struct { 4063 acc_uint64l_t seed; 4064 } acc_rand48_t; 4065 #ifndef acc_rand48_p 4066 #define acc_rand48_p acc_rand48_t * 4067 #endif 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); 4071 #endif 4072 #if defined(acc_int64l_t) 4073 typedef struct { 4074 acc_uint64l_t seed; 4075 } acc_rand64_t; 4076 #ifndef acc_rand64_p 4077 #define acc_rand64_p acc_rand64_t * 4078 #endif 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); 4082 #endif 4083 typedef struct { 4084 unsigned n; 4085 acc_uint32l_t s[624]; 4086 } acc_randmt_t; 4087 #ifndef acc_randmt_p 4088 #define acc_randmt_p acc_randmt_t * 4089 #endif 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) 4094 typedef struct { 4095 unsigned n; 4096 acc_uint64l_t s[312]; 4097 } acc_randmt64_t; 4098 #ifndef acc_randmt64_p 4099 #define acc_randmt64_p acc_randmt64_t * 4100 #endif 4101 ACCLIB_EXTERN(void, acc_srandmt64) (acc_randmt64_p, acc_uint64l_t); 4102 ACCLIB_EXTERN(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p); 4103 #endif 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); 4109 #endif 4110 #endif 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)) 4121 #elif (ACC_CC_NDPC) 4122 #elif (ACC_CC_TURBOC) 4123 #elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND)) 4124 #elif (ACC_CC_ZORTECHC) 4125 #else 4126 # define ACC_CXX_NOTHROW throw() 4127 #endif 4128 #if !defined(ACC_CXX_NOTHROW) 4129 # define ACC_CXX_NOTHROW 4130 #endif 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; } 4136 #else 4137 # define __ACC_CXX_DO_NEW ; 4138 #endif 4139 #if defined(__ACC_CXX_DO_DELETE) 4140 #elif (ACC_CC_BORLANDC || ACC_CC_TURBOC) 4141 # define __ACC_CXX_DO_DELETE { } 4142 #else 4143 # define __ACC_CXX_DO_DELETE ACC_CXX_NOTHROW { } 4144 #endif 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)) 4149 #elif (ACC_CC_NDPC) 4150 #elif (ACC_CC_SYMANTECC || ACC_CC_ZORTECHC) 4151 #elif (ACC_CC_TURBOC) 4152 #elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100)) 4153 #else 4154 # define __ACC_CXX_HAVE_ARRAY_NEW 1 4155 #endif 4156 #if (__ACC_CXX_HAVE_ARRAY_NEW) 4157 # define __ACC_CXX_HAVE_PLACEMENT_NEW 1 4158 #endif 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 4168 # elif (ACC_CC_PGI) 4169 # define __ACC_CXX_HAVE_PLACEMENT_DELETE 1 4170 # endif 4171 #endif 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 \ 4183 private: 4184 #else 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 4190 #endif 4191 #if defined(ACC_CXX_TRIGGER_FUNCTION) 4192 #else 4193 # define ACC_CXX_TRIGGER_FUNCTION \ 4194 protected: virtual const void* acc_cxx_trigger_function() const; \ 4195 private: 4196 #endif 4197 #if defined(ACC_CXX_TRIGGER_FUNCTION_IMPL) 4198 #else 4199 # define ACC_CXX_TRIGGER_FUNCTION_IMPL(klass) \ 4200 const void* klass::acc_cxx_trigger_function() const { return 0; } 4201 #endif 4202 #endif 4203 #endif 4204 #endif 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) 4209 #endif 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) ) 4215 #endif 4216 #if !defined(ACCCHK_ASSERT_IS_SIGNED_T) 4217 # define ACCCHK_ASSERT_IS_SIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,<) 4218 #endif 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 ) 4223 # else 4224 # define ACCCHK_ASSERT_IS_UNSIGNED_T(type) ACCCHK_ASSERT_SIGN_T(type,>) 4225 # endif 4226 #endif 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 4231 #endif 4232 #if (ACC_0xffffffffL - ACC_UINT32_C(4294967294) != 1) 4233 # error "preprocessor error 1" 4234 #endif 4235 #if (ACC_0xffffffffL - ACC_UINT32_C(0xfffffffd) != 2) 4236 # error "preprocessor error 2" 4237 #endif 4238 #define ACCCHK_VAL 1 4239 #define ACCCHK_TMP1 ACCCHK_VAL 4240 #undef ACCCHK_VAL 4241 #define ACCCHK_VAL 2 4242 #define ACCCHK_TMP2 ACCCHK_VAL 4243 #if (ACCCHK_TMP1 != 2) 4244 # error "preprocessor error 3a" 4245 #endif 4246 #if (ACCCHK_TMP2 != 2) 4247 # error "preprocessor error 3b" 4248 #endif 4249 #undef ACCCHK_VAL 4250 #if (ACCCHK_TMP2) 4251 # error "preprocessor error 3c" 4252 #endif 4253 #if (ACCCHK_TMP2 + 0 != 0) 4254 # error "preprocessor error 3d" 4255 #endif 4256 #undef ACCCHK_TMP1 4257 #undef ACCCHK_TMP2 4258 #if 0 || defined(ACCCHK_CFG_PEDANTIC) 4259 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZINT) 4260 ACCCHK_ASSERT((_MIPS_SZINT) == 8 * sizeof(int)) 4261 # endif 4262 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZLONG) 4263 ACCCHK_ASSERT((_MIPS_SZLONG) == 8 * sizeof(long)) 4264 # endif 4265 # if (ACC_ARCH_MIPS) && defined(_MIPS_SZPTR) 4266 ACCCHK_ASSERT((_MIPS_SZPTR) == 8 * sizeof(void *)) 4267 # endif 4268 #endif 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) 4275 #else 4276 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,16) == 0xffffUL) 4277 #endif 4278 #if (SIZEOF_INT >= 4) 4279 ACCCHK_ASSERT(__ACC_MASK_GEN(1,31) == 2147483647) 4280 ACCCHK_ASSERT(__ACC_MASK_GEN(1u,32) == 0xffffffffU) 4281 #endif 4282 #if (SIZEOF_LONG >= 4) 4283 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,32) == 0xffffffffUL) 4284 #endif 4285 #if (SIZEOF_LONG >= 8) 4286 ACCCHK_ASSERT(__ACC_MASK_GEN(1ul,64) == 0xffffffffffffffffUL) 4287 #endif 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) 4291 #endif 4292 #if !defined(ACC_BROKEN_SIGNED_RIGHT_SHIFT) 4293 ACCCHK_ASSERT(((-1) >> 7) == -1) 4294 #endif 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) 4307 #endif 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)) 4314 #else 4315 ACCCHK_ASSERT(sizeof(char) == sizeof((char)0)) 4316 #endif 4317 #if defined(__cplusplus) 4318 ACCCHK_ASSERT(sizeof('\0') == sizeof(char)) 4319 #else 4320 # if (ACC_CC_DMC) 4321 # else 4322 ACCCHK_ASSERT(sizeof('\0') == sizeof(int)) 4323 # endif 4324 #endif 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) 4332 #endif 4333 #if defined(acc_int32e_t) 4334 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) >= 1) 4335 ACCCHK_ASSERT(__acc_alignof(acc_int32e_t) <= 4) 4336 #endif 4337 #endif 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) 4343 #endif 4344 ACCCHK_ASSERT(sizeof(short) >= sizeof(char)) 4345 #if (ACC_CC_CILLY) && (!defined(__CILLY__) || (__CILLY__ < 0x010302L)) 4346 #else 4347 ACCCHK_ASSERT(sizeof(short) == sizeof((short)0)) 4348 #endif 4349 #if (SIZEOF_SHORT > 0) 4350 ACCCHK_ASSERT(sizeof(short) == SIZEOF_SHORT) 4351 #endif 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) 4357 #endif 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) 4363 #endif 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) 4370 #endif 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) 4376 #endif 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) 4383 #endif 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)) 4391 # endif 4392 #endif 4393 #if (SIZEOF_PTRDIFF_T > 0) 4394 ACCCHK_ASSERT(sizeof(ptrdiff_t) == SIZEOF_PTRDIFF_T) 4395 #endif 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) 4400 #endif 4401 #if (ACC_HAVE_MM_HUGE_PTR) 4402 ACCCHK_ASSERT(4 == sizeof(void __huge*)) 4403 ACCCHK_ASSERT(4 == sizeof(char __huge*)) 4404 #endif 4405 #if defined(ACC_ABI_I8LP16) 4406 ACCCHK_ASSERT((((1u << 7) + 1) >> 7) == 1) 4407 ACCCHK_ASSERT((((1ul << 15) + 1) >> 15) == 1) 4408 #else 4409 ACCCHK_ASSERT((((1u << 15) + 1) >> 15) == 1) 4410 ACCCHK_ASSERT((((1ul << 31) + 1) >> 31) == 1) 4411 #endif 4412 #if defined(__MSDOS__) && defined(__TURBOC__) && (__TURBOC__ < 0x0150) 4413 #elif 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) 4414 #else 4415 ACCCHK_ASSERT((1 << (8*SIZEOF_INT-1)) < 0) 4416 #endif 4417 ACCCHK_ASSERT((1u << (8*SIZEOF_INT-1)) > 0) 4418 #if 1 && (ACC_CC_SUNPROC) && !defined(ACCCHK_CFG_PEDANTIC) 4419 #else 4420 ACCCHK_ASSERT((1l << (8*SIZEOF_LONG-1)) < 0) 4421 #endif 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) 4431 #else 4432 ACCCHK_ASSERT(((acc_uint16e_t)(~(acc_uint16e_t)0ul) >> 15) == 1) 4433 #endif 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) 4437 #endif 4438 #endif 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) 4452 #endif 4453 #endif 4454 #if defined(acc_int32e_t) 4455 ACCCHK_ASSERT(sizeof(acc_int32l_t) >= sizeof(acc_int32e_t)) 4456 #endif 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)) 4468 #endif 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)) 4487 #else 4488 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64e_t) 4489 #endif 4490 #endif 4491 #if defined(acc_int64l_t) 4492 #if defined(acc_int64e_t) 4493 ACCCHK_ASSERT(sizeof(acc_int64l_t) >= sizeof(acc_int64e_t)) 4494 #endif 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)) 4503 #else 4504 ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64l_t) 4505 ACCCHK_ASSERT(ACC_UINT64_C(18446744073709551615) > 0) 4506 #endif 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)) 4511 #else 4512 ACCCHK_ASSERT(ACC_INT64_C(9223372036854775807) > 0) 4513 #endif 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) 4519 #endif 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) 4523 #endif 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)) 4533 #endif 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) 4538 #endif 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) 4543 #endif 4544 #if defined(ACC_INT64_C) 4545 #if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0560)) 4546 #else 4547 ACCCHK_ASSERT(sizeof(ACC_INT64_C(0)) >= 8) 4548 ACCCHK_ASSERT(sizeof(ACC_UINT64_C(0)) >= 8) 4549 #endif 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)) 4555 # else 4556 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0u) == 0xffffffffu) 4557 # endif 4558 #endif 4559 #if (SIZEOF_LONG == 4) 4560 # if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020000ul)) 4561 # else 4562 ACCCHK_ASSERT((ACC_UINT64_C(0xffffffffffffffff) & ~0ul) == 0xfffffffful) 4563 # endif 4564 #endif 4565 #endif 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) 4571 #endif 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) 4576 #endif 4577 #if (ACC_ABI_ILP32) 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 *)) 4584 #endif 4585 #if (ACC_ABI_ILP64) 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 *)) 4592 #endif 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 *)) 4600 #endif 4601 #if (ACC_ABI_LLP64) 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 *)) 4608 #endif 4609 #if (ACC_ABI_LP32) 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 *)) 4614 #endif 4615 #if (ACC_ABI_LP64) 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 *)) 4622 #endif 4623 #if (ACC_ARCH_I086) 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 *)) 4630 #endif 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) 4639 #endif 4640 #if (ACC_CC_NDPC) 4641 #elif (SIZEOF_INT > 1) 4642 ACCCHK_ASSERT( (int) ((unsigned char) ((signed char) -1)) == 255) 4643 #endif 4644 #if (ACC_CC_KEILC) 4645 #elif (ACC_CC_NDPC) 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) 4650 #endif 4651 #if (ACC_CC_BORLANDC && (__BORLANDC__ >= 0x0530) && (__BORLANDC__ < 0x0560)) 4652 # pragma option pop 4653 #endif 4654 #endif 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) 4660 #endif 4661 ACCLIB_PUBLIC(unsigned, acc_ua_get_be16) (const acc_hvoid_p p) 4662 { 4663 #if defined(ACC_UA_GET_BE16) 4664 return ACC_UA_GET_BE16(p); 4665 #else 4666 const acc_hbyte_p b = (const acc_hbyte_p) p; 4667 return ((unsigned)b[1]) | ((unsigned)b[0] << 8); 4668 #endif 4669 } 4670 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be24) (const acc_hvoid_p p) 4671 { 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); 4674 } 4675 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_be32) (const acc_hvoid_p p) 4676 { 4677 #if defined(ACC_UA_GET_BE32) 4678 return ACC_UA_GET_BE32(p); 4679 #else 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); 4682 #endif 4683 } 4684 ACCLIB_PUBLIC(void, acc_ua_set_be16) (acc_hvoid_p p, unsigned v) 4685 { 4686 #if defined(ACC_UA_SET_BE16) 4687 ACC_UA_SET_BE16(p, v); 4688 #else 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); 4692 #endif 4693 } 4694 ACCLIB_PUBLIC(void, acc_ua_set_be24) (acc_hvoid_p p, acc_uint32l_t v) 4695 { 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); 4700 } 4701 ACCLIB_PUBLIC(void, acc_ua_set_be32) (acc_hvoid_p p, acc_uint32l_t v) 4702 { 4703 #if defined(ACC_UA_SET_BE32) 4704 ACC_UA_SET_BE32(p, v); 4705 #else 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); 4711 #endif 4712 } 4713 ACCLIB_PUBLIC(unsigned, acc_ua_get_le16) (const acc_hvoid_p p) 4714 { 4715 #if defined(ACC_UA_GET_LE16) 4716 return ACC_UA_GET_LE16(p); 4717 #else 4718 const acc_hbyte_p b = (const acc_hbyte_p) p; 4719 return ((unsigned)b[0]) | ((unsigned)b[1] << 8); 4720 #endif 4721 } 4722 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le24) (const acc_hvoid_p p) 4723 { 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); 4726 } 4727 ACCLIB_PUBLIC(acc_uint32l_t, acc_ua_get_le32) (const acc_hvoid_p p) 4728 { 4729 #if defined(ACC_UA_GET_LE32) 4730 return ACC_UA_GET_LE32(p); 4731 #else 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); 4734 #endif 4735 } 4736 ACCLIB_PUBLIC(void, acc_ua_set_le16) (acc_hvoid_p p, unsigned v) 4737 { 4738 #if defined(ACC_UA_SET_LE16) 4739 ACC_UA_SET_LE16(p, v); 4740 #else 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); 4744 #endif 4745 } 4746 ACCLIB_PUBLIC(void, acc_ua_set_le24) (acc_hvoid_p p, acc_uint32l_t v) 4747 { 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); 4752 } 4753 ACCLIB_PUBLIC(void, acc_ua_set_le32) (acc_hvoid_p p, acc_uint32l_t v) 4754 { 4755 #if defined(ACC_UA_SET_LE32) 4756 ACC_UA_SET_LE32(p, v); 4757 #else 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); 4763 #endif 4764 } 4765 #if defined(acc_int64l_t) 4766 ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_be64) (const acc_hvoid_p p) 4767 { 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); 4779 #else 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); 4783 b += 4; 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); 4786 #endif 4787 } 4788 ACCLIB_PUBLIC(void, acc_ua_set_be64) (acc_hvoid_p p, acc_uint64l_t v) 4789 { 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); 4806 #else 4807 acc_hbyte_p b = (acc_hbyte_p) p; 4808 acc_uint32l_t x; 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); 4819 #endif 4820 } 4821 #endif 4822 #if defined(acc_int64l_t) 4823 ACCLIB_PUBLIC(acc_uint64l_t, acc_ua_get_le64) (const acc_hvoid_p p) 4824 { 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); 4836 #else 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); 4840 b += 4; 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); 4843 #endif 4844 } 4845 ACCLIB_PUBLIC(void, acc_ua_set_le64) (acc_hvoid_p p, acc_uint64l_t v) 4846 { 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); 4863 #else 4864 acc_hbyte_p b = (acc_hbyte_p) p; 4865 acc_uint32l_t x; 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); 4876 #endif 4877 } 4878 #endif 4879 #endif 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) 4885 #endif 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) 4891 # else 4892 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f) 4893 # endif 4894 #endif 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; 4898 #else 4899 extern void* volatile __acc_vget_ptr; 4900 void* volatile __acc_vget_ptr = (void *) 0; 4901 #endif 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; \ 4908 } \ 4909 return v; 4910 #endif 4911 ACCLIB_PUBLIC_NOINLINE(short, acc_vget_short) (short v, int expr) 4912 { 4913 __ACCLIB_VGET_BODY(short) 4914 } 4915 ACCLIB_PUBLIC_NOINLINE(int, acc_vget_int) (int v, int expr) 4916 { 4917 __ACCLIB_VGET_BODY(int) 4918 } 4919 ACCLIB_PUBLIC_NOINLINE(long, acc_vget_long) (long v, int expr) 4920 { 4921 __ACCLIB_VGET_BODY(long) 4922 } 4923 #if defined(acc_int64l_t) 4924 ACCLIB_PUBLIC_NOINLINE(acc_int64l_t, acc_vget_acc_int64l_t) (acc_int64l_t v, int expr) 4925 { 4926 __ACCLIB_VGET_BODY(acc_int64l_t) 4927 } 4928 #endif 4929 ACCLIB_PUBLIC_NOINLINE(acc_hsize_t, acc_vget_acc_hsize_t) (acc_hsize_t v, int expr) 4930 { 4931 __ACCLIB_VGET_BODY(acc_hsize_t) 4932 } 4933 #if !defined(ACC_CFG_NO_FLOAT) 4934 ACCLIB_PUBLIC_NOINLINE(float, acc_vget_float) (float v, int expr) 4935 { 4936 __ACCLIB_VGET_BODY(float) 4937 } 4938 #endif 4939 #if !defined(ACC_CFG_NO_DOUBLE) 4940 ACCLIB_PUBLIC_NOINLINE(double, acc_vget_double) (double v, int expr) 4941 { 4942 __ACCLIB_VGET_BODY(double) 4943 } 4944 #endif 4945 ACCLIB_PUBLIC_NOINLINE(acc_hvoid_p, acc_vget_acc_hvoid_p) (acc_hvoid_p v, int expr) 4946 { 4947 __ACCLIB_VGET_BODY(acc_hvoid_p) 4948 } 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) 4951 { 4952 acc_hvoid_p v = (acc_hvoid_p) vv; 4953 __ACCLIB_VGET_BODY(acc_hvoid_p) 4954 } 4955 #else 4956 ACCLIB_PUBLIC_NOINLINE(const acc_hvoid_p, acc_vget_acc_hvoid_cp) (const acc_hvoid_p v, int expr) 4957 { 4958 __ACCLIB_VGET_BODY(const acc_hvoid_p) 4959 } 4960 #endif 4961 #endif 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) 4967 #endif 4968 ACCLIB_PUBLIC(int, acc_hmemcmp) (const acc_hvoid_p s1, const acc_hvoid_p s2, acc_hsize_t len) 4969 { 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 4974 { 4975 int d = *p1 - *p2; 4976 if (d != 0) 4977 return d; 4978 p1++; p2++; 4979 } while __acc_likely(--len > 0); 4980 return 0; 4981 #else 4982 return memcmp(s1, s2, len); 4983 #endif 4984 } 4985 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemcpy) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len) 4986 { 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) 4991 return dest; 4992 do 4993 *p1++ = *p2++; 4994 while __acc_likely(--len > 0); 4995 return dest; 4996 #else 4997 return memcpy(dest, src, len); 4998 #endif 4999 } 5000 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmove) (acc_hvoid_p dest, const acc_hvoid_p src, acc_hsize_t len) 5001 { 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) 5006 return dest; 5007 if (p1 < p2) 5008 { 5009 do 5010 *p1++ = *p2++; 5011 while __acc_likely(--len > 0); 5012 } 5013 else 5014 { 5015 p1 += len; 5016 p2 += len; 5017 do 5018 *--p1 = *--p2; 5019 while __acc_likely(--len > 0); 5020 } 5021 return dest; 5022 #else 5023 return memmove(dest, src, len); 5024 #endif 5025 } 5026 ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemset) (acc_hvoid_p s, int c, acc_hsize_t len) 5027 { 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); 5033 return s; 5034 #else 5035 return memset(s, c, len); 5036 #endif 5037 } 5038 #endif 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) 5044 #endif 5045 ACCLIB_PUBLIC(void, acc_srand31) (acc_rand31_p r, acc_uint32l_t seed) 5046 { 5047 r->seed = seed & ACC_UINT32_C(0xffffffff); 5048 } 5049 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand31) (acc_rand31_p r) 5050 { 5051 r->seed = r->seed * ACC_UINT32_C(1103515245) + 12345; 5052 r->seed &= ACC_UINT32_C(0x7fffffff); 5053 return r->seed; 5054 } 5055 #if defined(acc_int64l_t) 5056 ACCLIB_PUBLIC(void, acc_srand48) (acc_rand48_p r, acc_uint32l_t seed) 5057 { 5058 r->seed = seed & ACC_UINT32_C(0xffffffff); 5059 r->seed <<= 16; r->seed |= 0x330e; 5060 } 5061 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48) (acc_rand48_p r) 5062 { 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); 5066 } 5067 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand48_r32) (acc_rand48_p r) 5068 { 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); 5072 } 5073 #endif 5074 #if defined(acc_int64l_t) 5075 ACCLIB_PUBLIC(void, acc_srand64) (acc_rand64_p r, acc_uint64l_t seed) 5076 { 5077 r->seed = seed & ACC_UINT64_C(0xffffffffffffffff); 5078 } 5079 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64) (acc_rand64_p r) 5080 { 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); 5084 #endif 5085 return (acc_uint32l_t) (r->seed >> 33); 5086 } 5087 ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p r) 5088 { 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); 5092 #endif 5093 return (acc_uint32l_t) (r->seed >> 32); 5094 } 5095 #endif 5096 ACCLIB_PUBLIC(void, acc_srandmt) (acc_randmt_p r, acc_uint32l_t seed) 5097 { 5098 unsigned i = 0; 5099 do { 5100 r->s[i++] = (seed &= ACC_UINT32_C(0xffffffff)); 5101 seed ^= seed >> 30; 5102 seed = seed * ACC_UINT32_C(0x6c078965) + i; 5103 } while (i != 624); 5104 r->n = i; 5105 } 5106 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt) (acc_randmt_p r) 5107 { 5108 return (__ACCLIB_FUNCNAME(acc_randmt_r32)(r)) >> 1; 5109 } 5110 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p r) 5111 { 5112 acc_uint32l_t v; 5113 if __acc_unlikely(r->n == 624) { 5114 int i = 0, j; 5115 r->n = 0; 5116 do { 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); 5123 } 5124 v = r->s[r->n++]; 5125 v ^= v >> 11; v ^= (v & ACC_UINT32_C(0x013a58ad)) << 7; 5126 v ^= (v & ACC_UINT32_C(0x0001df8c)) << 15; v ^= v >> 18; 5127 return v; 5128 } 5129 #if defined(acc_int64l_t) 5130 ACCLIB_PUBLIC(void, acc_srandmt64) (acc_randmt64_p r, acc_uint64l_t seed) 5131 { 5132 unsigned i = 0; 5133 do { 5134 r->s[i++] = (seed &= ACC_UINT64_C(0xffffffffffffffff)); 5135 seed ^= seed >> 62; 5136 seed = seed * ACC_UINT64_C(0x5851f42d4c957f2d) + i; 5137 } while (i != 312); 5138 r->n = i; 5139 } 5140 #if 0 5141 ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt64) (acc_randmt64_p r) 5142 { 5143 acc_uint64l_t v; 5144 v = (__ACCLIB_FUNCNAME(acc_randmt64_r64)(r)) >> 33; 5145 return (acc_uint32l_t) v; 5146 } 5147 #endif 5148 ACCLIB_PUBLIC(acc_uint64l_t, acc_randmt64_r64) (acc_randmt64_p r) 5149 { 5150 acc_uint64l_t v; 5151 if __acc_unlikely(r->n == 312) { 5152 int i = 0, j; 5153 r->n = 0; 5154 do { 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); 5161 } 5162 v = r->s[r->n++]; 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); 5167 } 5168 #endif 5169 #endif 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) 5175 #endif 5176 #if defined(acc_int32e_t) 5177 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290)) 5178 # pragma warn(push) 5179 # pragma warn(disable:2007) 5180 #endif 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" 5194 #else 5195 # define __ACCLIB_RDTSC_REGS : : "r" (t) : "cc", "memory", "eax", "edx" 5196 #endif 5197 #endif 5198 ACCLIB_PUBLIC(int, acc_tsc_read) (acc_uint32e_t* t) 5199 { 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" 5204 __ACCLIB_RDTSC_REGS 5205 ); 5206 return 0; 5207 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC) 5208 ACC_UNUSED(t); 5209 __asm { 5210 mov ecx, t 5211 clc 5212 # if (ACC_CC_MSC && (_MSC_VER < 1200)) 5213 _emit 0x0f 5214 _emit 0x31 5215 # else 5216 rdtsc 5217 # endif 5218 mov [ecx], eax 5219 mov [ecx+4], edx 5220 } 5221 return 0; 5222 #else 5223 t[0] = t[1] = 0; return -1; 5224 #endif 5225 } 5226 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290)) 5227 # pragma warn(pop) 5228 #endif 5229 #endif 5230 #endif 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) 5236 #endif 5237 #if (ACC_OS_OS216) 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); 5240 #endif 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) 5244 { 5245 void __far* p = 0; 5246 union REGS ri, ro; 5247 if ((long)size <= 0) 5248 return p; 5249 size = (size + 15) >> 4; 5250 if (size > 0xffffu) 5251 return p; 5252 ri.x.ax = 0x4800; 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); 5257 return p; 5258 } 5259 ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p) 5260 { 5261 union REGS ri, ro; 5262 struct SREGS rs; 5263 if (!p) 5264 return 0; 5265 if (ACC_PTR_FP_OFF(p) != 0) 5266 return -1; 5267 segread(&rs); 5268 ri.x.ax = 0x4900; 5269 rs.es = ACC_PTR_FP_SEG(p); 5270 int86x(0x21, &ri, &ro, &rs); 5271 if (ro.x.cflag & 1) 5272 return -1; 5273 return 0; 5274 } 5275 #endif 5276 #endif 5277 #if (ACC_OS_OS216) 5278 ACCLIB_PUBLIC(void __far*, acc_dos_alloc) (unsigned long size) 5279 { 5280 void __far* p = 0; 5281 unsigned short sel = 0; 5282 if ((long)size <= 0) 5283 return p; 5284 if (DosAllocHuge((unsigned short)(size >> 16), (unsigned short)size, &sel, 0, 0) == 0) 5285 p = (void __far*) ACC_PTR_MK_FP(sel, 0); 5286 return p; 5287 } 5288 ACCLIB_PUBLIC(int, acc_dos_free) (void __far* p) 5289 { 5290 if (!p) 5291 return 0; 5292 if (ACC_PTR_FP_OFF(p) != 0) 5293 return -1; 5294 if (DosFreeSeg(ACC_PTR_FP_SEG(p)) != 0) 5295 return -1; 5296 return 0; 5297 } 5298 #endif 5299 #endif 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) 5305 #endif 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 5317 #endif 5318 #endif 5319 #if (__ACCLIB_HALLOC_USE_DAH) 5320 #if 0 && (ACC_OS_OS216) 5321 #include <os2.h> 5322 #else 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); 5325 #endif 5326 #endif 5327 #if (__ACCLIB_HALLOC_USE_GA) 5328 #if 0 5329 #define STRICT 1 5330 #include <windows.h> 5331 #else 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*); 5337 #endif 5338 #endif 5339 ACCLIB_PUBLIC(acc_hvoid_p, acc_halloc) (acc_hsize_t size) 5340 { 5341 acc_hvoid_p p = 0; 5342 if (!(size > 0)) 5343 return p; 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); 5349 #else 5350 if ((long)size <= 0) 5351 return p; 5352 { 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); 5359 if (h) { 5360 p = GlobalLock(h); 5361 if (p && ACC_PTR_FP_OFF(p) != 0) { 5362 GlobalUnlock(h); 5363 p = 0; 5364 } 5365 if (!p) 5366 GlobalFree(h); 5367 } 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) 5377 p = lmalloc(size); 5378 #else 5379 if (size < (size_t) -1) 5380 p = malloc((size_t) size); 5381 #endif 5382 } 5383 #endif 5384 return p; 5385 } 5386 ACCLIB_PUBLIC(void, acc_hfree) (acc_hvoid_p p) 5387 { 5388 if (!p) 5389 return; 5390 #if 0 && defined(__palmos__) 5391 MemPtrFree(p); 5392 #elif !defined(ACC_HAVE_MM_HUGE_PTR) 5393 free(p); 5394 #else 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)); 5401 if (h) { 5402 GlobalUnlock(h); 5403 GlobalFree(h); 5404 } 5405 } 5406 #elif (ACC_CC_MSC && (_MSC_VER >= 700)) 5407 _hfree(p); 5408 #elif (ACC_CC_MSC || ACC_CC_WATCOMC) 5409 hfree(p); 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) 5415 lfree(p); 5416 #else 5417 free(p); 5418 #endif 5419 #endif 5420 } 5421 #endif 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) 5427 #endif 5428 ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (void* vfp, acc_hvoid_p buf, acc_hsize_t size) 5429 { 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]; 5435 acc_hsize_t l = 0; 5436 while (l < size) 5437 { 5438 size_t n = size - l > sizeof(tmp) ? sizeof(tmp) : (size_t) (size - l); 5439 n = fread(tmp, 1, n, fp); 5440 if (n == 0) 5441 break; 5442 __ACCLIB_FUNCNAME(acc_hmemcpy)((acc_hbyte_p)buf + l, tmp, (acc_hsize_t)n); 5443 l += n; 5444 } 5445 return l; 5446 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE) 5447 acc_hbyte_p b = (acc_hbyte_p) buf; 5448 acc_hsize_t l = 0; 5449 while (l < size) 5450 { 5451 size_t n; 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); 5456 if (n == 0) 5457 break; 5458 b += n; l += n; 5459 } 5460 return l; 5461 #else 5462 # error "unknown memory model" 5463 #endif 5464 #else 5465 return fread(buf, 1, size, fp); 5466 #endif 5467 } 5468 ACCLIB_PUBLIC(acc_hsize_t, acc_hfwrite) (void* vfp, const acc_hvoid_p buf, acc_hsize_t size) 5469 { 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]; 5475 acc_hsize_t l = 0; 5476 while (l < size) 5477 { 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); 5481 if (n == 0) 5482 break; 5483 l += n; 5484 } 5485 return l; 5486 #elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE) 5487 const acc_hbyte_p b = (const acc_hbyte_p) buf; 5488 acc_hsize_t l = 0; 5489 while (l < size) 5490 { 5491 size_t n; 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); 5496 if (n == 0) 5497 break; 5498 b += n; l += n; 5499 } 5500 return l; 5501 #else 5502 # error "unknown memory model" 5503 #endif 5504 #else 5505 return fwrite(buf, 1, size, fp); 5506 #endif 5507 } 5508 #endif 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) 5514 #endif 5515 ACCLIB_PUBLIC(long, acc_safe_hread) (int fd, acc_hvoid_p buf, long size) 5516 { 5517 acc_hbyte_p b = (acc_hbyte_p) buf; 5518 long l = 0; 5519 int saved_errno; 5520 saved_errno = errno; 5521 while (l < size) 5522 { 5523 long n = size - l; 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); 5529 #else 5530 errno = 0; n = read(fd, b, n); 5531 #endif 5532 if (n == 0) 5533 break; 5534 if (n < 0) { 5535 #if defined(EAGAIN) 5536 if (errno == (EAGAIN)) continue; 5537 #endif 5538 #if defined(EINTR) 5539 if (errno == (EINTR)) continue; 5540 #endif 5541 if (errno == 0) errno = 1; 5542 return l; 5543 } 5544 b += n; l += n; 5545 } 5546 errno = saved_errno; 5547 return l; 5548 } 5549 ACCLIB_PUBLIC(long, acc_safe_hwrite) (int fd, const acc_hvoid_p buf, long size) 5550 { 5551 const acc_hbyte_p b = (const acc_hbyte_p) buf; 5552 long l = 0; 5553 int saved_errno; 5554 saved_errno = errno; 5555 while (l < size) 5556 { 5557 long n = size - l; 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); 5563 #else 5564 errno = 0; n = write(fd, b, n); 5565 #endif 5566 if (n == 0) 5567 break; 5568 if (n < 0) { 5569 #if defined(EAGAIN) 5570 if (errno == (EAGAIN)) continue; 5571 #endif 5572 #if defined(EINTR) 5573 if (errno == (EINTR)) continue; 5574 #endif 5575 if (errno == 0) errno = 1; 5576 return l; 5577 } 5578 b += n; l += n; 5579 } 5580 errno = saved_errno; 5581 return l; 5582 } 5583 #endif 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) 5589 #endif 5590 #if defined(HAVE_GETTIMEOFDAY) 5591 #ifndef acc_pclock_read_gettimeofday 5592 #define acc_pclock_read_gettimeofday acc_pclock_read_gettimeofday 5593 #endif 5594 static int acc_pclock_read_gettimeofday(acc_pclock_handle_p h, acc_pclock_p c) 5595 { 5596 struct timeval tv; 5597 if (gettimeofday(&tv, 0) != 0) 5598 return -1; 5599 #if defined(acc_int64l_t) 5600 c->tv_sec = tv.tv_sec; 5601 #else 5602 c->tv_sec_high = 0; 5603 c->tv_sec_low = tv.tv_sec; 5604 #endif 5605 c->tv_nsec = (acc_uint32l_t) (tv.tv_usec * 1000u); 5606 ACC_UNUSED(h); return 0; 5607 } 5608 #endif 5609 #if defined(CLOCKS_PER_SEC) 5610 #ifndef acc_pclock_read_clock 5611 #define acc_pclock_read_clock acc_pclock_read_clock 5612 #endif 5613 static int acc_pclock_read_clock(acc_pclock_handle_p h, acc_pclock_p c) 5614 { 5615 clock_t ticks; 5616 double secs; 5617 #if defined(acc_int64l_t) 5618 acc_uint64l_t nsecs; 5619 ticks = clock(); 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); 5624 #else 5625 ticks = clock(); 5626 secs = (double)ticks / (CLOCKS_PER_SEC); 5627 c->tv_sec_high = 0; 5628 c->tv_sec_low = (acc_uint32l_t) (secs + 0.5); 5629 c->tv_nsec = 0; 5630 #endif 5631 ACC_UNUSED(h); return 0; 5632 } 5633 #endif 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 5637 #endif 5638 static int acc_pclock_read_uclock(acc_pclock_handle_p h, acc_pclock_p c) 5639 { 5640 acc_uint64l_t ticks; 5641 double secs; 5642 acc_uint64l_t nsecs; 5643 ticks = uclock(); 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; 5649 } 5650 #endif 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 5654 #endif 5655 static int acc_pclock_read_clock_gettime_p(acc_pclock_handle_p h, acc_pclock_p c) 5656 { 5657 struct timespec ts; 5658 if (clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &ts) != 0) 5659 return -1; 5660 c->tv_sec = ts.tv_sec; 5661 c->tv_nsec = ts.tv_nsec; 5662 ACC_UNUSED(h); return 0; 5663 } 5664 #endif 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 5668 #endif 5669 static int acc_pclock_read_getprocesstimes(acc_pclock_handle_p h, acc_pclock_p c) 5670 { 5671 FILETIME ct, et, kt, ut; 5672 acc_uint64l_t ticks; 5673 if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut) == 0) 5674 return -1; 5675 ticks = ((acc_uint64l_t)ut.dwHighDateTime << 32) | ut.dwLowDateTime; 5676 if __acc_unlikely(h->ticks_base == 0) 5677 h->ticks_base = ticks; 5678 else 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; 5683 } 5684 #endif 5685 #if defined(HAVE_GETRUSAGE) && defined(RUSAGE_SELF) 5686 #ifndef acc_pclock_read_getrusage 5687 #define acc_pclock_read_getrusage acc_pclock_read_getrusage 5688 #endif 5689 static int acc_pclock_read_getrusage(acc_pclock_handle_p h, acc_pclock_p c) 5690 { 5691 struct rusage ru; 5692 if (getrusage(RUSAGE_SELF, &ru) != 0) 5693 return -1; 5694 #if defined(acc_int64l_t) 5695 c->tv_sec = ru.ru_utime.tv_sec; 5696 #else 5697 c->tv_sec_high = 0; 5698 c->tv_sec_low = ru.ru_utime.tv_sec; 5699 #endif 5700 c->tv_nsec = (acc_uint32l_t) (ru.ru_utime.tv_usec * 1000u); 5701 ACC_UNUSED(h); return 0; 5702 } 5703 #endif 5704 #if (__ACCLIB_PCLOCK_USE_PERFCTR) 5705 #ifndef acc_pclock_read_perfctr 5706 #define acc_pclock_read_perfctr acc_pclock_read_perfctr 5707 #endif 5708 static int acc_pclock_read_perfctr(acc_pclock_handle_p h, acc_pclock_p c) 5709 { 5710 acc_perfctr_clock_t pcc; 5711 double secs; 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; 5716 else 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; 5723 } 5724 #endif 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 5728 #endif 5729 static int acc_pclock_read_clock_gettime_t(acc_pclock_handle_p h, acc_pclock_p c) 5730 { 5731 struct timespec ts; 5732 if (clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts) != 0) 5733 return -1; 5734 c->tv_sec = ts.tv_sec; 5735 c->tv_nsec = ts.tv_nsec; 5736 ACC_UNUSED(h); return 0; 5737 } 5738 #endif 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 5742 #endif 5743 static int acc_pclock_read_getthreadtimes(acc_pclock_handle_p h, acc_pclock_p c) 5744 { 5745 FILETIME ct, et, kt, ut; 5746 acc_uint64l_t ticks; 5747 if (GetThreadTimes(GetCurrentThread(), &ct, &et, &kt, &ut) == 0) 5748 return -1; 5749 ticks = ((acc_uint64l_t)ut.dwHighDateTime << 32) | ut.dwLowDateTime; 5750 if __acc_unlikely(h->ticks_base == 0) 5751 h->ticks_base = ticks; 5752 else 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; 5757 } 5758 #endif 5759 ACCLIB_PUBLIC(int, acc_pclock_open) (acc_pclock_handle_p h, int mode) 5760 { 5761 acc_pclock_t c; 5762 int i; 5763 h->h = (acclib_handle_t) 0; 5764 h->mode = -1; 5765 h->name = NULL; 5766 h->gettime = 0; 5767 #if defined(acc_int64l_t) 5768 h->ticks_base = 0; 5769 #endif 5770 switch (mode) 5771 { 5772 case ACC_PCLOCK_REALTIME_HR: 5773 # if defined(acc_pclock_read_gettimeofday) 5774 h->gettime = acc_pclock_read_gettimeofday; 5775 h->name = "gettimeofday"; 5776 # endif 5777 break; 5778 case ACC_PCLOCK_REALTIME: 5779 # if defined(acc_pclock_read_gettimeofday) 5780 h->gettime = acc_pclock_read_gettimeofday; 5781 h->name = "gettimeofday"; 5782 # endif 5783 break; 5784 case ACC_PCLOCK_MONOTONIC_HR: 5785 # if defined(acc_pclock_read_uclock) 5786 h->gettime = acc_pclock_read_uclock; 5787 h->name = "uclock"; 5788 # endif 5789 break; 5790 case ACC_PCLOCK_MONOTONIC: 5791 # if defined(acc_pclock_read_clock) 5792 if (!h->gettime) { 5793 h->gettime = acc_pclock_read_clock; 5794 h->name = "clock"; 5795 } 5796 # endif 5797 break; 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"; 5803 break; 5804 } 5805 # endif 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"; 5810 break; 5811 } 5812 # endif 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"; 5817 break; 5818 } 5819 # endif 5820 # if defined(acc_pclock_read_getrusage) 5821 h->gettime = acc_pclock_read_getrusage; 5822 h->name = "getrusage"; 5823 # endif 5824 break; 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"; 5830 } 5831 # endif 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"; 5836 break; 5837 } 5838 # endif 5839 break; 5840 } 5841 if (!h->gettime) 5842 return -1; 5843 if (!h->h) 5844 h->h = (acclib_handle_t) 1; 5845 h->mode = mode; 5846 if (!h->name) 5847 h->name = "unknown"; 5848 for (i = 0; i < 10; i++) { 5849 acc_pclock_read(h, &c); 5850 } 5851 return 0; 5852 } 5853 ACCLIB_PUBLIC(int, acc_pclock_open_default) (acc_pclock_handle_p h) 5854 { 5855 if (acc_pclock_open(h, ACC_PCLOCK_PROCESS_CPUTIME_ID) == 0) 5856 return 0; 5857 if (acc_pclock_open(h, ACC_PCLOCK_MONOTONIC_HR) == 0) 5858 return 0; 5859 if (acc_pclock_open(h, ACC_PCLOCK_REALTIME_HR) == 0) 5860 return 0; 5861 if (acc_pclock_open(h, ACC_PCLOCK_MONOTONIC) == 0) 5862 return 0; 5863 if (acc_pclock_open(h, ACC_PCLOCK_REALTIME) == 0) 5864 return 0; 5865 if (acc_pclock_open(h, ACC_PCLOCK_THREAD_CPUTIME_ID) == 0) 5866 return 0; 5867 return -1; 5868 } 5869 ACCLIB_PUBLIC(int, acc_pclock_close) (acc_pclock_handle_p h) 5870 { 5871 h->h = (acclib_handle_t) 0; 5872 h->mode = -1; 5873 h->name = NULL; 5874 h->gettime = 0; 5875 #if (__ACCLIB_PCLOCK_USE_PERFCTR) 5876 acc_perfctr_close(&h->pch); 5877 #endif 5878 return 0; 5879 } 5880 ACCLIB_PUBLIC(void, acc_pclock_read) (acc_pclock_handle_p h, acc_pclock_p c) 5881 { 5882 if (h->gettime) { 5883 if (h->gettime(h, c) == 0) 5884 return; 5885 } 5886 #if defined(acc_int64l_t) 5887 c->tv_sec = 0; 5888 #else 5889 c->tv_sec_high = 0; 5890 c->tv_sec_low = 0; 5891 #endif 5892 c->tv_nsec = 0; 5893 } 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) 5896 { 5897 double tstop, tstart; 5898 if (!h->h) { 5899 h->mode = -1; 5900 return 0.0; 5901 } 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; 5905 #else 5906 tstop = stop->tv_sec_low + stop->tv_nsec / 1000000000.0; 5907 tstart = start->tv_sec_low + start->tv_nsec / 1000000000.0; 5908 #endif 5909 return tstop - tstart; 5910 } 5911 #endif 5912 ACCLIB_PUBLIC(int, acc_pclock_flush_cpu_cache) (acc_pclock_handle_p h, unsigned flags) 5913 { 5914 if (h->h) { 5915 #if (__ACCLIB_PCLOCK_USE_PERFCTR) 5916 return acc_perfctr_flush_cpu_cache(&h->pch, flags); 5917 #endif 5918 } 5919 ACC_UNUSED(h); ACC_UNUSED(flags); 5920 return -1; 5921 } 5922 #if defined(__ACCLIB_PCLOCK_NEED_WARN_POP) 5923 # if (ACC_CC_MSC && (_MSC_VER >= 1200)) 5924 # pragma warning(pop) 5925 # else 5926 # error "__ACCLIB_PCLOCK_NEED_WARN_POP" 5927 # endif 5928 # undef __ACCLIB_PCLOCK_NEED_WARN_POP 5929 #endif 5930 #endif 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) 5936 #endif 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 5942 # else 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 5947 # endif 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 5952 # endif 5953 # if 1 5954 # include <mmsystem.h> 5955 # else 5956 # if (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_PELLESC) 5957 ACC_EXTERN_C __declspec(dllimport) unsigned long __stdcall timeGetTime(void); 5958 # else 5959 ACC_EXTERN_C unsigned long __stdcall timeGetTime(void); 5960 # endif 5961 # endif 5962 # if (ACC_CC_DMC) 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") 5972 # endif 5973 # endif 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 5980 #endif 5981 #if (__ACCLIB_UCLOCK_USE_CLOCK) && !defined(CLOCKS_PER_SEC) 5982 # if defined(CLK_TCK) 5983 # define CLOCKS_PER_SEC CLK_TCK 5984 # else 5985 # undef __ACCLIB_UCLOCK_USE_CLOCK 5986 # endif 5987 #endif 5988 #if (__ACCLIB_UCLOCK_USE_GETRUSAGE) 5989 # if !defined(RUSAGE_SELF) 5990 # undef __ACCLIB_UCLOCK_USE_GETRUSAGE 5991 # endif 5992 #endif 5993 ACCLIB_PUBLIC(int, acc_uclock_open) (acc_uclock_handle_p h) 5994 { 5995 int i; 5996 #if (__ACCLIB_UCLOCK_USE_QPC) 5997 LARGE_INTEGER li; 5998 #endif 5999 h->h = (acclib_handle_t) 1; 6000 h->mode = 0; 6001 h->name = NULL; 6002 #if (__ACCLIB_UCLOCK_USE_PERFCTR) 6003 h->pch.h = 0; 6004 if (h->mode == 0 && acc_perfctr_open(&h->pch) == 0) 6005 h->mode = 2; 6006 #endif 6007 #if (__ACCLIB_UCLOCK_USE_QPC) 6008 h->qpf = 0.0; 6009 if (h->mode == 0 && QueryPerformanceFrequency(&li) != 0) { 6010 double d = (double) li.QuadPart; 6011 if (d > 0.0 && QueryPerformanceCounter(&li) != 0) { 6012 h->mode = 3; 6013 h->qpf = d; 6014 } 6015 } 6016 #endif 6017 for (i = 0; i < 10; i++) { 6018 acc_uclock_t c; 6019 acc_uclock_read(h, &c); 6020 } 6021 return 0; 6022 } 6023 ACCLIB_PUBLIC(int, acc_uclock_close) (acc_uclock_handle_p h) 6024 { 6025 h->h = (acclib_handle_t) 0; 6026 h->mode = -1; 6027 h->name = NULL; 6028 #if (__ACCLIB_UCLOCK_USE_PERFCTR) 6029 acc_perfctr_close(&h->pch); 6030 #endif 6031 return 0; 6032 } 6033 ACCLIB_PUBLIC(void, acc_uclock_read) (acc_uclock_handle_p h, acc_uclock_p c) 6034 { 6035 #if (__ACCLIB_UCLOCK_USE_RDTSC) 6036 acc_tsc_read((acc_uint32e_t*) (void*) &c->tsc); 6037 #endif 6038 #if (__ACCLIB_UCLOCK_USE_PERFCTR) 6039 if (h->pch.h) { 6040 acc_perfctr_read(&h->pch, &c->pcc); 6041 if (h->mode > 0 && h->mode <= 2) 6042 return; 6043 } 6044 #endif 6045 #if (__ACCLIB_UCLOCK_USE_QPC) 6046 if (h->qpf > 0.0) { 6047 LARGE_INTEGER li; 6048 if (QueryPerformanceCounter(&li) != 0) { 6049 c->qpc = (acc_int64l_t) li.QuadPart; 6050 if (h->mode > 0 && h->mode <= 3) 6051 return; 6052 } else { 6053 h->mode = 0; h->qpf = 0.0; c->qpc = 0; 6054 } 6055 } 6056 #endif 6057 { 6058 #if (ACC_OS_DOS16 || ACC_OS_WIN16) 6059 # if (ACC_CC_AZTECC) 6060 c->ticks.t32 = 0; 6061 # else 6062 union REGS ri, ro; 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; 6065 # endif 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) 6075 struct rusage ru; 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) 6079 struct timeval tv; 6080 if (gettimeofday(&tv, 0) != 0) c->ticks.td = 0; 6081 else c->ticks.td = tv.tv_sec + tv.tv_usec / 1000000.0; 6082 #else 6083 ACC_UNUSED(c); 6084 #endif 6085 } 6086 ACC_UNUSED(h); 6087 } 6088 ACCLIB_PUBLIC(double, acc_uclock_get_elapsed) (acc_uclock_handle_p h, const acc_uclock_p start, const acc_uclock_p stop) 6089 { 6090 double d; 6091 if (!h->h) { 6092 h->mode = -1; 6093 return 0.0; 6094 } 6095 #if (__ACCLIB_UCLOCK_USE_RDTSC) 6096 if (h->mode == 1) { 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; 6100 } 6101 #endif 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); 6106 } 6107 #endif 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; 6113 } 6114 #endif 6115 #if (ACC_OS_DOS16 || ACC_OS_WIN16) 6116 h->mode = 11; 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__) 6121 h->mode = 12; 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) 6125 h->mode = 13; 6126 if (!h->name) h->name = "clock"; 6127 { 6128 acc_int64l_t t; 6129 t = stop->ticks.t64 - start->ticks.t64; 6130 if (t < 0) 6131 t += sizeof(clock_t) == 4 ? ACC_INT64_C(0x100000000) : ACC_INT64_C(0); 6132 d = (double) t / (CLOCKS_PER_SEC); 6133 } 6134 #elif (__ACCLIB_UCLOCK_USE_CLOCK) 6135 h->mode = 14; 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) 6139 h->mode = 15; 6140 if (!h->name) h->name = "timeGetTime"; 6141 d = (double) (stop->ticks.t32 - start->ticks.t32) / 1000.0; 6142 #elif (__ACCLIB_UCLOCK_USE_GETRUSAGE) 6143 h->mode = 16; 6144 if (!h->name) h->name = "getrusage"; 6145 d = stop->ticks.td - start->ticks.td; 6146 #elif (HAVE_GETTIMEOFDAY) 6147 h->mode = 17; 6148 if (!h->name) h->name = "gettimeofday"; 6149 d = stop->ticks.td - start->ticks.td; 6150 #else 6151 h->mode = 0; 6152 d = 0.0; 6153 #endif 6154 return d; 6155 } 6156 ACCLIB_PUBLIC(int, acc_uclock_flush_cpu_cache) (acc_uclock_handle_p h, unsigned flags) 6157 { 6158 if (h->h) { 6159 #if (__ACCLIB_UCLOCK_USE_PERFCTR) 6160 return acc_perfctr_flush_cpu_cache(&h->pch, flags); 6161 #endif 6162 } 6163 ACC_UNUSED(h); ACC_UNUSED(flags); 6164 return -1; 6165 } 6166 #if defined(__ACCLIB_UCLOCK_NEED_WARN_POP) 6167 # if (ACC_CC_MSC && (_MSC_VER >= 1200)) 6168 # pragma warning(pop) 6169 # else 6170 # error "__ACCLIB_UCLOCK_NEED_WARN_POP" 6171 # endif 6172 # undef __ACCLIB_UCLOCK_NEED_WARN_POP 6173 #endif 6174 #endif 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) 6180 #endif 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) 6186 # else 6187 # define ACCLIB_PUBLIC_NOINLINE(r,f) __acc_noinline r __ACCLIB_FUNCNAME(f) 6188 # endif 6189 #endif 6190 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290)) 6191 # pragma warn(push) 6192 # pragma warn(disable:2007) 6193 #endif 6194 ACCLIB_PUBLIC(const char *, acc_getenv) (const char *s) 6195 { 6196 #if defined(HAVE_GETENV) 6197 return getenv(s); 6198 #else 6199 ACC_UNUSED(s); return (const char *) 0; 6200 #endif 6201 } 6202 ACCLIB_PUBLIC(acclib_handle_t, acc_get_osfhandle) (int fd) 6203 { 6204 if (fd < 0) 6205 return -1; 6206 #if (ACC_OS_CYGWIN) 6207 return get_osfhandle(fd); 6208 #elif (ACC_OS_EMX && defined(__RSXNT__)) 6209 return -1; 6210 #elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__) 6211 return -1; 6212 #elif (ACC_OS_WIN32 || ACC_OS_WIN64) 6213 # if (ACC_CC_PELLESC && (__POCC__ < 280)) 6214 return -1; 6215 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1000)) 6216 return -1; 6217 # elif (ACC_CC_WATCOMC && (__WATCOMC__ < 1100)) 6218 return _os_handle(fd); 6219 # else 6220 return _get_osfhandle(fd); 6221 # endif 6222 #else 6223 return fd; 6224 #endif 6225 } 6226 ACCLIB_PUBLIC(int, acc_set_binmode) (int fd, int binary) 6227 { 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; 6233 else return -1; 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); 6239 return -1; 6240 #elif (ACC_OS_DOS16 && (ACC_CC_AZTECC || ACC_CC_PACIFICC)) 6241 ACC_UNUSED(fd); ACC_UNUSED(binary); 6242 return -1; 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; 6255 ACC_UNUSED(binary); 6256 return 1; 6257 #elif (ACC_OS_DOS32 && ACC_CC_HIGHC) 6258 FILE* fp; int r; 6259 if (fd == fileno(stdin)) fp = stdin; 6260 else if (fd == fileno(stdout)) fp = stdout; 6261 else if (fd == fileno(stderr)) fp = stderr; 6262 else return -1; 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); 6268 return -1; 6269 #elif (ACC_OS_CYGWIN && (ACC_CC_GNUC < 0x025a00ul)) 6270 ACC_UNUSED(fd); ACC_UNUSED(binary); 6271 return -1; 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) 6273 int r; 6274 #if !defined(ACC_CC_ZORTECHC) 6275 ACC_COMPILE_TIME_ASSERT(O_BINARY > 0) 6276 #endif 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; 6282 #else 6283 if (fd < 0) return -1; 6284 ACC_UNUSED(binary); 6285 return 1; 6286 #endif 6287 } 6288 ACCLIB_PUBLIC(int, acc_isatty) (int fd) 6289 { 6290 if (fd < 0) 6291 return 0; 6292 #if (ACC_OS_DOS16 && !defined(ACC_CC_AZTECC)) 6293 { 6294 union REGS ri, ro; 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) 6299 return 0; 6300 } 6301 #elif (ACC_OS_DOS32 && ACC_CC_WATCOMC) 6302 { 6303 union REGS ri, ro; 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) 6308 return 0; 6309 } 6310 #elif (ACC_HAVE_WINDOWS_H) 6311 { 6312 acclib_handle_t h = __ACCLIB_FUNCNAME(acc_get_osfhandle)(fd); 6313 if ((HANDLE)h != INVALID_HANDLE_VALUE) 6314 { 6315 DWORD d = 0; 6316 if (GetConsoleMode((HANDLE)h, &d) == 0) 6317 return 0; 6318 } 6319 } 6320 #endif 6321 #if defined(HAVE_ISATTY) 6322 return (isatty(fd)) ? 1 : 0; 6323 #else 6324 return 0; 6325 #endif 6326 } 6327 ACCLIB_PUBLIC(int, acc_mkdir) (const char* name, unsigned mode) 6328 { 6329 #if !defined(HAVE_MKDIR) 6330 ACC_UNUSED(name); ACC_UNUSED(mode); 6331 return -1; 6332 #elif (ACC_ARCH_M68K && ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC)) 6333 ACC_UNUSED(mode); 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) 6340 ACC_UNUSED(mode); 6341 # if (ACC_CC_HIGHC || ACC_CC_PACIFICC) 6342 return mkdir((char*) name); 6343 # else 6344 return mkdir(name); 6345 # endif 6346 #else 6347 return mkdir(name, mode); 6348 #endif 6349 } 6350 ACCLIB_PUBLIC(int, acc_rmdir) (const char* name) 6351 { 6352 #if !defined(HAVE_RMDIR) 6353 ACC_UNUSED(name); 6354 return -1; 6355 #elif ((ACC_OS_DOS16 || ACC_OS_DOS32) && (ACC_CC_HIGHC || ACC_CC_PACIFICC)) 6356 return rmdir((char *) name); 6357 #else 6358 return rmdir(name); 6359 #endif 6360 } 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) 6363 { 6364 acc_int32e_t r = 0; 6365 if __acc_likely(x != 0) 6366 { 6367 #if defined(acc_int64l_t) 6368 r = (acc_int32e_t) (((acc_int64l_t) a * b) / x); 6369 #else 6370 ACC_UNUSED(a); ACC_UNUSED(b); 6371 #endif 6372 } 6373 return r; 6374 } 6375 ACCLIB_PUBLIC(acc_uint32e_t, acc_muldiv32u) (acc_uint32e_t a, acc_uint32e_t b, acc_uint32e_t x) 6376 { 6377 acc_uint32e_t r = 0; 6378 if __acc_likely(x != 0) 6379 { 6380 #if defined(acc_int64l_t) 6381 r = (acc_uint32e_t) (((acc_uint64l_t) a * b) / x); 6382 #else 6383 ACC_UNUSED(a); ACC_UNUSED(b); 6384 #endif 6385 } 6386 return r; 6387 } 6388 #endif 6389 #if 0 6390 ACCLIB_PUBLIC_NOINLINE(int, acc_syscall_clock_gettime) (int c) 6391 { 6392 } 6393 #endif 6394 #if (ACC_OS_WIN16) 6395 ACC_EXTERN_C void __far __pascal DebugBreak(void); 6396 #endif 6397 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_break) (void) 6398 { 6399 #if (ACC_OS_WIN16) 6400 DebugBreak(); 6401 #elif (ACC_ARCH_I086) 6402 #elif (ACC_OS_WIN64) && (ACC_HAVE_WINDOWS_H) 6403 DebugBreak(); 6404 #elif defined(ACC_CFG_NO_INLINE_ASM) && (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H) 6405 DebugBreak(); 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) 6409 __asm { int 3 } 6410 #elif (ACC_OS_WIN32) && (ACC_HAVE_WINDOWS_H) 6411 DebugBreak(); 6412 #else 6413 * (volatile int *) 0x1 = -1; 6414 #endif 6415 } 6416 ACCLIB_PUBLIC_NOINLINE(void, acc_debug_nop) (void) 6417 { 6418 } 6419 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_query) (void) 6420 { 6421 #if (ACC_ARCH_AMD64 || ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) 6422 size_t r; 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) 6426 unsigned long r; 6427 __asm { 6428 pushf 6429 pop eax 6430 mov r,eax 6431 } 6432 return (int)(r >> 18) & 1; 6433 #else 6434 return -1; 6435 #endif 6436 } 6437 ACCLIB_PUBLIC_NOINLINE(int, acc_debug_align_check_enable) (int v) 6438 { 6439 int r; 6440 #if (ACC_ARCH_AMD64) && (ACC_ASM_SYNTAX_GNUC) 6441 if (v) { 6442 __asm__ __volatile__("pushf\n orl $262144,(%%rsp)\n popf\n" : : : __ACC_ASM_CLOBBER); 6443 } else { 6444 __asm__ __volatile__("pushf\n andl $-262145,(%%rsp)\n popf\n" : : : __ACC_ASM_CLOBBER); 6445 } 6446 r = 0; 6447 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_GNUC) 6448 if (v) { 6449 __asm__ __volatile__("pushf\n orl $262144,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER); 6450 } else { 6451 __asm__ __volatile__("pushf\n andl $-262145,(%%esp)\n popf\n" : : : __ACC_ASM_CLOBBER); 6452 } 6453 r = 0; 6454 #elif (ACC_ARCH_I386) && (ACC_ASM_SYNTAX_MSC) 6455 if (v) { __asm { 6456 pushf 6457 or dword ptr [esp],262144 6458 popf 6459 }} else { __asm { 6460 pushf 6461 and dword ptr [esp],-262145 6462 popf 6463 }} 6464 r = 0; 6465 #else 6466 r = -1; 6467 #endif 6468 ACC_UNUSED(v); return r; 6469 } 6470 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_qemu) (void) 6471 { 6472 unsigned r = 0; 6473 #if (ACC_OS_POSIX_LINUX || ACC_OS_WIN32 || ACC_OS_WIN64) 6474 const char* p; 6475 p = acc_getenv("ACC_ENV_RUNNING_ON_QEMU"); 6476 if (p) { 6477 if (p[0] == 0) r = 0; 6478 else if ((p[0] >= '0' && p[0] <= '9') && p[1] == 0) r = p[0] - '0'; 6479 else r = 1; 6480 } 6481 #endif 6482 return r; 6483 } 6484 ACCLIB_PUBLIC_NOINLINE(unsigned, acc_debug_running_on_valgrind) (void) 6485 { 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; 6491 #else 6492 return 0; 6493 #endif 6494 } 6495 #if (ACC_OS_WIN32 && ACC_CC_PELLESC && (__POCC__ >= 290)) 6496 # pragma warn(pop) 6497 #endif 6498 #endif 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) 6504 #endif 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(); } 6510 #endif 6511 #endif 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(); } 6517 #endif 6518 #endif 6519 #if (ACC_OS_EMX) 6520 #define __ACCLIB_HAVE_ACC_WILDARGV 1 6521 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv) 6522 { 6523 if (argc && argv) { 6524 _response(argc, argv); 6525 _wildcard(argc, argv); 6526 } 6527 } 6528 #endif 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) 6533 { 6534 acc_psp_init_module(argc, argv, -1); 6535 } 6536 #endif 6537 #if !defined(__ACCLIB_HAVE_ACC_WILDARGV) 6538 #define __ACCLIB_HAVE_ACC_WILDARGV 1 6539 ACCLIB_PUBLIC(void, acc_wildargv) (int* argc, char*** argv) 6540 { 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__) 6544 __binmode(1); 6545 if (isatty(1)) __set_binmode(stdout, 0); 6546 if (isatty(2)) __set_binmode(stderr, 0); 6547 #endif 6548 ACC_UNUSED(argc); ACC_UNUSED(argv); 6549 } 6550 #endif 6551 #endif 6552 6553 /* vim:set ts=4 et: */ 6554