]> granicus.if.org Git - postgresql/commitdiff
Remove useless duplicate inclusions of system header files.
authorTom Lane <tgl@sss.pgh.pa.us>
Sat, 25 Feb 2017 21:12:24 +0000 (16:12 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Sat, 25 Feb 2017 21:12:55 +0000 (16:12 -0500)
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.

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

index 147c8501ee89a86fa3ad064f1aaccaf29b8bfc25..f210869acbd40a814ac4623ad89f962b9e6c7c27 100644 (file)
@@ -93,9 +93,6 @@ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
 ***********************************************************************/
 
 
-
-
-
 /* include these first, according to the docs */
 #ifndef DMETAPHONE_MAIN
 
@@ -105,14 +102,19 @@ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
 
 /* turn off assertions for embedded function */
 #define NDEBUG
-#endif
 
+#else                                                  /* DMETAPHONE_MAIN */
+
+/* we need these if we didn't get them from postgres.h */
 #include <stdio.h>
-#include <ctype.h>
 #include <stdlib.h>
 #include <string.h>
 #include <stdarg.h>
+
+#endif   /* DMETAPHONE_MAIN */
+
 #include <assert.h>
+#include <ctype.h>
 
 /* prototype for the main function we got from the perl module */
 static void DoubleMetaphone(char *, char **);
index 403dae0d7d464bbf0bb686ac3454d447fd260fc3..447e4b29602d7d6aee428a5f2d21d44cf0a81c25 100644 (file)
@@ -9,10 +9,6 @@
 
 #include "postgres.h"
 
-#include <sys/types.h>
-#include <stdio.h>
-#include <sys/types.h>
-
 #ifdef LOWER_NODE
 #include <ctype.h>
 #define TOLOWER(x)     tolower((unsigned char) (x))
index 00fc6f0c015285fe81427a5069b615a4de09335e..e68a95a0584f5a1cc7f49d977333c846f299326a 100644 (file)
@@ -32,7 +32,6 @@
 #ifndef __PX_H
 #define __PX_H
 
-#include <sys/types.h>
 #include <sys/param.h>
 
 /* keep debug messages? */
index c8240b112df65809e6ae8f985e5adb1668af3895..1fdc59190c4d346111a3b7666dd9a3f56b2508f5 100644 (file)
@@ -32,7 +32,6 @@
 #include "postgres.h"
 
 #include <sys/stat.h>
-#include <stdio.h>
 #include <unistd.h>
 
 #include "access/timeline.h"
index 50c70b29204149547152ed3d1a349a33bf321726..0a8edb9e5803bc0861768f97df145f4c9e64dbe5 100644 (file)
@@ -54,7 +54,6 @@
 
 #include <fcntl.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <time.h>
 #include <unistd.h>
 
index 7e91e8f81ad3bef933dca70979c81b830c1152f9..7afb73579b009444f9b7df658645ea3f2cf5e5f5 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "postgres.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <signal.h>
index 1ebacbc24fea893bb15b9daeffd9757115ee26ed..5a63b1abcbe0b563e515b1e700c8a4b7b7521b9f 100644 (file)
@@ -20,7 +20,6 @@
 #include "postgres.h"
 
 #include <fcntl.h>
-#include <locale.h>
 #include <unistd.h>
 #include <sys/stat.h>
 
index 80515bae19c35b7436fe9c5608d205a174c5da88..f9c26201d982d758b548f8ff7e15930e230d93bc 100644 (file)
@@ -48,7 +48,6 @@
 
 #include <unistd.h>
 #include <dirent.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 
 #include "access/heapam.h"
index 7692881c8baffc8f3a191585bf13d09cdcbd7d2c..f81003f7c893360b4744d71576aaac9c1b3e6107 100644 (file)
@@ -20,7 +20,6 @@
 #include "postgres.h"
 
 #include <unistd.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <netdb.h>
index 86b530821420d95ae5af160ae544a763d80193d2..756a2ef997a838a9100308afd219bc898b9b383d 100644 (file)
@@ -21,7 +21,6 @@
 #ifdef WIN32
 #error "barriers are required (and provided) on WIN32 platforms"
 #endif
-#include <sys/types.h>
 #include <signal.h>
 #endif
 
index 78dda6992296e647c0ea0bba863fac92b627eac7..6116d3f83f5bfd1a637367b4fb01cfa0d4c70fe7 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef PORT_PROTOS_H
 #define PORT_PROTOS_H
 
-#include <sys/types.h>
 #include <nlist.h>
 #include <link.h>
 #include <dlfcn.h>
index 688b7fb79300a5714bde0721a355ef80106094c7..0bd406850daf59f69b29d79ff2898976ff54ffb1 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef PORT_PROTOS_H
 #define PORT_PROTOS_H
 
-#include <sys/types.h>
 #include <nlist.h>
 #include <link.h>
 #include <dlfcn.h>
index 34d27246155aa448dc4f52ee0f3c0c04d7d7c855..25d5439633a04c92304d3548cd731ec63d39a065 100644 (file)
@@ -13,7 +13,6 @@
 #ifndef PORT_PROTOS_H
 #define PORT_PROTOS_H
 
-#include <sys/types.h>
 #include <nlist.h>
 #include <link.h>
 #include <dlfcn.h>
index 64969df73dfad28803b8b2e22bf328a66d1b5743..ff44b6033ed66809ceb91982c5acfe832b7d77a0 100644 (file)
@@ -39,8 +39,7 @@
 #include "postgres.h"
 
 #define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#include <string.h>
+
 /*
  * Some versions of the MS SDK contain "typedef enum { ... } ;" which the MS
  * compiler quite sanely complains about. Well done, Microsoft.
index 0c5ffa086c300ece8f364bef42ae175380a16550..e8de9a3ced48816ad6f5b84d389f1317807be5a5 100644 (file)
@@ -62,7 +62,6 @@
 #include "postgres.h"
 
 #include <signal.h>
-#include <sys/types.h>
 #include <sys/time.h>
 #include <unistd.h>
 
index 643a17943afd6aca4c72ecd9333acdafba9ac7cd..7414048f4eb54c80ed7075a6a57180fd31b64c85 100644 (file)
@@ -12,7 +12,6 @@
  */
 #include "postgres.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <time.h>
index c0f28ddc090539ab2707907de7d75570a994472e..6f19cdca8cc0f0a4c06e90574ae37e23eba1a43e 100644 (file)
 #include "postgres.h"
 
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <unistd.h>
 
 #include "miscadmin.h"
index df113b86e854a6b7d2ac13450152c4ec8a56f438..8bf1fe85652d8e00a93918ee8174890cc178a5f4 100644 (file)
@@ -16,7 +16,6 @@
  */
 #include "postgres.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <time.h>
index 07af16622ce5b8ddb9bff3f683fbd99db6e51d2b..54378bcea98bfd0fd047037a4c5591d3b09c25f3 100644 (file)
@@ -27,7 +27,6 @@
 #include "postgres.h"
 
 #include <fcntl.h>
-#include <string.h>
 #include <unistd.h>
 #ifndef WIN32
 #include <sys/mman.h>
index 7078f68c356de0745fd9ac3c5988320fa3ccb7c4..b2c9cdc6eddbf8b65e1851c3381252195102051b 100644 (file)
@@ -49,7 +49,6 @@
 #include "postgres.h"
 
 #include <fcntl.h>
-#include <string.h>
 #include <unistd.h>
 #ifndef WIN32
 #include <sys/mman.h>
index 0079ba567f62b588cb83987eccf8462324911993..ea7f930866fbb5eaaf636d241c35afd1cb64c3bc 100644 (file)
@@ -40,7 +40,6 @@
 #include <signal.h>
 #include <unistd.h>
 #include <sys/time.h>
-#include <sys/types.h>
 #ifdef HAVE_SYS_EPOLL_H
 #include <sys/epoll.h>
 #endif
index ac8f74fee6315dba653d0838010163dbe14eade3..5afadb65d115606605607a08de48eb1930d72685 100644 (file)
@@ -21,7 +21,6 @@
 #include <limits.h>
 #include <ctype.h>
 #include <math.h>
-#include <locale.h>
 
 #include "libpq/pqformat.h"
 #include "utils/builtins.h"
index ec3a28cd0d0bd0119e9231431f6a8ec07fd0fc8e..8cdd1dc4f79a3b7633bf73a39062a038c8b483a3 100644 (file)
@@ -11,7 +11,6 @@
 
 #include "postgres.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 
 #include "access/heapam.h"
index d33534ec17326447c5b5b1305fdf46897c45308b..d5d1289d7d9d47cc43b72fb5a5f0ebbf46783b62 100644 (file)
@@ -23,7 +23,6 @@ static const char rcsid[] = "Id: inet_net_ntop.c,v 1.1.2.2 2004/03/09 09:17:27 m
 
 #include "postgres.h"
 
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index b8fa7d2bccf99d1d8d59f3e974f484d5429ebebd..be788d37cd070eadb3ceac8a1fc7cd4c532077e2 100644 (file)
@@ -23,7 +23,6 @@ static const char rcsid[] = "Id: inet_net_pton.c,v 1.4.2.3 2004/03/17 00:40:11 m
 
 #include "postgres.h"
 
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index 4c7f1dad50ea10c45789592b455946c351562948..ab197025f8183be4d302f41182ccf3c62f5bc9f2 100644 (file)
@@ -51,7 +51,6 @@
 
 #include "postgres.h"
 
-#include <locale.h>
 #include <time.h>
 
 #include "access/htup_details.h"
index e984e79c602937164b23b627289a7b3f5407cbf7..e0298ee35ff99e4b64b6c8a9a115c24a9b4fc065 100644 (file)
@@ -20,7 +20,6 @@
 #include <sys/file.h>
 #include <sys/stat.h>
 #include <sys/time.h>
-#include <sys/types.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <grp.h>
index 540427a892299c9757b3f32f46e32968a81b4437..1ed0d205041e5a5cd456424df7dbe1e282e67032 100644 (file)
@@ -52,7 +52,6 @@
 #include <fcntl.h>
 #include <sys/stat.h>
 #include <unistd.h>
-#include <locale.h>
 #include <signal.h>
 #include <time.h>
 
index 9020fb14d39aede4be732018e62b2ec7d9f02f35..bc997dc9973d92591b910972af4f1b2acf46ecb8 100644 (file)
@@ -16,7 +16,6 @@
 #include <unistd.h>
 #include <dirent.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <sys/wait.h>
 #include <signal.h>
 #include <time.h>
index e8d0e8984e6c1b9a9a17ba126be940c4dd465677..15348ada58daed991de7dbb3fa9631b2f509824a 100644 (file)
@@ -17,7 +17,6 @@
 #include <dirent.h>
 #include <signal.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <unistd.h>
 
 #include "libpq-fe.h"
index 90d93cbed16699964928f07edcc996f068ac0b8d..1fe42efc215208a438c4c2a98984ad291155cb79 100644 (file)
 
 #include "postgres_fe.h"
 
-#include <stdio.h>
-#include <string.h>
 #include <sys/time.h>
-#include <sys/types.h>
 #include <unistd.h>
 
 /* for ntohl/htonl */
index 93e589195038ec229a6ae70250a0658d3f5bf827..c63819b88b4207266dcfd44ea9b75495f8eeaf81 100644 (file)
 
 #include "postgres_fe.h"
 
-#include "catalog/pg_control.h"
-#include "common/controldata_utils.h"
-#include "libpq-fe.h"
-#include "pqexpbuffer.h"
-
 #include <fcntl.h>
-#include <locale.h>
 #include <signal.h>
 #include <time.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/wait.h>
 #include <unistd.h>
 #include <sys/resource.h>
 #endif
 
+#include "catalog/pg_control.h"
+#include "common/controldata_utils.h"
 #include "getopt_long.h"
+#include "libpq-fe.h"
 #include "miscadmin.h"
+#include "pqexpbuffer.h"
 
 /* PID can be negative for standalone backend */
 typedef long pgpid_t;
index 775a7f858c9e95bcb8ce10d9b373f6822599f78f..be8e018a9643057807d6e213910ab87788e314cb 100644 (file)
 
 #include "postgres_fe.h"
 
+#ifndef WIN32
+#include <sys/wait.h>
+#include <signal.h>
+#include <unistd.h>
+#include <fcntl.h>
+#endif
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
 #include "pg_backup_utils.h"
 #include "fe_utils/string_utils.h"
 
-#ifndef WIN32
-#include <sys/types.h>
-#include <sys/wait.h>
-#include "signal.h"
-#include <unistd.h>
-#include <fcntl.h>
-#endif
-
 /* Mnemonic macros for indexing the fd array returned by pipe(2) */
 #define PIPE_READ                                                      0
 #define PIPE_WRITE                                                     1
index 929f1b592bcd757c4a2c4cf57a81b2bcac178bce..7e2bed38b3bf6f7e7672632b9249ac84cfce5f85 100644 (file)
  */
 #include "postgres_fe.h"
 
-#include "parallel.h"
-#include "pg_backup_archiver.h"
-#include "pg_backup_db.h"
-#include "pg_backup_utils.h"
-#include "dumputils.h"
-#include "fe_utils/string_utils.h"
-
 #include <ctype.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <sys/stat.h>
-#include <sys/types.h>
 #include <sys/wait.h>
-
 #ifdef WIN32
 #include <io.h>
 #endif
 
+#include "parallel.h"
+#include "pg_backup_archiver.h"
+#include "pg_backup_db.h"
+#include "pg_backup_utils.h"
+#include "dumputils.h"
+#include "fe_utils/string_utils.h"
+
 #include "libpq/libpq-fs.h"
 
 #define TEXT_DUMP_HEADER "--\n-- PostgreSQL database dump\n--\n\n"
index 89db3103bc73dd5d173e5c963b1d30b3152ce2f8..7273ec8fe2a26b7e651aab489183dfc7eaa5ac2d 100644 (file)
@@ -33,9 +33,6 @@
 
 #include <unistd.h>
 #include <ctype.h>
-#ifdef ENABLE_NLS
-#include <locale.h>
-#endif
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
 #endif
index 6895d02bfc81994501b5de48236956f3b5fc7f53..f4b4d7bd9b64d1428f4690a3b6a4039edaabb95d 100644 (file)
 #include <time.h>
 #include <unistd.h>
 
-#ifdef ENABLE_NLS
-#include <locale.h>
-#endif
-
 #include "getopt_long.h"
 
 #include "dumputils.h"
index 497677494bc50f6203ac74d3f068ec027d834cec..5f61fb2764ea73a7af7b30368d899608a2fe6309 100644 (file)
  */
 #include "postgres_fe.h"
 
-#include "getopt_long.h"
-
-#include "dumputils.h"
-#include "parallel.h"
-#include "pg_backup_utils.h"
-
 #include <ctype.h>
-
 #ifdef HAVE_TERMIOS_H
 #include <termios.h>
 #endif
 
-#ifdef ENABLE_NLS
-#include <locale.h>
-#endif
+#include "getopt_long.h"
+
+#include "dumputils.h"
+#include "parallel.h"
+#include "pg_backup_utils.h"
 
 
 static void usage(const char *progname);
index 502ea5b290048cb5a5d7ff076269c05a8060f31d..27bd9b04e7c8fea31fec828cd8e577f26bc5fb7a 100644 (file)
@@ -39,7 +39,6 @@
 
 #include <dirent.h>
 #include <fcntl.h>
-#include <locale.h>
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <time.h>
index d48424bfb4a80855966d27b521e2b708733d36df..f8d3dfecfa1cfdf54fae2c53ce249a2f97257f6c 100644 (file)
@@ -9,12 +9,10 @@
  */
 #include "postgres_fe.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
 #include <fcntl.h>
 #include <unistd.h>
-#include <string.h>
 
 #include "datapagemap.h"
 #include "fetch.h"
index 08a296d7d4f286b6ffc7dc476a1852c53e916ed0..e9353d88661811e1a3766174dc610b0201546a16 100644 (file)
@@ -16,7 +16,6 @@
  */
 #include "postgres_fe.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 
index f8ca4c925d2287b85213e937ba901492762003a0..4229f0e056cfa2b894d8abace295a58e76c582c9 100644 (file)
@@ -14,7 +14,6 @@
  */
 #include "postgres_fe.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <unistd.h>
index 151930234c14031ec0c7a69ba34870cf6781b096..e5b254069d4e46ce8770817f3c647f683ffa79db 100644 (file)
@@ -10,7 +10,6 @@
 
 #include "postgres_fe.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 
index d2374201c66480e50468730060685de8fc6c7519..d86ecd3660507a63f47b1acea8e6365ef237d1a3 100644 (file)
@@ -9,7 +9,6 @@
  */
 #include "postgres_fe.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <dirent.h>
 #include <fcntl.h>
index f18be22c1602f0da61c1f3803b3d0f7879add992..2e621b027c8d352b50304074ffb8d4ebe8ba1870 100644 (file)
@@ -11,7 +11,6 @@
 
 #include "pg_upgrade.h"
 
-#include <sys/types.h>
 #include "fe_utils/string_utils.h"
 
 
index b6a3ef791ef1780bc8cd4e88c283572be5793e50..91fa71728e8e31b0bc6b2dd29fef3c187fb282e5 100644 (file)
@@ -9,10 +9,9 @@
 
 #include "postgres_fe.h"
 
-#include "pg_upgrade.h"
-
 #include <fcntl.h>
-#include <sys/types.h>
+
+#include "pg_upgrade.h"
 
 static void check_data_dir(ClusterInfo *cluster);
 static void check_bin_dir(ClusterInfo *cluster);
index 82d2443bcd44b73676ed512587427acea592cc54..5007ce53cf2d3eda68c9bf04fe29997152fff6d6 100644 (file)
@@ -9,17 +9,16 @@
 
 #include "postgres_fe.h"
 
-#include "miscadmin.h"
-#include "getopt_long.h"
-
-#include "pg_upgrade.h"
-
 #include <time.h>
-#include <sys/types.h>
 #ifdef WIN32
 #include <io.h>
 #endif
 
+#include "miscadmin.h"
+#include "getopt_long.h"
+
+#include "pg_upgrade.h"
+
 
 static void usage(void);
 static void check_required_directory(char **dirpath, char **configpath,
index d35015f52ac2b5fbcd606fa97b1062dcd7800696..7c85a13a992fc339066861b0e824ff7f5ef03af3 100644 (file)
@@ -9,17 +9,14 @@
 
 #include "postgres_fe.h"
 
-#include "pg_upgrade.h"
-
-#include <stdlib.h>
-#include <string.h>
-#include <sys/types.h>
 #include <sys/wait.h>
-
 #ifdef WIN32
 #include <io.h>
 #endif
 
+#include "pg_upgrade.h"
+
+
 static int     parallel_jobs;
 
 #ifdef WIN32
index 24f7bd960c01e960c090131f6c0f58d2401111bb..4938bc2de264f40de5b208670893aa40a7c19a92 100644 (file)
@@ -11,8 +11,6 @@
 
 #include "pg_upgrade.h"
 
-#include <sys/types.h>
-
 static void get_tablespace_paths(void);
 static void set_tablespace_directory_suffix(ClusterInfo *cluster);
 
index 5332a13256d5955b5a991d58add9e8628c8bc563..f68f987c174821a86734157e05c8d75ffddde6b4 100644 (file)
  *
  *-------------------------------------------------------------------------
  */
-
-
 #include "postgres_fe.h"
 
-#include <windows.h>
 #include <olectl.h>
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
 
 /* Global variables */
 HANDLE         g_module = NULL;        /* hModule of DLL */
index f17f61071756a61599e6b7ab06703e1d7da83b4c..a28f5134b9252ddc02150420d75c3e42ff0aa2c0 100644 (file)
@@ -18,7 +18,6 @@
 #include <pwd.h>
 #endif
 #ifndef WIN32
-#include <sys/types.h>                 /* for umask() */
 #include <sys/stat.h>                  /* for stat() */
 #include <fcntl.h>                             /* open() flags */
 #include <unistd.h>                            /* for geteuid(), getpid(), stat() */
@@ -27,7 +26,6 @@
 #include <io.h>
 #include <fcntl.h>
 #include <direct.h>
-#include <sys/types.h>                 /* for umask() */
 #include <sys/stat.h>                  /* for stat() */
 #endif
 
index bf48d2f4062066ec2c0399eca849c18cab7f35e2..2794eb6b8765243c6ae2097b0738517809e1892c 100644 (file)
@@ -7,8 +7,6 @@
  */
 #include "postgres_fe.h"
 
-#include <string.h>
-
 #include "common.h"
 #include "crosstabview.h"
 #include "pqexpbuffer.h"
index 3e3cab49418a9e75fd3a6d70d80739dd50fb30ea..91cf0be46a6537e599ca1c1a5332bfdb822471ad 100644 (file)
@@ -8,7 +8,6 @@
 #include "postgres_fe.h"
 
 #ifndef WIN32
-#include <sys/types.h>                 /* (ditto) */
 #include <unistd.h>                            /* for geteuid() */
 #else
 #include <win32.h>
index 88d686a5b74e6a81dc53427fd0bc253b9a94559a..694f0ef257fe1b431d81fbd1333e3a125b557f7c 100644 (file)
@@ -7,8 +7,6 @@
  */
 #include "postgres_fe.h"
 
-#include <sys/types.h>
-
 #ifndef WIN32
 #include <unistd.h>
 #else                                                  /* WIN32 */
@@ -18,8 +16,6 @@
 
 #include "getopt_long.h"
 
-#include <locale.h>
-
 #include "command.h"
 #include "common.h"
 #include "describe.h"
index d981dbcac95ecf98bf08962db0e35632884cba40..80711dbb989e41224a90c0322a4e40fd3182e198 100644 (file)
@@ -24,7 +24,6 @@
 #endif
 
 #include <unistd.h>
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <sys/socket.h>
 #include <netdb.h>
index d6abac828132e933f5d3020af168a34f677f9d45..487eacfe73fbe6501cfe0e7e0ce5a4d983ed55bd 100644 (file)
 #include "postgres_fe.h"
 #endif
 
-#include <errno.h>
 #include <pwd.h>
 #include <unistd.h>
-#include <sys/types.h>
 
 #include "common/username.h"
 
index 7ac545c67acaed040d71d349dc1367efdc7e5381..f824a5f2af35325e968fcc4b37341c3746962447 100644 (file)
@@ -21,8 +21,6 @@
 #endif
 
 #include <signal.h>
-#include <stdio.h>
-#include <string.h>
 #include <sys/wait.h>
 
 /*
index 5ca27a93e096c67b014e4e8ca24c86f746bf17b1..9180b9000480d88494bd7353c141272373c54d27 100644 (file)
@@ -18,7 +18,6 @@
 #include "postgres_fe.h"
 
 #include <limits.h>
-#include <locale.h>
 #include <math.h>
 #include <signal.h>
 #include <unistd.h>
index 538066e106737868f32c942073e3e38b2c023b64..d4885a5e2820fa57052800d0ef469247470a9bd0 100644 (file)
@@ -14,7 +14,6 @@
 #ifndef LIBPQ_H
 #define LIBPQ_H
 
-#include <sys/types.h>
 #include <netinet/in.h>
 
 #include "lib/stringinfo.h"
index c7caf04d57e1fa17d31d9905e6031b7e5654e714..d5ee6e1bcbef06dbd2f554755da58e432935d663 100644 (file)
@@ -17,7 +17,6 @@
  *-------------------------------------------------------------------------
  */
 #include <intrin.h>
-#include <windows.h>
 
 /* intentionally no include guards, should only be included by atomics.h */
 #ifndef INSIDE_ATOMICS_H
index be91f9b88c72be8a54dc58c58fddcc9c424a6f9f..cb509e2b6b0ce93952d6b378027b19347cf52014 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef _PG_LOCALE_
 #define _PG_LOCALE_
 
-#include <locale.h>
 #if defined(LOCALE_T_IN_XLOCALE) || defined(WCSTOMBS_L_IN_XLOCALE)
 #include <xlocale.h>
 #endif
index 23646a957917b0794524f53f8c6ce84738bf77c6..499a4c1780430f04c7a9081da7ada231dd77a566 100644 (file)
@@ -3,8 +3,6 @@
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
 
-#include <stdlib.h>
-#include <string.h>
 #include <float.h>
 #include <math.h>
 
index d5a463d9404a3600b631a2dfa666ba244cb0f88c..bd9b86be4967d258407bbb5f3e10919ae369cfff 100644 (file)
@@ -16,7 +16,6 @@
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
 
-#include <locale.h>
 #include <float.h>
 #include <math.h>
 
index db65ec10f1816eeb7407eed7d7256039ddb2ed1f..f90279cf81a2143836a6613341295e4aff5599e2 100644 (file)
@@ -3,7 +3,6 @@
 #define POSTGRES_ECPG_INTERNAL
 #include "postgres_fe.h"
 
-#include <stdlib.h>
 #include "ecpgtype.h"
 #include "ecpglib.h"
 #include "extern.h"
index fa80bb289e52681eb4ab515d66507b913ebfcf6d..aaecbf8122c3c37e98551d3b49a858b32f841eaf 100644 (file)
@@ -6,7 +6,7 @@
 #include "postgres_fe.h"
 
 #include <unistd.h>
-#include <string.h>
+
 #include "getopt_long.h"
 
 #include "extern.h"
index b894a33e53fb06b4b75fc859dd65e68100cd1fc1..6b58dd5afe71263337fe67bdef316400e437c069 100644 (file)
@@ -19,7 +19,6 @@
 #include "postgres_fe.h"
 
 #include <ctype.h>
-#include <sys/types.h>
 #include <limits.h>
 
 #include "extern.h"
index 65b7c31dc0303f447221b9eccb37ccd906103b51..685f355ab36ec1897f3e96c2956ecb01e34102c8 100644 (file)
@@ -15,7 +15,6 @@
 
 #include "postgres_fe.h"
 
-#include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <ctype.h>
index e9b73a925ed333eaccc908153cafef734f1f0cd3..24242da221e3367ed769f4ac6b41ad7f932f7208 100644 (file)
@@ -25,7 +25,6 @@
 #include "libpq-events.h"
 
 #include <time.h>
-#include <sys/types.h>
 #ifndef WIN32
 #include <sys/time.h>
 #endif
index e63432d8222ae3924379ecea0531b0a51196a66e..0e0d3eeb88d96fc2dbb55637e53377852b05bd7e 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "postgres_fe.h"
 
-#include <windows.h>
 #include "pthread-win32.h"
 
 DWORD
index fc10d30f45be7aac863751f64d77c7a899a08148..00979cba743bbc4f857f53c4243c3f53f45a5fc8 100644 (file)
@@ -13,7 +13,6 @@
 #include <ctype.h>
 #include <fcntl.h>
 #include <limits.h>
-#include <locale.h>
 #include <unistd.h>
 
 /* postgreSQL stuff */
index 54ce9410f030ad0f757201b9faf475f4827557fc..c6ec929702fdf771d6bcf266cae6025b5ae8ee17 100644 (file)
 #include "postgres_fe.h"
 #endif
 
-#if defined(WIN32) && (_MSC_VER >= 1900)
-#include <windows.h>
-#endif
-
-#include <locale.h>
 #ifdef HAVE_LANGINFO_H
 #include <langinfo.h>
 #endif
index 08835962be6b22846051fe8b6923a885d05a963f..84039ff38a263cb39f79f1888ad4565e00a9755a 100644 (file)
@@ -34,7 +34,6 @@
 #ifndef __CYGWIN__
 #include <winioctl.h>
 #else
-#include <windows.h>
 #include <w32api/winioctl.h>
 #endif
 #endif
index 047895e4f4f03b988c556c3ff9c61b08eb7283d0..cebcda0e6151ecefb1f9dc2209f215ebe94cbfea 100644 (file)
@@ -27,7 +27,6 @@ static const char rcsid[] = "Id: inet_net_ntop.c,v 1.1.2.2 2004/03/09 09:17:27 m
 #include "postgres_fe.h"
 #endif
 
-#include <sys/types.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index db7abdbe0365efb16b64e58f0d86487c122bb8de..aa31342261052f8d2d71265e8f212fea96ab98d7 100644 (file)
@@ -19,7 +19,6 @@
 #include "postgres_fe.h"
 #endif
 
-#include <windows.h>
 #include <fcntl.h>
 #include <assert.h>
 
index 8651187890f525cb346cf7ad86d051d5f1b76971..3d99c7985f286a7225a6b816c160761f4ad86667 100644 (file)
@@ -44,7 +44,6 @@
 #include "postgres_fe.h"
 #endif
 
-#include <windows.h>
 #include <fcntl.h>
 
 #undef system
index db2b55982b61ddb336df772bbf656e58d4ba9a69..f77f46575127625ee3c7ee4688264c297c65d021 100644 (file)
@@ -7,9 +7,6 @@
 
 #include "postgres_fe.h"
 
-#ifdef WIN32
-#include <windows.h>
-#endif
 #include <sys/time.h>
 #ifdef HAVE_SYS_SELECT_H
 #include <sys/select.h>
index 4a0a01db651962c8e0b8c074f7a71cb540609107..acaba86881d79e6481e07b7585c62514ae6183e8 100644 (file)
@@ -41,7 +41,6 @@
 #include "postgres.h"
 
 #include <fcntl.h>
-#include <locale.h>
 
 #include "private.h"
 #include "tzfile.h"
index a83cea12ddc196a102519efd49cf79ec177fd2b7..e1875585df41d8eaa7971dbf2eee549d5fc03363 100644 (file)
@@ -9,7 +9,6 @@
 #include "postgres_fe.h"
 
 #include <fcntl.h>
-#include <locale.h>
 #include <sys/stat.h>
 #include <time.h>
 #include <unistd.h>