Workaround for brain-damaged __FILE__ handling on MSVC: keep Nick's name out

of the warning messages.


svn:r3199
This commit is contained in:
Nick Mathewson
2004-12-22 02:32:26 +00:00
parent 64195e380d
commit 32978afa54
6 changed files with 45 additions and 14 deletions
+2 -1
View File
@@ -13,6 +13,7 @@
#include "orconfig.h"
#include "torint.h"
#include "compat.h"
#include <stdio.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
@@ -38,7 +39,7 @@
#define tor_assert(expr) do { \
if (!(expr)) { \
log(LOG_ERR, "%s:%d: %s: Assertion %s failed; aborting.", \
__FILE__, __LINE__, __FUNCTION__, #expr); \
_SHORT_FILE_, __LINE__, __FUNCTION__, #expr); \
assert(expr); /* write to console too. */ \
abort(); /* unreached */ \
} } while (0)