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.
This commit is contained in:
Tom Lane 2016-03-18 13:43:13 -04:00
parent 61d2ebdbf9
commit 3422feccca
3 changed files with 3 additions and 6 deletions

View File

@ -8,10 +8,9 @@
#ifndef COMMON_H #ifndef COMMON_H
#define COMMON_H #define COMMON_H
#include "postgres_fe.h"
#include <setjmp.h> #include <setjmp.h>
#include "libpq-fe.h"
#include "libpq-fe.h"
#include "print.h" #include "print.h"
#define atooid(x) ((Oid) strtoul((x), NULL, 10)) #define atooid(x) ((Oid) strtoul((x), NULL, 10))

View File

@ -59,7 +59,6 @@ print HFILE "/*
#ifndef $define #ifndef $define
#define $define #define $define
#include \"postgres_fe.h\"
#include \"pqexpbuffer.h\" #include \"pqexpbuffer.h\"
struct _helpStruct struct _helpStruct
@ -84,6 +83,7 @@ print CFILE "/*
#define N_(x) (x) /* gettext noop */ #define N_(x) (x) /* gettext noop */
#include \"postgres_fe.h\"
#include \"$hfile\" #include \"$hfile\"
"; ";

View File

@ -8,8 +8,6 @@
#ifndef MAINLOOP_H #ifndef MAINLOOP_H
#define MAINLOOP_H #define MAINLOOP_H
#include "postgres_fe.h" extern int MainLoop(FILE *source);
int MainLoop(FILE *source);
#endif /* MAINLOOP_H */ #endif /* MAINLOOP_H */