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

Commitbea4792

Browse files
committed
This patch removes a bunch of superfluous #include directives: if
postgres.h or c.h includes a system header (such as stdio.h orstdlib.h), there's no need to specifically include it in any of the .cfiles in the backend.Neil Conway
1 parenta5715ee commitbea4792

File tree

24 files changed

+18
-54
lines changed

24 files changed

+18
-54
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
88
* Portions Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.109 2002/11/02 15:54:12 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.110 2002/11/08 20:23:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -21,7 +21,6 @@
2121
#include<sys/stat.h>
2222
#include<sys/time.h>
2323
#include<dirent.h>
24-
#include<locale.h>
2524

2625
#include"access/clog.h"
2726
#include"access/transam.h"

‎src/backend/main/main.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
*
1414
*
1515
* IDENTIFICATION
16-
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.55 2002/10/31 22:37:19 tgl Exp $
16+
* $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.56 2002/11/08 20:23:56 momjian Exp $
1717
*
1818
*-------------------------------------------------------------------------
1919
*/
@@ -22,7 +22,6 @@
2222
#include<errno.h>
2323
#include<pwd.h>
2424
#include<unistd.h>
25-
#include<locale.h>
2625

2726
#if defined(__alpha)&& defined(__osf__)
2827
#include<sys/sysinfo.h>

‎src/backend/port/beos/sem.c

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

1111

1212
#include"postgres.h"
13-
#include<stdio.h>
1413
#include<errno.h>
1514
#include<unistd.h>
1615
#include<OS.h>

‎src/backend/port/beos/shm.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
*/
1010

1111
#include"postgres.h"
12-
#include<stdio.h>
1312
#include<OS.h>
1413
#include<errno.h>
1514

‎src/backend/port/darwin/system.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,8 @@
3737
staticcharsccsid[]="@(#)system.c8.1 (Berkeley) 6/4/93";
3838
#endif/* LIBC_SCCS and not lint */
3939

40-
#include<sys/types.h>
4140
#include<sys/wait.h>
4241
#include<signal.h>
43-
#include<stdlib.h>
44-
#include<stddef.h>
4542
#include<unistd.h>
4643
#include<paths.h>
4744
#include<errno.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<stdio.h>
109
#include<errno.h>
1110
#include"sys/ldr.h"
1211
#include<a.out.h>

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@ static char sccsid[] = "@(#)dl.c5.4 (Berkeley) 2/23/91";
4343
#include<link.h>
4444
#include<dlfcn.h>
4545

46-
#include<stdio.h>
47-
#include<stdlib.h>
48-
4946
staticcharerror_message[BUFSIZ];
5047

5148
char*

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ static char sccsid[] = "@(#)dl.c5.4 (Berkeley) 2/23/91";
4242
#include<link.h>
4343
#include<dlfcn.h>
4444

45-
#include<stdio.h>
46-
#include<stdlib.h>
47-
4845
#include"dynloader.h"
4946

5047
staticcharerror_message[BUFSIZ];

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
#include"mach-o/rld.h"
44
#include"streams/streams.h"
55

6-
#include<stdlib.h>
7-
86
staticchar*lastError=NULL;
97

108
staticNXStream*

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,6 @@ static char sccsid[] = "@(#)dl.c5.4 (Berkeley) 2/23/91";
4242
#include<link.h>
4343
#include<dlfcn.h>
4444

45-
#include<stdio.h>
46-
#include<stdlib.h>
47-
4845
#include"dynloader.h"
4946

5047
staticcharerror_message[BUFSIZ];

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

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,20 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.3 2001/02/10 02:31:26 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.4 2002/11/08 20:23:56 momjian Exp $
1111
*
1212
*NOTES
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
1616
/* System includes */
17+
18+
#include"postgres.h"
19+
1720
/*
18-
#include <stdio.h>
1921
#include <a.out.h>
2022
#include <dl.h>
2123
*/
22-
#include"postgres.h"
2324

