dmitry Mon Apr 16 08:09:57 2007 UTC
Modified files: (Branch: PHP_5_2)
/TSRM TSRM.h tsrm_win32.c
/ZendEngine2 zend_API.c zend_API.h zend_alloc.c
zend_builtin_functions.c zend_compile.c zend_execute.c
zend_execute.h zend_execute_API.c zend_ini.c
zend_opcode.c zend_types.h zend_vm_def.h
zend_vm_execute.h
/php-src/ext/standard proc_open.c
/php-src/main SAPI.c main.c php_ini.c
/php-src/main/streams plain_wrapper.c
/php-src/win32 select.c
/php-src/win32/build config.w32
Log:
WIN64 support
http://cvs.php.net/viewvc.cgi/TSRM/TSRM.h?r1=1.50.2.2.2.2&r2=1.50.2.2.2.3&diff_format=u
Index: TSRM/TSRM.h
diff -u TSRM/TSRM.h:1.50.2.2.2.2 TSRM/TSRM.h:1.50.2.2.2.3
--- TSRM/TSRM.h:1.50.2.2.2.2 Thu Feb 15 19:11:48 2007
+++ TSRM/TSRM.h Mon Apr 16 08:09:54 2007
@@ -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
http://cvs.php.net/viewvc.cgi/TSRM/tsrm_win32.c?r1=1.27.2.1.2.6&r2=1.27.2.1.2.7&diff_format=u
Index: TSRM/tsrm_win32.c
diff -u TSRM/tsrm_win32.c:1.27.2.1.2.6 TSRM/tsrm_win32.c:1.27.2.1.2.7
--- TSRM/tsrm_win32.c:1.27.2.1.2.6 Mon Apr 2 20:42:44 2007
+++ TSRM/tsrm_win32.c Mon Apr 16 08:09:54 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: tsrm_win32.c,v 1.27.2.1.2.6 2007/04/02 20:42:44 stas Exp $ */
+/* $Id: tsrm_win32.c,v 1.27.2.1.2.7 2007/04/16 08:09:54 dmitry Exp $ */
#include <stdio.h>
#include <fcntl.h>
@@ -228,10 +228,10 @@
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);
}
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.c?r1=1.296.2.27.2.27&r2=1.296.2.27.2.28&diff_format=u
Index: ZendEngine2/zend_API.c
diff -u ZendEngine2/zend_API.c:1.296.2.27.2.27
ZendEngine2/zend_API.c:1.296.2.27.2.28
--- ZendEngine2/zend_API.c:1.296.2.27.2.27 Mon Apr 9 07:30:09 2007
+++ ZendEngine2/zend_API.c Mon Apr 16 08:09:54 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.c,v 1.296.2.27.2.27 2007/04/09 07:30:09 tony2001 Exp $ */
+/* $Id: zend_API.c,v 1.296.2.27.2.28 2007/04/16 08:09:54 dmitry Exp $ */
#include "zend.h"
#include "zend_execute.h"
@@ -44,7 +44,7 @@
TSRMLS_FETCH();
p = EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
if (param_count>arg_count) {
return FAILURE;
@@ -82,7 +82,7 @@
zval *param_ptr;
p = EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
if (param_count>arg_count) {
return FAILURE;
@@ -122,7 +122,7 @@
TSRMLS_FETCH();
p = EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
if (param_count>arg_count) {
return FAILURE;
@@ -145,7 +145,7 @@
int arg_count;
p = EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
if (param_count>arg_count) {
return FAILURE;
@@ -187,7 +187,7 @@
int arg_count;
p = EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
if (param_count>arg_count) {
return FAILURE;
@@ -698,7 +698,7 @@
}
p = EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
if (num_args > arg_count) {
zend_error(E_WARNING, "%s(): could not obtain parameters for
parsing",
@@ -878,7 +878,7 @@
zend_update_class_constants(class_type->parent
TSRMLS_CC);
}
#if ZTS
-
ALLOC_HASHTABLE(CG(static_members)[(long)(class_type->static_members)]);
+
ALLOC_HASHTABLE(CG(static_members)[(zend_intptr_t)(class_type->static_members)]);
#else
ALLOC_HASHTABLE(class_type->static_members);
#endif
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_API.h?r1=1.207.2.8.2.7&r2=1.207.2.8.2.8&diff_format=u
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.207.2.8.2.7
ZendEngine2/zend_API.h:1.207.2.8.2.8
--- ZendEngine2/zend_API.h:1.207.2.8.2.7 Mon Jan 1 09:35:45 2007
+++ ZendEngine2/zend_API.h Mon Apr 16 08:09:54 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.h,v 1.207.2.8.2.7 2007/01/01 09:35:45 sebastian Exp $ */
+/* $Id: zend_API.h,v 1.207.2.8.2.8 2007/04/16 08:09:54 dmitry Exp $ */
#ifndef ZEND_API_H
#define ZEND_API_H
@@ -160,7 +160,7 @@
INIT_OVERLOADED_CLASS_ENTRY_EX(class_container, class_name, functions,
handle_fcall, handle_propget, handle_propset, NULL, NULL)
#ifdef ZTS
-# define CE_STATIC_MEMBERS(ce)
(((ce)->type==ZEND_USER_CLASS)?(ce)->static_members:CG(static_members)[(long)(ce)->static_members])
+# define CE_STATIC_MEMBERS(ce)
(((ce)->type==ZEND_USER_CLASS)?(ce)->static_members:CG(static_members)[(zend_intptr_t)(ce)->static_members])
#else
# define CE_STATIC_MEMBERS(ce) ((ce)->static_members)
#endif
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_alloc.c?r1=1.144.2.3.2.40&r2=1.144.2.3.2.41&diff_format=u
Index: ZendEngine2/zend_alloc.c
diff -u ZendEngine2/zend_alloc.c:1.144.2.3.2.40
ZendEngine2/zend_alloc.c:1.144.2.3.2.41
--- ZendEngine2/zend_alloc.c:1.144.2.3.2.40 Mon Apr 9 15:30:20 2007
+++ ZendEngine2/zend_alloc.c Mon Apr 16 08:09:54 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.c,v 1.144.2.3.2.40 2007/04/09 15:30:20 dmitry Exp $ */
+/* $Id: zend_alloc.c,v 1.144.2.3.2.41 2007/04/16 08:09:54 dmitry Exp $ */
#include "zend.h"
#include "zend_alloc.h"
@@ -50,6 +50,16 @@
# define ZEND_MM_COOKIES ZEND_DEBUG
#endif
+#ifdef _WIN64
+# define PTR_FMT "0x%0.16I64x"
+/*
+#elif sizeof(long) == 8
+# define PTR_FMT "0x%0.16lx"
+*/
+#else
+# define PTR_FMT "0x%0.8lx"
+#endif
+
#if ZEND_DEBUG
void zend_debug_alloc_output(char *format, ...)
{
@@ -1180,7 +1190,7 @@
repeated = zend_mm_find_leaks(segment, p);
total += 1 + repeated;
if (repeated) {
-
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void *)repeated);
+
zend_message_dispatcher(ZMSG_MEMORY_LEAK_REPEATED, (void
*)(zend_uintptr_t)repeated);
}
#if ZEND_MM_CACHE
} else if (p->magic == MEM_BLOCK_CACHED) {
@@ -1221,7 +1231,7 @@
if (!silent) {
zend_message_dispatcher(ZMSG_LOG_SCRIPT_NAME, NULL);
zend_debug_alloc_output("---------------------------------------\n");
- zend_debug_alloc_output("%s(%d) : Block 0x%0.8lX status:\n"
ZEND_FILE_LINE_RELAY_CC, (long) ptr);
+ zend_debug_alloc_output("%s(%d) : Block "PTR_FMT" status:\n"
ZEND_FILE_LINE_RELAY_CC, ptr);
if (__zend_orig_filename) {
zend_debug_alloc_output("%s(%d) : Actual location
(location was relayed)\n" ZEND_FILE_LINE_ORIG_RELAY_CC);
}
@@ -1253,7 +1263,7 @@
if (p->info._size != ZEND_MM_NEXT_BLOCK(p)->info._prev) {
if (!silent) {
- zend_debug_alloc_output("Invalid pointer:
((size=0x%0.8X) != (next.prev=0x%0.8X))\n", p->info._size,
ZEND_MM_NEXT_BLOCK(p)->info._prev);
+ zend_debug_alloc_output("Invalid pointer:
((size="PTR_FMT") != (next.prev="PTR_FMT"))\n", p->info._size,
ZEND_MM_NEXT_BLOCK(p)->info._prev);
had_problems = 1;
} else {
return zend_mm_check_ptr(heap, ptr, 0
ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
@@ -1262,7 +1272,7 @@
if (p->info._prev != ZEND_MM_GUARD_BLOCK &&
ZEND_MM_PREV_BLOCK(p)->info._size != p->info._prev) {
if (!silent) {
- zend_debug_alloc_output("Invalid pointer:
((prev=0x%0.8X) != (prev.size=0x%0.8X))\n", p->info._prev,
ZEND_MM_PREV_BLOCK(p)->info._size);
+ zend_debug_alloc_output("Invalid pointer:
((prev="PTR_FMT") != (prev.size="PTR_FMT"))\n", p->info._prev,
ZEND_MM_PREV_BLOCK(p)->info._size);
had_problems = 1;
} else {
return zend_mm_check_ptr(heap, ptr, 0
ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_builtin_functions.c?r1=1.277.2.12.2.16&r2=1.277.2.12.2.17&diff_format=u
Index: ZendEngine2/zend_builtin_functions.c
diff -u ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.16
ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.17
--- ZendEngine2/zend_builtin_functions.c:1.277.2.12.2.16 Sat Feb 24
02:17:23 2007
+++ ZendEngine2/zend_builtin_functions.c Mon Apr 16 08:09:54 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.16 2007/02/24 02:17:23 helly
Exp $ */
+/* $Id: zend_builtin_functions.c,v 1.277.2.12.2.17 2007/04/16 08:09:54 dmitry
Exp $ */
#include "zend.h"
#include "zend_API.h"
@@ -172,14 +172,14 @@
int arg_count;
p = EG(argument_stack).top_element-1-1;
- arg_count = (ulong) *p; /* this is the amount of arguments
passed to func_num_args(); */
+ arg_count = (int)(zend_uintptr_t) *p; /* this is the amount
of arguments passed to func_num_args(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_num_args(): Can't be used as a
function parameter");
}
--p;
if (p>=EG(argument_stack).elements) {
- RETURN_LONG((ulong) *p);
+ RETURN_LONG((long)(zend_uintptr_t) *p);
} else {
zend_error(E_WARNING, "func_num_args(): Called from the global
scope - no function context");
RETURN_LONG(-1);
@@ -210,7 +210,7 @@
}
p = EG(argument_stack).top_element-1-1;
- arg_count = (ulong) *p; /* this is the amount of arguments
passed to func_get_arg(); */
+ arg_count = (int)(zend_uintptr_t) *p; /* this is the amount
of arguments passed to func_get_arg(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_arg(): Can't be used as a
function parameter");
@@ -220,7 +220,7 @@
zend_error(E_WARNING, "func_get_arg(): Called from the global
scope - no function context");
RETURN_FALSE;
}
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
if (requested_offset>=arg_count) {
zend_error(E_WARNING, "func_get_arg(): Argument %ld not passed
to function", requested_offset);
@@ -244,7 +244,7 @@
int i;
p = EG(argument_stack).top_element-1-1;
- arg_count = (ulong) *p; /* this is the amount of arguments
passed to func_get_args(); */
+ arg_count = (int)(zend_uintptr_t) *p; /* this is the amount
of arguments passed to func_get_args(); */
p -= 1+arg_count;
if (*p) {
zend_error(E_ERROR, "func_get_args(): Can't be used as a
function parameter");
@@ -255,7 +255,7 @@
zend_error(E_WARNING, "func_get_args(): Called from the global
scope - no function context");
RETURN_FALSE;
}
- arg_count = (ulong) *p;
+ arg_count = (int)(zend_uintptr_t) *p;
array_init(return_value);
@@ -1655,7 +1655,7 @@
{
void **p = *curpos - 2;
zval *arg_array, **arg;
- int arg_count = (ulong) *p;
+ int arg_count = (int)(zend_uintptr_t) *p;
*curpos -= (arg_count+2);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_compile.c?r1=1.647.2.27.2.34&r2=1.647.2.27.2.35&diff_format=u
Index: ZendEngine2/zend_compile.c
diff -u ZendEngine2/zend_compile.c:1.647.2.27.2.34
ZendEngine2/zend_compile.c:1.647.2.27.2.35
--- ZendEngine2/zend_compile.c:1.647.2.27.2.34 Wed Apr 4 00:42:42 2007
+++ ZendEngine2/zend_compile.c Mon Apr 16 08:09:54 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_compile.c,v 1.647.2.27.2.34 2007/04/04 00:42:42 iliaa Exp $ */
+/* $Id: zend_compile.c,v 1.647.2.27.2.35 2007/04/16 08:09:54 dmitry Exp $ */
#include <zend_language_parser.h>
#include "zend.h"
@@ -4189,7 +4189,7 @@
CG(static_members) = realloc(CG(static_members),
(n+1)*sizeof(HashTable*));
CG(static_members)[n] = NULL;
}
- ce->static_members = (HashTable*)n;
+ ce->static_members = (HashTable*)(zend_intptr_t)n;
#else
ce->static_members = NULL;
#endif
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.c?r1=1.716.2.12.2.18&r2=1.716.2.12.2.19&diff_format=u
Index: ZendEngine2/zend_execute.c
diff -u ZendEngine2/zend_execute.c:1.716.2.12.2.18
ZendEngine2/zend_execute.c:1.716.2.12.2.19
--- ZendEngine2/zend_execute.c:1.716.2.12.2.18 Fri Apr 13 14:41:36 2007
+++ ZendEngine2/zend_execute.c Mon Apr 16 08:09:54 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.c,v 1.716.2.12.2.18 2007/04/13 14:41:36 tony2001 Exp $ */
+/* $Id: zend_execute.c,v 1.716.2.12.2.19 2007/04/16 08:09:54 dmitry Exp $ */
#define ZEND_INTENSIVE_DEBUGGING 0
@@ -104,15 +104,15 @@
#define FREE_OP(should_free) \
if (should_free.var) { \
- if ((long)should_free.var & 1L) { \
- zval_dtor((zval*)((long)should_free.var & ~1L)); \
+ if ((zend_uintptr_t)should_free.var & 1L) { \
+ zval_dtor((zval*)((zend_uintptr_t)should_free.var &
~1L)); \
} else { \
zval_ptr_dtor(&should_free.var); \
} \
}
#define FREE_OP_IF_VAR(should_free) \
- if (should_free.var != NULL && (((long)should_free.var & 1L) == 0)) { \
+ if (should_free.var != NULL && (((zend_uintptr_t)should_free.var & 1L)
== 0)) { \
zval_ptr_dtor(&should_free.var); \
}
@@ -121,9 +121,9 @@
zval_ptr_dtor(&should_free.var); \
}
-#define TMP_FREE(z) (zval*)(((long)(z)) | 1L)
+#define TMP_FREE(z) (zval*)(((zend_uintptr_t)(z)) | 1L)
-#define IS_TMP_FREE(should_free) ((long)should_free.var & 1L)
+#define IS_TMP_FREE(should_free) ((zend_uintptr_t)should_free.var & 1L)
#define INIT_PZVAL_COPY(z,v) \
(z)->value = (v)->value; \
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute.h?r1=1.84.2.4.2.6&r2=1.84.2.4.2.7&diff_format=u
Index: ZendEngine2/zend_execute.h
diff -u ZendEngine2/zend_execute.h:1.84.2.4.2.6
ZendEngine2/zend_execute.h:1.84.2.4.2.7
--- ZendEngine2/zend_execute.h:1.84.2.4.2.6 Wed Jan 10 15:58:07 2007
+++ ZendEngine2/zend_execute.h Mon Apr 16 08:09:54 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute.h,v 1.84.2.4.2.6 2007/01/10 15:58:07 dmitry Exp $ */
+/* $Id: zend_execute.h,v 1.84.2.4.2.7 2007/04/16 08:09:54 dmitry Exp $ */
#ifndef ZEND_EXECUTE_H
#define ZEND_EXECUTE_H
@@ -146,7 +146,7 @@
static inline void zend_ptr_stack_clear_multiple(TSRMLS_D)
{
void **p = EG(argument_stack).top_element-2;
- int delete_count = (ulong) *p;
+ int delete_count = (int)(zend_uintptr_t) *p;
EG(argument_stack).top -= (delete_count+2);
while (--delete_count>=0) {
@@ -160,7 +160,7 @@
static inline int zend_ptr_stack_get_arg(int requested_arg, void **data
TSRMLS_DC)
{
void **p = EG(argument_stack).top_element-2;
- int arg_count = (ulong) *p;
+ int arg_count = (int)(zend_uintptr_t) *p;
if (requested_arg>arg_count) {
return FAILURE;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.331.2.20.2.17&r2=1.331.2.20.2.18&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.331.2.20.2.17
ZendEngine2/zend_execute_API.c:1.331.2.20.2.18
--- ZendEngine2/zend_execute_API.c:1.331.2.20.2.17 Thu Mar 15 16:44:12 2007
+++ ZendEngine2/zend_execute_API.c Mon Apr 16 08:09:54 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c,v 1.331.2.20.2.17 2007/03/15 16:44:12 tony2001 Exp
$ */
+/* $Id: zend_execute_API.c,v 1.331.2.20.2.18 2007/04/16 08:09:54 dmitry Exp $
*/
#include <stdio.h>
#include <signal.h>
@@ -451,7 +451,7 @@
ZEND_API int zval_update_constant_ex(zval **pp, void *arg, zend_class_entry
*scope TSRMLS_DC)
{
zval *p = *pp;
- zend_bool inline_change = (zend_bool) (unsigned long) arg;
+ zend_bool inline_change = (zend_bool) (zend_uintptr_t) arg;
zval const_value;
if (Z_TYPE_P(p) == IS_CONSTANT) {
@@ -867,7 +867,7 @@
if (fci->no_separation) {
if(i) {
/* hack to clean up the stack */
-
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (long) i, NULL);
+
zend_ptr_stack_n_push(&EG(argument_stack), 2, (void *) (zend_uintptr_t) i,
NULL);
zend_ptr_stack_clear_multiple(TSRMLS_C);
}
@@ -908,7 +908,7 @@
fci->param_count = 2;
}
- zend_ptr_stack_2_push(&EG(argument_stack), (void *) (long)
fci->param_count, NULL);
+ zend_ptr_stack_2_push(&EG(argument_stack), (void *) (zend_uintptr_t)
fci->param_count, NULL);
original_function_state_ptr = EG(function_state_ptr);
EG(function_state_ptr) = &EX(function_state);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_ini.c?r1=1.39.2.2.2.7&r2=1.39.2.2.2.8&diff_format=u
Index: ZendEngine2/zend_ini.c
diff -u ZendEngine2/zend_ini.c:1.39.2.2.2.7 ZendEngine2/zend_ini.c:1.39.2.2.2.8
--- ZendEngine2/zend_ini.c:1.39.2.2.2.7 Tue Mar 6 21:08:05 2007
+++ ZendEngine2/zend_ini.c Mon Apr 16 08:09:54 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_ini.c,v 1.39.2.2.2.7 2007/03/06 21:08:05 tony2001 Exp $ */
+/* $Id: zend_ini.c,v 1.39.2.2.2.8 2007/04/16 08:09:54 dmitry Exp $ */
#include "zend.h"
#include "zend_qsort.h"
@@ -225,7 +225,7 @@
ZEND_API void zend_ini_refresh_caches(int stage TSRMLS_DC)
{
- zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t)
zend_ini_refresh_cache, (void *)(long) stage TSRMLS_CC);
+ zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t)
zend_ini_refresh_cache, (void *)(zend_intptr_t) stage TSRMLS_CC);
}
#endif
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_opcode.c?r1=1.110.2.6.2.2&r2=1.110.2.6.2.3&diff_format=u
Index: ZendEngine2/zend_opcode.c
diff -u ZendEngine2/zend_opcode.c:1.110.2.6.2.2
ZendEngine2/zend_opcode.c:1.110.2.6.2.3
--- ZendEngine2/zend_opcode.c:1.110.2.6.2.2 Thu Feb 15 10:38:28 2007
+++ ZendEngine2/zend_opcode.c Mon Apr 16 08:09:55 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_opcode.c,v 1.110.2.6.2.2 2007/02/15 10:38:28 dmitry Exp $ */
+/* $Id: zend_opcode.c,v 1.110.2.6.2.3 2007/04/16 08:09:55 dmitry Exp $ */
#include <stdio.h>
@@ -160,7 +160,7 @@
zend_hash_destroy(CE_STATIC_MEMBERS(*pce));
FREE_HASHTABLE(CE_STATIC_MEMBERS(*pce));
#ifdef ZTS
- CG(static_members)[(long)((*pce)->static_members)] = NULL;
+ CG(static_members)[(zend_intptr_t)((*pce)->static_members)] =
NULL;
#else
(*pce)->static_members = NULL;
#endif
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_types.h?r1=1.6.2.2.2.1&r2=1.6.2.2.2.2&diff_format=u
Index: ZendEngine2/zend_types.h
diff -u ZendEngine2/zend_types.h:1.6.2.2.2.1
ZendEngine2/zend_types.h:1.6.2.2.2.2
--- ZendEngine2/zend_types.h:1.6.2.2.2.1 Mon Jan 1 09:35:47 2007
+++ ZendEngine2/zend_types.h Mon Apr 16 08:09:55 2007
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_types.h,v 1.6.2.2.2.1 2007/01/01 09:35:47 sebastian Exp $ */
+/* $Id: zend_types.h,v 1.6.2.2.2.2 2007/04/16 08:09:55 dmitry Exp $ */
#ifndef ZEND_TYPES_H
#define ZEND_TYPES_H
@@ -28,6 +28,14 @@
typedef unsigned long zend_ulong;
typedef unsigned short zend_ushort;
+#ifdef _WIN64
+typedef unsigned __int64 zend_intptr_t;
+typedef __int64 zend_uintptr_t;
+#else
+typedef long zend_intptr_t;
+typedef unsigned long zend_uintptr_t;
+#endif
+
typedef unsigned int zend_object_handle;
typedef struct _zend_object_handlers zend_object_handlers;
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_def.h?r1=1.59.2.29.2.42&r2=1.59.2.29.2.43&diff_format=u
Index: ZendEngine2/zend_vm_def.h
diff -u ZendEngine2/zend_vm_def.h:1.59.2.29.2.42
ZendEngine2/zend_vm_def.h:1.59.2.29.2.43
--- ZendEngine2/zend_vm_def.h:1.59.2.29.2.42 Thu Apr 5 23:48:42 2007
+++ ZendEngine2/zend_vm_def.h Mon Apr 16 08:09:55 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_vm_def.h,v 1.59.2.29.2.42 2007/04/05 23:48:42 iliaa Exp $ */
+/* $Id: zend_vm_def.h,v 1.59.2.29.2.43 2007/04/16 08:09:55 dmitry Exp $ */
/* If you change this file, please regenerate the zend_vm_execute.h and
* zend_vm_opcodes.h files by running:
@@ -1857,7 +1857,7 @@
}
}
- zend_ptr_stack_2_push(&EG(argument_stack), (void *)
opline->extended_value, NULL);
+ zend_ptr_stack_2_push(&EG(argument_stack), (void
*)(zend_uintptr_t)opline->extended_value, NULL);
EX_T(opline->result.u.var).var.ptr_ptr =
&EX_T(opline->result.u.var).var.ptr;
@@ -1900,7 +1900,7 @@
ulong arg_count;
p = (zval **) EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (ulong)(zend_uintptr_t) *p;
while (arg_count>0) {
zend_verify_arg_type(EX(function_state).function, ++i, *(p-arg_count)
TSRMLS_CC);
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_vm_execute.h?r1=1.62.2.30.2.42&r2=1.62.2.30.2.43&diff_format=u
Index: ZendEngine2/zend_vm_execute.h
diff -u ZendEngine2/zend_vm_execute.h:1.62.2.30.2.42
ZendEngine2/zend_vm_execute.h:1.62.2.30.2.43
--- ZendEngine2/zend_vm_execute.h:1.62.2.30.2.42 Thu Apr 5 23:48:42 2007
+++ ZendEngine2/zend_vm_execute.h Mon Apr 16 08:09:55 2007
@@ -145,7 +145,7 @@
}
}
- zend_ptr_stack_2_push(&EG(argument_stack), (void *)
opline->extended_value, NULL);
+ zend_ptr_stack_2_push(&EG(argument_stack), (void
*)(zend_uintptr_t)opline->extended_value, NULL);
EX_T(opline->result.u.var).var.ptr_ptr =
&EX_T(opline->result.u.var).var.ptr;
@@ -188,7 +188,7 @@
ulong arg_count;
p = (zval **) EG(argument_stack).top_element-2;
- arg_count = (ulong) *p;
+ arg_count = (ulong)(zend_uintptr_t) *p;
while (arg_count>0) {
zend_verify_arg_type(EX(function_state).function, ++i, *(p-arg_count)
TSRMLS_CC);
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/proc_open.c?r1=1.36.2.1.2.14&r2=1.36.2.1.2.15&diff_format=u
Index: php-src/ext/standard/proc_open.c
diff -u php-src/ext/standard/proc_open.c:1.36.2.1.2.14
php-src/ext/standard/proc_open.c:1.36.2.1.2.15
--- php-src/ext/standard/proc_open.c:1.36.2.1.2.14 Mon Apr 2 20:44:30 2007
+++ php-src/ext/standard/proc_open.c Mon Apr 16 08:09:55 2007
@@ -15,7 +15,7 @@
| Author: Wez Furlong <[EMAIL PROTECTED]> |
+----------------------------------------------------------------------+
*/
-/* $Id: proc_open.c,v 1.36.2.1.2.14 2007/04/02 20:44:30 stas Exp $ */
+/* $Id: proc_open.c,v 1.36.2.1.2.15 2007/04/16 08:09:55 dmitry Exp $ */
#if 0 && (defined(__linux__) || defined(sun) || defined(__IRIX__))
# define _BSD_SOURCE /* linux wants this when XOPEN mode is on */
@@ -946,7 +946,7 @@
break;
}
#ifdef PHP_WIN32
- stream =
php_stream_fopen_from_fd(_open_osfhandle((long)descriptors[i].parentend,
+ stream =
php_stream_fopen_from_fd(_open_osfhandle((zend_intptr_t)descriptors[i].parentend,
descriptors[i].mode_flags), mode_string, NULL);
#else
stream =
php_stream_fopen_from_fd(descriptors[i].parentend, mode_string, NULL);
http://cvs.php.net/viewvc.cgi/php-src/main/SAPI.c?r1=1.202.2.7.2.9&r2=1.202.2.7.2.10&diff_format=u
Index: php-src/main/SAPI.c
diff -u php-src/main/SAPI.c:1.202.2.7.2.9 php-src/main/SAPI.c:1.202.2.7.2.10
--- php-src/main/SAPI.c:1.202.2.7.2.9 Tue Feb 27 03:28:17 2007
+++ php-src/main/SAPI.c Mon Apr 16 08:09:56 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: SAPI.c,v 1.202.2.7.2.9 2007/02/27 03:28:17 iliaa Exp $ */
+/* $Id: SAPI.c,v 1.202.2.7.2.10 2007/04/16 08:09:56 dmitry Exp $ */
#include <ctype.h>
#include <sys/stat.h>
@@ -541,7 +541,7 @@
switch (op) {
case SAPI_HEADER_SET_STATUS:
- sapi_update_response_code((long) arg TSRMLS_CC);
+ sapi_update_response_code((int)(zend_intptr_t) arg
TSRMLS_CC);
return SUCCESS;
case SAPI_HEADER_REPLACE:
http://cvs.php.net/viewvc.cgi/php-src/main/main.c?r1=1.640.2.23.2.33&r2=1.640.2.23.2.34&diff_format=u
Index: php-src/main/main.c
diff -u php-src/main/main.c:1.640.2.23.2.33 php-src/main/main.c:1.640.2.23.2.34
--- php-src/main/main.c:1.640.2.23.2.33 Fri Apr 6 13:58:48 2007
+++ php-src/main/main.c Mon Apr 16 08:09:56 2007
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: main.c,v 1.640.2.23.2.33 2007/04/06 13:58:48 iliaa Exp $ */
+/* $Id: main.c,v 1.640.2.23.2.34 2007/04/16 08:09:56 dmitry Exp $ */
/* {{{ includes
*/
@@ -974,7 +974,7 @@
if (message==ZMSG_MEMORY_LEAK_DETECTED) {
zend_leak_info *t = (zend_leak_info *)
data;
- snprintf(memory_leak_buf, 512, "%s(%d)
: Freeing 0x%.8lX (%zu bytes), script=%s\n", t->filename, t->lineno, (unsigned
long)t->addr, t->size, SAFE_FILENAME(SG(request_info).path_translated));
+ snprintf(memory_leak_buf, 512, "%s(%d)
: Freeing 0x%.8lX (%zu bytes), script=%s\n", t->filename, t->lineno,
(zend_uintptr_t)t->addr, t->size,
SAFE_FILENAME(SG(request_info).path_translated));
if (t->orig_filename) {
char relay_buf[512];
@@ -982,7 +982,7 @@
strlcat(memory_leak_buf,
relay_buf, sizeof(memory_leak_buf));
}
} else {
- unsigned long leak_count = (unsigned
long) data;
+ unsigned long leak_count =
(zend_uintptr_t) data;
snprintf(memory_leak_buf, 512, "Last
leak repeated %ld time%s\n", leak_count, (leak_count>1?"s":""));
}
http://cvs.php.net/viewvc.cgi/php-src/main/php_ini.c?r1=1.136.2.4.2.7&r2=1.136.2.4.2.8&diff_format=u
Index: php-src/main/php_ini.c
diff -u php-src/main/php_ini.c:1.136.2.4.2.7
php-src/main/php_ini.c:1.136.2.4.2.8
--- php-src/main/php_ini.c:1.136.2.4.2.7 Sat Feb 24 02:17:28 2007
+++ php-src/main/php_ini.c Mon Apr 16 08:09:56 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: php_ini.c,v 1.136.2.4.2.7 2007/02/24 02:17:28 helly Exp $ */
+/* $Id: php_ini.c,v 1.136.2.4.2.8 2007/04/16 08:09:56 dmitry Exp $ */
#include "php.h"
#include "ext/standard/info.h"
@@ -142,7 +142,7 @@
}
php_info_print_table_start();
php_info_print_table_header(3, "Directive", "Local Value", "Master
Value");
- zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t)
php_ini_displayer, (void *) (long) module_number TSRMLS_CC);
+ zend_hash_apply_with_argument(EG(ini_directives), (apply_func_arg_t)
php_ini_displayer, (void *) (zend_intptr_t) module_number TSRMLS_CC);
php_info_print_table_end();
}
/* }}} */
@@ -590,7 +590,7 @@
zval *tmp, var;
if (zend_hash_find(&configuration_hash, varname, strlen(varname) + 1,
(void **) &tmp) == FAILURE) {
- *result = (long) NULL;
+ *result = 0;
return FAILURE;
}
var = *tmp;
http://cvs.php.net/viewvc.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.6.2.18&r2=1.52.2.6.2.19&diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.52.2.6.2.18
php-src/main/streams/plain_wrapper.c:1.52.2.6.2.19
--- php-src/main/streams/plain_wrapper.c:1.52.2.6.2.18 Mon Apr 9 15:38:41 2007
+++ php-src/main/streams/plain_wrapper.c Mon Apr 16 08:09:56 2007
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.52.2.6.2.18 2007/04/09 15:38:41 dmitry Exp $ */
+/* $Id: plain_wrapper.c,v 1.52.2.6.2.19 2007/04/16 08:09:56 dmitry Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -223,9 +223,9 @@
}
#elif defined(PHP_WIN32)
{
- long handle = _get_osfhandle(self->fd);
+ zend_uintptr_t handle = _get_osfhandle(self->fd);
- if (handle != 0xFFFFFFFF) {
+ if (handle != (zend_uintptr_t)INVALID_HANDLE_VALUE) {
self->is_pipe = GetFileType((HANDLE)handle) ==
FILE_TYPE_PIPE;
}
}
@@ -261,9 +261,9 @@
}
#elif defined(PHP_WIN32)
{
- long handle = _get_osfhandle(self->fd);
+ zend_uintptr_t handle = _get_osfhandle(self->fd);
- if (handle != 0xFFFFFFFF) {
+ if (handle != (zend_uintptr_t)INVALID_HANDLE_VALUE) {
self->is_pipe = GetFileType((HANDLE)handle) ==
FILE_TYPE_PIPE;
}
}
@@ -601,7 +601,7 @@
return -1;
}
- if ((long) ptrparam == PHP_STREAM_LOCK_SUPPORTED) {
+ if ((zend_uintptr_t) ptrparam ==
PHP_STREAM_LOCK_SUPPORTED) {
return 0;
}
http://cvs.php.net/viewvc.cgi/php-src/win32/select.c?r1=1.10.2.2.2.1&r2=1.10.2.2.2.2&diff_format=u
Index: php-src/win32/select.c
diff -u php-src/win32/select.c:1.10.2.2.2.1 php-src/win32/select.c:1.10.2.2.2.2
--- php-src/win32/select.c:1.10.2.2.2.1 Mon Jan 1 09:36:13 2007
+++ php-src/win32/select.c Mon Apr 16 08:09:56 2007
@@ -21,7 +21,7 @@
#ifdef PHP_WIN32
-/* $Id: select.c,v 1.10.2.2.2.1 2007/01/01 09:36:13 sebastian Exp $ */
+/* $Id: select.c,v 1.10.2.2.2.2 2007/04/16 08:09:56 dmitry Exp $ */
/* Win32 select() will only work with sockets, so we roll our own
implementation here.
* - If you supply only sockets, this simply passes through to winsock
select().
@@ -63,8 +63,8 @@
/* build an array of handles for non-sockets */
for (i = 0; i < max_fd; i++) {
if (SAFE_FD_ISSET(i, rfds) || SAFE_FD_ISSET(i, wfds) ||
SAFE_FD_ISSET(i, efds)) {
- handles[n_handles] = (HANDLE)_get_osfhandle(i);
- if ((DWORD)handles[n_handles] == 0xffffffff) {
+ handles[n_handles] =
(HANDLE)(zend_uintptr_t)_get_osfhandle(i);
+ if (handles[n_handles] == INVALID_HANDLE_VALUE) {
/* socket */
if (SAFE_FD_ISSET(i, rfds)) {
FD_SET((uint)i, &sock_read);
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.40.2.8.2.8&r2=1.40.2.8.2.9&diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.40.2.8.2.8
php-src/win32/build/config.w32:1.40.2.8.2.9
--- php-src/win32/build/config.w32:1.40.2.8.2.8 Tue Apr 10 06:22:28 2007
+++ php-src/win32/build/config.w32 Mon Apr 16 08:09:56 2007
@@ -1,5 +1,5 @@
// vim:ft=javascript
-// $Id: config.w32,v 1.40.2.8.2.8 2007/04/10 06:22:28 dmitry Exp $
+// $Id: config.w32,v 1.40.2.8.2.9 2007/04/16 08:09:56 dmitry Exp $
// "Master" config file; think of it as a configure.in
// equivalent.
@@ -126,8 +126,7 @@
// disable annoying warnings. In addition, time_t defaults
// to 64-bit. Ask for 32-bit.
if (X64) {
- ADD_FLAG('CFLAGS', ' /wd4996 ');
-// ADD_FLAG('CFLAGS', ' /wd4996 /Wp64 ');
+ ADD_FLAG('CFLAGS', ' /wd4996 /Wp64 ');
} else {
ADD_FLAG('CFLAGS', ' /wd4996 /D_USE_32BIT_TIME_T=1 ');
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php