This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.15-327-gaea5d72
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 8 Mar 2012 08:02:52 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.15-327-gaea5d72
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 aea5d7277a2ebd2f432bc3196e4a0e2afe8d5878 (commit)
from ca2ff9fc0492c42f5407a64dd009baa0df488887 (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=aea5d7277a2ebd2f432bc3196e4a0e2afe8d5878
commit aea5d7277a2ebd2f432bc3196e4a0e2afe8d5878
Author: Ulrich Drepper <drepper@gmail.com>
Date: Thu Mar 8 03:02:24 2012 -0500
Clean up tst-fphex test
diff --git a/ChangeLog b/ChangeLog
index 483757d..6986559 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2012-03-08 Ulrich Drepper <drepper@gmail.com>
+
+ * stdio-common/tst-fphex.c: Various cleanups. The macros cannot
+ be defined individually, they must be defined as a block. Define
+ S for printing a string instead of hidint the different by using a
+ macro for adding the 'l'.
+ * stdio-common/tst-fphex-wide.c: Adjust.
+
2012-03-07 Marek Polacek <polacek@redhat.com>
* stdio-common/tst-long-dbl-fphex.c: Fix test for non ldbl-96 targets.
diff --git a/stdio-common/tst-fphex-wide.c b/stdio-common/tst-fphex-wide.c
index 2fd9f6a..04d9135 100644
--- a/stdio-common/tst-fphex-wide.c
+++ b/stdio-common/tst-fphex-wide.c
@@ -19,12 +19,6 @@
#include <wchar.h>
-#define STR_LEN wcslen
-#define SPRINT swprintf
-#define STR_CMP wcscmp
-#define CHAR_T wchar_t
-#define PRINT wprintf
-#define L_(Str) L##Str
-#define L "l"
+#define WIDE 1
#include "tst-fphex.c"
diff --git a/stdio-common/tst-fphex.c b/stdio-common/tst-fphex.c
index 4465bfb..c2e8961 100644
--- a/stdio-common/tst-fphex.c
+++ b/stdio-common/tst-fphex.c
@@ -3,26 +3,22 @@
#include <stdio.h>
#include <string.h>
-#ifndef STR_LEN
+#ifndef WIDE
# define STR_LEN strlen
-#endif
-#ifndef STR_CMP
# define STR_CMP strcmp
-#endif
-#ifndef SPRINT
# define SPRINT snprintf
-#endif
-#ifndef CHAR_T
# define CHAR_T char
-#endif
-#ifndef PRINT
# define PRINT printf
-#endif
-#ifndef L_
# define L_(Str) Str
-#endif
-#ifndef L
-# define L
+# define S "%s"
+#else
+# define STR_LEN wcslen
+# define SPRINT swprintf
+# define STR_CMP wcscmp
+# define CHAR_T wchar_t
+# define PRINT wprintf
+# define L_(Str) L##Str
+# define S "%ls"
#endif
struct testcase
@@ -61,8 +57,9 @@ do_test (void)
int n = SPRINT (buf, sizeof buf / sizeof (buf[0]), t->fmt, t->value);
if (n != STR_LEN (t->expect) || STR_CMP (buf, t->expect) != 0)
{
- PRINT (L_("%" L "s\tExpected \"%" L "s\" (%Zu)\n\tGot \"%" L
- "s\" (%d, %Zu)\n"), t->fmt, t->expect, STR_LEN (t->expect),
+ PRINT (L_("" S "\tExpected \"" S "\" (%Zu)\n\tGot \""
+ S "\" (%d, %Zu)\n"),
+ t->fmt, t->expect, STR_LEN (t->expect),
buf, n, STR_LEN (buf));
result = 1;
}
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
stdio-common/tst-fphex-wide.c | 8 +-------
stdio-common/tst-fphex.c | 29 +++++++++++++----------------
3 files changed, 22 insertions(+), 23 deletions(-)
hooks/post-receive
--
GNU C Library master sources