aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2010-04-19 16:37:26 -0400
committerNick Mathewson <nickm@torproject.org>2010-04-19 16:37:26 -0400
commitaf9dd4af02f2cfec3e5d71f310e310f41560ee0b (patch)
tree2d543f9603c8eaa7d90c5240a8a5012357dd48cd /src
parent84924fcd30ba862e1177c17400ffa496cea00db0 (diff)
downloadtor-af9dd4af02f2cfec3e5d71f310e310f41560ee0b.tar
tor-af9dd4af02f2cfec3e5d71f310e310f41560ee0b.tar.gz
Fix two compile-blockers in tor_vasprintf().
1) mingw doesn't have _vscprintf(); mingw instead has a working snprintf. 2) windows compilers that _do_ have a working _vscprintf spell it so; they do not spell it _vcsprintf().
Diffstat (limited to 'src')
-rw-r--r--src/common/compat.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 26038c109..0fb169b73 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -355,12 +355,12 @@ tor_vasprintf(char **strp, const char *fmt, va_list args)
else
*strp = strp_tmp;
return r;
-#elif defined(MS_WINDOWS)
+#elif defined(_MSC_VER)
/* On Windows, _vsnprintf won't tell us the length of the string if it
* overflows, so we need to use _vcsprintf to tell how much to allocate */
int len, r;
char *res;
- len = _vcsprintf(fmt, args);
+ len = _vscprintf(fmt, args);
if (len < 0) {
*strp = NULL;
return -1;