sniper Wed Jun 27 14:40:08 2007 UTC
Modified files: (Branch: PHP_5_2)
/php-src acinclude.m4 configure.in
Log:
MFH:- Added PHP_CHECK_SIZEOF macro (special version of AC_CHECK_SIZEOF)
http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.15&r2=1.332.2.14.2.16&diff_format=u
Index: php-src/acinclude.m4
diff -u php-src/acinclude.m4:1.332.2.14.2.15
php-src/acinclude.m4:1.332.2.14.2.16
--- php-src/acinclude.m4:1.332.2.14.2.15 Thu May 24 21:40:41 2007
+++ php-src/acinclude.m4 Wed Jun 27 14:40:08 2007
@@ -1,5 +1,5 @@
dnl
-dnl $Id: acinclude.m4,v 1.332.2.14.2.15 2007/05/24 21:40:41 sniper Exp $
+dnl $Id: acinclude.m4,v 1.332.2.14.2.16 2007/06/27 14:40:08 sniper Exp $
dnl
dnl This file contains local autoconf functions.
dnl
@@ -1035,6 +1035,44 @@
dnl -------------------------------------------------------------------------
dnl
+dnl PHP_CHECK_SIZEOF(TYPE [, CROSS-SIZE])
+dnl Enhanced version of AC_CHECK_SIZEOF for checking more types
+dnl than just those defined in stdio.h
+dnl
+AC_DEFUN(PHP_CHECK_SIZEOF,
+[changequote(<<, >>)dnl
+dnl The name to #define.
+define(<<AC_TYPE_NAME>>, translit(sizeof_$1, [a-z *], [A-Z_P]))dnl
+dnl The cache variable name.
+define(<<AC_CV_NAME>>, translit(ac_cv_sizeof_$1, [ *], [_p]))dnl
+changequote([, ])dnl
+AC_MSG_CHECKING(size of $1)
+AC_CACHE_VAL(AC_CV_NAME,
+[AC_TRY_RUN([#include <stdio.h>
+#if STDC_HEADERS
+#include <stdlib.h>
+#include <stddef.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+int main()
+{
+ FILE *f=fopen("conftestval", "w");
+ if (!f) return(1);
+ fprintf(f, "%d\n", sizeof($1));
+ return(0);
+ }], AC_CV_NAME=`cat conftestval`, AC_CV_NAME=0, ifelse([$2], , ,
AC_CV_NAME=$2))])dnl
+AC_MSG_RESULT($AC_CV_NAME)
+AC_DEFINE_UNQUOTED(AC_TYPE_NAME, $AC_CV_NAME, [The number of bytes in a $1.])
+undefine([AC_TYPE_NAME])dnl
+undefine([AC_CV_NAME])dnl
+])
+
+dnl
dnl PHP_CHECK_IN_ADDR_T
dnl
AC_DEFUN([PHP_CHECK_IN_ADDR_T], [
@@ -2646,6 +2684,9 @@
fi
])
+dnl
+dnl PHP_TEST_WRITE_STDOUT
+dnl
AC_DEFUN([PHP_TEST_WRITE_STDOUT],[
AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
AC_TRY_RUN([
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.58&r2=1.579.2.52.2.59&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.58
php-src/configure.in:1.579.2.52.2.59
--- php-src/configure.in:1.579.2.52.2.58 Mon Jun 25 14:22:49 2007
+++ php-src/configure.in Wed Jun 27 14:40:08 2007
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.52.2.58 2007/06/25 14:22:49 dmitry Exp $ -*-
autoconf -*-
+ ## $Id: configure.in,v 1.579.2.52.2.59 2007/06/27 14:40:08 sniper Exp $ -*-
autoconf -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -424,15 +424,17 @@
PHP_STRUCT_FLOCK
PHP_SOCKLEN_T
-AC_CHECK_SIZEOF(intmax_t, 0)
AC_CHECK_SIZEOF(size_t, 8)
-AC_CHECK_SIZEOF(ssize_t, 8)
-AC_CHECK_SIZEOF(ptrdiff_t, 8)
AC_CHECK_SIZEOF(long long, 8)
AC_CHECK_SIZEOF(long long int, 8)
AC_CHECK_SIZEOF(long, 8)
AC_CHECK_SIZEOF(int, 4)
+dnl These are defined elsewhere than stdio.h
+PHP_CHECK_SIZEOF(intmax_t, 0)
+PHP_CHECK_SIZEOF(ssize_t, 8)
+PHP_CHECK_SIZEOF(ptrdiff_t, 8)
+
dnl Check for members of the stat structure
AC_STRUCT_ST_BLKSIZE
dnl AC_STRUCT_ST_BLOCKS will screw QNX because fileblocks.o does not exists
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php