Merge branch 'master' into prv-ga-merge

This commit is contained in:
Joel Dice
2012-02-27 13:28:06 -07:00
9 changed files with 32 additions and 14 deletions

2
.gitignore vendored
View File

@ -5,3 +5,5 @@ build
.project .project
.settings .settings
bin bin
/lib
/distrib

View File

@ -324,7 +324,19 @@ extern "C" JNIEXPORT jstring JNICALL
Java_java_io_File_toAbsolutePath(JNIEnv* e UNUSED, jclass, jstring path) Java_java_io_File_toAbsolutePath(JNIEnv* e UNUSED, jclass, jstring path)
{ {
#ifdef PLATFORM_WINDOWS #ifdef PLATFORM_WINDOWS
// todo string_t chars = getChars(e, path);
if (chars) {
const unsigned BufferSize = MAX_PATH;
char_t buffer[BufferSize];
DWORD success = GetFullPathNameW(chars, BufferSize, buffer, 0);
releaseChars(e, path, chars);
if (success) {
return e->NewString
(reinterpret_cast<const jchar*>(buffer), wcslen(buffer));
}
}
return path; return path;
#else #else
jstring result = path; jstring result = path;

View File

@ -40,7 +40,7 @@ public abstract class URLStreamHandler {
host = s.substring(0, colon); host = s.substring(0, colon);
port = Integer.parseInt(s.substring(colon + 1, slash)); port = Integer.parseInt(s.substring(colon + 1, slash));
} }
s = s.substring(slash + 1); s = s.substring(slash);
} }
} }

View File

@ -51,6 +51,8 @@ test-build = $(build)/test
src = src src = src
classpath-src = classpath classpath-src = classpath
test = test test = test
win32 ?= $(root)/win32
win64 ?= $(root)/win64
classpath = avian classpath = avian
@ -361,8 +363,8 @@ endif
ifeq ($(platform),windows) ifeq ($(platform),windows)
bootimage-cflags += -DTARGET_PLATFORM_WINDOWS bootimage-cflags += -DTARGET_PLATFORM_WINDOWS
inc = "$(root)/win32/include" inc = "$(win32)/include"
lib = "$(root)/win32/lib" lib = "$(win32)/lib"
embed-prefix = c:/avian-embedded embed-prefix = c:/avian-embedded
@ -411,8 +413,8 @@ ifeq ($(platform),windows)
ar = x86_64-w64-mingw32-ar ar = x86_64-w64-mingw32-ar
ranlib = x86_64-w64-mingw32-ranlib ranlib = x86_64-w64-mingw32-ranlib
strip = x86_64-w64-mingw32-strip strip = x86_64-w64-mingw32-strip
inc = "$(root)/win64/include" inc = "$(win64)/include"
lib = "$(root)/win64/lib" lib = "$(win64)/lib"
endif endif
endif endif
@ -469,7 +471,7 @@ build-ld := $(build-cc)
ifdef msvc ifdef msvc
windows-java-home := $(shell cygpath -m "$(JAVA_HOME)") windows-java-home := $(shell cygpath -m "$(JAVA_HOME)")
zlib := $(shell cygpath -m "$(root)/win32/msvc") zlib := $(shell cygpath -m "$(win32)/msvc")
cxx = "$(msvc)/BIN/cl.exe" cxx = "$(msvc)/BIN/cl.exe"
cc = $(cxx) cc = $(cxx)
ld = "$(msvc)/BIN/link.exe" ld = "$(msvc)/BIN/link.exe"
@ -478,7 +480,8 @@ ifdef msvc
-DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \ -DUSE_ATOMIC_OPERATIONS -DAVIAN_JAVA_HOME=\"$(javahome)\" \
-DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" \ -DAVIAN_EMBED_PREFIX=\"$(embed-prefix)\" \
-Fd$(build)/$(name).pdb -I"$(zlib)/include" -I$(src) -I"$(build)" \ -Fd$(build)/$(name).pdb -I"$(zlib)/include" -I$(src) -I"$(build)" \
-I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" -I"$(windows-java-home)/include" -I"$(windows-java-home)/include/win32" \
-DTARGET_BYTES_PER_WORD=$(pointer-size) -DTARGET_PLATFORM_WINDOWS
shared = -dll shared = -dll
lflags = -nologo -LIBPATH:"$(zlib)/lib" -DEFAULTLIB:ws2_32 \ lflags = -nologo -LIBPATH:"$(zlib)/lib" -DEFAULTLIB:ws2_32 \
-DEFAULTLIB:zlib -MANIFEST -debug -DEFAULTLIB:zlib -MANIFEST -debug

View File

@ -56,10 +56,12 @@ typedef unsigned __int64 uint64_t;
# ifdef _M_IX86 # ifdef _M_IX86
typedef int32_t intptr_t; typedef int32_t intptr_t;
typedef uint32_t uintptr_t; typedef uint32_t uintptr_t;
# define UINT64_C(x) x##LL
# define ARCH_x86_32 # define ARCH_x86_32
# elif defined _M_X64 # elif defined _M_X64
typedef int64_t intptr_t; typedef int64_t intptr_t;
typedef uint64_t uintptr_t; typedef uint64_t uintptr_t;
# define UINT64_C(x) x##L
# define ARCH_x86_64 # define ARCH_x86_64
# else # else
# error "unsupported architecture" # error "unsupported architecture"

View File

@ -173,7 +173,7 @@ class Finder {
virtual void dispose() = 0; virtual void dispose() = 0;
}; };
Finder* JNIEXPORT Finder*
makeFinder(System* s, Allocator* a, const char* path, const char* bootLibrary); makeFinder(System* s, Allocator* a, const char* path, const char* bootLibrary);
Finder* Finder*

View File

@ -3884,10 +3884,10 @@ errorLog(Thread* t)
} // namespace vm } // namespace vm
void JNIEXPORT void
vmPrintTrace(vm::Thread* t); vmPrintTrace(vm::Thread* t);
void* JNIEXPORT void*
vmAddressFromLine(vm::Thread* t, vm::object m, unsigned line); vmAddressFromLine(vm::Thread* t, vm::object m, unsigned line);
#endif//MACHINE_H #endif//MACHINE_H

View File

@ -199,7 +199,7 @@ assert(System* s, bool v)
#endif // not NDEBUG #endif // not NDEBUG
System* JNIEXPORT System*
makeSystem(const char* crashDumpDirectory); makeSystem(const char* crashDumpDirectory);
} // namespace vm } // namespace vm

View File

@ -3,7 +3,7 @@ import java.net.URL;
public class UrlTest { public class UrlTest {
private static String query="var1=val1&var2=val2"; private static String query="var1=val1&var2=val2";
private static String path="testpath"; private static String path="/testpath";
private static String domain="file://www.readytalk.com"; private static String domain="file://www.readytalk.com";
private static String file=path + "?" + query; private static String file=path + "?" + query;
private static URL url; private static URL url;
@ -15,7 +15,6 @@ public class UrlTest {
private static void setupURL() throws MalformedURLException { private static void setupURL() throws MalformedURLException {
StringBuilder builder = new StringBuilder(); StringBuilder builder = new StringBuilder();
builder.append(domain); builder.append(domain);
builder.append("/");
builder.append(file); builder.append(file);
url = new URL(builder.toString()); url = new URL(builder.toString());
} }