-
Notifications
You must be signed in to change notification settings - Fork 176
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
Add support for Visual Studio 2015+ #45
Conversation
Any chance that this might get pulled? |
Hi Peter, My vacations will formally start next week, when I will take care of all the pending stuff with RELIC. I am happy to merge most of the changes, but switching to malloc/free for everything is tricky, since we decided to move the library to stack-only allocation in the next refactoring. Hope it helps, |
That's no problem, would you be OK with wrapping them in a macro and then it can simply set it as stack/heap at compile time. I can update this. Thanks! |
I once compiled RELIC with Visual Studio and found it easier to compile it as C++, where it has support for variable length arrays, etc. |
I do not think that is true. |
Does Visual Studio support alloca.h? |
It appears to have _alloca.h. Is the macro option not desirable? |
Using malloc() complicates things due to error-handling. I think it's better if we can enforce stack allocation across all configurations, and alloca() may provide this. |
Yeah alloca() sounds reasonable then. Just wrap the header in an if defined to get the right header. alloca.h vs _alloca.h |
Closing this one because I have a new pull request with the newest version of relic and using alloca() |
In this pull require I propose adding support for the Visual Studio compiler. In total, the changes can be summarized as:
This change has been tested both on x64 windows 10 and x64 Linux (CentOS). If addition changes are required, I would be happy to assist.
Thanks,
Peter Rindal