about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2004-03-25 03:54:03 +0000
committerRoland McGrath <roland@gnu.org>2004-03-25 03:54:03 +0000
commitdb2f05ba83cd9eaae24b30166816e5169bbae2c0 (patch)
tree0e742754c54aafc31d38af146808d06300a65286
parent61044c288ab5c7c4687205b0bf136e5358bfe1d1 (diff)
downloadglibc-db2f05ba83cd9eaae24b30166816e5169bbae2c0.tar.gz
glibc-db2f05ba83cd9eaae24b30166816e5169bbae2c0.tar.xz
glibc-db2f05ba83cd9eaae24b30166816e5169bbae2c0.zip
* Makerules ($(common-objpfx)shlib.lds): Don't use \n in rhs of sed
	substitutions; the semicolon terminators are enough for ld anyway.

	* elf/dl-deps.c (_dl_map_object_deps): Use alloca instead of
	dynamically sized auto array in function already using alloca.
	* locale/programs/ld-ctype.c (ctype_output): Likewise.
	* locale/programs/ld-time.c (time_output): Likewise.
	* elf/dl-misc.c (_dl_debug_vdprintf): Use macro instead of const for
	IOV array size.
	* locale/programs/charmap.c (charmap_read): Avoid alloca (or strdupa)
	when also using dynamically-sized auto array.
	* locale/programs/locfile.c (locfile_read): Likewise.
	* locale/programs/repertoire.c (repertoire_read): Likewise.
	* nis/nis_print_group_entry.c (nis_print_group_entry): Likewise.
	* locale/programs/locarchive.c (enlarge_archive): Likewise.
	* posix/annexc.c (check_header): Likewise.

	* iconv/gconv_int.h (norm_add_slashes): Don't handle null SUFFIX.
	strlen ("") gets optimized away just as well.
	* intl/loadmsgcat.c (_nl_init_domain_conv): Update caller.
	* wcsmbs/wcsmbsload.c (__wcsmbs_load_conv): Likewise.
-rw-r--r--ChangeLog22
-rw-r--r--Makerules18
-rw-r--r--elf/dl-deps.c2
-rw-r--r--elf/dl-misc.c8
-rw-r--r--iconv/gconv_int.h4
-rw-r--r--intl/loadmsgcat.c2
-rw-r--r--locale/programs/charmap.c8
-rw-r--r--locale/programs/ld-ctype.c9
-rw-r--r--locale/programs/ld-time.c11
-rw-r--r--locale/programs/locarchive.c5
-rw-r--r--locale/programs/locfile.c11
-rw-r--r--locale/programs/repertoire.c9
-rw-r--r--nis/nis_print_group_entry.c20
-rw-r--r--nptl/ChangeLog5
-rw-r--r--nptl/sysdeps/i386/pthread_spin_lock.c4
-rw-r--r--nptl_db/ChangeLog5
-rw-r--r--nptl_db/fetch-value.c5
-rw-r--r--nptl_db/thread_dbP.h4
-rw-r--r--posix/annexc.c15
-rw-r--r--wcsmbs/wcsmbsload.c4
20 files changed, 99 insertions, 72 deletions
diff --git a/ChangeLog b/ChangeLog
index 79b2f9f594..ccc96a3bf1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2004-03-24  Roland McGrath  <roland@redhat.com>
 
