]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Updated to fedora-glibc-20060822T0706 cvs/fedora-glibc-2_4_90-23
authorJakub Jelinek <jakub@redhat.com>
Tue, 22 Aug 2006 09:05:41 +0000 (09:05 +0000)
committerJakub Jelinek <jakub@redhat.com>
Tue, 22 Aug 2006 09:05:41 +0000 (09:05 +0000)
25 files changed:
ChangeLog
Makerules
dlfcn/Makefile
elf/Makefile
fedora/branch.mk
fedora/glibc.spec.in
iconv/iconv_prog.c
locale/programs/charmap.c
locale/programs/charmap.h
locale/programs/localedef.c
localedata/ChangeLog
localedata/locales/bn_IN
localedata/locales/ml_IN
malloc/arena.c
malloc/malloc.c
misc/error.c
misc/error.h
nis/nss_nis/nis-rpc.c
nis/nss_nis/nis-service.c
nptl/ChangeLog
nptl/Makefile
nptl/sysdeps/unix/sysv/linux/bits/posix_opt.h
stdlib/Makefile
string/strchr.c
sysdeps/unix/sysv/linux/openat.c

index e54bd15b9363d2040b90180f1e465c163ecec2f3..2adc7bb44f9f1e5afd4fc44767971d55d3213c01 100644 (file)
--- 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
index 98a06400b5e33b4907e68b019a589e8a358bbc8a..f50f7a4884954f86ccbbc4eaf84474f07ac878d8 100644 (file)
--- a/Makerules
+++ b/Makerules
@@ -688,6 +688,7 @@ endif
 \f
 +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
index 649f61de63437f2dac84946e2051a922ecade9f5..ffdb70ea6833b138c8e398f6ac27334c1ea69aa6 100644 (file)
@@ -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
index 3b4ef26d450df08e5c233b080b69f09281235ef4..402fc18636671ddf5b215c75e3c8c432446ee3d0 100644 (file)
@@ -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)
 
index 1c17d897078232f7aeed0b6a3a10e105f9e5f27b..86bc40a3e5ea4b8b80ca432a417a140df337f340 100644 (file)
@@ -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
index 3fb4576c5a7014fe8bec37187be639df921fea29..251854997b5a712f417536a9a81ca1e3f44fb1ef 100644 (file)
@@ -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
index 033cd93f23bfe932658e332f1e61d259e73f6ebc..fabdd001e3771b2b8bd22c04987602782c3dc656 100644 (file)
@@ -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.  */
index e56b0be81cdfce66f40c2d2ffc7f043a72304d63..52a69de4b04a593c9195b3eb1703f4bb47912776 100644 (file)
@@ -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));
     }
index a3f31d63330956874f8de2d6e1908e5c5f9a6d52..fd711f2d117101bb999fe45405c88de6aa742ba9 100644 (file)
@@ -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,
index f705f34a75e28c2b5767566d1ced4a4a4c3804a7..5df07e94c690445a6338f6f54f509ff6ea988989 100644 (file)
@@ -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));
index 80adc0406695ee71fd0347e4c9f8bfc524641e74..b7ec81b992246f2e53643af065002e456d852b92 100644 (file)
@@ -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]
index 0869782f681622433a771bd7536249521be63699..1a792acd8a31f50434bab0caa83ec2e20d32fe50 100644 (file)
@@ -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
index 8c49f10ec428cc934128e403fea7d39aa14642d3..1f57845813e8f798df46b44211e62bfb8793bc0d 100644 (file)
@@ -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
index 6f0a9df8f1c654ccd4d5932480f0f79b821ebb5b..6f4b0c497b4fad01dd90c0d24282d71879325b44 100644 (file)
 
 #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
index 890d3669e2bc9ea0bdf56484f4199d205025696a..02f659708d6ec038f0c4ccaa096b9400f000ca0c 100644 (file)
 
 #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;
     }
 
     /*
index aca435d99590a257f9cc01309afef78a32e7cdd5..85d1cffbf931536978a0076d275d1a160b695ab9 100644 (file)
 # 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);
index 3638bc6e9845fdb62a20d853e3577eb007f20834..f25005b0e8e583526b26c7fb5da8d2f610f812de 100644 (file)
@@ -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;
 
index e7049ffa9f78baa6ab5154446500e2eeac503f19..2fdb16dddef66d67753a698ab002d096cf9dc79e 100644 (file)
@@ -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
     {
index c0e064d9a4eb0f1124a95fe9fe40ff2681d379b6..0c176095c8b6e2040a2e2073fa29b52225aac612 100644 (file)
@@ -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
     {
index ce0cb9af4f7402eb19ad79a304f35edb59664064..2dee6abb006112d3d82fd909de6a3dd93c0c7017 100644 (file)
@@ -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
index 47cc4b08db282f5dbe6c49db73835866e6855664..74a834d64d774d195ebd9f01f53158a3cf30681f 100644 (file)
@@ -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)))
 
index 40160c54de3fa28d0a9233e8ffea3b62f7e1624a..dd0798a0737fc9c8044f36ee959bce31edec5cee 100644 (file)
@@ -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
 
index c857eac744c6ba7593c3032f1fc09c10a111ba25..e632d3523b47bf553ce0f9e592a1080cb187d26e 100644 (file)
@@ -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
 
index c8b7969e85f184e392bde41e488bb322d54f367e..5afd364533bb222621d9f0e613665e63a790e8fa 100644 (file)
@@ -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;
index 7dfe3674256e6b52cef3e28bcadb6cca8d6f5f10..df53b6cf2c1ba728c077b95cbda144722a0eafa5 100644 (file)
 #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