cmake: Check for io.h on Windows
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
родитель
528b9c5323
Коммит
5d1a8cd88b
@ -65,6 +65,8 @@ check_include_file(arpa/inet.h HAVE_ARPA_INET_H)
|
||||
check_include_file(byteswap.h HAVE_BYTESWAP_H)
|
||||
|
||||
if (WIN32)
|
||||
check_include_file(io.h HAVE_IO_H)
|
||||
|
||||
check_include_files("winsock2.h;ws2tcpip.h;wspiapi.h" 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")
|
||||
|
@ -38,6 +38,9 @@
|
||||
/* Define to 1 if you have the <sys/utime.h> header file. */
|
||||
#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. */
|
||||
#cmakedefine HAVE_TERMIOS_H 1
|
||||
|
||||
|
@ -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 {
|
||||
|
@ -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 */
|
||||
|
||||
|
@ -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"
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user