From d917f708e10515e8260ec54ac17ca5e8d7ad1e3a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Mon, 16 Apr 2007 19:15:57 +0000 Subject: r22268: merge from samba4: protect #define __location__ with an #ifndef metze (This used to be commit 4c93c05542c5a238b1b7a5cd9b75f9f852c0ad4d) --- source3/lib/talloc/talloc.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source3/lib') diff --git a/source3/lib/talloc/talloc.h b/source3/lib/talloc/talloc.h index 75c130a275..51640bb28d 100644 --- a/source3/lib/talloc/talloc.h +++ b/source3/lib/talloc/talloc.h @@ -32,10 +32,12 @@ typedef void TALLOC_CTX; /* this uses a little trick to allow __LINE__ to be stringified */ -#define _STRING_LINE_(s) #s -#define _STRING_LINE2_(s) _STRING_LINE_(s) -#define __LINESTR__ _STRING_LINE2_(__LINE__) -#define __location__ __FILE__ ":" __LINESTR__ +#ifndef __location__ +#define __TALLOC_STRING_LINE1__(s) #s +#define __TALLOC_STRING_LINE2__(s) __TALLOC_STRING_LINE1__(s) +#define __TALLOC_STRING_LINE3__ __TALLOC_STRING_LINE2__(__LINE__) +#define __location__ __FILE__ ":" __TALLOC_STRING_LINE3__ +#endif #ifndef TALLOC_DEPRECATED #define TALLOC_DEPRECATED 0 -- cgit