Merge branch 'master' of oss.readytalk.com:/var/local/git/avian

This commit is contained in:
jet 2009-10-28 15:40:12 -06:00
commit c1e16482ba
5 changed files with 17 additions and 10 deletions

View File

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

View File

@ -186,7 +186,11 @@ public class Thread implements Runnable {
} }
public StackTraceElement[] getStackTrace() { 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); private static native Object getStackTrace(long peer);

View File

@ -16,15 +16,16 @@
#include "string.h" #include "string.h"
#undef JNIEXPORT #undef JNIEXPORT
#if (defined __MINGW32__) || (defined _MSC_VER) #if (defined __MINGW32__) || (defined _MSC_VER)
# define PLATFORM_WINDOWS # define PLATFORM_WINDOWS
# define PATH_SEPARATOR ';' # define PATH_SEPARATOR ';'
# define JNIEXPORT __declspec(dllexport) # define JNIEXPORT __declspec(dllexport)
#else #else // not (defined __MINGW32__) || (defined _MSC_VER)
# define PLATFORM_POSIX # define PLATFORM_POSIX
# define PATH_SEPARATOR ':' # define PATH_SEPARATOR ':'
# define JNIEXPORT __attribute__ ((visibility("default"))) # define JNIEXPORT __attribute__ ((visibility("default")))
#endif #endif // not (defined __MINGW32__) || (defined _MSC_VER)
#ifdef _MSC_VER #ifdef _MSC_VER

View File

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

View File

@ -92,10 +92,10 @@ typedef uint64_t uintptr_t;
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
# define JNIEXPORT __declspec(dllexport) # define JNIEXPORT __declspec(dllexport)
# define PATH_SEPARATOR ';' # define PATH_SEPARATOR ';'
#else #else // not PLATFORM_WINDOWS
# define JNIEXPORT __attribute__ ((visibility("default"))) # define JNIEXPORT __attribute__ ((visibility("default")))
# define PATH_SEPARATOR ':' # define PATH_SEPARATOR ':'
#endif #endif // not PLATFORM_WINDOWS
#if (defined ARCH_x86_32) || (defined ARCH_powerpc) || (defined ARCH_arm) #if (defined ARCH_x86_32) || (defined ARCH_powerpc) || (defined ARCH_arm)
# define LD "ld" # define LD "ld"