Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson: fix HAVE_INIT_ONCE declaration #127

Closed
wants to merge 1 commit into from

Conversation

ystreet
Copy link

@ystreet ystreet commented Oct 16, 2018

meson will set the HAVE_INIT_ONCE value to 0 or 1 when using
conf.set10() so an #if defined() will always succeed.

../src/graphene-box.c:681:1: error: unknown type name 'INIT_ONCE'
../src/graphene-box.c:681:36: error: 'INIT_ONCE_STATIC_INIT' undeclared here (not in a function)
../src/graphene-box.c: In function 'init_static_box':

meson will set the HAVE_INIT_ONCE value to 0 or 1 when using
conf.set10() so an #if defined() will always succeed.
@ebassi
Copy link
Owner

ebassi commented Oct 23, 2018

Thanks for your contribution!

To be quite honest, I don't really like this style. Either the meson.build should not use set10() and instead rely on the definedness of the symbol; or the preprocessor conditional should not be checking for the symbol being defined (as it it will always be) and turned into:

#if HAVE_INIT_ONCE
...

and:

...
#elif HAVE_INIT_ONCE
...

@ebassi
Copy link
Owner

ebassi commented Dec 21, 2018

I've opened #133 to replace the set10() with a set(), which should fix the issue.

@ebassi ebassi closed this Dec 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants