micropython/micropython — pull request #568 by stinos (2014-05-05 12:07:49+00:00)
Title: Windows MSVC port

Extend the windows port so it compiles 32- and 64bit uPy with the toolchain from Visual Studio 2013.

Changes to py: cl doesn't know ```__attribute__```, doesn't allow zero-sized arrays in a struct, doesn't have dynamic stack-based arrays and has a weird bug involving braces for single-line if statements.

Changes to windows port: add project file (*), update README, add msvc subdirectory with all specifics:
- note picking up new source files automatically is the default as this usually requires less maintainance (i.e. excluding what does not compile for some reason) than the other way around (having to modify build files for every file added).
- snprintf.c is temporary (just like the printf behavior fixes in init.c) until there's a proper printf and the likes implementation, I'm going to look into that soon

(*) I checked some other options for building but there does not seem to be a more appropriate way than using MsBuild scripts which is probably why others like CPython do the same:
- NMake can't read standard makefiles, let alone it knows most of the commands in them
- using make on cygwin instead is a mess to setup, and the compiler options for cl are so different from those from gcc that the original makefiles are hardly usable anymore. It would basically almost result in having different makefiles for the gcc based builds and the cl based ones
- CMake, which is basically a makefile generator meaning it's not some sort of make replacement but rather can generate makefiles for make/msbuild/xcode/... , would be a rather clean option but only if the current makefiles are abandoned in favor of cmakefiles, which is a lot of work and goes against the original design decisions of using make