From 442ed427a07a8f6ac6a7740d20a0cc5e619bf09a Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Wed, 1 Jan 2014 14:44:28 -0800 Subject: [PATCH] Clean up includes, clean up build. --- .gitignore | 3 + configure.ac | 51 +++++++++++------ src/guacd/client.c | 21 +++---- src/guacd/client.h | 4 ++ src/guacd/daemon.c | 39 +++++++------ src/guacd/log.c | 3 +- src/guacd/log.h | 2 + src/guacd/socket-ssl.c | 10 ++-- src/guacd/socket-ssl.h | 4 +- src/libguac/audio.c | 14 +++-- src/libguac/client-handlers.c | 9 +-- src/libguac/client-handlers.h | 8 ++- src/libguac/client.c | 9 +-- src/libguac/error.c | 7 ++- src/libguac/guacamole/audio.h | 6 +- src/libguac/guacamole/client.h | 12 ++-- src/libguac/guacamole/hash.h | 4 +- src/libguac/guacamole/instruction.h | 4 +- src/libguac/guacamole/protocol.h | 14 ++--- src/libguac/guacamole/socket.h | 12 ++-- src/libguac/guacamole/timestamp.h | 4 +- src/libguac/guacamole/unicode.h | 4 +- src/libguac/hash.c | 2 + src/libguac/instruction.c | 9 +-- src/libguac/ogg_encoder.c | 6 +- src/libguac/ogg_encoder.h | 3 +- src/libguac/palette.c | 20 +++---- src/libguac/palette.h | 2 +- src/libguac/plugin.c | 11 ++-- src/libguac/pool.c | 5 +- src/libguac/protocol.c | 33 ++++++----- src/libguac/socket-fd.c | 20 +++---- src/libguac/socket-nest.c | 24 ++++---- src/libguac/socket.c | 16 +++--- src/libguac/timestamp.c | 9 +-- src/libguac/unicode.c | 5 +- src/libguac/wav_encoder.c | 5 +- src/libguac/wav_encoder.h | 2 + src/protocols/rdp/Makefile.am | 1 - src/protocols/rdp/client.c | 55 +++++++++---------- src/protocols/rdp/client.h | 18 +++--- src/protocols/rdp/compat/client-cliprdr.h | 2 + src/protocols/rdp/compat/winpr-stream.c | 1 + src/protocols/rdp/compat/winpr-stream.h | 5 +- src/protocols/rdp/compat/winpr-wtypes.h | 2 + src/protocols/rdp/config.h | 22 -------- src/protocols/rdp/debug.h | 2 + src/protocols/rdp/default_pointer.c | 1 + src/protocols/rdp/default_pointer.h | 2 + src/protocols/rdp/guac_handlers.c | 41 +++++++------- src/protocols/rdp/guac_handlers.h | 2 + .../rdp/guac_rdpdr/rdpdr_fs_messages.c | 37 +++++++------ .../rdp/guac_rdpdr/rdpdr_fs_messages.h | 10 ++-- .../guac_rdpdr/rdpdr_fs_messages_dir_info.c | 19 ++++--- .../guac_rdpdr/rdpdr_fs_messages_dir_info.h | 6 +- .../guac_rdpdr/rdpdr_fs_messages_file_info.c | 27 ++++----- .../guac_rdpdr/rdpdr_fs_messages_file_info.h | 6 +- .../guac_rdpdr/rdpdr_fs_messages_vol_info.c | 24 ++++---- .../guac_rdpdr/rdpdr_fs_messages_vol_info.h | 6 +- .../rdp/guac_rdpdr/rdpdr_fs_service.c | 23 ++++---- .../rdp/guac_rdpdr/rdpdr_fs_service.h | 4 +- src/protocols/rdp/guac_rdpdr/rdpdr_messages.c | 15 ++--- src/protocols/rdp/guac_rdpdr/rdpdr_messages.h | 6 +- src/protocols/rdp/guac_rdpdr/rdpdr_printer.c | 21 +++---- src/protocols/rdp/guac_rdpdr/rdpdr_printer.h | 6 +- src/protocols/rdp/guac_rdpdr/rdpdr_service.c | 19 +++---- src/protocols/rdp/guac_rdpdr/rdpdr_service.h | 8 ++- .../rdp/guac_rdpsnd/rdpsnd_messages.c | 15 ++--- .../rdp/guac_rdpsnd/rdpsnd_messages.h | 4 ++ .../rdp/guac_rdpsnd/rdpsnd_service.c | 12 ++-- .../rdp/guac_rdpsnd/rdpsnd_service.h | 9 +++ src/protocols/rdp/rdp_bitmap.c | 19 +++---- src/protocols/rdp/rdp_bitmap.h | 5 +- src/protocols/rdp/rdp_cliprdr.c | 24 ++++---- src/protocols/rdp/rdp_cliprdr.h | 10 +++- src/protocols/rdp/rdp_fs.c | 29 +++++----- src/protocols/rdp/rdp_fs.h | 6 +- src/protocols/rdp/rdp_gdi.c | 10 ++-- src/protocols/rdp/rdp_gdi.h | 4 +- src/protocols/rdp/rdp_glyph.c | 13 +++-- src/protocols/rdp/rdp_glyph.h | 2 + src/protocols/rdp/rdp_keymap.c | 1 + src/protocols/rdp/rdp_keymap.h | 12 ++-- src/protocols/rdp/rdp_keymap_base.c | 5 +- src/protocols/rdp/rdp_keymap_de_de.c | 6 +- src/protocols/rdp/rdp_keymap_en_us.c | 5 +- src/protocols/rdp/rdp_keymap_failsafe.c | 5 +- src/protocols/rdp/rdp_keymap_fr_fr.c | 7 ++- src/protocols/rdp/rdp_pointer.c | 13 +++-- src/protocols/rdp/rdp_pointer.h | 2 + src/protocols/rdp/rdp_settings.c | 4 +- src/protocols/rdp/rdp_settings.h | 6 +- src/protocols/rdp/rdp_status.h | 2 + src/protocols/rdp/unicode.c | 1 + src/protocols/rdp/unicode.h | 2 + src/protocols/ssh/blank.c | 5 +- src/protocols/ssh/blank.h | 4 ++ src/protocols/ssh/buffer.c | 7 ++- src/protocols/ssh/buffer.h | 2 + src/protocols/ssh/char_mappings.c | 1 + src/protocols/ssh/char_mappings.h | 2 + src/protocols/ssh/client.c | 21 +++---- src/protocols/ssh/client.h | 11 ++-- src/protocols/ssh/common.c | 1 + src/protocols/ssh/common.h | 2 + src/protocols/ssh/cursor.c | 5 +- src/protocols/ssh/cursor.h | 2 + src/protocols/ssh/display.c | 10 ++-- src/protocols/ssh/display.h | 6 +- src/protocols/ssh/guac_handlers.c | 20 +++---- src/protocols/ssh/guac_handlers.h | 2 + src/protocols/ssh/ibar.c | 5 +- src/protocols/ssh/ibar.h | 2 + src/protocols/ssh/sftp.c | 12 ++-- src/protocols/ssh/sftp.h | 2 + src/protocols/ssh/ssh_agent.c | 13 ++--- src/protocols/ssh/ssh_agent.h | 2 + src/protocols/ssh/ssh_buffer.c | 1 + src/protocols/ssh/ssh_buffer.h | 4 +- src/protocols/ssh/ssh_client.c | 33 ++++++----- src/protocols/ssh/ssh_client.h | 2 + src/protocols/ssh/ssh_key.c | 7 ++- src/protocols/ssh/ssh_key.h | 4 +- src/protocols/ssh/terminal.c | 28 +++++----- src/protocols/ssh/terminal.h | 12 ++-- src/protocols/ssh/terminal_handlers.c | 7 ++- src/protocols/ssh/terminal_handlers.h | 2 + src/protocols/ssh/types.h | 2 + src/protocols/vnc/client.c | 18 +++--- src/protocols/vnc/client.h | 4 +- src/protocols/vnc/convert.c | 5 +- src/protocols/vnc/convert.h | 2 + src/protocols/vnc/default_pointer.c | 1 + src/protocols/vnc/default_pointer.h | 2 + src/protocols/vnc/guac_handlers.c | 10 ++-- src/protocols/vnc/guac_handlers.h | 2 + src/protocols/vnc/pulse.c | 10 ++-- src/protocols/vnc/pulse.h | 2 + src/protocols/vnc/vnc_handlers.c | 25 ++++----- src/protocols/vnc/vnc_handlers.h | 2 + tests/client/buffer_pool.c | 5 +- tests/client/client_suite.c | 5 +- tests/client/client_suite.h | 2 + tests/client/layer_pool.c | 5 +- tests/protocol/base64_decode.c | 15 ++--- tests/protocol/instruction_parse.c | 15 ++--- tests/protocol/instruction_read.c | 9 +-- tests/protocol/instruction_write.c | 9 +-- tests/protocol/nest_write.c | 9 +-- tests/protocol/suite.c | 5 +- tests/protocol/suite.h | 2 + tests/test_libguac.c | 9 +-- tests/util/guac_pool.c | 5 +- tests/util/guac_unicode.c | 5 +- tests/util/util_suite.c | 5 +- tests/util/util_suite.h | 2 + 156 files changed, 827 insertions(+), 642 deletions(-) delete mode 100644 src/protocols/rdp/config.h diff --git a/.gitignore b/.gitignore index 0ab1090f..3f100eeb 100644 --- a/.gitignore +++ b/.gitignore @@ -30,6 +30,8 @@ autom4te.cache/ m4/* !README config.guess +config.h +config.h.in config.log config.status config.sub @@ -39,6 +41,7 @@ install-sh libtool ltmain.sh missing +stamp-h1 # Test binaries tests/test_* diff --git a/configure.ac b/configure.ac index cd4952ad..2fa08cd4 100644 --- a/configure.ac +++ b/configure.ac @@ -23,10 +23,12 @@ AC_PREREQ([2.61]) AC_INIT([guacamole-server], [0.8.3]) AM_INIT_AUTOMAKE([-Wall -Werror foreign subdir-objects]) +AM_SILENT_RULES([yes]) LT_PREREQ([2.2]) LT_INIT([dlopen]) +AC_CONFIG_HEADER([config.h]) AC_CONFIG_MACRO_DIR([m4]) # Programs @@ -55,7 +57,8 @@ AC_CHECK_LIB([cairo], [cairo_create], [CAIRO_LIBS=-lcairo], # libpthread AC_CHECK_LIB([pthread], [pthread_create], [PTHREAD_LIBS=-lpthread - AC_DEFINE([HAVE_LIBPTHREAD])]) + AC_DEFINE([HAVE_LIBPTHREAD],, + [Whether libpthread was found])]) # cunit AC_CHECK_LIB([cunit], [CU_run_test], [CUNIT_LIBS=-lcunit]) @@ -73,11 +76,13 @@ AC_SUBST(CUNIT_LIBS) AC_CHECK_FUNCS([clock_gettime gettimeofday memmove memset select strdup nanosleep]) AC_CHECK_DECL([png_get_io_ptr], - [AC_DEFINE([HAVE_PNG_GET_IO_PTR])],, + [AC_DEFINE([HAVE_PNG_GET_IO_PTR],, + [Whether png_get_io_ptr() is defined])],, [#include ]) AC_CHECK_DECL([cairo_format_stride_for_width], - [AC_DEFINE([HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH])],, + [AC_DEFINE([HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH],, + [Whether cairo_format_stride_for_width() is defined])],, [#include ]) # Typedefs @@ -120,7 +125,7 @@ then guacd will not support SSL connections. --------------------------------------------]) else - AC_DEFINE([ENABLE_SSL]) + AC_DEFINE([ENABLE_SSL],, [Whether SSL-related support is enabled]) fi AC_SUBST(SSL_LIBS) @@ -147,7 +152,8 @@ then Sound will not be encoded with Ogg Vorbis. --------------------------------------------]) else - AC_DEFINE([ENABLE_OGG]) + AC_DEFINE([ENABLE_OGG],, + [Whether support for Ogg Vorbis is enabled]) fi AC_SUBST(VORBIS_LIBS) @@ -170,7 +176,7 @@ then Sound support for VNC will be disabled --------------------------------------------]) else - AC_DEFINE([ENABLE_PULSE]) + AC_DEFINE([ENABLE_PULSE],, [Whether PulseAudio support is enabled]) fi AC_SUBST(PULSE_LIBS) @@ -215,7 +221,8 @@ then Support for VNC repeaters will not be built. --------------------------------------------]) else - AC_DEFINE([ENABLE_VNC_REPEATER]) + AC_DEFINE([ENABLE_VNC_REPEATER],, + [Whether support for VNC repeaters is enabled.]) fi fi @@ -240,7 +247,8 @@ then Support for listen-mode connections will not be built. --------------------------------------------]) else - AC_DEFINE([ENABLE_VNC_LISTEN]) + AC_DEFINE([ENABLE_VNC_LISTEN],, + [Whether support for listen-mode VNC connections is enabled.]) fi fi @@ -342,7 +350,8 @@ AC_CHECK_HEADERS([freerdp/client/cliprdr.h],, #include ]) AC_CHECK_DECL([freerdp_register_addin_provider], - [AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER])],, + [AC_DEFINE([HAVE_FREERDP_REGISTER_ADDIN_PROVIDER],, + [Whether freerdp_register_addin_provider() is defined])],, [#include ]) # @@ -374,7 +383,8 @@ AC_CHECK_HEADER(winpr/wtypes.h,, if test "x${have_winpr}" = "xyes" then - AC_DEFINE([ENABLE_WINPR]) + AC_DEFINE([ENABLE_WINPR],, + [Whether library support for WinPR types was found]) fi # @@ -396,7 +406,8 @@ fi # Set defines based on interface type, warn if unknown if test "x${freerdp_interface}" = "xlegacy"; then - AC_DEFINE([LEGACY_FREERDP]) + AC_DEFINE([LEGACY_FREERDP],, + [Whether the older version of the FreeRDP API was found]) elif test "x${freerdp_interface}" = "xunknown"; then AC_MSG_WARN([ -------------------------------------------- @@ -431,7 +442,8 @@ fi # Set defines based on interface type, warn if unknown if test "x${rdpsettings_interface}" = "xlegacy"; then - AC_DEFINE([LEGACY_RDPSETTINGS]) + AC_DEFINE([LEGACY_RDPSETTINGS],, + [Whether the legacy version of the rdpSettings API was found]) # Legacy interface may not have FastPath settings AC_CHECK_MEMBERS([rdpSettings.fast_path_input, @@ -450,7 +462,8 @@ fi # Activate FastPath settings if present if test "x${rdpsettings_fastpath}" = "xyes"; then - AC_DEFINE([HAVE_RDPSETTINGS_FASTPATH]) + AC_DEFINE([HAVE_RDPSETTINGS_FASTPATH],, + [Whether the rdpSettings structure has FastPath settings]) fi # @@ -472,7 +485,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include rdpBitmap b = { .Decompress = __decompress };]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) - AC_DEFINE([LEGACY_RDPBITMAP])]) + AC_DEFINE([LEGACY_RDPBITMAP],, + [Whether the legacy rdpBitmap API was found])]) # # FreeRDP: rdpPalette @@ -484,7 +498,8 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include PALETTE_ENTRY* foo = p.entries;]])], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) - AC_DEFINE([LEGACY_RDPPALETTE])]) + AC_DEFINE([LEGACY_RDPPALETTE],, + [Whether the legacy rdpPalette API was found])]) # # FreeRDP: rdpPointer @@ -515,7 +530,8 @@ fi # Set defines based on interface type, warn if unknown if test "x${event_interface}" = "xlegacy"; then - AC_DEFINE([LEGACY_EVENT]) + AC_DEFINE([LEGACY_EVENT],, + [Whether the legacy RDP_EVENT API was found]) elif test "x${event_interface}" = "xunknown"; then AC_MSG_WARN([ -------------------------------------------- @@ -574,7 +590,8 @@ then in libssh2. --------------------------------------------]) else - AC_DEFINE([ENABLE_SSH_AGENT]) + AC_DEFINE([ENABLE_SSH_AGENT],, + [Whether agent forwarding support for SSH is enabled]) fi fi diff --git a/src/guacd/client.c b/src/guacd/client.c index e44809e4..fb285afb 100644 --- a/src/guacd/client.c +++ b/src/guacd/client.c @@ -20,20 +20,21 @@ * THE SOFTWARE. */ - -#include -#include -#include - -#include -#include -#include -#include -#include +#include "config.h" #include "client.h" #include "log.h" +#include +#include +#include + +#include +#include +#include +#include +#include + /** * Sleep for the given number of milliseconds. * diff --git a/src/guacd/client.h b/src/guacd/client.h index ce770b2c..cca21d88 100644 --- a/src/guacd/client.h +++ b/src/guacd/client.h @@ -24,6 +24,10 @@ #ifndef _GUACD_CLIENT_H #define _GUACD_CLIENT_H +#include "config.h" + +#include + /** * The time to allow between sync responses in milliseconds. If a sync * instruction is sent to the client and no response is received within this diff --git a/src/guacd/daemon.c b/src/guacd/daemon.c index 57552efb..75f5cd78 100644 --- a/src/guacd/daemon.c +++ b/src/guacd/daemon.c @@ -20,29 +20,26 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "log.h" -#include -#include -#include -#include -#include -#include -#include -#include #include - -#include +#include +#include +#include #include #include - -#include +#include +#include +#include +#include #include -#include - -#ifdef ENABLE_SSL -#include -#include "socket-ssl.h" -#endif +#include +#include +#include +#include #include #include @@ -50,8 +47,10 @@ #include #include -#include "client.h" -#include "log.h" +#ifdef ENABLE_SSL +#include +#include "socket-ssl.h" +#endif #define GUACD_DEV_NULL "/dev/null" #define GUACD_ROOT "/" diff --git a/src/guacd/log.c b/src/guacd/log.c index d78528d0..1bb5e12e 100644 --- a/src/guacd/log.c +++ b/src/guacd/log.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ +#include "config.h" #include -#include #include #include +#include #include #include diff --git a/src/guacd/log.h b/src/guacd/log.h index 3c3b7953..b661481e 100644 --- a/src/guacd/log.h +++ b/src/guacd/log.h @@ -24,6 +24,8 @@ #ifndef __GUACD_LOG_H #define __GUACD_LOG_H +#include "config.h" + #include extern char log_prefix[64]; diff --git a/src/guacd/socket-ssl.c b/src/guacd/socket-ssl.c index a5ae1a1c..103e0af8 100644 --- a/src/guacd/socket-ssl.c +++ b/src/guacd/socket-ssl.c @@ -20,16 +20,16 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "socket-ssl.h" #include #include -#include - -#include #include - -#include "socket-ssl.h" +#include +#include static ssize_t __guac_socket_ssl_read_handler(guac_socket* socket, void* buf, size_t count) { diff --git a/src/guacd/socket-ssl.h b/src/guacd/socket-ssl.h index 9708cccb..3ad0a4da 100644 --- a/src/guacd/socket-ssl.h +++ b/src/guacd/socket-ssl.h @@ -24,8 +24,10 @@ #ifndef __GUACD_SOCKET_SSL_H #define __GUACD_SOCKET_SSL_H -#include +#include "config.h" + #include +#include /** * SSL socket-specific data. diff --git a/src/libguac/audio.c b/src/libguac/audio.c index 4f240d7f..f4bb44fd 100644 --- a/src/libguac/audio.c +++ b/src/libguac/audio.c @@ -20,21 +20,23 @@ * THE SOFTWARE. */ +#include "config.h" +#include "wav_encoder.h" + +#include #include #include -#include -#include -#include -#include + #include +#include +#include +#include #ifdef ENABLE_OGG #include "ogg_encoder.h" #endif -#include "wav_encoder.h" - guac_audio_stream* guac_audio_stream_alloc(guac_client* client, guac_audio_encoder* encoder) { guac_audio_stream* audio; diff --git a/src/libguac/client-handlers.c b/src/libguac/client-handlers.c index c954e912..fdecc9d2 100644 --- a/src/libguac/client-handlers.c +++ b/src/libguac/client-handlers.c @@ -20,13 +20,14 @@ * THE SOFTWARE. */ - -#include -#include +#include "config.h" #include "client.h" -#include "protocol.h" #include "client-handlers.h" +#include "protocol.h" + +#include +#include /* Guacamole instruction handler map */ diff --git a/src/libguac/client-handlers.h b/src/libguac/client-handlers.h index 6cbf6142..06c38958 100644 --- a/src/libguac/client-handlers.h +++ b/src/libguac/client-handlers.h @@ -24,9 +24,6 @@ #ifndef _GUAC_CLIENT_HANDLERS__H #define _GUAC_CLIENT_HANDLERS__H -#include "client.h" -#include "instruction.h" - /** * Provides initial handler functions and a lookup structure for automatically * handling client instructions. This is used only internally within libguac, @@ -35,6 +32,11 @@ * @file client-handlers.h */ +#include "config.h" + +#include "client.h" +#include "instruction.h" + /** * Internal handler for Guacamole instructions. */ diff --git a/src/libguac/client.c b/src/libguac/client.c index 02975d6f..1c451595 100644 --- a/src/libguac/client.c +++ b/src/libguac/client.c @@ -20,10 +20,7 @@ * THE SOFTWARE. */ - -#include -#include -#include +#include "config.h" #include "client.h" #include "client-handlers.h" @@ -35,6 +32,10 @@ #include "socket.h" #include "time.h" +#include +#include +#include + guac_layer __GUAC_DEFAULT_LAYER = { .index = 0 }; diff --git a/src/libguac/error.c b/src/libguac/error.c index 27da8766..d32b4260 100644 --- a/src/libguac/error.c +++ b/src/libguac/error.c @@ -20,17 +20,18 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "error.h" -#include #include +#include #include #ifdef HAVE_LIBPTHREAD #include #endif -#include "error.h" - /* Error strings */ const char* __GUAC_STATUS_SUCCESS_STR = "Success"; diff --git a/src/libguac/guacamole/audio.h b/src/libguac/guacamole/audio.h index d099bc6f..782c9a8a 100644 --- a/src/libguac/guacamole/audio.h +++ b/src/libguac/guacamole/audio.h @@ -24,15 +24,15 @@ #ifndef __GUAC_AUDIO_H #define __GUAC_AUDIO_H -#include -#include - /** * Provides functions and structures used for providing simple streaming audio. * * @file audio.h */ +#include +#include + typedef struct guac_audio_stream guac_audio_stream; /** diff --git a/src/libguac/guacamole/client.h b/src/libguac/guacamole/client.h index 06bf7172..aaff9f8e 100644 --- a/src/libguac/guacamole/client.h +++ b/src/libguac/guacamole/client.h @@ -24,7 +24,11 @@ #ifndef _GUAC_CLIENT_H #define _GUAC_CLIENT_H -#include +/** + * Provides functions and structures required for defining (and handling) a proxy client. + * + * @file client.h + */ #include "instruction.h" #include "layer.h" @@ -34,11 +38,7 @@ #include "stream.h" #include "timestamp.h" -/** - * Provides functions and structures required for defining (and handling) a proxy client. - * - * @file client.h - */ +#include /** * The maximum number of inbound streams supported by any one guac_client. diff --git a/src/libguac/guacamole/hash.h b/src/libguac/guacamole/hash.h index 35e1f9fb..1505b361 100644 --- a/src/libguac/guacamole/hash.h +++ b/src/libguac/guacamole/hash.h @@ -24,8 +24,6 @@ #ifndef _GUAC_HASH_H #define _GUAC_HASH_H -#include - /** * Provides functions and structures for producing likely-to-be-unique hash * values for images. @@ -33,6 +31,8 @@ * @file hash.h */ +#include + /** * Produces a 24-bit hash value from all pixels of the given surface. The * surface provided must be RGB or ARGB with each pixel stored in 32 bits. diff --git a/src/libguac/guacamole/instruction.h b/src/libguac/guacamole/instruction.h index 98e2e73c..f606ec2a 100644 --- a/src/libguac/guacamole/instruction.h +++ b/src/libguac/guacamole/instruction.h @@ -24,8 +24,6 @@ #ifndef _GUAC_INSTRUCTION_H #define _GUAC_INSTRUCTION_H -#include "socket.h" - /** * Provides functions and structures for reading, writing, and manipulating * Guacamole instructions. @@ -33,6 +31,8 @@ * @file instruction.h */ +#include "socket.h" + /** * The maximum number of characters per instruction. */ diff --git a/src/libguac/guacamole/protocol.h b/src/libguac/guacamole/protocol.h index bf2bd9bb..7fc871f8 100644 --- a/src/libguac/guacamole/protocol.h +++ b/src/libguac/guacamole/protocol.h @@ -24,13 +24,6 @@ #ifndef _GUAC_PROTOCOL_H #define _GUAC_PROTOCOL_H -#include - -#include "layer.h" -#include "socket.h" -#include "stream.h" -#include "timestamp.h" - /** * Provides functions and structures required for communicating using the * Guacamole protocol over a guac_socket connection, such as that provided by @@ -39,6 +32,13 @@ * @file protocol.h */ +#include "layer.h" +#include "socket.h" +#include "stream.h" +#include "timestamp.h" + +#include + /** * Set of all possible status codes returned by protocol operations. These * codes relate to Guacamole server/client communication, and not to internal diff --git a/src/libguac/guacamole/socket.h b/src/libguac/guacamole/socket.h index 68ed913d..e3278560 100644 --- a/src/libguac/guacamole/socket.h +++ b/src/libguac/guacamole/socket.h @@ -24,18 +24,18 @@ #ifndef _GUAC_SOCKET_H #define _GUAC_SOCKET_H -#include -#include -#include - -#include "timestamp.h" - /** * Defines the guac_socket object and functionss for using and manipulating it. * * @file socket.h */ +#include "timestamp.h" + +#include +#include +#include + /** * The number of bytes to buffer within each socket before flushing. */ diff --git a/src/libguac/guacamole/timestamp.h b/src/libguac/guacamole/timestamp.h index dc5adb61..6715cce8 100644 --- a/src/libguac/guacamole/timestamp.h +++ b/src/libguac/guacamole/timestamp.h @@ -24,14 +24,14 @@ #ifndef _GUAC_TIME_H #define _GUAC_TIME_H -#include - /** * Provides functions and structures for creating timestamps. * * @file timestamp.h */ +#include + /** * An arbitrary timestamp denoting a relative time value in milliseconds. */ diff --git a/src/libguac/guacamole/unicode.h b/src/libguac/guacamole/unicode.h index 90774a21..46a50194 100644 --- a/src/libguac/guacamole/unicode.h +++ b/src/libguac/guacamole/unicode.h @@ -24,14 +24,14 @@ #ifndef _GUAC_UNICODE_H #define _GUAC_UNICODE_H -#include - /** * Provides functions for manipulating Unicode strings. * * @file unicode.h */ +#include + /** * Given the initial byte of a single UTF-8 character, returns the overall * byte size of the entire character. diff --git a/src/libguac/hash.c b/src/libguac/hash.c index c1f7aa2f..baaa4fb7 100644 --- a/src/libguac/hash.c +++ b/src/libguac/hash.c @@ -20,9 +20,11 @@ * THE SOFTWARE. */ +#include "config.h" #include #include + #include /* diff --git a/src/libguac/instruction.c b/src/libguac/instruction.c index 4a9577cb..52f21b47 100644 --- a/src/libguac/instruction.c +++ b/src/libguac/instruction.c @@ -20,10 +20,7 @@ * THE SOFTWARE. */ - -#include -#include -#include +#include "config.h" #include "error.h" #include "instruction.h" @@ -31,6 +28,10 @@ #include "socket.h" #include "unicode.h" +#include +#include +#include + guac_instruction* guac_instruction_alloc() { /* Allocate space for instruction */ diff --git a/src/libguac/ogg_encoder.c b/src/libguac/ogg_encoder.c index 6160b11b..fe418068 100644 --- a/src/libguac/ogg_encoder.c +++ b/src/libguac/ogg_encoder.c @@ -20,17 +20,17 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "ogg_encoder.h" #include #include #include #include - #include -#include "ogg_encoder.h" - void ogg_encoder_begin_handler(guac_audio_stream* audio) { /* Allocate stream state */ diff --git a/src/libguac/ogg_encoder.h b/src/libguac/ogg_encoder.h index 34c99ce5..52b9e269 100644 --- a/src/libguac/ogg_encoder.h +++ b/src/libguac/ogg_encoder.h @@ -24,8 +24,9 @@ #ifndef __GUAC_OGG_ENCODER_H #define __GUAC_OGG_ENCODER_H -#include +#include "config.h" +#include #include typedef struct ogg_encoder_state { diff --git a/src/libguac/palette.c b/src/libguac/palette.c index 4175886a..b7374f80 100644 --- a/src/libguac/palette.c +++ b/src/libguac/palette.c @@ -20,19 +20,19 @@ * THE SOFTWARE. */ - -#include -#include -#include -#include -#include - -#include - -#include +#include "config.h" #include "palette.h" +#include +#include +#include +#include +#include + +#include +#include + guac_palette* guac_palette_alloc(cairo_surface_t* surface) { int x, y; diff --git a/src/libguac/palette.h b/src/libguac/palette.h index 090e2996..98d58d72 100644 --- a/src/libguac/palette.h +++ b/src/libguac/palette.h @@ -24,8 +24,8 @@ #ifndef __GUAC_PALETTE_H #define __GUAC_PALETTE_H -#include #include +#include typedef struct guac_palette_entry { diff --git a/src/libguac/plugin.c b/src/libguac/plugin.c index d4aea61e..cfbc1235 100644 --- a/src/libguac/plugin.c +++ b/src/libguac/plugin.c @@ -20,11 +20,7 @@ * THE SOFTWARE. */ - -#include -#include -#include -#include +#include "config.h" #include "client.h" #include "client-handlers.h" @@ -34,6 +30,11 @@ #include "socket.h" #include "time.h" +#include +#include +#include +#include + guac_client_plugin* guac_client_plugin_open(const char* protocol) { guac_client_plugin* plugin; diff --git a/src/libguac/pool.c b/src/libguac/pool.c index 33f9f57a..fc9177dd 100644 --- a/src/libguac/pool.c +++ b/src/libguac/pool.c @@ -20,12 +20,13 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "pool.h" #include #include -#include "pool.h" - guac_pool* guac_pool_alloc(int size) { guac_pool* pool = malloc(sizeof(guac_pool)); diff --git a/src/libguac/protocol.c b/src/libguac/protocol.c index da79b062..48372e15 100644 --- a/src/libguac/protocol.c +++ b/src/libguac/protocol.c @@ -20,23 +20,7 @@ * THE SOFTWARE. */ - -#include -#include -#include -#include -#include -#include - -#ifdef HAVE_PNGSTRUCT_H -#include -#endif - -#include - -#include - -#include +#include "config.h" #include "error.h" #include "layer.h" @@ -45,6 +29,21 @@ #include "socket.h" #include "unicode.h" +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef HAVE_PNGSTRUCT_H +#include +#endif + /* Output formatting functions */ ssize_t __guac_socket_write_length_string(guac_socket* socket, const char* str) { diff --git a/src/libguac/socket-fd.c b/src/libguac/socket-fd.c index 0b813ad6..f92719ad 100644 --- a/src/libguac/socket-fd.c +++ b/src/libguac/socket-fd.c @@ -20,14 +20,20 @@ * THE SOFTWARE. */ +#include "config.h" +#include "error.h" +#include "socket.h" + +#include +#include +#include +#include #include #include +#include +#include #include -#include -#include -#include -#include #ifdef __MINGW32__ #include @@ -35,12 +41,6 @@ #include #endif -#include -#include - -#include "socket.h" -#include "error.h" - typedef struct __guac_socket_fd_data { int fd; diff --git a/src/libguac/socket-nest.c b/src/libguac/socket-nest.c index 24c42d2b..ffff7c35 100644 --- a/src/libguac/socket-nest.c +++ b/src/libguac/socket-nest.c @@ -20,14 +20,22 @@ * THE SOFTWARE. */ +#include "config.h" +#include "error.h" +#include "protocol.h" +#include "socket.h" +#include "unicode.h" + +#include +#include +#include +#include #include #include +#include +#include #include -#include -#include -#include -#include #ifdef __MINGW32__ #include @@ -35,14 +43,6 @@ #include #endif -#include -#include - -#include "socket.h" -#include "protocol.h" -#include "error.h" -#include "unicode.h" - #define GUAC_SOCKET_NEST_BUFFER_SIZE 8192 typedef struct __guac_socket_nest_data { diff --git a/src/libguac/socket.c b/src/libguac/socket.c index 4287f168..e4db48b2 100644 --- a/src/libguac/socket.c +++ b/src/libguac/socket.c @@ -20,6 +20,12 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "error.h" +#include "protocol.h" +#include "socket.h" +#include "timestamp.h" #include #include @@ -28,6 +34,8 @@ #include #include #include +#include +#include #include #ifdef __MINGW32__ @@ -36,14 +44,6 @@ #include #endif -#include -#include - -#include "socket.h" -#include "protocol.h" -#include "timestamp.h" -#include "error.h" - char __guac_socket_BASE64_CHARACTERS[64] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', diff --git a/src/libguac/timestamp.c b/src/libguac/timestamp.c index ac182b73..5210ff65 100644 --- a/src/libguac/timestamp.c +++ b/src/libguac/timestamp.c @@ -20,16 +20,17 @@ * THE SOFTWARE. */ +#include "config.h" -#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_NANOSLEEP) -#include -#endif +#include "timestamp.h" #ifndef HAVE_CLOCK_GETTIME #include #endif -#include "timestamp.h" +#if defined(HAVE_CLOCK_GETTIME) || defined(HAVE_NANOSLEEP) +#include +#endif guac_timestamp guac_timestamp_current() { diff --git a/src/libguac/unicode.c b/src/libguac/unicode.c index 0deabba3..c3a21bfd 100644 --- a/src/libguac/unicode.c +++ b/src/libguac/unicode.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ - -#include +#include "config.h" #include "unicode.h" +#include + size_t guac_utf8_charsize(unsigned char c) { /* Determine size in bytes of character */ diff --git a/src/libguac/wav_encoder.c b/src/libguac/wav_encoder.c index 4cc6d060..86050865 100644 --- a/src/libguac/wav_encoder.c +++ b/src/libguac/wav_encoder.c @@ -20,8 +20,9 @@ * THE SOFTWARE. */ +#include "config.h" -#define WAV_BUFFER_SIZE 0x4000 +#include "wav_encoder.h" #include #include @@ -30,7 +31,7 @@ #include #include -#include "wav_encoder.h" +#define WAV_BUFFER_SIZE 0x4000 void wav_encoder_begin_handler(guac_audio_stream* audio) { diff --git a/src/libguac/wav_encoder.h b/src/libguac/wav_encoder.h index b871f9be..7068f134 100644 --- a/src/libguac/wav_encoder.h +++ b/src/libguac/wav_encoder.h @@ -24,6 +24,8 @@ #ifndef __GUAC_WAV_ENCODER_H #define __GUAC_WAV_ENCODER_H +#include "config.h" + #include typedef struct wav_encoder_riff_header { diff --git a/src/protocols/rdp/Makefile.am b/src/protocols/rdp/Makefile.am index b59b6076..b8f27886 100644 --- a/src/protocols/rdp/Makefile.am +++ b/src/protocols/rdp/Makefile.am @@ -75,7 +75,6 @@ noinst_HEADERS = \ guac_rdpsnd/rdpsnd_messages.h \ guac_rdpsnd/rdpsnd_service.h \ client.h \ - config.h \ debug.h \ default_pointer.h \ guac_handlers.h \ diff --git a/src/protocols/rdp/client.c b/src/protocols/rdp/client.c index 37a92605..f0da066f 100644 --- a/src/protocols/rdp/client.c +++ b/src/protocols/rdp/client.c @@ -20,34 +20,40 @@ * THE SOFTWARE. */ - #define _XOPEN_SOURCE 500 +#include "config.h" + +#include "client.h" +#include "default_pointer.h" +#include "guac_handlers.h" +#include "rdp_bitmap.h" +#include "rdp_gdi.h" +#include "rdp_glyph.h" +#include "rdp_keymap.h" +#include "rdp_pointer.h" + +#include +#include #include #include -#include - #include -#include -#include #include #include #include +#include #include #include -#include #include -#include #include - -#ifdef HAVE_FREERDP_CLIENT_CHANNELS_H -#include -#endif - -#ifdef HAVE_FREERDP_ADDIN_H -#include -#endif +#include +#include +#include +#include +#include +#include +#include #ifdef ENABLE_WINPR #include @@ -55,20 +61,13 @@ #include "compat/winpr-wtypes.h" #endif -#include -#include -#include -#include -#include +#ifdef HAVE_FREERDP_ADDIN_H +#include +#endif -#include "client.h" -#include "guac_handlers.h" -#include "rdp_keymap.h" -#include "rdp_bitmap.h" -#include "rdp_glyph.h" -#include "rdp_pointer.h" -#include "rdp_gdi.h" -#include "default_pointer.h" +#ifdef HAVE_FREERDP_CLIENT_CHANNELS_H +#include +#endif /* Client plugin arguments */ const char* GUAC_CLIENT_ARGS[] = { diff --git a/src/protocols/rdp/client.h b/src/protocols/rdp/client.h index 8cde60ea..f658e678 100644 --- a/src/protocols/rdp/client.h +++ b/src/protocols/rdp/client.h @@ -24,20 +24,20 @@ #ifndef _GUAC_RDP_CLIENT_H #define _GUAC_RDP_CLIENT_H -#include - -#include - -#include -#include - -#include -#include +#include "config.h" #include "rdp_fs.h" #include "rdp_keymap.h" #include "rdp_settings.h" +#include + +#include +#include +#include +#include +#include + /** * The maximum duration of a frame in milliseconds. */ diff --git a/src/protocols/rdp/compat/client-cliprdr.h b/src/protocols/rdp/compat/client-cliprdr.h index 43ced01f..f0beb0c6 100644 --- a/src/protocols/rdp/compat/client-cliprdr.h +++ b/src/protocols/rdp/compat/client-cliprdr.h @@ -24,6 +24,8 @@ #ifndef __GUAC_CLIENT_CLIPRDR_COMPAT_H #define __GUAC_CLIENT_CLIPRDR_COMPAT_H +#include "config.h" + #include #define CliprdrChannel_Class RDP_EVENT_CLASS_CLIPRDR diff --git a/src/protocols/rdp/compat/winpr-stream.c b/src/protocols/rdp/compat/winpr-stream.c index a2b3b5c5..5d604822 100644 --- a/src/protocols/rdp/compat/winpr-stream.c +++ b/src/protocols/rdp/compat/winpr-stream.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" #include "winpr-stream.h" diff --git a/src/protocols/rdp/compat/winpr-stream.h b/src/protocols/rdp/compat/winpr-stream.h index 10151792..163cbc16 100644 --- a/src/protocols/rdp/compat/winpr-stream.h +++ b/src/protocols/rdp/compat/winpr-stream.h @@ -24,9 +24,12 @@ #ifndef __GUAC_WINPR_STREAM_COMPAT_H #define __GUAC_WINPR_STREAM_COMPAT_H -#include +#include "config.h" + #include "winpr-wtypes.h" +#include + /* FreeRDP 1.0 streams */ #define Stream_Write stream_write diff --git a/src/protocols/rdp/compat/winpr-wtypes.h b/src/protocols/rdp/compat/winpr-wtypes.h index b2cecd4b..de881ef6 100644 --- a/src/protocols/rdp/compat/winpr-wtypes.h +++ b/src/protocols/rdp/compat/winpr-wtypes.h @@ -24,6 +24,8 @@ #ifndef __GUAC_WINPR_WTYPES_COMPAT_H #define __GUAC_WINPR_WTYPES_COMPAT_H +#include "config.h" + #include typedef uint8 BYTE; diff --git a/src/protocols/rdp/config.h b/src/protocols/rdp/config.h deleted file mode 100644 index 85334a4a..00000000 --- a/src/protocols/rdp/config.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (C) 2013 Glyptodon LLC - * - * Permission is hereby granted, free of charge, to any person obtaining a copy - * of this software and associated documentation files (the "Software"), to deal - * in the Software without restriction, including without limitation the rights - * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - * copies of the Software, and to permit persons to whom the Software is - * furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - * THE SOFTWARE. - */ - diff --git a/src/protocols/rdp/debug.h b/src/protocols/rdp/debug.h index 7a0821c0..39ed4922 100644 --- a/src/protocols/rdp/debug.h +++ b/src/protocols/rdp/debug.h @@ -24,6 +24,8 @@ #ifndef __GUAC_RDP_DEBUG_H #define __GUAC_RDP_DEBUG_H +#include "config.h" + #include /* Ensure GUAC_RDP_DEBUG_LEVEL is defined to a constant */ diff --git a/src/protocols/rdp/default_pointer.c b/src/protocols/rdp/default_pointer.c index 376faec8..4e993a8d 100644 --- a/src/protocols/rdp/default_pointer.c +++ b/src/protocols/rdp/default_pointer.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" #include #include diff --git a/src/protocols/rdp/default_pointer.h b/src/protocols/rdp/default_pointer.h index e3a108e2..fcc677f1 100644 --- a/src/protocols/rdp/default_pointer.h +++ b/src/protocols/rdp/default_pointer.h @@ -24,6 +24,8 @@ #ifndef _GUAC_RDP_DEFAULT_POINTER_H #define _GUAC_RDP_DEFAULT_POINTER_H +#include "config.h" + #include #include diff --git a/src/protocols/rdp/guac_handlers.c b/src/protocols/rdp/guac_handlers.c index 4156dc0c..c4a0ef40 100644 --- a/src/protocols/rdp/guac_handlers.c +++ b/src/protocols/rdp/guac_handlers.c @@ -20,26 +20,29 @@ * THE SOFTWARE. */ +#include "config.h" +#include "client.h" +#include "guac_handlers.h" +#include "rdp_cliprdr.h" +#include "rdp_keymap.h" + +#include #include #include #include - #include -#include -#include -#include -#include -#include #include +#include +#include +#include +#include #include - -#ifdef HAVE_FREERDP_CLIENT_CLIPRDR_H -#include -#else -#include "compat/client-cliprdr.h" -#endif +#include +#include +#include +#include #ifdef ENABLE_WINPR #include @@ -47,15 +50,11 @@ #include "compat/winpr-wtypes.h" #endif -#include -#include -#include -#include - -#include "client.h" -#include "rdp_keymap.h" -#include "rdp_cliprdr.h" -#include "guac_handlers.h" +#ifdef HAVE_FREERDP_CLIENT_CLIPRDR_H +#include +#else +#include "compat/client-cliprdr.h" +#endif void __guac_rdp_update_keysyms(guac_client* client, const int* keysym_string, int from, int to); int __guac_rdp_send_keysym(guac_client* client, int keysym, int pressed); diff --git a/src/protocols/rdp/guac_handlers.h b/src/protocols/rdp/guac_handlers.h index a610596b..822d2636 100644 --- a/src/protocols/rdp/guac_handlers.h +++ b/src/protocols/rdp/guac_handlers.h @@ -24,6 +24,8 @@ #ifndef _GUAC_RDP_GUAC_HANDLERS_H #define _GUAC_RDP_GUAC_HANDLERS_H +#include "config.h" + #include #include diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c index cbe69119..90c63c84 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.c @@ -20,6 +20,25 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "debug.h" +#include "rdpdr_fs_messages_dir_info.h" +#include "rdpdr_fs_messages_file_info.h" +#include "rdpdr_fs_messages.h" +#include "rdpdr_fs_messages_vol_info.h" +#include "rdpdr_messages.h" +#include "rdpdr_service.h" +#include "rdp_fs.h" +#include "rdp_status.h" +#include "unicode.h" + +#include +#include + +#include +#include #ifdef ENABLE_WINPR #include @@ -27,24 +46,6 @@ #include "compat/winpr-stream.h" #endif -#include -#include -#include - -#include "rdp_fs.h" -#include "rdp_status.h" -#include "rdpdr_fs_messages.h" -#include "rdpdr_fs_messages_vol_info.h" -#include "rdpdr_fs_messages_file_info.h" -#include "rdpdr_fs_messages_dir_info.h" -#include "rdpdr_messages.h" -#include "rdpdr_service.h" -#include "client.h" -#include "debug.h" -#include "unicode.h" - -#include - void guac_rdpdr_fs_process_create(guac_rdpdr_device* device, wStream* input_stream, int completion_id) { diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.h b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.h index cedbee31..a208634a 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages.h @@ -32,16 +32,18 @@ * @file rdpdr_fs_messages.h */ +#include "config.h" + +#include "rdpdr_service.h" + +#include + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include - -#include "rdpdr_service.h" - /** * Handles a Server Create Drive Request. Despite its name, this request opens * a file. diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c index 84f208fe..5a562131 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.c @@ -20,6 +20,16 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "debug.h" +#include "rdpdr_messages.h" +#include "rdpdr_service.h" +#include "rdp_fs.h" +#include "rdp_status.h" +#include "unicode.h" + +#include #ifdef ENABLE_WINPR #include @@ -27,15 +37,6 @@ #include "compat/winpr-stream.h" #endif -#include - -#include "rdpdr_service.h" -#include "rdpdr_messages.h" -#include "rdp_fs.h" -#include "rdp_status.h" -#include "debug.h" -#include "unicode.h" - void guac_rdpdr_fs_process_query_directory_info(guac_rdpdr_device* device, const char* entry_name, int file_id, int completion_id) { diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.h b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.h index a95e0bfb..535771f5 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_dir_info.h @@ -32,14 +32,16 @@ * @file rdpdr_fs_messages_dir_info.h */ +#include "config.h" + +#include "rdpdr_service.h" + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include "rdpdr_service.h" - /** * Processes a query request for FileDirectoryInformation. From the * documentation this is "defined as the file's name, time stamp, and size, or its diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.c index 791cd6d4..9970ebbe 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.c @@ -20,6 +20,20 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "debug.h" +#include "rdpdr_messages.h" +#include "rdpdr_service.h" +#include "rdp_fs.h" +#include "rdp_status.h" +#include "unicode.h" + +#include + +#include +#include #ifdef ENABLE_WINPR #include @@ -27,19 +41,6 @@ #include "compat/winpr-stream.h" #endif -#include -#include - -#include "rdpdr_messages.h" -#include "rdp_fs.h" -#include "rdp_status.h" -#include "rdpdr_service.h" -#include "client.h" -#include "debug.h" -#include "unicode.h" - -#include - void guac_rdpdr_fs_process_query_basic_info(guac_rdpdr_device* device, wStream* input_stream, int file_id, int completion_id) { diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.h b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.h index bf6a2722..f37c3539 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_file_info.h @@ -31,14 +31,16 @@ * @file rdpdr_fs_messages_file_info.h */ +#include "config.h" + +#include "rdpdr_service.h" + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include "rdpdr_service.h" - /** * Processes a query for FileBasicInformation. From the documentation, this is * "used to query a file for the times of creation, last access, last write, diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.c index 868c565c..aa450122 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.c @@ -20,6 +20,18 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "debug.h" +#include "rdpdr_messages.h" +#include "rdpdr_service.h" +#include "rdp_fs.h" +#include "rdp_status.h" +#include "unicode.h" + +#include +#include #ifdef ENABLE_WINPR #include @@ -27,18 +39,6 @@ #include "compat/winpr-stream.h" #endif -#include - -#include "rdpdr_messages.h" -#include "rdp_fs.h" -#include "rdp_status.h" -#include "rdpdr_service.h" -#include "client.h" -#include "debug.h" -#include "unicode.h" - -#include - void guac_rdpdr_fs_process_query_volume_info(guac_rdpdr_device* device, wStream* input_stream, int file_id, int completion_id) { diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.h b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.h index 1f14095d..3baedc79 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_messages_vol_info.h @@ -32,14 +32,16 @@ * @file rdpdr_fs_messages_vol_info.h */ +#include "config.h" + +#include "rdpdr_service.h" + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include "rdpdr_service.h" - /** * Processes a query request for FileFsVolumeInformation. According to the * documentation, this is "used to query information for a volume on which a diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.c b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.c index 7aa46124..745d8919 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.c @@ -21,23 +21,24 @@ */ +#include "config.h" + +#include "client.h" +#include "rdpdr_fs_messages.h" +#include "rdpdr_messages.h" +#include "rdpdr_service.h" +#include "rdp_fs.h" +#include "unicode.h" + +#include +#include + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include - -#include "rdp_fs.h" -#include "rdpdr_fs_messages.h" -#include "rdpdr_messages.h" -#include "rdpdr_service.h" -#include "client.h" -#include "unicode.h" - -#include - static void guac_rdpdr_device_fs_announce_handler(guac_rdpdr_device* device, wStream* output_stream, int device_id) { diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.h b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.h index 05ed041d..54b3ada6 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_fs_service.h @@ -35,10 +35,12 @@ * @file rdpdr_fs.h */ -#include +#include "config.h" #include "rdpdr_service.h" +#include + /** * Registers a new filesystem device within the RDPDR plugin. This must be done * before RDPDR connection finishes. diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_messages.c b/src/protocols/rdp/guac_rdpdr/rdpdr_messages.c index 3c740b28..2f599fde 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_messages.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_messages.c @@ -20,12 +20,20 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "rdpdr_messages.h" +#include "rdpdr_printer.h" +#include "rdpdr_service.h" #include #include #include + #include #include +#include #ifdef ENABLE_WINPR #include @@ -35,13 +43,6 @@ #include "compat/winpr-wtypes.h" #endif -#include - -#include "rdpdr_service.h" -#include "rdpdr_messages.h" -#include "rdpdr_printer.h" -#include "client.h" - static void guac_rdpdr_send_client_announce_reply(guac_rdpdrPlugin* rdpdr, unsigned int major, unsigned int minor, unsigned int client_id) { diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_messages.h b/src/protocols/rdp/guac_rdpdr/rdpdr_messages.h index 119e1e61..35618525 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_messages.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_messages.h @@ -24,14 +24,16 @@ #ifndef __GUAC_RDPDR_MESSAGES_H #define __GUAC_RDPDR_MESSAGES_H +#include "config.h" + +#include "rdpdr_service.h" + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include "rdpdr_service.h" - /** * Identifies the "core" component of RDPDR as the destination of the received * packet. diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c index 46408ade..36d58d82 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.c @@ -20,24 +20,25 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "rdpdr_messages.h" +#include "rdpdr_printer.h" +#include "rdpdr_service.h" +#include "rdp_status.h" + #include +#include +#include + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include - -#include - -#include "rdp_status.h" -#include "rdpdr_messages.h" -#include "rdpdr_printer.h" -#include "rdpdr_service.h" -#include "client.h" - /* Command to run GhostScript safely as a filter writing PDF */ char* const guac_rdpdr_pdf_filter_command[] = { "gs", diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.h b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.h index f476cbba..29c4e319 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_printer.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_printer.h @@ -24,14 +24,16 @@ #ifndef __GUAC_RDPDR_PRINTER_H #define __GUAC_RDPDR_PRINTER_H +#include "config.h" + +#include + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include - /** * Data specific to an instance of the printer device. */ diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_service.c b/src/protocols/rdp/guac_rdpdr/rdpdr_service.c index 77d10773..2bf5f886 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_service.c +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_service.c @@ -20,12 +20,21 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "debug.h" +#include "rdpdr_fs_service.h" +#include "rdpdr_messages.h" +#include "rdpdr_printer.h" +#include "rdpdr_service.h" #include #include #include #include +#include #ifdef ENABLE_WINPR #include @@ -35,16 +44,6 @@ #include "compat/winpr-wtypes.h" #endif -#include - -#include "rdpdr_service.h" -#include "rdpdr_messages.h" -#include "rdpdr_printer.h" -#include "rdpdr_fs_service.h" - -#include "client.h" -#include "debug.h" - /** * Entry point for RDPDR virtual channel. */ diff --git a/src/protocols/rdp/guac_rdpdr/rdpdr_service.h b/src/protocols/rdp/guac_rdpdr/rdpdr_service.h index 1153936e..f2a002a5 100644 --- a/src/protocols/rdp/guac_rdpdr/rdpdr_service.h +++ b/src/protocols/rdp/guac_rdpdr/rdpdr_service.h @@ -24,17 +24,19 @@ #ifndef __GUAC_RDPDR_SERVICE_H #define __GUAC_RDPDR_SERVICE_H +#include "config.h" + #include +#include +#include + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include -#include - /** * The maximum number of bytes to allow for a device read. */ diff --git a/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.c b/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.c index bceff240..200ceec3 100644 --- a/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.c +++ b/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.c @@ -20,12 +20,20 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "rdpsnd_messages.h" +#include "rdpsnd_service.h" #include #include #include + #include #include +#include +#include #ifdef ENABLE_WINPR #include @@ -35,13 +43,6 @@ #include "compat/winpr-wtypes.h" #endif -#include -#include - -#include "rdpsnd_service.h" -#include "rdpsnd_messages.h" -#include "client.h" - /* MESSAGE HANDLERS */ void guac_rdpsnd_formats_handler(guac_rdpsndPlugin* rdpsnd, diff --git a/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.h b/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.h index 62766e20..14697aa5 100644 --- a/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.h +++ b/src/protocols/rdp/guac_rdpsnd/rdpsnd_messages.h @@ -24,6 +24,10 @@ #ifndef __GUAC_RDPSND_MESSAGES_H #define __GUAC_RDPSND_MESSAGES_H +#include "config.h" + +#include "rdpsnd_service.h" + #include /* diff --git a/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.c b/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.c index 76958715..6d6f727f 100644 --- a/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.c +++ b/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.c @@ -20,6 +20,10 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "rdpsnd_service.h" +#include "rdpsnd_messages.h" #include #include @@ -27,6 +31,8 @@ #include #include #include +#include +#include #ifdef ENABLE_WINPR #include @@ -36,12 +42,6 @@ #include "compat/winpr-wtypes.h" #endif -#include -#include - -#include "rdpsnd_service.h" -#include "rdpsnd_messages.h" - /** * Entry point for RDPSND virtual channel. */ diff --git a/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.h b/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.h index 87a525c3..8b3849a2 100644 --- a/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.h +++ b/src/protocols/rdp/guac_rdpsnd/rdpsnd_service.h @@ -24,8 +24,17 @@ #ifndef __GUAC_RDPSND_SERVICE_H #define __GUAC_RDPSND_SERVICE_H +#include "config.h" + +#include #include +#ifdef ENABLE_WINPR +#include +#else +#include "compat/winpr-stream.h" +#endif + /** * The maximum number of PCM formats to accept during the initial RDPSND * handshake with the RDP server. diff --git a/src/protocols/rdp/rdp_bitmap.c b/src/protocols/rdp/rdp_bitmap.c index 482ae14e..df394604 100644 --- a/src/protocols/rdp/rdp_bitmap.c +++ b/src/protocols/rdp/rdp_bitmap.c @@ -20,20 +20,22 @@ * THE SOFTWARE. */ +#include "config.h" +#include "client.h" +#include "rdp_bitmap.h" + +#include #include #include -#include #include - -#include +#include +#include +#include #include #include - -#include -#include -#include +#include #ifdef ENABLE_WINPR #include @@ -41,9 +43,6 @@ #include "compat/winpr-wtypes.h" #endif -#include "client.h" -#include "rdp_bitmap.h" - void guac_rdp_cache_bitmap(rdpContext* context, rdpBitmap* bitmap) { guac_client* client = ((rdp_freerdp_context*) context)->client; diff --git a/src/protocols/rdp/rdp_bitmap.h b/src/protocols/rdp/rdp_bitmap.h index e4c1f8a8..da29f8ce 100644 --- a/src/protocols/rdp/rdp_bitmap.h +++ b/src/protocols/rdp/rdp_bitmap.h @@ -24,7 +24,10 @@ #ifndef _GUAC_RDP_RDP_BITMAP_H #define _GUAC_RDP_RDP_BITMAP_H +#include "config.h" + #include +#include #ifdef ENABLE_WINPR #include @@ -32,8 +35,6 @@ #include "compat/winpr-wtypes.h" #endif -#include - typedef struct guac_rdp_bitmap { /** diff --git a/src/protocols/rdp/rdp_cliprdr.c b/src/protocols/rdp/rdp_cliprdr.c index 7d183c6d..a2c55a98 100644 --- a/src/protocols/rdp/rdp_cliprdr.c +++ b/src/protocols/rdp/rdp_cliprdr.c @@ -20,16 +20,16 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "rdp_cliprdr.h" -#include #include +#include #include - -#ifdef HAVE_FREERDP_CLIENT_CLIPRDR_H -#include -#else -#include "compat/client-cliprdr.h" -#endif +#include +#include #ifdef ENABLE_WINPR #include @@ -37,11 +37,11 @@ #include "compat/winpr-wtypes.h" #endif -#include -#include - -#include "client.h" -#include "rdp_cliprdr.h" +#ifdef HAVE_FREERDP_CLIENT_CLIPRDR_H +#include +#else +#include "compat/client-cliprdr.h" +#endif void guac_rdp_process_cliprdr_event(guac_client* client, wMessage* event) { diff --git a/src/protocols/rdp/rdp_cliprdr.h b/src/protocols/rdp/rdp_cliprdr.h index 9decdec3..fb926622 100644 --- a/src/protocols/rdp/rdp_cliprdr.h +++ b/src/protocols/rdp/rdp_cliprdr.h @@ -24,13 +24,21 @@ #ifndef __GUAC_RDP_RDP_CLIPRDR_H #define __GUAC_RDP_RDP_CLIPRDR_H +#include "config.h" + +#include + #ifdef ENABLE_WINPR #include #else #include "compat/winpr-stream.h" #endif -#include +#ifdef HAVE_FREERDP_CLIENT_CLIPRDR_H +#include +#else +#include "compat/client-cliprdr.h" +#endif void guac_rdp_process_cliprdr_event(guac_client* client, wMessage* event); void guac_rdp_process_cb_monitor_ready(guac_client* client, wMessage* event); diff --git a/src/protocols/rdp/rdp_fs.c b/src/protocols/rdp/rdp_fs.c index 7ca159b9..369c9b14 100644 --- a/src/protocols/rdp/rdp_fs.c +++ b/src/protocols/rdp/rdp_fs.c @@ -20,25 +20,26 @@ * THE SOFTWARE. */ +#include "config.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - +#include "debug.h" #include "rdp_fs.h" #include "rdp_status.h" -#include "debug.h" #include "unicode.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + guac_rdp_fs* guac_rdp_fs_alloc(const char* drive_path) { guac_rdp_fs* fs = malloc(sizeof(guac_rdp_fs)); diff --git a/src/protocols/rdp/rdp_fs.h b/src/protocols/rdp/rdp_fs.h index ea1c5db2..cf422d91 100644 --- a/src/protocols/rdp/rdp_fs.h +++ b/src/protocols/rdp/rdp_fs.h @@ -35,9 +35,11 @@ * @file rdp_fs.h */ -#include -#include +#include "config.h" + #include +#include +#include #include diff --git a/src/protocols/rdp/rdp_gdi.c b/src/protocols/rdp/rdp_gdi.c index d52c8a64..04af4e02 100644 --- a/src/protocols/rdp/rdp_gdi.c +++ b/src/protocols/rdp/rdp_gdi.c @@ -20,9 +20,14 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "rdp_bitmap.h" #include #include +#include #ifdef ENABLE_WINPR #include @@ -30,11 +35,6 @@ #include "compat/winpr-wtypes.h" #endif -#include - -#include "client.h" -#include "rdp_bitmap.h" - guac_transfer_function guac_rdp_rop3_transfer_function(guac_client* client, int rop3) { diff --git a/src/protocols/rdp/rdp_gdi.h b/src/protocols/rdp/rdp_gdi.h index dd05ef37..189f7b17 100644 --- a/src/protocols/rdp/rdp_gdi.h +++ b/src/protocols/rdp/rdp_gdi.h @@ -24,8 +24,10 @@ #ifndef _GUAC_RDP_RDP_GDI_H #define _GUAC_RDP_RDP_GDI_H -#include +#include "config.h" + #include +#include guac_composite_mode guac_rdp_rop3_transfer_function(guac_client* client, int rop3); diff --git a/src/protocols/rdp/rdp_glyph.c b/src/protocols/rdp/rdp_glyph.c index 31a24b00..26f54533 100644 --- a/src/protocols/rdp/rdp_glyph.c +++ b/src/protocols/rdp/rdp_glyph.c @@ -20,9 +20,16 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "rdp_glyph.h" #include + #include +#include +#include #ifdef ENABLE_WINPR #include @@ -30,12 +37,6 @@ #include "compat/winpr-wtypes.h" #endif -#include -#include - -#include "client.h" -#include "rdp_glyph.h" - /* Define cairo_format_stride_for_width() if missing */ #ifndef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH #define cairo_format_stride_for_width(format, width) (width*4) diff --git a/src/protocols/rdp/rdp_glyph.h b/src/protocols/rdp/rdp_glyph.h index a89f9e82..f8ac313b 100644 --- a/src/protocols/rdp/rdp_glyph.h +++ b/src/protocols/rdp/rdp_glyph.h @@ -24,6 +24,8 @@ #ifndef _GUAC_RDP_RDP_GLYPH_H #define _GUAC_RDP_RDP_GLYPH_H +#include "config.h" + #include #ifdef ENABLE_WINPR diff --git a/src/protocols/rdp/rdp_keymap.c b/src/protocols/rdp/rdp_keymap.c index cc580d16..63a78cec 100644 --- a/src/protocols/rdp/rdp_keymap.c +++ b/src/protocols/rdp/rdp_keymap.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" #include "rdp_keymap.h" diff --git a/src/protocols/rdp/rdp_keymap.h b/src/protocols/rdp/rdp_keymap.h index e24042e7..2cab694a 100644 --- a/src/protocols/rdp/rdp_keymap.h +++ b/src/protocols/rdp/rdp_keymap.h @@ -24,11 +24,7 @@ #ifndef _GUAC_RDP_RDP_KEYMAP_H #define _GUAC_RDP_RDP_KEYMAP_H -#ifdef HAVE_FREERDP_LOCALE_KEYBOARD_H -#include -#else -#include -#endif +#include "config.h" #ifdef ENABLE_WINPR #include @@ -36,6 +32,12 @@ #include "compat/winpr-wtypes.h" #endif +#ifdef HAVE_FREERDP_LOCALE_KEYBOARD_H +#include +#else +#include +#endif + /** * Represents a keysym-to-scancode mapping for RDP, with extra information * about the state of prerequisite keysyms. diff --git a/src/protocols/rdp/rdp_keymap_base.c b/src/protocols/rdp/rdp_keymap_base.c index 701b4404..1c648159 100644 --- a/src/protocols/rdp/rdp_keymap_base.c +++ b/src/protocols/rdp/rdp_keymap_base.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ - -#include +#include "config.h" #include "rdp_keymap.h" +#include + static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = { /* BackSpace */ diff --git a/src/protocols/rdp/rdp_keymap_de_de.c b/src/protocols/rdp/rdp_keymap_de_de.c index 224e042a..c2d4b092 100644 --- a/src/protocols/rdp/rdp_keymap_de_de.c +++ b/src/protocols/rdp/rdp_keymap_de_de.c @@ -21,6 +21,10 @@ */ +#include "config.h" + +#include "rdp_keymap.h" + #include #ifdef HAVE_FREERDP_LOCALE_KEYBOARD_H @@ -29,8 +33,6 @@ #include #endif -#include "rdp_keymap.h" - static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = { /* space */ diff --git a/src/protocols/rdp/rdp_keymap_en_us.c b/src/protocols/rdp/rdp_keymap_en_us.c index fc0a7ce1..51d6abda 100644 --- a/src/protocols/rdp/rdp_keymap_en_us.c +++ b/src/protocols/rdp/rdp_keymap_en_us.c @@ -20,6 +20,9 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "rdp_keymap.h" #include @@ -29,8 +32,6 @@ #include #endif -#include "rdp_keymap.h" - static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = { /* space */ diff --git a/src/protocols/rdp/rdp_keymap_failsafe.c b/src/protocols/rdp/rdp_keymap_failsafe.c index 2b6a2cc6..07b4920f 100644 --- a/src/protocols/rdp/rdp_keymap_failsafe.c +++ b/src/protocols/rdp/rdp_keymap_failsafe.c @@ -20,6 +20,9 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "rdp_keymap.h" #include @@ -29,8 +32,6 @@ #include #endif -#include "rdp_keymap.h" - static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = { {0} diff --git a/src/protocols/rdp/rdp_keymap_fr_fr.c b/src/protocols/rdp/rdp_keymap_fr_fr.c index 64b63922..a4beea84 100644 --- a/src/protocols/rdp/rdp_keymap_fr_fr.c +++ b/src/protocols/rdp/rdp_keymap_fr_fr.c @@ -36,6 +36,10 @@ * * ***** END LICENSE BLOCK ***** */ +#include "config.h" + +#include "rdp_keymap.h" + #include #ifdef HAVE_FREERDP_LOCALE_KEYBOARD_H @@ -44,9 +48,6 @@ #include #endif -#include "rdp_keymap.h" - - static guac_rdp_keysym_desc __guac_rdp_keymap_mapping[] = { /* space */ diff --git a/src/protocols/rdp/rdp_pointer.c b/src/protocols/rdp/rdp_pointer.c index 5b55de36..9c3803c4 100644 --- a/src/protocols/rdp/rdp_pointer.c +++ b/src/protocols/rdp/rdp_pointer.c @@ -20,15 +20,16 @@ * THE SOFTWARE. */ - -#include -#include - -#include +#include "config.h" #include "client.h" -#include "rdp_pointer.h" #include "default_pointer.h" +#include "rdp_pointer.h" + +#include + +#include +#include void guac_rdp_pointer_new(rdpContext* context, rdpPointer* pointer) { diff --git a/src/protocols/rdp/rdp_pointer.h b/src/protocols/rdp/rdp_pointer.h index 774f4ed1..3c35ddfc 100644 --- a/src/protocols/rdp/rdp_pointer.h +++ b/src/protocols/rdp/rdp_pointer.h @@ -24,6 +24,8 @@ #ifndef _GUAC_RDP_RDP_POINTER_H #define _GUAC_RDP_RDP_POINTER_H +#include "config.h" + #include #include diff --git a/src/protocols/rdp/rdp_settings.c b/src/protocols/rdp/rdp_settings.c index 08da84a9..9439ee8f 100644 --- a/src/protocols/rdp/rdp_settings.c +++ b/src/protocols/rdp/rdp_settings.c @@ -20,9 +20,11 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "rdp_settings.h" #include -#include "rdp_settings.h" void guac_rdp_pull_settings(freerdp* rdp, guac_rdp_settings* guac_settings) { diff --git a/src/protocols/rdp/rdp_settings.h b/src/protocols/rdp/rdp_settings.h index b9654808..978d7ff2 100644 --- a/src/protocols/rdp/rdp_settings.h +++ b/src/protocols/rdp/rdp_settings.h @@ -24,11 +24,13 @@ #ifndef __GUAC_RDP_SETTINGS_H #define __GUAC_RDP_SETTINGS_H -#include -#include +#include "config.h" #include "rdp_keymap.h" +#include +#include + /** * The default RDP port. */ diff --git a/src/protocols/rdp/rdp_status.h b/src/protocols/rdp/rdp_status.h index 2379d28d..64c27d1f 100644 --- a/src/protocols/rdp/rdp_status.h +++ b/src/protocols/rdp/rdp_status.h @@ -30,6 +30,8 @@ * @file rdp_status.h */ +#include "config.h" + #define STATUS_SUCCESS 0x00000000 #define STATUS_NO_MORE_FILES 0x80000006 #define STATUS_DEVICE_OFF_LINE 0x80000010 diff --git a/src/protocols/rdp/unicode.c b/src/protocols/rdp/unicode.c index 1a375410..bcee36ad 100644 --- a/src/protocols/rdp/unicode.c +++ b/src/protocols/rdp/unicode.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" #include diff --git a/src/protocols/rdp/unicode.h b/src/protocols/rdp/unicode.h index ebb729d9..f6d24b93 100644 --- a/src/protocols/rdp/unicode.h +++ b/src/protocols/rdp/unicode.h @@ -21,6 +21,8 @@ */ +#include "config.h" + /** * Convert the given number of UTF-16 characters to UTF-8 characters. */ diff --git a/src/protocols/ssh/blank.c b/src/protocols/ssh/blank.c index d9ddbe83..f2253d59 100644 --- a/src/protocols/ssh/blank.c +++ b/src/protocols/ssh/blank.c @@ -20,14 +20,15 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "cursor.h" #include #include #include #include -#include "cursor.h" - guac_ssh_cursor* guac_ssh_create_blank(guac_client* client) { guac_socket* socket = client->socket; diff --git a/src/protocols/ssh/blank.h b/src/protocols/ssh/blank.h index 97d32c32..def9f1e2 100644 --- a/src/protocols/ssh/blank.h +++ b/src/protocols/ssh/blank.h @@ -24,6 +24,10 @@ #ifndef _GUAC_SSH_BLANK_H #define _GUAC_SSH_BLANK_H +#include "config.h" + +#include "cursor.h" + #include #include diff --git a/src/protocols/ssh/buffer.c b/src/protocols/ssh/buffer.c index ae898d24..1f0955eb 100644 --- a/src/protocols/ssh/buffer.c +++ b/src/protocols/ssh/buffer.c @@ -20,13 +20,14 @@ * THE SOFTWARE. */ - -#include -#include +#include "config.h" #include "buffer.h" #include "common.h" +#include +#include + guac_terminal_buffer* guac_terminal_buffer_alloc(int rows, guac_terminal_char* default_character) { /* Allocate scrollback */ diff --git a/src/protocols/ssh/buffer.h b/src/protocols/ssh/buffer.h index 6210ab15..9362d53c 100644 --- a/src/protocols/ssh/buffer.h +++ b/src/protocols/ssh/buffer.h @@ -24,6 +24,8 @@ #ifndef _SSH_GUAC_BUFFER_H #define _SSH_GUAC_BUFFER_H +#include "config.h" + #include "types.h" /** diff --git a/src/protocols/ssh/char_mappings.c b/src/protocols/ssh/char_mappings.c index ee420350..18f709aa 100644 --- a/src/protocols/ssh/char_mappings.c +++ b/src/protocols/ssh/char_mappings.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" const int vt100_map[] = { ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', diff --git a/src/protocols/ssh/char_mappings.h b/src/protocols/ssh/char_mappings.h index 42982dbb..fe823844 100644 --- a/src/protocols/ssh/char_mappings.h +++ b/src/protocols/ssh/char_mappings.h @@ -24,6 +24,8 @@ #ifndef _GUAC_SSH_CHAR_MAPPINGS_H #define _GUAC_SSH_CHAR_MAPPINGS_H +#include "config.h" + /** * VT100 graphics mapping. Each entry is the corresponding Unicode codepoint * for the character N+32, where N is the index of the element in the array. diff --git a/src/protocols/ssh/client.c b/src/protocols/ssh/client.c index 20ba97da..77af109e 100644 --- a/src/protocols/ssh/client.c +++ b/src/protocols/ssh/client.c @@ -20,23 +20,24 @@ * THE SOFTWARE. */ +#include "config.h" +#include "blank.h" +#include "client.h" +#include "guac_handlers.h" +#include "ibar.h" +#include "ssh_client.h" +#include "terminal.h" + +#include #include #include #include -#include -#include -#include #include #include - -#include "client.h" -#include "guac_handlers.h" -#include "terminal.h" -#include "blank.h" -#include "ibar.h" -#include "ssh_client.h" +#include +#include #define GUAC_SSH_DEFAULT_FONT_NAME "monospace" #define GUAC_SSH_DEFAULT_FONT_SIZE 12 diff --git a/src/protocols/ssh/client.h b/src/protocols/ssh/client.h index ff69fb35..95891fff 100644 --- a/src/protocols/ssh/client.h +++ b/src/protocols/ssh/client.h @@ -24,14 +24,17 @@ #ifndef _SSH_GUAC_CLIENT_H #define _SSH_GUAC_CLIENT_H -#include -#include -#include +#include "config.h" -#include "terminal.h" #include "cursor.h" #include "sftp.h" #include "ssh_key.h" +#include "terminal.h" + +#include + +#include +#include #ifdef ENABLE_SSH_AGENT #include "ssh_agent.h" diff --git a/src/protocols/ssh/common.c b/src/protocols/ssh/common.c index 0c669885..df1e6f12 100644 --- a/src/protocols/ssh/common.c +++ b/src/protocols/ssh/common.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" #include #include diff --git a/src/protocols/ssh/common.h b/src/protocols/ssh/common.h index 8704e0ac..358943ee 100644 --- a/src/protocols/ssh/common.h +++ b/src/protocols/ssh/common.h @@ -24,6 +24,8 @@ #ifndef _SSH_GUAC_COMMON_H #define _SSH_GUAC_COMMON_H +#include "config.h" + #include /** diff --git a/src/protocols/ssh/cursor.c b/src/protocols/ssh/cursor.c index 5d46d3d2..1dc800d5 100644 --- a/src/protocols/ssh/cursor.c +++ b/src/protocols/ssh/cursor.c @@ -20,14 +20,15 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "cursor.h" #include #include #include -#include "cursor.h" - guac_ssh_cursor* guac_ssh_cursor_alloc(guac_client* client) { /* Alloc new cursor, initialize buffer */ diff --git a/src/protocols/ssh/cursor.h b/src/protocols/ssh/cursor.h index fabdda53..1aff8b47 100644 --- a/src/protocols/ssh/cursor.h +++ b/src/protocols/ssh/cursor.h @@ -24,6 +24,8 @@ #ifndef _GUAC_SSH_CURSOR_H #define _GUAC_SSH_CURSOR_H +#include "config.h" + #include typedef struct guac_ssh_cursor { diff --git a/src/protocols/ssh/display.c b/src/protocols/ssh/display.c index 8d41b5b3..5304df96 100644 --- a/src/protocols/ssh/display.c +++ b/src/protocols/ssh/display.c @@ -20,16 +20,18 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "common.h" +#include "display.h" +#include "types.h" #include #include + #include #include -#include "common.h" -#include "types.h" -#include "display.h" - const guac_terminal_color guac_terminal_palette[16] = { /* Normal colors */ diff --git a/src/protocols/ssh/display.h b/src/protocols/ssh/display.h index 7d51ebab..e6cf8599 100644 --- a/src/protocols/ssh/display.h +++ b/src/protocols/ssh/display.h @@ -24,11 +24,13 @@ #ifndef _SSH_GUAC_DISPLAY_H #define _SSH_GUAC_DISPLAY_H -#include -#include +#include "config.h" #include "types.h" +#include +#include + /** * The available color palette. All integer colors within structures * here are indices into this palette. diff --git a/src/protocols/ssh/guac_handlers.c b/src/protocols/ssh/guac_handlers.c index 9ad43073..baf8e936 100644 --- a/src/protocols/ssh/guac_handlers.c +++ b/src/protocols/ssh/guac_handlers.c @@ -20,28 +20,26 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "common.h" +#include "cursor.h" +#include "guac_handlers.h" -#include -#include #include - #include #include +#include +#include #include -#include - #include #include #include #include - #include - -#include "guac_handlers.h" -#include "client.h" -#include "common.h" -#include "cursor.h" +#include int ssh_guac_client_handle_messages(guac_client* client) { diff --git a/src/protocols/ssh/guac_handlers.h b/src/protocols/ssh/guac_handlers.h index 3e690ada..14a0c4ee 100644 --- a/src/protocols/ssh/guac_handlers.h +++ b/src/protocols/ssh/guac_handlers.h @@ -24,6 +24,8 @@ #ifndef _SSH_GUAC_HANDLERS_H #define _SSH_GUAC_HANDLERS_H +#include "config.h" + #include int ssh_guac_client_handle_messages(guac_client* client); diff --git a/src/protocols/ssh/ibar.c b/src/protocols/ssh/ibar.c index 5184b3a4..405b7879 100644 --- a/src/protocols/ssh/ibar.c +++ b/src/protocols/ssh/ibar.c @@ -20,14 +20,15 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "cursor.h" #include #include #include #include -#include "cursor.h" - /* Macros for prettying up the embedded image. */ #define X 0x00,0x00,0x00,0xFF #define U 0x80,0x80,0x80,0xFF diff --git a/src/protocols/ssh/ibar.h b/src/protocols/ssh/ibar.h index fc606ba6..376a0d0a 100644 --- a/src/protocols/ssh/ibar.h +++ b/src/protocols/ssh/ibar.h @@ -24,6 +24,8 @@ #ifndef _GUAC_SSH_IBAR_H #define _GUAC_SSH_IBAR_H +#include "config.h" + #include #include diff --git a/src/protocols/ssh/sftp.c b/src/protocols/ssh/sftp.c index fc104071..1f0accd9 100644 --- a/src/protocols/ssh/sftp.c +++ b/src/protocols/ssh/sftp.c @@ -20,22 +20,22 @@ * THE SOFTWARE. */ +#include "config.h" -#include +#include "client.h" + +#include #include -#include #include #include -#include +#include +#include #include - #include #include #include -#include "client.h" - static bool __ssh_guac_valid_filename(char* filename) { /* Disallow "." as a filename */ diff --git a/src/protocols/ssh/sftp.h b/src/protocols/ssh/sftp.h index 2c6ce18a..884214a3 100644 --- a/src/protocols/ssh/sftp.h +++ b/src/protocols/ssh/sftp.h @@ -24,6 +24,8 @@ #ifndef _SSH_GUAC_SFTP_H #define _SSH_GUAC_SFTP_H +#include "config.h" + #include #include diff --git a/src/protocols/ssh/ssh_agent.c b/src/protocols/ssh/ssh_agent.c index ea3f4015..48397ea9 100644 --- a/src/protocols/ssh/ssh_agent.c +++ b/src/protocols/ssh/ssh_agent.c @@ -20,24 +20,23 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "ssh_agent.h" +#include "ssh_buffer.h" #include #include #include +#include #include - #include #include #include #include -#include - -#include "client.h" -#include "ssh_agent.h" -#include "ssh_buffer.h" - void ssh_auth_agent_sign(ssh_auth_agent* agent, char* data, int data_length) { LIBSSH2_CHANNEL* channel = agent->channel; diff --git a/src/protocols/ssh/ssh_agent.h b/src/protocols/ssh/ssh_agent.h index d553fd7c..7fc89dd7 100644 --- a/src/protocols/ssh/ssh_agent.h +++ b/src/protocols/ssh/ssh_agent.h @@ -24,6 +24,8 @@ #ifndef _GUAC_SSH_AGENT_H #define _GUAC_SSH_AGENT_H +#include "config.h" + #include "ssh_key.h" /** diff --git a/src/protocols/ssh/ssh_buffer.c b/src/protocols/ssh/ssh_buffer.c index 331b33ee..64f8de24 100644 --- a/src/protocols/ssh/ssh_buffer.c +++ b/src/protocols/ssh/ssh_buffer.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" #include #include diff --git a/src/protocols/ssh/ssh_buffer.h b/src/protocols/ssh/ssh_buffer.h index b7ed9ddb..cb7a6c13 100644 --- a/src/protocols/ssh/ssh_buffer.h +++ b/src/protocols/ssh/ssh_buffer.h @@ -24,8 +24,10 @@ #ifndef _GUAC_SSH_BUFFER_H #define _GUAC_SSH_BUFFER_H -#include +#include "config.h" + #include +#include /** * Writes the given byte to the given buffer, advancing the buffer pointer by diff --git a/src/protocols/ssh/ssh_client.c b/src/protocols/ssh/ssh_client.c index 4066737f..e7efa41a 100644 --- a/src/protocols/ssh/ssh_client.c +++ b/src/protocols/ssh/ssh_client.c @@ -20,23 +20,7 @@ * THE SOFTWARE. */ - -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include - -#include +#include "config.h" #include "client.h" #include "common.h" @@ -44,6 +28,21 @@ #include "sftp.h" #include "ssh_key.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + #ifdef ENABLE_SSH_AGENT #include "ssh_agent.h" #endif diff --git a/src/protocols/ssh/ssh_client.h b/src/protocols/ssh/ssh_client.h index 93e47fa7..2c8859cc 100644 --- a/src/protocols/ssh/ssh_client.h +++ b/src/protocols/ssh/ssh_client.h @@ -24,6 +24,8 @@ #ifndef __SSH_CLIENT_H #define __SSH_CLIENT_H +#include "config.h" + #include /** diff --git a/src/protocols/ssh/ssh_key.c b/src/protocols/ssh/ssh_key.c index f42a3f85..599985cb 100644 --- a/src/protocols/ssh/ssh_key.c +++ b/src/protocols/ssh/ssh_key.c @@ -20,6 +20,10 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "ssh_buffer.h" +#include "ssh_key.h" #include @@ -28,9 +32,6 @@ #include #include -#include "ssh_buffer.h" -#include "ssh_key.h" - ssh_key* ssh_key_alloc(char* data, int length, char* passphrase) { ssh_key* key; diff --git a/src/protocols/ssh/ssh_key.h b/src/protocols/ssh/ssh_key.h index 513caec9..84109f41 100644 --- a/src/protocols/ssh/ssh_key.h +++ b/src/protocols/ssh/ssh_key.h @@ -24,10 +24,12 @@ #ifndef _GUAC_SSH_KEY_H #define _GUAC_SSH_KEY_H +#include "config.h" + +#include #include #include #include -#include #include /** diff --git a/src/protocols/ssh/terminal.c b/src/protocols/ssh/terminal.c index 50a33123..73fc5cac 100644 --- a/src/protocols/ssh/terminal.c +++ b/src/protocols/ssh/terminal.c @@ -20,26 +20,26 @@ * THE SOFTWARE. */ +#include "config.h" -#include -#include -#include -#include - -#include -#include - -#include -#include -#include -#include - -#include "types.h" #include "buffer.h" #include "common.h" #include "display.h" #include "terminal.h" #include "terminal_handlers.h" +#include "types.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include void guac_terminal_reset(guac_terminal* term) { diff --git a/src/protocols/ssh/terminal.h b/src/protocols/ssh/terminal.h index 8c1a5415..a6a428ac 100644 --- a/src/protocols/ssh/terminal.h +++ b/src/protocols/ssh/terminal.h @@ -24,15 +24,17 @@ #ifndef _SSH_GUAC_TERMINAL_H #define _SSH_GUAC_TERMINAL_H -#include +#include "config.h" + +#include "buffer.h" +#include "display.h" +#include "types.h" + #include +#include #include -#include "types.h" -#include "display.h" -#include "buffer.h" - /** * The maximum number of custom tab stops. */ diff --git a/src/protocols/ssh/terminal_handlers.c b/src/protocols/ssh/terminal_handlers.c index 6c680d0c..71f28262 100644 --- a/src/protocols/ssh/terminal_handlers.c +++ b/src/protocols/ssh/terminal_handlers.c @@ -20,14 +20,15 @@ * THE SOFTWARE. */ +#include "config.h" -#include - +#include "char_mappings.h" #include "common.h" #include "sftp.h" #include "terminal.h" #include "terminal_handlers.h" -#include "char_mappings.h" + +#include /** * Response string sent when identification is requested. diff --git a/src/protocols/ssh/terminal_handlers.h b/src/protocols/ssh/terminal_handlers.h index 30a56b32..46f869e5 100644 --- a/src/protocols/ssh/terminal_handlers.h +++ b/src/protocols/ssh/terminal_handlers.h @@ -24,6 +24,8 @@ #ifndef _SSH_GUAC_TERMINAL_HANDLERS #define _SSH_GUAC_TERMINAL_HANDLERS +#include "config.h" + #include "terminal.h" int guac_terminal_echo(guac_terminal* term, char c); diff --git a/src/protocols/ssh/types.h b/src/protocols/ssh/types.h index 4f6dfd4e..12f3a854 100644 --- a/src/protocols/ssh/types.h +++ b/src/protocols/ssh/types.h @@ -24,6 +24,8 @@ #ifndef _SSH_GUAC_TYPES_H #define _SSH_GUAC_TYPES_H +#include "config.h" + #include /** diff --git a/src/protocols/vnc/client.c b/src/protocols/vnc/client.c index 4ac67af0..fe41007b 100644 --- a/src/protocols/vnc/client.c +++ b/src/protocols/vnc/client.c @@ -20,21 +20,21 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "default_pointer.h" +#include "guac_handlers.h" +#include "vnc_handlers.h" #include #include #include - -#include -#include -#include #include - -#include "client.h" -#include "vnc_handlers.h" -#include "guac_handlers.h" -#include "default_pointer.h" +#include +#include +#include #ifdef ENABLE_PULSE #include "pulse.h" diff --git a/src/protocols/vnc/client.h b/src/protocols/vnc/client.h index 150e9b15..9f89893e 100644 --- a/src/protocols/vnc/client.h +++ b/src/protocols/vnc/client.h @@ -24,8 +24,10 @@ #ifndef __GUAC_VNC_CLIENT_H #define __GUAC_VNC_CLIENT_H -#include +#include "config.h" + #include +#include #include #ifdef ENABLE_PULSE diff --git a/src/protocols/vnc/convert.c b/src/protocols/vnc/convert.c index 28966f2a..62cdc0c9 100644 --- a/src/protocols/vnc/convert.c +++ b/src/protocols/vnc/convert.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ +#include "config.h" +#include +#include #include #include -#include -#include char* convert(const char* from_charset, const char* to_charset, const char* input) { size_t input_remaining; diff --git a/src/protocols/vnc/convert.h b/src/protocols/vnc/convert.h index 5af26240..450e12ff 100644 --- a/src/protocols/vnc/convert.h +++ b/src/protocols/vnc/convert.h @@ -24,6 +24,8 @@ #ifndef __GUAC_VNC_VNC_CONVERT_H #define __GUAC_VNC_VNC_CONVERT_H +#include "config.h" + #include /** diff --git a/src/protocols/vnc/default_pointer.c b/src/protocols/vnc/default_pointer.c index 7768286f..9f59ef07 100644 --- a/src/protocols/vnc/default_pointer.c +++ b/src/protocols/vnc/default_pointer.c @@ -20,6 +20,7 @@ * THE SOFTWARE. */ +#include "config.h" #include #include diff --git a/src/protocols/vnc/default_pointer.h b/src/protocols/vnc/default_pointer.h index d10b7431..6de98426 100644 --- a/src/protocols/vnc/default_pointer.h +++ b/src/protocols/vnc/default_pointer.h @@ -24,6 +24,8 @@ #ifndef _GUAC_VNC_DEFAULT_POINTER_H #define _GUAC_VNC_DEFAULT_POINTER_H +#include "config.h" + #include #include diff --git a/src/protocols/vnc/guac_handlers.c b/src/protocols/vnc/guac_handlers.c index f0a649c4..22cdab8c 100644 --- a/src/protocols/vnc/guac_handlers.c +++ b/src/protocols/vnc/guac_handlers.c @@ -20,18 +20,18 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client.h" +#include "convert.h" #include #include #include #include -#include - #include - -#include "client.h" -#include "convert.h" +#include #ifdef ENABLE_PULSE #include "pulse.h" diff --git a/src/protocols/vnc/guac_handlers.h b/src/protocols/vnc/guac_handlers.h index 9e82b063..8ad1e2f1 100644 --- a/src/protocols/vnc/guac_handlers.h +++ b/src/protocols/vnc/guac_handlers.h @@ -24,6 +24,8 @@ #ifndef __GUAC_VNC_GUAC_HANDLERS_H #define __GUAC_VNC_GUAC_HANDLERS_H +#include "config.h" + #include int vnc_guac_client_handle_messages(guac_client* client); diff --git a/src/protocols/vnc/pulse.c b/src/protocols/vnc/pulse.c index 5482af44..9eed288e 100644 --- a/src/protocols/vnc/pulse.c +++ b/src/protocols/vnc/pulse.c @@ -20,15 +20,15 @@ * THE SOFTWARE. */ - -#include -#include - -#include +#include "config.h" #include "client.h" #include "pulse.h" +#include +#include +#include + static void __stream_read_callback(pa_stream* stream, size_t length, void* data) { diff --git a/src/protocols/vnc/pulse.h b/src/protocols/vnc/pulse.h index 56830fac..62a1515e 100644 --- a/src/protocols/vnc/pulse.h +++ b/src/protocols/vnc/pulse.h @@ -24,6 +24,8 @@ #ifndef __GUAC_VNC_PULSE_H #define __GUAC_VNC_PULSE_H +#include "config.h" + /** * The number of bytes to request for the audio fragments received from * PulseAudio. diff --git a/src/protocols/vnc/vnc_handlers.c b/src/protocols/vnc/vnc_handlers.c index a5630884..f0573a3a 100644 --- a/src/protocols/vnc/vnc_handlers.c +++ b/src/protocols/vnc/vnc_handlers.c @@ -20,23 +20,22 @@ * THE SOFTWARE. */ - -#include -#include -#include -#include - -#include - -#include - -#include -#include -#include +#include "config.h" #include "client.h" #include "convert.h" +#include +#include +#include +#include + +#include +#include +#include +#include +#include + /* Define cairo_format_stride_for_width() if missing */ #ifndef HAVE_CAIRO_FORMAT_STRIDE_FOR_WIDTH #define cairo_format_stride_for_width(format, width) (width*4) diff --git a/src/protocols/vnc/vnc_handlers.h b/src/protocols/vnc/vnc_handlers.h index e05a4b31..7e6870d1 100644 --- a/src/protocols/vnc/vnc_handlers.h +++ b/src/protocols/vnc/vnc_handlers.h @@ -24,6 +24,8 @@ #ifndef __GUAC_VNC_VNC_HANDLERS_H #define __GUAC_VNC_VNC_HANDLERS_H +#include "config.h" + #include void guac_vnc_cursor(rfbClient* client, int x, int y, int w, int h, int bpp); diff --git a/tests/client/buffer_pool.c b/tests/client/buffer_pool.c index 09128959..fd856838 100644 --- a/tests/client/buffer_pool.c +++ b/tests/client/buffer_pool.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client_suite.h" #include - #include -#include "client_suite.h" void test_buffer_pool() { diff --git a/tests/client/client_suite.c b/tests/client/client_suite.c index 9f572429..9cfaea1f 100644 --- a/tests/client/client_suite.c +++ b/tests/client/client_suite.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ - -#include +#include "config.h" #include "client_suite.h" +#include + int client_suite_init() { return 0; } diff --git a/tests/client/client_suite.h b/tests/client/client_suite.h index 1ce6d6cb..d89f071f 100644 --- a/tests/client/client_suite.h +++ b/tests/client/client_suite.h @@ -24,6 +24,8 @@ #ifndef _GUAC_TEST_CLIENT_SUITE_H #define _GUAC_TEST_CLIENT_SUITE_H +#include "config.h" + int register_client_suite(); void test_layer_pool(); diff --git a/tests/client/layer_pool.c b/tests/client/layer_pool.c index 2cb21964..97cab114 100644 --- a/tests/client/layer_pool.c +++ b/tests/client/layer_pool.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client_suite.h" #include - #include -#include "client_suite.h" void test_layer_pool() { diff --git a/tests/protocol/base64_decode.c b/tests/protocol/base64_decode.c index c65b9595..5673f70d 100644 --- a/tests/protocol/base64_decode.c +++ b/tests/protocol/base64_decode.c @@ -20,16 +20,17 @@ * THE SOFTWARE. */ - -#include -#include -#include -#include - -#include +#include "config.h" #include "suite.h" +#include +#include +#include + +#include +#include + void test_base64_decode() { /* Test strings */ diff --git a/tests/protocol/instruction_parse.c b/tests/protocol/instruction_parse.c index e7febeab..63eaf25c 100644 --- a/tests/protocol/instruction_parse.c +++ b/tests/protocol/instruction_parse.c @@ -20,16 +20,17 @@ * THE SOFTWARE. */ - -#include -#include -#include -#include - -#include +#include "config.h" #include "suite.h" +#include +#include +#include + +#include +#include + void test_instruction_parse() { /* Allocate instruction space */ diff --git a/tests/protocol/instruction_read.c b/tests/protocol/instruction_read.c index bf1ea4e5..886cffe0 100644 --- a/tests/protocol/instruction_read.c +++ b/tests/protocol/instruction_read.c @@ -20,19 +20,20 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "suite.h" -#include #include #include -#include +#include +#include #include #include #include #include -#include "suite.h" - void test_instruction_read() { int rfd, wfd; diff --git a/tests/protocol/instruction_write.c b/tests/protocol/instruction_write.c index 3898b982..4e7ef3f8 100644 --- a/tests/protocol/instruction_write.c +++ b/tests/protocol/instruction_write.c @@ -20,19 +20,20 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "suite.h" -#include #include #include -#include +#include +#include #include #include #include #include -#include "suite.h" - void test_instruction_write() { int rfd, wfd; diff --git a/tests/protocol/nest_write.c b/tests/protocol/nest_write.c index 1fba1ac6..bc30b8a2 100644 --- a/tests/protocol/nest_write.c +++ b/tests/protocol/nest_write.c @@ -20,19 +20,20 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "suite.h" -#include #include #include -#include +#include +#include #include #include #include #include -#include "suite.h" - void test_nest_write() { int rfd, wfd; diff --git a/tests/protocol/suite.c b/tests/protocol/suite.c index ff4fb735..00c744c1 100644 --- a/tests/protocol/suite.c +++ b/tests/protocol/suite.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ - -#include +#include "config.h" #include "suite.h" +#include + int protocol_suite_init() { return 0; } diff --git a/tests/protocol/suite.h b/tests/protocol/suite.h index 97a2d54e..5c1e2cb4 100644 --- a/tests/protocol/suite.h +++ b/tests/protocol/suite.h @@ -24,6 +24,8 @@ #ifndef _GUAC_TEST_PROTOCOL_SUITE_H #define _GUAC_TEST_PROTOCOL_SUITE_H +#include "config.h" + /* Unicode (UTF-8) strings */ #define UTF8_1 "\xe7\x8a\xac" /* One character */ diff --git a/tests/test_libguac.c b/tests/test_libguac.c index 36598a5c..ad6b5889 100644 --- a/tests/test_libguac.c +++ b/tests/test_libguac.c @@ -20,13 +20,14 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "client/client_suite.h" +#include "protocol/suite.h" +#include "util/util_suite.h" #include -#include "protocol/suite.h" -#include "client/client_suite.h" -#include "util/util_suite.h" - int main() { /* Init registry */ diff --git a/tests/util/guac_pool.c b/tests/util/guac_pool.c index 7c5289a4..ba98bb12 100644 --- a/tests/util/guac_pool.c +++ b/tests/util/guac_pool.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "util_suite.h" #include - #include -#include "util_suite.h" #define UNSEEN 0 #define SEEN_PHASE_1 1 diff --git a/tests/util/guac_unicode.c b/tests/util/guac_unicode.c index 701e7607..51628625 100644 --- a/tests/util/guac_unicode.c +++ b/tests/util/guac_unicode.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ +#include "config.h" + +#include "util_suite.h" #include - #include -#include "util_suite.h" void test_guac_unicode() { diff --git a/tests/util/util_suite.c b/tests/util/util_suite.c index 5eb79624..a9fcc477 100644 --- a/tests/util/util_suite.c +++ b/tests/util/util_suite.c @@ -20,11 +20,12 @@ * THE SOFTWARE. */ - -#include +#include "config.h" #include "util_suite.h" +#include + int util_suite_init() { return 0; } diff --git a/tests/util/util_suite.h b/tests/util/util_suite.h index ab0e094f..88687e11 100644 --- a/tests/util/util_suite.h +++ b/tests/util/util_suite.h @@ -32,6 +32,8 @@ * @file util_suite.h */ +#include "config.h" + /** * A single Unicode character encoded as one byte with UTF-8. */