1
0
Fork 0

use correct header for getpid()

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@1186 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 2012-12-06 11:47:52 +00:00
parent ad6cbbe3c3
commit e8600bb8e2
2 changed files with 7 additions and 5 deletions

View File

@ -24,7 +24,10 @@
#include "ext/standard/info.h"
#include "ext/standard/md5.h"
#ifdef ZEND_ENGINE_2_1
#include "ext/date/php_date.h"
# include "ext/date/php_date.h"
#endif
#ifdef ZEND_WIN32
# include <process.h>
#endif
#include "ext/standard/php_math.h"
#include "SAPI.h"
@ -3467,11 +3470,7 @@ static int xc_cacher_zend_startup(zend_extension *extension) /* {{{ */
}
xc_initized = 1;
xc_init_time = time(NULL);
#ifdef PHP_WIN32
xc_init_instance_id = GetCurrentProcessId();
#else
xc_init_instance_id = getpid();
#endif
#ifdef ZTS
xc_init_instance_subid = tsrm_thread_id();
#endif

View File

@ -3,6 +3,9 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#ifdef ZEND_WIN32
# include <process.h>
#endif
#ifndef ZEND_WIN32
typedef int HANDLE;