* Got rid of CAN_LOAD_OBJ. We'll only use dlopen()-like functions now.

git-svn-id: svn://svn.zoy.org/elk/trunk@115 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
sam
2003-09-07 01:33:17 +00:00
parent b7a437f9a5
commit 58b8dc6976
2 changed files with 2 additions and 33 deletions
+2 -26
View File
@@ -34,21 +34,11 @@
Object V_Load_Path, V_Load_Noisilyp, V_Load_Libraries;
#ifdef CAN_LOAD_OBJ
# define Default_Load_Libraries LOAD_LIBRARIES
#else
# define Default_Load_Libraries ""
#endif
char *Loader_Input; /* tmp file name used by load.xx.c */
extern void Switch_Environment (Object);
void Load_Source (Object);
#ifdef CAN_LOAD_OBJ
void Fork_Load();
#endif
#if defined(USE_LD)
# include "load-ld.c"
#elif defined(USE_RLD)
@@ -65,11 +55,7 @@ void Init_Load () {
Cons (Make_String (SCM_DIR, sizeof (SCM_DIR) - 1),
Cons (Make_String (OBJ_DIR, sizeof (OBJ_DIR) - 1), Null))));
Define_Variable (&V_Load_Noisilyp, "load-noisily?", False);
Define_Variable (&V_Load_Libraries, "load-libraries",
Make_String (Default_Load_Libraries, sizeof Default_Load_Libraries-1));
#ifdef CAN_LOAD_OBJ
Register_Onfork (Fork_Load);
#endif
Define_Variable (&V_Load_Libraries, "load-libraries", Make_String ("", 0));
}
void Init_Loadpath (char *s) { /* No GC possible here */
@@ -131,22 +117,12 @@ Object General_Load (Object what, Object env) {
Switch_Environment (env);
Check_Loadarg (what);
if (TYPE(what) == T_Pair) {
if (Has_Suffix (Car (what), ".o"))
#ifdef CAN_LOAD_OBJ
Load_Object (what)
#endif
;
else if (Has_Suffix (Car (what), ".so"))
if (Has_Suffix (Car (what), ".so"))
#ifdef CAN_LOAD_LIB
Load_Library (what)
#endif
;
}
else if (Has_Suffix (what, ".o"))
#ifdef CAN_LOAD_OBJ
Load_Object (Cons (what, Null))
#endif
;
else if (Has_Suffix (what, ".so"))
#ifdef CAN_LOAD_LIB
Load_Library (Cons (what, Null))