From cce28f62680ca77f18762d58bc31f6b67c6ef692 Mon Sep 17 00:00:00 2001 From: Thomas Munro Date: Thu, 18 Aug 2022 16:16:00 +1200 Subject: [PATCH] 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 --- src/include/port/win32/netdb.h | 2 -- src/include/port/win32/sys/socket.h | 7 ------- 2 files changed, 9 deletions(-) diff --git a/src/include/port/win32/netdb.h b/src/include/port/win32/netdb.h index f0cc2c2367e..9ed13e457b8 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 9b2cdf3b9bc..0c32c0f7b2e 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 */