You signed in with another tab or window.Reload to refresh your session.You signed out in another tab or window.Reload to refresh your session.You switched accounts on another tab or window.Reload to refresh your session.Dismiss alert
The point of this patch is to reduce inclusion spam by not needingto #include <netdb.h> or <pwd.h> in port.h (which is read by everycompile in our tree). To do that, we must remove port.h'sdeclarations of pqGetpwuid and pqGethostbyname.pqGethostbyname is only used, and is only ever likely to be used,in src/port/getaddrinfo.c --- which isn't even built on mostplatforms, making pqGethostbyname dead code for most people.Hence, deal with that by just moving it into getaddrinfo.c.To clean up pqGetpwuid, invent a couple of simple wrapperfunctions with less-messy APIs. This allows removing someduplicate error-handling code, too.In passing, remove thread.c from the MSVC build, since itcontains nothing we use on Windows.Noted while working on376ce3e.Discussion:https://postgr.es/m/1634252654444.90107@mit.edu