Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lib: set more flags in config-win32.h
The goal is to add any flag that affect the created binary, to get in sync with the ones built with CMake and autotools. I took these flags from curl-for-win [0], where they've been tested with mingw-w64 and proven to work well. This patch brings them to curl as follows: - Enable unconditionally those force-enabled via `CMake/WindowsCache.cmake`: - `HAVE_SETJMP_H` - `HAVE_STRING_H` - `HAVE_SIGNAL` (CMake equivalent is `HAVE_SIGNAL_FUNC`) - Expand existing guards with mingw-w64: - `HAVE_STDBOOL_H` - `HAVE_BOOL_T` - Enable Win32 API functions for Windows Vista and later: - `HAVE_INET_NTOP` - `HAVE_INET_PTON` - Set sizes, if not already set: - `SIZEOF_OFF_T = 8` - `_FILE_OFFSET_BITS = 64` when `USE_WIN32_LARGE_FILES` is set, and using mingw-w64. - Add the remaining for mingw-w64 only. Feel free to expand as desired: - `HAVE_LIBGEN_H` - `HAVE_FTRUNCATE` - `HAVE_BASENAME` - `HAVE_STRTOK_R` Future TODO: - `HAVE_SIGNAL` has a different meaning in CMake. It's enabled when both the `signal()` function and the `SIGALRM` macro are found. In autotools and this header, it means the function only. For the function alone, CMake uses `HAVE_SIGNAL_FUNC`. [0] https://github.com/curl/curl-for-win/blob/c9b9a5f273c94c73d2b565ee892c4dff0ca97a8c/curl-m32.sh#L53-L58 Reviewed-by: Daniel Stenberg Closes curl#9712
- Loading branch information