mirror of
https://github.com/upx/upx
synced 2025-09-28 19:06:07 +08:00
New ACC version.
committer: mfx <mfx> 1074109375 +0000
This commit is contained in:
parent
cdbfdee725
commit
2d1de8b9e9
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -27,7 +27,7 @@
|
|||
#ifndef __ACC_H_INCLUDED
|
||||
#define __ACC_H_INCLUDED 1
|
||||
|
||||
#define ACC_VERSION 20031215L
|
||||
#define ACC_VERSION 20040113L
|
||||
|
||||
#if !defined(ACC_CONFIG_INCLUDE)
|
||||
# define ACC_CONFIG_INCLUDE(file) file
|
||||
|
@ -44,10 +44,16 @@
|
|||
# define __INTEL_COMPILER __ICL
|
||||
#endif
|
||||
|
||||
|
||||
/* disable pedantic warnings */
|
||||
#if defined(__INTEL_COMPILER) && defined(__linux__)
|
||||
# pragma warning(disable: 193) /* #193: zero used for undefined preprocessing identifier */
|
||||
#endif
|
||||
#if defined(_MSC_VER) && !defined(__INTEL_COMPILER)
|
||||
# if (_MSC_VER >= 1300)
|
||||
# pragma warning(disable: 4668) /* -Wall: 4668: 'symbol' is not defined as a preprocessor macro, replacing with '0' */
|
||||
# endif
|
||||
#endif
|
||||
#if 0 && defined(__WATCOMC__)
|
||||
# if (__WATCOMC__ < 1000)
|
||||
# pragma warning 203 9 /* W203: Preprocessing symbol '%s' has not been declared */
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -21,7 +21,7 @@
|
|||
* ACC_ARCH_AMD64
|
||||
* ACC_ARCH_IA16 Intel Architecture (8088, 8086, 80186, 80286)
|
||||
* ACC_ARCH_IA32 Intel Architecture (80386+)
|
||||
* ACC_ARCH_IA64
|
||||
* ACC_ARCH_IA64 Intel Architecture (Itanium)
|
||||
* ACC_ARCH_M68K Motorola 680x0
|
||||
* ACC_ARCH_PPC64 Power PC
|
||||
* ACC_ARCH_SPARC64
|
||||
|
@ -31,10 +31,8 @@
|
|||
* ACC_ENDIAN_BIG_ENDIAN
|
||||
*
|
||||
* Note that this list is not exhaustive - actually we only really care
|
||||
* about architectures which allows unaligned memory access at reasonable
|
||||
* speed (for the moment this means IA16 and IA32).
|
||||
*
|
||||
* FIXME: Need some hard facts on unaligned-timings for AMD64.
|
||||
* about architectures which allow unaligned memory access at reasonable
|
||||
* speed (for the moment this means IA16, IA32 and AMD64).
|
||||
*/
|
||||
|
||||
#if (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
|
||||
|
@ -52,6 +50,9 @@
|
|||
#elif defined(__ia64__) || defined(__ia64) || defined(_M_IA64)
|
||||
# define ACC_ARCH_IA64 1
|
||||
# define ACC_INFO_ARCH "ia64"
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC) && defined(_I386)
|
||||
# define ACC_ARCH_IA32 1
|
||||
# define ACC_INFO_ARCH "ia32"
|
||||
#elif (ACC_OS_DOS32 || ACC_OS_OS2)
|
||||
# error "missing define for CPU architecture"
|
||||
#elif (ACC_OS_WIN32)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -13,10 +13,21 @@
|
|||
*/
|
||||
|
||||
|
||||
/*
|
||||
* Possible configuration values:
|
||||
*
|
||||
* ACC_CONFIG_AUTO_NO_HEADERS
|
||||
* ACC_CONFIG_AUTO_NO_FUNCTIONS
|
||||
* ACC_CONFIG_AUTO_NO_SIZES
|
||||
*/
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// Checks for <stdint.h>
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined(ACC_CONFIG_AUTO_NO_HEADERS)
|
||||
|
||||
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
|
||||
# if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
|
||||
# define HAVE_STDINT_H 1
|
||||
|
@ -33,11 +44,15 @@
|
|||
# include <stdint.h>
|
||||
#endif
|
||||
|
||||
#endif /* !defined(ACC_CONFIG_AUTO_NO_HEADERS) */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// Checks for header files
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined(ACC_CONFIG_AUTO_NO_HEADERS)
|
||||
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
#define HAVE_ASSERT_H 1
|
||||
|
@ -79,6 +94,11 @@
|
|||
# elif (ACC_OS_POSIX_HPUX)
|
||||
# define HAVE_ALLOCA_H 1
|
||||
# endif
|
||||
# if (ACC_OS_POSIX_MACOSX && ACC_CC_MWERKS) && defined(__MSL__)
|
||||
/* FIXME ??? */
|
||||
# undef HAVE_SYS_TIME_H
|
||||
# undef HAVE_SYS_TYPES_H
|
||||
# endif
|
||||
#elif (ACC_OS_CYGWIN)
|
||||
# define HAVE_IO_H 1
|
||||
#elif (ACC_OS_EMX)
|
||||
|
@ -135,7 +155,11 @@
|
|||
# undef HAVE_DIRENT_H /* not working */
|
||||
# undef HAVE_UNISTD_H /* not working */
|
||||
# define HAVE_SYS_DIRENT_H 1
|
||||
#elif defined(__DJGPP__) && defined(__GNUC__)
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
|
||||
# define HAVE_ALLOCA_H 1
|
||||
# undef HAVE_DIRENT_H
|
||||
# undef HAVE_UNISTD_H
|
||||
#elif (ACC_CC_IBMC && ACC_OS_OS2)
|
||||
# undef HAVE_DOS_H
|
||||
# undef HAVE_DIRENT_H
|
||||
|
@ -153,9 +177,14 @@
|
|||
# undef HAVE_DIRENT_H
|
||||
# undef HAVE_DOS_H
|
||||
# undef HAVE_SYS_TIME_H
|
||||
#elif defined(__MINGW32__) && defined(__GNUC__)
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
|
||||
# undef HAVE_UTIME_H
|
||||
# define HAVE_SYS_UTIME_H 1
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
|
||||
# undef HAVE_DOS_H
|
||||
# undef HAVE_SHARE_H
|
||||
# undef HAVE_SYS_TIME_H
|
||||
# define HAVE_ALLOCA_H 1
|
||||
#elif (ACC_CC_PACIFICC)
|
||||
# undef HAVE_DIRECT_H
|
||||
# undef HAVE_DIRENT_H
|
||||
|
@ -169,10 +198,10 @@
|
|||
# undef HAVE_SYS_STAT_H
|
||||
# undef HAVE_SYS_TIME_H
|
||||
# undef HAVE_SYS_TYPES_H
|
||||
#elif (ACC_CC_PGI) && defined(__MINGW32__)
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
|
||||
# undef HAVE_UTIME_H
|
||||
# define HAVE_SYS_UTIME_H 1
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC && defined(__PW32__))
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
|
||||
#elif (ACC_CC_SYMANTECC)
|
||||
# undef HAVE_DIRENT_H /* opendir() not implemented in libc */
|
||||
# undef HAVE_UNISTD_H /* not working */
|
||||
|
@ -209,7 +238,7 @@
|
|||
# undef HAVE_UTIME_H
|
||||
# undef HAVE_SYS_TIME_H
|
||||
# define HAVE_SYS_UTIME_H 1
|
||||
# if (__WATCOMC__ < 900)
|
||||
# if (__WATCOMC__ < 950)
|
||||
# undef HAVE_UNISTD_H
|
||||
# endif
|
||||
#elif (ACC_CC_ZORTECHC)
|
||||
|
@ -227,11 +256,15 @@
|
|||
# define TIME_WITH_SYS_TIME 1
|
||||
#endif
|
||||
|
||||
#endif /* !defined(ACC_CONFIG_AUTO_NO_HEADERS) */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// Checks for library functions
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined(ACC_CONFIG_AUTO_NO_FUNCTIONS)
|
||||
|
||||
#define HAVE_ACCESS 1
|
||||
#define HAVE_ALLOCA 1
|
||||
#define HAVE_ATEXIT 1
|
||||
|
@ -271,7 +304,7 @@
|
|||
#if (ACC_OS_BEOS || ACC_OS_CYGWIN || ACC_OS_POSIX || ACC_OS_QNX)
|
||||
# define HAVE_STRCASECMP 1
|
||||
# define HAVE_STRNCASECMP 1
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC && defined(__PW32__))
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
|
||||
# define HAVE_STRCASECMP 1
|
||||
# define HAVE_STRNCASECMP 1
|
||||
#else
|
||||
|
@ -284,6 +317,11 @@
|
|||
# if (ACC_CC_TINYC)
|
||||
# undef HAVE_ALLOCA
|
||||
# endif
|
||||
# if (ACC_OS_POSIX_MACOSX && ACC_CC_MWERKS) && defined(__MSL__)
|
||||
/* FIXME ??? */
|
||||
# undef HAVE_CHOWN
|
||||
# undef HAVE_LSTAT
|
||||
# endif
|
||||
#elif (ACC_OS_CYGWIN)
|
||||
# if (ACC_CC_GNUC < 0x025f00ul)
|
||||
# undef HAVE_SNPRINTF
|
||||
|
@ -341,9 +379,15 @@
|
|||
# undef HAVE_VSNPRINTF
|
||||
# endif
|
||||
#elif (ACC_CC_DMC)
|
||||
# if (ACC_OS_WIN16)
|
||||
# undef HAVE_ALLOCA
|
||||
# endif
|
||||
# define snprintf _snprintf
|
||||
# define vsnprintf _vsnprintf
|
||||
#elif defined(__DJGPP__) && defined(__GNUC__)
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
# undef HAVE_SNPRINTF
|
||||
# undef HAVE_VSNPRINTF
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
|
||||
# undef HAVE_SNPRINTF
|
||||
# undef HAVE_VSNPRINTF
|
||||
#elif (ACC_CC_IBMC)
|
||||
|
@ -368,7 +412,7 @@
|
|||
# if ((_MSC_VER < 800) && ACC_OS_WIN16)
|
||||
# undef HAVE_ALLOCA
|
||||
# endif
|
||||
#elif defined(__MINGW32__) && defined(__GNUC__)
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__MINGW32__)
|
||||
# if (ACC_CC_GNUC < 0x025f00ul)
|
||||
# undef HAVE_SNPRINTF
|
||||
# undef HAVE_VSNPRINTF
|
||||
|
@ -376,6 +420,8 @@
|
|||
# define snprintf _snprintf
|
||||
# define vsnprintf _vsnprintf
|
||||
# endif
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
|
||||
# undef HAVE_SETMODE
|
||||
#elif (ACC_CC_PACIFICC)
|
||||
# undef HAVE_ACCESS
|
||||
# undef HAVE_ALLOCA
|
||||
|
@ -388,10 +434,10 @@
|
|||
# undef HAVE_STRFTIME
|
||||
# undef HAVE_UTIME
|
||||
# undef HAVE_VSNPRINTF
|
||||
#elif (ACC_CC_PGI) && defined(__MINGW32__)
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_PGI) && defined(__MINGW32__)
|
||||
# define snprintf _snprintf
|
||||
# define vsnprintf _vsnprintf
|
||||
#elif (ACC_OS_WIN32 && defined(__PW32__) && defined(__GNUC__))
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
|
||||
# undef HAVE_SNPRINTF
|
||||
# undef HAVE_VSNPRINTF
|
||||
#elif (ACC_CC_SYMANTECC)
|
||||
|
@ -448,10 +494,15 @@
|
|||
#endif /* DOS, OS/2 & Windows */
|
||||
|
||||
|
||||
#endif /* !defined(ACC_CONFIG_AUTO_NO_FUNCTIONS) */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// Checks for typedefs and structures
|
||||
// Checks for sizes
|
||||
**************************************************************************/
|
||||
|
||||
#if !defined(ACC_CONFIG_AUTO_NO_SIZES)
|
||||
|
||||
#define SIZEOF_SHORT (__ACC_SHORT_BIT / 8)
|
||||
#define SIZEOF_INT (__ACC_INT_BIT / 8)
|
||||
#define SIZEOF_LONG (__ACC_LONG_BIT / 8)
|
||||
|
@ -469,16 +520,18 @@
|
|||
# else
|
||||
# error "ACC_MM"
|
||||
# endif
|
||||
# if (ACC_MM_HUGE)
|
||||
# define SIZEOF_PTRDIFF_T 4
|
||||
# if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
|
||||
# define SIZEOF_PTRDIFF_T 2
|
||||
# elif (ACC_MM_COMPACT || ACC_MM_LARGE)
|
||||
# if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
|
||||
# define SIZEOF_PTRDIFF_T 4
|
||||
# else
|
||||
# define SIZEOF_PTRDIFF_T 2
|
||||
# endif
|
||||
# elif (ACC_MM_HUGE)
|
||||
# define SIZEOF_PTRDIFF_T 4
|
||||
# else
|
||||
# define SIZEOF_PTRDIFF_T 2
|
||||
# error "ACC_MM"
|
||||
# endif
|
||||
#else
|
||||
# define SIZEOF_PTRDIFF_T SIZEOF_LONG
|
||||
|
@ -507,7 +560,7 @@
|
|||
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC && defined(__linux__)))
|
||||
# define SIZEOF_LONG_LONG 8
|
||||
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
#elif (ACC_ARCH_IA32 && (ACC_CC_PGI))
|
||||
#elif (ACC_ARCH_IA32 && (ACC_CC_MWERKS || ACC_CC_PGI))
|
||||
# define SIZEOF_LONG_LONG 8
|
||||
# define SIZEOF_UNSIGNED_LONG_LONG 8
|
||||
#elif (ACC_ARCH_IA32 && (ACC_CC_INTELC || ACC_CC_MSC))
|
||||
|
@ -533,6 +586,8 @@
|
|||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* !defined(ACC_CONFIG_AUTO_NO_SIZES) */
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
// misc
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -51,6 +51,10 @@
|
|||
# define ACC_CC_DECC 1
|
||||
# define ACC_INFO_CC "DEC C"
|
||||
# define ACC_INFO_CCVER ACC_MACRO_EXPAND(__DECC)
|
||||
#elif defined(__HIGHC__)
|
||||
# define ACC_CC_HIGHC 1
|
||||
# define ACC_INFO_CC "MetaWare High C"
|
||||
# define ACC_INFO_CCVER "unknown"
|
||||
#elif defined(__IBMC__)
|
||||
# define ACC_CC_IBMC 1
|
||||
# define ACC_INFO_CC "IBM C"
|
||||
|
@ -64,10 +68,9 @@
|
|||
# define ACC_INFO_CC "Microsoft C"
|
||||
# define ACC_INFO_CCVER ACC_MACRO_EXPAND(_MSC_VER)
|
||||
#elif defined(__MWERKS__)
|
||||
/* FIXME */
|
||||
# define ACC_CC_MWERKS 1
|
||||
# define ACC_INFO_CC "Metrowerks C"
|
||||
# define ACC_INFO_CCVER "unknown"
|
||||
# define ACC_INFO_CCVER ACC_MACRO_EXPAND(__MWERKS__)
|
||||
#elif defined(__PACIFIC__)
|
||||
# define ACC_CC_PACIFICC 1
|
||||
# define ACC_INFO_CC "Pacific C"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -115,6 +115,8 @@
|
|||
#endif
|
||||
#if defined(acc_alignof)
|
||||
ACCCHK_ASSERT(acc_alignof(char) == 1)
|
||||
ACCCHK_ASSERT(acc_alignof(signed char) == 1)
|
||||
ACCCHK_ASSERT(acc_alignof(unsigned char) == 1)
|
||||
#endif
|
||||
|
||||
ACCCHK_ASSERT_IS_SIGNED_T(short)
|
||||
|
@ -214,14 +216,22 @@
|
|||
ACCCHK_ASSERT(((( ACC_UINT32E_C(1) << 31) + 1) >> 31) == 1)
|
||||
|
||||
ACCCHK_ASSERT( (acc_int32e_t) (1 + ~(acc_int32e_t)0) == 0)
|
||||
#if defined(ACCCHK_PEDANTIC)
|
||||
#if defined(ACCCHK_CONFIG_PEDANTIC)
|
||||
/* compiler may warn about overflow */
|
||||
ACCCHK_ASSERT( (acc_uint32e_t)(1 + ~(acc_uint32e_t)0) == 0)
|
||||
#endif
|
||||
#endif /* ACCCHK_CONFIG_PEDANTIC */
|
||||
|
||||
#if (SIZEOF_ACC_INT32E_T < SIZEOF_INT)
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT32E_C(0)) == sizeof(int))
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT32E_C(0)) == sizeof(int))
|
||||
#else
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT32E_C(0)) == SIZEOF_ACC_INT32E_T)
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT32E_C(0)) == SIZEOF_ACC_INT32E_T)
|
||||
#endif
|
||||
ACCCHK_ASSERT((ACC_INT32E_C(1) << (8*SIZEOF_ACC_INT32E_T-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_UINT32E_C(1) << (8*SIZEOF_ACC_INT32E_T-1)) > 0)
|
||||
|
||||
ACCCHK_ASSERT((ACC_INT32E_C(1) << (int)(8*sizeof(ACC_INT32E_C(1))-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_UINT32E_C(1) << (int)(8*sizeof(ACC_UINT32E_C(1))-1)) > 0)
|
||||
ACCCHK_ASSERT(ACC_INT32E_C(2147483647) > 0)
|
||||
ACCCHK_ASSERT(ACC_INT32E_C(-2147483647) -1 < 0)
|
||||
ACCCHK_ASSERT(ACC_UINT32E_C(4294967295) > 0)
|
||||
|
@ -247,9 +257,16 @@
|
|||
ACCCHK_ASSERT(((( (acc_uint32l_t)1 << 31) + 1) >> 31) == 1)
|
||||
ACCCHK_ASSERT(((( ACC_UINT32L_C(1) << 31) + 1) >> 31) == 1)
|
||||
|
||||
#if (SIZEOF_ACC_INT32L_T < SIZEOF_INT)
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT32L_C(0)) == sizeof(int))
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT32L_C(0)) == sizeof(int))
|
||||
#else
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT32L_C(0)) == SIZEOF_ACC_INT32L_T)
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT32L_C(0)) == SIZEOF_ACC_INT32L_T)
|
||||
#endif
|
||||
ACCCHK_ASSERT((ACC_INT32L_C(1) << (8*SIZEOF_ACC_INT32L_T-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_UINT32L_C(1) << (8*SIZEOF_ACC_INT32L_T-1)) > 0)
|
||||
ACCCHK_ASSERT((ACC_INT32L_C(1) << (int)(8*sizeof(ACC_UINT32L_C(1))-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_INT32L_C(1) << (int)(8*sizeof(ACC_INT32L_C(1))-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_UINT32L_C(1) << (int)(8*sizeof(ACC_UINT32L_C(1))-1)) > 0)
|
||||
ACCCHK_ASSERT(ACC_INT32L_C(2147483647) > 0)
|
||||
ACCCHK_ASSERT(ACC_INT32L_C(-2147483647) -1 < 0)
|
||||
|
@ -278,9 +295,16 @@
|
|||
ACCCHK_ASSERT(((( (acc_uint32f_t)1 << 31) + 1) >> 31) == 1)
|
||||
ACCCHK_ASSERT(((( ACC_UINT32F_C(1) << 31) + 1) >> 31) == 1)
|
||||
|
||||
#if (SIZEOF_ACC_INT32F_T < SIZEOF_INT)
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT32F_C(0)) == sizeof(int))
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT32F_C(0)) == sizeof(int))
|
||||
#else
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT32F_C(0)) == SIZEOF_ACC_INT32F_T)
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT32F_C(0)) == SIZEOF_ACC_INT32F_T)
|
||||
#endif
|
||||
ACCCHK_ASSERT((ACC_INT32F_C(1) << (8*SIZEOF_ACC_INT32F_T-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_UINT32F_C(1) << (8*SIZEOF_ACC_INT32F_T-1)) > 0)
|
||||
ACCCHK_ASSERT((ACC_INT32F_C(1) << (int)(8*sizeof(ACC_UINT32F_C(1))-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_INT32F_C(1) << (int)(8*sizeof(ACC_INT32F_C(1))-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_UINT32F_C(1) << (int)(8*sizeof(ACC_UINT32F_C(1))-1)) > 0)
|
||||
ACCCHK_ASSERT(ACC_INT32F_C(2147483647) > 0)
|
||||
ACCCHK_ASSERT(ACC_INT32F_C(-2147483647) -1 < 0)
|
||||
|
@ -299,6 +323,7 @@
|
|||
ACCCHK_ASSERT(((( ACC_INT64L_C(1) << 62) + 1) >> 62) == 1)
|
||||
|
||||
#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0530))
|
||||
/* Borland C is broken */
|
||||
#else
|
||||
ACCCHK_ASSERT_IS_UNSIGNED_T(acc_uint64l_t)
|
||||
ACCCHK_ASSERT(ACC_UINT64L_C(18446744073709551615) > 0)
|
||||
|
@ -306,6 +331,17 @@
|
|||
ACCCHK_ASSERT(((( (acc_uint64l_t)1 << 63) + 1) >> 63) == 1)
|
||||
ACCCHK_ASSERT(((( ACC_UINT64L_C(1) << 63) + 1) >> 63) == 1)
|
||||
|
||||
#if defined(ACCCHK_CONFIG_PEDANTIC)
|
||||
#if (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0560))
|
||||
/* Borland C is broken */
|
||||
#elif (SIZEOF_ACC_INT64L_T < SIZEOF_INT)
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT64L_C(0)) == sizeof(int))
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT64L_C(0)) == sizeof(int))
|
||||
#else
|
||||
ACCCHK_ASSERT(sizeof(ACC_INT64L_C(0)) == SIZEOF_ACC_INT64L_T)
|
||||
ACCCHK_ASSERT(sizeof(ACC_UINT64L_C(0)) == SIZEOF_ACC_INT64L_T)
|
||||
#endif
|
||||
#endif /* ACCCHK_CONFIG_PEDANTIC */
|
||||
ACCCHK_ASSERT((ACC_INT64L_C(1) << (8*SIZEOF_ACC_INT64L_T-1)) < 0)
|
||||
ACCCHK_ASSERT((ACC_UINT64L_C(1) << (8*SIZEOF_ACC_INT64L_T-1)) > 0)
|
||||
ACCCHK_ASSERT(ACC_INT64L_C(9223372036854775807) > 0)
|
||||
|
@ -330,8 +366,11 @@
|
|||
**************************************************************************/
|
||||
|
||||
#if (ACC_MM_FLAT)
|
||||
#if 0
|
||||
/* this is not a valid assumption -- disabled */
|
||||
ACCCHK_ASSERT(sizeof(void*) == sizeof(void (*)(void)))
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
|
||||
ACCCHK_ASSERT(sizeof(void*) == 2)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -56,6 +56,27 @@ static int __ACCCHKR_FUNCNAME(strength_reduce_bug)(int*);
|
|||
|
||||
static int __ACCCHKR_FUNCNAME(check)(int r)
|
||||
{
|
||||
#if defined(ACC_ENDIAN_BIG_ENDIAN)
|
||||
{
|
||||
union { long l; unsigned char c[sizeof(long)]; } u;
|
||||
u.l = 0; u.c[sizeof(long)-1] = 0x80;
|
||||
r &= ACCCHKR_ASSERT(u.l == 128);
|
||||
u.l = 0; u.c[0] = 0x80;
|
||||
r &= ACCCHKR_ASSERT(u.l < 0);
|
||||
ACC_UNUSED(u);
|
||||
}
|
||||
#endif
|
||||
#if defined(ACC_ENDIAN_LITTLE_ENDIAN)
|
||||
{
|
||||
union { long l; unsigned char c[sizeof(long)]; } u;
|
||||
u.l = 0; u.c[0] = 0x80;
|
||||
r &= ACCCHKR_ASSERT(u.l == 128);
|
||||
u.l = 0; u.c[sizeof(long)-1] = 0x80;
|
||||
r &= ACCCHKR_ASSERT(u.l < 0);
|
||||
ACC_UNUSED(u);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* check for the gcc schedule-insns optimization bug */
|
||||
if (r == 1)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -23,14 +23,17 @@
|
|||
// ACC_CXX_NOTHROW
|
||||
**************************************************************************/
|
||||
|
||||
#if (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
|
||||
#if defined(ACC_CXX_NOTHROW)
|
||||
#elif (ACC_CC_GNUC && (ACC_CC_GNUC < 0x020800ul))
|
||||
# define ACC_CXX_NOTHROW
|
||||
#elif (ACC_CC_BORLANDC && (__BORLANDC__ < 0x0450))
|
||||
# define ACC_CXX_NOTHROW
|
||||
#elif (ACC_CC_TURBOC)
|
||||
#elif (ACC_CC_HIGHC)
|
||||
# define ACC_CXX_NOTHROW
|
||||
#elif (ACC_CC_MSC && (_MSC_VER < 1100))
|
||||
# define ACC_CXX_NOTHROW
|
||||
#elif (ACC_CC_TURBOC)
|
||||
# define ACC_CXX_NOTHROW
|
||||
#elif (ACC_CC_WATCOMC && !defined(_CPPUNWIND))
|
||||
# define ACC_CXX_NOTHROW
|
||||
#elif (ACC_CC_ZORTECHC)
|
||||
|
@ -126,6 +129,9 @@
|
|||
#if !defined(ACC_CXX_DISABLE_NEW_DELETE) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025b00ul))
|
||||
# define ACC_CXX_DISABLE_NEW_DELETE private:
|
||||
#endif
|
||||
#if !defined(ACC_CXX_DISABLE_NEW_DELETE) && (ACC_CC_HIGHC)
|
||||
# define ACC_CXX_DISABLE_NEW_DELETE private:
|
||||
#endif
|
||||
|
||||
|
||||
#if !defined(ACC_CXX_DISABLE_NEW_DELETE) && !(__ACC_CXX_HAVE_ARRAY_NEW)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -18,7 +18,7 @@
|
|||
************************************************************************/
|
||||
|
||||
#if !defined(ACC_UNUSED)
|
||||
# if (ACC_CC_BORLANDC || ACC_CC_TURBOC)
|
||||
# if (ACC_CC_BORLANDC || ACC_CC_HIGHC || ACC_CC_TURBOC)
|
||||
# define ACC_UNUSED(var) if (&var) ; else
|
||||
# elif (ACC_CC_MSC && (_MSC_VER < 900))
|
||||
# define ACC_UNUSED(var) if (&var) ; else
|
||||
|
@ -144,7 +144,7 @@
|
|||
#if (ACC_CC_TURBOC && (__TURBOC__ <= 0x0295))
|
||||
#elif defined(__cplusplus)
|
||||
# define acc_inline inline
|
||||
#elif (ACC_CC_BORLANDC && ACC_MM_FLAT && (__BORLANDC__ >= 0x0500))
|
||||
#elif (ACC_CC_BORLANDC && ACC_MM_FLAT && (__BORLANDC__ >= 0x0550))
|
||||
# define acc_inline __inline
|
||||
#elif (ACC_CC_DMC)
|
||||
# define acc_inline __inline
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -22,6 +22,9 @@
|
|||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#if defined(HAVE_TIME_H) && defined(__MSL__) && defined(__cplusplus)
|
||||
# include <time.h>
|
||||
#endif
|
||||
#if HAVE_SYS_TYPES_H
|
||||
# include <sys/types.h>
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -25,7 +25,7 @@
|
|||
# include <tos.h>
|
||||
#elif (ACC_OS_WIN32 || ACC_OS_WIN64 || ACC_OS_CYGWIN || (ACC_OS_EMX && defined(__RSXNT__)))
|
||||
# if (ACC_CC_WATCOMC && (__WATCOMC__ < 1000))
|
||||
# elif (ACC_OS_WIN32 && ACC_CC_GNUC && defined(__PW32__))
|
||||
# elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
|
||||
/* ancient pw32 version */
|
||||
# elif ((ACC_OS_CYGWIN || defined(__MINGW32__)) && (ACC_CC_GNUC && (ACC_CC_GNUC < 0x025f00ul)))
|
||||
/* ancient cygwin/mingw version */
|
||||
|
@ -50,7 +50,7 @@
|
|||
# elif (ACC_CC_BORLANDC || ACC_CC_TURBOC)
|
||||
# include <alloc.h>
|
||||
# include <dir.h>
|
||||
# elif defined(__DJGPP__)
|
||||
# elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
# include <sys/exceptn.h>
|
||||
# elif (ACC_CC_PACIFICC)
|
||||
# include <unixio.h>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -168,27 +168,31 @@ ACCLIB_EXTERN(long, acc_hwrite) (int, const acc_hvoid_p, long);
|
|||
**************************************************************************/
|
||||
|
||||
/* maximum length of full pathname (excl. '\0') */
|
||||
#if !defined(ACC_FN_PATH_MAX)
|
||||
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
|
||||
# define ACC_FN_PATH_MAX 143
|
||||
#elif (ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN32 || ACC_OS_WIN64)
|
||||
# define ACC_FN_PATH_MAX 259
|
||||
#elif (ACC_OS_TOS)
|
||||
# define ACC_FN_PATH_MAX 259
|
||||
#else
|
||||
#endif
|
||||
#endif
|
||||
#if !defined(ACC_FN_PATH_MAX)
|
||||
/* arbitrary limit for acclib implementation */
|
||||
# define ACC_FN_PATH_MAX 1024
|
||||
#endif
|
||||
|
||||
/* maximum length of a filename (a single path component) (excl. '\0') */
|
||||
#if !defined(ACC_FN_NAME_MAX)
|
||||
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
|
||||
# define ACC_FN_NAME_MAX 12
|
||||
#elif (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
|
||||
# define ACC_FN_NAME_MAX 12
|
||||
#elif (ACC_OS_DOS32 && defined(__DJGPP__))
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
#elif (ACC_OS_DOS32)
|
||||
# define ACC_FN_NAME_MAX 12
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#if !defined(ACC_FN_NAME_MAX)
|
||||
# define ACC_FN_NAME_MAX ACC_FN_PATH_MAX
|
||||
#endif
|
||||
|
@ -210,7 +214,7 @@ ACCLIB_EXTERN(int, acc_fnmatch) (const acc_hchar_p, const acc_hchar_p, int);
|
|||
#if (HAVE_DIRENT_H || ACC_CC_WATCOMC)
|
||||
# define __ACCLIB_USE_OPENDIR 1
|
||||
# if (ACC_OS_DOS32 && defined(__BORLANDC__))
|
||||
# elif (ACC_OS_DOS32 && defined(__DJGPP__))
|
||||
# elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
# elif (ACC_OS_OS2 || ACC_OS_OS216)
|
||||
# elif (ACC_OS_TOS && ACC_CC_GNUC)
|
||||
# elif (ACC_OS_WIN32 && !defined(ACC_H_WINDOWS_H))
|
||||
|
@ -264,20 +268,31 @@ ACCLIB_EXTERN(int, acc_closedir) (acc_dir_p);
|
|||
// wrap misc
|
||||
**************************************************************************/
|
||||
|
||||
#undef acc_alloca
|
||||
#if defined(__CYGWIN__) || defined(__MINGW32__)
|
||||
#if (ACC_CC_GNUC) && (defined(__CYGWIN__) || defined(__MINGW32__))
|
||||
# define acc_alloca(x) __builtin_alloca((x))
|
||||
#elif defined(__BORLANDC__) && defined(__linux__)
|
||||
#elif (ACC_CC_BORLANDC) && defined(__linux__)
|
||||
/* FIXME: alloca does not work */
|
||||
#elif (HAVE_ALLOCA)
|
||||
# define acc_alloca(x) alloca((x))
|
||||
#endif
|
||||
|
||||
#if (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
# define acc_stackavail() stackavail()
|
||||
#elif ((ACC_ARCH_IA16) && ACC_CC_MSC && (_MSC_VER < 700))
|
||||
# define acc_stackavail() stackavail()
|
||||
#elif ((ACC_ARCH_IA16) && ACC_CC_MSC && (_MSC_VER < 900))
|
||||
# define acc_stackavail() _stackavail()
|
||||
#elif ((ACC_ARCH_IA16 || ACC_ARCH_IA32) && (ACC_CC_DMC || ACC_CC_SYMANTECC))
|
||||
# define acc_stackavail() stackavail()
|
||||
#elif ((ACC_ARCH_IA16 || ACC_ARCH_IA32) && (ACC_CC_WATCOMC))
|
||||
# define acc_stackavail() stackavail()
|
||||
#endif
|
||||
|
||||
ACCLIB_EXTERN(acclib_handle_t, acc_get_osfhandle) (int);
|
||||
ACCLIB_EXTERN(int, acc_isatty) (int);
|
||||
ACCLIB_EXTERN(int, acc_mkdir) (const char*, unsigned);
|
||||
ACCLIB_EXTERN(int, acc_response) (int*, char***);
|
||||
ACCLIB_EXTERN(int, acc_set_binmode) (int, int);
|
||||
ACCLIB_EXTERN(int, acc_isatty) (int);
|
||||
ACCLIB_EXTERN(int, acc_mkdir) (const char*, unsigned);
|
||||
ACCLIB_EXTERN(int, acc_response) (int*, char***);
|
||||
ACCLIB_EXTERN(int, acc_set_binmode) (int, int);
|
||||
|
||||
ACCLIB_EXTERN(acc_int32l_t, acc_muldiv32) (acc_int32l_t, acc_int32l_t, acc_int32l_t);
|
||||
ACCLIB_EXTERN(acc_uint32l_t, acc_umuldiv32) (acc_uint32l_t, acc_uint32l_t, acc_uint32l_t);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -119,7 +119,7 @@
|
|||
#elif defined(__TOS__) || defined(__atarist__)
|
||||
# define ACC_OS_TOS 1
|
||||
# define ACC_INFO_OS "tos"
|
||||
#elif defined(macintosh)
|
||||
#elif defined(macintosh) && !defined(__ppc__)
|
||||
# define ACC_OS_MACCLASSIC 1
|
||||
# define ACC_INFO_OS "macclassic"
|
||||
#elif defined(__VMS)
|
||||
|
@ -147,7 +147,7 @@
|
|||
# elif defined(__linux__) || defined(__linux)
|
||||
# define ACC_OS_POSIX_LINUX 1
|
||||
# define ACC_INFO_OS_POSIX "linux"
|
||||
# elif defined(__APPLE__)
|
||||
# elif defined(__APPLE__) || defined(__MACOS__)
|
||||
# define ACC_OS_POSIX_MACOSX 1
|
||||
# define ACC_INFO_OS_POSIX "macosx"
|
||||
# elif defined(__NetBSD__)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -94,8 +94,8 @@ __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t;
|
|||
#if defined(acc_int32e_t)
|
||||
# define acc_int32l_t acc_int32e_t
|
||||
# define acc_uint32l_t acc_uint32e_t
|
||||
# define ACC_INT32L_C ACC_INT32E_C
|
||||
# define ACC_UINT32L_C ACC_UINT32E_C
|
||||
# define ACC_INT32L_C(c) ACC_INT32E_C(c)
|
||||
# define ACC_UINT32L_C(c) ACC_UINT32E_C(c)
|
||||
# define SIZEOF_ACC_INT32L_T SIZEOF_ACC_INT32E_T
|
||||
#elif (SIZEOF_INT > 4)
|
||||
# define acc_int32l_t int
|
||||
|
@ -132,8 +132,8 @@ __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t;
|
|||
#elif defined(acc_int32e_t)
|
||||
# define acc_int32f_t acc_int32e_t
|
||||
# define acc_uint32f_t acc_uint32e_t
|
||||
# define ACC_INT32F_C ACC_INT32E_C
|
||||
# define ACC_UINT32F_C ACC_UINT32E_C
|
||||
# define ACC_INT32F_C(c) ACC_INT32E_C(c)
|
||||
# define ACC_UINT32F_C(c) ACC_UINT32E_C(c)
|
||||
# define SIZEOF_ACC_INT32F_T SIZEOF_ACC_INT32E_T
|
||||
#else
|
||||
# error "acc_int32f_t"
|
||||
|
@ -246,7 +246,7 @@ __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t;
|
|||
************************************************************************/
|
||||
|
||||
#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
|
||||
# if (ACC_CC_GNUC || ACC_CC_PACIFICC)
|
||||
# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_PACIFICC)
|
||||
# elif (ACC_CC_DMC || ACC_CC_SYMANTECC || ACC_CC_ZORTECHC)
|
||||
# define __acc_cdecl __cdecl
|
||||
# define __acc_cdecl_atexit
|
||||
|
@ -266,7 +266,7 @@ __acc_gnuc_extension__ typedef unsigned long long acc_ullong_t;
|
|||
# define __acc_cdecl_main __cdecl
|
||||
# define __acc_cdecl_qsort __cdecl
|
||||
# endif
|
||||
# if (ACC_CC_GNUC || ACC_CC_PACIFICC || ACC_CC_WATCOMC)
|
||||
# if (ACC_CC_GNUC || ACC_CC_HIGHC || ACC_CC_PACIFICC || ACC_CC_WATCOMC)
|
||||
# elif (ACC_OS_OS2 && (ACC_CC_DMC || ACC_CC_SYMANTECC))
|
||||
# define __acc_cdecl_sighandler __pascal
|
||||
# elif (ACC_OS_OS2 && (ACC_CC_ZORTECHC))
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -27,6 +27,7 @@ ACCLIB_PUBLIC(acc_hsize_t, acc_hfread) (ACC_FILE_P fp, acc_hvoid_p buf, acc_hsiz
|
|||
{
|
||||
#if (ACC_HAVE_MM_HUGE_PTR)
|
||||
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
|
||||
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
|
||||
unsigned char tmp[512];
|
||||
acc_hsize_t l = 0;
|
||||
|
||||
|
@ -69,6 +70,7 @@ ACCLIB_PUBLIC(acc_hsize_t, acc_hfwrite) (ACC_FILE_P fp, const acc_hvoid_p buf, a
|
|||
{
|
||||
#if (ACC_HAVE_MM_HUGE_PTR)
|
||||
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
|
||||
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
|
||||
unsigned char tmp[512];
|
||||
acc_hsize_t l = 0;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -28,6 +28,7 @@
|
|||
ACCLIB_PUBLIC(long, acc_hread) (int fd, acc_hvoid_p buf, long size)
|
||||
{
|
||||
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
|
||||
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
|
||||
unsigned char tmp[512];
|
||||
long l = 0;
|
||||
|
||||
|
@ -70,6 +71,7 @@ ACCLIB_PUBLIC(long, acc_hread) (int fd, acc_hvoid_p buf, long size)
|
|||
ACCLIB_PUBLIC(long, acc_hwrite) (int fd, const acc_hvoid_p buf, long size)
|
||||
{
|
||||
#if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
|
||||
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
|
||||
unsigned char tmp[512];
|
||||
long l = 0;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -124,6 +124,7 @@ ACCLIB_PUBLIC(acc_hchar_p, acc_ascii_hstristr) (const acc_hchar_p p, const acc_h
|
|||
|
||||
ACCLIB_PUBLIC(acc_hvoid_p, acc_hmemmem) (const acc_hvoid_p p, acc_hsize_t pn, const acc_hvoid_p s, acc_hsize_t sn)
|
||||
{
|
||||
#define __ACCLIB_REQUIRE_HMEMCPY_CH 1
|
||||
if (sn == 0) __ACCLIB_CONST_CAST_RETURN(acc_hvoid_p, p)
|
||||
for ( ; pn >= sn; --pn) {
|
||||
if (__ACCLIB_FUNCNAME(acc_hmemcmp)(p, s, sn) == 0)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -31,12 +31,11 @@ ACCLIB_PUBLIC(acclib_handle_t, acc_get_osfhandle) (int fd)
|
|||
return get_osfhandle(fd);
|
||||
#elif (ACC_OS_EMX && defined(__RSXNT__))
|
||||
return -1; /* FIXME */
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC && defined(__PW32__))
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
|
||||
return -1; /* FIXME */
|
||||
#elif (ACC_OS_WIN32 || ACC_OS_WIN64)
|
||||
# if (ACC_CC_WATCOMC && (__WATCOMC__ < 1100))
|
||||
/* FIXME */
|
||||
return -1;
|
||||
return -1; /* FIXME */
|
||||
# else
|
||||
return _get_osfhandle(fd);
|
||||
# endif
|
||||
|
@ -50,21 +49,21 @@ ACCLIB_PUBLIC(int, acc_set_binmode) (int fd, int binary)
|
|||
{
|
||||
#if (ACC_OS_TOS && defined(__MINT__))
|
||||
int old_binary;
|
||||
FILE* f;
|
||||
if (fd == STDIN_FILENO) f = stdin;
|
||||
else if (fd == STDOUT_FILENO) f = stdout;
|
||||
else if (fd == STDERR_FILENO) f = stderr;
|
||||
FILE* fp;
|
||||
if (fd == STDIN_FILENO) fp = stdin;
|
||||
else if (fd == STDOUT_FILENO) fp = stdout;
|
||||
else if (fd == STDERR_FILENO) fp = stderr;
|
||||
else return -1;
|
||||
old_binary = f->__mode.__binary;
|
||||
__set_binmode(f, binary ? 1 : 0);
|
||||
old_binary = fp->__mode.__binary;
|
||||
__set_binmode(fp, binary ? 1 : 0);
|
||||
return old_binary ? 1 : 0;
|
||||
#elif (ACC_OS_TOS)
|
||||
ACC_UNUSED(fd); ACC_UNUSED(binary);
|
||||
return -1;
|
||||
return -1; /* FIXME */
|
||||
#elif (ACC_OS_DOS16 && (ACC_CC_AZTECC || ACC_CC_PACIFICC))
|
||||
ACC_UNUSED(fd); ACC_UNUSED(binary);
|
||||
return -1;
|
||||
#elif (ACC_OS_DOS32 && defined(__DJGPP__))
|
||||
return -1; /* FIXME */
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
int r;
|
||||
unsigned old_flags = __djgpp_hwint_flags;
|
||||
ACC_COMPILE_TIME_ASSERT(O_BINARY > 0)
|
||||
|
@ -77,10 +76,24 @@ ACCLIB_PUBLIC(int, acc_set_binmode) (int fd, int binary)
|
|||
if (r == -1)
|
||||
return -1;
|
||||
return (r & O_TEXT) ? 0 : 1;
|
||||
#elif (ACC_OS_WIN32 && defined(__PW32__) && defined(__GNUC__))
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
|
||||
if (fd < 0) return -1;
|
||||
ACC_UNUSED(binary);
|
||||
return 1;
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_HIGHC)
|
||||
int r;
|
||||
FILE* fp;
|
||||
if (fd == fileno(stdin)) fp = stdin;
|
||||
else if (fd == fileno(stdout)) fp = stdout;
|
||||
else if (fd == fileno(stderr)) fp = stderr;
|
||||
else return -1;
|
||||
r = _setmode(fp, binary ? _BINARY : _TEXT);
|
||||
if (r == -1)
|
||||
return -1;
|
||||
return (r & _BINARY) ? 1 : 0;
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_MWERKS) && defined(__MSL__)
|
||||
ACC_UNUSED(fd); ACC_UNUSED(binary);
|
||||
return -1; /* FIXME */
|
||||
#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64 || ACC_OS_CYGWIN || ACC_OS_EMX)
|
||||
int r;
|
||||
#if !defined(ACC_CC_ZORTECHC)
|
||||
|
@ -144,13 +157,17 @@ ACCLIB_PUBLIC(int, acc_mkdir) (const char* name, unsigned mode)
|
|||
#if (ACC_OS_TOS && (ACC_CC_PUREC || ACC_CC_TURBOC))
|
||||
ACC_UNUSED(mode);
|
||||
return Dcreate(name);
|
||||
#elif (ACC_OS_DOS32 && defined(__DJGPP__))
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
return mkdir(name, mode);
|
||||
#elif (ACC_OS_WIN32 && defined(__PW32__) && defined(__GNUC__))
|
||||
#elif (ACC_OS_WIN32 && ACC_CC_GNUC) && defined(__PW32__)
|
||||
return mkdir(name, mode);
|
||||
#elif (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
|
||||
ACC_UNUSED(mode);
|
||||
# if (ACC_CC_HIGHC || ACC_CC_PACIFICC)
|
||||
return mkdir((char*) name);
|
||||
# else
|
||||
return mkdir(name);
|
||||
# endif
|
||||
#else
|
||||
return mkdir(name, mode);
|
||||
#endif
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -71,14 +71,18 @@ ACCLIB_PUBLIC(void, acc_srand64) (acc_rand64_p r, acc_uint64l_t seed)
|
|||
ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64) (acc_rand64_p r)
|
||||
{
|
||||
r->seed = r->seed * ACC_UINT64L_C(6364136223846793005) + 1;
|
||||
#if (SIZEOF_ACC_INT64L_T > 8)
|
||||
r->seed &= ACC_UINT64L_C(0xffffffffffffffff);
|
||||
#endif
|
||||
return (acc_uint32l_t) (r->seed >> 33);
|
||||
}
|
||||
|
||||
ACCLIB_PUBLIC(acc_uint32l_t, acc_rand64_r32) (acc_rand64_p r)
|
||||
{
|
||||
r->seed = r->seed * ACC_UINT64L_C(6364136223846793005) + 1;
|
||||
#if (SIZEOF_ACC_INT64L_T > 8)
|
||||
r->seed &= ACC_UINT64L_C(0xffffffffffffffff);
|
||||
#endif
|
||||
return (acc_uint32l_t) (r->seed >> 32);
|
||||
}
|
||||
|
||||
|
@ -110,7 +114,7 @@ ACCLIB_PUBLIC(acc_uint32l_t, acc_randmt_r32) (acc_randmt_p r)
|
|||
acc_uint32l_t v;
|
||||
if (r->n == 624) {
|
||||
int i = 0, j;
|
||||
r->n = i;
|
||||
r->n = 0;
|
||||
do {
|
||||
j = i - 623; if (j < 0) j += 624;
|
||||
v = (r->s[i] & ACC_UINT32L_C(0x80000000)) ^ (r->s[j] & ACC_UINT32L_C(0x7fffffff));
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* ACC -- Automatic Compiler Configuration
|
||||
|
||||
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
|
||||
Copyright (C) 1996-2004 Markus Franz Xaver Johannes Oberhumer
|
||||
All Rights Reserved.
|
||||
|
||||
This software is a copyrighted work licensed under the terms of
|
||||
|
@ -20,7 +20,7 @@
|
|||
|
||||
|
||||
#if (ACC_OS_DOS16 || ACC_OS_WIN16)
|
||||
#elif (ACC_OS_DOS32 && defined(__DJGPP__))
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
#elif (ACC_OS_WIN32 || ACC_OS_WIN64) && (ACC_H_WINDOWS_H)
|
||||
# if defined(acc_int64l_t)
|
||||
/* See also: KB Q274323: PRB: Performance Counter Value May
|
||||
|
@ -34,8 +34,11 @@
|
|||
# else
|
||||
# define __ACCLIB_UCLOCK_USE_WINMM 1
|
||||
# if (ACC_CC_MSC && (_MSC_VER >= 1000))
|
||||
/* avoid -W4 warnings in <mmsystem.h> */
|
||||
/* avoid `-W4' warnings in <mmsystem.h> */
|
||||
# pragma warning(disable: 4201)
|
||||
# elif (ACC_CC_MWERKS)
|
||||
/* avoid duplicate typedef in <mmsystem.h> */
|
||||
# define LPUINT __ACC_MMSYSTEM_H_LPUINT
|
||||
# endif
|
||||
# if 1
|
||||
# include <mmsystem.h>
|
||||
|
@ -48,7 +51,7 @@
|
|||
# endif
|
||||
# if (ACC_CC_DMC)
|
||||
# pragma DMC includelib "winmm.lib"
|
||||
# elif (ACC_CC_INTELC || ACC_CC_MSC)
|
||||
# elif (ACC_CC_INTELC || ACC_CC_MSC || ACC_CC_MWERKS)
|
||||
# pragma comment(lib, "winmm")
|
||||
# elif (ACC_CC_SYMANTECC)
|
||||
# pragma SC includelib "winmm.lib"
|
||||
|
@ -135,7 +138,7 @@ ACCLIB_PUBLIC(void, acc_uclock_read) (acc_uclock_handle_p h, acc_uclock_p c)
|
|||
ri.x.ax = 0x2c00; int86(0x21, &ri, &ro);
|
||||
c->ticks.t32 = ro.h.ch*60UL*60UL*100UL + ro.h.cl*60UL*100UL + ro.h.dh*100UL + ro.h.dl;
|
||||
# endif
|
||||
#elif (ACC_OS_DOS32 && defined(__DJGPP__))
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
c->ticks.t64 = uclock();
|
||||
#elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t)
|
||||
c->ticks.t64 = clock();
|
||||
|
@ -180,7 +183,7 @@ ACCLIB_PUBLIC(double, acc_uclock_get_elapsed) (acc_uclock_handle_p h, const acc_
|
|||
h->mode = 2;
|
||||
d = (double) (stop->ticks.t32 - start->ticks.t32) / 100.0;
|
||||
if (d < 0.0) d += 86400.0; /* midnight passed */
|
||||
#elif (ACC_OS_DOS32 && defined(__DJGPP__))
|
||||
#elif (ACC_OS_DOS32 && ACC_CC_GNUC) && defined(__DJGPP__)
|
||||
h->mode = 3;
|
||||
d = (double) (stop->ticks.t64 - start->ticks.t64) / (UCLOCKS_PER_SEC);
|
||||
#elif (__ACCLIB_UCLOCK_USE_CLOCK) && defined(acc_int64l_t)
|
||||
|
|
Loading…
Reference in New Issue
Block a user