]> granicus.if.org Git - postgresql/commitdiff
Fix inclusions of postgres_fe.h from .h files.
authorTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Mar 2017 01:41:06 +0000 (20:41 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Thu, 9 Mar 2017 01:41:06 +0000 (20:41 -0500)
We have a project policy that every .c file should start by including
postgres.h, postgres_fe.h, or c.h as appropriate; and then there is no
need for any .h file to explicitly include any of these.  Fix a few
headers that were violating this policy by including postgres_fe.h.

Discussion: https://postgr.es/m/CAEepm=2zCoeq3QxVwhS5DFeUh=yU6z81pbWMgfOB8OzyiBwxzw@mail.gmail.com
Discussion: https://postgr.es/m/11634.1488932128@sss.pgh.pa.us

src/interfaces/ecpg/ecpglib/extern.h
src/interfaces/ecpg/test/pg_regress_ecpg.c
src/interfaces/libpq/libpq-int.h
src/test/isolation/isolation_main.c
src/test/regress/pg_regress.c
src/test/regress/pg_regress.h
src/test/regress/pg_regress_main.c

index c3082beb4a3abfea2f8fec4f16577888c7427a7a..fb9b5aebbe7f18c010a0839e18660574e4a18f38 100644 (file)
@@ -3,12 +3,12 @@
 #ifndef _ECPG_LIB_EXTERN_H
 #define _ECPG_LIB_EXTERN_H
 
-#include "postgres_fe.h"
 #include "libpq-fe.h"
 #include "sqlca.h"
 #include "sqlda-native.h"
 #include "sqlda-compat.h"
 #include "ecpg_config.h"
+
 #ifndef CHAR_BIT
 #include <limits.h>
 #endif
index b3ff76c44692468da4f1f1ebf8bdb50892564740..b6ecb618e6987cc2961d31ba883140de8e35007f 100644 (file)
  *-------------------------------------------------------------------------
  */
 
+#include "postgres_fe.h"
+
 #include "pg_regress.h"
 
 #define LINEBUFSIZE 300
+
 static void
 ecpg_filter(const char *sourcefile, const char *outfile)
 {
index 360956d6eb3f91825e7fb46167108ce968b6ca98..b8ec3418c56d4aa73e07560ca71f1c2ca008ca4e 100644 (file)
@@ -21,7 +21,6 @@
 #define LIBPQ_INT_H
 
 /* We assume libpq-fe.h has already been included. */
-#include "postgres_fe.h"
 #include "libpq-events.h"
 
 #include <time.h>
index 46b48ee8557a597ba06ab760d3ab1c0d58977b39..8a3d7f51b39fc0f4210da6587bfd335df000002c 100644 (file)
@@ -10,6 +10,8 @@
  *-------------------------------------------------------------------------
  */
 
+#include "postgres_fe.h"
+
 #include "pg_regress.h"
 
 char           saved_argv0[MAXPGPATH];
index d4d00d9c66f4fb56d01dcb50a90da803f8332e80..c393ae1f5110531aca7c75a55c2bad0856af4007 100644 (file)
@@ -16,7 +16,7 @@
  *-------------------------------------------------------------------------
  */
 
-#include "pg_regress.h"
+#include "postgres_fe.h"
 
 #include <ctype.h>
 #include <sys/stat.h>
@@ -29,6 +29,8 @@
 #include <sys/resource.h>
 #endif
 
+#include "pg_regress.h"
+
 #include "common/restricted_token.h"
 #include "common/username.h"
 #include "getopt_long.h"
index 62433b158f6a920cf330af93d0abf9db0cb81ade..f7745b16e11b5c22e5e166c531daa9c1f24e6a2d 100644 (file)
@@ -8,7 +8,6 @@
  *-------------------------------------------------------------------------
  */
 
-#include "postgres_fe.h"
 #include <unistd.h>
 
 #ifndef WIN32
index 6106c6bbda24eb922e8a386148723de70dbc88d2..298ed758eebbe40fe052ea4b16b28a99163be013 100644 (file)
@@ -16,6 +16,8 @@
  *-------------------------------------------------------------------------
  */
 
+#include "postgres_fe.h"
+
 #include "pg_regress.h"
 
 /*