diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-02-24 15:45:48 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-02-24 15:45:48 +0000 |
commit | 1704a7d48330cc0d8320896054dee3ee34ddb69a (patch) | |
tree | c9bf17a868cd8fc5f1d7503a9b86d2a116d21869 | |
parent | cc2c19c1643d08258141c7dfd47c814f68b3d3ce (diff) |
Modernize checks for non-POSIX getpwnam_r
Part of a patch by Javier Jardón.
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32245
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
-rw-r--r-- | configure.ac | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index d895c3b4..fadb0c31 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 <pwd.h>], - [char buffer[10000]; + [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pwd.h>]], [[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 |