diff --git a/makefile b/makefile index 23469d9e43..200d132d71 100644 --- a/makefile +++ b/makefile @@ -268,18 +268,18 @@ ifeq ($(platform),windows) ifeq (,$(filter mingw32 cygwin,$(build-platform))) openjdk-extra-cflags += -I$(src)/openjdk/caseSensitive - cxx = x86_64-w64-mingw32-g++ -m32 - cc = x86_64-w64-mingw32-gcc -m32 - dlltool = x86_64-w64-mingw32-dlltool -mi386 --as-flags=--32 - ar = x86_64-w64-mingw32-ar - ranlib = x86_64-w64-mingw32-ranlib - strip = x86_64-w64-mingw32-strip --strip-all - # cxx = i586-mingw32msvc-g++ - # cc = i586-mingw32msvc-gcc - # dlltool = i586-mingw32msvc-dlltool - # ar = i586-mingw32msvc-ar - # ranlib = i586-mingw32msvc-ranlib - # strip = i586-mingw32msvc-strip + # cxx = x86_64-w64-mingw32-g++ -m32 + # cc = x86_64-w64-mingw32-gcc -m32 + # dlltool = x86_64-w64-mingw32-dlltool -mi386 --as-flags=--32 + # ar = x86_64-w64-mingw32-ar + # ranlib = x86_64-w64-mingw32-ranlib + # strip = x86_64-w64-mingw32-strip --strip-all + cxx = i586-mingw32msvc-g++ + cc = i586-mingw32msvc-gcc + dlltool = i586-mingw32msvc-dlltool + ar = i586-mingw32msvc-ar + ranlib = i586-mingw32msvc-ranlib + strip = i586-mingw32msvc-strip --strip-all else build-system = windows common-cflags += "-I$(JAVA_HOME)/include/win32" @@ -824,8 +824,10 @@ $(openjdk-objects): $(build)/openjdk/%.o: $(openjdk-src)/%.c \ $(openjdk-headers-dep) @echo "compiling $(@)" @mkdir -p $(dir $(@)) + sed 's/^static jclass ia_class;//' < $(<) > $(build)/openjdk/$(notdir $(<)) $(cc) -fPIC $(openjdk-extra-cflags) $(openjdk-cflags) \ - $(optimization-cflags) -w -c $(<) $(call output,$(@)) + $(optimization-cflags) -w -c $(build)/openjdk/$(notdir $(<)) \ + $(call output,$(@)) $(openjdk-local-objects): $(build)/openjdk/%.o: $(src)/openjdk/%.c \ $(openjdk-headers-dep) @@ -843,6 +845,9 @@ ifeq ($(platform),windows) sed 's/^#ifdef _WIN64/#if 1/' \ < "$(openjdk-src)/windows/native/java/net/net_util_md.h" \ > $(build)/openjdk/net_util_md.h + cp "$(openjdk-src)/windows/native/java/net/NetworkInterface.h" \ + $(build)/openjdk/NetworkInterface.h + echo 'static int getAddrsFromAdapter(IP_ADAPTER_ADDRESSES *ptr, netaddr **netaddrPP);' >> $(build)/openjdk/NetworkInterface.h endif @touch $(@) diff --git a/openjdk-src.mk b/openjdk-src.mk index df23e4772c..26d0c27644 100644 --- a/openjdk-src.mk +++ b/openjdk-src.mk @@ -221,6 +221,7 @@ ifeq ($(platform),windows) "-I$(openjdk-src)/windows/native/java/io" \ "-I$(openjdk-src)/windows/native/java/net" \ "-I$(openjdk-src)/windows/native/java/util" \ + "-I$(openjdk-src)/windows/native/sun/nio/ch" \ "-I$(openjdk-src)/windows/javavm/include" \ "-I$(root)/win32/include" \ -D_JNI_IMPLEMENTATION_ \ diff --git a/src/classpath-openjdk.cpp b/src/classpath-openjdk.cpp index 9c115aaa2f..177dd077ef 100644 --- a/src/classpath-openjdk.cpp +++ b/src/classpath-openjdk.cpp @@ -54,6 +54,8 @@ typedef int socklen_t; +# define RTLD_DEFAULT 0 + #else // not PLATFORM_WINDOWS # include diff --git a/src/openjdk/caseSensitive/WS2tcpip.h b/src/openjdk/caseSensitive/WS2tcpip.h new file mode 100644 index 0000000000..5caab3e7f6 --- /dev/null +++ b/src/openjdk/caseSensitive/WS2tcpip.h @@ -0,0 +1 @@ +#include "ws2tcpip.h"