freerdp: fix build and warnings on Mac OS X
This commit is contained in:
parent
71a205a21e
commit
fe34a529d5
1
.gitignore
vendored
1
.gitignore
vendored
@ -41,6 +41,7 @@ client/X11/xfreerdp.1
|
||||
# Mac OS X
|
||||
.DS_Store
|
||||
*.xcodeproj/
|
||||
DerivedData/
|
||||
|
||||
# Windows
|
||||
*.vcxproj
|
||||
|
@ -27,6 +27,6 @@ set_target_properties(${MODULE_NAME} PROPERTIES PREFIX "")
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set_property(TARGET ${MODULE_NAME} PROPERTY FOLDER "Channels/${CHANNEL_NAME}/Server")
|
||||
|
@ -284,7 +284,8 @@ static void* audin_server_thread_func(void* arg)
|
||||
/* Wait for the client to confirm that the Audio Input dynamic channel is ready */
|
||||
while (1)
|
||||
{
|
||||
freerdp_thread_wait(thread);
|
||||
if (freerdp_thread_wait(thread) < 0)
|
||||
break;
|
||||
|
||||
if (freerdp_thread_is_stopped(thread))
|
||||
break;
|
||||
@ -309,7 +310,8 @@ static void* audin_server_thread_func(void* arg)
|
||||
|
||||
while (ready)
|
||||
{
|
||||
freerdp_thread_wait(thread);
|
||||
if (freerdp_thread_wait(thread) < 0)
|
||||
break;
|
||||
|
||||
if (freerdp_thread_is_stopped(thread))
|
||||
break;
|
||||
|
@ -268,7 +268,8 @@ static void* parallel_thread_func(void* arg)
|
||||
|
||||
while (1)
|
||||
{
|
||||
freerdp_thread_wait(parallel->thread);
|
||||
if (freerdp_thread_wait(parallel->thread) < 0)
|
||||
break;
|
||||
|
||||
if (freerdp_thread_is_stopped(parallel->thread))
|
||||
break;
|
||||
|
@ -184,7 +184,8 @@ static void* rdpsnd_server_thread_func(void* arg)
|
||||
|
||||
while (1)
|
||||
{
|
||||
freerdp_thread_wait(thread);
|
||||
if (freerdp_thread_wait(thread) < 0)
|
||||
break;
|
||||
|
||||
if (freerdp_thread_is_stopped(thread))
|
||||
break;
|
||||
|
@ -341,7 +341,8 @@ static void* serial_thread_func(void* arg)
|
||||
|
||||
while (1)
|
||||
{
|
||||
freerdp_thread_wait_timeout(serial->thread, 500);
|
||||
if (freerdp_thread_wait_timeout(serial->thread, 500) < 0)
|
||||
break;
|
||||
|
||||
serial->nfds = 1;
|
||||
FD_ZERO(&serial->read_fds);
|
||||
|
@ -35,7 +35,7 @@ set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${FREERDP_VERSION} SOVER
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE freerdp
|
||||
MODULES freerdp-utils)
|
||||
MODULES freerdp-codec freerdp-utils)
|
||||
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
|
@ -2159,9 +2159,8 @@ void mac_process_rail_exec_result_event(rdpChannels* channels, RDP_EVENT* event)
|
||||
|
||||
void mac_process_rail_server_minmaxinfo_event(rdpChannels* channels, RDP_EVENT* event)
|
||||
{
|
||||
RAIL_MINMAXINFO_ORDER * minmax = (RAIL_MINMAXINFO_ORDER*) event->user_data;
|
||||
|
||||
#if 0
|
||||
RAIL_MINMAXINFO_ORDER * minmax = (RAIL_MINMAXINFO_ORDER*) event->user_data;
|
||||
printf("minmax_info: maxPosX=%d maxPosY=%d maxWidth=%d maxHeight=%d minTrackWidth=%d minTrackHeight=%d maxTrackWidth=%d maxTrackHeight=%d\n",
|
||||
minmax->maxPosX, minmax->maxPosY, minmax->maxWidth, minmax->maxHeight,
|
||||
minmax->minTrackWidth, minmax->minTrackHeight, minmax->maxTrackWidth, minmax->maxTrackHeight);
|
||||
@ -2225,9 +2224,6 @@ void mac_process_rail_server_localmovesize_event(freerdp *inst, RDP_EVENT *event
|
||||
[g_mrdpview->currentWindow view]->isMoveSizeInProgress = NO;
|
||||
[g_mrdpview->currentWindow view]->saveInitialDragLoc = NO;
|
||||
|
||||
//NSRect rect = [[g_mrdpview->currentWindow view] frame];
|
||||
NSRect rect = [[[g_mrdpview->currentWindow view] window] frame];
|
||||
|
||||
// let RDP server know where this window is located
|
||||
mac_send_rail_client_event(inst->context->channels, RDP_EVENT_TYPE_RAIL_CLIENT_WINDOW_MOVE, &windowMove);
|
||||
|
||||
|
@ -27,6 +27,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <winpr/crt.h>
|
||||
|
||||
#include <freerdp/utils/file.h>
|
||||
#include <freerdp/locale/vkcodes.h>
|
||||
#include <freerdp/locale/keyboard.h>
|
||||
@ -128,7 +130,7 @@ int freerdp_keyboard_load_map(UINT32 keycode_to_vkcode[256], char* name)
|
||||
keycode = atoi(keycode_string);
|
||||
|
||||
/* Make sure it is a valid keycode */
|
||||
if (keycode < 0 || keycode > 255)
|
||||
if (keycode > 255)
|
||||
break;
|
||||
|
||||
/* Load this key mapping in the keyboard mapping */
|
||||
@ -185,7 +187,7 @@ void freerdp_keyboard_load_maps(UINT32 keycode_to_vkcode[256], char* names)
|
||||
char* names_end;
|
||||
int keymap_loaded = 0;
|
||||
|
||||
memset(keycode_to_vkcode, 0, sizeof(keycode_to_vkcode));
|
||||
ZeroMemory(keycode_to_vkcode, sizeof(UINT32) * 256);
|
||||
|
||||
kbd = names;
|
||||
names_end = names + strlen(names);
|
||||
|
@ -481,7 +481,7 @@ UINT32 freerdp_keyboard_init_x11(UINT32 keyboardLayoutId, RDP_SCANCODE x11_keyco
|
||||
UINT32 keycode_to_vkcode[256];
|
||||
|
||||
ZeroMemory(keycode_to_vkcode, sizeof(keycode_to_vkcode));
|
||||
ZeroMemory(x11_keycode_to_rdp_scancode, sizeof(x11_keycode_to_rdp_scancode));
|
||||
ZeroMemory(x11_keycode_to_rdp_scancode, sizeof(RDP_SCANCODE) * 256);
|
||||
|
||||
#ifdef __APPLE__
|
||||
/* Apple X11 breaks XKB detection */
|
||||
|
@ -62,7 +62,7 @@ endif()
|
||||
set_complex_link_libraries(VARIABLE ${MODULE_PREFIX}_LIBS
|
||||
MONOLITHIC ${MONOLITHIC_BUILD}
|
||||
MODULE winpr
|
||||
MODULES winpr-crt winpr-synch winpr-thread)
|
||||
MODULES winpr-crt winpr-synch winpr-thread winpr-utils)
|
||||
|
||||
if(MONOLITHIC_BUILD)
|
||||
set(FREERDP_LIBS ${FREERDP_LIBS} ${${MODULE_PREFIX}_LIBS} PARENT_SCOPE)
|
||||
|
@ -31,7 +31,7 @@ add_complex_library(MODULE ${MODULE_NAME} TYPE "OBJECT"
|
||||
|
||||
set_target_properties(${MODULE_NAME} PROPERTIES VERSION ${WINPR_VERSION_FULL} SOVERSION ${WINPR_VERSION} PREFIX "lib")
|
||||
|
||||
if(NOT WIN32)
|
||||
if((NOT WIN32) AND (NOT APPLE))
|
||||
set(${MODULE_PREFIX}_LIBS ${${MODULE_PREFIX}_LIBS} rt)
|
||||
endif()
|
||||
|
||||
|
@ -116,13 +116,10 @@ BOOL CountdownEvent_Signal(wCountdownEvent* countdown, DWORD signalCount)
|
||||
if (WaitForSingleObject(countdown->event, 0) == WAIT_OBJECT_0)
|
||||
oldStatus = TRUE;
|
||||
|
||||
countdown->count -= signalCount;
|
||||
|
||||
if (countdown->count < 0)
|
||||
{
|
||||
printf("CountdownEvent_Signal warning: count is less than zero\n");
|
||||
if (signalCount <= countdown->count)
|
||||
countdown->count -= signalCount;
|
||||
else
|
||||
countdown->count = 0;
|
||||
}
|
||||
|
||||
if (countdown->count == 0)
|
||||
newStatus = TRUE;
|
||||
|
Loading…
Reference in New Issue
Block a user