fix MSVC build rot

This commit is contained in:
Joel Dice 2010-04-15 11:11:10 -06:00
parent b6936fb597
commit e5fad03632
4 changed files with 187 additions and 170 deletions

View File

@ -277,6 +277,7 @@ ifdef msvc
ld = "$(msvc)/BIN/link.exe" ld = "$(msvc)/BIN/link.exe"
mt = "mt.exe" mt = "mt.exe"
cflags = -nologo -DAVIAN_VERSION=\"$(version)\" -D_JNI_IMPLEMENTATION_ \ cflags = -nologo -DAVIAN_VERSION=\"$(version)\" -D_JNI_IMPLEMENTATION_ \
-DUSE_ATOMIC_OPERATIONS \
-Fd$(native-build)/$(name).pdb -I"$(zlib)/include" -I$(src) \ -Fd$(native-build)/$(name).pdb -I"$(zlib)/include" -I$(src) \
-I"$(native-build)" -I"$(windows-java-home)/include" \ -I"$(native-build)" -I"$(windows-java-home)/include" \
-I"$(windows-java-home)/include/win32" -I"$(windows-java-home)/include/win32"

View File

@ -11,6 +11,14 @@
#ifndef ARCH_H #ifndef ARCH_H
#define ARCH_H #define ARCH_H
#ifdef _MSC_VER
# include "windows.h"
# pragma push_macro("assert")
# include "intrin.h"
# pragma pop_macro("assert")
# undef interface
#endif
#include "common.h" #include "common.h"
extern "C" void NO_RETURN extern "C" void NO_RETURN

View File

