fopen.3
Elliot Hughes
Explain BSD vs glibc "a+" difference
- Where is the initial read position for an "a+" stream?
-
- POSIX leaves this unspecified. Most BSD man pages are silent, and
- MacOS has the ambiguous "The stream is positioned at the end of
- the file", not differentiating between reads and writes other than
- to say that fseek(3) does not affect writes. glibc's documentation
- explicitly specifies that the initial read position is the
- beginning of the file.
-
- My new wording is based on the BSD implementations, so you may
- prefer to replace the non-glibc section with "unspecified", or
- indeed remove all claims about the initial read position.
+ Where is the initial read position for an "a+" stream?
+
+ POSIX leaves this unspecified. Most BSD man pages are silent, and
+ MacOS has the ambiguous "The stream is positioned at the end of
+ the file", not differentiating between reads and writes other than
+ to say that fseek(3) does not affect writes. glibc's documentation
+ explicitly specifies that the initial read position is the
+ beginning of the file.
+
+ My new wording is based on the BSD implementations, so you may
+ prefer to replace the non-glibc section with "unspecified", or
+ indeed remove all claims about the initial read position.
mallinfo.3
Elliott Hughes