]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
r22268: merge from samba4:
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Apr 2007 19:15:57 +0000 (19:15 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:23 +0000 (12:19 -0500)
protect #define __location__ with an #ifndef

metze

source/lib/talloc/talloc.h

index 75c130a2756db0f9693e160be0a0be5e2cb3fa53..51640bb28d5e9607648d3e01b7c45dc26fc2ea5b 100644 (file)
@@ -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