diff options
Diffstat (limited to 'www/apache22')
32 files changed, 0 insertions, 4812 deletions
diff --git a/www/apache22/Makefile b/www/apache22/Makefile deleted file mode 100644 index 8195f5c957bd..000000000000 --- a/www/apache22/Makefile +++ /dev/null @@ -1,219 +0,0 @@ -# New ports collection makefile for: apache21 -# Date created: Dec 11 2004 -# Whom: Clement Laforet <clement@FreeBSD.org> -# -# $FreeBSD$ -# -# For more information, please read Makefile.doc -# - -PORTNAME= apache -PORTVERSION= 2.1.2 -PORTREVISION= 3 -CATEGORIES= www -MASTER_SITES= ${MASTER_SITE_LOCAL:S/%SUBDIR%/clement/} -DISTNAME= httpd-${PORTVERSION}-alpha -DISTFILES= ${DISTNAME}.tar.gz powerlogo.gif -DIST_SUBDIR= apache21 -EXTRACT_ONLY= ${DISTNAME}.tar.gz - -MAINTAINER?= clement@FreeBSD.org -COMMENT?= Version 2.1 of Apache web server with ${WITH_MPM:L} MPM. - -LIB_DEPENDS= expat.5:${PORTSDIR}/textproc/expat2 -BUILD_DEPENDS= python:${PORTSDIR}/lang/python - -LATEST_LINK= apache21 - -CONFLICTS= apache+mod_ssl-1.* apache+mod_ssl+ipv6-1.* apache+mod_ssl+modsnmp-1.* \ - apache+mod_ssl+mod_snmp+ipv6-1.* apache+mod_ssl+mod_accel-1.* \ - apache+mod_ssl+mod_snmp+mod_accel-1.* \ - apache+ipv6-1.* apache+ssl-1.* apache-1.* apache_fp-1.* \ - caudium-devel-1.* caudium10-1.* caudium12-* \ - ru-apache+mod_ssl-1.* ru-apache-1.* thttpd-2.* \ - apache-2.0.* apache-*-2.0.* - -SCRIPTS_ENV+= LIBTOOL=${LIBTOOL} LIBTOOLIZE=${LIBTOOLIZE} \ - LIBTOOL_VERSION=${LIBTOOL_VERSION} AUTOCONF=${AUTOCONF} \ - LIBTOOL_M4=${LOCALBASE}/share/aclocal/libtool${LIBTOOL_VERSION}.m4 \ - AUTOHEADER=${AUTOHEADER} -USE_ICONV= yes -USE_AUTOCONF_VER= 259 -USE_LIBTOOL_VER= 15 -USE_PERL5= yes -USE_RC_SUBR= yes -USE_REINPLACE= yes -LIBTOOLFILES= configure -.if !defined(WITH_APR_FROM_PORTS) -INSTALLS_SHLIB= yes -.endif -CONFIGURE_ARGS= --prefix=${PREFIX_RELDEST} \ - --enable-layout=FreeBSD \ - --with-perl=${PERL5} \ - --with-port=${WITH_HTTP_PORT} \ - --with-expat=${LOCALBASE} \ - --with-iconv=${LOCALBASE} \ - --enable-http - -CONFIGURE_ENV= CC="${CC}" CPPFLAGS="${CPPFLAGS}" \ - CFLAGS="${CFLAGS}" \ - LDFLAGS="${LDFLAGS}" CONFIG_SHELL="${SH}" \ - LOCALBASE="${LOCALBASE}" - -PREFIX_RELDEST= ${PREFIX:S,^${DESTDIR},,} -RC_SCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR} - -MAKE_ENV+= DESTDIR=${DESTDIR} EXPR_COMPAT=yes - -WITH_MPM?= prefork # or worker, perchild, threadpool, event - -WITH_HTTP_PORT?= 80 - -.if defined (WITH_WINDOWSUPDATEFIX) -EXTRA_PATCHES+= ${FILESDIR}/exp-windowsupdate.patch -.endif - -.if defined(WITHOUT_IPV6) -CONFIGURE_ARGS+= --disable-ipv6 -.else -CATEGORIES+= ipv6 -. if defined(WITH_IPV6_V6ONLY) && defined(WITHOUT_V4MAPPED) -CONFIGURE_ARGS+= --disable-v4-mapped -. else -CONFIGURE_ARGS+= --enable-v4-mapped -. endif -.endif - -.if !defined(WITHOUT_SSL) || defined(WITHOUT_SSL_MODULES) -USE_OPENSSL= yes -.endif - -.if defined(WITH_STATIC_SUPPORT) -CONFIGURE_ARGS+= --enable-static-support -.endif - -# debug overrides CFLAGS -.if defined(WITH_DEBUG) -DEBUG_FLAGS?= -O0 -g -ggdb3 -CFLAGS= ${DEBUG_FLAGS} -CONFIGURE_ARGS+= --enable-maintainer-mode -WITH_EXCEPTION_HOOK= YES -.endif - -.if defined(WITH_EXCEPTION_HOOK) -CONFIGURE_ARGS+= --enable-exception-hook -.endif - -# for slave ports -.if !defined(MASTERDIR) -APACHEDIR= ${.CURDIR} -.else -APACHEDIR= ${MASTERDIR} -.endif - -.if defined (WITH_LDAP) || defined (WITH_LDAP_MODULES) -USE_OPENLDAP= YES -CONFIGURE_ARGS+= --with-ldap \ - --with-ldap-lib="${LOCALBASE}/lib" \ - --with-ldap-include="${LOCALBASE}/include" -.endif - -.include <bsd.port.pre.mk> - -.if defined(WITH_APR_FROM_PORTS) -PLIST_SUB+= APR_PORTS="@comment " -LIB_DEPENDS+= apr-1:${PORTSDIR}/devel/apr -CONFIGURE_ARGS+= --with-apr=${LOCALBASE}/bin/apr-1-config \ - --with-apr-util=${LOCALBASE}/bin/apu-1-config -CONFIGURE_ENV+= LTFLAGS="--tag=CXX" -.else -PLIST_SUB+= APR_PORTS="" -CONFLICTS+= apr-1.* -.endif - -WITH_PTHREAD_LIBS?= ${PTHREAD_LIBS:S/-l//:S/-//} -WITH_PTHREAD_CFLAGS?= ${PTHREAD_CFLAGS} - -.include "${APACHEDIR}/Makefile.doc" -.include "${APACHEDIR}/Makefile.modules" -WANT_APACHE= common2 -.include "${APACHEDIR}/../apache2/Makefile.modules.3rd" - -CONFIGURE_ARGS+= --with-mpm=${WITH_MPM:L} ${CONFIGURE_TARGET} - -show-options: - @${SED} -ne 's/^##//p' ${APACHEDIR}/Makefile.doc - -show-categories: -.for category in ${ALL_MODULES_CATEGORIES} - @${ECHO_MSG} "${category} contains these modules:" - @${ECHO_MSG} " ${${category}_MODULES}" -.endfor - -show-modules: - @for module in ${AVAILABLE_MODULES} ; do \ - ${ECHO_MSG} -n "$${module}: ";\ - if ${ECHO_CMD} ${APACHE_MODULES} | ${GREP} -wq $${module} 2> /dev/null ; then \ - ${ECHO_CMD} -n "enabled "; \ - if ${ECHO_CMD} ${WITH_STATIC_MODULES} | ${GREP} -wq $${module} 2> /dev/null ; then \ - ${ECHO_CMD} "(static)" ; \ - else \ - ${ECHO_CMD} "(shared)" ;\ - fi;\ - else\ - ${ECHO_CMD} disabled ;\ - fi;\ - done - -pre-everything:: - @${ECHO_MSG} "" - @${ECHO_MSG} " To enable a module category: WITH_<CATEGORY>_MODULES" - @${ECHO_MSG} " To disable a module category: WITHOUT_<CATEGORY>_MODULES" - @${ECHO_MSG} "" - @${ECHO_MSG} " Per default categories are:" - @${ECHO_MSG} " ${DEFAULT_MODULES_CATEGORIES}" - @${ECHO_MSG} " Categories available:" - @${ECHO_MSG} " ${ALL_MODULES_CATEGORIES}" - @${ECHO_MSG} "" - @${ECHO_MSG} " To see all available knobs, type make show-options" - @${ECHO_MSG} " To see all modules in different categories, type make show-categories" - @${ECHO_MSG} " You can check your modules configuration by using make show-modules" - @${ECHO_MSG} "" - -post-extract: - @${INSTALL_DATA} ${DISTDIR}/${DIST_SUBDIR}/powerlogo.gif ${WRKSRC}/docs/icons/freebsd.gif - -post-patch: - @${REINPLACE_CMD} -e 's,apache_pb,icons/freebsd.gif" ALT="[Powered by FreeBSD]"><IMG SRC="apache_pb2_ani,g' \ - ${WRKSRC}/docs/docroot/index.html - @${RM} -f ${WRKSRC}/docs/docroot/*.bak - @${SED} ${RC_SCRIPTS_SUB:S/$/!g/:S/^/ -e s!%%/:S/=/%%!/} \ - ${FILESDIR}/apache.sh > ${WRKDIR}/apache21.sh - @${RM} -f ${WRKSRC}/docs/manual/index.html.ko.euc-kr - @${RM} -f ${WRKSRC}/docs/conf/highperformance-std.conf - @${REINPLACE_CMD} -e 's," PLATFORM ",FreeBSD,' \ - ${WRKSRC}/server/core.c - @${REINPLACE_CMD} -e "s,%%OSVERSION%%,${OSVERSION}," \ - ${WRKSRC}/srclib/apr/build/apr_hints.m4 - @${INSTALL_DATA} ${WRKSRC}/NOTICE ${WRKSRC}/docs/manual - -pre-configure: - @cd ${WRKSRC}; ${SETENV} ${SCRIPTS_ENV} ./buildconf - -post-configure: - @FTPUSERS=`${EGREP} -v '^#' /etc/ftpusers| ${TR} -s "\n" " "` ;\ - ${REINPLACE_CMD} -e "s,%%FTPUSERS%%,$$FTPUSERS, ; \ - s,%%WWWOWN%%,${WWWOWN}, ; \ - s,%%WWWGRP%%,${WWWGRP}, " \ - ${WRKSRC}/docs/conf/httpd-std.conf - -pre-install: - @PKG_PREFIX=${PREFIX} ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL - -post-install: - @${MKDIR} ${PREFIX}/etc/apache21/Includes - @${ECHO_CMD} "Installing ${PREFIX}/etc/rc.d/apache21.sh startup script." - @${INSTALL_SCRIPT} -m 751 ${WRKDIR}/apache21.sh ${PREFIX}/etc/rc.d/apache21.sh - @@${CAT} ${PKGMESSAGE} - -.include <bsd.port.post.mk> diff --git a/www/apache22/Makefile.doc b/www/apache22/Makefile.doc deleted file mode 100644 index 1086b59ca5c1..000000000000 --- a/www/apache22/Makefile.doc +++ /dev/null @@ -1,153 +0,0 @@ -# Makefile.doc -# Author: Clement Laforet <clement@FreeBSD.org> -# -# This files contains: -# - make options output -# - apache2 man/docs routines -# -# $FreeBSD$ -# - -## Available knobs: -## By default, modules are compiled as dynamically loadable (DSO) modules. -## -## Modules knobs philosophy: -## Modules are split in categories, "make show-categories" shows you -## which modules they contain. You can enable/disable/customize a category: -## - To enable a category: WITH_<CATEGORY>_MODULES=yes -## [WITH_PROXY_MODULES=yes] -## - To disable a category: WITHOUT_<CATEGORY>_MODULES=yes -## [WITHOUT_DAV_MODULES=yes] -## - To customize a category: WITH_CUSTOM_<CATEGORY> -## [WITH_CUSTOM_PROXY="proxy proxy_http"] -## -## Apache-related -## WITH_MPM: prefork (default) -## worker -## perchild (deprecated) -## threadpool (testing purpose only) -## WITH_HTTP_PORT: default: 80 -## WITH_LDAP: Enable LDAP support (mod_auth_ldap) (implies WITH_LDAP_MODULES) -## WITHOUT_V4MAPPED -## WITH_IPV6_V6ONLY: Don't allow IPv6 sockets to handle IPv4 -## connections -## WITHOUT_SSL: Disable SSL support -## WITH_THREADS: Enable threads support !! USE IT WITH CARE !! -## WITH_DBM: Choose your DBM: bdb (Berkeley DB), gdbm or -## ndbm (default) -## WITH_BERKELEYDB: Choose your BerkeleyDB version: db2, db3, -## db4, db41, db42 or FreeBSD (1.85)(default) -## WITH_STATIC_SUPPORT: Build statically linked support binaries -## WITH_STATIC_APACHE: Build a static version of httpd (implies -## WITH_STATIC_MODULES) -## WITH_ALL_STATIC_MODULES: All modules will be statically linked. -## WITH_STATIC_MODULES: List of modules to build modules statics -## (usefull for slave ports) -## (They must be already enabled (i.e. -## WITH_MODULES or with default configuration -## use 'make show-modules', to check if they are -## enabled) -## WITH_MODULES: List of modules you choose -## WITHOUT_MODULES: Disable selected modules -## WITH_SUEXEC: Enable suExec support -## SUEXEC_DOCROOT: SuExec root directory -## SUEXEC_USERDIR: User subdirectory (default public_html) -## SUEXEC_SAFEPATH: Set the safepath -## SUEXEC_LOGFILE: Set log file for suexec (default: /var/log/httpd-suexec.log) -## SUEXEC_UIDMIN: Minimal allowed UID (default 1000) -## SUEXEC_GIDMIN: Minimal allowed GID (default 1000) -## SUEXEC_CALLER: User allowed to call SuExec (default -## ${WWWOWN} (www)) -## SUEXEC_UMASK: Defines umask for suexec'd process(default: -## unset) -## WITH_DEBUG: Build a debug versoin of apache (set CFLAGS -## to "-O0 -g -ggdb3" or ${DEBUG_FLAGS} and -## defines WITH_EXCEPTION_HOOK too) -## WITH_EXCEPTION_HOOK: Enable fatal exception hook -## -## Port-related: -## WITHOUT_WWW: Implies NO_CGI, NO_WWWDATA, NO_ICONS and -## NO_ERROR -## WITH_CUSTOM_WWW: Let you choose your ${PREFIX}/www components -## [cgi|errordocs|icons|wwwdata] -## -## Optionnal patches: -## WITH_EXPERIMENTAL_PATCHES Add performance patches (generally backported -## from apr/httpd CVS) -## WITH_WINDOWSUPDATEFIX Add a fix to use apache as proxy with -## Windows Update service. -## -## Available make targets: -## show-options: prints this message -## show-modules: prints list of available modules -## show-categories: prints list of modules sorted by category -## -## Examples: -## make WITH_STATIC_MODULES="ssl rewrite include" WITH_EXPERIMENTAL_MODULES=yes \ -## WITH_CUSTOM_AUTH="auth auth_dbm" -## make WITHOUT_MODULES="access speling status" WITH_PROXY_MODULES=yes -## make WITH_MODULES="include rewrite auth" -## Note: If you define your custom options in /etc/make.conf, don't forget -## to do not use quotes. -## - -DOCSDIR= ${PREFIX}/share/doc/apache21 -EXAMPLESDIR= ${PREFIX}/share/examples/apache21 -MAKE_ENV+= EXAMPLESDIR=${EXAMPLESDIR} - -.if defined(NOPORTDOCS) -MAKE_ENV+= NOPORTDOCS=yes -.endif - -MAN1= dbmmanage.1 htdigest.1 htpasswd.1 -MAN8= ab.8 apachectl.8 apxs.8 httpd.8 logresolve.8 rotatelogs.8 suexec.8 htcacheclean.8 - -.if defined(WITHOUT_WWW) -NO_CGI= YES -NO_WWWDATA= YES -NO_ICONS= YES -NO_ERROR= YES -.elif defined(WITH_CUSTOM_WWW) -. if ${WITH_CUSTOM_WWW:Mcgi} == "" -NO_CGI= YES -. endif -. if ${WITH_CUSTOM_WWW:Mwwwdata} == "" -NO_WWWDATA= YES -. endif -. if ${WITH_CUSTOM_WWW:Merrordocs} == "" -NO_ERROR= YES -. endif -. if ${WITH_CUSTOM_WWW:Micons} == "" -NO_ICONS= YES -. endif -.endif - -.if defined(NO_CGI) -MAKE_ENV+= NO_CGI=yes -PLIST_SUB+= CGI="@comment " -.else -PLIST_SUB+= CGI="" -.endif - -.if defined(NO_ICONS) -MAKE_ENV+= NO_ICONS=yes -PLIST_SUB+= ICONS="@comment " -.else -PLIST_SUB+= ICONS="" -.endif - -.if defined(NO_WWWDATA) -MAKE_ENV+= NO_WWWDATA=yes -PLIST_SUB+= WWWDATA="@comment " -.else -PLIST_SUB+= WWWDATA="" -.endif - -.if defined(NO_ERROR) -MAKE_ENV+= NO_ERROR=yes -PLIST_SUB+= ERROR="@comment " -.else -PLIST_SUB+= ERROR="" -.endif - -PORTDOCS= #don't blame me ;-) diff --git a/www/apache22/Makefile.modules b/www/apache22/Makefile.modules deleted file mode 100644 index 1f2404e60556..000000000000 --- a/www/apache22/Makefile.modules +++ /dev/null @@ -1,136 +0,0 @@ -# Makefile.modules -# Author: Clement Laforet <clement@FreeBSD.org> -# -# This file is used to build modules list, DBM dependencies and MPM selection. -# I hope it can easily handle external modules (such as mod_perl) or MPMs, like -# muxmpm. -# -# Note to myself: (to generate PLIST_SUB entries for modules) -# gsed 's/^\(.*\)mod\(.*\)\.so/%%\MOD\U\2%%\L\1mod\2\.so/' pkg-plist > tmp -# mv tmp pkg-plist -# -# $FreeBSD$ -# - -# MPM section: -# << TO BE WRITTEN >> -.if defined (SLAVE_PORT_MPM) -PLIST_SUB+= PREFORK="@comment " WORKER="@comment " -PKGNAMESUFFIX= -${SLAVE_PORT_MPM} -.else -. if ${WITH_MPM} != "prefork" -PKGNAMESUFFIX= -${WITH_MPM:L} -WITH_THREADS= yes -WITH_THREADS_MODULES= yes -WITHOUT_MODULES+= cgi -. if ${WITH_MPM:L} == "worker" -PLIST_SUB+= PREFORK="@comment " WORKER="" THREADPOOL="@comment " EVENT="@comment " -. elif ${WITH_MPM:L} == "perchild" -PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment " EVENT="@comment " -. elif ${WITH_MPM:L} == "threadpool" -PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="" EVENT="@comment " -. elif ${WITH_MPM:L} == "event" -PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment " EVENT="" -EXTRA_PATCHES+= ${FILESDIR}/exp-event-mpm-apr-backport.patch -. else -IGNORE= "Unknown MPM: ${WITH_MPM}" -. endif -. else -PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment " EVENT="@comment " -. endif -.else -PLIST_SUB+= PREFORK="@comment " WORKER="@comment " THREADPOOL="@comment " EVENT="@comment " -.endif - -# xDBM section -# -.if !defined(WITH_DBM) && defined(WITH_BERKELEYDB) -WITH_DBM=bdb -.endif -.if defined(WITH_DBM) && !defined(WITH_BERKELEYDB) -WITH_BERKELEYDB= FreeBSD -.endif - -.if defined(WITH_DBM) -. if ${WITH_DBM:L} == "sdbm" -CONFIGURE_ARGS+= --with-dbm=sdbm -. elif ${WITH_DBM:L} == "gdbm" -LIB_DEPENDS+= gdbm.3:${PORTSDIR}/databases/gdbm -CONFIGURE_ARGS+= --with-gdbm=${LOCALBASE} -. elif ${WITH_DBM:L} == "db" || ${WITH_DBM:L} == "bdb" -. if ${WITH_BERKELEYDB} == "FreeBSD" -CONFIGURE_ARGS+= --with-dbm=db185 \ - --with-berkeley-db=/usr -. elif ${WITH_BERKELEYDB} == "db2" -LIB_DEPENDS+= db2:${PORTSDIR}/databases/db2 -CONFIGURE_ARGS+= --with-dbm=db2 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db3" -LIB_DEPENDS+= db3:${PORTSDIR}/databases/db3 -CONFIGURE_ARGS+= --with-dbm=db3 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db4" -LIB_DEPENDS+= db4:${PORTSDIR}/databases/db4 -CONFIGURE_ARGS+= --with-dbm=db4 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db41" -LIB_DEPENDS+= db41:${PORTSDIR}/databases/db41 -CONFIGURE_ARGS+= --with-dbm=db41 \ - --with-berkeley-db=${LOCALBASE} -. elif ${WITH_BERKELEYDB} == "db42" -LIB_DEPENDS+= db-4.2:${PORTSDIR}/databases/db42 -CONFIGURE_ARGS+= --with-dbm=db42 \ - --with-berkeley-db=${LOCALBASE}/include:${LOCALBASE}/lib/db42 -. else -IGNORE= "Unknown Berkeley DB version" -. endif -. else -IGNORE= "Unknown DBM" -. endif -.else -CONFIGURE_ARGS+= --with-dbm=sdbm -.endif - -.if defined(WITH_THREADS) -CONFIGURE_ARGS+= --enable-threads -. if ${WITH_PTHREAD_LIBS} != "c_r" && ${OSVERSION} > 500023 -CONFIGURE_ENV+= apr_cv_pthreads_lib=-l${WITH_PTHREAD_LIBS} \ - apr_cv_pthreads_cflags=${WITH_PTHREAD_CFLAGS} -. if ${ARCH} == i386 -CONFIGURE_ARGS+= --enable-nonportable-atomics -. endif -. else -CFLAGS+= -DFREEBSD_THREAD_HACK -. endif -.endif - -.if !defined(WITHOUT_SSL) -WITH_SSL_MODULES= yes -CONFIGURE_ARGS+= --with-ssl=${OPENSSLBASE} -.endif - -AUTH_MODULES= auth_basic auth_digest -AUTHN_MODULES= authn_file authn_dbm authn_anon authn_default -AUTHZ_MODULES= authz_host authz_groupfile authz_user authz_dbm \ - authz_owner authz_default -DAV_MODULES= dav dav_fs -EXPERIMENTAL_MODULES= bucketeer case_filter case_filter_in ext_filter charset_lite \ - log_forensic optional_hook_export optional_hook_import \ - optional_fn_import optional_fn_export \ - cache file_cache disk_cache mem_cache -LDAP_MODULES= ldap authnz_ldap -MISC_MODULES= actions alias asis autoindex cache cern_meta \ - cgi charset_lite deflate dir disk_cache env expires \ - file_cache headers imap include info log_config logio mime \ - mime_magic negotiation rewrite setenvif speling status \ - unique_id userdir usertrack vhost_alias -PROXY_MODULES= proxy proxy_connect proxy_ftp proxy_http proxy_ajp proxy_balancer -SSL_MODULES= ssl -SUEXEC_MODULES= suexec -THREADS_MODULES= cgid - -DEFAULT_MODULES_CATEGORIES= \ - AUTH AUTHN AUTHZ DAV MISC - -ALL_MODULES_CATEGORIES= AUTH AUTHN AUTHZ DAV EXPERIMENTAL LDAP MISC \ - PROXY SSL SUEXEC THREADS diff --git a/www/apache22/distinfo b/www/apache22/distinfo deleted file mode 100644 index d6df92c80ab3..000000000000 --- a/www/apache22/distinfo +++ /dev/null @@ -1,4 +0,0 @@ -MD5 (apache21/httpd-2.1.2-alpha.tar.gz) = 06b459ae8aa46ca3336890b91dd10aad -SIZE (apache21/httpd-2.1.2-alpha.tar.gz) = 7458973 -MD5 (apache21/powerlogo.gif) = 0f106073b3c7844cf22d4df126b27c62 -SIZE (apache21/powerlogo.gif) = 5279 diff --git a/www/apache22/files/apache.sh b/www/apache22/files/apache.sh deleted file mode 100644 index ecc4de893edf..000000000000 --- a/www/apache22/files/apache.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -# $FreeBSD: /tmp/pcvs/ports/www/apache22/files/Attic/apache.sh,v 1.7 2004-12-11 18:06:04 clement Exp $ -# - -# PROVIDE: apache21 -# REQUIRE: NETWORKING SERVERS -# BEFORE: DAEMON -# KEYWORD: FreeBSD shutdown - -# -# Add the following lines to /etc/rc.conf to enable apache21: -# apache21_enable (bool): Set to "NO" by default. -# Set it to "YES" to enable apache21 -# apache21ssl_enable (bool): Set to "NO" by default. -# Set it to "YES" to start apache with SSL -# (if <IfDefined SSL> exists in httpd.conf) -# apache21limits_enable (bool):Set to "NO" by default. -# Set it to yes to run `limits $limits_args` -# just before apache starts. -# apache21_flags (str): Set to "" by default. -# Extra flags passed to start command. -# apache21limits_args (str): Default to "-e -C daemon" -# Arguments of pre-start limits run. -# -. %%RC_SUBR%% - -name="apache21" -rcvar=`set_rcvar` - -start_precmd="apache21_precmd" -restart_precmd="apache21_checkconfig" -reload_precmd="apache21_checkconfig" -command="%%PREFIX%%/sbin/httpd" -pidfile="/var/run/httpd.pid" -required_files=%%PREFIX%%/etc/apache21/httpd.conf - -[ -z "$apache21_enable" ] && apache21_enable="NO" -[ -z "$apache21ssl_enable" ] && apache21ssl_enable="NO" -[ -z "$apache21_flags" ] && apache21_flags="" -[ -z "$apache21limits_enable" ] && apache21limits_enable="NO" -[ -z "$apache21limits_args" ] && apache21limits_args="-e -C daemon" - -load_rc_config $name - -checkyesno apache21ssl_enable && \ - apache21_flags="-DSSL $apache21_flags" - -apache21_checkconfig() -{ - echo "Performing sanity check on apache21 configuration:" - ${command} -t -} - -apache21_precmd() -{ - if test -f %%PREFIX%%/sbin/envvars - then - . %%PREFIX%%/sbin/envvars - fi - if checkyesno apache21limits_enable - then - eval `/usr/bin/limits ${apache21limits_args}` 2>/dev/null - else - return 0 - fi - -} - -sig_reload=SIGUSR1 - -extra_commands="reload" -run_rc_command "$1" diff --git a/www/apache22/files/exp-event-mpm-apr-backport.patch b/www/apache22/files/exp-event-mpm-apr-backport.patch deleted file mode 100644 index 9bd67fecb4d5..000000000000 --- a/www/apache22/files/exp-event-mpm-apr-backport.patch +++ /dev/null @@ -1,3046 +0,0 @@ -diff -Nur srclib/apr.orig/include/apr_poll.h srclib/apr/include/apr_poll.h ---- srclib/apr.orig/include/apr_poll.h Mon Dec 13 18:57:05 2004 -+++ srclib/apr/include/apr_poll.h Mon Dec 13 18:57:28 2004 -@@ -50,6 +50,11 @@ - #define APR_POLLHUP 0x020 /**< Hangup occurred */ - #define APR_POLLNVAL 0x040 /**< Descriptior invalid */ - -+/** -+ * Pollset Flags -+ */ -+#define APR_POLLSET_THREADSAFE 0x001 /**< Adding or Removing a Descriptor is thread safe */ -+ - /** Used in apr_pollfd_t to determine what the apr_descriptor is */ - typedef enum { - APR_NO_DESC, /**< nothing here */ -diff -Nur srclib/apr.orig/include/apr_poll.h.orig srclib/apr/include/apr_poll.h.orig ---- srclib/apr.orig/include/apr_poll.h.orig Thu Jan 1 01:00:00 1970 -+++ srclib/apr/include/apr_poll.h.orig Fri Feb 13 10:38:38 2004 -@@ -0,0 +1,164 @@ -+/* Copyright 2000-2004 The Apache Software Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#ifndef APR_POLL_H -+#define APR_POLL_H -+/** -+ * @file apr_poll.h -+ * @brief APR Poll interface -+ */ -+#include "apr.h" -+#include "apr_pools.h" -+#include "apr_errno.h" -+#include "apr_inherit.h" -+#include "apr_file_io.h" -+#include "apr_network_io.h" -+ -+#if APR_HAVE_NETINET_IN_H -+#include <netinet/in.h> -+#endif -+ -+#ifdef __cplusplus -+extern "C" { -+#endif /* __cplusplus */ -+ -+/** -+ * @defgroup apr_poll Poll Routines -+ * @ingroup APR -+ * @{ -+ */ -+ -+/** -+ * Poll options -+ */ -+#define APR_POLLIN 0x001 /**< Can read without blocking */ -+#define APR_POLLPRI 0x002 /**< Priority data available */ -+#define APR_POLLOUT 0x004 /**< Can write without blocking */ -+#define APR_POLLERR 0x010 /**< Pending error */ -+#define APR_POLLHUP 0x020 /**< Hangup occurred */ -+#define APR_POLLNVAL 0x040 /**< Descriptior invalid */ -+ -+/** Used in apr_pollfd_t to determine what the apr_descriptor is */ -+typedef enum { -+ APR_NO_DESC, /**< nothing here */ -+ APR_POLL_SOCKET, /**< descriptor refers to a socket */ -+ APR_POLL_FILE, /**< descriptor refers to a file */ -+ APR_POLL_LASTDESC /**< descriptor is the last one in the list */ -+} apr_datatype_e ; -+ -+/** Union of either an APR file or socket. */ -+typedef union { -+ apr_file_t *f; /**< file */ -+ apr_socket_t *s; /**< socket */ -+} apr_descriptor; -+ -+/** @see apr_pollfd_t */ -+typedef struct apr_pollfd_t apr_pollfd_t; -+ -+/** Poll descriptor set. */ -+struct apr_pollfd_t { -+ apr_pool_t *p; /**< associated pool */ -+ apr_datatype_e desc_type; /**< descriptor type */ -+ apr_int16_t reqevents; /**< requested events */ -+ apr_int16_t rtnevents; /**< returned events */ -+ apr_descriptor desc; /**< @see apr_descriptor */ -+ void *client_data; /**< allows app to associate context */ -+}; -+ -+ -+/* General-purpose poll API for arbitrarily large numbers of -+ * file descriptors -+ */ -+ -+/** Opaque structure used for pollset API */ -+typedef struct apr_pollset_t apr_pollset_t; -+ -+/** -+ * Setup a pollset object -+ * @param pollset The pointer in which to return the newly created object -+ * @param size The maximum number of descriptors that this pollset can hold -+ * @param p The pool from which to allocate the pollset -+ * @param flags Optional flags to modify the operation of the pollset -+ * (reserved for future expansion) -+ */ -+APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset, -+ apr_uint32_t size, -+ apr_pool_t *p, -+ apr_uint32_t flags); -+ -+/** -+ * Destroy a pollset object -+ * @param pollset The pollset to destroy -+ */ -+APR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t *pollset); -+ -+/** -+ * Add a socket or file descriptor to a pollset -+ * @param pollset The pollset to which to add the descriptor -+ * @param descriptor The descriptor to add -+ * @remark If you set client_data in the descriptor, that value -+ * will be returned in the client_data field whenever this -+ * descriptor is signalled in apr_pollset_poll(). -+ */ -+APR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor); -+ -+/** -+ * Remove a descriptor from a pollset -+ * @param pollset The pollset from which to remove the descriptor -+ * @param descriptor The descriptor to remove -+ */ -+APR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor); -+ -+/** -+ * Block for activity on the descriptor(s) in a pollset -+ * @param pollset The pollset to use -+ * @param timeout Timeout in microseconds -+ * @param num Number of signalled descriptors (output parameter) -+ * @param descriptors Array of signalled descriptors (output parameter) -+ */ -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors); -+ -+ -+/** -+ * Poll the sockets in the poll structure -+ * @param aprset The poll structure we will be using. -+ * @param numsock The number of sockets we are polling -+ * @param nsds The number of sockets signalled. -+ * @param timeout The amount of time in microseconds to wait. This is -+ * a maximum, not a minimum. If a socket is signalled, we -+ * will wake up before this time. A negative number means -+ * wait until a socket is signalled. -+ * @remark The number of sockets signalled is returned in the third argument. -+ * This is a blocking call, and it will not return until either a -+ * socket has been signalled, or the timeout has expired. -+ */ -+APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t numsock, -+ apr_int32_t *nsds, -+ apr_interval_time_t timeout); -+ -+/** @} */ -+ -+ -+#ifdef __cplusplus -+} -+#endif -+ -+#endif /* ! APR_POLL_H */ -+ -diff -Nur srclib/apr.orig/include/arch/unix/apr_arch_poll_private.h srclib/apr/include/arch/unix/apr_arch_poll_private.h ---- srclib/apr.orig/include/arch/unix/apr_arch_poll_private.h Thu Jan 1 01:00:00 1970 -+++ srclib/apr/include/arch/unix/apr_arch_poll_private.h Mon Dec 13 18:58:32 2004 -@@ -0,0 +1,92 @@ -+/* Copyright 2000-2004 The Apache Software Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#ifndef APR_ARCH_POLL_PRIVATE_H -+#define APR_ARCH_POLL_PRIVATE_H -+ -+#include "apr.h" -+#include "apr_poll.h" -+#include "apr_time.h" -+#include "apr_portable.h" -+#include "apr_arch_networkio.h" -+#include "apr_arch_file_io.h" -+ -+#if HAVE_POLL_H -+#include <poll.h> -+#endif -+ -+#if HAVE_SYS_POLL_H -+#include <sys/poll.h> -+#endif -+ -+#ifdef HAVE_KQUEUE -+#include <sys/types.h> -+#include <sys/event.h> -+#include <sys/time.h> -+#endif -+ -+#ifdef HAVE_EPOLL -+#include <sys/epoll.h> -+#endif -+ -+#ifdef NETWARE -+#define HAS_SOCKETS(dt) (dt == APR_POLL_SOCKET) ? 1 : 0 -+#define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0 -+#endif -+ -+/* Choose the best method platform specific to use in apr_pollset */ -+#ifdef HAVE_KQUEUE -+#define POLLSET_USES_KQUEUE -+#elif defined(HAVE_EPOLL) -+#define POLLSET_USES_EPOLL -+#elif defined(HAVE_POLL) -+#define POLLSET_USES_POLL -+#else -+#define POLLSET_USES_SELECT -+#endif -+ -+#ifdef HAVE_POLL -+#define POLL_USES_POLL -+#else -+#define POLL_USES_SELECT -+#endif -+ -+#if defined(POLLSET_USES_KQUEUE) || defined(POLLSET_USES_EPOLL) -+ -+#include "apr_ring.h" -+ -+#if APR_HAS_THREADS -+#include "apr_thread_mutex.h" -+#define pollset_lock_rings() \ -+ if(pollset->flags & APR_POLLSET_THREADSAFE) \ -+ apr_thread_mutex_lock(pollset->ring_lock); -+#define pollset_unlock_rings() \ -+ if(pollset->flags & APR_POLLSET_THREADSAFE) \ -+ apr_thread_mutex_unlock(pollset->ring_lock); -+#else -+#define pollset_lock_rings() -+#define pollset_unlock_rings() -+#endif -+ -+typedef struct pfd_elem_t pfd_elem_t; -+ -+struct pfd_elem_t { -+ APR_RING_ENTRY(pfd_elem_t) link; -+ apr_pollfd_t pfd; -+}; -+ -+#endif -+ -+#endif /* APR_ARCH_POLL_PRIVATE_H */ -diff -Nur srclib/apr.orig/poll/unix/epoll.c srclib/apr/poll/unix/epoll.c ---- srclib/apr.orig/poll/unix/epoll.c Thu Jan 1 01:00:00 1970 -+++ srclib/apr/poll/unix/epoll.c Mon Dec 13 18:57:28 2004 -@@ -0,0 +1,270 @@ -+/* Copyright 2000-2004 The Apache Software Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#include "apr_arch_poll_private.h" -+ -+#ifdef POLLSET_USES_EPOLL -+ -+static apr_int16_t get_epoll_event(apr_int16_t event) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & APR_POLLIN) -+ rv |= EPOLLIN; -+ if (event & APR_POLLPRI) -+ rv |= EPOLLPRI; -+ if (event & APR_POLLOUT) -+ rv |= EPOLLOUT; -+ if (event & APR_POLLERR) -+ rv |= EPOLLERR; -+ if (event & APR_POLLHUP) -+ rv |= EPOLLHUP; -+ /* APR_POLLNVAL is not handled by epoll. */ -+ -+ return rv; -+} -+ -+static apr_int16_t get_epoll_revent(apr_int16_t event) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & EPOLLIN) -+ rv |= APR_POLLIN; -+ if (event & EPOLLPRI) -+ rv |= APR_POLLPRI; -+ if (event & EPOLLOUT) -+ rv |= APR_POLLOUT; -+ if (event & EPOLLERR) -+ rv |= APR_POLLERR; -+ if (event & EPOLLHUP) -+ rv |= APR_POLLHUP; -+ /* APR_POLLNVAL is not handled by epoll. */ -+ -+ return rv; -+} -+ -+struct apr_pollset_t -+{ -+ apr_pool_t *pool; -+ apr_uint32_t nelts; -+ apr_uint32_t nalloc; -+ int epoll_fd; -+ struct epoll_event *pollset; -+ apr_pollfd_t *result_set; -+ apr_uint32_t flags; -+#if APR_HAS_THREADS -+ /* A thread mutex to protect operations on the rings */ -+ apr_thread_mutex_t *ring_lock; -+#endif -+ /* A ring containing all of the pollfd_t that are active */ -+ APR_RING_HEAD(pfd_query_ring_t, pfd_elem_t) query_ring; -+ /* A ring of pollfd_t that have been used, and then _remove()'d */ -+ APR_RING_HEAD(pfd_free_ring_t, pfd_elem_t) free_ring; -+ /* A ring of pollfd_t where rings that have been _remove()`ed but -+ might still be inside a _poll() */ -+ APR_RING_HEAD(pfd_dead_ring_t, pfd_elem_t) dead_ring; -+}; -+ -+static apr_status_t backend_cleanup(void *p_) -+{ -+ apr_pollset_t *pollset = (apr_pollset_t *) p_; -+ close(pollset->epoll_fd); -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset, -+ apr_uint32_t size, -+ apr_pool_t *p, -+ apr_uint32_t flags) -+{ -+ apr_status_t rv; -+ -+ *pollset = apr_palloc(p, sizeof(**pollset)); -+#if APR_HAS_THREADS -+ if (flags & APR_POLLSET_THREADSAFE && -+ ((rv = apr_thread_mutex_create(&(*pollset)->ring_lock, -+ APR_THREAD_MUTEX_DEFAULT, -+ p) != APR_SUCCESS))) { -+ *pollset = NULL; -+ return rv; -+ } -+#else -+ if (flags & APR_POLLSET_THREADSAFE) { -+ *pollset = NULL; -+ return APR_ENOTIMPL; -+ } -+#endif -+ (*pollset)->nelts = 0; -+ (*pollset)->nalloc = size; -+ (*pollset)->flags = flags; -+ (*pollset)->pool = p; -+ (*pollset)->epoll_fd = epoll_create(size); -+ (*pollset)->pollset = apr_palloc(p, size * sizeof(struct epoll_event)); -+ apr_pool_cleanup_register(p, (void *) (*pollset), backend_cleanup, -+ apr_pool_cleanup_null); -+ (*pollset)->result_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); -+ -+ APR_RING_INIT(&(*pollset)->query_ring, pfd_elem_t, link); -+ APR_RING_INIT(&(*pollset)->free_ring, pfd_elem_t, link); -+ APR_RING_INIT(&(*pollset)->dead_ring, pfd_elem_t, link); -+ -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t *pollset) -+{ -+ return apr_pool_cleanup_run(pollset->pool, pollset, backend_cleanup); -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor) -+{ -+ struct epoll_event ev; -+ int ret = -1; -+ pfd_elem_t *elem; -+ apr_status_t rv = APR_SUCCESS; -+ -+ pollset_lock_rings(); -+ -+ if (!APR_RING_EMPTY(&(pollset->free_ring), pfd_elem_t, link)) { -+ elem = APR_RING_FIRST(&(pollset->free_ring)); -+ APR_RING_REMOVE(elem, link); -+ } -+ else { -+ elem = (pfd_elem_t *) apr_palloc(pollset->pool, sizeof(pfd_elem_t)); -+ APR_RING_ELEM_INIT(elem, link); -+ } -+ elem->pfd = *descriptor; -+ -+ ev.events = get_epoll_event(descriptor->reqevents); -+ ev.data.ptr = elem; -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, -+ descriptor->desc.s->socketdes, &ev); -+ } -+ else { -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, -+ descriptor->desc.f->filedes, &ev); -+ } -+ -+ if (0 != ret) { -+ rv = APR_EBADF; -+ APR_RING_INSERT_TAIL(&(pollset->free_ring), elem, pfd_elem_t, link); -+ } -+ else { -+ pollset->nelts++; -+ APR_RING_INSERT_TAIL(&(pollset->query_ring), elem, pfd_elem_t, link); -+ } -+ -+ pollset_unlock_rings(); -+ -+ return rv; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor) -+{ -+ pfd_elem_t *ep; -+ apr_status_t rv = APR_SUCCESS; -+ struct epoll_event ev; -+ int ret = -1; -+ -+ pollset_lock_rings(); -+ -+ ev.events = get_epoll_event(descriptor->reqevents); -+ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, -+ descriptor->desc.s->socketdes, &ev); -+ } -+ else { -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, -+ descriptor->desc.f->filedes, &ev); -+ } -+ if (ret < 0) { -+ rv = APR_NOTFOUND; -+ } -+ -+ if (!APR_RING_EMPTY(&(pollset->query_ring), pfd_elem_t, link)) { -+ for (ep = APR_RING_FIRST(&(pollset->query_ring)); -+ ep != APR_RING_SENTINEL(&(pollset->query_ring), -+ pfd_elem_t, link); -+ ep = APR_RING_NEXT(ep, link)) { -+ -+ if (descriptor->desc.s == ep->pfd.desc.s) { -+ APR_RING_REMOVE(ep, link); -+ APR_RING_INSERT_TAIL(&(pollset->dead_ring), -+ ep, pfd_elem_t, link); -+ break; -+ } -+ } -+ } -+ -+ pollset_unlock_rings(); -+ -+ return rv; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors) -+{ -+ int ret, i; -+ apr_status_t rv = APR_SUCCESS; -+ pfd_elem_t *ep; -+ -+ if (timeout > 0) { -+ timeout /= 1000; -+ } -+ -+ ret = epoll_wait(pollset->epoll_fd, pollset->pollset, pollset->nalloc, -+ timeout); -+ (*num) = ret; -+ -+ if (ret < 0) { -+ rv = apr_get_netos_error(); -+ } -+ else if (ret == 0) { -+ rv = APR_TIMEUP; -+ } -+ else { -+ for (i = 0; i < ret; i++) { -+ pollset->result_set[i] = -+ (((pfd_elem_t *) (pollset->pollset[i].data.ptr))->pfd); -+ pollset->result_set[i].rtnevents = -+ get_epoll_revent(pollset->pollset[i].events); -+ } -+ -+ if (descriptors) { -+ *descriptors = pollset->result_set; -+ } -+ } -+ -+ pollset_lock_rings(); -+ -+ /* Shift all PFDs in the Dead Ring to be Free Ring */ -+ while (!APR_RING_EMPTY(&(pollset->dead_ring), pfd_elem_t, link)) { -+ ep = APR_RING_FIRST(&(pollset->dead_ring)); -+ APR_RING_REMOVE(ep, link); -+ APR_RING_INSERT_TAIL(&(pollset->free_ring), ep, pfd_elem_t, link); -+ } -+ -+ pollset_unlock_rings(); -+ -+ return rv; -+} -+ -+#endif /* POLLSET_USES_EPOLL */ -diff -Nur srclib/apr.orig/poll/unix/kqueue.c srclib/apr/poll/unix/kqueue.c ---- srclib/apr.orig/poll/unix/kqueue.c Thu Jan 1 01:00:00 1970 -+++ srclib/apr/poll/unix/kqueue.c Mon Dec 13 18:57:28 2004 -@@ -0,0 +1,288 @@ -+/* Copyright 2000-2004 The Apache Software Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#include "apr_arch_poll_private.h" -+ -+#ifdef POLLSET_USES_KQUEUE -+ -+static apr_int16_t get_kqueue_revent(apr_int16_t event, apr_int16_t flags) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & EVFILT_READ) -+ rv |= APR_POLLIN; -+ if (event & EVFILT_WRITE) -+ rv |= APR_POLLOUT; -+ if (flags & EV_EOF) -+ rv |= APR_POLLHUP; -+ if (flags & EV_ERROR) -+ rv |= APR_POLLERR; -+ -+ return rv; -+} -+ -+struct apr_pollset_t -+{ -+ apr_pool_t *pool; -+ apr_uint32_t nelts; -+ apr_uint32_t nalloc; -+ int kqueue_fd; -+ struct kevent kevent; -+ struct kevent *ke_set; -+ apr_pollfd_t *result_set; -+ apr_uint32_t flags; -+#if APR_HAS_THREADS -+ /* A thread mutex to protect operations on the rings */ -+ apr_thread_mutex_t *ring_lock; -+#endif -+ /* A ring containing all of the pollfd_t that are active */ -+ APR_RING_HEAD(pfd_query_ring_t, pfd_elem_t) query_ring; -+ /* A ring of pollfd_t that have been used, and then _remove'd */ -+ APR_RING_HEAD(pfd_free_ring_t, pfd_elem_t) free_ring; -+ /* A ring of pollfd_t where rings that have been _remove'd but -+ might still be inside a _poll */ -+ APR_RING_HEAD(pfd_dead_ring_t, pfd_elem_t) dead_ring; -+}; -+ -+static apr_status_t backend_cleanup(void *p_) -+{ -+ apr_pollset_t *pollset = (apr_pollset_t *) p_; -+ close(pollset->kqueue_fd); -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset, -+ apr_uint32_t size, -+ apr_pool_t *p, -+ apr_uint32_t flags) -+{ -+ apr_status_t rv = APR_SUCCESS; -+ *pollset = apr_palloc(p, sizeof(**pollset)); -+#if APR_HAS_THREADS -+ if (flags & APR_POLLSET_THREADSAFE && -+ ((rv = apr_thread_mutex_create(&(*pollset)->ring_lock, -+ APR_THREAD_MUTEX_DEFAULT, -+ p) != APR_SUCCESS))) { -+ *pollset = NULL; -+ return rv; -+ } -+#else -+ if (flags & APR_POLLSET_THREADSAFE) { -+ *pollset = NULL; -+ return APR_ENOTIMPL; -+ } -+#endif -+ (*pollset)->nelts = 0; -+ (*pollset)->nalloc = size; -+ (*pollset)->flags = flags; -+ (*pollset)->pool = p; -+ -+ (*pollset)->ke_set = -+ (struct kevent *) apr_palloc(p, size * sizeof(struct kevent)); -+ -+ memset((*pollset)->ke_set, 0, size * sizeof(struct kevent)); -+ -+ (*pollset)->kqueue_fd = kqueue(); -+ -+ if ((*pollset)->kqueue_fd == -1) { -+ return APR_ENOMEM; -+ } -+ -+ apr_pool_cleanup_register(p, (void *) (*pollset), backend_cleanup, -+ apr_pool_cleanup_null); -+ -+ (*pollset)->result_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); -+ -+ APR_RING_INIT(&(*pollset)->query_ring, pfd_elem_t, link); -+ APR_RING_INIT(&(*pollset)->free_ring, pfd_elem_t, link); -+ APR_RING_INIT(&(*pollset)->dead_ring, pfd_elem_t, link); -+ -+ return rv; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t * pollset) -+{ -+ return apr_pool_cleanup_run(pollset->pool, pollset, backend_cleanup); -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor) -+{ -+ apr_os_sock_t fd; -+ pfd_elem_t *elem; -+ apr_status_t rv = APR_SUCCESS; -+ -+ pollset_lock_rings(); -+ -+ if (!APR_RING_EMPTY(&(pollset->free_ring), pfd_elem_t, link)) { -+ elem = APR_RING_FIRST(&(pollset->free_ring)); -+ APR_RING_REMOVE(elem, link); -+ } -+ else { -+ elem = (pfd_elem_t *) apr_palloc(pollset->pool, sizeof(pfd_elem_t)); -+ APR_RING_ELEM_INIT(elem, link); -+ } -+ elem->pfd = *descriptor; -+ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+ fd = descriptor->desc.f->filedes; -+ } -+ -+ if (descriptor->reqevents & APR_POLLIN) { -+ EV_SET(&pollset->kevent, fd, EVFILT_READ, EV_ADD, 0, 0, elem); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ rv = APR_ENOMEM; -+ } -+ } -+ -+ if (descriptor->reqevents & APR_POLLOUT && rv == APR_SUCCESS) { -+ EV_SET(&pollset->kevent, fd, EVFILT_WRITE, EV_ADD, 0, 0, elem); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ rv = APR_ENOMEM; -+ } -+ } -+ -+ if (rv == APR_SUCCESS) { -+ pollset->nelts++; -+ APR_RING_INSERT_TAIL(&(pollset->query_ring), elem, pfd_elem_t, link); -+ } -+ else { -+ APR_RING_INSERT_TAIL(&(pollset->free_ring), elem, pfd_elem_t, link); -+ } -+ -+ pollset_unlock_rings(); -+ -+ return rv; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor) -+{ -+ pfd_elem_t *ep; -+ apr_status_t rv = APR_SUCCESS; -+ apr_os_sock_t fd; -+ -+ pollset_lock_rings(); -+ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+ fd = descriptor->desc.f->filedes; -+ } -+ -+ if (descriptor->reqevents & APR_POLLIN) { -+ EV_SET(&pollset->kevent, fd, EVFILT_READ, EV_DELETE, 0, 0, NULL); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ rv = APR_NOTFOUND; -+ } -+ } -+ -+ if (descriptor->reqevents & APR_POLLOUT && rv == APR_SUCCESS) { -+ EV_SET(&pollset->kevent, fd, EVFILT_WRITE, EV_DELETE, 0, 0, NULL); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ rv = APR_NOTFOUND; -+ } -+ } -+ -+ if (!APR_RING_EMPTY(&(pollset->query_ring), pfd_elem_t, link)) { -+ for (ep = APR_RING_FIRST(&(pollset->query_ring)); -+ ep != APR_RING_SENTINEL(&(pollset->query_ring), -+ pfd_elem_t, link); -+ ep = APR_RING_NEXT(ep, link)) { -+ -+ if (descriptor->desc.s == ep->pfd.desc.s) { -+ APR_RING_REMOVE(ep, link); -+ APR_RING_INSERT_TAIL(&(pollset->dead_ring), -+ ep, pfd_elem_t, link); -+ break; -+ } -+ } -+ } -+ -+ pollset_unlock_rings(); -+ -+ return rv; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors) -+{ -+ int ret, i; -+ pfd_elem_t *ep; -+ struct timespec tv, *tvptr; -+ apr_status_t rv = APR_SUCCESS; -+ -+ if (timeout < 0) { -+ tvptr = NULL; -+ } -+ else { -+ tv.tv_sec = (long) apr_time_sec(timeout); -+ tv.tv_nsec = (long) apr_time_msec(timeout); -+ tvptr = &tv; -+ } -+ -+ ret = kevent(pollset->kqueue_fd, NULL, 0, pollset->ke_set, pollset->nalloc, -+ tvptr); -+ (*num) = ret; -+ if (ret < 0) { -+ rv = apr_get_netos_error(); -+ } -+ else if (ret == 0) { -+ rv = APR_TIMEUP; -+ } -+ else { -+ for (i = 0; i < ret; i++) { -+ pollset->result_set[i] = -+ (((pfd_elem_t*)(pollset->ke_set[i].udata))->pfd); -+ pollset->result_set[i].rtnevents = -+ get_kqueue_revent(pollset->ke_set[i].filter, -+ pollset->ke_set[i].flags); -+ } -+ -+ if (descriptors) { -+ *descriptors = pollset->result_set; -+ } -+ } -+ -+ -+ pollset_lock_rings(); -+ -+ /* Shift all PFDs in the Dead Ring to be Free Ring */ -+ while (!APR_RING_EMPTY(&(pollset->dead_ring), pfd_elem_t, link)) { -+ ep = APR_RING_FIRST(&(pollset->dead_ring)); -+ APR_RING_REMOVE(ep, link); -+ APR_RING_INSERT_TAIL(&(pollset->free_ring), ep, pfd_elem_t, link); -+ } -+ -+ pollset_unlock_rings(); -+ -+ return rv; -+} -+ -+#endif /* POLLSET_USES_KQUEUE */ -diff -Nur srclib/apr.orig/poll/unix/poll.c srclib/apr/poll/unix/poll.c ---- srclib/apr.orig/poll/unix/poll.c Mon Dec 13 18:57:05 2004 -+++ srclib/apr/poll/unix/poll.c Mon Dec 13 18:57:28 2004 -@@ -13,111 +13,26 @@ - * limitations under the License. - */ - --#include "apr.h" --#include "apr_poll.h" --#include "apr_time.h" --#include "apr_portable.h" --#include "apr_arch_networkio.h" --#include "apr_arch_file_io.h" --#if HAVE_POLL_H --#include <poll.h> --#endif --#if HAVE_SYS_POLL_H --#include <sys/poll.h> --#endif -- --#ifdef HAVE_KQUEUE --#include <sys/types.h> --#include <sys/event.h> --#include <sys/time.h> --#endif -- --#ifdef HAVE_EPOLL --#include <sys/epoll.h> --#endif -- --#ifdef NETWARE --#define HAS_SOCKETS(dt) (dt == APR_POLL_SOCKET) ? 1 : 0 --#define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0 --#endif -- --#ifdef HAVE_KQUEUE --static apr_int16_t get_kqueue_revent(apr_int16_t event, apr_int16_t flags) --{ -- apr_int16_t rv = 0; -- -- if (event & EVFILT_READ) -- rv |= APR_POLLIN; -- if (event & EVFILT_WRITE) -- rv |= APR_POLLOUT; -- if (flags & EV_EOF) -- rv |= APR_POLLHUP; -- if (flags & EV_ERROR) -- rv |= APR_POLLERR; -- -- return rv; --} -- --#endif -+#include "apr_arch_poll_private.h" - --#ifdef HAVE_EPOLL --static apr_int16_t get_epoll_event(apr_int16_t event) --{ -- apr_int16_t rv = 0; -- -- if (event & APR_POLLIN) -- rv |= EPOLLIN; -- if (event & APR_POLLPRI) -- rv |= EPOLLPRI; -- if (event & APR_POLLOUT) -- rv |= EPOLLOUT; -- if (event & APR_POLLERR) -- rv |= EPOLLERR; -- if (event & APR_POLLHUP) -- rv |= EPOLLHUP; -- /* APR_POLLNVAL is not handled by epoll. */ -- -- return rv; --} -- --static apr_int16_t get_epoll_revent(apr_int16_t event) --{ -- apr_int16_t rv = 0; -- -- if (event & EPOLLIN) -- rv |= APR_POLLIN; -- if (event & EPOLLPRI) -- rv |= APR_POLLPRI; -- if (event & EPOLLOUT) -- rv |= APR_POLLOUT; -- if (event & EPOLLERR) -- rv |= APR_POLLERR; -- if (event & EPOLLHUP) -- rv |= APR_POLLHUP; -- /* APR_POLLNVAL is not handled by epoll. */ -- -- return rv; --} --#endif -- --#ifdef HAVE_POLL /* We can just use poll to do our socket polling. */ -+#if defined(POLL_USES_POLL) || defined(POLLSET_USES_POLL) - - static apr_int16_t get_event(apr_int16_t event) - { - apr_int16_t rv = 0; - - if (event & APR_POLLIN) -- rv |= POLLIN; -+ rv |= POLLIN; - if (event & APR_POLLPRI) -- rv |= POLLPRI; -+ rv |= POLLPRI; - if (event & APR_POLLOUT) -- rv |= POLLOUT; -+ rv |= POLLOUT; - if (event & APR_POLLERR) -- rv |= POLLERR; -+ rv |= POLLERR; - if (event & APR_POLLHUP) -- rv |= POLLHUP; -+ rv |= POLLHUP; - if (event & APR_POLLNVAL) -- rv |= POLLNVAL; -+ rv |= POLLNVAL; - - return rv; - } -@@ -140,12 +55,18 @@ - rv |= APR_POLLNVAL; - - return rv; --} -+} -+ -+#endif /* POLL_USES_POLL || POLLSET_USES_POLL */ -+ -+ -+#ifdef POLL_USES_POLL - - #define SMALL_POLLSET_LIMIT 8 - - APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t num, -- apr_int32_t *nsds, apr_interval_time_t timeout) -+ apr_int32_t *nsds, -+ apr_interval_time_t timeout) - { - int i, num_to_poll; - #ifdef HAVE_VLA -@@ -215,298 +136,55 @@ - } - - --#else /* Use select to mimic poll */ -- --APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *nsds, -- apr_interval_time_t timeout) --{ -- fd_set readset, writeset, exceptset; -- int rv, i; -- int maxfd = -1; -- struct timeval tv, *tvptr; --#ifdef NETWARE -- apr_datatype_e set_type = APR_NO_DESC; --#endif -- -- if (timeout < 0) { -- tvptr = NULL; -- } -- else { -- tv.tv_sec = (long)apr_time_sec(timeout); -- tv.tv_usec = (long)apr_time_usec(timeout); -- tvptr = &tv; -- } -- -- FD_ZERO(&readset); -- FD_ZERO(&writeset); -- FD_ZERO(&exceptset); -- -- for (i = 0; i < num; i++) { -- apr_os_sock_t fd; -- -- aprset[i].rtnevents = 0; -- -- if (aprset[i].desc_type == APR_POLL_SOCKET) { --#ifdef NETWARE -- if (HAS_PIPES(set_type)) { -- return APR_EBADF; -- } -- else { -- set_type = APR_POLL_SOCKET; -- } --#endif -- fd = aprset[i].desc.s->socketdes; -- } -- else if (aprset[i].desc_type == APR_POLL_FILE) { --#if !APR_FILES_AS_SOCKETS -- return APR_EBADF; --#else --#ifdef NETWARE -- if (aprset[i].desc.f->is_pipe && !HAS_SOCKETS(set_type)) { -- set_type = APR_POLL_FILE; -- } -- else -- return APR_EBADF; --#endif /* NETWARE */ -- -- fd = aprset[i].desc.f->filedes; -- --#endif /* APR_FILES_AS_SOCKETS */ -- } -- else { -- break; -- } --#if !defined(WIN32) && !defined(NETWARE) /* socket sets handled with array of handles */ -- if (fd >= FD_SETSIZE) { -- /* XXX invent new error code so application has a clue */ -- return APR_EBADF; -- } --#endif -- if (aprset[i].reqevents & APR_POLLIN) { -- FD_SET(fd, &readset); -- } -- if (aprset[i].reqevents & APR_POLLOUT) { -- FD_SET(fd, &writeset); -- } -- if (aprset[i].reqevents & -- (APR_POLLPRI | APR_POLLERR | APR_POLLHUP | APR_POLLNVAL)) { -- FD_SET(fd, &exceptset); -- } -- if ((int)fd > maxfd) { -- maxfd = (int)fd; -- } -- } -+#endif /* POLL_USES_POLL */ - --#ifdef NETWARE -- if (HAS_PIPES(set_type)) { -- rv = pipe_select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); -- } -- else { --#endif - -- rv = select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); -+#ifdef POLLSET_USES_POLL - --#ifdef NETWARE -- } --#endif -- -- (*nsds) = rv; -- if ((*nsds) == 0) { -- return APR_TIMEUP; -- } -- if ((*nsds) < 0) { -- return apr_get_netos_error(); -- } -- -- for (i = 0; i < num; i++) { -- apr_os_sock_t fd; -- -- if (aprset[i].desc_type == APR_POLL_SOCKET) { -- fd = aprset[i].desc.s->socketdes; -- } -- else if (aprset[i].desc_type == APR_POLL_FILE) { --#if !APR_FILES_AS_SOCKETS -- return APR_EBADF; --#else -- fd = aprset[i].desc.f->filedes; --#endif -- } -- else { -- break; -- } -- if (FD_ISSET(fd, &readset)) { -- aprset[i].rtnevents |= APR_POLLIN; -- } -- if (FD_ISSET(fd, &writeset)) { -- aprset[i].rtnevents |= APR_POLLOUT; -- } -- if (FD_ISSET(fd, &exceptset)) { -- aprset[i].rtnevents |= APR_POLLERR; -- } -- } -- -- return APR_SUCCESS; --} -- --#endif -- --struct apr_pollset_t { -+struct apr_pollset_t -+{ - apr_pool_t *pool; -- - apr_uint32_t nelts; - apr_uint32_t nalloc; --#ifdef HAVE_KQUEUE -- int kqueue_fd; -- struct kevent kevent; -- struct kevent *ke_set; --#elif defined(HAVE_EPOLL) -- int epoll_fd; -- struct epoll_event *pollset; --#elif defined(HAVE_POLL) - struct pollfd *pollset; --#else -- fd_set readset, writeset, exceptset; -- int maxfd; --#endif - apr_pollfd_t *query_set; - apr_pollfd_t *result_set; -- --#ifdef NETWARE -- int set_type; --#endif - }; - --#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) --static apr_status_t backend_cleanup(void *p_) --{ -- apr_pollset_t *pollset = (apr_pollset_t *)p_; --#ifdef HAVE_KQUEUE -- close(pollset->kqueue_fd); --#elif defined(HAVE_EPOLL) -- close(pollset->epoll_fd); --#endif -- return APR_SUCCESS; --} --#endif /* HAVE_KQUEUE || HAVE_EPOLL */ -- - APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset, - apr_uint32_t size, - apr_pool_t *p, - apr_uint32_t flags) - { --#if !defined(HAVE_KQUEUE) && !defined(HAVE_EPOLL) && !defined(HAVE_POLL) && defined(FD_SETSIZE) -- if (size > FD_SETSIZE) { -+ if (flags & APR_POLLSET_THREADSAFE) { - *pollset = NULL; -- return APR_EINVAL; -+ return APR_ENOTIMPL; - } --#endif -+ - *pollset = apr_palloc(p, sizeof(**pollset)); - (*pollset)->nelts = 0; - (*pollset)->nalloc = size; - (*pollset)->pool = p; --#ifdef HAVE_KQUEUE -- (*pollset)->ke_set = (struct kevent*)apr_palloc(p, size * sizeof(struct kevent)); -- memset((*pollset)->ke_set, 0, size * sizeof(struct kevent)); -- (*pollset)->kqueue_fd = kqueue(); -- if ((*pollset)->kqueue_fd == -1) { -- return APR_ENOMEM; -- } -- apr_pool_cleanup_register(p, (void*)(*pollset), backend_cleanup, -- apr_pool_cleanup_null); --#elif defined(HAVE_EPOLL) -- (*pollset)->epoll_fd = epoll_create(size); -- (*pollset)->pollset = apr_palloc(p, size * sizeof(struct epoll_event)); -- apr_pool_cleanup_register(p, (void*)(*pollset), backend_cleanup, -- apr_pool_cleanup_null); --#elif defined(HAVE_POLL) - (*pollset)->pollset = apr_palloc(p, size * sizeof(struct pollfd)); --#else -- FD_ZERO(&((*pollset)->readset)); -- FD_ZERO(&((*pollset)->writeset)); -- FD_ZERO(&((*pollset)->exceptset)); -- (*pollset)->maxfd = 0; --#ifdef NETWARE -- (*pollset)->set_type = APR_NO_DESC; --#endif --#endif - (*pollset)->query_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); - (*pollset)->result_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); -- - return APR_SUCCESS; - } - - APR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t *pollset) - { --#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) -- return apr_pool_cleanup_run(pollset->pool, pollset, backend_cleanup); --#else - return APR_SUCCESS; --#endif - } - - APR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset, - const apr_pollfd_t *descriptor) - { --#ifdef HAVE_KQUEUE -- apr_os_sock_t fd; --#elif defined(HAVE_EPOLL) -- struct epoll_event ev; -- int ret = -1; --#else --#if !defined(HAVE_POLL) -- apr_os_sock_t fd; --#endif --#endif -- - if (pollset->nelts == pollset->nalloc) { - return APR_ENOMEM; - } - - pollset->query_set[pollset->nelts] = *descriptor; - --#ifdef HAVE_KQUEUE -- if (descriptor->desc_type == APR_POLL_SOCKET) { -- fd = descriptor->desc.s->socketdes; -- } -- else { -- fd = descriptor->desc.f->filedes; -- } -- -- if (descriptor->reqevents & APR_POLLIN) { -- EV_SET(&pollset->kevent, fd, EVFILT_READ, EV_ADD, 0, 0, NULL); -- -- if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -- NULL) == -1) { -- return APR_ENOMEM; -- } -- } -- -- if (descriptor->reqevents & APR_POLLOUT) { -- EV_SET(&pollset->kevent, fd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); -- -- if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -- NULL) == -1) { -- return APR_ENOMEM; -- } -- } -- --#elif defined(HAVE_EPOLL) -- ev.events = get_epoll_event(descriptor->reqevents); -- if (descriptor->desc_type == APR_POLL_SOCKET) { -- ev.data.fd = descriptor->desc.s->socketdes; -- ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, -- descriptor->desc.s->socketdes, &ev); -- } -- else { -- ev.data.fd = descriptor->desc.f->filedes; -- ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, -- descriptor->desc.f->filedes, &ev); -- } -- if (0 != ret) { -- return APR_EBADF; -- } --#elif defined(HAVE_POLL) -- - if (descriptor->desc_type == APR_POLL_SOCKET) { - pollset->pollset[pollset->nelts].fd = descriptor->desc.s->socketdes; - } -@@ -514,59 +192,10 @@ - pollset->pollset[pollset->nelts].fd = descriptor->desc.f->filedes; - } - -- pollset->pollset[pollset->nelts].events = get_event(descriptor->reqevents); --#else -- if (descriptor->desc_type == APR_POLL_SOCKET) { --#ifdef NETWARE -- /* NetWare can't handle mixed descriptor types in select() */ -- if (HAS_PIPES(pollset->set_type)) { -- return APR_EBADF; -- } -- else { -- pollset->set_type = APR_POLL_SOCKET; -- } --#endif -- fd = descriptor->desc.s->socketdes; -- } -- else { --#if !APR_FILES_AS_SOCKETS -- return APR_EBADF; --#else --#ifdef NETWARE -- /* NetWare can't handle mixed descriptor types in select() */ -- if (descriptor->desc.f->is_pipe && !HAS_SOCKETS(pollset->set_type)) { -- pollset->set_type = APR_POLL_FILE; -- fd = descriptor->desc.f->filedes; -- } -- else { -- return APR_EBADF; -- } --#else -- fd = descriptor->desc.f->filedes; --#endif --#endif -- } --#if !defined(WIN32) && !defined(NETWARE) /* socket sets handled with array of handles */ -- if (fd >= FD_SETSIZE) { -- /* XXX invent new error code so application has a clue */ -- return APR_EBADF; -- } --#endif -- if (descriptor->reqevents & APR_POLLIN) { -- FD_SET(fd, &(pollset->readset)); -- } -- if (descriptor->reqevents & APR_POLLOUT) { -- FD_SET(fd, &(pollset->writeset)); -- } -- if (descriptor->reqevents & -- (APR_POLLPRI | APR_POLLERR | APR_POLLHUP | APR_POLLNVAL)) { -- FD_SET(fd, &(pollset->exceptset)); -- } -- if ((int)fd > pollset->maxfd) { -- pollset->maxfd = (int)fd; -- } --#endif -+ pollset->pollset[pollset->nelts].events = -+ get_event(descriptor->reqevents); - pollset->nelts++; -+ - return APR_SUCCESS; - } - -@@ -574,97 +203,8 @@ - const apr_pollfd_t *descriptor) - { - apr_uint32_t i; --#ifdef HAVE_KQUEUE -- apr_os_sock_t fd; --#elif defined(HAVE_EPOLL) -- struct epoll_event ev; -- int ret = -1; --#elif !defined(HAVE_POLL) - apr_os_sock_t fd; --#endif - --#ifdef HAVE_KQUEUE -- for (i = 0; i < pollset->nelts; i++) { -- if (descriptor->desc.s == pollset->query_set[i].desc.s) { -- /* Found an instance of the fd: remove this and any other copies */ -- apr_uint32_t dst = i; -- apr_uint32_t old_nelts = pollset->nelts; -- pollset->nelts--; -- for (i++; i < old_nelts; i++) { -- if (descriptor->desc.s == pollset->query_set[i].desc.s) { -- pollset->nelts--; -- } -- else { -- pollset->query_set[dst] = pollset->query_set[i]; -- dst++; -- } -- } -- -- if (descriptor->desc_type == APR_POLL_SOCKET) { -- fd = descriptor->desc.s->socketdes; -- } -- else { -- fd = descriptor->desc.f->filedes; -- } -- -- if (descriptor->reqevents & APR_POLLIN) { -- EV_SET(&pollset->kevent, fd, -- EVFILT_READ, EV_DELETE, 0, 0, NULL); -- -- if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -- NULL) == -1) { -- return APR_EBADF; -- } -- } -- -- if (descriptor->reqevents & APR_POLLOUT) { -- EV_SET(&pollset->kevent, fd, -- EVFILT_WRITE, EV_DELETE, 0, 0, NULL); -- -- if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -- NULL) == -1) { -- return APR_EBADF; -- } -- } -- -- return APR_SUCCESS; -- } -- } --#elif defined(HAVE_EPOLL) -- for (i = 0; i < pollset->nelts; i++) { -- if (descriptor->desc.s == pollset->query_set[i].desc.s) { -- /* Found an instance of the fd: remove this and any other copies */ -- apr_uint32_t dst = i; -- apr_uint32_t old_nelts = pollset->nelts; -- pollset->nelts--; -- for (i++; i < old_nelts; i++) { -- if (descriptor->desc.s == pollset->query_set[i].desc.s) { -- pollset->nelts--; -- } -- else { -- pollset->query_set[dst] = pollset->query_set[i]; -- dst++; -- } -- } -- ev.events = get_epoll_event(descriptor->reqevents); -- if (descriptor->desc_type == APR_POLL_SOCKET) { -- ev.data.fd = descriptor->desc.s->socketdes; -- ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, -- descriptor->desc.s->socketdes, &ev); -- } -- else { -- ev.data.fd = descriptor->desc.f->filedes; -- ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, -- descriptor->desc.f->filedes, &ev); -- } -- if (ret < 0) { -- return APR_EBADF; -- } -- -- return APR_SUCCESS; -- } -- } --#elif defined(HAVE_POLL) - for (i = 0; i < pollset->nelts; i++) { - if (descriptor->desc.s == pollset->query_set[i].desc.s) { - /* Found an instance of the fd: remove this and any other copies */ -@@ -685,159 +225,9 @@ - } - } - --#else /* no poll */ -- if (descriptor->desc_type == APR_POLL_SOCKET) { -- fd = descriptor->desc.s->socketdes; -- } -- else { --#if !APR_FILES_AS_SOCKETS -- return APR_EBADF; --#else -- fd = descriptor->desc.f->filedes; --#endif -- } -- -- for (i = 0; i < pollset->nelts; i++) { -- if (descriptor->desc.s == pollset->query_set[i].desc.s) { -- /* Found an instance of the fd: remove this and any other copies */ -- apr_uint32_t dst = i; -- apr_uint32_t old_nelts = pollset->nelts; -- pollset->nelts--; -- for (i++; i < old_nelts; i++) { -- if (descriptor->desc.s == pollset->query_set[i].desc.s) { -- pollset->nelts--; -- } -- else { -- pollset->query_set[dst] = pollset->query_set[i]; -- dst++; -- } -- } -- FD_CLR(fd, &(pollset->readset)); -- FD_CLR(fd, &(pollset->writeset)); -- FD_CLR(fd, &(pollset->exceptset)); -- if (((int)fd == pollset->maxfd) && (pollset->maxfd > 0)) { -- pollset->maxfd--; -- } -- return APR_SUCCESS; -- } -- } --#endif /* no poll */ -- - return APR_NOTFOUND; - } --#ifdef HAVE_KQUEUE --APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -- apr_interval_time_t timeout, -- apr_int32_t *num, -- const apr_pollfd_t **descriptors) --{ -- int rv; -- apr_uint32_t i, j, r = 0; -- struct timespec tv, *tvptr; -- -- if (timeout < 0) { -- tvptr = NULL; -- } -- else { -- tv.tv_sec = (long)apr_time_sec(timeout); -- tv.tv_nsec = (long)apr_time_msec(timeout); -- tvptr = &tv; -- } - -- rv = kevent(pollset->kqueue_fd, NULL, 0, pollset->ke_set, pollset->nelts, -- tvptr); -- (*num) = rv; -- if (rv < 0) { -- return apr_get_netos_error(); -- } -- if (rv == 0) { -- return APR_TIMEUP; -- } -- -- /* TODO: Is there a better way to re-associate our data? */ -- for (i = 0; i < pollset->nelts; i++) { -- apr_os_sock_t fd; -- if (pollset->query_set[i].desc_type == APR_POLL_SOCKET) { -- fd = pollset->query_set[i].desc.s->socketdes; -- } -- else { -- fd = pollset->query_set[i].desc.f->filedes; -- } -- for (j = 0; j < rv; j++) { -- if (pollset->ke_set[j].ident == fd ) { -- pollset->result_set[r] = pollset->query_set[i]; -- pollset->result_set[r].rtnevents = -- get_kqueue_revent(pollset->ke_set[j].filter, -- pollset->ke_set[j].flags); -- r++; -- } -- } -- } -- -- (*num) = r; -- -- if (descriptors) { -- *descriptors = pollset->result_set; -- } -- -- return APR_SUCCESS; --} -- --#elif defined(HAVE_EPOLL) -- --APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -- apr_interval_time_t timeout, -- apr_int32_t *num, -- const apr_pollfd_t **descriptors) --{ -- int rv; -- apr_uint32_t i, j, k; -- -- if (timeout > 0) { -- timeout /= 1000; -- } -- -- rv = epoll_wait(pollset->epoll_fd, pollset->pollset, pollset->nelts, -- timeout); -- (*num) = rv; -- if (rv < 0) { -- return apr_get_netos_error(); -- } -- if (rv == 0) { -- return APR_TIMEUP; -- } -- j = 0; -- for (i = 0; i < pollset->nelts; i++) { -- if (pollset->pollset[i].events != 0) { -- /* TODO: Is there a better way to re-associate our data? */ -- for (k = 0; k < pollset->nelts; k++) { -- if (pollset->query_set[k].desc_type == APR_POLL_SOCKET && -- pollset->query_set[k].desc.s->socketdes == -- pollset->pollset[i].data.fd) { -- pollset->result_set[j] = pollset->query_set[k]; -- pollset->result_set[j].rtnevents = -- get_epoll_revent(pollset->pollset[i].events); -- j++; -- break; -- } -- else if (pollset->query_set[k].desc_type == APR_POLL_FILE -- && pollset->query_set[k].desc.f->filedes == -- pollset->pollset[i].data.fd) { -- pollset->result_set[j] = pollset->query_set[k]; -- pollset->result_set[j].rtnevents = -- get_epoll_revent(pollset->pollset[i].events); -- j++; -- break; -- } -- } -- } -- } -- if (descriptors) { -- *descriptors = pollset->result_set; -- } -- return APR_SUCCESS; --} --#elif defined(HAVE_POLL) - APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, - apr_interval_time_t timeout, - apr_int32_t *num, -@@ -871,79 +261,4 @@ - return APR_SUCCESS; - } - --#else /* no poll */ -- --APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -- apr_interval_time_t timeout, -- apr_int32_t *num, -- const apr_pollfd_t **descriptors) --{ -- int rv; -- apr_uint32_t i, j; -- struct timeval tv, *tvptr; -- fd_set readset, writeset, exceptset; -- -- if (timeout < 0) { -- tvptr = NULL; -- } -- else { -- tv.tv_sec = (long)apr_time_sec(timeout); -- tv.tv_usec = (long)apr_time_usec(timeout); -- tvptr = &tv; -- } -- -- memcpy(&readset, &(pollset->readset), sizeof(fd_set)); -- memcpy(&writeset, &(pollset->writeset), sizeof(fd_set)); -- memcpy(&exceptset, &(pollset->exceptset), sizeof(fd_set)); -- --#ifdef NETWARE -- if (HAS_PIPES(pollset->set_type)) { -- rv = pipe_select(pollset->maxfd + 1, &readset, &writeset, &exceptset, tvptr); -- } -- else --#endif -- rv = select(pollset->maxfd + 1, &readset, &writeset, &exceptset, tvptr); -- -- (*num) = rv; -- if (rv < 0) { -- return apr_get_netos_error(); -- } -- if (rv == 0) { -- return APR_TIMEUP; -- } -- j = 0; -- for (i = 0; i < pollset->nelts; i++) { -- apr_os_sock_t fd; -- if (pollset->query_set[i].desc_type == APR_POLL_SOCKET) { -- fd = pollset->query_set[i].desc.s->socketdes; -- } -- else { --#if !APR_FILES_AS_SOCKETS -- return APR_EBADF; --#else -- fd = pollset->query_set[i].desc.f->filedes; --#endif -- } -- if (FD_ISSET(fd, &readset) || FD_ISSET(fd, &writeset) || -- FD_ISSET(fd, &exceptset)) { -- pollset->result_set[j] = pollset->query_set[i]; -- pollset->result_set[j].rtnevents = 0; -- if (FD_ISSET(fd, &readset)) { -- pollset->result_set[j].rtnevents |= APR_POLLIN; -- } -- if (FD_ISSET(fd, &writeset)) { -- pollset->result_set[j].rtnevents |= APR_POLLOUT; -- } -- if (FD_ISSET(fd, &exceptset)) { -- pollset->result_set[j].rtnevents |= APR_POLLERR; -- } -- j++; -- } -- } -- -- if (descriptors) -- *descriptors = pollset->result_set; -- return APR_SUCCESS; --} -- --#endif /* no poll */ -+#endif /* POLLSET_USES_POLL */ -diff -Nur srclib/apr.orig/poll/unix/poll.c.orig srclib/apr/poll/unix/poll.c.orig ---- srclib/apr.orig/poll/unix/poll.c.orig Thu Jan 1 01:00:00 1970 -+++ srclib/apr/poll/unix/poll.c.orig Wed Nov 17 02:07:02 2004 -@@ -0,0 +1,949 @@ -+/* Copyright 2000-2004 The Apache Software Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#include "apr.h" -+#include "apr_poll.h" -+#include "apr_time.h" -+#include "apr_portable.h" -+#include "apr_arch_networkio.h" -+#include "apr_arch_file_io.h" -+#if HAVE_POLL_H -+#include <poll.h> -+#endif -+#if HAVE_SYS_POLL_H -+#include <sys/poll.h> -+#endif -+ -+#ifdef HAVE_KQUEUE -+#include <sys/types.h> -+#include <sys/event.h> -+#include <sys/time.h> -+#endif -+ -+#ifdef HAVE_EPOLL -+#include <sys/epoll.h> -+#endif -+ -+#ifdef NETWARE -+#define HAS_SOCKETS(dt) (dt == APR_POLL_SOCKET) ? 1 : 0 -+#define HAS_PIPES(dt) (dt == APR_POLL_FILE) ? 1 : 0 -+#endif -+ -+#ifdef HAVE_KQUEUE -+static apr_int16_t get_kqueue_revent(apr_int16_t event, apr_int16_t flags) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & EVFILT_READ) -+ rv |= APR_POLLIN; -+ if (event & EVFILT_WRITE) -+ rv |= APR_POLLOUT; -+ if (flags & EV_EOF) -+ rv |= APR_POLLHUP; -+ if (flags & EV_ERROR) -+ rv |= APR_POLLERR; -+ -+ return rv; -+} -+ -+#endif -+ -+#ifdef HAVE_EPOLL -+static apr_int16_t get_epoll_event(apr_int16_t event) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & APR_POLLIN) -+ rv |= EPOLLIN; -+ if (event & APR_POLLPRI) -+ rv |= EPOLLPRI; -+ if (event & APR_POLLOUT) -+ rv |= EPOLLOUT; -+ if (event & APR_POLLERR) -+ rv |= EPOLLERR; -+ if (event & APR_POLLHUP) -+ rv |= EPOLLHUP; -+ /* APR_POLLNVAL is not handled by epoll. */ -+ -+ return rv; -+} -+ -+static apr_int16_t get_epoll_revent(apr_int16_t event) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & EPOLLIN) -+ rv |= APR_POLLIN; -+ if (event & EPOLLPRI) -+ rv |= APR_POLLPRI; -+ if (event & EPOLLOUT) -+ rv |= APR_POLLOUT; -+ if (event & EPOLLERR) -+ rv |= APR_POLLERR; -+ if (event & EPOLLHUP) -+ rv |= APR_POLLHUP; -+ /* APR_POLLNVAL is not handled by epoll. */ -+ -+ return rv; -+} -+#endif -+ -+#ifdef HAVE_POLL /* We can just use poll to do our socket polling. */ -+ -+static apr_int16_t get_event(apr_int16_t event) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & APR_POLLIN) -+ rv |= POLLIN; -+ if (event & APR_POLLPRI) -+ rv |= POLLPRI; -+ if (event & APR_POLLOUT) -+ rv |= POLLOUT; -+ if (event & APR_POLLERR) -+ rv |= POLLERR; -+ if (event & APR_POLLHUP) -+ rv |= POLLHUP; -+ if (event & APR_POLLNVAL) -+ rv |= POLLNVAL; -+ -+ return rv; -+} -+ -+static apr_int16_t get_revent(apr_int16_t event) -+{ -+ apr_int16_t rv = 0; -+ -+ if (event & POLLIN) -+ rv |= APR_POLLIN; -+ if (event & POLLPRI) -+ rv |= APR_POLLPRI; -+ if (event & POLLOUT) -+ rv |= APR_POLLOUT; -+ if (event & POLLERR) -+ rv |= APR_POLLERR; -+ if (event & POLLHUP) -+ rv |= APR_POLLHUP; -+ if (event & POLLNVAL) -+ rv |= APR_POLLNVAL; -+ -+ return rv; -+} -+ -+#define SMALL_POLLSET_LIMIT 8 -+ -+APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, apr_int32_t num, -+ apr_int32_t *nsds, apr_interval_time_t timeout) -+{ -+ int i, num_to_poll; -+#ifdef HAVE_VLA -+ /* XXX: I trust that this is a segv when insufficient stack exists? */ -+ struct pollfd pollset[num]; -+#elif defined(HAVE_ALLOCA) -+ struct pollfd *pollset = alloca(sizeof(struct pollfd) * num); -+ if (!pollset) -+ return APR_ENOMEM; -+#else -+ struct pollfd tmp_pollset[SMALL_POLLSET_LIMIT]; -+ struct pollfd *pollset; -+ -+ if (num <= SMALL_POLLSET_LIMIT) { -+ pollset = tmp_pollset; -+ } -+ else { -+ /* This does require O(n) to copy the descriptors to the internal -+ * mapping. -+ */ -+ pollset = malloc(sizeof(struct pollfd) * num); -+ /* The other option is adding an apr_pool_abort() fn to invoke -+ * the pool's out of memory handler -+ */ -+ if (!pollset) -+ return APR_ENOMEM; -+ } -+#endif -+ for (i = 0; i < num; i++) { -+ if (aprset[i].desc_type == APR_POLL_SOCKET) { -+ pollset[i].fd = aprset[i].desc.s->socketdes; -+ } -+ else if (aprset[i].desc_type == APR_POLL_FILE) { -+ pollset[i].fd = aprset[i].desc.f->filedes; -+ } -+ else { -+ break; -+ } -+ pollset[i].events = get_event(aprset[i].reqevents); -+ } -+ num_to_poll = i; -+ -+ if (timeout > 0) { -+ timeout /= 1000; /* convert microseconds to milliseconds */ -+ } -+ -+ i = poll(pollset, num_to_poll, timeout); -+ (*nsds) = i; -+ -+ for (i = 0; i < num; i++) { -+ aprset[i].rtnevents = get_revent(pollset[i].revents); -+ } -+ -+#if !defined(HAVE_VLA) && !defined(HAVE_ALLOCA) -+ if (num > SMALL_POLLSET_LIMIT) { -+ free(pollset); -+ } -+#endif -+ -+ if ((*nsds) < 0) { -+ return apr_get_netos_error(); -+ } -+ if ((*nsds) == 0) { -+ return APR_TIMEUP; -+ } -+ return APR_SUCCESS; -+} -+ -+ -+#else /* Use select to mimic poll */ -+ -+APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, apr_int32_t *nsds, -+ apr_interval_time_t timeout) -+{ -+ fd_set readset, writeset, exceptset; -+ int rv, i; -+ int maxfd = -1; -+ struct timeval tv, *tvptr; -+#ifdef NETWARE -+ apr_datatype_e set_type = APR_NO_DESC; -+#endif -+ -+ if (timeout < 0) { -+ tvptr = NULL; -+ } -+ else { -+ tv.tv_sec = (long)apr_time_sec(timeout); -+ tv.tv_usec = (long)apr_time_usec(timeout); -+ tvptr = &tv; -+ } -+ -+ FD_ZERO(&readset); -+ FD_ZERO(&writeset); -+ FD_ZERO(&exceptset); -+ -+ for (i = 0; i < num; i++) { -+ apr_os_sock_t fd; -+ -+ aprset[i].rtnevents = 0; -+ -+ if (aprset[i].desc_type == APR_POLL_SOCKET) { -+#ifdef NETWARE -+ if (HAS_PIPES(set_type)) { -+ return APR_EBADF; -+ } -+ else { -+ set_type = APR_POLL_SOCKET; -+ } -+#endif -+ fd = aprset[i].desc.s->socketdes; -+ } -+ else if (aprset[i].desc_type == APR_POLL_FILE) { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+#ifdef NETWARE -+ if (aprset[i].desc.f->is_pipe && !HAS_SOCKETS(set_type)) { -+ set_type = APR_POLL_FILE; -+ } -+ else -+ return APR_EBADF; -+#endif /* NETWARE */ -+ -+ fd = aprset[i].desc.f->filedes; -+ -+#endif /* APR_FILES_AS_SOCKETS */ -+ } -+ else { -+ break; -+ } -+#if !defined(WIN32) && !defined(NETWARE) /* socket sets handled with array of handles */ -+ if (fd >= FD_SETSIZE) { -+ /* XXX invent new error code so application has a clue */ -+ return APR_EBADF; -+ } -+#endif -+ if (aprset[i].reqevents & APR_POLLIN) { -+ FD_SET(fd, &readset); -+ } -+ if (aprset[i].reqevents & APR_POLLOUT) { -+ FD_SET(fd, &writeset); -+ } -+ if (aprset[i].reqevents & -+ (APR_POLLPRI | APR_POLLERR | APR_POLLHUP | APR_POLLNVAL)) { -+ FD_SET(fd, &exceptset); -+ } -+ if ((int)fd > maxfd) { -+ maxfd = (int)fd; -+ } -+ } -+ -+#ifdef NETWARE -+ if (HAS_PIPES(set_type)) { -+ rv = pipe_select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); -+ } -+ else { -+#endif -+ -+ rv = select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); -+ -+#ifdef NETWARE -+ } -+#endif -+ -+ (*nsds) = rv; -+ if ((*nsds) == 0) { -+ return APR_TIMEUP; -+ } -+ if ((*nsds) < 0) { -+ return apr_get_netos_error(); -+ } -+ -+ for (i = 0; i < num; i++) { -+ apr_os_sock_t fd; -+ -+ if (aprset[i].desc_type == APR_POLL_SOCKET) { -+ fd = aprset[i].desc.s->socketdes; -+ } -+ else if (aprset[i].desc_type == APR_POLL_FILE) { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+ fd = aprset[i].desc.f->filedes; -+#endif -+ } -+ else { -+ break; -+ } -+ if (FD_ISSET(fd, &readset)) { -+ aprset[i].rtnevents |= APR_POLLIN; -+ } -+ if (FD_ISSET(fd, &writeset)) { -+ aprset[i].rtnevents |= APR_POLLOUT; -+ } -+ if (FD_ISSET(fd, &exceptset)) { -+ aprset[i].rtnevents |= APR_POLLERR; -+ } -+ } -+ -+ return APR_SUCCESS; -+} -+ -+#endif -+ -+struct apr_pollset_t { -+ apr_pool_t *pool; -+ -+ apr_uint32_t nelts; -+ apr_uint32_t nalloc; -+#ifdef HAVE_KQUEUE -+ int kqueue_fd; -+ struct kevent kevent; -+ struct kevent *ke_set; -+#elif defined(HAVE_EPOLL) -+ int epoll_fd; -+ struct epoll_event *pollset; -+#elif defined(HAVE_POLL) -+ struct pollfd *pollset; -+#else -+ fd_set readset, writeset, exceptset; -+ int maxfd; -+#endif -+ apr_pollfd_t *query_set; -+ apr_pollfd_t *result_set; -+ -+#ifdef NETWARE -+ int set_type; -+#endif -+}; -+ -+#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) -+static apr_status_t backend_cleanup(void *p_) -+{ -+ apr_pollset_t *pollset = (apr_pollset_t *)p_; -+#ifdef HAVE_KQUEUE -+ close(pollset->kqueue_fd); -+#elif defined(HAVE_EPOLL) -+ close(pollset->epoll_fd); -+#endif -+ return APR_SUCCESS; -+} -+#endif /* HAVE_KQUEUE || HAVE_EPOLL */ -+ -+APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset, -+ apr_uint32_t size, -+ apr_pool_t *p, -+ apr_uint32_t flags) -+{ -+#if !defined(HAVE_KQUEUE) && !defined(HAVE_EPOLL) && !defined(HAVE_POLL) && defined(FD_SETSIZE) -+ if (size > FD_SETSIZE) { -+ *pollset = NULL; -+ return APR_EINVAL; -+ } -+#endif -+ *pollset = apr_palloc(p, sizeof(**pollset)); -+ (*pollset)->nelts = 0; -+ (*pollset)->nalloc = size; -+ (*pollset)->pool = p; -+#ifdef HAVE_KQUEUE -+ (*pollset)->ke_set = (struct kevent*)apr_palloc(p, size * sizeof(struct kevent)); -+ memset((*pollset)->ke_set, 0, size * sizeof(struct kevent)); -+ (*pollset)->kqueue_fd = kqueue(); -+ if ((*pollset)->kqueue_fd == -1) { -+ return APR_ENOMEM; -+ } -+ apr_pool_cleanup_register(p, (void*)(*pollset), backend_cleanup, -+ apr_pool_cleanup_null); -+#elif defined(HAVE_EPOLL) -+ (*pollset)->epoll_fd = epoll_create(size); -+ (*pollset)->pollset = apr_palloc(p, size * sizeof(struct epoll_event)); -+ apr_pool_cleanup_register(p, (void*)(*pollset), backend_cleanup, -+ apr_pool_cleanup_null); -+#elif defined(HAVE_POLL) -+ (*pollset)->pollset = apr_palloc(p, size * sizeof(struct pollfd)); -+#else -+ FD_ZERO(&((*pollset)->readset)); -+ FD_ZERO(&((*pollset)->writeset)); -+ FD_ZERO(&((*pollset)->exceptset)); -+ (*pollset)->maxfd = 0; -+#ifdef NETWARE -+ (*pollset)->set_type = APR_NO_DESC; -+#endif -+#endif -+ (*pollset)->query_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); -+ (*pollset)->result_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); -+ -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t *pollset) -+{ -+#if defined(HAVE_KQUEUE) || defined(HAVE_EPOLL) -+ return apr_pool_cleanup_run(pollset->pool, pollset, backend_cleanup); -+#else -+ return APR_SUCCESS; -+#endif -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor) -+{ -+#ifdef HAVE_KQUEUE -+ apr_os_sock_t fd; -+#elif defined(HAVE_EPOLL) -+ struct epoll_event ev; -+ int ret = -1; -+#else -+#if !defined(HAVE_POLL) -+ apr_os_sock_t fd; -+#endif -+#endif -+ -+ if (pollset->nelts == pollset->nalloc) { -+ return APR_ENOMEM; -+ } -+ -+ pollset->query_set[pollset->nelts] = *descriptor; -+ -+#ifdef HAVE_KQUEUE -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+ fd = descriptor->desc.f->filedes; -+ } -+ -+ if (descriptor->reqevents & APR_POLLIN) { -+ EV_SET(&pollset->kevent, fd, EVFILT_READ, EV_ADD, 0, 0, NULL); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ return APR_ENOMEM; -+ } -+ } -+ -+ if (descriptor->reqevents & APR_POLLOUT) { -+ EV_SET(&pollset->kevent, fd, EVFILT_WRITE, EV_ADD, 0, 0, NULL); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ return APR_ENOMEM; -+ } -+ } -+ -+#elif defined(HAVE_EPOLL) -+ ev.events = get_epoll_event(descriptor->reqevents); -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ ev.data.fd = descriptor->desc.s->socketdes; -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, -+ descriptor->desc.s->socketdes, &ev); -+ } -+ else { -+ ev.data.fd = descriptor->desc.f->filedes; -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, -+ descriptor->desc.f->filedes, &ev); -+ } -+ if (0 != ret) { -+ return APR_EBADF; -+ } -+#elif defined(HAVE_POLL) -+ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ pollset->pollset[pollset->nelts].fd = descriptor->desc.s->socketdes; -+ } -+ else { -+ pollset->pollset[pollset->nelts].fd = descriptor->desc.f->filedes; -+ } -+ -+ pollset->pollset[pollset->nelts].events = get_event(descriptor->reqevents); -+#else -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+#ifdef NETWARE -+ /* NetWare can't handle mixed descriptor types in select() */ -+ if (HAS_PIPES(pollset->set_type)) { -+ return APR_EBADF; -+ } -+ else { -+ pollset->set_type = APR_POLL_SOCKET; -+ } -+#endif -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+#ifdef NETWARE -+ /* NetWare can't handle mixed descriptor types in select() */ -+ if (descriptor->desc.f->is_pipe && !HAS_SOCKETS(pollset->set_type)) { -+ pollset->set_type = APR_POLL_FILE; -+ fd = descriptor->desc.f->filedes; -+ } -+ else { -+ return APR_EBADF; -+ } -+#else -+ fd = descriptor->desc.f->filedes; -+#endif -+#endif -+ } -+#if !defined(WIN32) && !defined(NETWARE) /* socket sets handled with array of handles */ -+ if (fd >= FD_SETSIZE) { -+ /* XXX invent new error code so application has a clue */ -+ return APR_EBADF; -+ } -+#endif -+ if (descriptor->reqevents & APR_POLLIN) { -+ FD_SET(fd, &(pollset->readset)); -+ } -+ if (descriptor->reqevents & APR_POLLOUT) { -+ FD_SET(fd, &(pollset->writeset)); -+ } -+ if (descriptor->reqevents & -+ (APR_POLLPRI | APR_POLLERR | APR_POLLHUP | APR_POLLNVAL)) { -+ FD_SET(fd, &(pollset->exceptset)); -+ } -+ if ((int)fd > pollset->maxfd) { -+ pollset->maxfd = (int)fd; -+ } -+#endif -+ pollset->nelts++; -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor) -+{ -+ apr_uint32_t i; -+#ifdef HAVE_KQUEUE -+ apr_os_sock_t fd; -+#elif defined(HAVE_EPOLL) -+ struct epoll_event ev; -+ int ret = -1; -+#elif !defined(HAVE_POLL) -+ apr_os_sock_t fd; -+#endif -+ -+#ifdef HAVE_KQUEUE -+ for (i = 0; i < pollset->nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ /* Found an instance of the fd: remove this and any other copies */ -+ apr_uint32_t dst = i; -+ apr_uint32_t old_nelts = pollset->nelts; -+ pollset->nelts--; -+ for (i++; i < old_nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ pollset->nelts--; -+ } -+ else { -+ pollset->query_set[dst] = pollset->query_set[i]; -+ dst++; -+ } -+ } -+ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+ fd = descriptor->desc.f->filedes; -+ } -+ -+ if (descriptor->reqevents & APR_POLLIN) { -+ EV_SET(&pollset->kevent, fd, -+ EVFILT_READ, EV_DELETE, 0, 0, NULL); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ return APR_EBADF; -+ } -+ } -+ -+ if (descriptor->reqevents & APR_POLLOUT) { -+ EV_SET(&pollset->kevent, fd, -+ EVFILT_WRITE, EV_DELETE, 0, 0, NULL); -+ -+ if (kevent(pollset->kqueue_fd, &pollset->kevent, 1, NULL, 0, -+ NULL) == -1) { -+ return APR_EBADF; -+ } -+ } -+ -+ return APR_SUCCESS; -+ } -+ } -+#elif defined(HAVE_EPOLL) -+ for (i = 0; i < pollset->nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ /* Found an instance of the fd: remove this and any other copies */ -+ apr_uint32_t dst = i; -+ apr_uint32_t old_nelts = pollset->nelts; -+ pollset->nelts--; -+ for (i++; i < old_nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ pollset->nelts--; -+ } -+ else { -+ pollset->query_set[dst] = pollset->query_set[i]; -+ dst++; -+ } -+ } -+ ev.events = get_epoll_event(descriptor->reqevents); -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ ev.data.fd = descriptor->desc.s->socketdes; -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, -+ descriptor->desc.s->socketdes, &ev); -+ } -+ else { -+ ev.data.fd = descriptor->desc.f->filedes; -+ ret = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_DEL, -+ descriptor->desc.f->filedes, &ev); -+ } -+ if (ret < 0) { -+ return APR_EBADF; -+ } -+ -+ return APR_SUCCESS; -+ } -+ } -+#elif defined(HAVE_POLL) -+ for (i = 0; i < pollset->nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ /* Found an instance of the fd: remove this and any other copies */ -+ apr_uint32_t dst = i; -+ apr_uint32_t old_nelts = pollset->nelts; -+ pollset->nelts--; -+ for (i++; i < old_nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ pollset->nelts--; -+ } -+ else { -+ pollset->pollset[dst] = pollset->pollset[i]; -+ pollset->query_set[dst] = pollset->query_set[i]; -+ dst++; -+ } -+ } -+ return APR_SUCCESS; -+ } -+ } -+ -+#else /* no poll */ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+ fd = descriptor->desc.f->filedes; -+#endif -+ } -+ -+ for (i = 0; i < pollset->nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ /* Found an instance of the fd: remove this and any other copies */ -+ apr_uint32_t dst = i; -+ apr_uint32_t old_nelts = pollset->nelts; -+ pollset->nelts--; -+ for (i++; i < old_nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ pollset->nelts--; -+ } -+ else { -+ pollset->query_set[dst] = pollset->query_set[i]; -+ dst++; -+ } -+ } -+ FD_CLR(fd, &(pollset->readset)); -+ FD_CLR(fd, &(pollset->writeset)); -+ FD_CLR(fd, &(pollset->exceptset)); -+ if (((int)fd == pollset->maxfd) && (pollset->maxfd > 0)) { -+ pollset->maxfd--; -+ } -+ return APR_SUCCESS; -+ } -+ } -+#endif /* no poll */ -+ -+ return APR_NOTFOUND; -+} -+#ifdef HAVE_KQUEUE -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors) -+{ -+ int rv; -+ apr_uint32_t i, j, r = 0; -+ struct timespec tv, *tvptr; -+ -+ if (timeout < 0) { -+ tvptr = NULL; -+ } -+ else { -+ tv.tv_sec = (long)apr_time_sec(timeout); -+ tv.tv_nsec = (long)apr_time_msec(timeout); -+ tvptr = &tv; -+ } -+ -+ rv = kevent(pollset->kqueue_fd, NULL, 0, pollset->ke_set, pollset->nelts, -+ tvptr); -+ (*num) = rv; -+ if (rv < 0) { -+ return apr_get_netos_error(); -+ } -+ if (rv == 0) { -+ return APR_TIMEUP; -+ } -+ -+ /* TODO: Is there a better way to re-associate our data? */ -+ for (i = 0; i < pollset->nelts; i++) { -+ apr_os_sock_t fd; -+ if (pollset->query_set[i].desc_type == APR_POLL_SOCKET) { -+ fd = pollset->query_set[i].desc.s->socketdes; -+ } -+ else { -+ fd = pollset->query_set[i].desc.f->filedes; -+ } -+ for (j = 0; j < rv; j++) { -+ if (pollset->ke_set[j].ident == fd ) { -+ pollset->result_set[r] = pollset->query_set[i]; -+ pollset->result_set[r].rtnevents = -+ get_kqueue_revent(pollset->ke_set[j].filter, -+ pollset->ke_set[j].flags); -+ r++; -+ } -+ } -+ } -+ -+ (*num) = r; -+ -+ if (descriptors) { -+ *descriptors = pollset->result_set; -+ } -+ -+ return APR_SUCCESS; -+} -+ -+#elif defined(HAVE_EPOLL) -+ -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors) -+{ -+ int rv; -+ apr_uint32_t i, j, k; -+ -+ if (timeout > 0) { -+ timeout /= 1000; -+ } -+ -+ rv = epoll_wait(pollset->epoll_fd, pollset->pollset, pollset->nelts, -+ timeout); -+ (*num) = rv; -+ if (rv < 0) { -+ return apr_get_netos_error(); -+ } -+ if (rv == 0) { -+ return APR_TIMEUP; -+ } -+ j = 0; -+ for (i = 0; i < pollset->nelts; i++) { -+ if (pollset->pollset[i].events != 0) { -+ /* TODO: Is there a better way to re-associate our data? */ -+ for (k = 0; k < pollset->nelts; k++) { -+ if (pollset->query_set[k].desc_type == APR_POLL_SOCKET && -+ pollset->query_set[k].desc.s->socketdes == -+ pollset->pollset[i].data.fd) { -+ pollset->result_set[j] = pollset->query_set[k]; -+ pollset->result_set[j].rtnevents = -+ get_epoll_revent(pollset->pollset[i].events); -+ j++; -+ break; -+ } -+ else if (pollset->query_set[k].desc_type == APR_POLL_FILE -+ && pollset->query_set[k].desc.f->filedes == -+ pollset->pollset[i].data.fd) { -+ pollset->result_set[j] = pollset->query_set[k]; -+ pollset->result_set[j].rtnevents = -+ get_epoll_revent(pollset->pollset[i].events); -+ j++; -+ break; -+ } -+ } -+ } -+ } -+ if (descriptors) { -+ *descriptors = pollset->result_set; -+ } -+ return APR_SUCCESS; -+} -+#elif defined(HAVE_POLL) -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors) -+{ -+ int rv; -+ apr_uint32_t i, j; -+ -+ if (timeout > 0) { -+ timeout /= 1000; -+ } -+ rv = poll(pollset->pollset, pollset->nelts, timeout); -+ (*num) = rv; -+ if (rv < 0) { -+ return apr_get_netos_error(); -+ } -+ if (rv == 0) { -+ return APR_TIMEUP; -+ } -+ j = 0; -+ for (i = 0; i < pollset->nelts; i++) { -+ if (pollset->pollset[i].revents != 0) { -+ pollset->result_set[j] = pollset->query_set[i]; -+ pollset->result_set[j].rtnevents = -+ get_revent(pollset->pollset[i].revents); -+ j++; -+ } -+ } -+ if (descriptors) -+ *descriptors = pollset->result_set; -+ return APR_SUCCESS; -+} -+ -+#else /* no poll */ -+ -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors) -+{ -+ int rv; -+ apr_uint32_t i, j; -+ struct timeval tv, *tvptr; -+ fd_set readset, writeset, exceptset; -+ -+ if (timeout < 0) { -+ tvptr = NULL; -+ } -+ else { -+ tv.tv_sec = (long)apr_time_sec(timeout); -+ tv.tv_usec = (long)apr_time_usec(timeout); -+ tvptr = &tv; -+ } -+ -+ memcpy(&readset, &(pollset->readset), sizeof(fd_set)); -+ memcpy(&writeset, &(pollset->writeset), sizeof(fd_set)); -+ memcpy(&exceptset, &(pollset->exceptset), sizeof(fd_set)); -+ -+#ifdef NETWARE -+ if (HAS_PIPES(pollset->set_type)) { -+ rv = pipe_select(pollset->maxfd + 1, &readset, &writeset, &exceptset, tvptr); -+ } -+ else -+#endif -+ rv = select(pollset->maxfd + 1, &readset, &writeset, &exceptset, tvptr); -+ -+ (*num) = rv; -+ if (rv < 0) { -+ return apr_get_netos_error(); -+ } -+ if (rv == 0) { -+ return APR_TIMEUP; -+ } -+ j = 0; -+ for (i = 0; i < pollset->nelts; i++) { -+ apr_os_sock_t fd; -+ if (pollset->query_set[i].desc_type == APR_POLL_SOCKET) { -+ fd = pollset->query_set[i].desc.s->socketdes; -+ } -+ else { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+ fd = pollset->query_set[i].desc.f->filedes; -+#endif -+ } -+ if (FD_ISSET(fd, &readset) || FD_ISSET(fd, &writeset) || -+ FD_ISSET(fd, &exceptset)) { -+ pollset->result_set[j] = pollset->query_set[i]; -+ pollset->result_set[j].rtnevents = 0; -+ if (FD_ISSET(fd, &readset)) { -+ pollset->result_set[j].rtnevents |= APR_POLLIN; -+ } -+ if (FD_ISSET(fd, &writeset)) { -+ pollset->result_set[j].rtnevents |= APR_POLLOUT; -+ } -+ if (FD_ISSET(fd, &exceptset)) { -+ pollset->result_set[j].rtnevents |= APR_POLLERR; -+ } -+ j++; -+ } -+ } -+ -+ if (descriptors) -+ *descriptors = pollset->result_set; -+ return APR_SUCCESS; -+} -+ -+#endif /* no poll */ -diff -Nur srclib/apr.orig/poll/unix/select.c srclib/apr/poll/unix/select.c ---- srclib/apr.orig/poll/unix/select.c Thu Jan 1 01:00:00 1970 -+++ srclib/apr/poll/unix/select.c Mon Dec 13 18:57:28 2004 -@@ -0,0 +1,392 @@ -+/* Copyright 2000-2004 The Apache Software Foundation -+ * -+ * Licensed under the Apache License, Version 2.0 (the "License"); -+ * you may not use this file except in compliance with the License. -+ * You may obtain a copy of the License at -+ * -+ * http://www.apache.org/licenses/LICENSE-2.0 -+ * -+ * Unless required by applicable law or agreed to in writing, software -+ * distributed under the License is distributed on an "AS IS" BASIS, -+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -+ * See the License for the specific language governing permissions and -+ * limitations under the License. -+ */ -+ -+#include "apr_arch_poll_private.h" -+ -+#ifdef POLL_USES_SELECT -+ -+APR_DECLARE(apr_status_t) apr_poll(apr_pollfd_t *aprset, int num, -+ apr_int32_t *nsds, -+ apr_interval_time_t timeout) -+{ -+ fd_set readset, writeset, exceptset; -+ int rv, i; -+ int maxfd = -1; -+ struct timeval tv, *tvptr; -+#ifdef NETWARE -+ apr_datatype_e set_type = APR_NO_DESC; -+#endif -+ -+ if (timeout < 0) { -+ tvptr = NULL; -+ } -+ else { -+ tv.tv_sec = (long) apr_time_sec(timeout); -+ tv.tv_usec = (long) apr_time_usec(timeout); -+ tvptr = &tv; -+ } -+ -+ FD_ZERO(&readset); -+ FD_ZERO(&writeset); -+ FD_ZERO(&exceptset); -+ -+ for (i = 0; i < num; i++) { -+ apr_os_sock_t fd; -+ -+ aprset[i].rtnevents = 0; -+ -+ if (aprset[i].desc_type == APR_POLL_SOCKET) { -+#ifdef NETWARE -+ if (HAS_PIPES(set_type)) { -+ return APR_EBADF; -+ } -+ else { -+ set_type = APR_POLL_SOCKET; -+ } -+#endif -+ fd = aprset[i].desc.s->socketdes; -+ } -+ else if (aprset[i].desc_type == APR_POLL_FILE) { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+#ifdef NETWARE -+ if (aprset[i].desc.f->is_pipe && !HAS_SOCKETS(set_type)) { -+ set_type = APR_POLL_FILE; -+ } -+ else -+ return APR_EBADF; -+#endif /* NETWARE */ -+ -+ fd = aprset[i].desc.f->filedes; -+ -+#endif /* APR_FILES_AS_SOCKETS */ -+ } -+ else { -+ break; -+ } -+#if !defined(WIN32) && !defined(NETWARE) /* socket sets handled with array of handles */ -+ if (fd >= FD_SETSIZE) { -+ /* XXX invent new error code so application has a clue */ -+ return APR_EBADF; -+ } -+#endif -+ if (aprset[i].reqevents & APR_POLLIN) { -+ FD_SET(fd, &readset); -+ } -+ if (aprset[i].reqevents & APR_POLLOUT) { -+ FD_SET(fd, &writeset); -+ } -+ if (aprset[i].reqevents & -+ (APR_POLLPRI | APR_POLLERR | APR_POLLHUP | APR_POLLNVAL)) { -+ FD_SET(fd, &exceptset); -+ } -+ if ((int) fd > maxfd) { -+ maxfd = (int) fd; -+ } -+ } -+ -+#ifdef NETWARE -+ if (HAS_PIPES(set_type)) { -+ rv = pipe_select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); -+ } -+ else { -+#endif -+ -+ rv = select(maxfd + 1, &readset, &writeset, &exceptset, tvptr); -+ -+#ifdef NETWARE -+ } -+#endif -+ -+ (*nsds) = rv; -+ if ((*nsds) == 0) { -+ return APR_TIMEUP; -+ } -+ if ((*nsds) < 0) { -+ return apr_get_netos_error(); -+ } -+ -+ for (i = 0; i < num; i++) { -+ apr_os_sock_t fd; -+ -+ if (aprset[i].desc_type == APR_POLL_SOCKET) { -+ fd = aprset[i].desc.s->socketdes; -+ } -+ else if (aprset[i].desc_type == APR_POLL_FILE) { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+ fd = aprset[i].desc.f->filedes; -+#endif -+ } -+ else { -+ break; -+ } -+ if (FD_ISSET(fd, &readset)) { -+ aprset[i].rtnevents |= APR_POLLIN; -+ } -+ if (FD_ISSET(fd, &writeset)) { -+ aprset[i].rtnevents |= APR_POLLOUT; -+ } -+ if (FD_ISSET(fd, &exceptset)) { -+ aprset[i].rtnevents |= APR_POLLERR; -+ } -+ } -+ -+ return APR_SUCCESS; -+} -+ -+#endif /* POLL_USES_SELECT */ -+ -+#ifdef POLLSET_USES_SELECT -+ -+struct apr_pollset_t -+{ -+ apr_pool_t *pool; -+ -+ apr_uint32_t nelts; -+ apr_uint32_t nalloc; -+ fd_set readset, writeset, exceptset; -+ int maxfd; -+ apr_pollfd_t *query_set; -+ apr_pollfd_t *result_set; -+#ifdef NETWARE -+ int set_type; -+#endif -+}; -+ -+APR_DECLARE(apr_status_t) apr_pollset_create(apr_pollset_t **pollset, -+ apr_uint32_t size, -+ apr_pool_t *p, -+ apr_uint32_t flags) -+{ -+ if (flags & APR_POLLSET_THREADSAFE) { -+ *pollset = NULL; -+ return APR_ENOTIMPL; -+ } -+#ifdef FD_SETSIZE -+ if (size > FD_SETSIZE) { -+ *pollset = NULL; -+ return APR_EINVAL; -+ } -+#endif -+ *pollset = apr_palloc(p, sizeof(**pollset)); -+ (*pollset)->nelts = 0; -+ (*pollset)->nalloc = size; -+ (*pollset)->pool = p; -+ FD_ZERO(&((*pollset)->readset)); -+ FD_ZERO(&((*pollset)->writeset)); -+ FD_ZERO(&((*pollset)->exceptset)); -+ (*pollset)->maxfd = 0; -+#ifdef NETWARE -+ (*pollset)->set_type = APR_NO_DESC; -+#endif -+ (*pollset)->query_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); -+ (*pollset)->result_set = apr_palloc(p, size * sizeof(apr_pollfd_t)); -+ -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_destroy(apr_pollset_t * pollset) -+{ -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_add(apr_pollset_t *pollset, -+ const apr_pollfd_t *descriptor) -+{ -+ apr_os_sock_t fd; -+ -+ if (pollset->nelts == pollset->nalloc) { -+ return APR_ENOMEM; -+ } -+ -+ pollset->query_set[pollset->nelts] = *descriptor; -+ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+#ifdef NETWARE -+ /* NetWare can't handle mixed descriptor types in select() */ -+ if (HAS_PIPES(pollset->set_type)) { -+ return APR_EBADF; -+ } -+ else { -+ pollset->set_type = APR_POLL_SOCKET; -+ } -+#endif -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+#ifdef NETWARE -+ /* NetWare can't handle mixed descriptor types in select() */ -+ if (descriptor->desc.f->is_pipe && !HAS_SOCKETS(pollset->set_type)) { -+ pollset->set_type = APR_POLL_FILE; -+ fd = descriptor->desc.f->filedes; -+ } -+ else { -+ return APR_EBADF; -+ } -+#else -+ fd = descriptor->desc.f->filedes; -+#endif -+#endif -+ } -+#if !defined(WIN32) && !defined(NETWARE) /* socket sets handled with array of handles */ -+ if (fd >= FD_SETSIZE) { -+ /* XXX invent new error code so application has a clue */ -+ return APR_EBADF; -+ } -+#endif -+ if (descriptor->reqevents & APR_POLLIN) { -+ FD_SET(fd, &(pollset->readset)); -+ } -+ if (descriptor->reqevents & APR_POLLOUT) { -+ FD_SET(fd, &(pollset->writeset)); -+ } -+ if (descriptor->reqevents & -+ (APR_POLLPRI | APR_POLLERR | APR_POLLHUP | APR_POLLNVAL)) { -+ FD_SET(fd, &(pollset->exceptset)); -+ } -+ if ((int) fd > pollset->maxfd) { -+ pollset->maxfd = (int) fd; -+ } -+ pollset->nelts++; -+ return APR_SUCCESS; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_remove(apr_pollset_t * pollset, -+ const apr_pollfd_t * descriptor) -+{ -+ apr_uint32_t i; -+ apr_os_sock_t fd; -+ -+ if (descriptor->desc_type == APR_POLL_SOCKET) { -+ fd = descriptor->desc.s->socketdes; -+ } -+ else { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+ fd = descriptor->desc.f->filedes; -+#endif -+ } -+ -+ for (i = 0; i < pollset->nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ /* Found an instance of the fd: remove this and any other copies */ -+ apr_uint32_t dst = i; -+ apr_uint32_t old_nelts = pollset->nelts; -+ pollset->nelts--; -+ for (i++; i < old_nelts; i++) { -+ if (descriptor->desc.s == pollset->query_set[i].desc.s) { -+ pollset->nelts--; -+ } -+ else { -+ pollset->query_set[dst] = pollset->query_set[i]; -+ dst++; -+ } -+ } -+ FD_CLR(fd, &(pollset->readset)); -+ FD_CLR(fd, &(pollset->writeset)); -+ FD_CLR(fd, &(pollset->exceptset)); -+ if (((int) fd == pollset->maxfd) && (pollset->maxfd > 0)) { -+ pollset->maxfd--; -+ } -+ return APR_SUCCESS; -+ } -+ } -+ -+ return APR_NOTFOUND; -+} -+ -+APR_DECLARE(apr_status_t) apr_pollset_poll(apr_pollset_t *pollset, -+ apr_interval_time_t timeout, -+ apr_int32_t *num, -+ const apr_pollfd_t **descriptors) -+{ -+ int rv; -+ apr_uint32_t i, j; -+ struct timeval tv, *tvptr; -+ fd_set readset, writeset, exceptset; -+ -+ if (timeout < 0) { -+ tvptr = NULL; -+ } -+ else { -+ tv.tv_sec = (long) apr_time_sec(timeout); -+ tv.tv_usec = (long) apr_time_usec(timeout); -+ tvptr = &tv; -+ } -+ -+ memcpy(&readset, &(pollset->readset), sizeof(fd_set)); -+ memcpy(&writeset, &(pollset->writeset), sizeof(fd_set)); -+ memcpy(&exceptset, &(pollset->exceptset), sizeof(fd_set)); -+ -+#ifdef NETWARE -+ if (HAS_PIPES(pollset->set_type)) { -+ rv = pipe_select(pollset->maxfd + 1, &readset, &writeset, &exceptset, -+ tvptr); -+ } -+ else -+#endif -+ rv = select(pollset->maxfd + 1, &readset, &writeset, &exceptset, -+ tvptr); -+ -+ (*num) = rv; -+ if (rv < 0) { -+ return apr_get_netos_error(); -+ } -+ if (rv == 0) { -+ return APR_TIMEUP; -+ } -+ j = 0; -+ for (i = 0; i < pollset->nelts; i++) { -+ apr_os_sock_t fd; -+ if (pollset->query_set[i].desc_type == APR_POLL_SOCKET) { -+ fd = pollset->query_set[i].desc.s->socketdes; -+ } -+ else { -+#if !APR_FILES_AS_SOCKETS -+ return APR_EBADF; -+#else -+ fd = pollset->query_set[i].desc.f->filedes; -+#endif -+ } -+ if (FD_ISSET(fd, &readset) || FD_ISSET(fd, &writeset) || -+ FD_ISSET(fd, &exceptset)) { -+ pollset->result_set[j] = pollset->query_set[i]; -+ pollset->result_set[j].rtnevents = 0; -+ if (FD_ISSET(fd, &readset)) { -+ pollset->result_set[j].rtnevents |= APR_POLLIN; -+ } -+ if (FD_ISSET(fd, &writeset)) { -+ pollset->result_set[j].rtnevents |= APR_POLLOUT; -+ } -+ if (FD_ISSET(fd, &exceptset)) { -+ pollset->result_set[j].rtnevents |= APR_POLLERR; -+ } -+ j++; -+ } -+ } -+ -+ if (descriptors) -+ *descriptors = pollset->result_set; -+ return APR_SUCCESS; -+} -+ -+#endif /* POLLSET_USES_SELECT */ diff --git a/www/apache22/files/exp-windowsupdate.patch b/www/apache22/files/exp-windowsupdate.patch deleted file mode 100644 index 3f1306777100..000000000000 --- a/www/apache22/files/exp-windowsupdate.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- server/protocol.c.orig Tue Jun 29 08:21:28 2004 -+++ server/protocol.c Tue Jun 29 08:21:50 2004 -@@ -1248,7 +1248,7 @@ - * We can only set a C-L in the response header if we haven't already - * sent any buckets on to the next output filter for this request. - */ -- if (ctx->data_sent == 0 && eos) { -+ if (ctx->data_sent == 0 && eos && !r->header_only) { - ap_set_content_length(r, r->bytes_sent); - } - diff --git a/www/apache22/files/patch-Makefile.in b/www/apache22/files/patch-Makefile.in deleted file mode 100644 index 382e3f0cbc5f..000000000000 --- a/www/apache22/files/patch-Makefile.in +++ /dev/null @@ -1,152 +0,0 @@ ---- Makefile.in.orig Thu Dec 2 08:34:20 2004 -+++ Makefile.in Sat Dec 18 11:51:59 2004 -@@ -31,15 +31,22 @@ - if [ ! -d $(DESTDIR)$(sysconfdir) ]; then \ - $(MKINSTALLDIRS) $(DESTDIR)$(sysconfdir) ; \ - fi ; \ -+ if [ ! -d $(DESTDIR)$(EXAMPLESDIR) ]; then \ -+ $(MKINSTALLDIRS) $(DESTDIR)$(EXAMPLESDIR) ; \ -+ fi ; \ - cd $(top_srcdir)/docs/conf; \ - for i in mime.types magic; do \ - if test ! -f $(DESTDIR)$(sysconfdir)/$$i; then \ - $(INSTALL_DATA) $$i $(DESTDIR)$(sysconfdir); \ - fi; \ -+ cp -f $$i $$i-dist; \ -+ $(INSTALL_DATA) $$i-dist $(DESTDIR)$(EXAMPLESDIR); \ - done; \ - for j in $(top_srcdir)/docs/conf $(top_builddir)/docs/conf ; do \ - cd $$j ; \ -+ [ -f `echo "$$i"|sed 's,\.in$$,_nonex,g'` ] || continue; \ - for i in *-std*.conf; do \ -+ [ -f `echo "$$i"|sed 's,\.in$$,_nonex,g'` ] || continue; \ - ( \ - n_lm=`awk 'BEGIN {n=0} /@@LoadModule@@/ {n+=1} END {print n}' < $$i`; \ - if test $$n_lm -eq 0 -o "x$(DSO_MODULES)" = "x"; then \ -@@ -57,6 +64,9 @@ - if test "x$$j" = "xssl"; then \ - echo "<IfDefine SSL>"; \ - fi; \ -+ if [ `echo "$$j" | egrep 'cgid|cache|dav|digest|proxy'` ]; then \ -+ echo -n "#"; \ -+ fi; \ - if test $$j != "^EOL^"; then \ - echo "LoadModule $${j}_module $(rel_libexecdir)/mod_$${j}.so"; \ - fi; \ -@@ -70,23 +80,18 @@ - -e 's#@@Port@@#$(PORT)#g' \ - < $$i; \ - fi \ -- ) > $(DESTDIR)$(sysconfdir)/$$i; \ -- chmod 0644 $(DESTDIR)$(sysconfdir)/$$i; \ -- file=`echo $$i|sed s/-std//`; \ -+ ) > $(DESTDIR)$(EXAMPLESDIR)/$$i; \ -+ chmod 0644 $(DESTDIR)$(EXAMPLESDIR)/$$i; \ -+ chmod 0644 $(DESTDIR)$(EXAMPLESDIR)/$$i; \ -+ file=`echo $$i|sed s/-std//`; \ - if [ "$$file" = "httpd.conf" ]; then \ - file=`echo $$file|sed s/.*.conf/$(PROGRAM_NAME).conf/`; \ - fi; \ - if test "$$file" != "$$i" && test ! -f $(DESTDIR)$(sysconfdir)/$$file; then \ -- $(INSTALL_DATA) $(DESTDIR)$(sysconfdir)/$$i $(DESTDIR)$(sysconfdir)/$$file; \ -+ $(INSTALL_DATA) $(DESTDIR)$(EXAMPLESDIR)/$$i $(DESTDIR)$(sysconfdir)/$$file; \ - fi; \ - done ; \ -- done ; \ -- if test -f "$(builddir)/envvars-std"; then \ -- cp -p envvars-std $(DESTDIR)$(sbindir); \ -- if test ! -f $(DESTDIR)$(sbindir)/envvars; then \ -- cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \ -- fi ; \ -- fi -+ done ; - - install-build: - @echo Installing build system files -@@ -108,44 +113,40 @@ - doxygen $(top_srcdir)/docs/doxygen.conf - - install-htdocs: -- -@if [ -d $(DESTDIR)$(htdocsdir) ]; then \ -- echo "[PRESERVING EXISTING HTDOCS SUBDIR: $(DESTDIR)$(htdocsdir)]"; \ -- else \ -- echo Installing HTML documents ; \ -- $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \ -- test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR)$(htdocsdir)) ; \ -- cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ -- fi -+.if !defined(NO_WWWDATA) -+ @echo Installing HTML documents -+ @test -d $(DESTDIR)$(htdocsdir)-dist || $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir)-dist -+ @test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * $(DESTDIR) $(htdocsdir)-dist) -+ @test -e $(DESTDIR)$(htdocsdir) || ln -sf $(DESTDIR)$(htdocsdir)-dist $(DESTDIR)$(htdocsdir) -+ -@test "x$(htdocsdir)" != "x" && cd $(DESTDIR)$(htdocsdir)-dist && find . -name "CVS" -print | xargs rm -rf -+.endif - - install-error: -- -@if [ -d $(DESTDIR)$(errordir) ]; then \ -- echo "[PRESERVING EXISTING ERROR SUBDIR: $(DESTDIR)$(errordir)]"; \ -- else \ -- echo Installing error documents ; \ -- $(MKINSTALLDIRS) $(DESTDIR)$(errordir) ; \ -- cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir) ; \ -- test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ -- fi -+.if !defined(NO_ERROR) -+ @echo Installing error documents -+ @test -d $(DESTDIR)$(errordir)-dist || $(MKINSTALLDIRS) $(DESTDIR)$(errordir)-dist -+ cd $(top_srcdir)/docs/error && cp -rp * $(DESTDIR)$(errordir)-dist -+ -@test "x$(errordir)" != "x" && cd $(DESTDIR)$(errordir)-dist && find . -name "CVS" -print | xargs rm -rf -+ @test -e $(DESTDIR)$(errordir) || ln -sf $(DESTDIR)$(errordir)-dist $(DESTDIR)$(errordir) -+.endif - - install-icons: -- -@if [ -d $(DESTDIR)$(iconsdir) ]; then \ -- echo "[PRESERVING EXISTING ICONS SUBDIR: $(DESTDIR)$(iconsdir)]"; \ -- else \ -- echo Installing icons ; \ -- $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir) ; \ -- cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir) ; \ -- test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ -- fi -+.if !defined(NO_ICONS) -+ @echo Installing icons -+ @test -d $(DESTDIR)$(iconsdir)-dist || $(MKINSTALLDIRS) $(DESTDIR)$(iconsdir)-dist -+ cd $(top_srcdir)/docs/icons && cp -rp * $(DESTDIR)$(iconsdir)-dist -+ -@test "x$(iconsdir)" != "x" && cd $(DESTDIR)$(iconsdir)-dist && find . -name "CVS" -print | xargs rm -rf -+ @test -e $(DESTDIR)$(iconsdir) || ln -sf $(DESTDIR)$(iconsdir)-dist $(DESTDIR)$(iconsdir) -+.endif - - install-cgi: -- -@if [ -d $(DESTDIR)$(cgidir) ];then \ -- echo "[PRESERVING EXISTING CGI SUBDIR: $(DESTDIR)$(cgidir)]"; \ -- else \ -- echo Installing CGIs ; \ -- $(MKINSTALLDIRS) $(DESTDIR)$(cgidir) ; \ -- cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir) ; \ -- test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null || true; \ -- fi -+.if !defined(NO_CGI) -+ @echo Installing CGIs -+ @test -d $(DESTDIR)$(cgidir)-dist || $(MKINSTALLDIRS) $(DESTDIR)$(cgidir)-dist -+ cd $(top_srcdir)/docs/cgi-examples && cp -rp * $(DESTDIR)$(cgidir)-dist -+ -@test "x$(cgidir)" != "x" && cd $(DESTDIR)$(cgidir)-dist && find . -name "CVS" -print | xargs rm -rf -+ @test -e $(DESTDIR)$(cgidir) || ln -sf $(DESTDIR)$(cgidir)-dist $(DESTDIR)$(cgidir) -+.endif - - install-other: - @test -d $(DESTDIR)$(logfiledir) || $(MKINSTALLDIRS) $(DESTDIR)$(logfiledir) -@@ -189,11 +190,13 @@ - @test -d $(DESTDIR)$(mandir) || $(MKINSTALLDIRS) $(DESTDIR)$(mandir) - @test -d $(DESTDIR)$(mandir)/man1 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man1 - @test -d $(DESTDIR)$(mandir)/man8 || $(MKINSTALLDIRS) $(DESTDIR)$(mandir)/man8 -+.if !defined(NOPORTDOCS) - @test -d $(DESTDIR)$(manualdir) || $(MKINSTALLDIRS) $(DESTDIR)$(manualdir) - @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1 - @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8 - @(cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir)) - @(cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | xargs rm -rf 2>/dev/null ) || true -+.endif - - install-suexec: - @if test -f $(builddir)/support/suexec; then \ diff --git a/www/apache22/files/patch-config.layout b/www/apache22/files/patch-config.layout deleted file mode 100644 index 3724aa43c9a4..000000000000 --- a/www/apache22/files/patch-config.layout +++ /dev/null @@ -1,25 +0,0 @@ ---- config.layout.orig Sun Nov 21 19:50:36 2004 -+++ config.layout Sat Dec 11 17:56:14 2004 -@@ -281,17 +281,17 @@ - bindir: ${exec_prefix}/bin - sbindir: ${exec_prefix}/sbin - libdir: ${exec_prefix}/lib -- libexecdir: ${exec_prefix}/libexec/apache2 -+ libexecdir: ${exec_prefix}/libexec/apache21 - mandir: ${prefix}/man -- sysconfdir: ${prefix}/etc/apache2 -+ sysconfdir: ${prefix}/etc/apache21 - datadir: ${prefix}/www -- installbuilddir: ${prefix}/share/apache2/build -+ installbuilddir: ${prefix}/share/apache21/build - errordir: ${datadir}/error - iconsdir: ${datadir}/icons - htdocsdir: ${datadir}/data -- manualdir: ${prefix}/share/doc/apache2 -+ manualdir: ${prefix}/share/doc/apache21 - cgidir: ${datadir}/cgi-bin -- includedir: ${prefix}/include/apache2 -+ includedir: ${prefix}/include/apache21 - localstatedir: /var - runtimedir: ${localstatedir}/run - logfiledir: ${localstatedir}/log diff --git a/www/apache22/files/patch-configure.in b/www/apache22/files/patch-configure.in deleted file mode 100644 index e36f5d9ac795..000000000000 --- a/www/apache22/files/patch-configure.in +++ /dev/null @@ -1,35 +0,0 @@ ---- configure.in.orig Sun Nov 21 19:50:36 2004 -+++ configure.in Mon Dec 13 10:43:16 2004 -@@ -69,7 +69,7 @@ - - if test "$apr_found" = "reconfig"; then - APR_SUBDIR_CONFIG(srclib/apr, -- [$apache_apr_flags --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir --datadir=$datadir --with-installbuilddir=$installbuilddir], -+ [$apache_apr_flags --prefix=$prefix], - [--enable-layout=*|\'--enable-layout=*]) - dnl We must be the first to build and the last to be cleaned - AP_BUILD_SRCLIB_DIRS="apr $AP_BUILD_SRCLIB_DIRS" -@@ -97,7 +97,7 @@ - - if test "$apu_found" = "reconfig"; then - APR_SUBDIR_CONFIG(srclib/apr-util, -- [--with-apr=../apr --prefix=$prefix --exec-prefix=$exec_prefix --libdir=$libdir --includedir=$includedir --bindir=$bindir], -+ [--with-apr=../apr --prefix=$prefix], - [--enable-layout=*|\'--enable-layout=*]) - dnl We must be the last to build and the first to be cleaned - AP_BUILD_SRCLIB_DIRS="$AP_BUILD_SRCLIB_DIRS apr-util" -@@ -549,8 +549,14 @@ - [Root directory of the Apache install area]) - AC_DEFINE_UNQUOTED(SERVER_CONFIG_FILE, "${rel_sysconfdir}/${progname}.conf", - [Location of the config file, relative to the Apache root directory]) -+AC_DEFINE_UNQUOTED(DEFAULT_ERRORLOG, "${rel_logfiledir}/httpd-error.log", -+ [Location of error log file]) -+AC_DEFINE_UNQUOTED(DEFAULT_SCOREBOARD, "${rel_runtimedir}/apache_runtime_status", -+ [Location of ScoreBoard file]) - AC_DEFINE_UNQUOTED(AP_TYPES_CONFIG_FILE, "${rel_sysconfdir}/mime.types", - [Location of the MIME types config file, relative to the Apache root directory]) -+AC_DEFINE_UNQUOTED(DOCUMENT_LOCATION, "${rel_htdocsdir}", -+ [Location of document root]) - AC_DEFINE_UNQUOTED(APACHE_MPM_DIR, "$MPM_DIR", - [Location of the source for the current MPM]) - diff --git a/www/apache22/files/patch-docs:conf:httpd-std.conf.in b/www/apache22/files/patch-docs:conf:httpd-std.conf.in deleted file mode 100644 index 150c922152f7..000000000000 --- a/www/apache22/files/patch-docs:conf:httpd-std.conf.in +++ /dev/null @@ -1,94 +0,0 @@ ---- docs/conf/httpd-std.conf.in.orig Sat Nov 20 21:16:24 2004 -+++ docs/conf/httpd-std.conf.in Sat Dec 11 16:49:35 2004 -@@ -68,7 +68,7 @@ - # - #<IfModule !mpm_netware.c> - #<IfModule !perchild.c> --#ScoreBoardFile @rel_logfiledir@/apache_runtime_status -+#ScoreBoardFile @rel_runtimedir@/apache_runtime_status - #</IfModule> - #</IfModule> - -@@ -264,8 +264,8 @@ - # when the value of (unsigned)Group is above 60000; - # don't use Group #-1 on these systems! - # --User nobody --Group #-1 -+User %%WWWOWN%% -+Group %%WWWGRP%% - </IfModule> - </IfModule> - -@@ -315,7 +315,6 @@ - # features. - # - <Directory /> -- Options FollowSymLinks - AllowOverride None - Order deny,allow - Deny from all -@@ -369,6 +368,23 @@ - # - <IfModule mod_userdir.c> - UserDir public_html -+ UserDir disabled %%FTPUSERS%% -+# -+# Control access to UserDir directories. The following is an example -+# for a site where these directories are restricted to read-only. -+# -+ <Directory /home/*/public_html> -+ AllowOverride FileInfo AuthConfig Limit Indexes -+ Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec -+ <Limit GET POST OPTIONS PROPFIND> -+ Order allow,deny -+ Allow from all -+ </Limit> -+ <LimitExcept GET POST OPTIONS PROPFIND> -+ Order deny,allow -+ Deny from all -+ </LimitExcept> -+ </Directory> - </IfModule> - - # -@@ -481,7 +497,7 @@ - # logged here. If you *do* define an error logfile for a <VirtualHost> - # container, that host's errors will be logged there and not here. - # --ErrorLog @rel_logfiledir@/error_log -+ErrorLog @rel_logfiledir@/httpd-error.log - - # - # LogLevel: Control the number of messages logged to the error_log. -@@ -510,20 +526,20 @@ - # define per-<VirtualHost> access logfiles, transactions will be - # logged therein and *not* in this file. - # -- CustomLog @rel_logfiledir@/access_log common -+ #CustomLog @rel_logfiledir@/httpd-access.log common - - # - # If you would like to have agent and referer logfiles, uncomment the - # following directives. - # -- #CustomLog @rel_logfiledir@/referer_log referer -- #CustomLog @rel_logfiledir@/agent_log agent -+ #CustomLog @rel_logfiledir@/httpd-referer.log referer -+ #CustomLog @rel_logfiledir@/httpd-agent.log agent - - # - # If you prefer a single logfile with access, agent, and referer information - # (Combined Logfile Format) you can use the following directive. - # -- #CustomLog @rel_logfiledir@/access_log combined -+ CustomLog @rel_logfiledir@/httpd-access.log combined - </IfModule> - - # -@@ -1082,3 +1098,5 @@ - # ErrorLog @rel_logfiledir@/dummy-host.example.com-error_log - # CustomLog @rel_logfiledir@/dummy-host.example.com-access_log common - #</VirtualHost> -+ -+Include @rel_sysconfdir@/Includes/*.conf diff --git a/www/apache22/files/patch-docs:conf:ssl-std.conf.in b/www/apache22/files/patch-docs:conf:ssl-std.conf.in deleted file mode 100644 index cf0bbeab218d..000000000000 --- a/www/apache22/files/patch-docs:conf:ssl-std.conf.in +++ /dev/null @@ -1,24 +0,0 @@ -$FreeBSD$ - ---- docs/conf/ssl-std.conf.in.orig Mon Oct 13 16:14:10 2003 -+++ docs/conf/ssl-std.conf.in Mon Oct 13 16:15:17 2003 -@@ -88,8 +88,8 @@ - DocumentRoot "@exp_htdocsdir@" - ServerName www.example.com:443 - ServerAdmin you@example.com --ErrorLog @exp_logfiledir@/error_log --TransferLog @exp_logfiledir@/access_log -+ErrorLog @exp_logfiledir@/httpd-error.log -+TransferLog @exp_logfiledir@/httpd-access.log - - # SSL Engine Switch: - # Enable/Disable SSL for this virtual host. -@@ -240,7 +240,7 @@ - # Per-Server Logging: - # The home of a custom SSL log file. Use this when you want a - # compact non-error SSL logfile on a virtual host basis. --CustomLog @exp_logfiledir@/ssl_request_log \ -+CustomLog @exp_logfiledir@/httpd-ssl_request.log \ - "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b" - - </VirtualHost> diff --git a/www/apache22/files/patch-modules:ssl:ssl_engine_io.c b/www/apache22/files/patch-modules:ssl:ssl_engine_io.c deleted file mode 100644 index 48681d53a393..000000000000 --- a/www/apache22/files/patch-modules:ssl:ssl_engine_io.c +++ /dev/null @@ -1,11 +0,0 @@ ---- modules/ssl/ssl_engine_io.c.orig Tue Dec 7 23:49:54 2004 -+++ modules/ssl/ssl_engine_io.c Sat Dec 18 11:56:00 2004 -@@ -155,7 +155,7 @@ - outctx->bb); - /* create new brigade ready for next time through */ - outctx->bb = apr_brigade_create(outctx->c->pool, outctx->c->bucket_alloc); -- return (outctx->rc == APR_SUCCESS) ? 1 : -1; -+ return (outctx->rc == APR_SUCCESS && !outctx->c->aborted) ? 1 : -1; - } - - static int bio_filter_create(BIO *bio) diff --git a/www/apache22/files/patch-srclib:apr-util:Makefile.in b/www/apache22/files/patch-srclib:apr-util:Makefile.in deleted file mode 100644 index 76805db43fcc..000000000000 --- a/www/apache22/files/patch-srclib:apr-util:Makefile.in +++ /dev/null @@ -1,15 +0,0 @@ ---- srclib/apr-util/Makefile.in.orig Wed Nov 17 02:12:20 2004 -+++ srclib/apr-util/Makefile.in Sat Dec 11 18:20:07 2004 -@@ -55,11 +55,10 @@ - sed 's,^\(location=\).*$$,\1installed,' < $(APU_CONFIG) > $@ - - install: $(TARGET_LIB) apu-config.out -- $(APR_MKDIR) $(DESTDIR)$(includedir) $(DESTDIR)$(libdir)/pkgconfig \ -+ $(APR_MKDIR) $(DESTDIR)$(includedir) \ - $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) - $(INSTALL_DATA) $(top_srcdir)/include/*.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) $(top_blddir)/include/*.h $(DESTDIR)$(includedir) -- $(INSTALL_DATA) apr-util.pc $(DESTDIR)$(libdir)/pkgconfig/$(APRUTIL_PCFILE) - list='$(INSTALL_SUBDIRS)'; for i in $$list; do \ - ( cd $$i ; $(MAKE) DESTDIR=$(DESTDIR) install ); \ - done diff --git a/www/apache22/files/patch-srclib:apr-util:config.layout b/www/apache22/files/patch-srclib:apr-util:config.layout deleted file mode 100644 index ad1f4e176a59..000000000000 --- a/www/apache22/files/patch-srclib:apr-util:config.layout +++ /dev/null @@ -1,11 +0,0 @@ ---- srclib/apr-util/config.layout.orig Thu Oct 2 16:29:48 2003 -+++ srclib/apr-util/config.layout Mon Dec 13 10:17:45 2004 -@@ -229,4 +229,8 @@ - infodir: ${exec_prefix}/share/info - libsuffix -${APRUTIL_MAJOR_VERSION} - installbuilddir: ${prefix}/usr/share/apache2/build -+ -+<Layout FreeBSD> -+ includedir: ${prefix}/include/apr-${APR_MAJOR_VERSION} -+ libsuffix: - </Layout> diff --git a/www/apache22/files/patch-srclib:apr-util:xml:expat:buildconf.sh b/www/apache22/files/patch-srclib:apr-util:xml:expat:buildconf.sh deleted file mode 100644 index c4922c1573b9..000000000000 --- a/www/apache22/files/patch-srclib:apr-util:xml:expat:buildconf.sh +++ /dev/null @@ -1,20 +0,0 @@ ---- srclib/apr-util/xml/expat/buildconf.sh.orig Wed Nov 17 02:12:20 2004 -+++ srclib/apr-util/xml/expat/buildconf.sh Sat Dec 11 17:04:11 2004 -@@ -3,7 +3,7 @@ - # - # Find libtoolize - # --libtoolize=`conftools/PrintPath glibtoolize libtoolize libtoolize15 libtoolize14` -+libtoolize=${LIBTOOLIZE} - if [ "x$libtoolize" = "x" ]; then - echo "libtoolize not found in path" - exit 1 -@@ -33,7 +33,7 @@ - ltfile=libtool.m4 - else - ltpath=`dirname $libtoolize` -- ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4} -+ ltfile=${LIBTOOL_M4-`cd $ltpath/../../share/aclocal ; pwd`/libtool${LIBTOOL_VERSION}.m4} - fi - echo "Incorporating $ltfile into aclocal.m4 ..." - echo "dnl THIS FILE IS AUTOMATICALLY GENERATED BY buildconf.sh" > aclocal.m4 diff --git a/www/apache22/files/patch-srclib:apr-utils:build:dbm.m4 b/www/apache22/files/patch-srclib:apr-utils:build:dbm.m4 deleted file mode 100644 index 78b4b2c57d59..000000000000 --- a/www/apache22/files/patch-srclib:apr-utils:build:dbm.m4 +++ /dev/null @@ -1,55 +0,0 @@ ---- srclib/apr-util/build/dbm.m4.orig Wed Nov 17 02:12:20 2004 -+++ srclib/apr-util/build/dbm.m4 Sat Dec 11 17:08:31 2004 -@@ -298,8 +298,8 @@ - fi - APU_CHECK_BERKELEY_DB(1, -1, -1, - "$places", -- "db_185.h", -- "db" -+ "db.h", -+ "c" - ) - if test "$apu_have_db" = "1"; then - apu_db_version=185 -@@ -341,7 +341,7 @@ - APU_CHECK_BERKELEY_DB(3, -1, -1, - "$places", - "db3/db.h db.h", -- "db3 db" -+ "db3" - ) - if test "$apu_have_db" = "1"; then - apu_db_version=3 -@@ -361,8 +361,8 @@ - fi - APU_CHECK_BERKELEY_DB("4", "0", "-1", - "$places", -- "db4/db.h db.h", -- "db-4.0 db4 db" -+ "db4/db.h", -+ "db4" - ) - if test "$apu_have_db" = "1"; then - apu_db_version=4 -@@ -382,8 +382,8 @@ - fi - APU_CHECK_BERKELEY_DB("4", "1", "-1", - "$places", -- "db41/db.h db4/db.h db.h", -- "db-4.1 db41 db4 db" -+ "db41/dh.h", -+ "db-41" - ) - if test "$apu_have_db" = "1"; then - apu_db_version=4 -@@ -403,8 +403,8 @@ - fi - APU_CHECK_BERKELEY_DB("4", "2", "-1", - "$places", -- "db42/db.h db4/db.h db.h", -- "db-4.2 db42 db4 db" -+ "db42/db.h", -+ "db-4.2" - ) - if test "$apu_have_db" = "1"; then - apu_db_version=4 diff --git a/www/apache22/files/patch-srclib:apr:Makefile.in b/www/apache22/files/patch-srclib:apr:Makefile.in deleted file mode 100644 index 4a9bbf0d3684..000000000000 --- a/www/apache22/files/patch-srclib:apr:Makefile.in +++ /dev/null @@ -1,16 +0,0 @@ ---- srclib/apr/Makefile.in.orig Wed Nov 17 02:07:02 2004 -+++ srclib/apr/Makefile.in Sat Dec 11 18:19:36 2004 -@@ -67,12 +67,11 @@ - - install: $(TARGET_LIB) apr-config.out build/apr_rules.out - $(APR_MKDIR) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) $(DESTDIR)$(installbuilddir) \ -- $(DESTDIR)$(libdir)/pkgconfig $(DESTDIR)$(includedir) -+ $(DESTDIR)$(includedir) - $(INSTALL_DATA) $(top_blddir)/include/apr.h $(DESTDIR)$(includedir) - $(INSTALL_DATA) $(top_srcdir)/include/apr_*.h $(DESTDIR)$(includedir) - $(LIBTOOL) --mode=install $(INSTALL) -m 755 $(TARGET_LIB) $(DESTDIR)$(libdir) - $(INSTALL_DATA) apr.exp $(DESTDIR)$(libdir)/apr.exp -- $(INSTALL_DATA) apr.pc $(DESTDIR)$(libdir)/pkgconfig/$(APR_PCFILE) - for f in libtool shlibtool; do \ - if test -f $${f}; then $(INSTALL) -m 755 $${f} $(DESTDIR)$(installbuilddir); fi; \ - done diff --git a/www/apache22/files/patch-srclib:apr:build:apr_hints.m4 b/www/apache22/files/patch-srclib:apr:build:apr_hints.m4 deleted file mode 100644 index 6a1445ddfb6d..000000000000 --- a/www/apache22/files/patch-srclib:apr:build:apr_hints.m4 +++ /dev/null @@ -1,16 +0,0 @@ ---- srclib/apr/build/apr_hints.m4.orig Wed Oct 27 11:12:28 2004 -+++ srclib/apr/build/apr_hints.m4 Wed Oct 27 11:25:32 2004 -@@ -137,11 +137,7 @@ - ;; - *-freebsd*) - APR_SETIFNULL(apr_lock_method, [USE_FLOCK_SERIALIZE]) -- if test -x /sbin/sysctl; then -- os_version=`/sbin/sysctl -n kern.osreldate` -- else -- os_version=000000 -- fi -+ os_version="%%OSVERSION%%" - # 502102 is when libc_r switched to libpthread (aka libkse). - if test $os_version -ge "502102"; then - apr_cv_pthreads_cflags="none" - diff --git a/www/apache22/files/patch-srclib:apr:build:buildcheck.sh b/www/apache22/files/patch-srclib:apr:build:buildcheck.sh deleted file mode 100644 index 1262a9422284..000000000000 --- a/www/apache22/files/patch-srclib:apr:build:buildcheck.sh +++ /dev/null @@ -1,11 +0,0 @@ ---- srclib/apr/build/buildcheck.sh.orig Sun Jun 6 23:19:19 2004 -+++ srclib/apr/build/buildcheck.sh Sat Dec 11 16:57:18 2004 -@@ -38,7 +38,7 @@ - # output is multiline from 1.5 onwards - - # Require libtool 1.3.3 or newer --libtool=`build/PrintPath glibtool libtool libtool15 libtool14` -+libtool=${LIBTOOL} - lt_pversion=`$libtool --version 2>/dev/null|sed -e 's/([^)]*)//g;s/^[^0-9]*//;s/[- ].*//g;q'` - if test -z "$lt_pversion"; then - echo "buildconf: libtool not found." diff --git a/www/apache22/files/patch-srclib:apr:buildconf b/www/apache22/files/patch-srclib:apr:buildconf deleted file mode 100644 index d3483efcc7eb..000000000000 --- a/www/apache22/files/patch-srclib:apr:buildconf +++ /dev/null @@ -1,29 +0,0 @@ ---- srclib/apr/buildconf.orig Thu Jul 1 23:21:59 2004 -+++ srclib/apr/buildconf Sat Dec 11 17:11:22 2004 -@@ -22,7 +22,7 @@ - # - build/buildcheck.sh || exit 1 - --libtoolize=`build/PrintPath glibtoolize libtoolize libtoolize15 libtoolize14` -+libtoolize=${LIBTOOLIZE} - if [ "x$libtoolize" = "x" ]; then - echo "libtoolize not found in path" - exit 1 -@@ -46,7 +46,7 @@ - ltfile=`pwd`/libtool.m4 - else - ltpath=`dirname $libtoolize` -- ltfile=${LIBTOOL_M4-`cd $ltpath/../share/aclocal ; pwd`/libtool.m4} -+ ltfile=${LIBTOOL_M4-`cd $ltpath/../../share/aclocal ; pwd`/${LIBTOOL_VERSION}.m4} - fi - - if [ ! -f $ltfile ]; then -@@ -54,7 +54,7 @@ - exit 1 - fi - --echo "buildconf: Using libtool.m4 at ${ltfile}." -+echo "buildconf: Using libtool${LIBTOOL_VERSION}.m4 at ${ltfile}." - - cat $ltfile | sed -e 's/LIBTOOL=\(.*\)top_build/LIBTOOL=\1apr_build/' > build/libtool.m4 - diff --git a/www/apache22/files/patch-srclib:apr:config.layout b/www/apache22/files/patch-srclib:apr:config.layout deleted file mode 100644 index 87903810ee1b..000000000000 --- a/www/apache22/files/patch-srclib:apr:config.layout +++ /dev/null @@ -1,11 +0,0 @@ ---- srclib/apr/config.layout.orig Wed Jun 30 15:16:54 2004 -+++ srclib/apr/config.layout Mon Dec 13 10:17:16 2004 -@@ -229,3 +229,8 @@ - infodir: ${exec_prefix}/share/info - libsuffix: -${APR_MAJOR_VERSION} - </Layout> -+ -+<Layout FreeBSD> -+ includedir: ${prefix}/include/apr-${APR_MAJOR_VERSION} -+ libsuffix: -+</Layout> diff --git a/www/apache22/files/patch-srclib:apr:threadproc:unix:procsup.c b/www/apache22/files/patch-srclib:apr:threadproc:unix:procsup.c deleted file mode 100644 index 13c663af7bd4..000000000000 --- a/www/apache22/files/patch-srclib:apr:threadproc:unix:procsup.c +++ /dev/null @@ -1,18 +0,0 @@ ---- srclib/apr/threadproc/unix/procsup.c.orig Mon Apr 8 22:08:18 2002 -+++ srclib/apr/threadproc/unix/procsup.c Sun Jul 21 08:45:44 2002 -@@ -59,6 +59,7 @@ - int x; - - chdir("/"); -+#ifndef FREEBSD_THREAD_HACK - #if !defined(MPE) && !defined(OS2) && !defined(TPF) && !defined(BEOS) - /* Don't detach for MPE because child processes can't survive the death of - * the parent. */ -@@ -89,6 +90,7 @@ - if (setpgid(0, 0) == -1) { - return errno; - } -+#endif - #endif - - /* close out the standard file descriptors */ diff --git a/www/apache22/files/patch-support:Makefile.in b/www/apache22/files/patch-support:Makefile.in deleted file mode 100644 index 930f282597a4..000000000000 --- a/www/apache22/files/patch-support:Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ ---- support/Makefile.in.orig Tue Dec 21 09:31:12 2004 -+++ support/Makefile.in Tue Dec 21 09:31:39 2004 -@@ -23,10 +23,7 @@ - fi ; \ - done - @if test -f "$(builddir)/envvars-std"; then \ -- cp -p envvars-std $(DESTDIR)$(sbindir); \ -- if test ! -f $(DESTDIR)$(sbindir)/envvars; then \ -- cp -p envvars-std $(DESTDIR)$(sbindir)/envvars ; \ -- fi ; \ -+ cp -p envvars-std $(DESTDIR)$(sbindir)/envvars; \ - fi - - htpasswd_OBJECTS = htpasswd.lo diff --git a/www/apache22/files/patch-support:apachectl.in b/www/apache22/files/patch-support:apachectl.in deleted file mode 100644 index 7c5c3238e955..000000000000 --- a/www/apache22/files/patch-support:apachectl.in +++ /dev/null @@ -1,11 +0,0 @@ ---- support/apachectl.in.orig Thu Sep 16 09:28:54 2004 -+++ support/apachectl.in Thu Sep 16 09:29:14 2004 -@@ -63,7 +63,7 @@ - ULIMIT_MAX_FILES="@APACHECTL_ULIMIT@" - # -------------------- -------------------- - # |||||||||||||||||||| END CONFIGURATION SECTION |||||||||||||||||||| -- -+eval `limits -e -C daemon` >/dev/null 2>&1 - # Set the maximum number of file descriptors allowed per child process. - if [ "x$ULIMIT_MAX_FILES" != "x" ] ; then - $ULIMIT_MAX_FILES diff --git a/www/apache22/files/patch-support:apxs.in b/www/apache22/files/patch-support:apxs.in deleted file mode 100644 index db8081fa4fc5..000000000000 --- a/www/apache22/files/patch-support:apxs.in +++ /dev/null @@ -1,12 +0,0 @@ ---- support/apxs.in.orig Mon Nov 29 10:24:23 2004 -+++ support/apxs.in Mon Nov 29 10:25:05 2004 -@@ -629,8 +629,7 @@ - if (open(FP, ">$CFG_SYSCONFDIR/$CFG_TARGET.conf.new")) { - print FP $content; - close(FP); -- system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf $CFG_SYSCONFDIR/$CFG_TARGET.conf.bak && " . -- "cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " . -+ system("cp $CFG_SYSCONFDIR/$CFG_TARGET.conf.new $CFG_SYSCONFDIR/$CFG_TARGET.conf && " . - "rm $CFG_SYSCONFDIR/$CFG_TARGET.conf.new"); - } else { - notice("unable to open configuration file"); diff --git a/www/apache22/files/patch-support:envvars-std.in b/www/apache22/files/patch-support:envvars-std.in deleted file mode 100644 index 26a094f31394..000000000000 --- a/www/apache22/files/patch-support:envvars-std.in +++ /dev/null @@ -1,13 +0,0 @@ ---- support/envvars-std.in.orig Fri Dec 17 14:39:21 2004 -+++ support/envvars-std.in Fri Dec 17 14:41:06 2004 -@@ -21,3 +21,10 @@ - export @SHLIBPATH_VAR@ - # - @OS_SPECIFIC_VARS@ -+ -+ENVVARS_DIR=%%PREFIX%%/etc/apache2/envvars.d -+ -+for envvars_file in $(ls ${ENVVARS_DIR}/*.env 2>/dev/null) -+do -+ . ${envvars_file} -+done diff --git a/www/apache22/files/patch-support:log_server_status.in b/www/apache22/files/patch-support:log_server_status.in deleted file mode 100644 index 136bafb9ff1a..000000000000 --- a/www/apache22/files/patch-support:log_server_status.in +++ /dev/null @@ -1,20 +0,0 @@ ---- support/log_server_status.in.orig Tue Jun 18 23:21:53 2002 -+++ support/log_server_status.in Tue Jun 18 23:23:08 2002 -@@ -63,7 +63,7 @@ - # - require 'sys/socket.ph'; - --$wherelog = "/var/log/graph/"; # Logs will be like "/var/log/graph/19960312" -+$wherelog = "@logfiledir@/httpd-status-"; # Logs will be like "/var/log/httpd-status-19960312.log" - $server = "localhost"; # Name of server, could be "www.foo.com" - $port = "80"; # Port on server - $request = "/status/?auto"; # Request to send -@@ -96,7 +96,7 @@ - chomp($date); - ($day,$time)=split(/:/,$date); - $res=&tcp_connect($server,$port); -- open(OUT,">>$wherelog$day"); -+ open(OUT,">>$wherelog$day.log"); - if ($res) { - print OUT "$time:-1:-1:-1:-1:$res\n"; - exit 1; diff --git a/www/apache22/pkg-descr b/www/apache22/pkg-descr deleted file mode 100644 index 1102fa67e2cb..000000000000 --- a/www/apache22/pkg-descr +++ /dev/null @@ -1,9 +0,0 @@ -The Apache HTTP Server Project is an effort to develop and maintain an -open-source HTTP server for various modern desktop and server operating -systems, such as UNIX and Windows NT. The goal of this project is to -provide a secure, efficient and extensible server which provides HTTP -services in sync with the current HTTP standards. -The 2.x branch of Apache Web Server includes several improvements like -threading, use of APR, native IPv6 and SSL support, and many more. - -WWW: http://httpd.apache.org/ diff --git a/www/apache22/pkg-install b/www/apache22/pkg-install deleted file mode 100644 index 5910273e21e3..000000000000 --- a/www/apache22/pkg-install +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh -# $FreeBSD$ -# - -if [ "$2" != "PRE-INSTALL" ]; then - exit 0 -fi - -WWWUSER=www -WWWGROUP=${WWWUSER} -WWWUID=80 -WWWGID=${WWWUID} - -if ! pw groupshow "${WWWGROUP}" 2>/dev/null 1>&2; then - if pw groupadd ${WWWGROUP} -g ${WWWGID}; then - echo "Added group \"${WWWGROUP}\"." - else - echo "Adding group \"${WWWGROUP}\" failed..." - exit 1 - fi -fi - -if ! pw usershow "${WWWUSER}" 2>/dev/null 1>&2; then - if pw useradd ${WWWUSER} -u ${WWWUID} -g ${WWWGROUP} -h - \ - -s "/sbin/nologin" -d "/nonexistent" \ - -c "World Wide Web Owner"; \ - then - echo "Added user \"${WWWUSER}\"." - else - echo "Adding user \"${WWWUSER}\" failed..." - exit 1 - fi -fi - -exit 0 diff --git a/www/apache22/pkg-message b/www/apache22/pkg-message deleted file mode 100644 index 23d9a6017bcc..000000000000 --- a/www/apache22/pkg-message +++ /dev/null @@ -1,2 +0,0 @@ -To run apache www server from startup, add apache21_enable="YES" -in your /etc/rc.conf. Extra options can be found in startup script. diff --git a/www/apache22/pkg-plist b/www/apache22/pkg-plist deleted file mode 100644 index ffafdefde70a..000000000000 --- a/www/apache22/pkg-plist +++ /dev/null @@ -1,511 +0,0 @@ -@comment $FreeBSD$ -@exec mkdir -p %D/etc/apache21 2> /dev/null -@unexec if cmp -s %D/etc/apache21/httpd.conf %D/%%EXAMPLESDIR%%/httpd-std.conf; then rm -f %D/etc/apache21/httpd.conf; fi -%%EXAMPLESDIR%%/httpd-std.conf -@exec [ -f %D/etc/apache21/httpd.conf ] || cp %D/%%EXAMPLESDIR%%/httpd-std.conf %D/etc/apache21/httpd.conf -@unexec if cmp -s %D/etc/apache21/magic %D/%%EXAMPLESDIR%%/magic-dist; then rm -f %D/etc/apache21/magic; fi -%%EXAMPLESDIR%%/magic-dist -@exec [ -f %D/etc/apache21/magic ] || cp %D/%%EXAMPLESDIR%%/magic-dist %D/etc/apache21/magic -@unexec if cmp -s %D/etc/apache21/mime.types %D/%%EXAMPLESDIR%%/mime.types-dist; then rm -f %D/etc/apache21/mime.types; fi -%%EXAMPLESDIR%%/mime.types-dist -@exec [ -f %D/etc/apache21/mime.types ] || cp %D/%%EXAMPLESDIR%%/mime.types-dist %D/etc/apache21/mime.types -@unexec if cmp -s %D/etc/apache21/ssl.conf %D/%%EXAMPLESDIR%%/ssl-std.conf; then rm -f %D/etc/apache21/ssl.conf; fi -%%EXAMPLESDIR%%/ssl-std.conf -@exec [ -f %D/etc/apache21/ssl.conf ] || cp %D/%%EXAMPLESDIR%%/ssl-std.conf %D/etc/apache21/ssl.conf -etc/rc.d/apache21.sh -include/apache21/ap_compat.h -include/apache21/ap_config.h -include/apache21/ap_config_auto.h -include/apache21/ap_config_layout.h -include/apache21/ap_listen.h -include/apache21/ap_mmn.h -include/apache21/ap_mpm.h -include/apache21/ap_provider.h -include/apache21/ap_regkey.h -include/apache21/ap_release.h -%%APR_PORTS%%include/apr-1/apr.h -%%APR_PORTS%%include/apr-1/apr_allocator.h -%%APR_PORTS%%include/apr-1/apr_anylock.h -%%APR_PORTS%%include/apr-1/apr_atomic.h -%%APR_PORTS%%include/apr-1/apr_base64.h -%%APR_PORTS%%include/apr-1/apr_buckets.h -%%APR_PORTS%%include/apr-1/apr_date.h -%%APR_PORTS%%include/apr-1/apr_dbm.h -%%APR_PORTS%%include/apr-1/apr_dso.h -%%APR_PORTS%%include/apr-1/apr_env.h -%%APR_PORTS%%include/apr-1/apr_errno.h -%%APR_PORTS%%include/apr-1/apr_file_info.h -%%APR_PORTS%%include/apr-1/apr_file_io.h -%%APR_PORTS%%include/apr-1/apr_fnmatch.h -%%APR_PORTS%%include/apr-1/apr_general.h -%%APR_PORTS%%include/apr-1/apr_getopt.h -%%APR_PORTS%%include/apr-1/apr_global_mutex.h -%%APR_PORTS%%include/apr-1/apr_hash.h -%%APR_PORTS%%include/apr-1/apr_hooks.h -%%APR_PORTS%%include/apr-1/apr_inherit.h -%%APR_PORTS%%include/apr-1/apr_ldap.h -%%APR_PORTS%%include/apr-1/apr_ldap_init.h -%%APR_PORTS%%include/apr-1/apr_ldap_url.h -%%APR_PORTS%%include/apr-1/apr_lib.h -%%APR_PORTS%%include/apr-1/apr_md4.h -%%APR_PORTS%%include/apr-1/apr_md5.h -%%APR_PORTS%%include/apr-1/apr_mmap.h -%%APR_PORTS%%include/apr-1/apr_network_io.h -%%APR_PORTS%%include/apr-1/apr_optional.h -%%APR_PORTS%%include/apr-1/apr_optional_hooks.h -%%APR_PORTS%%include/apr-1/apr_poll.h -%%APR_PORTS%%include/apr-1/apr_pools.h -%%APR_PORTS%%include/apr-1/apr_portable.h -%%APR_PORTS%%include/apr-1/apr_proc_mutex.h -%%APR_PORTS%%include/apr-1/apr_queue.h -%%APR_PORTS%%include/apr-1/apr_random.h -%%APR_PORTS%%include/apr-1/apr_reslist.h -%%APR_PORTS%%include/apr-1/apr_ring.h -%%APR_PORTS%%include/apr-1/apr_rmm.h -%%APR_PORTS%%include/apr-1/apr_sdbm.h -%%APR_PORTS%%include/apr-1/apr_sha1.h -%%APR_PORTS%%include/apr-1/apr_shm.h -%%APR_PORTS%%include/apr-1/apr_signal.h -%%APR_PORTS%%include/apr-1/apr_strings.h -%%APR_PORTS%%include/apr-1/apr_strmatch.h -%%APR_PORTS%%include/apr-1/apr_support.h -%%APR_PORTS%%include/apr-1/apr_tables.h -%%APR_PORTS%%include/apr-1/apr_thread_cond.h -%%APR_PORTS%%include/apr-1/apr_thread_mutex.h -%%APR_PORTS%%include/apr-1/apr_thread_proc.h -%%APR_PORTS%%include/apr-1/apr_thread_rwlock.h -%%APR_PORTS%%include/apr-1/apr_time.h -%%APR_PORTS%%include/apr-1/apr_uri.h -%%APR_PORTS%%include/apr-1/apr_user.h -%%APR_PORTS%%include/apr-1/apr_uuid.h -%%APR_PORTS%%include/apr-1/apr_version.h -%%APR_PORTS%%include/apr-1/apr_want.h -%%APR_PORTS%%include/apr-1/apr_xlate.h -%%APR_PORTS%%include/apr-1/apr_xml.h -%%APR_PORTS%%include/apr-1/apu.h -%%APR_PORTS%%include/apr-1/apu_version.h -%%APR_PORTS%%include/apr-1/apu_want.h -%%EVENT%%include/apache21/pod.h -%%EVENT%%include/apache21/fdqueue.h -%%WORKER%%include/apache21/fdqueue.h -%%THREADPOOL%%include/apache21/pod.h -include/apache21/http_config.h -include/apache21/http_connection.h -include/apache21/http_core.h -include/apache21/http_log.h -include/apache21/http_main.h -include/apache21/http_protocol.h -include/apache21/http_request.h -include/apache21/http_vhost.h -include/apache21/httpd.h -include/apache21/mod_auth.h -include/apache21/mod_cgi.h -include/apache21/mod_core.h -include/apache21/mod_dav.h -include/apache21/mod_include.h -include/apache21/mod_log_config.h -include/apache21/mod_proxy.h -include/apache21/mod_ssl.h -include/apache21/mod_status.h -include/apache21/mpm.h -include/apache21/mpm_common.h -include/apache21/mpm_default.h -include/apache21/os.h -include/apache21/pcre.h -include/apache21/pcreposix.h -%%WORKER%%include/apache21/pod.h -include/apache21/scoreboard.h -include/apache21/unixd.h -include/apache21/util_cfgtree.h -include/apache21/util_charset.h -include/apache21/util_ebcdic.h -include/apache21/util_filter.h -include/apache21/util_ldap.h -include/apache21/util_md5.h -include/apache21/util_script.h -include/apache21/util_time.h -include/apache21/util_xml.h -%%APR_PORTS%%bin/apr-1-config -%%APR_PORTS%%bin/apu-1-config -%%APR_PORTS%%lib/apr.exp -%%APR_PORTS%%lib/aprutil.exp -%%APR_PORTS%%lib/libapr-1.a -%%APR_PORTS%%lib/libapr-1.so -%%APR_PORTS%%lib/libapr-1.so.0 -%%APR_PORTS%%lib/libaprutil-1.a -%%APR_PORTS%%lib/libaprutil-1.so -%%APR_PORTS%%lib/libaprutil-1.so.0 -libexec/apache21/httpd.exp -%%MOD_ACTIONS%%libexec/apache21/mod_actions.so -%%MOD_ALIAS%%libexec/apache21/mod_alias.so -%%MOD_ASIS%%libexec/apache21/mod_asis.so -%%MOD_AUTH_BASIC%%libexec/apache21/mod_auth_basic.so -%%MOD_AUTH_DIGEST%%libexec/apache21/mod_auth_digest.so -%%MOD_AUTHN_ANON%%libexec/apache21/mod_authn_anon.so -%%MOD_AUTHN_DBM%%libexec/apache21/mod_authn_dbm.so -%%MOD_AUTHN_DEFAULT%%libexec/apache21/mod_authn_default.so -%%MOD_AUTHN_FILE%%libexec/apache21/mod_authn_file.so -%%MOD_AUTHNZ_LDAP%%libexec/apache21/mod_authnz_ldap.so -%%MOD_AUTHZ_DBM%%libexec/apache21/mod_authz_dbm.so -%%MOD_AUTHZ_DEFAULT%%libexec/apache21/mod_authz_default.so -%%MOD_AUTHZ_GROUPFILE%%libexec/apache21/mod_authz_groupfile.so -%%MOD_AUTHZ_HOST%%libexec/apache21/mod_authz_host.so -%%MOD_AUTHZ_OWNER%%libexec/apache21/mod_authz_owner.so -%%MOD_AUTHZ_USER%%libexec/apache21/mod_authz_user.so -%%MOD_AUTOINDEX%%libexec/apache21/mod_autoindex.so -%%MOD_BUCKETEER%%libexec/apache21/mod_bucketeer.so -%%MOD_CACHE%%libexec/apache21/mod_cache.so -%%MOD_CASE_FILTER%%libexec/apache21/mod_case_filter.so -%%MOD_CASE_FILTER_IN%%libexec/apache21/mod_case_filter_in.so -%%MOD_CERN_META%%libexec/apache21/mod_cern_meta.so -%%MOD_CGI%%libexec/apache21/mod_cgi.so -%%MOD_CGID%%libexec/apache21/mod_cgid.so -%%MOD_CHARSET_LITE%%libexec/apache21/mod_charset_lite.so -%%MOD_DAV%%libexec/apache21/mod_dav.so -%%MOD_DAV_FS%%libexec/apache21/mod_dav_fs.so -%%MOD_DEFLATE%%libexec/apache21/mod_deflate.so -%%MOD_DIR%%libexec/apache21/mod_dir.so -%%MOD_DISK_CACHE%%libexec/apache21/mod_disk_cache.so -%%MOD_ENV%%libexec/apache21/mod_env.so -%%MOD_EXPIRES%%libexec/apache21/mod_expires.so -%%MOD_EXT_FILTER%%libexec/apache21/mod_ext_filter.so -%%MOD_FILE_CACHE%%libexec/apache21/mod_file_cache.so -%%MOD_HEADERS%%libexec/apache21/mod_headers.so -%%MOD_IMAP%%libexec/apache21/mod_imap.so -%%MOD_INCLUDE%%libexec/apache21/mod_include.so -%%MOD_INFO%%libexec/apache21/mod_info.so -%%MOD_LDAP%%libexec/apache21/mod_ldap.so -%%MOD_LOG_CONFIG%%libexec/apache21/mod_log_config.so -%%MOD_LOG_FORENSIC%%libexec/apache21/mod_log_forensic.so -%%MOD_LOGIO%%libexec/apache21/mod_logio.so -%%MOD_MEM_CACHE%%libexec/apache21/mod_mem_cache.so -%%MOD_MIME%%libexec/apache21/mod_mime.so -%%MOD_MIME_MAGIC%%libexec/apache21/mod_mime_magic.so -%%MOD_NEGOTIATION%%libexec/apache21/mod_negotiation.so -%%MOD_OPTIONAL_HOOK_EXPORT%%libexec/apache21/mod_optional_hook_export.so -%%MOD_OPTIONAL_HOOK_IMPORT%%libexec/apache21/mod_optional_hook_import.so -%%MOD_OPTIONAL_FN_IMPORT%%libexec/apache21/mod_optional_fn_import.so -%%MOD_OPTIONAL_FN_EXPORT%%libexec/apache21/mod_optional_fn_export.so -%%MOD_PROXY%%libexec/apache21/mod_proxy.so -%%MOD_PROXY_AJP%%libexec/apache21/mod_proxy_ajp.so -%%MOD_PROXY_BALANCER%%libexec/apache21/mod_proxy_balancer.so -%%MOD_PROXY_CONNECT%%libexec/apache21/mod_proxy_connect.so -%%MOD_PROXY_FTP%%libexec/apache21/mod_proxy_ftp.so -%%MOD_PROXY_HTTP%%libexec/apache21/mod_proxy_http.so -%%MOD_REWRITE%%libexec/apache21/mod_rewrite.so -%%MOD_SETENVIF%%libexec/apache21/mod_setenvif.so -%%MOD_SPELING%%libexec/apache21/mod_speling.so -%%MOD_SSL%%libexec/apache21/mod_ssl.so -%%MOD_STATUS%%libexec/apache21/mod_status.so -%%MOD_SUEXEC%%libexec/apache21/mod_suexec.so -%%MOD_UNIQUE_ID%%libexec/apache21/mod_unique_id.so -%%MOD_USERDIR%%libexec/apache21/mod_userdir.so -%%MOD_USERTRACK%%libexec/apache21/mod_usertrack.so -%%MOD_VHOST_ALIAS%%libexec/apache21/mod_vhost_alias.so -sbin/ab -sbin/apachectl -sbin/apxs -sbin/checkgid -sbin/dbmmanage -sbin/envvars -sbin/htcacheclean -sbin/htdbm -sbin/htdigest -sbin/htpasswd -sbin/httpd -sbin/logresolve -sbin/rotatelogs -%%MOD_SUEXEC%%sbin/suexec -%%APR_PORTS%%build-1/apr_rules.mk -%%APR_PORTS%%build-1/libtool -%%APR_PORTS%%build-1/make_exports.awk -%%APR_PORTS%%build-1/make_var_export.awk -%%APR_PORTS%%build-1/mkdir.sh -share/apache21/build/config_vars.mk -share/apache21/build/config.nice -share/apache21/build/instdso.sh -share/apache21/build/library.mk -share/apache21/build/ltlib.mk -share/apache21/build/program.mk -share/apache21/build/rules.mk -share/apache21/build/special.mk -%%CGI%%@unexec if [ -L %D/www/cgi-bin ]; then rm -f %D/www/cgi-bin; fi -%%CGI%%@exec [ ! -d %D/www/cgi-bin ] && ln -fs %D/www/cgi-bin-dist %D/www/cgi-bin -%%CGI%%www/cgi-bin-dist/printenv -%%CGI%%www/cgi-bin-dist/test-cgi -%%WWWDATA%%@unexec if [ -L %D/www/data ]; then rm -f %D/www/data; fi -%%WWWDATA%%@exec [ ! -d %D/www/data ] && ln -fs %D/www/data-dist %D/www/data -%%WWWDATA%%www/data-dist/apache_pb.gif -%%WWWDATA%%www/data-dist/apache_pb.png -%%WWWDATA%%www/data-dist/apache_pb2.gif -%%WWWDATA%%www/data-dist/apache_pb2.png -%%WWWDATA%%www/data-dist/apache_pb2_ani.gif -%%WWWDATA%%www/data-dist/index.html -%%ERROR%%@unexec if [ -L %D/www/error ]; then rm -f %D/www/error; fi -%%ERROR%%@exec [ ! -d %D/www/error ] && ln -fs %D/www/error-dist %D/www/error -%%ERROR%%www/error-dist/HTTP_BAD_GATEWAY.html.var -%%ERROR%%www/error-dist/HTTP_BAD_REQUEST.html.var -%%ERROR%%www/error-dist/HTTP_FORBIDDEN.html.var -%%ERROR%%www/error-dist/HTTP_GONE.html.var -%%ERROR%%www/error-dist/HTTP_INTERNAL_SERVER_ERROR.html.var -%%ERROR%%www/error-dist/HTTP_LENGTH_REQUIRED.html.var -%%ERROR%%www/error-dist/HTTP_METHOD_NOT_ALLOWED.html.var -%%ERROR%%www/error-dist/HTTP_NOT_ACCEPTABLE.html.var -%%ERROR%%www/error-dist/HTTP_NOT_FOUND.html.var -%%ERROR%%www/error-dist/HTTP_NOT_IMPLEMENTED.html.var -%%ERROR%%www/error-dist/HTTP_PRECONDITION_FAILED.html.var -%%ERROR%%www/error-dist/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var -%%ERROR%%www/error-dist/HTTP_REQUEST_TIME_OUT.html.var -%%ERROR%%www/error-dist/HTTP_REQUEST_URI_TOO_LARGE.html.var -%%ERROR%%www/error-dist/HTTP_SERVICE_UNAVAILABLE.html.var -%%ERROR%%www/error-dist/HTTP_UNAUTHORIZED.html.var -%%ERROR%%www/error-dist/HTTP_UNSUPPORTED_MEDIA_TYPE.html.var -%%ERROR%%www/error-dist/HTTP_VARIANT_ALSO_VARIES.html.var -%%ERROR%%www/error-dist/README -%%ERROR%%www/error-dist/contact.html.var -%%ERROR%%www/error-dist/include/bottom.html -%%ERROR%%www/error-dist/include/spacer.html -%%ERROR%%www/error-dist/include/top.html -%%ICONS%%@unexec if [ -L %D/www/icons ]; then rm -f %D/www/icons; fi -%%ICONS%%@exec [ ! -d %D/www/icons ] && ln -fs %D/www/icons-dist %D/www/icons -%%ICONS%%www/icons-dist/README -%%ICONS%%www/icons-dist/a.gif -%%ICONS%%www/icons-dist/a.png -%%ICONS%%www/icons-dist/alert.black.gif -%%ICONS%%www/icons-dist/alert.black.png -%%ICONS%%www/icons-dist/alert.red.gif -%%ICONS%%www/icons-dist/alert.red.png -%%ICONS%%www/icons-dist/apache_pb.gif -%%ICONS%%www/icons-dist/apache_pb.png -%%ICONS%%www/icons-dist/apache_pb2.gif -%%ICONS%%www/icons-dist/apache_pb2.png -%%ICONS%%www/icons-dist/apache_pb2_ani.gif -%%ICONS%%www/icons-dist/back.gif -%%ICONS%%www/icons-dist/back.png -%%ICONS%%www/icons-dist/ball.gray.gif -%%ICONS%%www/icons-dist/ball.gray.png -%%ICONS%%www/icons-dist/ball.red.gif -%%ICONS%%www/icons-dist/ball.red.png -%%ICONS%%www/icons-dist/binary.gif -%%ICONS%%www/icons-dist/binary.png -%%ICONS%%www/icons-dist/binhex.gif -%%ICONS%%www/icons-dist/binhex.png -%%ICONS%%www/icons-dist/blank.gif -%%ICONS%%www/icons-dist/blank.png -%%ICONS%%www/icons-dist/bomb.gif -%%ICONS%%www/icons-dist/bomb.png -%%ICONS%%www/icons-dist/box1.gif -%%ICONS%%www/icons-dist/box1.png -%%ICONS%%www/icons-dist/box2.gif -%%ICONS%%www/icons-dist/box2.png -%%ICONS%%www/icons-dist/broken.gif -%%ICONS%%www/icons-dist/broken.png -%%ICONS%%www/icons-dist/burst.gif -%%ICONS%%www/icons-dist/burst.png -%%ICONS%%www/icons-dist/c.gif -%%ICONS%%www/icons-dist/c.png -%%ICONS%%www/icons-dist/comp.blue.gif -%%ICONS%%www/icons-dist/comp.blue.png -%%ICONS%%www/icons-dist/comp.gray.gif -%%ICONS%%www/icons-dist/comp.gray.png -%%ICONS%%www/icons-dist/compressed.gif -%%ICONS%%www/icons-dist/compressed.png -%%ICONS%%www/icons-dist/continued.gif -%%ICONS%%www/icons-dist/continued.png -%%ICONS%%www/icons-dist/dir.gif -%%ICONS%%www/icons-dist/dir.png -%%ICONS%%www/icons-dist/diskimg.gif -%%ICONS%%www/icons-dist/diskimg.png -%%ICONS%%www/icons-dist/down.gif -%%ICONS%%www/icons-dist/down.png -%%ICONS%%www/icons-dist/dvi.gif -%%ICONS%%www/icons-dist/dvi.png -%%ICONS%%www/icons-dist/f.gif -%%ICONS%%www/icons-dist/f.png -%%ICONS%%www/icons-dist/folder.gif -%%ICONS%%www/icons-dist/folder.open.gif -%%ICONS%%www/icons-dist/folder.open.png -%%ICONS%%www/icons-dist/folder.png -%%ICONS%%www/icons-dist/folder.sec.gif -%%ICONS%%www/icons-dist/folder.sec.png -%%ICONS%%www/icons-dist/forward.gif -%%ICONS%%www/icons-dist/forward.png -%%ICONS%%www/icons-dist/freebsd.gif -%%ICONS%%www/icons-dist/generic.gif -%%ICONS%%www/icons-dist/generic.png -%%ICONS%%www/icons-dist/generic.red.gif -%%ICONS%%www/icons-dist/generic.red.png -%%ICONS%%www/icons-dist/generic.sec.gif -%%ICONS%%www/icons-dist/generic.sec.png -%%ICONS%%www/icons-dist/hand.right.gif -%%ICONS%%www/icons-dist/hand.right.png -%%ICONS%%www/icons-dist/hand.up.gif -%%ICONS%%www/icons-dist/hand.up.png -%%ICONS%%www/icons-dist/icon.sheet.gif -%%ICONS%%www/icons-dist/icon.sheet.png -%%ICONS%%www/icons-dist/image1.gif -%%ICONS%%www/icons-dist/image1.png -%%ICONS%%www/icons-dist/image2.gif -%%ICONS%%www/icons-dist/image2.png -%%ICONS%%www/icons-dist/image3.gif -%%ICONS%%www/icons-dist/image3.png -%%ICONS%%www/icons-dist/index.gif -%%ICONS%%www/icons-dist/index.png -%%ICONS%%www/icons-dist/layout.gif -%%ICONS%%www/icons-dist/layout.png -%%ICONS%%www/icons-dist/left.gif -%%ICONS%%www/icons-dist/left.png -%%ICONS%%www/icons-dist/link.gif -%%ICONS%%www/icons-dist/link.png -%%ICONS%%www/icons-dist/movie.gif -%%ICONS%%www/icons-dist/movie.png -%%ICONS%%www/icons-dist/p.gif -%%ICONS%%www/icons-dist/p.png -%%ICONS%%www/icons-dist/patch.gif -%%ICONS%%www/icons-dist/patch.png -%%ICONS%%www/icons-dist/pdf.gif -%%ICONS%%www/icons-dist/pdf.png -%%ICONS%%www/icons-dist/pie0.gif -%%ICONS%%www/icons-dist/pie0.png -%%ICONS%%www/icons-dist/pie1.gif -%%ICONS%%www/icons-dist/pie1.png -%%ICONS%%www/icons-dist/pie2.gif -%%ICONS%%www/icons-dist/pie2.png -%%ICONS%%www/icons-dist/pie3.gif -%%ICONS%%www/icons-dist/pie3.png -%%ICONS%%www/icons-dist/pie4.gif -%%ICONS%%www/icons-dist/pie4.png -%%ICONS%%www/icons-dist/pie5.gif -%%ICONS%%www/icons-dist/pie5.png -%%ICONS%%www/icons-dist/pie6.gif -%%ICONS%%www/icons-dist/pie6.png -%%ICONS%%www/icons-dist/pie7.gif -%%ICONS%%www/icons-dist/pie7.png -%%ICONS%%www/icons-dist/pie8.gif -%%ICONS%%www/icons-dist/pie8.png -%%ICONS%%www/icons-dist/portal.gif -%%ICONS%%www/icons-dist/portal.png -%%ICONS%%www/icons-dist/ps.gif -%%ICONS%%www/icons-dist/ps.png -%%ICONS%%www/icons-dist/quill.gif -%%ICONS%%www/icons-dist/quill.png -%%ICONS%%www/icons-dist/right.gif -%%ICONS%%www/icons-dist/right.png -%%ICONS%%www/icons-dist/screw1.gif -%%ICONS%%www/icons-dist/screw1.png -%%ICONS%%www/icons-dist/screw2.gif -%%ICONS%%www/icons-dist/screw2.png -%%ICONS%%www/icons-dist/script.gif -%%ICONS%%www/icons-dist/script.png -%%ICONS%%www/icons-dist/small/README.txt -%%ICONS%%www/icons-dist/small/back.gif -%%ICONS%%www/icons-dist/small/back.png -%%ICONS%%www/icons-dist/small/binary.gif -%%ICONS%%www/icons-dist/small/binary.png -%%ICONS%%www/icons-dist/small/binhex.gif -%%ICONS%%www/icons-dist/small/binhex.png -%%ICONS%%www/icons-dist/small/blank.gif -%%ICONS%%www/icons-dist/small/blank.png -%%ICONS%%www/icons-dist/small/broken.gif -%%ICONS%%www/icons-dist/small/broken.png -%%ICONS%%www/icons-dist/small/burst.gif -%%ICONS%%www/icons-dist/small/burst.png -%%ICONS%%www/icons-dist/small/comp1.gif -%%ICONS%%www/icons-dist/small/comp1.png -%%ICONS%%www/icons-dist/small/comp2.gif -%%ICONS%%www/icons-dist/small/comp2.png -%%ICONS%%www/icons-dist/small/compressed.gif -%%ICONS%%www/icons-dist/small/compressed.png -%%ICONS%%www/icons-dist/small/continued.gif -%%ICONS%%www/icons-dist/small/continued.png -%%ICONS%%www/icons-dist/small/dir.gif -%%ICONS%%www/icons-dist/small/dir.png -%%ICONS%%www/icons-dist/small/dir2.gif -%%ICONS%%www/icons-dist/small/dir2.png -%%ICONS%%www/icons-dist/small/doc.gif -%%ICONS%%www/icons-dist/small/doc.png -%%ICONS%%www/icons-dist/small/forward.gif -%%ICONS%%www/icons-dist/small/forward.png -%%ICONS%%www/icons-dist/small/generic.gif -%%ICONS%%www/icons-dist/small/generic.png -%%ICONS%%www/icons-dist/small/generic2.gif -%%ICONS%%www/icons-dist/small/generic2.png -%%ICONS%%www/icons-dist/small/generic3.gif -%%ICONS%%www/icons-dist/small/generic3.png -%%ICONS%%www/icons-dist/small/image.gif -%%ICONS%%www/icons-dist/small/image.png -%%ICONS%%www/icons-dist/small/image2.gif -%%ICONS%%www/icons-dist/small/image2.png -%%ICONS%%www/icons-dist/small/index.gif -%%ICONS%%www/icons-dist/small/index.png -%%ICONS%%www/icons-dist/small/key.gif -%%ICONS%%www/icons-dist/small/key.png -%%ICONS%%www/icons-dist/small/movie.gif -%%ICONS%%www/icons-dist/small/movie.png -%%ICONS%%www/icons-dist/small/patch.gif -%%ICONS%%www/icons-dist/small/patch.png -%%ICONS%%www/icons-dist/small/ps.gif -%%ICONS%%www/icons-dist/small/ps.png -%%ICONS%%www/icons-dist/small/rainbow.gif -%%ICONS%%www/icons-dist/small/rainbow.png -%%ICONS%%www/icons-dist/small/sound.gif -%%ICONS%%www/icons-dist/small/sound.png -%%ICONS%%www/icons-dist/small/sound2.gif -%%ICONS%%www/icons-dist/small/sound2.png -%%ICONS%%www/icons-dist/small/tar.gif -%%ICONS%%www/icons-dist/small/tar.png -%%ICONS%%www/icons-dist/small/text.gif -%%ICONS%%www/icons-dist/small/text.png -%%ICONS%%www/icons-dist/small/transfer.gif -%%ICONS%%www/icons-dist/small/transfer.png -%%ICONS%%www/icons-dist/small/unknown.gif -%%ICONS%%www/icons-dist/small/unknown.png -%%ICONS%%www/icons-dist/small/uu.gif -%%ICONS%%www/icons-dist/small/uu.png -%%ICONS%%www/icons-dist/sound1.gif -%%ICONS%%www/icons-dist/sound1.png -%%ICONS%%www/icons-dist/sound2.gif -%%ICONS%%www/icons-dist/sound2.png -%%ICONS%%www/icons-dist/sphere1.gif -%%ICONS%%www/icons-dist/sphere1.png -%%ICONS%%www/icons-dist/sphere2.gif -%%ICONS%%www/icons-dist/sphere2.png -%%ICONS%%www/icons-dist/tar.gif -%%ICONS%%www/icons-dist/tar.png -%%ICONS%%www/icons-dist/tex.gif -%%ICONS%%www/icons-dist/tex.png -%%ICONS%%www/icons-dist/text.gif -%%ICONS%%www/icons-dist/text.png -%%ICONS%%www/icons-dist/transfer.gif -%%ICONS%%www/icons-dist/transfer.png -%%ICONS%%www/icons-dist/unknown.gif -%%ICONS%%www/icons-dist/unknown.png -%%ICONS%%www/icons-dist/up.gif -%%ICONS%%www/icons-dist/up.png -%%ICONS%%www/icons-dist/uu.gif -%%ICONS%%www/icons-dist/uu.png -%%ICONS%%www/icons-dist/uuencoded.gif -%%ICONS%%www/icons-dist/uuencoded.png -%%ICONS%%www/icons-dist/world1.gif -%%ICONS%%www/icons-dist/world1.png -%%ICONS%%www/icons-dist/world2.gif -%%ICONS%%www/icons-dist/world2.png -%%ICONS%%@dirrm www/icons-dist/small -%%ICONS%%@dirrm www/icons-dist -%%ERROR%%@dirrm www/error-dist/include -%%ERROR%%@dirrm www/error-dist -%%WWWDATA%%@dirrm www/data-dist -%%CGI%%@dirrm www/cgi-bin-dist -@dirrm %%EXAMPLESDIR%% -@dirrm share/apache21/build -@dirrm share/apache21 -%%APR_PORTS%%@dirrm include/apr-1 -%%APR_PORTS%%@dirrm build-1 -@unexec rmdir %D/libexec/apache21 2> /dev/null || true -@dirrm include/apache21 -@exec mkdir -p %D/etc/apache21/Includes 2> /dev/null || true -@exec mkdir -p %D/etc/apache2/envvars.d 2> /dev/null || true -@unexec rmdir %D/etc/apache21/Includes 2> /dev/null || true -@unexec rmdir %D/etc/apache2/envvars.d 2> /dev/null || true -@unexec rm -f %D/etc/apache21/httpd.conf.bak 2> /dev/null || true -@unexec rmdir %D/etc/apache21 2> /dev/null || echo "===> If you plan to do not reinstall apache21, you can safely remove %D/etc/apache21." |