diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-07 03:09:15 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-07 03:09:15 +0000 |
commit | 570015a18b38792f3ced4c1d53945fd46d3ebe17 (patch) | |
tree | 3c119cd9030d69351aab5326ca276536490854a9 /pack.c | |
parent | 9e08404b8a60487ab0d5ba9643a2e02f05d76310 (diff) |
* pack.c (swap32): Don't redefine it if it is already defined.
Bionic defines it.
(swap64): Ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40594 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 13 |
1 files changed, 10 insertions, 3 deletions
@@ -100,9 +100,16 @@ TOKEN_PASTE(swap,x)(xtype z) \ return r; \ } -#if GCC_VERSION_SINCE(4,3,0) -# define swap32(x) __builtin_bswap32(x) -# define swap64(x) __builtin_bswap64(x) +#ifndef swap32 +# if GCC_VERSION_SINCE(4,3,0) +# define swap32(x) __builtin_bswap32(x) +# endif +#endif + +#ifndef swap64 +# if GCC_VERSION_SINCE(4,3,0) +# define swap64(x) __builtin_bswap64(x) +# endif #endif #ifndef swap16 |