Browse Source

Detect whether BUFFs contain a fd element. IBM is hiding the actual

descriptor behind a void *, so we just disable this for IBM servers
PHP-5
Sascha Schumann 23 years ago
parent
commit
67f18fcf6c
  1. 13
      sapi/apache/config.m4
  2. 2
      sapi/apache/mod_php4.c

13
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 <httpd.h>],[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).],

2
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;
}
/* }}} */

Loading…
Cancel
Save