about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog12
-rwxr-xr-xconfigure78
-rw-r--r--iconv/gconv_simple.c4
-rw-r--r--libio/iofwide.c32
-rw-r--r--stdio-common/printf-prs.c7
-rw-r--r--sysdeps/generic/strchrnul.c6
-rw-r--r--sysdeps/gnu/errlist.c5
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/makecontext.c20
-rw-r--r--wcsmbs/wctob.c4
9 files changed, 56 insertions, 112 deletions
diff --git a/ChangeLog b/ChangeLog
index 7562315c17..85cee67913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-03-05  Ulrich Drepper  <drepper@redhat.com>
+
+	* wcsmbs/wctob.c (wctob): Make buf array of unsigned char.
+	* sysdeps/generic/strchrnul.c: Add cast to avoid warning.
+	* libio/iofwide.c: Add casts to avoid warnings.
+	* stdio-common/printf-prs.c (parse_printf_format): Introduce new
+	variable f to avoid warnings.
+	* sysdeps/unix/sysv/linux/x86_64/makecontext.c (__makecontext):
+	Fix a few casts to avoid warnings.
+	* iconv/gconv_simple.c (internal_utf8_loop): Make start unsigned
+	to avoid warning.
+
 2005-03-05  Jakub Jelinek  <jakub@redhat.com>
 
 	* include/bits/unistd.h: New file.
diff --git a/configure b/configure
index f35641ac8e..1a3f47c275 100755
--- a/configure
+++ b/configure
@@ -313,7 +313,7 @@ ac_includes_default="\
 # include <unistd.h>
 #endif"
 
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default cc_mtune profile omitfp bounded static_nss nopic_initfini DEFINES linux_doors mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS with_fp with_cvs enable_check_abi oldest_abi bindnow force_install all_warnings build build_cpu build_vendor build_os host host_cpu host_vendor host_os subdirs add_ons base_machine sysnames INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA LN_S CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC OBJEXT BUILD_CC cross_compiling CPP CXX CXXFLAGS ac_ct_CXX AR OBJDUMP RANLIB ac_ct_RANLIB MIG AS LD PWD_P MAKE MSGFMT MAKEINFO SED AUTOCONF SYSINCLUDES libc_cv_gcc_static_libgcc BASH libc_cv_have_bash2 KSH libc_cv_have_ksh AWK PERL INSTALL_INFO BISON VERSIONING libc_cv_asm_protected_directive libc_cv_initfinit_array libc_cv_cc_with_libunwind libc_cv_z_nodelete libc_cv_z_nodlopen libc_cv_z_initfirst libc_cv_z_relro libc_cv_Bgroup libc_cv_libgcc_s_suffix libc_cv_as_needed ASFLAGS_config libc_cv_z_combreloc libc_cv_z_execstack libc_cv_fpie fno_unit_at_a_time libc_cv_have_initfini no_whole_archive exceptions LIBGD have_selinux EGREP sizeof_long_double libc_cv_gcc_unwind_find_fde uname_sysname uname_release uname_version old_glibc_headers libc_cv_slibdir libc_cv_localedir libc_cv_sysconfdir libc_cv_rootsbindir libc_cv_forced_unwind use_ldconfig ldd_rewrite_script gnu_ld gnu_as elf xcoff static shared pic_default profile omitfp bounded static_nss nopic_initfini DEFINES mach_interface_list VERSION RELEASE LIBOBJS LTLIBOBJS'
 ac_subst_files=''
 
 # Initialize some variables set by options.
@@ -4101,7 +4101,7 @@ echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
   ac_prog_version=`$CC -v 2>&1 | sed -n 's/^.*version \([egcygnustpi-]*[0-9.]*\).*$/\1/p'`
   case $ac_prog_version in
     '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
-    3.[2-9]* | 4.[0-9]* )
+    3.4* | 4.[0-9]* )
        ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
     *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
 
@@ -7615,71 +7615,8 @@ echo "$as_me:$LINENO: result: $pic_default" >&5
 echo "${ECHO_T}$pic_default" >&6
 
 
