1
/* test_hashes.h - detect compiler defines */
3
/* first some magic to convert a macro value to a string */
4
#define STRINGIZE_ARG(x) #x
5
#define EXPAND_TO_STRING(x) STRINGIZE_ARG(x)
7
/* the string containing defined macros */
8
char* compiler_flags = "Compile-time flags:"
175
/* detect compiler and OS */
177
" _MSC_VER=" EXPAND_TO_STRING(_MSC_VER)
182
#if defined(__GNUC__) && defined(__VERSION__)
185
#ifdef __INTEL_COMPILER
186
" __INTEL_COMPILER=" EXPAND_TO_STRING(__INTEL_COMPILER)
194
#ifdef __TINYC__ /* tcc */
209
#ifdef __sun /* Solaris */
224
#ifdef __MACH__ /* Mac OS X = __APPLE__ & __MACH__ on gcc/icc */
229
#ifdef __GLIBC__ /* GLIBC >= 6 */
239
#ifdef __STDC_VERSION__
240
" __STDC_VERSION__=" EXPAND_TO_STRING(__STDC_VERSION__)
245
#ifdef __STRICT_ANSI__
258
/* detect endianness */
259
#ifdef CPU_LITTLE_ENDIAN
262
#ifdef CPU_BIG_ENDIAN
265
#if defined(__BYTE_ORDER)
266
#if (__BYTE_ORDER==__LITTLE_ENDIAN)
267
" (__BYTE_ORDER==__LITTLE_ENDIAN)"
268
#elif (__BYTE_ORDER==__BIG_ENDIAN)
269
" (__BYTE_ORDER==__BIG_ENDIAN)"