summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-09-11 20:11:40 -0700
committerKaz Kylheku <kaz@kylheku.com>2012-09-11 20:11:40 -0700
commite9902c952b488adf7de5c2464d416810ce222955 (patch)
treea7f7ef52a4fb344c1854a8d646cd98263aef9f67 /configure
parent46f607ae233a8f71c09d40dd45aae5f2ec7056fc (diff)
downloadtxr-e9902c952b488adf7de5c2464d416810ce222955.tar.gz
txr-e9902c952b488adf7de5c2464d416810ce222955.tar.bz2
txr-e9902c952b488adf7de5c2464d416810ce222955.zip
* configure: Added test for <sys/stat.h>
* eval.c: New intrinsic functions "stat" and "prop". * stream.c: Include <sys/stat.h> if we have it. (w_stat, statf): New functions. (val dev_k, ino_k, mode_k, nlink_k, uid_k, val gid_k, rdev_k, size_k, blksize_k, blocks_k; val atime_k, mtime_k, ctime_k): New sybol variables. (stream_init): Intern new keywords symbols. * stream.h (statf): Declared. * txr.1: prop documented. Stub for stat created.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure24
1 files changed, 24 insertions, 0 deletions
diff --git a/configure b/configure
index 1c556808..786ff655 100755
--- a/configure
+++ b/configure
@@ -1142,6 +1142,30 @@ else
fi
#
+# sys/stat.h
+#
+
+printf "Checking whether we have <sys/stat.h> ... "
+
+cat > conftest.c <<!
+#include <sys/stat.h>
+
+int main(void)
+{
+ struct stat s;
+ return 0;
+}
+!
+rm -f conftest
+if ! $make conftest > conftest.err 2>&1 || ! [ -x conftest ] ; then
+ printf "no\n"
+else
+ printf "yes\n"
+ printf "#define HAVE_SYS_STAT 1\n" >> config.h
+fi
+
+
+#
# environ
#