diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2016-08-25 23:31:14 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2016-08-25 23:31:14 +0000 |
commit | 8db76b66ee91468b0f461068735dff7b9f72eb37 (patch) | |
tree | 0bb5eaf0171c83b7ca40aa619f8edc37bc816d38 /java/openjdk6 | |
parent | 410bb49b84a6f26ad9f5021117855c6c8fbbbd5c (diff) | |
download | ports-8db76b66ee91468b0f461068735dff7b9f72eb37.tar.gz ports-8db76b66ee91468b0f461068735dff7b9f72eb37.zip |
Notes
Diffstat (limited to 'java/openjdk6')
-rw-r--r-- | java/openjdk6/Makefile | 4 | ||||
-rw-r--r-- | java/openjdk6/distinfo | 6 | ||||
-rw-r--r-- | java/openjdk6/files/patch-set | 496 | ||||
-rw-r--r-- | java/openjdk6/files/patch-test | 63 |
4 files changed, 268 insertions, 301 deletions
diff --git a/java/openjdk6/Makefile b/java/openjdk6/Makefile index fe57f23d37fc..44c09331a29c 100644 --- a/java/openjdk6/Makefile +++ b/java/openjdk6/Makefile @@ -2,7 +2,7 @@ # $FreeBSD$ PORTNAME= openjdk6 -PORTVERSION= b39 +PORTVERSION= b40 PORTEPOCH= 1 CATEGORIES= java devel MASTER_SITES= APACHE/ant/binaries/:ant \ @@ -27,7 +27,7 @@ LIB_DEPENDS= libfreetype.so:print/freetype2 RUN_DEPENDS= javavm:java/javavmwrapper \ dejavu>0:x11-fonts/dejavu -OPENJDK_BUILDDATE= 03_may_2016 +OPENJDK_BUILDDATE= 22_aug_2016 OPTIONS_DEFINE= ICEDTEA IPV6 POLICY SOUND TZUPDATE OPTIONS_DEFAULT=ICEDTEA TZUPDATE diff --git a/java/openjdk6/distinfo b/java/openjdk6/distinfo index 82bd6861e07f..02c04e5136af 100644 --- a/java/openjdk6/distinfo +++ b/java/openjdk6/distinfo @@ -1,7 +1,7 @@ -TIMESTAMP = 1472019288 +TIMESTAMP = 1472148301 SHA256 (apache-ant-1.9.7-bin.tar.bz2) = be2ff3026cc655dc002bbcce100bd6724d448c63f702aa82b6d9899b22db7808 SIZE (apache-ant-1.9.7-bin.tar.bz2) = 4392108 -SHA256 (openjdk-6-src-b39-03_may_2016.tar.xz) = d11dc2ababe88e7891f1abbd7fa4fe033a65dea22c071331a641374b3247717f -SIZE (openjdk-6-src-b39-03_may_2016.tar.xz) = 33887004 +SHA256 (openjdk-6-src-b40-22_aug_2016.tar.xz) = 70ac61635032e77cecf935b53b22a9545d5d0a7f55ad6a15dca9b84a2be993be +SIZE (openjdk-6-src-b40-22_aug_2016.tar.xz) = 34323680 SHA256 (jtreg-4.1-bin-b05_29_nov_2012.zip) = 9291eb4a14501232b35614e88686ff66ad8b69d0098dbd4322b28f97b672653d SIZE (jtreg-4.1-bin-b05_29_nov_2012.zip) = 5993382 diff --git a/java/openjdk6/files/patch-set b/java/openjdk6/files/patch-set index cf2f76bd1eca..527eec4e598f 100644 --- a/java/openjdk6/files/patch-set +++ b/java/openjdk6/files/patch-set @@ -595,7 +595,11 @@ HOSTCXX = $(CXX) HOSTCC = $(CC) endif -@@ -110,12 +110,16 @@ +@@ -107,15 +107,20 @@ + ifeq ($(SHARK_BUILD), true) + CFLAGS += $(LLVM_CFLAGS) + endif ++CFLAGS += -std=gnu++98 CFLAGS += $(VM_PICFLAG) CFLAGS += -fno-rtti CFLAGS += -fno-exceptions @@ -618,7 +622,7 @@ endif ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) -@@ -163,14 +167,24 @@ +@@ -163,14 +168,24 @@ WARNINGS_ARE_ERRORS = -Werror endif @@ -650,7 +654,7 @@ endif CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) -@@ -282,7 +296,11 @@ +@@ -282,7 +297,11 @@ DEBUG_CFLAGS/ppc = -g DEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH)) ifeq ($(DEBUG_CFLAGS/$(BUILDARCH)),) @@ -2402,7 +2406,7 @@ Compilation* c = Compilation::current(); void* res = c->arena()->Amalloc(size); ((Instruction*)res)->_id = c->get_next_id(); -@@ -1529,7 +1529,7 @@ +@@ -1532,7 +1532,7 @@ friend class SuxAndWeightAdjuster; public: @@ -2433,7 +2437,7 @@ inline const char* bool_to_str(bool b) { --- hotspot/src/share/vm/classfile/verifier.hpp +++ hotspot/src/share/vm/classfile/verifier.hpp -@@ -84,9 +84,9 @@ +@@ -85,9 +85,9 @@ // These macros are used similarly to CHECK macros but also check // the status of the verifier and return if that has an error. #define CHECK_VERIFY(verifier) \ @@ -2645,6 +2649,44 @@ // Accessor float padded_average() const { return _padded_avg; } +--- hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp ++++ hotspot/src/share/vm/interpreter/bytecodeInterpreter.cpp +@@ -1562,7 +1562,7 @@ + #define ARRAY_LOADTO32(T, T2, format, stackRes, extra) \ + { \ + ARRAY_INTRO(-2); \ +- extra; \ ++ (void)extra; \ + SET_ ## stackRes(*(T2 *)(((address) arrObj->base(T)) + index * sizeof(T2)), \ + -2); \ + UPDATE_PC_AND_TOS_AND_CONTINUE(1, -1); \ +@@ -1573,7 +1573,7 @@ + { \ + ARRAY_INTRO(-2); \ + SET_ ## stackRes(*(T2 *)(((address) arrObj->base(T)) + index * sizeof(T2)), -1); \ +- extra; \ ++ (void)extra; \ + UPDATE_PC_AND_CONTINUE(1); \ + } + +@@ -1598,7 +1598,7 @@ + #define ARRAY_STOREFROM32(T, T2, format, stackSrc, extra) \ + { \ + ARRAY_INTRO(-3); \ +- extra; \ ++ (void)extra; \ + *(T2 *)(((address) arrObj->base(T)) + index * sizeof(T2)) = stackSrc( -1); \ + UPDATE_PC_AND_TOS_AND_CONTINUE(1, -3); \ + } +@@ -1607,7 +1607,7 @@ + #define ARRAY_STOREFROM64(T, T2, stackSrc, extra) \ + { \ + ARRAY_INTRO(-4); \ +- extra; \ ++ (void)extra; \ + *(T2 *)(((address) arrObj->base(T)) + index * sizeof(T2)) = stackSrc( -1); \ + UPDATE_PC_AND_TOS_AND_CONTINUE(1, -4); \ + } --- hotspot/src/share/vm/libadt/port.hpp +++ hotspot/src/share/vm/libadt/port.hpp @@ -163,7 +163,7 @@ @@ -2815,7 +2857,7 @@ } --- hotspot/src/share/vm/oops/klass.cpp +++ hotspot/src/share/vm/oops/klass.cpp -@@ -181,7 +181,7 @@ +@@ -190,7 +190,7 @@ } void* Klass_vtbl::operator new(size_t ignored, KlassHandle& klass, @@ -2918,7 +2960,7 @@ return TypeKlassPtr::make(ciArrayKlass::make(t)); } if (!t->is_klass()) { -@@ -4164,7 +4169,7 @@ +@@ -4163,7 +4168,7 @@ } } #else // !ASSERT @@ -2940,7 +2982,7 @@ // Out-of-line code from node constructors. // Executed only when extra debug info. is being passed around. -@@ -459,6 +463,10 @@ +@@ -467,6 +471,10 @@ _in[6] = n6; if (n6 != NULL) n6->add_out((Node *)this); } @@ -2998,7 +3040,7 @@ --- hotspot/src/share/vm/runtime/arguments.cpp +++ hotspot/src/share/vm/runtime/arguments.cpp -@@ -2499,7 +2499,9 @@ +@@ -2507,7 +2507,9 @@ FLAG_SET_CMDLINE(uintx, MaxNewSize, NewSize); } @@ -3008,7 +3050,7 @@ // Increase some data structure sizes for efficiency FLAG_SET_CMDLINE(uintx, BaseFootPrintEstimate, MaxHeapSize); -@@ -3046,6 +3048,10 @@ +@@ -3054,6 +3056,10 @@ UNSUPPORTED_OPTION(UseG1GC, "G1 GC"); #endif @@ -3195,8 +3237,8 @@ --- hotspot/src/share/vm/utilities/macros.hpp +++ hotspot/src/share/vm/utilities/macros.hpp -@@ -177,6 +177,14 @@ - #define NOT_WIN64(code) code +@@ -194,6 +194,14 @@ + #define NOT_SHARK(code) code #endif +#if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__APPLE__) @@ -3212,7 +3254,7 @@ #define X86_ONLY(code) code --- hotspot/src/share/vm/utilities/taskqueue.hpp +++ hotspot/src/share/vm/utilities/taskqueue.hpp -@@ -334,8 +334,12 @@ bool GenericTaskQueue<E, N>::push_slow(E +@@ -334,8 +334,12 @@ if (dirty_n_elems == N - 1) { // Actually means 0, so do the push. uint localBot = _bottom; @@ -3227,7 +3269,7 @@ OrderAccess::release_store(&_bottom, increment_index(localBot)); TASKQUEUE_STATS_ONLY(stats.record_push()); return true; -@@ -385,13 +389,24 @@ bool GenericTaskQueue<E, N>::pop_local_s +@@ -385,13 +389,24 @@ template<class E, unsigned int N> bool GenericTaskQueue<E, N>::pop_global(E& t) { Age oldAge = _age.get(); @@ -3254,7 +3296,7 @@ Age newAge(oldAge); newAge.increment(); Age resAge = _age.cmpxchg(newAge, oldAge); -@@ -668,13 +683,17 @@ public: +@@ -668,13 +683,17 @@ template<class E, unsigned int N> inline bool GenericTaskQueue<E, N>::push(E t) { uint localBot = _bottom; @@ -3275,7 +3317,7 @@ OrderAccess::release_store(&_bottom, increment_index(localBot)); TASKQUEUE_STATS_ONLY(stats.record_push()); return true; -@@ -698,7 +717,12 @@ GenericTaskQueue<E, N>::pop_local(E& t) +@@ -698,7 +717,12 @@ // This is necessary to prevent any read below from being reordered // before the store just above. OrderAccess::fence(); @@ -3302,7 +3344,7 @@ tty->print ("/usr/bin/sh -c "); --- jdk/make/com/sun/java/pack/Makefile +++ jdk/make/com/sun/java/pack/Makefile -@@ -61,6 +61,7 @@ +@@ -62,6 +62,7 @@ ifeq ($(STANDALONE),true) @@ -3310,7 +3352,7 @@ ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME) ZIPOBJS = $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \ -@@ -78,6 +79,10 @@ +@@ -79,6 +80,10 @@ ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 OTHER_CXXFLAGS += $(ZINCLUDE) LDDFLAGS += $(ZIPOBJS) @@ -3321,8 +3363,8 @@ else OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI OTHER_LDLIBS += $(JVMLIB) -@@ -102,7 +107,11 @@ - COMPILER_WARNINGS_FATAL=false +@@ -100,7 +105,11 @@ + RES = $(OBJDIR)/$(PGRM).res else LDOUTPUT = -o #Have a space +ifeq ($(PLATFORM), bsd) @@ -3346,7 +3388,7 @@ RMIC_JAVA = $(OUTPUTDIR)/bin/amd64/java --- jdk/make/com/sun/security/auth/module/Makefile +++ jdk/make/com/sun/security/auth/module/Makefile -@@ -70,7 +70,7 @@ +@@ -67,7 +67,7 @@ include FILES_c_solaris.gmk endif # solaris @@ -3446,7 +3488,7 @@ PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) # suffix used for make dependencies files. -@@ -104,6 +98,10 @@ +@@ -108,6 +102,10 @@ # as the default. CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN @@ -3455,9 +3497,9 @@ + CFLAGS_REQUIRED_i586 += -mstackrealign +endif CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 -@@ -201,7 +199,7 @@ +@@ -204,7 +202,7 @@ CPP_ARCH_FLAGS += -D_$(ARCH)_ endif @@ -3466,9 +3508,9 @@ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT ifeq ($(ARCH_DATA_MODEL), 64) -@@ -211,33 +209,15 @@ - CPPFLAGS_OPT = - CPPFLAGS_DBG = -DDEBUG +@@ -217,33 +215,15 @@ + CPPFLAGS_DBG += -DLOGGING + endif -ifdef LIBRARY - # Libraries need to locate other libraries at runtime, and you can tell @@ -3504,7 +3546,7 @@ # # -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always -@@ -259,9 +239,9 @@ +@@ -264,9 +244,9 @@ ifeq ($(VARIANT), OPT) ifneq ($(NO_STRIP), true) ifneq ($(DEBUG_BINARIES), true) @@ -3516,7 +3558,7 @@ endif endif endif -@@ -271,13 +251,9 @@ +@@ -276,13 +256,9 @@ # LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker @@ -3533,7 +3575,7 @@ endif # -@@ -306,24 +282,22 @@ +@@ -311,24 +287,22 @@ override HAVE_FILIOH = false override HAVE_GETHRTIME = false override HAVE_GETHRVTIME = false @@ -3563,7 +3605,7 @@ override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER override SUN_CMM_SUBDIR = override THREADS_FLAG = native -@@ -344,6 +318,14 @@ +@@ -349,6 +323,14 @@ # DPS (Displayable PostScript) is available on Solaris machines HAVE_DPS = no @@ -3655,7 +3697,7 @@ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli OTHER_LDLIBS += -ljli -@@ -166,6 +182,10 @@ +@@ -163,6 +179,10 @@ THREADLIBS = $(LIBTHREAD) endif # USE_PTHREADS @@ -3666,7 +3708,7 @@ # # This rule only applies on unix. It supports quantify and its ilk. # -@@ -221,15 +241,19 @@ +@@ -218,15 +238,19 @@ ifneq ($(PLATFORM), windows) @@ -3688,7 +3730,7 @@ VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"' --- jdk/make/common/Release.gmk +++ jdk/make/common/Release.gmk -@@ -145,14 +145,13 @@ +@@ -151,14 +151,13 @@ tnameserv.1 \ unpack200.1 @@ -3704,7 +3746,7 @@ extcheck.1 \ idlj.1 \ jar.1 \ -@@ -191,6 +190,11 @@ +@@ -197,6 +196,11 @@ JA_DIRNAME=ja_JP.$(JA_SOURCE_ENCODING) endif # linux @@ -3716,7 +3758,7 @@ define copy-man-pages $(MKDIR) -p $1/man/man1 for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \ -@@ -313,6 +317,12 @@ +@@ -319,6 +323,12 @@ SOURCE_DIRS += $(CLOSED_SRC)/share/classes endif @@ -3729,7 +3771,7 @@ # # Specific files and directories that will be filtered out from above areas. -@@ -629,6 +639,8 @@ +@@ -639,6 +649,8 @@ $(BOOT_JAVA_CMD) -jar $(JARSPLIT_JARFILE) \ $(TOTAL_JAR_FILELIST) \ -o $(RT_JAR_FILELIST) $(RES_JAR_FILELIST) @@ -3738,7 +3780,7 @@ @$(java-vm-cleanup) # Create the manifest file. -@@ -974,7 +986,7 @@ +@@ -985,7 +997,7 @@ @# generated by the more efficient solaris/windows method of copying files. @# So for Linux, make use of the -T option (like Solaris' -I option) of @# obtaining the list of files from a file. MKS tar has no such option. @@ -3747,7 +3789,7 @@ for d in $(SOURCE_DIRS); do \ $(RM) $(ABS_TEMPDIR)/src-files.list; \ ($(CD) $$d && \ -@@ -987,7 +999,7 @@ +@@ -998,7 +1010,7 @@ done ; \ ) ; \ if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ @@ -3758,7 +3800,7 @@ done --- jdk/make/common/shared/Compiler-gcc.gmk +++ jdk/make/common/shared/Compiler-gcc.gmk -@@ -99,6 +99,24 @@ +@@ -74,6 +74,24 @@ endif @@ -3885,21 +3927,10 @@ + TAR = $(UTILS_USR_BIN_PATH)tar + endif +endif ---- jdk/make/common/shared/Defs.gmk -+++ jdk/make/common/shared/Defs.gmk -@@ -143,7 +143,7 @@ - echo older; \ - else \ - if [ $(call MajorVersion,$1) -eq $(call MajorVersion,$2) -a \ -- $(call MinorVersion,$1) -lt $(call MinorVersion,$2) ]; then \ -+ `echo $(call MinorVersion,$1) | sed -e 's/\([0-9]*\)\(.*\)/\1/'` -lt $(call MinorVersion,$2) ]; then \ - echo older; \ - else \ - echo newer; \ --- jdk/make/common/shared/Platform.gmk +++ jdk/make/common/shared/Platform.gmk -@@ -264,6 +264,76 @@ - MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) +@@ -214,6 +214,76 @@ + MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' ) endif +ifeq ($(SYSTEM_UNAME), FreeBSD) @@ -3975,31 +4006,8 @@ # Windows with and without CYGWIN will be slightly different ifeq ($(SYSTEM_UNAME), Windows_NT) PLATFORM = windows -@@ -413,6 +483,13 @@ - # system swapping during the build. - # If we don't know, assume 512. Subtract 128 from MB for VM MAX. - # Don't set VM max over 1024-128=896. -+# 736 is the max for OpenBSD. -+ifeq ($(OS_VENDOR), OpenBSD) -+ ABS_MAX_MEMORY := "736" -+else -+ ABS_MAX_MEMORY := "896" -+endif -+ - ifneq ($(MB_OF_MEMORY),) - LOW_MEMORY_MACHINE := $(shell \ - if [ $(MB_OF_MEMORY) -le 512 ] ; then \ -@@ -424,7 +501,7 @@ - if [ $(MB_OF_MEMORY) -le 1024 ] ; then \ - expr $(MB_OF_MEMORY) '-' 128 ; \ - else \ -- echo "896"; \ -+ echo $(ABS_MAX_MEMORY); \ - fi) - MIN_VM_MEMORY := $(shell \ - if [ $(MAX_VM_MEMORY) -le 128 ] ; then \ -@@ -476,6 +553,15 @@ - ARCH_VM_SUBDIR=jre/lib/$(LIBARCH) +@@ -445,6 +515,15 @@ + export MIN_VM_MEMORY endif +# Darwin-specific Overrides @@ -4016,7 +4024,7 @@ _USER2:=$(subst ", ,$(_USER1)) --- jdk/make/common/shared/Sanity-Settings.gmk +++ jdk/make/common/shared/Sanity-Settings.gmk -@@ -242,6 +242,7 @@ +@@ -245,6 +245,7 @@ ALL_SETTINGS+=$(call addAltSetting,FREETYPE_HEADERS_PATH) ALL_SETTINGS+=$(call addAltSetting,FREETYPE_LIB_PATH) endif @@ -4026,7 +4034,7 @@ ifdef OPENJDK --- jdk/make/common/shared/Sanity.gmk +++ jdk/make/common/shared/Sanity.gmk -@@ -90,6 +90,11 @@ +@@ -142,6 +142,11 @@ $(EGREP) "\#define" | $(NAWK) '{print $$3}') endif @@ -4114,7 +4122,7 @@ # Library to compile. --- jdk/make/java/java/Makefile +++ jdk/make/java/java/Makefile -@@ -167,8 +167,10 @@ +@@ -165,8 +165,10 @@ # Is the altzone extern documented in ctime(3C) available? # ifneq ($(PLATFORM), windows) @@ -4125,7 +4133,7 @@ ifeq ($(HAVE_ALTZONE),true) OTHER_CPPFLAGS += -DHAVE_ALTZONE -@@ -205,9 +207,14 @@ +@@ -203,9 +205,14 @@ OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm.lib \ -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify.lib else @@ -4242,7 +4250,7 @@ OTHER_CPPFLAGS += -DEXPAND_CLASSPATH_WILDCARDS -@@ -98,7 +104,11 @@ +@@ -96,7 +102,11 @@ OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) OTHER_INCLUDES += -I$(LAUNCHER_PLATFORM_SRC) @@ -4255,7 +4263,7 @@ # # Library to compile. -@@ -136,8 +146,29 @@ +@@ -134,8 +144,29 @@ endif # PLATFORM @@ -4302,7 +4310,7 @@ endif --- jdk/make/java/net/FILES_c.gmk +++ jdk/make/java/net/FILES_c.gmk -@@ -43,6 +43,10 @@ +@@ -44,6 +44,10 @@ FILES_c += linux_close.c endif @@ -4315,7 +4323,7 @@ FILES_c += DualStackPlainSocketImpl.c --- jdk/make/java/net/Makefile +++ jdk/make/java/net/Makefile -@@ -92,6 +92,12 @@ +@@ -94,6 +94,12 @@ include $(BUILDDIR)/common/Library.gmk @@ -4326,9 +4334,9 @@ + OTHER_LDLIBS = $(JVMLIB) -pthread +else ifeq ($(PLATFORM), windows) - OTHER_LDLIBS = ws2_32.lib $(JVMLIB) - # Will not compile at warning level 3 if warnings are fatal -@@ -102,6 +108,7 @@ + OTHER_LDLIBS = ws2_32.lib $(JVMLIB) \ + secur32.lib iphlpapi.lib delayimp.lib \ +@@ -104,6 +110,7 @@ ifeq ($(PLATFORM), linux) OTHER_LDLIBS += -lpthread endif @@ -4379,8 +4387,8 @@ ifeq ($(PLATFORM),windows) OTHER_LDLIBS += $(JVMLIB) ws2_32.lib \ -libpath:$(LIBDIR) java.lib \ -@@ -137,6 +164,9 @@ - COMPILER_WARNINGS_FATAL=true +@@ -136,6 +163,9 @@ + ifeq ($(PLATFORM), linux) OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl endif +ifeq ($(PLATFORM), bsd) @@ -4389,7 +4397,7 @@ ifeq ($(PLATFORM), solaris) OTHER_LDLIBS += $(JVMLIB) $(LIBSOCKET) -lposix4 -ldl \ -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -@@ -159,6 +189,9 @@ +@@ -158,6 +188,9 @@ ifeq ($(PLATFORM), linux) FILES_m = mapfile-linux endif @@ -4401,7 +4409,7 @@ --- jdk/make/java/npt/Makefile +++ jdk/make/java/npt/Makefile -@@ -70,6 +70,18 @@ +@@ -65,6 +65,18 @@ OTHER_LCF += -export:nptInitialize -export:nptTerminate endif @@ -4439,7 +4447,7 @@ # and since 2D can do this derivation on the fly at run time there is no --- jdk/make/java/redist/Makefile +++ jdk/make/java/redist/Makefile -@@ -311,7 +311,7 @@ +@@ -310,7 +310,7 @@ $(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir $(install-file) @@ -4448,7 +4456,7 @@ # The oblique fonts are only needed/wanted on Linux. -@@ -325,7 +325,7 @@ +@@ -324,7 +324,7 @@ $(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir $(install-file) @@ -4459,7 +4467,7 @@ # Import internal files (ones that are stashed in this source tree) --- jdk/make/java/security/Makefile +++ jdk/make/java/security/Makefile -@@ -51,7 +51,15 @@ +@@ -54,7 +54,15 @@ ifneq ($(ARCH_DATA_MODEL), 64) PROPS_SRC = $(TOPDIR)/src/share/lib/security/java.security-windows endif @@ -4498,7 +4506,7 @@ +endif --- jdk/make/java/zip/Makefile +++ jdk/make/java/zip/Makefile -@@ -72,16 +72,24 @@ +@@ -69,16 +69,24 @@ CPPFLAGS += -UDEBUG endif @@ -4586,10 +4594,10 @@ +endif # PLATFORM # - # This turns off all assert() checking in the optimized library + # This controls the ability to do logging in the library. --- jdk/make/sun/awt/Makefile +++ jdk/make/sun/awt/Makefile -@@ -129,6 +129,14 @@ +@@ -130,6 +130,14 @@ OTHER_LDLIBS = $(JVMLIB) $(LIBM) -ldl endif @@ -4604,7 +4612,7 @@ FILES_c += initIDs.c # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX -@@ -241,7 +249,7 @@ +@@ -243,7 +251,7 @@ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ WINDOWS endif # PLATFORM @@ -4613,7 +4621,7 @@ # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv LINUX vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl -@@ -422,6 +430,19 @@ +@@ -420,6 +428,19 @@ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS endif # PLATFORM @@ -4633,7 +4641,7 @@ FONTCONFIGS = $(_FONTCONFIGS:%=$(LIBDIR)/%.src) BINARYFONTCONFIGS = $(_FONTCONFIGS:%.properties=$(LIBDIR)/%.bfc) -@@ -515,6 +536,9 @@ +@@ -513,6 +534,9 @@ -I$(OPENWIN_HOME)/include/X11/extensions \ -I$(PLATFORM_SRC)/native/$(PKGDIR)/font endif @@ -4643,7 +4651,7 @@ CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \ -I$(SHARE_SRC)/native/$(PKGDIR)/../font \ -I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \ -@@ -536,7 +560,13 @@ +@@ -534,7 +558,13 @@ -I$(PLATFORM_SRC)/native/$(PKGDIR) \ $(EVENT_MODEL) @@ -4718,7 +4726,7 @@ $(AWT_RUNPATH) --- jdk/make/sun/font/Makefile +++ jdk/make/sun/font/Makefile -@@ -177,6 +177,15 @@ +@@ -188,6 +188,15 @@ # Libraries to link, and other C flags. # @@ -4734,7 +4742,7 @@ ifeq ($(PLATFORM), solaris) # Note that on Solaris, fontmanager is built against the headless library. LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/headless -@@ -187,6 +196,7 @@ +@@ -198,6 +207,7 @@ OTHER_LDLIBS += -Wl,-Bstatic -lgcc_eh -Wl,-Bdynamic endif endif @@ -4744,7 +4752,7 @@ --- jdk/make/sun/image/generic/Makefile +++ jdk/make/sun/image/generic/Makefile -@@ -69,5 +69,9 @@ +@@ -68,5 +68,9 @@ -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES @@ -4802,7 +4810,7 @@ +endif --- jdk/make/sun/security/pkcs11/Makefile +++ jdk/make/sun/security/pkcs11/Makefile -@@ -156,7 +156,7 @@ +@@ -158,7 +158,7 @@ # # Libraries to link # @@ -4931,7 +4939,7 @@ # Since this library will be living in a subdirectory below the other libraries # we need to add an extra runpath so that libraries in the upper directory # are found at runtime. -@@ -86,7 +91,12 @@ +@@ -87,7 +92,12 @@ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11 @@ -4945,7 +4953,7 @@ $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi ifeq ($(PLATFORM), solaris) -@@ -94,8 +104,6 @@ +@@ -95,8 +105,6 @@ dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) endif @@ -4954,7 +4962,7 @@ CPPFLAGS += -DXAWT -DXAWT_HACK \ -I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \ -I$(PLATFORM_SRC)/native/sun/awt \ -@@ -122,9 +130,11 @@ +@@ -123,9 +131,11 @@ -I$(SHARE_SRC)/native/sun/awt \ -I$(PLATFORM_SRC)/native/sun/awt @@ -4967,7 +4975,7 @@ -I/usr/include/X11/extensions \ -I$(MOTIF_DIR)/include \ -I$(OPENWIN_HOME)/include -@@ -134,6 +144,14 @@ +@@ -135,6 +145,14 @@ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(MOTIF_DIR)/include endif @@ -5014,7 +5022,7 @@ --- jdk/src/share/bin/java.c +++ jdk/src/share/bin/java.c -@@ -104,6 +104,11 @@ +@@ -109,6 +109,11 @@ static char *launchername; jboolean _launcher_debug = JNI_FALSE; @@ -5026,7 +5034,7 @@ /* * Entries for splash screen environment variables. * putenv is performed in SelectVersion. We need -@@ -146,6 +151,10 @@ +@@ -151,6 +156,10 @@ static void SetPaths(int argc, char **argv); @@ -5037,7 +5045,7 @@ /* Maximum supported entries from jvm.cfg. */ #define INIT_MAX_KNOWN_VMS 10 /* Values for vmdesc.flag */ -@@ -184,13 +193,13 @@ +@@ -197,13 +206,13 @@ int JNICALL JavaMain(void * args); /* entry point */ @@ -5053,7 +5061,7 @@ /* * Entry point. -@@ -332,49 +341,24 @@ +@@ -361,49 +370,24 @@ /* Show the splash screen if needed */ ShowSplashScreen(); @@ -5112,7 +5120,7 @@ int argc = args->argc; char **argv = args->argv; char *jarfile = args->jarfile; -@@ -1159,6 +1143,10 @@ +@@ -1100,6 +1084,10 @@ } else if (strcmp(arg, "-X") == 0) { printXUsage = JNI_TRUE; return JNI_TRUE; @@ -5121,9 +5129,9 @@ + continueInSameThread = JNI_TRUE; +#endif /* - * The following case provide backward compatibility with old-style - * command line options. -@@ -1979,6 +1967,84 @@ + * The following case checks for -XshowSettings OR -XshowSetting:SUBOPT. + * In the latter case, any SUBOPT value not recognized will default to "all" +@@ -1878,6 +1866,84 @@ return -1; } @@ -5210,7 +5218,7 @@ { --- jdk/src/share/bin/java.h +++ jdk/src/share/bin/java.h -@@ -91,11 +91,17 @@ +@@ -95,11 +95,17 @@ void PrintMachineDependentOptions(); const char *jlong_format_specifier(); @@ -5287,7 +5295,7 @@ } else if (nm.equals("true")) { --- jdk/src/share/classes/java/util/TimeZone.java +++ jdk/src/share/classes/java/util/TimeZone.java -@@ -833,15 +833,13 @@ +@@ -848,15 +848,13 @@ } int gmtOffset = (hours * 60 + num) * 60 * 1000; @@ -5306,7 +5314,7 @@ } --- jdk/src/share/classes/sun/awt/FontConfiguration.java +++ jdk/src/share/classes/sun/awt/FontConfiguration.java -@@ -1073,7 +1073,7 @@ +@@ -1121,7 +1121,7 @@ */ HashMap<String, Boolean> existsMap; public boolean needToSearchForFile(String fileName) { @@ -5315,7 +5323,7 @@ return false; } else if (existsMap == null) { existsMap = new HashMap<String, Boolean>(); -@@ -1309,7 +1309,7 @@ +@@ -1361,7 +1361,7 @@ + "<filename." + getString(table_componentFontNameIDs[ii]) + "> entry is missing!!!"); @@ -5340,7 +5348,7 @@ /** * - does basic verification of the file * - reads the header table for this font (within a collection) -@@ -1061,6 +1068,10 @@ +@@ -1089,6 +1096,10 @@ * greater than 32767, so read and store those as ints */ int stringPtr = sbuffer.get() & 0xffff; @@ -5351,7 +5359,7 @@ for (int i=0; i<numRecords; i++) { short platformID = sbuffer.get(); if (platformID != MS_PLATFORM_ID) { -@@ -1072,15 +1083,24 @@ +@@ -1100,15 +1111,24 @@ short nameID = sbuffer.get(); int nameLen = ((int) sbuffer.get()) & 0xffff; int namePtr = (((int) sbuffer.get()) & 0xffff) + stringPtr; @@ -5379,7 +5387,7 @@ } /* for (int ii=0;ii<nameLen;ii++) { -@@ -1098,15 +1118,29 @@ +@@ -1126,15 +1146,29 @@ case FULL_NAME_ID: @@ -5412,7 +5420,7 @@ } } -@@ -1189,6 +1223,8 @@ +@@ -1217,6 +1251,8 @@ public String getFontName(Locale locale) { if (locale == null) { return fullName; @@ -5421,7 +5429,7 @@ } else { short localeID = FontManager.getLCIDFromLocale(locale); String name = lookupName(localeID, FULL_NAME_ID); -@@ -1203,11 +1239,13 @@ +@@ -1231,11 +1267,13 @@ public String getFamilyName(Locale locale) { if (locale == null) { return familyName; @@ -5438,16 +5446,16 @@ } --- jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java +++ jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java -@@ -76,7 +76,7 @@ +@@ -77,7 +77,7 @@ public abstract class SunGraphicsEnvironment extends GraphicsEnvironment implements FontSupport, DisplayChangedListener { - public static boolean isLinux; + public static boolean isLinuxOrBSD; public static boolean isSolaris; + public static boolean isOpenSolaris; public static boolean isWindows; - public static boolean noType1Font; -@@ -164,7 +164,15 @@ +@@ -166,7 +166,15 @@ public Object run() { String osName = System.getProperty("os.name"); if ("Linux".equals(osName)) { @@ -5463,8 +5471,8 @@ + isLinuxOrBSD = true; } else if ("SunOS".equals(osName)) { isSolaris = true; - } else if ("Windows".equals(osName)) { -@@ -227,8 +235,8 @@ + String version = System.getProperty("os.version", "0.0"); +@@ -242,8 +250,8 @@ * Pass "true" to registerFonts method as on-screen these * JRE fonts always go through the T2K rasteriser. */ @@ -5535,7 +5543,7 @@ } --- jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java +++ jdk/src/share/classes/sun/security/jgss/GSSManagerImpl.java -@@ -49,8 +49,12 @@ +@@ -47,8 +47,12 @@ AccessController.doPrivileged(new PrivilegedAction<Boolean>() { public Boolean run() { String osname = System.getProperty("os.name"); @@ -5552,7 +5560,7 @@ } --- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java +++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java -@@ -82,7 +82,11 @@ +@@ -83,7 +83,11 @@ String osname = System.getProperty("os.name"); if (osname.startsWith("SunOS")) { gssLib = "libgss.so"; @@ -5567,7 +5575,7 @@ } --- jdk/src/share/classes/sun/security/krb5/Config.java +++ jdk/src/share/classes/sun/security/krb5/Config.java -@@ -711,7 +711,11 @@ +@@ -699,7 +699,11 @@ } } else if (osname.startsWith("SunOS")) { name = "/etc/krb5/krb5.conf"; @@ -5582,7 +5590,7 @@ } --- jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java +++ jdk/src/share/classes/sun/security/krb5/internal/ccache/FileCredentialsCache.java -@@ -386,8 +386,12 @@ +@@ -412,8 +412,12 @@ String uidStr = null; long uid = 0; @@ -5692,7 +5700,7 @@ #ifndef FULL #define FULL 1 /* Adds <500 bytes to the zipped final product. */ #endif -@@ -89,11 +93,13 @@ +@@ -90,11 +94,13 @@ // bytes and byte arrays typedef unsigned int uint; @@ -5745,20 +5753,6 @@ true)); } ---- jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c -+++ jdk/src/share/native/com/sun/media/sound/DirectAudioDevice.c -@@ -33,7 +33,11 @@ - - #include <jni.h> - // for malloc -+#ifdef _ALLBSD_SOURCE -+#include <stdlib.h> -+#else - #include <malloc.h> -+#endif - #include "SoundDefs.h" - #include "DirectAudio.h" - #include "Utilities.h" --- jdk/src/share/native/com/sun/media/sound/SoundDefs.h +++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h @@ -31,6 +31,7 @@ @@ -8695,9 +8689,9 @@ +#define LD_LIBRARY_PATH "LD_LIBRARY_PATH" +#endif - #define JRE_ERROR1 "Error: Could not find Java SE Runtime Environment." - #define JRE_ERROR11 "Error: Path length exceeds maximum length (PATH_MAX)" -@@ -79,14 +94,31 @@ + /* + * If a processor / os combination has the ability to run binaries of +@@ -75,14 +90,31 @@ #endif /* pointer to environment */ @@ -8731,7 +8725,7 @@ static const char *user_dir = "/java"; #else /* Solaris */ static const char *system_dir = "/usr/jdk"; -@@ -408,10 +440,10 @@ +@@ -404,10 +436,10 @@ * If not on Solaris, assume only a single LD_LIBRARY_PATH * variable. */ @@ -8744,7 +8738,7 @@ /* * On linux, if a binary is running as sgid or suid, glibc sets * LD_LIBRARY_PATH to the empty string for security purposes. (In -@@ -427,6 +459,22 @@ +@@ -423,6 +455,22 @@ if((getgid() != getegid()) || (getuid() != geteuid()) ) { return; } @@ -8767,7 +8761,7 @@ #endif /* runpath contains current effective LD_LIBRARY_PATH setting */ -@@ -436,7 +484,7 @@ +@@ -432,7 +480,7 @@ 2*strlen(jrepath) + 2*strlen(arch) + strlen(jvmpath) + 52; new_runpath = JLI_MemAlloc(new_runpath_size); @@ -8776,7 +8770,7 @@ /* -@@ -451,7 +499,7 @@ +@@ -447,7 +495,7 @@ /* jvmpath, ((running != wanted)?((wanted==64)?"/"LIBARCH64NAME:"/.."):""), */ @@ -8785,7 +8779,7 @@ "%s:" "%s/lib/%s:" "%s/../lib/%s", -@@ -737,7 +785,7 @@ +@@ -733,7 +781,7 @@ jboolean GetApplicationHome(char *buf, jint bufsize) { @@ -8794,7 +8788,7 @@ char *execname = GetExecname(); if (execname) { strncpy(buf, execname, bufsize-1); -@@ -904,7 +952,17 @@ +@@ -900,7 +948,17 @@ exec_path = JLI_StringDup(buf); } } @@ -8813,7 +8807,7 @@ { /* Not implemented */ } -@@ -993,6 +1051,7 @@ +@@ -997,6 +1055,7 @@ /* Compute physical memory by asking the OS */ uint64_t physical_memory(void) { @@ -8821,7 +8815,7 @@ const uint64_t pages = (uint64_t) sysconf(_SC_PHYS_PAGES); const uint64_t page_size = (uint64_t) sysconf(_SC_PAGESIZE); const uint64_t result = pages * page_size; -@@ -1004,6 +1063,28 @@ +@@ -1008,6 +1067,28 @@ " physical memory: " UINT64_FORMAT " (%.3fGB)\n", pages, page_size, result, result / (double) GB); } @@ -8850,7 +8844,7 @@ return result; } -@@ -1099,7 +1180,7 @@ +@@ -1103,7 +1184,7 @@ #endif /* __sun && i586 */ @@ -8859,7 +8853,7 @@ /* * A utility method for asking the CPU about itself. -@@ -1164,7 +1245,7 @@ +@@ -1168,7 +1249,7 @@ #endif } @@ -8868,7 +8862,7 @@ #ifdef i586 /* -@@ -1376,6 +1457,39 @@ +@@ -1380,6 +1461,39 @@ #endif /* __linux__ && i586 */ @@ -8908,7 +8902,7 @@ /* Dispatch to the platform-specific definition of "server-class" */ jboolean ServerClassMachine(void) { -@@ -1390,6 +1504,8 @@ +@@ -1394,6 +1508,8 @@ result = solaris_i586_ServerClassMachine(); #elif defined(__linux__) && defined(i586) result = linux_i586_ServerClassMachine(); @@ -8917,7 +8911,7 @@ #else if (_launcher_debug) { printf("ServerClassMachine: returns default value of %s\n", -@@ -1530,7 +1646,7 @@ +@@ -1534,7 +1650,7 @@ while (dp != NULL) { cp = strchr(dp, (int)':'); if (cp != NULL) @@ -8926,7 +8920,7 @@ if ((target = ProcessDir(info, dp)) != NULL) break; dp = cp; -@@ -1708,9 +1824,29 @@ +@@ -1712,9 +1828,29 @@ return(borrowed_unsetenv(name)); } @@ -8957,7 +8951,7 @@ static void* hSplashLib = NULL; -@@ -1759,13 +1895,15 @@ +@@ -1763,13 +1899,15 @@ return "%lld"; } @@ -8975,7 +8969,7 @@ pthread_t tid; pthread_attr_t attr; pthread_attr_init(&attr); -@@ -1778,7 +1916,7 @@ +@@ -1782,7 +1920,7 @@ if (pthread_create(&tid, &attr, (void *(*)(void*))continuation, (void*)args) == 0) { void * tmp; pthread_join(tid, &tmp); @@ -8984,7 +8978,7 @@ } else { /* * Continue execution in current thread if for some reason (e.g. out of -@@ -1796,25 +1934,23 @@ +@@ -1800,25 +1938,23 @@ if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) { void * tmp; thr_join(tid, NULL, &tmp); @@ -9312,7 +9306,7 @@ +} --- jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java +++ jdk/src/solaris/classes/sun/nio/ch/KqueueSelectorImpl.java -@@ -0,0 +1,205 @@ +@@ -0,0 +1,200 @@ +/* + * scratched by davidxu@freebsd.org + */ @@ -9512,11 +9506,6 @@ + } + return this; + } -+ -+ static { -+ Util.load(); -+ } -+ +} --- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java +++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java @@ -12140,7 +12129,7 @@ gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error); #else -@@ -274,7 +550,7 @@ +@@ -273,7 +549,7 @@ addr |= ((caddr[2] <<8) & 0xff00); addr |= (caddr[3] & 0xff); addr = htonl(addr); @@ -12149,7 +12138,7 @@ gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent, buf, sizeof(buf), &hp, &h_error); #else -@@ -288,7 +564,7 @@ +@@ -287,7 +563,7 @@ */ if (hp == NULL && errno == ERANGE) { if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) { @@ -12158,7 +12147,7 @@ gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error); #else -@@ -310,6 +586,8 @@ +@@ -309,6 +585,8 @@ return ret; } @@ -12590,7 +12579,7 @@ #else JVM_Connect(fd, 0, 0); #endif -@@ -1306,7 +1320,7 @@ +@@ -1293,7 +1307,7 @@ /* * value is an InetAddress. */ @@ -12599,7 +12588,7 @@ if (ipv6_available()) { mcast_set_if_by_addr_v6(env, this, fd, value); } else { -@@ -1325,7 +1339,7 @@ +@@ -1312,7 +1326,7 @@ /* * value is a NetworkInterface. */ @@ -12608,7 +12597,7 @@ if (ipv6_available()) { mcast_set_if_by_if_v6(env, this, fd, value); } else { -@@ -1402,7 +1416,7 @@ +@@ -1389,7 +1403,7 @@ */ static void setMulticastLoopbackMode(JNIEnv *env, jobject this, int fd, jint opt, jobject value) { @@ -12617,7 +12606,7 @@ if (ipv6_available()) { mcast_set_loop_v6(env, this, fd, value); } else { -@@ -1982,7 +1996,7 @@ +@@ -1969,7 +1983,7 @@ fd = (*env)->GetIntField(env, fdObj, IO_fd_fdID); } /* setsockopt to be correct ttl */ @@ -12626,7 +12615,7 @@ if (ipv6_available()) { setHopLimit(env, fd, ttl); } else { -@@ -2374,18 +2388,30 @@ +@@ -2361,18 +2375,30 @@ mname6.ipv6mr_interface = idx; } @@ -12947,7 +12936,7 @@ jint numPages = (len + pageSize - 1) / pageSize; int result = 0; int i = 0; -@@ -92,7 +96,11 @@ +@@ -96,7 +100,11 @@ Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jlong address, jlong len) { @@ -12961,7 +12950,7 @@ jlong offset = lAddress % pageSize; --- jdk/src/solaris/native/java/util/FileSystemPreferences.c +++ jdk/src/solaris/native/java/util/FileSystemPreferences.c -@@ -47,8 +47,11 @@ +@@ -49,8 +49,11 @@ return (jint) result; } @@ -12974,7 +12963,7 @@ /** * Try to open a named lock file. -@@ -86,7 +89,11 @@ +@@ -91,7 +94,11 @@ if (fd < 0) { result[0] = 0; } else { @@ -12986,7 +12975,7 @@ result[1] = errno; if (rc < 0) { result[0]= 0; -@@ -116,7 +123,11 @@ +@@ -122,7 +129,11 @@ fl.l_start = 0; fl.l_type = F_UNLCK; @@ -13241,7 +13230,7 @@ typedef struct { int screen_number; short x_org; -@@ -600,19 +603,22 @@ +@@ -680,19 +683,22 @@ #endif /* HEADLESS */ #ifndef HEADLESS @@ -13269,7 +13258,7 @@ XineramaQueryScreens = (XineramaQueryScreensFunc*) dlsym(libHandle, XineramaQueryScreensName); -@@ -648,11 +654,10 @@ +@@ -728,11 +734,10 @@ } } #endif @@ -13283,7 +13272,7 @@ unsigned char fbhints[MAXFRAMEBUFFERS]; int32_t locNumScr = 0; /* load and run XineramaGetInfo */ -@@ -661,8 +666,8 @@ +@@ -741,8 +746,8 @@ XineramaGetInfoFunc* XineramaSolarisFunc = NULL; /* load library */ @@ -13294,7 +13283,7 @@ XineramaSolarisFunc = (XineramaGetInfoFunc*)dlsym(libHandle, XineramaGetInfoName); XineramaSolarisCenterFunc = (XineramaGetCenterHintFunc*)dlsym(libHandle, XineramaGetCenterHintName); -@@ -709,11 +714,11 @@ +@@ -789,11 +794,11 @@ } DTRACE_PRINTLN("Xinerama extension is available"); @@ -13308,7 +13297,7 @@ } #endif /* HEADLESS */ -@@ -1571,7 +1576,7 @@ +@@ -1671,7 +1676,7 @@ { jobject point = NULL; #ifndef HEADLESS /* return NULL in HEADLESS, Linux */ @@ -13317,7 +13306,7 @@ int x,y; AWT_LOCK(); -@@ -1584,7 +1589,7 @@ +@@ -1684,7 +1689,7 @@ DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null"); } AWT_FLUSH_UNLOCK(); @@ -13326,7 +13315,7 @@ #endif /* HEADLESS */ return point; } -@@ -1649,7 +1654,11 @@ +@@ -1749,7 +1754,11 @@ { int rr_maj_ver = 0, rr_min_ver = 0; @@ -13642,7 +13631,7 @@ if (handle == NULL) { --- jdk/src/solaris/native/sun/awt/awt_Robot.c +++ jdk/src/solaris/native/sun/awt/awt_Robot.c -@@ -45,7 +45,7 @@ +@@ -46,7 +46,7 @@ #include "wsutils.h" #include "list.h" #include "multiVis.h" @@ -14808,76 +14797,65 @@ if (reuse) { int arg = 1; if (NET_SetSockOpt(fd, SOL_SOCKET, SO_REUSEADDR, (char*)&arg, -@@ -143,10 +159,33 @@ - Java_sun_nio_ch_Net_localPort(JNIEnv *env, jclass clazz, jobject fdo) - { +@@ -145,8 +161,30 @@ SOCKADDR sa; -- int sa_len = SOCKADDR_LEN; -+ socklen_t sa_len = SOCKADDR_LEN; + socklen_t sa_len = SOCKADDR_LEN; if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) { +#ifdef _ALLBSD_SOURCE -+ /* -+ * XXXBSD: -+ * ECONNRESET is specific to the BSDs. We can not return an error, -+ * as the calling Java code with raise a java.lang.Error given the expectation -+ * that getsockname() will never fail. According to the Single UNIX Specification, -+ * it shouldn't fail. As such, we just fill in generic Linux-compatible values. -+ */ -+ if (errno == ECONNRESET) { -+ struct sockaddr_in *sin; -+ sin = (struct sockaddr_in *) &sa; -+ bzero(sin, sizeof(*sin)); -+ sin->sin_len = sizeof(struct sockaddr_in); -+ sin->sin_family = AF_INET; -+ sin->sin_port = htonl(0); -+ sin->sin_addr.s_addr = INADDR_ANY; -+ } else { -+ handleSocketError(env, errno); -+ return -1; -+ } ++ /* ++ * XXXBSD: ++ * ECONNRESET is specific to the BSDs. We can not return an error, ++ * as the calling Java code with raise a java.lang.Error given the expectation ++ * that getsockname() will never fail. According to the Single UNIX Specification, ++ * it shouldn't fail. As such, we just fill in generic Linux-compatible values. ++ */ ++ if (errno == ECONNRESET) { ++ struct sockaddr_in *sin; ++ sin = (struct sockaddr_in *) &sa; ++ bzero(sin, sizeof(*sin)); ++ sin->sin_len = sizeof(struct sockaddr_in); ++ sin->sin_family = AF_INET; ++ sin->sin_port = htonl(0); ++ sin->sin_addr.s_addr = INADDR_ANY; ++ } else { ++ handleSocketError(env, errno); ++ return -1; ++ } +#else /* _ALLBSD_SOURCE */ handleSocketError(env, errno); return -1; -+#endif /* _ALLBSD_SOURCE */ -+ ++#endif } return NET_GetPortFromSockaddr((struct sockaddr *)&sa); } -@@ -155,15 +194,79 @@ - Java_sun_nio_ch_Net_localInetAddress(JNIEnv *env, jclass clazz, jobject fdo) - { - SOCKADDR sa; -- int sa_len = SOCKADDR_LEN; -+ socklen_t sa_len = SOCKADDR_LEN; +@@ -158,12 +196,75 @@ + socklen_t sa_len = SOCKADDR_LEN; int port; if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) { -- handleSocketError(env, errno); -- return NULL; +#ifdef _ALLBSD_SOURCE -+ /* -+ * XXXBSD: -+ * ECONNRESET is specific to the BSDs. We can not return an error, -+ * as the calling Java code with raise a java.lang.Error with the expectation -+ * that getsockname() will never fail. According to the Single UNIX Specification, -+ * it shouldn't fail. As such, we just fill in generic Linux-compatible values. -+ */ -+ if (errno == ECONNRESET) { -+ struct sockaddr_in *sin; -+ sin = (struct sockaddr_in *) &sa; -+ bzero(sin, sizeof(*sin)); -+ sin->sin_len = sizeof(struct sockaddr_in); -+ sin->sin_family = AF_INET; -+ sin->sin_port = htonl(0); -+ sin->sin_addr.s_addr = INADDR_ANY; -+ } else { -+ handleSocketError(env, errno); -+ return NULL; -+ } ++ /* ++ * XXXBSD: ++ * ECONNRESET is specific to the BSDs. We can not return an error, ++ * as the calling Java code with raise a java.lang.Error given the expectation ++ * that getsockname() will never fail. According to the Single UNIX Specification, ++ * it shouldn't fail. As such, we just fill in generic Linux-compatible values. ++ */ ++ if (errno == ECONNRESET) { ++ struct sockaddr_in *sin; ++ sin = (struct sockaddr_in *) &sa; ++ bzero(sin, sizeof(*sin)); ++ sin->sin_len = sizeof(struct sockaddr_in); ++ sin->sin_family = AF_INET; ++ sin->sin_port = htonl(0); ++ sin->sin_addr.s_addr = INADDR_ANY; ++ } else { ++ handleSocketError(env, errno); ++ return -1; ++ } +#else /* _ALLBSD_SOURCE */ -+ handleSocketError(env, errno); -+ return NULL; -+#endif /* _ALLBSD_SOURCE */ -+ + handleSocketError(env, errno); + return NULL; ++#endif } return NET_SockaddrToInetAddress(env, (struct sockaddr *)&sa, &port); } @@ -14926,7 +14904,7 @@ #ifdef NEEDED -@@ -309,9 +412,11 @@ +@@ -309,9 +410,11 @@ switch (errorValue) { case EINPROGRESS: /* Non-blocking connect */ return 0; @@ -15360,8 +15338,8 @@ #include <dlfcn.h> typedef int gboolean; -@@ -36,7 +37,7 @@ - gboolean (*gnome_vfs_init) (void); +@@ -39,7 +40,7 @@ + void *gnome_handle; const char *errmsg; - vfs_handle = dlopen("libgnomevfs-2.so.0", RTLD_LAZY); @@ -15369,7 +15347,7 @@ if (vfs_handle == NULL) { #ifdef INTERNAL_BUILD fprintf(stderr, "can not load libgnomevfs-2.so\n"); -@@ -54,7 +55,7 @@ +@@ -57,7 +58,7 @@ // call gonme_vfs_init() (*gnome_vfs_init)(); diff --git a/java/openjdk6/files/patch-test b/java/openjdk6/files/patch-test index 0824417df8ec..b82367dc2a3a 100644 --- a/java/openjdk6/files/patch-test +++ b/java/openjdk6/files/patch-test @@ -1,5 +1,5 @@ ---- jdk/test/TestEnv.java 2012-05-01 17:18:38.000000000 -0400 -+++ jdk/test/TestEnv.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/TestEnv.java ++++ jdk/test/TestEnv.java @@ -65,14 +65,14 @@ // Reachable host with the following services running: // - echo service (port 7) @@ -18,8 +18,8 @@ // Hostname that cannot be resolved by named service { "unresovable_host", "blah-blah.blah-blah.blah" }, ---- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2012-09-26 19:05:45.000000000 -0400 -+++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh ++++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh @@ -72,6 +72,16 @@ done } @@ -46,8 +46,8 @@ runOne GetTotalSwapSpaceSize $total_swap ;; * ) ---- jdk/test/java/io/File/GetXSpace.java 2012-05-01 17:18:41.000000000 -0400 -+++ jdk/test/java/io/File/GetXSpace.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/io/File/GetXSpace.java ++++ jdk/test/java/io/File/GetXSpace.java @@ -49,7 +49,7 @@ private static final String name = System.getProperty("os.name"); private static final String dfFormat; @@ -57,8 +57,8 @@ // FileSystem Total Used Available Use% MountedOn dfFormat = "([^\\s]+)\\s+(\\d+)\\s+\\d+\\s+(\\d+)\\s+\\d+%\\s+([^\\s]+)"; } else if (name.startsWith("Windows")) { ---- jdk/test/java/lang/ProcessBuilder/Basic.java 2012-05-01 17:18:42.000000000 -0400 -+++ jdk/test/java/lang/ProcessBuilder/Basic.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/lang/ProcessBuilder/Basic.java ++++ jdk/test/java/lang/ProcessBuilder/Basic.java @@ -1096,7 +1096,7 @@ String[] cmdp = childArgs.toArray(new String[childArgs.size()]); String[] envp = {"=ExitValue=3", "=C:=\\"}; @@ -68,8 +68,8 @@ equal(commandOutput(p), expected); if (Windows.is()) { ProcessBuilder pb = new ProcessBuilder(childArgs); ---- jdk/test/java/lang/ProcessBuilder/Zombies.java 2012-05-01 17:18:42.000000000 -0400 -+++ jdk/test/java/lang/ProcessBuilder/Zombies.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/lang/ProcessBuilder/Zombies.java ++++ jdk/test/java/lang/ProcessBuilder/Zombies.java @@ -49,11 +49,11 @@ } catch (IOException _) {/* OK */} @@ -84,8 +84,8 @@ // Count all the zombies that are children of this Java process final String[] zombieCounter = { ---- jdk/test/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java 2012-05-01 17:18:43.000000000 -0400 -+++ jdk/test/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java ++++ jdk/test/java/lang/management/OperatingSystemMXBean/GetSystemLoadAverage.java @@ -79,7 +79,7 @@ System.out.println("Test passed."); } @@ -95,8 +95,8 @@ private static void checkLoadAvg() throws Exception { // Obtain load average from OS command ProcessBuilder pb = new ProcessBuilder("/usr/bin/uptime"); ---- jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java 2012-05-01 17:18:44.000000000 -0400 -+++ jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java ++++ jdk/test/java/net/ServerSocket/AcceptCauseFileDescriptorLeak.java @@ -79,7 +79,7 @@ * on Windows, too. */ @@ -106,8 +106,8 @@ File[] fds = dirOfFD.listFiles(); if (fds != null) ---- jdk/test/java/nio/channels/SocketChannel/LocalAddress.java 2012-05-01 17:18:45.000000000 -0400 -+++ jdk/test/java/nio/channels/SocketChannel/LocalAddress.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/nio/channels/SocketChannel/LocalAddress.java ++++ jdk/test/java/nio/channels/SocketChannel/LocalAddress.java @@ -40,7 +40,7 @@ InetAddress bogus = InetAddress.getByName("0.0.0.0"); SocketChannel sc = SocketChannel.open(); @@ -117,8 +117,8 @@ //Test1: connect only sc.connect(saddr); ---- jdk/test/java/nio/channels/SocketChannel/Shutdown.java 2012-05-01 17:18:45.000000000 -0400 -+++ jdk/test/java/nio/channels/SocketChannel/Shutdown.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/nio/channels/SocketChannel/Shutdown.java ++++ jdk/test/java/nio/channels/SocketChannel/Shutdown.java @@ -35,7 +35,7 @@ public static void main(String args[]) throws Exception { @@ -128,8 +128,8 @@ SocketChannel sc = SocketChannel.open(sa); boolean before = sc.socket().isInputShutdown(); sc.socket().shutdownInput(); ---- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c 2012-05-01 17:18:45.000000000 -0400 -+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c ++++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Launcher.c @@ -135,7 +135,7 @@ } close(thisFd); @@ -139,8 +139,8 @@ _exit(-1); } ---- jdk/test/java/nio/charset/Charset/default.sh 2012-09-26 19:05:46.000000000 -0400 -+++ jdk/test/java/nio/charset/Charset/default.sh 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/java/nio/charset/Charset/default.sh ++++ jdk/test/java/nio/charset/Charset/default.sh @@ -76,22 +76,20 @@ } @@ -174,8 +174,8 @@ + go ja_JP.eucJP x-eucjp-open + go ja_JP.PCK x-PCK fi ---- jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh 2012-09-26 19:05:47.000000000 -0400 -+++ jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh ++++ jdk/test/sun/net/InetAddress/nameservice/dns/cname.sh @@ -33,7 +33,7 @@ # The host that we try to resolve @@ -185,8 +185,8 @@ # fail gracefully if DNS is not configured or there # isn't a CNAME record. ---- jdk/test/tools/pack200/MemoryAllocatorTest.java 2012-05-01 17:18:53.000000000 -0400 -+++ jdk/test/tools/pack200/MemoryAllocatorTest.java 2012-09-26 19:07:59.000000000 -0400 +--- jdk/test/tools/pack200/MemoryAllocatorTest.java ++++ jdk/test/tools/pack200/MemoryAllocatorTest.java @@ -81,6 +81,7 @@ static final boolean debug = Boolean.getBoolean("MemoryAllocatorTest.Debug"); @@ -204,14 +204,3 @@ System.out.println("Warning: Windows/Linux 64bit tests passes vacuously"); return; } ---- jdk/test/tools/pack200/Pack200Simple.sh 2012-09-26 19:05:49.000000000 -0400 -+++ jdk/test/tools/pack200/Pack200Simple.sh 2012-09-26 19:07:59.000000000 -0400 -@@ -134,7 +134,7 @@ - # A quick crc compare test to ensure a well formed zip - # archive, this is a critical unpack200 behaviour. - -- unzip -t $jfName > ${jfName}.unzip.log 2>&1 -+ ${LOCALBASE}/bin/unzip -t $jfName > ${jfName}.unzip.log 2>&1 - if [ $? != 0 ]; then - errorOut "$jfName unzip -t test failed" - fi |