about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-08-22 09:05:41 +0000
committerJakub Jelinek <jakub@redhat.com>2006-08-22 09:05:41 +0000
commit4728cb644861ff8c58586702bf6815c50a1c0dd2 (patch)
tree305ac8dc2d7c6eaf501ebe90d90cc174c8ae7e25
parentab3017a58b517cb20feb6e6688b9cb1948c00156 (diff)
downloadglibc-4728cb644861ff8c58586702bf6815c50a1c0dd2.tar.gz
glibc-4728cb644861ff8c58586702bf6815c50a1c0dd2.tar.xz
glibc-4728cb644861ff8c58586702bf6815c50a1c0dd2.zip
Updated to fedora-glibc-20060822T0706 cvs/fedora-glibc-2_4_90-23
-rw-r--r--ChangeLog53
-rw-r--r--Makerules5
-rw-r--r--dlfcn/Makefile2
-rw-r--r--elf/Makefile2
-rw-r--r--fedora/branch.mk4
-rw-r--r--fedora/glibc.spec.in12
-rw-r--r--iconv/iconv_prog.c4
-rw-r--r--locale/programs/charmap.c5
-rw-r--r--locale/programs/charmap.h5
-rw-r--r--locale/programs/localedef.c2
-rw-r--r--localedata/ChangeLog10
-rw-r--r--localedata/locales/bn_IN17
-rw-r--r--localedata/locales/ml_IN38
-rw-r--r--malloc/arena.c6
-rw-r--r--malloc/malloc.c23
-rw-r--r--misc/error.c122
-rw-r--r--misc/error.h10
-rw-r--r--nis/nss_nis/nis-rpc.c4
-rw-r--r--nis/nss_nis/nis-service.c4
-rw-r--r--nptl/ChangeLog10
-rw-r--r--nptl/Makefile2
-rw-r--r--nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h3
-rw-r--r--stdlib/Makefile2
-rw-r--r--string/strchr.c7
-rw-r--r--sysdeps/unix/sysv/linux/openat.c4
25 files changed, 191 insertions, 165 deletions
diff --git a/ChangeLog b/ChangeLog
index e54bd15b93..2adc7bb44f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,56 @@
+2006-05-15  Mike Frysinger  <vapier@gentoo.org>
+
+	[BZ #2751]
+	* string/strchr.c: Add cast to avoid warning.
+
+2006-08-21  Ulrich Drepper  <drepper@redhat.com>
+
+	* malloc/malloc.c (DEFAULT_MMAP_THRESHOLD_MAX): For 32-bit
+	platforms define as 512K.  For 64-bit platforms as 32MB.  The lower
+	limit is needed to avoid the exploding of the address space
+	requirement for secondary heaps.
+	* malloc/arena.c (HEAP_MAX_SIZE): Define using
+	DEFAULT_MMAP_THRESHOLD_MAX if it is defined.
+
+2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
+
+	[BZ #3018]
+	* Makerules (depfiles): Handle extra-test-objs the same as
+	extra-objs.
+	(common-mostlyclean): Likewise.
+	* dlfcn/Makefile (extra-objs): Add modules to extra-test-objs
+	instead.
+	* elf/Makefile (extra-objs): Likewise.
+	* stdlib/Makefile (extra-objs): Likewise.
+
+2006-08-14  Eric Blake	<ebb9@byu.net>
+
+	[BZ #3044]
+	* misc/error.h: Assume C89 or better.
+	* misc/error.c: Likewise.
+
+2006-08-21  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #3040]
+	* sysdeps/unix/sysv/linux/openat.c: Fix compilation if
+	__ASSUME_ATFCTS is defined.
+
+2006-08-19  Ulrich Drepper  <drepper@redhat.com>
+
+	* malloc/malloc.c (_int_malloc): Limit number of unsorted blocks
+	to sort in each call.
+
+	* nis/nss_nis/nis-service.c (internal_nis_getservent_r): . If map
+	is empty simply return and use next service.
+	* nis/nss_nis/nis-rpc.c (internal_nis_getrpcent_r): Likewise.
+
+	* locale/programs/charmap.c (charmap_read): Add new parameter.  It
+	tells us when not finding a charmap file is an error.
+	* locale/programs/charmap.h: Adjust charmap_read prototype.
+	* iconv/iconv_prog.c (main): Tell charmap_read it's no error if we
+	cannot find a charmap.
+	* locale/programs/localedef.c (main): Adjust charmap_read call.
+
 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/sparc/sparc64/pause.c: Use
diff --git a/Makerules b/Makerules
index 98a06400b5..f50f7a4884 100644
--- a/Makerules
+++ b/Makerules
@@ -688,6 +688,7 @@ endif
 
 +depfiles := $(sources:.c=.d) \
 	     $(patsubst %.o,%.d,$(filter %.o,$(extra-objs:.os=.o))) \
+	     $(patsubst %.o,%.d,$(filter %.o,$(extra-test-objs:.os=.o))) \
 	     $(addsuffix .d,$(tests) $(xtests) $(test-srcs))
 ifeq ($(build-programs),yes)
 +depfiles += $(addsuffix .d,$(others) $(sysdep-others))
@@ -1369,8 +1370,8 @@ common-mostlyclean:
 						      $(test-srcs)) \
 				     $(addsuffix -bp.out,$(tests) $(xtests) \
 							 $(test-srcs)))
-	-rm -f $(addprefix $(objpfx),$(extra-objs) $(install-lib) \
-				     $(install-lib.so) \
+	-rm -f $(addprefix $(objpfx),$(extra-objs) $(extra-test-objs) \
+				     $(install-lib) $(install-lib.so) \
 				     $(install-lib.so:%.so=%_pic.a))
 	-rm -f core
 	-rm -f $(objpfx)rtld-*.os
diff --git a/dlfcn/Makefile b/dlfcn/Makefile
index 649f61de63..ffdb70ea68 100644
--- a/dlfcn/Makefile
+++ b/dlfcn/Makefile
@@ -63,7 +63,7 @@ tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
 tststatic2-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf
 endif
 
-extra-objs += $(modules-names:=.os)
+extra-test-objs += $(modules-names:=.os)
 generated := $(modules-names:=.so)
 
 include ../Rules
diff --git a/elf/Makefile b/elf/Makefile
index 3b4ef26d45..402fc18636 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -223,7 +223,7 @@ modules-nodelete-yes = nodelmod1 nodelmod2 nodelmod3 nodelmod4 \
 		       nodel2mod1 nodel2mod2 nodel2mod3
 modules-nodlopen-yes = nodlopenmod nodlopenmod2
 modules-execstack-yes = tst-execstack-mod
-extra-objs += $(addsuffix .os,$(strip $(modules-names)))
+extra-test-objs += $(addsuffix .os,$(strip $(modules-names)))
 # We need this variable to be sure the test modules get the right CPPFLAGS.
 test-extras += $(modules-names)
 
diff --git a/fedora/branch.mk b/fedora/branch.mk
index 1c17d89707..86bc40a3e5 100644
--- a/fedora/branch.mk
+++ b/fedora/branch.mk
@@ -3,5 +3,5 @@ glibc-branch := fedora
 glibc-base := HEAD
 DIST_BRANCH := devel
 COLLECTION := dist-fc4
-fedora-sync-date := 2006-08-15 20:33 UTC
-fedora-sync-tag := fedora-glibc-20060815T2033
+fedora-sync-date := 2006-08-22 07:06 UTC
+fedora-sync-tag := fedora-glibc-20060822T0706
diff --git a/fedora/glibc.spec.in b/fedora/glibc.spec.in
index 3fb4576c5a..251854997b 100644
--- a/fedora/glibc.spec.in
+++ b/fedora/glibc.spec.in
@@ -1,4 +1,4 @@
-%define glibcrelease 21
+%define glibcrelease 23
 %define auxarches i586 i686 athlon sparcv9 alphaev6
 %define xenarches i686 athlon
 %ifarch %{xenarches}
@@ -1448,6 +1448,16 @@ rm -f *.filelist*
 %endif
 
 %changelog
+* Tue Aug 22 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-23
+- malloc fixes, especially for 32-bit arches (#202309)
+- further *_IN locale fixes (#200230)
+- fix get{serv,rpc}ent{,_r} if NIS map is empty (#203237)
+- fix /usr/bin/iconv (#203400)
+
+* Fri Aug 18 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-22
+- rebuilt with latest binutils to pick up 64K -z commonpagesize
+  on ppc/ppc64 (#203001)
+
 * Tue Aug 15 2006 Jakub Jelinek <jakub@redhat.com> 2.4.90-21
 - if some test gets stuck, kill the tee process after make check
   finishes
diff --git a/iconv/iconv_prog.c b/iconv/iconv_prog.c
index 033cd93f23..fabdd001e3 100644
--- a/iconv/iconv_prog.c
+++ b/iconv/iconv_prog.c
@@ -183,12 +183,12 @@ main (int argc, char *argv[])
   if (strchr (from_code, '/') != NULL)
     /* The from-name might be a charmap file name.  Try reading the
        file.  */
-    from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0);
+    from_charmap = charmap_read (from_code, /*0, 1*/1, 0, 0, 0);
 
   if (strchr (orig_to_code, '/') != NULL)
     /* The to-name might be a charmap file name.  Try reading the
        file.  */
-    to_charmap = charmap_read (orig_to_code, /*0, 1,*/1,0, 0);
+    to_charmap = charmap_read (orig_to_code, /*0, 1,*/1, 0, 0, 0);
 
 
   /* Determine output file.  */
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index e56b0be81c..52a69de4b0 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -86,7 +86,8 @@ cmlr_open (const char *directory, const char *name, kw_hash_fct_t hf)
 }
 
 struct charmap_t *
-charmap_read (const char *filename, int verbose, int be_quiet, int use_default)
+charmap_read (const char *filename, int verbose, int error_not_found,
+	      int be_quiet, int use_default)
 {
   struct charmap_t *result = NULL;
 
@@ -132,7 +133,7 @@ charmap_read (const char *filename, int verbose, int be_quiet, int use_default)
       if (cmfile != NULL)
 	result = parse_charmap (cmfile, verbose, be_quiet);
 
-      if (result == NULL && !be_quiet)
+      if (result == NULL && error_not_found)
 	WITH_CUR_LOCALE (error (0, errno, _("\
 character map file `%s' not found"), filename));
     }
diff --git a/locale/programs/charmap.h b/locale/programs/charmap.h
index a3f31d6333..fd711f2d11 100644
--- a/locale/programs/charmap.h
+++ b/locale/programs/charmap.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-1999, 2001, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-1999,2001,2003,2005,2006 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
 
@@ -69,7 +69,8 @@ extern bool enc_not_ascii_compatible;
 
 /* Prototypes for charmap handling functions.  */
 extern struct charmap_t *charmap_read (const char *filename, int verbose,
-				       int be_quiet, int use_default);
+				       int error_not_found, int be_quiet,
+				       int use_default);
 
 /* Return the value stored under the given key in the hashing table.  */
 extern struct charseq *charmap_find_value (const struct charmap_t *charmap,
diff --git a/locale/programs/localedef.c b/locale/programs/localedef.c
index f705f34a75..5df07e94c6 100644
--- a/locale/programs/localedef.c
+++ b/locale/programs/localedef.c
@@ -243,7 +243,7 @@ main (int argc, char *argv[])
 FATAL: system does not define `_POSIX2_LOCALEDEF'")));
 
   /* Process charmap file.  */
-  charmap = charmap_read (charmap_file, verbose, be_quiet, 1);
+  charmap = charmap_read (charmap_file, verbose, 1, be_quiet, 1);
 
   /* Add the first entry in the locale list.  */
   memset (&global, '\0', sizeof (struct localedef_t));
diff --git a/localedata/ChangeLog b/localedata/ChangeLog
index 80adc04066..b7ec81b992 100644
--- a/localedata/ChangeLog
+++ b/localedata/ChangeLog
@@ -1,3 +1,13 @@
+2006-08-19  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #3034]
+	* locales/ml_IN (abmon): Fix June entry.
+	* locales/bn_IN: (abday): Fix Tuesday entry.
+	(day): Likewise.
+	(abmon): Fix January and February entries.
+	(mon): Likewise.
+	Patches by Mayank Jain <majain@redhat.com>.
+
 2006-08-13  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #935]
diff --git a/localedata/locales/bn_IN b/localedata/locales/bn_IN
index 0869782f68..1a792acd8a 100644
--- a/localedata/locales/bn_IN
+++ b/localedata/locales/bn_IN
@@ -1,6 +1,8 @@
 comment_char    %
 escape_char     /
 
+% Last Update by Runa Bhattacharjee <runab@redhat.com>
+
 LC_IDENTIFICATION
 % This is the ISO_IEC TR14652 Locale definition for the LC_IDENTIFICATION
 % category generated by IBM Basic CountryPack Transformer.
@@ -14,7 +16,7 @@ fax         ""
 language    "Bengali"
 territory   "India"
 revision    "1.0"
-date        "2000, October"
+date        "2006-05-29"
 %
 category  "bn_IN:2000";LC_IDENTIFICATION
 category  "bn_IN:2000";LC_CTYPE
@@ -87,21 +89,21 @@ LC_TIME
 %
 % Abbreviated weekday names (%a)
 abday       "<U09B0><U09AC><U09BF>";"<U09B8><U09CB><U09AE>";/
-            "<U09AE><U0999><U0997><U09B2>";"<U09AC><U09C1><U09A7>";/
+            "<U09AE><U0999><U09CD><U0997><U09B2>";"<U09AC><U09C1><U09A7>";/
             "<U09AC><U09C3><U09B9><U09B8><U09CD><U09AA><U09A4><U09BF>";"<U09B6><U09C1><U0995><U09CD><U09B0>";/
             "<U09B6><U09A8><U09BF>"
 
 %
 % Full weekday names (%A)
 day         "<U09B0><U09AC><U09BF><U09AC><U09BE><U09B0>";"<U09B8><U09CB><U09AE><U09AC><U09BE><U09B0>";/
-            "<U09AE><U0999><U0997><U09B2><U09AC><U09BE><U09B0>";"<U09AC><U09C1><U09A7><U09AC><U09BE><U09B0>";/
+            "<U09AE><U0999><U09CD><U0997><U09B2><U09AC><U09BE><U09B0>";"<U09AC><U09C1><U09A7><U09AC><U09BE><U09B0>";/
             "<U09AC><U09C3><U09B9><U09B8><U09CD><U09AA><U09A4><U09BF><U09AC><U09BE><U09B0>";/
             "<U09B6><U09C1><U0995><U09CD><U09B0><U09AC><U09BE><U09B0>";"<U09B6><U09A8><U09BF><U09AC><U09BE><U09B0>"
 
 %
 % Abbreviated month names (%b)
-abmon       "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09C0>";/
-            "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09C0>";/
+abmon       "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09BF>";/
+            "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09BF>";/
             "<U09AE><U09BE><U09B0><U09CD><U099A>";"<U098F><U09AA><U09CD><U09B0><U09BF><U09B2>";/
             "<U09AE><U09C7>";"<U099C><U09C1><U09A8>";/
             "<U099C><U09C1><U09B2><U09BE><U0987>";"<U0986><U0997><U09B8><U09CD><U099F>";/
@@ -112,8 +114,8 @@ abmon       "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09C0>";/
 
 %
 % Full month names (%B)
-mon         "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09C0>";/
-            "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09C0>";/
+mon         "<U099C><U09BE><U09A8><U09C1><U09DF><U09BE><U09B0><U09BF>";/
+            "<U09AB><U09C7><U09AC><U09CD><U09B0><U09C1><U09DF><U09BE><U09B0><U09BF>";/
             "<U09AE><U09BE><U09B0><U09CD><U099A>";"<U098F><U09AA><U09CD><U09B0><U09BF><U09B2>";/
             "<U09AE><U09C7>";"<U099C><U09C1><U09A8>";/
             "<U099C><U09C1><U09B2><U09BE><U0987>";"<U0986><U0997><U09B8><U09CD><U099F>";/
@@ -151,6 +153,7 @@ copy "bn_BD"
 END LC_MESSAGES
 
 
+% Default paper: A4
 LC_PAPER
 copy "hi_IN"
 END LC_PAPER
diff --git a/localedata/locales/ml_IN b/localedata/locales/ml_IN
index 8c49f10ec4..1f57845813 100644
--- a/localedata/locales/ml_IN
+++ b/localedata/locales/ml_IN
@@ -90,10 +90,10 @@ abday     "<U0D1E><U0D3E>";"<U0D24><U0D3F>";/
 "<U0D36>"
 %
 % Full weekday names (%A)
-day     "<U0D1E><U0D3E><U0D2F><U0D31><U0D41><U0D4D>";/
-"<U0D24><U0D3F><U0D19><U0D4D><U0D15><U0D33><U0D41><U0D4D>";/
+day     "<U0D1E><U0D3E><U0D2F><U0D30><U0D4D><U200D>";/
+"<U0D24><U0D3F><U0D19><U0D4D><U0D15><U0D33><U0D4D><U200D>";/
 "<U0D1A><U0D4A><U0D35><U0D4D><U0D35>";/
-"<U0D2C><U0D41><U0D27><U0D28><U0D41><U0D4D>";/
+"<U0D2C><U0D41><U0D27><U0D28><U0D4D><U200D>";/
 "<U0D35><U0D4D><U0D2F><U0D3E><U0D34><U0D02>";/
 "<U0D35><U0D46><U0D33><U0D4D><U0D33><U0D3F>";/
 "<U0D36><U0D28><U0D3F>"
@@ -101,30 +101,30 @@ day     "<U0D1E><U0D3E><U0D2F><U0D31><U0D41><U0D4D>";/
 % Abbreviated month names (%b)
 abmon     "<U0D1C><U0D28><U0D41>";/
 "<U0D2B><U0D46><U0D2C><U0D4D>";/
-"<U0D2E><U0D3E><U0D31><U0D4D>";/
-"<U0D0F><U0D2A><U0D4D><U0D31><U0D3F><U0D32><U0D4D>";/
-"<U0D46><U0D2E><U0D2F><U0D4D>";/
-"<U0D1C><U0D42><U0D23><U0D4D>";/
-"<U0D1C><U0D42><U0D48><U0D32>";/
-"<U0D06><U0D17>";/
-"<U0D46><U0D38><U0D2A><U0D4D><U0D24><U0D02>";/
-"<U0D12><U0D15><U0D4D><U0D48><U0D1F>";/
+"<U0D2E><U0D3E><U0D30><U0D4D><U200D>";/
+"<U0D0F><U0D2A><U0D4D><U0D30>";/
+"<U0D2E><U0D46>";/
+"<U0D1C><U0D42><U0D23><U0D4D><U200D>";/
+"<U0D1C><U0D42><U0D32><U0D48>";/
+"<U0D06><U0D17><U0D4D>";/
+"<U0D38><U0D46><U0D2A><U0D4D>";/
+"<U0D12><U0D15><U0D4D><U0D1F><U0D4B>";/
 "<U0D28><U0D35><U0D02>";/
 "<U0D21><U0D3F><U0D38><U0D02>"
 %
 % FULL month names (%B)
 mon     "<U0D1C><U0D28><U0D41><U0D35><U0D30><U0D3F>";/
 "<U0D2B><U0D46><U0D2C><U0D4D><U0D30><U0D41><U0D35><U0D30><U0D3F>";/
-"<U0D2E><U0D3E><U0D31><U0D41><U0D4D><U0D1A><U0D4D><U0D1A><U0D4D>";/
-"<U0D0F><U0D2A><U0D4D><U0D31><U0D3F><U0D32><U0D41><U0D4D>";/
+"<U0D2E><U0D3E><U0D30><U0D4D><U200D><U0D1A><U0D4D><U0D1A><U0D4D>";/
+"<U0D0F><U0D2A><U0D4D><U0D30><U0D3F><U0D32><U0D4D><U200D><U0020>";/
 "<U0D2E><U0D46><U0D2F><U0D4D>";/
-"<U0D1C><U0D42><U0D23><U0D41><U0D4D>";/
+"<U0D1C><U0D42><U0D23><U0D4D><U200D>";/
 "<U0D1C><U0D42><U0D32><U0D48>";/
-"<U0D06><U0D17><U0D38><U0D4D><U0D24><U0D4D>";/
-"<U0D38><U0D46><U0D2A><U0D4D><U0D24><U0D02><U0D2C><U0D31><U0D41><U0D4D>";/
-"<U0D12><U0D15><U0D4D><U0D1F><U0D4B><U0D2C><U0D31><U0D41><U0D4D>";/
-"<U0D28><U0D35><U0D02><U0D2C><U0D31><U0D41><U0D4D>";/
-"<U0D21><U0D3F><U0D38><U0D02><U0D2C><U0D31><U0D41><U0D4D>"
+"<U0D06><U0D17><U0D38><U0D4D><U0D31><U0D4D><U0D31><U0D4D>";/
+"<U0D38><U0D46><U0D2A><U0D4D><U0D31><U0D4D><U0D31><U0D02><U0D2C><U0D30><U0D4D><U200D>";/
+"<U0D12><U0D15><U0D4D><U0D1F><U0D4B><U0D2C><U0D30><U0D4D><U200D>";/
+"<U0D28><U0D35><U0D02><U0D2C><U0D30><U0D4D><U200D>";/
+"<U0D21><U0D3F><U0D38><U0D02><U0D2C><U0D30><U0D4D><U200D>"
 %
 %
 % Equivalent of AM PM
diff --git a/malloc/arena.c b/malloc/arena.c
index 6f0a9df8f1..6f4b0c497b 100644
--- a/malloc/arena.c
+++ b/malloc/arena.c
@@ -24,7 +24,11 @@
 
 #define HEAP_MIN_SIZE (32*1024)
 #ifndef HEAP_MAX_SIZE
-#define HEAP_MAX_SIZE (1024*1024) /* must be a power of two */
+# ifdef DEFAULT_MMAP_THRESHOLD_MAX
+#  define HEAP_MAX_SIZE (2 * DEFAULT_MMAP_THRESHOLD_MAX)
+# else
+#  define HEAP_MAX_SIZE (1024*1024) /* must be a power of two */
+# endif
 #endif
 
 /* HEAP_MIN_SIZE and HEAP_MAX_SIZE limit the size of mmap()ed heaps
diff --git a/malloc/malloc.c b/malloc/malloc.c
index 890d3669e2..02f659708d 100644
--- a/malloc/malloc.c
+++ b/malloc/malloc.c
@@ -259,6 +259,7 @@
 
 #ifdef _LIBC
 #include <stdio-common/_itoa.h>
+#include <bits/wordsize.h>
 #endif
 
 #ifdef __cplusplus
@@ -1424,7 +1425,15 @@ int      __posix_memalign(void **, size_t, size_t);
 #endif
 
 #ifndef DEFAULT_MMAP_THRESHOLD_MAX
-#define DEFAULT_MMAP_THRESHOLD_MAX (8 * 1024 * 1024 * sizeof(long))
+  /* For 32-bit platforms we cannot increase the maximum mmap
+     threshold much because it is also the minimum value for the
+     maximum heap size and its alignment.  Going above 512k (i.e., 1M
+     for new heaps) wastes too much address space.  */
+# if __WORDSIZE == 32
+#  define DEFAULT_MMAP_THRESHOLD_MAX (512 * 1024)
+# else
+#  define DEFAULT_MMAP_THRESHOLD_MAX (4 * 1024 * 1024 * sizeof(long))
+# endif
 #endif
 
 /*
@@ -2867,6 +2876,7 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
 
     char* mm;             /* return value from mmap call*/
 
+  try_mmap:
     /*
       Round up size to nearest page.  For mmapped chunks, the overhead
       is one SIZE_SZ unit larger than for normal chunks, because there
@@ -2996,6 +3006,9 @@ static Void_t* sYSMALLOc(nb, av) INTERNAL_SIZE_T nb; mstate av;
 	set_foot(old_top, (old_size + 2*SIZE_SZ));
       }
     }
+    else
+      /* We can at least try to use to mmap memory.  */
+      goto try_mmap;
 
   } else { /* av == main_arena */
 
@@ -4055,6 +4068,8 @@ _int_malloc(mstate av, size_t bytes)
 
   for(;;) {
 
+    int iters = 0;
+    bool any_larger = false;
     while ( (victim = unsorted_chunks(av)->bk) != unsorted_chunks(av)) {
       bck = victim->bk;
       if (__builtin_expect (victim->size <= 2 * SIZE_SZ, 0)
@@ -4150,6 +4165,12 @@ _int_malloc(mstate av, size_t bytes)
       victim->fd = fwd;
       fwd->bk = victim;
       bck->fd = victim;
+
+      if (size >= nb)
+	any_larger = true;
+#define MAX_ITERS	10000
+      if (++iters >= MAX_ITERS)
+	break;
     }
 
     /*
diff --git a/misc/error.c b/misc/error.c
index aca435d995..85d1cffbf9 100644
--- a/misc/error.c
+++ b/misc/error.c
@@ -23,35 +23,19 @@
 # include <config.h>
 #endif
 
+#include <stdarg.h>
 #include <stdio.h>
-#include <libintl.h>
+#include <stdlib.h>
+#include <string.h>
+
 #ifdef _LIBC
+# include <libintl.h>
 # include <stdbool.h>
 # include <stdint.h>
 # include <wchar.h>
 # define mbsrtowcs __mbsrtowcs
 #endif
 
-#if HAVE_VPRINTF || HAVE_DOPRNT || _LIBC
-# if __STDC__
-#  include <stdarg.h>
-#  define VA_START(args, lastarg) va_start(args, lastarg)
-# else
-#  include <varargs.h>
-#  define VA_START(args, lastarg) va_start(args)
-# endif
-#else
-# define va_alist a1, a2, a3, a4, a5, a6, a7, a8
-# define va_dcl char *a1, *a2, *a3, *a4, *a5, *a6, *a7, *a8;
-#endif
-
-#if STDC_HEADERS || _LIBC
-# include <stdlib.h>
-# include <string.h>
-#else
-void exit ();
-#endif
-
 #include "error.h"
 
 #ifndef _
@@ -61,11 +45,7 @@ void exit ();
 /* If NULL, error will flush stdout, then print on stderr the program
    name, a colon and a space.  Otherwise, error will call this
    function without parameters instead.  */
-void (*error_print_progname) (
-#if __STDC__ - 0
-			      void
-#endif
-			      );
+void (*error_print_progname) (void);
 
 /* This variable is incremented each time `error' is called.  */
 unsigned int error_message_count;
@@ -111,27 +91,6 @@ extern char *program_name;
 
 # if HAVE_STRERROR_R || defined strerror_r
 #  define __strerror_r strerror_r
-# else
-#  if HAVE_STRERROR
-#   ifndef HAVE_DECL_STRERROR
-"this configure-time declaration test was not run"
-#   endif
-#   if !HAVE_DECL_STRERROR
-char *strerror ();
-#   endif
-#  else
-static char *
-private_strerror (int errnum)
-{
-  extern char *sys_errlist[];
-  extern int sys_nerr;
-
-  if (errnum > 0 && errnum <= sys_nerr)
-    return _(sys_errlist[errnum]);
-  return _("Unknown system error");
-}
-#   define strerror private_strerror
-#  endif /* HAVE_STRERROR */
 # endif	/* HAVE_STRERROR_R || defined strerror_r */
 #endif	/* not _LIBC */
 
@@ -166,15 +125,13 @@ print_errno_message (int errnum)
 #endif
 }
 
-#ifdef VA_START
 static void
 error_tail (int status, int errnum, const char *message, va_list args)
 {
-# if HAVE_VPRINTF || _LIBC
-#  if _LIBC
+#if _LIBC
   if (_IO_fwide (stderr, 0) > 0)
     {
-#   define ALLOCA_LIMIT	2000
+# define ALLOCA_LIMIT 2000
       size_t len = strlen (message) + 1;
       wchar_t *wmessage = NULL;
       mbstate_t st;
@@ -237,47 +194,32 @@ error_tail (int status, int errnum, const char *message, va_list args)
 	free (wmessage);
     }
   else
-#  endif
+#endif
     vfprintf (stderr, message, args);
-# else
-  _doprnt (message, args, stderr);
-# endif
   va_end (args);
 
   ++error_message_count;
   if (errnum)
     print_errno_message (errnum);
-# if _LIBC
+#if _LIBC
   __fxprintf (NULL, "\n");
-# else
+#else
   putc ('\n', stderr);
-# endif
+#endif
   fflush (stderr);
   if (status)
     exit (status);
 }
-#endif
 
 
 /* Print the program name and error message MESSAGE, which is a printf-style
    format string with optional args.
    If ERRNUM is nonzero, print its corresponding system error message.
    Exit with status STATUS if it is nonzero.  */
-/* VARARGS */
 void
-#if defined VA_START && __STDC__
 error (int status, int errnum, const char *message, ...)
-#else
-error (status, errnum, message, va_alist)
-     int status;
-     int errnum;
-     char *message;
-     va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
 #if defined _LIBC && defined __libc_ptf_call
   /* We do not want this call to be cut short by a thread
@@ -302,20 +244,8 @@ error (status, errnum, message, va_alist)
 #endif
     }
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   error_tail (status, errnum, message, args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-
-  ++error_message_count;
-  if (errnum)
-    print_errno_message (errnum);
-  putc ('\n', stderr);
-  fflush (stderr);
-  if (status)
-    exit (status);
-#endif
 
 #ifdef _LIBC
   _IO_funlockfile (stderr);
@@ -330,22 +260,10 @@ error (status, errnum, message, va_alist)
 int error_one_per_line;
 
 void
-#if defined VA_START && __STDC__
 error_at_line (int status, int errnum, const char *file_name,
 	       unsigned int line_number, const char *message, ...)
-#else
-error_at_line (status, errnum, file_name, line_number, message, va_alist)
-     int status;
-     int errnum;
-     const char *file_name;
-     unsigned int line_number;
-     char *message;
-     va_dcl
-#endif
 {
-#ifdef VA_START
   va_list args;
-#endif
 
   if (error_one_per_line)
     {
@@ -393,20 +311,8 @@ error_at_line (status, errnum, file_name, line_number, message, va_alist)
 	   file_name, line_number);
 #endif
 
-#ifdef VA_START
-  VA_START (args, message);
+  va_start (args, message);
   error_tail (status, errnum, message, args);
-#else
-  fprintf (stderr, message, a1, a2, a3, a4, a5, a6, a7, a8);
-
-  ++error_message_count;
-  if (errnum)
-    print_errno_message (errnum);
-  putc ('\n', stderr);
-  fflush (stderr);
-  if (status)
-    exit (status);
-#endif
 
 #ifdef _LIBC
   _IO_funlockfile (stderr);
diff --git a/misc/error.h b/misc/error.h
index 3638bc6e98..f25005b0e8 100644
--- a/misc/error.h
+++ b/misc/error.h
@@ -1,5 +1,5 @@
 /* Declaration for error-reporting function
-   Copyright (C) 1995, 1996, 1997, 2003 Free Software Foundation, Inc.
+   Copyright (C) 1995, 1996, 1997, 2003, 2006 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
@@ -37,8 +37,6 @@
 extern "C" {
 #endif
 
-#if defined __STDC__ && __STDC__
-
 /* Print a message with `fprintf (stderr, FORMAT, ...)';
    if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
    If STATUS is nonzero, terminate the program with `exit (STATUS)'.  */
@@ -55,12 +53,6 @@ extern void error_at_line (int __status, int __errnum, const char *__fname,
    function without parameters instead.  */
 extern void (*error_print_progname) (void);
 
-#else
-void error ();
-void error_at_line ();
-extern void (*error_print_progname) ();
-#endif
-
 /* This variable is incremented each time `error' is called.  */
 extern unsigned int error_message_count;
 
diff --git a/nis/nss_nis/nis-rpc.c b/nis/nss_nis/nis-rpc.c
index e7049ffa9f..2fdb16ddde 100644
--- a/nis/nss_nis/nis-rpc.c
+++ b/nis/nss_nis/nis-rpc.c
@@ -117,6 +117,10 @@ internal_nis_getrpcent_r (struct rpcent *rpc, char *buffer, size_t buflen,
   if (intern->start == NULL)
     internal_nis_setrpcent (intern);
 
+  if (intern->next == NULL)
+    /* Not one entry in the map.  */
+    return NSS_STATUS_NOTFOUND;
+
   /* Get the next entry until we found a correct one. */
   do
     {
diff --git a/nis/nss_nis/nis-service.c b/nis/nss_nis/nis-service.c
index c0e064d9a4..0c176095c8 100644
--- a/nis/nss_nis/nis-service.c
+++ b/nis/nss_nis/nis-service.c
@@ -188,6 +188,10 @@ internal_nis_getservent_r (struct servent *serv, char *buffer,
   if (intern.start == NULL)
     internal_nis_setservent ();
 
+  if (intern.next == NULL)
+    /* Not one entry in the map.  */
+    return NSS_STATUS_NOTFOUND;
+
   /* Get the next entry until we found a correct one.  */
   do
     {
diff --git a/nptl/ChangeLog b/nptl/ChangeLog
index ce0cb9af4f..2dee6abb00 100644
--- a/nptl/ChangeLog
+++ b/nptl/ChangeLog
@@ -1,3 +1,13 @@
+2006-07-30  Joseph S. Myers  <joseph@codesourcery.com>
+
+	[BZ #3018]
+	* Makefile (extra-objs): Add modules to extra-test-objs instead.
+
+2006-08-20  Ulrich Drepper  <drepper@redhat.com>
+
+	* sysdeps/unix/sysv/linux/bits/posix_opt.h: Define
+	_XOPEN_REALTIME_THREADS.
+
 2006-08-15  Jakub Jelinek  <jakub@redhat.com>
 
 	* sysdeps/unix/sysv/linux/clock_settime.c (INTERNAL_VSYSCALL): Use
diff --git a/nptl/Makefile b/nptl/Makefile
index 47cc4b08db..74a834d64d 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -297,7 +297,7 @@ modules-names = tst-atfork2mod tst-tls3mod tst-tls4moda tst-tls4modb \
 		tst-tls5mod tst-tls5moda tst-tls5modb tst-tls5modc \
 		tst-tls5modd tst-tls5mode tst-tls5modf \
 		tst-_res1mod1 tst-_res1mod2 tst-execstack-mod tst-fini1mod
-extra-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o
+extra-test-objs += $(addsuffix .os,$(strip $(modules-names))) tst-cleanup4aux.o
 test-extras += $(modules-names)
 test-modules = $(addprefix $(objpfx),$(addsuffix .so,$(modules-names)))
 
diff --git a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
index 40160c54de..dd0798a073 100644
--- a/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
+++ b/nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
@@ -60,6 +60,9 @@
 /* X/Open realtime support is available.  */
 #define _XOPEN_REALTIME	1
 
+/* X/Open thread realtime support is available.  */
+#define _XOPEN_REALTIME_THREADS	1
+
 /* XPG4.2 shared memory is supported.  */
 #define	_XOPEN_SHM	1
 
diff --git a/stdlib/Makefile b/stdlib/Makefile
index c857eac744..e632d3523b 100644
--- a/stdlib/Makefile
+++ b/stdlib/Makefile
@@ -86,7 +86,7 @@ aux += fpioconst mp_clz_tab
 distribute := $(distribute) $(mpn-headers) fpioconst.h tst-putenvmod.c
 
 tests-extras += tst-putenvmod
-extra-objs += tst-putenvmod.os
+extra-test-objs += tst-putenvmod.os
 
 generated += isomac isomac.out tst-putenvmod.so
 
diff --git a/string/strchr.c b/string/strchr.c
index c8b7969e85..5afd364533 100644
--- a/string/strchr.c
+++ b/string/strchr.c
@@ -1,4 +1,5 @@
-/* Copyright (C) 1991,93,94,95,96,97,99,2000,03 Free Software Foundation, Inc.
+/* Copyright (C) 1991,1993-1997,1999,2000,2003,2006
+   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
@@ -42,8 +43,8 @@ strchr (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)
       return (void *) char_ptr;
diff --git a/sysdeps/unix/sysv/linux/openat.c b/sysdeps/unix/sysv/linux/openat.c
index 7dfe367425..df53b6cf2c 100644
--- a/sysdeps/unix/sysv/linux/openat.c
+++ b/sysdeps/unix/sysv/linux/openat.c
@@ -28,9 +28,10 @@
 #include <not-cancel.h>
 
 
-#if !defined OPENAT && !defined __ASSUME_ATFCTS
+#ifndef OPENAT
 # define OPENAT openat
 
+# ifndef __ASSUME_ATFCTS
 /* Set errno after a failed call.  If BUF is not null,
    it is a /proc/self/fd/ path name we just tried to use.  */
 void
@@ -61,6 +62,7 @@ __atfct_seterrno (int errval, int fd, const char *buf)
 }
 
 int __have_atfcts;
+# endif
 #endif