diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-12 12:01:51 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-04-12 12:01:51 +0000 |
commit | 16a2acca20c3ddc0454331df4c6a0cd2a8a0807c (patch) | |
tree | 062957e8ec2437e353f2919ceb7dd03461da8efb /internal.h | |
parent | 3da834800e40980d7a75b82cc1a3b1abd9539e99 (diff) | |
download | ruby-16a2acca20c3ddc0454331df4c6a0cd2a8a0807c.tar.gz |
* bignum.c (ones): Use __builtin_popcountl if available.
* internal.h (GCC_VERSION_SINCE): Macro moved from pack.c.
* pack.c: Include internal.h for GCC_VERSION_SINCE.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 964f8a3467..90388533dc 100644 --- a/internal.h +++ b/internal.h @@ -19,6 +19,12 @@ extern "C" { #endif #endif +#define GCC_VERSION_SINCE(major, minor, patchlevel) \ + (defined(__GNUC__) && !defined(__INTEL_COMPILER) && \ + ((__GNUC__ > (major)) || \ + (__GNUC__ == (major) && __GNUC_MINOR__ > (minor)) || \ + (__GNUC__ == (major) && __GNUC_MINOR__ == (minor) && __GNUC_PATCHLEVEL__ >= (patchlevel)))) + #if SIGNEDNESS_OF_TIME_T < 0 /* signed */ # define TIMET_MAX (time_t)((~(unsigned_time_t)0) >> 1) # define TIMET_MIN (time_t)(((unsigned_time_t)1) << (sizeof(time_t) * CHAR_BIT - 1)) |