diff options
| author | Carl Hetherington <cth@carlh.net> | 2013-12-19 13:05:01 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2013-12-19 13:05:01 +0000 |
| commit | 9d855ad06b98d8cfc286e517d1ca722607252069 (patch) | |
| tree | 999dee1b965c145524b296dfb4e91dda7453905d | |
| parent | befa32df1466724479095f35faf48e657e319ad1 (diff) | |
Try to fix problems with printf on 32-bit Windows XP.
| -rw-r--r-- | src/picture_asset_writer.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/picture_asset_writer.cc b/src/picture_asset_writer.cc index 51d77019..92b384db 100644 --- a/src/picture_asset_writer.cc +++ b/src/picture_asset_writer.cc @@ -49,8 +49,13 @@ FrameInfo::FrameInfo (istream& s) FrameInfo::FrameInfo (FILE* f) { - fscanf (f, "%" PRId64, &offset); - fscanf (f, "%" PRId64, &size); +#ifdef LIBDCP_WINDOWS + fscanf (f, "%I64u", &offset); + fscanf (f, "%I64u", &size); +#else + fscanf (f, "%" SCNu64, &offset); + fscanf (f, "%" SCNu64, &size); +#endif if (ferror (f)) { offset = size = 0; @@ -70,7 +75,11 @@ FrameInfo::write (ostream& s) const void FrameInfo::write (FILE* f) const { - fprintf (f, "%" PRId64 " %" PRId64 " %s", offset, size, hash.c_str ()); +#ifdef LIBDCP_WINDOWS + fprintf (f, "%I64u %I64u %s", offset, size, hash.c_str ()); +#else + fprintf (f, "%" PRIu64 " %" PRIu64 " %s", offset, size, hash.c_str ()); +#endif } |
