-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
1.8.0: alloca not portable #6807
Comments
Yep, Pretty much any argument that can be made against using VLA will apply to alloca, but VLA has the benefit of being part of C99. |
Do you know offhand whether MSVC supports VLA and if so, when that support started? Anyway, v1.8.1 should properly support Illumos, Solaris, SunOS and include I'll leave this open since no, it's not really that portable, as the issue title describes. It's something to chew on but it's pretty low-priority. |
Oh, my bad, I honestly thought MSVC had full C99 support but it seems like they never made any such claim. |
They've been slowly chipping away at improving their C compiler. I'll take a look and see where VLA support starts and we can decide how we should attack this. (Could be ifdefs, even.) Could also just do a malloc. Might be the simplest path forward. |
We've updated libgit2 to 1.8.0 in pkgsrc. Now the build on Illumos fails with:
The NetBSD man page lists a lot of limitations for
alloca
and recommend it not be used in portable code. Also, on NetBSD it's provided bystdlib.h
, while on Illumos it's inalloca.h
. The Illumos man page also strongly discourages its use.The text was updated successfully, but these errors were encountered: