summaryrefslogtreecommitdiff
path: root/source4/lib/replace
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-04-16 19:45:35 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:50:55 -0500
commit7e13a1c96ad2ab5ee6506b631390a5d99d3347e8 (patch)
tree23f2ad35ecfcfc5fa7eaf9ecb93cd0adb06657a2 /source4/lib/replace
parent3dd41c856eb423432814dd1e4af36f7ccffe03d6 (diff)
downloadsamba-7e13a1c96ad2ab5ee6506b631390a5d99d3347e8.tar.gz
samba-7e13a1c96ad2ab5ee6506b631390a5d99d3347e8.tar.bz2
samba-7e13a1c96ad2ab5ee6506b631390a5d99d3347e8.zip
r22273: - provide __LINESTR__ macro
- add __STRINGSTRING() macro to really create a string of __LINE__ - fix __location__ macro metze (This used to be commit 24324fbcff1a896c55e789063f9916dbd092956d)
Diffstat (limited to 'source4/lib/replace')
-rw-r--r--source4/lib/replace/README2
-rw-r--r--source4/lib/replace/replace.h10
2 files changed, 11 insertions, 1 deletions
diff --git a/source4/lib/replace/README b/source4/lib/replace/README
index d63847556c..c2de560314 100644
--- a/source4/lib/replace/README
+++ b/source4/lib/replace/README
@@ -79,8 +79,10 @@ va_copy
__FUNCTION__
__FILE__
__LINE__
+__LINESTR__
__location__
__STRING
+__STRINGSTRING
MIN
MAX
QSORT_CAST
diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h
index 0d462b613d..840b448d24 100644
--- a/source4/lib/replace/replace.h
+++ b/source4/lib/replace/replace.h
@@ -439,8 +439,16 @@ typedef int bool;
#define __STRING(x) #x
#endif
+#ifndef _STRINGSTRING
+#define __STRINGSTRING(x) __STRING(x)
+#endif
+
+#ifndef __LINESTR__
+#define __LINESTR__ __STRINGSTRING(__LINE__)
+#endif
+
#ifndef __location__
-#define __location__ __FILE__ ":" __STRING(__LINE__)
+#define __location__ __FILE__ ":" __LINESTR__
#endif
#if MMAP_BLACKLIST