]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 14 Oct 2002 18:10:15 +0000 (18:10 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 14 Oct 2002 18:10:15 +0000 (18:10 +0000)
2002-10-12  H.J. Lu  <hjl@gnu.org>

* sunrpc/thrsvc.c (PROCQUIT): New.
(struct rpc_arg): New.
(dispatch): Call exit (0) if request->rq_proc == PROCQUIT.
(test_one_call): Take struct rpc_arg * instead of CLIENT *c.
(thread_wrapper): Modified for struct rpc_arg * and call PROCQUIT.
(main): Modified for struct rpc_arg *.

2002-10-14  Ulrich Drepper  <drepper@redhat.com>

* dirent/scandir.c: Rearrange code a bit to reduce binary size.

2002-10-14  Jakub Jelinek  <jakub@redhat.com>

* sysdeps/unix/sysv/linux/x86_64/sysdep.h: Include tls.h.
(SYSCALL_ERROR_HANDLER): Use RTLD_PRIVATE_ERRNO sequence
in ld.so even if __thread is supported.

2002-10-13  Jakub Jelinek  <jakub@redhat.com>

* sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
Add hack to prevent the compiler from clobbering the signal context.
* sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
Likewise.
* sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter):
Likewise.

ChangeLog
dirent/scandir.c
sunrpc/thrsvc.c
sysdeps/unix/sysv/linux/x86_64/sysdep.h

index a3eb6059d57fe93e633b45bcf07220a685c6ad78..a6bf4d214714573a906b3765992d259fd6153dcd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2002-10-12  H.J. Lu  <hjl@gnu.org>
+
+       * sunrpc/thrsvc.c (PROCQUIT): New.
+       (struct rpc_arg): New.
+       (dispatch): Call exit (0) if request->rq_proc == PROCQUIT.
+       (test_one_call): Take struct rpc_arg * instead of CLIENT *c.
+       (thread_wrapper): Modified for struct rpc_arg * and call PROCQUIT.
+       (main): Modified for struct rpc_arg *.
+
+2002-10-14  Ulrich Drepper  <drepper@redhat.com>
+
+       * dirent/scandir.c: Rearrange code a bit to reduce binary size.
+
+2002-10-14  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/sysdep.h: Include tls.h.
+       (SYSCALL_ERROR_HANDLER): Use RTLD_PRIVATE_ERRNO sequence
+       in ld.so even if __thread is supported.
+
+2002-10-13  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/arm/profil-counter.h (profil_counter):
+       Add hack to prevent the compiler from clobbering the signal context.
+       * sysdeps/unix/sysv/linux/sh/profil-counter.h (profil_counter):
+       Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/profil-counter.h (profil_counter):
+       Likewise.
+
 2002-10-14  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/mips/fpu/libm-test-ulps: Regenerated by
index d0604ab1028d6c5eda460ba135b7047cd1d31b12..9f3cc8424f281ea539b07921b736670e99e3f566 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1992-1998, 2000, 2002 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
@@ -80,20 +80,24 @@ SCANDIR (dir, namelist, select, cmp)
   if (__builtin_expect (errno, 0) != 0)
     {
       save = errno;
-      (void) __closedir (dp);
+
       while (i > 0)
        free (v[--i]);
       free (v);
-      __set_errno (save);
-      return -1;
+
+      i = -1;
+    }
+  else
+    {
+      /* Sort the list if we have a comparison function to sort with.  */
+      if (cmp != NULL)
+       qsort (v, i, sizeof (*v), cmp);
+
+      *namelist = v;
     }
 
   (void) __closedir (dp);
   __set_errno (save);
 
-  /* Sort the list if we have a comparison function to sort with.  */
-  if (cmp != NULL)
-    qsort (v, i, sizeof (*v), cmp);
-  *namelist = v;
   return i;
 }
index ac6af09f5b75192e49b474a0be0cb278c65b2568..63cfbf9810da96ada4e64c6dc07d5a55967f8432 100644 (file)
@@ -8,23 +8,32 @@
 #define PROGNUM 1234
 #define VERSNUM 1
 #define PROCNUM 1
