From 068907c9bc9cdbb2301e0b68a75ab1a7405ee82d Mon Sep 17 00:00:00 2001 From: foobar Date: Sat, 12 Oct 2002 23:02:43 +0000 Subject: [PATCH] - Removed sapi/fhttpd (this webserver is dead) --- sapi/cgi/config.m4 | 54 +++---------- sapi/fhttpd/CREDITS | 2 - sapi/fhttpd/fhttpd.c | 185 ------------------------------------------- 3 files changed, 10 insertions(+), 231 deletions(-) delete mode 100644 sapi/fhttpd/CREDITS delete mode 100644 sapi/fhttpd/fhttpd.c diff --git a/sapi/cgi/config.m4 b/sapi/cgi/config.m4 index ab395521a2..ce1f00aef3 100644 --- a/sapi/cgi/config.m4 +++ b/sapi/cgi/config.m4 @@ -65,48 +65,14 @@ PHP_ARG_ENABLE(discard-path,whether to discard path_info + path_translated, AC_DEFINE_UNQUOTED(DISCARD_PATH, $DISCARD_PATH, [ ]) INSTALL_IT="\$(INSTALL) -m 0755 \$(SAPI_CGI_PATH) \$(INSTALL_ROOT)\$(bindir)/php-cgi" -fi - -AC_MSG_CHECKING(for fhttpd module support) -AC_ARG_WITH(fhttpd, -[ --with-fhttpd[=DIR] Build fhttpd module. DIR is the fhttpd sources - directory, defaults to /usr/local/src/fhttpd.], -[ - if test "$withval" = "yes"; then - # fhttpd source directory - withval=/usr/local/src/fhttpd - fi - if test "$withval" != "no"; then -# For fhttpd 0.3.x - if test -f $withval/servproc.h; then - FHTTPD_INCLUDE=-I$withval/ - FHTTPD_LIB=$withval/servproc.o - FHTTPD_TARGET=$withval/ - PHP_BUILD_STATIC - PHP_SAPI=cgi - AC_DEFINE(FHTTPD,1,[ ]) - AC_MSG_RESULT(yes - fhttpd 0.3.x) - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(Invalid fhttpd directory - unable to find servproc.h under $withval) - fi - else - AC_MSG_RESULT(no) - fi -],[ - AC_MSG_RESULT(no) -]) -INCLUDES="$INCLUDES $FHTTPD_INCLUDE" -dnl## AC_SUBST(FHTTPD_INCLUDE) -PHP_SUBST(FHTTPD_LIB) -PHP_SUBST(FHTTPD_TARGET) -case $host_alias in - *darwin*) - BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" - ;; - *) - BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" - ;; -esac -PHP_SUBST(BUILD_CGI) + case $host_alias in + *darwin*) + BUILD_CGI="\$(CC) \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(NATIVE_RPATHS) \$(PHP_GLOBAL_OBJS:.lo=.o) \$(PHP_SAPI_OBJS:.lo=.o) \$(PHP_FRAMEWORKS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; + *) + BUILD_CGI="\$(LIBTOOL) --mode=link \$(CC) -export-dynamic \$(CFLAGS_CLEAN) \$(EXTRA_CFLAGS) \$(EXTRA_LDFLAGS) \$(LDFLAGS) \$(PHP_RPATHS) \$(PHP_GLOBAL_OBJS) \$(PHP_SAPI_OBJS) \$(EXTRA_LIBS) \$(ZEND_EXTRA_LIBS) -o \$(SAPI_CGI_PATH)" + ;; + esac + PHP_SUBST(BUILD_CGI) +fi diff --git a/sapi/fhttpd/CREDITS b/sapi/fhttpd/CREDITS deleted file mode 100644 index aaa5aac1fd..0000000000 --- a/sapi/fhttpd/CREDITS +++ /dev/null @@ -1,2 +0,0 @@ -fhttpd -Alex Belits diff --git a/sapi/fhttpd/fhttpd.c b/sapi/fhttpd/fhttpd.c deleted file mode 100644 index fd81e67969..0000000000 --- a/sapi/fhttpd/fhttpd.c +++ /dev/null @@ -1,185 +0,0 @@ -/* - +----------------------------------------------------------------------+ - | PHP Version 4 | - +----------------------------------------------------------------------+ - | Copyright (c) 1997-2002 The PHP Group | - +----------------------------------------------------------------------+ - | This source file is subject to version 2.02 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_02.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. | - +----------------------------------------------------------------------+ - | Author: Alex Belits | - +----------------------------------------------------------------------+ - */ - -/* $Id$ */ -#include "php.h" - -#include -#if HAVE_UNISTD_H -#include -#endif -#include -#include -#include - -#if FHTTPD -#include -#include - -struct http_server *server = NULL; -struct request *req = NULL; -struct httpresponse *response = NULL; -int headermade = 0; -int global_alarmflag = 0; -int idle_timeout = IDLE_TIMEOUT; -int exit_status = 0; -char **currentheader = NULL; -char *headerfirstline = NULL; -int headerlines = 0; -static int headerlinesallocated = 0; - -void alarmhandler(SIGACTARGS) -{ - global_alarmflag = 1; -} - -void setalarm(int t) -{ - struct sigaction tmpsigaction; - global_alarmflag = 0; - if (t){ - bzero((char *) &tmpsigaction, sizeof(struct sigaction)); - tmpsigaction.sa_handler = alarmhandler; - sigaddset(&tmpsigaction.sa_mask, SIGALRM); - tmpsigaction.sa_flags = 0; - sigaction(SIGALRM, &tmpsigaction, NULL); - alarm(t); - } -} - -int checkinput(int h) -{ - fd_set readfd; - FD_ZERO(&readfd); - FD_SET(h, &readfd); - return select(h + 1, &readfd, NULL, NULL, NULL) > 0; -} - - -PHPAPI void php_fhttpd_free_header(void) -{ - int i; - - if (headerfirstline) { - free(headerfirstline); - headerfirstline = NULL; - } - if (currentheader) { - for (i = 0; i < headerlines; i++) { - free(currentheader[i]); - } - free(currentheader); - currentheader = NULL; - } - headerlines = 0; - headerlinesallocated = 0; - headermade = 0; -} - - -PHPAPI void php_fhttpd_puts_header(char *s) -{ - char *p0, *p1, *p2, *p3, **p; - int l; - - if (!s || !*s || *s == '\r' || *s == '\n') - return; - l = strlen(s); - p2 = strchr(s, '\r'); - p3 = strchr(s, '\n'); - p0 = strchr(s, ':'); - p1 = strchr(s, ' '); - if (p0 && (!p1 || p1 > p0)) { - if (!headerlinesallocated) { - currentheader = (char **) malloc(10 * sizeof(char *)); - if (currentheader) - headerlinesallocated = 10; - } else { - if (headerlinesallocated <= headerlines) { - p = (char **) realloc(currentheader, (headerlinesallocated + 10) * sizeof(char *)); - if (p) { - currentheader = p; - headerlinesallocated += 10; - } - } - } - - if (headerlinesallocated > headerlines) { - currentheader[headerlines] = malloc(l + 3); - if (currentheader[headerlines]) { - strcpy(currentheader[headerlines], s); - if (!p3) { - if (p2) { - (currentheader[headerlines] + (p2 - s))[1] = '\n'; - (currentheader[headerlines] + (p2 - s))[2] = 0; - } else { - currentheader[headerlines][l] = '\r'; - currentheader[headerlines][l + 1] = '\n'; - currentheader[headerlines][l + 2] = 0; - } - } - headerlines++; - headermade = 1; - } - } - } else { - if (headerfirstline) - free(headerfirstline); - headerfirstline = malloc(l + 3); - if (headerfirstline) { - strcpy(headerfirstline, s); - if (!p3) { - if (p2) { - (headerfirstline + (p2 - s))[1] = '\n'; - (headerfirstline + (p2 - s))[2] = 0; - } else { - headerfirstline[l] = '\r'; - headerfirstline[l + 1] = '\n'; - headerfirstline[l + 2] = 0; - } - } - } - headermade = 1; - } -} - -void fhttpd_flush(void) -{ -} - -PHPAPI void php_fhttpd_puts(char *s) -{ - putlinetoresponse(response, s); -} - -PHPAPI void php_fhttpd_putc(char c) -{ - writetoresponse(response, &c, 1); -} - -PHPAPI int php_fhttpd_write(char *a, int n) -{ - return writetoresponse(response, a, n); -} -#endif -/* - * Local variables: - * tab-width: 4 - * c-basic-offset: 4 - * End: - */ -- 2.40.0