Mercurial > gnulib
changeset 17908:074ad7ba0d73
linkat_nofollow: Add fallback case for cross compiling
* m4/linkat.m4: Guess no for Darwin, yes otherwise.
author | Kevin Cernekee <cernekee@google.com> |
---|---|
date | Wed, 11 Feb 2015 15:22:55 -0800 |
parents | 0a1c2535cad9 |
children | 1442f927aea4 |
files | ChangeLog m4/linkat.m4 |
diffstat | 2 files changed, 19 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Feb 11 15:22:54 2015 -0800 +++ b/ChangeLog Wed Feb 11 15:22:55 2015 -0800 @@ -49,6 +49,9 @@ * modules/euidaccess (Depends-on): Add fcntl-h to ensure that AT_EACCESS gets declared. + linkat_nofollow: Add fallback case for cross compiling + * m4/linkat.m4: Guess no for Darwin, yes otherwise. + 2015-02-08 Daiki Ueno <ueno@gnu.org> uniname/unimame-tests: don't link with -lunistring
--- a/m4/linkat.m4 Wed Feb 11 15:22:54 2015 -0800 +++ b/m4/linkat.m4 Wed Feb 11 15:22:55 2015 -0800 @@ -38,7 +38,16 @@ [gl_cv_func_linkat_nofollow=yes LINKAT_SYMLINK_NOTSUP=0], [gl_cv_func_linkat_nofollow=no - LINKAT_SYMLINK_NOTSUP=1]) + LINKAT_SYMLINK_NOTSUP=1], + [case "$host_os" in + darwin*) + gl_cv_func_linkat_nofollow="guessing no" + LINKAT_SYMLINK_NOTSUP=1 ;; + *) + gl_cv_func_linkat_nofollow="guessing yes" + LINKAT_SYMLINK_NOTSUP=0 ;; + esac]) + rm -rf conftest.l1 conftest.l2]) AC_CACHE_CHECK([whether linkat handles trailing slash correctly], @@ -90,7 +99,12 @@ *) gl_linkat_slash_bug=1 ;; esac - if test "$gl_cv_func_linkat_nofollow" != yes \ + case "$gl_cv_func_linkat_nofollow" in + *yes) linkat_nofollow=yes ;; + *) linkat_nofollow=no ;; + esac + + if test "$linkat_nofollow" != yes \ || test $gl_linkat_slash_bug = 1; then REPLACE_LINKAT=1 AC_DEFINE_UNQUOTED([LINKAT_TRAILING_SLASH_BUG], [$gl_linkat_slash_bug],