6819213: revive sun.boot.library.path

Support multiplex and mutable sun.boot.library.path

Reviewed-by: acorn, dcubed, xlu
This commit is contained in:
Paul Hohensee 2009-04-01 16:38:01 -04:00
parent d37d544754
commit 4be7c3c672
9 changed files with 345 additions and 50 deletions

View file

@ -90,7 +90,7 @@ public:
static inline struct protoent* get_proto_by_name(char* name);
// HPI_LibraryInterface
static inline void dll_build_name(char *buf, int buf_len, char* path,
static inline void dll_build_name(char *buf, int buf_len, const char* path,
const char *name);
static inline void* dll_load(const char *name, char *ebuf, int ebuflen);
static inline void dll_unload(void *lib);
@ -137,7 +137,15 @@ public:
return result; \
}
#define VM_HPIDECL_VOID(name, names, func, arg_type, arg_print, arg) \
inline void hpi::name arg_type { \
if (TraceHPI) { \
tty->print("hpi::" names "("); \
tty->print arg_print; \
tty->print(") = "); \
} \
func arg; \
}
#define HPIDECL_VOID(name, names, intf, func, arg_type, arg_print, arg) \
inline void hpi::name arg_type { \
@ -197,11 +205,11 @@ HPIDECL(fsize, "fsize", _file, FileSizeFD, int, "%d",
(fd, size));
// HPI_LibraryInterface
HPIDECL_VOID(dll_build_name, "dll_build_name", _library, BuildLibName,
(char *buf, int buf_len, char *path, const char *name),
("buf = %p, buflen = %d, path = %s, name = %s",
buf, buf_len, path, name),
(buf, buf_len, path, name));
VM_HPIDECL_VOID(dll_build_name, "dll_build_name", os::dll_build_name,
(char *buf, int buf_len, const char *path, const char *name),
("buf = %p, buflen = %d, path = %s, name = %s",
buf, buf_len, path, name),
(buf, buf_len, path, name));
VM_HPIDECL(dll_load, "dll_load", os::dll_load,
void *, "(void *)%p",