From 792cd2a88a9eb88aae1f4b682cbe439513bbd6e2 Mon Sep 17 00:00:00 2001 From: Tim Bell Date: Thu, 6 Aug 2009 17:16:31 -0700 Subject: [PATCH] 6865853: Additional code changes needed to build deploy using WXP SP2 and Visual Studio 2008 Reviewed-by: ohair --- jdk/src/windows/native/sun/jkernel/kernel.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jdk/src/windows/native/sun/jkernel/kernel.cpp b/jdk/src/windows/native/sun/jkernel/kernel.cpp index 354b47cf2b5..e67bb3a0595 100644 --- a/jdk/src/windows/native/sun/jkernel/kernel.cpp +++ b/jdk/src/windows/native/sun/jkernel/kernel.cpp @@ -116,11 +116,11 @@ char* getStringPlatformChars(JNIEnv* env, jstring jstr) { char *result = NULL; size_t len; const jchar* utf16 = env->GetStringChars(jstr, NULL); - len = wcstombs(NULL, utf16, env->GetStringLength(jstr) * 4) + 1; + len = wcstombs(NULL, (const wchar_t*)utf16, env->GetStringLength(jstr) * 4) + 1; if (len == -1) return NULL; result = (char*) malloc(len); - if (wcstombs(result, utf16, len) == -1) + if (wcstombs(result, (const wchar_t*)utf16, len) == -1) return NULL; env->ReleaseStringChars(jstr, utf16); return result; @@ -640,7 +640,7 @@ JNIEXPORT void JNICALL Java_sun_jkernel_DownloadManager_startBackgroundDownloadW } -void getParent(const TCHAR *path, TCHAR *dest) { +void getParent(TCHAR *path, TCHAR *dest) { char* lastSlash = max(strrchr(path, '\\'), strrchr(path, '/')); if (lastSlash == NULL) { *dest = NULL;