2425
#include"utils/dynamic_loader.h"
2526
#include"dynloader.h"

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
/*-------------------------------------------------------------------------
22
*
3-
*dynloader.c
3+
*ultrix4.c
44
* This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
55
*
66
* Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.15 2002/06/20 20:29:33 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.16 2002/11/08 20:23:56 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/

‎src/backend/port/qnx4/sem.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.10 2002/09/02 02:47:03 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.11 2002/11/08 20:23:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -16,7 +16,6 @@
1616

1717
#include<errno.h>
1818
#include<semaphore.h>
19-
#include<string.h>
2019
#include<unistd.h>
2120
#include<fcntl.h>
2221
#include<sys/mman.h>

‎src/backend/port/qnx4/shm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.7 2001/10/25 05:49:40 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.8 2002/11/08 20:23:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -16,8 +16,6 @@
1616

1717
#include<errno.h>
1818
#include<fcntl.h>
19-
#include<stdlib.h>
20-
#include<string.h>
2119
#include<unistd.h>
2220
#include<sys/mman.h>
2321
#include<sys/shm.h>

‎src/backend/port/qnx4/tstrint.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.3 2001/08/24 14:07:49 petere Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.4 2002/11/08 20:23:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include"c.h"
1616

1717
#include<errno.h>
18-
#include<stdio.h>
19-
#include<stdlib.h>
2018

2119

2220
int

‎src/backend/port/qnx4/tstsem.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,14 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.8 2002/09/04 20:31:24 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.9 2002/11/08 20:23:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include"postgres.h"
1616

1717
#include<signal.h>
18-
#include<stdio.h>
19-
#include<stdlib.h>
2018
#include<unistd.h>
2119
#include"storage/ipc.h"
2220
#include<sys/mman.h>

‎src/backend/port/qnx4/tstshm.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.3 2001/08/24 14:07:49 petere Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.4 2002/11/08 20:23:56 momjian Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
1414

1515
#include"postgres.h"
1616

17-
#include<stdio.h>
18-
#include<stdlib.h>
1917
#include<unistd.h>
2018
#include<sys/shm.h>
2119

‎src/backend/regex/regcomp.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
#include"regex/utils.h"
4848
#include"regex/regex2.h"
4949
#include"regex/cname.h"
50-
#include<locale.h>
5150

5251
structcclass
5352
{

‎src/backend/regex/regexec.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
* macros that code uses. This lets the same code operate on two different
4747
* representations for state sets.
4848
*/
49-
#include<sys/types.h>
5049
#include<limits.h>
5150
#include<ctype.h>
5251
#include<assert.h>

‎src/backend/utils/adt/formatting.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* -----------------------------------------------------------------------
22
* formatting.c
33
*
4-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.56 2002/09/20 03:57:09 momjian Exp $
4+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.57 2002/11/08 20:23:56 momjian Exp $
55
*
66
*
77
* Portions Copyright (c) 1999-2002, PostgreSQL Global Development Group
@@ -72,7 +72,6 @@
7272
#include<ctype.h>
7373
#include<sys/time.h>
7474
#include<unistd.h>
75-
#include<locale.h>
7675
#include<math.h>
7776
#include<float.h>
7877

‎src/backend/utils/adt/selfuncs.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
*
1717
* IDENTIFICATION
18-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.119 2002/10/19 02:56:16 tgl Exp $
18+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.120 2002/11/08 20:23:57 momjian Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -70,7 +70,6 @@
7070

7171
#include<ctype.h>
7272
#include<math.h>
73-
#include<locale.h>
7473

7574
#include"access/heapam.h"
7675
#include"access/tuptoaster.h"

‎src/backend/utils/init/miscinit.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.96 2002/09/04 20:31:31 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.97 2002/11/08 20:23:57 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -22,7 +22,6 @@
2222
#include<unistd.h>
2323
#include<grp.h>
2424
#include<pwd.h>
25-
#include<stdlib.h>
2625
#include<errno.h>
2726
#include<netinet/in.h>
2827
#include<arpa/inet.h>

‎src/backend/utils/misc/database.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,13 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.53 2002/09/04 20:31:32 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.54 2002/11/08 20:23:57 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
1515
#include"postgres.h"
1616

1717
#include<fcntl.h>
18-
#include<stdlib.h>
19-
#include<string.h>
2018
#include<unistd.h>
2119

2220
#include"access/xact.h"

‎src/backend/utils/misc/guc-file.l

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@
44
*
55
* Copyright 2000 by PostgreSQL Global Development Group
66
*
7-
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.13 2002/07/30 16:33:08 tgl Exp $
7+
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.14 2002/11/08 20:23:57 momjian Exp $
88
*/
99

1010
%{
1111

1212
#include"postgres.h"
1313

14-
#include<string.h>
15-
#include<stdarg.h>
1614
#include<sys/stat.h>
1715
#include<unistd.h>
1816
#include<errno.h>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp