summaryrefslogtreecommitdiff
path: root/infrastructure/buildenv-testmain-template.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'infrastructure/buildenv-testmain-template.cpp')
-rw-r--r--infrastructure/buildenv-testmain-template.cpp17
1 files changed, 16 insertions, 1 deletions
diff --git a/infrastructure/buildenv-testmain-template.cpp b/infrastructure/buildenv-testmain-template.cpp
index 36cc4da0..f95f01e6 100644
--- a/infrastructure/buildenv-testmain-template.cpp
+++ b/infrastructure/buildenv-testmain-template.cpp
@@ -20,11 +20,16 @@
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
-#include <syslog.h>
#include <stdarg.h>
#include <fcntl.h>
#include <errno.h>
+#ifdef WIN32
+ #include "emu.h"
+#else
+ #include <syslog.h>
+#endif
+
#include "MemLeakFindOn.h"
int test(int argc, const char *argv[]);
@@ -39,6 +44,14 @@ int failures = 0;
int filedes_open_at_beginning = -1;
+#ifdef WIN32
+
+// any way to check for open file descriptors on Win32?
+inline int count_filedes() { return 0; }
+inline bool checkfilesleftopen() { return false; }
+
+#else // !WIN32
+
int count_filedes()
{
int c = 0;
@@ -71,6 +84,8 @@ bool checkfilesleftopen()
return filedes_open_at_beginning != count_filedes();
}
+#endif
+
int main(int argc, const char *argv[])
{
// Start memory leak testing