summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-08-22 20:32:21 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-08-22 20:32:21 -0700
commit2ac1a60fa62041345bc461edb3e7d0d74a0055cd (patch)
treeba7f09cbec594b076d7541229032b606d26a76fd /configure
parent2037ff7663e563e9f2497861b6151a6d5173c67b (diff)
downloadtxr-2ac1a60fa62041345bc461edb3e7d0d74a0055cd.tar.gz
txr-2ac1a60fa62041345bc461edb3e7d0d74a0055cd.tar.bz2
txr-2ac1a60fa62041345bc461edb3e7d0d74a0055cd.zip
Adding time-parse function: wrapper for strptime.
* configure: Test for strptime. * eval.c (eval_init): register time-parse intrinsic. * lib.c (time_parse): New function. * lib.h (time_parse): Declared. * txr.1: Documented.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index cbbe2369..f3ec930b 100755
--- a/configure
+++ b/configure
@@ -1688,6 +1688,24 @@ else
printf "no\n"
fi
+printf "Checking for strptime function ... "
+
+cat > conftest.c <<!
+#include <time.h>
+
+int main(int argc, char **argv)
+{
+ struct tm stm = { 0 };
+ strptime("2016-08-20 00:00:00", "%Y-%m-%d %H:%M:%S", &stm);
+ return 0;
+}
+!
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_STRPTIME 1\n" >> $config_h
+else
+ printf "no\n"
+fi
printf "Checking for POSIX sleep function ... "