From: strube at physik3 dot gwdg dot de
Operating system: Solaris 7 SPARC
PHP version: 4.3.10
PHP Bug Type: Compile Failure
Bug description: Compilation fails on zend_strtod.c
Description:
------------
Compilation of zend_strtod.c fails in Solaris 7 with Sun Workshop 5.0
compiler. There are two reasons:
(1) IEEE_*_ENDIAN does not get defined.
(2) line 246: syntax error before or at: u_int32_t
As for (2), this is almost identical to Bug #30779, but (1) is not
reported there.
My ad-hoc patch:
*** Zend/zend_strtod.c.ORI Tue Dec 14 09:35:26 2004
--- Zend/zend_strtod.c Thu Dec 16 12:21:54 2004
***************
*** 95,101 ****
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(__ns32k__) || defined(__alpha__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__m88k__) || \
defined(__hppa__) || defined(__x86_64__) || (defined(__arm__) && \
--- 95,108 ----
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(sun) || defined(__sun)
! #include <sys/isa_defs.h>
! #ifdef _BIG_ENDIAN
! #define IEEE_BIG_ENDIAN
! #else
! #define IEEE_LITTLE_ENDIAN
! #endif
! #elif defined(__m68k__) || defined(__sparc__) || defined(__i386__) || \
defined(__mips__) || defined(__ns32k__) || defined(__alpha__) || \
defined(__powerpc__) || defined(__ppc__) || defined(__m88k__) || \
defined(__hppa__) || defined(__x86_64__) || (defined(__arm__) && \
***************
*** 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(__sparc__) || defined(__sparc) || defined(__ppc__)
#define u_int32_t uint32_t
#endif
--
Edit bug report at http://bugs.php.net/?id=31121&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=31121&r=trysnapshot4
Try a CVS snapshot (php5.0):
http://bugs.php.net/fix.php?id=31121&r=trysnapshot50
Try a CVS snapshot (php5.1):
http://bugs.php.net/fix.php?id=31121&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=31121&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=31121&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=31121&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=31121&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=31121&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=31121&r=support
Expected behavior: http://bugs.php.net/fix.php?id=31121&r=notwrong
Not enough info:
http://bugs.php.net/fix.php?id=31121&r=notenoughinfo
Submitted twice:
http://bugs.php.net/fix.php?id=31121&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=31121&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=31121&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=31121&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=31121&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=31121&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=31121&r=float
MySQL Configuration Error: http://bugs.php.net/fix.php?id=31121&r=mysqlcfg