* sysdeps/unix/sysv/linux/errlist.c: Likewise.
* 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 <roland@baalperazim.frob.com>
General Public License. */
#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
#include "libioP.h"
Boston, MA 02111-1307, USA. */
#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
#include <stdio.h>
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.
* manager.c (__pthread_manager): Unmask debug signal.
#include <sys/param.h>
#include "pthread.h"
#include "internals.h"
+#include <shlib-compat.h>
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;
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)
/* GNU Library General Public License for more details. */
/* Semaphores a la POSIX 1003.1b */
+#include <shlib-compat.h>
+#if SHLIB_COMPAT(libpthread, GLIBC_2_0, GLIBC_2_1)
#include <errno.h>
#include "pthread.h"
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))
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) {
}
}
-#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
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)
#include "spinlock.h"
#include "restart.h"
#include "queue.h"
+#include <shlib-compat.h>
int __new_sem_init(sem_t *sem, int pshared, unsigned int value)
{
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))
__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. */
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);
/* 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
#include <errno.h>
#include <limits.h>
#include <stdlib.h>
+#include <shlib-compat.h>
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)
#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 <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,"
OLD_ERRLIST_SIZE_STR "*" PTR_SIZE_STR);