Update.
authorUlrich Drepper <drepper@redhat.com>
Thu, 31 Jul 2003 19:26:38 +0000 (19:26 +0000)
committerUlrich Drepper <drepper@redhat.com>
Thu, 31 Jul 2003 19:26:38 +0000 (19:26 +0000)
2003-07-31  Jakub Jelinek  <jakub@redhat.com>

* dlfcn/dlerror.c (once): New.
(dlerror): Call __libc_once.
(_dlerror_run): Remove once.

2003-07-31  Jakub Jelinek  <jakub@redhat.com>

* sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext):
Sync with 2.5.7 and 2.5.73 kernel changes.

2003-07-31  Jakub Jelinek  <jakub@redhat.com>

* dlfcn/eval.c (funcall): Add noinline attribute to shut up warnings.
* elf/rtld.c (dl_main): Cast ElfW(Addr) arguments with %Zx/%Zd
formats to size_t.
* elf/dl-lookup.c (_dl_debug_bindings): Likewise.
* elf/tst-tls6.c (do_test): Use %zd format for l_tls_modid.
* elf/tst-tls8.c (do_test): Use %zd format for modid1 and modid2.
* gmon/tst-sprofil.c (main): Add parens to shut up warning.
* iconv/tst-iconv3.c (main): Use %td instead of %zd for pointer
difference argument.
* stdio-common/tst-wc-printf.c (main): Cast arguments with %C
format to wint_t.
* stdlib/tst-limits.c (main): For WORD_BIT and LONG_BIT, use
%d format and cast expected value to int.
* sysdeps/generic/libc-start.c (STATIC): Add
__attribute__((always_inline) if LIBC_START_MAIN is already defined.
* sysdeps/powerpc/fpu/w_sqrt.c (a_nan, a_inf): Change from uint32_t
to ieee_float_shape_type.
(__sqrt): Avoid type punning.
* sysdeps/powerpc/fpu/w_sqrtf.c (a_nan, a_inf): Change from uint32_t
to ieee_float_shape_type.
(__sqrtf): Avoid type punning.
* sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela): Don't define
refsym if in dl-conflict.c.
* sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela): Likewise.
* sysdeps/unix/sysv/linux/i386/semctl.c (union semun): Add __old_buf.
(__new_semctl): Shut up warning.
* sysdeps/unix/sysv/linux/semctl.c (union semun): Add __old_buf.
(__new_semctl): Shut up warning.
* sysdeps/unix/sysv/linux/shmctl.c (__new_shmctl): Wrap long lines.
Change old into union of __old_shmid_ds and __old_shminfo structs.
Adjust all users.
* wcsmbs/wcsmbs-tst1.c (main): Cast arguments with %C format to wint_t.

2003-07-31  Jakub Jelinek  <jakub@redhat.com>

* sysdeps/unix/sysv/linux/utimes.c (__utimes): Fix actime and
modtime computation.
* sysdeps/unix/sysv/linux/futimes.c (__futimes): Likewise.
* sysdeps/posix/utimes.c (__utimes): Likewise.

55 files changed:
ChangeLog
dlfcn/dlerror.c
dlfcn/eval.c
elf/dl-lookup.c
elf/rtld.c
elf/tst-tls6.c
elf/tst-tls8.c
gmon/tst-sprofil.c
iconv/tst-iconv3.c
linuxthreads/ChangeLog
linuxthreads/Examples/ex13.c
linuxthreads/spinlock.h
linuxthreads/sysdeps/alpha/pt-machine.h
linuxthreads/sysdeps/arm/pt-machine.h
linuxthreads/sysdeps/cris/pt-machine.h
linuxthreads/sysdeps/hppa/pt-machine.h
linuxthreads/sysdeps/i386/i686/pt-machine.h
linuxthreads/sysdeps/i386/pt-machine.h
linuxthreads/sysdeps/ia64/pt-machine.h
linuxthreads/sysdeps/ia64/tls.h
linuxthreads/sysdeps/m68k/pt-machine.h
linuxthreads/sysdeps/mips/pt-machine.h
linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
linuxthreads/sysdeps/s390/s390-32/pt-machine.h
linuxthreads/sysdeps/s390/s390-64/pt-machine.h
linuxthreads/sysdeps/sh/pt-machine.h
linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
linuxthreads/sysdeps/x86_64/pt-machine.h
linuxthreads/tst-cancel.c
nptl/ChangeLog
nptl/pthread_condattr_setclock.c
nptl/sysdeps/pthread/pthread_cond_timedwait.c
nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c
nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
nptl/sysdeps/unix/sysv/linux/timer_create.c
nptl/tst-sem8.c
nptl/tst-sem9.c
nptl/unwind.c
stdio-common/tst-wc-printf.c
stdlib/tst-limits.c
sysdeps/generic/libc-start.c
sysdeps/posix/utimes.c
sysdeps/powerpc/fpu/w_sqrt.c
sysdeps/powerpc/fpu/w_sqrtf.c
sysdeps/s390/s390-32/dl-machine.h
sysdeps/s390/s390-64/dl-machine.h
sysdeps/unix/sysv/linux/futimes.c
sysdeps/unix/sysv/linux/i386/semctl.c
sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
sysdeps/unix/sysv/linux/semctl.c
sysdeps/unix/sysv/linux/shmctl.c
sysdeps/unix/sysv/linux/utimes.c
wcsmbs/wcsmbs-tst1.c

