]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Should have been in last commit.
authorBart Van Assche <bvanassche@acm.org>
Wed, 19 Mar 2008 17:12:01 +0000 (17:12 +0000)
committerBart Van Assche <bvanassche@acm.org>
Wed, 19 Mar 2008 17:12:01 +0000 (17:12 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7740

exp-drd/tests/Makefile.am
exp-drd/tests/supported_libpthread [new file with mode: 0755]

index 00afada0690ac308d9da35efb43c4ee6eb92d664..2b8b91be3567d2feada9609095331933de87fb91 100644 (file)
@@ -137,7 +137,7 @@ EXTRA_DIST =                                        \
        tc23_bogus_condwait.vgtest                  \
        tc24_nonzero_sem.stderr.exp                 \
        tc24_nonzero_sem.vgtest                     \
-       trylock.c trylock.stderr.exp                \
+       trylock.c trylock.stderr.exp
 
 AM_CFLAGS   = $(WERROR) -Winline -Wall -Wshadow -g $(AM_FLAG_M3264_PRI)
 AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/include -I$(top_builddir)/include
diff --git a/exp-drd/tests/supported_libpthread b/exp-drd/tests/supported_libpthread
new file mode 100755 (executable)
index 0000000..ec3cfe9
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/sh
+
+# Exit with status 0 if a supported version of libpthread is found (NPTL or
+# non-Linux libpthread) and exit with status 1 if a non-supported version of
+# libpthread is found (LinuxThreads).
+
+if [ "$(uname)" = "Linux" ]; then
+  libpthread_version="$(/usr/bin/getconf GNU_LIBPTHREAD_VERSION 2>/dev/null)"
+  if [ "${libpthread_version#NPTL}" != "${libpthread_version}" ]; then
+    # NPTL
+    exit 0
+  fi
+  # configuration string is empty or does start with "linuxthreads".
+  exit 1
+fi
+
+# Another OS than Linux, which is also fine.
+exit 0