Skip to content

Commit bea4792

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 or stdlib.h), there's no need to specifically include it in any of the .c files in the backend. Neil Conway
1 parent a5715ee commit bea4792

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
static char sccsid[] = "@(#)system.c 8.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.c 5.4 (Berkeley) 2/23/91";
4343
#include <link.h>
4444
#include <dlfcn.h>
4545

46-
#include <stdio.h>
47-
#include <stdlib.h>
48-
4946
static char error_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.c 5.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
static char error_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
static char *lastError = NULL;
97

108
static NXStream *

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.c 5.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
static char error_message[BUFSIZ];

0 commit comments

Comments
 (0)