ID: 31121 Updated by: [EMAIL PROTECTED] Reported By: strube at physik3 dot gwdg dot de -Status: Open +Status: Assigned Bug Type: Compile Failure Operating System: Solaris 7 SPARC PHP Version: 4.3.10 Assigned To: derick
Previous Comments: ------------------------------------------------------------------------ [2004-12-17 09:46:09] strube at physik3 dot gwdg dot de I just found that main/php_config.h already contains the big/little-endian information in WORDS_BIGENDIAN. Why don't you simply include this and test this macro? ------------------------------------------------------------------------ [2004-12-17 09:37:59] strube at physik3 dot gwdg dot de I tried php4-STABLE-latest.tar.gz, i.e. php4-STABLE-200412170730. The zend_strtod.c therein is identical to that of the official 4.3.10 release. Also the configure script is unchanged (apart of the EXTRA_VERSION). Thus this does not fix anything. As a general remark, architecture macros like __sparc__ and __i386__ are gcc specific. Suns Workshop/Forte/SunONE compilers define __sparc and __i386, respectively, for the architecture. (Likewise, the SGI IRIX compilers do not define __mips__). Also Solaris does not define BYTE_ORDER and BIG_ENDIAN (or LITTLE_ENDIAN)in sys/types.h (only in arpa/nameser_compat.h, not normally included) but _BIG_ENDIAN (or _LITTLE_ENDIAN) in sys/isa_defs.h, also included by sys/types.h. Instead of using [_]BYTE_ORDER, the big/little decision could have been directly based on the architectures. ------------------------------------------------------------------------ [2004-12-16 19:59:35] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip Something similar is in CVS right now, can you try the latest snapshot please? ------------------------------------------------------------------------ [2004-12-16 18:47:46] strube at physik3 dot gwdg dot de As I wrote, it was an ad-hoc patch, which worked for me on Solaris 7 SPARC. It may not be sufficiently general. Since the necessity to defined u_int32_t is not dependent on the architecture but on the OS and obviously meant for Solaris, the second chunk must be changed to work both on SPARC and x86 Solaris (don't know about ppc): *************** *** 127,133 **** #define IEEE_LITTLE_ENDIAN #endif ! #if defined(__sparc__) || defined(__ppc__) #define u_int32_t uint32_t #endif --- 134,140 ---- #define IEEE_LITTLE_ENDIAN #endif ! #if defined(sun) || defined(__sun) || defined(__ppc__) #define u_int32_t uint32_t #endif I compiled zend_strtod.c successfully in Solaris 7 and 8 (SPARC) and Solaris 9_x86, with various versions (>=5) of the Sun compilers and of the GNU compilers. (I did not compile the whole php for testing, only zend_strtod.c.) As I cannot give you an account here, this will hopefully help. ------------------------------------------------------------------------ [2004-12-16 13:02:58] [EMAIL PROTECTED] Hello, I think your patch is not 100% correct, would it be possible for me to get an account on your machine to debug it? Derick ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/31121 -- Edit this bug report at http://bugs.php.net/?id=31121&edit=1