aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndreas Schneider <asn@cryptomilk.org>2016-11-06 11:57:52 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-11-06 11:57:52 +0100
commit5d1a8cd88b396e895fdda9059a3795303747aaa3 (patch)
treebbcc7d024b7f282296f161b6f62ae70755df4002 /src
parent528b9c5323c61e65877c5fa0dd0f5444edccc981 (diff)
downloadlibssh-5d1a8cd88b396e895fdda9059a3795303747aaa3.tar.gz
libssh-5d1a8cd88b396e895fdda9059a3795303747aaa3.tar.xz
libssh-5d1a8cd88b396e895fdda9059a3795303747aaa3.zip
cmake: Check for io.h on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'src')
-rw-r--r--src/connector.c4
-rw-r--r--src/misc.c6
-rw-r--r--src/pki.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/src/connector.c b/src/connector.c
index b2f03abd..54e85241 100644
--- a/src/connector.c
+++ b/src/connector.c
@@ -27,7 +27,7 @@
#define CHUNKSIZE 4096
#ifdef _WIN32
-# if _MSC_VER >= 1400
+# ifdef HAVE_IO_H
# include <io.h>
# undef open
# define open _open
@@ -37,7 +37,7 @@
# define read _read
# undef unlink
# define unlink _unlink
-# endif /* _MSC_VER */
+# endif /* HAVE_IO_H */
#endif
struct ssh_connector_struct {
diff --git a/src/misc.c b/src/misc.c
index a3aa1b93..fe62b448 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -59,9 +59,9 @@
#include <shlobj.h>
#include <direct.h>
-#if _MSC_VER >= 1400
-# include <io.h>
-#endif /* _MSC_VER */
+#ifdef HAVE_IO_H
+#include <io.h>
+#endif /* HAVE_IO_H */
#endif /* _WIN32 */
diff --git a/src/pki.c b/src/pki.c
index 1469a68d..36e3c0cd 100644
--- a/src/pki.c
+++ b/src/pki.c
@@ -41,7 +41,7 @@
#include <sys/types.h>
#ifdef _WIN32
-# if _MSC_VER >= 1400
+# ifdef HAVE_IO_H
# include <io.h>
# undef open
# define open _open
@@ -51,7 +51,7 @@
# define read _read
# undef unlink
# define unlink _unlink
-# endif /* _MSC_VER */
+# endif /* HAVE_IO_H */
#endif
#include "libssh/libssh.h"