diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-07-23 12:01:57 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-07-23 12:01:57 -0400 |
commit | 3c2eefac2e9a1db1b7d318ece20426bd3cb2a14c (patch) | |
tree | 70e198a3ac86aba975720154c00ef0f02e1005a7 | |
parent | bf08405348db7b2e4ae8d02b68f076ead2d5b152 (diff) | |
download | tor-3c2eefac2e9a1db1b7d318ece20426bd3cb2a14c.tar.gz tor-3c2eefac2e9a1db1b7d318ece20426bd3cb2a14c.zip |
Fix a couple more msvc issues, reported by gisle vanem
-rw-r--r-- | src/common/torlog.h | 14 | ||||
-rw-r--r-- | src/test/test_checkdir.c | 4 |
2 files changed, 11 insertions, 7 deletions
diff --git a/src/common/torlog.h b/src/common/torlog.h index 45b2abfd7e..67edf14c04 100644 --- a/src/common/torlog.h +++ b/src/common/torlog.h @@ -210,25 +210,25 @@ void log_fn_ratelim_(struct ratelim_t *ratelim, int severity, #define log_debug(domain, args, ...) \ STMT_BEGIN \ if (PREDICT_UNLIKELY(log_global_min_severity_ == LOG_DEBUG)) \ - log_fn_(LOG_DEBUG, domain, __PRETTY_FUNCTION__, args, ##__VA_ARGS__); \ + log_fn_(LOG_DEBUG, domain, __FUNCTION__, args, ##__VA_ARGS__); \ STMT_END #define log_info(domain, args,...) \ - log_fn_(LOG_INFO, domain, __PRETTY_FUNCTION__, args, ##__VA_ARGS__) + log_fn_(LOG_INFO, domain, __FUNCTION__, args, ##__VA_ARGS__) #define log_notice(domain, args,...) \ - log_fn_(LOG_NOTICE, domain, __PRETTY_FUNCTION__, args, ##__VA_ARGS__) + log_fn_(LOG_NOTICE, domain, __FUNCTION__, args, ##__VA_ARGS__) #define log_warn(domain, args,...) \ - log_fn_(LOG_WARN, domain, __PRETTY_FUNCTION__, args, ##__VA_ARGS__) + log_fn_(LOG_WARN, domain, __FUNCTION__, args, ##__VA_ARGS__) #define log_err(domain, args,...) \ - log_fn_(LOG_ERR, domain, __PRETTY_FUNCTION__, args, ##__VA_ARGS__) + log_fn_(LOG_ERR, domain, __FUNCTION__, args, ##__VA_ARGS__) /** Log a message at level <b>severity</b>, using a pretty-printed version * of the current function name. */ #define log_fn(severity, domain, args,...) \ - log_fn_(severity, domain, __PRETTY_FUNCTION__, args, ##__VA_ARGS__) + log_fn_(severity, domain, __FUNCTION__, args, ##__VA_ARGS__) /** As log_fn, but use <b>ratelim</b> (an instance of ratelim_t) to control * the frequency at which messages can appear. */ #define log_fn_ratelim(ratelim, severity, domain, args,...) \ - log_fn_ratelim_(ratelim, severity, domain, __PRETTY_FUNCTION__, \ + log_fn_ratelim_(ratelim, severity, domain, __FUNCTION__, \ args, ##__VA_ARGS__) #endif diff --git a/src/test/test_checkdir.c b/src/test/test_checkdir.c index ae859449cb..a44584c0a3 100644 --- a/src/test/test_checkdir.c +++ b/src/test/test_checkdir.c @@ -3,7 +3,11 @@ #include "orconfig.h" #include "or.h" + +#ifndef _WIN32 #include <dirent.h> +#endif + #include "config.h" #include "test.h" #include "util.h" |