rrichards               Wed Apr 18 09:48:07 2007 UTC

  Modified files:              
    /php-src/win32/build        config.w32 
    /php-src/ext/standard       config.w32 
    /php-src/main       main.c 
  Log:
  MFB: add file locking under windows
  change win build to use common clock compat files
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.65&r2=1.66&diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.65 php-src/win32/build/config.w32:1.66
--- php-src/win32/build/config.w32:1.65 Mon Apr 16 09:43:53 2007
+++ php-src/win32/build/config.w32      Wed Apr 18 09:48:07 2007
@@ -1,5 +1,5 @@
 // vim:ft=javascript
-// $Id: config.w32,v 1.65 2007/04/16 09:43:53 dmitry Exp $
+// $Id: config.w32,v 1.66 2007/04/18 09:48:07 rrichards Exp $
 // "Master" config file; think of it as a configure.in
 // equivalent.
 
@@ -329,7 +329,7 @@
 ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c 
plain_wrapper.c \
        userspace.c transports.c xp_socket.c mmap.c unicode_filter.c 
glob_wrapper.c");
 
-ADD_SOURCES("win32", "crypt_win32.c flock.c glob.c md5crypt.c readdir.c \
+ADD_SOURCES("win32", "crypt_win32.c glob.c md5crypt.c readdir.c \
        registry.c select.c sendmail.c time.c wfile.c winutil.c wsyslog.c 
globals.c");
 
 ADD_SOURCES("regex", "regcomp.c regerror.c regexec.c regfree.c");
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/config.w32?r1=1.6&r2=1.7&diff_format=u
Index: php-src/ext/standard/config.w32
diff -u php-src/ext/standard/config.w32:1.6 php-src/ext/standard/config.w32:1.7
--- php-src/ext/standard/config.w32:1.6 Wed Jan  4 12:57:04 2006
+++ php-src/ext/standard/config.w32     Wed Apr 18 09:48:07 2007
@@ -1,5 +1,5 @@
 // vim:ft=javascript
-// $Id: config.w32,v 1.6 2006/01/04 12:57:04 derick Exp $
+// $Id: config.w32,v 1.7 2007/04/18 09:48:07 rrichards Exp $
 
 ARG_WITH("config-file-scan-dir", "Dir to check for additional php ini files", 
"");
 AC_DEFINE("PHP_CONFIG_FILE_SCAN_DIR", PHP_CONFIG_FILE_SCAN_DIR);
@@ -16,5 +16,5 @@
        url_scanner_ex.c ftp_fopen_wrapper.c http_fopen_wrapper.c \
        php_fopen_wrapper.c credits.c css.c var_unserializer.c ftok.c sha1.c \
        user_filters.c uuencode.c filters.c proc_open.c \
-       streamsfuncs.c http.c", false /* never shared */);
+       streamsfuncs.c http.c flock_compat.c", false /* never shared */);
 
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.726&r2=1.727&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.726 php-src/main/main.c:1.727
--- php-src/main/main.c:1.726   Mon Apr 16 09:43:52 2007
+++ php-src/main/main.c Wed Apr 18 09:48:07 2007
@@ -18,7 +18,7 @@
    +----------------------------------------------------------------------+
 */
 
-/* $Id: main.c,v 1.726 2007/04/16 09:43:52 dmitry Exp $ */
+/* $Id: main.c,v 1.727 2007/04/18 09:48:07 rrichards Exp $ */
 
 /* {{{ includes
  */
@@ -62,8 +62,8 @@
 #include "ext/standard/credits.h"
 #ifdef PHP_WIN32
 #include <io.h>
-#include <fcntl.h>
 #include "win32/php_registry.h"
+#include "ext/standard/flock_compat.h"
 #endif
 #include "php_syslog.h"
 #include "Zend/zend_exceptions.h"
@@ -461,8 +461,11 @@
                        time(&error_time);
                        strftime(error_time_str, sizeof(error_time_str), 
"%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf));
                        len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, 
log_message, PHP_EOL);
+#ifdef PHP_WIN32
+                       php_flock(fd, 2);
+#endif
                        write(fd, tmp, len);
-                       efree(tmp); 
+                       efree(tmp);
                        close(fd);
                        return;
                }

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

Reply via email to