From 15cee04fb84d7fe27782890cc22f11b41fc540f3 Mon Sep 17 00:00:00 2001 From: Petr Stetiar Date: Wed, 20 Jul 2011 09:59:29 +0200 Subject: Make it compile on Windows again Signed-off-by: Petr Stetiar --- include/freerdp/utils/profiler.h | 18 +++++++++--------- libfreerdp-chanman/libchanman.c | 2 +- libfreerdp-core/ntlmssp.c | 4 ++++ libfreerdp-rfx/rfx_decode.c | 4 ++++ libfreerdp-utils/unicode.c | 3 +++ win/libfreerdp-core.vcxproj | 14 ++++++++------ win/libfreerdp-rfx.vcxproj | 1 - win/libfreerdp-utils.vcxproj | 2 ++ win/wfreerdp/wfreerdp.vcxproj | 2 +- 9 files changed, 32 insertions(+), 18 deletions(-) diff --git a/include/freerdp/utils/profiler.h b/include/freerdp/utils/profiler.h index 1a149c1..22767cd 100644 --- a/include/freerdp/utils/profiler.h +++ b/include/freerdp/utils/profiler.h @@ -57,15 +57,15 @@ void profiler_print_footer(); #define PROFILER_PRINT(prof) profiler_print(prof) #define PROFILER_PRINT_FOOTER profiler_print_footer() #else -#define IF_PROFILER(then) ; -#define PROFILER_DEFINE(prof) ; -#define PROFILER_CREATE(prof,name) ; -#define PROFILER_FREE(prof) ; -#define PROFILER_ENTER(prof) ; -#define PROFILER_EXIT(prof) ; -#define PROFILER_PRINT_HEADER ; -#define PROFILER_PRINT(prof) ; -#define PROFILER_PRINT_FOOTER ; +#define IF_PROFILER +#define PROFILER_DEFINE(prof) void *prof +#define PROFILER_CREATE +#define PROFILER_FREE +#define PROFILER_ENTER +#define PROFILER_EXIT +#define PROFILER_PRINT_HEADER +#define PROFILER_PRINT +#define PROFILER_PRINT_FOOTER #endif #endif /* __UTILS_PROFILER_H */ diff --git a/libfreerdp-chanman/libchanman.c b/libfreerdp-chanman/libchanman.c index 1a82743..03b34ec 100644 --- a/libfreerdp-chanman/libchanman.c +++ b/libfreerdp-chanman/libchanman.c @@ -43,7 +43,7 @@ #define MUTEX_UNLOCK(m) ReleaseMutex(m) #define MUTEX_DESTROY(m) CloseHandle(m) #define SEMAPHORE HANDLE -#define SEMAPHORE_INIT(s, i, m) s = CreateSemaphore(NULL, i, m, NULL) +#define SEMAPHORE_INIT(s, m) s = CreateSemaphore(NULL, m, 1<<16, NULL) #define SEMAPHORE_WAIT(s) WaitForSingleObject(s, INFINITE) #define SEMAPHORE_POST(s) ReleaseSemaphore(s, 1, NULL) #define SEMAPHORE_DESTROY(s) CloseHandle(s) diff --git a/libfreerdp-core/ntlmssp.c b/libfreerdp-core/ntlmssp.c index e1916b5..b89fed2 100644 --- a/libfreerdp-core/ntlmssp.c +++ b/libfreerdp-core/ntlmssp.c @@ -17,6 +17,10 @@ limitations under the License. */ +#ifdef WIN32 +#define _WINSOCKAPI_ +#endif + #include #include #include diff --git a/libfreerdp-rfx/rfx_decode.c b/libfreerdp-rfx/rfx_decode.c index 8dc8853..c57dba3 100644 --- a/libfreerdp-rfx/rfx_decode.c +++ b/libfreerdp-rfx/rfx_decode.c @@ -27,7 +27,11 @@ #include "rfx_decode.h" +#ifdef WIN32 +static __inline void +#else static __inline void __attribute__((__gnu_inline__, __always_inline__, __artificial__)) +#endif rfx_decode_format_RGB(sint16 * r_buf, sint16 * g_buf, sint16 * b_buf, RFX_PIXEL_FORMAT pixel_format, uint8 * dst_buf) { diff --git a/libfreerdp-utils/unicode.c b/libfreerdp-utils/unicode.c index c4c6fc7..13cdc4c 100644 --- a/libfreerdp-utils/unicode.c +++ b/libfreerdp-utils/unicode.c @@ -17,7 +17,10 @@ limitations under the License. */ +#ifdef HAVE_CONFIG_H #include "config.h" +#endif + #include #include diff --git a/win/libfreerdp-core.vcxproj b/win/libfreerdp-core.vcxproj index 7eddeef..6525718 100644 --- a/win/libfreerdp-core.vcxproj +++ b/win/libfreerdp-core.vcxproj @@ -47,7 +47,7 @@ Disabled - ..\include;C:\OpenSSL\include;..\libfreerdp-asn1;..\libfreerdp-core + ..\include;..\..\openssl\build\win32-static\include;..\libfreerdp-asn1;..\libfreerdp-core WIN32;_DEBUG;_WINDOWS;_USRDLL;FREERDP_EXPORTS;FREERDP_CHANMAN_EXPORTS;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;L_ENDIAN;EXT_PATH="extensions";%(PreprocessorDefinitions) true EnableFastChecks @@ -60,7 +60,7 @@ ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - C:\OpenSSL\lib;%(AdditionalLibraryDirectories) + ..\..\openssl\build\win32-static\lib;%(AdditionalLibraryDirectories) true Windows MachineX86 @@ -70,7 +70,7 @@ MaxSpeed true - ..\include;..;C:\OpenSSL\include;%(AdditionalIncludeDirectories) + ..\include;..\..\openssl\build\win32-static\include;..\libfreerdp-asn1;..\libfreerdp-core WIN32;NDEBUG;_WINDOWS;_USRDLL;FREERDP_EXPORTS;_CRT_SECURE_NO_WARNINGS;L_ENDIAN;EXT_PATH="extensions";%(PreprocessorDefinitions) MultiThreadedDLL true @@ -81,7 +81,7 @@ ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies) - C:\OpenSSL\lib;%(AdditionalLibraryDirectories) + ..\..\openssl\build\win32-static\lib;%(AdditionalLibraryDirectories) true Windows true @@ -95,6 +95,7 @@ + @@ -104,12 +105,13 @@ + - + @@ -137,7 +139,7 @@ - + diff --git a/win/libfreerdp-rfx.vcxproj b/win/libfreerdp-rfx.vcxproj index cf3b432..80d1237 100644 --- a/win/libfreerdp-rfx.vcxproj +++ b/win/libfreerdp-rfx.vcxproj @@ -22,7 +22,6 @@ - diff --git a/win/libfreerdp-utils.vcxproj b/win/libfreerdp-utils.vcxproj index 7cf6ba9..1d9c10f 100644 --- a/win/libfreerdp-utils.vcxproj +++ b/win/libfreerdp-utils.vcxproj @@ -73,8 +73,10 @@ + + diff --git a/win/wfreerdp/wfreerdp.vcxproj b/win/wfreerdp/wfreerdp.vcxproj index d6660f7..34475e6 100644 --- a/win/wfreerdp/wfreerdp.vcxproj +++ b/win/wfreerdp/wfreerdp.vcxproj @@ -70,7 +70,7 @@ MaxSpeed true - ..\..\libgdi;..\..\include;%(AdditionalIncludeDirectories) + ..\..\libfreerdp-gdi;..\..\libfreerdp-rfx;..\..\include WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;PACKAGE_VERSION="unknown";%(PreprocessorDefinitions) MultiThreadedDLL true -- cgit v1.2.3