Merge commit 'origin/master' into wip

This commit is contained in:
Joel Dice 2009-10-27 09:17:54 -06:00
commit 2efff818ea
5 changed files with 15 additions and 10 deletions

View File

@ -397,7 +397,7 @@ Java_java_nio_channels_SocketChannel_natFinishConnect(JNIEnv *e,
} else if (einProgress(error)) {
return false;
} else if (error != 0) {
throwIOException(e);
throwIOException(e, errorString(e, error));
}
return true;
}

View File

@ -186,7 +186,11 @@ public class Thread implements Runnable {
}
public StackTraceElement[] getStackTrace() {
return Throwable.resolveTrace(getStackTrace(peer));
long p = peer;
if (p == 0) {
return new StackTraceElement[0];
}
return Throwable.resolveTrace(getStackTrace(p));
}
private static native Object getStackTrace(long peer);

View File

@ -19,11 +19,12 @@
#if (defined __MINGW32__) || (defined _MSC_VER)
# define PLATFORM_WINDOWS
# define PATH_SEPARATOR ';'
# define JNIEXPORT __declspec(dllexport)
# define JNIEXPORT __declspec(dllexport) __attribute__ ((externally_visible))
#else
# define PLATFORM_POSIX
# define PATH_SEPARATOR ':'
# define JNIEXPORT __attribute__ ((visibility("default")))
# define JNIEXPORT __attribute__ ((visibility("default"))) \
__attribute__ ((externally_visible))
#endif
#ifdef _MSC_VER

View File

@ -27,10 +27,10 @@ extern "C" void __cxa_pure_virtual(void) { abort(); }
#ifdef BOOT_IMAGE
#if (defined __MINGW32__) || (defined _MSC_VER)
# define EXPORT __declspec(dllexport)
# define EXPORT __declspec(dllexport) __attribute__ ((externally_visible))
# define SYMBOL(x) binary_bootimage_bin_##x
#else
# define EXPORT __attribute__ ((visibility("default")))
# define EXPORT __attribute__ ((visibility("default"))) __attribute__ ((externally_visible))
# define SYMBOL(x) _binary_bootimage_bin_##x
#endif
@ -53,10 +53,10 @@ extern "C" {
#ifdef BOOT_CLASSPATH
#if (defined __MINGW32__) || (defined _MSC_VER)
# define EXPORT __declspec(dllexport)
# define EXPORT __declspec(dllexport) __attribute__ ((externally_visible))
# define SYMBOL(x) binary_classpath_jar_##x
#else
# define EXPORT __attribute__ ((visibility("default")))
# define EXPORT __attribute__ ((visibility("default"))) __attribute__ ((externally_visible))
# define SYMBOL(x) _binary_classpath_jar_##x
#endif

View File

@ -90,10 +90,10 @@ typedef uint64_t uintptr_t;
#undef JNIEXPORT
#ifdef PLATFORM_WINDOWS
# define JNIEXPORT __declspec(dllexport)
# define JNIEXPORT __declspec(dllexport) __attribute__ ((externally_visible))
# define PATH_SEPARATOR ';'
#else
# define JNIEXPORT __attribute__ ((visibility("default")))
# define JNIEXPORT __attribute__ ((visibility("default"))) __attribute__ ((externally_visible))
# define PATH_SEPARATOR ':'
#endif