On Tue, 2008-09-23 at 11:01 +0200, Rogier Wolff wrote: > > > Note that the "b" in "wb" should be inside a "#ifdef WINDOWS" or > > > whatever defines that platform. > > The 'b' is effectively ignored on Linux, so it should be harmless and > > not need an ifdef. > The manpage on my system does not mention this behaviour. So if > someone comes along and implements and documents "bitbucket mode", > which ignores all data written, that's ok.
My manpage says: The mode string can also include the letter ’b’ either as a last char‐ acter or as a character between the characters in any of the two-char‐ acter strings described above. This is strictly for compatibility with C89 and has no effect; the ’b’ is ignored on all POSIX conforming sys‐ tems, including Linux. (Other systems may treat text files and binary files differently, and adding the ’b’ may be a good idea if you do I/O to a binary file and expect that your program may be ported to non-Unix environments.) So if you care about this being portable to Windows, then my approach was correct. If you don't, I can remove the 'b' entirely :-) D. -- Daniel Silverstone http://www.digital-scurf.org/ PGP mail accepted and encouraged. Key Id: 2BC8 4016 2068 7895 _______________________________________________ dev mailing list dev@openstreetmap.org http://lists.openstreetmap.org/listinfo/dev