changeset 986:c6f4a1d57892

added VS2005 support Lionello Lunesu <lio@lunesu.remove.com> 2006-05-02 news:e37mi9$enl$1@digitaldaemon.com
author thomask
date Wed, 03 May 2006 04:54:22 +0000
parents d3038d8cb01c
children 1c9d1337cb77
files dstress.c
diffstat 1 files changed, 14 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/dstress.c	Tue May 02 04:55:18 2006 +0000
+++ b/dstress.c	Wed May 03 04:54:22 2006 +0000
@@ -129,6 +129,9 @@
 #else
 #ifdef USE_WINDOWS
 
+#include <process.h>
+typedef int pid_t;
+
 #include <windows.h>
 #define snprintf _snprintf
 #ifndef INVALID_FILE_SIZE
@@ -166,6 +169,7 @@
 #ifdef USE_WINDOWS
 #define		VALGRIND	""
 #define		TMP_DIR		".\\obj"
+#define		RM_DIR		"rd /sq"
 #else
 #error OS dependent file names not defined
 #endif
@@ -690,6 +694,16 @@
 	size_t len;
 	char* buffer;
 	int back;
+#ifdef USE_WINDOWS
+	PROCESS_INFORMATION processInfo;
+	STARTUPINFO startupInfo;
+	SECURITY_ATTRIBUTES sa = {
+		sizeof(SECURITY_ATTRIBUTES), NULL, TRUE
+	};
+	HANDLE tLogFile;
+	unsigned long exitCode;
+	int timeLeft = 600;	/* time limit in iterations of WFX loop */
+#endif
 
 	*logFile = genTempFileName();
 #ifdef USE_POSIX
@@ -717,15 +731,6 @@
 
 	return back;
 #elif defined USE_WINDOWS
-	PROCESS_INFORMATION processInfo;
-	STARTUPINFO startupInfo;
-	SECURITY_ATTRIBUTES sa = {
-		sizeof(SECURITY_ATTRIBUTES), NULL, TRUE
-	};
-	HANDLE tLogFile;
-	unsigned long exitCode;
-	int timeLeft = 600;	/* time limit in iterations of WFX loop */
-
 	memset(&processInfo, 0, sizeof(PROCESS_INFORMATION));
 	memset(&startupInfo, 0, sizeof(STARTUPINFO));
 	startupInfo.cb = sizeof(STARTUPINFO);