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, master, updated. glibc-2.15-304-ga53b7a4


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, master has been updated
       via  a53b7a4e4b39d90f5964841c63492cf233aa17b8 (commit)
      from  e92584001a07a7e1a4ad2a4997a429075d36e76a (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=a53b7a4e4b39d90f5964841c63492cf233aa17b8

commit a53b7a4e4b39d90f5964841c63492cf233aa17b8
Author: Marek Polacek <polacek@redhat.com>
Date:   Tue Mar 6 22:05:56 2012 +0100

    Fix up long double fphex.

diff --git a/ChangeLog b/ChangeLog
index 2b47391..3c640dd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-03-06  Marek Polacek  <polacek@redhat.com>
+
+	[BZ #13726]
+	* sysdeps/ieee754/ldbl-96/printf_fphex.c: Adjust position of wnumstr.
+	* sysdeps/x86_64/fpu/printf_fphex.c: Likewise.
+	* stdio-common/Makefile (tests): Add tst-long-dbl-fphex.
+	* stdio-common/tst-long-dbl-fphex.c: New file.
+
 2012-03-06  David S. Miller  <davem@davemloft.net>
 
 	* sysdeps/unix/sysv/linux/sparc/sparc64/get_clockfreq.c
diff --git a/NEWS b/NEWS
index 056249b..61cc1dc 100644
--- a/NEWS
+++ b/NEWS
@@ -13,8 +13,8 @@ Version 2.16
   5077, 5461, 5805, 5993, 6884, 6907, 9739, 9902, 10110, 10135, 10140,
   10210, 11174, 11322, 11365, 11494, 12047, 13058, 13525, 13526, 13527,
   13528, 13529, 13530, 13531, 13532, 13533, 13547, 13551, 13552, 13553,
-  13555, 13559, 13583, 13618, 13637, 13656, 13695, 13704, 13706, 13738,
-  13786, 13792
+  13555, 13559, 13583, 13618, 13637, 13656, 13695, 13704, 13706, 13726,
+  13738, 13786, 13792
 
 * ISO C11 support:
 
diff --git a/stdio-common/Makefile b/stdio-common/Makefile
index 080badc..831fafe 100644
--- a/stdio-common/Makefile
+++ b/stdio-common/Makefile
@@ -60,7 +60,7 @@ tests := tstscanf test_rdwr test-popen tstgetln test-fseek \
 	 tst-fwrite bug16 bug17 tst-swscanf tst-sprintf2 bug18 bug18a \
 	 bug19 bug19a tst-popen2 scanf13 scanf14 scanf15 bug20 bug21 bug22 \
 	 scanf16 scanf17 tst-setvbuf1 tst-grouping bug23 bug24 \
-	 bug-vfprintf-nargs
+	 bug-vfprintf-nargs tst-long-dbl-fphex
 
 test-srcs = tst-unbputc tst-printf
 
diff --git a/stdio-common/tst-long-dbl-fphex.c b/stdio-common/tst-long-dbl-fphex.c
new file mode 100644
index 0000000..b57fb85
--- /dev/null
+++ b/stdio-common/tst-long-dbl-fphex.c
@@ -0,0 +1,38 @@
+/* This file is part of the GNU C Library.
+   Copyright (C) 2012 Free Software Foundation, Inc.
+   Contributed by Marek Polacek <polacek@redhat.com>, 2012.
+
+   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, see
+   <http://www.gnu.org/licenses/>.  */
+
+#include <wchar.h>
+
+/* Prototype for our test function.  */
+static int do_test (void);
+
+static int
+do_test (void)
+{
+  const long double x = 24.5;
+  wchar_t a[16 * sizeof (wchar_t)];
+  swprintf (a, 16 * sizeof (wchar_t), L"%La\n", x);
+  wchar_t A[16 * sizeof (wchar_t)];
+  swprintf (A, 16 * sizeof (wchar_t), L"%LA\n", x);
+
+  return (wmemcmp (a, L"0xc.4p+1", 8) != 0
+	  || wmemcmp (A, L"0XC.4P+1", 8) != 0);
+}
+
+#define TEST_FUNCTION do_test ()
+#include "../test-skeleton.c"
diff --git a/sysdeps/ieee754/ldbl-96/printf_fphex.c b/sysdeps/ieee754/ldbl-96/printf_fphex.c
index b1c9d73..acb0508 100644
--- a/sysdeps/ieee754/ldbl-96/printf_fphex.c
+++ b/sysdeps/ieee754/ldbl-96/printf_fphex.c
@@ -1,5 +1,5 @@
 /* Print floating point number in hexadecimal notation according to ISO C99.
-   Copyright (C) 1997, 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 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
@@ -58,6 +58,7 @@ do {									      \
 									      \
       /* We use a full nibble for the leading digit.  */		      \
       leading = *numstr++;						      \
+      wnumstr++;							      \
 									      \
       /* We have 3 bits from the mantissa in the leading nibble.	      \
 	 Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'.  */      \
diff --git a/sysdeps/x86_64/fpu/printf_fphex.c b/sysdeps/x86_64/fpu/printf_fphex.c
index 0b6bfc6..7de7283 100644
--- a/sysdeps/x86_64/fpu/printf_fphex.c
+++ b/sysdeps/x86_64/fpu/printf_fphex.c
@@ -1,5 +1,5 @@
 /* Print floating point number in hexadecimal notation according to ISO C99.
-   Copyright (C) 1997,1998,1999,2000,2001,2005 Free Software Foundation, Inc.
+   Copyright (C) 1997-2012 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
@@ -57,6 +57,7 @@ do {									      \
 									      \
       /* We use a full nibble for the leading digit.  */		      \
       leading = *numstr++;						      \
+      wnumstr++;							      \
 									      \
       /* We have 3 bits from the mantissa in the leading nibble.	      \
 	 Therefore we are here using `IEEE854_LONG_DOUBLE_BIAS + 3'.  */      \

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

Summary of changes:
 ChangeLog                                          |    8 ++++
 NEWS                                               |    4 +-
 stdio-common/Makefile                              |    2 +-
 .../tst-long-dbl-fphex.c                           |   40 +++++++-------------
 sysdeps/ieee754/ldbl-96/printf_fphex.c             |    3 +-
 sysdeps/x86_64/fpu/printf_fphex.c                  |    3 +-
 6 files changed, 29 insertions(+), 31 deletions(-)
 copy nptl/tst-once1.c => stdio-common/tst-long-dbl-fphex.c (59%)


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]