From 9f5c43b405973bce36d0c68e3899c6ef799fc8d3 Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Fri, 30 Sep 2005 01:20:47 +0000 Subject: [PATCH] Get rid of duplicated STRINGIFY macros. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4829 --- auxprogs/valgrind-listener.c | 4 +--- coregrind/m_syswrap/syswrap-amd64-linux.c | 8 ++------ coregrind/m_syswrap/syswrap-ppc32-linux.c | 8 ++------ coregrind/m_syswrap/syswrap-x86-linux.c | 8 ++------ 4 files changed, 7 insertions(+), 21 deletions(-) diff --git a/auxprogs/valgrind-listener.c b/auxprogs/valgrind-listener.c index a565d2e510..e6f067bd6b 100644 --- a/auxprogs/valgrind-listener.c +++ b/auxprogs/valgrind-listener.c @@ -80,12 +80,10 @@ static void my_assert_fail ( const Char* expr, const Char* file, Int line, const } #undef assert -#undef STRINGIFY -#define STRINGIFY(__str) #__str #define assert(expr) \ ((void) ((expr) ? 0 : \ - (my_assert_fail (STRINGIFY(expr), \ + (my_assert_fail (VG_STRINGIFY(expr), \ __FILE__, __LINE__, \ __PRETTY_FUNCTION__), 0))) diff --git a/coregrind/m_syswrap/syswrap-amd64-linux.c b/coregrind/m_syswrap/syswrap-amd64-linux.c index b88adfe664..81a4dbfdba 100644 --- a/coregrind/m_syswrap/syswrap-amd64-linux.c +++ b/coregrind/m_syswrap/syswrap-amd64-linux.c @@ -285,10 +285,8 @@ static Long start_thread_NORETURN ( void* arg ) Returns a Long encoded in the linux-amd64 way, not a SysRes. */ -#define STRINGIFZ(__str) #__str -#define STRINGIFY(__str) STRINGIFZ(__str) -#define __NR_CLONE STRINGIFY(__NR_clone) -#define __NR_EXIT STRINGIFY(__NR_exit) +#define __NR_CLONE VG_STRINGIFY(__NR_clone) +#define __NR_EXIT VG_STRINGIFY(__NR_exit) extern Long do_syscall_clone_amd64_linux ( Long (*fn)(void *), @@ -339,8 +337,6 @@ asm( #undef __NR_CLONE #undef __NR_EXIT -#undef STRINGIFY -#undef STRINGIFZ // forward declaration diff --git a/coregrind/m_syswrap/syswrap-ppc32-linux.c b/coregrind/m_syswrap/syswrap-ppc32-linux.c index 52a916eb73..03e0d13cce 100644 --- a/coregrind/m_syswrap/syswrap-ppc32-linux.c +++ b/coregrind/m_syswrap/syswrap-ppc32-linux.c @@ -307,10 +307,8 @@ static Int start_thread_NORETURN ( void* arg ) Returns an Int encoded in the linux-ppc32 way, not a SysRes. */ -#define STRINGIFZ(__str) #__str -#define STRINGIFY(__str) STRINGIFZ(__str) -#define __NR_CLONE STRINGIFY(__NR_clone) -#define __NR_EXIT STRINGIFY(__NR_exit) +#define __NR_CLONE VG_STRINGIFY(__NR_clone) +#define __NR_EXIT VG_STRINGIFY(__NR_exit) extern ULong do_syscall_clone_ppc32_linux ( Int (*fn)(void *), @@ -379,8 +377,6 @@ asm( #undef __NR_CLONE #undef __NR_EXIT -#undef STRINGIFY -#undef STRINGIFZ // forward declarations static void setup_child ( ThreadArchState*, ThreadArchState* ); diff --git a/coregrind/m_syswrap/syswrap-x86-linux.c b/coregrind/m_syswrap/syswrap-x86-linux.c index 3eee618ba8..89a0af4724 100644 --- a/coregrind/m_syswrap/syswrap-x86-linux.c +++ b/coregrind/m_syswrap/syswrap-x86-linux.c @@ -284,11 +284,9 @@ static Int start_thread_NORETURN ( void* arg ) Returns an Int encoded in the linux-x86 way, not a SysRes. */ -#define STRINGIFZ(__str) #__str -#define STRINGIFY(__str) STRINGIFZ(__str) #define FSZ "4+4+4+4" /* frame size = retaddr+ebx+edi+esi */ -#define __NR_CLONE STRINGIFY(__NR_clone) -#define __NR_EXIT STRINGIFY(__NR_exit) +#define __NR_CLONE VG_STRINGIFY(__NR_clone) +#define __NR_EXIT VG_STRINGIFY(__NR_exit) extern Int do_syscall_clone_x86_linux ( Int (*fn)(void *), @@ -345,8 +343,6 @@ asm( #undef FSZ #undef __NR_CLONE #undef __NR_EXIT -#undef STRINGIFY -#undef STRINGIFZ // forward declarations -- 2.47.3