1
0
mirror of https://github.com/apache/httpd.git synced 2025-08-08 15:02:10 +03:00

remove BeOS OS support

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@758891 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jeff Trawick
2009-03-26 22:23:44 +00:00
parent 6ff862b040
commit 2f9b9fdd70
19 changed files with 10 additions and 388 deletions

2
LAYOUT
View File

@@ -139,8 +139,6 @@ modules/ ................ Manditory and Add-In Apache stock modules
os/ .....................
beos/ ...................
bs2000/ .................
netware/ ................

View File

@@ -154,30 +154,6 @@
proxycachedir: ${localstatedir}/proxy
</Layout>
# BeOS layout...
<Layout beos>
prefix: /boot/home/apache
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/bin
libdir: ${exec_prefix}/lib
libexecdir: ${exec_prefix}/libexec
mandir: ${prefix}/man
sysconfdir: ${prefix}/conf
datadir: ${prefix}
installbuilddir: ${datadir}/build
errordir: ${datadir}/error
iconsdir: ${datadir}/icons
htdocsdir: ${datadir}/htdocs
manualdir: ${datadir}/manual
cgidir: ${datadir}/cgi-bin
includedir: ${prefix}/include
localstatedir: ${prefix}
runtimedir: ${localstatedir}/logs
logfiledir: ${localstatedir}/logs
proxycachedir: ${localstatedir}/proxy
</Layout>
# SuSE 6.x layout
<Layout SuSE>
prefix: /usr

View File

@@ -273,9 +273,6 @@ case $host in
APR_SETVAR(APACHE_MPM, [prefork])
APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
;;
*-beos*)
APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
;;
*os2-emx*)
APR_SETVAR(APACHE_MPM, [mpmt_os2])
APR_SETVAR(SINGLE_LISTEN_UNSERIALIZED_ACCEPT, [1])
@@ -591,11 +588,6 @@ if test "$enable_so" = "yes"; then
APR_ADDTO(SH_LDFLAGS, [\$(EXTRA_LDFLAGS) \$(EXTRA_LIBS)])
APR_ADDTO(UTIL_LDFLAGS, [-Wl,-uXML_Parse])
;;
*beos)
SH_LDFLAGS='$(top_builddir)/_APP_'
PRE_SHARED_CMDS='ln -s $(top_builddir)/httpd $(top_builddir)/_APP_'
POST_SHARED_CMDS='rm $(top_builddir)/_APP_'
;;
*os390)
APR_ADDTO(HTTPD_LDFLAGS, [--main=$abs_srcdir/server/main.o --core-dll=$abs_srcdir/apachecore.dll])
APR_ADDTO(SH_LDFLAGS, [--core-dll=$abs_srcdir/apachecore.dll])

View File

@@ -37,7 +37,7 @@
<dl>
<dt>PLAIN TEXT (i.e. <em>unencrypted</em>)</dt>
<dd>Windows, BEOS, &amp; Netware only.</dd>
<dd>Windows &amp; Netware only.</dd>
<dt>CRYPT</dt>
<dd>Unix only. Uses the traditional Unix <code>crypt(3)</code> function

View File

