From ecbdcfd373025be6454a0aee7d870ca096fb7d52 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Thu, 4 Apr 2019 14:46:00 +0300 Subject: [PATCH] Rename zalloc.h to libweston/zalloc.h It is a public installed header used by libweston.h. See "Rename compositor.h to libweston/libweston.h" for rationale. Signed-off-by: Pekka Paalanen --- clients/desktop-shell.c | 2 +- clients/fullscreen.c | 2 +- clients/ivi-shell-user-interface.c | 2 +- clients/meson.build | 6 +++--- clients/multi-resource.c | 2 +- clients/presentation-shm.c | 2 +- clients/simple-damage.c | 2 +- clients/simple-dmabuf-drm.c | 2 +- clients/simple-dmabuf-egl.c | 2 +- clients/simple-dmabuf-v4l.c | 2 +- clients/simple-shm.c | 2 +- clients/subsurfaces.c | 2 +- clients/weston-debug.c | 2 +- clients/weston-info.c | 2 +- clients/window.c | 2 +- clients/window.h | 2 +- compositor/systemd-notify.c | 2 +- include/libweston/libweston.h | 2 +- include/libweston/meson.build | 1 + {shared => include/libweston}/zalloc.h | 0 libweston-desktop/client.c | 2 +- libweston-desktop/libweston-desktop.c | 2 +- libweston-desktop/seat.c | 2 +- libweston-desktop/surface.c | 2 +- libweston-desktop/wl-shell.c | 2 +- libweston-desktop/xdg-shell-v6.c | 2 +- libweston-desktop/xdg-shell.c | 2 +- libweston-desktop/xwayland.c | 2 +- libweston/meson.build | 5 ----- libweston/touch-calibration.c | 2 +- shared/xalloc.h | 2 +- tests/input-timestamps-helper.c | 2 +- tests/meson.build | 8 +++++--- tests/weston-test-client-helper.c | 2 +- tools/zunitc/src/zuc_base_logger.c | 2 +- tools/zunitc/src/zuc_collector.c | 2 +- tools/zunitc/src/zuc_junit_reporter.c | 3 +-- tools/zunitc/src/zunitc_impl.c | 2 +- 38 files changed, 42 insertions(+), 45 deletions(-) rename {shared => include/libweston}/zalloc.h (100%) diff --git a/clients/desktop-shell.c b/clients/desktop-shell.c index 8e4fae94..c60e74d2 100644 --- a/clients/desktop-shell.c +++ b/clients/desktop-shell.c @@ -46,7 +46,7 @@ #include #include "shared/helpers.h" #include "shared/xalloc.h" -#include "shared/zalloc.h" +#include #include "shared/file-util.h" #include "weston-desktop-shell-client-protocol.h" diff --git a/clients/fullscreen.c b/clients/fullscreen.c index e2e6477f..22fcec11 100644 --- a/clients/fullscreen.c +++ b/clients/fullscreen.c @@ -36,7 +36,7 @@ #include #include "window.h" #include "fullscreen-shell-unstable-v1-client-protocol.h" -#include "shared/zalloc.h" +#include struct fs_output { struct wl_list link; diff --git a/clients/ivi-shell-user-interface.c b/clients/ivi-shell-user-interface.c index 44baa542..445892a6 100644 --- a/clients/ivi-shell-user-interface.c +++ b/clients/ivi-shell-user-interface.c @@ -42,7 +42,7 @@ #include "shared/helpers.h" #include "shared/os-compatibility.h" #include "shared/xalloc.h" -#include "shared/zalloc.h" +#include #include "shared/file-util.h" #include "ivi-application-client-protocol.h" #include "ivi-hmi-controller-client-protocol.h" diff --git a/clients/meson.build b/clients/meson.build index 53a94212..3f180f77 100644 --- a/clients/meson.build +++ b/clients/meson.build @@ -132,7 +132,7 @@ foreach t : simple_clients executable( t_name, t.get('sources'), - include_directories: include_directories('..'), + include_directories: [ include_directories('..'), public_inc ], dependencies: t_deps, install: true ) @@ -215,7 +215,7 @@ foreach t : tools_list executable( 'weston-@0@'.format(t.get('name')), t.get('sources'), - include_directories: include_directories('..', '../shared'), + include_directories: [ include_directories('..', '../shared'), public_inc ], dependencies: t.get('deps', []), install: true ) @@ -328,7 +328,7 @@ if simple_dmabuf_drm_deps.length() > 0 fullscreen_shell_unstable_v1_protocol_c, linux_dmabuf_unstable_v1_client_protocol_h, linux_dmabuf_unstable_v1_protocol_c, - include_directories: include_directories('..'), + include_directories: [ include_directories('..'), public_inc ], dependencies: [ dep_wayland_client, dep_libdrm, diff --git a/clients/multi-resource.c b/clients/multi-resource.c index 1d5e4e0c..eb4fd440 100644 --- a/clients/multi-resource.c +++ b/clients/multi-resource.c @@ -42,7 +42,7 @@ #include #include "shared/os-compatibility.h" #include "shared/xalloc.h" -#include "shared/zalloc.h" +#include struct device { enum { KEYBOARD, POINTER } type; diff --git a/clients/presentation-shm.c b/clients/presentation-shm.c index d6a939e5..9f4790ae 100644 --- a/clients/presentation-shm.c +++ b/clients/presentation-shm.c @@ -38,7 +38,7 @@ #include #include "shared/helpers.h" -#include "shared/zalloc.h" +#include #include "shared/timespec-util.h" #include "shared/os-compatibility.h" #include "presentation-time-client-protocol.h" diff --git a/clients/simple-damage.c b/clients/simple-damage.c index f33b9790..72ab6dd6 100644 --- a/clients/simple-damage.c +++ b/clients/simple-damage.c @@ -38,7 +38,7 @@ #include #include "shared/os-compatibility.h" -#include "shared/zalloc.h" +#include #include "xdg-shell-client-protocol.h" #include "fullscreen-shell-unstable-v1-client-protocol.h" #include "viewporter-client-protocol.h" diff --git a/clients/simple-dmabuf-drm.c b/clients/simple-dmabuf-drm.c index 00161491..98f7f0f2 100644 --- a/clients/simple-dmabuf-drm.c +++ b/clients/simple-dmabuf-drm.c @@ -56,7 +56,7 @@ #include #include -#include "shared/zalloc.h" +#include #include "xdg-shell-client-protocol.h" #include "fullscreen-shell-unstable-v1-client-protocol.h" #include "linux-dmabuf-unstable-v1-client-protocol.h" diff --git a/clients/simple-dmabuf-egl.c b/clients/simple-dmabuf-egl.c index 2d99c470..13b00191 100644 --- a/clients/simple-dmabuf-egl.c +++ b/clients/simple-dmabuf-egl.c @@ -46,7 +46,7 @@ #include #include "shared/helpers.h" #include "shared/platform.h" -#include "shared/zalloc.h" +#include #include "xdg-shell-unstable-v6-client-protocol.h" #include "fullscreen-shell-unstable-v1-client-protocol.h" #include "linux-dmabuf-unstable-v1-client-protocol.h" diff --git a/clients/simple-dmabuf-v4l.c b/clients/simple-dmabuf-v4l.c index a91a0730..ecdc6c3c 100644 --- a/clients/simple-dmabuf-v4l.c +++ b/clients/simple-dmabuf-v4l.c @@ -46,7 +46,7 @@ #include #include -#include "shared/zalloc.h" +#include #include "xdg-shell-client-protocol.h" #include "fullscreen-shell-unstable-v1-client-protocol.h" #include "linux-dmabuf-unstable-v1-client-protocol.h" diff --git a/clients/simple-shm.c b/clients/simple-shm.c index 979d7988..ff6613f8 100644 --- a/clients/simple-shm.c +++ b/clients/simple-shm.c @@ -36,7 +36,7 @@ #include #include "shared/os-compatibility.h" -#include "shared/zalloc.h" +#include #include "xdg-shell-client-protocol.h" #include "fullscreen-shell-unstable-v1-client-protocol.h" diff --git a/clients/subsurfaces.c b/clients/subsurfaces.c index d88b8617..23c22e8f 100644 --- a/clients/subsurfaces.c +++ b/clients/subsurfaces.c @@ -43,7 +43,7 @@ #include "shared/helpers.h" #include "shared/xalloc.h" -#include "shared/zalloc.h" +#include #include "window.h" #if 0 diff --git a/clients/weston-debug.c b/clients/weston-debug.c index 563c64ea..d7ff081e 100644 --- a/clients/weston-debug.c +++ b/clients/weston-debug.c @@ -42,7 +42,7 @@ #include #include "shared/helpers.h" -#include "shared/zalloc.h" +#include #include "weston-debug-client-protocol.h" struct debug_app { diff --git a/clients/weston-info.c b/clients/weston-info.c index 8d7d7988..4134191b 100644 --- a/clients/weston-info.c +++ b/clients/weston-info.c @@ -38,7 +38,7 @@ #include "shared/helpers.h" #include "shared/os-compatibility.h" #include "shared/xalloc.h" -#include "shared/zalloc.h" +#include #include "presentation-time-client-protocol.h" #include "linux-dmabuf-unstable-v1-client-protocol.h" #include "tablet-unstable-v2-client-protocol.h" diff --git a/clients/window.c b/clients/window.c index bb9c708f..dfde55ee 100644 --- a/clients/window.c +++ b/clients/window.c @@ -73,7 +73,7 @@ typedef void *EGLContext; #include "shared/cairo-util.h" #include "shared/helpers.h" #include "shared/xalloc.h" -#include "shared/zalloc.h" +#include #include "xdg-shell-client-protocol.h" #include "text-cursor-position-client-protocol.h" #include "pointer-constraints-unstable-v1-client-protocol.h" diff --git a/clients/window.h b/clients/window.h index 03a1fe67..57e24331 100644 --- a/clients/window.h +++ b/clients/window.h @@ -32,7 +32,7 @@ #include #include #include -#include "shared/zalloc.h" +#include #include "shared/platform.h" struct window; diff --git a/compositor/systemd-notify.c b/compositor/systemd-notify.c index b2dcce1f..6284a6d9 100644 --- a/compositor/systemd-notify.c +++ b/compositor/systemd-notify.c @@ -32,7 +32,7 @@ #include "shared/helpers.h" #include "shared/string-helpers.h" -#include "shared/zalloc.h" +#include #include #include "weston.h" diff --git a/include/libweston/libweston.h b/include/libweston/libweston.h index 7632382c..96583187 100644 --- a/include/libweston/libweston.h +++ b/include/libweston/libweston.h @@ -43,7 +43,7 @@ extern "C" { #include #include -#include "zalloc.h" +#include #include struct weston_geometry { diff --git a/include/libweston/meson.build b/include/libweston/meson.build index 659e135b..a3ac20c2 100644 --- a/include/libweston/meson.build +++ b/include/libweston/meson.build @@ -5,6 +5,7 @@ install_headers( 'plugin-registry.h', 'timeline-object.h', 'windowed-output-api.h', + 'zalloc.h', subdir: dir_include_libweston_install ) diff --git a/shared/zalloc.h b/include/libweston/zalloc.h similarity index 100% rename from shared/zalloc.h rename to include/libweston/zalloc.h diff --git a/libweston-desktop/client.c b/libweston-desktop/client.c index a3e9a31e..8188d333 100644 --- a/libweston-desktop/client.c +++ b/libweston-desktop/client.c @@ -26,7 +26,7 @@ #include #include -#include "zalloc.h" +#include #include "libweston-desktop.h" #include "internal.h" diff --git a/libweston-desktop/libweston-desktop.c b/libweston-desktop/libweston-desktop.c index a22f67d4..decce52a 100644 --- a/libweston-desktop/libweston-desktop.c +++ b/libweston-desktop/libweston-desktop.c @@ -29,7 +29,7 @@ #include #include -#include "zalloc.h" +#include #include "helpers.h" #include "libweston-desktop.h" diff --git a/libweston-desktop/seat.c b/libweston-desktop/seat.c index 1c2380dc..0c5b50da 100644 --- a/libweston-desktop/seat.c +++ b/libweston-desktop/seat.c @@ -31,7 +31,7 @@ #include #include -#include "zalloc.h" +#include #include "libweston-desktop.h" #include "internal.h" diff --git a/libweston-desktop/surface.c b/libweston-desktop/surface.c index eec9806d..09b4176b 100644 --- a/libweston-desktop/surface.c +++ b/libweston-desktop/surface.c @@ -29,7 +29,7 @@ #include #include -#include "zalloc.h" +#include #include "libweston-desktop.h" #include "internal.h" diff --git a/libweston-desktop/wl-shell.c b/libweston-desktop/wl-shell.c index 0067b63a..6361097e 100644 --- a/libweston-desktop/wl-shell.c +++ b/libweston-desktop/wl-shell.c @@ -31,7 +31,7 @@ #include #include -#include "zalloc.h" +#include #include "libweston-desktop.h" #include "internal.h" diff --git a/libweston-desktop/xdg-shell-v6.c b/libweston-desktop/xdg-shell-v6.c index 80c3f087..383867a0 100644 --- a/libweston-desktop/xdg-shell-v6.c +++ b/libweston-desktop/xdg-shell-v6.c @@ -32,7 +32,7 @@ #include #include -#include "zalloc.h" +#include #include "xdg-shell-unstable-v6-server-protocol.h" #include "libweston-desktop.h" diff --git a/libweston-desktop/xdg-shell.c b/libweston-desktop/xdg-shell.c index d5bed385..8e0a6ac4 100644 --- a/libweston-desktop/xdg-shell.c +++ b/libweston-desktop/xdg-shell.c @@ -32,7 +32,7 @@ #include #include -#include "zalloc.h" +#include #include "xdg-shell-server-protocol.h" #include "libweston-desktop.h" diff --git a/libweston-desktop/xwayland.c b/libweston-desktop/xwayland.c index ea9ff34e..ee319b31 100644 --- a/libweston-desktop/xwayland.c +++ b/libweston-desktop/xwayland.c @@ -31,7 +31,7 @@ #include #include -#include "zalloc.h" +#include #include "libweston-desktop.h" #include "internal.h" diff --git a/libweston/meson.build b/libweston/meson.build index b165ddb6..20b7aa89 100644 --- a/libweston/meson.build +++ b/libweston/meson.build @@ -56,11 +56,6 @@ srcs_libweston = [ weston_debug_server_protocol_h, ] -install_headers( - '../shared/zalloc.h', - subdir: dir_include_libweston -) - if get_option('renderer-gl') dep_egl = dependency('egl', required: false) if not dep_egl.found() diff --git a/libweston/touch-calibration.c b/libweston/touch-calibration.c index d6f21604..b346d90c 100644 --- a/libweston/touch-calibration.c +++ b/libweston/touch-calibration.c @@ -31,7 +31,7 @@ #include "shared/helpers.h" #include "shared/string-helpers.h" -#include "shared/zalloc.h" +#include #include "shared/timespec-util.h" #include diff --git a/shared/xalloc.h b/shared/xalloc.h index 484de2d8..cd39dd8b 100644 --- a/shared/xalloc.h +++ b/shared/xalloc.h @@ -34,7 +34,7 @@ extern "C" { #include #include -#include "zalloc.h" +#include void * fail_on_null(void *p, size_t size, char *file, int32_t line); diff --git a/tests/input-timestamps-helper.c b/tests/input-timestamps-helper.c index 3dd8805f..2ed1dd44 100644 --- a/tests/input-timestamps-helper.c +++ b/tests/input-timestamps-helper.c @@ -33,7 +33,7 @@ #include "input-timestamps-helper.h" #include "input-timestamps-unstable-v1-client-protocol.h" #include "shared/timespec-util.h" -#include "shared/zalloc.h" +#include #include "weston-test-client-helper.h" struct input_timestamps { diff --git a/tests/meson.build b/tests/meson.build index 5274d8dd..b494d38d 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -221,7 +221,7 @@ if get_option('shell-ivi') weston_test_protocol_c, ivi_application_client_protocol_h, ivi_application_protocol_c, - include_directories: include_directories('..', '../shared'), + include_directories: [ include_directories('..', '../shared'), public_inc ], dependencies: dep_test_client, install: false ) @@ -261,7 +261,7 @@ foreach t : tests_standalone srcs_t, c_args: [ '-DUNIT_TEST' ], build_by_default: true, - include_directories: include_directories('..', '../shared', '../libweston'), + include_directories: [ include_directories('..', '../shared', '../libweston'), public_inc ], dependencies: deps_t, install: false, ) @@ -325,8 +325,10 @@ foreach t : tests_weston 'test-@0@'.format(t.get(0)), srcs_t, c_args: [ '-DUNIT_TEST' ], - include_directories: + include_directories: [ include_directories('..', '../shared'), + public_inc, + ], dependencies: deps_t, install: false, ) diff --git a/tests/weston-test-client-helper.c b/tests/weston-test-client-helper.c index 27e6b86a..f7d7df51 100644 --- a/tests/weston-test-client-helper.c +++ b/tests/weston-test-client-helper.c @@ -36,7 +36,7 @@ #include "shared/os-compatibility.h" #include "shared/xalloc.h" -#include "shared/zalloc.h" +#include #include "weston-test-client-helper.h" #define max(a, b) (((a) > (b)) ? (a) : (b)) diff --git a/tools/zunitc/src/zuc_base_logger.c b/tools/zunitc/src/zuc_base_logger.c index ffa127f0..4b543441 100644 --- a/tools/zunitc/src/zuc_base_logger.c +++ b/tools/zunitc/src/zuc_base_logger.c @@ -37,7 +37,7 @@ #include "zuc_event_listener.h" #include "zuc_types.h" -#include "shared/zalloc.h" +#include /* a few sequences for rudimentary ANSI graphics. */ #define CSI_GRN "\x1b[0;32m" diff --git a/tools/zunitc/src/zuc_collector.c b/tools/zunitc/src/zuc_collector.c index e17231cd..035c9ce7 100644 --- a/tools/zunitc/src/zuc_collector.c +++ b/tools/zunitc/src/zuc_collector.c @@ -32,7 +32,7 @@ #include #include -#include "shared/zalloc.h" +#include #include "zuc_event_listener.h" #include "zunitc/zunitc_impl.h" diff --git a/tools/zunitc/src/zuc_junit_reporter.c b/tools/zunitc/src/zuc_junit_reporter.c index df906401..c0457f21 100644 --- a/tools/zunitc/src/zuc_junit_reporter.c +++ b/tools/zunitc/src/zuc_junit_reporter.c @@ -42,7 +42,7 @@ #include "zuc_event_listener.h" #include "zuc_types.h" -#include "shared/zalloc.h" +#include /** * Hardcoded output name. @@ -460,7 +460,6 @@ zuc_junit_reporter_create(void) #else /* ENABLE_JUNIT_XML */ -#include "shared/zalloc.h" #include "zuc_event_listener.h" /* diff --git a/tools/zunitc/src/zunitc_impl.c b/tools/zunitc/src/zunitc_impl.c index 72f08df6..05db0229 100644 --- a/tools/zunitc/src/zunitc_impl.c +++ b/tools/zunitc/src/zunitc_impl.c @@ -48,7 +48,7 @@ #include #include "shared/helpers.h" -#include "shared/zalloc.h" +#include /* * If CLOCK_MONOTONIC is present on the system it will give us reliable