summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/wrapsyscall.c
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2009-02-25 11:06:29 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2009-02-25 11:06:29 +0000
commit147041d26029fabdb35b596a1d3bcbb40c3de975 (patch)
treedcd8320bbf30440ee47fe47130cbd1500ced80bd /libpthread/linuxthreads.old/wrapsyscall.c
parentbdf8a6c4b863184545a15f63b9e28bd81e942859 (diff)
Reinstate __libc_foo's needed for linuxthreads.old.
Now they are only enabled if linuxthreads.old are selected.
Diffstat (limited to 'libpthread/linuxthreads.old/wrapsyscall.c')
-rw-r--r--libpthread/linuxthreads.old/wrapsyscall.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libpthread/linuxthreads.old/wrapsyscall.c b/libpthread/linuxthreads.old/wrapsyscall.c
index 462768d9d..6e18388ca 100644
--- a/libpthread/linuxthreads.old/wrapsyscall.c
+++ b/libpthread/linuxthreads.old/wrapsyscall.c
@@ -37,12 +37,13 @@
#ifndef __PIC__
/* We need a hook to force this file to be linked in when static
libpthread is used. */
-const int __pthread_provide_wrappers = 0;
+const char __pthread_provide_wrappers = 0;
#endif
-
+/* Using private interface to libc (__libc_foo) to implement
+ * cancellable versions of some libc functions */
#define CANCELABLE_SYSCALL(res_type, name, param_list, params) \
-res_type name param_list; \
+res_type __libc_##name param_list; \
res_type \
__attribute__ ((weak)) \
name param_list \
@@ -50,13 +51,13 @@ name param_list \
res_type result; \
int oldtype; \
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype); \
- result = name params; \
+ result = __libc_##name params; \
pthread_setcanceltype (oldtype, NULL); \
return result; \
}
#define CANCELABLE_SYSCALL_VA(res_type, name, param_list, params, last_arg) \
-res_type name param_list; \
+res_type __libc_##name param_list; \
res_type \
__attribute__ ((weak)) \
name param_list \
@@ -66,7 +67,7 @@ name param_list \
va_list ap; \
pthread_setcanceltype (PTHREAD_CANCEL_ASYNCHRONOUS, &oldtype); \
va_start (ap, last_arg); \
- result = name params; \
+ result = __libc_##name params; \
va_end (ap); \
pthread_setcanceltype (oldtype, NULL); \
return result; \