r22274: merge from samba4:
authorStefan Metzmacher <metze@samba.org>
Mon, 16 Apr 2007 19:46:06 +0000 (19:46 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:19:23 +0000 (12:19 -0500)
- provide __LINESTR__ macro
- add __STRINGSTRING() macro to really create a string of __LINE__
- fix __location__ macro

metze

source/lib/replace/README
source/lib/replace/replace.h

index d63847556cc57d104cd29b46f7f69520adee47b5..c2de560314a6995f696b626e326478c736e1baec 100644 (file)
@@ -79,8 +79,10 @@ va_copy
 __FUNCTION__
 __FILE__
 __LINE__
+__LINESTR__
 __location__
 __STRING
+__STRINGSTRING
 MIN
 MAX
 QSORT_CAST
index 0d462b613d15e5d5b9713ec1e0ac49660ad4bd18..840b448d24b35008efd3e1e3a5eba1ef801e4b49 100644 (file)
@@ -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