Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Jan 7, 2025

MSVC 1900 and older is missing a const specifier in the inet_ntop()
declaration for the second argument. A workaround was in place for it
in cmake, but it didn't cover all necessary versions.

Replace the workaround with a different one, move it to lib/inet_ntop.c
and extend to all necessary MSVC versions.

Also add CI jobs for the older MSVC versions: 2013, 2015, 2017.

```
lib/hostip.c(144): error C2220: warning treated as error - no 'object' file generated
lib/hostip.c(144): warning C4090: 'function': different 'const' qualifiers
lib/hostip.c(151): warning C4090: 'function': different 'const' qualifiers
```
https://ci.appveyor.com/project/curlorg/curl/builds/51277632/job/r41upsidsavaxvl2#L179
@github-actions github-actions bot added the CI Continuous Integration label Jan 7, 2025
@vszakats vszakats changed the title msvc: fix building with HAVE_INET_NTOP with MSVC msvc: fix building with HAVE_INET_NTOP and MSVC <=1900 Jan 7, 2025
@vszakats vszakats added build Windows Windows-specific labels Jan 7, 2025
@vszakats vszakats closed this in 08ff33e Jan 7, 2025
@vszakats vszakats deleted the msvc-inet-ntop branch January 7, 2025 13:08
vszakats added a commit to vszakats/curl that referenced this pull request Jan 7, 2025
vszakats added a commit that referenced this pull request Jan 7, 2025
Also to align with existing VS2010. Keeping the VS2008 job first to give
a quick sniff test for MSVC builds.

Follow-up to 08ff33e #15923
Follow-up to 50f6a6b #15926

Closes #15932
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
MSVC 1900 and older is missing a `const` specifier in the `inet_ntop()`
declaration for the second argument. A workaround was in place for it
in cmake, but it didn't cover all necessary versions.

Replace the workaround with a different one, move it to `lib/inet_ntop.c`
and extend to all necessary MSVC versions.

Also add CI jobs for the older MSVC versions: 2013, 2015, 2017.

Closes curl#15923
pps83 pushed a commit to pps83/curl that referenced this pull request Apr 26, 2025
Also to align with existing VS2010. Keeping the VS2008 job first to give
a quick sniff test for MSVC builds.

Follow-up to 08ff33e curl#15923
Follow-up to 50f6a6b curl#15926

Closes curl#15932
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build CI Continuous Integration Windows Windows-specific

Development

Successfully merging this pull request may close these issues.

1 participant