mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-01-30 15:32:37 +08:00
[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 !!
This commit is contained in:
parent
9c93282d1b
commit
4b78390eda
@ -6,7 +6,11 @@
|
|||||||
* Author: Thomas Radke <tradke@aei-potsdam.mpg.de>
|
* Author: Thomas Radke <tradke@aei-potsdam.mpg.de>
|
||||||
* Tuesday, September 12, 2000
|
* Tuesday, September 12, 2000
|
||||||
*
|
*
|
||||||
|
* Version: $Id$
|
||||||
|
*
|
||||||
* Modifications:
|
* Modifications:
|
||||||
|
* Thomas Radke, Thursday, October 26, 2000
|
||||||
|
* Made it compiling under Windows.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -28,23 +32,34 @@
|
|||||||
* processes and returns their exit code.
|
* processes and returns their exit code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <hdf5.h>
|
||||||
|
|
||||||
#include <h5test.h>
|
|
||||||
|
|
||||||
#ifndef H5_HAVE_STREAM
|
#ifndef H5_HAVE_STREAM
|
||||||
|
|
||||||
int main (void)
|
int main (void)
|
||||||
{
|
{
|
||||||
printf ("Test skipped because Stream Virtual File Driver not available\n");
|
printf ("Test skipped because Stream Virtual File Driver not available\n");
|
||||||
return (0);
|
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
|
#else
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <sys/wait.h>
|
||||||
|
|
||||||
|
|
||||||
#define DELAY 10 /* sleeping time in seconds */
|
#define DELAY 10 /* sleeping time in seconds */
|
||||||
#define RANK 2 /* sample dataset rank */
|
#define RANK 2 /* sample dataset rank */
|
||||||
#define DIMS 50 /* sample dataset dimensions */
|
#define DIMS 50 /* sample dataset dimensions */
|
||||||
|
Loading…
Reference in New Issue
Block a user