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

Only use macOS sheet modals when compiler supports blocks #284

Closed
wants to merge 1 commit into from

Conversation

williamsjoblom
Copy link

Blocks are a non-standard extension and are not supported by GCC. Sheet
modals require blocks, so let's fall back on a regular modal when blocks
are not supported.

See GCC discussion about block support: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=78352

Blocks are a non-standard extension and is not supported by GCC. Sheet
modals require blocks, so let's fall back on a regular modal when blocks
are not supported.
@Albrecht-S
Copy link
Member

Thanks for the report and PR. This looks like something for @ManoloFLTK

@ManoloFLTK
Copy link
Contributor

Good point. I've committed that, in a slightly different form, to 77b3557.
Thanks.

@ManoloFLTK ManoloFLTK closed this Oct 22, 2021
@Albrecht-S
Copy link
Member

@ManoloFLTK What if __BLOCKS__ is not defined? A picky compiler (or one with such warnings enabled) would issue a warning. If you really need to check that __BLOCKS__ is true (if defined) you would need both conditions which would be evaluated left to right as usual. Or am I missing anything?

@ManoloFLTK
Copy link
Contributor

OK It's better to use defined(BLOCKS). Committed at b6b1fcc.

@williamsjoblom
Copy link
Author

I just wanted to give you (@ManoloFLTK) a heads up that setting the author field to the actual author is considered good practice when you, as a maintainer, did no modifications to the code. Since my change is so small I don't really care, but these things often tend to spark a fair bit of controversy for bigger contributions.

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.

3 participants