Remove useless duplicate inclusions of system header files.

Tom Lane <tgl@sss.pgh.pa.us>

Commit: 9e3755ecb2d058f7d123dd35a2e1784006190962
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: 2017-02-25T21:12:55Z
Releases: 10.0
Remove useless duplicate inclusions of system header files.

c.h #includes a number of core libc header files, such as <stdio.h>.
There's no point in re-including these after having read postgres.h,
postgres_fe.h, or c.h; so remove code that did so.

While at it, also fix some places that were ignoring our standard pattern
of "include postgres[_fe].h, then system header files, then other Postgres
header files".  While there's not any great magic in doing it that way
rather than system headers last, it's silly to have just a few files
deviating from the general pattern.  (But I didn't attempt to enforce this
globally, only in files I was touching anyway.)

I'd be the first to say that this is mostly compulsive neatnik-ism,
but over time it might save enough compile cycles to be useful.

Files

PathChange+/−
contrib/fuzzystrmatch/dmetaphone.c modified +7 −5
contrib/ltree/crc32.c modified +0 −4
contrib/pgcrypto/px.h modified +0 −1
src/backend/access/transam/timeline.c modified +0 −1
src/backend/access/transam/twophase.c modified +0 −1
src/backend/access/transam/xlogarchive.c modified +0 −1
src/backend/commands/dbcommands.c modified +0 −1
src/backend/commands/tablespace.c modified +0 −1
src/backend/libpq/ifaddr.c modified +0 −1
src/backend/port/atomics.c modified +0 −1
src/backend/port/dynloader/freebsd.h modified +0 −1
src/backend/port/dynloader/netbsd.h modified +0 −1
src/backend/port/dynloader/openbsd.h modified +0 −1
src/backend/port/win32/crashdump.c modified +1 −2
src/backend/postmaster/autovacuum.c modified +0 −1
src/backend/replication/basebackup.c modified +0 −1
src/backend/replication/logical/snapbuild.c modified +0 −1
src/backend/replication/walreceiverfuncs.c modified +0 −1
src/backend/storage/ipc/dsm.c modified +0 −1
src/backend/storage/ipc/dsm_impl.c modified +0 −1
src/backend/storage/ipc/latch.c modified +0 −1
src/backend/utils/adt/cash.c modified +0 −1
src/backend/utils/adt/dbsize.c modified +0 −1
src/backend/utils/adt/inet_cidr_ntop.c modified +0 −1
src/backend/utils/adt/inet_net_pton.c modified +0 −1
src/backend/utils/adt/pg_locale.c modified +0 −1
src/backend/utils/init/miscinit.c modified +0 −1
src/bin/initdb/initdb.c modified +0 −1
src/bin/pg_basebackup/pg_basebackup.c modified +0 −1
src/bin/pg_basebackup/pg_receivewal.c modified +0 −1
src/bin/pg_basebackup/streamutil.c modified +0 −3
src/bin/pg_ctl/pg_ctl.c modified +4 −7
src/bin/pg_dump/parallel.c modified +6 −8
src/bin/pg_dump/pg_backup_archiver.c modified +7 −9
src/bin/pg_dump/pg_dumpall.c modified +0 −4
src/bin/pg_dump/pg_dump.c modified +0 −3
src/bin/pg_dump/pg_restore.c modified +5 −10
src/bin/pgevent/pgevent.c modified +0 −6
src/bin/pg_resetwal/pg_resetwal.c modified +0 −1
src/bin/pg_rewind/copy_fetch.c modified +0 −2
src/bin/pg_rewind/fetch.c modified +0 −1
src/bin/pg_rewind/filemap.c modified +0 −1
src/bin/pg_rewind/file_ops.c modified +0 −1
src/bin/pg_rewind/libpq_fetch.c modified +0 −1
src/bin/pg_upgrade/dump.c modified +0 −1
src/bin/pg_upgrade/exec.c modified +2 −3
src/bin/pg_upgrade/option.c modified +5 −6
src/bin/pg_upgrade/parallel.c modified +3 −6
src/bin/pg_upgrade/tablespace.c modified +0 −2
src/bin/psql/command.c modified +0 −2
src/bin/psql/crosstabview.c modified +0 −2
src/bin/psql/help.c modified +0 −1
src/bin/psql/startup.c modified +0 −4
src/common/ip.c modified +0 −1
src/common/username.c modified +0 −2
src/common/wait_error.c modified +0 −2
src/fe_utils/print.c modified +0 −1
src/include/libpq/libpq.h modified +0 −1
src/include/port/atomics/generic-msvc.h modified +0 −1
src/include/utils/pg_locale.h modified +0 −1
src/interfaces/ecpg/ecpglib/data.c modified +0 −2
src/interfaces/ecpg/ecpglib/execute.c modified +0 −1
src/interfaces/ecpg/ecpglib/typename.c modified +0 −1
src/interfaces/ecpg/preproc/ecpg.c modified +1 −1
src/interfaces/ecpg/preproc/pgc.l modified +0 −1
src/interfaces/libpq/fe-connect.c modified +0 −1
src/interfaces/libpq/libpq-int.h modified +0 −1
src/interfaces/libpq/pthread-win32.c modified +0 −1
src/pl/plperl/plperl.c modified +0 −1
src/port/chklocale.c modified +0 −5
src/port/dirmod.c modified +0 −1
src/port/inet_net_ntop.c modified +0 −1
src/port/open.c modified +0 −1
src/port/system.c modified +0 −1
src/test/isolation/isolationtester.c modified +0 −3
src/timezone/strftime.c modified +0 −1
src/timezone/zic.c modified +0 −1