summaryrefslogtreecommitdiff
path: root/src/common/compat.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-25 07:05:03 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-25 07:05:03 +0000
commit932106f54c35b815756d518b236448b9884d6bde (patch)
tree1cb7ab000289de706e5813dfe764a2b3644db797 /src/common/compat.h
parent452f4cfa09dffc8f9235c9a9bb1bd3e30aee6aa2 (diff)
downloadtor-932106f54c35b815756d518b236448b9884d6bde.tar.gz
tor-932106f54c35b815756d518b236448b9884d6bde.zip
Efficiency hack: call tor_fix_source_file late, not early. Add "BUG" domain. Domains are now bitmasks... just in case. Make some err msgs non-general.
svn:r5309
Diffstat (limited to 'src/common/compat.h')
-rw-r--r--src/common/compat.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/common/compat.h b/src/common/compat.h
index 4e8d4b1805..314477894a 100644
--- a/src/common/compat.h
+++ b/src/common/compat.h
@@ -100,8 +100,13 @@ const void *tor_memmem(const void *haystack, size_t hlen, const void *needle,
#define TOR_ISDIGIT(c) isdigit((int)(unsigned char)(c))
#define TOR_ISPRINT(c) isprint((int)(unsigned char)(c))
-#define _SHORT_FILE_ (_tor_fix_source_file(__FILE__))
-const char *_tor_fix_source_file(const char *fname);
+#ifdef MS_WINDOWS
+#define _SHORT_FILE_ (tor_fix_source_file(__FILE__))
+const char *tor_fix_source_file(const char *fname);
+#else
+#define _SHORT_FILE_ (__FILE__)
+#define tor_fix_source_file(s) (s)
+#endif
/* ===== Time compatibility */
#if !defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_STRUCT_TIMEVAL_TV_SEC)