[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 07/11] linkat_nofollow: Add fallback case for cross compiling
From: |
Kevin Cernekee |
Subject: |
[PATCH 07/11] linkat_nofollow: Add fallback case for cross compiling |
Date: |
Wed, 11 Feb 2015 15:22:55 -0800 |
* m4/linkat.m4: Guess no for Darwin, yes otherwise.
---
ChangeLog | 3 +++
m4/linkat.m4 | 18 ++++++++++++++++--
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7e1fb9191b6d..8cd014b3cf58 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -39,6 +39,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 <address@hidden>
uniname/unimame-tests: don't link with -lunistring
diff --git a/m4/linkat.m4 b/m4/linkat.m4
index 83429c534df0..567cb5dcaae9 100644
--- a/m4/linkat.m4
+++ b/m4/linkat.m4
@@ -38,7 +38,16 @@ AC_DEFUN([gl_FUNC_LINKAT],
[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 @@ AC_DEFUN([gl_FUNC_LINKAT],
*) 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],
--
2.2.0.rc0.207.ga3a616c
- [PATCH 00/11] Android compatibility, Kevin Cernekee, 2015/02/11
- [PATCH 01/11] Fix FILE struct compatibility with Android API level >= 21, Kevin Cernekee, 2015/02/11
- [PATCH 02/11] Assume unbroken ungetc() on Android, Kevin Cernekee, 2015/02/11
- [PATCH 03/11] getdtablesize: Fix Android build, Kevin Cernekee, 2015/02/11
- [PATCH 04/11] localename: Fix Android build, Kevin Cernekee, 2015/02/11
- [PATCH 06/11] euidaccess: Fix Android build, Kevin Cernekee, 2015/02/11
- [PATCH 08/11] net_if: Handle content-free <net/if.h> system headers, Kevin Cernekee, 2015/02/11
- [PATCH 07/11] linkat_nofollow: Add fallback case for cross compiling,
Kevin Cernekee <=
- [PATCH 05/11] getugroups: Fix Android build, Kevin Cernekee, 2015/02/11
- [PATCH 09/11] signal_h: Fix Android build, Kevin Cernekee, 2015/02/11
- [PATCH 11/11] getdtablesize: Fix RLIMIT_NOFILE fallback case, Kevin Cernekee, 2015/02/11
- [PATCH 10/11] duplocale: Fix Android build of duplocale-tests, Kevin Cernekee, 2015/02/11
- Re: [PATCH 00/11] Android compatibility, Paul Eggert, 2015/02/11