• 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
..
cairo-util.c Loading commit data...
cairo-util.h Loading commit data...
config-parser.c Loading commit data...
config-parser.h Loading commit data...
file-util.c Loading commit data...
file-util.h Loading commit data...
frame.c Loading commit data...
helpers.h Loading commit data...
image-loader.c Loading commit data...
image-loader.h Loading commit data...
matrix.c Loading commit data...
matrix.h Loading commit data...
option-parser.c Loading commit data...
os-compatibility.c Loading commit data...
os-compatibility.h Loading commit data...
platform.h Loading commit data...
string-helpers.h Loading commit data...
timespec-util.h Loading commit data...
weston-egl-ext.h Loading commit data...
xalloc.c Loading commit data...
xalloc.h Loading commit data...
zalloc.h Loading commit data...