Skip to content

Commit 3422fec

Browse files
committed
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.
1 parent 61d2ebd commit 3422fec

File tree

3 files changed

+3
-6
lines changed

3 files changed

+3
-6
lines changed

src/bin/psql/common.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,9 @@
88
#ifndef COMMON_H
99
#define COMMON_H
1010

11-
#include "postgres_fe.h"
1211
#include <setjmp.h>
13-
#include "libpq-fe.h"
1412

13+
#include "libpq-fe.h"
1514
#include "print.h"
1615

1716
#define atooid(x) ((Oid) strtoul((x), NULL, 10))

src/bin/psql/create_help.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@
5959
#ifndef $define
6060
#define $define
6161
62-
#include \"postgres_fe.h\"
6362
#include \"pqexpbuffer.h\"
6463
6564
struct _helpStruct
@@ -84,6 +83,7 @@
8483
8584
#define N_(x) (x) /* gettext noop */
8685
86+
#include \"postgres_fe.h\"
8787
#include \"$hfile\"
8888
8989
";

src/bin/psql/mainloop.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
#ifndef MAINLOOP_H
99
#define MAINLOOP_H
1010

11-
#include "postgres_fe.h"
12-
13-
int MainLoop(FILE *source);
11+
extern int MainLoop(FILE *source);
1412

1513
#endif /* MAINLOOP_H */

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy