This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Warning patrol


Hi!

Kills lots of warnings I saw during last build.
There is still a bunch of warnings on s390, because
typedef long unsigned int size_t;
__extension__ typedef int __ssize_t;

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.
nptl/
	* 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.
linuxthreads/
	* 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.

--- libc/nptl/sysdeps/pthread/pthread_cond_timedwait.c.jj	2003-06-23 18:36:31.000000000 -0400
+++ libc/nptl/sysdeps/pthread/pthread_cond_timedwait.c	2003-07-31 06:58:49.000000000 -0400
@@ -100,8 +100,9 @@ __pthread_cond_timedwait (cond, mutex, a
       {
 #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))
 	  {
--- libc/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c.jj	2003-02-14 03:02:46.000000000 -0500
+++ libc/nptl/sysdeps/unix/sysv/linux/s390/jmp-unwind.c	2003-07-31 08:02:20.000000000 -0400
@@ -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);
 }
--- libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h.jj	2003-06-05 03:55:34.000000000 -0400
+++ libc/nptl/sysdeps/unix/sysv/linux/s390/lowlevellock.h	2003-07-31 08:04:53.000000000 -0400
@@ -162,7 +162,7 @@ extern int ___lll_mutex_timedlock (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;
--- libc/nptl/sysdeps/unix/sysv/linux/timer_create.c.jj	2003-06-16 16:05:06.000000000 -0400
+++ libc/nptl/sysdeps/unix/sysv/linux/timer_create.c	2003-07-31 07:01:56.000000000 -0400
@@ -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;
--- libc/nptl/tst-sem8.c.jj	2003-05-31 15:55:33.000000000 -0400
+++ libc/nptl/tst-sem8.c	2003-07-31 06:28:11.000000000 -0400
@@ -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");
--- libc/nptl/tst-sem9.c.jj	2003-05-31 15:55:33.000000000 -0400
+++ libc/nptl/tst-sem9.c	2003-07-31 06:28:21.000000000 -0400
@@ -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");
--- libc/nptl/pthread_condattr_setclock.c.jj	2003-03-18 06:06:43.000000000 -0500
+++ libc/nptl/pthread_condattr_setclock.c	2003-07-31 06:59:37.000000000 -0400
@@ -44,8 +44,9 @@ pthread_condattr_setclock (attr, clock_i
 	  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;
 	}
 
--- libc/nptl/unwind.c.jj	2003-07-09 10:06:10.000000000 -0400
+++ libc/nptl/unwind.c	2003-07-31 07:00:14.000000000 -0400
@@ -20,6 +20,7 @@
 
 #include <setjmp.h>
 #include <stdlib.h>
+#include <string.h>
 #include <unistd.h>
 #include "pthreadP.h"
 
--- libc/dlfcn/eval.c.jj	2001-07-06 00:54:45.000000000 -0400
+++ libc/dlfcn/eval.c	2003-07-31 05:32:02.000000000 -0400
@@ -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);
 
 
--- libc/elf/tst-tls6.c.jj	2002-12-04 07:27:46.000000000 -0500
+++ libc/elf/tst-tls6.c	2003-07-31 07:36:16.000000000 -0400
@@ -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;
 	}
--- libc/elf/rtld.c.jj	2003-07-31 04:35:44.000000000 -0400
+++ libc/elf/rtld.c	2003-07-31 07:55:56.000000000 -0400
@@ -1307,13 +1307,15 @@ cannot allocate TLS data structures for 
 			  : 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 
 	    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 
 
 	    _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
 	{
--- libc/elf/tst-tls8.c.jj	2003-04-27 02:16:55.000000000 -0400
+++ libc/elf/tst-tls8.c	2003-07-31 07:37:38.000000000 -0400
@@ -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;
 	}
--- libc/elf/dl-lookup.c.jj	2003-07-31 07:50:11.000000000 -0400
+++ libc/elf/dl-lookup.c	2003-07-31 07:52:02.000000000 -0400
@@ -704,20 +704,21 @@ _dl_debug_bindings (const char *undef_na
 	{
 	  _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);
 	}
