This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


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

GNU C Library master sources branch, release/2.11/master, updated. glibc-2.11-21-gb12103e


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, release/2.11/master has been updated
       via  b12103e146512f80531ccced34ec8f106d3cec66 (commit)
       via  c35a44f325843a4b6fb3bc53526bcc1f741c8254 (commit)
       via  1960ded78b85a1661d847c4b071c62915635a761 (commit)
       via  b39591e9c1c156a080563d60450d5fdb7971457c (commit)
       via  c086031db01cc10bafe55864b1185c111a30198e (commit)
       via  22bdb3aa5b2cd760fd3bf1ee6c46c61e23457876 (commit)
       via  c0ca09284eedec057b9036eb319be7e30442df04 (commit)
       via  c78e33c312e16a4faccf07278d45538f0252058f (commit)
       via  3e224a852a7109e2efa1f07f15962235d12b7e63 (commit)
      from  dc2d2c7e915b0add3755d41bcd0739ed0e69c5d3 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b12103e146512f80531ccced34ec8f106d3cec66

commit b12103e146512f80531ccced34ec8f106d3cec66
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Tue Nov 17 16:24:26 2009 -0800

    Whitespace fixes.
    
    (cherry picked from commit 3933378fd3cbe49c1e0ca42844f959eb12f05f60)

