summaryrefslogtreecommitdiff
path: root/infrastructure
diff options
context:
space:
mode:
authorMartin Ebourne <martin@ebourne.me.uk>2005-12-12 23:56:44 +0000
committerMartin Ebourne <martin@ebourne.me.uk>2005-12-12 23:56:44 +0000
commit62fcbae63de111cd2191cce3af4158af819914ee (patch)
tree67b3cf0cce33cca19b61fe8e154aefb2ca783f17 /infrastructure
parenta229c7a74ace6e26165bbb71bfe565be837e5830 (diff)
Merged 210:218 from chris/win32/merge/07-win32-fixes to trunk
Diffstat (limited to 'infrastructure')
-rw-r--r--infrastructure/buildenv-testmain-template.cpp17
-rwxr-xr-xinfrastructure/makebuildenv.pl4
2 files changed, 18 insertions, 3 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
diff --git a/infrastructure/makebuildenv.pl b/infrastructure/makebuildenv.pl
index 64c73eb0..ee0e6506 100755
--- a/infrastructure/makebuildenv.pl
+++ b/infrastructure/makebuildenv.pl
@@ -408,9 +408,9 @@ __E
}
writetestfile("$mod/_t",
- './test${platform_exe_ext} $1 $2 $3 $4 $5', $mod);
+ './test' . $platform_exe_ext . '$1 $2 $3 $4 $5', $mod);
writetestfile("$mod/_t-gdb",
- 'gdb ./test${platform_exe_ext}', $mod);
+ 'gdb ./test ' . $platform_exe_ext, $mod);
}