summaryrefslogtreecommitdiff
path: root/src/bin/pg_dump/pg_backup_archiver.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/pg_dump/pg_backup_archiver.c')
-rw-r--r--src/bin/pg_dump/pg_backup_archiver.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/bin/pg_dump/pg_backup_archiver.c b/src/bin/pg_dump/pg_backup_archiver.c
index 9b99cb8826f..ad602220083 100644
--- a/src/bin/pg_dump/pg_backup_archiver.c
+++ b/src/bin/pg_dump/pg_backup_archiver.c
@@ -15,7 +15,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.138 2006/11/21 22:19:46 tgl Exp $
+ * $PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.138.2.1 2007/02/19 15:05:21 mha Exp $
*
*-------------------------------------------------------------------------
*/
@@ -1301,24 +1301,24 @@ TocIDRequired(ArchiveHandle *AH, DumpId id, RestoreOptions *ropt)
}
size_t
-WriteOffset(ArchiveHandle *AH, off_t o, int wasSet)
+WriteOffset(ArchiveHandle *AH, pgoff_t o, int wasSet)
{
int off;
/* Save the flag */
(*AH->WriteBytePtr) (AH, wasSet);
- /* Write out off_t smallest byte first, prevents endian mismatch */
- for (off = 0; off < sizeof(off_t); off++)
+ /* Write out pgoff_t smallest byte first, prevents endian mismatch */
+ for (off = 0; off < sizeof(pgoff_t); off++)
{
(*AH->WriteBytePtr) (AH, o & 0xFF);
o >>= 8;
}
- return sizeof(off_t) + 1;
+ return sizeof(pgoff_t) + 1;
}
int
-ReadOffset(ArchiveHandle *AH, off_t *o)
+ReadOffset(ArchiveHandle *AH, pgoff_t *o)
{
int i;
int off;
@@ -1338,8 +1338,8 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
else if (i == 0)
return K_OFFSET_NO_DATA;
- /* Cast to off_t because it was written as an int. */
- *o = (off_t) i;
+ /* Cast to pgoff_t because it was written as an int. */
+ *o = (pgoff_t) i;
return K_OFFSET_POS_SET;
}
@@ -1369,8 +1369,8 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
*/
for (off = 0; off < AH->offSize; off++)
{
- if (off < sizeof(off_t))
- *o |= ((off_t) ((*AH->ReadBytePtr) (AH))) << (off * 8);
+ if (off < sizeof(pgoff_t))
+ *o |= ((pgoff_t) ((*AH->ReadBytePtr) (AH))) << (off * 8);
else
{
if ((*AH->ReadBytePtr) (AH) != 0)
@@ -1637,7 +1637,7 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
AH->createDate = time(NULL);
AH->intSize = sizeof(int);
- AH->offSize = sizeof(off_t);
+ AH->offSize = sizeof(pgoff_t);
if (FileSpec)
{
AH->fSpec = strdup(FileSpec);
@@ -2756,11 +2756,11 @@ checkSeek(FILE *fp)
if (fseeko(fp, 0, SEEK_CUR) != 0)
return false;
- else if (sizeof(off_t) > sizeof(long))
+ else if (sizeof(pgoff_t) > sizeof(long))
/*
- * At this point, off_t is too large for long, so we return based on
- * whether an off_t version of fseek is available.
+ * At this point, pgoff_t is too large for long, so we return based on
+ * whether an pgoff_t version of fseek is available.
*/
#ifdef HAVE_FSEEKO
return true;