diff --git a/posix/bug-regex30.c b/posix/bug-regex30.c
index ef2bd76..43df64d 100644
--- a/posix/bug-regex30.c
+++ b/posix/bug-regex30.c
@@ -34,7 +34,7 @@ struct
   regmatch_t rm[5];
 } tests[] = {
   /* U+0413	\xd0\x93	CYRILLIC CAPITAL LETTER GHE
-     U+0420	\xd0\xa0        CYRILLIC CAPITAL LETTER ER 
+     U+0420	\xd0\xa0        CYRILLIC CAPITAL LETTER ER
      U+0430	\xd0\xb0	CYRILLIC SMALL LETTER A
      U+0433	\xd0\xb3	CYRILLIC SMALL LETTER GHE
      U+0440	\xd1\x80	CYRILLIC SMALL LETTER ER
@@ -83,7 +83,7 @@ do_test (void)
 
       for (n = 0; n < tests[i].nmatch; ++n)
 	if (rm[n].rm_so != tests[i].rm[n].rm_so
-              || rm[n].rm_eo != tests[i].rm[n].rm_eo)
+	      || rm[n].rm_eo != tests[i].rm[n].rm_eo)
 	  {
 	    if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
 	      break;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c35a44f325843a4b6fb3bc53526bcc1f741c8254

commit c35a44f325843a4b6fb3bc53526bcc1f741c8254
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Tue Nov 17 16:23:57 2009 -0800

    Add missing test files.
    
    (cherry picked from commit 3a00b16da491d5c869795251e1ad4f43b3ba1469)

diff --git a/locale/tst-duplocale.c b/locale/tst-duplocale.c
new file mode 100644
index 0000000..53e5fbb
--- /dev/null
+++ b/locale/tst-duplocale.c
@@ -0,0 +1,14 @@
+#include <locale.h>
+#include <stdio.h>
+
+static int
+do_test (void)
+{
+  locale_t d = duplocale (LC_GLOBAL_LOCALE);
+  if (d != (locale_t) 0)
+    freelocale (d);
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/locale/tst-locname.c b/locale/tst-locname.c
new file mode 100644
index 0000000..7eb71ad
--- /dev/null
+++ b/locale/tst-locname.c
@@ -0,0 +1,20 @@
+#include <langinfo.h>
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+static int
+do_test (void)
+{
+  const char *s = nl_langinfo (_NL_LOCALE_NAME (LC_CTYPE));
+  if (s == NULL || strcmp (s, "C") != 0)
+    {
+      printf ("incorrect locale name returned: %s, expected \"C\"\n", s);
+      return 1;
+    }
+
+  return 0;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=1960ded78b85a1661d847c4b071c62915635a761

commit 1960ded78b85a1661d847c4b071c62915635a761
Author: Paolo Bonzini <bonzini@gnu.org>
Date:   Tue Nov 17 16:23:24 2009 -0800

    Fix ranges with multibyte characters as endpoints.
    
    This is another bug in computing the fastmap.  It was reported by a user
    of sed because it usually does not happen with !_LIBC.  However, it is
    there in that case too.
    
    The bug is that whenever we have a range at the beginning of the regex,
    the regex must be tested on any possible multibyte character.  The reason
    why _LIBC masks it, is that in general there is a collation symbol for
    each possible multibyte-character lead byte, so all the lead bytes are
    in general already part of the fastmap.
    
    The tests use cyrillic characters as an example.  With _LIBC, they pass
    without the patch too, but you can make them fail by removing collation
    symbols handling.
    
    (cherry picked from commit 815d8147a3418334ffa91e2384c6e159f0809d65)

diff --git a/ChangeLog b/ChangeLog
index d5194f8..bbc9eb0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-11-17  Paolo Bonzini  <bonzini@gnu.org>
+
+	* posix/bug-regex30.c: New file.
+	* posix/Makefile: Add rules to build and run bug-regex30.
+	* posix/regcomp.c (re_compile_fastmap_iter): Add all multibyte
+	character lead bytes when there is a range in a COMPLEX_BRACKET.
+	Reported by Oleg Bylatov.
+
 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
 
 	[BZ #10969]
diff --git a/posix/Makefile b/posix/Makefile
index c9ce18b..2a467a8 100644
--- a/posix/Makefile
+++ b/posix/Makefile
@@ -82,7 +82,7 @@ tests		:= tstgetopt testfnm runtests runptests	     \
 		   bug-regex17 bug-regex18 bug-regex19 bug-regex20 \
 		   bug-regex21 bug-regex22 bug-regex23 bug-regex24 \
 		   bug-regex25 bug-regex26 bug-regex27 bug-regex28 \
-		   bug-regex29 \
+		   bug-regex29 bug-regex30 \
 		   tst-nice tst-nanosleep tst-regex2 \
 		   transbug tst-rxspencer tst-pcre tst-boost \
 		   bug-ga1 tst-vfork1 tst-vfork2 tst-vfork3 tst-waitid \
@@ -195,6 +195,7 @@ bug-regex22-ENV = LOCPATH=$(common-objpfx)localedata
 bug-regex23-ENV = LOCPATH=$(common-objpfx)localedata
 bug-regex25-ENV = LOCPATH=$(common-objpfx)localedata
 bug-regex26-ENV = LOCPATH=$(common-objpfx)localedata
+bug-regex30-ENV = LOCPATH=$(common-objpfx)localedata
 tst-rxspencer-ARGS = --utf8 rxspencer/tests
 tst-rxspencer-ENV = LOCPATH=$(common-objpfx)localedata
 tst-pcre-ARGS = PCRE.tests
diff --git a/posix/bug-regex30.c b/posix/bug-regex30.c
new file mode 100644
index 0000000..ef2bd76
--- /dev/null
+++ b/posix/bug-regex30.c
@@ -0,0 +1,103 @@
+/* Russian regular expression tests.
+   Copyright (C) 2009 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+   Contributed by Paolo Bonzini <pbonzini@redhat.com>, 2009.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, write to the Free
+   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+   02111-1307 USA.  */
+
+#include <sys/types.h>
+#include <mcheck.h>
+#include <regex.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <locale.h>
+
+/* Tests supposed to match.  */
+struct
+{
+  const char *pattern;
+  const char *string;
+  int flags, nmatch;
+  regmatch_t rm[5];
+} tests[] = {
+  /* U+0413	\xd0\x93	CYRILLIC CAPITAL LETTER GHE
+     U+0420	\xd0\xa0        CYRILLIC CAPITAL LETTER ER 
+     U+0430	\xd0\xb0	CYRILLIC SMALL LETTER A
+     U+0433	\xd0\xb3	CYRILLIC SMALL LETTER GHE
+     U+0440	\xd1\x80	CYRILLIC SMALL LETTER ER
+     U+044F	\xd1\x8f	CYRILLIC SMALL LETTER YA */
+  { "[\xd0\xb0-\xd1\x8f]", "\xd0\xb3", 0, 1,
+    { { 0, 2 } } },
+  { "[\xd0\xb0-\xd1\x8f]", "\xd0\x93", REG_ICASE, 1,
+    { { 0, 2 } } },
+  { "[\xd1\x80-\xd1\x8f]", "\xd0\xa0", REG_ICASE, 1,
+    { { 0, 2 } } },
+};
+
+
+static int
+do_test (void)
+{
+  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+    {
+      puts ("setlocale failed");
+      return 1;
+    }
+
+  int ret = 0;
+
+  for (size_t i = 0; i < sizeof (tests) / sizeof (tests[0]); ++i)
+    {
+      regex_t re;
+      regmatch_t rm[5];
+      int n = regcomp (&re, tests[i].pattern, tests[i].flags);
+      if (n != 0)
+	{
+	  char buf[500];
+	  regerror (n, &re, buf, sizeof (buf));
+	  printf ("regcomp %zd failed: %s\n", i, buf);
+	  ret = 1;
+	  continue;
+	}
+
+      if (regexec (&re, tests[i].string, tests[i].nmatch, rm, 0))
+	{
+	  printf ("regexec %zd failed\n", i);
+	  ret = 1;
+	  regfree (&re);
+	  continue;
+	}
+
+      for (n = 0; n < tests[i].nmatch; ++n)
+	if (rm[n].rm_so != tests[i].rm[n].rm_so
+              || rm[n].rm_eo != tests[i].rm[n].rm_eo)
+	  {
+	    if (tests[i].rm[n].rm_so == -1 && tests[i].rm[n].rm_eo == -1)
+	      break;
+	    printf ("regexec match failure rm[%d] %d..%d\n",
+		    n, rm[n].rm_so, rm[n].rm_eo);
+	    ret = 1;
+	    break;
+	  }
+
+      regfree (&re);
+    }
+
+  return ret;
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/posix/regcomp.c b/posix/regcomp.c
index 446fed5..6966b5d 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -377,7 +377,7 @@ re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
 	     applies to multibyte character sets; for single byte character
 	     sets, the SIMPLE_BRACKET again suffices.  */
 	  if (dfa->mb_cur_max > 1
-	      && (cset->nchar_classes || cset->non_match
+	      && (cset->nchar_classes || cset->non_match || cset->nranges
 # ifdef _LIBC
 		  || cset->nequiv_classes
 # endif /* _LIBC */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=b39591e9c1c156a080563d60450d5fdb7971457c

commit b39591e9c1c156a080563d60450d5fdb7971457c
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Tue Nov 17 09:37:31 2009 -0800

    Handle LC_GLOBAL_LOCALE in duplocale.
    
    (cherry picked from commit 7443244740724babd575943ee33c45da326afbe7)

diff --git a/ChangeLog b/ChangeLog
index ccf4670..d5194f8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
 
+	[BZ #10969]
+	* locale/duplocale.c (__duplocale): Handle LC_GLOBAL_LOCALE special.
+	* locale/tst-duplocale.c: New file.
+	* locale/Makefile (tests): Add tst-duplocale.
+
 	[BZ #10968]
 	* locale/langinfo.h (_NL_LOCALE_NAME): Correct definition.
 	Patch by Bruno Haible <bruno@clisp.org>.
diff --git a/locale/Makefile b/locale/Makefile
index 2d645da..2dbd8dc 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -38,7 +38,7 @@ distribute	= localeinfo.h categories.def iso-639.def iso-3166.def \
 routines	= setlocale findlocale loadlocale loadarchive \
 		  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
 		  newlocale duplocale freelocale uselocale
-tests		= tst-C-locale tst-locname
+tests		= tst-C-locale tst-locname tst-duplocale
 categories	= ctype messages monetary numeric time paper name \
 		  address telephone measurement identification collate
 aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
diff --git a/locale/duplocale.c b/locale/duplocale.c
index 6178259..63513c5 100644
--- a/locale/duplocale.c
+++ b/locale/duplocale.c
@@ -1,5 +1,5 @@
 /* Duplicate handle for selection of locales.
-   Copyright (C) 1997,2000,2001,2002,2005,2008 Free Software Foundation, Inc.
+   Copyright (C) 1997,2000-2002,2005,2008,2009 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
 
@@ -37,6 +37,10 @@ __duplocale (__locale_t dataset)
   if (dataset == _nl_C_locobj_ptr)
     return dataset;
 
+  /* Handle a special value.  */
+  if (dataset == LC_GLOBAL_LOCALE)
+    dataset = &_nl_global_locale;
+
   __locale_t result;
   int cnt;
   size_t names_len = 0;

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c086031db01cc10bafe55864b1185c111a30198e

commit c086031db01cc10bafe55864b1185c111a30198e
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Tue Nov 17 09:18:11 2009 -0800

    Fix _NC_LOCALE_NAME definition.
    
    (cherry picked from commit 4fb9241e4edbe238de8ba251f4448e31e8b1baf4)

diff --git a/ChangeLog b/ChangeLog
index e73ee6a..ccf4670 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2009-11-17  Ulrich Drepper  <drepper@redhat.com>
 
+	[BZ #10968]
+	* locale/langinfo.h (_NL_LOCALE_NAME): Correct definition.
+	Patch by Bruno Haible <bruno@clisp.org>.
+	* locale/tst-locname.c: New file.
+	* locale/Makefile (tests): Add tst-locname.
+
 	[BZ #10972]
 	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Add new MADV_*
 	constants from recent kernels.
diff --git a/locale/Makefile b/locale/Makefile
index d9ab194..2d645da 100644
--- a/locale/Makefile
+++ b/locale/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1991,1992,1995-2003,2005 Free Software Foundation, Inc.
+# Copyright (C) 1991,1992,1995-2003,2005,2009 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
@@ -38,7 +38,7 @@ distribute	= localeinfo.h categories.def iso-639.def iso-3166.def \
 routines	= setlocale findlocale loadlocale loadarchive \
 		  localeconv nl_langinfo nl_langinfo_l mb_cur_max \
 		  newlocale duplocale freelocale uselocale
-tests		= tst-C-locale
+tests		= tst-C-locale tst-locname
 categories	= ctype messages monetary numeric time paper name \
 		  address telephone measurement identification collate
 aux		= $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
@@ -104,7 +104,7 @@ CFLAGS-charmap-dir.c = -Wno-write-strings
 
 # This makes sure -DNOT_IN_libc is passed for all these modules.
 cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
-			        $(locale-modules) $(lib-modules))
+				$(locale-modules) $(lib-modules))
 lib := nonlib
 include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
 
diff --git a/locale/langinfo.h b/locale/langinfo.h
index c940c74..0a53365 100644
--- a/locale/langinfo.h
+++ b/locale/langinfo.h
@@ -568,7 +568,8 @@ enum
 
 /* This macro produces an item you can pass to `nl_langinfo' or
    `nl_langinfo_l' to get the name of the locale in use for CATEGORY.  */
-#define _NL_LOCALE_NAME(category)	_NL_ITEM ((category), -1)
+#define _NL_LOCALE_NAME(category)	_NL_ITEM ((category),		      \
+						  _NL_ITEM_INDEX (-1))
 #ifdef __USE_GNU
 # define NL_LOCALE_NAME(category)	_NL_LOCALE_NAME (category)
 #endif

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=22bdb3aa5b2cd760fd3bf1ee6c46c61e23457876

commit 22bdb3aa5b2cd760fd3bf1ee6c46c61e23457876
Author: Ulrich Drepper <drepper@redhat.com>
Date:   Tue Nov 17 06:43:39 2009 -0800

    Add missing Linux MADV_* definitions.
    
    (cherry picked from commit 2866eeb1b70c989591293d37ae292e71def16775)

diff --git a/ChangeLog b/ChangeLog
index 3a75f35..e73ee6a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,22 @@
+2009-11-17  Ulrich Drepper  <drepper@redhat.com>
+
+	[BZ #10972]
+	* sysdeps/unix/sysv/linux/powerpc/bits/mman.h: Add new MADV_*
+	constants from recent kernels.
+	* sysdeps/unix/sysv/linux/i386/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/s390/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/sparc/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/sh/bits/mman.h: Likewise.
+	* sysdeps/unix/sysv/linux/ia64/bits/mman.h: Likewise.
+
 2009-11-09  Mike Frysinger  <vapier@gentoo.org>
 
 	* sysdeps/unix/sysv/linux/i386/fallocate.c: Include errno.h.
 	(fallocate): Return ENOSYS if __NR_fallocate is not defined.
 	* sysdeps/unix/sysv/linux/i386/fallocate64.c: Likewise.
 
-2009-11-06  Mike Frsyinger  <vapier@gentoo.org>
+2009-11-06  Mike Frysinger  <vapier@gentoo.org>
 
 	* posix/bug-regex29.c: Include stdio.h.
 
diff --git a/sysdeps/unix/sysv/linux/i386/bits/mman.h b/sysdeps/unix/sysv/linux/i386/bits/mman.h
index 2b90c8d..22aa401 100644
--- a/sysdeps/unix/sysv/linux/i386/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/i386/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/i386 version.
-   Copyright (C) 1997, 2000, 2003, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,2000,2003,2005,2006,2009 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
@@ -84,14 +84,17 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
index a27a30f..1b278c7 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/ia64 version.
-   Copyright (C) 1997,1998,2000,2003,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1998,2000,2003,2005,2006,2009
+   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
@@ -84,14 +85,17 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
index d5729a1..e6580f8 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/PowerPC version.
-   Copyright (C) 1997,2000,2003,2005,2006,2008 Free Software Foundation, Inc.
+   Copyright (C) 1997,2000,2003,2005,2006,2008,2009
+   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
@@ -85,14 +86,17 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
diff --git a/sysdeps/unix/sysv/linux/s390/bits/mman.h b/sysdeps/unix/sysv/linux/s390/bits/mman.h
index d25531c..daeafd4 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/s390 version.
-   Copyright (C) 2000,2001,2002,2003,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 2000-2003,2005,2006,2009 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
@@ -84,14 +84,17 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
diff --git a/sysdeps/unix/sysv/linux/sh/bits/mman.h b/sysdeps/unix/sysv/linux/sh/bits/mman.h
index 7a6b572..aee0011 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/SH version.
-   Copyright (C) 1997,1999,2000,2003,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2000,2003,2005,2006,2009
+   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
@@ -83,14 +84,17 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
index be2b7eb..71a3aa6 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h
@@ -1,5 +1,6 @@
 /* Definitions for POSIX memory map interface.  Linux/SPARC version.
-   Copyright (C) 1997,1999,2000,2003,2005,2006 Free Software Foundation, Inc.
+   Copyright (C) 1997,1999,2000,2003,2005,2006,2009
+   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
@@ -85,15 +86,18 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_FREE	 5	/* Content can be freed (Solaris).  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_FREE	  5	/* Content can be freed (Solaris).  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
index 7810682..3dcbf9c 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
@@ -1,5 +1,5 @@
 /* Definitions for POSIX memory map interface.  Linux/x86_64 version.
-   Copyright (C) 2001, 2003, 2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 2001, 2003, 2005, 2006, 2009 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
@@ -85,14 +85,17 @@
 
 /* Advice to `madvise'.  */
 #ifdef __USE_BSD
-# define MADV_NORMAL	 0	/* No further special treatment.  */
-# define MADV_RANDOM	 1	/* Expect random page references.  */
-# define MADV_SEQUENTIAL 2	/* Expect sequential page references.  */
-# define MADV_WILLNEED	 3	/* Will need these pages.  */
-# define MADV_DONTNEED	 4	/* Don't need these pages.  */
-# define MADV_REMOVE	 9	/* Remove these pages and resources.  */
-# define MADV_DONTFORK	 10	/* Do not inherit across fork.  */
-# define MADV_DOFORK	 11	/* Do inherit across fork.  */
+# define MADV_NORMAL	  0	/* No further special treatment.  */
+# define MADV_RANDOM	  1	/* Expect random page references.  */
+# define MADV_SEQUENTIAL  2	/* Expect sequential page references.  */
+# define MADV_WILLNEED	  3	/* Will need these pages.  */
+# define MADV_DONTNEED	  4	/* Don't need these pages.  */
+# define MADV_REMOVE	  9	/* Remove these pages and resources.  */
+# define MADV_DONTFORK	  10	/* Do not inherit across fork.  */
+# define MADV_DOFORK	  11	/* Do inherit across fork.  */
+# define MADV_MERGEABLE	  12	/* KSM may merge identical pages.  */
+# define MADV_UNMERGEABLE 13	/* KSM may not merge identical pages.  */
+# define MADV_HWPOISON	  100	/* Poison a page for testing.  */
 #endif
 
 /* The POSIX people had to invent similar names for the same things.  */

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c0ca09284eedec057b9036eb319be7e30442df04

commit c0ca09284eedec057b9036eb319be7e30442df04
Author: Mike Frsyinger <vapier@gentoo.org>
Date:   Sat Nov 14 19:16:49 2009 -0800

    Missing CL.
    
    (cherry picked from commit fabe43aba8fb46614eb2a74b2916bfbbf8fec10e)

diff --git a/ChangeLog b/ChangeLog
index 57090cb..3a75f35 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2009-11-09  Mike Frysinger  <vapier@gentoo.org>
+
+	* sysdeps/unix/sysv/linux/i386/fallocate.c: Include errno.h.
+	(fallocate): Return ENOSYS if __NR_fallocate is not defined.
+	* sysdeps/unix/sysv/linux/i386/fallocate64.c: Likewise.
+
 2009-11-06  Mike Frsyinger  <vapier@gentoo.org>
 
 	* posix/bug-regex29.c: Include stdio.h.

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=c78e33c312e16a4faccf07278d45538f0252058f

commit c78e33c312e16a4faccf07278d45538f0252058f
Author: Mike Frsyinger <vapier@gentoo.org>
Date:   Sat Nov 14 19:16:01 2009 -0800

    Fix building on x86 with older kernel headers.
    
    Fix building on x86 when older linux headers lack __NR_fallocate define.
    
    (cherry picked from commit f9a7bd536e0b1693db32e1330bbd96108ca63c42)

diff --git a/sysdeps/unix/sysv/linux/i386/fallocate.c b/sysdeps/unix/sysv/linux/i386/fallocate.c
index 7a943e4..14e7883 100644
--- a/sysdeps/unix/sysv/linux/i386/fallocate.c
+++ b/sysdeps/unix/sysv/linux/i386/fallocate.c
@@ -16,6 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <errno.h>
 #include <fcntl.h>
 #include <sysdep.h>
 
@@ -28,5 +29,10 @@ extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
 int
 fallocate (int fd, int mode, __off_t offset, __off_t len)
 {
+#ifdef __NR_fallocate
   return __call_fallocate (fd, mode, offset, len);
+#else
+  __set_errno (ENOSYS);
+  return -1;
+#endif
 }
diff --git a/sysdeps/unix/sysv/linux/i386/fallocate64.c b/sysdeps/unix/sysv/linux/i386/fallocate64.c
index 4998f5e..85f315c 100644
--- a/sysdeps/unix/sysv/linux/i386/fallocate64.c
+++ b/sysdeps/unix/sysv/linux/i386/fallocate64.c
@@ -16,6 +16,7 @@
    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
    02111-1307 USA.  */
 
+#include <errno.h>
 #include <fcntl.h>
 #include <sysdep.h>
 
@@ -28,5 +29,10 @@ extern int __call_fallocate (int fd, int mode, __off64_t offset, __off64_t len)
 int
 fallocate64 (int fd, int mode, __off64_t offset, __off64_t len)
 {
+#ifdef __NR_fallocate
   return __call_fallocate (fd, mode, offset, len);
+#else
+  __set_errno (ENOSYS);
+  return -1;
+#endif
 }

http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=3e224a852a7109e2efa1f07f15962235d12b7e63

commit 3e224a852a7109e2efa1f07f15962235d12b7e63
Author: Mike Frsyinger <vapier@gentoo.org>
Date:   Sat Nov 14 19:11:44 2009 -0800

    Add missing stdio.h include.
    
    (cherry picked from commit 5ec794b4b537bc507010af28d2d93bb76d0972ac)

diff --git a/ChangeLog b/ChangeLog
index aaa46be..57090cb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-06  Mike Frsyinger  <vapier@gentoo.org>
+
+	* posix/bug-regex29.c: Include stdio.h.
+
 2009-11-14  Ulrich Drepper  <drepper@redhat.com>
 
 	* sysdeps/unix/sysv/linux/sh/bits/fcntl.h: Update F_SETOWN_EX and
diff --git a/posix/bug-regex29.c b/posix/bug-regex29.c
index bd796c6..cfc9f99 100644
--- a/posix/bug-regex29.c
+++ b/posix/bug-regex29.c
@@ -1,4 +1,5 @@
 #include <regex.h>
+#include <stdio.h>
 
 static int
 do_test (void)

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                                     |   41 ++++++++++++++++
 locale/Makefile                               |    6 +-
 locale/duplocale.c                            |    6 ++-
 locale/langinfo.h                             |    3 +-
 string/tst-strfry.c => locale/tst-duplocale.c |    9 ++--
 locale/tst-locname.c                          |   20 ++++++++
 posix/Makefile                                |    3 +-
 posix/bug-regex29.c                           |    1 +
 posix/{bug-regex18.c => bug-regex30.c}        |   63 +++++++++++++------------
 posix/regcomp.c                               |    2 +-
 sysdeps/unix/sysv/linux/i386/bits/mman.h      |   21 +++++----
 sysdeps/unix/sysv/linux/i386/fallocate.c      |    6 ++
 sysdeps/unix/sysv/linux/i386/fallocate64.c    |    6 ++
 sysdeps/unix/sysv/linux/ia64/bits/mman.h      |   22 +++++----
 sysdeps/unix/sysv/linux/powerpc/bits/mman.h   |   22 +++++----
 sysdeps/unix/sysv/linux/s390/bits/mman.h      |   21 +++++----
 sysdeps/unix/sysv/linux/sh/bits/mman.h        |   22 +++++----
 sysdeps/unix/sysv/linux/sparc/bits/mman.h     |   24 ++++++----
 sysdeps/unix/sysv/linux/x86_64/bits/mman.h    |   21 +++++----
 19 files changed, 213 insertions(+), 106 deletions(-)
 copy string/tst-strfry.c => locale/tst-duplocale.c (53%)
 create mode 100644 locale/tst-locname.c
 copy posix/{bug-regex18.c => bug-regex30.c} (55%)


hooks/post-receive
-- 
GNU C Library master sources


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