mirror of
https://github.com/mdbtools/mdbtools.git
synced 2026-03-10 00:20:54 +08:00
More printf portability fixes
This commit is contained in:
@@ -372,7 +372,7 @@ static ssize_t _mdb_read_pg(MdbHandle *mdb, void *pg_buf, unsigned long pg)
|
|||||||
|
|
||||||
fstat(mdb->f->fd, &status);
|
fstat(mdb->f->fd, &status);
|
||||||
if (status.st_size < offset) {
|
if (status.st_size < offset) {
|
||||||
fprintf(stderr,"offset %lld is beyond EOF\n",(long long)offset);
|
fprintf(stderr,"offset %" PRIu64 " is beyond EOF\n",(uint64_t)offset);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (mdb->stats && mdb->stats->collect)
|
if (mdb->stats && mdb->stats->collect)
|
||||||
|
|||||||
@@ -81,7 +81,7 @@ mdb_write_pg(MdbHandle *mdb, unsigned long pg)
|
|||||||
fstat(mdb->f->fd, &status);
|
fstat(mdb->f->fd, &status);
|
||||||
/* is page beyond current size + 1 ? */
|
/* is page beyond current size + 1 ? */
|
||||||
if (status.st_size < offset + mdb->fmt->pg_size) {
|
if (status.st_size < offset + mdb->fmt->pg_size) {
|
||||||
fprintf(stderr,"offset %lld is beyond EOF\n",(long long)offset);
|
fprintf(stderr,"offset %" PRIu64 " is beyond EOF\n",(uint64_t)offset);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
lseek(mdb->f->fd, offset, SEEK_SET);
|
lseek(mdb->f->fd, offset, SEEK_SET);
|
||||||
|
|||||||
Reference in New Issue
Block a user