From: Thomas Munro Date: Thu, 18 Aug 2022 04:16:00 +0000 (+1200) Subject: Fix macro problem with gai_strerror on Windows. X-Git-Url: http://git.postgresql.org/gitweb/-?a=commitdiff_plain;h=cce28f62680ca77f18762d58bc31f6b67c6ef692;p=users%2Frhaas%2Fpostgres.git Fix macro problem with gai_strerror on Windows. Commit 5579388d was confused about why gai_strerror() didn't work, and used gai_strerrorA(). It turns out that we had explicitly undefined Windows' own macro for that somewhere else. Get rid of all that, and use the system headers' definition of gai_sterror() directly as intended. Discussion: https://postgr.es/m/CA+hUKGKErNfhmvb_H0UprEmp4LPzGN06yR2_0tYikjzB-2ECMw@mail.gmail.com --- diff --git a/src/include/port/win32/netdb.h b/src/include/port/win32/netdb.h index f0cc2c2367..9ed13e457b 100644 --- a/src/include/port/win32/netdb.h +++ b/src/include/port/win32/netdb.h @@ -4,6 +4,4 @@ #include -#define gai_strerror gai_strerrorA - #endif diff --git a/src/include/port/win32/sys/socket.h b/src/include/port/win32/sys/socket.h index 9b2cdf3b9b..0c32c0f7b2 100644 --- a/src/include/port/win32/sys/socket.h +++ b/src/include/port/win32/sys/socket.h @@ -23,11 +23,4 @@ #define ERROR PGERROR #endif -/* - * we can't use the windows gai_strerror{AW} functions because - * they are defined inline in the MS header files. So we'll use our - * own - */ -#undef gai_strerror - #endif /* WIN32_SYS_SOCKET_H */