1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-08 17:42:12 +03:00
* sysdeps/unix/sysv/linux/errlist.c: Likewise.
This commit is contained in:
Ulrich Drepper
2000-03-22 08:01:35 +00:00
parent 1ab1ea76bf
commit ef7dddd01c
10 changed files with 40 additions and 43 deletions

View File

@@ -3,6 +3,7 @@
* libio/oldtmpfile.c: Update for new SHLIB_COMPAT definition. * libio/oldtmpfile.c: Update for new SHLIB_COMPAT definition.
* libio/oldiofopen.c: Likewise. * libio/oldiofopen.c: Likewise.
* libio/oldiofclose.c: Likewise. * libio/oldiofclose.c: Likewise.
* sysdeps/unix/sysv/linux/errlist.c: Likewise.
2000-03-22 Roland McGrath <roland@baalperazim.frob.com> 2000-03-22 Roland McGrath <roland@baalperazim.frob.com>

View File

@@ -24,7 +24,7 @@
General Public License. */ General Public License. */
#include <shlib-compat.h> #include <shlib-compat.h>
#if SHLIB_COMPAT (libc, GLIBC_2_0) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
#define _IO_USE_OLD_IO_FILE #define _IO_USE_OLD_IO_FILE
#include "libioP.h" #include "libioP.h"

View File

@@ -17,7 +17,7 @@
Boston, MA 02111-1307, USA. */ Boston, MA 02111-1307, USA. */
#include <shlib-compat.h> #include <shlib-compat.h>
#if SHLIB_COMPAT (libc, GLIBC_2_0) #if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
#define _IO_USE_OLD_IO_FILE #define _IO_USE_OLD_IO_FILE
#include <stdio.h> #include <stdio.h>

View File

@@ -1,5 +1,10 @@
2000-03-21 Ulrich Drepper <drepper@redhat.com> 2000-03-21 Ulrich Drepper <drepper@redhat.com>
* 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. * pthread.c: Update for new SHLIB_COMPAT definition.
* manager.c (__pthread_manager): Unmask debug signal. * manager.c (__pthread_manager): Unmask debug signal.

View File

@@ -20,6 +20,7 @@
#include <sys/param.h> #include <sys/param.h>
#include "pthread.h" #include "pthread.h"
#include "internals.h" #include "internals.h"
#include <shlib-compat.h>
int __pthread_attr_init_2_1(pthread_attr_t *attr) 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; attr->__stacksize = STACK_SIZE - ps;
return 0; 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) int __pthread_attr_init_2_0(pthread_attr_t *attr)
{ {
attr->__detachstate = PTHREAD_CREATE_JOINABLE; attr->__detachstate = PTHREAD_CREATE_JOINABLE;
@@ -49,8 +52,6 @@ int __pthread_attr_init_2_0(pthread_attr_t *attr)
return 0; return 0;
} }
symbol_version (__pthread_attr_init_2_0, pthread_attr_init, GLIBC_2.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 #endif
int pthread_attr_destroy(pthread_attr_t *attr) int pthread_attr_destroy(pthread_attr_t *attr)

View File

@@ -19,6 +19,8 @@
/* GNU Library General Public License for more details. */ /* GNU Library General Public License for more details. */
/* Semaphores a la POSIX 1003.1b */ /* Semaphores a la POSIX 1003.1b */
#include <shlib-compat.h>
#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
#include <errno.h> #include <errno.h>
#include "pthread.h" #include "pthread.h"
@@ -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_init, sem_init, GLIBC_2.0);
symbol_version (__old_sem_wait, sem_wait, 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_trywait, sem_trywait, GLIBC_2.0);
symbol_version (__old_sem_post, sem_post, 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_getvalue, sem_getvalue, GLIBC_2.0);
symbol_version (__old_sem_destroy, sem_destroy, GLIBC_2.0); symbol_version (__old_sem_destroy, sem_destroy, GLIBC_2.0);
#endif #endif

View File

@@ -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); 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, int __pthread_create_2_0(pthread_t *thread, const pthread_attr_t *attr,
void * (*start_routine)(void *), void *arg) void * (*start_routine)(void *), void *arg)

View File

@@ -21,6 +21,7 @@
#include "spinlock.h" #include "spinlock.h"
#include "restart.h" #include "restart.h"
#include "queue.h" #include "queue.h"
#include <shlib-compat.h>
int __new_sem_init(sem_t *sem, int pshared, unsigned int value) int __new_sem_init(sem_t *sem, int pshared, unsigned int value)
{ {
@@ -189,21 +190,9 @@ int sem_unlink(const char *name)
return -1; return -1;
} }
#if defined PIC && DO_VERSIONING versioned_symbol (libpthread, __new_sem_init, sem_init, GLIBC_2_1);
default_symbol_version (__new_sem_init, sem_init, GLIBC_2.1); versioned_symbol (libpthread, __new_sem_wait, sem_wait, GLIBC_2_1);
default_symbol_version (__new_sem_wait, sem_wait, GLIBC_2.1); versioned_symbol (libpthread, __new_sem_trywait, sem_trywait, GLIBC_2_1);
default_symbol_version (__new_sem_trywait, sem_trywait, GLIBC_2.1); versioned_symbol (libpthread, __new_sem_post, sem_post, GLIBC_2_1);
default_symbol_version (__new_sem_post, sem_post, GLIBC_2.1); versioned_symbol (libpthread, __new_sem_getvalue, sem_getvalue, GLIBC_2_1);
default_symbol_version (__new_sem_getvalue, sem_getvalue, GLIBC_2.1); versioned_symbol (libpthread, __new_sem_destroy, sem_destroy, 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

View File

@@ -1,5 +1,5 @@
/* The weak pthread functions for Linux. /* 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. This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or The GNU C Library is free software; you can redistribute it and/or
@@ -20,20 +20,19 @@
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <stdlib.h> #include <stdlib.h>
#include <shlib-compat.h>
extern int __pthread_return_0 (void); extern int __pthread_return_0 (void);
extern int __pthread_return_1 (void); extern int __pthread_return_1 (void);
extern void __pthread_return_void (void); extern void __pthread_return_void (void);
/* Those are pthread functions which return 0 if successful. */ /* 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) weak_alias (__pthread_return_0, __libc_pthread_attr_init_2_1)
default_symbol_version (__libc_pthread_attr_init_2_1, pthread_attr_init, versioned_symbol (libpthread, __libc_pthread_attr_init_2_1, pthread_attr_init,
GLIBC_2.1); GLIBC_2_1);
#else #if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
weak_alias (__pthread_return_0, pthread_attr_init) 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 #endif
weak_alias (__pthread_return_0, pthread_attr_destroy) weak_alias (__pthread_return_0, pthread_attr_destroy)
weak_alias (__pthread_return_0, pthread_attr_setdetachstate) weak_alias (__pthread_return_0, pthread_attr_setdetachstate)

View File

@@ -23,13 +23,13 @@
#define SYS_ERRLIST __new_sys_errlist #define SYS_ERRLIST __new_sys_errlist
#define SYS_NERR __new_sys_nerr #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:"); asm (".data; .globl __old_sys_errlist; __old_sys_errlist:");
#endif #endif
#include <sysdeps/gnu/errlist.c> #include <sysdeps/gnu/errlist.c>
#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," asm (".type __old_sys_errlist,@object;.size __old_sys_errlist,"
OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR); OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);