summaryrefslogtreecommitdiff
path: root/source3/lib/talloc/talloc.h
diff options
context:
space:
mode:
Diffstat (limited to 'source3/lib/talloc/talloc.h')
-rw-r--r--source3/lib/talloc/talloc.h10
1 files changed, 6 insertions, 4 deletions
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