]> granicus.if.org Git - postgresql/commitdiff
This patch removes a bunch of superfluous #include directives: if
authorBruce Momjian <bruce@momjian.us>
Fri, 8 Nov 2002 20:23:57 +0000 (20:23 +0000)
committerBruce Momjian <bruce@momjian.us>
Fri, 8 Nov 2002 20:23:57 +0000 (20:23 +0000)
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

24 files changed:
src/backend/access/transam/xlog.c
src/backend/main/main.c
src/backend/port/beos/sem.c
src/backend/port/beos/shm.c
src/backend/port/darwin/system.c
src/backend/port/dynloader/aix.c
src/backend/port/dynloader/freebsd.c
src/backend/port/dynloader/netbsd.c
src/backend/port/dynloader/nextstep.c
src/backend/port/dynloader/openbsd.c
src/backend/port/dynloader/qnx4.c
src/backend/port/dynloader/ultrix4.c
src/backend/port/qnx4/sem.c
src/backend/port/qnx4/shm.c
src/backend/port/qnx4/tstrint.c
src/backend/port/qnx4/tstsem.c
src/backend/port/qnx4/tstshm.c
src/backend/regex/regcomp.c
src/backend/regex/regexec.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/init/miscinit.c
src/backend/utils/misc/database.c
src/backend/utils/misc/guc-file.l

index 6152ab88c1bb8b7107b3f2fa358a5d103af37fb2..a78533c3890730d78c8f8cab82b5a0de61d6342c 100644 (file)
@@ -7,7 +7,7 @@
  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
  * Portions Copyright (c) 1994, Regents of the University of California
  *
- * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.109 2002/11/02 15:54:12 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/access/transam/xlog.c,v 1.110 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -21,7 +21,6 @@
 #include <sys/stat.h>
 #include <sys/time.h>
 #include <dirent.h>
-#include <locale.h>
 
 #include "access/clog.h"
 #include "access/transam.h"
index 163d57d0df2bb84ba13c2b5a768b4cc06aa427d3..8f69e0a693a2aacdd0abbf1060384e07680e5cd1 100644 (file)
@@ -13,7 +13,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.55 2002/10/31 22:37:19 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.56 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,7 +22,6 @@
 #include <errno.h>
 #include <pwd.h>
 #include <unistd.h>
-#include <locale.h>
 
 #if defined(__alpha) && defined(__osf__)
 #include <sys/sysinfo.h>
index 6609f1dde007d921617d5cc75e64479f5a6104e9..f1d2c1c63fc912abfb9883d925715700a0c8461f 100644 (file)
@@ -10,7 +10,6 @@
 
 
 #include "postgres.h"
-#include <stdio.h>
 #include <errno.h>
 #include <unistd.h>
 #include <OS.h>
index 7903ce74ad97090c40842f8e8dd216cc15172f35..94da461ea2ce504d58e56b54ef94ad9c449dedff 100644 (file)
@@ -9,7 +9,6 @@
  */
 
 #include "postgres.h"
-#include <stdio.h>
 #include <OS.h>
 #include <errno.h>
 
index f66782eb36393d51debae2c56639e7f5ebc68c8d..a0c0801f2ab3da0498d32fcd69fe8344e45c4b47 100644 (file)
 static char sccsid[] = "@(#)system.c   8.1 (Berkeley) 6/4/93";
 #endif   /* LIBC_SCCS and not lint */
 
-#include <sys/types.h>
 #include <sys/wait.h>
 #include <signal.h>
-#include <stdlib.h>
-#include <stddef.h>
 #include <unistd.h>
 #include <paths.h>
 #include <errno.h>
index 97a916d8a3014e80d75f9f81a03b6c2daa59ab0e..a5d355c2cc263fbfce16eca778e6e445a1914c86 100644 (file)
@@ -6,7 +6,6 @@
 
 #include "postgres.h"
 
-#include <stdio.h>
 #include <errno.h>
 #include "sys/ldr.h"
 #include <a.out.h>