+	* Makerules ($(common-objpfx)shlib.lds): Don't use \n in rhs of sed
+	substitutions; the semicolon terminators are enough for ld anyway.
+
+	* elf/dl-deps.c (_dl_map_object_deps): Use alloca instead of
+	dynamically sized auto array in function already using alloca.
+	* locale/programs/ld-ctype.c (ctype_output): Likewise.
+	* locale/programs/ld-time.c (time_output): Likewise.
+	* elf/dl-misc.c (_dl_debug_vdprintf): Use macro instead of const for
+	IOV array size.
+	* locale/programs/charmap.c (charmap_read): Avoid alloca (or strdupa)
+	when also using dynamically-sized auto array.
+	* locale/programs/locfile.c (locfile_read): Likewise.
+	* locale/programs/repertoire.c (repertoire_read): Likewise.
+	* nis/nis_print_group_entry.c (nis_print_group_entry): Likewise.
+	* locale/programs/locarchive.c (enlarge_archive): Likewise.
+	* posix/annexc.c (check_header): Likewise.
+
+	* iconv/gconv_int.h (norm_add_slashes): Don't handle null SUFFIX.
+	strlen ("") gets optimized away just as well.
+	* intl/loadmsgcat.c (_nl_init_domain_conv): Update caller.
+	* wcsmbs/wcsmbsload.c (__wcsmbs_load_conv): Likewise.
+
 	* Makefile ($(objpfx)c++-types-check.out): Reduce duplication in
 	defining this target.  Also elide -Wstrict-prototypes from CFLAGS.
 
diff --git a/Makerules b/Makerules
index 970d1a4e32..a0eb30a557 100644
--- a/Makerules
+++ b/Makerules
@@ -491,15 +491,15 @@ $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules
 		 PROVIDE(__start___libc_freeres_ptrs = .); \
 		 *(__libc_freeres_ptrs) \
 		 PROVIDE(__stop___libc_freeres_ptrs = .);/'\
-	      -e 's/^.*\*(\.jcr).*$$/&\n\
-		 PROVIDE(__start___libc_subfreeres = .);\n\
-		 __libc_subfreeres : { *(__libc_subfreeres) }\n\
-		 PROVIDE(__stop___libc_subfreeres = .);\n\
-		 PROVIDE(__start___libc_atexit = .);\n\
-		 __libc_atexit : { *(__libc_atexit) }\n\
-		 PROVIDE(__stop___libc_atexit = .);\n\
-		 PROVIDE(__start___libc_thread_subfreeres = .);\n\
-		 __libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\n\
+	      -e 's/^.*\*(\.jcr).*$$/& \
+		 PROVIDE(__start___libc_subfreeres = .);\
+		 __libc_subfreeres : { *(__libc_subfreeres) }\
+		 PROVIDE(__stop___libc_subfreeres = .);\
+		 PROVIDE(__start___libc_atexit = .);\
+		 __libc_atexit : { *(__libc_atexit) }\
+		 PROVIDE(__stop___libc_atexit = .);\
+		 PROVIDE(__start___libc_thread_subfreeres = .);\
+		 __libc_thread_subfreeres : { *(__libc_thread_subfreeres) }\
 		 PROVIDE(__stop___libc_thread_subfreeres = .);/'
 	mv -f $@T $@
 common-generated += shlib.lds
