/* Copyright (c) 2002-2015, Ross Smith II. MIT licensed. */
#ifndef _COMPILER_H
#define _COMPILER_H
#if defined(__cplusplus) || \
defined(__cplusplus__) || \
defined(__CPLUSPLUS) || \
defined(__CPLUSPLUS__)
# define CPLUSPLUS_COMPILER
#endif
#ifdef __BORLANDC__
# define COMPILER "__BORLANDC__"
# define COMPILER_VERSION __BORLANDC__
#endif
#ifdef __CYGWIN__
# define COMPILER "__CYGWIN__"
# define COMPILER_VERSION __CYGWIN__
#endif
#ifdef __DJGPP__
# define COMPILER "__DJGPP__"
# define COMPILER_VERSION __DJGPP__
#endif
#ifdef __DMC__
# define COMPILER "__DMC__"
# define COMPILER_VERSION __DMC__
#endif
/* Metaware High C (untested) */
#ifdef __HIGHC__
# define COMPILER "__HIGHC__"
# define COMPILER_VERSION __HIGHC__
#endif
/* IBM C Set/2 (untested) */
#ifdef __IBMC__
# define COMPILER "__IBMC__"
# define COMPILER_VERSION __IBMC__
#endif
#ifdef __INTEL_COMPILER
# define COMPILER "__INTEL_COMPILER"
# define COMPILER_VERSION __INTEL_COMPILER
#endif
#ifdef __LCC__
# define COMPILER "__LCC__"
# define COMPILER_VERSION 0
#endif
#ifdef __MINGW32__
# define COMPILER "__MINGW32__"
# define COMPILER_VERSION __MINGW32__
#endif
#ifndef __INTEL_COMPILER
# ifdef _MSC_FULL_VER
# define COMPILER "_MSC_FULL_VER"
# define COMPILER_VERSION _MSC_FULL_VER
# elif defined(_MSC_VER)
# define COMPILER "_MSC_VER"
# define COMPILER_VERSION _MSC_VER
# endif
#endif
/* Microsoft Quick C (untested) */
#ifdef _QC
# define COMPILER "_QC"
# define COMPILER_VERSION _QC
#endif
/* Topspeed (untested) */
#ifdef __TSC__
# define COMPILER "__TSC__"
# define COMPILER_VERSION __TSC__
#endif
/* (untested) */
#ifdef THINK_C
# define COMPILER "THINK_C"
# define COMPILER_VERSION THINK_C
#endif
/* Borland Turbo C (untested) */
#ifndef __BORLANDC__
#ifdef __TURBOC__
# define COMPILER "__TURBOC__"
# define COMPILER_VERSION __TURBOC__
#endif
#endif
#ifdef __WATCOMC__
# define COMPILER "__WATCOMC__"
# define COMPILER_VERSION __WATCOMC__
#endif
#ifndef COMPILER
# ifdef __GNUC__
# define COMPILER_PRINTF "%d.%d"
# define COMPILER "__GCC__"
# define COMPILER_VERSION __GNUC__, __GNUC_MINOR__
# else
# define COMPILER "Unknown compiler"
# define COMPILER_VERSION 0
# endif
#endif
#ifndef COMPILER_PRINTF
# define COMPILER_PRINTF "%d"
#endif
#ifndef __WINDOWS__
# if defined(__BORLANDC__) || \
defined(__DMC__) || \
defined(__LCC__) || \
defined(__MINGW32__) || \
defined(_MSC_VER) || \
defined(__OS2__) || \
defined(__WATCOMC__)
# define __WINDOWS__ 1
# endif
# ifndef __WINDOWS__
# if defined(WINDOWS) || \
defined(WIN32) || \
defined(_WIN32) || \
defined(__NT__) || \
defined(__WIN32__)
# define __WINDOWS__ 1
# endif
# endif
#endif /* __WINDOWS__ */
#if defined(__WINDOWS__) || defined(__CYGWIN__)
#define __WINDOWS_OR_CYGWIN__ 1
#endif
#ifndef __DOS__
# if defined(__DJGPP__) || \
defined(__GO32__) || \
defined(__MSDOS__) || \
defined(__WINDOWS__)
# define __DOS__ 1
# endif
#endif /* __DOS__ */
#ifdef __DOS__
# ifndef HAVE_SETMODE
# define HAVE_SETMODE 1
# endif
# define IS_PATH_SEPARATOR(c) (((c) == '/') || ((c) == '\\'))
# define IS_CASE_INSENSITIVE_FILESYSTEM 1
#else
# define IS_PATH_SEPARATOR(c) ((c) == '/')
# undef IS_CASE_INSENSITIVE_FILESYSTEM
#endif
#ifdef __BORLANDC__
# define inline __inline
# define HAVE_DIRENT_H 1
# define HAVE_UTIME_H 1
/* Functions containing switch are not expanded inline */
#pragma warn -8027
/* Parameter '...' is never used in function ... */
#pragma warn -8057
#endif /* __BORLANDC__ */
#if defined(__DJGPP__) || defined(__GO32__)
# define HAVE_EIGHT_CHAR_FILENAMES 1
# define HAVE_BASENAME 1
# define HAVE_DIRENT_H 1
# define HAVE_DIRNAME 1
# define HAVE_GETTIMEOFDAY 1
# define HAVE_SSIZE_T 1
# define HAVE_STRCASECMP 1
# define HAVE_SYS_TIME_H
# define HAVE_UTIME_H 1
# define HAVE_UNISTD_H 1
#endif /* __DJGPP__ */
#ifdef __DMC__
# define HAVE_STDBOOL_H 1
# define HAVE_SYS_UTIME_H 1
/*
# include