]> git.ipfire.org Git - thirdparty/curl.git/commit
strerror: Add Curl_winapi_strerror for Win API specific errors
authorJay Satiro <raysatiro@yahoo.com>
Sun, 10 Nov 2019 08:37:38 +0000 (03:37 -0500)
committerJay Satiro <raysatiro@yahoo.com>
Sun, 1 Dec 2019 23:12:36 +0000 (18:12 -0500)
commit5b22e1a5a9966036f087de8f58af449975400e58
tree5d02d5e7e5281535437ae78a08b211105689f4dd
parentbc5d22c3dede2f04870c37aec9a50474c4b888ad
strerror: Add Curl_winapi_strerror for Win API specific errors

- In all code call Curl_winapi_strerror instead of Curl_strerror when
  the error code is known to be from Windows GetLastError.

Curl_strerror prefers CRT error codes (errno) over Windows API error
codes (GetLastError) when the two overlap. When we know the error code
is from GetLastError it is more accurate to prefer the Windows API error
messages.

Reported-by: Richard Alcock
Fixes https://github.com/curl/curl/issues/4550
Closes https://github.com/curl/curl/pull/4581
lib/strerror.c
lib/strerror.h
lib/vtls/schannel_verify.c