Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae64374

Browse files
committed
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.
1 parent51e8882 commitae64374

File tree

40 files changed

+48
-93
lines changed

40 files changed

+48
-93
lines changed

‎contrib/btree_gist/btree_numeric.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1+
#include"btree_gist.h"
2+
13
#include<math.h>
24
#include<float.h>
35

4-
#include"btree_gist.h"
56
#include"btree_utils_var.h"
67
#include"utils/builtins.h"
78
#include"utils/numeric.h"

‎contrib/btree_gist/btree_utils_num.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#ifndef__BTREE_UTILS_NUM_H__
22
#define__BTREE_UTILS_NUM_H__
33

4+
#include"btree_gist.h"
5+
46
#include<math.h>
57
#include<float.h>
68

7-
#include"btree_gist.h"
8-
99
typedefcharGBT_NUMKEY;
1010

1111
/* Better readable key */

‎contrib/btree_gist/btree_utils_var.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
#include"btree_gist.h"
2+
13
#include<math.h>
24
#include<limits.h>
35
#include<float.h>
46

5-
#include"btree_gist.h"
67
#include"btree_utils_var.h"
78
#include"utils/pg_locale.h"
89
#include"utils/builtins.h"

‎contrib/btree_gist/btree_utils_var.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#ifndef__BTREE_UTILS_VAR_H__
22
#define__BTREE_UTILS_VAR_H__
33

4-
#include"mb/pg_wchar.h"
5-
64
#include"btree_gist.h"
75

6+
#include"mb/pg_wchar.h"
7+
88
/* Variable length key */
99
typedefbyteaGBT_VARKEY;
1010

‎contrib/chkpass/chkpass.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,12 @@
44
* darcy@druid.net
55
* http://www.druid.net/darcy/
66
*
7-
* $PostgreSQL: pgsql/contrib/chkpass/chkpass.c,v 1.16 2006/05/30 22:12:12 tgl Exp $
7+
* $PostgreSQL: pgsql/contrib/chkpass/chkpass.c,v 1.17 2006/07/14 05:28:27 tgl Exp $
88
* best viewed with tabs set to 4
99
*/
1010

1111
#include"postgres.h"
1212

13-
#include<stdio.h>
14-
#include<string.h>
1513
#include<time.h>
1614
#include<unistd.h>
1715
#ifdefHAVE_CRYPT_H

‎contrib/fuzzystrmatch/dmetaphone.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*
22
* This is a port of the Double Metaphone algorithm for use in PostgreSQL.
33
*
4-
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/dmetaphone.c,v 1.7 2006/03/11 04:38:29 momjian Exp $
4+
* $PostgreSQL: pgsql/contrib/fuzzystrmatch/dmetaphone.c,v 1.8 2006/07/14 05:28:27 tgl Exp $
55
*
66
* Double Metaphone computes 2 "sounds like" strings - a primary and an
77
* alternate. In most cases they are the same, but for foreign names
@@ -50,8 +50,8 @@
5050

5151

5252
/*
53-
* $Revision: 1.7 $
54-
* $Id: dmetaphone.c,v 1.7 2006/03/11 04:38:29 momjian Exp $
53+
* $Revision: 1.8 $
54+
* $Id: dmetaphone.c,v 1.8 2006/07/14 05:28:27 tgl Exp $
5555
*/
5656

5757

@@ -106,8 +106,8 @@ The remaining code is authored by Andrew Dunstan <amdunstan@ncshp.org> and
106106
#ifndefDMETAPHONE_MAIN
107107

108108
#include"postgres.h"
109+
109110
#include"fmgr.h"
110-
#include"utils/elog.h"
111111

112112
/* turn off assertions for embedded function */
113113
#defineNDEBUG

‎contrib/pg_trgm/trgm.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include"access/gist.h"
77
#include"access/itup.h"
88
#include"utils/builtins.h"
9-
#include"utils/elog.h"
10-
#include"utils/palloc.h"
119
#include"storage/bufpage.h"
1210

1311
/* options */

‎contrib/tsearch2/common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#include"postgres.h"
22

3-
#include"postgres.h"
43
#include"fmgr.h"
54
#include"catalog/pg_namespace.h"
65
#include"catalog/pg_proc.h"

‎contrib/tsearch2/gendict/dict_snowball.c.IN

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
/* $PostgreSQL: pgsql/contrib/tsearch2/gendict/dict_snowball.c.IN,v 1.4 2006/03/11 04:38:30 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/tsearch2/gendict/dict_snowball.c.IN,v 1.5 2006/07/14 05:28:27 tgl Exp $ */
22

