cvs: ZendEngine2(PHP_5_0) / Zend.m4 configure.in zend_strtod.c

From: Date: Sat, 22 Jan 2005 20:29:39 +0000
Subject: cvs: ZendEngine2(PHP_5_0) / Zend.m4 configure.in zend_strtod.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3327@lists.php.net to get a copy of this message
sniper Sat Jan 22 15:29:39 2005 EDT Modified files: (Branch: PHP_5_0) /ZendEngine2 Zend.m4 configure.in zend_strtod.c Log: MFH: Compile fix for systems without uint32_t typedef http://cvs.php.net/diff.php/ZendEngine2/Zend.m4?r1=1.43&r2=1.43.2.1&ty=u Index: ZendEngine2/Zend.m4 diff -u ZendEngine2/Zend.m4:1.43 ZendEngine2/Zend.m4:1.43.2.1 --- ZendEngine2/Zend.m4:1.43 Tue Oct 7 18:39:54 2003 +++ ZendEngine2/Zend.m4 Sat Jan 22 15:29:39 2005 @@ -1,5 +1,5 @@ dnl -dnl $Id: Zend.m4,v 1.43 2003/10/07 22:39:54 rasmus Exp $ +dnl $Id: Zend.m4,v 1.43.2.1 2005/01/22 20:29:39 sniper Exp $ dnl dnl This file contains Zend specific autoconf functions. dnl @@ -42,6 +42,8 @@ fi AC_CHECK_HEADERS( +inttypes.h \ +stdint.h \ limits.h \ malloc.h \ string.h \ @@ -82,6 +84,27 @@ AC_CHECK_TYPE( uint, unsigned int ) AC_CHECK_TYPE( ulong, unsigned long ) +dnl Check if uint32_t is defined +AC_MSG_CHECKING(for uint32_t) +AC_TRY_COMPILE([ +#if HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif +#if HAVE_INTTYPES_H +#include <inttypes.h> +#elif HAVE_STDINT_H +#include <stdint.h> +#endif], +[if ((uint32_t *) 0) + return 0; +if (sizeof (uint32_t)) + return 0; +],[ + AC_DEFINE(HAVE_UINT32_T,1,[Define if uint32_t type is present. ]) + AC_MSG_RESULT(yes) +], AC_MSG_RESULT(no) +)dnl + dnl Checks for library functions. AC_FUNC_VPRINTF AC_FUNC_MEMCMP http://cvs.php.net/diff.php/ZendEngine2/configure.in?r1=1.34.2.1&r2=1.34.2.2&ty=u Index: ZendEngine2/configure.in diff -u ZendEngine2/configure.in:1.34.2.1 ZendEngine2/configure.in:1.34.2.2 --- ZendEngine2/configure.in:1.34.2.1 Sun Jan 9 20:36:12 2005 +++ ZendEngine2/configure.in Sat Jan 22 15:29:39 2005 @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.34.2.1 2005/01/10 01:36:12 sniper Exp $ +dnl $Id: configure.in,v 1.34.2.2 2005/01/22 20:29:39 sniper Exp $ dnl Process this file with autoconf to produce a configure script. AC_INIT(zend.c) @@ -15,6 +15,9 @@ dnl We want this one before the checks, so the checks can modify CFLAGS. test -z "$CFLAGS" && auto_cflags=1 +AC_CHECK_SIZEOF(long, 8) +AC_CHECK_SIZEOF(int, 4) + sinclude(Zend.m4) LIBZEND_BASIC_CHECKS http://cvs.php.net/diff.php/ZendEngine2/zend_strtod.c?r1=1.1.2.14&r2=1.1.2.15&ty=u Index: ZendEngine2/zend_strtod.c diff -u ZendEngine2/zend_strtod.c:1.1.2.14 ZendEngine2/zend_strtod.c:1.1.2.15 --- ZendEngine2/zend_strtod.c:1.1.2.14 Mon Dec 20 20:07:46 2004 +++ ZendEngine2/zend_strtod.c Sat Jan 22 15:29:39 2005 @@ -91,14 +91,22 @@ #include <zend_strtod.h> +#ifdef HAVE_SYS_TYPES_H +#include <sys/types.h> +#endif + #if defined(HAVE_INTTYPES_H) #include <inttypes.h> #elif defined(HAVE_STDINT_H) #include <stdint.h> #endif -#ifdef HAVE_SYS_TYPES_H -#include <sys/types.h> +#ifndef HAVE_UINT32_T +# if SIZEOF_INT == 4 +typedef unsigned int uint32_t; +# elif SIZEOF_LONG == 4 +typedef unsigned long int uint32_t; +# endif #endif #ifdef WORDS_BIGENDIAN

« previous php.zend-engine.cvs (#3327) next »