From 1704a7d48330cc0d8320896054dee3ee34ddb69a Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Thu, 24 Feb 2011 15:45:48 +0000 Subject: [PATCH] Modernize checks for non-POSIX getpwnam_r MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Part of a patch by Javier Jardón. Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245 Reviewed-by: Simon McVittie --- configure.ac | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index d895c3b..fadb0c3 100644 --- a/configure.ac +++ b/configure.ac @@ -587,11 +587,10 @@ if test "$ac_cv_func_posix_getpwnam_r" = yes; then else AC_CACHE_CHECK([for nonposix getpwnam_r], ac_cv_func_nonposix_getpwnam_r, - [AC_TRY_LINK([#include ], - [char buffer[10000]; + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[char buffer[10000]; struct passwd pwd; getpwnam_r ("", &pwd, buffer, - sizeof (buffer));], + sizeof (buffer));]])], [ac_cv_func_nonposix_getpwnam_r=yes], [ac_cv_func_nonposix_getpwnam_r=no])]) if test "$ac_cv_func_nonposix_getpwnam_r" = yes; then -- 2.7.4