]> code.delx.au - gnu-emacs/commitdiff
Fix GNUC_PREREQ for GCC 2.8.1 etc.
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Jun 2016 20:21:49 +0000 (22:21 +0200)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 26 Jun 2016 20:22:40 +0000 (22:22 +0200)
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2016-06/msg00608.html
* src/conf_post.h (GNUC_PREREQ): Port to GCC versions like GCC
2.8.1 (1998), which come before GCC 3.0 and which have nonzero
patchlevel numbers.

src/conf_post.h

index 69b981feef6952cb04917fb113e05dd49c76812a..99aafbffae671e1cbca0ef0f7fa17ed97155aaed 100644 (file)
@@ -39,7 +39,8 @@ along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.  */
 #ifndef __GNUC_MINOR__
 # define GNUC_PREREQ(v, w, x) false
 #elif ! defined __GNUC_PATCHLEVEL__
-# define GNUC_PREREQ(v, w, x) ((v) < __GNUC__ + ((w) <= __GNUC_MINOR__))
+# define GNUC_PREREQ(v, w, x) \
+    ((v) < __GNUC__ + ((w) < __GNUC_MINOR__ + ((x) == 0))
 #else
 # define GNUC_PREREQ(v, w, x) \
     ((v) < __GNUC__ + ((w) < __GNUC_MINOR__ + ((x) <= __GNUC_PATCHLEVEL__)))