Changeset 183


Ignore:
Timestamp:
Dec 1, 2010, 2:53:28 AM (15 years ago)
Author:
dmik
Message:

jdk: Cast jchar* <-> WCHAR* by hand as wchar_t is incompatible with unsigned short in G++ (as opposed to GCC and to MSVC in both C and C++ mode).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/openjdk/jdk/src/windows/native/sun/windows/UnicowsLoader.h

    r180 r183  
    7676// Now the platform encoding is Unicode (UTF-16), re-define JNU_ functions
    7777// to proper JNI functions.
     78#ifdef __WIN32OS2__
     79#define JNU_NewStringPlatform(env, x) env->NewString(reinterpret_cast<jchar*>(x), static_cast<jsize>(_tcslen(reinterpret_cast<LPTSTR>(x))))
     80#define JNU_GetStringPlatformChars(env, x, y) (LPWSTR)env->GetStringChars(x, y)
     81#define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, reinterpret_cast<jchar*>(y))
     82#else
    7883#define JNU_NewStringPlatform(env, x) env->NewString(x, static_cast<jsize>(_tcslen(x)))
    7984#define JNU_GetStringPlatformChars(env, x, y) (LPWSTR)env->GetStringChars(x, y)
    8085#define JNU_ReleaseStringPlatformChars(env, x, y) env->ReleaseStringChars(x, y)
     86#endif
    8187
    8288// The following Windows W-APIs are not supported by the MSLU.
     
    156162// #define _wsomefunc NotSupportedOnWin9X
    157163
     164#ifndef __WIN32OS2__
    158165#define _waccess        NotSupportedOnWin9X
    159166#define _wchmod         NotSupportedOnWin9X
     
    194201#define _wspawnvp       NotSupportedOnWin9X
    195202#define _wspawnvpe      NotSupportedOnWin9X
    196 
     203#endif // __WIN32OS2__
    197204
    198205#endif // UNICOWSLOADER_H
Note: See TracChangeset for help on using the changeset viewer.