aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog53
-rw-r--r--dlfcn/dlerror.c7
-rw-r--r--dlfcn/eval.c2
-rw-r--r--elf/dl-lookup.c13
-rw-r--r--elf/rtld.c15
-rw-r--r--elf/tst-tls6.c2
-rw-r--r--elf/tst-tls8.c8
-rw-r--r--gmon/tst-sprofil.c4
-rw-r--r--iconv/tst-iconv3.c2
-rw-r--r--linuxthreads/ChangeLog27
-rw-r--r--linuxthreads/Examples/ex13.c6
-rw-r--r--linuxthreads/spinlock.h2
-rw-r--r--linuxthreads/sysdeps/alpha/pt-machine.h5
-rw-r--r--linuxthreads/sysdeps/arm/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/cris/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/hppa/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/i386/i686/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/i386/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/ia64/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/ia64/tls.h2
-rw-r--r--linuxthreads/sysdeps/m68k/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/mips/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h5
-rw-r--r--linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/s390/s390-32/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/s390/s390-64/pt-machine.h4
-rw-r--r--linuxthreads/sysdeps/sh/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/sparc/sparc32/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/sparc/sparc64/pt-machine.h2
-rw-r--r--linuxthreads/sysdeps/x86_64/pt-machine.h4
-rw-r--r--linuxthreads/tst-cancel.c9
-rw-r--r--nptl/ChangeLog16
-rw-r--r--nptl/pthread_condattr_setclock.c5
-rw-r--r--nptl/sysdeps/pthread/pthread_cond_timedwait.c5
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c7
-rw-r--r--nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/timer_create.c8
-rw-r--r--nptl/tst-sem8.c2
-rw-r--r--nptl/tst-sem9.c2
-rw-r--r--nptl/unwind.c1
-rw-r--r--stdio-common/tst-wc-printf.c2
-rw-r--r--stdlib/tst-limits.c4
-rw-r--r--sysdeps/generic/libc-start.c2
-rw-r--r--sysdeps/posix/utimes.c6
-rw-r--r--sysdeps/powerpc/fpu/w_sqrt.c8
-rw-r--r--sysdeps/powerpc/fpu/w_sqrtf.c10
-rw-r--r--sysdeps/s390/s390-32/dl-machine.h2
-rw-r--r--sysdeps/s390/s390-64/dl-machine.h2
-rw-r--r--sysdeps/unix/sysv/linux/futimes.c6
-rw-r--r--sysdeps/unix/sysv/linux/i386/semctl.c5
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h4
-rw-r--r--sysdeps/unix/sysv/linux/semctl.c5
-rw-r--r--sysdeps/unix/sysv/linux/shmctl.c69
-rw-r--r--sysdeps/unix/sysv/linux/utimes.c4
-rw-r--r--wcsmbs/wcsmbs-tst1.c6
55 files changed, 258 insertions, 135 deletions
diff --git a/ChangeLog b/ChangeLog
index d095165..caa9bd3 100644
--- 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,
diff --git a/dlfcn/dlerror.c b/dlfcn/dlerror.c
index 0e02ca7..f732deb 100644
--- a/dlfcn/dlerror.c
+++ b/dlfcn/dlerror.c
@@ -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. */
diff --git a/dlfcn/eval.c b/dlfcn/eval.c
index cae8f00..e0b5662 100644
--- a/dlfcn/eval.c
+++ b/dlfcn/eval.c
@@ -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);
diff --git a/elf/dl-lookup.c b/elf/dl-lookup.c
index 2b74736..9d9a12e 100644
--- a/elf/dl-lookup.c
+++ b/elf/dl-lookup.c
@@ -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);
}
diff --git a/elf/rtld.c b/elf/rtld.c
index 54e5688..c529094 100644
--- a/elf/rtld.c
+++ b/elf/rtld.c
@@ -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
{
diff --git a/elf/tst-tls6.c b/elf/tst-tls6.c
index 2c015ef..68d7065 100644
--- a/elf/tst-tls6.c
+++ b/elf/tst-tls6.c
@@ -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;
}
diff --git a/elf/tst-tls8.c b/elf/tst-tls8.c
index 97b4a25..dd896c4 100644
--- a/elf/tst-tls8.c
+++ b/elf/tst-tls8.c
@@ -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;
}
diff --git a/gmon/tst-sprofil.c b/gmon/tst-sprofil.c
index 9082538..3d9b579 100644
--- a/gmon/tst-sprofil.c
+++ b/gmon/tst-sprofil.c
@@ -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;
diff --git a/iconv/tst-iconv3.c b/iconv/tst-iconv3.c
index 7d92d3b..f31c812 100644
--- a/iconv/tst-iconv3.c
+++ b/iconv/tst-iconv3.c
@@ -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;
}
diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog
index 288d352..50244ea 100644
--- a/linuxthreads/ChangeLog
+++ b/linuxthreads/ChangeLog
@@ -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
diff --git a/linuxthreads/Examples/ex13.c b/linuxthreads/Examples/ex13.c
index c485039..14add6c 100644
--- a/linuxthreads/Examples/ex13.c
+++ b/linuxthreads/Examples/ex13.c
@@ -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;
}
diff --git a/linuxthreads/spinlock.h b/linuxthreads/spinlock.h
index 0ec40c5..ff96fc3 100644
--- a/linuxthreads/spinlock.h
+++ b/linuxthreads/spinlock.h
@@ -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.
diff --git a/linuxthreads/sysdeps/alpha/pt-machine.h b/linuxthreads/sysdeps/alpha/pt-machine.h
index fa0374b..853ac6f 100644
--- a/linuxthreads/sysdeps/alpha/pt-machine.h
+++ b/linuxthreads/sysdeps/alpha/pt-machine.h
@@ -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__
diff --git a/linuxthreads/sysdeps/arm/pt-machine.h b/linuxthreads/sysdeps/arm/pt-machine.h
index 71001eb..a4c2f31 100644
--- a/linuxthreads/sysdeps/arm/pt-machine.h
+++ b/linuxthreads/sysdeps/arm/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/cris/pt-machine.h b/linuxthreads/sysdeps/cris/pt-machine.h
index eaead30..431da71 100644
--- a/linuxthreads/sysdeps/cris/pt-machine.h
+++ b/linuxthreads/sysdeps/cris/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/hppa/pt-machine.h b/linuxthreads/sysdeps/hppa/pt-machine.h
index f4c6ff9..abc25c4 100644
--- a/linuxthreads/sysdeps/hppa/pt-machine.h
+++ b/linuxthreads/sysdeps/hppa/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/i386/i686/pt-machine.h b/linuxthreads/sysdeps/i386/i686/pt-machine.h
index 3c28118..1c75bf9 100644
--- a/linuxthreads/sysdeps/i386/i686/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/i686/pt-machine.h
@@ -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"
diff --git a/linuxthreads/sysdeps/i386/pt-machine.h b/linuxthreads/sysdeps/i386/pt-machine.h
index 79c69b5..0df096d 100644
--- a/linuxthreads/sysdeps/i386/pt-machine.h
+++ b/linuxthreads/sysdeps/i386/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/ia64/pt-machine.h b/linuxthreads/sysdeps/ia64/pt-machine.h
index c438312..ee489a7 100644
--- a/linuxthreads/sysdeps/ia64/pt-machine.h
+++ b/linuxthreads/sysdeps/ia64/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/ia64/tls.h b/linuxthreads/sysdeps/ia64/tls.h
index 7aec4f4..db810d1 100644
--- a/linuxthreads/sysdeps/ia64/tls.h
+++ b/linuxthreads/sysdeps/ia64/tls.h
@@ -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() \
diff --git a/linuxthreads/sysdeps/m68k/pt-machine.h b/linuxthreads/sysdeps/m68k/pt-machine.h
index 161b534..ad524d6 100644
--- a/linuxthreads/sysdeps/m68k/pt-machine.h
+++ b/linuxthreads/sysdeps/m68k/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/mips/pt-machine.h b/linuxthreads/sysdeps/mips/pt-machine.h
index b1375d5..f9028d2 100644
--- a/linuxthreads/sysdeps/mips/pt-machine.h
+++ b/linuxthreads/sysdeps/mips/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h b/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
index f38f466..8363d16 100644
--- a/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
+++ b/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h b/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
index e3a153a..f28e808 100644
--- a/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
+++ b/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/s390/s390-32/pt-machine.h b/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
index e95922d..3983329 100644
--- a/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
+++ b/linuxthreads/sysdeps/s390/s390-32/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/s390/s390-64/pt-machine.h b/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
index eaa5abb..49f8ae2 100644
--- a/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
+++ b/linuxthreads/sysdeps/s390/s390-64/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/sh/pt-machine.h b/linuxthreads/sysdeps/sh/pt-machine.h
index 68dd310..02545e6 100644
--- a/linuxthreads/sysdeps/sh/pt-machine.h
+++ b/linuxthreads/sysdeps/sh/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
index f60d806..322a520 100644
--- a/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
index 0d8a702..f65c13b 100644
--- a/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
+++ b/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h
@@ -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);
diff --git a/linuxthreads/sysdeps/x86_64/pt-machine.h b/linuxthreads/sysdeps/x86_64/pt-machine.h
index 0a366c5..bd53069 100644
--- a/linuxthreads/sysdeps/x86_64/pt-machine.h
+++ b/linuxthreads/sysdeps/x86_64/pt-machine.h
@@ -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);
diff --git a/linuxthreads/tst-cancel.c b/linuxthreads/tst-cancel.c
index da32aaf..59c6f1f 100644
--- a/linuxthreads/tst-cancel.c
+++ b/linuxthreads/tst-cancel.c
@@ -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);
}
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index d5b5c07..6aabc08 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -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
diff --git a/nptl/pthread_condattr_setclock.c b/nptl/pthread_condattr_setclock.c
index 09488af..0f1829c 100644
--- a/nptl/pthread_condattr_setclock.c
+++ b/nptl/pthread_condattr_setclock.c
@@ -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;
}
diff --git a/nptl/sysdeps/pthread/pthread_cond_timedwait.c b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
index 7f7d208..1655c70 100644
--- a/nptl/sysdeps/pthread/pthread_cond_timedwait.c
+++ b/nptl/sysdeps/pthread/pthread_cond_timedwait.c
@@ -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))
{
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c b/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c
index 3e81475..f7d88f2 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c
+++ b/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c
@@ -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);
}
diff --git a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
index 7934c0e..a51826a 100644
--- a/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
+++ b/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h
@@ -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;
diff --git a/nptl/sysdeps/unix/sysv/linux/timer_create.c b/nptl/sysdeps/unix/sysv/linux/timer_create.c
index ee02664..90e10b5 100644
--- a/nptl/sysdeps/unix/sysv/linux/timer_create.c
+++ b/nptl/sysdeps/unix/sysv/linux/timer_create.c
@@ -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;
diff --git a/nptl/tst-sem8.c b/nptl/tst-sem8.c
index 876c319..5dea575 100644
--- a/nptl/tst-sem8.c
+++ b/nptl/tst-sem8.c
@@ -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");
diff --git a/nptl/tst-sem9.c b/nptl/tst-sem9.c
index 2b35446..cdd8eaa 100644
--- a/nptl/tst-sem9.c
+++ b/nptl/tst-sem9.c
@@ -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");
diff --git a/nptl/unwind.c b/nptl/unwind.c
index 67e5d6d..9bde166 100644
--- a/nptl/unwind.c
+++ b/nptl/unwind.c
@@ -20,6 +20,7 @@
#include <setjmp.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include "pthreadP.h"
diff --git a/stdio-common/tst-wc-printf.c b/stdio-common/tst-wc-printf.c
index 1858db1..abbeeb5 100644
--- a/stdio-common/tst-wc-printf.c
+++ b/stdio-common/tst-wc-printf.c
@@ -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;
}
diff --git a/stdlib/tst-limits.c b/stdlib/tst-limits.c
index d7ca3ef..265b9db 100644
--- a/stdlib/tst-limits.c
+++ b/stdlib/tst-limits.c
@@ -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;
}
diff --git a/sysdeps/generic/libc-start.c b/sysdeps/generic/libc-start.c
index 04dae1d..e297b0a 100644
--- a/sysdeps/generic/libc-start.c
+++ b/sysdeps/generic/libc-start.c
@@ -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)
diff --git a/sysdeps/posix/utimes.c b/sysdeps/posix/utimes.c
index ee945b0..21da947 100644
--- a/sysdeps/posix/utimes.c
+++ b/sysdeps/posix/utimes.c
@@ -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;
diff --git a/sysdeps/powerpc/fpu/w_sqrt.c b/sysdeps/powerpc/fpu/w_sqrt.c
index 7347e61..ff03317 100644
--- a/sysdeps/powerpc/fpu/w_sqrt.c
+++ b/sysdeps/powerpc/fpu/w_sqrt.c
@@ -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);
}
diff --git a/sysdeps/powerpc/fpu/w_sqrtf.c b/sysdeps/powerpc/fpu/w_sqrtf.c
index 20fbebc..8eb94d8 100644
--- a/sysdeps/powerpc/fpu/w_sqrtf.c
+++ b/sysdeps/powerpc/fpu/w_sqrtf.c
@@ -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);
}
diff --git a/sysdeps/s390/s390-32/dl-machine.h b/sysdeps/s390/s390-32/dl-machine.h
index 5c60a35..3b3d5bf 100644
--- a/sysdeps/s390/s390-32/dl-machine.h
+++ b/sysdeps/s390/s390-32/dl-machine.h
@@ -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;
diff --git a/sysdeps/s390/s390-64/dl-machine.h b/sysdeps/s390/s390-64/dl-machine.h
index b40c7c3..0e98226 100644
--- a/sysdeps/s390/s390-64/dl-machine.h
+++ b/sysdeps/s390/s390-64/dl-machine.h
@@ -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;
diff --git a/sysdeps/unix/sysv/linux/futimes.c b/sysdeps/unix/sysv/linux/futimes.c
index e7ca99b..f43f568 100644
--- a/sysdeps/unix/sysv/linux/futimes.c
+++ b/sysdeps/unix/sysv/linux/futimes.c
@@ -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;
diff --git a/sysdeps/unix/sysv/linux/i386/semctl.c b/sysdeps/unix/sysv/linux/i386/semctl.c
index 8d41d7f..84edf05 100644
--- a/sysdeps/unix/sysv/linux/i386/semctl.c
+++ b/sysdeps/unix/sysv/linux/i386/semctl.c
@@ -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;
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
index d67576f..74c60e0 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/sigcontext.h
@@ -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. */
diff --git a/sysdeps/unix/sysv/linux/semctl.c b/sysdeps/unix/sysv/linux/semctl.c
index a3d9e58..07b1e6b 100644
--- a/sysdeps/unix/sysv/linux/semctl.c
+++ b/sysdeps/unix/sysv/linux/semctl.c
@@ -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;
diff --git a/sysdeps/unix/sysv/linux/shmctl.c b/sysdeps/unix/sysv/linux/shmctl.c
index ad64075..2bd9246 100644
--- a/sysdeps/unix/sysv/linux/shmctl.c
+++ b/sysdeps/unix/sysv/linux/shmctl.c
@@ -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;
diff --git a/sysdeps/unix/sysv/linux/utimes.c b/sysdeps/unix/sysv/linux/utimes.c
index 6e08c95..e4798ce 100644
--- a/sysdeps/unix/sysv/linux/utimes.c
+++ b/sysdeps/unix/sysv/linux/utimes.c
@@ -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;
diff --git a/wcsmbs/wcsmbs-tst1.c b/wcsmbs/wcsmbs-tst1.c
index 1816d54..9cdef45 100644
--- a/wcsmbs/wcsmbs-tst1.c
+++ b/wcsmbs/wcsmbs-tst1.c
@@ -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))