From 4b78390eda6b3b6c5757f44ba62839b6db56a500 Mon Sep 17 00:00:00 2001 From: Thomas Radke Date: Sat, 28 Oct 2000 14:19:39 -0500 Subject: [svn-r2750] Purpose: Port to Windows. Description: The stream_test program now also compiles and can be run under Windows. Solution: The problem was that fork(2) and waitpid(2) aren't available under Windows when using the MS compilers. So I test for both H5_HAVE_FORK and H5_HAVE_WAITPID. These are already checked fortunately during configuration. If they are not there the code just says printf ("Test skipped because this architecture doesn't provide " "fork(2) and waitpid(2)\n"); Platforms tested: Windows NT, both with MS Visual C++ and GNU cc Now you can build and run the Stream VFD testsuite under Windows when using GNU cc !! --- test/stream_test.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/test/stream_test.c b/test/stream_test.c index a29a0c1..239c2c6 100644 --- a/test/stream_test.c +++ b/test/stream_test.c @@ -6,7 +6,11 @@ * Author: Thomas Radke * Tuesday, September 12, 2000 * + * Version: $Id$ + * * Modifications: + * Thomas Radke, Thursday, October 26, 2000 + * Made it compiling under Windows. * */ @@ -28,23 +32,34 @@ * processes and returns their exit code. */ -#include -#include #include -#include - -#include +#include #ifndef H5_HAVE_STREAM int main (void) { - printf ("Test skipped because Stream Virtual File Driver not available\n"); - return (0); + printf ("Test skipped because Stream Virtual File Driver not available\n"); + return (0); +} + +#elif ! defined (H5_HAVE_FORK) || ! defined (H5_HAVE_WAITPID) + +int main (void) +{ + printf ("Test skipped because this architecture doesn't provide " + "fork(2) and waitpid(2)\n"); + return (0); } #else +#include +#include +#include +#include + + #define DELAY 10 /* sleeping time in seconds */ #define RANK 2 /* sample dataset rank */ #define DIMS 50 /* sample dataset dimensions */ -- cgit v0.12