ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.2k stars 142 forks source link

Fix SEXP_USE_ALIGNED_BYTECODE #990

Closed ghost closed 2 months ago

ghost commented 2 months ago

There were some typos that weren't affecting default compilation but causing immediate errors with the option enabled.

ghost commented 2 months ago

I don't understand what you're fixing here. You're just making this macro inconsistent with all other features by making it defined/undefined instead of 1/0.

What I'm fixing is previously, just uncommenting the option would cause errors:

echo '#define sexp_so_extension "'.dylib'"' > include/chibi/install.h
echo '#define sexp_default_module_path "'/usr/local/share/chibi:/usr/local/lib/chibi:/usr/local/share/snow:/usr/local/lib/snow'"' >> include/chibi/install.h
echo '#define sexp_platform "'macosx'"' >> include/chibi/install.h
echo '#define sexp_architecture "'arm64'"' >> include/chibi/install.h
echo '#define sexp_version "'0.11.0'"' >> include/chibi/install.h
echo '#define sexp_release_name "'`cat RELEASE`'"' >> include/chibi/install.h
cc -c  -Iinclude  -DSEXP_USE_NTPGETTIME -DSEXP_USE_INTTYPES -Wall -g -g3 -O3  -o main.o main.c
In file included from main.c:9:
In file included from include/chibi/eval.h:12:
include/chibi/sexp.h:1448:30: error: expected value in expression
#if SEXP_USE_ALIGNED_BYTECODE
                             ^
1 error generated.
make: *** [main.o] Error 1

I can make it 1/0 if that's the style, but the current way is broken.

ghost commented 2 months ago

There you go.

ashinn commented 2 months ago

Sorry, I thought you were reporting a bug in the code, this is now just a documentation fix and looks OK.