< prev index next >

src/java.base/windows/native/libjli/java_md.c

Print this page

        

*** 263,302 **** /* * The Microsoft C Runtime Library needs to be loaded first. A copy is * assumed to be present in the "JRE path" directory. If it is not found * there (or "JRE path" fails to resolve), skip the explicit load and let * nature take its course, which is likely to be a failure to execute. ! * This is clearly completely specific to the exact compiler version ! * which isn't very nice, but its hardly the only place. ! * No attempt to look for compiler versions in between 2003 and 2010 ! * as we aren't supporting building with those. */ ! #ifdef _MSC_VER ! #if _MSC_VER < 1400 ! #define CRT_DLL "msvcr71.dll" ! #endif ! #if _MSC_VER >= 1600 ! #define CRT_DLL "msvcr100.dll" ! #endif ! #ifdef CRT_DLL if (GetJREPath(crtpath, MAXPATHLEN)) { if (JLI_StrLen(crtpath) + JLI_StrLen("\\bin\\") + ! JLI_StrLen(CRT_DLL) >= MAXPATHLEN) { JLI_ReportErrorMessage(JRE_ERROR11); return JNI_FALSE; } ! (void)JLI_StrCat(crtpath, "\\bin\\" CRT_DLL); /* Add crt dll */ JLI_TraceLauncher("CRT path is %s\n", crtpath); if (_access(crtpath, 0) == 0) { if (LoadLibrary(crtpath) == 0) { JLI_ReportErrorMessage(DLL_ERROR4, crtpath); return JNI_FALSE; } } } ! #endif /* CRT_DLL */ ! #endif /* _MSC_VER */ loaded = 1; } return JNI_TRUE; } --- 263,309 ---- /* * The Microsoft C Runtime Library needs to be loaded first. A copy is * assumed to be present in the "JRE path" directory. If it is not found * there (or "JRE path" fails to resolve), skip the explicit load and let * nature take its course, which is likely to be a failure to execute. ! * The makefiles will provide the correct lib contained in quotes in the ! * macro MSVCR_DLL_NAME. */ ! #ifdef MSVCR_DLL_NAME if (GetJREPath(crtpath, MAXPATHLEN)) { if (JLI_StrLen(crtpath) + JLI_StrLen("\\bin\\") + ! JLI_StrLen(MSVCR_DLL_NAME) >= MAXPATHLEN) { JLI_ReportErrorMessage(JRE_ERROR11); return JNI_FALSE; } ! (void)JLI_StrCat(crtpath, "\\bin\\" MSVCR_DLL_NAME); /* Add crt dll */ JLI_TraceLauncher("CRT path is %s\n", crtpath); if (_access(crtpath, 0) == 0) { if (LoadLibrary(crtpath) == 0) { JLI_ReportErrorMessage(DLL_ERROR4, crtpath); return JNI_FALSE; } } } ! #endif /* MSVCR_DLL_NAME */ ! #ifdef MSVCP_DLL_NAME ! if (GetJREPath(crtpath, MAXPATHLEN)) { ! if (JLI_StrLen(crtpath) + JLI_StrLen("\\bin\\") + ! JLI_StrLen(MSVCP_DLL_NAME) >= MAXPATHLEN) { ! JLI_ReportErrorMessage(JRE_ERROR11); ! return JNI_FALSE; ! } ! (void)JLI_StrCat(crtpath, "\\bin\\" MSVCP_DLL_NAME); /* Add prt dll */ ! JLI_TraceLauncher("PRT path is %s\n", crtpath); ! if (_access(crtpath, 0) == 0) { ! if (LoadLibrary(crtpath) == 0) { ! JLI_ReportErrorMessage(DLL_ERROR4, crtpath); ! return JNI_FALSE; ! } ! } ! } ! #endif /* MSVCP_DLL_NAME */ loaded = 1; } return JNI_TRUE; }
< prev index next >