diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux/fatal-prepare.h')
-rw-r--r-- | sysdeps/unix/sysv/linux/fatal-prepare.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/sysdeps/unix/sysv/linux/fatal-prepare.h b/sysdeps/unix/sysv/linux/fatal-prepare.h index 45d88ce911..39cff249db 100644 --- a/sysdeps/unix/sysv/linux/fatal-prepare.h +++ b/sysdeps/unix/sysv/linux/fatal-prepare.h @@ -19,19 +19,23 @@ /* We have to completely disable cancellation. assert() must not be a cancellation point but the implementation uses write() etc. */ -#ifdef SHARED -# include <pthread-functions.h> -# define FATAL_PREPARE \ - { \ - if (__libc_pthread_functions_init) \ - PTHFCT_CALL (ptr_pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, \ - NULL)); \ - } +#ifdef HAVE_ASM_SECONDARY_DIRECTIVE +# define FATAL_PREPARE __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); #else -# pragma weak pthread_setcancelstate -# define FATAL_PREPARE \ - { \ - if (pthread_setcancelstate != NULL) \ - pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); \ - } +# ifdef SHARED +# include <pthread-functions.h> +# define FATAL_PREPARE \ + { \ + if (__libc_pthread_functions_init) \ + PTHFCT_CALL (ptr___pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, \ + NULL)); \ + } +# else +# pragma weak __pthread_setcancelstate +# define FATAL_PREPARE \ + { \ + if (__pthread_setcancelstate != NULL) \ + __pthread_setcancelstate (PTHREAD_CANCEL_DISABLE, NULL); \ + } +# endif #endif |