diff --git a/libguile/_scm.h b/libguile/_scm.h index e482b7e31..093815d98 100644 --- a/libguile/_scm.h +++ b/libguile/_scm.h @@ -248,7 +248,8 @@ void scm_ia64_longjmp (scm_i_jmp_buf *, int); /* Major and minor versions must be single characters. */ #define SCM_OBJCODE_MAJOR_VERSION 3 -#define SCM_OBJCODE_MINOR_VERSION 9 +#define SCM_OBJCODE_MINIMUM_MINOR_VERSION 9 +#define SCM_OBJCODE_MINOR_VERSION A #define SCM_OBJCODE_MAJOR_VERSION_STRING \ SCM_CPP_STRINGIFY(SCM_OBJCODE_MAJOR_VERSION) #define SCM_OBJCODE_MINOR_VERSION_STRING \ diff --git a/libguile/loader.c b/libguile/loader.c index 7b1adc9c9..54bf1bff5 100644 --- a/libguile/loader.c +++ b/libguile/loader.c @@ -296,12 +296,10 @@ process_dynamic_segment (char *base, Elf_Phdr *dyn_phdr, { case 0x0202: bytecode_kind = BYTECODE_KIND_GUILE_2_2; - /* As we get closer to 2.2, we will allow for backwards - compatibility and we can change this test to ">" - instead of "!=". However until then, to deal with VM - churn it's best to keep these things in - lock-step. */ - if (minor != SCM_OBJCODE_MINOR_VERSION) + if (minor < SCM_OBJCODE_MINIMUM_MINOR_VERSION) + return "incompatible bytecode version"; + /* FIXME for 3.0: Go back to integers. */ + if (minor > SCM_OBJCODE_MINOR_VERSION_STRING[0]) return "incompatible bytecode version"; break; default: diff --git a/module/system/vm/assembler.scm b/module/system/vm/assembler.scm index cfccd5b66..8d71dc551 100644 --- a/module/system/vm/assembler.scm +++ b/module/system/vm/assembler.scm @@ -1807,7 +1807,7 @@ needed." ;; FIXME: Define these somewhere central, shared with C. (define *bytecode-major-version* #x0202) -(define *bytecode-minor-version* 9) +(define *bytecode-minor-version* (char->integer #\A)) (define (link-dynamic-section asm text rw rw-init frame-maps) "Link the dynamic section for an ELF image with bytecode @var{text},