# HG changeset patch # User Carl Byington # Date 1252076782 25200 # Node ID e7f36345217878cdd51cf2aec560b98177c06994 # Parent be1009c92ac2ec9058de8854a3859f1132cfc32b patch from Fridrich Strba for undefined ENDIAN diff -r be1009c92ac2 -r e7f363452178 src/common.h --- a/src/common.h Thu Sep 03 15:16:53 2009 -0700 +++ b/src/common.h Fri Sep 04 08:06:22 2009 -0700 @@ -23,7 +23,6 @@ typedef long long int64_t; #endif - #ifndef _WIN32 typedef struct { uint32_t dwLowDateTime; @@ -34,6 +33,15 @@ #include #else #include +#endif + +#if defined(_WIN32) || defined(__DJGPP__) + #ifndef LITTLE_ENDIAN + #define LITTLE_ENDIAN 1234 + #endif + #ifndef BIG_ENDIAN + #define BIG_ENDIAN 4321 + #endif #define BYTE_ORDER LITTLE_ENDIAN #endif diff -r be1009c92ac2 -r e7f363452178 src/define.h --- a/src/define.h Thu Sep 03 15:16:53 2009 -0700 +++ b/src/define.h Fri Sep 04 08:06:22 2009 -0700 @@ -92,12 +92,13 @@ #include #undef gmtime_r #define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0) - #define ctime_r(tp,tmp) (ctime(tp)?(strcpy((tmp),ctime((tp))),(tmp)):0) + #define ctime_r(tp,tmp) (ctime(tp)?(strcpy((tmp),ctime((tp))),(tmp)):0) #else #ifdef __DJGPP__ #define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0) #define ctime_r(tp,tmp) (ctime(tp)?(strcpy((tmp),ctime((tp))),(tmp)):0) #define fseeko(stream, offset, whence) fseek(stream, (long)offset, whence) + #define ftello ftell #endif #ifdef HAVE_UNISTD_H #include