mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1273048 - Add MOZ_GCC_VERSION_AT_MOST macro. r=froydnj
MozReview-Commit-ID: 4VjAra5B6GM --HG-- extra : transplant_source : %D3%C7C%05%7EB%24%90q%D3%22%C8%F5%8F%C7%C3%B4%00%A6%E2
This commit is contained in:
parent
01cb7efe41
commit
97c2e11d8c
@ -17,12 +17,15 @@
|
||||
# undef MOZ_IS_GCC
|
||||
# define MOZ_IS_GCC 1
|
||||
/*
|
||||
* This macro should simplify gcc version checking. For example, to check
|
||||
* These macros should simplify gcc version checking. For example, to check
|
||||
* for gcc 4.7.1 or later, check `#if MOZ_GCC_VERSION_AT_LEAST(4, 7, 1)`.
|
||||
*/
|
||||
# define MOZ_GCC_VERSION_AT_LEAST(major, minor, patchlevel) \
|
||||
((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) \
|
||||
>= ((major) * 10000 + (minor) * 100 + (patchlevel)))
|
||||
# define MOZ_GCC_VERSION_AT_MOST(major, minor, patchlevel) \
|
||||
((__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__) \
|
||||
<= ((major) * 10000 + (minor) * 100 + (patchlevel)))
|
||||
# if !MOZ_GCC_VERSION_AT_LEAST(4, 8, 0)
|
||||
# error "mfbt (and Gecko) require at least gcc 4.8 to build."
|
||||
# endif
|
||||
|
Loading…
Reference in New Issue
Block a user