X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=m4%2Fopenat.m4;h=10eac5c12eafa937bbbf6e0581441ec117560adf;hb=refs%2Fheads%2F313237;hp=43f46d08b7d47d51d42d55e2cf7672604d53ca85;hpb=138fc7e67e3d9845cd7d81aad0e9c7724784f9b9;p=tar diff --git a/m4/openat.m4 b/m4/openat.m4 index 43f46d0..10eac5c 100644 --- a/m4/openat.m4 +++ b/m4/openat.m4 @@ -1,7 +1,7 @@ -#serial 15 +# serial 17 # See if we need to use our replacement for Solaris' openat et al functions. -dnl Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +dnl Copyright (C) 2004-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, dnl with or without modifications, as long as this notice is preserved. @@ -15,6 +15,7 @@ AC_DEFUN([gl_FUNC_OPENAT], AC_CHECK_FUNCS_ONCE([lchmod]) AC_CHECK_FUNCS_ONCE([fdopendir]) AC_REPLACE_FUNCS([fchmodat mkdirat openat]) + AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK]) case $ac_cv_func_openat+$ac_cv_func_lstat_dereferences_slashed_symlink in yes+yes) ;; yes+*) AC_LIBOBJ([fstatat]);; @@ -53,7 +54,7 @@ main () AT_SYMLINK_NOFOLLOW) != 0 && errno == ENOENT); } - ]])], + ]])], [gl_cv_func_fchownat_nofollow_works=yes], [gl_cv_func_fchownat_nofollow_works=no], [gl_cv_func_fchownat_nofollow_works=no], @@ -78,8 +79,8 @@ AC_DEFUN([gl_FUNC_FCHOWNAT], fi if test $use_replacement_fchownat = yes; then - AC_LIBOBJ(fchownat) - AC_DEFINE(fchownat, rpl_fchownat, + AC_LIBOBJ([fchownat]) + AC_DEFINE([fchownat], [rpl_fchownat], [Define to rpl_fchownat if the replacement function should be used.]) fi ])