mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 05:39:18 +02:00
image options are harmless in non-image build; images not supported on 32-bit arch
This commit is contained in:
parent
306cc73bd6
commit
4335d238fb
2 changed files with 5 additions and 3 deletions
|
@ -835,7 +835,7 @@
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SEXP_USE_IMAGE_LOADING
|
#ifndef SEXP_USE_IMAGE_LOADING
|
||||||
#define SEXP_USE_IMAGE_LOADING SEXP_USE_DL && !SEXP_USE_GLOBAL_HEAP && !SEXP_USE_BOEHM && !SEXP_USE_NO_FEATURES
|
#define SEXP_USE_IMAGE_LOADING SEXP_USE_DL && SEXP_64_BIT && !SEXP_USE_GLOBAL_HEAP && !SEXP_USE_BOEHM && !SEXP_USE_NO_FEATURES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef SEXP_USE_UNSAFE_PUSH
|
#ifndef SEXP_USE_UNSAFE_PUSH
|
||||||
|
|
6
main.c
6
main.c
|
@ -439,9 +439,9 @@ sexp run_main (int argc, char **argv) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
#if SEXP_USE_IMAGE_LOADING
|
|
||||||
case 'i':
|
case 'i':
|
||||||
arg = ((argv[i][2] == '\0') ? argv[++i] : argv[i]+2);
|
arg = ((argv[i][2] == '\0') ? argv[++i] : argv[i]+2);
|
||||||
|
#if SEXP_USE_IMAGE_LOADING
|
||||||
if (ctx) {
|
if (ctx) {
|
||||||
fprintf(stderr, "-i <file>: image files must be loaded before other command-line options are specified: %s\n", arg);
|
fprintf(stderr, "-i <file>: image files must be loaded before other command-line options are specified: %s\n", arg);
|
||||||
if (sexp_truep(sexp_global(ctx, SEXP_G_STRICT_P)))
|
if (sexp_truep(sexp_global(ctx, SEXP_G_STRICT_P)))
|
||||||
|
@ -457,6 +457,7 @@ sexp run_main (int argc, char **argv) {
|
||||||
env = sexp_load_standard_params(ctx, sexp_context_env(ctx), nonblocking);
|
env = sexp_load_standard_params(ctx, sexp_context_env(ctx), nonblocking);
|
||||||
init_loaded++;
|
init_loaded++;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case 'd':
|
case 'd':
|
||||||
if (! init_loaded++) {
|
if (! init_loaded++) {
|
||||||
|
@ -464,14 +465,15 @@ sexp run_main (int argc, char **argv) {
|
||||||
env = sexp_load_standard_env(ctx, env, SEXP_SEVEN);
|
env = sexp_load_standard_env(ctx, env, SEXP_SEVEN);
|
||||||
}
|
}
|
||||||
arg = ((argv[i][2] == '\0') ? argv[++i] : argv[i]+2);
|
arg = ((argv[i][2] == '\0') ? argv[++i] : argv[i]+2);
|
||||||
|
#if SEXP_USE_IMAGE_LOADING
|
||||||
if (sexp_save_image(ctx, arg) != SEXP_TRUE) {
|
if (sexp_save_image(ctx, arg) != SEXP_TRUE) {
|
||||||
fprintf(stderr, "-d <file>: couldn't save image to file: %s\n", arg);
|
fprintf(stderr, "-d <file>: couldn't save image to file: %s\n", arg);
|
||||||
fprintf(stderr, " %s\n", sexp_load_image_err());
|
fprintf(stderr, " %s\n", sexp_load_image_err());
|
||||||
exit_failure();
|
exit_failure();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
quit = 1;
|
quit = 1;
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
case 'V':
|
case 'V':
|
||||||
load_init(1);
|
load_init(1);
|
||||||
if (! sexp_oportp(out))
|
if (! sexp_oportp(out))
|
||||||
|
|
Loading…
Add table
Reference in a new issue