|
Lines 895-922
AC_CHECK_DECLS(h_errno, , ,[#include <ne
Link Here
|
| 895 |
AC_CHECK_FUNCS(setresuid, [ |
895 |
AC_CHECK_FUNCS(setresuid, [ |
| 896 |
dnl Some platorms have setresuid that isn't implemented, test for this |
896 |
dnl Some platorms have setresuid that isn't implemented, test for this |
| 897 |
AC_MSG_CHECKING(if setresuid seems to work) |
897 |
AC_MSG_CHECKING(if setresuid seems to work) |
| 898 |
AC_TRY_RUN([ |
898 |
AC_RUN_IFELSE([ |
| 899 |
#include <stdlib.h> |
899 |
#include <stdlib.h> |
| 900 |
#include <errno.h> |
900 |
#include <errno.h> |
| 901 |
int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} |
901 |
int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} |
| 902 |
], |
902 |
], |
| 903 |
[AC_MSG_RESULT(yes)], |
903 |
[AC_MSG_RESULT(yes)], |
| 904 |
[AC_DEFINE(BROKEN_SETRESUID) |
904 |
[AC_DEFINE(BROKEN_SETRESUID) |
| 905 |
AC_MSG_RESULT(not implemented)] |
905 |
AC_MSG_RESULT(not implemented)], |
|
|
906 |
[AC_MSG_WARN([cross compiling: not checking setresuid])] |
| 906 |
) |
907 |
) |
| 907 |
]) |
908 |
]) |
| 908 |
|
909 |
|
| 909 |
AC_CHECK_FUNCS(setresgid, [ |
910 |
AC_CHECK_FUNCS(setresgid, [ |
| 910 |
dnl Some platorms have setresgid that isn't implemented, test for this |
911 |
dnl Some platorms have setresgid that isn't implemented, test for this |
| 911 |
AC_MSG_CHECKING(if setresgid seems to work) |
912 |
AC_MSG_CHECKING(if setresgid seems to work) |
| 912 |
AC_TRY_RUN([ |
913 |
AC_TRY_IFELSE([ |
| 913 |
#include <stdlib.h> |
914 |
#include <stdlib.h> |
| 914 |
#include <errno.h> |
915 |
#include <errno.h> |
| 915 |
int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} |
916 |
int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} |
| 916 |
], |
917 |
], |
| 917 |
[AC_MSG_RESULT(yes)], |
918 |
[AC_MSG_RESULT(yes)], |
| 918 |
[AC_DEFINE(BROKEN_SETRESGID) |
919 |
[AC_DEFINE(BROKEN_SETRESGID) |
| 919 |
AC_MSG_RESULT(not implemented)] |
920 |
AC_MSG_RESULT(not implemented)], |
|
|
921 |
[AC_MSG_WARN([cross compiling: not checking setresuid])] |
| 920 |
) |
922 |
) |
| 921 |
]) |
923 |
]) |
| 922 |
|
924 |
|