summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2003-06-17 21:15:25 +0000
committerNick Mathewson <nickm@torproject.org>2003-06-17 21:15:25 +0000
commitb9480620c61e1eb5115353e1ff79c2d676d70964 (patch)
tree0bc3efe13faeb3878d361c41385912496af19b9a /src/common
parentdf2789c1111cc66b2cea3e9d2c5236f6d95168c0 (diff)
downloadtor-b9480620c61e1eb5115353e1ff79c2d676d70964.tar.gz
tor-b9480620c61e1eb5115353e1ff79c2d676d70964.zip
Make log_fn work on apples with no workarounds needed in main code
svn:r330
Diffstat (limited to 'src/common')
-rw-r--r--src/common/log.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/common/log.h b/src/common/log.h
index d8311d20fb..5669a511aa 100644
--- a/src/common/log.h
+++ b/src/common/log.h
@@ -13,10 +13,13 @@
void log(int severity, const char *format, ...);
#ifdef __GNUC__
-#define log_fn(severity, format) \
- log((severity), "%s(): " format , __PRETTY_FUNCTION__)
-#define log_fnf(severity, format, args...) \
- log((severity), "%s(): " format , __PRETTY_FUNCTION__ , ##args)
+#ifdef __APPLE_CPP__
+#define log_fn(severity, args...) \
+ log((severity), __PRETTY_FUNCTION__ "(): " args)
+#else
+#define log_fn(severity, format, args...) \
+ log((severity), "%s(): " format, __PRETTY_FUNCTION__ , ##args)
+#endif
#else
#define log_fn log
#define log_fnf log