X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fopenat.m4;h=6b4f95c76f468a8582b5ebf113f04d7ef45f3799;hb=9cd8acbae7f8ca3985001de0752b22e2a28d0cd7;hp=b824393e5262fec55949645172deee3cb1999f02;hpb=82bf7d1b42dc970e704f9347862594445f4a22dd;p=gnulib.git diff --git a/m4/openat.m4 b/m4/openat.m4 index b824393e5..6b4f95c76 100644 --- a/m4/openat.m4 +++ b/m4/openat.m4 @@ -1,4 +1,4 @@ -# serial 23 +# serial 25 # See if we need to use our replacement for Solaris' openat et al functions. dnl Copyright (C) 2004-2009 Free Software Foundation, Inc. @@ -27,11 +27,19 @@ AC_DEFUN([gl_FUNC_OPENAT], AC_CHECK_FUNCS_ONCE([lchmod]) AC_REPLACE_FUNCS([fchmodat fstatat mkdirat openat unlinkat]) AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) + AC_REQUIRE([gl_FUNC_UNLINK]) case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in - yes+yes) ;; + yes+yes) + # GNU/Hurd has unlinkat, but it has the same bug as unlink. + if test $REPLACE_UNLINK = 1; then + AC_LIBOBJ([unlinkat]) + REPLACE_UNLINKAT=1 + fi ;; yes+*) # Solaris 9 has *at functions, but uniformly mishandles trailing # slash in all of them. + AC_LIBOBJ([openat]) + REPLACE_OPENAT=1 AC_LIBOBJ([fstatat]) REPLACE_FSTATAT=1 AC_LIBOBJ([unlinkat])