Skip to content

Commit

Permalink
Make it compile on Windows again
Browse files Browse the repository at this point in the history
Signed-off-by: Petr Stetiar <[email protected]>
  • Loading branch information
ynezz committed Jul 20, 2011
1 parent 8bb6c03 commit 15cee04
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 18 deletions.
18 changes: 9 additions & 9 deletions include/freerdp/utils/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
2 changes: 1 addition & 1 deletion libfreerdp-chanman/libchanman.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 4 additions & 0 deletions libfreerdp-core/ntlmssp.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
limitations under the License.
*/

#ifdef WIN32
#define _WINSOCKAPI_
#endif

#include <time.h>
#include <openssl/des.h>
#include <openssl/md4.h>
Expand Down
4 changes: 4 additions & 0 deletions libfreerdp-rfx/rfx_decode.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
3 changes: 3 additions & 0 deletions libfreerdp-utils/unicode.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@
limitations under the License.
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <errno.h>
#include <freerdp/utils/memory.h>

Expand Down
14 changes: 8 additions & 6 deletions win/libfreerdp-core.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\include;C:\OpenSSL\include;..\libfreerdp-asn1;..\libfreerdp-core</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\include;..\..\openssl\build\win32-static\include;..\libfreerdp-asn1;..\libfreerdp-core</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FREERDP_EXPORTS;FREERDP_CHANMAN_EXPORTS;WIN32_LEAN_AND_MEAN;_CRT_SECURE_NO_WARNINGS;L_ENDIAN;EXT_PATH="extensions";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
Expand All @@ -60,7 +60,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\OpenSSL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>..\..\openssl\build\win32-static\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<TargetMachine>MachineX86</TargetMachine>
Expand All @@ -70,7 +70,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\include;..;C:\OpenSSL\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\include;..\..\openssl\build\win32-static\include;..\libfreerdp-asn1;..\libfreerdp-core</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FREERDP_EXPORTS;_CRT_SECURE_NO_WARNINGS;L_ENDIAN;EXT_PATH="extensions";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand All @@ -81,7 +81,7 @@
</ClCompile>
<Link>
<AdditionalDependencies>ws2_32.lib;libeay32.lib;ssleay32.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>C:\OpenSSL\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories>..\..\openssl\build\win32-static\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
Expand All @@ -95,6 +95,7 @@
<ClCompile Include="..\libfreerdp-core\cache.c" />
<ClCompile Include="..\libfreerdp-core\capabilities.c" />
<ClCompile Include="..\libfreerdp-core\chan.c" />
<ClCompile Include="..\libfreerdp-core\connect.c" />
<ClCompile Include="..\libfreerdp-core\credssp.c" />
<ClCompile Include="..\libfreerdp-core\crypto\openssl.c" />
<ClCompile Include="..\libfreerdp-core\ext.c" />
Expand All @@ -104,12 +105,13 @@
<ClCompile Include="..\libfreerdp-core\mcs.c" />
<ClCompile Include="..\libfreerdp-core\mppc.c" />
<ClCompile Include="..\libfreerdp-core\nego.c" />
<ClCompile Include="..\libfreerdp-core\network.c" />
<ClCompile Include="..\libfreerdp-core\ntlmssp.c" />
<ClCompile Include="..\libfreerdp-core\orders.c" />
<ClCompile Include="..\libfreerdp-core\pstcache.c" />
<ClCompile Include="..\libfreerdp-core\rail.c" />
<ClCompile Include="..\libfreerdp-core\rdp.c" />
<ClCompile Include="..\libfreerdp-core\secure.c" />
<ClCompile Include="..\libfreerdp-core\security.c" />
<ClCompile Include="..\libfreerdp-core\stream.c" />
<ClCompile Include="..\libfreerdp-core\surface.c" />
<ClCompile Include="..\libfreerdp-core\tcp.c" />
Expand Down Expand Up @@ -137,7 +139,7 @@
<ClInclude Include="..\libfreerdp-core\pstcache.h" />
<ClInclude Include="..\libfreerdp-core\rail.h" />
<ClInclude Include="..\libfreerdp-core\rdp.h" />
<ClInclude Include="..\libfreerdp-core\secure.h" />
<ClInclude Include="..\libfreerdp-core\security.h" />
<ClInclude Include="..\libfreerdp-core\stream.h" />
<ClInclude Include="..\libfreerdp-core\surface.h" />
<ClInclude Include="..\libfreerdp-core\tcp.h" />
Expand Down
1 change: 0 additions & 1 deletion win/libfreerdp-rfx.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
<ClInclude Include="..\libfreerdp-rfx\rfx_rlgr.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\libfreerdp-rfx\rfx.c" />
<ClCompile Include="..\libfreerdp-rfx\rfx_bitstream.c" />
<ClCompile Include="..\libfreerdp-rfx\rfx_decode.c" />
<ClCompile Include="..\libfreerdp-rfx\rfx_differential.c" />
Expand Down
2 changes: 2 additions & 0 deletions win/libfreerdp-utils.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\libfreerdp-utils\datablob.c" />
<ClCompile Include="..\libfreerdp-utils\hexdump.c" />
<ClCompile Include="..\libfreerdp-utils\memory.c" />
<ClCompile Include="..\libfreerdp-utils\unicode.c" />
<ClCompile Include="..\libfreerdp-utils\usleep.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
2 changes: 1 addition & 1 deletion win/wfreerdp/wfreerdp.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>..\..\libgdi;..\..\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>..\..\libfreerdp-gdi;..\..\libfreerdp-rfx;..\..\include</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_WARNINGS;PACKAGE_VERSION="unknown";%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
Expand Down

0 comments on commit 15cee04

Please sign in to comment.