Apache2
Module Magic Number
Collaboration diagram for Module Magic Number:

Macros

#define MODULE_MAGIC_COOKIE   0x41503235UL /* "AP25" */
 
#define MODULE_MAGIC_NUMBER_MAJOR   20211221
 
#define MODULE_MAGIC_NUMBER_MINOR   8 /* 0...n */
 
#define AP_MODULE_MAGIC_AT_LEAST(major, minor)
 
#define MODULE_MAGIC_NUMBER   MODULE_MAGIC_NUMBER_MAJOR
 
#define MODULE_MAGIC_AT_LEAST   old_broken_macro_we_hope_you_are_not_using
 

Detailed Description

MODULE_MAGIC_NUMBER_MAJOR
Major API changes that could cause compatibility problems for older modules such as structure size changes. No binary compatibility is possible across a change in the major version.

MODULE_MAGIC_NUMBER_MINOR
Minor API changes that do not cause binary compatibility problems. Should be reset to 0 when upgrading MODULE_MAGIC_NUMBER_MAJOR.

See the AP_MODULE_MAGIC_AT_LEAST macro below for an example.

Macro Definition Documentation

◆ AP_MODULE_MAGIC_AT_LEAST

#define AP_MODULE_MAGIC_AT_LEAST (   major,
  minor 
)
Value:
|| ((major) == MODULE_MAGIC_NUMBER_MAJOR \
&& (minor) <= MODULE_MAGIC_NUMBER_MINOR))

Determine if the server's current MODULE_MAGIC_NUMBER is at least a specified value.

Useful for testing for features. For example, suppose you wish to use the apr_table_overlap function. You can do this:

#if AP_MODULE_MAGIC_AT_LEAST(19980812,2)
#else
... alternative code which doesn't use apr_table_overlap()
#endif
Parameters
majorThe major module magic number.
minorThe minor module magic number.

◆ MODULE_MAGIC_AT_LEAST

#define MODULE_MAGIC_AT_LEAST   old_broken_macro_we_hope_you_are_not_using
Deprecated:
Use AP_MODULE_MAGIC_AT_LEAST.

◆ MODULE_MAGIC_COOKIE

#define MODULE_MAGIC_COOKIE   0x41503235UL /* "AP25" */

◆ MODULE_MAGIC_NUMBER

#define MODULE_MAGIC_NUMBER   MODULE_MAGIC_NUMBER_MAJOR
Deprecated:
Present for backwards compatibility.

◆ MODULE_MAGIC_NUMBER_MAJOR

#define MODULE_MAGIC_NUMBER_MAJOR   20211221

◆ MODULE_MAGIC_NUMBER_MINOR

#define MODULE_MAGIC_NUMBER_MINOR   8 /* 0...n */
apr_table_overlap
void apr_table_overlap(apr_table_t *a, const apr_table_t *b, unsigned flags)
MODULE_MAGIC_NUMBER_MINOR
#define MODULE_MAGIC_NUMBER_MINOR
Definition: ap_mmn.h:721
MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_NUMBER_MAJOR
Definition: ap_mmn.h:719