Mercurial > hg-stable
changeset 19753:2c9645c0a582
util.h: fix gcc version checking
gcc doesn't have a predefined GCC_VERSION macro.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 19 Sep 2013 09:45:00 -0700 |
parents | 11fdf9f754b7 |
children | c35e8805cf53 |
files | mercurial/util.h |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.h Mon Sep 16 01:08:29 2013 -0700 +++ b/mercurial/util.h Thu Sep 19 09:45:00 2013 -0700 @@ -156,7 +156,7 @@ { return _byteswap_ulong(*(uint32_t *)c); } -#elif GCC_VERSION >= 403 +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) static inline uint32_t getbe32(const char *c) { return __builtin_bswap32(*(uint32_t *)c); @@ -179,7 +179,7 @@ x = _byteswap_ulong(x); *(uint32_t *)c = x; } -#elif GCC_VERSION >= 403 +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3) static inline void putbe32(uint32_t x, char *c) { x = __builtin_bswap32(x);