1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
#if !defined(__IBMC__) && !defined(__xlC__)
# error "This header should only be used with IBM XLC!"
#endif
/* For detection and version checking, IBM XLC provides the `__IBMC__`,
* `__xlc__`, `__xlC__` and `__xlC_ver__` macros.
* `__IBMC__` is probably historical, so it should be checked if no other
* macro is there. `__xlc__` is unusable for version checking,
* so I'll be using the other macros.
*
* `__IBMC__` is as VRM (in base 10), where V is the version number (major),
* R is the release number (minor), and M is the modification number (patch?).
*
* `__xlc__` is a string of the format "V.R.M.F", where V represents the
* version number (major), R represents the release number (minor), M
* represents the modification number and F is the fix level (patch?).
*
* `__xlC__` indicates the VR level of the XL compiler version
* in the 0xVVRR format, where 'VV' represents the version number (major),
* and 'RR' represents the release number (minor).
*
* `__xlC_ver__` indicates the MF level of the XL compiler version
* in the 0x0000MMFF format, where 'MM' represents the version number,
* and 'RR' represents the release number. */
#if defined(__xlC__)
# define __XLC_PREREQ(_VER, _REL) \
((__xlC__) >= ((_VER) << 8) | ((_REL) << 8))
#else /* defined(__IBMC__) */
# define __XLC_PREREQ(_MAJ, _MIN) \
((__IBMC__) >= (_MAJ) * 100 + (_MIN) * 10)
#endif
|