I found some word-size related errors in HEAD compiling on FreeBSD/alpha.
Diff is attached.

--
Ard
Index: Zend/zend_builtin_functions.c
===================================================================
RCS file: /repository/ZendEngine2/zend_builtin_functions.c,v
retrieving revision 1.210
diff -u -r1.210 zend_builtin_functions.c
--- Zend/zend_builtin_functions.c       31 Aug 2003 12:38:50 -0000      1.210
+++ Zend/zend_builtin_functions.c       12 Sep 2003 20:22:48 -0000
@@ -1297,7 +1297,7 @@
                zval **modules;
                char **module_names;
                zend_module_entry *module;
-               int i = 1;
+               long i = 1;
 
                modules = ecalloc(zend_hash_num_elements(&module_registry) + 2, 
sizeof(zval *));
                module_names = emalloc((zend_hash_num_elements(&module_registry) + 2) 
* sizeof(char *));
Index: Zend/zend_constants.h
===================================================================
RCS file: /repository/ZendEngine2/zend_constants.h,v
retrieving revision 1.27
diff -u -r1.27 zend_constants.h
--- Zend/zend_constants.h       22 Aug 2003 18:50:12 -0000      1.27
+++ Zend/zend_constants.h       12 Sep 2003 20:22:55 -0000
@@ -34,7 +34,7 @@
        int flags;
        char *name;
        uint name_len;
-       int module_number;
+       long module_number;
 } zend_constant;
 
 #define REGISTER_LONG_CONSTANT(name, lval, flags)  
zend_register_long_constant((name), sizeof(name), (lval), (flags), module_number 
TSRMLS_CC)
Index: Zend/zend_execute_API.c
===================================================================
RCS file: /repository/ZendEngine2/zend_execute_API.c,v
retrieving revision 1.236
diff -u -r1.236 zend_execute_API.c
--- Zend/zend_execute_API.c     11 Sep 2003 17:06:53 -0000      1.236
+++ Zend/zend_execute_API.c     12 Sep 2003 20:23:05 -0000
@@ -64,7 +64,7 @@
        {
                TSRMLS_FETCH();
 
-               fprintf(stderr, "SIGSEGV caught on opcode %d on opline %d of %s() at 
%s:%d\n\n",
+               fprintf(stderr, "SIGSEGV caught on opcode %d on opline %ld of %s() at 
%s:%d\n\n",
                                active_opline->opcode,
                                active_opline-EG(active_op_array)->opcodes,
                                get_active_function_name(TSRMLS_C),
Index: Zend/zend_operators.h
===================================================================
RCS file: /repository/ZendEngine2/zend_operators.h,v
retrieving revision 1.80
diff -u -r1.80 zend_operators.h
--- Zend/zend_operators.h       22 Jul 2003 16:06:07 -0000      1.80
+++ Zend/zend_operators.h       12 Sep 2003 20:23:20 -0000
@@ -34,7 +34,7 @@
 #include "ext/bcmath/libbcmath/src/bcmath.h"
 #endif
 
-#define MAX_LENGTH_OF_LONG 18
+#define MAX_LENGTH_OF_LONG 20
 #define MAX_LENGTH_OF_DOUBLE 32
 
 ZEND_API int add_function(zval *result, zval *op1, zval *op2 TSRMLS_DC);
Index: main/SAPI.c
===================================================================
RCS file: /repository/php-src/main/SAPI.c,v
retrieving revision 1.178
diff -u -r1.178 SAPI.c
--- main/SAPI.c 10 Sep 2003 08:47:37 -0000      1.178
+++ main/SAPI.c 12 Sep 2003 20:24:30 -0000
@@ -517,7 +517,7 @@
 
        switch (op) {
        case SAPI_HEADER_SET_STATUS:
-               sapi_update_response_code((int) arg TSRMLS_CC);
+               sapi_update_response_code((long) arg TSRMLS_CC);
                return SUCCESS;
 
        case SAPI_HEADER_REPLACE:
Index: main/streams/streams.c
===================================================================
RCS file: /repository/php-src/main/streams/streams.c,v
retrieving revision 1.35
diff -u -r1.35 streams.c
--- main/streams/streams.c      11 Sep 2003 05:07:26 -0000      1.35
+++ main/streams/streams.c      12 Sep 2003 20:24:34 -0000
@@ -368,7 +368,7 @@
                         * as leaked; it will log a warning, but lets help it out and 
display what kind
                         * of stream it was. */
                        char leakbuf[512];
-                       snprintf(leakbuf, sizeof(leakbuf), __FILE__ "(%d) : Stream of 
type '%s' 0x%08X (path:%s) was not closed\n", __LINE__, stream->ops->label, (unsigned 
int)stream, stream->__orig_path);
+                       snprintf(leakbuf, sizeof(leakbuf), __FILE__ "(%d) : Stream of 
type '%s' %p (path:%s) was not closed\n", __LINE__, stream->ops->label, stream, 
stream->__orig_path);
 
                        if (stream->__orig_path) {
                                pefree(stream->__orig_path, stream->is_persistent);
Index: main/streams/userspace.c
===================================================================
RCS file: /repository/php-src/main/streams/userspace.c,v
retrieving revision 1.9
diff -u -r1.9 userspace.c
--- main/streams/userspace.c    16 Jun 2003 19:13:39 -0000      1.9
+++ main/streams/userspace.c    12 Sep 2003 20:24:35 -0000
@@ -430,7 +430,7 @@
 
        /* don't allow strange buffer overruns due to bogus return */
        if (didwrite > count) {
-               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " 
wrote %d bytes more data than requested (%d written, %d max)",
+               php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " 
wrote %ld bytes more data than requested (%ld written, %ld max)",
                                us->wrapper->classname,
                                didwrite - count, didwrite, count);
                didwrite = count;
@@ -471,7 +471,7 @@
                convert_to_string(retval);
                didread = Z_STRLEN_P(retval);
                if (didread > count) {
-                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" 
USERSTREAM_READ " - read %d bytes more data than requested (%d read, %d max) - excess 
data will be lost",
+                       php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" 
USERSTREAM_READ " - read %ld bytes more data than requested (%ld read, %ld max) - 
excess data will be lost",
                                        us->wrapper->classname, didread - count, 
didread, count);
                        didread = count;
                }
Index: tests/lang/bug24054.phpt
===================================================================
RCS file: /repository/php-src/tests/lang/bug24054.phpt,v
retrieving revision 1.1
diff -u -r1.1 bug24054.phpt
--- tests/lang/bug24054.phpt    6 Jun 2003 11:09:55 -0000       1.1
+++ tests/lang/bug24054.phpt    12 Sep 2003 20:25:20 -0000
@@ -1,17 +1,17 @@
 --TEST--
 Bug #24054 (Assignment operator *= broken)
 --FILE--
-<?php
+<?php // $Id$
 
-       $i = 10000000;
-       $i *= 1001;
+       $i = 9999999999;
+       $i *= 1001000000;
 
-       $j = 10000000;
-       $j = $j * 1001;
+       $j = 9999999999;
+       $j = $j * 1001000000;
 
        var_dump($i,$j);
 
 ?>
 --EXPECT--
-float(1.001E+10)
-float(1.001E+10)
+float(1.0009999998999E+19)
+float(1.0009999998999E+19)

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to