From: Thies C. Arntzen Date: Mon, 7 Aug 2000 12:01:52 +0000 (+0000) Subject: fixed binary mode for Win32 X-Git-Tag: php-4.0.2RC1~201 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e05fbd00c2d63b37c4c3de14dc02e78b40ea310d;p=php fixed binary mode for Win32 --- diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 507acd718d..99708205a9 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -80,6 +80,9 @@ static zend_class_entry *oci_lob_class_entry_ptr; #include +#ifndef O_BINARY +#define O_BINARY 0 +#endif /* }}} */ /* {{{ thread safety stuff */ @@ -2698,7 +2701,7 @@ PHP_FUNCTION(ocisavelobfile) filename = (*arg)->value.str.val; - if ((fp = V_OPEN((filename, O_RDONLY))) == -1) { + if ((fp = V_OPEN((filename, O_RDONLY|O_BINARY))) == -1) { php_error(E_WARNING, "Can't open file %s", filename); RETURN_FALSE; } @@ -2820,7 +2823,7 @@ PHP_FUNCTION(ociwritelobtofile) goto bail; } - if ((fp = V_OPEN((filename,O_CREAT|O_TRUNC|O_WRONLY))) == -1) { + if ((fp = V_OPEN((filename,O_CREAT | O_RDWR | O_BINARY | O_TRUNC, 0600))) == -1) { php_error(E_WARNING, "Can't create file %s", filename); goto bail; }