From e5d19c08d12880edbdf8772c8fb1f747c71d866e Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Thu, 17 Sep 2015 16:38:54 -0700 Subject: Use __pthread_setcancelstate in libc.a This patch references __pthread_setcancelstate instead of pthread_setcancelstate in libc.a. [BZ #18970] * misc/error.c (error): Replace pthread_setcancelstate with __pthread_setcancelstate. (error_at_line): Likewise. * posix/wordexp.c (parse_comm): Likewise. * stdlib/fmtmsg.c (fmtmsg): Likewise. * nptl/forward.c (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. (pthread_setcancelstate): Add an alias. * nptl/nptl-init.c (pthread_functions): Replace ptr_pthread_setcancelstate with ptr___pthread_setcancelstate. * sysdeps/nptl/pthread-functions.h (pthread_functions): Likewise. * nptl/pthreadP.h (__pthread_setcancelstate): Mark it with hidden_proto. * nptl/pthread_setcancelstate.c (__pthread_setcancelstate): Mark it with hidden_def. * sysdeps/nptl/libc-lockP.h (__pthread_setcancelstate): New. (pthread_setcancelstate): Renamed to ... (__pthread_setcancelstate): This. * sysdeps/unix/sysv/linux/fatal-prepare.h (FATAL_PREPARE): Use __libc_ptf_call with __pthread_setcancelstate. --- misc/error.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'misc') diff --git a/misc/error.c b/misc/error.c index aa3054d9ee..023e391f4d 100644 --- a/misc/error.c +++ b/misc/error.c @@ -298,8 +298,8 @@ error (int status, int errnum, const char *message, ...) /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; - __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), - 0); + __libc_ptf_call (__pthread_setcancelstate, + (PTHREAD_CANCEL_DISABLE, &state), 0); #endif flush_stdout (); @@ -323,7 +323,7 @@ error (int status, int errnum, const char *message, ...) #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call - __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); + __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0); # endif #endif } @@ -360,7 +360,8 @@ error_at_line (int status, int errnum, const char *file_name, /* We do not want this call to be cut short by a thread cancellation. Therefore disable cancellation for now. */ int state = PTHREAD_CANCEL_ENABLE; - __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state), + __libc_ptf_call (__pthread_setcancelstate, + (PTHREAD_CANCEL_DISABLE, &state), 0); #endif @@ -393,7 +394,7 @@ error_at_line (int status, int errnum, const char *file_name, #ifdef _LIBC _IO_funlockfile (stderr); # ifdef __libc_ptf_call - __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0); + __libc_ptf_call (__pthread_setcancelstate, (state, NULL), 0); # endif #endif } -- cgit v1.2.3