6865853: Additional code changes needed to build deploy using WXP SP2 and Visual Studio 2008
Reviewed-by: ohair
This commit is contained in:
parent
800a49f4a0
commit
792cd2a88a
@ -116,11 +116,11 @@ char* getStringPlatformChars(JNIEnv* env, jstring jstr) {
|
|||||||
char *result = NULL;
|
char *result = NULL;
|
||||||
size_t len;
|
size_t len;
|
||||||
const jchar* utf16 = env->GetStringChars(jstr, NULL);
|
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)
|
if (len == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
result = (char*) malloc(len);
|
result = (char*) malloc(len);
|
||||||
if (wcstombs(result, utf16, len) == -1)
|
if (wcstombs(result, (const wchar_t*)utf16, len) == -1)
|
||||||
return NULL;
|
return NULL;
|
||||||
env->ReleaseStringChars(jstr, utf16);
|
env->ReleaseStringChars(jstr, utf16);
|
||||||
return result;
|
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, '/'));
|
char* lastSlash = max(strrchr(path, '\\'), strrchr(path, '/'));
|
||||||
if (lastSlash == NULL) {
|
if (lastSlash == NULL) {
|
||||||
*dest = NULL;
|
*dest = NULL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user