diff options
author | Matthieu Patou <mat@matws.net> | 2010-10-21 02:14:39 +0400 |
---|---|---|
committer | Matthieu Patou <mat@matws.net> | 2010-10-22 01:00:54 +0400 |
commit | 4ea7d4694a8353fc55ecd12cb09b9c91ffde7b3f (patch) | |
tree | 1af5e5609b4068beb7598553bdc568d6a3de7887 /lib/replace/wscript | |
parent | 2d0ac59fcc490517b202180f49b178ab80c2534e (diff) | |
download | samba-4ea7d4694a8353fc55ecd12cb09b9c91ffde7b3f.tar.gz samba-4ea7d4694a8353fc55ecd12cb09b9c91ffde7b3f.tar.bz2 samba-4ea7d4694a8353fc55ecd12cb09b9c91ffde7b3f.zip |
replace: use replace for non 'samba' compliant strptime
Diffstat (limited to 'lib/replace/wscript')
-rw-r--r-- | lib/replace/wscript | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/replace/wscript b/lib/replace/wscript index 1778ea71b0..95cbb37520 100644 --- a/lib/replace/wscript +++ b/lib/replace/wscript @@ -229,6 +229,25 @@ def configure(conf): addmain=False, msg='Checking for working strptime'): conf.DEFINE('REPLACE_STRPTIME', 1) + else: + conf.CHECK_CODE(''' + const char *s = "20070414101546Z"; + char *ret; + struct tm t; + memset(&t, 0, sizeof(t)); + ret = strptime(s, "%Y%m%d%H%M%S", &t); + if (ret == NULL || t.tm_wday != 6) { + return 0; + } else { + return 1; + } + ''', + msg="Checking correct behavior of strptime", + headers = 'time.h', + execute = True, + define_ret = True, + define = 'REPLACE_STRPTIME', + ) if conf.CONFIG_SET('HAVE_KRB5_H'): # Check for KRB5_DEPRECATED handling |