diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-25 11:06:29 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2009-02-25 11:06:29 +0000 |
commit | 147041d26029fabdb35b596a1d3bcbb40c3de975 (patch) | |
tree | dcd8320bbf30440ee47fe47130cbd1500ced80bd /libpthread | |
parent | bdf8a6c4b863184545a15f63b9e28bd81e942859 (diff) |
Reinstate __libc_foo's needed for linuxthreads.old.
Now they are only enabled if linuxthreads.old are selected.
Diffstat (limited to 'libpthread')
-rw-r--r-- | libpthread/linuxthreads.old/cancel.c | 4 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/pthread.c | 4 | ||||
-rw-r--r-- | libpthread/linuxthreads.old/wrapsyscall.c | 13 |
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; \ |