1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00

Provide better output in string tests

If IMPL is called with a macro for the first parameter the macro does not
get expanded before the string is stored in the impl_t data structure.
This commit is contained in:
Ulrich Drepper
2011-08-04 17:47:24 -04:00
parent cb7e923b71
commit 16292eddd7
2 changed files with 7 additions and 2 deletions

View File

@ -1,5 +1,5 @@
/* Test and measure string and memory functions.
Copyright (C) 1999, 2002, 2004, 2008 Free Software Foundation, Inc.
Copyright (C) 1999, 2002, 2004, 2008, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Jakub Jelinek <jakub@redhat.com>, 1999.
@ -18,6 +18,8 @@
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
02111-1307 USA. */
#include <sys/cdefs.h>
typedef struct
{
const char *name;
@ -29,7 +31,7 @@ extern impl_t __start_impls[], __stop_impls[];
#define IMPL(name, test) \
impl_t tst_ ## name \
__attribute__ ((section ("impls"), aligned (sizeof (void *)))) \
= { #name, (void (*) (void))name, test };
= { __STRING (name), (void (*) (void))name, test };
#ifdef TEST_MAIN