1MAKE_VERSION(3)                 Allegro manual                 MAKE_VERSION(3)
2
3
4

NAME

6       MAKE_VERSION - Create a 32 bit integer from the Allegro version
7

SYNOPSIS

9       #include <allegro.h>
10
11
12       Macro MAKE_VERSION(a, b, c)
13

DESCRIPTION

15       This  macro  can  be  used to check if some Allegro version is (binary)
16       compatible with the current version. It is safe to use > and < to check
17       if  one  version  is  more  recent  than  another.  The third number is
18       ignored if the second number is  even,  so  MAKE_VERSION(4,  2,  0)  is
19       equivalent  to  MAKE_VERSION(4,  2, 1).  This is because of our version
20       numbering policy since 4.0.0: the second  number  is  even  for  stable
21       releases,  which  must  be  ABI-compatible with earlier versions of the
22       same series.  This macro  is  mainly  useful  for  addon  packages  and
23       libraries.  See the `ABI compatibility information' section of the man‐
24       ual for more detailed information. Example:
25
26          /* Check if the current version is compatible with Allegro 4.2.0 */
27          #if (MAKE_VERSION(4, 2, 0) <= MAKE_VERSION(ALLEGRO_VERSION, \
28                             ALLEGRO_SUB_VERSION, ALLEGRO_WIP_VERSION))
29             /* Allegro 4.2.0 compatibility */
30          #else
31             /* Work-around */
32          #endif
33
34

SEE ALSO

36       ALLEGRO_VERSION(3), ALLEGRO_SUB_VERSION(3), ALLEGRO_WIP_VERSION(3)
37
38
39
40Allegro                          version 4.4.3                 MAKE_VERSION(3)
Impressum