Relying on the compiler default is problematic:
* New constructs may be introduced accidentally that break backwards
compatibility.
* Older compilers may default to a more restricted standard than the
codebase is actually developed with.
Explicitly select C99 (and C++11 for the fuzzing part).
Autotools does not want to default to C99, so set it explcitly during
CI.
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
PHASES=(${@:-CONFIGURE MAKE INSTALL CHECK DISTCHECK})
COMPILER="${COMPILER:?}"
COMPILER_VERSION="${COMPILER_VERSION}"
-CFLAGS=(-O1 -g)
-CXXFLAGS=(-O1 -g)
+CFLAGS=(-O1 -g -std=c99)
+CXXFLAGS=(-O1 -g -std=c++11)
LDFLAGS=()
COVERITY_SCAN_TOOL_BASE="/tmp/coverity-scan-analysis"
project('util-linux', 'c',
version : run_command('tools/git-version-gen', check: true).stdout(),
meson_version: '>=0.60.0',
- license : 'GPLv2+')
+ license : 'GPLv2+',
+ default_options : [
+ 'c_std=c99',
+ 'cpp_std=c++11',
+ ])
fs = import('fs')
pkgconfig = import('pkgconfig')