Files
upx/src/acc/acc_auto.h
T
Markus F.X.J. Oberhumer 10f602fca7 *** empty log message ***
committer: mfx <mfx> 1048661243 +0000
2003-03-26 06:47:23 +00:00

318 lines
7.8 KiB
C

/* ACC -- Automatic Compiler Configuration
Copyright (C) 1996-2003 Markus Franz Xaver Johannes Oberhumer
All Rights Reserved.
This software is a copyrighted work licensed under the terms of
the GNU General Public License. Please consult the file "ACC_LICENSE"
for details.
Markus F.X.J. Oberhumer
<markus@oberhumer.com>
http://www.oberhumer.com/
*/
/*************************************************************************
// Checks for header files
**************************************************************************/
#define STDC_HEADERS 1
#define HAVE_CONIO_H 1
#define HAVE_DOS_H 1
#define HAVE_ERRNO_H 1
#define HAVE_FCNTL_H 1
#define HAVE_IO_H 1
#define HAVE_LIMITS_H 1
#define HAVE_MALLOC_H 1
#define HAVE_SHARE_H 1
#define HAVE_SIGNAL_H 1
#define HAVE_STDARG_H 1
#define HAVE_STDDEF_H 1
#define HAVE_STDIO_H 1
#define HAVE_STDLIB_H 1
#define HAVE_STRING_H 1
#define HAVE_TIME_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UTIME_H 1
#define HAVE_SYS_STAT_H 1
#define HAVE_SYS_TIME_H 1
#define HAVE_SYS_UTIME_H 1
#define HAVE_SYS_TYPES_H 1
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
# undef HAVE_CONIO_H
# undef HAVE_DOS_H
# undef HAVE_IO_H
# undef HAVE_SHARE_H
# undef HAVE_SYS_UTIME_H
#elif (ACC_CC_BORLANDC)
# undef HAVE_UNISTD_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_UTIME_H
#elif (ACC_CC_DMC)
# undef HAVE_UNISTD_H /* not working */
#elif (ACC_CC_GNUC && ACC_OS_CYGWIN)
# undef HAVE_CONIO_H
# undef HAVE_DOS_H
# undef HAVE_SHARE_H
#elif (ACC_CC_GNUC && ACC_OS_DOS32 && defined(__DJGPP__))
# undef HAVE_SYS_UTIME_H
#elif (ACC_CC_GNUC && ACC_OS_WIN32 && defined(__MINGW32__))
# undef HAVE_UTIME_H
#elif (ACC_CC_GNUC && ACC_OS_TOS && defined(__MINT__))
# undef HAVE_CONIO_H
# undef HAVE_DOS_H
# undef HAVE_IO_H
# undef HAVE_SHARE_H
# undef HAVE_SYS_UTIME_H
#elif (ACC_CC_INTELC && ACC_OS_WIN32)
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
#elif (ACC_CC_LCC && ACC_OS_WIN32)
# undef HAVE_DOS_H
# undef HAVE_SYS_TIME_H
#elif (ACC_CC_MSC)
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
#elif (ACC_CC_PACIFIC && ACC_OS_DOS16)
# undef HAVE_FCNTL_H
# undef HAVE_IO_H
# undef HAVE_MALLOC_H
# undef HAVE_SHARE_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_STAT_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H
# undef HAVE_SYS_UTIME_H
#elif (ACC_CC_PUREC && ACC_OS_TOS)
# undef HAVE_CONIO_H
# undef HAVE_DOS_H
# undef HAVE_FCNTL_H
# undef HAVE_IO_H
# undef HAVE_MALLOC_H
# undef HAVE_SHARE_H
# undef HAVE_UNISTD_H
# undef HAVE_UTIME_H
# undef HAVE_SYS_STAT_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_TYPES_H
# undef HAVE_SYS_UTIME_H
#elif (ACC_CC_TURBOC && ACC_OS_DOS16)
# undef HAVE_UNISTD_H
# undef HAVE_SYS_TIME_H
# undef HAVE_SYS_UTIME_H
# if (__TURBOC__ < 0x0400)
# undef HAVE_MALLOC_H
# undef HAVE_UTIME_H
# endif
#elif (ACC_CC_WATCOMC)
# undef HAVE_UTIME_H
# undef HAVE_SYS_TIME_H
# if (__WATCOMC__ < 900)
# undef HAVE_UNISTD_H
# endif
#endif
#if (HAVE_SYS_TIME_H && HAVE_TIME_H)
# define TIME_WITH_SYS_TIME 1
#endif
/*************************************************************************
// Checks for <stdint.h>
**************************************************************************/
#if (ACC_CC_DMC) && defined(__DMC_VERSION_STRING__)
# define HAVE_STDINT_H 1
#elif defined(__GLIBC__) && defined(__GLIBC_MINOR__)
# if (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1))
# define HAVE_STDINT_H 1
# endif
#endif
#if HAVE_STDINT_H
# include <stdint.h>
#endif
/*************************************************************************
// Checks for typedefs and structures
**************************************************************************/
/* FIXME - types ??? */
#define HAVE_MODE_T 1
#define SIZEOF_SHORT (__ACC_SHORT_BIT / 8)
#define SIZEOF_INT (__ACC_INT_BIT / 8)
#define SIZEOF_LONG (__ACC_LONG_BIT / 8)
#if (ACC_OS_WIN64)
# define SIZEOF_PTRDIFF_T 8
# define SIZEOF_SIZE_T 8
# define SIZEOF_VOID_P 8
#elif (ACC_OS_DOS16 || ACC_OS_OS216 || ACC_OS_WIN16)
# define SIZEOF_SIZE_T 2
# if (ACC_MM_TINY || ACC_MM_SMALL || ACC_MM_MEDIUM)
# define SIZEOF_VOID_P 2
# elif (ACC_MM_COMPACT || ACC_MM_LARGE || ACC_MM_HUGE)
# define SIZEOF_VOID_P 4
# else
# error "ACC_MM"
# endif
# if (ACC_MM_HUGE)
# define SIZEOF_PTRDIFF_T 4
# 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
# else
# define SIZEOF_PTRDIFF_T 2
# endif
#else
# define SIZEOF_PTRDIFF_T SIZEOF_LONG
# define SIZEOF_SIZE_T SIZEOF_LONG
# define SIZEOF_VOID_P SIZEOF_LONG
#endif
#if !defined(SIZEOF_CHAR_P) && (SIZEOF_VOID_P > 0)
# define SIZEOF_CHAR_P SIZEOF_VOID_P
#endif
/* FIXME: add more sizes */
/*************************************************************************
// Checks for library functions
**************************************************************************/
#define HAVE_ACCESS 1
#define HAVE_ATOI 1
#define HAVE_ATOL 1
#define HAVE_CHMOD 1
#define HAVE_CHOWN 1
#define HAVE_CTIME 1
#define HAVE_DIFFTIME 1
#define HAVE_FILENO 1
#define HAVE_FSTAT 1
#define HAVE_GETUMASK 1
#define HAVE_GETTIMEOFDAY 1
#define HAVE_GMTIME 1
#define HAVE_LOCALTIME 1
#define HAVE_LSTAT 1
#define HAVE_MEMCMP 1
#define HAVE_MEMCPY 1
#define HAVE_MEMMOVE 1
#define HAVE_MEMSET 1
#define HAVE_SETMODE 1
#define HAVE_SNPRINTF 1
#define HAVE_STRCHR 1
#define HAVE_STRDUP 1
#define HAVE_STRERROR 1
#define HAVE_STRFTIME 1
#define HAVE_STRRCHR 1
#define HAVE_UMASK 1
#define HAVE_UTIME 1
#define HAVE_VSNPRINTF 1
#if (ACC_OS_POSIX || ACC_OS_CYGWIN)
# define HAVE_STRCASECMP 1
# define HAVE_STRNCASECMP 1
#else
# define HAVE_STRICMP 1
# define HAVE_STRNICMP 1
#endif
#if (ACC_OS_DOS16 || ACC_OS_DOS32 || ACC_OS_OS2 || ACC_OS_OS216 || ACC_OS_WIN16 || ACC_OS_WIN32 || ACC_OS_WIN64)
# undef HAVE_CHOWN
# undef HAVE_GETTIMEOFDAY
# undef HAVE_GETUMASK
# undef HAVE_LSTAT
# undef HAVE_UMASK
#endif
#if defined(__GLIBC__) && defined(__GLIBC_MINOR__)
# undef HAVE_GETUMASK
# undef HAVE_SETMODE
#elif (ACC_CC_BORLANDC)
# if (__BORLANDC__ < 0x500)
# undef HAVE_DIFFTIME /* difftime() is in the math library */
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# endif
#elif (ACC_CC_DMC)
# define snprintf _snprintf
# define vsnprintf _vsnprintf
#elif (ACC_CC_GNUC && ACC_OS_CYGWIN)
# undef HAVE_GETUMASK
#elif (ACC_CC_GNUC && ACC_OS_DOS32 && defined(__DJGPP__))
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
#elif (ACC_CC_GNUC && ACC_OS_WIN32 && defined(__MINGW32__))
#elif (ACC_CC_GNUC && ACC_OS_TOS && defined(__MINT__))
# undef HAVE_SETMODE
#elif (ACC_CC_INTELC && ACC_OS_WIN32)
# define snprintf _snprintf
# define vsnprintf _vsnprintf
#elif (ACC_CC_LCC && ACC_OS_WIN32)
# define utime _utime
#elif (ACC_CC_MSC)
# define snprintf _snprintf
# define vsnprintf _vsnprintf
#elif (ACC_CC_PACIFIC && ACC_OS_DOS16)
# undef HAVE_ACCESS
# undef HAVE_CHMOD
# undef HAVE_DIFFTIME
# undef HAVE_FSTAT
# undef HAVE_SETMODE
# undef HAVE_SNPRINTF
# undef HAVE_STRFTIME
# undef HAVE_UTIME
# undef HAVE_VSNPRINTF
#elif (ACC_CC_PUREC && ACC_OS_TOS)
# undef HAVE_ACCESS
# undef HAVE_CHMOD
# undef HAVE_CHOWN
# undef HAVE_FSTAT
# undef HAVE_GETTIMEOFDAY
# undef HAVE_GETUMASK
# undef HAVE_LSTAT
# undef HAVE_SETMODE
# undef HAVE_SNPRINTF
# undef HAVE_UMASK
# undef HAVE_UTIME
# undef HAVE_VSNPRINTF
#elif (ACC_CC_TURBOC && ACC_OS_DOS16)
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# if (__TURBOC__ < 0x0295)
# undef HAVE_STRFTIME
# endif
# if (__TURBOC__ < 0x0400)
# undef HAVE_UTIME
# endif
#elif (ACC_CC_WATCOMC)
# if (__WATCOMC__ >= 1100)
# define snprintf _snprintf
# define vsnprintf _vsnprintf
# else
# undef HAVE_SNPRINTF
# undef HAVE_VSNPRINTF
# endif
#endif
/*
vi:ts=4:et
*/