xfreerdp: fix including from C++
authorMarc-André Moreau <marcandre.moreau@gmail.com>
Wed, 3 Apr 2013 22:48:59 +0000 (18:48 -0400)
committerMarc-André Moreau <marcandre.moreau@gmail.com>
Wed, 3 Apr 2013 22:48:59 +0000 (18:48 -0400)
client/X11/xf_interface.c
client/X11/xf_interface.h
winpr/include/winpr/stream.h

index eb72b59..9d71689 100644 (file)
@@ -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]);
        }
 
index f5d8336..69500ab 100644 (file)
@@ -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 */
index d68ec31..3c0924e 100644 (file)
@@ -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;