Skip to content

Commit 918b158

Browse files
committed
Work around naming conflict between zlib and OpenSSL by tweaking inclusion
order. Remove some unnecessary #includes (that duplicate c.h).
1 parent de09790 commit 918b158

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

src/bin/pg_dump/common.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@
1111
*
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.79 2003/12/07 03:14:01 tgl Exp $
14+
* $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.80 2003/12/08 16:39:05 tgl Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
1818

1919
#include "postgres_fe.h"
2020
#include "pg_dump.h"
2121
#include "pg_backup_archiver.h"
22+
2223
#include "postgres.h"
2324
#include "catalog/pg_class.h"
2425

src/bin/pg_dump/pg_backup_archiver.h

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
*
1818
*
1919
* IDENTIFICATION
20-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.54 2003/12/06 03:00:11 tgl Exp $
20+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.55 2003/12/08 16:39:05 tgl Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
@@ -27,13 +27,19 @@
2727

2828
#include "postgres_fe.h"
2929

30-
#include <stdio.h>
3130
#include <time.h>
32-
#include <errno.h>
3331

32+
#include "pg_backup.h"
33+
34+
#include "libpq-fe.h"
3435
#include "pqexpbuffer.h"
36+
3537
#define LOBBUFSIZE 32768
3638

39+
/*
40+
* Note: zlib.h must be included *after* libpq-fe.h, because the latter may
41+
* include ssl.h, which has a naming conflict with zlib.h.
42+
*/
3743
#ifdef HAVE_LIBZ
3844
#include <zlib.h>
3945
#define GZCLOSE(fh) gzclose(fh)
@@ -55,9 +61,6 @@ typedef struct _z_stream
5561
typedef z_stream *z_streamp;
5662
#endif
5763

58-
#include "pg_backup.h"
59-
#include "libpq-fe.h"
60-
6164
#define K_VERS_MAJOR 1
6265
#define K_VERS_MINOR 8
6366
#define K_VERS_REV 0

src/bin/pg_dump/pg_backup_null.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,14 @@
1717
*
1818
*
1919
* IDENTIFICATION
20-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_null.c,v 1.13 2003/12/06 03:00:11 tgl Exp $
20+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_null.c,v 1.14 2003/12/08 16:39:05 tgl Exp $
2121
*
2222
*-------------------------------------------------------------------------
2323
*/
2424

2525
#include "pg_backup.h"
2626
#include "pg_backup_archiver.h"
2727

28-
#include <stdlib.h>
29-
#include <string.h>
3028
#include <unistd.h> /* for dup */
3129

3230
static size_t _WriteData(ArchiveHandle *AH, const void *data, size_t dLen);

src/bin/pg_dump/pg_backup_tar.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*
1717
*
1818
* IDENTIFICATION
19-
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.40 2003/12/06 03:00:11 tgl Exp $
19+
* $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.41 2003/12/08 16:39:05 tgl Exp $
2020
*
2121
*-------------------------------------------------------------------------
2222
*/
@@ -25,8 +25,6 @@
2525
#include "pg_backup_archiver.h"
2626
#include "pg_backup_tar.h"
2727

28-
#include <stdlib.h>
29-
#include <string.h>
3028
#include <ctype.h>
3129
#include <limits.h>
3230
#include <unistd.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