diff options
author | Kevin Ryde <user42@zip.com.au> | 2004-04-27 22:19:41 +0000 |
---|---|---|
committer | Kevin Ryde <user42@zip.com.au> | 2004-04-27 22:19:41 +0000 |
commit | 857ae6afd302a7b0550a0a84d3239dddd8c90e63 (patch) | |
tree | fbcb78a45755d3240238872ca1bb6d73dd98acd3 | |
parent | 924532c8fd4d7d0ffe7663475845a5ad4c34ba9c (diff) | |
download | guile-857ae6afd302a7b0550a0a84d3239dddd8c90e63.tar.gz |
(scm_bit_extract): Use min instead of MIN.
(MIN): Remove, this conflicts with similar macro defined by limits.h
on HP-UX. Reported by Andreas Vögele.
-rw-r--r-- | libguile/numbers.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libguile/numbers.c b/libguile/numbers.c index 9188cd6c5..8b169d3d8 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -1794,8 +1794,6 @@ SCM_DEFINE (scm_ash, "ash", 2, 0, 0, #undef FUNC_NAME -#define MIN(x,y) ((x) < (y) ? (x) : (y)) - SCM_DEFINE (scm_bit_extract, "bit-extract", 3, 0, 0, (SCM n, SCM start, SCM end), "Return the integer composed of the @var{start} (inclusive)\n" @@ -1824,7 +1822,7 @@ SCM_DEFINE (scm_bit_extract, "bit-extract", 3, 0, 0, /* When istart>=SCM_I_FIXNUM_BIT we can just limit the shift to SCM_I_FIXNUM_BIT-1 to get either 0 or -1 per the sign of "in". */ - in = SCM_SRS (in, MIN (istart, SCM_I_FIXNUM_BIT-1)); + in = SCM_SRS (in, min (istart, SCM_I_FIXNUM_BIT-1)); if (in < 0 && bits >= SCM_I_FIXNUM_BIT) { @@ -1839,7 +1837,7 @@ SCM_DEFINE (scm_bit_extract, "bit-extract", 3, 0, 0, } /* mask down to requisite bits */ - bits = MIN (bits, SCM_I_FIXNUM_BIT); + bits = min (bits, SCM_I_FIXNUM_BIT); return SCM_MAKINUM (in & ((1L << bits) - 1)); } else if (SCM_BIGP (n)) |