diff options
Diffstat (limited to 'ext/bigdecimal/bigdecimal.h')
-rw-r--r-- | ext/bigdecimal/bigdecimal.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ext/bigdecimal/bigdecimal.h b/ext/bigdecimal/bigdecimal.h index ae32d5ffc5..a53ad47e81 100644 --- a/ext/bigdecimal/bigdecimal.h +++ b/ext/bigdecimal/bigdecimal.h @@ -19,6 +19,25 @@ #include "ruby/ruby.h" #include <float.h> +#undef BDIGIT +#undef SIZEOF_BDIGITS +#undef BDIGIT_DBL +#undef BDIGIT_DBL_SIGNED +#undef PRI_BDIGIT_PREFIX +#undef PRI_BDIGIT_DBL_PREFIX + +#ifdef HAVE_INT64_T +# define BDIGIT uint32_t +# define BDIGIT_DBL uint64_t +# define BDIGIT_DBL_SIGNED int64_t +# define SIZEOF_BDIGITS 4 +#else +# define BDIGIT uint16_t +# define BDIGIT_DBL uint32_t +# define BDIGIT_DBL_SIGNED int32_t +# define SIZEOF_BDIGITS 2 +#endif + #if defined(__cplusplus) extern "C" { #if 0 |