From 932106f54c35b815756d518b236448b9884d6bde Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Tue, 25 Oct 2005 07:05:03 +0000 Subject: 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 --- src/common/compat.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/common/compat.h') 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) -- cgit v1.2.3-54-g00ecf