Allow the defining of an init file at build time
Since OpenBSD is unable to determine the pathname of a running process, this allows us to specify the full path to flisp.boot. This will also come in handy for system wide installs where you want flisp to live in bin and flisp.boot to live in share or a similar location.
This commit is contained in:
parent
088ea8f194
commit
55750ca929
4
flmain.c
4
flmain.c
|
@ -27,6 +27,9 @@ int main(int argc, char *argv[])
|
||||||
fl_init(512*1024);
|
fl_init(512*1024);
|
||||||
|
|
||||||
fname_buf[0] = '\0';
|
fname_buf[0] = '\0';
|
||||||
|
#ifdef INITFILE
|
||||||
|
strcat(fname_buf, INITFILE);
|
||||||
|
#else
|
||||||
value_t str = symbol_value(symbol("*install-dir*"));
|
value_t str = symbol_value(symbol("*install-dir*"));
|
||||||
char *exedir = (str == UNBOUND ? NULL : cvalue_data(str));
|
char *exedir = (str == UNBOUND ? NULL : cvalue_data(str));
|
||||||
if (exedir != NULL) {
|
if (exedir != NULL) {
|
||||||
|
@ -34,6 +37,7 @@ int main(int argc, char *argv[])
|
||||||
strcat(fname_buf, PATHSEPSTRING);
|
strcat(fname_buf, PATHSEPSTRING);
|
||||||
}
|
}
|
||||||
strcat(fname_buf, "flisp.boot");
|
strcat(fname_buf, "flisp.boot");
|
||||||
|
#endif
|
||||||
|
|
||||||
value_t args[2];
|
value_t args[2];
|
||||||
fl_gc_handle(&args[0]);
|
fl_gc_handle(&args[0]);
|
||||||
|
|
Loading…
Reference in New Issue