From: Ulrich Drepper Date: Wed, 22 Mar 2000 08:01:35 +0000 (+0000) Subject: Update. X-Git-Tag: upstream/2.20~19040 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef7dddd01c9b2c2e6e676c023b9b6ae63ae9e49d;p=platform%2Fupstream%2Flinaro-glibc.git Update. * sysdeps/unix/sysv/linux/errlist.c: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 70cb935..cd2594e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,7 @@ * libio/oldtmpfile.c: Update for new SHLIB_COMPAT definition. * libio/oldiofopen.c: Likewise. * libio/oldiofclose.c: Likewise. + * sysdeps/unix/sysv/linux/errlist.c: Likewise. 2000-03-22 Roland McGrath diff --git a/libio/oldiofopen.c b/libio/oldiofopen.c index 1461fbc..a8c9a9e 100644 --- a/libio/oldiofopen.c +++ b/libio/oldiofopen.c @@ -24,7 +24,7 @@ General Public License. */ #include -#if SHLIB_COMPAT (libc, GLIBC_2_0) +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) #define _IO_USE_OLD_IO_FILE #include "libioP.h" diff --git a/libio/oldtmpfile.c b/libio/oldtmpfile.c index 37b52a4..048b538 100644 --- a/libio/oldtmpfile.c +++ b/libio/oldtmpfile.c @@ -17,7 +17,7 @@ Boston, MA 02111-1307, USA. */ #include -#if SHLIB_COMPAT (libc, GLIBC_2_0) +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) #define _IO_USE_OLD_IO_FILE #include diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 0c10a8f..6d28f90 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,5 +1,10 @@ 2000-03-21 Ulrich Drepper + * attr.c: Use new macros from shlib-compat.h to define versions. + * oldsemaphore.c: Likewise. + * semaphore.c: Likewise. + * weaks.c: Likewise. + * pthread.c: Update for new SHLIB_COMPAT definition. * manager.c (__pthread_manager): Unmask debug signal. diff --git a/linuxthreads/attr.c b/linuxthreads/attr.c index 2a70ebe..992234a 100644 --- a/linuxthreads/attr.c +++ b/linuxthreads/attr.c @@ -20,6 +20,7 @@ #include #include "pthread.h" #include "internals.h" +#include int __pthread_attr_init_2_1(pthread_attr_t *attr) { @@ -36,9 +37,11 @@ int __pthread_attr_init_2_1(pthread_attr_t *attr) attr->__stacksize = STACK_SIZE - ps; return 0; } -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -default_symbol_version (__pthread_attr_init_2_1, pthread_attr_init, GLIBC_2.1); +versioned_symbol (libpthread, __pthread_attr_init_2_1, pthread_attr_init, + GLIBC_2_1); + +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) int __pthread_attr_init_2_0(pthread_attr_t *attr) { attr->__detachstate = PTHREAD_CREATE_JOINABLE; @@ -49,8 +52,6 @@ int __pthread_attr_init_2_0(pthread_attr_t *attr) return 0; } symbol_version (__pthread_attr_init_2_0, pthread_attr_init, GLIBC_2.0); -#else -strong_alias (__pthread_attr_init_2_1, pthread_attr_init) #endif int pthread_attr_destroy(pthread_attr_t *attr) diff --git a/linuxthreads/oldsemaphore.c b/linuxthreads/oldsemaphore.c index 62d2812..c6f44cf 100644 --- a/linuxthreads/oldsemaphore.c +++ b/linuxthreads/oldsemaphore.c @@ -19,6 +19,8 @@ /* GNU Library General Public License for more details. */ /* Semaphores a la POSIX 1003.1b */ +#include +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) #include #include "pthread.h" @@ -90,7 +92,7 @@ int __old_sem_wait(old_sem_t * sem) while (1) { /* Register extrication interface */ - __pthread_set_own_extricate_if(self, &extr); + __pthread_set_own_extricate_if(self, &extr); do { oldstatus = sem->sem_status; if ((oldstatus & 1) && (oldstatus != 1)) @@ -103,12 +105,12 @@ int __old_sem_wait(old_sem_t * sem) while (! sem_compare_and_swap(sem, oldstatus, newstatus)); if (newstatus & 1) { /* We got the semaphore. */ - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); return 0; } /* Wait for sem_post or cancellation */ suspend(self); - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); /* This is a cancellation point */ if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) { @@ -224,11 +226,11 @@ static void sem_restart_list(pthread_descr waiting) } } -#if defined PIC && DO_VERSIONING symbol_version (__old_sem_init, sem_init, GLIBC_2.0); symbol_version (__old_sem_wait, sem_wait, GLIBC_2.0); symbol_version (__old_sem_trywait, sem_trywait, GLIBC_2.0); symbol_version (__old_sem_post, sem_post, GLIBC_2.0); symbol_version (__old_sem_getvalue, sem_getvalue, GLIBC_2.0); symbol_version (__old_sem_destroy, sem_destroy, GLIBC_2.0); + #endif diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c index e5010b9..6ac7bc9 100644 --- a/linuxthreads/pthread.c +++ b/linuxthreads/pthread.c @@ -517,7 +517,7 @@ int __pthread_create_2_1(pthread_t *thread, const pthread_attr_t *attr, versioned_symbol (libpthread, __pthread_create_2_1, pthread_create, GLIBC_2_1); -#if SHLIB_COMPAT (libpthread, GLIBC_2_0) +#if SHLIB_COMPAT (libpthread, GLIBC_2_0, GLIBC_2_1) int __pthread_create_2_0(pthread_t *thread, const pthread_attr_t *attr, void * (*start_routine)(void *), void *arg) diff --git a/linuxthreads/semaphore.c b/linuxthreads/semaphore.c index 0297b3a..c4a4f6e 100644 --- a/linuxthreads/semaphore.c +++ b/linuxthreads/semaphore.c @@ -21,6 +21,7 @@ #include "spinlock.h" #include "restart.h" #include "queue.h" +#include int __new_sem_init(sem_t *sem, int pshared, unsigned int value) { @@ -71,7 +72,7 @@ int __new_sem_wait(sem_t * sem) return 0; } /* Register extrication interface */ - __pthread_set_own_extricate_if(self, &extr); + __pthread_set_own_extricate_if(self, &extr); /* Enqueue only if not already cancelled. */ if (!(THREAD_GETMEM(self, p_canceled) && THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE)) @@ -81,13 +82,13 @@ int __new_sem_wait(sem_t * sem) __pthread_unlock((struct _pthread_fastlock *) &sem->__sem_lock); if (already_canceled) { - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); pthread_exit(PTHREAD_CANCELED); - } + } /* Wait for sem_post or cancellation, or fall through if already canceled */ suspend(self); - __pthread_set_own_extricate_if(self, 0); + __pthread_set_own_extricate_if(self, 0); /* Terminate only if the wakeup came from cancellation. */ /* Otherwise ignore cancellation because we got the semaphore. */ @@ -189,21 +190,9 @@ int sem_unlink(const char *name) return -1; } -#if defined PIC && DO_VERSIONING -default_symbol_version (__new_sem_init, sem_init, GLIBC_2.1); -default_symbol_version (__new_sem_wait, sem_wait, GLIBC_2.1); -default_symbol_version (__new_sem_trywait, sem_trywait, GLIBC_2.1); -default_symbol_version (__new_sem_post, sem_post, GLIBC_2.1); -default_symbol_version (__new_sem_getvalue, sem_getvalue, GLIBC_2.1); -default_symbol_version (__new_sem_destroy, sem_destroy, GLIBC_2.1); -#else -# ifdef weak_alias -weak_alias (__new_sem_init, sem_init) -weak_alias (__new_sem_wait, sem_wait) -weak_alias (__new_sem_trywait, sem_trywait) -weak_alias (__new_sem_post, sem_post) -weak_alias (__new_sem_getvalue, sem_getvalue) -weak_alias (__new_sem_destroy, sem_destroy) -# endif -#endif - +versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_getvalue, sem_getvalue, GLIBC_2_1); +versioned_symbol (libpthread, __new_sem_destroy, sem_destroy, GLIBC_2_1); diff --git a/linuxthreads/weaks.c b/linuxthreads/weaks.c index d6d028f..a91f5cf 100644 --- a/linuxthreads/weaks.c +++ b/linuxthreads/weaks.c @@ -1,5 +1,5 @@ /* The weak pthread functions for Linux. - Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 1998, 1999, 2000 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 @@ -20,20 +20,19 @@ #include #include #include +#include extern int __pthread_return_0 (void); extern int __pthread_return_1 (void); extern void __pthread_return_void (void); /* Those are pthread functions which return 0 if successful. */ -#if defined HAVE_ELF && defined PIC && defined DO_VERSIONING -weak_alias (__pthread_return_0, __libc_pthread_attr_init_2_0) -symbol_version (__libc_pthread_attr_init_2_0, pthread_attr_init, GLIBC_2.0); weak_alias (__pthread_return_0, __libc_pthread_attr_init_2_1) -default_symbol_version (__libc_pthread_attr_init_2_1, pthread_attr_init, - GLIBC_2.1); -#else -weak_alias (__pthread_return_0, pthread_attr_init) +versioned_symbol (libpthread, __libc_pthread_attr_init_2_1, pthread_attr_init, + GLIBC_2_1); +#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1) +weak_alias (__pthread_return_0, __libc_pthread_attr_init_2_0) +symbol_version (__libc_pthread_attr_init_2_, pthread_attr_init, GLIBC_2.0); #endif weak_alias (__pthread_return_0, pthread_attr_destroy) weak_alias (__pthread_return_0, pthread_attr_setdetachstate) diff --git a/sysdeps/unix/sysv/linux/errlist.c b/sysdeps/unix/sysv/linux/errlist.c index 8c7ce92..4fbc2ca 100644 --- a/sysdeps/unix/sysv/linux/errlist.c +++ b/sysdeps/unix/sysv/linux/errlist.c @@ -23,13 +23,13 @@ #define SYS_ERRLIST __new_sys_errlist #define SYS_NERR __new_sys_nerr -#if SHLIB_COMPAT (libc, GLIBC_2_0) +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".data; .globl __old_sys_errlist; __old_sys_errlist:"); #endif #include -#if SHLIB_COMPAT (libc, GLIBC_2_0) +#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) asm (".type __old_sys_errlist,@object;.size __old_sys_errlist," OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);