diff options
Diffstat (limited to 'include/generic.h')
-rw-r--r-- | include/generic.h | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/include/generic.h b/include/generic.h index 4b9c455..28a3baf 100644 --- a/include/generic.h +++ b/include/generic.h @@ -57,7 +57,11 @@ typedef Uint16 Word; typedef Uint32 DWord; #endif -#if defined __linux__ || defined __solaris__ || defined __CYGWIN32__ +#ifndef HAVE_SSIZE_T +typedef int32 ssize_t; +#endif + +#if defined __linux__ || defined __solaris__ || defined __CYGWIN32__ || defined FORCE64 typedef long long int64; typedef unsigned long long uint64; #elif defined _WIN32 @@ -67,16 +71,18 @@ typedef unsigned _int64 int64; #error Unsupported platform (need 64 bits ints definition) #endif +#ifndef PACKED #if defined __linux__ || defined __CYGWIN32__ #define PACKED __attribute__((packed)) #else #define PACKED #endif +#endif extern char verbosity; char ** split(char * s, char t); -#ifdef __cplusplus +#if defined __cplusplus || defined __WIN32__ #ifndef MAX template<class T> @@ -119,14 +125,4 @@ inline T MIN(T a, T b) { #error Unknow compiler/platform #endif -#if defined __linux__ || defined __solaris__ || defined __CYGWIN32__ -typedef long long int64; -typedef unsigned long long uint64; -#elif defined _WIN32 -typedef _int64 int64; -typedef unsigned _int64 int64; -#else -#error Unsupported platform (need 64 bits ints definition) -#endif - #endif |