Changed enum names (collision with windows-defined macros), fixed thread call.
This commit is contained in:
parent
bd8d314c29
commit
881d49278d
@ -81,23 +81,23 @@ typedef enum guac_composite_mode_t {
|
|||||||
*
|
*
|
||||||
* 0 = Active, 1 = Inactive
|
* 0 = Active, 1 = Inactive
|
||||||
*/
|
*/
|
||||||
/* ABCD */
|
/* ABCD */
|
||||||
/* NOT IMPL'D: 0000 */
|
/* NOT IMPL'D: 0000 */
|
||||||
RIN = 0x1, /* 0001 */
|
GUAC_COMP_RIN = 0x1, /* 0001 */
|
||||||
ROUT = 0x2, /* 0010 */
|
GUAC_COMP_ROUT = 0x2, /* 0010 */
|
||||||
DEST = 0x3, /* 0011 */
|
GUAC_COMP_DEST = 0x3, /* 0011 */
|
||||||
IN = 0x4, /* 0100 */
|
GUAC_COMP_IN = 0x4, /* 0100 */
|
||||||
/* NOT IMPL'D: 0101 */
|
/* NOT IMPL'D: 0101 */
|
||||||
ATOP = 0x6, /* 0110 */
|
GUAC_COMP_ATOP = 0x6, /* 0110 */
|
||||||
/* NOT IMPL'D: 0111 */
|
/* NOT IMPL'D: 0111 */
|
||||||
OUT = 0x8, /* 1000 */
|
GUAC_COMP_OUT = 0x8, /* 1000 */
|
||||||
RATOP = 0x9, /* 1001 */
|
GUAC_COMP_RATOP = 0x9, /* 1001 */
|
||||||
XOR = 0xA, /* 1010 */
|
GUAC_COMP_XOR = 0xA, /* 1010 */
|
||||||
ROVER = 0xB, /* 1011 */
|
GUAC_COMP_ROVER = 0xB, /* 1011 */
|
||||||
SRC = 0xC, /* 1100 */
|
GUAC_COMP_SRC = 0xC, /* 1100 */
|
||||||
/* NOT IMPL'D: 1101 */
|
/* NOT IMPL'D: 1101 */
|
||||||
OVER = 0xE, /* 1110 */
|
GUAC_COMP_OVER = 0xE, /* 1110 */
|
||||||
PLUS = 0xF /* 1111 */
|
GUAC_COMP_PLUS = 0xF /* 1111 */
|
||||||
|
|
||||||
} guac_composite_mode_t;
|
} guac_composite_mode_t;
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ void guac_sleep(int millis) {
|
|||||||
|
|
||||||
nanosleep(&sleep_period, NULL);
|
nanosleep(&sleep_period, NULL);
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
Sleep(millis)
|
Sleep(millis);
|
||||||
#else
|
#else
|
||||||
#warning No sleep/nanosleep function available. Clients may not perform as expected. Consider patching libguac to add support for your platform.
|
#warning No sleep/nanosleep function available. Clients may not perform as expected. Consider patching libguac to add support for your platform.
|
||||||
#endif
|
#endif
|
||||||
|
@ -49,7 +49,11 @@ int guac_thread_create(guac_thread_t* thread, void*(*function)(void*), void* dat
|
|||||||
return pthread_create(thread, NULL, function, data);
|
return pthread_create(thread, NULL, function, data);
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
*thread = _beginthreadex(NULL, 0,
|
*thread = _beginthreadex(NULL, 0,
|
||||||
function, data, 0 /* Create running */, NULL);
|
(unsigned(__stdcall*)(void*)) function, data,
|
||||||
|
0 /* Create running */, NULL);
|
||||||
|
if (thread == 0)
|
||||||
|
return errno;
|
||||||
|
return 0;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,7 +61,7 @@ void guac_thread_join(guac_thread_t thread) {
|
|||||||
#ifdef HAVE_LIBPTHREAD
|
#ifdef HAVE_LIBPTHREAD
|
||||||
pthread_join(thread, NULL);
|
pthread_join(thread, NULL);
|
||||||
#elif defined(__MINGW32__)
|
#elif defined(__MINGW32__)
|
||||||
WaitForSingleObject(thread, INFINITE);
|
WaitForSingleObject(&thread, INFINITE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user