#ifndef _GLOBALS_H #define _GLOBALS_H #define DEBUG_NEW new(_NORMAL_BLOCK, THIS_FILE, __LINE__) #ifndef MAXPATHLEN #define MAXPATHLEN 1024 #endif // MAXPATHLEN // In a sane world every compiler would by now know int64_t. // In our world it's a little more work to find a signed 64 bit integer type. // Most parts for this solution are from http://www.thescripts.com/forum/thread222567.html #ifdef __STDC_VERSION__ #if __STDC_VERSION__ >= 199901L // c99 standard #include #ifdef INT64_MAX // in that case it also has int64_t (which can't be checked directly) typedef int64_t long64; #define MYBIGBITS 64 #endif #endif #endif #ifndef MYBIGBITS // we haven't got it yet #include #if (LONG_MAX >> 31) >> 31 >= 1 // we have a 64 bit long typedef long long64; #define MYBIGBITS 64 #elif (LLONG_MAX >> 31) >> 31 >= 1 // non-conforming but helpful C90 typedef long long long64; #define MYBIGBITS 64 #else // this seemed to work on some system, so I take it as fallback typedef __int64 long64; #define MYBIGBITS 64 #endif #endif #ifdef __GNUWIN32__ // no longer needed //#undef swprintf //#define swprintf _snwprintf #undef strcasecmp #define strcasecmp stricmp #endif // __GNUWIN32__ #endif // _GLOBALS_H