summaryrefslogtreecommitdiffstats
path: root/include/ap_mmn.h
diff options
context:
space:
mode:
authorCliff Woolley <jwoolley@apache.org>2002-05-30 07:57:33 +0200
committerCliff Woolley <jwoolley@apache.org>2002-05-30 07:57:33 +0200
commit4055e1db50efc177b96b7fa5cead72aab108b745 (patch)
tree8fde1cdea17c3148a357df56407aaf17db94124e /include/ap_mmn.h
parent Now a moot issue. (diff)
downloadapache2-4055e1db50efc177b96b7fa5cead72aab108b745.tar.xz
apache2-4055e1db50efc177b96b7fa5cead72aab108b745.zip
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
Diffstat (limited to 'include/ap_mmn.h')
-rw-r--r--include/ap_mmn.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/ap_mmn.h b/include/ap_mmn.h
index 705b0cba62..dda00bed36 100644
--- a/include/ap_mmn.h
+++ b/include/ap_mmn.h
@@ -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 */