--- old/src/solaris/native/java/io/UnixFileSystem_md.c 2012-06-25 21:56:12.000000000 -0700 +++ new/src/solaris/native/java/io/UnixFileSystem_md.c 2012-06-25 21:56:12.000000000 -0700 @@ -38,6 +38,7 @@ #include "jlong.h" #include "jvm.h" #include "io_util.h" +#include "io_util_md.h" #include "java_io_FileSystem.h" #include "java_io_UnixFileSystem.h" @@ -80,7 +81,11 @@ canonicalPath, JVM_MAXPATHLEN) < 0) { JNU_ThrowIOExceptionWithLastError(env, "Bad pathname"); } else { +#ifdef MACOSX + rv = newStringPlatform(env, canonicalPath); +#else rv = JNU_NewStringPlatform(env, canonicalPath); +#endif } } END_PLATFORM_STRING(env, path); return rv; @@ -311,7 +316,11 @@ if (JNU_CopyObjectArray(env, rv, old, len) < 0) goto error; (*env)->DeleteLocalRef(env, old); } +#ifdef MACOSX + name = newStringPlatform(env, ptr->d_name); +#else name = JNU_NewStringPlatform(env, ptr->d_name); +#endif if (name == NULL) goto error; (*env)->SetObjectArrayElement(env, rv, len++, name); (*env)->DeleteLocalRef(env, name);