Use correct conversion specifier and length modifier when printing an
integer of type off_t. Also, don't assume that long long is available.
diff --git a/Modules/_io/bufferedio.c b/Modules/_io/bufferedio.c
index 040f3bf..d9864d8 100644
--- a/Modules/_io/bufferedio.c
+++ b/Modules/_io/bufferedio.c
@@ -580,7 +580,8 @@
if (n < 0) {
if (!PyErr_Occurred())
PyErr_Format(PyExc_IOError,
- "Raw stream returned invalid position %zd", n);
+ "Raw stream returned invalid position %" PY_PRIdOFF,
+ n);
return -1;
}
self->abs_pos = n;
@@ -612,7 +613,8 @@
if (n < 0) {
if (!PyErr_Occurred())
PyErr_Format(PyExc_IOError,
- "Raw stream returned invalid position %zd", n);
+ "Raw stream returned invalid position %" PY_PRIdOFF,
+ n);
return -1;
}
self->abs_pos = n;