* Plugin support for Win32.
git-svn-id: svn://svn.zoy.org/elk/trunk@150 55e467fa-43c5-0310-a8a2-de718669efc6
This commit is contained in:
parent
1b2f8598a4
commit
d4dc463b3d
|
@ -6,12 +6,13 @@ AC_PREREQ(2.50)
|
||||||
AC_CONFIG_AUX_DIR(autotools)
|
AC_CONFIG_AUX_DIR(autotools)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
|
|
||||||
AM_INIT_AUTOMAKE(elk, 3.99.2-cvs)
|
AM_INIT_AUTOMAKE(elk, 3.99.2)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AM_PROG_CC_C_O
|
AM_PROG_CC_C_O
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
AC_LIBTOOL_WIN32_DLL
|
||||||
AC_PROG_LIBTOOL
|
AC_PROG_LIBTOOL
|
||||||
AC_STDC_HEADERS
|
AC_STDC_HEADERS
|
||||||
|
|
||||||
|
|
|
@ -92,6 +92,19 @@ void Dlopen_File (char *fn) {
|
||||||
|
|
||||||
/* NSUnLinkModule (handle, FALSE); */
|
/* NSUnLinkModule (handle, FALSE); */
|
||||||
|
|
||||||
|
#elif defined(WIN32)
|
||||||
|
void *handle;
|
||||||
|
|
||||||
|
if (Verb_Load)
|
||||||
|
printf ("[dll %s]\n", fn);
|
||||||
|
|
||||||
|
handle = LoadLibrary (fn);
|
||||||
|
|
||||||
|
if (handle == NULL) {
|
||||||
|
Primitive_Error ("LoadLibrary failed on ~%~s",
|
||||||
|
Make_String (fn, strlen (fn)));
|
||||||
|
}
|
||||||
|
|
||||||
#elif defined(HAVE_DL_DLOPEN)
|
#elif defined(HAVE_DL_DLOPEN)
|
||||||
void *handle;
|
void *handle;
|
||||||
|
|
||||||
|
@ -140,6 +153,9 @@ void Dlopen_File (char *fn) {
|
||||||
if (sym)
|
if (sym)
|
||||||
sp->value = (unsigned long int)(intptr_t)NSAddressOfSymbol (sym);
|
sp->value = (unsigned long int)(intptr_t)NSAddressOfSymbol (sym);
|
||||||
|
|
||||||
|
#elif defined(WIN32)
|
||||||
|
sp->value = (void *)GetProcAddress (handle, (MYCHAR *)sym);
|
||||||
|
|
||||||
#elif defined(HAVE_DL_DLOPEN)
|
#elif defined(HAVE_DL_DLOPEN)
|
||||||
/* dlsym() may fail for symbols not exported by object file;
|
/* dlsym() may fail for symbols not exported by object file;
|
||||||
* this can be safely ignored. */
|
* this can be safely ignored. */
|
||||||
|
|
Loading…
Reference in New Issue