tony2001 Tue Feb 20 20:11:11 2007 UTC Modified files: (Branch: PHP_5_2) /php-src acinclude.m4 configure.in /php-src/sapi/cgi config9.m4 Log: MFH: move PHP_TEST_WRITE_STDOUT to acinclude.m4 and use it in configure.in http://cvs.php.net/viewvc.cgi/php-src/acinclude.m4?r1=1.332.2.14.2.10&r2=1.332.2.14.2.11&diff_format=u Index: php-src/acinclude.m4 diff -u php-src/acinclude.m4:1.332.2.14.2.10 php-src/acinclude.m4:1.332.2.14.2.11 --- php-src/acinclude.m4:1.332.2.14.2.10 Mon Jan 1 20:10:01 2007 +++ php-src/acinclude.m4 Tue Feb 20 20:11:11 2007 @@ -1,5 +1,5 @@ dnl -dnl $Id: acinclude.m4,v 1.332.2.14.2.10 2007/01/01 20:10:01 nlopess Exp $ +dnl $Id: acinclude.m4,v 1.332.2.14.2.11 2007/02/20 20:11:11 tony2001 Exp $ dnl dnl This file contains local autoconf functions. dnl @@ -2645,3 +2645,33 @@ AC_MSG_ERROR([Unable to detect data struct used by crypt_r]) fi ]) + +AC_DEFUN([PHP_TEST_WRITE_STDOUT],[ + AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[ + AC_TRY_RUN([ +#ifdef HAVE_UNISTD_H +#include <unistd.h> +#endif + +#define TEXT "This is the test message -- " + +main() +{ + int n; + + n = write(1, TEXT, sizeof(TEXT)-1); + return (!(n == sizeof(TEXT)-1)); +} + ],[ + ac_cv_write_stdout=yes + ],[ + ac_cv_write_stdout=no + ],[ + ac_cv_write_stdout=no + ]) + ]) + if test "$ac_cv_write_stdout" = "yes"; then + AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works]) + fi +]) + http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.43&r2=1.579.2.52.2.44&diff_format=u Index: php-src/configure.in diff -u php-src/configure.in:1.579.2.52.2.43 php-src/configure.in:1.579.2.52.2.44 --- php-src/configure.in:1.579.2.52.2.43 Wed Feb 7 11:16:52 2007 +++ php-src/configure.in Tue Feb 20 20:11:11 2007 @@ -1,4 +1,4 @@ - ## $Id: configure.in,v 1.579.2.52.2.43 2007/02/07 11:16:52 tony2001 Exp $ -*- autoconf -*- + ## $Id: configure.in,v 1.579.2.52.2.44 2007/02/20 20:11:11 tony2001 Exp $ -*- autoconf -*- dnl ## Process this file with autoconf to produce a configure script. divert(1) @@ -288,6 +288,9 @@ dnl Check whether the system byte ordering is bigendian PHP_C_BIGENDIAN +dnl Check whether writing to stdout works +PHP_TEST_WRITE_STDOUT + dnl Check for /usr/pkg/{lib,include} which is where NetBSD puts binary dnl and source packages. This should be harmless on other OSs. if test -d /usr/pkg/include -a -d /usr/pkg/lib ; then http://cvs.php.net/viewvc.cgi/php-src/sapi/cgi/config9.m4?r1=1.17.2.2.2.1&r2=1.17.2.2.2.2&diff_format=u Index: php-src/sapi/cgi/config9.m4 diff -u php-src/sapi/cgi/config9.m4:1.17.2.2.2.1 php-src/sapi/cgi/config9.m4:1.17.2.2.2.2 --- php-src/sapi/cgi/config9.m4:1.17.2.2.2.1 Thu Sep 28 09:37:52 2006 +++ php-src/sapi/cgi/config9.m4 Tue Feb 20 20:11:11 2007 @@ -1,5 +1,5 @@ dnl -dnl $Id: config9.m4,v 1.17.2.2.2.1 2006/09/28 09:37:52 dmitry Exp $ +dnl $Id: config9.m4,v 1.17.2.2.2.2 2007/02/20 20:11:11 tony2001 Exp $ dnl AC_ARG_ENABLE(cgi, @@ -50,36 +50,6 @@ PHP_ENABLE_PATHINFO_CHECK=yes ]) -AC_DEFUN([PHP_TEST_WRITE_STDOUT],[ - AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[ - AC_TRY_RUN([ -#ifdef HAVE_UNISTD_H -#include <unistd.h> -#endif - -#define TEXT "This is the test message -- " - -main() -{ - int n; - - n = write(1, TEXT, sizeof(TEXT)-1); - return (!(n == sizeof(TEXT)-1)); -} - ],[ - ac_cv_write_stdout=yes - ],[ - ac_cv_write_stdout=no - ],[ - ac_cv_write_stdout=no - ]) - ]) - if test "$ac_cv_write_stdout" = "yes"; then - AC_DEFINE(PHP_WRITE_STDOUT, 1, [whether write(2) works]) - fi -]) - - if test "$PHP_SAPI" = "default"; then AC_MSG_CHECKING(for CGI build) if test "$PHP_SAPI_CGI" != "no"; then @@ -96,8 +66,6 @@ esac PHP_SUBST(SAPI_CGI_PATH) - PHP_TEST_WRITE_STDOUT - AC_MSG_CHECKING(whether to force Apache CGI redirect) if test "$PHP_FORCE_CGI_REDIRECT" = "yes"; then REDIRECT=1
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php