tests: Add Windows alternatives for low level I/O

In Windows environment, there are available low level I/O operations in
io.h, such as _read(), _write(), _open(), and _close().

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2018-11-16 15:00:26 +01:00
committed by Andreas Schneider
parent a2baf6e97b
commit 7960fbaabb

View File

@@ -38,6 +38,12 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#elif (defined _WIN32) || (defined _WIN64)
#include <io.h>
#define read _read
#define open _open
#define write _write
#define close _close
#endif
#include "torture.h"