]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Replaced test for FILE::_lock by a more direct test.
authorBart Van Assche <bvanassche@acm.org>
Mon, 13 Oct 2008 19:22:35 +0000 (19:22 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 13 Oct 2008 19:22:35 +0000 (19:22 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8670

configure.in
drd/drd_pthread_intercepts.c

index 7eb76ae14f806bfd07ff4c47be7f462550e7b334..0ad582185bb4930629cbf57691b3faed3e04f41b 100644 (file)
@@ -708,6 +708,26 @@ AC_MSG_RESULT([no])
 ])
 
 
+# Check whether FILE has a member called _lock and whether it's a pointer.
+
+AC_MSG_CHECKING([for FILE::_lock])
+
+AC_TRY_COMPILE(
+[
+  #include <stdio.h>
+], [
+  void *p;
+  p = stdout->_lock;
+  return 0;
+], [
+AC_MSG_RESULT([yes])
+AC_DEFINE([HAVE_LIBC_FILE_LOCK], 1,
+          [Define to 1 if FILE has a member called _lock.])
+], [
+AC_MSG_RESULT([no])
+])
+
+
 # Check whether pthread_mutex_t has a member called __m_kind.
 
 AC_MSG_CHECKING([for pthread_mutex_t::__m_kind])
@@ -1261,7 +1281,6 @@ AC_HEADER_STDC
 AC_CHECK_HEADERS([       \
         endian.h         \
         mqueue.h         \
-        bits/libc-lock.h \
         sys/endian.h     \
         sys/epoll.h      \
         sys/eventfd.h    \
index da4e5522953c8e52c2bf257fcc0a59a89015e34a..e16845d106a22934dc5410a67d314f935055d16e 100644 (file)
@@ -103,7 +103,7 @@ static void init(void)
   /* more than one thread. Suppress data race reports on these objects.    */
   DRD_IGNORE_VAR(*stdout);
   DRD_IGNORE_VAR(*stderr);
-#if defined(HAVE_BITS_LIBC_LOCK_H)
+#if defined(HAVE_LIBC_FILE_LOCK)
   DRD_IGNORE_VAR(*(pthread_mutex_t*)(stdout->_lock));
   DRD_IGNORE_VAR(*(pthread_mutex_t*)(stderr->_lock));
 #endif