]> granicus.if.org Git - postgresql/commitdiff
Work around naming conflict between zlib and OpenSSL by tweaking inclusion
authorTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Dec 2003 16:39:05 +0000 (16:39 +0000)
committerTom Lane <tgl@sss.pgh.pa.us>
Mon, 8 Dec 2003 16:39:05 +0000 (16:39 +0000)
order.  Remove some unnecessary #includes (that duplicate c.h).

src/bin/pg_dump/common.c
src/bin/pg_dump/pg_backup_archiver.h
src/bin/pg_dump/pg_backup_null.c
src/bin/pg_dump/pg_backup_tar.c

index 45bc90fcccb5784cf7ad26e8825df2a20a16255f..ee938dab22bc8031f5edcae2991eba14a3fd6a48 100644 (file)
@@ -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"
 
index 50bf263ed88c0f0f8dcc65983f14ad8273871ab4..4809989a196e3e09b8bb78a68cf6539f8fe05b1f 100644 (file)
@@ -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 $
  *
  *-------------------------------------------------------------------------
  */
 
 #include "postgres_fe.h"
 
-#include <stdio.h>
 #include <time.h>
-#include <errno.h>
 
+#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 <zlib.h>
 #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
index f7d7f49900980fde2b5d19b227e7924f31f613df..82bc5d121fa950920a7b5f8c93a1ca10052c27ec 100644 (file)
@@ -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 <stdlib.h>
-#include <string.h>
 #include <unistd.h>                            /* for dup */
 
 static size_t _WriteData(ArchiveHandle *AH, const void *data, size_t dLen);
index c4c028c04cab3e6ea8d590d3437d059d7b121d04..9efe6b7dcdad824867887d003a04fd616653819a 100644 (file)
@@ -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 <stdlib.h>
-#include <string.h>
 #include <ctype.h>
 #include <limits.h>
 #include <unistd.h>