diff src/define.h @ 212:8e17efed33c1

patch from Fridrich Strba to build on win32
author Carl Byington <carl@five-ten-sg.com>
date Mon, 08 Jun 2009 13:51:24 -0700
parents 5f3fa53cb0e1
children be1009c92ac2
line wrap: on
line diff
--- a/src/define.h	Mon Jun 08 11:49:39 2009 -0700
+++ b/src/define.h	Mon Jun 08 13:51:24 2009 -0700
@@ -89,6 +89,10 @@
     #else
         #include "XGetopt.h"
     #endif
+    #include <process.h>
+    #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) 
 #else
     #ifdef HAVE_UNISTD_H
         #include <unistd.h>