mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-21 14:49:17 +02:00
Fix compilation of Cyc-compilation-environment
This commit is contained in:
parent
5eeef5d992
commit
6a50eff1e0
3 changed files with 8 additions and 5 deletions
|
@ -201,7 +201,7 @@ object Cyc_substring(void *data, object cont, object str, object start,
|
|||
object Cyc_string_ref(void *data, object str, object k);
|
||||
object Cyc_string_set(void *data, object str, object k, object chr);
|
||||
object Cyc_installation_dir(void *data, object cont, object type);
|
||||
void Cyc_compilation_environment(void *data, object cont, object var);
|
||||
object Cyc_compilation_environment(void *data, object cont, object var);
|
||||
object Cyc_command_line_arguments(void *data, object cont);
|
||||
object Cyc_system(object cmd);
|
||||
object Cyc_char2integer(object chr);
|
||||
|
|
|
@ -1733,29 +1733,30 @@ object Cyc_installation_dir(void *data, object cont, object type)
|
|||
/**
|
||||
* Retrieve a value set during Cyclone compilation
|
||||
*/
|
||||
void Cyc_compilation_environment(void *data, object cont, object var)
|
||||
object Cyc_compilation_environment(void *data, object cont, object var)
|
||||
{
|
||||
if (Cyc_is_symbol(var) == boolean_t){
|
||||
if (strncmp(((symbol) var)->pname, "cc-prog", 8) == 0) {
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "%s", CYC_CC_PROG);
|
||||
make_string(str, buf);
|
||||
return_closcall1(data, cont, &str);
|
||||
_return_closcall1(data, cont, &str);
|
||||
} else if (strncmp(((symbol) var)->pname, "cc-exec", 8) == 0) {
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "%s", CYC_CC_EXEC);
|
||||
make_string(str, buf);
|
||||
return_closcall1(data, cont, &str);
|
||||
_return_closcall1(data, cont, &str);
|
||||
} else if (strncmp(((symbol) var)->pname, "cc-lib", 7) == 0) {
|
||||
char buf[1024];
|
||||
snprintf(buf, sizeof(buf), "%s", CYC_CC_LIB);
|
||||
make_string(str, buf);
|
||||
return_closcall1(data, cont, &str);
|
||||
_return_closcall1(data, cont, &str);
|
||||
}
|
||||
}
|
||||
Cyc_rt_raise2(data,
|
||||
"Cyc-compilation-environment - unrecognized symbol",
|
||||
var);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -639,6 +639,7 @@
|
|||
((eq? p 'list->string) "object")
|
||||
((eq? p 'list->vector) "object")
|
||||
((eq? p 'Cyc-installation-dir) "object")
|
||||
((eq? p 'Cyc-compilation-environment) "object")
|
||||
(else #f)))
|
||||
|
||||
;; Determine if primitive creates a C variable
|
||||
|
@ -651,6 +652,7 @@
|
|||
open-input-file
|
||||
open-output-file
|
||||
Cyc-installation-dir
|
||||
Cyc-compilation-environment
|
||||
string->number
|
||||
string-append list->string
|
||||
make-bytevector
|
||||
|
|
Loading…
Add table
Reference in a new issue