1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-25 02:02:09 +03:00

Fix problem with reuse of test-strcpy for wide char testing

This commit is contained in:
Ulrich Drepper
2012-01-07 08:54:34 -05:00
parent 5e0d030065
commit df78418ad7
2 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2012-01-07 Ulrich Drepper <drepper@gmail.com>
* string/test-strcpy.c (do_one_test): Fix format string for WIDE use.
2012-01-03 Ulrich Drepper <drepper@gmail.com> 2012-01-03 Ulrich Drepper <drepper@gmail.com>
* iconv/loop.c (single loop): Fix assertion in storing of * iconv/loop.c (single loop): Fix assertion in storing of

View File

@ -1,5 +1,5 @@
/* Test and measure strcpy functions. /* 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. This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999. Written by Jakub Jelinek <jakub@redhat.com>, 1999.
Added wcscpy support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011 Added wcscpy support by Liubov Dmitrieva <liubov.dmitrieva@gmail.com>, 2011
@ -23,6 +23,7 @@
# include <wchar.h> # include <wchar.h>
# define CHAR wchar_t # define CHAR wchar_t
# define UCHAR wchar_t # define UCHAR wchar_t
# define sfmt "ls"
# define BIG_CHAR WCHAR_MAX # define BIG_CHAR WCHAR_MAX
# define SMALL_CHAR 1273 # define SMALL_CHAR 1273
# define STRCMP wcscmp # define STRCMP wcscmp
@ -31,6 +32,7 @@
#else #else
# define CHAR char # define CHAR char
# define UCHAR unsigned char # define UCHAR unsigned char
# define sfmt "s"
# define BIG_CHAR CHAR_MAX # define BIG_CHAR CHAR_MAX
# define SMALL_CHAR 127 # define SMALL_CHAR 127
# define STRCMP strcmp # define STRCMP strcmp
@ -80,7 +82,8 @@ do_one_test (impl_t *impl, CHAR *dst, const CHAR *src,
if (STRCMP (dst, src) != 0) 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); impl->name, dst, src);
ret = 1; ret = 1;
return; return;