diff options
author | Tom Lane | 2016-03-18 17:43:13 +0000 |
---|---|---|
committer | Tom Lane | 2016-03-18 17:43:17 +0000 |
commit | 3422fecccadb021b7b4cdbc73b2c29f66f031761 (patch) | |
tree | ab2baf99174fb393d8e87322994599ca1a5abced | |
parent | 61d2ebdbf9155d80f83281d8c5729c8f8f0949bc (diff) |
Clean up some misplaced #includes.
Random .h files have no business including postgres-fe.h (or postgres.h).
If that wasn't the first #include done by the calling .c file, it's the
.c file that's broken. Noted while prepping Kyotaro Horiguchi's psql
lexer refactoring patch.
-rw-r--r-- | src/bin/psql/common.h | 3 | ||||
-rw-r--r-- | src/bin/psql/create_help.pl | 2 | ||||
-rw-r--r-- | src/bin/psql/mainloop.h | 4 |
3 files changed, 3 insertions, 6 deletions
diff --git a/src/bin/psql/common.h b/src/bin/psql/common.h index 6ba3f44e2c..ce7b93f9e5 100644 --- a/src/bin/psql/common.h +++ b/src/bin/psql/common.h @@ -8,10 +8,9 @@ #ifndef COMMON_H #define COMMON_H -#include "postgres_fe.h" #include <setjmp.h> -#include "libpq-fe.h" +#include "libpq-fe.h" #include "print.h" #define atooid(x) ((Oid) strtoul((x), NULL, 10)) diff --git a/src/bin/psql/create_help.pl b/src/bin/psql/create_help.pl index b9b8e870e0..f3d8141b99 100644 --- a/src/bin/psql/create_help.pl +++ b/src/bin/psql/create_help.pl @@ -59,7 +59,6 @@ print HFILE "/* #ifndef $define #define $define -#include \"postgres_fe.h\" #include \"pqexpbuffer.h\" struct _helpStruct @@ -84,6 +83,7 @@ print CFILE "/* #define N_(x) (x) /* gettext noop */ +#include \"postgres_fe.h\" #include \"$hfile\" "; diff --git a/src/bin/psql/mainloop.h b/src/bin/psql/mainloop.h index 09747f85ca..e6476ca7c6 100644 --- a/src/bin/psql/mainloop.h +++ b/src/bin/psql/mainloop.h @@ -8,8 +8,6 @@ #ifndef MAINLOOP_H #define MAINLOOP_H -#include "postgres_fe.h" - -int MainLoop(FILE *source); +extern int MainLoop(FILE *source); #endif /* MAINLOOP_H */ |