summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-05-01 18:54:03 -0700
committerKaz Kylheku <kaz@kylheku.com>2016-05-01 18:54:03 -0700
commit9bbc744c3b5e0584ad7c9abe244128572a692229 (patch)
treedc82317dbb71798d60bb637fe8ae53ce651d13b4 /configure
parent9c6d6519236f536efcd284f714e6f3f145767a57 (diff)
downloadtxr-9bbc744c3b5e0584ad7c9abe244128572a692229.tar.gz
txr-9bbc744c3b5e0584ad7c9abe244128572a692229.tar.bz2
txr-9bbc744c3b5e0584ad7c9abe244128572a692229.zip
Adding setgroups function.
* configure: Test for setgroups. New HAVE_SETGROUPS preprocessor symbol for config/config.h. * sysif.c (setgroups_wrap): New static function. (sysif_init): Register intrinsic setgroups function. * txr.1: Documented setgroups. Rearranged sections so getgroups and setgroups descriptions are consecutive.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure22
1 files changed, 22 insertions, 0 deletions
diff --git a/configure b/configure
index 1518af29..e0759ab1 100755
--- a/configure
+++ b/configure
@@ -2193,6 +2193,28 @@ else
printf "no\n"
fi
+printf "Checking for setgroups ... "
+
+cat > conftest.c <<!
+#include <sys/types.h>
+#include <unistd.h>
+#include <grp.h>
+
+int main(int argc, char **argv)
+{
+ int res = setgroups(0, 0);
+ return 0;
+}
+!
+
+if conftest ; then
+ printf "yes\n"
+ printf "#define HAVE_SETGROUPS 1\n" >> $config_h
+ have_unistd=y
+else
+ printf "no\n"
+fi
+
printf "Checking for old school getpwent, getpwuid and getpwnam ... "
cat > conftest.c <<!