Fix some printing errors.

This commit is contained in:
Adam Sutton 2013-04-10 12:05:31 +01:00
parent 36f9bd6652
commit da25793bcb
2 changed files with 17 additions and 5 deletions

View file

@ -318,7 +318,7 @@ static int _timeshift_read
ts->id, (*cur_file)->path);
*fd = open((*cur_file)->path, O_RDONLY);
}
tvhtrace("timeshift", "ts %d seek to %lu", ts->id, *cur_off);
tvhtrace("timeshift", "ts %d seek to %"PRIoff_t, ts->id, *cur_off);
lseek(*fd, *cur_off, SEEK_SET);
/* Read msg */
@ -329,7 +329,7 @@ static int _timeshift_read
tvhlog(LOG_ERR, "timeshift", "ts %d could not read buffer", ts->id);
return -1;
}
tvhtrace("timeshift", "ts %d read msg %p (%ld)",
tvhtrace("timeshift", "ts %d read msg %p (%"PRIssize_t")",
ts->id, *sm, r);
/* Incomplete */

View file

@ -549,10 +549,22 @@ int rmtree ( const char *path );
char *regexp_escape ( const char *str );
/* printing */
#if __SIZEOF_LONG__ == 8
#define PRItime_t PRId64
# if __WORDSIZE == 64
#define PRIsword_t PRId64
#define PRIuword_t PRIu64
#else
#define PRItime_t "l" PRId32
#define PRIsword_t PRId32
#define PRIuword_t PRIu32
#endif
#define PRIslongword_t "ld"
#define PRIulongword_t "lu"
#define PRIsize_t PRIuword_t
#define PRIssize_t PRIsword_t
#define PRItime_t PRIslongword_t
#if _FILE_OFFSET_BITS == 64
#define PRIoff_t PRId64
#else
#define PRIoff_t PRIslongword_t
#endif
#endif /* TV_HEAD_H */