3 ms·
The path separator should just be fixed. Almost all the APIs accept '/', it's just that the old "cmd" utilities don't because they use / as the option separator
by pjc50 4y ago
The path separator should just be fixed. Almost all the APIs accept '/', it's just that the old "cmd" utilities don't because they use / as the option separator (from CP/M), not "-".
That would probably require killing CMD, which would be a big compatibility break. I suspect it could be turned into a shim layer for corporates who need to keep running BAT files.
Not accepting non-sockets in select() .. the native API (WaitForMultipleObjects) is much more flexible, but it doesn't look like select().
libc: require the user to install vcrt like everyone else. Microsoft have actually kind of fixed this with the "universal" runtime: https://learn.microsoft.com/en-us/cpp/windows/universal-crt-deployment?view=msvc-170 https://learn.microsoft.com/en-us/cpp/windows/universal-crt-... but only recently.
- halpmeh 4y agoNo one is saying that it's impossible to develop curl for Windows. Needing to either work around a non-standard libc, require the user install a standard compliant libc, or ship your own libc with custom methods like FreeX is strange and hard compared to other operating systems. Same with using something like WaitForMultipleObjects vs select and path separators. If you're a Windows-first developer, you're probably used to these things, but to non-Windows developers, Windows is strange and annoying. I tried to port one of our server applications to Windows. I eventually gave up because our service would remove files that were still open. To me, it's crazy that Windows doesn't allow you to do that. This also means you can't use a tool like SSH or SCP. If you accidentally kill the local SCP process while the file is transferring, you need to remotely connect to the destination and kill the remote SCP process to allow that file to be modified again.
- cesarb 4y ago> Almost all the APIs accept '/' Except the APIs you need to use to avoid the 260-character MAX_PATH limit (without depending on both an obscure group policy setting and a setting on the application manifest, and keep in mind that curl is also a library so it cannot control the application manifest). AFAIK, the "\\?\" trick to extend the limit to 32767 characters requires both absolute paths and the use of a backslash (\) as the path separator.