The Samba-Bugzilla – Attachment 5624 Details for
Bug 7352
TIME_T_MAX defines inconsistent
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patches for v3-4
tmp.diff (text/plain), 2.53 KB, created by
Stefan Metzmacher
on 2010-04-12 06:34:52 UTC
(
hide
)
Description:
Patches for v3-4
Filename:
MIME Type:
Creator:
Stefan Metzmacher
Created:
2010-04-12 06:34:52 UTC
Size:
2.53 KB
patch
obsolete
>From 6c12bc7110d21d0861e642d6dcf06ea1e400afb7 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Thu, 7 Jan 2010 00:40:09 +0100 >Subject: [PATCH 1/2] lib/util: move TIME_T_MIN/MAX defines into header file > (cherry picked from commit 571ee54b791b93ad46e09ed563ef4a5582dcf0c8) > >--- > lib/util/time.c | 14 -------------- > lib/util/time.h | 14 ++++++++++++++ > 2 files changed, 14 insertions(+), 14 deletions(-) > >diff --git a/lib/util/time.c b/lib/util/time.c >index eadafe4..571219b 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 e40de2d..cf6dc1c 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; > >-- >1.6.3.3 > > >From 1298f0449fa57431cab730202af2af9dbc3329b0 Mon Sep 17 00:00:00 2001 >From: =?utf-8?q?Bj=C3=B6rn=20Jacke?= <bj@sernet.de> >Date: Thu, 7 Jan 2010 00:41:50 +0100 >Subject: [PATCH 2/2] s3:lib/time: remove TIME_T_MIN/MAX defines > >we already get them from lib/util/time.h >(cherry picked from commit f5729dbb6e720cb6076ea053f1ad0680259e6b39) >--- > source3/lib/time.c | 8 -------- > 1 files changed, 0 insertions(+), 8 deletions(-) > >diff --git a/source3/lib/time.c b/source3/lib/time.c >index 839ebe9..0eee008 100644 >--- a/source3/lib/time.c >+++ b/source3/lib/time.c >@@ -28,14 +28,6 @@ > */ > > >-#ifndef TIME_T_MIN >-#define TIME_T_MIN ((time_t)0 < (time_t) -1 ? (time_t) 0 \ >- : ~ (time_t) 0 << (sizeof (time_t) * CHAR_BIT - 1)) >-#endif >-#ifndef TIME_T_MAX >-#define TIME_T_MAX (~ (time_t) 0 - TIME_T_MIN) >-#endif >- > #define NTTIME_INFINITY (NTTIME)0x8000000000000000LL > > #if (SIZEOF_LONG == 8) >-- >1.6.3.3 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Flags:
vl
:
review+
Actions:
View
Attachments on
bug 7352
:
5623
| 5624