-# This test comes after sysdeps configure fragments, so that they can
-# define the variable libc_mtune_example to tell us a valid -mtune=value
-# argument that we can test with.
-cc_mtune=-mcpu
-if test "x$libc_mtune_example" != x; then
-  echo "$as_me:$LINENO: checking if compiler supports -mtune option" >&5
-echo $ECHO_N "checking if compiler supports -mtune option... $ECHO_C" >&6
-if test "${libc_cv_cc_mtune+set}" = set; then
-  echo $ECHO_N "(cached) $ECHO_C" >&6
-else
-      libc_cv_cc_mtune=no
-    save_CFLAGS="$CFLAGS"
-    CFLAGS="$CFLAGS -mtune=$libc_mtune_example"
-    cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
-int
-main ()
-{
 
-  ;
-  return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext
-if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
-  (eval $ac_compile) 2>conftest.er1
-  ac_status=$?
-  grep -v '^ *+' conftest.er1 >conftest.err
-  rm -f conftest.er1
-  cat conftest.err >&5
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); } &&
-	 { ac_try='test -z "$ac_c_werror_flag"
-			 || test ! -s conftest.err'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; } &&
-	 { ac_try='test -s conftest.$ac_objext'
-  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
-  (eval $ac_try) 2>&5
-  ac_status=$?
-  echo "$as_me:$LINENO: \$? = $ac_status" >&5
-  (exit $ac_status); }; }; then
-  libc_cv_cc_mtune=yes
-else
-  echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-fi
-rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
-
-fi
-echo "$as_me:$LINENO: result: $libc_cv_cc_mtune" >&5
-echo "${ECHO_T}$libc_cv_cc_mtune" >&6
-  if test "x$libc_cv_cc_mtune" = xyes; then
-    cc_mtune=-mtune
-  fi
-fi
 
 
 
@@ -7688,15 +7625,6 @@ fi
 
 
 
-
-case "$add_ons" in
-  *door*) linux_doors=yes ;;
-  *) linux_doors=no ;;
-esac
-
-
-
-
 if test "`(cd $srcdir; pwd)`" = "`pwd`"; then
   config_makefile=
 else
@@ -8437,14 +8365,12 @@ s,@xcoff@,$xcoff,;t t
 s,@static@,$static,;t t
 s,@shared@,$shared,;t t
 s,@pic_default@,$pic_default,;t t
-s,@cc_mtune@,$cc_mtune,;t t
 s,@profile@,$profile,;t t
 s,@omitfp@,$omitfp,;t t
 s,@bounded@,$bounded,;t t
 s,@static_nss@,$static_nss,;t t
 s,@nopic_initfini@,$nopic_initfini,;t t
 s,@DEFINES@,$DEFINES,;t t
-s,@linux_doors@,$linux_doors,;t t
 s,@mach_interface_list@,$mach_interface_list,;t t
 s,@VERSION@,$VERSION,;t t
 s,@RELEASE@,$RELEASE,;t t
