summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-16 19:14:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:50:55 -0500
commit9f7406f7956ce396fb8a79603aa4f9518ca46afe (patch)
tree6be8fddd73361a70a2c5256d2d057f0f1468d061 /source4
parent9a7d2f8e54e61c40738eff89b1b6b9c71ced9640 (diff)
downloadsamba-9f7406f7956ce396fb8a79603aa4f9518ca46afe.tar.gz
samba-9f7406f7956ce396fb8a79603aa4f9518ca46afe.tar.bz2
samba-9f7406f7956ce396fb8a79603aa4f9518ca46afe.zip
r22267: protect #define __location__ with an #ifndef
metze (This used to be commit 138ffd6d486bb315ee6933f25e693d4207d870d6)
Diffstat (limited to 'source4')
-rw-r--r--source4/lib/talloc/talloc.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/lib/talloc/talloc.h b/source4/lib/talloc/talloc.h
index 628490faa6..195c6c25b6 100644
--- a/source4/lib/talloc/talloc.h
+++ b/source4/lib/talloc/talloc.h
@@ -36,10 +36,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