From: Ken Raeburn Date: Sun, 8 Aug 2004 21:10:46 +0000 (+0000) Subject: * configure.in: If getpwnam_r is available, determine its return type X-Git-Tag: krb5-1.4-beta1~161 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=5721862aaadc18c882ae18fa03ddcc11c5864f8f;p=krb5.git * configure.in: If getpwnam_r is available, determine its return type git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@16647 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/include/ChangeLog b/src/include/ChangeLog index ed7a97f91..63e696a19 100644 --- a/src/include/ChangeLog +++ b/src/include/ChangeLog @@ -1,3 +1,8 @@ +2004-08-08 Ken Raeburn + + * configure.in: If getpwnam_r is available, determine its return + type. + 2004-08-07 Ken Raeburn * configure.in: Look for sched.h and sched_yield. diff --git a/src/include/configure.in b/src/include/configure.in index ea81a880f..8995d69d7 100644 --- a/src/include/configure.in +++ b/src/include/configure.in @@ -50,6 +50,28 @@ fi ]) dnl +if test "$ac_cv_func_getpwnam_r" = yes; then + AC_MSG_CHECKING([return type of getpwnam_r]) + AC_CACHE_VAL(krb5_cv_getpwnam_r_return_type, + [AC_TRY_COMPILE([#include + extern int getpwnam_r();], [1;], + getpwnam_r_returns_int=yes,getpwnam_r_returns_int=no) + AC_TRY_COMPILE([#include + extern struct pwd *getpwnam_r();], [1;], + getpwnam_r_returns_ptr=yes,getpwnam_r_returns_ptr=no) + case "$getpwnam_r_returns_int/$getpwnam_r_returns_ptr" in + yes/no) krb5_cv_getpwnam_r_return_type=int ;; + no/yes) krb5_cv_getpwnam_r_return_type=ptr ;; + *) krb5_cv_getpwnam_r_return_type=unknown ;; + esac]) + AC_MSG_RESULT($krb5_cv_getpwnam_r_return_type) + if test $krb5_cv_getpwnam_r_return_type = int; then + AC_DEFINE(GETPWNAM_R_RETURNS_INT, 1, [Define if getpwnam_r returns an int]) + elif test $krb5_cv_getpwnam_r_return_type = unknown; then + AC_MSG_WARN([Cannot determine getpwnam_r return type, disabling]) + ac_cv_func_getpwnam_r=no + fi +fi if test "$ac_cv_func_getpwnam_r" = yes; then AC_MSG_CHECKING([number of arguments to getpwnam_r]) AC_CACHE_VAL(krb5_cv_getpwnam_r_args,