From 4fe53b3aba281d102c3119f34780e5479dd4fe51 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 5 Sep 1999 00:08:27 +0000 Subject: Update. 1999-09-04 Ulrich Drepper * sysdeps/unix/sysv/linux/getaddrinfo.c: Little optimization. 1999-09-03 Andreas Schwab * sysdeps/unix/sysv/linux/syscalls.list: Rename strong name for fork from __syscall_fork to __libc_fork. * posix/Versions: Add __libc_fork and __vfork to version GLIBC_2.1.2. --- ChangeLog | 11 +++++++++++ linuxthreads/ChangeLog | 7 +++++++ linuxthreads/Versions | 2 ++ linuxthreads/ptfork.c | 16 ++++++++++++---- posix/Versions | 4 ++++ sysdeps/posix/getaddrinfo.c | 3 +-- sysdeps/unix/sysv/linux/syscalls.list | 2 +- 7 files changed, 38 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index ce18ae5..7bbde43 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +1999-09-04 Ulrich Drepper + + * sysdeps/unix/sysv/linux/getaddrinfo.c: Little optimization. + +1999-09-03 Andreas Schwab + + * sysdeps/unix/sysv/linux/syscalls.list: Rename strong name for + fork from __syscall_fork to __libc_fork. + * posix/Versions: Add __libc_fork and __vfork to version + GLIBC_2.1.2. + 1999-08-30 Andreas Jaeger * io/ftwtest-sh: Set LC_ALL and LANG to fix locale diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 108fdf4..13c85c5 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,10 @@ +1999-09-03 Andreas Schwab + + * ptfork.c (__fork): Renamed from fork and use __libc_fork. Add + fork as weak alias. + (__vfork): New function, alias vfork. + * Versions: Export __fork, vfork, and __vfork in libpthread. + 1999-08-23 Andreas Schwab * signals.c (pthread_sighandler): Add SIGCONTEXT_EXTRA_ARGS to diff --git a/linuxthreads/Versions b/linuxthreads/Versions index 38b135d..c0ec792 100644 --- a/linuxthreads/Versions +++ b/linuxthreads/Versions @@ -46,6 +46,7 @@ libpthread { __close; __connect; __fcntl; __lseek; __open; __read; __send; __wait; __write; _IO_flockfile; _IO_ftrylockfile; _IO_funlockfile; + vfork; __fork; # POSIX.1c extensions to libc. flockfile; funlockfile; ftrylockfile; @@ -115,5 +116,6 @@ libpthread { } GLIBC_2.1.2 { __pthread_kill_other_threads_np; + __vfork; } } diff --git a/linuxthreads/ptfork.c b/linuxthreads/ptfork.c index 2245407..1dfa8b6 100644 --- a/linuxthreads/ptfork.c +++ b/linuxthreads/ptfork.c @@ -73,11 +73,11 @@ static inline void pthread_call_handlers(struct handler_list * list) for (/*nothing*/; list != NULL; list = list->next) (list->handler)(); } -extern int __fork(void); +extern int __libc_fork(void); -int fork(void) +pid_t __fork(void) { - int pid; + pid_t pid; struct handler_list * prepare, * child, * parent; pthread_mutex_lock(&pthread_atfork_lock); @@ -86,7 +86,7 @@ int fork(void) parent = pthread_atfork_parent; pthread_mutex_unlock(&pthread_atfork_lock); pthread_call_handlers(prepare); - pid = __fork(); + pid = __libc_fork(); if (pid == 0) { __pthread_reset_main_thread(); __fresetlockfiles(); @@ -96,3 +96,11 @@ int fork(void) } return pid; } + +weak_alias (__fork, fork); + +pid_t __vfork(void) +{ + return __fork(); +} +weak_alias (__vfork, vfork); diff --git a/posix/Versions b/posix/Versions index c106c82..1955769 100644 --- a/posix/Versions +++ b/posix/Versions @@ -84,4 +84,8 @@ libc { # w* waitid; wordexp; wordfree; } + GLIBC_2.1.2 { + # functions used in other libraries + __libc_fork; __vfork; + } } diff --git a/sysdeps/posix/getaddrinfo.c b/sysdeps/posix/getaddrinfo.c index cbcb109..7f3c8ab 100644 --- a/sysdeps/posix/getaddrinfo.c +++ b/sysdeps/posix/getaddrinfo.c @@ -238,8 +238,7 @@ gaih_inet_serv (const char *servicename, struct gaih_typeproto *tp, return -EAI_MEMORY; \ rc = __gethostbyname2_r (name, _family, &th, tmpbuf, \ tmpbuflen, &h, &herrno); \ - } while ((rc != 0) && \ - (herrno == NETDB_INTERNAL) && (errno == ERANGE)); \ + } while (rc == ERANGE && herrno == NETDB_INTERNAL); \ if ((rc != 0) && (herrno == NETDB_INTERNAL)) \ { \ __set_h_errno (herrno); \ diff --git a/sysdeps/unix/sysv/linux/syscalls.list b/sysdeps/unix/sysv/linux/syscalls.list index 25a8ff1..6215973 100644 --- a/sysdeps/unix/sysv/linux/syscalls.list +++ b/sysdeps/unix/sysv/linux/syscalls.list @@ -11,7 +11,7 @@ create_module EXTRA create_module 3 create_module delete_module EXTRA delete_module 3 delete_module fdatasync - fdatasync 1 fdatasync flock - flock 2 __flock flock -fork - fork 0 __syscall_fork __fork fork +fork - fork 0 __libc_fork __fork fork get_kernel_syms EXTRA get_kernel_syms 1 get_kernel_syms getegid - getegid 0 __getegid getegid geteuid - geteuid 0 __geteuid geteuid -- cgit v1.1