From 571ee54b791b93ad46e09ed563ef4a5582dcf0c8 Mon Sep 17 00:00:00 2001 From: Björn Jacke Date: Thu, 7 Jan 2010 00:40:09 +0100 Subject: lib/util: move TIME_T_MIN/MAX defines into header file --- lib/util/time.c | 14 -------------- lib/util/time.h | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) (limited to 'lib') diff --git a/lib/util/time.c b/lib/util/time.c index eadafe4562..571219b810 100644 --- a/lib/util/time.c +++ b/lib/util/time.c @@ -27,11 +27,6 @@ * @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) @@ -40,15 +35,6 @@ -/* - * 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. **/ diff --git a/lib/util/time.h b/lib/util/time.h index e40de2de3d..cf6dc1caa7 100644 --- a/lib/util/time.h +++ b/lib/util/time.h @@ -23,6 +23,20 @@ #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; -- cgit