index 763749fa450147b288b9b8b58557e2cbf9e34875..9ad2cde2049ba659ac288e8592b693f98631c44f 100644 (file)
@@ -43,9 +43,6 @@ static char sccsid[] = "@(#)dl.c      5.4 (Berkeley) 2/23/91";
 #include <link.h>
 #include <dlfcn.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-
 static char error_message[BUFSIZ];
 
 char *
index 2202b6847b4f012f093a77b90d82473130672546..3c950baddc0f4ca2b8db4e38aaa5d407729a4ebc 100644 (file)
@@ -42,9 +42,6 @@ static char sccsid[] = "@(#)dl.c      5.4 (Berkeley) 2/23/91";
 #include <link.h>
 #include <dlfcn.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "dynloader.h"
 
 static char error_message[BUFSIZ];
index a96b394cda658e732df0c17dd4da72a62a6cb493..09b317daf97ea07df2b29d184fcb6df1045d938a 100644 (file)
@@ -3,8 +3,6 @@
 #include "mach-o/rld.h"
 #include "streams/streams.h"
 
-#include <stdlib.h>
-
 static char *lastError = NULL;
 
 static NXStream *
index 2202b6847b4f012f093a77b90d82473130672546..3c950baddc0f4ca2b8db4e38aaa5d407729a4ebc 100644 (file)
@@ -42,9 +42,6 @@ static char sccsid[] = "@(#)dl.c      5.4 (Berkeley) 2/23/91";
 #include <link.h>
 #include <dlfcn.h>
 
-#include <stdio.h>
-#include <stdlib.h>
-
 #include "dynloader.h"
 
 static char error_message[BUFSIZ];
index 6e6ca0437a70b45a8508078c26bdd8b25ad8c12c..7df4554e1479b2d90adc48165b72e53e6a6d24a3 100644 (file)
@@ -7,19 +7,20 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.3 2001/02/10 02:31:26 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/Attic/qnx4.c,v 1.4 2002/11/08 20:23:56 momjian Exp $
  *
  *     NOTES
  *
  *-------------------------------------------------------------------------
  */
 /* System includes */
+
+#include "postgres.h"
+
 /*
-#include <stdio.h>
 #include <a.out.h>
 #include <dl.h>
 */
-#include "postgres.h"
 
 #include "utils/dynamic_loader.h"
 #include "dynloader.h"
index ca637477a8b0f026fb741520b454957bb2a8c64b..770f3306a02a5b270fd4a5098dd28be50ffc19ef 100644 (file)
@@ -1,6 +1,6 @@
 /*-------------------------------------------------------------------------
  *
- * dynloader.c
+ * ultrix4.c
  *       This dynamic loader uses Andrew Yu's libdl-1.0 package for Ultrix 4.x.
  *
  * Portions Copyright (c) 1996-2002, PostgreSQL Global Development Group
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.15 2002/06/20 20:29:33 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.16 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
index b3b782be8ce6da25ca57114f7f58d1e9f389eff9..da9aa5510328c408c5e66988eb66202c92dfa82c 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.10 2002/09/02 02:47:03 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/sem.c,v 1.11 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -16,7 +16,6 @@
 
 #include <errno.h>
 #include <semaphore.h>
-#include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/mman.h>
index cf42be4d85e55223f6222f10f2c0f88738dc30a4..f3095f5956387d47262d4e07ccc53b2cd6b648a8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.7 2001/10/25 05:49:40 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/shm.c,v 1.8 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -16,8 +16,6 @@
 
 #include <errno.h>
 #include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
 #include <unistd.h>
 #include <sys/mman.h>
 #include <sys/shm.h>
index 5586edb6787af9e74ee61993337a2bc0aab42a67..895817fb6f3d248cc9db74ca25616f760d2bae3a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.3 2001/08/24 14:07:49 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstrint.c,v 1.4 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -15,8 +15,6 @@
 #include "c.h"
 
 #include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
 
 
 int
index ebc6abe7d08473dd19ee4bc373a9750916f4d11b..3834174a1425203aec0dfea4bd53cfa9c2aaeea4 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.8 2002/09/04 20:31:24 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstsem.c,v 1.9 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -15,8 +15,6 @@
 #include "postgres.h"
 
 #include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include "storage/ipc.h"
 #include <sys/mman.h>
index 0fd8226faadeb3eaa6fe954e0c807cd36f7ec47c..73ac5ce3016a8d23a1c2b5ed878c3a12a5a29970 100644 (file)
@@ -7,15 +7,13 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.3 2001/08/24 14:07:49 petere Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/qnx4/Attic/tstshm.c,v 1.4 2002/11/08 20:23:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres.h"
 
-#include <stdio.h>
-#include <stdlib.h>
 #include <unistd.h>
 #include <sys/shm.h>
 
index 71e69dea618177e3a152e3e9a2386151b26ff97e..fdc299bf797ade123f049b9433df4a24e3e77787 100644 (file)
@@ -47,7 +47,6 @@
 #include "regex/utils.h"
 #include "regex/regex2.h"
 #include "regex/cname.h"
-#include <locale.h>
 
 struct cclass
 {
index 59c9ede9f7cfdc729d538ae498876204d4e5c705..41ff00fa69998885d8f7dc201a7060f7458401cd 100644 (file)
@@ -46,7 +46,6 @@
  * macros that code uses.  This lets the same code operate on two different
  * representations for state sets.
  */
