aboutsummaryrefslogtreecommitdiff
path: root/nptl/forward.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-01-17 08:37:26 +0000
committerUlrich Drepper <drepper@redhat.com>2007-01-17 08:37:26 +0000
commitea1533e08df4c63e680438ac1dc243cdc37d205a (patch)
treed7954d886b979b8bea1d7e1f6db05b440a693097 /nptl/forward.c
parentd78bce1c01fe67d02d833e026e5acbb88d1d9836 (diff)
downloadglibc-ea1533e08df4c63e680438ac1dc243cdc37d205a.tar
glibc-ea1533e08df4c63e680438ac1dc243cdc37d205a.tar.gz
glibc-ea1533e08df4c63e680438ac1dc243cdc37d205a.tar.bz2
glibc-ea1533e08df4c63e680438ac1dc243cdc37d205a.zip
* sysdeps/unix/sysv/linux/libc_pthread_init.c: Don't just copy the
function table, mangle the pointers. * sysdeps/pthread/pthread-functions.h: Define PTHFCT_CALL. * forward.c: Use PTHFCT_CALL and __libc_pthread_functions_init. * sysdeps/pthread/bits/libc-lock.h: When using __libc_pthread_functions demangle pointers before use. * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Use PTHFCT_CALL to demangle pointer. * sysdeps/unix/sysv/linux/jmp-unwind.c: Likewise. * sysdeps/pthread/setxid.h: Likewise.
Diffstat (limited to 'nptl/forward.c')
-rw-r--r--nptl/forward.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/nptl/forward.c b/nptl/forward.c
index e5f93d475e..b62efd86f8 100644
--- a/nptl/forward.c
+++ b/nptl/forward.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
@@ -29,16 +29,17 @@
/* Pointers to the libc functions. */
struct pthread_functions __libc_pthread_functions attribute_hidden;
+int __libc_pthread_functions_init attribute_hidden;
#define FORWARD2(name, rettype, decl, params, defaction) \
rettype \
name decl \
{ \
- if (__libc_pthread_functions.ptr_##name == NULL) \
+ if (!__libc_pthread_functions_init) \
defaction; \
\
- return __libc_pthread_functions.ptr_##name params; \
+ return PTHFCT_CALL (ptr_##name, params); \
}
#define FORWARD(name, decl, params, defretval) \