This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: FreeBSD Fortran Failure


Mark Mitchell wrote:

> >>>>> "Toon" == Toon Moene <toon@moene.indiv.nluug.nl> writes:

>     >> Any idea why io1.f fails on FreeBSD?

>     Toon> The last condition might point to the culprit - perhaps
>     Toon> autoconf "finds" an ftruncate on FreeBSD that doesn't
>     Toon> conform to the specs I wrote this change to.

> That sounds like a reasonable guess.

> FreeBSD's `ftruncate' man page says:

>   DESCRIPTION
>        Truncate() causes the file named by path or referenced by fd to
>        be truncated or extended to length bytes in size.  If the file
>        was larger than this size, the extra data is lost.  If the file
>        was smaller than this size, it will be extended as if by
>        writing bytes with the value zero.  With ftruncate(), the file
>        must be open for writing.

>   RETURN VALUES
>        A value of 0 is returned if the call succeeds.  If the call
>        fails a -1 is returned, and the global variable errno specifies
>        the error.

> Is that different from what you expected?

This is indeed what the code in gcc/libf2c/libI77/endfile.c expects.

-- 
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG  Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]