libwinpr: fix compilation on Windows

This commit is contained in:
Marc-André Moreau 2012-09-28 18:10:37 -04:00
parent 0df7bcf632
commit 03b19c3f30
4 changed files with 11 additions and 10 deletions

View File

@ -24,6 +24,5 @@ set(${MODULE_PREFIX}_SRCS
if(WITH_MONOLITHIC_BUILD)
set(${MODULE_PREFIX}_LIBS freerdp PARENT_SCOPE)
else()
set(${MODULE_PREFIX}_LIBS freerdp-utils PARENT_SCOPE)
set(${MODULE_PREFIX}_LIBS freerdp-utils freerdp-channels PARENT_SCOPE)
endif()

View File

@ -21,6 +21,8 @@
#include "config.h"
#endif
#include <stdio.h>
#include <winpr/windows.h>
#include <freerdp/freerdp.h>

View File

@ -23,6 +23,8 @@
#include <winpr/winpr.h>
#include <winpr/wtypes.h>
#ifndef _WIN32
typedef HANDLE DLL_DIRECTORY_COOKIE;
#define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x00000200
@ -34,8 +36,6 @@ WINPR_API DLL_DIRECTORY_COOKIE AddDllDirectory(PCWSTR NewDirectory);
WINPR_API BOOL RemoveDllDirectory(DLL_DIRECTORY_COOKIE Cookie);
WINPR_API BOOL SetDefaultDllDirectories(DWORD DirectoryFlags);
#ifndef _WIN32
WINPR_API HMODULE LoadLibraryA(LPCSTR lpLibFileName);
WINPR_API HMODULE LoadLibraryW(LPCWSTR lpLibFileName);

View File

@ -58,6 +58,12 @@
* SizeofResource
*/
#ifndef _WIN32
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
DLL_DIRECTORY_COOKIE AddDllDirectory(PCWSTR NewDirectory)
{
return NULL;
@ -73,12 +79,6 @@ BOOL SetDefaultDllDirectories(DWORD DirectoryFlags)
return TRUE;
}
#ifndef _WIN32
#include <dlfcn.h>
#include <stdio.h>
#include <unistd.h>
HMODULE LoadLibraryA(LPCSTR lpLibFileName)
{
HMODULE library;