mirror of
https://github.com/curl/curl.git
synced 2026-04-30 17:37:52 +03:00
Before this patch `setmode()` was not detected with Cygwin/MSYS, because it's a macro, not a function, and detection is looking for a function. Switching to symbol detection doesn't work because it mis-detects it on BSD systems which features a function with the same name but different functionality and arguments. Fix it by looking for a `_setmode()` function on Cygwin/MSYS, and use it if available. `_setmode()` is recommended over `setmode()` by Windows documentation so use that on Windows too. It seems to be available on all supported compilers, so omit detection. https://learn.microsoft.com/cpp/c-runtime-library/reference/posix-setmode https://learn.microsoft.com/cpp/c-runtime-library/reference/setmode Officially Windows requires argument `_O_BINARY` with an underscore. `O_BINARY` is also supported but bound to conditions. Continue to use it for simplicity. Cygwin supports `O_BINARY` (no underscore). Closes #15169 |
||
|---|---|---|
| .. | ||
| Platforms | ||
| cmake_uninstall.cmake.in | ||
| CMakeConfigurableFile.in | ||
| curl-config.cmake.in | ||
| CurlSymbolHiding.cmake | ||
| CurlTests.c | ||
| FindBearSSL.cmake | ||
| FindBrotli.cmake | ||
| FindCares.cmake | ||
| FindGSS.cmake | ||
| FindLibgsasl.cmake | ||
| FindLibidn2.cmake | ||
| FindLibpsl.cmake | ||
| FindLibssh.cmake | ||
| FindLibssh2.cmake | ||
| FindLibuv.cmake | ||
| FindMbedTLS.cmake | ||
| FindMSH3.cmake | ||
| FindNettle.cmake | ||
| FindNGHTTP2.cmake | ||
| FindNGHTTP3.cmake | ||
| FindNGTCP2.cmake | ||
| FindQuiche.cmake | ||
| FindRustls.cmake | ||
| FindWolfSSH.cmake | ||
| FindWolfSSL.cmake | ||
| FindZstd.cmake | ||
| Macros.cmake | ||
| OtherTests.cmake | ||
| PickyWarnings.cmake | ||
| Utilities.cmake | ||