33
/*
44
* example of Snowball dictionary
55
* http://snowball.tartarus.org/
66
* Teodor Sigaev <teodor@sigaev.ru>
77
*/
8-
#include <stdlib.h>
9-
#include <string.h>
10-
118
#include "postgres.h"
129

1310
#include "dict.h"

‎contrib/tsearch2/gendict/dict_tmpl.c.IN

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
/* $PostgreSQL: pgsql/contrib/tsearch2/gendict/dict_tmpl.c.IN,v 1.5 2006/03/11 04:38:30 momjian Exp $ */
1+
/* $PostgreSQL: pgsql/contrib/tsearch2/gendict/dict_tmpl.c.IN,v 1.6 2006/07/14 05:28:27 tgl Exp $ */
22

33
/*
44
* example of dictionary
55
* Teodor Sigaev <teodor@sigaev.ru>
66
*/
7-
#include <errno.h>
8-
#include <stdlib.h>
9-
#include <string.h>
10-
117
#include "postgres.h"
128

139
#include "dict.h"

‎contrib/tsearch2/ispell/regis.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
#include<stdio.h>
2-
#include<stdlib.h>
3-
#include<string.h>
4-
51
#include"regis.h"
62
#include"ts_locale.h"
73
#include"common.h"

‎contrib/tsearch2/ispell/spell.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
#include<stdio.h>
2-
#include<stdlib.h>
3-
#include<string.h>
4-
#include<ctype.h>
5-
61
#include"postgres.h"
72

3+
#include<ctype.h>
4+
85
#include"spell.h"
96
#include"common.h"
107
#include"ts_locale.h"

‎contrib/tsearch2/ispell/spell.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
#ifndef__SPELL_H__
22
#define__SPELL_H__
33

4+
#include"c.h"
5+
46
#include<sys/types.h>
7+
58
#include"regex/regex.h"
6-
#include"c.h"
79

810
#include"regis.h"
911
#include"dict.h"

‎src/backend/executor/nodeSubplan.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/executor/nodeSubplan.c,v 1.77 2006/07/13 16:49:15 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/executor/nodeSubplan.c,v 1.78 2006/07/14 05:28:27 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -17,10 +17,10 @@
1717
*ExecInitSubPlan - initialize a subselect
1818
*ExecEndSubPlan- shut down a subselect
1919
*/
20-
#include<math.h>
21-
2220
#include"postgres.h"
2321

22+
#include<math.h>
23+
2424
#include"access/heapam.h"
2525
#include"executor/executor.h"
2626
#include"executor/nodeSubplan.h"

‎src/backend/libpq/auth.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.137 2006/07/13 16:49:15 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.138 2006/07/14 05:28:27 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -20,7 +20,6 @@
2020
#if defined(HAVE_STRUCT_CMSGCRED)|| defined(HAVE_STRUCT_FCRED)|| defined(HAVE_STRUCT_SOCKCRED)
2121
#include<sys/uio.h>
2222
#include<sys/ucred.h>
23-
#include<errno.h>
2423
#endif
2524
#include<netinet/in.h>
2625
#include<arpa/inet.h>

‎src/backend/libpq/pqcomm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
3131
* Portions Copyright (c) 1994, Regents of the University of California
3232
*
33-
*$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.185 2006/07/13 16:49:15 momjian Exp $
33+
*$PostgreSQL: pgsql/src/backend/libpq/pqcomm.c,v 1.186 2006/07/14 05:28:27 tgl Exp $
3434
*
3535
*-------------------------------------------------------------------------
3636
*/
@@ -66,7 +66,6 @@
6666
#include"postgres.h"
6767

6868
#include<signal.h>
69-
#include<errno.h>
7069
#include<fcntl.h>
7170
#include<grp.h>
7271
#include<unistd.h>

‎src/backend/libpq/pqformat.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
2525
* Portions Copyright (c) 1994, Regents of the University of California
2626
*
27-
*$PostgreSQL: pgsql/src/backend/libpq/pqformat.c,v 1.41 2006/03/05 15:58:27momjian Exp $
27+
*$PostgreSQL: pgsql/src/backend/libpq/pqformat.c,v 1.42 2006/07/14 05:28:27tgl Exp $
2828
*
2929
*-------------------------------------------------------------------------
3030
*/
@@ -69,7 +69,6 @@
6969

7070
#include"postgres.h"
7171

72-
#include<errno.h>
7372
#include<sys/param.h>
7473
#include<netinet/in.h>
7574
#include<arpa/inet.h>

‎src/backend/port/dynloader/aix.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
#include"postgres.h"
88

