summaryrefslogtreecommitdiff
path: root/module/texinfo/string-utils.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2016-04-06 17:36:57 -0400
committerAndy Wingo <wingo@pobox.com>2017-03-01 19:08:42 +0100
commit1d257c27f004fe4db81d62033b5cf2d8fafcd68f (patch)
treeb411ac6606fa9f64e502d51e59e9a6b042a7f785 /module/texinfo/string-utils.scm
parenta8d1c7d61018bb2c77c6ffd57f3c1672361ce1e9 (diff)
downloadguile-1d257c27f004fe4db81d62033b5cf2d8fafcd68f.tar.gz
Do not assume that sizeof (long) == sizeof (void *) == sizeof (SCM).
This assumption does not hold on systems that use the LLP64 data model. Partially fixes <https://debbugs.gnu.org/22406>. Reported by Peter TB Brett <peter@peter-b.co.uk>. * libguile/numbers.h (scm_t_inum): Move here from numbers.c, and change to be equivalent to 'long' (formerly 'scm_t_signed_bits'). (SCM_MOST_POSITIVE_FIXNUM, SCM_MOST_NEGATIVE_FIXNUM): Define based on SCM_I_FIXNUM_BIT instead of SCM_T_SIGNED_BITS_MAX. (SCM_I_INUM): Adjust definitions to return a 'scm_t_inum', and avoiding the assumption that SCM_UNPACK returns a 'long'. * libguile/numbers.c (scm_t_inum): Move definition to numbers.h. Verify that 'scm_t_inum' fits within a SCM value. (scm_i_inum2big): Remove preprocessor code that forced a compile error unless sizeof (long) == sizeof (void *).
Diffstat (limited to 'module/texinfo/string-utils.scm')
0 files changed, 0 insertions, 0 deletions