com php-src: fix int to void* cast on x64: sapi/cgi/fastcgi.c
| From: | Anatol Belski | Date: | Wed, 12 Nov 2014 16:57:15 +0000 |
| Subject: | com php-src: fix int to void* cast on x64: sapi/cgi/fastcgi.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-83068@lists.php.net to get a copy of this message | ||
Commit: 54868c84cebec2176208319ebbdbc92b4d7ff5a3
Author: Anatol Belski <ab@php.net> Wed, 12 Nov 2014 11:00:35 +0100
Parents: 55e01cda7a5e07e3c322f32ab249cf5da2c8d226
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=54868c84cebec2176208319ebbdbc92b4d7ff5a3
Log:
fix int to void* cast on x64
Changed paths:
M sapi/cgi/fastcgi.c
Diff:
diff --git a/sapi/cgi/fastcgi.c b/sapi/cgi/fastcgi.c
index 0cd3096..7c50ef2 100644
--- a/sapi/cgi/fastcgi.c
+++ b/sapi/cgi/fastcgi.c
@@ -435,7 +435,9 @@ int fcgi_init(void)
str = getenv("_FCGI_SHUTDOWN_EVENT_");
if (str != NULL) {
- HANDLE shutdown_event = (HANDLE) atoi(str);
+ zend_long ev;
+ ZEND_ATOL(ev, str);
+ HANDLE shutdown_event = (HANDLE) ev;
if (!CreateThread(NULL, 0, fcgi_shutdown_thread,
shutdown_event, 0, NULL)) {
return -1;
@@ -443,7 +445,9 @@ int fcgi_init(void)
}
str = getenv("_FCGI_MUTEX_");
if (str != NULL) {
- fcgi_accept_mutex = (HANDLE) atoi(str);
+ zend_long mt;
+ ZEND_ATOL(mt, str);
+ fcgi_accept_mutex = (HANDLE) mt;
}
return is_fastcgi = 1;
} else {