Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: Enable C99 support in meson.build
We use C99 features (cd-spectrum.c:760), so need to explicitly enable them in meson.build, as some compilers will not enable them automatically, and will instead error when they encounter usage of C99. Signed-off-by: Philip Withnall <[email protected]>
- Loading branch information
b5436b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pwithnall I think we should revert this commit. By enforcing C99, you're preventing meson from using a newer C standard. There's an interesting related bug in pango: https://gitlab.gnome.org/GNOME/pango/merge_requests/19
b5436b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why would Meson use a newer C standard without being asked to? This commit was made because compilers were not enabling the C99 features used in colord by default, and compilation was failing (see the commit message). If colord wants to use newer C features, the
c_std
can be updated to something newer. Otherwise, this is doing its job in making sure that colord can use C99 features and nothing newer.I don’t see any details about what the actual problem is on that Pango report, or why dropping
c_std=c99
is the most appropriate fix.b5436b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gcc nowadays defaults to C11 but specifying C99 will override that. Do you have a particular reason why you don't want to use C11 now?
b5436b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s a project policy thing, which is up to @hughsie not me. I only submitted the C99 patch in the first place because the project was already using C99 features.
b5436b4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I filed #81