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

r6038 - in glibc-package/trunk/debian: . patches patches/any



Author: aurel32
Date: 2014-05-04 20:39:24 +0000 (Sun, 04 May 2014)
New Revision: 6038

Added:
   glibc-package/trunk/debian/patches/any/cvs-wprintf.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
patches/any/cvs-wprintf.diff: patch from upstream to correctly handle
%p in wprintf().  Closes: #729514.

Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2014-05-04 20:36:08 UTC (rev 6037)
+++ glibc-package/trunk/debian/changelog	2014-05-04 20:39:24 UTC (rev 6038)
@@ -13,6 +13,8 @@
     in the sparc specific strcmp() implementation.  Closes: #746310.
   * debhelper.in/nscd.init: invalidate nscd cache on startup.  Closes:
     #689427.
+  * patches/any/cvs-wprintf.diff: patch from upstream to correctly handle
+    %p in wprintf().  Closes: #729514.
 
  -- Adam Conrad <adconrad@0c3.net>  Sun, 27 Apr 2014 23:15:13 -0600
 

Added: glibc-package/trunk/debian/patches/any/cvs-wprintf.diff
===================================================================
--- glibc-package/trunk/debian/patches/any/cvs-wprintf.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/any/cvs-wprintf.diff	2014-05-04 20:39:24 UTC (rev 6038)
@@ -0,0 +1,57 @@
+2014-05-01  Andreas Schwab  <schwab@linux-m68k.org>
+
+	[BZ #16890]
+	* stdio-common/vfprintf.c (process_arg) [%p]: Mark string as wide
+	when compiling wprintf.
+	* stdio-common/tstdiomisc.c (t3): New function.
+	(main): Call it.
+
+diff --git a/stdio-common/tstdiomisc.c b/stdio-common/tstdiomisc.c
+--- a/stdio-common/tstdiomisc.c
++++ b/stdio-common/tstdiomisc.c
+@@ -46,6 +46,24 @@ t2 (void)
+   return result;
+ }
+ 
++static int
++t3 (void)
++{
++  char buf[80];
++  wchar_t wbuf[80];
++  int result = 0;
++  int retval;
++
++  retval = sprintf (buf, "%p", (char *) NULL);
++  result |= retval != 5 || strcmp (buf, "(nil)") != 0;
++
++  retval = swprintf (wbuf, sizeof (wbuf) / sizeof (wbuf[0]),
++		     L"%p", (char *) NULL);
++  result |= retval != 5 || wcscmp (wbuf, L"(nil)") != 0;
++
++  return result;
++}
++
+ volatile double qnanval;
+ volatile long double lqnanval;
+ /* A sNaN is only guaranteed to be representable in variables with static (or
+@@ -243,6 +261,7 @@ main (int argc, char *argv[])
+ 
+   result |= t1 ();
+   result |= t2 ();
++  result |= t3 ();
+   result |= F ();
+ 
+   result |= fflush (stdout) == EOF;
+diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
+--- a/stdio-common/vfprintf.c
++++ b/stdio-common/vfprintf.c
+@@ -936,7 +936,8 @@ vfprintf (FILE *s, const CHAR_T *format, va_list ap)
+ 	    /* Make sure the full string "(nil)" is printed.  */	      \
+ 	    if (prec < 5)						      \
+ 	      prec = 5;							      \
+-	    is_long = 0;	/* This is no wide-char string.  */	      \
++	    /* This is a wide string iff compiling wprintf.  */		      \
++	    is_long = sizeof (CHAR_T) > 1;				      \
+ 	    goto LABEL (print_string);					      \
+ 	  }								      \
+       }									      \

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2014-05-04 20:36:08 UTC (rev 6037)
+++ glibc-package/trunk/debian/patches/series	2014-05-04 20:39:24 UTC (rev 6038)
@@ -275,3 +275,4 @@
 any/local-ldconfig-ignore-ld.so.diff
 any/local-no-malloc-backtrace.diff
 any/cvs-make-4.0.diff
+any/cvs-wprintf.diff


Reply to: