Closed ijsf closed 3 months ago
Would you send a pull request, or tell me how to solve the problem? I am worried about code complexity with conditional compilation.
Yes I understand, I guess it would be better to split up in multiple PRs to keep overview. I've contained nearly all of the conditional code to a separate util file called platform.c
. I will open up a first PR for the data types.
This should be the complete patchset for wcc.
After careful consideration, I would like to reject this pull request because it is difficult for me to support the MinGW64 platform. I apologize for not being able to meet your request.
I understand as the changes are quite substantial. I will focus my own fork on Win32 compatibility instead: https://github.com/ijsf/xcc-win32
I was wondering if there would be interest to make
wcc
natively compatible with Windows (64-bit) by using the MinGW64 toolchain using MSYS.I've managed to successfully port
wcc
to MinGW64 and make it useable under Windows, as I have a need for a lightning fast C to WASM compiler andwcc
seems to fit the bill 🏆It seems that scope of the changes are more or less:
long
(not 64-bit on Windows) tolong long
to explicitly use 64-bit and still allow for arithmetic.fmemopen
,tmpfile
as well as process handling such asfork
.C:\\A\\B\\C
as well as POSIX paths transparently.wchar
.My changes are passing all
test-wcc
tests. I've tried to keep the changes as unintrusive as possible to avoid regression, but there are still a large number of changes.For other targets like
xcc
, it seems much less logical and I have not touched any of these, namely, the compiler will produce ELF output which won't be able to run natively on Windows, unless something is added to accommodate this.