pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: devel/m4 needs fixing for NetBSD-current

On Tue, Jan 31, 2012 at 11:37:05AM +0100, Jimmy Johansson wrote:
> mp4file_io.cpp: In member function 'u_int64_t
> MP4File::GetPosition(FILE*)':
> mp4file_io.cpp:42:4: error: invalid cast from type 'fpos_t' to type
> '__uint64_t'

I haven't looked at either pkg, but a general advice: if the stream dealed
with is of textual nature and may be non-ASCII, the fpos_t type should be
used, correctly treated as opaque type and never be cast to off_t.

If the application, like I presume in the mp4file case, only wants to now
how far it is in a binary file (or something), ftello() is the better choice
(it returns off_t directly and fseeko() can be used to get back there).


Home | Main Index | Thread Index | Old Index