Skip to content

Commit

Permalink
Added platform to (features)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinethier committed Jul 31, 2019
1 parent 1fce5b9 commit 0c050a3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Features

- Arthur Maciel added instructions for building Cyclone on FreeBSD.
- Added support for delays and promises to `(cyclone concurrent)`. Note functions/macros for both types of objects are prefixed with `shared-` to differentiate them from R7RS definitions from `(scheme lazy)`.
- Added platform (linux, bsd, etc) to the list of emitted by `(features)` and to the features recognized by `cond-expand`.

Bug Fixes

Expand Down
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ runtime.o : runtime.c $(HEADERS)
-DCYC_CC_EXEC=\"$(CC_EXEC)\" \
-DCYC_CC_LIB=\"$(CC_LIB)\" \
-DCYC_CC_SO=\"$(CC_SO)\" \
-DCYC_PLATFORM=\"$(PLATFORM)\" \
$< -o $@

libcyclone.a : runtime.o gc.o dispatch.o mstreams.o hashset.o
Expand Down
5 changes: 5 additions & 0 deletions runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -2647,6 +2647,11 @@ object Cyc_compilation_environment(void *data, object cont, object var)
snprintf(buf, sizeof(buf), "%s", CYC_CC_SO);
make_utf8_string(data, str, buf);
_return_closcall1(data, cont, &str);
} else if (strncmp(((symbol) var)->desc, "platform", 9) == 0) {
char buf[1024];
snprintf(buf, sizeof(buf), "%s", CYC_PLATFORM);
make_utf8_string(data, str, buf);
_return_closcall1(data, cont, &str);
}
}
Cyc_rt_raise2(data,
Expand Down
4 changes: 3 additions & 1 deletion scheme/base.sld
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@
(cons
(string->symbol
(string-append "version-" *version-number*))
*other-features*)))
(cons
(string->symbol (Cyc-compilation-environment 'platform))
*other-features*))))

(define *other-features*
'(r7rs
Expand Down

0 comments on commit 0c050a3

Please sign in to comment.