lib/util: move TIME_T_MIN/MAX defines into header file
authorBjörn Jacke <bj@sernet.de>
Wed, 6 Jan 2010 23:40:09 +0000 (00:40 +0100)
committerBjörn Jacke <bj@sernet.de>
Wed, 6 Jan 2010 23:50:29 +0000 (00:50 +0100)
lib/util/time.c
lib/util/time.h

index eadafe4562bc5cd2a692cec5dd12dd4fa9ca6a90..571219b810b52408b06231183e72091da847423c 100644 (file)
  * @brief time handling functions
  */
 
-#ifndef TIME_T_MIN
-/* we use 0 here, because (time_t)-1 means error */
-#define TIME_T_MIN 0
-#endif
-
 #if (SIZEOF_LONG == 8)
 #define TIME_FIXUP_CONSTANT_INT 11644473600L
 #elif (SIZEOF_LONG_LONG == 8)
 
 
 
-/*
- * we use the INT32_MAX here as on 64 bit systems,
- * gmtime() fails with INT64_MAX
- */
-
-#ifndef TIME_T_MAX
-#define TIME_T_MAX MIN(INT32_MAX,_TYPE_MAXIMUM(time_t))
-#endif
-
 /**
  External access to time_t_min and time_t_max.
 **/
index e40de2de3df9431c9d93aed6415939b1ea06a59e..cf6dc1caa7584f722e656f4a1e39dbfd3feb72c2 100644 (file)
 #define _PUBLIC_
 #endif
 
+#ifndef TIME_T_MIN
+/* we use 0 here, because (time_t)-1 means error */
+#define TIME_T_MIN 0
+#endif
+
+/*
+ * we use the INT32_MAX here as on 64 bit systems,
+ * gmtime() fails with INT64_MAX
+ */
+#ifndef TIME_T_MAX
+#define TIME_T_MAX MIN(INT32_MAX,_TYPE_MAXIMUM(time_t))
+#endif
+
+
 /* 64 bit time (100 nanosec) 1601 - cifs6.txt, section 3.5, page 30, 4 byte aligned */
 typedef uint64_t NTTIME;