15
15
*
16
16
*
17
17
* 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 $
19
19
*
20
20
*-------------------------------------------------------------------------
21
21
*/
@@ -1311,24 +1311,24 @@ TocIDRequired(ArchiveHandle *AH, DumpId id, RestoreOptions *ropt)
1311
1311
}
1312
1312
1313
1313
size_t
1314
- WriteOffset (ArchiveHandle * AH , off_t o , int wasSet )
1314
+ WriteOffset (ArchiveHandle * AH , pgoff_t o , int wasSet )
1315
1315
{
1316
1316
int off ;
1317
1317
1318
1318
/* Save the flag */
1319
1319
(* AH -> WriteBytePtr ) (AH , wasSet );
1320
1320
1321
- /* Write out off_t smallest byte first, prevents endian mismatch */
1322
- for (off = 0 ; off < sizeof (off_t ); off ++ )
1321
+ /* Write out pgoff_t smallest byte first, prevents endian mismatch */
1322
+ for (off = 0 ; off < sizeof (pgoff_t ); off ++ )
1323
1323
{
1324
1324
(* AH -> WriteBytePtr ) (AH , o & 0xFF );
1325
1325
o >>= 8 ;
1326
1326
}
1327
- return sizeof (off_t ) + 1 ;
1327
+ return sizeof (pgoff_t ) + 1 ;
1328
1328
}
1329
1329
1330
1330
int
1331
- ReadOffset (ArchiveHandle * AH , off_t * o )
1331
+ ReadOffset (ArchiveHandle * AH , pgoff_t * o )
1332
1332
{
1333
1333
int i ;
1334
1334
int off ;
@@ -1348,8 +1348,8 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
1348
1348
else if (i == 0 )
1349
1349
return K_OFFSET_NO_DATA ;
1350
1350
1351
- /* Cast to off_t because it was written as an int. */
1352
- * o = (off_t ) i ;
1351
+ /* Cast to pgoff_t because it was written as an int. */
1352
+ * o = (pgoff_t ) i ;
1353
1353
return K_OFFSET_POS_SET ;
1354
1354
}
1355
1355
@@ -1379,8 +1379,8 @@ ReadOffset(ArchiveHandle *AH, off_t *o)
1379
1379
*/
1380
1380
for (off = 0 ; off < AH -> offSize ; off ++ )
1381
1381
{
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 );
1384
1384
else
1385
1385
{
1386
1386
if ((* AH -> ReadBytePtr ) (AH ) != 0 )
@@ -1647,7 +1647,7 @@ _allocAH(const char *FileSpec, const ArchiveFormat fmt,
1647
1647
AH -> createDate = time (NULL );
1648
1648
1649
1649
AH -> intSize = sizeof (int );
1650
- AH -> offSize = sizeof (off_t );
1650
+ AH -> offSize = sizeof (pgoff_t );
1651
1651
if (FileSpec )
1652
1652
{
1653
1653
AH -> fSpec = strdup (FileSpec );
@@ -2768,11 +2768,11 @@ checkSeek(FILE *fp)
2768
2768
2769
2769
if (fseeko (fp , 0 , SEEK_CUR ) != 0 )
2770
2770
return false;
2771
- else if (sizeof (off_t ) > sizeof (long ))
2771
+ else if (sizeof (pgoff_t ) > sizeof (long ))
2772
2772
2773
2773
/*
2774
- * At this point, off_t is too large for long, so we return based on
2775
- * whether an off_t version of fseek is available.
2774
+ * At this point, pgoff_t is too large for long, so we return based on
2775
+ * whether an pgoff_t version of fseek is available.
2776
2776
*/
2777
2777
#ifdef HAVE_FSEEKO
2778
2778
return true;
0 commit comments