From 147041d26029fabdb35b596a1d3bcbb40c3de975 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 25 Feb 2009 11:06:29 +0000 Subject: Reinstate __libc_foo's needed for linuxthreads.old. Now they are only enabled if linuxthreads.old are selected. --- libpthread/linuxthreads.old/wrapsyscall.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'libpthread/linuxthreads.old/wrapsyscall.c') 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; \ -- cgit v1.2.3