Merge pull request #509 from kiilerix/master
towards compiling with mingw
This commit is contained in:
commit
880052565d
@ -49,8 +49,8 @@ if(NOT CMAKE_BUILD_TYPE)
|
||||
set(CMAKE_BUILD_TYPE "Release")
|
||||
endif()
|
||||
|
||||
# build shared libs
|
||||
if(NOT BUILD_SHARED_LIBS)
|
||||
# Default to build shared libs
|
||||
if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||
set(BUILD_SHARED_LIBS ON)
|
||||
endif()
|
||||
|
||||
@ -100,7 +100,9 @@ check_include_files(inttypes.h HAVE_INTTYPES_H)
|
||||
check_struct_has_member("struct tm" tm_gmtoff time.h HAVE_TM_GMTOFF)
|
||||
|
||||
# Libraries that we have a hard dependency on
|
||||
if(NOT DEFINED OPENSSL_INCLUDE_DIR OR NOT DEFINED OPENSSL_LIBRARIES)
|
||||
find_required_package(OpenSSL)
|
||||
endif()
|
||||
|
||||
# Mac OS X
|
||||
if(APPLE)
|
||||
|
@ -69,7 +69,11 @@ typedef signed long long sint64;
|
||||
|
||||
#include <stdbool.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#define boolean BOOLEAN
|
||||
#else
|
||||
typedef int boolean;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
@ -89,7 +93,7 @@ typedef int boolean;
|
||||
|
||||
#endif /* __bool_true_false_are_defined */
|
||||
|
||||
#else
|
||||
#else /* ifdef __cplusplus */
|
||||
|
||||
#ifndef true
|
||||
#define true 1
|
||||
|
@ -22,7 +22,6 @@
|
||||
|
||||
#include <freerdp/api.h>
|
||||
#include <freerdp/types.h>
|
||||
#include <freerdp/utils/windows.h>
|
||||
|
||||
FREERDP_API int freerdp_tcp_connect(const char* hostname, int port);
|
||||
FREERDP_API int freerdp_tcp_read(int sockfd, uint8* data, int length);
|
||||
|
@ -28,8 +28,8 @@
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif
|
||||
|
||||
#include <windows.h>
|
||||
#include <winsock2.h>
|
||||
#include <windows.h>
|
||||
#include <ws2tcpip.h>
|
||||
|
||||
#endif
|
||||
|
@ -22,10 +22,6 @@
|
||||
|
||||
#include <freerdp/types.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/* Window Order Header Flags */
|
||||
#define WINDOW_ORDER_TYPE_WINDOW 0x01000000
|
||||
#define WINDOW_ORDER_TYPE_NOTIFY 0x02000000
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
#include <sys/ioctl.h>
|
||||
@ -42,13 +43,16 @@
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#else
|
||||
#else /* ifdef _WIN32 */
|
||||
|
||||
#include <freerdp/utils/windows.h>
|
||||
#define SHUT_RDWR SD_BOTH
|
||||
#define close(_fd) closesocket(_fd)
|
||||
#endif
|
||||
|
||||
#ifndef MSG_NOSIGNAL
|
||||
#define MSG_NOSIGNAL 0
|
||||
|
||||
#endif
|
||||
|
||||
int freerdp_tcp_connect(const char* hostname, int port)
|
||||
|
Loading…
Reference in New Issue
Block a user