diff --git a/libguile/hash.c b/libguile/hash.c index b0a81c999..3a335d209 100644 --- a/libguile/hash.c +++ b/libguile/hash.c @@ -167,15 +167,6 @@ scm_i_latin1_string_hash (const char *str, size_t len) uintptr_t scm_i_utf8_string_hash (const char *str, size_t len) { - const uint8_t *end, *ustr = (const uint8_t *) str; - uintptr_t ret; - - /* The length of the string in characters. This name corresponds to - Jenkins' original name. */ - size_t length; - - uint32_t a, b, c, u32; - if (len == (size_t) -1) len = strlen (str); @@ -431,11 +422,7 @@ SCM_DEFINE (scm_hashv, "hashv", 2, 0, 0, #define FUNC_NAME s_scm_hashv { uintptr_t sz = scm_to_unsigned_integer (size, 1, UINTPTR_MAX); -<<<<<<< HEAD - return scm_from_ulong (scm_ihashv (key, sz)); -======= return scm_from_unsigned_integer (scm_ihashv (key, sz)); ->>>>>>> 64dca4d57 (Store hashes as uintptr_t) } #undef FUNC_NAME diff --git a/libguile/integers.c b/libguile/integers.c index 1cb6938a8..161356c79 100644 --- a/libguile/integers.c +++ b/libguile/integers.c @@ -149,10 +149,10 @@ inum_magnitude (intptr_t i) return mag; } -static inline scm_t_inum +static inline scm_t_bits negative_inum (scm_t_bits mag) { - scm_t_inum i = ~mag + 1; + scm_t_bits i = ~mag + 1; ASSERT (i >= SCM_MOST_NEGATIVE_FIXNUM); return i; } @@ -2038,7 +2038,7 @@ scm_integer_gcd_zi (struct scm_bignum *x, intptr_t y) #if SCM_I_FIXNUM_BIT > SCM_LONG_BIT if (y > ULONG_MAX) { - struct scm_bignum *y_bignum = inum_to_bignum (y); + struct scm_bignum *y_bignum = intptr_t_to_bignum (y); return scm_integer_gcd_zz (x, y_bignum); } #endif diff --git a/libguile/numbers.c b/libguile/numbers.c index 0ac67876f..da0101209 100644 --- a/libguile/numbers.c +++ b/libguile/numbers.c @@ -6877,16 +6877,16 @@ scm_to_mpz (SCM val, mpz_t rop) { if (SCM_I_INUMP (val)) { - scm_t_inum inum = SCM_I_INUM (val); + intptr_t inum = SCM_I_INUM (val); #if SCM_LONG_BIT >= SCM_I_FIXNUM_BIT // Cast to long and directly pass to GMP. mpz_set_si (rop, (long)inum); #elif (2 * SCM_INTPTR_T_BIT) > SCM_I_FIXNUM_BIT - scm_t_inum inum_abs = inum; + intptr_t inum_abs = inum; if (inum < 0) inum_abs *= -1; intptr_t high = inum_abs >> (SCM_INTPTR_T_BIT - 1); - intptr_t low = (intptr_t)(inum_abs & ((((scm_t_inum)1) << (SCM_INTPTR_T_BIT - 1)) - 1)); + intptr_t low = (intptr_t)(inum_abs & ((((intptr_t)1) << (SCM_INTPTR_T_BIT - 1)) - 1)); mpz_set_si (rop, high); mpz_mul_2exp (rop, rop, SCM_INTPTR_T_BIT - 1); mpz_add_ui (rop, rop, low); diff --git a/libguile/posix-w32.c b/libguile/posix-w32.c index 6d5871d31..8013eac60 100644 --- a/libguile/posix-w32.c +++ b/libguile/posix-w32.c @@ -35,14 +35,9 @@ #include #include -<<<<<<< HEAD #include "gc.h" /* for scm_*alloc, scm_strdup */ #include "filename.h" #include "threads.h" /* for scm_i_scm_pthread_mutex_lock */ -======= -#include "gc.h" /* for scm_*alloc, scm_strdup */ -#include "threads.h" /* for scm_i_scm_pthread_mutex_lock */ ->>>>>>> bbd90294d (Win32: add replacement for mkdtemp) #include "posix-w32.h" diff --git a/test-suite/tests/i18n.test b/test-suite/tests/i18n.test index 89338ba52..fd1c75c0c 100644 --- a/test-suite/tests/i18n.test +++ b/test-suite/tests/i18n.test @@ -95,12 +95,8 @@ ;; Old MS is MinGW using deprecated MSVCRT C library. ;; MinGW with UCRT C library prefers BCP 47 and can fall back to Old MS. (define old-ms? -<<<<<<< HEAD (and (string-contains %host-type "-mingw32") (not (defined? '%UCRT)))) -======= - (string-contains %host-type "-mingw32")) ->>>>>>> 8a3ba5975 (In i18n test, modify locale testing to focus on UTF-8) (define %french-locale-name (if old-ms?