diff --git a/elf/dl-deps.c b/elf/dl-deps.c
index 1c383b7b98..b8dee8ab52 100644
--- a/elf/dl-deps.c
+++ b/elf/dl-deps.c
@@ -144,7 +144,7 @@ _dl_map_object_deps (struct link_map *map,
 		     struct link_map **preloads, unsigned int npreloads,
 		     int trace_mode, int open_mode)
 {
-  struct list known[1 + npreloads + 1];
+  struct list *known = __alloca (sizeof *known * (1 + npreloads + 1));
   struct list *runp, *tail;
   unsigned int nlist, i;
   /* Object name.  */
diff --git a/elf/dl-misc.c b/elf/dl-misc.c
index abc5cbb853..41ef26131d 100644
--- a/elf/dl-misc.c
+++ b/elf/dl-misc.c
@@ -88,8 +88,8 @@ _dl_sysdep_read_whole_file (const char *file, size_t *sizep, int prot)
 static void
 _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
 {
-  const int niovmax = 64;
-  struct iovec iov[niovmax];
+# define NIOVMAX 64
+  struct iovec iov[NIOVMAX];
   int niov = 0;
   pid_t pid = 0;
   char pidbuf[12];
@@ -115,7 +115,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
 	    }
 
 	  /* Append to the output.  */
-	  assert (niov < niovmax);
+	  assert (niov < NIOVMAX);
 	  iov[niov].iov_len = 12;
 	  iov[niov++].iov_base = pidbuf;
 
@@ -128,7 +128,7 @@ _dl_debug_vdprintf (int fd, int tag_p, const char *fmt, va_list arg)
 	++fmt;
 
       /* Append constant string.  */
-      assert (niov < niovmax);
+      assert (niov < NIOVMAX);
       if ((iov[niov].iov_len = fmt - startp) != 0)
 	iov[niov++].iov_base = (char *) startp;
 
diff --git a/iconv/gconv_int.h b/iconv/gconv_int.h
index 782e16a58a..36d4ae2d44 100644
--- a/iconv/gconv_int.h
+++ b/iconv/gconv_int.h
@@ -137,7 +137,7 @@ __libc_lock_define (extern, __gconv_lock);
     char *result;							      \
     char *tmp;								      \
     size_t cnt = 0;							      \
-    size_t suffix_len = (suffix) == NULL ? 0 : strlen (suffix);		      \
+    const size_t suffix_len = strlen (suffix);				      \
 									      \
     while (*cp != '\0')							      \
       if (*cp++ == '/')							      \
@@ -153,7 +153,7 @@ __libc_lock_define (extern, __gconv_lock);
 	if (cnt < 1)							      \
 	  {								      \
 	    *tmp++ = '/';						      \
-	    if (suffix != NULL)						      \
+	    if (suffix_len != 0)					      \
 	      tmp = __mempcpy (tmp, suffix, suffix_len);		      \
 	  }								      \
       }									      \
diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c
index d70d77e9ed..a9c257c145 100644
--- a/intl/loadmsgcat.c
+++ b/intl/loadmsgcat.c
@@ -832,7 +832,7 @@ _nl_init_domain_conv (domain_file, domain, domainbinding)
 # ifdef _LIBC
 	  /* We always want to use transliteration.  */
 	  outcharset = norm_add_slashes (outcharset, "TRANSLIT");
-	  charset = norm_add_slashes (charset, NULL);
+	  charset = norm_add_slashes (charset, "");
 	  if (__gconv_open (outcharset, charset, &domain->conv,
 			    GCONV_AVOID_NOCONV)
 	      != __GCONV_OK)
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index 8c9e4e9abb..8dbac6f5b9 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1998-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1998-2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
 
