bug-gnulib
[Top][All Lists]
Advanced

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

Re: [patch #6758] Add support for Atari FreeMiNT OS to fpurge


From: Alan Hourihane
Subject: Re: [patch #6758] Add support for Atari FreeMiNT OS to fpurge
Date: Sun, 01 Mar 2009 13:18:59 +0000

On Sun, 2009-03-01 at 13:32 +0100, Bruno Haible wrote:
> Alan Hourihane wrote:
> > > Is anything else among the aforementioned unit tests still failing?
> > 
> > Yes. The last problem is fseeko() as mentioned.
> 
> The 'if (0)' is not right: it causes the lseek to be skipped entirely in 
> gnulib.
> But we have the requirement that fflush followed by fseek acts like lseek,
> and in the mintlib sources
>   - the only calls to lseek are through the __io_funcs.__seek function,
>   - fflush does not always invoke __io_funcs.__seek,
>   - fseek does not invoke __io_funcs.__seek, except to determine the end for
>     SEEK_END.
> 
> How about the currently committed code with this additional patch? Does this
> work?

Yes. This does the trick.

Thanks Bruno !

Alan.

> *** lib/fseeko.c.orig 2009-03-01 13:25:17.000000000 +0100
> --- lib/fseeko.c      2009-03-01 13:24:57.000000000 +0100
> ***************
> *** 117,122 ****
> --- 117,125 ----
>         fp->_flags &= ~_IOEOF;
>   #elif defined _IOERR                /* AIX, HP-UX, IRIX, OSF/1, Solaris, 
> OpenServer, mingw */
>         fp->_flag &= ~_IOEOF;
> + #elif defined __MINT__              /* Atari FreeMiNT */
> +       fp->__offset = pos;
> +       fp->__eof = 0;
>   #endif
>         /* If we were not requested to position beyond end of file, we're
>        done.  */
> 
> Bruno





reply via email to

[Prev in Thread] Current Thread [Next in Thread]