Subject: binary mode handling
From: [email-masked] (Ernie Rael)

8 Jan 1997 16:40:58 -0800
Sender: [email-masked]
Approved: [email-masked]
Distribution: cygnus
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable
Original-To: [email-masked]
X-Mailer: Forte Agent .99g/32.339
Original-Sender: [email-masked]

In i386-cygwin32/include/sys/fcntl.h the flags O_BINARY
and O_TEXT are conditionally defined depending on _WIN32.
How does it sound to define these as zero if the system
has no binary file mode? This would avoid other conditionals.

Also, I've started using _FO_BINARY for fopen type functions.
This can be defined as "b" if binary has meaning, or just
defined no value if there is no binary mode, and the main
code stays clean. E.g. fopen(path, "w" _FO_BINARY);

I suppose other conditionals can't be entirely avoided.
I'm not real familiar with autoconf and configure, but some
assist here might be usefull. Maybe a flag, like
HAS_BINARY_FILE_MODE, would be useful.
Any conventions?

-ernie
-
For help on using this list, send a message to
"[email-masked]" with one line of text: "help".