index d09516591eb0c407ce096d210cf8818f3cb98859..caa9bd3e8da138d8b122c8bd8246308aacea06d6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+2003-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * dlfcn/dlerror.c (once): New.
+       (dlerror): Call __libc_once.
+       (_dlerror_run): Remove once.
+
+2003-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h (struct sigcontext):
+       Sync with 2.5.7 and 2.5.73 kernel changes.
+
+2003-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * dlfcn/eval.c (funcall): Add noinline attribute to shut up warnings.
+       * elf/rtld.c (dl_main): Cast ElfW(Addr) arguments with %Zx/%Zd
+       formats to size_t.
+       * elf/dl-lookup.c (_dl_debug_bindings): Likewise.
+       * elf/tst-tls6.c (do_test): Use %zd format for l_tls_modid.
+       * elf/tst-tls8.c (do_test): Use %zd format for modid1 and modid2.
+       * gmon/tst-sprofil.c (main): Add parens to shut up warning.
+       * iconv/tst-iconv3.c (main): Use %td instead of %zd for pointer
+       difference argument.
+       * stdio-common/tst-wc-printf.c (main): Cast arguments with %C
+       format to wint_t.
+       * stdlib/tst-limits.c (main): For WORD_BIT and LONG_BIT, use
+       %d format and cast expected value to int.
+       * sysdeps/generic/libc-start.c (STATIC): Add
+       __attribute__((always_inline) if LIBC_START_MAIN is already defined.
+       * sysdeps/powerpc/fpu/w_sqrt.c (a_nan, a_inf): Change from uint32_t
+       to ieee_float_shape_type.
+       (__sqrt): Avoid type punning.
+       * sysdeps/powerpc/fpu/w_sqrtf.c (a_nan, a_inf): Change from uint32_t
+       to ieee_float_shape_type.
+       (__sqrtf): Avoid type punning.
+       * sysdeps/s390/s390-32/dl-machine.h (elf_machine_rela): Don't define
+       refsym if in dl-conflict.c.
+       * sysdeps/s390/s390-64/dl-machine.h (elf_machine_rela): Likewise.
+       * sysdeps/unix/sysv/linux/i386/semctl.c (union semun): Add __old_buf.
+       (__new_semctl): Shut up warning.
+       * sysdeps/unix/sysv/linux/semctl.c (union semun): Add __old_buf.
+       (__new_semctl): Shut up warning.
+       * sysdeps/unix/sysv/linux/shmctl.c (__new_shmctl): Wrap long lines.
+       Change old into union of __old_shmid_ds and __old_shminfo structs.
+       Adjust all users.
+       * wcsmbs/wcsmbs-tst1.c (main): Cast arguments with %C format to wint_t.
+
+2003-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/unix/sysv/linux/utimes.c (__utimes): Fix actime and
+       modtime computation.
+       * sysdeps/unix/sysv/linux/futimes.c (__futimes): Likewise.
+       * sysdeps/posix/utimes.c (__utimes): Likewise.
+
 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
 
        * elf/dl-reloc.c (_dl_allocate_static_tls): Don't return any value,
index 0e02ca7d90191486321d58272a3dfc5c4c5c5dd0..f732deb868acc66000ba5438c1296e15fe4ffe70 100644 (file)
@@ -1,5 +1,5 @@
 /* Return error detail for failing <dlfcn.h> functions.
-   Copyright (C) 1995,1996,1997,1998,1999,2000,2002, 2003
+   Copyright (C) 1995,1996,1997,1998,1999,2000,2002,2003
        Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -38,6 +38,7 @@ static struct dl_action_result *static_buf;
 
 /* This is the key for the thread specific memory.  */
 static __libc_key_t key;
+__libc_once_define (static, once);
 
 /* Destructor for the thread-specific data.  */
 static void init (void);
@@ -50,6 +51,9 @@ dlerror (void)
   char *buf = NULL;
   struct dl_action_result *result;
 
+  /* If we have not yet initialized the buffer do it now.  */
+  __libc_once (once, init);
+
   /* Get error string.  */
   result = (struct dl_action_result *) __libc_getspecific (key);
   if (result == NULL)
@@ -100,7 +104,6 @@ int
 internal_function
 _dlerror_run (void (*operate) (void *), void *args)
 {
-  __libc_once_define (static, once);
   struct dl_action_result *result;
 
   /* If we have not yet initialized the buffer do it now.  */
index cae8f00084a4636c0a62faf072e65575f4274f31..e0b56624f6678c7355f355176e1973c9f22e27b1 100644 (file)
@@ -27,7 +27,7 @@
 #include <string.h>
 #include <unistd.h>
 
-static void *funcall (char **stringp);
+static void *funcall (char **stringp) __attribute_noinline__;
 static void *eval (char **stringp);
 
 
index 2b7473662fdba90238aec9032bcb5a02d7ef275a..9d9a12efbf9ae2fbdedcdf3c2b2edb66604288a1 100644 (file)
@@ -704,20 +704,21 @@ _dl_debug_bindings (const char *undef_name, struct link_map *undef_map,
        {
          _dl_printf ("%s 0x%0*Zx 0x%0*Zx -> 0x%0*Zx 0x%0*Zx ",
                      conflict ? "conflict" : "lookup",
-                     (int) sizeof (ElfW(Addr)) * 2, undef_map->l_map_start,
                      (int) sizeof (ElfW(Addr)) * 2,
-                     ((ElfW(Addr)) *ref) - undef_map->l_map_start,
+                     (size_t) undef_map->l_map_start,
                      (int) sizeof (ElfW(Addr)) * 2,
-                     (ElfW(Addr)) (value->s ? value->m->l_map_start : 0),
+                     (size_t) (((ElfW(Addr)) *ref) - undef_map->l_map_start),
                      (int) sizeof (ElfW(Addr)) * 2,
-                     (ElfW(Addr)) (value->s ? value->s->st_value : 0));
+                     (size_t) (value->s ? value->m->l_map_start : 0),
+                     (int) sizeof (ElfW(Addr)) * 2,
+                     (size_t) (value->s ? value->s->st_value : 0));
 
          if (conflict)
            _dl_printf ("x 0x%0*Zx 0x%0*Zx ",
                        (int) sizeof (ElfW(Addr)) * 2,
-                       (ElfW(Addr)) (val.s ? val.m->l_map_start : 0),
+                       (size_t) (val.s ? val.m->l_map_start : 0),
                        (int) sizeof (ElfW(Addr)) * 2,
-                       (ElfW(Addr)) (val.s ? val.s->st_value : 0));
+                       (size_t) (val.s ? val.s->st_value : 0));
 
          _dl_printf ("/%x %s\n", type_class, undef_name);
        }
index 54e568804d6bc08622a977ee6a95082317897ac3..c52909457d337974a4950cabe04a9862206ac471 100644 (file)
@@ -1307,13 +1307,15 @@ cannot allocate TLS data structures for initial thread");
                          : rtld_progname ?: "<main program>",
                          l->l_name[0] ? l->l_name
                          : rtld_progname ?: "<main program>",
-                         (int) sizeof l->l_map_start * 2, l->l_map_start,
-                         (int) sizeof l->l_addr * 2, l->l_addr);
+                         (int) sizeof l->l_map_start * 2,
+                         (size_t) l->l_map_start,
+                         (int) sizeof l->l_addr * 2,
+                         (size_t) l->l_addr);
 #ifdef USE_TLS
              if (l->l_tls_modid)
                _dl_printf (" TLS(0x%Zx, 0x%0*Zx)\n", l->l_tls_modid,
                            (int) sizeof l->l_tls_offset * 2,
-                           l->l_tls_offset);
+                           (size_t) l->l_tls_offset);
              else
 #endif
                _dl_printf ("\n");
