Unify the include style of shared/ headers

When all shared/ headers are included in the same way, we can drop unnecessary
include seach paths from the compiler.

This include style was chosen because it is prevalent in the code base. Doing
anything different would have been a bigger patch.

This also means that we need to keep the project root directory in the include
search path, which means that one could accidentally include private headers
with

	#include "libweston/dbus.h"

or even

	#include <libweston/dbus.h>

IMO such problem is smaller than the churn caused by any of the alternatives,
and we should be able to catch those in review. We might even be able to catch
those with grep in CI if necessary.

The "bad" include style was found with:
$ for h in shared/*.h; do git grep -F $(basename $h); done | grep -vF '"shared/'

Signed-off-by: Pekka Paalanen <pekka.paalanen@collabora.com>
dev
Pekka Paalanen 6 years ago
parent acf84fd29f
commit c232f8d934
  1. 2
      clients/nested-client.c
  2. 2
      clients/nested.c
  3. 6
      compositor/main.c
  4. 2
      libweston-desktop/libweston-desktop.c
  5. 2
      libweston/backend-drm/drm.c
  6. 2
      libweston/backend-wayland/wayland.c
  7. 2
      libweston/backend-x11/x11.c
  8. 4
      libweston/pixel-formats.c
  9. 2
      libweston/renderer-gl/egl-glue.c
  10. 2
      libweston/renderer-gl/gl-renderer.c
  11. 2
      libweston/timeline.c
  12. 2
      libweston/weston-log-file.c
  13. 2
      libweston/weston-log-flight-rec.c
  14. 2
      libweston/weston-log-wayland.c
  15. 2
      libweston/weston-log.c
  16. 2
      tests/surface-screenshot-test.c
  17. 2
      tests/timespec-test.c
  18. 2
      xwayland/window-manager.c

@ -34,7 +34,7 @@
#include <GLES2/gl2.h>
#include <EGL/egl.h>
#include "../shared/platform.h"
#include "shared/platform.h"
struct window;
struct seat;

@ -51,7 +51,7 @@
#include "shared/xalloc.h"
#include "window.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
static int option_blit;

@ -48,9 +48,9 @@
#include "weston.h"
#include <libweston/libweston.h>
#include "../shared/os-compatibility.h"
#include "../shared/helpers.h"
#include "../shared/string-helpers.h"
#include "shared/os-compatibility.h"
#include "shared/helpers.h"
#include "shared/string-helpers.h"
#include "git-version.h"
#include <libweston/version.h>
#include "weston.h"

@ -30,7 +30,7 @@
#include <libweston/libweston.h>
#include <libweston/zalloc.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston-desktop/libweston-desktop.h>
#include "internal.h"

@ -57,7 +57,7 @@
#include "shared/timespec-util.h"
#include "shared/string-helpers.h"
#include "renderer-gl/gl-renderer.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include "pixman-renderer.h"
#include "pixel-formats.h"
#include "libbacklight.h"

@ -49,7 +49,7 @@
#include <libweston/libweston.h>
#include <libweston/backend-wayland.h>
#include "renderer-gl/gl-renderer.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include "pixman-renderer.h"
#include "shared/helpers.h"
#include "shared/image-loader.h"

@ -58,7 +58,7 @@
#include "shared/timespec-util.h"
#include "shared/file-util.h"
#include "renderer-gl/gl-renderer.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include "pixman-renderer.h"
#include "presentation-time-server-protocol.h"
#include "linux-dmabuf.h"

@ -34,7 +34,7 @@
#include <drm_fourcc.h>
#include <wayland-client-protocol.h>
#include "helpers.h"
#include "shared/helpers.h"
#include "wayland-util.h"
#include "pixel-formats.h"
@ -60,7 +60,7 @@
.bits.a = a_, \
.component_type = PIXEL_COMPONENT_TYPE_FIXED
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
/**
* Table of DRM formats supported by Weston; RGB, ARGB and YUV formats are

@ -35,7 +35,7 @@
#include "gl-renderer.h"
#include "gl-renderer-internal.h"
#include "pixel-formats.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#include <assert.h>

@ -57,7 +57,7 @@
#include "shared/helpers.h"
#include "shared/platform.h"
#include "shared/timespec-util.h"
#include "weston-egl-ext.h"
#include "shared/weston-egl-ext.h"
#define GR_GL_VERSION(major, minor) \
(((uint32_t)(major) << 16) | (uint32_t)(minor))

@ -34,7 +34,7 @@
#include "timeline.h"
#include <libweston/libweston.h>
#include "file-util.h"
#include "shared/file-util.h"
struct timeline_log {
clock_t clk_id;

@ -26,7 +26,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

@ -26,7 +26,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

@ -26,7 +26,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

@ -27,7 +27,7 @@
#include "config.h"
#include <libweston/weston-log.h>
#include "helpers.h"
#include "shared/helpers.h"
#include <libweston/libweston.h>
#include "weston-log-internal.h"

@ -35,7 +35,7 @@
#include <libweston/libweston.h>
#include "compositor/weston.h"
#include "file-util.h"
#include "shared/file-util.h"
#include "libweston-internal.h"
static char *

@ -34,7 +34,7 @@
#include <unistd.h>
#include <time.h>
#include "timespec-util.h"
#include "shared/timespec-util.h"
#include "shared/helpers.h"
#include "zunitc/zunitc.h"

@ -45,7 +45,7 @@
#include "xwayland.h"
#include "xwayland-internal-interface.h"
#include "cairo-util.h"
#include "shared/cairo-util.h"
#include "hash.h"
#include "shared/helpers.h"

Loading…
Cancel
Save