--- libc/gmon/tst-sprofil.c.jj	2001-07-06 00:54:46.000000000 -0400
+++ libc/gmon/tst-sprofil.c	2003-07-31 08:18:08.000000000 -0400
@@ -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;
--- libc/iconv/tst-iconv3.c.jj	2002-03-24 08:00:08.000000000 -0500
+++ libc/iconv/tst-iconv3.c	2003-07-31 08:06:34.000000000 -0400
@@ -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;
     }
--- libc/linuxthreads/Examples/ex13.c.jj	2002-09-24 21:58:29.000000000 -0400
+++ libc/linuxthreads/Examples/ex13.c	2003-07-31 06:11:15.000000000 -0400
@@ -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;
 }
--- libc/linuxthreads/tst-cancel.c.jj	2001-04-12 19:08:50.000000000 -0400
+++ libc/linuxthreads/tst-cancel.c	2003-07-31 06:17:53.000000000 -0400
@@ -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);
     }
 
--- libc/linuxthreads/sysdeps/alpha/pt-machine.h.jj	2002-09-06 15:31:37.000000000 -0400
+++ libc/linuxthreads/sysdeps/alpha/pt-machine.h	2003-07-31 06:00:54.000000000 -0400
@@ -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__
--- libc/linuxthreads/sysdeps/arm/pt-machine.h.jj	2002-08-26 18:39:52.000000000 -0400
+++ libc/linuxthreads/sysdeps/arm/pt-machine.h	2003-07-31 06:01:08.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/cris/pt-machine.h.jj	2002-08-26 18:39:53.000000000 -0400
+++ libc/linuxthreads/sysdeps/cris/pt-machine.h	2003-07-31 06:01:15.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/hppa/pt-machine.h.jj	2002-08-26 18:39:51.000000000 -0400
+++ libc/linuxthreads/sysdeps/hppa/pt-machine.h	2003-07-31 06:01:23.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/i386/i686/pt-machine.h.jj	2003-02-25 19:01:14.000000000 -0500
+++ libc/linuxthreads/sysdeps/i386/i686/pt-machine.h	2003-07-31 06:02:02.000000000 -0400
@@ -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"
 
--- libc/linuxthreads/sysdeps/i386/pt-machine.h.jj	2003-02-25 19:01:14.000000000 -0500
+++ libc/linuxthreads/sysdeps/i386/pt-machine.h	2003-07-31 06:02:07.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/ia64/pt-machine.h.jj	2003-01-30 16:03:40.000000000 -0500
+++ libc/linuxthreads/sysdeps/ia64/pt-machine.h	2003-07-31 06:02:10.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/ia64/tls.h.jj	2003-07-21 07:41:09.000000000 -0400
+++ libc/linuxthreads/sysdeps/ia64/tls.h	2003-07-31 06:37:51.000000000 -0400
@@ -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() \
--- libc/linuxthreads/sysdeps/m68k/pt-machine.h.jj	2002-08-26 18:39:46.000000000 -0400
+++ libc/linuxthreads/sysdeps/m68k/pt-machine.h	2003-07-31 06:02:13.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/mips/pt-machine.h.jj	2003-03-13 23:22:05.000000000 -0500
+++ libc/linuxthreads/sysdeps/mips/pt-machine.h	2003-07-31 06:02:17.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h.jj	2003-02-17 15:33:35.000000000 -0500
+++ libc/linuxthreads/sysdeps/powerpc/powerpc32/pt-machine.h	2003-07-31 06:02:21.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h.jj	2003-03-02 06:44:12.000000000 -0500
+++ libc/linuxthreads/sysdeps/powerpc/powerpc64/pt-machine.h	2003-07-31 06:02:25.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/s390/s390-32/pt-machine.h.jj	2003-01-30 16:03:40.000000000 -0500
+++ libc/linuxthreads/sysdeps/s390/s390-32/pt-machine.h	2003-07-31 06:03:28.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/s390/s390-64/pt-machine.h.jj	2003-01-30 16:03:40.000000000 -0500
+++ libc/linuxthreads/sysdeps/s390/s390-64/pt-machine.h	2003-07-31 06:03:38.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/sh/pt-machine.h.jj	2003-01-30 16:03:40.000000000 -0500
+++ libc/linuxthreads/sysdeps/sh/pt-machine.h	2003-07-31 06:03:45.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h.jj	2003-01-30 16:03:40.000000000 -0500
+++ libc/linuxthreads/sysdeps/sparc/sparc32/pt-machine.h	2003-07-31 06:03:49.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h.jj	2003-01-30 16:03:40.000000000 -0500
+++ libc/linuxthreads/sysdeps/sparc/sparc64/pt-machine.h	2003-07-31 06:03:54.000000000 -0400
@@ -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);
--- libc/linuxthreads/sysdeps/x86_64/pt-machine.h.jj	2002-12-17 20:26:44.000000000 -0500
+++ libc/linuxthreads/sysdeps/x86_64/pt-machine.h	2003-07-31 06:04:04.000000000 -0400
@@ -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);
--- libc/linuxthreads/spinlock.h.jj	2001-05-24 19:36:35.000000000 -0400
+++ libc/linuxthreads/spinlock.h	2003-07-31 06:21:03.000000000 -0400
@@ -196,7 +196,7 @@ static inline long atomic_decrement(stru
 }
 
 
