postgresql/src/include
Tom Lane 98e93a1fc9 Clean up messy API for src/port/thread.c.
The point of this patch is to reduce inclusion spam by not needing
to #include <netdb.h> or <pwd.h> in port.h (which is read by every
compile in our tree).  To do that, we must remove port.h's
declarations 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 most
platforms, 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 wrapper
functions with less-messy APIs.  This allows removing some
duplicate error-handling code, too.

In passing, remove thread.c from the MSVC build, since it
contains nothing we use on Windows.

Noted while working on 376ce3e40.

Discussion: https://postgr.es/m/1634252654444.90107@mit.edu
2022-01-11 13:46:20 -05:00
..
access Update copyright for 2022 2022-01-07 19:04:57 -05:00
bootstrap Update copyright for 2022 2022-01-07 19:04:57 -05:00
catalog Update copyright for 2022 2022-01-07 19:04:57 -05:00
commands Update copyright for 2022 2022-01-07 19:04:57 -05:00
common Improve error handling of cryptohash computations 2022-01-11 09:55:16 +09:00
datatype Update copyright for 2022 2022-01-07 19:04:57 -05:00
executor Update copyright for 2022 2022-01-07 19:04:57 -05:00
fe_utils Update copyright for 2022 2022-01-07 19:04:57 -05:00
foreign Update copyright for 2022 2022-01-07 19:04:57 -05:00
jit Update copyright for 2022 2022-01-07 19:04:57 -05:00
lib Update copyright for 2022 2022-01-07 19:04:57 -05:00
libpq Improve error handling of cryptohash computations 2022-01-11 09:55:16 +09:00
mb Update copyright for 2022 2022-01-07 19:04:57 -05:00
nodes Update copyright for 2022 2022-01-07 19:04:57 -05:00
optimizer Update copyright for 2022 2022-01-07 19:04:57 -05:00
parser Update copyright for 2022 2022-01-07 19:04:57 -05:00
partitioning Update copyright for 2022 2022-01-07 19:04:57 -05:00
port Update copyright for 2022 2022-01-07 19:04:57 -05:00
portability Update copyright for 2022 2022-01-07 19:04:57 -05:00
postmaster Update copyright for 2022 2022-01-07 19:04:57 -05:00
regex Update copyright for 2022 2022-01-07 19:04:57 -05:00
replication Update copyright for 2022 2022-01-07 19:04:57 -05:00
rewrite Update copyright for 2022 2022-01-07 19:04:57 -05:00
snowball Update copyright for 2022 2022-01-07 19:04:57 -05:00
statistics Update copyright for 2022 2022-01-07 19:04:57 -05:00
storage Update copyright for 2022 2022-01-07 19:04:57 -05:00
tcop Update copyright for 2022 2022-01-07 19:04:57 -05:00
tsearch Update copyright for 2022 2022-01-07 19:04:57 -05:00
utils Update copyright for 2022 2022-01-07 19:04:57 -05:00
.gitignore Refactor dlopen() support 2018-09-06 11:33:04 +02:00
c.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
fmgr.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
funcapi.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
getaddrinfo.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
getopt_long.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
Makefile Build in some knowledge about foreign-key relationships in the catalogs. 2021-02-02 17:11:55 -05:00
miscadmin.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_config.h.in Make EXEC_BACKEND more convenient on Linux and FreeBSD. 2022-01-11 00:04:33 +13:00
pg_config_ext.h.in Autoconfiscate selection of 64-bit int type for 64-bit large object API. 2012-10-07 21:52:43 -04:00
pg_config_manual.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_getopt.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pg_trace.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgstat.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtar.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
pgtime.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
port.h Clean up messy API for src/port/thread.c. 2022-01-11 13:46:20 -05:00
postgres.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
postgres_ext.h Phase 2 of pgindent updates. 2017-06-21 15:19:25 -04:00
postgres_fe.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
rusagestub.h Update copyright for 2022 2022-01-07 19:04:57 -05:00
windowapi.h Update copyright for 2022 2022-01-07 19:04:57 -05:00