[PHP-CVS] cvs: php-src(PHP_4_3) /ext/dba dba_db2.c dba_db3.c dba_db4.c

2004-05-09 Thread Marcus Boerger
helly   Sun May  9 21:47:51 2004 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/dbadba_db2.c dba_db3.c dba_db4.c 
  Log:
  MFH Fix problems with c mode
  
http://cvs.php.net/diff.php/php-src/ext/dba/dba_db2.c?r1=1.30.2.5r2=1.30.2.6ty=u
Index: php-src/ext/dba/dba_db2.c
diff -u php-src/ext/dba/dba_db2.c:1.30.2.5 php-src/ext/dba/dba_db2.c:1.30.2.6
--- php-src/ext/dba/dba_db2.c:1.30.2.5  Thu Nov 13 03:59:16 2003
+++ php-src/ext/dba/dba_db2.c   Sun May  9 21:47:51 2004
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db2.c,v 1.30.2.5 2003/11/13 08:59:16 helly Exp $ */
+/* $Id: dba_db2.c,v 1.30.2.6 2004/05/10 01:47:51 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -53,6 +53,10 @@
struct stat check_stat;
int s = VCWD_STAT(info-path, check_stat);
 
+   if (!s  !check_stat.st_size) {
+   info-mode = DBA_TRUNC; /* force truncate */
+   }
+
type = info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
s ? DB_BTREE : DB_UNKNOWN;
http://cvs.php.net/diff.php/php-src/ext/dba/dba_db3.c?r1=1.21.2.7r2=1.21.2.8ty=u
Index: php-src/ext/dba/dba_db3.c
diff -u php-src/ext/dba/dba_db3.c:1.21.2.7 php-src/ext/dba/dba_db3.c:1.21.2.8
--- php-src/ext/dba/dba_db3.c:1.21.2.7  Thu Nov 13 03:59:16 2003
+++ php-src/ext/dba/dba_db3.c   Sun May  9 21:47:51 2004
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db3.c,v 1.21.2.7 2003/11/13 08:59:16 helly Exp $ */
+/* $Id: dba_db3.c,v 1.21.2.8 2004/05/10 01:47:51 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -62,9 +62,13 @@
struct stat check_stat;
int s = VCWD_STAT(info-path, check_stat);
 
-   type =  info-mode == DBA_READER ? DB_UNKNOWN :
+   if (!s  !check_stat.st_size) {
+   info-mode = DBA_TRUNC; /* force truncate */
+   }
+
+   type = info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   s? DB_BTREE : DB_UNKNOWN;
+   s ? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 
http://cvs.php.net/diff.php/php-src/ext/dba/dba_db4.c?r1=1.6.2.5r2=1.6.2.6ty=u
Index: php-src/ext/dba/dba_db4.c
diff -u php-src/ext/dba/dba_db4.c:1.6.2.5 php-src/ext/dba/dba_db4.c:1.6.2.6
--- php-src/ext/dba/dba_db4.c:1.6.2.5   Thu Nov 13 03:59:16 2003
+++ php-src/ext/dba/dba_db4.c   Sun May  9 21:47:51 2004
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db4.c,v 1.6.2.5 2003/11/13 08:59:16 helly Exp $ */
+/* $Id: dba_db4.c,v 1.6.2.6 2004/05/10 01:47:51 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -62,9 +62,13 @@
struct stat check_stat;
int s = VCWD_STAT(info-path, check_stat);
 
-   type =  info-mode == DBA_READER ? DB_UNKNOWN :
+   if (!s  !check_stat.st_size) {
+   info-mode = DBA_TRUNC; /* force truncate */
+   }
+
+   type = info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   s? DB_BTREE : DB_UNKNOWN;
+   s ? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/dba dba_db2.c dba_db3.c dba_db4.c /ext/dba/tests dba007.phpt

2003-11-13 Thread Marcus Boerger
helly   Thu Nov 13 03:59:18 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/dbadba_db2.c dba_db3.c dba_db4.c 
/php-src/ext/dba/tests  dba007.phpt 
  Log:
  MFH Bugfix #25794: Cannot open existing hash db3 file with write
  