@@ -1330,7 +1332,7 @@ cannot allocate TLS data structures for initial thread");
            else
              _dl_printf ("\t%s => %s (0x%0*Zx)\n", l->l_libname->name,
                          l->l_name, (int) sizeof l->l_map_start * 2,
-                         l->l_map_start);
+                         (size_t) l->l_map_start);
        }
 
       if (__builtin_expect (mode, trace) != trace)
@@ -1349,8 +1351,9 @@ cannot allocate TLS data structures for initial thread");
 
            _dl_printf ("%s found at 0x%0*Zd in object at 0x%0*Zd\n",
                        INTUSE(_dl_argv)[i],
-                       (int) sizeof ref->st_value * 2, ref->st_value,
-                       (int) sizeof loadbase * 2, loadbase);
+                       (int) sizeof ref->st_value * 2,
+                       (size_t) ref->st_value,
+                       (int) sizeof loadbase * 2, (size_t) loadbase);
          }
       else
        {
index 2c015efebbc32c0327af22695a0201b9dbb7c3ce..68d706538f4573d1d83408d7da3613a2d240ae74 100644 (file)
@@ -36,7 +36,7 @@ do_test (void)
        modid = ((struct link_map *) h)->l_tls_modid;
       else if (((struct link_map *) h)->l_tls_modid != modid)
        {
-         printf ("round %d: modid now %d, initially %d\n",
+         printf ("round %d: modid now %zd, initially %d\n",
                  i, ((struct link_map *) h)->l_tls_modid, modid);
          result = 1;
        }
index 97b4a256522e6899890569f1716967d990f7bef5..dd896c4937ef2d0deda257c8280eaec35d082eab 100644 (file)
@@ -39,7 +39,7 @@ do_test (void)
        modid1 = ((struct link_map *) h1)->l_tls_modid;
       else if (((struct link_map *) h1)->l_tls_modid != modid1)
        {
-         printf ("round %d: modid now %zd, initially %d\n",
+         printf ("round %d: modid now %zd, initially %zd\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid1);
          result = 1;
        }
@@ -69,7 +69,7 @@ do_test (void)
        modid2 = ((struct link_map *) h1)->l_tls_modid;
       else if (((struct link_map *) h1)->l_tls_modid != modid2)
        {
-         printf ("round %d: modid now %zd, initially %d\n",
+         printf ("round %d: modid now %zd, initially %zd\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid2);
          result = 1;
        }
@@ -108,7 +108,7 @@ do_test (void)
         time.  The value of the first round is used.  */
       if (((struct link_map *) h1)->l_tls_modid != modid1)
        {
-         printf ("round %d: modid now %zd, initially %d\n",
+         printf ("round %d: modid now %zd, initially %zd\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid1);
          result = 1;
        }
@@ -136,7 +136,7 @@ do_test (void)
         time.  The value of the first round is used.  */
       if (((struct link_map *) h1)->l_tls_modid != modid2)
        {
-         printf ("round %d: modid now %zd, initially %d\n",
+         printf ("round %d: modid now %zd, initially %zd\n",
                  i, ((struct link_map *) h1)->l_tls_modid, modid2);
          result = 1;
        }
index 908253898b1c1d074eeddce6b75356b5835ffd68..3d9b579dc9dd3d5c7b0aa23b4da36b1d0567e381 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
 
@@ -165,7 +165,7 @@ main (int argc, char **argv)
       if (buf[i][j] != 0)
        printf ("%0*Zx\t%u\t(buffer %d)\n",
                (int) (sizeof (size_t) * 2),
-               (taddr[i] + (char *) &buf[i][j] - (char *) &buf[i][0]),
+               (taddr[i] + ((char *) &buf[i][j] - (char *) &buf[i][0])),
                buf[i][j], i);
 
   return 0;
index 7d92d3bb1c165662cd555bff17afcdab4a1da999..f31c8129d7cc6f336ed7e6b0fd6591ab9e34c623 100644 (file)
@@ -42,7 +42,7 @@ main (int argc, char *argv[])
 
       printf ("inptr change: %td\n", inptr - inbuf);
       printf ("inlen change: %zd\n", BUFSIZE - inbytes_left);
-      printf ("outptr change: %zd\n", outptr - (char *) outbuf);
+      printf ("outptr change: %td\n", outptr - (char *) outbuf);
       printf ("outlen change: %zd\n", BUFSIZE * 4 - outbytes_left);
       result = 1;
     }
index 288d3523ab5806369e67f4b37ea9444ecc41a9b8..50244ea5305a0bd6d88db592684eeb515cfa66e4 100644 (file)
@@ -1,3 +1,30 @@
+2003-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/alpha/pt-machine.h (PT_EI): Add
+       __attribute__((always_inline)).
+       * sysdeps/arm/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/cris/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/hppa/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/i386/i686/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/i386/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/ia64/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/m68k/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/mips/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/powerpc/powerpc32/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/powerpc/powerpc64/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/s390/s390-32/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/s390/s390-64/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/sh/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/sparc/sparc32/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/sparc/sparc64/pt-machine.h (PT_EI): Likewise.
+       * sysdeps/x86_64/pt-machine.h (PT_EI): Likewise.
+       * spinlock.h (__pthread_set_own_extricate_if): Likewise.
+       * sysdeps/ia64/tls.h (TLS_INIT_TP): Cast tcbp to __typeof
+       (__thread_self).
+       * Examples/ex13.c (main): Change res type to void * to avoid
+       warnings.
+       * tst-cancel.c (cleanup, inner, tf1, tf2, tf3): Comment out.
+
 2003-07-30  Jakub Jelinek  <jakub@redhat.com>
 
        * pthread.c (init_one_static_tls, __pthread_init_static_tls): New
index c485039d51511a7e24537e6f62f3fe8d5c5b47ca..14add6c7733ed445cd825c4e0a30cd2733ad4c61 100644 (file)
@@ -1,5 +1,5 @@
 /* Test for Pthreads/mutexes.
-   Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Kurt Garloff <garloff@suse.de>, 2000.
 
@@ -80,7 +80,7 @@ main (void)
   struct thr_ctrl threadctrl;
   pthread_t thread;
   int err;
-  int *res = &threadctrl.retval;
+  void *res = &threadctrl.retval;
   pthread_mutexattr_t mutattr;
   pthread_mutexattr_init (&mutattr);
   pthread_mutex_init (&threadctrl.mutex, &mutattr);
@@ -106,7 +106,7 @@ main (void)
       abort ();
     };
   dump_mut (&threadctrl.mutex);
-  pthread_join (thread, (void **) &res);
+  pthread_join (thread, &res);
   printf ("OK\n");
   return 0;
 }
index 0ec40c57cbddfe44d789d159c676be1656bb7b11..ff96fc3360bbccb7a1b6bc541e2a47919c272426 100644 (file)
@@ -196,7 +196,7 @@ static inline long atomic_decrement(struct pthread_atomic *pa)
 }
 
 
-static inline void
+static inline __attribute__((always_inline)) void
 __pthread_set_own_extricate_if (pthread_descr self, pthread_extricate_if *peif)
 {
   /* Only store a non-null peif if the thread has cancellation enabled.
index fa0374bc5b1021d65574d6da19678a4f6e820015..853ac6f04a78cee0523bf369038a69e7149049a5 100644 (file)
@@ -1,6 +1,7 @@
 /* Machine-dependent pthreads configuration and inline functions.
    Alpha version.
-   Copyright (C) 1996, 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2002, 2003
+   Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,7 +24,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 #ifdef __linux__
index 71001ebc2518e829cf66c1d03bad71e566b4db1f..a4c2f314cb2b5291cddaefcac488306f096e0341 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    ARM version.
-   Copyright (C) 1997, 1998, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Philip Blundell <philb@gnu.org>.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index eaead3058973b8dafb54f44e31ff53925453bf6e..431da7101d1000c45c49f3ac37ba9e1b6c81819f 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    CRIS version.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 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
@@ -22,7 +22,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index f4c6ff92ebfd512aeac59a7ea09ca8f376df2075..abc25c4ca4af15431156f8a1a74521512650ee55 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    hppa version.
-   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -25,7 +25,7 @@
 #include <bits/initspin.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index 3c28118f2ee0f3f469ca0109c7bb289c2f2eebd0..1c75bf98077f5e03e02734d490dd307cb90641c9 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    i686 version.
-   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H  1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 #include "kernel-features.h"
 
index 79c69b549aed3cb82e9b1512aefe038714738702..0df096d15217a0f7085b4209f567250d7ce16a9e 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    i386 version.
-   Copyright (C) 1996-2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -24,7 +24,7 @@
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index c4383125e5354cb4a68d90bfe51acb1f2a4ce4fb..ee489a7fc083777f51cd2fd1a422fbf4cf9c01ef 100644 (file)
@@ -24,7 +24,7 @@
 #include <ia64intrin.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index 7aec4f4f8a8d4cd7845c495d6ff2c8363f3643b9..db810d1872f6b2cfe077dce343c830c492600685 100644 (file)
@@ -84,7 +84,7 @@ typedef struct
    special attention since 'errno' is not yet available and if the
    operation can cause a failure 'errno' must not be touched.  */
 #  define TLS_INIT_TP(tcbp, secondcall) \
-  (__thread_self = (tcbp), NULL)
+  (__thread_self = (__typeof (__thread_self)) (tcbp), NULL)
 
 /* Return the address of the dtv for the current thread.  */
 #  define THREAD_DTV() \
index 161b5346913471e1e637794be38f5e48e581005c..ad524d6d2ef50d77dc78f3b38aee7d7237408a30 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    m68k version.
-   Copyright (C) 1996, 1998, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1998, 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Richard Henderson <rth@tamu.edu>.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index b1375d5cb7af7b4ebb4fd0ede923096e6777d014..f9028d2640b97ed27ee197081042cd4bbb03573d 100644 (file)
@@ -27,7 +27,7 @@
 #include <sys/tas.h>
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index f38f466bc3a7855e530b38fef220b5f4531bf37c..8363d16d08d5c81bdfd2b4288653561bb7e3b4d7 100644 (file)
@@ -1,6 +1,7 @@
 /* Machine-dependent pthreads configuration and inline functions.
    powerpc version.
-   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
+   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
@@ -25,7 +26,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index e3a153af1494feb1094dc16cfc14503ca2ccf91a..f28e8080bb364af4fc8538c15706f7f8e5000570 100644 (file)
@@ -25,7 +25,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index e95922dc1448baa3e72775aaedc2d2def772d265..398332965f0e3cd8b70a4c5656a817faf20079f7 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    S390 version.
-   Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index eaa5abb6bf1bb4699ad729c496a82dff8d62da4f..49f8ae2b9aea388a1d8867bd05f3624ec91157b8 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    64 bit S/390 version.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
    Contributed by Martin Schwidefsky (schwidefsky@de.ibm.com).
    This file is part of the GNU C Library.
 
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index 68dd3105944c62cd815d0c4e93418107325f61e5..02545e6b450f003cbe17ed1e6b77023660efeb1d 100644 (file)
@@ -24,7 +24,7 @@
 
 #ifndef __ASSEMBLER__
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index f60d806d83f06caaff13a3042051c4e8090393aa..322a52051f6f469c78c04d24af9221fb53160527 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index 0d8a7027e8c362fd0d7ef3fe777a9d2dfe3c2f71..f65c13be1bcc54902dfbe4f5b9a1d797d4820aa8 100644 (file)
@@ -23,7 +23,7 @@
 #define _PT_MACHINE_H   1
 
 #ifndef PT_EI
-# define PT_EI extern inline
+# define PT_EI extern inline __attribute__ ((always_inline))
 #endif
 
 extern long int testandset (int *spinlock);
index 0a366c56eb11f60bd8d29e5547df5ecc2091c71b..bd53069a78d81910d71248de58bd1a8a69f4cc38 100644 (file)
@@ -1,6 +1,6 @@
 /* Machine-dependent pthreads configuration and inline functions.
    x86-64 version.
-   Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2002, 2003 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
@@ -28,7 +28,7 @@
 
 
 # ifndef PT_EI
-#  define PT_EI extern inline
+#  define PT_EI extern inline __attribute__ ((always_inline))
 # endif
 
 extern long int testandset (int *spinlock);
index da32aaf5eaa5991d3a1900d88c15c4ed143b4df8..59c6f1f511805499618f9d60312655214454c595 100644 (file)
@@ -12,6 +12,7 @@ int fd;
 pthread_barrier_t bar;
 
 
+#ifdef NOT_YET
 static void
 cleanup (void *arg)
 {
@@ -52,7 +53,7 @@ t2 (void *arg)
   return NULL;
   pthread_cleanup_pop (0);
 }
-
+#endif
 
 /* This does not work yet.  */
 volatile int cleanupokcnt;
@@ -63,7 +64,7 @@ cleanupok (void *arg)
   ++cleanupokcnt;
 }
 
-
+#ifdef NOT_YET
 static void *
 t3 (void *arg)
 {
@@ -72,7 +73,7 @@ t3 (void *arg)
   pthread_exit (NULL);
   pthread_cleanup_pop (0);
 }
-
+#endif
 
 static void
 innerok (int a)
@@ -170,7 +171,7 @@ main (int argc, char *argv[])
   err = pthread_create (&td, NULL, t4, (void *) 7);
   if (err != 0)
     {
-      printf ("cannot create thread t3: %s\n", strerror (err));
+      printf ("cannot create thread t4: %s\n", strerror (err));
       exit (1);
     }
 
index d5b5c07cbe4eb7443abcc47d19b3c5c60f79df4d..6aabc08d94744db52fe9519d494fd4a03c6d0745 100644 (file)
@@ -1,3 +1,19 @@
+2003-07-31  Jakub Jelinek  <jakub@redhat.com>
+
+       * sysdeps/pthread/pthread_cond_timedwait.c (__pthread_cond_timedwait):
+       Shut up warnings if INTERNAL_SYSCALL_ERROR_P does not use its first
+       argument.
+       * sysdeps/unix/sysv/linux/timer_create.c (timer_create): Likewise.
+       * pthread_condattr_setclock.c (pthread_condattr_setclock): Likewise.
+       * sysdeps/unix/sysv/linux/s390/jmp-unwind.c: Include pthreaddef.h.
+       (__pthread_cleanup_upto): Fix prototype.
+       (_longjmp_unwind): Adjust caller.
+       * sysdeps/unix/sysv/linux/s390/lowlevellock.h (__lll_mutex_timedlock):
+       Change second argument to const struct pointer.
+       * tst-sem8.c (main): Remove unused s2 and s3 variables.
+       * tst-sem9.c (main): Likewise.
+       * unwind.c: Include string.h for strlen prototype.
+
 2003-07-31  Ulrich Drepper  <drepper@redhat.com>
 
        * sysdeps/unix/sysv/linux/i386/i486/pthread_cond_timedwait.S
index 09488aff9b68e6badd484236c02e6267e22711db..0f1829c502395a0ea581d79b823ca5e847f6dd8e 100644 (file)
@@ -44,8 +44,9 @@ pthread_condattr_setclock (attr, clock_id)
          struct timespec ts;
 
          INTERNAL_SYSCALL_DECL (err);
-         int val = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC,
-                                     &ts);
+         int val;
+         val = INTERNAL_SYSCALL (clock_getres, err, 2, CLOCK_MONOTONIC,
+                                 &ts);
          avail = INTERNAL_SYSCALL_ERROR_P (val, err) ? -1 : 1;
        }
 
index 7f7d2086f273608068928736e8f7ef9610191251..1655c70c2ac377be1e95b7cf524caf5d3bc2e4e3 100644 (file)
@@ -100,8 +100,9 @@ __pthread_cond_timedwait (cond, mutex, abstime)
       {
 #ifdef __NR_clock_gettime
        INTERNAL_SYSCALL_DECL (err);
-       int val = INTERNAL_SYSCALL (clock_gettime, err, 2,
-                                   cond->__data.__clock, &rt);
+       int val;
+       val = INTERNAL_SYSCALL (clock_gettime, err, 2,
+                               cond->__data.__clock, &rt);
 # ifndef __ASSUME_POSIX_TIMERS
        if (__builtin_expect (INTERNAL_SYSCALL_ERROR_P (val, err), 0))
          {
index 3e81475888b554e2b8c38f60afda900cc92ab629..f7d88f20e6b5526df0e3c290937bbf4f0b75ad5f 100644 (file)
@@ -9,7 +9,7 @@
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the GNU
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    Lesser General Public License for more details.
 
    You should have received a copy of the GNU Lesser General Public
@@ -20,8 +20,9 @@
 #include <setjmp.h>
 #include <stddef.h>
 #include <pthread-functions.h>
+#include <pthreaddef.h>
 
-extern void __pthread_cleanup_upto (jmp_buf env, char *targetframe);
+extern void __pthread_cleanup_upto (__jmp_buf env, char *targetframe);
 #pragma weak __pthread_cleanup_upto
 
 
@@ -37,5 +38,5 @@ _longjmp_unwind (jmp_buf env, int val)
   unsigned char local_var;
 
   if (fptr != NULL)
-    fptr (env, &local_var);
+    fptr (env->__jmpbuf, &local_var);
 }
index 7934c0ed96f3603a96f5504b7531ad8f0621dce5..a51826ab8441c083fb4056d5fd121b393e56d0f6 100644 (file)
@@ -162,7 +162,7 @@ extern int ___lll_mutex_timedlock (int *, const struct timespec *, int)
 
 static inline int
 __attribute__ ((always_inline))
-__lll_mutex_timedlock (int *futex, struct timespec *abstime)
+__lll_mutex_timedlock (int *futex, const struct timespec *abstime)
 {
   int oldval;
   int newval;
index ee026649a34ee2d59d067ca240985cd359bb90f2..90e10b546db30fd145b8d8900b813396443085cd 100644 (file)
@@ -133,7 +133,8 @@ timer_create (clock_id, evp, timerid)
            {
              INTERNAL_SYSCALL_DECL (err);
              struct timespec ts;
-             int res = INTERNAL_SYSCALL (clock_getres, err, 1, &ts);
+             int res;
+             res = INTERNAL_SYSCALL (clock_getres, err, 1, &ts);
              __no_posix_timers = (INTERNAL_SYSCALL_ERROR_P (res, err)
                                   ? -1 : 1);
            }
@@ -193,8 +194,9 @@ timer_create (clock_id, evp, timerid)
 
              /* Create the timer.  */
              INTERNAL_SYSCALL_DECL (err);
-             int res = INTERNAL_SYSCALL (timer_create, err, 3, clock_id, &sev,
-                                         &newp->ktimerid);
+             int res;
+             res = INTERNAL_SYSCALL (timer_create, err, 3, clock_id, &sev,
+                                     &newp->ktimerid);
              if (! INTERNAL_SYSCALL_ERROR_P (res, err))
                {
                  *timerid = (timer_t) newp;
index 876c319ba5181d825eb795612ecf950d4b256870..5dea575e9d7f54a8d3a10f3a3324e81dabeb410b 100644 (file)
@@ -36,8 +36,6 @@ int
 main (void)
 {
   sem_t *s;
-  sem_t *s2;
-  sem_t *s3;
   int i;
 
   on_exit (remove_sem, (void *) "/glibc-tst-sem8");
index 2b35446b46139562b781a3977e4d1d764e8cb282..cdd8eaa30f2efad25d105d105448f4f364a9f10d 100644 (file)
@@ -36,8 +36,6 @@ int
 main (void)
 {
   sem_t *s;
-  sem_t *s2;
-  sem_t *s3;
   int i;
 
   on_exit (remove_sem, (void *) "/glibc-tst-sem9");
index 67e5d6de251843b2bf84a59fca39ed5ed0eabfd7..9bde1664800c35aa0b963ce96b13188d108b3623 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <setjmp.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include "pthreadP.h"
 
index 1858db1962fb8de0da037421ef0bd19fcb14c364..abbeeb533073c89a0c6e5ca9a25586a1730936f2 100644 (file)
@@ -16,7 +16,7 @@ main (void)
 
   printf ("with %%S: %S\n", tmp);
 
-  printf ("with %%C: %C\n", tmp[0]);
+  printf ("with %%C: %C\n", (wint_t) tmp[0]);
 
   return 0;
 }
index d7ca3ef2d198b1f57a36c9682d63f6c44ec3fd9d..265b9dbfbbdbf5e1fa81c8b5be02ff53e399d7f9 100644 (file)
@@ -62,8 +62,8 @@ main (void)
   TEST (PAGE_SIZE, "d", getpagesize ());
 #endif
 
-  TEST (WORD_BIT, "zd", sizeof (int) * CHAR_BIT);
-  TEST (LONG_BIT, "zd", sizeof (long int) * CHAR_BIT);
+  TEST (WORD_BIT, "d", (int) sizeof (int) * CHAR_BIT);
+  TEST (LONG_BIT, "d", (int) sizeof (long int) * CHAR_BIT);
 
   return result;
 }
index 04dae1d9f358751e1ea66b6a905756fd6f57e44e..e297b0a424a4562c995f0bb6fd20bef5d4a2706f 100644 (file)
@@ -45,7 +45,7 @@ extern void __pthread_initialize_minimal (void)
 
 
 #ifdef LIBC_START_MAIN
-# define STATIC static inline
+# define STATIC static inline __attribute__ ((always_inline))
 #else
 # define STATIC
 # define LIBC_START_MAIN BP_SYM (__libc_start_main)
index ee945b07156fa086d133aaa74e0a207660330795..21da94751bbeeb7948b3e5f61fa60ed693000127 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 2000, 2003 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
@@ -31,8 +31,8 @@ __utimes (const char *file, const struct timeval tvp[2])
   if (tvp)
     {
       times = &buf;
-      times->actime = tvp[0].tv_sec + tvp[0].tv_usec / 1000000;
-      times->modtime = tvp[1].tv_sec + tvp[1].tv_usec / 1000000;
+      buf.actime = tvp[0].tv_sec + (tvp[0].tv_usec + 500000) / 1000000;
+      buf.modtime = tvp[1].tv_sec + (tvp[1].tv_usec + 500000) / 1000000;
     }
   else
     times = NULL;
index 7347e61760f4c51848688c8342eee10cb37ca500..ff0331725c18ac2f06dbd5d57fe573d2677f63ff 100644 (file)
@@ -23,8 +23,8 @@
 #include <inttypes.h>
 
 static const double almost_half = 0.5000000000000001;  /* 0.5 + 2^-53 */
-static const uint32_t a_nan = 0x7fc00000;
-static const uint32_t a_inf = 0x7f800000;
+static const ieee_float_shape_type a_nan = { .word = 0x7fc00000 };
+static const ieee_float_shape_type a_inf = { .word = 0x7f800000 };
 static const float two108 = 3.245185536584267269e+32;
 static const float twom54 = 5.551115123125782702e-17;
 extern const float __t_sqrt[1024];
@@ -45,7 +45,7 @@ extern const float __t_sqrt[1024];
 double
 __sqrt(double x)
 {
-  const float inf = *(const float *)&a_inf;
+  const float inf = a_inf.value;
   /* x = f_wash(x); *//* This ensures only one exception for SNaN. */
   if (x > 0)
     {
@@ -130,7 +130,7 @@ __sqrt(double x)
        x = __kernel_standard(x,x,26);
       else
 #endif
-      x = *(const float*)&a_nan;
+      x = a_nan.value;
     }
   return f_wash(x);
 }
index 20fbebc06e42d3a49469fc0f8938880b188c9591..8eb94d8e3bc3f9b661f6fe9e41332730858a68cf 100644 (file)
@@ -1,5 +1,5 @@
 /* Single-precision floating point square root.
-   Copyright (C) 1997 Free Software Foundation, Inc.
+   Copyright (C) 1997, 2003 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
@@ -23,8 +23,8 @@
 #include <inttypes.h>
 
 static const float almost_half = 0.50000006;  /* 0.5 + 2^-24 */
-static const uint32_t a_nan = 0x7fc00000;
-static const uint32_t a_inf = 0x7f800000;
+static const ieee_float_shape_type a_nan = { .word = 0x7fc00000 };
+static const ieee_float_shape_type a_inf = { .word = 0x7f800000 };
 static const float two48 = 281474976710656.0;
 static const float twom24 = 5.9604644775390625e-8;
 extern const float __t_sqrt[1024];
@@ -45,7 +45,7 @@ extern const float __t_sqrt[1024];
 float
 __sqrtf(float x)
 {
-  const float inf = *(const float *)&a_inf;
+  const float inf = a_inf.value;
   /* x = f_washf(x); *//* This ensures only one exception for SNaN. */
   if (x > 0)
     {
@@ -125,7 +125,7 @@ __sqrtf(float x)
        x = __kernel_standard(x,x,126);
       else
 #endif
-      x = *(const float*)&a_nan;
+      x = a_nan.value;
     }
   return f_washf(x);
 }
index 5c60a355f3f1315bc54ee763365f7b39825a075f..3b3d5bf36e55a7b4a1d8e812c021218f4ee76ca3 100644 (file)
@@ -405,7 +405,9 @@ elf_machine_rela (struct link_map *map, const Elf32_Rela *reloc,
     return;
   else
     {
+#ifndef RESOLVE_CONFLICT_FIND_MAP
       const Elf32_Sym *const refsym = sym;
+#endif
 #if defined USE_TLS && !defined RTLD_BOOTSTRAP
       struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
       Elf32_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
index b40c7c341df342eb90e1080113d2f0f80afc2a5b..0e98226ad94011ca3f09fe39e550c19bf61794d1 100644 (file)
@@ -373,7 +373,9 @@ elf_machine_rela (struct link_map *map, const Elf64_Rela *reloc,
     return;
   else
     {
+#ifndef RESOLVE_CONFLICT_FIND_MAP
       const Elf64_Sym *const refsym = sym;
+#endif
 #if defined USE_TLS && !defined RTLD_BOOTSTRAP
       struct link_map *sym_map = RESOLVE_MAP (&sym, version, r_type);
       Elf64_Addr value = sym == NULL ? 0 : sym_map->l_addr + sym->st_value;
index e7ca99b07760f18f03b7ff016e0e76ec44dd2ad8..f43f568ec141239bb32df4dc12a4dbf2c8043324 100644 (file)
@@ -1,4 +1,4 @@
-/* futimes -- change access and modification times of open file.  Stub version.
+/* futimes -- change access and modification times of open file.  Linux version.
    Copyright (C) 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -58,8 +58,8 @@ __futimes (int fd, const struct timeval tvp[2])
   if (tvp != NULL)
     {
       times = &buf;
-      buf.actime = tvp[0].tv_sec + tvp[0].tv_usec >= 500000;
-      buf.modtime = tvp[1].tv_sec + tvp[1].tv_usec >= 500000;
+      buf.actime = tvp[0].tv_sec + (tvp[0].tv_usec + 500000) / 1000000;
+      buf.modtime = tvp[1].tv_sec + (tvp[1].tv_usec + 500000) / 1000000;
     }
   else
     times = NULL;
index 8d41d7fff10b32ae0dddc39548898b62a9fd1eaa..84edf052b09905d1c7b5343a5018475a3a907ad5 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -48,6 +48,7 @@ union semun
   struct semid_ds *buf;                /* buffer for IPC_STAT & IPC_SET */
   unsigned short int *array;   /* array for GETALL & SETALL */
   struct seminfo *__buf;       /* buffer for IPC_INFO */
+  struct __old_semid_ds *__old_buf;
 };
 
 #include <bp-checks.h>
@@ -145,7 +146,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
 #endif
 
     buf = arg.buf;
-    arg.buf = (struct semid_ds *)&old;
+    arg.__old_buf = &old;
     if (cmd == IPC_SET)
       {
        old.sem_perm.uid = buf->sem_perm.uid;
index d67576f2422a3bd19dec29f0b893ae0f90834b5c..74c60e024d11e51b99accf246262d59d628609a4 100644 (file)
@@ -50,7 +50,9 @@ struct sigcontext
   struct ia64_fpreg sc_fr[128];        /* floating-point registers */
   unsigned long int sc_rbs_base;/* NULL or new base of sighandler's rbs */
   unsigned long int sc_loadrs; /* see description above */
-  unsigned long int sc_rsvd[14];/* reserved for future use */
+  unsigned long int sc_ar25;   /* cmp8xchg16 uses this */
+  unsigned long int sc_ar26;   /* rsvd for scratch use */
+  unsigned long int sc_rsvd[12];/* reserved for future use */
 
   /* sc_mask is actually an sigset_t but we don't want to
    * include the kernel headers here. */
index a3d9e588a00a06bfb0da748c5653e4097c4d0d96..07b1e6b4fab222c803cb74982529cdd4a1033013 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -48,6 +48,7 @@ union semun
   struct semid_ds *buf;                /* buffer for IPC_STAT & IPC_SET */
   unsigned short int *array;   /* array for GETALL & SETALL */
   struct seminfo *__buf;       /* buffer for IPC_INFO */
+  struct __old_semid_ds *__old_buf;
 };
 
 #include <bp-checks.h>
@@ -152,7 +153,7 @@ __new_semctl (int semid, int semnum, int cmd, ...)
 
     __set_errno(save_errno);
     buf = arg.buf;
-    arg.buf = (struct semid_ds *)&old;
+    arg.__old_buf = &old;
     if (cmd == IPC_SET)
       {
        old.sem_perm.uid = buf->sem_perm.uid;
index ad64075b444efa0103eb802d704f9997477eba24..2bd92469c19f7ace3a4d08898ccaffafdb5d39c6 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995, 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (C) 1995, 1997, 1998, 2000, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, August 1995.
 
@@ -74,7 +74,8 @@ int
 __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
 {
 #if __ASSUME_IPC64 > 0
-  return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0, CHECK_1 (buf));
+  return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0,
+                        CHECK_1 (buf));
 #else
   switch (cmd) {
     case SHM_STAT:
@@ -85,63 +86,69 @@ __new_shmctl (int shmid, int cmd, struct shmid_ds *buf)
 #endif
       break;
     default:
-      return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, CHECK_1 (buf));
+      return INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0,
+                            CHECK_1 (buf));
   }
 
   {
     int save_errno = errno, result;
-    struct __old_shmid_ds old;
+    union
+      {
+       struct __old_shmid_ds ds;
+       struct __old_shminfo info;
+      } old;
 
     /* Unfortunately there is no way how to find out for sure whether
        we should use old or new shmctl.  */
-    result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0, CHECK_1 (buf));
+    result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd | __IPC_64, 0,
+                            CHECK_1 (buf));
     if (result != -1 || errno != EINVAL)
       return result;
 
     __set_errno(save_errno);
     if (cmd == IPC_SET)
       {
-       old.shm_perm.uid = buf->shm_perm.uid;
-       old.shm_perm.gid = buf->shm_perm.gid;
-       old.shm_perm.mode = buf->shm_perm.mode;
-       if (old.shm_perm.uid != buf->shm_perm.uid ||
-           old.shm_perm.gid != buf->shm_perm.gid)
+       old.ds.shm_perm.uid = buf->shm_perm.uid;
+       old.ds.shm_perm.gid = buf->shm_perm.gid;
+       old.ds.shm_perm.mode = buf->shm_perm.mode;
+       if (old.ds.shm_perm.uid != buf->shm_perm.uid ||
+           old.ds.shm_perm.gid != buf->shm_perm.gid)
          {
            __set_errno (EINVAL);
            return -1;
          }
       }
-    result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0, __ptrvalue (&old));
+    result = INLINE_SYSCALL (ipc, 5, IPCOP_shmctl, shmid, cmd, 0,
+                            __ptrvalue (&old.ds));
     if (result != -1 && (cmd == SHM_STAT || cmd == IPC_STAT))
       {
        memset(buf, 0, sizeof(*buf));
-       buf->shm_perm.__key = old.shm_perm.__key;
-       buf->shm_perm.uid = old.shm_perm.uid;
-       buf->shm_perm.gid = old.shm_perm.gid;
-       buf->shm_perm.cuid = old.shm_perm.cuid;
-       buf->shm_perm.cgid = old.shm_perm.cgid;
-       buf->shm_perm.mode = old.shm_perm.mode;
-       buf->shm_perm.__seq = old.shm_perm.__seq;
-       buf->shm_atime = old.shm_atime;
-       buf->shm_dtime = old.shm_dtime;
-       buf->shm_ctime = old.shm_ctime;
-       buf->shm_segsz = old.shm_segsz;
-       buf->shm_nattch = old.shm_nattch;
-       buf->shm_cpid = old.shm_cpid;
-       buf->shm_lpid = old.shm_lpid;
+       buf->shm_perm.__key = old.ds.shm_perm.__key;
+       buf->shm_perm.uid = old.ds.shm_perm.uid;
+       buf->shm_perm.gid = old.ds.shm_perm.gid;
+       buf->shm_perm.cuid = old.ds.shm_perm.cuid;
+       buf->shm_perm.cgid = old.ds.shm_perm.cgid;
+       buf->shm_perm.mode = old.ds.shm_perm.mode;
+       buf->shm_perm.__seq = old.ds.shm_perm.__seq;
+       buf->shm_atime = old.ds.shm_atime;
+       buf->shm_dtime = old.ds.shm_dtime;
+       buf->shm_ctime = old.ds.shm_ctime;
+       buf->shm_segsz = old.ds.shm_segsz;
+       buf->shm_nattch = old.ds.shm_nattch;
+       buf->shm_cpid = old.ds.shm_cpid;
+       buf->shm_lpid = old.ds.shm_lpid;
       }
 #if __WORDSIZE != 32
     else if (result != -1 && cmd == IPC_INFO)
       {
-       struct __old_shminfo *oldi = (struct __old_shminfo *)&old;
        struct shminfo *i = (struct shminfo *)buf;
 
        memset(i, 0, sizeof(*i));
-       i->shmmax = oldi->shmmax;
-       i->shmmin = oldi->shmmin;
-       i->shmmni = oldi->shmmni;
-       i->shmseg = oldi->shmseg;
-       i->shmall = oldi->shmall;
+       i->shmmax = old.info.shmmax;
+       i->shmmin = old.info.shmmin;
+       i->shmmni = old.info.shmmni;
+       i->shmseg = old.info.shmseg;
+       i->shmall = old.info.shmall;
       }
 #endif
     return result;
index 6e08c95397087e80244b84374c4744ed5d507091..e4798ce83ce209de0fdb66c57d36e7aafa67fba4 100644 (file)
@@ -47,8 +47,8 @@ __utimes (const char *file, const struct timeval tvp[2])
   if (tvp != NULL)
     {
       times = &buf;
-      buf.actime = tvp[0].tv_sec + tvp[0].tv_usec >= 500000;
-      buf.modtime = tvp[1].tv_sec + tvp[1].tv_usec >= 500000;
+      buf.actime = tvp[0].tv_sec + (tvp[0].tv_usec + 500000) / 1000000;
+      buf.modtime = tvp[1].tv_sec + (tvp[1].tv_usec + 500000) / 1000000;
     }
   else
     times = NULL;
index 1816d54eb60ed472318eabd2899b03234d07635a..9cdef45358eb900eefa8f818ea750fbe87d301e9 100644 (file)
@@ -32,10 +32,10 @@ main (void)
   buf[idx] = 0;
   printf ("orig string %s\n", str);
   printf ("string by wctomb %s\n", buf);
-  printf ("string by %%C %C", tmp[0]);
+  printf ("string by %%C %C", (wint_t) tmp[0]);
   if (tmp[0] != L'H')
     result = 1;
-  printf ("%C\n", tmp[1]);
+  printf ("%C\n", (wint_t) tmp[1]);
   if (tmp[1] != L'e')
     result = 1;
   printf ("string by %%S %S\n", tmp);
@@ -43,7 +43,7 @@ main (void)
     result = 1;
   puts ("---- test 2 ------");
   printf ("wchar string %S\n", tmp1);
-  printf ("wchar %C\n", tmp1[0]);
+  printf ("wchar %C\n", (wint_t) tmp1[0]);
   test = wcstombs (buf, tmp1, (wcslen (tmp1) + 1) * sizeof (wchar_t));
   printf ("size of string by wcstombs %d\n", test);
   if (test != wcslen (tmp1))