3 ms·
> You should use /c/... paths on Windows rather than C:/... This is the start of the realization that building C/C++ on Windows is only the beginning of the pa
by boris 4y ago
> You should use /c/... paths on Windows rather than C:/...
This is the start of the realization that building C/C++ on Windows is only the beginning of the pain. Once you are past that, there is a multitude of semantic differences like paths, CRLF, the fact that file move is not atomic, the fact that an opened file cannot be removed (e.g. because Windows Defender or some other BLODA is scanning it), etc, etc. It's a death by a thousand papercuts. My suggestion is to avoid supporting Windows at any cost.
- jart 4y agoYes we actually need to use exponential backoff when calling a lot of WIN32 APIs in our polyfills, due to the way Windows is. There's also layered service providers like Komedia which need to be worked around by a C library implementation. Supporting Windows also means that being falsely accused of being malware is the norm rather than the exception. It got so bad once that Google started delisting our websites. Microsoft even considered our Hello World executables a "severe threat". https://twitter.com/JustineTunney/status/1541801499210092544 https://twitter.com/JustineTunney/status/1541801499210092544 The way I fixed it is every time I compile a program I upload it to Microsoft Security Intelligence and ask them to whitelist it. Sometimes I'll just zip up the build output directory into a giant zip file and send them hundreds of executables at once, and they'll whitelist them all. Needless to say, WIN32 related features aren't the highest on our list of priorities right now. We're actively working on getting Microsoft to address their biases regarding open source executables. Regarding the C:/ vs. /c/ thing, we got away with not caring for the longest time, because our programs are generally designed to (a) always use relative paths, and (b) never call chdir(). However porting Python changed that, since Python likes to be clever with paths. So I'd say it's really the end of a realization, not the start.
- ComodoHacker 4y agoWithout supporting Windows, the whole thing makes little sense.
- Ericson2314 4y agoI would prefer recommending an openat-style solution where possible. Having a single global root is in fact bad. Having paths be relative some origin is good. DOS was, in a funny way, ahead of the curve.