]> granicus.if.org Git - apache/commitdiff
Imagine the horror. I go to try compiling PHP4, and it bombs out on
authorCliff Woolley <jwoolley@apache.org>
Thu, 30 May 2002 05:57:33 +0000 (05:57 +0000)
committerCliff Woolley <jwoolley@apache.org>
Thu, 30 May 2002 05:57:33 +0000 (05:57 +0000)
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

include/ap_mmn.h

index 705b0cba624ba554cf627f1c1458daf6cf2dedf2..dda00bed36ddc3f7e5db78a2e3f64971b7cb31c4 100644 (file)
 #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
  * 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()
  * </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 */