FreeBSD Fortran Failure
Toon Moene
toon@moene.indiv.nluug.nl
Tue May 15 13:08:00 GMT 2001
Loren James Rittle wrote:
> Here is my statement and analysis of the problem.
>
> The problem is that no prototype for ftruncate() is seen in scope
> while the code in libf2c/libI77/endfile.c is compiled.
[ Because _POSIX_SOURCE is defined while including unistd.h ]
> S rittle@latour; ccvs diff -c endfile.c
> Index: endfile.c
> ===================================================================
> RCS file: /cvs/gcc/egcs/libf2c/libI77/endfile.c,v
> retrieving revision 1.5
> diff -c -r1.5 endfile.c
> *** endfile.c 2001/02/26 20:23:41 1.5
> --- endfile.c 2001/05/15 01:42:39
> ***************
> *** 1,7 ****
> --- 1,9 ----
> #include "f2c.h"
> #include "fio.h"
>
> + #undef _POSIX_SOURCE
> #include <unistd.h>
> + #define _POSIX_SOURCE 1
>
> #ifdef KR_headers
> extern char *strcpy();
Hmmm, I have the odd feeling that this won't be accepted as a solution
:-)
However, if you look back at the patch that went in on the 27th of
February, you'll see that the inclusion of unistd.h was specifically
added to get a prototype of ftruncate *and for no other reason*.
Would it be a solution to "agree" on a prototype and add *that* instead
of the unistd.h include ? Or would that evoke other problems ?
Mark ?
--
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)
More information about the Gcc-bugs
mailing list