summaryrefslogtreecommitdiff
path: root/test/tinytest.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-07-28 19:41:39 +0000
committerNick Mathewson <nickm@torproject.org>2009-07-28 19:41:39 +0000
commit5b5b880be7452eaf42d401f3ad54474ae60a9dbf (patch)
treeefbb466328dea7f1b838c72e450954558a5ed1d5 /test/tinytest.c
parent12199fa7a51ee93479fa0db30c2f7b9c8159bb94 (diff)
downloadlibevent-5b5b880be7452eaf42d401f3ad54474ae60a9dbf.tar.gz
Various MSVC cleanups from Brodie Thiesfield.
svn:r1385
Diffstat (limited to 'test/tinytest.c')
-rw-r--r--test/tinytest.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/tinytest.c b/test/tinytest.c
index 19d75dd1..20f04933 100644
--- a/test/tinytest.c
+++ b/test/tinytest.c
@@ -29,6 +29,7 @@
#include <assert.h>
#ifdef WIN32
+#include <winsock2.h>
#include <windows.h>
#else
#include <sys/types.h>
@@ -36,6 +37,8 @@
#include <unistd.h>
#endif
+#include <event2/util.h>
+
#include "tinytest.h"
#include "tinytest_macros.h"
@@ -116,7 +119,7 @@ _testcase_run_forked(const struct testgroup_t *group,
if (opt_verbosity>0)
printf("[forking] ");
- snprintf(buffer, sizeof(buffer), "%s --RUNNING-FORKED %s %s%s",
+ evutil_snprintf(buffer, sizeof(buffer), "%s --RUNNING-FORKED %s %s%s",
commandname, verbosity_flag, group->prefix, testcase->name);
memset(&si, 0, sizeof(si));
@@ -245,7 +248,7 @@ _tinytest_set_flag(struct testgroup_t *groups, const char *arg, unsigned long fl
length = strstr(arg,"..")-arg;
for (i=0; groups[i].prefix; ++i) {
for (j=0; groups[i].cases[j].name; ++j) {
- snprintf(fullname, sizeof(fullname), "%s%s",
+ evutil_snprintf(fullname, sizeof(fullname), "%s%s",
groups[i].prefix, groups[i].cases[j].name);
if (!flag) /* Hack! */
printf(" %s\n", fullname);