]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
Fix some printing errors.
authorAdam Sutton <dev@adamsutton.me.uk>
Wed, 10 Apr 2013 11:05:31 +0000 (12:05 +0100)
committerAdam Sutton <dev@adamsutton.me.uk>
Wed, 10 Apr 2013 13:58:13 +0000 (14:58 +0100)
src/timeshift/timeshift_reader.c
src/tvheadend.h

index 3701ddee3cd251316e62ae1926a23f863cad590e..f2a3b6bcff6c03898cf65560bbeb953116bca4b1 100644 (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 */
index f0dbdcd4dca77d297f42aeca9c1316cacf8c8b7b..55cdd517ccd014b19d9a32cb9d0172758475fb50 100644 (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 */