cvs: php4 /ext/oci8 oci8.c
| From: | Thies C. Arntzen | Date: | Mon, 07 Aug 2000 12:01:52 +0000 |
| Subject: | cvs: php4 /ext/oci8 oci8.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1086@lists.php.net to get a copy of this message | ||
thies Mon Aug 7 05:01:52 2000 EDT
Modified files:
/php4/ext/oci8 oci8.c
Log:
fixed binary mode for Win32
Index: php4/ext/oci8/oci8.c
diff -u php4/ext/oci8/oci8.c:1.93 php4/ext/oci8/oci8.c:1.94
--- php4/ext/oci8/oci8.c:1.93 Mon Aug 7 04:34:48 2000
+++ php4/ext/oci8/oci8.c Mon Aug 7 05:01:52 2000
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: oci8.c,v 1.93 2000/08/07 11:34:48 thies Exp $ */
+/* $Id: oci8.c,v 1.94 2000/08/07 12:01:52 thies Exp $ */
/* TODO list:
*
@@ -80,6 +80,9 @@
#include <fcntl.h>
+#ifndef O_BINARY
+#define O_BINARY 0
+#endif
/* }}} */
/* {{{ thread safety stuff */
@@ -487,7 +490,7 @@
php_info_print_table_start();
php_info_print_table_row(2, "OCI8 Support", "enabled");
- php_info_print_table_row(2, "Revision", "$Revision: 1.93 $");
+ php_info_print_table_row(2, "Revision", "$Revision: 1.94 $");
#ifndef PHP_WIN32
php_info_print_table_row(2, "Oracle Version", PHP_OCI8_VERSION );
php_info_print_table_row(2, "Compile-time ORACLE_HOME", PHP_OCI8_DIR );
@@ -2698,7 +2701,7 @@
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 @@
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;
}