mirror of
git://sourceware.org/git/glibc.git
synced 2024-11-27 03:41:23 +08:00
96c82b3fee
* include/errno.h [RTLD_PRIVATE_ERRNO] (errno): Rename the real symbol to rtld_errno. * sysdeps/generic/errno.c [RTLD_PRIVATE_ERRNO] (rtld_errno): Define it, and don't define any other errno names. * sysdeps/unix/alpha/sysdep.h [RTLD_PRIVATE_ERRNO]: Use rtld_errno in place of errno. * sysdeps/unix/i386/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/i386/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/ia64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/m68k/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.S: Likewise. * sysdeps/unix/sysv/linux/s390/s390-64/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sh/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/sparc/sparc32/sysdep.h: Likewise. * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Likewise. * sysdeps/unix/x86_64/sysdep.S: Likewise.
46 lines
978 B
C
46 lines
978 B
C
#ifndef _ERRNO_H
|
|
|
|
#include <stdlib/errno.h>
|
|
|
|
#if defined _ERRNO_H && !defined _ISOMAC
|
|
|
|
# ifdef IS_IN_rtld
|
|
# include <dl-sysdep.h>
|
|
# endif
|
|
|
|
# if RTLD_PRIVATE_ERRNO
|
|
/* The dynamic linker uses its own private errno variable.
|
|
All access to errno inside the dynamic linker is serialized,
|
|
so a single (hidden) global variable is all it needs. */
|
|
|
|
# undef errno
|
|
# define errno rtld_errno
|
|
extern int rtld_errno attribute_hidden;
|
|
|
|
# else
|
|
|
|
# include <tls.h> /* Defines USE_TLS. */
|
|
|
|
# if USE___THREAD
|
|
# undef errno
|
|
# ifndef NOT_IN_libc
|
|
# define errno __libc_errno
|
|
# else
|
|
# define errno errno /* For #ifndef errno tests. */
|
|
# endif
|
|
extern __thread int errno attribute_tls_model_ie;
|
|
# endif
|
|
|
|
# endif /* RTLD_PRIVATE_ERRNO */
|
|
|
|
# define __set_errno(val) (errno = (val))
|
|
|
|
# ifndef __ASSEMBLER__
|
|
extern int *__errno_location (void) __THROW __attribute__ ((__const__));
|
|
libc_hidden_proto (__errno_location)
|
|
# endif
|
|
|
|
#endif /* _ERRNO_H */
|
|
|
|
#endif /* ! _ERRNO_H */
|