The Samba-Bugzilla – Attachment 6082 Details for
Bug 7785
atime limit
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
git am patch for 3.5.x.
0001-Fix-bug-7785-atime-limit.patch (text/plain), 1.68 KB, created by
Jeremy Allison
on 2010-11-23 13:18:02 UTC
(
hide
)
Description:
git am patch for 3.5.x.
Filename:
MIME Type:
Creator:
Jeremy Allison
Created:
2010-11-23 13:18:02 UTC
Size:
1.68 KB
patch
obsolete
>From 65ca614cb1b6fd995510be2f81a00a1a0343930e Mon Sep 17 00:00:00 2001 >From: Jeremy Allison <jra@samba.org> >Date: Tue, 23 Nov 2010 11:16:31 -0800 >Subject: [PATCH] Fix bug #7785 - atime limit. > >On a 64-bit time_t system make MAX_TIME_T the max value that >can be represented in a struct tm. This allows applications to >set times in the future beyond the 32-bit time_t limit (2037). > >This is only in source3/configure.in, needs adding to the waf >configure/build system (but I'll need help with that). > >Jeremy. >--- > source3/configure.in | 25 +++++++++++++++++++++++++ > 1 files changed, 25 insertions(+), 0 deletions(-) > >diff --git a/source3/configure.in b/source3/configure.in >index 3dc9da7..3bd5c2b 100644 >--- a/source3/configure.in >+++ b/source3/configure.in >@@ -2039,6 +2039,31 @@ if test x"$samba_cv_SIZEOF_TIME_T" = x"yes"; then > AC_DEFINE(SIZEOF_TIME_T,8,[The size of the 'time_t' type]) > fi > >+AC_CACHE_CHECK([for TIME_T_MAX],samba_cv_TIME_T_MAX,[ >+AC_TRY_RUN([#include <time.h> >+main() { >+ struct tm *tm; >+ if (sizeof(time_t) == 8) { >+ time_t max_time = 0x7fffffffffffffffll; >+ tm = gmtime(&max_time); >+ /* This should fail with 32-bit tm_year. */ >+ if (tm == NULL) { >+ /* Max time_t that works with 32-bit int tm_year in struct tm. */ >+ max_time = 67768036191676799ll; >+ tm = gmtime(&max_time); >+ if (tm) { >+ exit(0); >+ } >+ } >+ } >+ exit(1); >+}], >+samba_cv_TIME_T_MAX=yes,samba_cv_TIME_T_MAX=no,samba_cv_TIME_T_MAX=cross)]) >+if test x"$samba_cv_TIME_T_MAX" = x"yes"; then >+ AC_DEFINE(TIME_T_MAX,67768036191676799ll,[The maximum value of the 'time_t' type]) >+fi >+ >+ > AC_CACHE_CHECK([for 64 bit off_t],samba_cv_SIZEOF_OFF_T,[ > AC_TRY_RUN([#include <stdio.h> > #include <sys/stat.h> >-- >1.7.3.1 >
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 7785
: 6082