Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx> --- docs/spice_style.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/docs/spice_style.txt b/docs/spice_style.txt index 7de4a43..1574aef 100644 --- a/docs/spice_style.txt +++ b/docs/spice_style.txt @@ -307,3 +307,34 @@ char *array[] = { "item_2", "item_3", }; + +Header inclusion +---------------- + +Headers should be included in this order + +[source,c] +---- +#include <system_headers.h> +#include <no_spice_no_system_libraries.h> +#include <spice_protocol.h> +#include <spice_common.h> + +#include "spice_server.h" +---- + +Also in source (no header) files you must include `config.h` at the beginning so should start (beside comments and copyright) with + +[source,c] +---- +#ifdef HAVE_CONFIG_H +#include <config.h> +#endif + +#include <system_headers.h> +#include <no_spice_no_system_libraries.h> +#include <spice_protocol.h> +#include <spice_common.h> + +#include "spice_server.h" +---- -- 2.7.4 _______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel