]> granicus.if.org Git - php/commitdiff
fix int to void* cast on x64
authorAnatol Belski <ab@php.net>
Wed, 12 Nov 2014 10:00:35 +0000 (11:00 +0100)
committerAnatol Belski <ab@php.net>
Wed, 12 Nov 2014 16:57:15 +0000 (17:57 +0100)
sapi/cgi/fastcgi.c

index 0cd3096e4d3b84efc63ea16ca657265a2db8c96a..7c50ef227064e5108137682d8b2a1da228f10f12 100644 (file)
@@ -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 {