diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-07-09 20:58:54 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-07-09 20:58:54 +0000 |
commit | c2fa5b5a4f4d2f0f71918f4cd8b5b67a26d4b72c (patch) | |
tree | 3682f88638ed44e98e8c0d0c284d209d822b1804 | |
parent | a828c2f5332fbee41968ccc57115d0d8fc105b85 (diff) | |
download | glibc-c2fa5b5a4f4d2f0f71918f4cd8b5b67a26d4b72c.tar glibc-c2fa5b5a4f4d2f0f71918f4cd8b5b67a26d4b72c.tar.gz glibc-c2fa5b5a4f4d2f0f71918f4cd8b5b67a26d4b72c.tar.bz2 glibc-c2fa5b5a4f4d2f0f71918f4cd8b5b67a26d4b72c.zip |
Update.
1999-07-09 Cristian Gafton <gafton@redhat.com>
* nscd/nscd_gethst_r.c (nscd_gethst_r): Make sure
resultbuf->h_addr_list addresses are correctly aligned.
* sysdeps/i386/bits/string.h (__memcpy_c): Help some stupid old
compilers.
(__memset_cc): Likewise.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | Versions.def | 1 | ||||
-rw-r--r-- | grp/Versions | 4 | ||||
-rw-r--r-- | inet/Versions | 8 | ||||
-rw-r--r-- | linuxthreads/ChangeLog | 14 | ||||
-rw-r--r-- | linuxthreads/Makefile | 3 | ||||
-rw-r--r-- | linuxthreads/Versions | 2 | ||||
-rw-r--r-- | linuxthreads/semaphore.c | 31 | ||||
-rw-r--r-- | nscd/nscd_gethst_r.c | 6 | ||||
-rw-r--r-- | nss/getXXbyYY_r.c | 27 | ||||
-rw-r--r-- | nss/getXXent_r.c | 28 | ||||
-rw-r--r-- | pwd/Versions | 4 | ||||
-rw-r--r-- | shadow/Versions | 4 | ||||
-rw-r--r-- | sysdeps/i386/bits/string.h | 20 |
14 files changed, 145 insertions, 16 deletions
@@ -1,5 +1,14 @@ +1999-07-09 Cristian Gafton <gafton@redhat.com> + + * nscd/nscd_gethst_r.c (nscd_gethst_r): Make sure + resultbuf->h_addr_list addresses are correctly aligned. + 1999-07-09 Ulrich Drepper <drepper@cygnus.com> + * sysdeps/i386/bits/string.h (__memcpy_c): Help some stupid old + compilers. + (__memset_cc): Likewise. + * sysdeps/generic/libc-start.c: For SUID binaries check whether the standard file descriptors are open. Reported by Chris Evans <chris@ferret.lmh.ox.ac.uk>. diff --git a/Versions.def b/Versions.def index a68df43f8b..0c7fa6f561 100644 --- a/Versions.def +++ b/Versions.def @@ -60,6 +60,7 @@ libpthread { GLIBC_2.0 GLIBC_2.1 GLIBC_2.0 GLIBC_2.1.1 GLIBC_2.1 + GLIBC_2.1.2 GLIBC_2.1.1 } libresolv { GLIBC_2.0 diff --git a/grp/Versions b/grp/Versions index 1615b24186..36b5b70366 100644 --- a/grp/Versions +++ b/grp/Versions @@ -20,4 +20,8 @@ libc { # p* putgrent; } + GLIBC_2.1.2 { + # g* + getgrent_r; getgrgid_r; getgrnam_r; + } } diff --git a/inet/Versions b/inet/Versions index 0e60b09c09..711d490aa5 100644 --- a/inet/Versions +++ b/inet/Versions @@ -54,4 +54,12 @@ libc { # i* if_freenameindex; if_indextoname; if_nameindex; if_nametoindex; } + GLIBC_2.1.2 { + # g* + getaliasbyname_r; getaliasent_r; gethostbyaddr_r; gethostbyname2_r; + gethostbyname_r; gethostent_r; getnetbyaddr_r; getnetbyname_r; + getnetent_r; getnetgrent_r; getprotobyname_r; getprotobynumber_r; + getprotoent_r; getrpcbyname_r; getrpcbynumber_r; getrpcent_r; + getservbyname_r; + } } diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index dfb0e3d66a..f653383f5e 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,17 @@ +1999-07-09 Cristian Gafton <gafton@redhat.com> + + * Makefile (libpthread-routines): Add oldsemaphore routine. + * Versions: Add sem_destroy; sem_getvalue; sem_init; sem_post; + sem_trywait; sem_wait; to GLIBC_2.1. + * oldsemaphore.c: New file. + * semaphore.c: Add default_symbol_versions for the changed functions. + (__new_sem_init): Rename from sem_init. + (__new_sem_post): Rename from sem_post. + (__new_sem_wait): Rename from sem_wait. + (__new_sem_trywait): Rename from sem_trywait. + (__new_sem_getvalue): Rename from sem_getvalue. + (__new_sem_destroy): Rename from sem_destroy. + 1999-06-23 Robey Pointer <robey@netscape.com> * internals.h: Added p_nextlock entry to separate queueing for a diff --git a/linuxthreads/Makefile b/linuxthreads/Makefile index 600e194e31..8268666c90 100644 --- a/linuxthreads/Makefile +++ b/linuxthreads/Makefile @@ -34,7 +34,8 @@ extra-libs-others := $(extra-libs) libpthread-routines := attr cancel condvar join manager mutex ptfork \ ptlongjmp pthread signals specific errno lockfile \ - semaphore spinlock wrapsyscall rwlock pt-machine + semaphore spinlock wrapsyscall rwlock pt-machine \ + oldsemaphore vpath %.c Examples tests = ex1 ex2 ex3 ex4 ex5 ex6 diff --git a/linuxthreads/Versions b/linuxthreads/Versions index 6b95031820..66a8f46b5c 100644 --- a/linuxthreads/Versions +++ b/linuxthreads/Versions @@ -97,6 +97,8 @@ libpthread { pthread_mutexattr_gettype; pthread_mutexattr_settype; + sem_destroy; sem_getvalue; sem_init; sem_post; sem_trywait; sem_wait; + # helper functions __libc_current_sigrtmin; __libc_current_sigrtmax; __libc_allocate_rtsig; diff --git a/linuxthreads/semaphore.c b/linuxthreads/semaphore.c index 175302188e..cfad97aced 100644 --- a/linuxthreads/semaphore.c +++ b/linuxthreads/semaphore.c @@ -22,7 +22,7 @@ #include "restart.h" #include "queue.h" -int sem_init(sem_t *sem, int pshared, unsigned int value) +int __new_sem_init(sem_t *sem, int pshared, unsigned int value) { if (value > SEM_VALUE_MAX) { errno = EINVAL; @@ -38,7 +38,7 @@ int sem_init(sem_t *sem, int pshared, unsigned int value) return 0; } -int sem_wait(sem_t * sem) +int __new_sem_wait(sem_t * sem) { volatile pthread_descr self = thread_self(); @@ -65,7 +65,7 @@ int sem_wait(sem_t * sem) return 0; } -int sem_trywait(sem_t * sem) +int __new_sem_trywait(sem_t * sem) { int retval; @@ -81,7 +81,7 @@ int sem_trywait(sem_t * sem) return retval; } -int sem_post(sem_t * sem) +int __new_sem_post(sem_t * sem) { pthread_descr self = thread_self(); pthread_descr th; @@ -120,13 +120,13 @@ int sem_post(sem_t * sem) return 0; } -int sem_getvalue(sem_t * sem, int * sval) +int __new_sem_getvalue(sem_t * sem, int * sval) { *sval = sem->__sem_value; return 0; } -int sem_destroy(sem_t * sem) +int __new_sem_destroy(sem_t * sem) { if (sem->__sem_waiting != NULL) { __set_errno (EBUSY); @@ -152,3 +152,22 @@ int sem_unlink(const char *name) __set_errno (ENOSYS); 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 + diff --git a/nscd/nscd_gethst_r.c b/nscd/nscd_gethst_r.c index cb8f62e696..6ee0826e98 100644 --- a/nscd/nscd_gethst_r.c +++ b/nscd/nscd_gethst_r.c @@ -214,6 +214,12 @@ nscd_gethst_r (const char *key, size_t keylen, request_type type, + hst_resp.h_aliases_cnt * sizeof (size_t)); n = 2; + + /* These things must be aligned or ntohl will cause havoc. */ + align = ((__alignof__ (char *) - (cp - ((char *) 0))) + & (__alignof__ (char *) - 1)); + cp += align; + if (type == GETHOSTBYADDR || type == GETHOSTBYNAME) { vec[2].iov_base = cp; diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index ac10f4ea7a..a54ae67bb7 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -208,5 +208,32 @@ done: return status == NSS_STATUS_SUCCESS ? 0 : errno; } +#if defined SHARED && DO_VERSIONING +#define OLD(name) OLD1 (name) +#define OLD1(name) __old_##name + +int +OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer, + size_t buflen, LOOKUP_TYPE **result H_ERRNO_PARM) +{ + int ret = INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, resbuf, buffer, + buflen, result H_ERRNO_VAR); + + if (ret != 0) + ret = -1; + + return ret; +} + +#define do_symbol_version(real, name, version) \ + symbol_version(real, name, version) +do_symbol_version(OLD (REENTRANT_NAME), REENTRANT_NAME, GLIBC_2.0); + +#define do_default_symbol_version(real, name, version) \ + default_symbol_version(real, name, version) +do_default_symbol_version(INTERNAL (REENTRANT_NAME), REENTRANT_NAME, + GLIBC_2.1.2); +#else #define do_weak_alias(n1, n2) weak_alias (n1, (n2)) do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME) +#endif diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c index 57bb99f081..6f6f22ad0b 100644 --- a/nss/getXXent_r.c +++ b/nss/getXXent_r.c @@ -290,5 +290,33 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen, *result = status == NSS_STATUS_SUCCESS ? resbuf : NULL; return status == NSS_STATUS_SUCCESS ? 0 : errno; } +#if defined SHARED && DO_VERSIONING +#define OLD(name) OLD1 (name) +#define OLD1(name) __old_##name + +int +OLD (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen, + LOOKUP_TYPE **result H_ERRNO_PARM) +{ + int ret = INTERNAL (REENTRANT_GETNAME) (resbuf, buffer, buflen, + result H_ERRNO_VAR); + + if (ret != 0) + ret = -1; + + return ret; +} + +#define do_symbol_version(real, name, version) \ + symbol_version(real, name, version) +do_symbol_version(OLD (REENTRANT_GETNAME), REENTRANT_GETNAME, + GLIBC_2.0); + +#define do_default_symbol_version(real, name, version) \ + default_symbol_version(real, name, version) +do_default_symbol_version(INTERNAL (REENTRANT_GETNAME), + REENTRANT_GETNAME, GLIBC_2.1.2); +#else #define do_weak_alias(n1, n2) weak_alias (n1, n2) do_weak_alias (INTERNAL (REENTRANT_GETNAME), REENTRANT_GETNAME) +#endif diff --git a/pwd/Versions b/pwd/Versions index 45a750eb41..091fa86443 100644 --- a/pwd/Versions +++ b/pwd/Versions @@ -12,4 +12,8 @@ libc { # p* putpwent; setpwent; } + GLIBC_2.1.2 { + # g* + getpwent_r; getpwuid_r; + } } diff --git a/shadow/Versions b/shadow/Versions index 7a0dae565e..38ab368fff 100644 --- a/shadow/Versions +++ b/shadow/Versions @@ -24,4 +24,8 @@ libc { # u* ulckpwdf; } + GLIBC_2.1.2 { + # g* + getspent_r; getspnam_r; + } } diff --git a/sysdeps/i386/bits/string.h b/sysdeps/i386/bits/string.h index d67db630f5..1ea0571680 100644 --- a/sysdeps/i386/bits/string.h +++ b/sysdeps/i386/bits/string.h @@ -122,17 +122,18 @@ __memcpy_c (void *__dest, __const void *__src, size_t __n) { case 0: __COMMON_CODE (""); - return __dest; + break; case 1: __COMMON_CODE ("\n\tmovsb"); - return __dest; + break; case 2: __COMMON_CODE ("\n\tmovsw"); - return __dest; + break; case 3: __COMMON_CODE ("\n\tmovsw\n\tmovsb"); - return __dest; - } + break; + } + return __dest; #undef __COMMON_CODE } @@ -214,17 +215,18 @@ __memset_cc (void *__s, unsigned long int __pattern, size_t __n) { case 0: __COMMON_CODE (""); - return __s; + break; case 1: __COMMON_CODE ("\n\tstosb"); - return __s; + break; case 2: __COMMON_CODE ("\n\tstosw"); - return __s; + break; case 3: __COMMON_CODE ("\n\tstosw\n\tstosb"); - return __s; + break; } + return __s; #undef __COMMON_CODE } |