This is the mail archive of the gcc-patches@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: PATCH: (official, i.e. thought-out) Re: FreeBSD Fortran Failure


In article <3B0198EF.C250F514@moene.indiv.nluug.nl>,
Toon Moene <toon@moene.indiv.nluug.nl> writes:

>> + /* FreeBSD has ftruncate() but appears to be at a POSIX compliance level
>> +    before it was added (thus it is excluded when _POSIX_SOURCE is
>> +    defined while including <unistd.h>).  */
>> + #if defined(_POSIX_SOURCE) && defined(__FreeBSD__)
>> + #define _FTRUNCATE_DECLARED
>> + int      ftruncate (int, off_t);
>> + #endif

> This patch has my preference - however, I do not understand the
> significance of the

Understandably, Mark says he wants the second one (with a big comment
like I added for the first approach.)

> #define _FTRUNCATE_DECLARED

> line, as this symbol isn't used anywhere ....

FreeBSD can define the prototype for ftruncate() in multiple headers
so that define that symbol.  I copied that form without noticing that
no other system headers were pulled in.  And I already noticed that a
redundant prototype should be OK so it is not needed.

Loren


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