-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.
--- libc/stdio-common/tst-wc-printf.c.jj	1998-04-28 10:15:18.000000000 -0400
+++ libc/stdio-common/tst-wc-printf.c	2003-07-31 06:07:58.000000000 -0400
@@ -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;
 }
--- libc/stdlib/tst-limits.c.jj	2000-11-24 20:26:20.000000000 -0500
+++ libc/stdlib/tst-limits.c	2003-07-31 07:34:53.000000000 -0400
@@ -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;
 }
--- libc/sysdeps/generic/libc-start.c.jj	2003-05-06 01:54:18.000000000 -0400
+++ libc/sysdeps/generic/libc-start.c	2003-07-31 06:42:07.000000000 -0400
@@ -45,7 +45,7 @@ extern void __pthread_initialize_minimal
 
 
 #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)
--- libc/sysdeps/powerpc/fpu/w_sqrt.c.jj	2003-03-07 16:18:23.000000000 -0500
+++ libc/sysdeps/powerpc/fpu/w_sqrt.c	2003-07-31 06:55:31.000000000 -0400
@@ -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);
 }
--- libc/sysdeps/powerpc/fpu/w_sqrtf.c.jj	2001-07-06 00:56:02.000000000 -0400
+++ libc/sysdeps/powerpc/fpu/w_sqrtf.c	2003-07-31 06:57:09.000000000 -0400
@@ -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);
 }
--- libc/sysdeps/s390/s390-32/dl-machine.h.jj	2003-07-31 04:36:01.000000000 -0400
+++ libc/sysdeps/s390/s390-32/dl-machine.h	2003-07-31 07:45:22.000000000 -0400
@@ -405,7 +405,9 @@ elf_machine_rela (struct link_map *map, 
     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;
--- libc/sysdeps/s390/s390-64/dl-machine.h.jj	2003-07-31 04:36:01.000000000 -0400
+++ libc/sysdeps/s390/s390-64/dl-machine.h	2003-07-31 08:19:52.000000000 -0400
@@ -373,7 +373,9 @@ elf_machine_rela (struct link_map *map, 
     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;
--- libc/sysdeps/unix/sysv/linux/i386/semctl.c.jj	2001-07-06 00:56:16.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/i386/semctl.c	2003-07-31 05:13:47.000000000 -0400
@@ -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
 #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;
--- libc/sysdeps/unix/sysv/linux/semctl.c.jj	2002-05-14 23:51:38.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/semctl.c	2003-07-31 06:43:26.000000000 -0400
@@ -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
 
     __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;
--- libc/sysdeps/unix/sysv/linux/shmctl.c.jj	2001-07-06 00:56:13.000000000 -0400
+++ libc/sysdeps/unix/sysv/linux/shmctl.c	2003-07-31 06:47:41.000000000 -0400
@@ -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
 #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;
--- libc/wcsmbs/wcsmbs-tst1.c.jj	2001-08-06 22:44:12.000000000 -0400
+++ libc/wcsmbs/wcsmbs-tst1.c	2003-07-31 06:09:10.000000000 -0400
@@ -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))

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]