diff options
author | Dmitry Stogov <dmitry@php.net> | 2007-04-16 08:09:56 +0000 |
---|---|---|
committer | Dmitry Stogov <dmitry@php.net> | 2007-04-16 08:09:56 +0000 |
commit | e1814f0dbe3037970966c82d5bf3e97fd5f6d5a8 (patch) | |
tree | a49deb50f7f0c88fa52eb3c3ffa06ba1fcae69b8 /TSRM | |
parent | f088268f910a764ccbd2174cd3eb051c74dc82d5 (diff) | |
download | php-git-e1814f0dbe3037970966c82d5bf3e97fd5f6d5a8.tar.gz |
WIN64 support
Diffstat (limited to 'TSRM')
-rw-r--r-- | TSRM/TSRM.h | 8 | ||||
-rw-r--r-- | TSRM/tsrm_win32.c | 4 |
2 files changed, 10 insertions, 2 deletions
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h index 5e3411b8f7..db24798be1 100644 --- a/TSRM/TSRM.h +++ b/TSRM/TSRM.h @@ -30,6 +30,14 @@ # define TSRM_API #endif +#ifdef _WIN64 +typedef unsigned __int64 tsrm_intptr_t; +typedef __int64 tsrm_uintptr_t; +#else +typedef long tsrm_intptr_t; +typedef unsigned long tsrm_uintptr_t; +#endif + /* Only compile multi-threading functions if we're in ZTS mode */ #ifdef ZTS diff --git a/TSRM/tsrm_win32.c b/TSRM/tsrm_win32.c index ae9ea312f2..f6d0c79010 100644 --- a/TSRM/tsrm_win32.c +++ b/TSRM/tsrm_win32.c @@ -228,10 +228,10 @@ TSRM_API FILE *popen_ex(const char *command, const char *type, const char *cwd, proc = process_get(NULL TSRMLS_CC); if (read) { - fno = _open_osfhandle((long)in, _O_RDONLY | mode); + fno = _open_osfhandle((tsrm_intptr_t)in, _O_RDONLY | mode); CloseHandle(out); } else { - fno = _open_osfhandle((long)out, _O_WRONLY | mode); + fno = _open_osfhandle((tsrm_intptr_t)out, _O_WRONLY | mode); CloseHandle(in); } |