diff options
Diffstat (limited to 'src/common/compat.h')
-rw-r--r-- | src/common/compat.h | 9 |
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) |