summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kyheku <kaz@kylheku.com>2020-01-15 20:07:06 -0800
committerKaz Kyheku <kaz@kylheku.com>2020-01-15 20:07:06 -0800
commit267802c97c4a19354647eb96893429d5c67214df (patch)
treed326a40f3c5133de1c46e7e3489b65b80189a83a /configure
parentf76995965d0d8c5cff6885ff305c4f8b0cec524e (diff)
downloadtxr-267802c97c4a19354647eb96893429d5c67214df.tar.gz
txr-267802c97c4a19354647eb96893429d5c67214df.tar.bz2
txr-267802c97c4a19354647eb96893429d5c67214df.zip
chmod: work on streams and descriptors using fchmod.
* configure: extend chmod detection to cover fchmod. * sysif.c (get_fd): New static functions. (chmod_wrap): Include fchmod wrapping for integer or stream argument. (sysif_init): Register fchmod intrinsic.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure5
1 files changed, 3 insertions, 2 deletions
diff --git a/configure b/configure
index d42e72bf..85336937 100755
--- a/configure
+++ b/configure
@@ -2278,13 +2278,14 @@ else
printf "no\n"
fi
-printf "Checking for chmod ... "
+printf "Checking for chmod/fchmod ... "
cat > conftest.c <<!
#include <sys/stat.h>
int main(void)
{
- int r = chmod("a", S_IWUSR);
+ int r0 = chmod("a", S_IWUSR);
+ int r1 = fchmod(4, S_IWUSR);
return 0;
}
!