Index: php-src/ext/dba/dba_db2.c
diff -u php-src/ext/dba/dba_db2.c:1.30.2.4 php-src/ext/dba/dba_db2.c:1.30.2.5
--- php-src/ext/dba/dba_db2.c:1.30.2.4  Thu Jul  3 07:23:27 2003
+++ php-src/ext/dba/dba_db2.c   Thu Nov 13 03:59:16 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db2.c,v 1.30.2.4 2003/07/03 11:23:27 helly Exp $ */
+/* $Id: dba_db2.c,v 1.30.2.5 2003/11/13 08:59:16 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -55,7 +55,7 @@
 
type = info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   !s ? DB_BTREE : DB_UNKNOWN;
+   s ? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 
Index: php-src/ext/dba/dba_db3.c
diff -u php-src/ext/dba/dba_db3.c:1.21.2.6 php-src/ext/dba/dba_db3.c:1.21.2.7
--- php-src/ext/dba/dba_db3.c:1.21.2.6  Thu Jul  3 07:23:27 2003
+++ php-src/ext/dba/dba_db3.c   Thu Nov 13 03:59:16 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db3.c,v 1.21.2.6 2003/07/03 11:23:27 helly Exp $ */
+/* $Id: dba_db3.c,v 1.21.2.7 2003/11/13 08:59:16 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -64,7 +64,7 @@
 
type =  info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   !s? DB_BTREE : DB_UNKNOWN;
+   s? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 
Index: php-src/ext/dba/dba_db4.c
diff -u php-src/ext/dba/dba_db4.c:1.6.2.4 php-src/ext/dba/dba_db4.c:1.6.2.5
--- php-src/ext/dba/dba_db4.c:1.6.2.4   Thu Jul  3 07:23:27 2003
+++ php-src/ext/dba/dba_db4.c   Thu Nov 13 03:59:16 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db4.c,v 1.6.2.4 2003/07/03 11:23:27 helly Exp $ */
+/* $Id: dba_db4.c,v 1.6.2.5 2003/11/13 08:59:16 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -64,7 +64,7 @@
 
type =  info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   !s? DB_BTREE : DB_UNKNOWN;
+   s? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 
Index: php-src/ext/dba/tests/dba007.phpt
diff -u php-src/ext/dba/tests/dba007.phpt:1.2.2.2 
php-src/ext/dba/tests/dba007.phpt:1.2.2.3
--- php-src/ext/dba/tests/dba007.phpt:1.2.2.2   Thu Jun 19 11:48:18 2003
+++ php-src/ext/dba/tests/dba007.phpt   Thu Nov 13 03:59:17 2003
@@ -42,4 +42,4 @@
   string(%d) %s/dba/tests/test1.dbm
   [%d]=
   string(%d) %s/dba/tests/test2.dbm
-}
\ No newline at end of file
+}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_4_3) /ext/dba dba_db2.c dba_db3.c dba_db4.c

2003-07-03 Thread Marcus Boerger
helly   Thu Jul  3 07:23:27 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/dbadba_db2.c dba_db3.c dba_db4.c 
  Log:
  MFH: Fix open mode (noticed by FutureQuest, Inc.)
  
Index: php-src/ext/dba/dba_db2.c
diff -u php-src/ext/dba/dba_db2.c:1.30.2.3 php-src/ext/dba/dba_db2.c:1.30.2.4
--- php-src/ext/dba/dba_db2.c:1.30.2.3  Fri Jan 31 15:10:11 2003
+++ php-src/ext/dba/dba_db2.c   Thu Jul  3 07:23:27 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db2.c,v 1.30.2.3 2003/01/31 20:10:11 helly Exp $ */
+/* $Id: dba_db2.c,v 1.30.2.4 2003/07/03 11:23:27 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -55,7 +55,7 @@
 
type = info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   s ? DB_BTREE : DB_UNKNOWN;
+   !s ? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 
Index: php-src/ext/dba/dba_db3.c
diff -u php-src/ext/dba/dba_db3.c:1.21.2.5 php-src/ext/dba/dba_db3.c:1.21.2.6
--- php-src/ext/dba/dba_db3.c:1.21.2.5  Fri Jan 31 15:10:11 2003
+++ php-src/ext/dba/dba_db3.c   Thu Jul  3 07:23:27 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db3.c,v 1.21.2.5 2003/01/31 20:10:11 helly Exp $ */
+/* $Id: dba_db3.c,v 1.21.2.6 2003/07/03 11:23:27 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -64,7 +64,7 @@
 
type =  info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   s? DB_BTREE : DB_UNKNOWN;
+   !s? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 
Index: php-src/ext/dba/dba_db4.c
diff -u php-src/ext/dba/dba_db4.c:1.6.2.3 php-src/ext/dba/dba_db4.c:1.6.2.4
--- php-src/ext/dba/dba_db4.c:1.6.2.3   Fri Jan 31 15:10:11 2003
+++ php-src/ext/dba/dba_db4.c   Thu Jul  3 07:23:27 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_db4.c,v 1.6.2.3 2003/01/31 20:10:11 helly Exp $ */
+/* $Id: dba_db4.c,v 1.6.2.4 2003/07/03 11:23:27 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -64,7 +64,7 @@
 
type =  info-mode == DBA_READER ? DB_UNKNOWN :
info-mode == DBA_TRUNC ? DB_BTREE :
-   s? DB_BTREE : DB_UNKNOWN;
+   !s? DB_BTREE : DB_UNKNOWN;
  
gmode = info-mode == DBA_READER ? DB_RDONLY :
(info-mode == DBA_CREAT  s) ? DB_CREATE : 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php