sniper Mon Dec 20 15:38:19 2004 EDT Modified files: (Branch: PHP_4_3) /php-src acinclude.m4 configure.in /Zend zend_strtod.c /php-src/ext/xml config.m4 Log: MFH: endian compile problem fix http://cvs.php.net/diff.php/php-src/acinclude.m4?r1=1.218.2.39&r2=1.218.2.40&ty=u Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.218.2.39 php-src/acinclude.m4:1.218.2.40 --- php-src/acinclude.m4:1.218.2.39 Sat Dec 11 06:17:21 2004 +++ php-src/acinclude.m4 Mon Dec 20 15:38:18 2004 @@ -1,4 +1,4 @@ -dnl $Id: acinclude.m4,v 1.218.2.39 2004/12/11 11:17:21 derick Exp $ -*- autoconf -*- +dnl $Id: acinclude.m4,v 1.218.2.40 2004/12/20 20:38:18 sniper Exp $ -*- autoconf -*- dnl dnl This file contains local autoconf functions. @@ -1862,3 +1862,30 @@ APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6` ]) +dnl +dnl PHP_C_BIGENDIAN +dnl Replacement macro for AC_C_BIGENDIAN +dnl +AC_DEFUN([PHP_C_BIGENDIAN], +[AC_CACHE_CHECK(whether byte ordering is bigendian, ac_cv_c_bigendian_php, + [ + ac_cv_c_bigendian_php=unknown + AC_TRY_RUN( + [ +int main(void) +{ + short one = 1; + char *cp = (char *)&one; + + if (*cp == 0) { + return(0); + } else { + return(1); + } +} + ], [ac_cv_c_bigendian_php=yes], [ac_cv_c_bigendian_php=no], [ac_cv_c_bigendian_php=unknown]) + if test $ac_cv_c_bigendian_php = yes; then + AC_DEFINE(WORDS_BIGENDIAN) + fi + ]) +]) http://cvs.php.net/diff.php/php-src/configure.in?r1=1.396.2.142&r2=1.396.2.143&ty=u Index: php-src/configure.in diff -u php-src/configure.in:1.396.2.142 php-src/configure.in:1.396.2.143 --- php-src/configure.in:1.396.2.142 Thu Dec 16 06:50:46 2004 +++ php-src/configure.in Mon Dec 20 15:38:18 2004 @@ -1,4 +1,4 @@ -dnl ## $Id: configure.in,v 1.396.2.142 2004/12/16 11:50:46 sniper Exp $ -*- sh -*- +dnl ## $Id: configure.in,v 1.396.2.143 2004/12/20 20:38:18 sniper Exp $ -*- sh -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -170,6 +170,10 @@ AC_MSG_WARN(You will need flex 2.5.4 or later if you want to regenerate Zend/PHP lexical parsers.) fi +dnl Check whether byte ordering is bigendian +PHP_C_BIGENDIAN + + dnl Platform-specific compile settings. dnl ------------------------------------------------------------------------- http://cvs.php.net/diff.php/Zend/zend_strtod.c?r1=1.1.2.11&r2=1.1.2.12&ty=u Index: Zend/zend_strtod.c diff -u Zend/zend_strtod.c:1.1.2.11 Zend/zend_strtod.c:1.1.2.12 --- Zend/zend_strtod.c:1.1.2.11 Fri Dec 17 08:17:08 2004 +++ Zend/zend_strtod.c Mon Dec 20 15:38:18 2004 @@ -91,22 +91,15 @@ #include <zend_strtod.h> -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = "$OpenBSD: strtod.c,v 1.19 2004/02/03 16:52:11 drahn Exp $"; -#endif /* LIBC_SCCS and not lint */ - -#if defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \ - defined(__mips__) || defined(__mips) || defined(__ns32k__) || defined(__alpha__) || defined(__alpha) || \ - defined(__powerpc__) || defined(__ppc__) || defined(__m88k__) || defined(__hpux) || \ - defined(__hppa__) || defined(__x86_64__) || (defined(__arm__) && \ - defined(__VFP_FP__)) +#ifdef HAVE_SYS_TYPES_H #include <sys/types.h> -#if BYTE_ORDER == BIG_ENDIAN +#endif + +#ifdef WORDS_BIGENDIAN #define IEEE_BIG_ENDIAN #else #define IEEE_LITTLE_ENDIAN #endif -#endif #if defined(__arm__) && !defined(__VFP_FP__) /* http://cvs.php.net/diff.php/php-src/ext/xml/config.m4?r1=1.38.2.2&r2=1.38.2.3&ty=u Index: php-src/ext/xml/config.m4 diff -u php-src/ext/xml/config.m4:1.38.2.2 php-src/ext/xml/config.m4:1.38.2.3 --- php-src/ext/xml/config.m4:1.38.2.2 Fri Oct 3 01:25:42 2003 +++ php-src/ext/xml/config.m4 Mon Dec 20 15:38:18 2004 @@ -1,10 +1,10 @@ dnl -dnl $Id: config.m4,v 1.38.2.2 2003/10/03 05:25:42 sniper Exp $ +dnl $Id: config.m4,v 1.38.2.3 2004/12/20 20:38:18 sniper Exp $ dnl -AC_C_BIGENDIAN +PHP_C_BIGENDIAN -if test "$ac_cv_c_bigendian" = "yes"; then +if test "$ac_cv_c_bigendian_php" = "yes"; then order=4321 else order=1234
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php