New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cmake: enable more detection on Windows #9687
Conversation
The good news is that this also fixed 1 to correctly detect The bad news is that this in turn breaks legacy MinGW/MSYS1 builds because of the enabled
Footnotes
|
Enable `HAVE_UNISTD_H`, `HAVE_STRTOK_R` and `HAVE_STRCASECMP` detection on Windows, instead of having predefined values. With these features detected correctly, CMake Windows builds get closer to the autotools and `config-win32.h` ones. This also fixes detecting `HAVE_FTRUNCATE` correctly, which required `unistd.h`. Fixing `ftruncate()` in turn causes a build warning/error with legacy MinGW/MSYS1 due to an offset type size mismatch. This env misses to detect `HAVE_FILE_OFFSET_BITS`, which may be a reason. This patch force-disables `HAVE_FTRUNCATE` for this platform.
Updated to keep |
Upcoming curl release received fixes to correctly detect these build flags, so drop manual settings for them: - `HAVE_UNISTD_H` and with it: `HAVE_FTRUNCATE` - `HAVE_STRTOK_R` - `HAVE_STRCASECMP` - `HAVE_INET_NTOP` Ref: curl/curl#9687 Ref: curl/curl#9689
Enable `HAVE_UNISTD_H`, `HAVE_STRTOK_R` and `HAVE_STRCASECMP` detection on Windows, instead of having predefined values. With these features detected correctly, CMake Windows builds get closer to the autotools and `config-win32.h` ones. This also fixes detecting `HAVE_FTRUNCATE` correctly, which required `unistd.h`. Fixing `ftruncate()` in turn causes a build warning/error with legacy MinGW/MSYS1 due to an offset type size mismatch. This env misses to detect `HAVE_FILE_OFFSET_BITS`, which may be a reason. This patch force-disables `HAVE_FTRUNCATE` for this platform. Reviewed-by: Daniel Stenberg Closes curl#9687
Enable
HAVE_UNISTD_H
,HAVE_STRTOK_R
andHAVE_STRCASECMP
detection on Windows, instead of having predefined values.With these features detected correctly, CMake Windows builds get closer to the autotools and
config-win32.h
ones.This also fixes detecting
HAVE_FTRUNCATE
correctly, which requiredunistd.h
.Fixing
ftruncate()
in turn causes a build warning/error with legacy MinGW/MSYS1 due to an offset type size mismatch. This env misses to detectHAVE_FILE_OFFSET_BITS
, which may be a reason. This patch force-disablesHAVE_FTRUNCATE
for this platform.Reviewed-by: Daniel Stenberg
Closes #9687