From: rnv Date: Thu, 24 Oct 2013 08:36:05 +0000 (+0000) Subject: Open SAUV file in binary mode on WINDOWS to fix the "0022370 [CEA 970] Bug reading... X-Git-Tag: V7_3_1b1~86 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=2604897932a567b755d2071e164870fba0ace02d;p=tools%2Fmedcoupling.git Open SAUV file in binary mode on WINDOWS to fix the "0022370 [CEA 970] Bug reading XDR sauv file under Windows 32 bits" issue. --- diff --git a/src/MEDLoader/SauvMedConvertor.cxx b/src/MEDLoader/SauvMedConvertor.cxx index 2d4075deb..8578ffb7a 100644 --- a/src/MEDLoader/SauvMedConvertor.cxx +++ b/src/MEDLoader/SauvMedConvertor.cxx @@ -2045,7 +2045,11 @@ bool XDRReader::open() { bool xdr_ok = false; #ifdef HAS_XDR +#ifdef WIN32 + if ((_xdrs_file = ::fopen(_fileName.c_str(), "rb"))) +#else if ((_xdrs_file = ::fopen(_fileName.c_str(), "r"))) +#endif { _xdrs = (XDR *)malloc(sizeof(XDR)); xdrstdio_create((XDR*)_xdrs, _xdrs_file, XDR_DECODE);