-#include <sys/types.h>
 #include <limits.h>
 #include <ctype.h>
 #include <assert.h>
index 9c2336e8e2c5a091589b06808341beb573809fb9..bebccbdfdc644ef3a14dc4a6fd586858cdfacdae 100644 (file)
@@ -1,7 +1,7 @@
 /* -----------------------------------------------------------------------
  * formatting.c
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.56 2002/09/20 03:57:09 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/formatting.c,v 1.57 2002/11/08 20:23:56 momjian Exp $
  *
  *
  *      Portions Copyright (c) 1999-2002, PostgreSQL Global Development Group
@@ -72,7 +72,6 @@
 #include <ctype.h>
 #include <sys/time.h>
 #include <unistd.h>
-#include <locale.h>
 #include <math.h>
 #include <float.h>
 
index 211ccbf87bd397fed882d572b91bf216db151135..936b9ad99c04751e94e25f691df309b3003588dd 100644 (file)
@@ -15,7 +15,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.119 2002/10/19 02:56:16 tgl Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.120 2002/11/08 20:23:57 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -70,7 +70,6 @@
 
 #include <ctype.h>
 #include <math.h>
-#include <locale.h>
 
 #include "access/heapam.h"
 #include "access/tuptoaster.h"
index f41706862fa0ae435fadf71cb61949c5a0be3e68..d7d7e8008fdbcc19ed976c80184b5dbeac3cef8d 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.96 2002/09/04 20:31:31 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/init/miscinit.c,v 1.97 2002/11/08 20:23:57 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -22,7 +22,6 @@
 #include <unistd.h>
 #include <grp.h>
 #include <pwd.h>
-#include <stdlib.h>
 #include <errno.h>
 #include <netinet/in.h>
 #include <arpa/inet.h>
index 3769f350fd46dcdecd7cfff4fd7ff31ba2607dce..8cf5879922822e49929cb9e8a54c15f20c13db67 100644 (file)
@@ -8,15 +8,13 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.53 2002/09/04 20:31:32 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.54 2002/11/08 20:23:57 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
 #include "postgres.h"
 
 #include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
 #include <unistd.h>
 
 #include "access/xact.h"
index 48658a3cb2ca58e8f2ee105cf7cc7be54c5c2237..6245fde2d3d2c3be2a581bc9bbafea0f9d500e52 100644 (file)
@@ -4,15 +4,13 @@
  *
  * Copyright 2000 by PostgreSQL Global Development Group
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.13 2002/07/30 16:33:08 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/misc/guc-file.l,v 1.14 2002/11/08 20:23:57 momjian Exp $
  */
 
 %{
 
 #include "postgres.h"
 
-#include <string.h>
-#include <stdarg.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>