Explicitly cast -1 to fpos_t in our wxFtell() definition

Apparently in at least some gcc versions fpos_t is not the same thing as
long long int, resulting in compilation problems due to using different
types for the ternary operator arguments.
This commit is contained in:
Vadim Zeitlin
2019-10-05 14:43:06 +02:00
parent 564df66e1c
commit c30daf10cc

View File

@@ -162,7 +162,7 @@ enum wxPosixPermissions
inline long long wxFtell(FILE* fp)
{
fpos_t pos;
return fgetpos(fp, &pos) == 0 ? pos : -1LL;
return fgetpos(fp, &pos) == 0 ? pos : static_cast<fpos_t>(-1LL);
}
#else
#define wxFtell ftello64