gmtime: remove define
authorDaniel Stenberg <daniel@haxx.se>
Mon, 14 Feb 2011 12:42:01 +0000 (13:42 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 14 Feb 2011 12:42:01 +0000 (13:42 +0100)
It turns out some systems rely on the gmtime or gmtime_r to be defined
already in the system headers and thus my "precaution" redefining of
them only caused trouble. They are now removed.

lib/parsedate.c
lib/setup_once.h

index 1d7f035f2a7177c343bdeceec80a00b302b1225e..1e9381c7d1f69cba874ea851057da9661d07f01a 100644 (file)
@@ -529,9 +529,9 @@ CURLcode Curl_gmtime(time_t intime, struct tm *store)
   const struct tm *tm;
 #ifdef HAVE_GMTIME_R
   /* thread-safe version */
-  tm = (struct tm *)(gmtime_r)(&intime, store);
+  tm = (struct tm *)gmtime_r(&intime, store);
 #else
-  tm = (gmtime)(&intime);
+  tm = gmtime(&intime);
   if(tm)
     *store = *tm; /* copy the pointed struct to the local copy */
 #endif
index e817b6dea8eaaa85e14f4948eb04e18895733bee..1b6fde5278bd39ff7aeabcb1bbfa2a9ebe5dfcc7 100644 (file)
@@ -488,8 +488,5 @@ typedef int sig_atomic_t;
 
 #define ZERO_NULL 0
 
-#define gmtime(x) do_not_use_gmtime_use_Curl_gmtime()
-#define gmtime_r(x,y) do_not_use_gmtime_r_use_Curl_gmtime()
-
 #endif /* __SETUP_ONCE_H */