cvs: php-src /main main.c
| From: | Dmitry Stogov | Date: | Thu, 23 Nov 2006 08:37:34 +0000 |
| Subject: | cvs: php-src /main main.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-41696@lists.php.net to get a copy of this message | ||
dmitry Thu Nov 23 08:37:34 2006 UTC
Modified files:
/php-src/main main.c
Log:
Fixed bug #39548 (ZMSG_LOG_SCRIPT_NAME not routed to OutputDebugString() on Windows)
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.708&r2=1.709&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.708 php-src/main/main.c:1.709
--- php-src/main/main.c:1.708 Fri Nov 17 11:41:13 2006
+++ php-src/main/main.c Thu Nov 23 08:37:34 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.708 2006/11/17 11:41:13 dmitry Exp $ */
+/* $Id: main.c,v 1.709 2006/11/23 08:37:34 dmitry Exp $ */
/* {{{ includes
*/
@@ -1114,12 +1114,18 @@
struct tm *ta, tmbuf;
time_t curtime;
char *datetime_str, asctimebuf[52];
+ char memory_leak_buf[4096];
time(&curtime);
ta = php_localtime_r(&curtime, &tmbuf);
datetime_str = php_asctime_r(ta, asctimebuf);
datetime_str[strlen(datetime_str)-1]=0; /* get rid of the trailing newline */
- fprintf(stderr, "[%s] Script: '%s'\n", datetime_str,
SAFE_FILENAME(SG(request_info).path_translated));
+ snprintf(memory_leak_buf, sizeof(memory_leak_buf), "[%s] Script: '%s'\n",
datetime_str, SAFE_FILENAME(SG(request_info).path_translated));
+# if defined(PHP_WIN32)
+ OutputDebugString(memory_leak_buf);
+# else
+ fprintf(stderr, "%s", memory_leak_buf);
+# endif
}
break;
}