From 04e25c59f738083d4e6d43925ee841e3c57d93a8 Mon Sep 17 00:00:00 2001 From: Sascha Schumann Date: Tue, 11 Feb 2003 02:25:48 +0000 Subject: [PATCH] MFH BUFF check --- sapi/apache/config.m4 | 13 +++++++++++++ sapi/apache/mod_php4.c | 2 ++ 2 files changed, 15 insertions(+) diff --git a/sapi/apache/config.m4 b/sapi/apache/config.m4 index 63c2aa5c5d..3ff82b3e24 100644 --- a/sapi/apache/config.m4 +++ b/sapi/apache/config.m4 @@ -212,6 +212,19 @@ PHP_SUBST(APXS_LDFLAGS) PHP_SUBST(APACHE_INSTALL) PHP_SUBST(STRONGHOLD) +AC_CACHE_CHECK([for member fd in BUFF *],ac_cv_php_fd_in_buff,[ + save=$CPPFLAGS + CPPFLAGS="$CPPFLAGS $APACHE_INCLUDE" + AC_TRY_COMPILE([#include ],[conn_rec *c; int fd = c->client->fd;],[ + ac_cv_php_fd_in_buff=yes],[ac_cv_php_fd_in_buff=no],[ac_cv_php_fd_in_buff=no]) + CPPFLAGS=$save +],[ + if test "$ac_cv_php_fd_in_buff" = "yes"; then + AC_DEFINE(PHP_APACHE_HAVE_CLIENT_FD, 1, [ ]) + fi +]) + + AC_MSG_CHECKING(for mod_charset compatibility option) AC_ARG_WITH(mod_charset, [ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache).], diff --git a/sapi/apache/mod_php4.c b/sapi/apache/mod_php4.c index c4afc8b32e..b2abb928d8 100644 --- a/sapi/apache/mod_php4.c +++ b/sapi/apache/mod_php4.c @@ -348,6 +348,7 @@ static char *php_apache_getenv(char *name, size_t name_len TSRMLS_DC) */ static int sapi_apache_get_fd(int *nfd TSRMLS_DC) { +#if PHP_APACHE_HAVE_CLIENT_FD request_rec *r = SG(server_context); int fd; @@ -357,6 +358,7 @@ static int sapi_apache_get_fd(int *nfd TSRMLS_DC) if (nfd) *nfd = fd; return SUCCESS; } +#endif return FAILURE; } /* }}} */ -- 2.40.0