@@ -106,9 +106,11 @@ charmap_read (const char *filename, int verbose, int be_quiet, int use_default)
 	      char *i18npath = getenv ("I18NPATH");
 	      if (i18npath != NULL && *i18npath != '\0')
 		{
-		  char path[strlen (i18npath) + sizeof ("/charmaps")];
+		  const size_t pathlen = strlen (i18npath);
+		  char i18npathbuf[pathlen + 1];
+		  char path[pathlen + sizeof ("/charmaps")];
 		  char *next;
-		  i18npath = strdupa (i18npath);
+		  i18npath = memcpy (i18npathbuf, i18npath, pathlen + 1);
 
 		  while (cmfile == NULL
 			 && (next = strsep (&i18npath, ":")) != NULL)
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index ca2ca1eaca..ed8fa919d5 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
 
@@ -887,10 +887,11 @@ ctype_output (struct localedef_t *locale, const struct charmap_t *charmap,
   struct locale_ctype_t *ctype = locale->categories[LC_CTYPE].ctype;
   const size_t nelems = (_NL_ITEM_INDEX (_NL_CTYPE_EXTRA_MAP_1)
 			 + ctype->nr_charclass + ctype->map_collection_nr);
-  struct iovec iov[2 + nelems + 2 * ctype->nr_charclass
-		  + ctype->map_collection_nr + 4];
+  struct iovec *iov = alloca (sizeof *iov
+			      * (2 + nelems + 2 * ctype->nr_charclass
+				 + ctype->map_collection_nr + 4));
   struct locale_file data;
-  uint32_t idx[nelems + 1];
+  uint32_t *idx = alloca (sizeof *idx * (nelems + 1));
   uint32_t default_missing_len;
   size_t elem, cnt, offset, total;
   char *cp;
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index f0a0f0fff7..a7dd25c80d 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
 
@@ -528,10 +528,11 @@ time_output (struct localedef_t *locale, const struct charmap_t *charmap,
 	     const char *output_path)
 {
   struct locale_time_t *time = locale->categories[LC_TIME].time;
-  struct iovec iov[2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME)
-		  + time->num_era - 1
-		  + 2 * 99
-		  + 2 + time->num_era * 10 - 1];
+  struct iovec *iov = alloca (sizeof *iov
+			      * (2 + _NL_ITEM_INDEX (_NL_NUM_LC_TIME)
+				 + time->num_era - 1
+				 + 2 * 99
+				 + 2 + time->num_era * 10 - 1));
   struct locale_file data;
   uint32_t idx[_NL_ITEM_INDEX (_NL_NUM_LC_TIME)];
   size_t cnt, last_idx, num, n;
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
index e10f236815..1a1c7701d1 100644
--- a/locale/programs/locarchive.c
+++ b/locale/programs/locarchive.c
@@ -238,7 +238,6 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
   size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
   char archivefname[prefix_len + sizeof (ARCHIVE_NAME)];
   char fname[prefix_len + sizeof (ARCHIVE_NAME) + sizeof (".XXXXXX") - 1];
-  struct oldlocrecent *oldlocrecarray;
 
   if (output_prefix)
     memcpy (archivefname, output_prefix, prefix_len);
@@ -341,9 +340,7 @@ enlarge_archive (struct locarhandle *ah, const struct locarhead *head)
 				       + head->locrectab_offset);
 
   /* Sort the old locrec table in order of data position.  */
-  oldlocrecarray = (struct oldlocrecent *)
-		   alloca (head->namehash_size
-			   * sizeof (struct oldlocrecent));
+  struct oldlocrecent oldlocrecarray[head->namehash_size];
   for (cnt = 0, loccnt = 0; cnt < head->namehash_size; ++cnt)
     if (oldnamehashtab[cnt].locrec_offset != 0)
       {
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
index 2eeed96141..1d3276a6bf 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2001, 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2001, 2002, 2003, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
 
@@ -64,11 +64,12 @@ locfile_read (struct localedef_t *result, const struct charmap_t *charmap)
 	  char *i18npath = getenv ("I18NPATH");
 	  if (i18npath != NULL && *i18npath != '\0')
 	    {
-	      char path[strlen (filename) + 1 + strlen (i18npath)
-		        + sizeof ("/locales/") - 1];
+	      const size_t pathlen = strlen (i18npath);
+	      char i18npathbuf[pathlen + 1];
+	      char path[strlen (filename) + 1 + pathlen
+			+ sizeof ("/locales/") - 1];
 	      char *next;
-	      i18npath = strdupa (i18npath);
-
+	      i18npath = memcpy (i18npathbuf, i18npath, pathlen + 1);
 
 	      while (ldfile == NULL
 		     && (next = strsep (&i18npath, ":")) != NULL)
diff --git a/locale/programs/repertoire.c b/locale/programs/repertoire.c
index 8251db43d3..933b88f5cd 100644
--- a/locale/programs/repertoire.c
+++ b/locale/programs/repertoire.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998,1999,2000,2001,2002,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -80,11 +80,12 @@ repertoire_read (const char *filename)
 	  char *i18npath = getenv ("I18NPATH");
 	  if (i18npath != NULL && *i18npath != '\0')
 	    {
-	      char path[strlen (filename) + 1 + strlen (i18npath)
+	      const size_t pathlen = strlen (i18npath);
+	      char i18npathbuf[pathlen + 1];
+	      char path[strlen (filename) + 1 + pathlen
 		        + sizeof ("/repertoiremaps/") - 1];
 	      char *next;
-	      i18npath = strdupa (i18npath);
-
+	      i18npath = memcpy (i18npathbuf, i18npath, pathlen + 1);
 
 	      while (repfile == NULL
 		     && (next = strsep (&i18npath, ":")) != NULL)
diff --git a/nis/nis_print_group_entry.c b/nis/nis_print_group_entry.c
index b32b3c2a37..6f0ba8fbd4 100644
--- a/nis/nis_print_group_entry.c
+++ b/nis/nis_print_group_entry.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 1997, 1998, 2000 Free Software Foundation, Inc.
+/* Copyright (c) 1997, 1998, 2000, 2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Thorsten Kukuk <kukuk@vt.uni-paderborn.de>, 1997.
 
@@ -31,10 +31,6 @@ nis_print_group_entry (const_nis_name group)
       char buf[grouplen + 50];
       char leafbuf[grouplen + 3];
       char domainbuf[grouplen + 3];
-      unsigned long mem_exp_cnt = 0, mem_imp_cnt = 0, mem_rec_cnt = 0;
-      unsigned long nomem_exp_cnt = 0, nomem_imp_cnt = 0, nomem_rec_cnt = 0;
-      char **mem_exp, **mem_imp, **mem_rec;
-      char **nomem_exp, **nomem_imp, **nomem_rec;
       nis_result *res;
       char *cp, *cp2;
       u_int i;
@@ -56,12 +52,14 @@ nis_print_group_entry (const_nis_name group)
 	  (__type_of (NIS_RES_OBJECT (res)) != NIS_GROUP_OBJ))
 	return;
 
-      mem_exp = alloca (sizeof (char *) * NIS_RES_NUMOBJ (res));
-      mem_imp = alloca (sizeof (char *) * NIS_RES_NUMOBJ (res));
-      mem_rec = alloca (sizeof (char *) * NIS_RES_NUMOBJ (res));
-      nomem_exp = alloca (sizeof (char *) * NIS_RES_NUMOBJ (res));
-      nomem_imp = alloca (sizeof (char *) * NIS_RES_NUMOBJ (res));
-      nomem_rec = alloca (sizeof (char *) * NIS_RES_NUMOBJ (res));
+      char *mem_exp[NIS_RES_NUMOBJ (res)];
+      char *mem_imp[NIS_RES_NUMOBJ (res)];
+      char *mem_rec[NIS_RES_NUMOBJ (res)];
+      char *nomem_exp[NIS_RES_NUMOBJ (res)];
+      char *nomem_imp[NIS_RES_NUMOBJ (res)];
+      char *nomem_rec[NIS_RES_NUMOBJ (res)];
+      unsigned long mem_exp_cnt = 0, mem_imp_cnt = 0, mem_rec_cnt = 0;
+      unsigned long nomem_exp_cnt = 0, nomem_imp_cnt = 0, nomem_rec_cnt = 0;
 
       for (i = 0;
 	   i < NIS_RES_OBJECT (res)->GR_data.gr_members.gr_members_len; ++i)
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index 4b8e43d6e5..b29f3b30f5 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-24  Roland McGrath  <roland@redhat.com>
+
+	* sysdeps/i386/pthread_spin_lock.c (pthread_spin_lock): Use "m"
+	constraint instead of "0".
+
 2004-03-24  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/powerpc/lowlevellock.h
diff --git a/nptl/sysdeps/i386/pthread_spin_lock.c b/nptl/sysdeps/i386/pthread_spin_lock.c
index f001fbacab..b41174e5f2 100644
--- a/nptl/sysdeps/i386/pthread_spin_lock.c
+++ b/nptl/sysdeps/i386/pthread_spin_lock.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 2002,2003,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -43,7 +43,7 @@ pthread_spin_lock (lock)
        "jmp 2b\n\t"
        ".previous"
        : "=m" (*lock)
-       : "0" (*lock));
+       : "m" (*lock));
 
   return 0;
 }
diff --git a/nptl_db/ChangeLog b/nptl_db/ChangeLog
index f7a081ebd9..6f01f2be72 100644
--- a/nptl_db/ChangeLog
+++ b/nptl_db/ChangeLog
@@ -1,3 +1,8 @@
+2004-03-24  Roland McGrath  <roland@redhat.com>
+
+	* fetch-value.c (_td_locate_field): Cast DB_DESC_OFFSET to int32_t.
+	* thread_dbP.h (DB_DESC_OFFSET): Remove cast from definition.
+
 2004-03-13  Jakub Jelinek  <jakub@redhat.com>
 
 	* db_info.c: Don't use TLS_TP_OFFSET in the #if, but
diff --git a/nptl_db/fetch-value.c b/nptl_db/fetch-value.c
index 9d40b61691..0d9bb0eb80 100644
--- a/nptl_db/fetch-value.c
+++ b/nptl_db/fetch-value.c
@@ -1,5 +1,5 @@
 /* Helper routines for libthread_db.
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 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
@@ -78,7 +78,8 @@ _td_locate_field (td_thragent_t *ta,
   if (elemsize & 0xff000000U)
     elemsize = bswap_32 (elemsize);
 
-  *address += DB_DESC_OFFSET (desc) + (elemsize / 8 * (idx - (psaddr_t) 0));
+  *address += (int32_t) DB_DESC_OFFSET (desc);
+  *address += (elemsize / 8 * (idx - (psaddr_t) 0));
   return TD_OK;
 }
 
diff --git a/nptl_db/thread_dbP.h b/nptl_db/thread_dbP.h
index 64266200f0..5504dd070f 100644
--- a/nptl_db/thread_dbP.h
+++ b/nptl_db/thread_dbP.h
@@ -1,5 +1,5 @@
 /* Private header for thread debug library
-   Copyright (C) 2003 Free Software Foundation, Inc.
+   Copyright (C) 2003, 2004 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
@@ -66,7 +66,7 @@ extern int __td_debug attribute_hidden;
 
 #define DB_DESC_SIZE(desc)	((desc)[0])
 #define DB_DESC_NELEM(desc)	((desc)[1])
-#define DB_DESC_OFFSET(desc)	((int32_t) (desc)[2])
+#define DB_DESC_OFFSET(desc)	((desc)[2])
 #define DB_SIZEOF_DESC		(3 * sizeof (uint32_t))
 #define DB_DEFINE_DESC(name, size, nelem, offset) \
   const uint32_t name[3] = { (size), (nelem), (offset) }
diff --git a/posix/annexc.c b/posix/annexc.c
index 3ade6d4227..df5913aedd 100644
--- a/posix/annexc.c
+++ b/posix/annexc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 2000, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998, 2000, 2002, 2004 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
@@ -794,22 +794,15 @@ get_null_defines (void)
 static int
 check_header (const struct header *header, const char **except)
 {
-  char line[BUFSIZ], *command;
+  char line[BUFSIZ], command[sizeof fmt + strlen (header->name)
+			     + 2 * strlen (CC)
+			     + strlen (INC) + strlen (macrofile)];
   FILE *input;
   int result = 0;
   int found[header->nsyms];
   int i;
 
   memset (found, '\0', header->nsyms * sizeof (int));
-  command = alloca (sizeof fmt + strlen (header->name) + 2 * strlen (CC)
-		    + strlen (INC) + strlen (macrofile));
-
-
-  if (command == NULL)
-    {
-      puts ("No more memory.");
-      exit (1);
-    }
 
   printf ("=== %s ===\n", header->name);
   sprintf (command, fmt, header->name, CC, INC, CC, macrofile);
diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c
index 2fea6c38b3..e618895157 100644
--- a/wcsmbs/wcsmbsload.c
+++ b/wcsmbs/wcsmbsload.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+/* Copyright (C) 1998,1999,2000,2001,2002,2004 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
 
@@ -179,7 +179,7 @@ __wcsmbs_load_conv (struct locale_data *new_category)
       /* Normalize the name and add the slashes necessary for a
 	 complete lookup.  */
       complete_name = norm_add_slashes (charset_name,
-					use_translit ? "TRANSLIT" : NULL);
+					use_translit ? "TRANSLIT" : "");
 
       /* It is not necessary to use transliteration in this direction
 	 since the internal character set is supposed to be able to