ap_mmn.h revision 1dfb5e008f35ed13c343b7f6306675e33c399792
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard/* ====================================================================
5a4b3207b395b426c5a9066f4afea8d3fa8c6660stoddard * The Apache Software License, Version 1.1
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * Copyright (c) 2000-2001 The Apache Software Foundation. All rights
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * reserved.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * Redistribution and use in source and binary forms, with or without
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * modification, are permitted provided that the following conditions
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * are met:
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 1. Redistributions of source code must retain the above copyright
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * notice, this list of conditions and the following disclaimer.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 2. Redistributions in binary form must reproduce the above copyright
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * notice, this list of conditions and the following disclaimer in
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * the documentation and/or other materials provided with the
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * distribution.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 3. The end-user documentation included with the redistribution,
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * if any, must include the following acknowledgment:
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * "This product includes software developed by the
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * Apache Software Foundation (http://www.apache.org/)."
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * Alternately, this acknowledgment may appear in the software itself,
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * if and wherever such third-party acknowledgments normally appear.
5a4b3207b395b426c5a9066f4afea8d3fa8c6660stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 4. The names "Apache" and "Apache Software Foundation" must
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * not be used to endorse or promote products derived from this
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * software without prior written permission. For written
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * permission, please contact apache@apache.org.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 5. Products derived from this software may not be called "Apache",
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * nor may "Apache" appear in their name, without prior written
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * permission of the Apache Software Foundation.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
fb929740692fe796b467212ec57aa34cebb562cfwrowe * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
fb929740692fe796b467212ec57aa34cebb562cfwrowe * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * SUCH DAMAGE.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * ====================================================================
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * This software consists of voluntary contributions made by many
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * individuals on behalf of the Apache Software Foundation. For more
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * information on the Apache Software Foundation, please see
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * <http://www.apache.org/>.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard */
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#ifndef APACHE_AP_MMN_H
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#define APACHE_AP_MMN_H
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard/**
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * @package Module Magic Number
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard */
fb929740692fe796b467212ec57aa34cebb562cfwrowe
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard/*
fb929740692fe796b467212ec57aa34cebb562cfwrowe * MODULE_MAGIC_NUMBER_MAJOR
fb929740692fe796b467212ec57aa34cebb562cfwrowe * Major API changes that could cause compatibility problems for older modules
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * such as structure size changes. No binary compatibility is possible across
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * a change in the major version.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * MODULE_MAGIC_NUMBER_MINOR
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * Minor API changes that do not cause binary compatibility problems.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * Should be reset to 0 when upgrading MODULE_MAGIC_NUMBER_MAJOR.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard *
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * See the MODULE_MAGIC_AT_LEAST macro below for an example.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard */
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard/*
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20010224 (2.0.13-dev) MODULE_MAGIC_COOKIE reset to "AP20"
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20010523 (2.0.19-dev) bump for scoreboard structure reordering
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20010627 (2.0.19-dev) more API changes than I can count
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20010726 (2.0.22-dev) more big API changes
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20010808 (2.0.23-dev) dir d_is_absolute bit introduced, bucket changes, etc
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20010825 (2.0.25-dev) removed d_is_absolute, introduced map_to_storage hook
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20011002 (2.0.26-dev) removed 1.3-depreciated request_rec.content_language
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20011127 (2.0.29-dev) bump for postconfig hook change, and removal of socket
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * from connection record
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * 20011212 (2.0.30-dev) bump for new used_path_info member of request_rec
83cb9e783386a18eecdb0749d9d17aa8e3bc012estoddard * 20011218 (2.0.30-dev) bump for new sbh member of conn_rec, different
83cb9e783386a18eecdb0749d9d17aa8e3bc012estoddard * declarations for scoreboard, new parameter to
83cb9e783386a18eecdb0749d9d17aa8e3bc012estoddard * create_connection hook
83cb9e783386a18eecdb0749d9d17aa8e3bc012estoddard * 20020102 (2.0.30-dev) bump for changed type of limit_req_body in
43681d859fe7d4cd90a33d6be2232192c108de75wrowe * core_dir_config
43681d859fe7d4cd90a33d6be2232192c108de75wrowe * 20020109 (2.0.31-dev) bump for changed shm and scoreboard declarations
43681d859fe7d4cd90a33d6be2232192c108de75wrowe * 20020111 (2.0.31-dev) bump for ETag fields added at end of cor_dir_config
43681d859fe7d4cd90a33d6be2232192c108de75wrowe * 20020114 (2.0.31-dev) mod_dav changed how it asks its provider to fulfill
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * a GET request
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard */
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#define MODULE_MAGIC_COOKIE 0x41503230UL /* "AP20" */
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#ifndef MODULE_MAGIC_NUMBER_MAJOR
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#define MODULE_MAGIC_NUMBER_MAJOR 20020114
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#endif
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#define MODULE_MAGIC_NUMBER_MINOR 0 /* 0...n */
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR /* backward compat */
43681d859fe7d4cd90a33d6be2232192c108de75wrowe
43681d859fe7d4cd90a33d6be2232192c108de75wrowe/**
43681d859fe7d4cd90a33d6be2232192c108de75wrowe * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
43681d859fe7d4cd90a33d6be2232192c108de75wrowe * specified value.
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * <pre>
8e117661fd51fd19d6430fca8d7ae87c67d6de20stoddard * Useful for testing for features.
* For example, suppose you wish to use the apr_table_overlap
* function. You can do this:
*
* #if MODULE_MAGIC_AT_LEAST(19980812,2)
* ... use apr_table_overlap()
* #else
* ... alternative code which doesn't use apr_table_overlap()
* #endif
* </pre>
* @param major The major module magic number
* @param minor The minor module magic number
* @deffunc MODULE_MAGIC_AT_LEAST(int major, int minor)
*/
#define MODULE_MAGIC_AT_LEAST(major,minor) \
((major) > MODULE_MAGIC_NUMBER_MAJOR \
|| ((major) == MODULE_MAGIC_NUMBER_MAJOR \
&& (minor) >= MODULE_MAGIC_NUMBER_MINOR))
#endif /* !APACHE_AP_MMN_H */