summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--INSTALL2
-rw-r--r--acconfig.h.in4
-rw-r--r--sapi/isapi/config.m42
-rw-r--r--sapi/isapi/php4isapi.c36
4 files changed, 41 insertions, 3 deletions
diff --git a/INSTALL b/INSTALL
index 3ad1f25a95..5311acab3c 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,8 @@
Installation Instructions for PHP 4.0
-------------------------------------
+Note! As of 4.0b3, PHP will require GNU make.
+
For the impatient here is a quick set of steps that will build PHP as
an Apache module for Apache 1.3.x with MySQL support. A more verbose
explanation follows.
diff --git a/acconfig.h.in b/acconfig.h.in
index 6c5744f358..c76094f1cf 100644
--- a/acconfig.h.in
+++ b/acconfig.h.in
@@ -118,3 +118,7 @@
/* Define to compile PHP/Zend thread safe */
#undef ZTS
+
+/* Define when compiling with Zeus support */
+#undef WITH_ZEUS
+
diff --git a/sapi/isapi/config.m4 b/sapi/isapi/config.m4
index 777ec8de65..93d06d7d13 100644
--- a/sapi/isapi/config.m4
+++ b/sapi/isapi/config.m4
@@ -5,7 +5,6 @@ AC_ARG_WITH(zeus,
[ --with-zeus=DIR Build PHP as an ISAPI module for use with Zeus.],
[
if test "$withval" != "no"; then
- SAPI_TARGET=libphp4_isapi.so
AC_MSG_RESULT(yes)
if test "${enable_thread_safety}" != "yes"; then
AC_MSG_ERROR(You must specify --enable-thread-safety to build as an ISAPI module)
@@ -16,6 +15,7 @@ AC_ARG_WITH(zeus,
if ! test -f "$zeuspath/web/include/httpext.h"; then
AC_MSG_ERROR(Unable to find httpext.h in $zeuspath/web/include)
fi
+ AC_DEFINE(WITH_ZEUS)
AC_ADD_INCLUDE($zeuspath/web/include)
PHP_SAPI=isapi
SAPI_TARGET=php4isapi.so
diff --git a/sapi/isapi/php4isapi.c b/sapi/isapi/php4isapi.c
index ee3f1f2179..ce206b5efc 100644
--- a/sapi/isapi/php4isapi.c
+++ b/sapi/isapi/php4isapi.c
@@ -1,4 +1,25 @@
-#include <windows.h>
+/*
+ +----------------------------------------------------------------------+
+ | PHP version 4.0 |
+ +----------------------------------------------------------------------+
+ | Copyright (c) 1997, 1998, 1999 The PHP Group |
+ +----------------------------------------------------------------------+
+ | This source file is subject to version 2.0 of the PHP license, |
+ | that is bundled with this package in the file LICENSE, and is |
+ | available at through the world-wide-web at |
+ | http://www.php.net/license/2_0.txt. |
+ | If you did not receive a copy of the PHP license and are unable to |
+ | obtain it through the world-wide-web, please send a note to |
+ | license@php.net so we can mail you a copy immediately. |
+ +----------------------------------------------------------------------+
+ | Authors: |
+ | |
+ +----------------------------------------------------------------------+
+ */
+
+#if WIN32|WINNT
+# include <windows.h>
+#endif
#include <httpext.h>
#include <httpfilt.h>
#include <httpext.h>
@@ -8,6 +29,8 @@
#include "php_globals.h"
#include "ext/standard/info.h"
+#include "zeus.h"
+
#define MAX_STATUS_LENGTH sizeof("xxxx LONGEST STATUS DESCRIPTION")
#define ISAPI_SERVER_VAR_BUF_SIZE 1024
#define ISAPI_POST_DATA_BUF 1024
@@ -190,7 +213,9 @@ static int sapi_isapi_send_headers(sapi_headers_struct *sapi_headers SLS_DC)
header_info.pszStatus = status_buf;
break;
}
+#ifndef WITH_ZEUS
header_info.cchStatus = strlen(header_info.pszStatus);
+#endif
header_info.pszHeader = combined_headers;
header_info.cchHeader = total_length;
lpECB->dwHttpStatusCode = SG(sapi_headers).http_response_code;
@@ -461,4 +486,11 @@ __declspec(dllexport) BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, L
break;
}
return TRUE;
-} \ No newline at end of file
+}
+
+/*
+ * Local variables:
+ * tab-width: 4
+ * c-basic-offset: 4
+ * End:
+ */