From: Jeff Trawick Date: Sun, 27 Mar 2011 23:51:18 +0000 (+0000) Subject: enable DEFAULT_REL_RUNTIMEDIR on NetWare and Windows X-Git-Tag: 2.3.12~170 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ddf06604b5490a051da96e890871e3ed26c8277d;p=thirdparty%2Fapache%2Fhttpd.git enable DEFAULT_REL_RUNTIMEDIR on NetWare and Windows this commit is missing the Windows and NetWare build logic to copy the appropriate file to include/ap_config_layout.h git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1086073 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/CHANGES b/CHANGES index 2dd5a032045..be2eee6e2f2 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,8 @@ Changes with Apache 2.3.12 + *) Enable DEFAULT_REL_RUNTIMEDIR on Windows and NetWare. [various] + *) Correct C++ incompatibility with http_log.h. [Stefan Fritsch, Jeff Trawick] diff --git a/include/ap_config.h b/include/ap_config.h index 45056372c28..3a02bbef11c 100644 --- a/include/ap_config.h +++ b/include/ap_config.h @@ -232,8 +232,9 @@ #include "os.h" #if (!defined(WIN32) && !defined(NETWARE)) || defined(__MINGW32__) #include "ap_config_auto.h" -#include "ap_config_layout.h" #endif +#include "ap_config_layout.h" + #if defined(NETWARE) #define AP_NONBLOCK_WHEN_MULTI_LISTEN 1 #endif diff --git a/modules/cache/mod_socache_dbm.c b/modules/cache/mod_socache_dbm.c index fabf7782129..2fca723a3a4 100644 --- a/modules/cache/mod_socache_dbm.c +++ b/modules/cache/mod_socache_dbm.c @@ -53,12 +53,7 @@ struct ap_socache_instance_t { */ #define DBM_FILE_MODE ( APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD ) -/* Check for definition of DEFAULT_REL_RUNTIMEDIR */ -#ifndef DEFAULT_REL_RUNTIMEDIR -#define DEFAULT_DBM_PREFIX "logs/socache-dbm-" -#else #define DEFAULT_DBM_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-dbm-" -#endif /* ### this should use apr_dbm_usednames. */ #if !defined(DBM_FILE_SUFFIX_DIR) && !defined(DBM_FILE_SUFFIX_PAG) diff --git a/modules/cache/mod_socache_shmcb.c b/modules/cache/mod_socache_shmcb.c index da7e1903b8d..ddc6d147d92 100644 --- a/modules/cache/mod_socache_shmcb.c +++ b/modules/cache/mod_socache_shmcb.c @@ -32,12 +32,7 @@ #define SHMCB_MAX_SIZE (64 * 1024 * 1024) -/* Check for definition of DEFAULT_REL_RUNTIMEDIR */ -#ifndef DEFAULT_REL_RUNTIMEDIR -#define DEFAULT_SHMCB_PREFIX "logs/socache-shmcb-" -#else #define DEFAULT_SHMCB_PREFIX DEFAULT_REL_RUNTIMEDIR "/socache-shmcb-" -#endif #define DEFAULT_SHMCB_SUFFIX ".cache" diff --git a/os/netware/netware_config_layout.h b/os/netware/netware_config_layout.h new file mode 100644 index 00000000000..29d3320ea72 --- /dev/null +++ b/os/netware/netware_config_layout.h @@ -0,0 +1,31 @@ +/* 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 netware/netware_config_layout.h + * @brief This provides layout definitions for non-autoconf-based NetWare + * builds, and is copied to include/ap_config_layout.h during the build. + */ + +#ifndef AP_CONFIG_LAYOUT_H +#define AP_CONFIG_LAYOUT_H + +/* Check for definition of DEFAULT_REL_RUNTIMEDIR */ +#ifndef DEFAULT_REL_RUNTIMEDIR +#define DEFAULT_REL_RUNTIMEDIR "logs" +#endif + +#endif /* AP_CONFIG_LAYOUT_H */ diff --git a/os/win32/win32_config_layout.h b/os/win32/win32_config_layout.h new file mode 100644 index 00000000000..5f770a283ca --- /dev/null +++ b/os/win32/win32_config_layout.h @@ -0,0 +1,31 @@ +/* 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 win32/win32_config_layout.h + * @brief This provides layout definitions for non-autoconf-based Windows + * builds, and is copied to include/ap_config_layout.h during the build. + */ + +#ifndef AP_CONFIG_LAYOUT_H +#define AP_CONFIG_LAYOUT_H + +/* Check for definition of DEFAULT_REL_RUNTIMEDIR */ +#ifndef DEFAULT_REL_RUNTIMEDIR +#define DEFAULT_REL_RUNTIMEDIR "logs" +#endif + +#endif /* AP_CONFIG_LAYOUT_H */ diff --git a/server/mpm/netware/mpm_default.h b/server/mpm/netware/mpm_default.h index 0314c4302a1..1859f4d9a06 100644 --- a/server/mpm/netware/mpm_default.h +++ b/server/mpm/netware/mpm_default.h @@ -60,11 +60,6 @@ #define DEFAULT_MIN_FREE_THREADS 10 #endif -/* Check for definition of DEFAULT_REL_RUNTIMEDIR */ -#ifndef DEFAULT_REL_RUNTIMEDIR -#define DEFAULT_REL_RUNTIMEDIR "logs" -#endif - /* Where the main/parent process's pid is logged */ /*#ifndef DEFAULT_PIDLOG #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid" diff --git a/server/mpm/winnt/mpm_default.h b/server/mpm/winnt/mpm_default.h index 7708b9237be..95143e311aa 100644 --- a/server/mpm/winnt/mpm_default.h +++ b/server/mpm/winnt/mpm_default.h @@ -55,11 +55,6 @@ */ #define HARD_SERVER_LIMIT 1 -/* Check for definition of DEFAULT_REL_RUNTIMEDIR */ -#ifndef DEFAULT_REL_RUNTIMEDIR -#define DEFAULT_REL_RUNTIMEDIR "logs" -#endif - /* Where the main/parent process's pid is logged */ #ifndef DEFAULT_PIDLOG #define DEFAULT_PIDLOG DEFAULT_REL_RUNTIMEDIR "/httpd.pid" diff --git a/server/util_mutex.c b/server/util_mutex.c index d3f6674af51..fec95d47fd4 100644 --- a/server/util_mutex.c +++ b/server/util_mutex.c @@ -154,11 +154,7 @@ AP_DECLARE_NONSTD(void) ap_mutex_init(apr_pool_t *p) /* initialize default mutex configuration */ def = apr_pcalloc(p, sizeof *def); def->mech = APR_LOCK_DEFAULT; -#ifdef DEFAULT_REL_RUNTIMEDIR def->dir = DEFAULT_REL_RUNTIMEDIR; -#else - def->dir = "logs"; -#endif apr_hash_set(mxcfg_by_type, "default", APR_HASH_KEY_STRING, def); }