Unify the include style of shared/ headers
authorPekka Paalanen <pekka.paalanen@collabora.com>
Fri, 5 Apr 2019 13:09:45 +0000 (16:09 +0300)
committerPekka Paalanen <pekka.paalanen@collabora.com>
Fri, 4 Oct 2019 13:04:48 +0000 (16:04 +0300)
commitc232f8d93422512611badd456171e788abd86ba6
treec81fbef543f16b233e16e2619cea09ff91440a18
parentacf84fd29fce2e417e4abab48c467b5fc82c6cd1
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>
18 files changed:
clients/nested-client.c
clients/nested.c
compositor/main.c
libweston-desktop/libweston-desktop.c
libweston/backend-drm/drm.c
libweston/backend-wayland/wayland.c
libweston/backend-x11/x11.c
libweston/pixel-formats.c
libweston/renderer-gl/egl-glue.c
libweston/renderer-gl/gl-renderer.c
libweston/timeline.c
libweston/weston-log-file.c
libweston/weston-log-flight-rec.c
libweston/weston-log-wayland.c
libweston/weston-log.c
tests/surface-screenshot-test.c
tests/timespec-test.c
xwayland/window-manager.c