don't name-mangle non-PLT DLLs
svn: r2776
This commit is contained in:
parent
0cae745858
commit
1283d749a5
|
@ -61,7 +61,7 @@ typedef size_t (*iconv_proc_t)(iconv_t cd,
|
||||||
typedef iconv_t (*iconv_open_proc_t)(const char *tocode, const char *fromcode);
|
typedef iconv_t (*iconv_open_proc_t)(const char *tocode, const char *fromcode);
|
||||||
typedef void (*iconv_close_proc_t)(iconv_t cd);
|
typedef void (*iconv_close_proc_t)(iconv_t cd);
|
||||||
typedef char *(*locale_charset_proc_t)();
|
typedef char *(*locale_charset_proc_t)();
|
||||||
static errno_proc_t msvcrt_errno;
|
static errno_proc_t iconv_errno;
|
||||||
static iconv_proc_t iconv;
|
static iconv_proc_t iconv;
|
||||||
static iconv_open_proc_t iconv_open;
|
static iconv_open_proc_t iconv_open;
|
||||||
static iconv_close_proc_t iconv_close;
|
static iconv_close_proc_t iconv_close;
|
||||||
|
@ -74,20 +74,25 @@ static char *nl_langinfo(int which)
|
||||||
static int get_iconv_errno(void)
|
static int get_iconv_errno(void)
|
||||||
{
|
{
|
||||||
int *a;
|
int *a;
|
||||||
a = msvcrt_errno();
|
a = iconv_errno();
|
||||||
return *a;
|
return *a;
|
||||||
}
|
}
|
||||||
# undef HAVE_CODESET
|
# undef HAVE_CODESET
|
||||||
# define HAVE_CODESET 1
|
# define HAVE_CODESET 1
|
||||||
# define CODESET 0
|
# define CODESET 0
|
||||||
# define ICONV_errno get_iconv_errno()
|
# define ICONV_errno get_iconv_errno()
|
||||||
|
extern char *scheme_get_dll_path(char *s);
|
||||||
static int iconv_ready = 0;
|
static int iconv_ready = 0;
|
||||||
static void init_iconv()
|
static void init_iconv()
|
||||||
{
|
{
|
||||||
# ifdef MZ_NO_ICONV
|
# ifdef MZ_NO_ICONV
|
||||||
# else
|
# else
|
||||||
HMODULE m;
|
HMODULE m;
|
||||||
m = LoadLibrary("iconv.dll");
|
m = LoadLibrary(scheme_get_dll_path("iconv.dll"));
|
||||||
|
if (!m)
|
||||||
|
m = LoadLibrary(scheme_get_dll_path("libiconv.dll"));
|
||||||
|
if (!m)
|
||||||
|
m = LoadLibrary("iconv.dll");
|
||||||
if (!m)
|
if (!m)
|
||||||
m = LoadLibrary("libiconv.dll");
|
m = LoadLibrary("libiconv.dll");
|
||||||
if (m) {
|
if (m) {
|
||||||
|
@ -103,13 +108,19 @@ static void init_iconv()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (iconv) {
|
if (iconv) {
|
||||||
m = LoadLibrary("msvcrt.dll");
|
iconv_errno = (errno_proc_t)GetProcAddress(m, "_errno");
|
||||||
if (m) {
|
if (!iconv_errno) {
|
||||||
msvcrt_errno = (errno_proc_t)GetProcAddress(m, "_errno");
|
/* The iconv.dll distributed with PLT Scheme links to msvcrt.dll.
|
||||||
if (!msvcrt_errno) {
|
It's a slighly dangerous assumption that whaetever iconv we
|
||||||
iconv = NULL;
|
found also uses msvcrt.dll. */
|
||||||
iconv_open = NULL;
|
m = LoadLibrary("msvcrt.dll");
|
||||||
iconv_close = NULL;
|
if (m) {
|
||||||
|
iconv_errno = (errno_proc_t)GetProcAddress(m, "_errno");
|
||||||
|
if (!iconv_errno) {
|
||||||
|
iconv = NULL;
|
||||||
|
iconv_open = NULL;
|
||||||
|
iconv_close = NULL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,16 +2,3 @@ This directory contains extra DLLs that are needed for running PLT
|
||||||
Scheme. The DLL files are moved into the PLT folder by
|
Scheme. The DLL files are moved into the PLT folder by
|
||||||
plt/src/mzscheme/dynsrc/mkmzdyn.bat
|
plt/src/mzscheme/dynsrc/mkmzdyn.bat
|
||||||
which is, in turn, called by the MSVC projects.
|
which is, in turn, called by the MSVC projects.
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
uniplt_xxxxxxx.dll
|
|
||||||
|
|
||||||
This DLL is really Microsoft's UnicoWS.dll. Microsoft allows
|
|
||||||
redistribution of this DLL, but discourages installing it into the
|
|
||||||
system folder. So, we rename it (and version-mangle the name) so that
|
|
||||||
it can be installed into the system folder without conflicts.
|
|
||||||
|
|
||||||
This DLL is only loaded by MzScheme/MrEd under Windows 95/98/Me. It's
|
|
||||||
actually not needed at all under Windows NT/2000/XP.
|
|
||||||
|
|
||||||
----------------------------------------------------------------------
|
|
||||||
|
|
BIN
src/worksp/extradlls/iconv.dll
Normal file
BIN
src/worksp/extradlls/iconv.dll
Normal file
Binary file not shown.
BIN
src/worksp/extradlls/libeay32.dll
Normal file
BIN
src/worksp/extradlls/libeay32.dll
Normal file
Binary file not shown.
BIN
src/worksp/extradlls/ssleay32.dll
Normal file
BIN
src/worksp/extradlls/ssleay32.dll
Normal file
Binary file not shown.
|
@ -14,8 +14,7 @@ HMODULE LoadUnicowsProc(void)
|
||||||
{
|
{
|
||||||
char *s;
|
char *s;
|
||||||
|
|
||||||
/* Versioning should replace the "xxxxxxx" */
|
s = scheme_get_dll_path("UnicoWS.dll");
|
||||||
s = scheme_get_dll_path("uniplt_xxxxxxx.dll");
|
|
||||||
|
|
||||||
return LoadLibrary(s);
|
return LoadLibrary(s);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user