mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-07 08:02:55 +03:00
cmake: Check for io.h on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
@@ -65,6 +65,8 @@ check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
|
|||||||
check_include_file(byteswap.h HAVE_BYTESWAP_H)
|
check_include_file(byteswap.h HAVE_BYTESWAP_H)
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
|
check_include_file(io.h HAVE_IO_H)
|
||||||
|
|
||||||
check_include_files("winsock2.h;ws2tcpip.h;wspiapi.h" HAVE_WSPIAPI_H)
|
check_include_files("winsock2.h;ws2tcpip.h;wspiapi.h" HAVE_WSPIAPI_H)
|
||||||
if (NOT HAVE_WSPIAPI_H)
|
if (NOT HAVE_WSPIAPI_H)
|
||||||
message(STATUS "WARNING: Without wspiapi.h, this build will only work on Windows XP and newer versions")
|
message(STATUS "WARNING: Without wspiapi.h, this build will only work on Windows XP and newer versions")
|
||||||
|
@@ -38,6 +38,9 @@
|
|||||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||||
#cmakedefine HAVE_SYS_UTIME_H 1
|
#cmakedefine HAVE_SYS_UTIME_H 1
|
||||||
|
|
||||||
|
/* Define to 1 if you have the <io.h> header file. */
|
||||||
|
#cmakedefine HAVE_IO_H 1
|
||||||
|
|
||||||
/* Define to 1 if you have the <termios.h> header file. */
|
/* Define to 1 if you have the <termios.h> header file. */
|
||||||
#cmakedefine HAVE_TERMIOS_H 1
|
#cmakedefine HAVE_TERMIOS_H 1
|
||||||
|
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
#define CHUNKSIZE 4096
|
#define CHUNKSIZE 4096
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# if _MSC_VER >= 1400
|
# ifdef HAVE_IO_H
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# undef open
|
# undef open
|
||||||
# define open _open
|
# define open _open
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
# define read _read
|
# define read _read
|
||||||
# undef unlink
|
# undef unlink
|
||||||
# define unlink _unlink
|
# define unlink _unlink
|
||||||
# endif /* _MSC_VER */
|
# endif /* HAVE_IO_H */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct ssh_connector_struct {
|
struct ssh_connector_struct {
|
||||||
|
@@ -59,9 +59,9 @@
|
|||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
|
|
||||||
#if _MSC_VER >= 1400
|
#ifdef HAVE_IO_H
|
||||||
# include <io.h>
|
#include <io.h>
|
||||||
#endif /* _MSC_VER */
|
#endif /* HAVE_IO_H */
|
||||||
|
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
@@ -41,7 +41,7 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# if _MSC_VER >= 1400
|
# ifdef HAVE_IO_H
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# undef open
|
# undef open
|
||||||
# define open _open
|
# define open _open
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
# define read _read
|
# define read _read
|
||||||
# undef unlink
|
# undef unlink
|
||||||
# define unlink _unlink
|
# define unlink _unlink
|
||||||
# endif /* _MSC_VER */
|
# endif /* HAVE_IO_H */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "libssh/libssh.h"
|
#include "libssh/libssh.h"
|
||||||
|
Reference in New Issue
Block a user