From: Tom Lane Date: Mon, 8 Dec 2003 16:39:05 +0000 (+0000) Subject: Work around naming conflict between zlib and OpenSSL by tweaking inclusion X-Git-Tag: REL8_0_0BETA1~1557 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=918b158743ad7a4d20c62196ad9de2fb7a32009b;p=postgresql Work around naming conflict between zlib and OpenSSL by tweaking inclusion order. Remove some unnecessary #includes (that duplicate c.h). --- diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index 45bc90fccc..ee938dab22 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -11,7 +11,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.79 2003/12/07 03:14:01 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/common.c,v 1.80 2003/12/08 16:39:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -19,6 +19,7 @@ #include "postgres_fe.h" #include "pg_dump.h" #include "pg_backup_archiver.h" + #include "postgres.h" #include "catalog/pg_class.h" diff --git a/src/bin/pg_dump/pg_backup_archiver.h b/src/bin/pg_dump/pg_backup_archiver.h index 50bf263ed8..4809989a19 100644 --- a/src/bin/pg_dump/pg_backup_archiver.h +++ b/src/bin/pg_dump/pg_backup_archiver.h @@ -17,7 +17,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.54 2003/12/06 03:00:11 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.h,v 1.55 2003/12/08 16:39:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -27,13 +27,19 @@ #include "postgres_fe.h" -#include #include -#include +#include "pg_backup.h" + +#include "libpq-fe.h" #include "pqexpbuffer.h" + #define LOBBUFSIZE 32768 +/* + * Note: zlib.h must be included *after* libpq-fe.h, because the latter may + * include ssl.h, which has a naming conflict with zlib.h. + */ #ifdef HAVE_LIBZ #include #define GZCLOSE(fh) gzclose(fh) @@ -55,9 +61,6 @@ typedef struct _z_stream typedef z_stream *z_streamp; #endif -#include "pg_backup.h" -#include "libpq-fe.h" - #define K_VERS_MAJOR 1 #define K_VERS_MINOR 8 #define K_VERS_REV 0 diff --git a/src/bin/pg_dump/pg_backup_null.c b/src/bin/pg_dump/pg_backup_null.c index f7d7f49900..82bc5d121f 100644 --- a/src/bin/pg_dump/pg_backup_null.c +++ b/src/bin/pg_dump/pg_backup_null.c @@ -17,7 +17,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_null.c,v 1.13 2003/12/06 03:00:11 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_null.c,v 1.14 2003/12/08 16:39:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -25,8 +25,6 @@ #include "pg_backup.h" #include "pg_backup_archiver.h" -#include -#include #include /* for dup */ static size_t _WriteData(ArchiveHandle *AH, const void *data, size_t dLen); diff --git a/src/bin/pg_dump/pg_backup_tar.c b/src/bin/pg_dump/pg_backup_tar.c index c4c028c04c..9efe6b7dcd 100644 --- a/src/bin/pg_dump/pg_backup_tar.c +++ b/src/bin/pg_dump/pg_backup_tar.c @@ -16,7 +16,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.40 2003/12/06 03:00:11 tgl Exp $ + * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_tar.c,v 1.41 2003/12/08 16:39:05 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -25,8 +25,6 @@ #include "pg_backup_archiver.h" #include "pg_backup_tar.h" -#include -#include #include #include #include