Add bug 494246 to NEWS
[valgrind.git] / drd / tests / supported_libpthread
blob80bf8deb41f072167d45bbf250c3eb91e99a8609
1 #!/bin/sh
3 # Exit with status 0 if a supported version of libpthread is found (NPTL or
4 # non-Linux libpthread) and exit with status 1 if a non-supported version of
5 # libpthread is found (LinuxThreads).
7 if [ "$(uname)" = "Linux" ]; then
8 if [ ! -x /usr/bin/getconf ]; then
9 echo "Error: could not find the program /usr/bin/getconf."
10 echo "Please install the glibc-common package."
11 # Assume NPTL.
12 exit 0
14 libpthread_version="$(/usr/bin/getconf GNU_LIBPTHREAD_VERSION 2>/dev/null)"
15 if [ "${libpthread_version#NPTL}" != "${libpthread_version}" ]; then
16 # NPTL
17 exit 0
19 if [ -x /lib/ld-musl-*.so.1 ] ; then
20 # musl
21 exit 0
23 # configuration string is empty or does start with "linuxthreads".
24 exit 1
27 # Another OS than Linux, which is also fine.
28 exit 0