Created attachment 527534 [details] [diff] [review]
There are a few problems with compilation on mingw. The attached patch fixes all of them (I'm not requesting review yet as I need to get one last fix committed to mingw-w64 project first). The changes are:
Disable debug_on_start on mingw (make it depend on compiler instead of OS)
Make -DCOMPILER_MSVC depend on compiler instead of OS
Use MSVC version of tomicops_internals_* on mingw
MSC version check makes sense only on MSVC
file_path.cc, file_path.h, file_util.cc:
GCC lacks UNICODE version of ifstream constructor, but we use UNICODE paths on Windows. Workaround the problem by converting path to ASCII version.
Use MOZ_SEH_TRY/MOZ_SEH_EXCEPT instead of __try/__except to workaround GCC's lack of SEH support.
Use proper macro for long long constants instead of MSC-specific syntax.
Do function pointer to pointer cast explicitly (GCC throws an error otherwise).
Thanks for the review, patch pushed to m-c: