diff m4/euidaccess.m4 @ 11944:660d7f74a5e8

euidaccess: prefer POSIX over non-standard implementation * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Check for faccessat. * lib/euidaccess.c (euidaccess): Use it if available. Signed-off-by: Eric Blake <ebb9@byu.net>
author Eric Blake <ebb9@byu.net>
date Thu, 03 Sep 2009 13:43:12 -0600
parents f6cba5a556ce
children d9a855dec815
line wrap: on
line diff
--- a/m4/euidaccess.m4
+++ b/m4/euidaccess.m4
@@ -1,4 +1,4 @@
-# euidaccess.m4 serial 10
+# euidaccess.m4 serial 11
 dnl Copyright (C) 2002-2009 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -31,6 +31,9 @@
 
 # Prerequisites of lib/euidaccess.c.
 AC_DEFUN([gl_PREREQ_EUIDACCESS], [
+  dnl Prefer POSIX faccessat over non-standard euidaccess.
+  AC_CHECK_FUNCS_ONCE([faccessat])
+  dnl Try various other non-standard fallbacks.
   AC_CHECK_HEADERS_ONCE([libgen.h])
   AC_CHECK_DECLS_ONCE([setregid])
   AC_REQUIRE([AC_FUNC_GETGROUPS])