diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-05-01 18:54:03 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-05-01 18:54:03 -0700 |
commit | 9bbc744c3b5e0584ad7c9abe244128572a692229 (patch) | |
tree | dc82317dbb71798d60bb637fe8ae53ce651d13b4 /configure | |
parent | 9c6d6519236f536efcd284f714e6f3f145767a57 (diff) | |
download | txr-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-x | configure | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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 <<! |