This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mmap stdio breaks GNU ld


Mark Brown <bmark@us.ibm.com> writes:

> And here is the relevant text. Note that C talks about associating a
> stream with a file (and thus the file position indicator must be at
> the start) while POSIX talks about associating a stream with a
> file descriptor. Yes, POSIX doesn't make clear that "the position
> indicated by the file offset" could be anywhere". But you can see where
> the expectation comes from. This sounds like a minor documentation
> issue.

I hope you mean adding "the position indicated by the file offset"
could be anywhere" to the fopen() man page by "documentation issue".
To this I agree.  Changing the requirements to say that the file
position should be zero after fopen() would mean possibly breaking
ABIs (in any case it potentially prevents optimizations) and therefore
shouldn't even be considered.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


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