mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 20:30:38 +09:00
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:
committed by
Andreas Schneider
parent
a2baf6e97b
commit
7960fbaabb
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user