From fe92459368239aa9a8448f5b49b2882f07d9932d Mon Sep 17 00:00:00 2001 From: Lassi Kortela Date: Mon, 14 Oct 2019 19:40:37 +0300 Subject: [PATCH] Add some consts --- c/env_release.c | 4 ++-- c/libraries.c | 3 +++ c/scheme.h | 14 +++++++------- scripts/build.sh | 10 +++++----- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/c/env_release.c b/c/env_release.c index 48c896d..22f7895 100644 --- a/c/env_release.c +++ b/c/env_release.c @@ -1,4 +1,4 @@ // Latest release on which this build is based. -char env_release[] = "0.0.0"; -char env_release_date[] = "1970-01-01"; +const char env_release[] = "0.0.0"; +const char env_release_date[] = "1970-01-01"; diff --git a/c/libraries.c b/c/libraries.c index 7761128..36584c0 100644 --- a/c/libraries.c +++ b/c/libraries.c @@ -50,6 +50,9 @@ struct builtin_library { // Up Scheme libraries #define UP_2019 (1 << 20) +const char *upscheme_stable_specs[] = { 0 }; +const char upscheme_unstable_spec[] = "2019"; + static struct builtin_procedure builtin_procedures[] = { #if 0 { "create-directory", fs_create_directory, SRFI_170 | UP_2019 }, diff --git a/c/scheme.h b/c/scheme.h index aa477d9..49b1d4e 100644 --- a/c/scheme.h +++ b/c/scheme.h @@ -1005,14 +1005,14 @@ const char *env_get_os_name(void); value_t builtin_environment_stack(value_t *args, uint32_t nargs); -extern char env_build_cc[]; -extern char env_build_cflags[]; -extern char env_build_lflags[]; -extern char env_build_revision[]; -extern char env_build_date[]; +extern const char env_build_cc[]; +extern const char env_build_cflags[]; +extern const char env_build_lflags[]; +extern const char env_build_revision[]; +extern const char env_build_date[]; -extern char env_release[]; -extern char env_release_date[]; +extern const char env_release[]; +extern const char env_release_date[]; //// #include "libraries.h" diff --git a/scripts/build.sh b/scripts/build.sh index 2b40890..f408dbd 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -92,11 +92,11 @@ set -x cat >c/env_build.c <