JuliaLang/julia — pull request #5379 by tknopp (2014-01-13 08:21:06+00:00)
Title: RFC: Compiling libjulia with MSVC compiler

This is the branch to make libjulia compilable with MSVC (fix #5347).

The current status is that everything compiles but linking libjulia.dll fails.
Since this touches lots of files it might make sense to get in the current status first and fix the linking issues in a further step. I fear a little that it will be hard to keep this up to date while master is changing.

So whats in here:
- Add missing type casts which are required to compile the source code with C++
- `sizeof` an anonymous struct seems to be not ok in C++
- Removed some DLLEXPORT from .c/.cpp files. I have not yet removed all but only those where the compiler complains.
- When using goto, the c++ clang compiler required that no variables are declared after the first goto.
- Replaced some VLAs by alloca.
- Clean up / keep up to date the Windows.mk makefiles. One can switch between Intel and MSVC compiler now.

Open issues:
- The question is how we want the names to be mangled in the final dll. To get C mangeling we would have to put extern "C" in all .c files.
- Not sure how to handle setjmp/longjmp on windows. They are available so is it worth to compile the assembler located in libsupport?