[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [patch #6758] Add support for Atari FreeMiNT OS to fpurge
From: |
Bruno Haible |
Subject: |
Re: [patch #6758] Add support for Atari FreeMiNT OS to fpurge |
Date: |
Sun, 1 Mar 2009 13:32:21 +0100 |
User-agent: |
KMail/1.9.9 |
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?
*** 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