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.
#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))
#ifndef $define
#define $define
-#include \"postgres_fe.h\"
#include \"pqexpbuffer.h\"
struct _helpStruct
#define N_(x) (x) /* gettext noop */
+#include \"postgres_fe.h\"
#include \"$hfile\"
";
#ifndef MAINLOOP_H
#define MAINLOOP_H
-#include "postgres_fe.h"
-
-int MainLoop(FILE *source);
+extern int MainLoop(FILE *source);
#endif /* MAINLOOP_H */