windows: fix most compilation errors, linker errors and warnings left

This commit is contained in:
Marc-André Moreau
2011-08-16 20:49:46 -04:00
parent ed31248952
commit d128254159
8 changed files with 21 additions and 7 deletions

View File

@@ -59,6 +59,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
endif()
if(MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /Gz")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_X86_")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D_CRT_SECURE_NO_WARNINGS")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DWIN32_LEAN_AND_MEAN")

View File

@@ -17,12 +17,15 @@
* limitations under the License.
*/
#include <errno.h>
#include <pthread.h>
#include <stdio.h>
#ifndef _WIN32
#include <unistd.h>
#include <string.h>
#include <pthread.h>
#include <sys/select.h>
#endif
#include <errno.h>
#include <stdio.h>
#include <string.h>
#include <freerdp/gdi/gdi.h>
#include <freerdp/utils/args.h>
#include <freerdp/utils/memory.h>

View File

@@ -21,7 +21,7 @@
#define __CRYPTO_H
#ifdef _WIN32
#include <winsock.h>
#include "tcp.h"
#endif
#include <openssl/ssl.h>

View File

@@ -32,7 +32,6 @@
#include <sys/ioctl.h>
#include <sys/socket.h>
#else
#define socklen_t int
#define close(_fd) closesocket(_fd)
#endif

View File

@@ -23,7 +23,8 @@
#ifdef _WIN32
#include <winsock2.h>
#include <windows.h>
#include <Windows.h>
#include <ws2tcpip.h>
#endif
#include <freerdp/types.h>

View File

@@ -26,4 +26,6 @@ add_library(freerdp-rail SHARED ${FREERDP_RAIL_SRCS})
set_target_properties(freerdp-rail PROPERTIES VERSION ${FREERDP_VERSION_FULL} SOVERSION ${FREERDP_VERSION})
target_link_libraries(freerdp-rail freerdp-utils)
install(TARGETS freerdp-rail DESTINATION lib)

View File

@@ -50,4 +50,8 @@ set_target_properties(freerdp-utils PROPERTIES VERSION ${FREERDP_VERSION_FULL} S
target_link_libraries(freerdp-utils ${CMAKE_THREAD_LIBS_INIT})
if(WIN32)
target_link_libraries(freerdp-utils ws2_32)
endif()
install(TARGETS freerdp-utils DESTINATION lib)

View File

@@ -19,6 +19,10 @@
#include <freerdp/utils/registry.h>
#ifdef _WIN32
#include <windows.h>
#endif
static char registry_dir[] = "freerdp";
static char registry_file[] = "config.txt";