cvs: ZendEngine2 / Zend.m4 configure.in zend_strtod.c

From: Date: Sat, 22 Jan 2005 20:28:18 +0000
Subject: cvs: ZendEngine2 / Zend.m4 configure.in zend_strtod.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3326@lists.php.net to get a copy of this message
sniper Sat Jan 22 15:28:18 2005 EDT Modified files: /ZendEngine2 Zend.m4 configure.in zend_strtod.c Log: - Compile fix for systems without uint32_t typedef http://cvs.php.net/diff.php/ZendEngine2/Zend.m4?r1=1.47&r2=1.48&ty=u Index: ZendEngine2/Zend.m4 diff -u ZendEngine2/Zend.m4:1.47 ZendEngine2/Zend.m4:1.48 --- ZendEngine2/Zend.m4:1.47 Thu Dec 30 02:08:36 2004 +++ ZendEngine2/Zend.m4 Sat Jan 22 15:28:17 2005 @@ -1,5 +1,5 @@ dnl -dnl $Id: Zend.m4,v 1.47 2004/12/30 07:08:36 sniper Exp $ +dnl $Id: Zend.m4,v 1.48 2005/01/22 20:28:17 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.35&r2=1.36&ty=u Index: ZendEngine2/configure.in diff -u ZendEngine2/configure.in:1.35 ZendEngine2/configure.in:1.36 --- ZendEngine2/configure.in:1.35 Sun Jan 9 20:33:29 2005 +++ ZendEngine2/configure.in Sat Jan 22 15:28:17 2005 @@ -1,4 +1,4 @@ -dnl $Id: configure.in,v 1.35 2005/01/10 01:33:29 sniper Exp $ +dnl $Id: configure.in,v 1.36 2005/01/22 20:28:17 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.14&r2=1.15&ty=u Index: ZendEngine2/zend_strtod.c diff -u ZendEngine2/zend_strtod.c:1.14 ZendEngine2/zend_strtod.c:1.15 --- ZendEngine2/zend_strtod.c:1.14 Mon Jan 10 09:57:35 2005 +++ ZendEngine2/zend_strtod.c Sat Jan 22 15:28:17 2005 @@ -89,18 +89,24 @@ * directly -- and assumed always to succeed. */ -/* $Id: zend_strtod.c,v 1.14 2005/01/10 14:57:35 sniper Exp $ */ - #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 (#3326) next »