diff src/define.h @ 228:be1009c92ac2

patch from Fridrich Strba to build with DJGPP DOS cross-compiler
author Carl Byington <carl@five-ten-sg.com>
date Thu, 03 Sep 2009 15:16:53 -0700
parents 8e17efed33c1
children e7f363452178
line wrap: on
line diff
--- a/src/define.h	Tue Jun 23 20:41:00 2009 -0700
+++ b/src/define.h	Thu Sep 03 15:16:53 2009 -0700
@@ -94,6 +94,11 @@
     #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) 
 #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)
+    #endif
     #ifdef HAVE_UNISTD_H
         #include <unistd.h>
     #else