The definition of streamoff depends on whether _LARGEFILE_SOURCE or _LARGEFILE64_SOURCE is defined. I think it is simpler and safer if STLport uses off64_t by default and doesn't make its interface dependent on feature test macros. See also the comment in the patch.
I don't consider such a change appropriate for the STLport 5.2 branch, but I would like to see it in later STLport releases.
An alternative - or rather, an addition - to consider is to "guess" the type of off64_t (long or long long), define streamoff as that type and assert in a source file that streamoff and off64_t are identical. This could keep off64_t out of all header files, thus removing the need to define the right feature test macros when using STLport.
Log in to post a comment.