]> granicus.if.org Git - php/commitdiff
MFH: Fix winbuild
authorMarcus Boerger <helly@php.net>
Tue, 16 Dec 2003 21:41:57 +0000 (21:41 +0000)
committerMarcus Boerger <helly@php.net>
Tue, 16 Dec 2003 21:41:57 +0000 (21:41 +0000)
ext/dba/dba_flatfile.c

index 4444f2c6e58fddb840b224cacca7f2694c44e9be..576268ae0640d92507c06e55bce4d2b909868744 100644 (file)
@@ -48,8 +48,13 @@ DBA_OPEN_FUNC(flatfile)
                        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->flags&DBA_PERSISTENT);