More robust setuid, setgid, etc detection

* configure.ac: Check for getuid, getgid, setuid, and setgid.
* libguile/posix.c (scm_getuid, scm_getgid, scm_setuid, scm_setgid):
  Only provide Scheme functions if the OS provides these facilities.
  (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid): Provide if the
  host has getuid, getgid, etc, instead of being in a MinGW guard.
This commit is contained in:
Andy Wingo 2016-07-11 22:14:38 +02:00
commit a9e726eda7
2 changed files with 18 additions and 16 deletions

View file

@ -759,9 +759,9 @@ AC_CHECK_HEADERS([assert.h crt_externs.h])
#
AC_CHECK_FUNCS([DINFINITY DQNAN cexp chsize clog clog10 ctermid \
fesetround ftime ftruncate fchown fchmod getcwd geteuid getsid \
gettimeofday gmtime_r ioctl lstat mkdir mknod nice \
gettimeofday getuid getgid gmtime_r ioctl lstat mkdir mknod nice \
readdir_r readdir64_r readlink rename rmdir setegid seteuid \
setlocale setpgid setsid sigaction siginterrupt stat64 \
setlocale setuid setgid setpgid setsid sigaction siginterrupt stat64 \
strptime symlink sync sysconf tcgetpgrp tcsetpgrp uname waitpid \
strdup system usleep atexit on_exit chown link fcntl ttyname getpwent \
getgrent kill getppid getpgrp fork setitimer getitimer strchr strcmp \