summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kyheku <kaz@kylheku.com>2020-01-28 05:25:00 -0800
committerKaz Kylheku <kaz@kylheku.com>2020-01-28 05:25:00 -0800
commit354824aeceb339dbd854c90f397d9a6c8a27505b (patch)
tree7255ca97f4324e8fba112f26b5feaf195f05dfd4 /configure
parent558f7e76cc334e85bc30bf5dd9b62fa8038832ef (diff)
downloadtxr-354824aeceb339dbd854c90f397d9a6c8a27505b.tar.gz
txr-354824aeceb339dbd854c90f397d9a6c8a27505b.tar.bz2
txr-354824aeceb339dbd854c90f397d9a6c8a27505b.zip
New functions: chown, lchown.
* configure: New configure test for chown, fchown and lchown. * sysif.c (get_fd): Define for HAVE_CHOWN also. (do_chown, chown_wrap, lchown_wrap): New functions. (sysif_init): chown and lchown intrinsics registered. * txr.1: Documented.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure19
1 files changed, 19 insertions, 0 deletions
diff --git a/configure b/configure
index 69a69e57..fcfe51c8 100755
--- a/configure
+++ b/configure
@@ -2425,6 +2425,25 @@ else
printf "no\n"
fi
+printf "Checking for chown/fchown/lchown ... "
+cat > conftest.c <<!
+#include <unistd.h>
+
+int main(void)
+{
+ int r0 = chown("a", 0, 0);
+ int r1 = fchown(4, 0, 0);
+ int r2 = lchown("a", 0, 0);
+ return 0;
+}
+!
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_CHOWN 1\n" >> config.h
+else
+ printf "no\n"
+fi
+
printf "Checking for pipe ... "
cat > conftest.c <<!
#include <unistd.h>