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_ref(void *data, object str, object k);
|
||||||
object Cyc_string_set(void *data, object str, object k, object chr);
|
object Cyc_string_set(void *data, object str, object k, object chr);
|
||||||
object Cyc_installation_dir(void *data, object cont, object type);
|
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_command_line_arguments(void *data, object cont);
|
||||||
object Cyc_system(object cmd);
|
object Cyc_system(object cmd);
|
||||||
object Cyc_char2integer(object chr);
|
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
|
* 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 (Cyc_is_symbol(var) == boolean_t){
|
||||||
if (strncmp(((symbol) var)->pname, "cc-prog", 8) == 0) {
|
if (strncmp(((symbol) var)->pname, "cc-prog", 8) == 0) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
snprintf(buf, sizeof(buf), "%s", CYC_CC_PROG);
|
snprintf(buf, sizeof(buf), "%s", CYC_CC_PROG);
|
||||||
make_string(str, buf);
|
make_string(str, buf);
|
||||||
return_closcall1(data, cont, &str);
|
_return_closcall1(data, cont, &str);
|
||||||
} else if (strncmp(((symbol) var)->pname, "cc-exec", 8) == 0) {
|
} else if (strncmp(((symbol) var)->pname, "cc-exec", 8) == 0) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
snprintf(buf, sizeof(buf), "%s", CYC_CC_EXEC);
|
snprintf(buf, sizeof(buf), "%s", CYC_CC_EXEC);
|
||||||
make_string(str, buf);
|
make_string(str, buf);
|
||||||
return_closcall1(data, cont, &str);
|
_return_closcall1(data, cont, &str);
|
||||||
} else if (strncmp(((symbol) var)->pname, "cc-lib", 7) == 0) {
|
} else if (strncmp(((symbol) var)->pname, "cc-lib", 7) == 0) {
|
||||||
char buf[1024];
|
char buf[1024];
|
||||||
snprintf(buf, sizeof(buf), "%s", CYC_CC_LIB);
|
snprintf(buf, sizeof(buf), "%s", CYC_CC_LIB);
|
||||||
make_string(str, buf);
|
make_string(str, buf);
|
||||||
return_closcall1(data, cont, &str);
|
_return_closcall1(data, cont, &str);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Cyc_rt_raise2(data,
|
Cyc_rt_raise2(data,
|
||||||
"Cyc-compilation-environment - unrecognized symbol",
|
"Cyc-compilation-environment - unrecognized symbol",
|
||||||
var);
|
var);
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -639,6 +639,7 @@
|
||||||
((eq? p 'list->string) "object")
|
((eq? p 'list->string) "object")
|
||||||
((eq? p 'list->vector) "object")
|
((eq? p 'list->vector) "object")
|
||||||
((eq? p 'Cyc-installation-dir) "object")
|
((eq? p 'Cyc-installation-dir) "object")
|
||||||
|
((eq? p 'Cyc-compilation-environment) "object")
|
||||||
(else #f)))
|
(else #f)))
|
||||||
|
|
||||||
;; Determine if primitive creates a C variable
|
;; Determine if primitive creates a C variable
|
||||||
|
@ -651,6 +652,7 @@
|
||||||
open-input-file
|
open-input-file
|
||||||
open-output-file
|
open-output-file
|
||||||
Cyc-installation-dir
|
Cyc-installation-dir
|
||||||
|
Cyc-compilation-environment
|
||||||
string->number
|
string->number
|
||||||
string-append list->string
|
string-append list->string
|
||||||
make-bytevector
|
make-bytevector
|
||||||
|
|
Loading…
Add table
Reference in a new issue