1515 *
1616 *
1717 * IDENTIFICATION
18- *$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.141 2007/02/01 19:10:28 momjian Exp $
18+ *$PostgreSQL: pgsql/src/bin/pg_dump/pg_backup_archiver.c,v 1.142 2007/02/19 15:05:06 mha Exp $
1919 *
2020 *-------------------------------------------------------------------------
2121 */
@@ -1311,24 +1311,24 @@ TocIDRequired(ArchiveHandle *AH, DumpId id, RestoreOptions *ropt)
13111311}
13121312
13131313size_t
1314- WriteOffset (ArchiveHandle * AH ,off_t o ,int wasSet )
1314+ WriteOffset (ArchiveHandle * AH ,pgoff_t o ,int wasSet )
13151315{
13161316int off ;
13171317
13181318/* Save the flag */
13191319(* AH -> WriteBytePtr ) (AH ,wasSet );
13201320
1321- /* Write outoff_t smallest byte first, prevents endian mismatch */
1322- for (off = 0 ;off < sizeof (off_t );off ++ )
1321+ /* Write outpgoff_t smallest byte first, prevents endian mismatch */
1322+ for (off = 0 ;off < sizeof (pgoff_t );off ++ )
13231323{
13241324(* AH -> WriteBytePtr ) (AH ,o & 0xFF );
13251325o >>=8 ;
13261326}
1327- return sizeof (off_t )+ 1 ;
1327+ return sizeof (pgoff_t )+ 1 ;
13281328}
13291329
13301330int
1331- ReadOffset (ArchiveHandle * AH ,off_t * o )
1331+ ReadOffset (ArchiveHandle * AH ,pgoff_t * o )
13321332{
13331333int i ;
13341334int off ;
@@ -1348,8 +1348,8 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
13481348else if (i == 0 )
13491349return K_OFFSET_NO_DATA ;
13501350
1351- /* Cast tooff_t because it was written as an int. */
1352- * o = (off_t )i ;
1351+ /* Cast topgoff_t because it was written as an int. */
1352+ * o = (pgoff_t )i ;
13531353return K_OFFSET_POS_SET ;
13541354}
13551355
@@ -1379,8 +1379,8 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
13791379 */
13801380for (off = 0 ;off < AH -> offSize ;off ++ )
13811381{
1382- if (off < sizeof (off_t ))
1383- * o |= ((off_t ) ((* AH -> ReadBytePtr ) (AH ))) << (off * 8 );
1382+ if (off < sizeof (pgoff_t ))
1383+ * o |= ((pgoff_t ) ((* AH -> ReadBytePtr ) (AH ))) << (off * 8 );
13841384else
13851385{
13861386if ((* AH -> ReadBytePtr ) (AH )!= 0 )
@@ -1647,7 +1647,7 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
16471647AH -> createDate = time (NULL );
16481648
16491649AH -> intSize = sizeof (int );
1650- AH -> offSize = sizeof (off_t );
1650+ AH -> offSize = sizeof (pgoff_t );
16511651if (FileSpec )
16521652{
16531653AH -> fSpec = strdup (FileSpec );
@@ -2768,11 +2768,11 @@ checkSeek(FILE *fp)
27682768
27692769if (fseeko (fp ,0 ,SEEK_CUR )!= 0 )
27702770return false;
2771- else if (sizeof (off_t )> sizeof (long ))
2771+ else if (sizeof (pgoff_t )> sizeof (long ))
27722772
27732773/*
2774- * At this point,off_t is too large for long, so we return based on
2775- * whether anoff_t version of fseek is available.
2774+ * At this point,pgoff_t is too large for long, so we return based on
2775+ * whether anpgoff_t version of fseek is available.
27762776 */
27772777#ifdef HAVE_FSEEKO
27782778return true;