+#define PROCQUIT 2
 
 static int exitcode;
 
+struct rpc_arg
+{
+  CLIENT *client;
+  u_long proc;
+};
+
 static void
 dispatch(struct svc_req *request, SVCXPRT *xprt)
 {
-    svc_sendreply(xprt, (xdrproc_t)xdr_void, 0);
+  svc_sendreply(xprt, (xdrproc_t)xdr_void, 0);
+  if (request->rq_proc == PROCQUIT)
+    exit (0);
 }
 
 static void
-test_one_call (CLIENT *c)
+test_one_call (struct rpc_arg *a)
 {
   struct timeval tout = { 60, 0 };
   enum clnt_stat result;
 
   printf ("test_one_call: ");
-  result = clnt_call (c, PROCNUM,
+  result = clnt_call (a->client, a->proc,
                      (xdrproc_t) xdr_void, 0,
                      (xdrproc_t) xdr_void, 0, tout);
   if (result == RPC_SUCCESS)
@@ -40,7 +49,14 @@ test_one_call (CLIENT *c)
 static void *
 thread_wrapper (void *arg)
 {
-  test_one_call ((CLIENT *)arg);
+  struct rpc_arg a;
+
+  a.client = (CLIENT *)arg;
+  a.proc = PROCNUM;
+  test_one_call (&a);
+  a.client = (CLIENT *)arg;
+  a.proc = PROCQUIT;
+  test_one_call (&a);
   return 0;
 }
 
@@ -55,6 +71,7 @@ main (void)
   struct sockaddr_in sin;
   struct timeval wait = { 5, 0 };
   int sock = RPC_ANYSOCK;
+  struct rpc_arg a;
 
   svx = svcudp_create (RPC_ANYSOCK);
   svc_register (svx, PROGNUM, VERSNUM, dispatch, 0);
@@ -74,8 +91,11 @@ main (void)
 
   clnt = clntudp_create (&sin, PROGNUM, VERSNUM, wait, &sock);
 
+  a.client = clnt;
+  a.proc = PROCNUM;
+
   /* Test in this thread */
-  test_one_call (clnt);
+  test_one_call (&a);
 
   /* Test in a child thread */
   err = pthread_create (&tid, 0, thread_wrapper, (void *) clnt);
index 17f2ca919fda1c154b5f1e9bdea650655d8d57ac..de6bb44d9fbef91f1ba18bf13cc4910b7d4bf947 100644 (file)
@@ -23,6 +23,7 @@
 #include <sysdeps/unix/x86_64/sysdep.h>
 #include <bp-sym.h>
 #include <bp-asm.h>
+#include <tls.h>
 
 #ifdef IS_IN_rtld
 # include <dl-sysdep.h>                /* Defines RTLD_PRIVATE_ERRNO.  */
 
 #ifndef PIC
 #define SYSCALL_ERROR_HANDLER  /* Nothing here; code in sysdep.S is used.  */
-#elif USE___THREAD
+#elif RTLD_PRIVATE_ERRNO
 # define SYSCALL_ERROR_HANDLER                 \
 0:                                             \
-  movq errno@GOTTPOFF(%rip), %rcx;             \
+  leaq errno(%rip), %rcx;                      \
   xorq %rdx, %rdx;                             \
   subq %rax, %rdx;                             \
-  movl %edx, %fs:(%rcx);                       \
+  movl %edx, (%rcx);                           \
   orq $-1, %rax;                               \
   jmp L(pseudo_end);
-#elif RTLD_PRIVATE_ERRNO
+#elif USE___THREAD
 # define SYSCALL_ERROR_HANDLER                 \
 0:                                             \
-  leaq errno(%rip), %rcx;                      \
+  movq errno@GOTTPOFF(%rip), %rcx;             \
   xorq %rdx, %rdx;                             \
   subq %rax, %rdx;                             \
-  movl %edx, (%rcx);                           \
+  movl %edx, %fs:(%rcx);                       \
   orq $-1, %rax;                               \
   jmp L(pseudo_end);
 #elif defined _LIBC_REENTRANT