summaryrefslogtreecommitdiff
path: root/libpthread/linuxthreads.old/wrapsyscall.c
diff options
context:
space:
mode:
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; \