From af0216251b94e751baa47146ac9609db70793b8e Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Mon, 19 Jun 2017 00:52:38 -0400 Subject: curl_setup_once: Remove ERRNO/SET_ERRNO macros Prior to this change (SET_)ERRNO mapped to GetLastError/SetLastError for Win32 and regular errno otherwise. I reviewed the code and found no justifiable reason for conflating errno on WIN32 with GetLastError/SetLastError. All Win32 CRTs support errno, and any Win32 multithreaded CRT supports thread-local errno. Fixes https://github.com/curl/curl/issues/895 Closes https://github.com/curl/curl/pull/1589 --- lib/curl_setup_once.h | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'lib/curl_setup_once.h') diff --git a/lib/curl_setup_once.h b/lib/curl_setup_once.h index 684187cae..a5b542c6e 100644 --- a/lib/curl_setup_once.h +++ b/lib/curl_setup_once.h @@ -435,20 +435,6 @@ typedef int sig_atomic_t; #endif -/* - * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno - * (or equivalent) on this platform to hide platform details to code using it. - */ - -#if defined(WIN32) && !defined(USE_LWIPSOCK) -#define ERRNO ((int)GetLastError()) -#define SET_ERRNO(x) (SetLastError((DWORD)(x))) -#else -#define ERRNO (errno) -#define SET_ERRNO(x) (errno = (x)) -#endif - - /* * Portable error number symbolic names defined to Winsock error codes. */ -- cgit v1.2.3