summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/txr.c b/txr.c
index ef82c84a..56d67771 100644
--- a/txr.c
+++ b/txr.c
@@ -316,7 +316,7 @@ static void sysroot_init(void)
sysroot_path = prog_dir;
}
- stdlib_path = sysroot(lit("share/txr/stdlib"));
+ stdlib_path = sysroot(lit("share/txr/stdlib/"));
reg_varl(intern(lit("stdlib"), user_package), stdlib_path);
reg_varl(intern(lit("*txr-version*"), user_package),
@@ -326,6 +326,13 @@ static void sysroot_init(void)
reg_varl(intern(lit("txr-path"), user_package), prog_dir);
}
+static void sysroot_compat_fixup(int compat_ver)
+{
+ if (compat_ver <= 143)
+ reg_varl(intern(lit("stdlib"), user_package),
+ sysroot(lit("share/txr/stdlib")));
+}
+
static int license(void)
{
int retval = EXIT_SUCCESS;
@@ -411,6 +418,7 @@ static int compat(val optval)
return 0;
}
+ sysroot_compat_fixup(compat);
opt_compat = compat;
return 1;
}