This is the mail archive of the
mailing list for the glibc project.
Re: fmemopen and fseek(fp, 0L, SEEK_END)
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Adhemerval Zanella <azanella at linux dot vnet dot ibm dot com>
- Cc: gahr at freebsd dot org, libc-alpha at sourceware dot org
- Date: Wed, 4 Jun 2014 12:58:36 -0700 (PDT)
- Subject: Re: fmemopen and fseek(fp, 0L, SEEK_END)
- Authentication-results: sourceware.org; auth=none
- References: <20140603150023 dot GJ17833 at ptrcrt dot ch> <538F6038 dot 2030701 at linux dot vnet dot ibm dot com>
I thought someone had already started on this, but maybe not.
fmemopen was a GNU invention before it was in any standard. So before
POSIX added it, the only specifications were the libc manual and the de
facto specification of what libc actually did. The NEWS item for 2.9
explicitly cites the new SEEK_END behavior for "b" mode, thus implicitly
documenting that without "b" the SEEK_END behavior is what we see today.
So it's certainly the case that existing programs have a reasonable
expectation of getting the current behavior.
If we do change the behavior for new programs, then we'll definitely need a
new symbol version.