diff options
author | Ulrich Drepper <drepper@redhat.com> | 2003-01-03 01:35:14 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2003-01-03 01:35:14 +0000 |
commit | bf293afeca043b28fd1d07e179106f337aa9ec58 (patch) | |
tree | cbd15671dfeef397742c9b34a136ac8345d13a54 /nptl | |
parent | b0c9067d7b93d240363167e0778a86eae939eb4d (diff) | |
download | glibc-bf293afeca043b28fd1d07e179106f337aa9ec58.tar.gz |
Update.
2003-01-02 Jakub Jelinek <jakub@redhat.com>
* sysdeps/unix/sysv/linux/arm/sigaction.c (__sigaction,
sigaction): Protect weak_alias and libc_hidden_weak with
#ifndef LIBC_SIGACTION.
* sysdeps/unix/sysv/linux/ia64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/mips/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/s390/s390-64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc32/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/sparc/sparc64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/x86_64/sigaction.c (__sigaction,
sigaction): Likewise.
* sysdeps/unix/sysv/linux/i386/sigaction.c (__sigaction,
sigaction): Likewise. Remove SIGCANCEL handling here.
* sysdeps/unix/sysv/linux/sigaction.c (__sigaction, sigaction):
Likewise.
Diffstat (limited to 'nptl')
-rw-r--r-- | nptl/ChangeLog | 53 | ||||
-rw-r--r-- | nptl/Makefile | 4 | ||||
-rw-r--r-- | nptl/Versions | 6 | ||||
-rw-r--r-- | nptl/forward.c | 51 | ||||
-rw-r--r-- | nptl/init.c | 22 | ||||
-rw-r--r-- | nptl/old_pthread_cond_broadcast.c | 6 | ||||
-rw-r--r-- | nptl/old_pthread_cond_destroy.c | 6 | ||||
-rw-r--r-- | nptl/old_pthread_cond_init.c | 6 | ||||
-rw-r--r-- | nptl/old_pthread_cond_signal.c | 6 | ||||
-rw-r--r-- | nptl/old_pthread_cond_wait.c | 6 | ||||
-rw-r--r-- | nptl/pthreadP.h | 29 | ||||
-rw-r--r-- | nptl/pthread_cond_destroy.c | 6 | ||||
-rw-r--r-- | nptl/pthread_cond_init.c | 6 | ||||
-rw-r--r-- | nptl/sysdeps/pthread/sigaction.c | 35 |
14 files changed, 194 insertions, 48 deletions
diff --git a/nptl/ChangeLog b/nptl/ChangeLog index ec44dffa21..ab4702f08a 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,56 @@ +2003-01-02 Jakub Jelinek <jakub@redhat.com> + + * Versions [libc] (GLIBC_2.3.2): Export pthread_cond_broadcast, + pthread_cond_destroy, pthread_cond_init, pthread_cond_signal + and pthread_cond_wait. + * old_pthread_cond_broadcast.c (__old_pthread_cond_broadcast): + Renamed to... + (__pthread_cond_broadcast_2_0): ... this. + * old_pthread_cond_destroy.c (__old_pthread_cond_destroy): + Renamed to... + (__pthread_cond_destroy_2_0): ... this. + * old_pthread_cond_init.c (__old_pthread_cond_init): + Renamed to... + (__pthread_cond_init_2_0): ... this. + * old_pthread_cond_signal.c (__old_pthread_cond_signal): + Renamed to... + (__pthread_cond_signal_2_0): ... this. + * old_pthread_cond_wait.c (__old_pthread_cond_wait): + Renamed to... + (__pthread_cond_wait_2_0): ... this. + * pthread_cond_destroy.c: Include shlib-compat.h. + (pthread_cond_destroy): Change strong_alias into versioned_symbol. + * pthread_cond_init.c: Include shlib-compat.h. + (pthread_cond_init): Change strong_alias into versioned_symbol. + * pthreadP.h (struct pthread_functions): Rename ptr_pthread_cond_* + fields to ptr___pthread_cond_* and add ptr___pthread_cond_*_2_0 + fields. + (__pthread_cond_broadcast_2_0, __pthread_cond_destroy_2_0, + __pthread_cond_init_2_0, __pthread_cond_signal_2_0, + __pthread_cond_wait_2_0): New prototypes. + (__old_pthread_cond_broadcast, __old_pthread_cond_destroy, + __old_pthread_cond_init, __old_pthread_cond_signal, + __old_pthread_cond_wait): Removed. + * init.c: Include shlib-compat.h. + (pthread_functions): Guard ptr___pthread_attr_init_2_0 + initialization with SHLIB_COMPAT (GLIBC_2_0, GLIBC_2_1). + Rename ptr_pthread_cond_* to ptr___pthread_cond_*, initialize + ptr___pthread_cond_*_2_0 fields. + * forward.c: Export both pthread_cond_*@@GLIBC_2.3.2 and + pthread_cond_*@GLIBC_2.0 compatibility symbols. + + * sysdeps/pthread/sigaction.c (SIGCANCEL): Only define if + LIBC_SIGACTION was not yet defined. + [!defined LIBC_SIGACTION]: Define LIBC_SIGACTION, #include self. + [!defined LIBC_SIGACTION] (__sigaction): New function and + libc_hidden_weak. + [!defined LIBC_SIGACTION] (sigaction): New weak_alias. + [defined LIBC_SIGACTION]: #include_next <sigaction.c>. + +2003-01-02 Jakub Jelinek <jakub@redhat.com> + + * Makefile (CFLAGS-pthread_atfork.c): Add -DNOT_IN_libc. + 2003-01-02 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h (pthread_cond_t): diff --git a/nptl/Makefile b/nptl/Makefile index 274b1b2930..2a68c2e566 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2002 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -113,6 +113,8 @@ libpthread-shared-only-routines = pt-allocrtsig libpthread-nonshared = pthread_atfork +CFLAGS-pthread_atfork.c = -DNOT_IN_libc + # Don't generate deps for calls with no sources. See sysdeps/unix/Makefile. omit-deps = $(unix-syscalls:%=ptw-%) diff --git a/nptl/Versions b/nptl/Versions index 26655f37c1..436234a62d 100644 --- a/nptl/Versions +++ b/nptl/Versions @@ -19,6 +19,12 @@ libc { GLIBC_2.1 { pthread_attr_init; } + GLIBC_2.3.2 { + # Changed pthread_cond_t. + pthread_cond_init; pthread_cond_destroy; + pthread_cond_wait; pthread_cond_signal; + pthread_cond_broadcast; + } } libpthread { diff --git a/nptl/forward.c b/nptl/forward.c index a167bc1027..038eae8684 100644 --- a/nptl/forward.c +++ b/nptl/forward.c @@ -85,19 +85,54 @@ FORWARD (pthread_attr_setscope, (pthread_attr_t *attr, int scope), FORWARD (pthread_condattr_destroy, (pthread_condattr_t *attr), (attr), 0) FORWARD (pthread_condattr_init, (pthread_condattr_t *attr), (attr), 0) +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +FORWARD (__pthread_cond_broadcast_2_0, (pthread_cond_t *cond), (cond), 0) +compat_symbol (libc, __pthread_cond_broadcast_2_0, pthread_cond_broadcast, + GLIBC_2_0); +#endif +FORWARD (__pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0) +versioned_symbol (libc, __pthread_cond_broadcast, pthread_cond_broadcast, + GLIBC_2_3_2); + +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +FORWARD (__pthread_cond_destroy_2_0, (pthread_cond_t *cond), (cond), 0) +compat_symbol (libc, __pthread_cond_destroy_2_0, pthread_cond_destroy, + GLIBC_2_0); +#endif +FORWARD (__pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0) +versioned_symbol (libc, __pthread_cond_destroy, pthread_cond_destroy, + GLIBC_2_3_2); -FORWARD (pthread_cond_broadcast, (pthread_cond_t *cond), (cond), 0) - -FORWARD (pthread_cond_destroy, (pthread_cond_t *cond), (cond), 0) - -FORWARD (pthread_cond_init, +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +FORWARD (__pthread_cond_init_2_0, (pthread_cond_t *cond, const pthread_condattr_t *cond_attr), (cond, cond_attr), 0) +compat_symbol (libc, __pthread_cond_init_2_0, pthread_cond_init, GLIBC_2_0); +#endif +FORWARD (__pthread_cond_init, + (pthread_cond_t *cond, const pthread_condattr_t *cond_attr), + (cond, cond_attr), 0) +versioned_symbol (libc, __pthread_cond_init, pthread_cond_init, GLIBC_2_3_2); -FORWARD (pthread_cond_signal, (pthread_cond_t *cond), (cond), 0) - -FORWARD (pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex), +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +FORWARD (__pthread_cond_signal_2_0, (pthread_cond_t *cond), (cond), 0) +compat_symbol (libc, __pthread_cond_signal_2_0, pthread_cond_signal, + GLIBC_2_0); +#endif +FORWARD (__pthread_cond_signal, (pthread_cond_t *cond), (cond), 0) +versioned_symbol (libc, __pthread_cond_signal, pthread_cond_signal, + GLIBC_2_3_2); + +#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3_2) +FORWARD (__pthread_cond_wait_2_0, + (pthread_cond_t *cond, pthread_mutex_t *mutex), (cond, mutex), 0) +compat_symbol (libc, __pthread_cond_wait_2_0, pthread_cond_wait, + GLIBC_2_0); +#endif +FORWARD (__pthread_cond_wait, (pthread_cond_t *cond, pthread_mutex_t *mutex), (cond, mutex), 0) +versioned_symbol (libc, __pthread_cond_wait, pthread_cond_wait, + GLIBC_2_3_2); FORWARD (pthread_equal, (pthread_t thread1, pthread_t thread2), diff --git a/nptl/init.c b/nptl/init.c index b1d9a8a938..9a0c4fadcd 100644 --- a/nptl/init.c +++ b/nptl/init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -30,6 +30,7 @@ #include <tls.h> #include <fork.h> #include <version.h> +#include <shlib-compat.h> /* XXX For the time being... */ @@ -56,7 +57,9 @@ extern void __libc_setup_tls (size_t tcbsize, size_t tcbalign); static struct pthread_functions pthread_functions = { .ptr_pthread_attr_destroy = __pthread_attr_destroy, +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) .ptr___pthread_attr_init_2_0 = __pthread_attr_init_2_0, +#endif .ptr___pthread_attr_init_2_1 = __pthread_attr_init_2_1, .ptr_pthread_attr_getdetachstate = __pthread_attr_getdetachstate, .ptr_pthread_attr_setdetachstate = __pthread_attr_setdetachstate, @@ -70,11 +73,18 @@ static struct pthread_functions pthread_functions = .ptr_pthread_attr_setscope = __pthread_attr_setscope, .ptr_pthread_condattr_destroy = __pthread_condattr_destroy, .ptr_pthread_condattr_init = __pthread_condattr_init, - .ptr_pthread_cond_broadcast = __pthread_cond_broadcast, - .ptr_pthread_cond_destroy = __pthread_cond_destroy, - .ptr_pthread_cond_init = __pthread_cond_init, - .ptr_pthread_cond_signal = __pthread_cond_signal, - .ptr_pthread_cond_wait = __pthread_cond_wait, + .ptr___pthread_cond_broadcast = __pthread_cond_broadcast, + .ptr___pthread_cond_destroy = __pthread_cond_destroy, + .ptr___pthread_cond_init = __pthread_cond_init, + .ptr___pthread_cond_signal = __pthread_cond_signal, + .ptr___pthread_cond_wait = __pthread_cond_wait, +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) + .ptr___pthread_cond_broadcast_2_0 = __pthread_cond_broadcast_2_0, + .ptr___pthread_cond_destroy_2_0 = __pthread_cond_destroy_2_0, + .ptr___pthread_cond_init_2_0 = __pthread_cond_init_2_0, + .ptr___pthread_cond_signal_2_0 = __pthread_cond_signal_2_0, + .ptr___pthread_cond_wait_2_0 = __pthread_cond_wait_2_0, +#endif .ptr_pthread_equal = __pthread_equal, .ptr___pthread_exit = __pthread_exit, .ptr_pthread_getschedparam = __pthread_getschedparam, diff --git a/nptl/old_pthread_cond_broadcast.c b/nptl/old_pthread_cond_broadcast.c index 9d63af9a1d..86f8d5d4b7 100644 --- a/nptl/old_pthread_cond_broadcast.c +++ b/nptl/old_pthread_cond_broadcast.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -25,7 +25,7 @@ #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) int -__old_pthread_cond_broadcast (cond) +__pthread_cond_broadcast_2_0 (cond) pthread_cond_t *cond; { pthread_cond_t **realp = (pthread_cond_t **) cond; @@ -41,6 +41,6 @@ __old_pthread_cond_broadcast (cond) return __pthread_cond_broadcast (*realp); } -compat_symbol (libpthread, __old_pthread_cond_broadcast, +compat_symbol (libpthread, __pthread_cond_broadcast_2_0, pthread_cond_broadcast, GLIBC_2_0); #endif diff --git a/nptl/old_pthread_cond_destroy.c b/nptl/old_pthread_cond_destroy.c index 9afe7d323b..6f73f7cc57 100644 --- a/nptl/old_pthread_cond_destroy.c +++ b/nptl/old_pthread_cond_destroy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -24,7 +24,7 @@ #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) int -__old_pthread_cond_destroy (cond) +__pthread_cond_destroy_2_0 (cond) pthread_cond_t *cond; { /* Free the memory which was eventually allocated. */ @@ -32,6 +32,6 @@ __old_pthread_cond_destroy (cond) return 0; } -compat_symbol (libpthread, __old_pthread_cond_destroy, pthread_cond_destroy, +compat_symbol (libpthread, __pthread_cond_destroy_2_0, pthread_cond_destroy, GLIBC_2_0); #endif diff --git a/nptl/old_pthread_cond_init.c b/nptl/old_pthread_cond_init.c index 70275d94df..309136eaab 100644 --- a/nptl/old_pthread_cond_init.c +++ b/nptl/old_pthread_cond_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -23,7 +23,7 @@ #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) int -__old_pthread_cond_init (cond, cond_attr) +__pthread_cond_init_2_0 (cond, cond_attr) pthread_cond_t *cond; const pthread_condattr_t *cond_attr; { @@ -38,6 +38,6 @@ __old_pthread_cond_init (cond, cond_attr) return 0; } -compat_symbol (libpthread, __old_pthread_cond_init, pthread_cond_init, +compat_symbol (libpthread, __pthread_cond_init_2_0, pthread_cond_init, GLIBC_2_0); #endif diff --git a/nptl/old_pthread_cond_signal.c b/nptl/old_pthread_cond_signal.c index 467812eb4b..869ac4d235 100644 --- a/nptl/old_pthread_cond_signal.c +++ b/nptl/old_pthread_cond_signal.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -25,7 +25,7 @@ #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) int -__old_pthread_cond_signal (cond) +__pthread_cond_signal_2_0 (cond) pthread_cond_t *cond; { pthread_cond_t **realp = (pthread_cond_t **) cond; @@ -41,6 +41,6 @@ __old_pthread_cond_signal (cond) return __pthread_cond_signal (*realp); } -compat_symbol (libpthread, __old_pthread_cond_signal, pthread_cond_signal, +compat_symbol (libpthread, __pthread_cond_signal_2_0, pthread_cond_signal, GLIBC_2_0); #endif diff --git a/nptl/old_pthread_cond_wait.c b/nptl/old_pthread_cond_wait.c index 4a7282f15f..4d4f9431d5 100644 --- a/nptl/old_pthread_cond_wait.c +++ b/nptl/old_pthread_cond_wait.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -25,7 +25,7 @@ #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_3_2) int -__old_pthread_cond_wait (cond, mutex) +__pthread_cond_wait_2_0 (cond, mutex) pthread_cond_t *cond; pthread_mutex_t *mutex; { @@ -42,6 +42,6 @@ __old_pthread_cond_wait (cond, mutex) return __pthread_cond_wait (*realp, mutex); } -compat_symbol (libpthread, __old_pthread_cond_wait, pthread_cond_wait, +compat_symbol (libpthread, __pthread_cond_wait_2_0, pthread_cond_wait, GLIBC_2_0); #endif diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h index e4a90131d9..0a0e332f1c 100644 --- a/nptl/pthreadP.h +++ b/nptl/pthreadP.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -88,11 +88,18 @@ struct pthread_functions int (*ptr_pthread_attr_setscope) (pthread_attr_t *, int); int (*ptr_pthread_condattr_destroy) (pthread_condattr_t *); int (*ptr_pthread_condattr_init) (pthread_condattr_t *); - int (*ptr_pthread_cond_broadcast) (pthread_cond_t *); - int (*ptr_pthread_cond_destroy) (pthread_cond_t *); - int (*ptr_pthread_cond_init) (pthread_cond_t *, const pthread_condattr_t *); - int (*ptr_pthread_cond_signal) (pthread_cond_t *); - int (*ptr_pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *); + int (*ptr___pthread_cond_broadcast) (pthread_cond_t *); + int (*ptr___pthread_cond_destroy) (pthread_cond_t *); + int (*ptr___pthread_cond_init) (pthread_cond_t *, + const pthread_condattr_t *); + int (*ptr___pthread_cond_signal) (pthread_cond_t *); + int (*ptr___pthread_cond_wait) (pthread_cond_t *, pthread_mutex_t *); + int (*ptr___pthread_cond_broadcast_2_0) (pthread_cond_t *); + int (*ptr___pthread_cond_destroy_2_0) (pthread_cond_t *); + int (*ptr___pthread_cond_init_2_0) (pthread_cond_t *, + const pthread_condattr_t *); + int (*ptr___pthread_cond_signal_2_0) (pthread_cond_t *); + int (*ptr___pthread_cond_wait_2_0) (pthread_cond_t *, pthread_mutex_t *); int (*ptr_pthread_equal) (pthread_t, pthread_t); void (*ptr___pthread_exit) (void *); int (*ptr_pthread_getschedparam) (pthread_t, int *, struct sched_param *); @@ -315,15 +322,15 @@ extern int __pthread_enable_asynccancel (void) attribute_hidden; extern void __pthread_disable_asynccancel (int oldtype) internal_function attribute_hidden; -extern int __old_pthread_cond_broadcast (pthread_cond_t *cond); -extern int __old_pthread_cond_destroy (pthread_cond_t *cond); -extern int __old_pthread_cond_init (pthread_cond_t *cond, +extern int __pthread_cond_broadcast_2_0 (pthread_cond_t *cond); +extern int __pthread_cond_destroy_2_0 (pthread_cond_t *cond); +extern int __pthread_cond_init_2_0 (pthread_cond_t *cond, const pthread_condattr_t *cond_attr); -extern int __old_pthread_cond_signal (pthread_cond_t *cond); +extern int __pthread_cond_signal_2_0 (pthread_cond_t *cond); extern int __old_pthread_cond_timedwait (pthread_cond_t *cond, pthread_mutex_t *mutex, const struct timespec *abstime); -extern int __old_pthread_cond_wait (pthread_cond_t *cond, +extern int __pthread_cond_wait_2_0 (pthread_cond_t *cond, pthread_mutex_t *mutex); /* The two functions are in libc.so and not exported. */ diff --git a/nptl/pthread_cond_destroy.c b/nptl/pthread_cond_destroy.c index 130cb21402..5ade3e63db 100644 --- a/nptl/pthread_cond_destroy.c +++ b/nptl/pthread_cond_destroy.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <shlib-compat.h> #include "pthreadP.h" @@ -26,4 +27,5 @@ __pthread_cond_destroy (cond) { return 0; } -strong_alias (__pthread_cond_destroy, pthread_cond_destroy) +versioned_symbol (libpthread, __pthread_cond_destroy, + pthread_cond_destroy, GLIBC_2_3_2); diff --git a/nptl/pthread_cond_init.c b/nptl/pthread_cond_init.c index cd762f2222..e079ae9235 100644 --- a/nptl/pthread_cond_init.c +++ b/nptl/pthread_cond_init.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -17,6 +17,7 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +#include <shlib-compat.h> #include "pthreadP.h" @@ -36,4 +37,5 @@ __pthread_cond_init (cond, cond_attr) return 0; } -strong_alias (__pthread_cond_init, pthread_cond_init) +versioned_symbol (libpthread, __pthread_cond_init, + pthread_cond_init, GLIBC_2_3_2); diff --git a/nptl/sysdeps/pthread/sigaction.c b/nptl/sysdeps/pthread/sigaction.c index c3f6f435dd..e3554ddb44 100644 --- a/nptl/sysdeps/pthread/sigaction.c +++ b/nptl/sysdeps/pthread/sigaction.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2002 Free Software Foundation, Inc. +/* Copyright (C) 2002, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@redhat.com>, 2002. @@ -17,8 +17,37 @@ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ +/* This is tricky. GCC doesn't like #include_next in the primary + source file and even if it did, the first #include_next is this + exact file anyway. */ +#ifndef LIBC_SIGACTION + /* We use the libc implementation but we tell it to not allow SIGCANCEL to be handled. */ -#define SIGCANCEL __SIGRTMIN +# define SIGCANCEL __SIGRTMIN +# define LIBC_SIGACTION 1 + +# include <nptl/sysdeps/pthread/sigaction.c> + +int +__sigaction (sig, act, oact) + int sig; + const struct sigaction *act; + struct sigaction *oact; +{ + if (sig == SIGCANCEL) + { + __set_errno (EINVAL); + return -1; + } + + return __libc_sigaction (sig, act, oact); +} +libc_hidden_weak (__sigaction) +weak_alias (__sigaction, sigaction) + +#else + +# include_next <sigaction.c> -#include_next <sigaction.c> +#endif /* LIBC_SIGACTION */ |