Skip to content

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