@ -18,6 +18,8 @@ using namespace vm;
namespace { namespace {
namespace local {
const uintptr_t InterfaceMethodID const uintptr_t InterfaceMethodID
= (static_cast<uintptr_t>(1) << (BitsPerWord - 1)); = (static_cast<uintptr_t>(1) << (BitsPerWord - 1));
@ -117,7 +119,7 @@ GetEnv(Machine* m, Thread** t, jint version)
} }
} }
jsize JNICALL jint JNICALL
GetVersion(Thread* t) GetVersion(Thread* t)
{ {
ENTER(t, Thread::ActiveState); ENTER(t, Thread::ActiveState);
@ -1906,6 +1908,8 @@ append(char** p, const char* value, unsigned length, char tail)
} }
} }
} // namespace local
} // namespace } // namespace
namespace vm { namespace vm {
@ -1926,170 +1930,171 @@ populateJNITables(JavaVMVTable* vmTable, JNIEnvVTable* envTable)
{ {
memset(vmTable, 0, sizeof(JavaVMVTable)); memset(vmTable, 0, sizeof(JavaVMVTable));
vmTable->DestroyJavaVM = DestroyJavaVM; vmTable->DestroyJavaVM = local::DestroyJavaVM;
vmTable->AttachCurrentThread = AttachCurrentThread; vmTable->AttachCurrentThread = local::AttachCurrentThread;
vmTable->AttachCurrentThreadAsDaemon = AttachCurrentThreadAsDaemon; vmTable->AttachCurrentThreadAsDaemon = local::AttachCurrentThreadAsDaemon;
vmTable->DetachCurrentThread = DetachCurrentThread; vmTable->DetachCurrentThread = local::DetachCurrentThread;
vmTable->GetEnv = GetEnv; vmTable->GetEnv = local::GetEnv;
memset(envTable, 0, sizeof(JNIEnvVTable)); memset(envTable, 0, sizeof(JNIEnvVTable));
envTable->GetVersion = ::GetVersion; envTable->GetVersion = local::GetVersion;
envTable->GetStringLength = ::GetStringLength; envTable->GetStringLength = local::GetStringLength;
envTable->GetStringChars = ::GetStringChars; envTable->GetStringChars = local::GetStringChars;
envTable->ReleaseStringChars = ::ReleaseStringChars; envTable->ReleaseStringChars = local::ReleaseStringChars;
envTable->GetStringUTFLength = ::GetStringUTFLength; envTable->GetStringUTFLength = local::GetStringUTFLength;
envTable->GetStringUTFChars = ::GetStringUTFChars; envTable->GetStringUTFChars = local::GetStringUTFChars;
envTable->ReleaseStringUTFChars = ::ReleaseStringUTFChars; envTable->ReleaseStringUTFChars = local::ReleaseStringUTFChars;
envTable->GetArrayLength = ::GetArrayLength; envTable->GetArrayLength = local::GetArrayLength;
envTable->NewString = ::NewString; envTable->NewString = local::NewString;
envTable->NewStringUTF = ::NewStringUTF; envTable->NewStringUTF = local::NewStringUTF;
envTable->FindClass = ::FindClass; envTable->FindClass = local::FindClass;
envTable->ThrowNew = ::ThrowNew; envTable->ThrowNew = local::ThrowNew;
envTable->ExceptionCheck = ::ExceptionCheck; envTable->ExceptionCheck = local::ExceptionCheck;
envTable->NewDirectByteBuffer = ::NewDirectByteBuffer; envTable->NewDirectByteBuffer = local::NewDirectByteBuffer;
envTable->GetDirectBufferAddress = ::GetDirectBufferAddress; envTable->GetDirectBufferAddress = local::GetDirectBufferAddress;
envTable->GetDirectBufferCapacity = ::GetDirectBufferCapacity; envTable->GetDirectBufferCapacity = local::GetDirectBufferCapacity;
envTable->DeleteLocalRef = ::DeleteLocalRef; envTable->DeleteLocalRef = local::DeleteLocalRef;
envTable->GetObjectClass = ::GetObjectClass; envTable->GetObjectClass = local::GetObjectClass;
envTable->IsInstanceOf = ::IsInstanceOf; envTable->IsInstanceOf = local::IsInstanceOf;
envTable->GetFieldID = ::GetFieldID; envTable->GetFieldID = local::GetFieldID;
envTable->GetMethodID = ::GetMethodID; envTable->GetMethodID = local::GetMethodID;
envTable->GetStaticMethodID = ::GetStaticMethodID; envTable->GetStaticMethodID = local::GetStaticMethodID;
envTable->NewObject = ::NewObject; envTable->NewObject = local::NewObject;
envTable->NewObjectV = ::NewObjectV; envTable->NewObjectV = local::NewObjectV;
envTable->CallObjectMethodV = ::CallObjectMethodV; envTable->CallObjectMethodV = local::CallObjectMethodV;
envTable->CallObjectMethod = ::CallObjectMethod; envTable->CallObjectMethod = local::CallObjectMethod;
envTable->CallBooleanMethodV = ::CallBooleanMethodV; envTable->CallBooleanMethodV = local::CallBooleanMethodV;
envTable->CallBooleanMethod = ::CallBooleanMethod; envTable->CallBooleanMethod = local::CallBooleanMethod;
envTable->CallByteMethodV = ::CallByteMethodV; envTable->CallByteMethodV = local::CallByteMethodV;
envTable->CallByteMethod = ::CallByteMethod; envTable->CallByteMethod = local::CallByteMethod;
envTable->CallCharMethodV = ::CallCharMethodV; envTable->CallCharMethodV = local::CallCharMethodV;
envTable->CallCharMethod = ::CallCharMethod; envTable->CallCharMethod = local::CallCharMethod;
envTable->CallShortMethodV = ::CallShortMethodV; envTable->CallShortMethodV = local::CallShortMethodV;
envTable->CallShortMethod = ::CallShortMethod; envTable->CallShortMethod = local::CallShortMethod;
envTable->CallIntMethodV = ::CallIntMethodV; envTable->CallIntMethodV = local::CallIntMethodV;
envTable->CallIntMethod = ::CallIntMethod; envTable->CallIntMethod = local::CallIntMethod;
envTable->CallLongMethodV = ::CallLongMethodV; envTable->CallLongMethodV = local::CallLongMethodV;
envTable->CallLongMethod = ::CallLongMethod; envTable->CallLongMethod = local::CallLongMethod;
envTable->CallFloatMethodV = ::CallFloatMethodV; envTable->CallFloatMethodV = local::CallFloatMethodV;
envTable->CallFloatMethod = ::CallFloatMethod; envTable->CallFloatMethod = local::CallFloatMethod;
envTable->CallDoubleMethodV = ::CallDoubleMethodV; envTable->CallDoubleMethodV = local::CallDoubleMethodV;
envTable->CallDoubleMethod = ::CallDoubleMethod; envTable->CallDoubleMethod = local::CallDoubleMethod;
envTable->CallVoidMethodV = ::CallVoidMethodV; envTable->CallVoidMethodV = local::CallVoidMethodV;
envTable->CallVoidMethod = ::CallVoidMethod; envTable->CallVoidMethod = local::CallVoidMethod;
envTable->CallStaticObjectMethodV = ::CallStaticObjectMethodV; envTable->CallStaticObjectMethodV = local::CallStaticObjectMethodV;
envTable->CallStaticObjectMethod = ::CallStaticObjectMethod; envTable->CallStaticObjectMethod = local::CallStaticObjectMethod;
envTable->CallStaticBooleanMethodV = ::CallStaticBooleanMethodV; envTable->CallStaticBooleanMethodV = local::CallStaticBooleanMethodV;
envTable->CallStaticBooleanMethod = ::CallStaticBooleanMethod; envTable->CallStaticBooleanMethod = local::CallStaticBooleanMethod;
envTable->CallStaticByteMethodV = ::CallStaticByteMethodV; envTable->CallStaticByteMethodV = local::CallStaticByteMethodV;
envTable->CallStaticByteMethod = ::CallStaticByteMethod; envTable->CallStaticByteMethod = local::CallStaticByteMethod;
envTable->CallStaticCharMethodV = ::CallStaticCharMethodV; envTable->CallStaticCharMethodV = local::CallStaticCharMethodV;
envTable->CallStaticCharMethod = ::CallStaticCharMethod; envTable->CallStaticCharMethod = local::CallStaticCharMethod;
envTable->CallStaticShortMethodV = ::CallStaticShortMethodV; envTable->CallStaticShortMethodV = local::CallStaticShortMethodV;
envTable->CallStaticShortMethod = ::CallStaticShortMethod; envTable->CallStaticShortMethod = local::CallStaticShortMethod;
envTable->CallStaticIntMethodV = ::CallStaticIntMethodV; envTable->CallStaticIntMethodV = local::CallStaticIntMethodV;
envTable->CallStaticIntMethod = ::CallStaticIntMethod; envTable->CallStaticIntMethod = local::CallStaticIntMethod;
envTable->CallStaticLongMethodV = ::CallStaticLongMethodV; envTable->CallStaticLongMethodV = local::CallStaticLongMethodV;
envTable->CallStaticLongMethod = ::CallStaticLongMethod; envTable->CallStaticLongMethod = local::CallStaticLongMethod;
envTable->CallStaticFloatMethodV = ::CallStaticFloatMethodV; envTable->CallStaticFloatMethodV = local::CallStaticFloatMethodV;
envTable->CallStaticFloatMethod = ::CallStaticFloatMethod; envTable->CallStaticFloatMethod = local::CallStaticFloatMethod;
envTable->CallStaticDoubleMethodV = ::CallStaticDoubleMethodV; envTable->CallStaticDoubleMethodV = local::CallStaticDoubleMethodV;
envTable->CallStaticDoubleMethod = ::CallStaticDoubleMethod; envTable->CallStaticDoubleMethod = local::CallStaticDoubleMethod;
envTable->CallStaticVoidMethodV = ::CallStaticVoidMethodV; envTable->CallStaticVoidMethodV = local::CallStaticVoidMethodV;
envTable->CallStaticVoidMethod = ::CallStaticVoidMethod; envTable->CallStaticVoidMethod = local::CallStaticVoidMethod;
envTable->GetStaticFieldID = ::GetStaticFieldID; envTable->GetStaticFieldID = local::GetStaticFieldID;
envTable->GetObjectField = ::GetObjectField; envTable->GetObjectField = local::GetObjectField;
envTable->GetBooleanField = ::GetBooleanField; envTable->GetBooleanField = local::GetBooleanField;
envTable->GetByteField = ::GetByteField; envTable->GetByteField = local::GetByteField;
envTable->GetCharField = ::GetCharField; envTable->GetCharField = local::GetCharField;
envTable->GetShortField = ::GetShortField; envTable->GetShortField = local::GetShortField;
envTable->GetIntField = ::GetIntField; envTable->GetIntField = local::GetIntField;
envTable->GetLongField = ::GetLongField; envTable->GetLongField = local::GetLongField;
envTable->GetFloatField = ::GetFloatField; envTable->GetFloatField = local::GetFloatField;
envTable->GetDoubleField = ::GetDoubleField; envTable->GetDoubleField = local::GetDoubleField;
envTable->SetObjectField = ::SetObjectField; envTable->SetObjectField = local::SetObjectField;
envTable->SetBooleanField = ::SetBooleanField; envTable->SetBooleanField = local::SetBooleanField;
envTable->SetByteField = ::SetByteField; envTable->SetByteField = local::SetByteField;
envTable->SetCharField = ::SetCharField; envTable->SetCharField = local::SetCharField;
envTable->SetShortField = ::SetShortField; envTable->SetShortField = local::SetShortField;
envTable->SetIntField = ::SetIntField; envTable->SetIntField = local::SetIntField;
envTable->SetLongField = ::SetLongField; envTable->SetLongField = local::SetLongField;
envTable->SetFloatField = ::SetFloatField; envTable->SetFloatField = local::SetFloatField;
envTable->SetDoubleField = ::SetDoubleField; envTable->SetDoubleField = local::SetDoubleField;
envTable->GetStaticObjectField = ::GetStaticObjectField; envTable->GetStaticObjectField = local::GetStaticObjectField;
envTable->GetStaticBooleanField = ::GetStaticBooleanField; envTable->GetStaticBooleanField = local::GetStaticBooleanField;
envTable->GetStaticByteField = ::GetStaticByteField; envTable->GetStaticByteField = local::GetStaticByteField;
envTable->GetStaticCharField = ::GetStaticCharField; envTable->GetStaticCharField = local::GetStaticCharField;
envTable->GetStaticShortField = ::GetStaticShortField; envTable->GetStaticShortField = local::GetStaticShortField;
envTable->GetStaticIntField = ::GetStaticIntField; envTable->GetStaticIntField = local::GetStaticIntField;
envTable->GetStaticLongField = ::GetStaticLongField; envTable->GetStaticLongField = local::GetStaticLongField;
envTable->GetStaticFloatField = ::GetStaticFloatField; envTable->GetStaticFloatField = local::GetStaticFloatField;
envTable->GetStaticDoubleField = ::GetStaticDoubleField; envTable->GetStaticDoubleField = local::GetStaticDoubleField;
envTable->SetStaticObjectField = ::SetStaticObjectField; envTable->SetStaticObjectField = local::SetStaticObjectField;
envTable->SetStaticBooleanField = ::SetStaticBooleanField; envTable->SetStaticBooleanField = local::SetStaticBooleanField;
envTable->SetStaticByteField = ::SetStaticByteField; envTable->SetStaticByteField = local::SetStaticByteField;
envTable->SetStaticCharField = ::SetStaticCharField; envTable->SetStaticCharField = local::SetStaticCharField;
envTable->SetStaticShortField = ::SetStaticShortField; envTable->SetStaticShortField = local::SetStaticShortField;
envTable->SetStaticIntField = ::SetStaticIntField; envTable->SetStaticIntField = local::SetStaticIntField;
envTable->SetStaticLongField = ::SetStaticLongField; envTable->SetStaticLongField = local::SetStaticLongField;
envTable->SetStaticFloatField = ::SetStaticFloatField; envTable->SetStaticFloatField = local::SetStaticFloatField;
envTable->SetStaticDoubleField = ::SetStaticDoubleField; envTable->SetStaticDoubleField = local::SetStaticDoubleField;
envTable->NewGlobalRef = ::NewGlobalRef; envTable->NewGlobalRef = local::NewGlobalRef;
envTable->NewWeakGlobalRef = ::NewGlobalRef; envTable->NewWeakGlobalRef = local::NewGlobalRef;
envTable->DeleteGlobalRef = ::DeleteGlobalRef; envTable->DeleteGlobalRef = local::DeleteGlobalRef;
envTable->ExceptionOccurred = ::ExceptionOccurred; envTable->ExceptionOccurred = local::ExceptionOccurred;
envTable->ExceptionDescribe = ::ExceptionDescribe; envTable->ExceptionDescribe = local::ExceptionDescribe;
envTable->ExceptionClear = ::ExceptionClear; envTable->ExceptionClear = local::ExceptionClear;
envTable->NewObjectArray = ::NewObjectArray; envTable->NewObjectArray = local::NewObjectArray;
envTable->GetObjectArrayElement = ::GetObjectArrayElement; envTable->GetObjectArrayElement = local::GetObjectArrayElement;
envTable->SetObjectArrayElement = ::SetObjectArrayElement; envTable->SetObjectArrayElement = local::SetObjectArrayElement;
envTable->NewBooleanArray = ::NewBooleanArray; envTable->NewBooleanArray = local::NewBooleanArray;
envTable->NewByteArray = ::NewByteArray; envTable->NewByteArray = local::NewByteArray;
envTable->NewCharArray = ::NewCharArray; envTable->NewCharArray = local::NewCharArray;
envTable->NewShortArray = ::NewShortArray; envTable->NewShortArray = local::NewShortArray;
envTable->NewIntArray = ::NewIntArray; envTable->NewIntArray = local::NewIntArray;
envTable->NewLongArray = ::NewLongArray; envTable->NewLongArray = local::NewLongArray;
envTable->NewFloatArray = ::NewFloatArray; envTable->NewFloatArray = local::NewFloatArray;
envTable->NewDoubleArray = ::NewDoubleArray; envTable->NewDoubleArray = local::NewDoubleArray;
envTable->GetBooleanArrayElements = ::GetBooleanArrayElements; envTable->GetBooleanArrayElements = local::GetBooleanArrayElements;
envTable->GetByteArrayElements = ::GetByteArrayElements; envTable->GetByteArrayElements = local::GetByteArrayElements;
envTable->GetCharArrayElements = ::GetCharArrayElements; envTable->GetCharArrayElements = local::GetCharArrayElements;
envTable->GetShortArrayElements = ::GetShortArrayElements; envTable->GetShortArrayElements = local::GetShortArrayElements;
envTable->GetIntArrayElements = ::GetIntArrayElements; envTable->GetIntArrayElements = local::GetIntArrayElements;
envTable->GetLongArrayElements = ::GetLongArrayElements; envTable->GetLongArrayElements = local::GetLongArrayElements;
envTable->GetFloatArrayElements = ::GetFloatArrayElements; envTable->GetFloatArrayElements = local::GetFloatArrayElements;
envTable->GetDoubleArrayElements = ::GetDoubleArrayElements; envTable->GetDoubleArrayElements = local::GetDoubleArrayElements;
envTable->ReleaseBooleanArrayElements = ::ReleaseBooleanArrayElements; envTable->ReleaseBooleanArrayElements = local::ReleaseBooleanArrayElements;
envTable->ReleaseByteArrayElements = ::ReleaseByteArrayElements; envTable->ReleaseByteArrayElements = local::ReleaseByteArrayElements;
envTable->ReleaseCharArrayElements = ::ReleaseCharArrayElements; envTable->ReleaseCharArrayElements = local::ReleaseCharArrayElements;
envTable->ReleaseShortArrayElements = ::ReleaseShortArrayElements; envTable->ReleaseShortArrayElements = local::ReleaseShortArrayElements;
envTable->ReleaseIntArrayElements = ::ReleaseIntArrayElements; envTable->ReleaseIntArrayElements = local::ReleaseIntArrayElements;
envTable->ReleaseLongArrayElements = ::ReleaseLongArrayElements; envTable->ReleaseLongArrayElements = local::ReleaseLongArrayElements;
envTable->ReleaseFloatArrayElements = ::ReleaseFloatArrayElements; envTable->ReleaseFloatArrayElements = local::ReleaseFloatArrayElements;
envTable->ReleaseDoubleArrayElements = ::ReleaseDoubleArrayElements; envTable->ReleaseDoubleArrayElements = local::ReleaseDoubleArrayElements;
envTable->GetBooleanArrayRegion = ::GetBooleanArrayRegion; envTable->GetBooleanArrayRegion = local::GetBooleanArrayRegion;
envTable->GetByteArrayRegion = ::GetByteArrayRegion; envTable->GetByteArrayRegion = local::GetByteArrayRegion;
envTable->GetCharArrayRegion = ::GetCharArrayRegion; envTable->GetCharArrayRegion = local::GetCharArrayRegion;
envTable->GetShortArrayRegion = ::GetShortArrayRegion; envTable->GetShortArrayRegion = local::GetShortArrayRegion;
envTable->GetIntArrayRegion = ::GetIntArrayRegion; envTable->GetIntArrayRegion = local::GetIntArrayRegion;
envTable->GetLongArrayRegion = ::GetLongArrayRegion; envTable->GetLongArrayRegion = local::GetLongArrayRegion;
envTable->GetFloatArrayRegion = ::GetFloatArrayRegion; envTable->GetFloatArrayRegion = local::GetFloatArrayRegion;
envTable->GetDoubleArrayRegion = ::GetDoubleArrayRegion; envTable->GetDoubleArrayRegion = local::GetDoubleArrayRegion;
envTable->SetBooleanArrayRegion = ::SetBooleanArrayRegion; envTable->SetBooleanArrayRegion = local::SetBooleanArrayRegion;
envTable->SetByteArrayRegion = ::SetByteArrayRegion; envTable->SetByteArrayRegion = local::SetByteArrayRegion;
envTable->SetCharArrayRegion = ::SetCharArrayRegion; envTable->SetCharArrayRegion = local::SetCharArrayRegion;
envTable->SetShortArrayRegion = ::SetShortArrayRegion; envTable->SetShortArrayRegion = local::SetShortArrayRegion;
envTable->SetIntArrayRegion = ::SetIntArrayRegion; envTable->SetIntArrayRegion = local::SetIntArrayRegion;
envTable->SetLongArrayRegion = ::SetLongArrayRegion; envTable->SetLongArrayRegion = local::SetLongArrayRegion;
envTable->SetFloatArrayRegion = ::SetFloatArrayRegion; envTable->SetFloatArrayRegion = local::SetFloatArrayRegion;
envTable->SetDoubleArrayRegion = ::SetDoubleArrayRegion; envTable->SetDoubleArrayRegion = local::SetDoubleArrayRegion;
envTable->GetPrimitiveArrayCritical = ::GetPrimitiveArrayCritical; envTable->GetPrimitiveArrayCritical = local::GetPrimitiveArrayCritical;
envTable->ReleasePrimitiveArrayCritical = ::ReleasePrimitiveArrayCritical; envTable->ReleasePrimitiveArrayCritical
envTable->MonitorEnter = MonitorEnter; = local::ReleasePrimitiveArrayCritical;
envTable->MonitorExit = MonitorExit; envTable->MonitorEnter = local::MonitorEnter;
envTable->GetJavaVM = ::GetJavaVM; envTable->MonitorExit = local::MonitorExit;
envTable->IsSameObject = ::IsSameObject; envTable->GetJavaVM = local::GetJavaVM;
envTable->IsSameObject = local::IsSameObject;
} }
} // namespace vm } // namespace vm
@ -2111,7 +2116,7 @@ JNI_GetDefaultJavaVMInitArgs(void*)
extern "C" JNIEXPORT jint JNICALL extern "C" JNIEXPORT jint JNICALL
JNI_CreateJavaVM(Machine** m, Thread** t, void* args) JNI_CreateJavaVM(Machine** m, Thread** t, void* args)
{ {
JavaVMInitArgs* a = static_cast<JavaVMInitArgs*>(args); local::JavaVMInitArgs* a = static_cast<local::JavaVMInitArgs*>(args);
unsigned heapLimit = 0; unsigned heapLimit = 0;
const char* bootLibrary = 0; const char* bootLibrary = 0;
@ -2127,7 +2132,7 @@ JNI_CreateJavaVM(Machine** m, Thread** t, void* args)
if (strncmp(a->options[i].optionString, "-X", 2) == 0) { if (strncmp(a->options[i].optionString, "-X", 2) == 0) {
const char* p = a->options[i].optionString + 2; const char* p = a->options[i].optionString + 2;
if (strncmp(p, "mx", 2) == 0) { if (strncmp(p, "mx", 2) == 0) {
heapLimit = parseSize(p + 2); heapLimit = local::parseSize(p + 2);
} else if (strncmp(p, BOOTCLASSPATH_PREPEND_OPTION ":", } else if (strncmp(p, BOOTCLASSPATH_PREPEND_OPTION ":",
sizeof(BOOTCLASSPATH_PREPEND_OPTION)) == 0) sizeof(BOOTCLASSPATH_PREPEND_OPTION)) == 0)
{ {
@ -2174,10 +2179,11 @@ JNI_CreateJavaVM(Machine** m, Thread** t, void* args)
RUNTIME_ARRAY(char, classpathBuffer, classpathBufferSize); RUNTIME_ARRAY(char, classpathBuffer, classpathBufferSize);
char* classpathPointer = RUNTIME_ARRAY_BODY(classpathBuffer); char* classpathPointer = RUNTIME_ARRAY_BODY(classpathBuffer);
append(&classpathPointer, bootClasspathPrepend, bcppl, PATH_SEPARATOR); local::append
append(&classpathPointer, bootClasspath, bcpl, PATH_SEPARATOR); (&classpathPointer, bootClasspathPrepend, bcppl, PATH_SEPARATOR);
append(&classpathPointer, bootClasspathAppend, bcpal, PATH_SEPARATOR); local::append(&classpathPointer, bootClasspath, bcpl, PATH_SEPARATOR);
append(&classpathPointer, classpath, cpl, 0); local::append(&classpathPointer, bootClasspathAppend, bcpal, PATH_SEPARATOR);
local::append(&classpathPointer, classpath, cpl, 0);
System* s = makeSystem(crashDumpDirectory); System* s = makeSystem(crashDumpDirectory);
Heap* h = makeHeap(s, heapLimit); Heap* h = makeHeap(s, heapLimit);

View File

@ -199,7 +199,8 @@ inline bool
atomicCompareAndSwap32(uint32_t* p, uint32_t old, uint32_t new_) atomicCompareAndSwap32(uint32_t* p, uint32_t old, uint32_t new_)
{ {
#ifdef _MSC_VER #ifdef _MSC_VER
InterlockedCompareExchange(p, new_, old); return old == InterlockedCompareExchange
(reinterpret_cast<LONG*>(p), new_, old);
#elif (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1) #elif (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)
return __sync_bool_compare_and_swap(p, old, new_); return __sync_bool_compare_and_swap(p, old, new_);
#else #else
@ -218,7 +219,8 @@ inline bool
atomicCompareAndSwap64(uint64_t* p, uint64_t old, uint64_t new_) atomicCompareAndSwap64(uint64_t* p, uint64_t old, uint64_t new_)
{ {
#ifdef _MSC_VER #ifdef _MSC_VER
InterlockedCompareExchange64(p, new_, old); return old == InterlockedCompareExchange64
(reinterpret_cast<LONGLONG*>(p), new_, old);
#elif (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1) #elif (__GNUC__ >= 4) && (__GNUC_MINOR__ >= 1)
return __sync_bool_compare_and_swap(p, old, new_); return __sync_bool_compare_and_swap(p, old, new_);
#else #else