summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/linuxthreads.old/cancel.c4
-rw-r--r--libpthread/linuxthreads.old/pthread.c4
-rw-r--r--libpthread/linuxthreads.old/wrapsyscall.c13
3 files changed, 11 insertions, 10 deletions
diff --git a/libpthread/linuxthreads.old/cancel.c b/libpthread/linuxthreads.old/cancel.c
index 239b821f1..03a85e4e9 100644
--- a/libpthread/linuxthreads.old/cancel.c
+++ b/libpthread/linuxthreads.old/cancel.c
@@ -215,7 +215,7 @@ void __pthread_perform_cleanup(char *currentframe)
#ifndef __PIC__
/* We need a hook to force the cancelation wrappers to be linked in when
static libpthread is used. */
-extern const int __pthread_provide_wrappers;
-static const int * const __pthread_require_wrappers =
+extern const char __pthread_provide_wrappers;
+static const char *const __pthread_require_wrappers =
&__pthread_provide_wrappers;
#endif
diff --git a/libpthread/linuxthreads.old/pthread.c b/libpthread/linuxthreads.old/pthread.c
index 308845d36..e1e6c9fd6 100644
--- a/libpthread/linuxthreads.old/pthread.c
+++ b/libpthread/linuxthreads.old/pthread.c
@@ -1156,7 +1156,7 @@ void __pthread_message(char * fmt, ...)
#ifndef __PIC__
/* We need a hook to force the cancelation wrappers to be linked in when
static libpthread is used. */
-extern const int __pthread_provide_wrappers;
-static const int *const __pthread_require_wrappers =
+extern const char __pthread_provide_wrappers;
+static const char *const __pthread_require_wrappers =
&__pthread_provide_wrappers;
#endif
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; \