diff options
author | Tom Lane | 2006-07-14 05:28:29 +0000 |
---|---|---|
committer | Tom Lane | 2006-07-14 05:28:29 +0000 |
commit | 7f84f0f16b752649314e3873b2b55243b58c9fa1 (patch) | |
tree | 3c52091d808d55a281031a71838f69826d421abe | |
parent | 026e634f2c96c1a64ca707286ceb9b25e325adff (diff) |
Fix a passel of recently-committed violations of the rule 'thou shalt
have no other gods before c.h'. Also remove some demonstrably redundant
#include lines, mostly of <errno.h> which was added to c.h years ago.
40 files changed, 17 insertions, 62 deletions
diff --git a/contrib/btree_gist/btree_numeric.c b/contrib/btree_gist/btree_numeric.c index a6a03c8995..639b575cb3 100644 --- a/contrib/btree_gist/btree_numeric.c +++ b/contrib/btree_gist/btree_numeric.c @@ -1,7 +1,8 @@ +#include "btree_gist.h" + #include <math.h> #include <float.h> -#include "btree_gist.h" #include "btree_utils_var.h" #include "utils/builtins.h" #include "utils/numeric.h" diff --git a/contrib/btree_gist/btree_utils_num.h b/contrib/btree_gist/btree_utils_num.h index 1ea022e90f..dcaa94bbee 100644 --- a/contrib/btree_gist/btree_utils_num.h +++ b/contrib/btree_gist/btree_utils_num.h @@ -1,11 +1,11 @@ #ifndef __BTREE_UTILS_NUM_H__ #define __BTREE_UTILS_NUM_H__ +#include "btree_gist.h" + #include <math.h> #include <float.h> -#include "btree_gist.h" - typedef char GBT_NUMKEY; /* Better readable key */ diff --git a/contrib/btree_gist/btree_utils_var.c b/contrib/btree_gist/btree_utils_var.c index 1a6f1fdadf..1f5ea12692 100644 --- a/contrib/btree_gist/btree_utils_var.c +++ b/contrib/btree_gist/btree_utils_var.c @@ -1,8 +1,9 @@ +#include "btree_gist.h" + #include <math.h> #include <limits.h> #include <float.h> -#include "btree_gist.h" #include "btree_utils_var.h" #include "utils/pg_locale.h" #include "utils/builtins.h" diff --git a/contrib/btree_gist/btree_utils_var.h b/contrib/btree_gist/btree_utils_var.h index 21a6cbd8e2..0c723e91ac 100644 --- a/contrib/btree_gist/btree_utils_var.h +++ b/contrib/btree_gist/btree_utils_var.h @@ -1,10 +1,10 @@ #ifndef __BTREE_UTILS_VAR_H__ #define __BTREE_UTILS_VAR_H__ -#include "mb/pg_wchar.h" - #include "btree_gist.h" +#include "mb/pg_wchar.h" + /* Variable length key */ typedef bytea GBT_VARKEY; diff --git a/contrib/chkpass/chkpass.c b/contrib/chkpass/chkpass.c index e8ad199711..9a92ca71b0 100644 --- a/contrib/chkpass/chkpass.c +++ b/contrib/chkpass/chkpass.c @@ -10,8 +10,6 @@ #include "postgres.h" -#include <stdio.h> -#include <string.h> #include <time.h> #include <unistd.h> #ifdef HAVE_CRYPT_H diff --git a/contrib/fuzzystrmatch/dmetaphone.c b/contrib/fuzzystrmatch/dmetaphone.c index 8509543433..9690132c7a 100644 --- a/contrib/fuzzystrmatch/dmetaphone.c +++ b/contrib/fuzzystrmatch/dmetaphone.c @@ -50,7 +50,7 @@ /* - * $Revision: 1.7 $ + * $Revision: 1.8 $ * $Id$ */ @@ -106,8 +106,8 @@ The remaining code is authored by Andrew Dunstan <[email protected]> and #ifndef DMETAPHONE_MAIN #include "postgres.h" + #include "fmgr.h" -#include "utils/elog.h" /* turn off assertions for embedded function */ #define NDEBUG diff --git a/contrib/pg_trgm/trgm.h b/contrib/pg_trgm/trgm.h index d6ba040505..b7674c52b5 100644 --- a/contrib/pg_trgm/trgm.h +++ b/contrib/pg_trgm/trgm.h @@ -6,8 +6,6 @@ #include "access/gist.h" #include "access/itup.h" #include "utils/builtins.h" -#include "utils/elog.h" -#include "utils/palloc.h" #include "storage/bufpage.h" /* options */ diff --git a/contrib/tsearch2/common.c b/contrib/tsearch2/common.c index 35fb9ffcb8..6192821344 100644 --- a/contrib/tsearch2/common.c +++ b/contrib/tsearch2/common.c @@ -1,6 +1,5 @@ #include "postgres.h" -#include "postgres.h" #include "fmgr.h" #include "catalog/pg_namespace.h" #include "catalog/pg_proc.h" diff --git a/contrib/tsearch2/gendict/dict_snowball.c.IN b/contrib/tsearch2/gendict/dict_snowball.c.IN index 7d080fb447..57289458ea 100644 --- a/contrib/tsearch2/gendict/dict_snowball.c.IN +++ b/contrib/tsearch2/gendict/dict_snowball.c.IN @@ -5,9 +5,6 @@ * http://snowball.tartarus.org/ * Teodor Sigaev <[email protected]> */ -#include <stdlib.h> -#include <string.h> - #include "postgres.h" #include "dict.h" diff --git a/contrib/tsearch2/gendict/dict_tmpl.c.IN b/contrib/tsearch2/gendict/dict_tmpl.c.IN index b473dd8631..47d320d64f 100644 --- a/contrib/tsearch2/gendict/dict_tmpl.c.IN +++ b/contrib/tsearch2/gendict/dict_tmpl.c.IN @@ -4,10 +4,6 @@ * example of dictionary * Teodor Sigaev <[email protected]> */ -#include <errno.h> -#include <stdlib.h> -#include <string.h> - #include "postgres.h" #include "dict.h" diff --git a/contrib/tsearch2/ispell/regis.c b/contrib/tsearch2/ispell/regis.c index 20b6bddecf..4be863431d 100644 --- a/contrib/tsearch2/ispell/regis.c +++ b/contrib/tsearch2/ispell/regis.c @@ -1,7 +1,3 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - #include "regis.h" #include "ts_locale.h" #include "common.h" diff --git a/contrib/tsearch2/ispell/spell.c b/contrib/tsearch2/ispell/spell.c index 28f38eefd3..4e199f4bc0 100644 --- a/contrib/tsearch2/ispell/spell.c +++ b/contrib/tsearch2/ispell/spell.c @@ -1,10 +1,7 @@ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <ctype.h> - #include "postgres.h" +#include <ctype.h> + #include "spell.h" #include "common.h" #include "ts_locale.h" diff --git a/contrib/tsearch2/ispell/spell.h b/contrib/tsearch2/ispell/spell.h index fe79888bf3..5734881947 100644 --- a/contrib/tsearch2/ispell/spell.h +++ b/contrib/tsearch2/ispell/spell.h @@ -1,9 +1,11 @@ #ifndef __SPELL_H__ #define __SPELL_H__ +#include "c.h" + #include <sys/types.h> + #include "regex/regex.h" -#include "c.h" #include "regis.h" #include "dict.h" diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c index d38faa71a5..db7c2ef697 100644 --- a/src/backend/executor/nodeSubplan.c +++ b/src/backend/executor/nodeSubplan.c @@ -17,10 +17,10 @@ * ExecInitSubPlan - initialize a subselect * ExecEndSubPlan - shut down a subselect */ -#include <math.h> - #include "postgres.h" +#include <math.h> + #include "access/heapam.h" #include "executor/executor.h" #include "executor/nodeSubplan.h" diff --git a/src/backend/libpq/auth.c b/src/backend/libpq/auth.c index c9aebcff05..625abd96e6 100644 --- a/src/backend/libpq/auth.c +++ b/src/backend/libpq/auth.c @@ -20,7 +20,6 @@ #if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || defined(HAVE_STRUCT_SOCKCRED) #include <sys/uio.h> #include <sys/ucred.h> -#include <errno.h> #endif #include <netinet/in.h> #include <arpa/inet.h> diff --git a/src/backend/libpq/pqcomm.c b/src/backend/libpq/pqcomm.c index c495ad0dcc..d87c57fe65 100644 --- a/src/backend/libpq/pqcomm.c +++ b/src/backend/libpq/pqcomm.c @@ -66,7 +66,6 @@ #include "postgres.h" #include <signal.h> -#include <errno.h> #include <fcntl.h> #include <grp.h> #include <unistd.h> diff --git a/src/backend/libpq/pqformat.c b/src/backend/libpq/pqformat.c index 645b2ee653..79e8b1f393 100644 --- a/src/backend/libpq/pqformat.c +++ b/src/backend/libpq/pqformat.c @@ -69,7 +69,6 @@ #include "postgres.h" -#include <errno.h> #include <sys/param.h> #include <netinet/in.h> #include <arpa/inet.h> diff --git a/src/backend/port/dynloader/aix.c b/src/backend/port/dynloader/aix.c index 3ace7fc391..64aca56ee2 100644 --- a/src/backend/port/dynloader/aix.c +++ b/src/backend/port/dynloader/aix.c @@ -6,7 +6,6 @@ #include "postgres.h" -#include <errno.h> #include "sys/ldr.h" #include <a.out.h> #include "ldfcn.h" diff --git a/src/backend/port/ipc_test.c b/src/backend/port/ipc_test.c index 524c37fac0..3d8cb4f528 100644 --- a/src/backend/port/ipc_test.c +++ b/src/backend/port/ipc_test.c @@ -27,7 +27,6 @@ */ #include "postgres.h" -#include <errno.h> #include <unistd.h> #include "miscadmin.h" diff --git a/src/backend/port/posix_sema.c b/src/backend/port/posix_sema.c index a6aaa32436..42d8fc950e 100644 --- a/src/backend/port/posix_sema.c +++ b/src/backend/port/posix_sema.c @@ -17,7 +17,6 @@ */ #include "postgres.h" -#include <errno.h> #include <fcntl.h> #include <signal.h> #include <unistd.h> diff --git a/src/backend/port/sysv_sema.c b/src/backend/port/sysv_sema.c index 76ce4954f8..4ece86e039 100644 --- a/src/backend/port/sysv_sema.c +++ b/src/backend/port/sysv_sema.c @@ -14,7 +14,6 @@ */ #include "postgres.h" -#include <errno.h> #include <signal.h> #include <unistd.h> #include <sys/file.h> diff --git a/src/backend/port/sysv_shmem.c b/src/backend/port/sysv_shmem.c index 0f63a8a24b..7f21f1db40 100644 --- a/src/backend/port/sysv_shmem.c +++ b/src/backend/port/sysv_shmem.c @@ -16,7 +16,6 @@ */ #include "postgres.h" -#include <errno.h> #include <signal.h> #include <unistd.h> #include <sys/file.h> diff --git a/src/backend/port/win32/shmem.c b/src/backend/port/win32/shmem.c index bff318266d..1755b7248f 100644 --- a/src/backend/port/win32/shmem.c +++ b/src/backend/port/win32/shmem.c @@ -13,9 +13,6 @@ #include "postgres.h" -#include <stdio.h> -#include <errno.h> - static DWORD s_segsize = 0; /* Detach from a shared mem area based on its address */ diff --git a/src/backend/storage/file/buffile.c b/src/backend/storage/file/buffile.c index bb7ede97a2..6377f59139 100644 --- a/src/backend/storage/file/buffile.c +++ b/src/backend/storage/file/buffile.c @@ -34,8 +34,6 @@ #include "postgres.h" -#include <errno.h> - #include "storage/fd.h" #include "storage/buffile.h" diff --git a/src/backend/storage/freespace/freespace.c b/src/backend/storage/freespace/freespace.c index 77e4eef36f..370db3a768 100644 --- a/src/backend/storage/freespace/freespace.c +++ b/src/backend/storage/freespace/freespace.c @@ -58,7 +58,6 @@ */ #include "postgres.h" -#include <errno.h> #include <limits.h> #include <math.h> #include <unistd.h> diff --git a/src/backend/storage/ipc/ipc.c b/src/backend/storage/ipc/ipc.c index 1f7962aebe..ec87b69e18 100644 --- a/src/backend/storage/ipc/ipc.c +++ b/src/backend/storage/ipc/ipc.c @@ -19,7 +19,6 @@ */ #include "postgres.h" -#include <errno.h> #include <signal.h> #include <unistd.h> diff --git a/src/backend/storage/smgr/md.c b/src/backend/storage/smgr/md.c index 423b19d222..64f0321b27 100644 --- a/src/backend/storage/smgr/md.c +++ b/src/backend/storage/smgr/md.c @@ -14,7 +14,6 @@ */ #include "postgres.h" -#include <errno.h> #include <unistd.h> #include <fcntl.h> #include <sys/file.h> diff --git a/src/backend/utils/adt/datetime.c b/src/backend/utils/adt/datetime.c index cf2de3ca22..d0441119df 100644 --- a/src/backend/utils/adt/datetime.c +++ b/src/backend/utils/adt/datetime.c @@ -15,7 +15,6 @@ #include "postgres.h" #include <ctype.h> -#include <errno.h> #include <float.h> #include <limits.h> #include <math.h> diff --git a/src/backend/utils/adt/float.c b/src/backend/utils/adt/float.c index 08247370ff..2b87a675fa 100644 --- a/src/backend/utils/adt/float.c +++ b/src/backend/utils/adt/float.c @@ -53,7 +53,6 @@ #include "postgres.h" #include <ctype.h> -#include <errno.h> #include <float.h> #include <math.h> #include <limits.h> diff --git a/src/backend/utils/adt/numeric.c b/src/backend/utils/adt/numeric.c index a385deeeec..7be72cd61e 100644 --- a/src/backend/utils/adt/numeric.c +++ b/src/backend/utils/adt/numeric.c @@ -25,7 +25,6 @@ #include <float.h> #include <limits.h> #include <math.h> -#include <errno.h> #include "catalog/pg_type.h" #include "libpq/pqformat.h" diff --git a/src/backend/utils/adt/pg_lzcompress.c b/src/backend/utils/adt/pg_lzcompress.c index 7a97791c71..735c16a82a 100644 --- a/src/backend/utils/adt/pg_lzcompress.c +++ b/src/backend/utils/adt/pg_lzcompress.c @@ -175,7 +175,6 @@ #include <unistd.h> #include <fcntl.h> -#include <errno.h> #include "utils/pg_lzcompress.h" diff --git a/src/backend/utils/adt/tid.c b/src/backend/utils/adt/tid.c index 6b83dbe284..fe2ee2f44b 100644 --- a/src/backend/utils/adt/tid.c +++ b/src/backend/utils/adt/tid.c @@ -17,7 +17,6 @@ */ #include "postgres.h" -#include <errno.h> #include <math.h> #include <limits.h> diff --git a/src/bin/psql/help.c b/src/bin/psql/help.c index cbf8162951..ff1e1e533c 100644 --- a/src/bin/psql/help.c +++ b/src/bin/psql/help.c @@ -12,7 +12,6 @@ #include "help.h" #include <signal.h> -#include <errno.h> #ifndef WIN32 #ifdef HAVE_PWD_H diff --git a/src/bin/psql/mainloop.h b/src/bin/psql/mainloop.h index 45dd656de8..6decc523ec 100644 --- a/src/bin/psql/mainloop.h +++ b/src/bin/psql/mainloop.h @@ -9,7 +9,6 @@ #define MAINLOOP_H #include "postgres_fe.h" -#include <stdio.h> int MainLoop(FILE *source); diff --git a/src/interfaces/ecpg/ecpglib/error.c b/src/interfaces/ecpg/ecpglib/error.c index 94bbe0658f..1bbb0f56a6 100644 --- a/src/interfaces/ecpg/ecpglib/error.c +++ b/src/interfaces/ecpg/ecpglib/error.c @@ -3,8 +3,6 @@ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" -#include <stdio.h> - #include "ecpgerrno.h" #include "ecpgtype.h" #include "ecpglib.h" diff --git a/src/interfaces/ecpg/ecpglib/execute.c b/src/interfaces/ecpg/ecpglib/execute.c index 723dba0846..066d1f08da 100644 --- a/src/interfaces/ecpg/ecpglib/execute.c +++ b/src/interfaces/ecpg/ecpglib/execute.c @@ -16,7 +16,6 @@ #define POSTGRES_ECPG_INTERNAL #include "postgres_fe.h" -#include <stdio.h> #include <locale.h> #include "pg_type.h" diff --git a/src/interfaces/ecpg/preproc/pgc.l b/src/interfaces/ecpg/preproc/pgc.l index 043987d6fb..d1ee370f96 100644 --- a/src/interfaces/ecpg/preproc/pgc.l +++ b/src/interfaces/ecpg/preproc/pgc.l @@ -21,7 +21,6 @@ #include <ctype.h> #include <sys/types.h> #include <limits.h> -#include <errno.h> #include "extern.h" diff --git a/src/interfaces/libpq/fe-misc.c b/src/interfaces/libpq/fe-misc.c index c65a805e6b..840407de9e 100644 --- a/src/interfaces/libpq/fe-misc.c +++ b/src/interfaces/libpq/fe-misc.c @@ -30,7 +30,6 @@ #include "postgres_fe.h" -#include <errno.h> #include <signal.h> #include <time.h> diff --git a/src/interfaces/libpq/fe-protocol2.c b/src/interfaces/libpq/fe-protocol2.c index 780db0f6e3..8810080ad2 100644 --- a/src/interfaces/libpq/fe-protocol2.c +++ b/src/interfaces/libpq/fe-protocol2.c @@ -14,7 +14,6 @@ */ #include "postgres_fe.h" -#include <errno.h> #include <ctype.h> #include <fcntl.h> diff --git a/src/timezone/pgtz.c b/src/timezone/pgtz.c index 69c34db482..ca8640eab0 100644 --- a/src/timezone/pgtz.c +++ b/src/timezone/pgtz.c @@ -24,7 +24,6 @@ #include "storage/fd.h" #include "tzfile.h" #include "utils/datetime.h" -#include "utils/elog.h" #include "utils/guc.h" #include "utils/hsearch.h" |