diff options
author | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-24 14:51:17 +0000 |
---|---|---|
committer | jb <jb@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-02-24 14:51:17 +0000 |
commit | d78db4a0363583f7d02b6f70cb234d02a2b6a2d4 (patch) | |
tree | b6bfedfb8d2db2dd774d60a8096f1fcf3d2a6419 /libgfortran/configure | |
parent | acd7e8c78fb677f94a53080363d7059ed3b52f7b (diff) | |
download | gcc-d78db4a0363583f7d02b6f70cb234d02a2b6a2d4.tar.gz |
PR 47802 Test for POSIX getpwuid_r
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@170471 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-x | libgfortran/configure | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/libgfortran/configure b/libgfortran/configure index 9d3c891ca80..834bd8c51be 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -25428,6 +25428,56 @@ FPU_HOST_HEADER=config/${fpu_host}.h IEEE_FLAGS="${ieee_flags}" + +# Check for POSIX getpwuid_r +# +# There are two versions of getpwuid_r, the POSIX one with 5 +# arguments, and another one with 4 arguments used by at least HP-UX +# 10.2. +if test "$ac_cv_func_getpwuid_r" = "yes"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking POSIX version of getpwuid_r with 5 arguments" >&5 +$as_echo_n "checking POSIX version of getpwuid_r with 5 arguments... " >&6; } +if test "${libgfor_cv_posix_getpwuid_r+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + + if test x$gcc_no_link = xyes; then + as_fn_error "Link tests are not allowed after GCC_NO_EXECUTABLES." "$LINENO" 5 +fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#include <stdio.h> +#include <sys/types.h> +#include <pwd.h> +int +main () +{ + + getpwuid_r(0, NULL, NULL, 0, NULL); + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libgfor_cv_posix_getpwuid_r="yes" +else + libgfor_cv_posix_getpwuid_r="no" +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libgfor_cv_posix_getpwuid_r" >&5 +$as_echo "$libgfor_cv_posix_getpwuid_r" >&6; } +fi +if test "$libgfor_cv_posix_getpwuid_r" = "yes"; then + +$as_echo "#define HAVE_POSIX_GETPWUID_R 1" >>confdefs.h + +fi + + # Check out attribute support. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the target supports hidden visibility" >&5 |