diff --git a/libguile/debug.c b/libguile/debug.c index dd65de45c..e059a3135 100644 --- a/libguile/debug.c +++ b/libguile/debug.c @@ -82,7 +82,7 @@ scm_t_option scm_debug_opts[] = { for anyone!) or a whoppin' 1280 KB on 64-bit arches. */ { SCM_OPTION_INTEGER, "stack", 160000, "Stack size limit (measured in words; 0 = no check)." }, - { SCM_OPTION_SCM, "show-file-name", (unsigned long)SCM_BOOL_T, + { SCM_OPTION_SCM, "show-file-name", (scm_t_bits)SCM_BOOL_T, "Show file names and line numbers " "in backtraces when not `#f'. A value of `base' " "displays only base names, while `#t' displays full names."}, diff --git a/libguile/eval.c b/libguile/eval.c index 293612ed8..414645fca 100644 --- a/libguile/eval.c +++ b/libguile/eval.c @@ -1009,7 +1009,7 @@ boot_closure_print (SCM closure, SCM port, scm_print_state *pstate) { SCM args; scm_puts ("#= (parent_base + parent_data->len + parent_data->metalen - sizeof (struct scm_objcode))) - scm_misc_error (FUNC_NAME, "offset out of bounds (~a vs ~a + ~a + ~a)", - scm_list_4 (scm_from_ulong ((unsigned long) ptr), - scm_from_ulong ((unsigned long) parent_base), - scm_from_uint32 (parent_data->len), - scm_from_uint32 (parent_data->metalen))); + scm_misc_error + (FUNC_NAME, "offset out of bounds (~a vs ~a + ~a + ~a)", + scm_list_4 (scm_from_unsigned_integer ((scm_t_bits) ptr), + scm_from_unsigned_integer ((scm_t_bits) parent_base), + scm_from_uint32 (parent_data->len), + scm_from_uint32 (parent_data->metalen))); /* Make sure bytecode for the objcode-meta is suitable aligned. Failing to do so leads to SIGBUS/SIGSEGV on some arches (e.g., SPARC). */ diff --git a/libguile/print.c b/libguile/print.c index 8c807bbaf..f62378f46 100644 --- a/libguile/print.c +++ b/libguile/print.c @@ -89,11 +89,11 @@ static const char *iflagnames[] = SCM_SYMBOL (sym_reader, "reader"); scm_t_option scm_print_opts[] = { - { SCM_OPTION_SCM, "highlight-prefix", (unsigned long)SCM_BOOL_F, + { SCM_OPTION_SCM, "highlight-prefix", (scm_t_bits)SCM_BOOL_F, "The string to print before highlighted values." }, - { SCM_OPTION_SCM, "highlight-suffix", (unsigned long)SCM_BOOL_F, + { SCM_OPTION_SCM, "highlight-suffix", (scm_t_bits)SCM_BOOL_F, "The string to print after highlighted values." }, - { SCM_OPTION_SCM, "quote-keywordish-symbols", (unsigned long)SCM_BOOL_F, + { SCM_OPTION_SCM, "quote-keywordish-symbols", (scm_t_bits)SCM_BOOL_F, "How to print symbols that have a colon as their first or last character. " "The value '#f' does not quote the colons; '#t' quotes them; " "'reader' quotes them when the reader option 'keywords' is not '#f'." diff --git a/libguile/programs.c b/libguile/programs.c index 4404f832a..8b769a576 100644 --- a/libguile/programs.c +++ b/libguile/programs.c @@ -131,7 +131,7 @@ SCM_DEFINE (scm_program_base, "program-base", 1, 0, 0, SCM_VALIDATE_PROGRAM (1, program); c_objcode = SCM_PROGRAM_DATA (program); - return scm_from_ulong ((unsigned long) SCM_C_OBJCODE_BASE (c_objcode)); + return scm_from_unsigned_integer ((scm_t_bits) SCM_C_OBJCODE_BASE (c_objcode)); } #undef FUNC_NAME diff --git a/libguile/read.c b/libguile/read.c index 52ec20d9a..18047d80d 100644 --- a/libguile/read.c +++ b/libguile/read.c @@ -69,7 +69,7 @@ scm_t_option scm_read_opts[] = { "Record positions of source code expressions." }, { SCM_OPTION_BOOLEAN, "case-insensitive", 0, "Convert symbols to lower case."}, - { SCM_OPTION_SCM, "keywords", (unsigned long) SCM_BOOL_F, + { SCM_OPTION_SCM, "keywords", (scm_t_bits) SCM_BOOL_F, "Style of keyword recognition: #f, 'prefix or 'postfix."}, { SCM_OPTION_BOOLEAN, "r6rs-hex-escapes", 0, "Use R6RS variable-length character and string hex escapes."}, diff --git a/libguile/struct.c b/libguile/struct.c index c784f59bb..e5ecc1aaf 100644 --- a/libguile/struct.c +++ b/libguile/struct.c @@ -926,7 +926,8 @@ SCM_DEFINE (scm_struct_vtable_tag, "struct-vtable-tag", 1, 0, 0, #define FUNC_NAME s_scm_struct_vtable_tag { SCM_VALIDATE_VTABLE (1, handle); - return scm_from_ulong (((unsigned long)SCM_STRUCT_DATA (handle)) >> 3); + return scm_from_unsigned_integer + (((scm_t_bits)SCM_STRUCT_DATA (handle)) >> 3); } #undef FUNC_NAME diff --git a/libguile/vm.c b/libguile/vm.c index e1a90e127..c08b084e6 100644 --- a/libguile/vm.c +++ b/libguile/vm.c @@ -606,7 +606,7 @@ SCM_DEFINE (scm_vm_ip, "vm:ip", 1, 0, 0, #define FUNC_NAME s_scm_vm_ip { SCM_VALIDATE_VM (1, vm); - return scm_from_ulong ((unsigned long) SCM_VM_DATA (vm)->ip); + return scm_from_unsigned_integer ((scm_t_bits) SCM_VM_DATA (vm)->ip); } #undef FUNC_NAME @@ -616,7 +616,7 @@ SCM_DEFINE (scm_vm_sp, "vm:sp", 1, 0, 0, #define FUNC_NAME s_scm_vm_sp { SCM_VALIDATE_VM (1, vm); - return scm_from_ulong ((unsigned long) SCM_VM_DATA (vm)->sp); + return scm_from_unsigned_integer ((scm_t_bits) SCM_VM_DATA (vm)->sp); } #undef FUNC_NAME @@ -626,7 +626,7 @@ SCM_DEFINE (scm_vm_fp, "vm:fp", 1, 0, 0, #define FUNC_NAME s_scm_vm_fp { SCM_VALIDATE_VM (1, vm); - return scm_from_ulong ((unsigned long) SCM_VM_DATA (vm)->fp); + return scm_from_unsigned_integer ((scm_t_bits) SCM_VM_DATA (vm)->fp); } #undef FUNC_NAME