Date: 11/23/98
- Next message: Bug Database: "[PHP-DEV] Bug #887 Updated: Dosn't work at all ;-) Forget O_BINARY"
- Previous message: jim: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Monday November 23, 1998 @ 1:07
Author: jim
Update of /repository/php3/dbase
In directory asf:/u2/tmp/cvs-serv26811/dbase
Modified Files:
dbf.h dbf_head.c
Log Message:
Use O_BINARY on Win32. Fixes bug #887.
Index: php3/dbase/dbf.h
diff -c php3/dbase/dbf.h:1.3 php3/dbase/dbf.h:1.4
*** php3/dbase/dbf.h:1.3 Tue Oct 7 22:14:54 1997
--- php3/dbase/dbf.h Mon Nov 23 01:07:26 1998
***************
*** 24,29 ****
--- 24,34 ----
#include <unistd.h>
#endif
+ /* So we can use O_BINARY on non-Win32 systems. */
+ #ifndef O_BINARY
+ #define O_BINARY (0)
+ #endif
+
struct dbf_dhead {
char dbh_dbt; /* memo (dbt) file present */
char dbh_date[3]; /* last update YY, MM, DD */
Index: php3/dbase/dbf_head.c
diff -c php3/dbase/dbf_head.c:1.2 php3/dbase/dbf_head.c:1.3
*** php3/dbase/dbf_head.c:1.2 Fri Jan 23 23:15:14 1998
--- php3/dbase/dbf_head.c Mon Nov 23 01:07:27 1998
***************
*** 226,232 ****
dbhead_t *dbh;
cp = dp;
! if ((fd = open(cp, o_flags)) < 0) {
cp = (char *)malloc(256);
strcpy(cp, dp); strcat(cp, ".dbf");
if ((fd = open(cp, o_flags)) < 0) {
--- 226,232 ----
dbhead_t *dbh;
cp = dp;
! if ((fd = open(cp, o_flags|O_BINARY)) < 0) {
cp = (char *)malloc(256);
strcpy(cp, dp); strcat(cp, ".dbf");
if ((fd = open(cp, o_flags)) < 0) {
-- PHP Development Mailing List http://www.php.net/ To unsubscribe send an empty message to php-dev-unsubscribe <email protected> For help: php-dev-help <email protected>
- Next message: Bug Database: "[PHP-DEV] Bug #887 Updated: Dosn't work at all ;-) Forget O_BINARY"
- Previous message: jim: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