diff --git a/iconv/gconv_simple.c b/iconv/gconv_simple.c
index e0d14139ba..343c27521f 100644
--- a/iconv/gconv_simple.c
+++ b/iconv/gconv_simple.c
@@ -1,5 +1,5 @@
 /* Simple transformations functions.
-   Copyright (C) 1997-2003, 2004 Free Software Foundation, Inc.
+   Copyright (C) 1997-2003, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -886,7 +886,7 @@ ucs4le_internal_loop_single (struct __gconv_step *step,
     else if (__builtin_expect (wc <= 0x7fffffff, 1))			      \
       {									      \
 	size_t step;							      \
-	char *start;							      \
+	unsigned char *start;						      \
 									      \
 	for (step = 2; step < 6; ++step)				      \
 	  if ((wc & (~(uint32_t)0 << (5 * step + 1))) == 0)		      \
diff --git a/libio/iofwide.c b/libio/iofwide.c
index 03124219ad..7af9a633f8 100644
--- a/libio/iofwide.c
+++ b/libio/iofwide.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2003, 2005 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
@@ -228,8 +228,8 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
   size_t dummy;
   const unsigned char *from_start_copy = (unsigned char *) from_start;
 
-  codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
-  codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+  codecvt->__cd_out.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+  codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end;
   codecvt->__cd_out.__cd.__data[0].__statep = statep;
 
   status = DL_CALL_FCT (gs->__fct,
@@ -238,7 +238,7 @@ do_out (struct _IO_codecvt *codecvt, __mbstate_t *statep,
 			 &dummy, 0, 0));
 
   *from_stop = (wchar_t *) from_start_copy;
-  *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+  *to_stop = (char *) codecvt->__cd_out.__cd.__data[0].__outbuf;
 
   switch (status)
     {
@@ -294,15 +294,15 @@ do_unshift (struct _IO_codecvt *codecvt, __mbstate_t *statep,
   int status;
   size_t dummy;
 
-  codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
-  codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+  codecvt->__cd_out.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+  codecvt->__cd_out.__cd.__data[0].__outbufend = (unsigned char *) to_end;
   codecvt->__cd_out.__cd.__data[0].__statep = statep;
 
   status = DL_CALL_FCT (gs->__fct,
 			(gs, codecvt->__cd_out.__cd.__data, NULL, NULL,
 			 NULL, &dummy, 1, 0));
 
-  *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+  *to_stop = (char *) codecvt->__cd_out.__cd.__data[0].__outbuf;
 
   switch (status)
     {
@@ -357,15 +357,16 @@ do_in (struct _IO_codecvt *codecvt, __mbstate_t *statep,
   size_t dummy;
   const unsigned char *from_start_copy = (unsigned char *) from_start;
 
-  codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_start;
-  codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) to_end;
+  codecvt->__cd_in.__cd.__data[0].__outbuf = (unsigned char *) to_start;
+  codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) to_end;
   codecvt->__cd_in.__cd.__data[0].__statep = statep;
 
   status = DL_CALL_FCT (gs->__fct,
 			(gs, codecvt->__cd_in.__cd.__data, &from_start_copy,
-			 from_end, NULL, &dummy, 0, 0));
+			 (const unsigned char *) from_end, NULL,
+			 &dummy, 0, 0));
 
-  *from_stop = from_start_copy;
+  *from_stop = (const char *) from_start_copy;
   *to_stop = (wchar_t *) codecvt->__cd_in.__cd.__data[0].__outbuf;
 
   switch (status)
@@ -454,13 +455,14 @@ do_length (struct _IO_codecvt *codecvt, __mbstate_t *statep,
   int status;
   size_t dummy;
 
-  codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_buf;
-  codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) &to_buf[max];
+  codecvt->__cd_in.__cd.__data[0].__outbuf = (unsigned char *) to_buf;
+  codecvt->__cd_in.__cd.__data[0].__outbufend = (unsigned char *) &to_buf[max];
   codecvt->__cd_in.__cd.__data[0].__statep = statep;
 
   status = DL_CALL_FCT (gs->__fct,
-			(gs, codecvt->__cd_in.__cd.__data, &cp, from_end,
-			 NULL, &dummy, 0, 0));
+			(gs, codecvt->__cd_in.__cd.__data, &cp,
+			 (const unsigned char *) from_end, NULL,
+			 &dummy, 0, 0));
 
   result = cp - (const unsigned char *) from_start;
 #else
diff --git a/stdio-common/printf-prs.c b/stdio-common/printf-prs.c
index f3b27d6712..015b01f1ed 100644
--- a/stdio-common/printf-prs.c
+++ b/stdio-common/printf-prs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002, 2003, 2004
+/* Copyright (C) 1991, 1992, 1995, 1996, 1999, 2000, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -67,15 +67,16 @@ parse_printf_format (fmt, n, argtypes)
   size_t max_ref_arg;		/* Highest index used in a positional arg.  */
   struct printf_spec spec;
   mbstate_t mbstate;
+  const unsigned char *f = (const unsigned char *) fmt;
 
   nargs = 0;
   max_ref_arg = 0;
 
   /* Search for format specifications.  */
