From 5c2564f3135666a36c8489007cfafea66878c556 Mon Sep 17 00:00:00 2001 From: Assar Westerlund Date: Tue, 13 Jul 1999 17:45:30 +0000 Subject: [PATCH] test for (non-)posix getlogin git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6456 ec53bebd-3082-4978-b11e-865c3cabbd6b --- cf/krb-func-getlogin.m4 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 cf/krb-func-getlogin.m4 diff --git a/cf/krb-func-getlogin.m4 b/cf/krb-func-getlogin.m4 new file mode 100644 index 000000000..a0a173fcf --- /dev/null +++ b/cf/krb-func-getlogin.m4 @@ -0,0 +1,22 @@ +dnl +dnl $Id$ +dnl +dnl test for POSIX (broken) getlogin +dnl + + +AC_DEFUN(AC_FUNC_GETLOGIN, [ +AC_CHECK_FUNCS(getlogin setlogin) +if test "$ac_cv_func_getlogin" = yes; then +AC_CACHE_CHECK(if getlogin is posix, ac_cv_func_getlogin_posix, [ +if test "$ac_cv_func_getlogin" = yes -a "$ac_cv_func_setlogin" = yes; then + ac_cv_func_getlogin_posix=no +else + ac_cv_func_getlogin_posix=yes +fi +]) +if test "$ac_cv_func_getlogin_posix" = yes; then + AC_DEFINE(POSIX_GETLOGIN, 1, [Define if getlogin has POSIX flavour (and not BSD).]) +fi +fi +])