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

index fa1232779ad7d9566b33adf1b19cad46383c7b18..1cd82712f6e24b49c859823b88fafd1c0b06064b 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);