ID:               30558
 Updated by:       [EMAIL PROTECTED]
 Reported By:      jbarwick at sentienthealth dot com
-Status:           Open
+Status:           Feedback
 Bug Type:         Compile Failure
 Operating System: SuSE 9.1 (amd64)
 PHP Version:      4.3.8
 New Comment:

Please, provide all warnings and/or errors you get.


Previous Comments:
------------------------------------------------------------------------

[2004-10-26 09:41:03] jbarwick at sentienthealth dot com

Description:
------------
The entire MBREGEX.C object appears to be written with "pointer address
math" using "int" variables.

Whereas we all know that with the invent of i586/i686 systems the int
veriable is nicely 32 bit, in a 64 bit environment, the pointers and
the uint/int objects become completely incompatible.

(Am I crazy here?)...or completely stupid?  

Anyway...lot's of "pointer errors" in mbstring/mbregex.  It appears
that this module is totally unusable in a 64-bit environment.

To FIX, I did the following

mbstring/mbregex/mbregex.h

#define MINT long
#define MLONG long

The changed all "int"'s to "MINT"
and changed all "long"'s to "MLONG"

with a nice search and replace.

Compiled with no compiler warnings (retesting make clean/make as we
speak).

It actually appears that the entire mbstring object must be completely
re-written.  SOOOO much pointer math using int's and so many "cast from
pointer to integer of different size" errors.

any chance of getting 4.3.9 or 4.3.10 compilable for 64-bit?

I have a lot of work left to fix all the mbstring files that wont
compile correctly...errrrg!!!

PLEASE someone tell me I can ignore these because the pointer math
works even when the compiler complains!!

Reproduce code:
---------------
compile mbstring/mbregex.c

Expected result:
----------------
no compiler warnings about bad pointers

Actual result:
--------------
compiler warnings about bad pointers


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=30558&edit=1

Reply via email to