[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r6102 - in glibc-package/branches/glibc-branch-wheezy/debian: . patches patches/any



Author: aurel32
Date: 2014-05-22 10:55:57 +0000 (Thu, 22 May 2014)
New Revision: 6102

Added:
   glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-nl_langinfo-static.diff
Modified:
   glibc-package/branches/glibc-branch-wheezy/debian/changelog
   glibc-package/branches/glibc-branch-wheezy/debian/patches/series
Log:
patches/any/submitted-nl_langinfo-static.diff: new patch from upstream
to fix nl_langinfo() when used in static binaries.  Closes: #747103.

Modified: glibc-package/branches/glibc-branch-wheezy/debian/changelog
===================================================================
--- glibc-package/branches/glibc-branch-wheezy/debian/changelog	2014-05-21 20:54:18 UTC (rev 6101)
+++ glibc-package/branches/glibc-branch-wheezy/debian/changelog	2014-05-22 10:55:57 UTC (rev 6102)
@@ -19,6 +19,8 @@
     symlink creation to all biarch packages.
   * debian/debhelper.in/libc-alt.postrm: generalize the dynamic linker
     symlink removal to all biarch packages.
+  * patches/any/submitted-nl_langinfo-static.diff: new patch from upstream
+    to fix nl_langinfo() when used in static binaries.  Closes: #747103.
 
  -- Aurelien Jarno <aurel32@debian.org>  Mon, 05 May 2014 14:21:03 +0200
 

Added: glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-nl_langinfo-static.diff
===================================================================
--- glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-nl_langinfo-static.diff	                        (rev 0)
+++ glibc-package/branches/glibc-branch-wheezy/debian/patches/any/cvs-nl_langinfo-static.diff	2014-05-22 10:55:57 UTC (rev 6102)
@@ -0,0 +1,97 @@
+2014-05-06  Aurelien Jarno  <aurelien@aurel32.net>
+ 
+	* locale/nl_langinfo_l.c: Make direct reference to every
+	_nl_current_CATEGORY symbol.
+	* localedata/Makefile (test-srcs): Add tst-langinfo-static.
+	(tests-static): Add tst-langinfo-static.
+	(tests-special): Add tst-langinfo-static.out.
+	($(objpfx)tst-langinfo.out): Redirect output.
+	($(objpfx)tst-langinfo-static.out): New.
+	* localedata/tst-langinfo.sh: Send output to stdout.
+	* localedata/tst-langinfo-static.c: New file.
+
+diff --git a/locale/nl_langinfo_l.c b/locale/nl_langinfo_l.c
+--- a/locale/nl_langinfo_l.c
++++ b/locale/nl_langinfo_l.c
+@@ -20,6 +20,7 @@
+ #include <locale.h>
+ #include <errno.h>
+ #include <stddef.h>
++#include <stdlib.h>
+ #include "localeinfo.h"
+
+
+@@ -43,7 +43,21 @@ __nl_langinfo_l (item, l)
+   if (index == _NL_ITEM_INDEX (_NL_LOCALE_NAME (category)))
+     return (char *) l->__names[category];
+ 
++#if defined NL_CURRENT_INDIRECT
++  /* Make direct reference to every _nl_current_CATEGORY symbol,
++     since we know only at runtime which categories are used.  */
++  switch (category)
++    {
++# define DEFINE_CATEGORY(category, category_name, items, a) \
++      case category: data = *_nl_current_##category; break;
++# include "categories.def"
++# undef DEFINE_CATEGORY
++    default:                   /* Should be impossible.  */
++      abort();
++    }
++#else
+   data = l->__locales[category];
++#endif
+ 
+   if (index >= data->nstrings)
+     /* Bogus index for this category: bogus item.  */
+diff --git a/localedata/Makefile b/localedata/Makefile
+--- a/localedata/Makefile
++++ b/localedata/Makefile
+@@ -50,7 +50,7 @@
+ 
+ test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans \
+ 	     tst-mbswcs1 tst-mbswcs2 tst-mbswcs3 tst-mbswcs4 tst-mbswcs5 \
+-	     tst-ctype tst-wctype tst-langinfo tst-numeric
++	     tst-ctype tst-wctype tst-langinfo tst-langinfo-static tst-numeric
+ test-input := de_DE.ISO-8859-1 en_US.ISO-8859-1 da_DK.ISO-8859-1 \
+ 	      hr_HR.ISO-8859-2 sv_SE.ISO-8859-1 tr_TR.UTF-8 fr_FR.UTF-8 \
+ 	      si_LK.UTF-8
+@@ -178,7 +178,8 @@
+ tests: $(objpfx)sort-test.out $(objpfx)tst-fmon.out $(objpfx)tst-locale.out \
+        $(objpfx)tst-rpmatch.out $(objpfx)tst-trans.out \
+        $(objpfx)tst-mbswcs.out $(objpfx)tst-ctype.out \
+-       $(objpfx)tst-langinfo.out $(objpfx)tst-numeric.out
++       $(objpfx)tst-langinfo.out $(objpfx)tst-langinfo-static.out\
++       $(objpfx)tst-numeric.out
+ ifeq (y,$(OPTION_POSIX_WIDE_CHAR_DEVICE_IO))
+ tests: $(objpfx)tst-wctype.out
+ endif
+@@ -224,7 +225,11 @@
+ $(objpfx)tst-langinfo.out: tst-langinfo.sh $(objpfx)tst-langinfo \
+ 			$(objpfx)sort-test.out \
+ 			$(addprefix $(objpfx),$(CTYPE_FILES))
+-	$(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)'
++	$(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
++$(objpfx)tst-langinfo-static.out: tst-langinfo.sh $(objpfx)tst-langinfo-static \
++			$(objpfx)sort-test.out \
++			$(addprefix $(objpfx),$(CTYPE_FILES))
++	$(SHELL) -e $< $(common-objpfx) '$(built-program-cmd)' > $@
+ $(objpfx)tst-digits.out: $(objpfx)tst-locale.out
+ $(objpfx)tst-mbswcs6.out: $(addprefix $(objpfx),$(CTYPE_FILES))
+ # eglibc: endif
+diff --git a/localedata/tst-langinfo-static.c b/localedata/tst-langinfo-static.c
+--- /dev/null
++++ b/localedata/tst-langinfo-static.c
+@@ -0,0 +1 @@
++#include "tst-langinfo.c"
+diff --git a/localedata/tst-langinfo.sh b/localedata/tst-langinfo.sh
+--- a/localedata/tst-langinfo.sh
++++ b/localedata/tst-langinfo.sh
+@@ -341,7 +341,6 @@
+ EOF
+ LOCPATH=${common_objpfx}localedata GCONV_PATH=${common_objpfx}iconvdata \
+ LC_ALL=tt_TT ${run_program_prefix} \
+-  ${common_objpfx}localedata/tst-langinfo \
+-    > ${common_objpfx}localedata/tst-langinfo.out
++  ${common_objpfx}localedata/tst-langinfo
+ 
+ exit $?

Modified: glibc-package/branches/glibc-branch-wheezy/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-branch-wheezy/debian/patches/series	2014-05-21 20:54:18 UTC (rev 6101)
+++ glibc-package/branches/glibc-branch-wheezy/debian/patches/series	2014-05-22 10:55:57 UTC (rev 6102)
@@ -386,3 +386,4 @@
 any/cvs-CVE-2013-4788.diff
 any/cvs-findlocale-div-by-zero.diff
 any/local-ldconfig-ignore-ld.so.diff
+any/cvs-nl_langinfo-static.diff


Reply to: