Initial stuff to make it work on Red Hat 8:
- autoconf stuff for detecting glibc-2.3
- vg_libpthread_unimp.c: hack for __pthread_clock_[gs]ettime
- vg_libpthread.c: initialise thread's default locale by calling
__uselocale(LC_GLOBAL_LOCALE) at the right time. Gruesome.
Also need to do this for new other threads - not yet done.
- cleanups -- don't use write() to write messages when bombing out,
instead go direct to the syscalls. Avoids nasty circularities
with glibc initialisations.
MERGE TO STABLE
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@1207 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/coregrind/vg_libpthread_unimp.c b/coregrind/vg_libpthread_unimp.c
index 86a46c1..f6f7833 100644
--- a/coregrind/vg_libpthread_unimp.c
+++ b/coregrind/vg_libpthread_unimp.c
@@ -34,6 +34,8 @@
Give a binding for everything the real libpthread.so binds.
------------------------------------------------------------------ */
+#include "vg_include.h" /* For GLIBC_2_3, or not, as the case may be */
+
extern void vgPlain_unimp ( char* );
#define unimp(str) vgPlain_unimp(str)
@@ -163,6 +165,14 @@
void __pthread_clock_gettime ( void ) { unimp("__pthread_clock_gettime"); }
void __pthread_clock_settime ( void ) { unimp("__pthread_clock_settime"); }
+#ifdef GLIBC_2_3
+/* Needed for Red Hat 8.0 */
+__asm__(".symver __pthread_clock_gettime,"
+ "__pthread_clock_gettime@GLIBC_PRIVATE");
+__asm__(".symver __pthread_clock_settime,"
+ "__pthread_clock_settime@GLIBC_PRIVATE");
+#endif
+
#if 0
void pthread_create@@GLIBC_2.1 ( void ) { unimp("pthread_create@@GLIBC_2.1"); }