[glibc] - Fix first workday/weekday for it_IT (#622499) - Fix type to uint16_t based on upstream comment
Jeffrey Law
law at fedoraproject.org
Wed Jan 25 04:24:12 UTC 2012
commit 68357f8e9f15f7a0a083b7a157292f984d54299c
Author: Jeff Law <law at redhat.com>
Date: Tue Jan 24 21:23:41 2012 -0700
- Fix first workday/weekday for it_IT (#622499)
- Fix type to uint16_t based on upstream comments (729661)
- Do not cache negative results in nscd if these are transient
(#784402)
glibc-rh622499.patch | 13 +++++
glibc-rh729661.patch | 8 ++--
glibc-rh784402.patch | 144 ++++++++++++++++++++++++++++++++++++++++++++++++++
glibc.spec | 7 +++
4 files changed, 168 insertions(+), 4 deletions(-)
---
diff --git a/glibc-rh622499.patch b/glibc-rh622499.patch
new file mode 100644
index 0000000..6e26a85
--- /dev/null
+++ b/glibc-rh622499.patch
@@ -0,0 +1,13 @@
+diff --git a/localedata/locales/lt_LT b/localedata/locales/lt_LT
+index b709d83..63cb6de 100644
+--- a/localedata/locales/lt_LT
++++ b/localedata/locales/lt_LT
+@@ -2191,6 +2191,8 @@ t_fmt_ampm ""
+ date_fmt "<U0025><U0061><U0020><U0025><U0062><U0020><U0025><U0065>/
+ <U0020><U0025><U0048><U003A><U0025><U004D><U003A><U0025><U0053><U0020>/
+ <U0025><U005A><U0020><U0025><U0059>"
++first_weekday 2
++first_workday 2
+ END LC_TIME
+
+ LC_MESSAGES
diff --git a/glibc-rh729661.patch b/glibc-rh729661.patch
index f297970..5d4ba8d 100644
--- a/glibc-rh729661.patch
+++ b/glibc-rh729661.patch
@@ -6,7 +6,7 @@ diff -rup a/elf/dl-deps.c b/elf/dl-deps.c
of the search list. */
i = 1;
- char seen[nlist];
-+ unsigned short seen[nlist];
++ uint16_t seen[nlist];
memset (seen, 0, nlist * sizeof (seen[0]));
while (1)
{
@@ -22,7 +22,7 @@ diff -rup a/elf/dl-deps.c b/elf/dl-deps.c
}
- char this_seen = seen[i];
-+ unsigned short this_seen = seen[i];
++ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1],
(k - i) * sizeof (seen[0]));
seen[k] = this_seen;
@@ -34,7 +34,7 @@ diff -rup a/elf/dl-fini.c b/elf/dl-fini.c
of the search list for the main namespace. */
unsigned int i = ns == LM_ID_BASE;
- char seen[nmaps];
-+ unsigned short seen[nmaps];
++ uint16_t seen[nmaps];
memset (seen, 0, nmaps * sizeof (seen[0]));
while (1)
{
@@ -50,7 +50,7 @@ diff -rup a/elf/dl-fini.c b/elf/dl-fini.c
}
- char this_seen = seen[i];
-+ unsigned short this_seen = seen[i];
++ uint16_t this_seen = seen[i];
memmove (&seen[i], &seen[i + 1], (k - i) * sizeof (seen[0]));
seen[k] = this_seen;
diff --git a/glibc-rh784402.patch b/glibc-rh784402.patch
new file mode 100644
index 0000000..5e783f5
--- /dev/null
+++ b/glibc-rh784402.patch
@@ -0,0 +1,144 @@
+commit 3e1aa84e7f9f38815f5db9cd7654b1a9497cf6e4
+Author: Ulrich Drepper <drepper at gmail.com>
+Date: Fri Jan 20 22:39:54 2012 -0500
+
+ Do not cache negative results in nscd if these are transient
+
+diff --git a/nscd/aicache.c b/nscd/aicache.c
+index aaaf80d..e1f1244 100644
+--- a/nscd/aicache.c
++++ b/nscd/aicache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for host lookup.
+- Copyright (C) 2004-2008, 2009, 2010, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2004-2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at redhat.com>, 2004.
+
+@@ -514,8 +514,9 @@ next_nip:
+ if (fd != -1)
+ TEMP_FAILURE_RETRY (send (fd, ¬found, total, MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store the
++ result, so be it. */
++ if (rc4 == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/grpcache.c b/nscd/grpcache.c
+index e9607c6..a698f36 100644
+--- a/nscd/grpcache.c
++++ b/nscd/grpcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for group lookup.
+- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 1998.
+
+@@ -120,8 +120,9 @@ cache_addgr (struct database_dyn *db, int fd, request_header *req,
+ else
+ written = total;
+
+- /* If we cannot permanently store the result, so be it. */
+- if (db->negtimeout == 0)
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/hstcache.c b/nscd/hstcache.c
+index 4d68ade..c72feaa 100644
+--- a/nscd/hstcache.c
++++ b/nscd/hstcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for host lookup.
+- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 1998.
+
+@@ -141,8 +141,9 @@ cache_addhst (struct database_dyn *db, int fd, request_header *req,
+ MSG_NOSIGNAL)) != total)
+ all_written = false;
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/initgrcache.c b/nscd/initgrcache.c
+index 4ac9942..2019991 100644
+--- a/nscd/initgrcache.c
++++ b/nscd/initgrcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for host lookup.
+- Copyright (C) 2004-2006, 2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2004-2006, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at redhat.com>, 2004.
+
+@@ -202,8 +202,9 @@ addinitgroupsX (struct database_dyn *db, int fd, request_header *req,
+ written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
+ MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (all_tryagain || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/pwdcache.c b/nscd/pwdcache.c
+index 49e130c..e2ba09d 100644
+--- a/nscd/pwdcache.c
++++ b/nscd/pwdcache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for passwd lookup.
+- Copyright (C) 1998-2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 1998-2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at cygnus.com>, 1998.
+
+@@ -124,8 +124,9 @@ cache_addpw (struct database_dyn *db, int fd, request_header *req,
+ written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
+ MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errno == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
+diff --git a/nscd/servicescache.c b/nscd/servicescache.c
+index d3d5dce..a6337e3 100644
+--- a/nscd/servicescache.c
++++ b/nscd/servicescache.c
+@@ -1,5 +1,5 @@
+ /* Cache handling for services lookup.
+- Copyright (C) 2007, 2008, 2009, 2011 Free Software Foundation, Inc.
++ Copyright (C) 2007, 2008, 2009, 2011, 2012 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper at drepper.com>, 2007.
+
+@@ -108,8 +108,9 @@ cache_addserv (struct database_dyn *db, int fd, request_header *req,
+ written = TEMP_FAILURE_RETRY (send (fd, ¬found, total,
+ MSG_NOSIGNAL));
+
+- /* If we cannot permanently store the result, so be it. */
+- if (__builtin_expect (db->negtimeout == 0, 0))
++ /* If we have a transient error or cannot permanently store
++ the result, so be it. */
++ if (errval == EAGAIN || __builtin_expect (db->negtimeout == 0, 0))
+ {
+ /* Mark the old entry as obsolete. */
+ if (dh != NULL)
diff --git a/glibc.spec b/glibc.spec
index 9203f2f..c9aaae5 100644
--- a/glibc.spec
+++ b/glibc.spec
@@ -56,6 +56,8 @@ Patch5: %{name}-rh769421.patch
Patch6: %{name}-rh729661.patch
Patch7: %{name}-rh446078.patch
Patch8: %{name}-rh454629.patch
+Patch9: %{name}-rh784402.patch
+Patch10: %{name}-rh622499.patch
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Obsoletes: glibc-profile < 2.4
@@ -282,6 +284,8 @@ rm -rf %{glibcportsdir}
%patch6 -p1
%patch7 -p1
%patch8 -p1
+%patch9 -p1
+%patch10 -p1
# A lot of programs still misuse memcpy when they have to use
# memmove. The memcpy implementation below is not tolerant at
@@ -1136,6 +1140,9 @@ rm -f *.filelist*
%changelog
* Tue Jan 24 2012 Jeff Law <law at redhat.com> - 2.15-4
- Update ports from master.
+ - Fix first workday/weekday for it_IT (#622499)
+ - Fix type to uint16_t based on upstream comments (729661)
+ - Do not cache negative results in nscd if these are transient (#784402)
* Mon Jan 23 2012 Jeff Law <law at redhat.com> - 2.15-3
- Fix cycle detection (#729661)
More information about the scm-commits
mailing list