From: err AT raelity DOT com (Ernie Rael) Subject: binary mode handling 8 Jan 1997 16:40:58 -0800 Sender: daemon AT cygnus DOT com Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: <32dc227c.73255828.cygnus.gnu-win32@mail.scruznet.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Original-To: gnu-win32 AT cygnus DOT com X-Mailer: Forte Agent .99g/32.339 Original-Sender: owner-gnu-win32 AT cygnus DOT com 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 "gnu-win32-request AT cygnus DOT com" with one line of text: "help".