Skip to content

Commit 9722bb5

Browse files
committed
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
1 parent 08da528 commit 9722bb5

File tree

7 files changed

+11
-4
lines changed

7 files changed

+11
-4
lines changed

src/interfaces/ecpg/ecpglib/extern.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
#ifndef _ECPG_LIB_EXTERN_H
44
#define _ECPG_LIB_EXTERN_H
55

6-
#include "postgres_fe.h"
76
#include "libpq-fe.h"
87
#include "sqlca.h"
98
#include "sqlda-native.h"
109
#include "sqlda-compat.h"
1110
#include "ecpg_config.h"
11+
1212
#ifndef CHAR_BIT
1313
#include <limits.h>
1414
#endif

src/interfaces/ecpg/test/pg_regress_ecpg.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@
1616
*-------------------------------------------------------------------------
1717
*/
1818

19+
#include "postgres_fe.h"
20+
1921
#include "pg_regress.h"
2022

2123
#define LINEBUFSIZE 300
24+
2225
static void
2326
ecpg_filter(const char *sourcefile, const char *outfile)
2427
{

src/interfaces/libpq/libpq-int.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#define LIBPQ_INT_H
2222

2323
/* We assume libpq-fe.h has already been included. */
24-
#include "postgres_fe.h"
2524
#include "libpq-events.h"
2625

2726
#include <time.h>

src/test/isolation/isolation_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010
*-------------------------------------------------------------------------
1111
*/
1212

13+
#include "postgres_fe.h"
14+
1315
#include "pg_regress.h"
1416

1517
char saved_argv0[MAXPGPATH];

src/test/regress/pg_regress.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*-------------------------------------------------------------------------
1717
*/
1818

19-
#include "pg_regress.h"
19+
#include "postgres_fe.h"
2020

2121
#include <ctype.h>
2222
#include <sys/stat.h>
@@ -29,6 +29,8 @@
2929
#include <sys/resource.h>
3030
#endif
3131

32+
#include "pg_regress.h"
33+
3234
#include "common/restricted_token.h"
3335
#include "common/username.h"
3436
#include "getopt_long.h"

src/test/regress/pg_regress.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
*-------------------------------------------------------------------------
99
*/
1010

11-
#include "postgres_fe.h"
1211
#include <unistd.h>
1312

1413
#ifndef WIN32

src/test/regress/pg_regress_main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
*-------------------------------------------------------------------------
1717
*/
1818

19+
#include "postgres_fe.h"
20+
1921
#include "pg_regress.h"
2022

2123
/*

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