summaryrefslogtreecommitdiff
path: root/source4/lib/replace/strptime.m4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-15 16:13:06 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:50:38 -0500
commitaea41afb52e24077e7b1e28f5090326665d7c3f6 (patch)
tree96558a57d7682c9d5acc4c0d365d689be09be02e /source4/lib/replace/strptime.m4
parenteb49760603a043163b7cc80c781a16eac376aee2 (diff)
downloadsamba-aea41afb52e24077e7b1e28f5090326665d7c3f6.tar.gz
samba-aea41afb52e24077e7b1e28f5090326665d7c3f6.tar.bz2
samba-aea41afb52e24077e7b1e28f5090326665d7c3f6.zip
r22216: move strptime testsuite into it's own file
so we can include it for the configure test as it seems that strptime() is really broken on some hosts in the build farm, re should use the replacement code when we detect this in the configure test metze (This used to be commit 08a5e9760643b9fbf00fdcf7163de7cf50e841e6)
Diffstat (limited to 'source4/lib/replace/strptime.m4')
-rw-r--r--source4/lib/replace/strptime.m414
1 files changed, 3 insertions, 11 deletions
diff --git a/source4/lib/replace/strptime.m4 b/source4/lib/replace/strptime.m4
index 0f2065fd62..da22fc5a97 100644
--- a/source4/lib/replace/strptime.m4
+++ b/source4/lib/replace/strptime.m4
@@ -1,16 +1,8 @@
AC_CACHE_CHECK([whether strptime is available and works],libreplace_cv_STRPTIME_OK,[
AC_TRY_RUN([
- #include <stdio.h>
- #include <stdlib.h>
- #include <time.h>
- int main (void) {
- const char *s = "20061004023546Z";
- char *ret;
- struct tm t;
- ret = strptime(s, "%Y%m%d%H%M%S", &t);
- if ( ret == NULL ) return 1;
- return 0;
- }],
+ #define LIBREPLACE_CONFIGURE_TEST_STRPTIME
+ #include "$libreplacedir/test/strptime.c"
+ ],
[libreplace_cv_STRPTIME_OK=yes],
[libreplace_cv_STRPTIME_OK=no],
[libreplace_cv_STRPTIME_OK="assuming not"])