about summary refs log tree commit diff
path: root/string/test-strcpy.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2012-01-07 08:54:34 -0500
committerUlrich Drepper <drepper@gmail.com>2012-01-07 08:54:34 -0500
commitdf78418ad7f16500fb52f3075aada0ed9e22abe2 (patch)
tree1c4c8d8414cfe77d5f258a1e6647367a6f147681 /string/test-strcpy.c
parent5e0d030065a49247b306a2b445fa7720b8ee09cb (diff)
downloadglibc-df78418ad7f16500fb52f3075aada0ed9e22abe2.tar.gz
glibc-df78418ad7f16500fb52f3075aada0ed9e22abe2.tar.xz
glibc-df78418ad7f16500fb52f3075aada0ed9e22abe2.zip
Fix problem with reuse of test-strcpy for wide char testing
Diffstat (limited to 'string/test-strcpy.c')
-rw-r--r--string/test-strcpy.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/string/test-strcpy.c b/string/test-strcpy.c
index 01a46de3c3..04d9897b67 100644
--- a/string/test-strcpy.c
+++ b/string/test-strcpy.c
@@ -1,5 +1,5 @@
 /* Test and measure strcpy functions.
-   Copyright (C) 1999, 2002, 2003, 2005, 2011 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2002, 2003, 2005, 2011, 2012 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Jakub Jelinek <jakub@redhat.com>, 1999.
    Added wcscpy support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
@@ -23,6 +23,7 @@
 # include <wchar.h>
 # define CHAR wchar_t
 # define UCHAR wchar_t
+# define sfmt "ls"
 # define BIG_CHAR WCHAR_MAX
 # define SMALL_CHAR 1273
 # define STRCMP wcscmp
@@ -31,6 +32,7 @@
 #else
 # define CHAR char
 # define UCHAR unsigned char
+# define sfmt "s"
 # define BIG_CHAR CHAR_MAX
 # define SMALL_CHAR 127
 # define STRCMP strcmp
@@ -80,7 +82,8 @@ do_one_test (impl_t *impl, CHAR *dst, const CHAR *src,
 
   if (STRCMP (dst, src) != 0)
     {
-      error (0, 0, "Wrong result in function %s dst \"%s\" src \"%s\"",
+      error (0, 0,
+	     "Wrong result in function %s dst \"%" sfmt "\" src \"%" sfmt "\"",
 	     impl->name, dst, src);
       ret = 1;
       return;