[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Building CVS HEAD libtool outside of source directory
From: |
Eric Blake |
Subject: |
Re: Building CVS HEAD libtool outside of source directory |
Date: |
Fri, 19 Oct 2007 17:16:26 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
Bob Friesenhahn <bfriesen <at> simple.dallas.tx.us> writes:
> > There is a known bug in m4 1.4.10 on platforms where fopen(..., "a+")
> > opens at the tail of a file, rather than the head. It looks like this is
> > what is biting you.
The bug is already fixed in M4 CVS; using the patch from the referenced mail.
>
> Facinating. I would expect opening for append to open at the tail
> (end) of the file although I find your use of 'head' and 'tail' to be
> confusing since a file is not a queue.
POSIX says the state of the first ftell() on a file after fopen("a+") is
implementation-defined - it can be either offset 0 (as glibc) or the end of the
file (as on BSD). It isn't until you do either an explicit seek (which is what
my m4 patch adds) or a write that the position is then well-defined.
> It sounds like your code is fighting against the intentions of "a+"
> and that the seek in your referenced patch will be ignored by FreeBSD
> and OS X and should probably be ignored by Solaris as well.
No, no problem with my code, once I added the requisite seek.
>
> Maybe freopen() can help?
Not necessary here. If fopen()/fseek() can't solve the problem, freopen() won't
help either.
--
Eric Blake
- Re: Building CVS HEAD libtool outside of source directory, (continued)
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Gary V. Vaughan, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Eric Blake, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory,
Eric Blake <=
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Eric Blake, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Ralf Wildenhues, 2007/10/21
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/21
- Re: Building CVS HEAD libtool outside of source directory, Ralf Wildenhues, 2007/10/21
- Re: Building CVS HEAD libtool outside of source directory, Bob Friesenhahn, 2007/10/21
- Re: Building CVS HEAD libtool outside of source directory, Gary V. Vaughan, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Gary V. Vaughan, 2007/10/19
- Re: Building CVS HEAD libtool outside of source directory, Eric Blake, 2007/10/19