CVS update: php3/dbase

From: Date: Mon, 23 Nov 1998 06:07:27 +0000
Subject: CVS update: php3/dbase
Groups: php.dev 
Request: Send a blank email to php-dev+get-2538@lists.php.net to get a copy of this message
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@lists.php.net For help: php-dev-help@lists.php.net

« previous php.dev (#2538) next »