diff --git a/channels/ainput/server/ainput_main.c b/channels/ainput/server/ainput_main.c index 6f935afd0..20200627d 100644 --- a/channels/ainput/server/ainput_main.c +++ b/channels/ainput/server/ainput_main.c @@ -32,8 +32,9 @@ #include #include -#include +#include #include +#include #include #include "../common/ainput_common.h" diff --git a/channels/audin/client/alsa/audin_alsa.c b/channels/audin/client/alsa/audin_alsa.c index 4aed6c15d..afc9bd0bc 100644 --- a/channels/audin/client/alsa/audin_alsa.c +++ b/channels/audin/client/alsa/audin_alsa.c @@ -33,6 +33,7 @@ #include +#include #include #include diff --git a/channels/audin/client/opensles/audin_opensl_es.c b/channels/audin/client/opensles/audin_opensl_es.c index 04e9b3332..2e5db3689 100644 --- a/channels/audin/client/opensles/audin_opensl_es.c +++ b/channels/audin/client/opensles/audin_opensl_es.c @@ -29,6 +29,7 @@ #include #include +#include #include #include diff --git a/channels/audin/client/oss/audin_oss.c b/channels/audin/client/oss/audin_oss.c index f37aeef0e..98015842f 100644 --- a/channels/audin/client/oss/audin_oss.c +++ b/channels/audin/client/oss/audin_oss.c @@ -44,6 +44,7 @@ #endif #include +#include #include #include diff --git a/channels/audin/client/pulse/audin_pulse.c b/channels/audin/client/pulse/audin_pulse.c index 5f0508db8..f52a27b46 100644 --- a/channels/audin/client/pulse/audin_pulse.c +++ b/channels/audin/client/pulse/audin_pulse.c @@ -33,6 +33,7 @@ #include #include +#include #include #include diff --git a/channels/audin/client/sndio/audin_sndio.c b/channels/audin/client/sndio/audin_sndio.c index affa8e890..b531fa293 100644 --- a/channels/audin/client/sndio/audin_sndio.c +++ b/channels/audin/client/sndio/audin_sndio.c @@ -26,6 +26,7 @@ #include +#include #include #include "audin_main.h" diff --git a/channels/audin/client/winmm/audin_winmm.c b/channels/audin/client/winmm/audin_winmm.c index 3b559be94..ffc336fe4 100644 --- a/channels/audin/client/winmm/audin_winmm.c +++ b/channels/audin/client/winmm/audin_winmm.c @@ -30,6 +30,7 @@ #include #include +#include #include #include diff --git a/channels/audin/server/audin.c b/channels/audin/server/audin.c index 5d223b694..d24eaf10b 100644 --- a/channels/audin/server/audin.c +++ b/channels/audin/server/audin.c @@ -31,6 +31,7 @@ #include #include +#include #include #include #include diff --git a/channels/client/addin.c b/channels/client/addin.c index bebbcb328..3727ec273 100644 --- a/channels/client/addin.c +++ b/channels/client/addin.c @@ -30,6 +30,7 @@ #include #include +#include #include #include #include diff --git a/channels/client/tables.c.in b/channels/client/tables.c.in index aafc71d6c..a22621b32 100644 --- a/channels/client/tables.c.in +++ b/channels/client/tables.c.in @@ -19,6 +19,7 @@ * limitations under the License. */ +#include #include #include "tables.h" diff --git a/channels/cliprdr/client/cliprdr_main.c b/channels/cliprdr/client/cliprdr_main.c index 5b6c92e5c..e393a2a60 100644 --- a/channels/cliprdr/client/cliprdr_main.c +++ b/channels/cliprdr/client/cliprdr_main.c @@ -29,6 +29,7 @@ #include #include +#include #include #include "../../../channels/client/addin.h" diff --git a/channels/cliprdr/server/cliprdr_main.c b/channels/cliprdr/server/cliprdr_main.c index 456310c8b..ce46d0fbd 100644 --- a/channels/cliprdr/server/cliprdr_main.c +++ b/channels/cliprdr/server/cliprdr_main.c @@ -26,6 +26,7 @@ #include #include +#include #include #include "cliprdr_main.h" #include "../cliprdr_common.h" diff --git a/channels/drdynvc/client/drdynvc_main.c b/channels/drdynvc/client/drdynvc_main.c index 6b0246fb1..1085dac54 100644 --- a/channels/drdynvc/client/drdynvc_main.c +++ b/channels/drdynvc/client/drdynvc_main.c @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/channels/drive/client/drive_main.c b/channels/drive/client/drive_main.c index 7c291ad51..75d562b2a 100644 --- a/channels/drive/client/drive_main.c +++ b/channels/drive/client/drive_main.c @@ -41,6 +41,7 @@ #include #include +#include #include #include "drive_file.h" diff --git a/channels/echo/server/echo_main.c b/channels/echo/server/echo_main.c index cd389ff8e..fb33fbd52 100644 --- a/channels/echo/server/echo_main.c +++ b/channels/echo/server/echo_main.c @@ -32,6 +32,7 @@ #include #include +#include #include #include #include diff --git a/channels/encomsp/client/encomsp_main.c b/channels/encomsp/client/encomsp_main.c index 32b1196a2..abea41a71 100644 --- a/channels/encomsp/client/encomsp_main.c +++ b/channels/encomsp/client/encomsp_main.c @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/channels/encomsp/server/encomsp_main.c b/channels/encomsp/server/encomsp_main.c index 593f41e1b..f3756b144 100644 --- a/channels/encomsp/server/encomsp_main.c +++ b/channels/encomsp/server/encomsp_main.c @@ -25,6 +25,7 @@ #include #include +#include #include #include "encomsp_main.h" diff --git a/channels/parallel/client/parallel_main.c b/channels/parallel/client/parallel_main.c index 6c9451c3a..6cb2ec670 100644 --- a/channels/parallel/client/parallel_main.c +++ b/channels/parallel/client/parallel_main.c @@ -49,6 +49,7 @@ #include #include +#include #include #include #include diff --git a/channels/printer/client/printer_main.c b/channels/printer/client/printer_main.c index 459221c60..4f847ea5f 100644 --- a/channels/printer/client/printer_main.c +++ b/channels/printer/client/printer_main.c @@ -36,8 +36,10 @@ #include #include +#include #include #include +#include #include "../printer.h" diff --git a/channels/rail/client/rail_main.c b/channels/rail/client/rail_main.c index 287101bdc..1fb12ac07 100644 --- a/channels/rail/client/rail_main.c +++ b/channels/rail/client/rail_main.c @@ -29,6 +29,7 @@ #include #include +#include #include "rail_orders.h" #include "rail_main.h" diff --git a/channels/rail/client/rail_orders.c b/channels/rail/client/rail_orders.c index d9ec01d39..4f62ebb1f 100644 --- a/channels/rail/client/rail_orders.c +++ b/channels/rail/client/rail_orders.c @@ -27,6 +27,7 @@ #include #include +#include #include "rail_orders.h" diff --git a/channels/rail/server/rail_main.c b/channels/rail/server/rail_main.c index 403cb6753..83d9accc6 100644 --- a/channels/rail/server/rail_main.c +++ b/channels/rail/server/rail_main.c @@ -21,6 +21,7 @@ #include #include +#include #include #include diff --git a/channels/rdp2tcp/client/rdp2tcp_main.c b/channels/rdp2tcp/client/rdp2tcp_main.c index c9056b2d0..e41054923 100644 --- a/channels/rdp2tcp/client/rdp2tcp_main.c +++ b/channels/rdp2tcp/client/rdp2tcp_main.c @@ -24,6 +24,7 @@ #include #include +#include #include #include diff --git a/channels/rdpdr/client/rdpdr_main.c b/channels/rdpdr/client/rdpdr_main.c index 849a1b48b..1b562f1f6 100644 --- a/channels/rdpdr/client/rdpdr_main.c +++ b/channels/rdpdr/client/rdpdr_main.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include diff --git a/channels/rdpdr/server/rdpdr_main.c b/channels/rdpdr/server/rdpdr_main.c index 41639b843..2f2fd0c9f 100644 --- a/channels/rdpdr/server/rdpdr_main.c +++ b/channels/rdpdr/server/rdpdr_main.c @@ -22,6 +22,7 @@ */ #include +#include #include #include diff --git a/channels/rdpecam/server/camera_device_enumerator_main.c b/channels/rdpecam/server/camera_device_enumerator_main.c index af97c2256..c5ae7469f 100644 --- a/channels/rdpecam/server/camera_device_enumerator_main.c +++ b/channels/rdpecam/server/camera_device_enumerator_main.c @@ -19,6 +19,7 @@ #include +#include #include #include diff --git a/channels/rdpecam/server/camera_device_main.c b/channels/rdpecam/server/camera_device_main.c index efbdbf2e4..4740da664 100644 --- a/channels/rdpecam/server/camera_device_main.c +++ b/channels/rdpecam/server/camera_device_main.c @@ -19,6 +19,7 @@ #include +#include #include #include diff --git a/channels/rdpgfx/server/rdpgfx_main.c b/channels/rdpgfx/server/rdpgfx_main.c index ccb8f8a5a..1b403ab56 100644 --- a/channels/rdpgfx/server/rdpgfx_main.c +++ b/channels/rdpgfx/server/rdpgfx_main.c @@ -29,6 +29,9 @@ #include #include +#include +#include + #include #include diff --git a/channels/rdpsnd/client/fake/rdpsnd_fake.c b/channels/rdpsnd/client/fake/rdpsnd_fake.c index 0f3a0550b..722f049c9 100644 --- a/channels/rdpsnd/client/fake/rdpsnd_fake.c +++ b/channels/rdpsnd/client/fake/rdpsnd_fake.c @@ -29,6 +29,7 @@ #include #include +#include #include "rdpsnd_main.h" diff --git a/channels/rdpsnd/client/oss/rdpsnd_oss.c b/channels/rdpsnd/client/oss/rdpsnd_oss.c index 9087c92b6..a778c255e 100644 --- a/channels/rdpsnd/client/oss/rdpsnd_oss.c +++ b/channels/rdpsnd/client/oss/rdpsnd_oss.c @@ -45,6 +45,7 @@ #include #include +#include #include #include "rdpsnd_main.h" diff --git a/channels/rdpsnd/client/rdpsnd_main.c b/channels/rdpsnd/client/rdpsnd_main.c index fdabd00ed..561240c0a 100644 --- a/channels/rdpsnd/client/rdpsnd_main.c +++ b/channels/rdpsnd/client/rdpsnd_main.c @@ -44,6 +44,7 @@ #include #include +#include #include #include diff --git a/channels/rdpsnd/server/rdpsnd_main.c b/channels/rdpsnd/server/rdpsnd_main.c index a6e2749d8..43966414a 100644 --- a/channels/rdpsnd/server/rdpsnd_main.c +++ b/channels/rdpsnd/server/rdpsnd_main.c @@ -30,6 +30,7 @@ #include #include +#include #include #include "rdpsnd_common.h" diff --git a/channels/remdesk/client/remdesk_main.c b/channels/remdesk/client/remdesk_main.c index 4a2590a8a..433616a7b 100644 --- a/channels/remdesk/client/remdesk_main.c +++ b/channels/remdesk/client/remdesk_main.c @@ -25,8 +25,10 @@ #include #include +#include #include +#include #include #include diff --git a/channels/remdesk/server/remdesk_main.c b/channels/remdesk/server/remdesk_main.c index faf219341..8bbbe51f7 100644 --- a/channels/remdesk/server/remdesk_main.c +++ b/channels/remdesk/server/remdesk_main.c @@ -25,6 +25,8 @@ #include #include +#include + #include "remdesk_main.h" /** diff --git a/channels/smartcard/client/smartcard_main.c b/channels/smartcard/client/smartcard_main.c index 7c63d7e26..5aa701cac 100644 --- a/channels/smartcard/client/smartcard_main.c +++ b/channels/smartcard/client/smartcard_main.c @@ -28,6 +28,7 @@ #include #include +#include #include #include #include diff --git a/channels/sshagent/client/sshagent_main.c b/channels/sshagent/client/sshagent_main.c index 5d71f9ee4..779eb879f 100644 --- a/channels/sshagent/client/sshagent_main.c +++ b/channels/sshagent/client/sshagent_main.c @@ -52,6 +52,8 @@ #include #include "sshagent_main.h" + +#include #include #include diff --git a/channels/telemetry/server/telemetry_main.c b/channels/telemetry/server/telemetry_main.c index f928086be..ebfcd31ee 100644 --- a/channels/telemetry/server/telemetry_main.c +++ b/channels/telemetry/server/telemetry_main.c @@ -19,6 +19,7 @@ #include +#include #include #include diff --git a/channels/tsmf/client/tsmf_media.c b/channels/tsmf/client/tsmf_media.c index 2b157caf6..fcf6d72f8 100644 --- a/channels/tsmf/client/tsmf_media.c +++ b/channels/tsmf/client/tsmf_media.c @@ -38,6 +38,7 @@ #include #include +#include #include #include "tsmf_constants.h" diff --git a/client/common/client.c b/client/common/client.c index 708d9257e..58106b8d4 100644 --- a/client/common/client.c +++ b/client/common/client.c @@ -26,6 +26,7 @@ #include +#include #include #include #include diff --git a/client/common/cmdline.c b/client/common/cmdline.c index 1a2601581..d0c91aa7e 100644 --- a/client/common/cmdline.c +++ b/client/common/cmdline.c @@ -30,8 +30,10 @@ #include #include +#include #include #include +#include #include #include #include @@ -2373,7 +2375,7 @@ static BOOL parse_gateway_cred_option(rdpSettings* settings, const char* value, break; default: if (!freerdp_settings_set_string(settings, what, value)) - return COMMAND_LINE_ERROR_MEMORY; + return FALSE; break; } @@ -2452,7 +2454,7 @@ static BOOL parse_gateway_usage_option(rdpSettings* settings, const char* value) LONGLONG val = 0; if (!value_to_int(value, &val, TSC_PROXY_MODE_NONE_DIRECT, TSC_PROXY_MODE_NONE_DETECT)) - return COMMAND_LINE_ERROR_UNEXPECTED_VALUE; + return FALSE; } return freerdp_set_gateway_usage_method(settings, type); diff --git a/client/common/file.c b/client/common/file.c index 5ff2c886a..ba242b4af 100644 --- a/client/common/file.c +++ b/client/common/file.c @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/include/freerdp/api.h b/include/freerdp/api.h index 8f010e489..04d9ac2ad 100644 --- a/include/freerdp/api.h +++ b/include/freerdp/api.h @@ -88,4 +88,14 @@ #define IFCALLRESULT(_default_return, _cb, ...) \ ((_cb != NULL) ? _cb(__VA_ARGS__) : (_default_return)) +#ifdef __GNUC__ +#define ALIGN64 __attribute__((aligned(8))) +#else +#ifdef _WIN32 +#define ALIGN64 __declspec(align(8)) +#else +#define ALIGN64 +#endif +#endif + #endif /* FREERDP_API */ diff --git a/include/freerdp/assistance.h b/include/freerdp/assistance.h index 41116e35b..38ccf3f2f 100644 --- a/include/freerdp/assistance.h +++ b/include/freerdp/assistance.h @@ -21,7 +21,8 @@ #define FREERDP_REMOTE_ASSISTANCE_H #include -#include +#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/autodetect.h b/include/freerdp/autodetect.h index 8907b0f14..c7219d92e 100644 --- a/include/freerdp/autodetect.h +++ b/include/freerdp/autodetect.h @@ -22,7 +22,7 @@ #define FREERDP_AUTODETECT_H #include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/cache/persistent.h b/include/freerdp/cache/persistent.h index bc032fece..d0285911f 100644 --- a/include/freerdp/cache/persistent.h +++ b/include/freerdp/cache/persistent.h @@ -23,7 +23,6 @@ #include #include #include -#include #include #include diff --git a/include/freerdp/channels/channels.h b/include/freerdp/channels/channels.h index c0fc2be1c..df9681939 100644 --- a/include/freerdp/channels/channels.h +++ b/include/freerdp/channels/channels.h @@ -26,7 +26,7 @@ #include #include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/channels/rdpdr.h b/include/freerdp/channels/rdpdr.h index 2a3ba5fbc..b69697226 100644 --- a/include/freerdp/channels/rdpdr.h +++ b/include/freerdp/channels/rdpdr.h @@ -33,7 +33,9 @@ #include #include -#include +#include +#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/client.h b/include/freerdp/client.h index 3761b4634..849b1ee9b 100644 --- a/include/freerdp/client.h +++ b/include/freerdp/client.h @@ -22,8 +22,9 @@ #include #include -#include +#include #include +#include #if defined(CHANNEL_AINPUT_CLIENT) #include diff --git a/include/freerdp/client/audin.h b/include/freerdp/client/audin.h index 1e3f6ff4a..604b60e0e 100644 --- a/include/freerdp/client/audin.h +++ b/include/freerdp/client/audin.h @@ -22,8 +22,10 @@ #ifndef FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H #define FREERDP_CHANNEL_AUDIN_CLIENT_AUDIN_H +#include +#include + #include -#include #include #ifdef __cplusplus diff --git a/include/freerdp/client/channels.h b/include/freerdp/client/channels.h index a046e7320..cfdc86616 100644 --- a/include/freerdp/client/channels.h +++ b/include/freerdp/client/channels.h @@ -21,6 +21,7 @@ #define FREERDP_CHANNELS_CLIENT_H #include +#include #include #include #include diff --git a/include/freerdp/client/cliprdr.h b/include/freerdp/client/cliprdr.h index 143e1db9b..5d1073bf2 100644 --- a/include/freerdp/client/cliprdr.h +++ b/include/freerdp/client/cliprdr.h @@ -22,11 +22,11 @@ #ifndef FREERDP_CHANNEL_CLIPRDR_CLIENT_CLIPRDR_H #define FREERDP_CHANNEL_CLIPRDR_CLIENT_CLIPRDR_H +#include #include #include #include -#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/client/cmdline.h b/include/freerdp/client/cmdline.h index e6557f3f6..b6f32e005 100644 --- a/include/freerdp/client/cmdline.h +++ b/include/freerdp/client/cmdline.h @@ -23,7 +23,8 @@ #include #include -#include +#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/client/file.h b/include/freerdp/client/file.h index 4a835e3c8..0eb8540b3 100644 --- a/include/freerdp/client/file.h +++ b/include/freerdp/client/file.h @@ -21,7 +21,8 @@ #define FREERDP_CLIENT_RDP_FILE_H #include -#include +#include +#include /* Ignore invalid integer values */ #define RDP_FILE_FLAG_PARSE_INT_RELAXED 1 diff --git a/include/freerdp/client/rdpgfx.h b/include/freerdp/client/rdpgfx.h index aa1885d12..32c599f7e 100644 --- a/include/freerdp/client/rdpgfx.h +++ b/include/freerdp/client/rdpgfx.h @@ -22,7 +22,11 @@ #ifndef FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H #define FREERDP_CHANNEL_RDPGFX_CLIENT_RDPGFX_H -#include +#include +#include + +#include + #include #include diff --git a/include/freerdp/client/rdpsnd.h b/include/freerdp/client/rdpsnd.h index 6059e0caa..7a77a2c31 100644 --- a/include/freerdp/client/rdpsnd.h +++ b/include/freerdp/client/rdpsnd.h @@ -22,6 +22,8 @@ #define FREERDP_CHANNEL_RDPSND_CLIENT_RDPSND_H #include +#include + #ifdef __cplusplus extern "C" { diff --git a/include/freerdp/client/sshagent.h b/include/freerdp/client/sshagent.h index 9df5373f3..c3404d1f0 100644 --- a/include/freerdp/client/sshagent.h +++ b/include/freerdp/client/sshagent.h @@ -20,11 +20,11 @@ #ifndef FREERDP_CHANNEL_CLIENT_SSHAGENT_H #define FREERDP_CHANNEL_CLIENT_SSHAGENT_H +#include #include #include #include -#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/codec/yuv.h b/include/freerdp/codec/yuv.h index 34acc28ef..95906d797 100644 --- a/include/freerdp/codec/yuv.h +++ b/include/freerdp/codec/yuv.h @@ -22,7 +22,6 @@ #include #include -#include #include #ifdef __cplusplus diff --git a/include/freerdp/codecs.h b/include/freerdp/codecs.h index 54a621f14..89a8b0db0 100644 --- a/include/freerdp/codecs.h +++ b/include/freerdp/codecs.h @@ -21,8 +21,7 @@ #define FREERDP_CODECS_H #include - -#include +#include #include @@ -62,6 +61,7 @@ extern "C" BITMAP_PLANAR_CONTEXT* planar; BITMAP_INTERLEAVED_CONTEXT* interleaved; }; + typedef struct rdp_codecs rdpCodecs; FREERDP_API BOOL freerdp_client_codecs_prepare(rdpCodecs* codecs, UINT32 flags, UINT32 width, UINT32 height); diff --git a/include/freerdp/crypto/crypto.h b/include/freerdp/crypto/crypto.h index 7da21fcb5..b10ed79d0 100644 --- a/include/freerdp/crypto/crypto.h +++ b/include/freerdp/crypto/crypto.h @@ -23,7 +23,7 @@ #define FREERDP_CRYPTO_H #include -#include +#include #include #ifdef __cplusplus diff --git a/include/freerdp/display.h b/include/freerdp/display.h index b942367f8..33ae6c79e 100644 --- a/include/freerdp/display.h +++ b/include/freerdp/display.h @@ -20,7 +20,9 @@ #ifndef FREERDP_DISPLAY_H #define FREERDP_DISPLAY_H -#include +#include +#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/dvc.h b/include/freerdp/dvc.h index 89155470c..6e650840a 100644 --- a/include/freerdp/dvc.h +++ b/include/freerdp/dvc.h @@ -55,6 +55,7 @@ #include #include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/event.h b/include/freerdp/event.h index 826609e61..41662d6fa 100644 --- a/include/freerdp/event.h +++ b/include/freerdp/event.h @@ -21,7 +21,6 @@ #define FREERDP_EVENT_H #include -#include #include diff --git a/include/freerdp/extension.h b/include/freerdp/extension.h index c7d751ac7..1f9d4cb51 100644 --- a/include/freerdp/extension.h +++ b/include/freerdp/extension.h @@ -22,7 +22,6 @@ #include #include -#include #define FREERDP_EXT_EXPORT_FUNC_NAME "FreeRDPExtensionEntry" diff --git a/include/freerdp/freerdp.h b/include/freerdp/freerdp.h index 8868654e3..f59caf3ad 100644 --- a/include/freerdp/freerdp.h +++ b/include/freerdp/freerdp.h @@ -22,49 +22,42 @@ #ifndef FREERDP_H #define FREERDP_H +#include + #include #include #include #include + +#include + +#include #include #include -#include #include - -#include - -#include -#include +#include #include #include -#include +#include #ifdef __cplusplus extern "C" { #endif - typedef struct stream_dump_context rdpStreamDumpContext; - typedef struct SmartcardCertInfo_st SmartcardCertInfo; - typedef struct rdp_rdp rdpRdp; - typedef struct rdp_gdi rdpGdi; typedef struct rdp_rail rdpRail; typedef struct rdp_cache rdpCache; - typedef struct rdp_channels rdpChannels; - typedef struct rdp_graphics rdpGraphics; - typedef struct rdp_metrics rdpMetrics; - typedef struct rdp_codecs rdpCodecs; - typedef struct rdp_transport rdpTransport; /* Opaque */ - - typedef struct rdp_freerdp freerdp; - typedef struct rdp_context rdpContext; - typedef struct rdp_freerdp_peer freerdp_peer; typedef struct rdp_client_context rdpClientContext; typedef struct rdp_client_entry_points_v1 RDP_CLIENT_ENTRY_POINTS_V1; typedef RDP_CLIENT_ENTRY_POINTS_V1 RDP_CLIENT_ENTRY_POINTS; +#include +#include +#include +#include + #define MCS_BASE_CHANNEL_ID 1001 #define MCS_GLOBAL_CHANNEL_ID 1003 @@ -78,41 +71,6 @@ extern "C" #define VERIFY_CERT_FLAG_MATCH_LEGACY_SHA1 0x100 #define VERIFY_CERT_FLAG_FP_IS_PEM 0x200 - typedef enum - { - CONNECTION_STATE_INITIAL, - CONNECTION_STATE_NEGO, - CONNECTION_STATE_NLA, - CONNECTION_STATE_AAD, - CONNECTION_STATE_MCS_CREATE_REQUEST, - CONNECTION_STATE_MCS_CREATE_RESPONSE, - CONNECTION_STATE_MCS_ERECT_DOMAIN, - CONNECTION_STATE_MCS_ATTACH_USER, - CONNECTION_STATE_MCS_ATTACH_USER_CONFIRM, - CONNECTION_STATE_MCS_CHANNEL_JOIN_REQUEST, - CONNECTION_STATE_MCS_CHANNEL_JOIN_RESPONSE, - CONNECTION_STATE_RDP_SECURITY_COMMENCEMENT, - CONNECTION_STATE_SECURE_SETTINGS_EXCHANGE, - CONNECTION_STATE_CONNECT_TIME_AUTO_DETECT_REQUEST, - CONNECTION_STATE_CONNECT_TIME_AUTO_DETECT_RESPONSE, - CONNECTION_STATE_LICENSING, - CONNECTION_STATE_MULTITRANSPORT_BOOTSTRAPPING_REQUEST, - CONNECTION_STATE_MULTITRANSPORT_BOOTSTRAPPING_RESPONSE, - CONNECTION_STATE_CAPABILITIES_EXCHANGE_DEMAND_ACTIVE, - CONNECTION_STATE_CAPABILITIES_EXCHANGE_MONITOR_LAYOUT, - CONNECTION_STATE_CAPABILITIES_EXCHANGE_CONFIRM_ACTIVE, - CONNECTION_STATE_FINALIZATION_SYNC, - CONNECTION_STATE_FINALIZATION_COOPERATE, - CONNECTION_STATE_FINALIZATION_REQUEST_CONTROL, - CONNECTION_STATE_FINALIZATION_PERSISTENT_KEY_LIST, - CONNECTION_STATE_FINALIZATION_FONT_LIST, - CONNECTION_STATE_FINALIZATION_CLIENT_SYNC, - CONNECTION_STATE_FINALIZATION_CLIENT_COOPERATE, - CONNECTION_STATE_FINALIZATION_CLIENT_GRANTED_CONTROL, - CONNECTION_STATE_FINALIZATION_CLIENT_FONT_MAP, - CONNECTION_STATE_ACTIVE - } CONNECTION_STATE; - /* Message types used by gateway messaging callback */ #define GATEWAY_MESSAGE_CONSENT 1 #define GATEWAY_MESSAGE_SERVICE 2 @@ -136,7 +94,7 @@ extern "C" /** \brief Authentication callback function pointer definition * - * \param freerdp A pointer to the instance to work on + * \param instance A pointer to the instance to work on * \param username A pointer to the username string. On input the current username, on output * the username that should be used. Must not be NULL. \param password A pointer to the password * string. On input the current password, on output the password that sohould be used. Must not @@ -152,7 +110,7 @@ extern "C" /** \brief Extended authentication callback function pointer definition * - * \param freerdp A pointer to the instance to work on + * \param instance A pointer to the instance to work on * \param username A pointer to the username string. On input the current username, on output * the username that should be used. Must not be NULL. \param password A pointer to the password * string. On input the current password, on output the password that sohould be used. Must not diff --git a/include/freerdp/gdi/gdi.h b/include/freerdp/gdi/gdi.h index 082629bd0..ab6f172e0 100644 --- a/include/freerdp/gdi/gdi.h +++ b/include/freerdp/gdi/gdi.h @@ -25,8 +25,10 @@ #include #include +#include + #include -#include +#include #include #include @@ -520,6 +522,7 @@ extern "C" wLog* log; }; + typedef struct rdp_gdi rdpGdi; FREERDP_API DWORD gdi_rop3_code(BYTE code); FREERDP_API const char* gdi_rop3_code_string(BYTE code); diff --git a/include/freerdp/gdi/video.h b/include/freerdp/gdi/video.h index 58717fe24..829d31765 100644 --- a/include/freerdp/gdi/video.h +++ b/include/freerdp/gdi/video.h @@ -20,7 +20,8 @@ #define FREERDP_GDI_VIDEO_H_ #include -#include +#include +#include #include #include diff --git a/include/freerdp/graphics.h b/include/freerdp/graphics.h index 65e7ccae5..f356bf8a5 100644 --- a/include/freerdp/graphics.h +++ b/include/freerdp/graphics.h @@ -25,7 +25,6 @@ #include #include #include -#include #ifdef __cplusplus extern "C" @@ -158,6 +157,7 @@ extern "C" rdpGlyph* Glyph_Prototype; /* 3 */ UINT32 paddingA[16 - 4]; /* 4 */ }; + typedef struct rdp_graphics rdpGraphics; FREERDP_API void graphics_register_bitmap(rdpGraphics* graphics, const rdpBitmap* bitmap); FREERDP_API void graphics_register_pointer(rdpGraphics* graphics, const rdpPointer* pointer); diff --git a/include/freerdp/heartbeat.h b/include/freerdp/heartbeat.h index 8837927de..61512e667 100644 --- a/include/freerdp/heartbeat.h +++ b/include/freerdp/heartbeat.h @@ -21,6 +21,7 @@ #define FREERDP_HEARTBEAT_H #include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/input.h b/include/freerdp/input.h index 9c06191c6..9d99a0992 100644 --- a/include/freerdp/input.h +++ b/include/freerdp/input.h @@ -21,7 +21,7 @@ #define FREERDP_INPUT_H #include -#include +#include #include #include diff --git a/include/freerdp/license.h b/include/freerdp/license.h index 85f88f35d..dc195a46b 100644 --- a/include/freerdp/license.h +++ b/include/freerdp/license.h @@ -23,7 +23,7 @@ #define FREERDP_LICENSE_H #include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/metrics.h b/include/freerdp/metrics.h index d148885f9..8365c14c1 100644 --- a/include/freerdp/metrics.h +++ b/include/freerdp/metrics.h @@ -35,6 +35,7 @@ extern "C" UINT64 TotalUncompressedBytes; double TotalCompressionRatio; }; + typedef struct rdp_metrics rdpMetrics; FREERDP_API double metrics_write_bytes(rdpMetrics* metrics, UINT32 UncompressedBytes, UINT32 CompressedBytes); diff --git a/include/freerdp/rail.h b/include/freerdp/rail.h index 111486610..66ad34b47 100644 --- a/include/freerdp/rail.h +++ b/include/freerdp/rail.h @@ -23,6 +23,7 @@ #include +#include #include #ifdef __cplusplus diff --git a/include/freerdp/server/disp.h b/include/freerdp/server/disp.h index fadc64158..f49cbc997 100644 --- a/include/freerdp/server/disp.h +++ b/include/freerdp/server/disp.h @@ -22,7 +22,6 @@ #include -#include #include #include diff --git a/include/freerdp/server/gfxredir.h b/include/freerdp/server/gfxredir.h index cc4167582..6ddb2811b 100644 --- a/include/freerdp/server/gfxredir.h +++ b/include/freerdp/server/gfxredir.h @@ -22,7 +22,6 @@ #include -#include #include #include diff --git a/include/freerdp/server/proxy/proxy_context.h b/include/freerdp/server/proxy/proxy_context.h index 0caa4ef8f..6b22dafa7 100644 --- a/include/freerdp/server/proxy/proxy_context.h +++ b/include/freerdp/server/proxy/proxy_context.h @@ -22,6 +22,9 @@ #ifndef FREERDP_SERVER_PROXY_PFCONTEXT_H #define FREERDP_SERVER_PROXY_PFCONTEXT_H +#include +#include + #include #include diff --git a/include/freerdp/server/rail.h b/include/freerdp/server/rail.h index e566d5510..3205b6bc7 100644 --- a/include/freerdp/server/rail.h +++ b/include/freerdp/server/rail.h @@ -22,7 +22,6 @@ #include #include -#include #include #include diff --git a/include/freerdp/server/rdpgfx.h b/include/freerdp/server/rdpgfx.h index cd63f5616..57d370370 100644 --- a/include/freerdp/server/rdpgfx.h +++ b/include/freerdp/server/rdpgfx.h @@ -21,7 +21,7 @@ #define FREERDP_CHANNEL_RDPGFX_SERVER_RDPGFX_H #include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/server/shadow.h b/include/freerdp/server/shadow.h index d011d5407..083652bc2 100644 --- a/include/freerdp/server/shadow.h +++ b/include/freerdp/server/shadow.h @@ -23,6 +23,7 @@ #include #include +#include #include #include diff --git a/include/freerdp/settings.h b/include/freerdp/settings.h index 423157c44..f3de8dee5 100644 --- a/include/freerdp/settings.h +++ b/include/freerdp/settings.h @@ -468,16 +468,6 @@ typedef struct #define THREADING_FLAGS_DISABLE_THREADS 0x00000001 /* Settings */ -#ifdef __GNUC__ -#define ALIGN64 __attribute__((aligned(8))) -#else -#ifdef _WIN32 -#define ALIGN64 __declspec(align(8)) -#else -#define ALIGN64 -#endif -#endif - /** * FreeRDP Settings Ids * This is generated with a script parsing the rdpSettings data structure diff --git a/include/freerdp/streamdump.h b/include/freerdp/streamdump.h index 6092814d1..4290d39ac 100644 --- a/include/freerdp/streamdump.h +++ b/include/freerdp/streamdump.h @@ -25,7 +25,7 @@ #include #include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/svc.h b/include/freerdp/svc.h index 482ae24cd..e7154a2ae 100644 --- a/include/freerdp/svc.h +++ b/include/freerdp/svc.h @@ -26,7 +26,7 @@ #include #include -#include +#include #define CHANNEL_EVENT_USER 1000 diff --git a/include/freerdp/transport_io.h b/include/freerdp/transport_io.h index 0fcbb02fb..ab7f39a59 100644 --- a/include/freerdp/transport_io.h +++ b/include/freerdp/transport_io.h @@ -22,11 +22,11 @@ #ifndef FREERDP_TRANSPORT_IO_H #define FREERDP_TRANSPORT_IO_H +#include + #include #include - -#include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/types.h b/include/freerdp/types.h index b1557e1a9..044ee5fe7 100644 --- a/include/freerdp/types.h +++ b/include/freerdp/types.h @@ -37,6 +37,47 @@ extern "C" { #endif + typedef enum + { + CONNECTION_STATE_INITIAL, + CONNECTION_STATE_NEGO, + CONNECTION_STATE_NLA, + CONNECTION_STATE_AAD, + CONNECTION_STATE_MCS_CREATE_REQUEST, + CONNECTION_STATE_MCS_CREATE_RESPONSE, + CONNECTION_STATE_MCS_ERECT_DOMAIN, + CONNECTION_STATE_MCS_ATTACH_USER, + CONNECTION_STATE_MCS_ATTACH_USER_CONFIRM, + CONNECTION_STATE_MCS_CHANNEL_JOIN_REQUEST, + CONNECTION_STATE_MCS_CHANNEL_JOIN_RESPONSE, + CONNECTION_STATE_RDP_SECURITY_COMMENCEMENT, + CONNECTION_STATE_SECURE_SETTINGS_EXCHANGE, + CONNECTION_STATE_CONNECT_TIME_AUTO_DETECT_REQUEST, + CONNECTION_STATE_CONNECT_TIME_AUTO_DETECT_RESPONSE, + CONNECTION_STATE_LICENSING, + CONNECTION_STATE_MULTITRANSPORT_BOOTSTRAPPING_REQUEST, + CONNECTION_STATE_MULTITRANSPORT_BOOTSTRAPPING_RESPONSE, + CONNECTION_STATE_CAPABILITIES_EXCHANGE_DEMAND_ACTIVE, + CONNECTION_STATE_CAPABILITIES_EXCHANGE_MONITOR_LAYOUT, + CONNECTION_STATE_CAPABILITIES_EXCHANGE_CONFIRM_ACTIVE, + CONNECTION_STATE_FINALIZATION_SYNC, + CONNECTION_STATE_FINALIZATION_COOPERATE, + CONNECTION_STATE_FINALIZATION_REQUEST_CONTROL, + CONNECTION_STATE_FINALIZATION_PERSISTENT_KEY_LIST, + CONNECTION_STATE_FINALIZATION_FONT_LIST, + CONNECTION_STATE_FINALIZATION_CLIENT_SYNC, + CONNECTION_STATE_FINALIZATION_CLIENT_COOPERATE, + CONNECTION_STATE_FINALIZATION_CLIENT_GRANTED_CONTROL, + CONNECTION_STATE_FINALIZATION_CLIENT_FONT_MAP, + CONNECTION_STATE_ACTIVE + } CONNECTION_STATE; + + typedef struct rdp_channels rdpChannels; + typedef struct rdp_freerdp freerdp; + typedef struct rdp_context rdpContext; + typedef struct rdp_freerdp_peer freerdp_peer; + typedef struct rdp_transport rdpTransport; /* Opaque */ + typedef struct { BYTE red; @@ -50,45 +91,43 @@ extern "C" PALETTE_ENTRY entries[256]; } rdpPalette; -#include + typedef struct + { + DWORD size; + void* data[4]; + } RDP_PLUGIN_DATA; -typedef struct -{ - DWORD size; - void* data[4]; -} RDP_PLUGIN_DATA; + typedef struct + { + INT16 x; + INT16 y; + INT16 width; + INT16 height; + } RDP_RECT; -typedef struct -{ - INT16 x; - INT16 y; - INT16 width; - INT16 height; -} RDP_RECT; + typedef struct + { + UINT16 left; + UINT16 top; + UINT16 right; + UINT16 bottom; + } RECTANGLE_16; -typedef struct -{ - UINT16 left; - UINT16 top; - UINT16 right; - UINT16 bottom; -} RECTANGLE_16; + typedef struct + { + UINT32 left; + UINT32 top; + UINT32 width; + UINT32 height; + } RECTANGLE_32; -typedef struct -{ - UINT32 left; - UINT32 top; - UINT32 width; - UINT32 height; -} RECTANGLE_32; - -/** @brief type of RDP transport */ -typedef enum -{ - RDP_TRANSPORT_TCP = 0, - RDP_TRANSPORT_UDP_R, - RDP_TRANSPORT_UDP_L -} RDP_TRANSPORT_TYPE; + /** @brief type of RDP transport */ + typedef enum + { + RDP_TRANSPORT_TCP = 0, + RDP_TRANSPORT_UDP_R, + RDP_TRANSPORT_UDP_L + } RDP_TRANSPORT_TYPE; #ifdef __cplusplus } diff --git a/include/freerdp/update.h b/include/freerdp/update.h index d373a6d70..abfe64018 100644 --- a/include/freerdp/update.h +++ b/include/freerdp/update.h @@ -29,7 +29,7 @@ #include #include -#include +#include #include #include diff --git a/include/freerdp/utils/passphrase.h b/include/freerdp/utils/passphrase.h index 0ca48d117..f6a0f9605 100644 --- a/include/freerdp/utils/passphrase.h +++ b/include/freerdp/utils/passphrase.h @@ -24,7 +24,7 @@ #include #include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/utils/signal.h b/include/freerdp/utils/signal.h index febd0b0cf..8a74b81f5 100644 --- a/include/freerdp/utils/signal.h +++ b/include/freerdp/utils/signal.h @@ -21,7 +21,7 @@ #define FREERDP_UTILS_SIGNAL_H #include -#include +#include #ifdef __cplusplus extern "C" diff --git a/include/freerdp/utils/smartcardlogon.h b/include/freerdp/utils/smartcardlogon.h index 7a5346e2b..66e1097b3 100644 --- a/include/freerdp/utils/smartcardlogon.h +++ b/include/freerdp/utils/smartcardlogon.h @@ -19,7 +19,7 @@ #ifndef FREERDP_UTILS_SMARTCARDLOGON_H #define FREERDP_UTILS_SMARTCARDLOGON_H -#include +#include #include #include diff --git a/include/freerdp/window.h b/include/freerdp/window.h index c5d396c5c..4f62dfdf4 100644 --- a/include/freerdp/window.h +++ b/include/freerdp/window.h @@ -21,7 +21,6 @@ #define FREERDP_UPDATE_WINDOW_H #include -#include #include /* Window Order Header Flags */ diff --git a/libfreerdp/codec/ncrush.c b/libfreerdp/codec/ncrush.c index 808623498..d5f7d5585 100644 --- a/libfreerdp/codec/ncrush.c +++ b/libfreerdp/codec/ncrush.c @@ -28,6 +28,8 @@ #include #include +#include + #include "ncrush.h" #define TAG FREERDP_TAG("codec") diff --git a/libfreerdp/codec/rfx.c b/libfreerdp/codec/rfx.c index 385dbc03a..cf7de8b4c 100644 --- a/libfreerdp/codec/rfx.c +++ b/libfreerdp/codec/rfx.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include diff --git a/libfreerdp/codec/yuv.c b/libfreerdp/codec/yuv.c index 1f03db5bb..668fcd54f 100644 --- a/libfreerdp/codec/yuv.c +++ b/libfreerdp/codec/yuv.c @@ -2,6 +2,8 @@ #include #include +#include +#include #include #include #include diff --git a/libfreerdp/core/smartcardlogon.c b/libfreerdp/core/smartcardlogon.c index 63b69217e..c9f0b028a 100644 --- a/libfreerdp/core/smartcardlogon.c +++ b/libfreerdp/core/smartcardlogon.c @@ -26,6 +26,7 @@ #include #include +#include #include #include diff --git a/libfreerdp/core/streamdump.c b/libfreerdp/core/streamdump.c index ff1dffc70..7a2308201 100644 --- a/libfreerdp/core/streamdump.c +++ b/libfreerdp/core/streamdump.c @@ -25,6 +25,7 @@ #include #include +#include #include #include diff --git a/libfreerdp/gdi/graphics.c b/libfreerdp/gdi/graphics.c index af33febdb..aa89ef25c 100644 --- a/libfreerdp/gdi/graphics.c +++ b/libfreerdp/gdi/graphics.c @@ -24,6 +24,7 @@ #include #include +#include #include #include #include diff --git a/libfreerdp/gdi/graphics.h b/libfreerdp/gdi/graphics.h index 4a73707b4..a35732dc7 100644 --- a/libfreerdp/gdi/graphics.h +++ b/libfreerdp/gdi/graphics.h @@ -25,6 +25,7 @@ #include #include #include +#include FREERDP_LOCAL HGDI_BITMAP gdi_create_bitmap(rdpGdi* gdi, UINT32 width, UINT32 height, UINT32 format, BYTE* data); diff --git a/libfreerdp/utils/passphrase.c b/libfreerdp/utils/passphrase.c index 678e29501..3c5b1a4a4 100644 --- a/libfreerdp/utils/passphrase.c +++ b/libfreerdp/utils/passphrase.c @@ -18,6 +18,7 @@ */ #include +#include #include #include diff --git a/libfreerdp/utils/signal.c b/libfreerdp/utils/signal.c index 80622ed5e..e78979b38 100644 --- a/libfreerdp/utils/signal.c +++ b/libfreerdp/utils/signal.c @@ -28,6 +28,11 @@ #include #include +#ifndef _WIN32 +#include +#include +#endif + #define TAG FREERDP_TAG("utils.signal") #ifdef _WIN32 diff --git a/server/Sample/sfreerdp.c b/server/Sample/sfreerdp.c index 60083f89f..85ce4f07a 100644 --- a/server/Sample/sfreerdp.c +++ b/server/Sample/sfreerdp.c @@ -41,6 +41,7 @@ #include #include +#include #include #include #include