From 7b2f70c0c7b56b3d444cba653edee34aab22a41a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Moreau?= Date: Wed, 3 Apr 2013 18:48:59 -0400 Subject: [PATCH] xfreerdp: fix including from C++ --- client/X11/xf_interface.c | 1 + client/X11/xf_interface.h | 8 ++++++++ winpr/include/winpr/stream.h | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/client/X11/xf_interface.c b/client/X11/xf_interface.c index eb72b59e5..9d71689a7 100644 --- a/client/X11/xf_interface.c +++ b/client/X11/xf_interface.c @@ -1520,6 +1520,7 @@ xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv) for (index = 0; index < argc; index++) { + printf("argv[%d]: %s\n", index, argv[index]); instance->context->argv[index] = _strdup(argv[index]); } diff --git a/client/X11/xf_interface.h b/client/X11/xf_interface.h index f5d833656..69500abb6 100644 --- a/client/X11/xf_interface.h +++ b/client/X11/xf_interface.h @@ -39,6 +39,10 @@ typedef struct xf_info xfInfo; #include "xf_window.h" #include "xf_monitor.h" +#ifdef __cplusplus +extern "C" { +#endif + struct xf_WorkArea { UINT32 x; @@ -236,4 +240,8 @@ FREERDP_API int xf_stop(xfInfo* xfi); FREERDP_API xfInfo* xf_new(HANDLE hInstance, HANDLE hWndParent, int argc, char** argv); FREERDP_API void xf_free(xfInfo* xfi); +#ifdef __cplusplus +} +#endif + #endif /* __XF_INTERFACE_H */ diff --git a/winpr/include/winpr/stream.h b/winpr/include/winpr/stream.h index d68ec31ef..3c0924eb0 100644 --- a/winpr/include/winpr/stream.h +++ b/winpr/include/winpr/stream.h @@ -331,7 +331,7 @@ WINPR_API void stream_extend(wStream* stream, int request_size); } while (0) static INLINE BOOL stream_skip(wStream* s, int sz) { - if (stream_get_left(s) < sz) + if ((int) stream_get_left(s) < sz) return FALSE; stream_seek(s, sz); return TRUE;