Commit 412b9c17 authored by Cliff Woolley's avatar Cliff Woolley
Browse files

Imagine the horror. I go to try compiling PHP4, and it bombs out on

r->boundary.  BUT WAIT, I say, we have a test in there for that:
#if !MODULE_MAGIC_AT_LEAST(20020506,0).  The test doesn't seem to be
working.  That's odd, I think.  So I go look at the ap_mmn.h.  Egad,
the tests are totally backwards.  How on earth are we going to handle this?
Surely it's wrong in 1.3.x as well.  So I go look.  Nope, turns out it
got fixed TWO YEARS AGO in that repository.  Sigh.  Anyway, thanks Greg.
:)

Submitted by:	Greg Stein, circa Apache 1.3.13


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95388 13f79535-47bb-0310-9956-ffa450edef68
parent f50d71cd
Loading
Loading
Loading
Loading
+9 −6
Changes for include/ap_mmn.h: 9 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -114,7 +114,6 @@
#define MODULE_MAGIC_NUMBER_MAJOR 20020529
#endif
#define MODULE_MAGIC_NUMBER_MINOR 0                     /* 0...n */
#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR	/* backward compat */

/**
 * Determine if the server's current MODULE_MAGIC_NUMBER is at least a
@@ -124,7 +123,7 @@
 * For example, suppose you wish to use the apr_table_overlap
 *    function.  You can do this:
 * 
 * #if MODULE_MAGIC_AT_LEAST(19980812,2)
 * #if AP_MODULE_MAGIC_AT_LEAST(19980812,2)
 *     ... use apr_table_overlap()
 * #else
 *     ... alternative code which doesn't use apr_table_overlap()
@@ -132,11 +131,15 @@
 * </pre>
 * @param major The major module magic number
 * @param minor The minor module magic number
 * @deffunc MODULE_MAGIC_AT_LEAST(int major, int minor)
 * @deffunc AP_MODULE_MAGIC_AT_LEAST(int major, int minor)
 */
#define MODULE_MAGIC_AT_LEAST(major,minor)		\
    ((major) > MODULE_MAGIC_NUMBER_MAJOR 		\
#define AP_MODULE_MAGIC_AT_LEAST(major,minor)		\
    ((major) < MODULE_MAGIC_NUMBER_MAJOR 		\
	|| ((major) == MODULE_MAGIC_NUMBER_MAJOR 	\
	    && (minor) >= MODULE_MAGIC_NUMBER_MINOR))
	    && (minor) <= MODULE_MAGIC_NUMBER_MINOR))

/** @deprecated present for backwards compatibility */
#define MODULE_MAGIC_NUMBER MODULE_MAGIC_NUMBER_MAJOR
#define MODULE_MAGIC_AT_LEAST old_broken_macro_we_hope_you_are_not_using

#endif /* !APACHE_AP_MMN_H */