diff options
author | Jan Wieck <JanWieck@Yahoo.com> | 2000-07-06 18:39:39 +0000 |
---|---|---|
committer | Jan Wieck <JanWieck@Yahoo.com> | 2000-07-06 18:39:39 +0000 |
commit | 43f6ab86546931eee3cb2735953820efdb95a2f7 (patch) | |
tree | c290f0f24a630c1298d38a1f3dbd7fee9e6d80c8 /src/bin/pg_dump/pg_backup_files.c | |
parent | 2a225ebf18afc373b1956c884e6beca47267f647 (diff) | |
download | postgresql-43f6ab86546931eee3cb2735953820efdb95a2f7.tar.gz postgresql-43f6ab86546931eee3cb2735953820efdb95a2f7.zip |
Please find attached a patch for the pg_dump directory which addresses:
- The problems Jan reported
- incompatibility with configure (now uses HAVE_LIBZ instead of HAVE_ZLIB)
- a problem in auto-detecting archive file format on piped archives
Philip Warner
Diffstat (limited to 'src/bin/pg_dump/pg_backup_files.c')
-rw-r--r-- | src/bin/pg_dump/pg_backup_files.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bin/pg_dump/pg_backup_files.c b/src/bin/pg_dump/pg_backup_files.c index bbf30de9aaa..ef2ea57f2ce 100644 --- a/src/bin/pg_dump/pg_backup_files.c +++ b/src/bin/pg_dump/pg_backup_files.c @@ -54,7 +54,7 @@ typedef struct { } lclContext;
typedef struct {
-#ifdef HAVE_ZLIB
+#ifdef HAVE_LIBZ
gzFile *FH;
#else
FILE *FH;
@@ -133,7 +133,7 @@ static void _ArchiveEntry(ArchiveHandle* AH, TocEntry* te) ctx = (lclTocEntry*)malloc(sizeof(lclTocEntry));
if (te->dataDumper) {
-#ifdef HAVE_ZLIB
+#ifdef HAVE_LIBZ
if (AH->compression == 0) {
sprintf(fn, "%d.dat", te->id);
} else {
@@ -192,7 +192,7 @@ static void _StartData(ArchiveHandle* AH, TocEntry* te) sprintf(fmode, "wb%d", AH->compression);
-#ifdef HAVE_ZLIB
+#ifdef HAVE_LIBZ
tctx->FH = gzopen(tctx->filename, fmode);
#else
tctx->FH = fopen(tctx->filename, PG_BINARY_W);
@@ -229,7 +229,7 @@ static void _PrintTocData(ArchiveHandle* AH, TocEntry* te, RestoreOptions *ropt) if (!tctx->filename)
return;
-#ifdef HAVE_ZLIB
+#ifdef HAVE_LIBZ
AH->FH = gzopen(tctx->filename,"rb");
#else
AH->FH = fopen(tctx->filename,PG_BINARY_R);
|