[PHP-CVS] cvs: php-src(PHP_4_3) /ext/dba dba_flatfile.c /ext/dba/libinifile inifile.c

2003-12-17 Thread Marcus Boerger
helly   Wed Dec 17 04:02:08 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/dbadba_flatfile.c 
/php-src/ext/dba/libinifile inifile.c 
  Log:
  MFH: Fix warnings
  
Index: php-src/ext/dba/dba_flatfile.c
diff -u php-src/ext/dba/dba_flatfile.c:1.8.2.5 php-src/ext/dba/dba_flatfile.c:1.8.2.6
--- php-src/ext/dba/dba_flatfile.c:1.8.2.5  Tue Dec 16 16:41:57 2003
+++ php-src/ext/dba/dba_flatfile.c  Wed Dec 17 04:02:06 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_flatfile.c,v 1.8.2.5 2003/12/16 21:41:57 helly Exp $ */
+/* $Id: dba_flatfile.c,v 1.8.2.6 2003/12/17 09:02:06 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -41,7 +41,10 @@
 
 DBA_OPEN_FUNC(flatfile)
 {
-   int fd, flags;
+   int fd;
+#ifdef F_SETFL
+   int flags;
+#endif
 
if (info-mode != DBA_READER) {
if (SUCCESS != php_stream_cast(info-fp, PHP_STREAM_AS_FD, (void*)fd, 
1)) {
Index: php-src/ext/dba/libinifile/inifile.c
diff -u php-src/ext/dba/libinifile/inifile.c:1.6.2.2 
php-src/ext/dba/libinifile/inifile.c:1.6.2.3
--- php-src/ext/dba/libinifile/inifile.c:1.6.2.2Wed Jul 16 16:56:06 2003
+++ php-src/ext/dba/libinifile/inifile.cWed Dec 17 04:02:07 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: inifile.c,v 1.6.2.2 2003/07/16 20:56:06 helly Exp $ */
+/* $Id: inifile.c,v 1.6.2.3 2003/12/17 09:02:07 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -44,7 +44,7 @@
 /* {{{ inifile_version */
 char *inifile_version() 
 {
-   return 1.0, $Revision: 1.6.2.2 $;
+   return 1.0, $Revision: 1.6.2.3 $;
 }
 /* }}} */ 
 
@@ -499,7 +499,7 @@
ret = FAILURE;
} else {
php_stream_seek(dba-fp, 0, SEEK_END);
-   if (pos_grp_next != php_stream_tell(dba-fp)) {
+   if (pos_grp_next != (size_t)php_stream_tell(dba-fp)) {
php_stream_seek(dba-fp, pos_grp_next, SEEK_SET);
if (!php_stream_copy_to_stream(dba-fp, fp_tmp, 
PHP_STREAM_COPY_ALL)) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Could not copy remainder to temporary stream);

-- 
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_flatfile.c

2003-12-16 Thread Marcus Boerger
helly   Tue Dec 16 16:41:57 2003 EDT

  Modified files:  (Branch: PHP_4_3)
/php-src/ext/dbadba_flatfile.c 
  Log:
  MFH: Fix winbuild
  
Index: php-src/ext/dba/dba_flatfile.c
diff -u php-src/ext/dba/dba_flatfile.c:1.8.2.4 php-src/ext/dba/dba_flatfile.c:1.8.2.5
--- php-src/ext/dba/dba_flatfile.c:1.8.2.4  Sun Dec 14 17:20:04 2003
+++ php-src/ext/dba/dba_flatfile.c  Tue Dec 16 16:41:57 2003
@@ -16,7 +16,7 @@
+--+
  */
 
-/* $Id: dba_flatfile.c,v 1.8.2.4 2003/12/14 22:20:04 helly Exp $ */
+/* $Id: dba_flatfile.c,v 1.8.2.5 2003/12/16 21:41:57 helly Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -48,8 +48,13 @@
php_error_docref(NULL TSRMLS_CC, E_WARNING, Could not cast 
stream);
return FAILURE;
}
+#ifdef F_SETFL
+   /* Needed becasue some systems do not allow to write to the original 
+* file contents with O_APPEND being set.
+*/
flags = fcntl(fd, F_SETFL);
fcntl(fd, F_SETFL, flags  ~O_APPEND);
+#endif
}
 
info-dbf = pemalloc(sizeof(flatfile), info-flagsDBA_PERSISTENT);

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