diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:00 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 17:20:00 +0000 |
commit | 8daa83a594a2e98f39d764422bfbdbc62c9efd44 (patch) | |
tree | 4099e8021376c7d8c05bdf8503093d80e9c7bad0 /third_party/heimdal/cf/krb-func-getlogin.m4 | |
parent | Initial commit. (diff) | |
download | samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.tar.xz samba-8daa83a594a2e98f39d764422bfbdbc62c9efd44.zip |
Adding upstream version 2:4.20.0+dfsg.upstream/2%4.20.0+dfsg
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | third_party/heimdal/cf/krb-func-getlogin.m4 | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/third_party/heimdal/cf/krb-func-getlogin.m4 b/third_party/heimdal/cf/krb-func-getlogin.m4 new file mode 100644 index 0000000..8adfddb --- /dev/null +++ b/third_party/heimdal/cf/krb-func-getlogin.m4 @@ -0,0 +1,32 @@ +dnl +dnl $Id$ +dnl +dnl test for POSIX (broken) getlogin +dnl + + +AC_DEFUN([AC_FUNC_GETLOGIN], [ +AC_CHECK_FUNCS(getlogin getlogin_r 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 +]) +AC_CACHE_CHECK(if getlogin_r is posix, ac_cv_func_getlogin_r_posix, [ +if test "$ac_cv_func_getlogin_r" = yes -a "$ac_cv_func_setlogin" = yes; then + ac_cv_func_getlogin_r_posix=no +else + ac_cv_func_getlogin_r_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 +if test "$ac_cv_func_getlogin_r_posix" = yes; then + AC_DEFINE(POSIX_GETLOGIN_R, 1, [Define if getlogin_r has POSIX flavour (and not BSD).]) +fi +fi +]) |