[MPlayer-dev-eng] osdep/fseeko.c problem []

Rich Felker dalias at aerifal.cx
Thu Jun 9 01:13:35 CEST 2005


On Wed, Jun 08, 2005 at 12:10:55AM +0200, Arne Driescher wrote:
> Problem description:
> =============
> GCC complains when compiling ftello() 
> fseeko.c: In function `ftello':
> fseeko.c:82: error: incompatible types in return
> 
> System:
> =====
> - gcc version 3.3.5 20050117 (prerelease) (SUSE Linux)
> - SuSE 9.3 AMD64
> File version: 
> ========
> newest CVS version (0:02 2005-06-08)
> 
> Related information that might help with the problem:
> ===================================
> As "man ftello" gives:
>      #include <stdio.h>
>       int fseeko(FILE *stream, off_t offset, int whence);
>       off_t ftello(FILE *stream);
> and
> _G_config.h gives
>  typedef struct
> {
>   __off_t __pos;
>   __mbstate_t __state;
> } _G_fpos_t;
> #define _G_off_t        __off_t
> and 
> stdio.h:typedef _G_fpos_t fpos_t;
> 
> I suggest the patch below to make it compile. This might be broken on other
> platforms (that I have no way to test.)

It is broken on other platforms. Apparently fpos_t is system-specific
and not necessarily an integral type, so emulating ftello the way
MPlayer does is completely incorrect..

Rich




More information about the MPlayer-dev-eng mailing list