From 354824aeceb339dbd854c90f397d9a6c8a27505b Mon Sep 17 00:00:00 2001 From: Kaz Kyheku Date: Tue, 28 Jan 2020 05:25:00 -0800 Subject: 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. --- configure | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'configure') 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 < + +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 < -- cgit v1.2.3