@@ -81,9 +81,6 @@ extern "C" {
#elif defined(WIN32)
/** Set default for Windows file system */
#define HTTPD_ROOT "/apache"
#elif defined (BEOS)
/** Set the default for BeOS */
#define HTTPD_ROOT "/boot/home/apache"
#elif defined (NETWARE)
/** Set the default for NetWare */
#define HTTPD_ROOT "/apache"

View File

@@ -54,7 +54,7 @@
#include "http_protocol.h"
#include "ap_config.h"
#if !defined(OS2) && !defined(WIN32) && !defined(BEOS) && !defined(NETWARE)
#if !defined(OS2) && !defined(WIN32) && !defined(NETWARE)
#include "unixd.h"
#define MOD_EXIPC_SET_MUTEX_PERMS /* XXX Apache should define something */
#endif

View File

@@ -64,7 +64,7 @@
#include "http_config.h"
#include "http_request.h"
#if !defined(WIN32) && !defined(OS2) && !defined(BEOS) && !defined(NETWARE)
#if !defined(WIN32) && !defined(OS2) && !defined(NETWARE)
#define HAVE_UNIX_SUEXEC
#endif

View File

@@ -1323,7 +1323,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
return HTTP_INTERNAL_SERVER_ERROR;
}
#if !defined (TPF) && !defined(BEOS)
#if !defined (TPF)
if (conf->recv_buffer_size > 0
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
@@ -1417,7 +1417,7 @@ static int proxy_ftp_handler(request_rec *r, proxy_worker *worker,
return HTTP_INTERNAL_SERVER_ERROR;
}
#if !defined (TPF) && !defined(BEOS)
#if !defined (TPF)
if (conf->recv_buffer_size > 0
&& (rv = apr_socket_opt_set(data_sock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {

View File

@@ -1578,7 +1578,7 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **newsock,
continue;
}
#if !defined(TPF) && !defined(BEOS)
#if !defined(TPF)
if (conf->recv_buffer_size > 0 &&
(rv = apr_socket_opt_set(*newsock, APR_SO_RCVBUF,
conf->recv_buffer_size))) {
@@ -2262,7 +2262,7 @@ PROXY_DECLARE(int) ap_proxy_connect_backend(const char *proxy_function,
}
conn->connection = NULL;
#if !defined(TPF) && !defined(BEOS)
#if !defined(TPF)
if (worker->recv_buffer_size > 0 &&
(rv = apr_socket_opt_set(newsock, APR_SO_RCVBUF,
worker->recv_buffer_size))) {

View File

@@ -1,5 +0,0 @@
LTLIBRARY_NAME = libos.la
LTLIBRARY_SOURCES = os.c beosd.c
include $(top_srcdir)/build/ltlib.mk

View File

@@ -1,166 +0,0 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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 <unistd.h>
#include "httpd.h"
#include "http_config.h"
#include "http_main.h"
#include "http_log.h"
#include "beosd.h"
#include "mpm_common.h"
beosd_config_rec beosd_config;
/* Set group privileges.
*
* Note that until we get the multi-user situation sorted on beos,
* this is just a no-op to allow common configuration files!
*/
#if B_BEOS_VERSION < 0x0460
static int set_group_privs(void)
{
/* no-op */
return 0;
}
#endif
int beosd_setup_child(void)
{
/* TODO: revisit the whole issue of users/groups for BeOS as
* R5 and below doesn't really have much concept of them.
*/
return 0;
}
AP_DECLARE(const char *) beosd_set_user(cmd_parms *cmd,
void *dummy, const char *arg)
{
/* no-op */
return NULL;
}
AP_DECLARE(const char *) beosd_set_group(cmd_parms *cmd,
void *dummy, const char *arg)
{
/* no-op */
return NULL;
}
void beosd_pre_config(void)
{
/* Until the multi-user situation on BeOS is fixed,
simply have a no-op here to allow for common conf files
*/
}
AP_DECLARE(apr_status_t) beosd_accept(void **accepted, ap_listen_rec *lr,
apr_pool_t *ptrans)
{
apr_socket_t *csd;
apr_status_t status;
int sockdes;
status = apr_socket_accept(&csd, lr->sd, ptrans);
if (status == APR_SUCCESS) {
*accepted = csd;
apr_os_sock_get(&sockdes, csd);
if (sockdes >= FD_SETSIZE) {
ap_log_error(APLOG_MARK, APLOG_WARNING, 0, NULL,
"new file descriptor %d is too large; you probably need "
"to rebuild Apache with a larger FD_SETSIZE "
"(currently %d)",
sockdes, FD_SETSIZE);
apr_socket_close(csd);
return APR_EINTR;
}
return status;
}
if (APR_STATUS_IS_EINTR(status)) {
return status;
}
/* Our old behaviour here was to continue after accept()
* errors. But this leads us into lots of troubles
* because most of the errors are quite fatal. For
* example, EMFILE can be caused by slow descriptor
* leaks (say in a 3rd party module, or libc). It's
* foolish for us to continue after an EMFILE. We also
* seem to tickle kernel bugs on some platforms which
* lead to never-ending loops here. So it seems best
* to just exit in most cases.
*/
switch (status) {
#ifdef EPROTO
/* EPROTO on certain older kernels really means
* ECONNABORTED, so we need to ignore it for them.
* See discussion in new-httpd archives nh.9701
* search for EPROTO.
*
* Also see nh.9603, search for EPROTO:
* There is potentially a bug in Solaris 2.x x<6,
* and other boxes that implement tcp sockets in
* userland (i.e. on top of STREAMS). On these
* systems, EPROTO can actually result in a fatal
* loop. See PR#981 for example. It's hard to
* handle both uses of EPROTO.
*/
case EPROTO:
#endif
#ifdef ECONNABORTED
case ECONNABORTED:
#endif
#ifdef ETIMEDOUT
case ETIMEDOUT:
#endif
#ifdef EHOSTUNREACH
case EHOSTUNREACH:
#endif
#ifdef ENETUNREACH
case ENETUNREACH:
#endif
break;
#ifdef ENETDOWN
case ENETDOWN:
/*
* When the network layer has been shut down, there
* is not much use in simply exiting: the parent
* would simply re-create us (and we'd fail again).
* Use the CHILDFATAL code to tear the server down.
* @@@ Martin's idea for possible improvement:
* A different approach would be to define
* a new APEXIT_NETDOWN exit code, the reception
* of which would make the parent shutdown all
* children, then idle-loop until it detected that
* the network is up again, and restart the children.
* Ben Hyde noted that temporary ENETDOWN situations
* occur in mobile IP.
*/
ap_log_error(APLOG_MARK, APLOG_EMERG, status, ap_server_conf,
"apr_socket_accept: giving up.");
return APR_EGENERAL;
#endif /*ENETDOWN*/
default:
ap_log_error(APLOG_MARK, APLOG_ERR, status, ap_server_conf,
"apr_socket_accept: (client socket)");
return APR_EGENERAL;
}
return status;
}

View File

@@ -1,68 +0,0 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
/**
* @file beosd.h
* @brief common stuff that beos MPMs will want
*
* @addtogroup APACHE_OS_BEOS
* @{
*/
#ifndef BEOSD_H
#define BEOSD_H
#include "httpd.h"
#include "ap_listen.h"
/* Default user name and group name. These may be specified as numbers by
* placing a # before a number */
#ifndef DEFAULT_USER
#define DEFAULT_USER "#-1"
#endif
#ifndef DEFAULT_GROUP
#define DEFAULT_GROUP "#"
#endif
typedef struct {
char *user_name;
uid_t user_id;
gid_t group_id;
} beosd_config_rec;
extern beosd_config_rec beosd_config;
void beosd_detach(void);
int beosd_setup_child(void);
void beosd_pre_config(void);
AP_DECLARE(const char *) beosd_set_user (cmd_parms *cmd, void *dummy,
const char *arg);
AP_DECLARE(const char *) beosd_set_group(cmd_parms *cmd, void *dummy,
const char *arg);
AP_DECLARE(apr_status_t) beosd_accept(void **accepted, ap_listen_rec *lr,
apr_pool_t *ptrans);
#define beosd_killpg(x, y) (kill (-(x), (y)))
#define ap_os_killpg(x, y) (kill (-(x), (y)))
#define BEOS_DAEMON_COMMANDS \
AP_INIT_TAKE1("User", beosd_set_user, NULL, RSRC_CONF, \
"Effective user id for this server (NO-OP)"), \
AP_INIT_TAKE1("Group", beosd_set_group, NULL, RSRC_CONF, \
"Effective group id for this server (NO-OP)")
#endif /* BEOSD_H */
/** @} */

View File

@@ -1,3 +0,0 @@
if test "$OS" = "beos" ; then
APR_ADDTO(CFLAGS,-DBEOS)
fi

View File

@@ -1,37 +0,0 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
/*
* This file will include OS specific functions which are not inlineable.
* Any inlineable functions should be defined in os-inline.c instead.
*/
#include "ap_config.h"
#include "os.h"
#include "httpd.h"
#include "apr_thread_proc.h"
#include "ap_mpm.h" /* needed for definition of
* ap_os_create_privileged_process */
AP_DECLARE(apr_status_t) ap_os_create_privileged_process(
const request_rec *r,
apr_proc_t *newproc, const char *progname,
const char * const *args,
const char * const *env,
apr_procattr_t *attr, apr_pool_t *p)
{
return apr_proc_create(newproc, progname, args, env, attr, p);
}

View File

@@ -1,42 +0,0 @@
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
/**
* @file beos/os.h
* @brief This file in included in all Apache source code. It contains definitions
* of facilities available on _this_ operating system (HAVE_* macros),
* and prototypes of OS specific functions defined in os.c or os-inline.c
*
* @defgroup APACHE_OS_BEOS beos
* @ingroup APACHE_OS
* @{
*/
#ifndef APACHE_OS_H
#define APACHE_OS_H
#include "ap_config.h"
#ifndef PLATFORM
# ifdef BONE_VERSION
# define PLATFORM "BeOS BONE"
# else
# define PLATFORM "BeOS R5"
# endif
#endif
#endif /* !APACHE_OS_H */
/** @} */

View File

@@ -1,10 +1,6 @@
AC_MSG_CHECKING(for target platform)
case $host in
*beos*)
OS="beos"
OS_DIR=$OS
;;
*pc-os2-emx*)
OS="os2"
OS_DIR=$OS

View File

@@ -198,8 +198,8 @@ AP_DECLARE(gid_t) ap_gname2id(const char *name)
#ifndef HAVE_INITGROUPS
int initgroups(const char *name, gid_t basegid)
{
#if defined(QNX) || defined(MPE) || defined(BEOS) || defined(_OSD_POSIX) || defined(TPF) || defined(__TANDEM) || defined(OS2) || defined(WIN32) || defined(NETWARE)
/* QNX, MPE and BeOS do not appear to support supplementary groups. */
#if defined(QNX) || defined(MPE) || defined(_OSD_POSIX) || defined(TPF) || defined(__TANDEM) || defined(OS2) || defined(WIN32) || defined(NETWARE)
/* QNX and MPE do not appear to support supplementary groups. */
return 0;
#else /* ndef QNX */
gid_t groups[NGROUPS_MAX];

View File

@@ -141,17 +141,7 @@ static int reclaim_one_pid(pid_t pid, action_t action)
" still did not exit, "
"sending a SIGKILL",
pid);
#ifndef BEOS
kill(pid, SIGKILL);
#else
/* sending a SIGKILL kills the entire team on BeOS, and as
* httpd thread is part of that team it removes any chance
* of ever doing a restart. To counter this I'm changing to
* use a kinder, gentler way of killing a specific thread
* that is just as effective.
*/
kill_thread(pid);
#endif
break;
case GIVEUP:

View File

@@ -122,7 +122,7 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
conn_rec *c = r->connection;
const char *rem_logname;
char *env_path;
#if defined(WIN32) || defined(OS2) || defined(BEOS)
#if defined(WIN32) || defined(OS2)
char *env_temp;
#endif
const char *host;
@@ -215,12 +215,6 @@ AP_DECLARE(void) ap_add_common_vars(request_rec *r)
}
#endif
#ifdef BEOS
if ((env_temp = getenv("LIBRARY_PATH")) != NULL) {
apr_table_addn(e, "LIBRARY_PATH", env_temp);
}
#endif
apr_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
apr_table_addn(e, "SERVER_SOFTWARE", ap_get_server_banner());
apr_table_addn(e, "SERVER_NAME",