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

Simplify alloca.h include condition #1319

Merged

Conversation

RyuKojiro
Copy link
Contributor

And make it way more portable. While alloca isn't standardized, glibc is the only place that uses alloca.h. This is the only thing keeping imgui from building on NetBSD.

@ocornut
Copy link
Owner

ocornut commented Sep 11, 2017 via email

@ocornut
Copy link
Owner

ocornut commented Sep 11, 2017

Now tested successfully with:

  • Windows + MSVC 2010
  • Windows + MSVC 2015
  • PS4
  • Xbox One
  • Switch
  • Linux + GCC
  • Linux + Clang
  • OSX + GCC
  • OSX + Clang

Merging, thanks!

@ocornut ocornut merged commit 3420080 into ocornut:master Sep 11, 2017
@krytarowski
Copy link

alloca() in <alloca.h>-only is SunOS specific
alloca() in <stdlib.h> and <alloca.h> is available on Windows, FreeBSD, OpenBSD, Darwin
alloca() in <stdlib.h> only in NetBSD specific

@ocornut
Copy link
Owner

ocornut commented Sep 12, 2017

Hello @krytarowski,

I don't know how those statement relate to to use of GLIBC. Did the change break anything for you on those platforms?

@krytarowski
Copy link

#elif !defined(__GLIBC__) -> #elif !defined(__GLIBC__) && !defined(__sun) to fix SmartOS

ocornut added a commit that referenced this pull request Sep 12, 2017
@ocornut
Copy link
Owner

ocornut commented Sep 12, 2017

Made that change now @krytarowski @RyuKojiro
Also ref #276

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