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

Sascha Sommer saschasommer at freenet.de
Sun Apr 4 12:24:21 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);
>

No manpage here.I only searched google and the reference I looked at defined
them with off_t.
MINGW32 doesn't need off_t instead of fpos_t. The original code had off_t
instead of fpos_t and
I didn't want to break other systems.

> 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.
>

I will reverse then and change it to fpos_t.

Sascha




More information about the MPlayer-dev-eng mailing list