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

From: Date: Sat, 22 Jan 2005 20:31:19 +0000
Subject: cvs: Zend(PHP_4_3) / Zend.m4 configure.in zend_strtod.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3328@lists.php.net to get a copy of this message
sniper Sat Jan 22 15:31:19 2005 EDT Modified files: (Branch: PHP_4_3) /Zend Zend.m4 configure.in zend_strtod.c Log: - Compile fix for systems without uint32_t typedef http://cvs.php.net/diff.php/Zend/Zend.m4?r1=1.35.2.8&r2=1.35.2.9&ty=u Index: Zend/Zend.m4 diff -u Zend/Zend.m4:1.35.2.8 Zend/Zend.m4:1.35.2.9 --- Zend/Zend.m4:1.35.2.8 Thu Dec 30 02:02:16 2004 +++ Zend/Zend.m4 Sat Jan 22 15:31:18 2005 @@ -1,5 +1,5 @@ dnl -dnl $Id: Zend.m4,v 1.35.2.8 2004/12/30 07:02:16 sniper Exp $ +dnl $Id: Zend.m4,v 1.35.2.9 2005/01/22 20:31:18 sniper Exp $ dnl dnl This file contains Zend specific autoconf functions. dnl @@ -41,6 +41,8 @@ fi AC_CHECK_HEADERS( +inttypes.h \ +stdint.h \ limits.h \ malloc.h \ string.h \ @@ -60,6 +62,26 @@ 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 http://cvs.php.net/diff.php/Zend/configure.in?r1=1.33.2.1&r2=1.33.2.2&ty=u Index: Zend/configure.in diff -u Zend/configure.in:1.33.2.1 Zend/configure.in:1.33.2.2 --- Zend/configure.in:1.33.2.1 Sun Jan 9 20:36:22 2005 +++ Zend/configure.in Sat Jan 22 15:31:18 2005 @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.33.2.1 2005/01/10 01:36:22 sniper Exp $ +dnl $Id: configure.in,v 1.33.2.2 2005/01/22 20:31:18 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/Zend/zend_strtod.c?r1=1.1.2.13&r2=1.1.2.14&ty=u Index: Zend/zend_strtod.c diff -u Zend/zend_strtod.c:1.1.2.13 Zend/zend_strtod.c:1.1.2.14 --- Zend/zend_strtod.c:1.1.2.13 Mon Dec 20 20:08:09 2004 +++ Zend/zend_strtod.c Sat Jan 22 15:31:19 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 (#3328) next »