From 5799a2d59de8a0c00d592adcf166acf1eced5e1f Mon Sep 17 00:00:00 2001 From: Frank Warmerdam Date: Fri, 24 Sep 1999 03:05:12 +0000 Subject: [PATCH] set O_BINARY in open(), for Cygwin for instance. --- libtiff/tif_unix.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/libtiff/tif_unix.c b/libtiff/tif_unix.c index 3f49a06f..f848369e 100644 --- a/libtiff/tif_unix.c +++ b/libtiff/tif_unix.c @@ -1,4 +1,4 @@ -/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_unix.c,v 1.1 1999-07-27 21:50:27 mike Exp $ */ +/* $Header: /cvs/maptools/cvsroot/libtiff/libtiff/tif_unix.c,v 1.2 1999-09-24 03:05:12 warmerda Exp $ */ /* * Copyright (c) 1988-1997 Sam Leffler @@ -139,6 +139,12 @@ TIFFOpen(const char* name, const char* mode) m = _TIFFgetMode(mode, module); if (m == -1) return ((TIFF*)0); + +/* for cygwin */ +#ifdef O_BINARY + m |= O_BINARY; +#endif + #ifdef _AM29K fd = open(name, m); #else