This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][PR sanitizer/86090] Add checks for lstat and readlink to sanitizer configure.
- From: Denis Khalikov <d dot khalikov at partner dot samsung dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Maxim Ostapenko <m dot ostapenko at samsung dot com>, Vyacheslav Barinov <v dot barinov at samsung dot com>
- Date: Fri, 8 Jun 2018 20:10:40 +0300
- Subject: [PATCH][PR sanitizer/86090] Add checks for lstat and readlink to sanitizer configure.
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20180608171102euoutp02a58c07ad7dc6b5bd6acef7b966801197~2PoSBlAZ81880118801euoutp02W
- References: <CGME20180608171057eucas1p1a4a28fa7f8b5ef5b3dc9e616dc0cf402@eucas1p1.samsung.com>
Hello,
this is a patch for PR sanitizer/86090
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86090
Thanks.
From: Denis Khalikov <d.khalikov@partner.samsung.com>
Date: Fri, 8 Jun 2018 19:53:01 +0300
Subject: [PATCH] PR sanitizer/86090
* configure.ac: Check for lstat and readlink.
* configure, config.h.in: Rebuild.
---
libsanitizer/ChangeLog | 6 ++++++
libsanitizer/config.h.in | 6 ++++++
libsanitizer/configure | 2 +-
libsanitizer/configure.ac | 2 +-
4 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/libsanitizer/ChangeLog b/libsanitizer/ChangeLog
index 43eb1de..4c669dd 100644
--- a/libsanitizer/ChangeLog
+++ b/libsanitizer/ChangeLog
@@ -1,3 +1,9 @@
+2018-06-08 Denis Khalikov <d.khalikov@partner.samsung.com>
+
+ PR sanitizer/86090
+ * configure.ac: Check for lstat and readlink.
+ * configure, config.h.in: Rebuild.
+
2018-05-31 Matthias Klose <doko@ubuntu.com>
PR sanitizer/86012
diff --git a/libsanitizer/config.h.in b/libsanitizer/config.h.in
index 7195840..f716c24 100644
--- a/libsanitizer/config.h.in
+++ b/libsanitizer/config.h.in
@@ -43,6 +43,12 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
/* Define to 1 if you have the <rpc/xdr.h> header file. */
#undef HAVE_RPC_XDR_H
diff --git a/libsanitizer/configure b/libsanitizer/configure
index 4695bc7..5836450 100755
--- a/libsanitizer/configure
+++ b/libsanitizer/configure
@@ -15509,7 +15509,7 @@ fi
# Check for functions needed.
-for ac_func in clock_getres clock_gettime clock_settime
+for ac_func in clock_getres clock_gettime clock_settime lstat readlink
do :
as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
diff --git a/libsanitizer/configure.ac b/libsanitizer/configure.ac
index 0d11afd..34ba09f 100644
--- a/libsanitizer/configure.ac
+++ b/libsanitizer/configure.ac
@@ -93,7 +93,7 @@ AM_CONDITIONAL(TSAN_SUPPORTED, [test "x$TSAN_SUPPORTED" = "xyes"])
AM_CONDITIONAL(LSAN_SUPPORTED, [test "x$LSAN_SUPPORTED" = "xyes"])
# Check for functions needed.
-AC_CHECK_FUNCS(clock_getres clock_gettime clock_settime)
+AC_CHECK_FUNCS(clock_getres clock_gettime clock_settime lstat readlink)
# Common libraries that we need to link against for all sanitizer libs.
link_sanitizer_common='-lpthread -lm'
--
1.9.1