9-
#include<errno.h>
109
#include"sys/ldr.h"
1110
#include<a.out.h>
1211
#include"ldfcn.h"

‎src/backend/port/ipc_test.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@
2121
*
2222
*
2323
* IDENTIFICATION
24-
* $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.20 2006/03/05 15:58:34 momjian Exp $
24+
* $PostgreSQL: pgsql/src/backend/port/ipc_test.c,v 1.21 2006/07/14 05:28:28 tgl Exp $
2525
*
2626
*-------------------------------------------------------------------------
2727
*/
2828
#include"postgres.h"
2929

30-
#include<errno.h>
3130
#include<unistd.h>
3231

3332
#include"miscadmin.h"

‎src/backend/port/posix_sema.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,12 @@
1111
* Portions Copyright (c) 1994, Regents of the University of California
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/port/posix_sema.c,v 1.16 2006/03/05 15:58:35 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/port/posix_sema.c,v 1.17 2006/07/14 05:28:27 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
1818
#include"postgres.h"
1919

20-
#include<errno.h>
2120
#include<fcntl.h>
2221
#include<signal.h>
2322
#include<unistd.h>

‎src/backend/port/sysv_sema.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/port/sysv_sema.c,v 1.19 2006/03/05 15:58:35 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/port/sysv_sema.c,v 1.20 2006/07/14 05:28:28 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include"postgres.h"
1616

17-
#include<errno.h>
1817
#include<signal.h>
1918
#include<unistd.h>
2019
#include<sys/file.h>

‎src/backend/port/sysv_shmem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,12 @@
1010
* Portions Copyright (c) 1994, Regents of the University of California
1111
*
1212
* IDENTIFICATION
13-
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.46 2006/03/05 15:58:35 momjian Exp $
13+
* $PostgreSQL: pgsql/src/backend/port/sysv_shmem.c,v 1.47 2006/07/14 05:28:28 tgl Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
1717
#include"postgres.h"
1818

19-
#include<errno.h>
2019
#include<signal.h>
2120
#include<unistd.h>
2221
#include<sys/file.h>

‎src/backend/port/win32/shmem.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,13 @@
66
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
77
*
88
* IDENTIFICATION
9-
* $PostgreSQL: pgsql/src/backend/port/win32/shmem.c,v 1.12 2006/03/05 15:58:35 momjian Exp $
9+
* $PostgreSQL: pgsql/src/backend/port/win32/shmem.c,v 1.13 2006/07/14 05:28:28 tgl Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
1313

1414
#include"postgres.h"
1515

16-
#include<stdio.h>
17-
#include<errno.h>
18-
1916
staticDWORDs_segsize=0;
2017

2118
/* Detach from a shared mem area based on its address */

‎src/backend/storage/file/buffile.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
* IDENTIFICATION
10-
* $PostgreSQL: pgsql/src/backend/storage/file/buffile.c,v 1.23 2006/03/05 15:58:37 momjian Exp $
10+
* $PostgreSQL: pgsql/src/backend/storage/file/buffile.c,v 1.24 2006/07/14 05:28:28 tgl Exp $
1111
*
1212
* NOTES:
1313
*
@@ -34,8 +34,6 @@
3434

3535
#include"postgres.h"
3636

37-
#include<errno.h>
38-
3937
#include"storage/fd.h"
4038
#include"storage/buffile.h"
4139

‎src/backend/storage/freespace/freespace.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.52 2006/03/05 15:58:37 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/freespace/freespace.c,v 1.53 2006/07/14 05:28:28 tgl Exp $
1212
*
1313
*
1414
* NOTES:
@@ -58,7 +58,6 @@
5858
*/
5959
#include"postgres.h"
6060

61-
#include<errno.h>
6261
#include<limits.h>
6362
#include<math.h>
6463
#include<unistd.h>

‎src/backend/storage/ipc/ipc.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.93 2006/03/05 15:58:37 momjian Exp $
16+
* $PostgreSQL: pgsql/src/backend/storage/ipc/ipc.c,v 1.94 2006/07/14 05:28:28 tgl Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
2020
#include"postgres.h"
2121

22-
#include<errno.h>
2322
#include<signal.h>
2423
#include<unistd.h>
2524

‎src/backend/storage/smgr/md.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.120 2006/03/05 15:58:39 momjian Exp $
11+
* $PostgreSQL: pgsql/src/backend/storage/smgr/md.c,v 1.121 2006/07/14 05:28:28 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include"postgres.h"
1616

17-
#include<errno.h>
1817
#include<unistd.h>
1918
#include<fcntl.h>
2019
#include<sys/file.h>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp