• Daniel Stone's avatar
    helpers: Move static_assert definition to shared · 11f91bbd
    Daniel Stone authored
    Collect the fallback definitions of static_assert() from desktop-shell
    and the test shell, and move them to helpers.h. This allows code
    throughout the tree to use static_assert() for build-time assertions,
    where it is supported by the compiler.
    
    As GCC goes out of its way to only add static_assert() when C11 has been
    explicitly requested - which we don't do - make sure to use the more
    widely available _Static_assert() if that is provided.
    
    This will be used in future patches to ensure two array lengths don't go
    out of sync.
    Signed-off-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
    Reviewed-by: Pekka Paalanen's avatarPekka Paalanen <pekka.paalanen@collabora.co.uk>
    11f91bbd
Name
Last commit
Last update
..
reference Loading commit data...
.gitignore Loading commit data...
bad-buffer-test.c Loading commit data...
config-parser-test.c Loading commit data...
devices-test.c Loading commit data...
event-test.c Loading commit data...
input-timestamps-helper.c Loading commit data...
input-timestamps-helper.h Loading commit data...
internal-screenshot-test.c Loading commit data...
internal-screenshot.ini Loading commit data...
ivi-layout-internal-test.c Loading commit data...
ivi-layout-test-client.c Loading commit data...
ivi-layout-test-plugin.c Loading commit data...
ivi-shell-app-test.c Loading commit data...
ivi-test.h Loading commit data...
keyboard-test.c Loading commit data...
matrix-test.c Loading commit data...
plugin-registry-test.c Loading commit data...
pointer-test.c Loading commit data...
presentation-test.c Loading commit data...
roles-test.c Loading commit data...
setbacklight.c Loading commit data...
string-test.c Loading commit data...
subsurface-shot-test.c Loading commit data...
subsurface-test.c Loading commit data...
surface-global-test.c Loading commit data...
surface-screenshot.c Loading commit data...
surface-test.c Loading commit data...
text-test.c Loading commit data...
timespec-test.c Loading commit data...
touch-test.c Loading commit data...
vertex-clip-test.c Loading commit data...
viewporter-test.c Loading commit data...
weston-test-client-helper.c Loading commit data...
weston-test-client-helper.h Loading commit data...
weston-test-desktop-shell.c Loading commit data...
weston-test-runner.c Loading commit data...
weston-test-runner.h Loading commit data...
weston-test.c Loading commit data...
weston-tests-env Loading commit data...
xwayland-test.c Loading commit data...