Commit 9722bb57 authored by Tom Lane's avatar Tom Lane

Fix inclusions of postgres_fe.h from .h files.

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
parent 08da5285
...@@ -3,12 +3,12 @@ ...@@ -3,12 +3,12 @@
#ifndef _ECPG_LIB_EXTERN_H #ifndef _ECPG_LIB_EXTERN_H
#define _ECPG_LIB_EXTERN_H #define _ECPG_LIB_EXTERN_H
#include "postgres_fe.h"
#include "libpq-fe.h" #include "libpq-fe.h"
#include "sqlca.h" #include "sqlca.h"
#include "sqlda-native.h" #include "sqlda-native.h"
#include "sqlda-compat.h" #include "sqlda-compat.h"
#include "ecpg_config.h" #include "ecpg_config.h"
#ifndef CHAR_BIT #ifndef CHAR_BIT
#include <limits.h> #include <limits.h>
#endif #endif
......
...@@ -16,9 +16,12 @@ ...@@ -16,9 +16,12 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres_fe.h"
#include "pg_regress.h" #include "pg_regress.h"
#define LINEBUFSIZE 300 #define LINEBUFSIZE 300
static void static void
ecpg_filter(const char *sourcefile, const char *outfile) ecpg_filter(const char *sourcefile, const char *outfile)
{ {
......
...@@ -21,7 +21,6 @@ ...@@ -21,7 +21,6 @@
#define LIBPQ_INT_H #define LIBPQ_INT_H
/* We assume libpq-fe.h has already been included. */ /* We assume libpq-fe.h has already been included. */
#include "postgres_fe.h"
#include "libpq-events.h" #include "libpq-events.h"
#include <time.h> #include <time.h>
......
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres_fe.h"
#include "pg_regress.h" #include "pg_regress.h"
char saved_argv0[MAXPGPATH]; char saved_argv0[MAXPGPATH];
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "pg_regress.h" #include "postgres_fe.h"
#include <ctype.h> #include <ctype.h>
#include <sys/stat.h> #include <sys/stat.h>
...@@ -29,6 +29,8 @@ ...@@ -29,6 +29,8 @@
#include <sys/resource.h> #include <sys/resource.h>
#endif #endif
#include "pg_regress.h"
#include "common/restricted_token.h" #include "common/restricted_token.h"
#include "common/username.h" #include "common/username.h"
#include "getopt_long.h" #include "getopt_long.h"
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres_fe.h"
#include <unistd.h> #include <unistd.h>
#ifndef WIN32 #ifndef WIN32
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
#include "postgres_fe.h"
#include "pg_regress.h" #include "pg_regress.h"
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment