Closed fornwall closed 9 years ago
Sorry - I was too quick!
There is alloca() support in Android, but alloca.h needs to be included. This is now guarded by checking if _SGIAPI is defined - do you want that to include a check for ANDROID as well instead of using malloc/free? I can submit a new pull request in that case.ä!
Thanks for the PR @fornwall, I actually like the idea of checking for ANDROID a bit better as it seems a bit cleaner. Could you do another PR?
I may have been too quick to respond as well. After looking at getopt.c
, there really isn't any reason to use alloca over malloc/free so I think this should work on any platform (including SGI if it's still being used there).
Thanks for the contribution!
This allows building with the Android NDK which lacks alloca().