[MPlayer-dev-eng] osdep/fseeko.c ifndef sense reversed?

Steven M. Schultz sms at 2BSD.COM
Sun Apr 4 06:47:27 CEST 2004


Hi -

	In osdep/fseeko.c there are, now,  two references to 
	'#ifndef __MINGW32__' that have, I think, the sense of the ifdef 
	is reversed:

#ifndef __MINGW32__
        off_t floc;
#else
        fpos_t floc;
#endif

	SHOULD be:

#ifdef __MINGW32__
        off_t floc;
#else
	fpos_t floc;
#endif

	Why?   Because the 'floc' variable is used with fsetpos() and fgetpos()
	and those are prototyped thus (according to "man fsetpos"):

int fgetpos(FILE *stream, fpos_t *pos);
int fsetpos(FILE *stream, fpos_t *pos);

	If MINGW32 needs off_t instead of fpos_t that's fine but the #ifndef
	needs to be reversed to #ifdef in that case.  As it is now all systems
	EXCEPT __MINGW32__ will get off_t rather than fpos_t and that 
	disagrees with the prototype.

	Steven Schultz




More information about the MPlayer-dev-eng mailing list