-  for (fmt = __find_specmb (fmt, &mbstate); *fmt != '\0'; fmt = spec.next_fmt)
+  for (f = __find_specmb (f, &mbstate); *f != '\0'; f = spec.next_fmt)
     {
       /* Parse this spec.  */
-      nargs += __parse_one_specmb (fmt, nargs, &spec, &max_ref_arg, &mbstate);
+      nargs += __parse_one_specmb (f, nargs, &spec, &max_ref_arg, &mbstate);
 
       /* If the width is determined by an argument this is an int.  */
       if (spec.width_arg != -1 && (size_t) spec.width_arg < n)
diff --git a/sysdeps/generic/strchrnul.c b/sysdeps/generic/strchrnul.c
index f04b303b82..88b96dd126 100644
--- a/sysdeps/generic/strchrnul.c
+++ b/sysdeps/generic/strchrnul.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,93,94,95,96,97,99,2000 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993-1997,99,2000,2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
    with help from Dan Sahlin (dan@sics.se) and
@@ -43,8 +43,8 @@ __strchrnul (s, c_in)
 
   /* Handle the first few characters by reading one character at a time.
      Do this until CHAR_PTR is aligned on a longword boundary.  */
-  for (char_ptr = s; ((unsigned long int) char_ptr
-		      & (sizeof (longword) - 1)) != 0;
+  for (char_ptr = (const unsigned char *) s;
+       ((unsigned long int) char_ptr & (sizeof (longword) - 1)) != 0;
        ++char_ptr)
     if (*char_ptr == c || *char_ptr == '\0')
       return (void *) char_ptr;
diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c
index 9ae6ec3c1d..1508311a4a 100644
--- a/sysdeps/gnu/errlist.c
+++ b/sysdeps/gnu/errlist.c
@@ -1410,8 +1410,9 @@ TRANS error; @pxref{Cancel AIO Operations}. */
 #endif
   };
 
-const int _sys_nerr_internal
-  = sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0];
+#define NERR \
+  (sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0])
+const int _sys_nerr_internal = NERR;
 
 #if !defined NOT_IN_libc && !ERRLIST_NO_COMPAT
 # include <errlist-compat.c>
diff --git a/sysdeps/unix/sysv/linux/x86_64/makecontext.c b/sysdeps/unix/sysv/linux/x86_64/makecontext.c
index c763556b93..6597d8980b 100644
--- a/sysdeps/unix/sysv/linux/x86_64/makecontext.c
+++ b/sysdeps/unix/sysv/linux/x86_64/makecontext.c
@@ -1,5 +1,5 @@
 /* Create new context.
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Andreas Jaeger <aj@suse.de>, 2002.
 
@@ -20,6 +20,7 @@
 
 #include <sysdep.h>
 #include <stdarg.h>
+#include <stdint.h>
 #include <ucontext.h>
 
 #include "ucontext_i.h"
@@ -52,28 +53,29 @@ void
 __makecontext (ucontext_t *ucp, void (*func) (void), int argc, ...)
 {
   extern void __start_context (void);
-  unsigned long *sp, idx_uc_link;
+  unsigned long int *sp, idx_uc_link;
   va_list ap;
   int i;
 
   /* Generate room on stack for parameter if needed and uc_link.  */
-  sp = (long *) ((long) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size);
+  sp = (unsigned long int *) ((uintptr_t) ucp->uc_stack.ss_sp
+			      + ucp->uc_stack.ss_size);
   sp -= (argc > 6 ? argc - 6 : 0) + 1;
   /* Align stack and make space for trampoline address.  */
-  sp = (long *) ((((long) sp) & -16L) - 8);
+  sp = (unsigned long int *) ((((uintptr_t) sp) & -16L) - 8);
 
   idx_uc_link = (argc > 6 ? argc - 6 : 0) + 1;
 
   /* Setup context ucp.  */
   /* Address to jump to.  */
-  ucp->uc_mcontext.gregs[REG_RIP] = (long) func;
+  ucp->uc_mcontext.gregs[REG_RIP] = (long int) func;
   /* Setup rbx.*/
-  ucp->uc_mcontext.gregs[REG_RBX] = (long) &sp[idx_uc_link];
-  ucp->uc_mcontext.gregs[REG_RSP] = (long) sp;
+  ucp->uc_mcontext.gregs[REG_RBX] = (long int) &sp[idx_uc_link];
+  ucp->uc_mcontext.gregs[REG_RSP] = (long int) sp;
 
   /* Setup stack.  */
-  sp[0] = (long) &__start_context;
-  sp[idx_uc_link] = (long) ucp->uc_link;
+  sp[0] = (unsigned long int) &__start_context;
+  sp[idx_uc_link] = (unsigned long int) ucp->uc_link;
 
   va_start (ap, argc);
   /* Handle arguments.  */
diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c
index b85ba6dd8f..854a3f25db 100644
--- a/wcsmbs/wctob.c
+++ b/wcsmbs/wctob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2000, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2000, 2002, 2003, 2005 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
 
@@ -29,7 +29,7 @@ int
 wctob (c)
      wint_t c;
 {
-  char buf[MB_LEN_MAX];
+  unsigned char buf[MB_LEN_MAX];
   struct __gconv_step_data data;
   wchar_t inbuf[1];
   wchar_t *inptr = inbuf;