ports/java/openjdk7/files/patch-set
Greg Lewis 9b42878dd4 . Update to 7u6.
. Enlist openjdk7 users as testers of ant 1.8.4.
2012-08-21 04:56:41 +00:00

15796 lines
531 KiB
Text

--- .hgtags 2012-08-10 09:07:00.000000000 -0700
+++ .hgtags 2012-08-19 11:38:54.000000000 -0700
@@ -123,6 +123,7 @@
2d38c2a79c144c30cd04d143d83ee7ec6af40771 jdk7-b146
3ac30b3852876ccad6bd61697b5f9efa91ca7bc6 jdk7u1-b01
d91364304d7c4ecd34caffdba2b840aeb0d10b51 jdk7-b147
+00b623147f23ef8a92a25c4c28ef8681dc1d1b52 7u0
34451dc0580d5c95d97b95a564e6198f36545d68 jdk7u1-b02
bf735d852f79bdbb3373c777eec3ff27e035e7ba jdk7u1-b03
f66a2bada589f4157789e6f66472954d2f1c114e jdk7u1-b04
@@ -197,5 +198,4 @@
29f6fb1833eb2a696b95e8985126f2d70f511a82 jdk7u6-b21
31cdab09d719fe60876c7f3a472386c1455d93e2 jdk7u6-b22
d1c709f1196a73d1df10d04a221b10e30fd2eb48 jdk7u6-b23
-1ab3edf5061fdde3a6f6510373a92444445af710 jdk7u8-b01
-d7a94c8cbbbfadbd9e2f3e4737eb7deb572dedc9 jdk7u8-b02
+e4def733cc8c58e83b7cefa7edd89a3e2b793520 jdk7u6-b24
--- corba/.hgtags 2012-08-10 09:09:50.000000000 -0700
+++ corba/.hgtags 2012-08-19 11:44:59.000000000 -0700
@@ -123,6 +123,7 @@
770227a4087e4e401fe87ccd19738440111c3948 jdk7-b146
36f0efbc66ef8ace3cca8aa8d0c88f3334080f8a jdk7u1-b01
73323cb3396260d93e0ab731fd2d431096ceed0f jdk7-b147
+578c4d2c534cc761f5f5cc0d8360471bb8d5f94f 7u0
9515a2d034b4727c11aeea36354a549fbc469c4f jdk7u1-b02
dd71cb354c573c1addcda269a7dd9144bfce9587 jdk7u1-b03
eaee830124aa453627591d8f9eccb39d7e040876 jdk7u1-b04
@@ -197,5 +198,4 @@
353c15c4bc371f2f8258344c988d1403477cc140 jdk7u6-b21
793b80c0316fcafa18668bced26acb41af3be07d jdk7u6-b22
2a8376123fbb81bc4b2f643ff7cfaf7f87b21c35 jdk7u6-b23
-353c15c4bc371f2f8258344c988d1403477cc140 jdk7u8-b01
-d17ca8d088f7cc0dd42230472f534c8d1e415bcb jdk7u8-b02
+02512f61591f55d84458d1ea4ce84eecb7324f89 jdk7u6-b24
--- get_source.sh 2012-08-10 09:07:01.000000000 -0700
+++ get_source.sh 2012-08-19 11:38:54.000000000 -0700
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -26,7 +26,7 @@
#
# Get clones of all nested repositories
-sh ./make/scripts/hgforest.sh clone $*
+sh ./make/scripts/hgforest.sh clone
# Update all existing repositories to the latest sources
sh ./make/scripts/hgforest.sh pull -u
--- hotspot/.hgtags 2012-08-10 09:20:36.000000000 -0700
+++ hotspot/.hgtags 2012-08-19 12:11:03.000000000 -0700
@@ -182,6 +182,7 @@
38fa55e5e79232d48f1bb8cf27d88bc094c9375a hs21-b16
81d815b05abb564aa1f4100ae13491c949b9a07e jdk7-b147
81d815b05abb564aa1f4100ae13491c949b9a07e hs21-b17
+f1a18ada5853af49fce54d43dd5a5b67dc291470 7u0
9b0ca45cd756d538c4c30afab280a91868eee1a5 jdk7u2-b01
0cc8a70952c368e06de2adab1f2649a408f5e577 jdk8-b01
31e253c1da429124bb87570ab095d9bc89850d0a jdk8-b02
@@ -318,5 +319,4 @@
02a6c89432d724119565f9ba25672829b136fc5f jdk7u6-b21
a79d86eef6ac995a1fc35554f082f3a61abe9ae0 jdk7u6-b22
df57f6208cb76b4e8d1a0bd0eea3d2ad577cb79b jdk7u6-b23
-02a6c89432d724119565f9ba25672829b136fc5f jdk7u8-b01
-528502f930967f70c320472a002418f1e38029e0 jdk7u8-b02
+b03c2687fb16514652e79261ad68d2c601dcee62 jdk7u6-b24
--- hotspot/agent/src/os/bsd/symtab.c 2012-08-10 09:21:04.000000000 -0700
+++ hotspot/agent/src/os/bsd/symtab.c 2012-08-19 12:11:03.000000000 -0700
@@ -94,7 +94,7 @@
if (cursct->sh_type == SHT_SYMTAB ||
cursct->sh_type == SHT_STRTAB ||
cursct->sh_type == SHT_DYNSYM) {
- if ( (scn_cache[cnt].c_data = read_section_data(fd, &ehdr, cursct)) == NULL) {
+ if ((scn_cache[cnt].c_data = read_section_data(fd, &ehdr, cursct)) == NULL) {
goto quit;
}
}
--- hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2012-08-10 09:21:14.000000000 -0700
+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/HotSpotAgent.java 2012-08-19 12:11:03.000000000 -0700
@@ -33,6 +33,7 @@
import sun.jvm.hotspot.debugger.remote.*;
import sun.jvm.hotspot.debugger.windbg.*;
import sun.jvm.hotspot.debugger.linux.*;
+import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.memory.*;
import sun.jvm.hotspot.oops.*;
import sun.jvm.hotspot.runtime.*;
--- hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2012-08-10 09:21:38.000000000 -0700
+++ hotspot/agent/src/share/classes/sun/jvm/hotspot/bugspot/BugSpotAgent.java 2012-08-19 12:11:03.000000000 -0700
@@ -35,6 +35,7 @@
import sun.jvm.hotspot.debugger.windbg.*;
import sun.jvm.hotspot.debugger.linux.*;
import sun.jvm.hotspot.debugger.sparc.*;
+import sun.jvm.hotspot.debugger.bsd.*;
import sun.jvm.hotspot.debugger.remote.*;
import sun.jvm.hotspot.livejvm.*;
import sun.jvm.hotspot.memory.*;
--- hotspot/make/bsd/Makefile 2012-08-10 09:22:55.000000000 -0700
+++ hotspot/make/bsd/Makefile 2012-08-19 12:11:04.000000000 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -211,6 +211,8 @@
BUILDTREE_VARS = GAMMADIR=$(GAMMADIR) OS_FAMILY=$(OSNAME) SRCARCH=$(SRCARCH) BUILDARCH=$(BUILDARCH) LIBARCH=$(LIBARCH) LIBRARY_SUFFIX=$(LIBRARY_SUFFIX)
BUILDTREE_VARS += HOTSPOT_RELEASE_VERSION=$(HOTSPOT_RELEASE_VERSION) HOTSPOT_BUILD_VERSION=$(HOTSPOT_BUILD_VERSION) JRE_RELEASE_VERSION=$(JRE_RELEASE_VERSION)
+BUILDTREE_VARS += ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS) OBJCOPY=$(OBJCOPY) STRIP_POLICY=$(STRIP_POLICY) ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES) ZIPEXE=$(ZIPEXE)
+
BUILDTREE = $(MAKE) -f $(BUILDTREE_MAKE) $(BUILDTREE_VARS)
#-------------------------------------------------------------------------------
@@ -337,9 +339,11 @@
# Doc target. This is the same for all build options.
# Hence create a docs directory beside ...$(ARCH)_[...]
+# We specify 'BUILD_FLAVOR=product' so that the proper
+# ENABLE_FULL_DEBUG_SYMBOLS value is used.
docs: checks
$(QUIETLY) mkdir -p $(SUBDIR_DOCS)
- $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs
+ $(MAKE) -f $(GAMMADIR)/make/$(OSNAME)/makefiles/jvmti.make $(MFLAGS) $(BUILDTREE_VARS) JvmtiOutDir=$(SUBDIR_DOCS) BUILD_FLAVOR=product jvmtidocs
# Synonyms for win32-like targets.
compiler2: jvmg product
--- hotspot/make/bsd/makefiles/buildtree.make 2012-08-10 09:22:57.000000000 -0700
+++ hotspot/make/bsd/makefiles/buildtree.make 2012-08-19 12:11:04.000000000 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -242,6 +242,16 @@
echo "$(call gamma-path,commonsrc,os/posix/vm)"; \
[ -n "$(CFLAGS_BROWSE)" ] && \
echo && echo "CFLAGS_BROWSE = $(CFLAGS_BROWSE)"; \
+ [ -n "$(ENABLE_FULL_DEBUG_SYMBOLS)" ] && \
+ echo && echo "ENABLE_FULL_DEBUG_SYMBOLS = $(ENABLE_FULL_DEBUG_SYMBOLS)"; \
+ [ -n "$(OBJCOPY)" ] && \
+ echo && echo "OBJCOPY = $(OBJCOPY)"; \
+ [ -n "$(STRIP_POLICY)" ] && \
+ echo && echo "STRIP_POLICY = $(STRIP_POLICY)"; \
+ [ -n "$(ZIP_DEBUGINFO_FILES)" ] && \
+ echo && echo "ZIP_DEBUGINFO_FILES = $(ZIP_DEBUGINFO_FILES)"; \
+ [ -n "$(ZIPEXE)" ] && \
+ echo && echo "ZIPEXE = $(ZIPEXE)"; \
[ -n "$(HOTSPOT_EXTRA_SYSDEFS)" ] && \
echo && \
echo "HOTSPOT_EXTRA_SYSDEFS\$$(HOTSPOT_EXTRA_SYSDEFS) = $(HOTSPOT_EXTRA_SYSDEFS)" && \
@@ -359,7 +369,7 @@
$(QUIETLY) ( \
$(BUILDTREE_COMMENT); \
echo "JDK=${JAVA_HOME}"; \
- ) > $@
+ ) > $@
.dbxrc: $(BUILDTREE_MAKE)
@echo Creating $@ ...
--- hotspot/make/bsd/makefiles/defs.make 2012-08-10 09:22:57.000000000 -0700
+++ hotspot/make/bsd/makefiles/defs.make 2012-08-19 12:11:04.000000000 -0700
@@ -86,7 +86,7 @@
VM_PLATFORM = bsd_i486
HS_ARCH = x86
# We have to reset ARCH to i386 since SRCARCH relies on it
- ARCH = i386
+ ARCH = i386
endif
endif
@@ -124,6 +124,107 @@
HS_ARCH = ppc
endif
+# determine if HotSpot is being built in JDK6 or earlier version
+JDK6_OR_EARLIER=0
+ifeq "$(shell expr \( '$(JDK_MAJOR_VERSION)' != '' \& '$(JDK_MINOR_VERSION)' != '' \& '$(JDK_MICRO_VERSION)' != '' \))" "1"
+ # if the longer variable names (newer build style) are set, then check those
+ ifeq "$(shell expr \( $(JDK_MAJOR_VERSION) = 1 \& $(JDK_MINOR_VERSION) \< 7 \))" "1"
+ JDK6_OR_EARLIER=1
+ endif
+else
+ # the longer variables aren't set so check the shorter variable names
+ ifeq "$(shell expr \( '$(JDK_MAJOR_VER)' = 1 \& '$(JDK_MINOR_VER)' \< 7 \))" "1"
+ JDK6_OR_EARLIER=1
+ endif
+endif
+
+ifeq ($(JDK6_OR_EARLIER),0)
+ # Full Debug Symbols is supported on JDK7 or newer.
+ # The Full Debug Symbols (FDS) default for BUILD_FLAVOR == product
+ # builds is enabled with debug info files ZIP'ed to save space. For
+ # BUILD_FLAVOR != product builds, FDS is always enabled, after all a
+ # debug build without debug info isn't very useful.
+ # The ZIP_DEBUGINFO_FILES option only has meaning when FDS is enabled.
+ #
+ # If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+ # disabled for a BUILD_FLAVOR == product build.
+ #
+ # Note: Use of a different variable name for the FDS override option
+ # versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+ # versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+ # in options via environment variables, use of distinct variables
+ # prevents strange behaviours. For example, in a BUILD_FLAVOR !=
+ # product build, the FULL_DEBUG_SYMBOLS environment variable will be
+ # 0, but the ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If
+ # the same variable name is used, then different values can be picked
+ # up by different parts of the build. Just to be clear, we only need
+ # two variable names because the incoming option value can be
+ # overridden in some situations, e.g., a BUILD_FLAVOR != product
+ # build.
+
+ ifeq ($(BUILD_FLAVOR), product)
+ FULL_DEBUG_SYMBOLS ?= 1
+ ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+ else
+ # debug variants always get Full Debug Symbols (if available)
+ ENABLE_FULL_DEBUG_SYMBOLS = 1
+ endif
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+ # since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ # Default OBJCOPY comes from GNU Binutils on Linux:
+ DEF_OBJCOPY=/usr/bin/objcopy
+ ifdef CROSS_COMPILE_ARCH
+ # don't try to generate .debuginfo files when cross compiling
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
+ "skipping .debuginfo generation.")
+ OBJCOPY=
+ else
+ OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+ ifneq ($(ALT_OBJCOPY),)
+ _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+ OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+ endif
+ endif
+ else
+ OBJCOPY=
+ endif
+
+ ifeq ($(OBJCOPY),)
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+ ENABLE_FULL_DEBUG_SYMBOLS=0
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+ else
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+ # Library stripping policies for .debuginfo configs:
+ # all_strip - strips everything from the library
+ # min_strip - strips most stuff from the library; leaves minimum symbols
+ # no_strip - does not strip the library at all
+ #
+ # Oracle security policy requires "all_strip". A waiver was granted on
+ # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+ #
+ # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
+ #
+ STRIP_POLICY ?= min_strip
+
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+
+ ZIP_DEBUGINFO_FILES ?= 1
+
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
+ endif
+endif
+
JDK_INCLUDE_SUBDIR=bsd
# Library suffix
@@ -141,18 +242,39 @@
# client and server subdirectories have symbolic links to ../libjsig.so
EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX)
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.diz
+ else
+ EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.debuginfo
+ endif
+endif
EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server
EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client
ifndef BUILD_CLIENT_ONLY
EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt
EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.diz
+ else
+ EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.debuginfo
+ endif
+ endif
endif
ifneq ($(ZERO_BUILD), true)
ifeq ($(ARCH_DATA_MODEL), 32)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.diz
+ else
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.debuginfo
+ endif
+ endif
endif
endif
@@ -164,6 +286,15 @@
$(EXPORT_LIB_DIR)/sa-jdi.jar
ADD_SA_BINARIES/universal = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \
$(EXPORT_LIB_DIR)/sa-jdi.jar
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+ ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.diz
+ else
+ ADD_SA_BINARIES/x86 += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+ ADD_SA_BINARIES/sparc += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.debuginfo
+ endif
+endif
ADD_SA_BINARIES/ppc =
ADD_SA_BINARIES/ia64 =
ADD_SA_BINARIES/arm =
--- hotspot/make/bsd/makefiles/gcc.make 2012-08-10 09:22:57.000000000 -0700
+++ hotspot/make/bsd/makefiles/gcc.make 2012-08-19 12:11:04.000000000 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -124,7 +124,11 @@
ARCHFLAG/ia64 =
ARCHFLAG/sparc = -m32 -mcpu=v9
ARCHFLAG/sparcv9 = -m64 -mcpu=v9
+ARCHFLAG/arm = -fsigned-char
ARCHFLAG/zero = $(ZERO_ARCHFLAG)
+ifndef E500V2
+ARCHFLAG/ppc = -mcpu=powerpc
+endif
# Darwin-specific build flags
ifeq ($(OS_VENDOR), Darwin)
@@ -285,6 +289,26 @@
DEBUG_CFLAGS += -gstabs
endif
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ FASTDEBUG_CFLAGS/ia64 = -g
+ FASTDEBUG_CFLAGS/amd64 = -g
+ FASTDEBUG_CFLAGS/arm = -g
+ FASTDEBUG_CFLAGS/ppc = -g
+ FASTDEBUG_CFLAGS += $(DEBUG_CFLAGS/$(BUILDARCH))
+ ifeq ($(FASTDEBUG_CFLAGS/$(BUILDARCH)),)
+ FASTDEBUG_CFLAGS += -gstabs
+ endif
+
+ OPT_CFLAGS/ia64 = -g
+ OPT_CFLAGS/amd64 = -g
+ OPT_CFLAGS/arm = -g
+ OPT_CFLAGS/ppc = -g
+ OPT_CFLAGS += $(OPT_CFLAGS/$(BUILDARCH))
+ ifeq ($(OPT_CFLAGS/$(BUILDARCH)),)
+ OPT_CFLAGS += -gstabs
+ endif
+endif
+
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
DEBUG_CFLAGS = -g
@@ -302,3 +326,9 @@
ifdef MINIMIZE_RAM_USAGE
CFLAGS += -DMINIMIZE_RAM_USAGE
endif
+
+ifdef CROSS_COMPILE_ARCH
+ STRIP = $(ALT_COMPILER_PATH)/strip
+else
+ STRIP = strip
+endif
--- hotspot/make/bsd/makefiles/jsig.make 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/jsig.make 2012-08-19 12:11:04.000000000 -0700
@@ -36,9 +36,16 @@
LIBJSIG_G = lib$(JSIG_G).so
endif
+LIBJSIG_DEBUGINFO = lib$(JSIG).debuginfo
+LIBJSIG_DIZ = lib$(JSIG).diz
+LIBJSIG_G_DEBUGINFO = lib$(JSIG_G).debuginfo
+LIBJSIG_G_DIZ = lib$(JSIG_G).diz
+
JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm
DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG)
+DEST_JSIG_DEBUGINFO = $(JDK_LIBDIR)/$(LIBJSIG_DEBUGINFO)
+DEST_JSIG_DIZ = $(JDK_LIBDIR)/$(LIBJSIG_DIZ)
LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig
@@ -57,11 +64,33 @@
$(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE)
@echo Making signal interposition lib...
$(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \
- $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $<
+ $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $<
$(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); }
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJSIG_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJSIG_DEBUGINFO) $@
+ ifeq ($(STRIP_POLICY),all_strip)
+ $(QUIETLY) $(STRIP) $@
+ else
+ ifeq ($(STRIP_POLICY),min_strip)
+ $(QUIETLY) $(STRIP) -S $@
+ # implied else here is no stripping at all
+ endif
+ endif
+ [ -f $(LIBJSIG_G_DEBUGINFO) ] || { ln -s $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO); }
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ $(ZIPEXE) -q -y $(LIBJSIG_DIZ) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO)
+ $(RM) $(LIBJSIG_DEBUGINFO) $(LIBJSIG_G_DEBUGINFO)
+ [ -f $(LIBJSIG_G_DIZ) ] || { ln -s $(LIBJSIG_DIZ) $(LIBJSIG_G_DIZ); }
+ endif
+endif
install_jsig: $(LIBJSIG)
@echo "Copying $(LIBJSIG) to $(DEST_JSIG)"
+ $(QUIETLY) test -f $(LIBJSIG_DEBUGINFO) && \
+ cp -f $(LIBJSIG_DEBUGINFO) $(DEST_JSIG_DEBUGINFO)
+ $(QUIETLY) test -f $(LIBJSIG_DIZ) && \
+ cp -f $(LIBJSIG_DIZ) $(DEST_JSIG_DIZ)
$(QUIETLY) cp -f $(LIBJSIG) $(DEST_JSIG) && echo "Done"
.PHONY: install_jsig
--- hotspot/make/bsd/makefiles/launcher.make 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/launcher.make 2012-08-19 12:11:04.000000000 -0700
@@ -50,7 +50,7 @@
LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS)
else
LAUNCHER.o = launcher.o
- LFLAGS_LAUNCHER += -L`pwd`
+ LFLAGS_LAUNCHER += -L`pwd`
# The gamma launcher runs the JDK from $JAVA_HOME, overriding the JVM with a
# freshly built JVM at ./libjvm.{so|dylib}. This is accomplished by setting
--- hotspot/make/bsd/makefiles/mapfile-vers-debug 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/mapfile-vers-debug 2012-08-19 12:11:04.000000000 -0700
@@ -221,6 +221,7 @@
JVM_SetArrayElement;
JVM_SetClassSigners;
JVM_SetLength;
+ JVM_SetNativeThreadName;
JVM_SetPrimitiveArrayElement;
JVM_SetProtectionDomain;
JVM_SetSockOpt;
@@ -244,24 +245,6 @@
JVM_Yield;
JVM_handle_bsd_signal;
- # Old reflection routines
- # These do not need to be present in the product build in JDK 1.4
- # but their code has not been removed yet because there will not
- # be a substantial code savings until JVM_InvokeMethod and
- # JVM_NewInstanceFromConstructor can also be removed; see
- # reflectionCompat.hpp.
- JVM_GetClassConstructor;
- JVM_GetClassConstructors;
- JVM_GetClassField;
- JVM_GetClassFields;
- JVM_GetClassMethod;
- JVM_GetClassMethods;
- JVM_GetField;
- JVM_GetPrimitiveField;
- JVM_NewInstance;
- JVM_SetField;
- JVM_SetPrimitiveField;
-
# debug JVM
JVM_AccessVMBooleanFlag;
JVM_AccessVMIntFlag;
--- hotspot/make/bsd/makefiles/mapfile-vers-product 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/mapfile-vers-product 2012-08-19 12:11:04.000000000 -0700
@@ -221,6 +221,7 @@
JVM_SetArrayElement;
JVM_SetClassSigners;
JVM_SetLength;
+ JVM_SetNativeThreadName;
JVM_SetPrimitiveArrayElement;
JVM_SetProtectionDomain;
JVM_SetSockOpt;
@@ -244,24 +245,6 @@
JVM_Yield;
JVM_handle_bsd_signal;
- # Old reflection routines
- # These do not need to be present in the product build in JDK 1.4
- # but their code has not been removed yet because there will not
- # be a substantial code savings until JVM_InvokeMethod and
- # JVM_NewInstanceFromConstructor can also be removed; see
- # reflectionCompat.hpp.
- JVM_GetClassConstructor;
- JVM_GetClassConstructors;
- JVM_GetClassField;
- JVM_GetClassFields;
- JVM_GetClassMethod;
- JVM_GetClassMethods;
- JVM_GetField;
- JVM_GetPrimitiveField;
- JVM_NewInstance;
- JVM_SetField;
- JVM_SetPrimitiveField;
-
# miscellaneous functions
jio_fprintf;
jio_printf;
--- hotspot/make/bsd/makefiles/ppc.make 2012-08-10 09:22:58.000000000 -0700
+++ hotspot/make/bsd/makefiles/ppc.make 2012-08-19 12:11:04.000000000 -0700
@@ -28,3 +28,6 @@
# Must also specify if CPU is big endian
CFLAGS += -DVM_BIG_ENDIAN
+ifdef E500V2
+ASFLAGS += -Wa,-mspe -Wa,--defsym -Wa,E500V2=1
+endif
--- hotspot/make/bsd/makefiles/saproc.make 2012-08-10 09:22:59.000000000 -0700
+++ hotspot/make/bsd/makefiles/saproc.make 2012-08-19 12:11:04.000000000 -0700
@@ -36,6 +36,11 @@
LIBSAPROC_G = lib$(SAPROC_G).so
endif
+LIBSAPROC_DEBUGINFO = lib$(SAPROC).debuginfo
+LIBSAPROC_DIZ = lib$(SAPROC).diz
+LIBSAPROC_G_DEBUGINFO = lib$(SAPROC_G).debuginfo
+LIBSAPROC_G_DIZ = lib$(SAPROC_G).diz
+
AGENT_DIR = $(GAMMADIR)/agent
SASRCDIR = $(AGENT_DIR)/src/os/$(Platform_os_family)
@@ -66,7 +71,9 @@
SAMAPFILE = $(SASRCDIR)/mapfile
-DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
+DEST_SAPROC = $(JDK_LIBDIR)/$(LIBSAPROC)
+DEST_SAPROC_DEBUGINFO = $(JDK_LIBDIR)/$(LIBSAPROC_DEBUGINFO)
+DEST_SAPROC_DIZ = $(JDK_LIBDIR)/$(LIBSAPROC_DIZ)
# DEBUG_BINARIES overrides everything, use full -g debug information
ifeq ($(DEBUG_BINARIES), true)
@@ -114,10 +121,32 @@
-o $@ \
$(SALIBS)
$(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); }
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBSAPROC_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBSAPROC_DEBUGINFO) $@
+ ifeq ($(STRIP_POLICY),all_strip)
+ $(QUIETLY) $(STRIP) $@
+ else
+ ifeq ($(STRIP_POLICY),min_strip)
+ $(QUIETLY) $(STRIP) -S $@
+ # implied else here is no stripping at all
+ endif
+ endif
+ [ -f $(LIBSAPROC_G_DEBUGINFO) ] || { ln -s $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO); }
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ $(ZIPEXE) -q -y $(LIBSAPROC_DIZ) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO)
+ $(RM) $(LIBSAPROC_DEBUGINFO) $(LIBSAPROC_G_DEBUGINFO)
+ [ -f $(LIBSAPROC_G_DIZ) ] || { ln -s $(LIBSAPROC_DIZ) $(LIBSAPROC_G_DIZ); }
+ endif
+endif
install_saproc: $(BUILDLIBSAPROC)
$(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \
echo "Copying $(LIBSAPROC) to $(DEST_SAPROC)"; \
+ test -f $(LIBSAPROC_DEBUGINFO) && \
+ cp -f $(LIBSAPROC_DEBUGINFO) $(DEST_SAPROC_DEBUGINFO); \
+ test -f $(LIBSAPROC_DIZ) && \
+ cp -f $(LIBSAPROC_DIZ) $(DEST_SAPROC_DIZ); \
cp -f $(LIBSAPROC) $(DEST_SAPROC) && echo "Done"; \
fi
--- hotspot/make/bsd/makefiles/vm.make 2012-08-10 09:22:59.000000000 -0700
+++ hotspot/make/bsd/makefiles/vm.make 2012-08-19 12:11:04.000000000 -0700
@@ -1,5 +1,5 @@
#
-# Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -60,10 +60,16 @@
# The order is important for the precompiled headers to work.
INCLUDES += $(PRECOMPILED_HEADER_DIR:%=-I%) $(Src_Dirs_I:%=-I%)
-ifeq (${VERSION}, debug)
+# SYMFLAG is used by {jsig,saproc}.make
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ # always build with debug info when we can create .debuginfo files
SYMFLAG = -g
else
- SYMFLAG =
+ ifeq (${VERSION}, debug)
+ SYMFLAG = -g
+ else
+ SYMFLAG =
+ endif
endif
# HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined
@@ -100,9 +106,11 @@
CXXFLAGS += -DDEFAULT_LIBPATH="\"$(DEFAULT_LIBPATH)\""
endif
-ifndef JAVASE_EMBEDDED
+ifndef JAVASE_EMBEDDED
+ifneq (${ARCH},arm)
CFLAGS += -DINCLUDE_TRACE
endif
+endif
# CFLAGS_WARN holds compiler options to suppress/enable warnings.
CFLAGS += $(CFLAGS_WARN/BYFILE)
@@ -145,6 +153,11 @@
LIBJVM_G = lib$(JVM)$(G_SUFFIX).so
endif
+LIBJVM_DEBUGINFO = lib$(JVM).debuginfo
+LIBJVM_DIZ = lib$(JVM).diz
+LIBJVM_G_DEBUGINFO = lib$(JVM)$(G_SUFFIX).debuginfo
+LIBJVM_G_DIZ = lib$(JVM)$(G_SUFFIX).diz
+
SPECIAL_PATHS:=adlc c1 gc_implementation opto shark libadt
SOURCE_PATHS=\
@@ -155,11 +168,13 @@
SOURCE_PATHS+=$(HS_COMMON_SRC)/cpu/$(Platform_arch)/vm
SOURCE_PATHS+=$(HS_COMMON_SRC)/os_cpu/$(Platform_os_arch)/vm
-ifndef JAVASE_EMBEDDED
+ifndef JAVASE_EMBEDDED
+ifneq (${ARCH},arm)
SOURCE_PATHS+=$(shell if [ -d $(HS_ALT_SRC)/share/vm/jfr ]; then \
find $(HS_ALT_SRC)/share/vm/jfr -type d; \
fi)
endif
+endif
CORE_PATHS=$(foreach path,$(SOURCE_PATHS),$(call altsrc,$(path)) $(path))
CORE_PATHS+=$(GENERATED)/jvmtifiles
@@ -316,11 +331,38 @@
rm -f $@.1; ln -s $@ $@.1; \
[ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \
}
+ifeq ($(CROSS_COMPILE_ARCH),)
+ ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ $(QUIETLY) $(OBJCOPY) --only-keep-debug $@ $(LIBJVM_DEBUGINFO)
+ $(QUIETLY) $(OBJCOPY) --add-gnu-debuglink=$(LIBJVM_DEBUGINFO) $@
+ ifeq ($(STRIP_POLICY),all_strip)
+ $(QUIETLY) $(STRIP) $@
+ else
+ ifeq ($(STRIP_POLICY),min_strip)
+ $(QUIETLY) $(STRIP) -S $@
+ # implied else here is no stripping at all
+ endif
+ endif
+ $(QUIETLY) [ -f $(LIBJVM_G_DEBUGINFO) ] || ln -s $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
+ ifeq ($(ZIP_DEBUGINFO_FILES),1)
+ $(ZIPEXE) -q -y $(LIBJVM_DIZ) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
+ $(RM) $(LIBJVM_DEBUGINFO) $(LIBJVM_G_DEBUGINFO)
+ [ -f $(LIBJVM_G_DIZ) ] || { ln -s $(LIBJVM_DIZ) $(LIBJVM_G_DIZ); }
+ endif
+ endif
+endif
-DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM)
+DEST_SUBDIR = $(JDK_LIBDIR)/$(VM_SUBDIR)
+DEST_JVM = $(DEST_SUBDIR)/$(LIBJVM)
+DEST_JVM_DEBUGINFO = $(DEST_SUBDIR)/$(LIBJVM_DEBUGINFO)
+DEST_JVM_DIZ = $(DEST_SUBDIR)/$(LIBJVM_DIZ)
install_jvm: $(LIBJVM)
@echo "Copying $(LIBJVM) to $(DEST_JVM)"
+ $(QUIETLY) test -f $(LIBJVM_DEBUGINFO) && \
+ cp -f $(LIBJVM_DEBUGINFO) $(DEST_JVM_DEBUGINFO)
+ $(QUIETLY) test -f $(LIBJVM_DIZ) && \
+ cp -f $(LIBJVM_DIZ) $(DEST_JVM_DIZ)
$(QUIETLY) cp -f $(LIBJVM) $(DEST_JVM) && echo "Done"
#----------------------------------------------------------------------
--- hotspot/make/solaris/makefiles/defs.make 2012-08-10 09:23:12.000000000 -0700
+++ hotspot/make/solaris/makefiles/defs.make 2012-08-19 12:11:04.000000000 -0700
@@ -194,8 +194,8 @@
endif
ifeq ($(ARCH_DATA_MODEL), 32)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX)
+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX)
EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX)
--- hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2012-08-10 09:23:56.000000000 -0700
+++ hotspot/src/cpu/sparc/vm/globals_sparc.hpp 2012-08-19 12:11:04.000000000 -0700
@@ -71,7 +71,11 @@
define_pd_global(bool, RewriteBytecodes, true);
define_pd_global(bool, RewriteFrequentPairs, true);
+#ifdef _ALLBSD_SOURCE
+define_pd_global(bool, UseMembar, true);
+#else
define_pd_global(bool, UseMembar, false);
+#endif
// GC Ergo Flags
define_pd_global(intx, CMSYoungGenPerWorker, 16*M); // default max size of CMS young gen, per GC worker thread
--- hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2012-08-10 09:24:15.000000000 -0700
+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp 2012-08-19 12:11:05.000000000 -0700
@@ -212,7 +212,10 @@
// (this is the default on linux, but not on mac os)
RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res);
if (res == 0) {
- res = ::rename(initial_path, path);
+ RESTARTABLE(::chown(initial_path, geteuid(), getegid()), res);
+ if (res == 0) {
+ res = ::rename(initial_path, path);
+ }
}
}
}
--- hotspot/src/os/bsd/vm/decoder_bsd.cpp 1969-12-31 16:00:00.000000000 -0800
+++ hotspot/src/os/bsd/vm/decoder_bsd.cpp 2012-08-19 12:11:05.000000000 -0700
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ *
+ */
+
+#include "prims/jvm.h"
+#include "utilities/decoder_elf.hpp"
+
+#include <cxxabi.h>
+
+bool ElfDecoder::demangle(const char* symbol, char *buf, int buflen) {
+ int status;
+ char* result;
+ size_t size = (size_t)buflen;
+
+ // Don't pass buf to __cxa_demangle. In case of the 'buf' is too small,
+ // __cxa_demangle will call system "realloc" for additional memory, which
+ // may use different malloc/realloc mechanism that allocates 'buf'.
+ if ((result = abi::__cxa_demangle(symbol, NULL, NULL, &status)) != NULL) {
+ jio_snprintf(buf, buflen, "%s", result);
+ // call c library's free
+ ::free(result);
+ return true;
+ }
+ return false;
+}
+
--- hotspot/src/os/bsd/vm/os_bsd.cpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/os_bsd.cpp 2012-08-19 12:11:05.000000000 -0700
@@ -2341,14 +2341,14 @@
}
void os::print_os_info_brief(outputStream* st) {
- st->print("Bsd");
+ st->print("BSD");
os::Posix::print_uname_info(st);
}
void os::print_os_info(outputStream* st) {
st->print("OS:");
- st->print("Bsd");
+ st->print("BSD");
os::Posix::print_uname_info(st);
@@ -2357,10 +2357,6 @@
os::Posix::print_load_average(st);
}
-void os::pd_print_cpu_info(outputStream* st) {
- // Nothing to do for now.
-}
-
void os::print_memory_info(outputStream* st) {
st->print("Memory:");
@@ -2377,6 +2373,7 @@
st->print("(" UINT64_FORMAT "k free)",
os::available_memory() >> 10);
#ifndef _ALLBSD_SOURCE
+ // FIXME: Make this work for *BSD
st->print(", swap " UINT64_FORMAT "k",
((jlong)si.totalswap * si.mem_unit) >> 10);
st->print("(" UINT64_FORMAT "k free)",
@@ -2384,12 +2381,22 @@
#endif
st->cr();
+ // FIXME: Make this work for *BSD
// meminfo
st->print("\n/proc/meminfo:\n");
_print_ascii_file("/proc/meminfo", st);
st->cr();
}
+void os::pd_print_cpu_info(outputStream* st) {
+ // FIXME: Make this work for *BSD
+ st->print("\n/proc/cpuinfo:\n");
+ if (!_print_ascii_file("/proc/cpuinfo", st)) {
+ st->print(" <Not Available>");
+ }
+ st->cr();
+}
+
// Taken from /usr/include/bits/siginfo.h Supposed to be architecture specific
// but they're the same for all the bsd arch that we support
// and they're the same for solaris but there's no common place to put this.
@@ -2532,6 +2539,25 @@
len = strlen(buf);
jrelib_p = buf + len;
+#ifndef __APPLE__
+ snprintf(jrelib_p, buflen-len, "/jre/lib/%s", cpu_arch);
+ if (0 != access(buf, F_OK)) {
+ snprintf(jrelib_p, buflen-len, "/lib/%s", cpu_arch);
+ }
+
+ if (0 == access(buf, F_OK)) {
+ // Use current module name "libjvm[_g].so" instead of
+ // "libjvm"debug_only("_g")".so" since for fastdebug version
+ // we should have "libjvm.so" but debug_only("_g") adds "_g"!
+ len = strlen(buf);
+ snprintf(buf + len, buflen-len, "/hotspot/libjvm%s.so", p);
+ } else {
+ // Go back to path of .so
+ rp = realpath(dli_fname, buf);
+ if (rp == NULL)
+ return;
+ }
+#else
// Add the appropriate library subdir
snprintf(jrelib_p, buflen-len, "/jre/lib");
if (0 != access(buf, F_OK)) {
@@ -2561,6 +2587,7 @@
if (rp == NULL)
return;
}
+#endif
}
}
}
@@ -2817,7 +2844,11 @@
}
void os::free_memory(char *addr, size_t bytes, size_t alignment_hint) {
+#if !defined(__APPLE__) && !defined(__FreeBSD__)
+ commit_memory(addr, bytes, alignment_hint, false);
+#else
::madvise(addr, bytes, MADV_DONTNEED);
+#endif
}
void os::numa_make_global(char *addr, size_t bytes) {
--- hotspot/src/os/bsd/vm/os_bsd.hpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/os_bsd.hpp 2012-08-19 12:11:05.000000000 -0700
@@ -103,6 +103,12 @@
static bool hugetlbfs_sanity_check(bool warn, size_t page_size);
+ static void print_full_memory_info(outputStream* st);
+#ifndef _ALLBSD_SOURCE
+ static void print_distro_info(outputStream* st);
+ static void print_libversion_info(outputStream* st);
+#endif
+
public:
static void init_thread_fpu_state();
--- hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2012-08-19 12:11:05.000000000 -0700
@@ -31,10 +31,22 @@
# include "atomic_bsd_x86.inline.hpp"
# include "orderAccess_bsd_x86.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_sparc
+# include "atomic_bsd_sparc.inline.hpp"
+# include "orderAccess_bsd_sparc.inline.hpp"
+#endif
#ifdef TARGET_OS_ARCH_bsd_zero
# include "atomic_bsd_zero.inline.hpp"
# include "orderAccess_bsd_zero.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_arm
+# include "atomic_bsd_arm.inline.hpp"
+# include "orderAccess_bsd_arm.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_bsd_ppc
+# include "atomic_bsd_ppc.inline.hpp"
+# include "orderAccess_bsd_ppc.inline.hpp"
+#endif
// System includes
--- hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2012-08-10 09:24:18.000000000 -0700
+++ hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2012-08-19 12:11:05.000000000 -0700
@@ -34,11 +34,26 @@
# include "orderAccess_bsd_x86.inline.hpp"
# include "prefetch_bsd_x86.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_sparc
+# include "atomic_bsd_sparc.inline.hpp"
+# include "orderAccess_bsd_sparc.inline.hpp"
+# include "prefetch_bsd_sparc.inline.hpp"
+#endif
#ifdef TARGET_OS_ARCH_bsd_zero
# include "atomic_bsd_zero.inline.hpp"
# include "orderAccess_bsd_zero.inline.hpp"
# include "prefetch_bsd_zero.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_arm
+# include "atomic_bsd_arm.inline.hpp"
+# include "orderAccess_bsd_arm.inline.hpp"
+# include "prefetch_bsd_arm.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_bsd_ppc
+# include "atomic_bsd_ppc.inline.hpp"
+# include "orderAccess_bsd_ppc.inline.hpp"
+# include "prefetch_bsd_ppc.inline.hpp"
+#endif
// Contains inlined functions for class Thread and ThreadLocalStorage
--- hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2012-08-10 09:24:32.000000000 -0700
+++ hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp 2012-08-19 12:11:05.000000000 -0700
@@ -52,7 +52,7 @@
/* Posix Thread IDs */ \
/**********************/ \
\
- declare_unsigned_integer_type(thread_t) \
+ declare_unsigned_integer_type(OS_THREAD_ID_TYPE) \
declare_unsigned_integer_type(pthread_t) \
\
/* This must be the last entry, and must be present */ \
--- hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2012-08-10 09:24:33.000000000 -0700
+++ hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp 2012-08-19 12:11:05.000000000 -0700
@@ -24,7 +24,7 @@
*/
#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) && !defined(__NetBSD__)
-#include <pthread.h>
+# include <pthread.h>
# include <pthread_np.h> /* For pthread_attr_get_np */
#endif
--- hotspot/src/share/vm/runtime/atomic.cpp 2012-08-10 09:27:53.000000000 -0700
+++ hotspot/src/share/vm/runtime/atomic.cpp 2012-08-19 12:11:07.000000000 -0700
@@ -54,6 +54,12 @@
#ifdef TARGET_OS_ARCH_windows_x86
# include "atomic_windows_x86.inline.hpp"
#endif
+#ifdef TARGET_OS_ARCH_bsd_x86
+# include "atomic_bsd_x86.inline.hpp"
+#endif
+#ifdef TARGET_OS_ARCH_bsd_zero
+# include "atomic_bsd_zero.inline.hpp"
+#endif
#ifdef TARGET_OS_ARCH_linux_arm
# include "atomic_linux_arm.inline.hpp"
#endif
--- hotspot/src/share/vm/runtime/os.hpp 2012-08-10 09:28:05.000000000 -0700
+++ hotspot/src/share/vm/runtime/os.hpp 2012-08-19 12:11:07.000000000 -0700
@@ -30,6 +30,9 @@
#include "runtime/extendedPC.hpp"
#include "runtime/handles.hpp"
#include "utilities/top.hpp"
+#ifdef TARGET_OS_FAMILY_bsd
+# include "jvm_bsd.h"
+#endif
#ifdef TARGET_OS_FAMILY_linux
# include "jvm_linux.h"
#endif
@@ -694,8 +697,8 @@
# include "os_windows.hpp"
#endif
#ifdef TARGET_OS_FAMILY_bsd
-# include "os_posix.hpp"
# include "os_bsd.hpp"
+# include "os_posix.hpp"
#endif
#ifdef TARGET_OS_ARCH_linux_x86
# include "os_linux_x86.hpp"
--- hotspot/test/compiler/5091921/Test7005594.sh 2012-08-10 09:28:58.000000000 -0700
+++ hotspot/test/compiler/5091921/Test7005594.sh 2012-08-19 12:11:07.000000000 -0700
@@ -71,6 +71,9 @@
# Windows/MKS
MEM=`"$ROOTDIR/mksnt/sysinf" memory -v | grep "Total Physical Memory: " | sed 's/Total Physical Memory: *//g'`
MEM="$(($machine_memory / 1024))"
+elif [ -n `sysctl -n hw.physmem64 2> /dev/null` -o -n `sysctl -n hw.physmem 2> /dev/null` ];
+ # BSD
+ MEM=`sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }'`
else
echo "Unable to determine amount of physical memory on the machine"
fi
--- hotspot/test/gc/6941923/test6941923.sh 2012-08-10 09:29:15.000000000 -0700
+++ hotspot/test/gc/6941923/test6941923.sh 2012-08-19 12:11:08.000000000 -0700
@@ -9,7 +9,7 @@
## skip on windows
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD )
NULL=/dev/null
PS=":"
FS="/"
--- hotspot/test/runtime/7020373/Test7020373.sh 2012-08-10 09:29:17.000000000 -0700
+++ hotspot/test/runtime/7020373/Test7020373.sh 2012-08-19 12:11:08.000000000 -0700
@@ -32,7 +32,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- hotspot/test/runtime/7110720/Test7110720.sh 2012-08-10 09:29:18.000000000 -0700
+++ hotspot/test/runtime/7110720/Test7110720.sh 2012-08-19 12:11:08.000000000 -0700
@@ -37,7 +37,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD )
FS="/"
RM=/bin/rm
CP=/bin/cp
--- hotspot/test/runtime/7158800/Test7158800.sh 2012-08-10 09:29:19.000000000 -0700
+++ hotspot/test/runtime/7158800/Test7158800.sh 2012-08-19 12:11:08.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD )
NULL=/dev/null
PS=":"
FS="/"
--- jaxp/.hgtags 2012-08-10 09:35:08.000000000 -0700
+++ jaxp/.hgtags 2012-08-19 12:04:20.000000000 -0700
@@ -123,6 +123,7 @@
bcd31fa1e3c6f51b4fdd427ef905188cdac57164 jdk7-b146
067fb18071e3872698f6218724958bd0cebf30a3 jdk7u1-b01
fc268cd1dd5d2e903ccd4b0275e1f9c2461ed30c jdk7-b147
+3170972bd3928a331c4c64a5c0c9632077fb399a 7u0
104ca42e1e7ca66b074a4619ce6420f15d8f454d jdk7u1-b02
64e323faadf65018c1ffc8bb9c97f7b664e87347 jdk7u1-b03
2256c20e66857f80cacda14ffdbc0979c929d7f8 jdk7u1-b04
@@ -197,5 +198,4 @@
7403701aa75848ca2a7b297909908b858134e132 jdk7u6-b21
fcf35906d1d88583878cd2e2d7c63dfba4e9f679 jdk7u6-b22
8824bcbfd7cd8059ededf70f1e7f2b06f02cb33f jdk7u6-b23
-1365e7472a3b737dda4a73e06ad41718d667d9be jdk7u8-b01
-0a313d4307930be3a64106b9b8c90f9342673aa0 jdk7u8-b02
+378f719cfb9491b766cd9f7cd47ad7fa3503e141 jdk7u6-b24
--- jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2012-08-10 09:36:39.000000000 -0700
+++ jaxp/src/com/sun/org/apache/xerces/internal/impl/XMLEntityManager.java 2012-08-19 12:04:20.000000000 -0700
@@ -602,7 +602,7 @@
if (reader == null) {
stream = xmlInputSource.getByteStream();
if (stream == null) {
- URL location = new URL(expandedSystemId);
+ URL location = new URL(escapeNonUSAscii(expandedSystemId));
URLConnection connect = location.openConnection();
if (!(connect instanceof HttpURLConnection)) {
stream = connect.getInputStream();
@@ -2586,6 +2586,64 @@
} // fixURI(String):String
+ /**
+ * Escape invalid URI characters.
+ *
+ * Passed a URI that contains invalid characters (like spaces, non-ASCII Unicode characters, and the like),
+ * this function percent encodes the invalid characters per the URI specification (i.e., as a sequence of
+ * %-encoded UTF-8 octets).
+ *
+ * N.B. There are two problems. If the URI contains a '%' character, that might be an indication that
+ * the URI has already been escaped by the author, or it might be an invalid '%'. In the former case,
+ * it's important not to escape it, or we'll wind up with invalid, doubly-escaped '%'s. In the latter,
+ * the URI is broken if we don't encode it. Similarly, a '#' character might be the start of a fragment
+ * identifier or it might be an invalid '#'.
+ *
+ * Given that the former is vastly more likely than the latter in each case (most users are familiar with
+ * the magic status of '%' and '#' and they occur relatively infrequently in filenames, and if the user parses
+ * a proper Java File, we will already have %-escaped the URI), we simply assume that %'s and #'s are legit.
+ *
+ * Very rarely, we may be wrong. If so, tell the user to fix the clearly broken URI.
+ */
+ protected static String escapeNonUSAscii(String str) {
+ if (str == null) {
+ return str;
+ }
+
+ // get UTF-8 bytes for the string
+ StringBuffer buffer = new StringBuffer();
+ byte[] bytes = null;
+ byte b;
+ try {
+ bytes = str.getBytes("UTF-8");
+ } catch (java.io.UnsupportedEncodingException e) {
+ // should never happen
+ return str;
+ }
+ int len = bytes.length;
+ int ch;
+
+ // for each byte
+ for (int i = 0; i < len; i++) {
+ b = bytes[i];
+ // for non-ascii character: make it positive, then escape
+ if (b < 0) {
+ ch = b + 256;
+ buffer.append('%');
+ buffer.append(gHexChs[ch >> 4]);
+ buffer.append(gHexChs[ch & 0xf]);
+ }
+ else if (b != '%' && b != '#' && gNeedEscaping[b]) {
+ buffer.append('%');
+ buffer.append(gAfterEscaping1[b]);
+ buffer.append(gAfterEscaping2[b]);
+ }
+ else {
+ buffer.append((char)b);
+ }
+ }
+ return buffer.toString();
+ }
//
// Package visible methods
--- jaxws/.hgtags 2012-08-10 09:46:32.000000000 -0700
+++ jaxws/.hgtags 2012-08-19 12:01:22.000000000 -0700
@@ -123,6 +123,7 @@
05469dd4c3662c454f8a019e492543add60795cc jdk7-b146
c01bfd68d0528bc88348813c4d75d7f5c62bc4e2 jdk7u1-b01
d13b1f877bb5ed8dceb2f7ec10365d1db5f70b2d jdk7-b147
+ce6378e3c791c56b98cbf161804a07d0225b41c0 7u0
4c24f7019ce939a452154a83151294ad7da66a9d jdk7u1-b02
272778f529d11081f548f37fcd6a7aec0b11a8dd jdk7u1-b03
48b06a6e6f46e5bcd610f4bed57cd5067cf31f8c jdk7u1-b04
@@ -197,5 +198,4 @@
55dcda93e8c8b5c3170def946de35dd0407eab59 jdk7u6-b21
0fec2efe2452aed9736da39add4c7f71be561838 jdk7u6-b22
afb6d773328fa76cea65dc024a448cd931d111f2 jdk7u6-b23
-55dcda93e8c8b5c3170def946de35dd0407eab59 jdk7u8-b01
-c025e953f655b375f27f8f94493ceeb43ef1d979 jdk7u8-b02
+b8b85e62d2c5347df8cf2e825e51e3de178508ea jdk7u6-b24
--- jdk/.hgtags 2012-08-10 10:21:29.000000000 -0700
+++ jdk/.hgtags 2012-08-19 12:39:46.000000000 -0700
@@ -123,6 +123,7 @@
539e576793a8e64aaf160e0d6ab0b9723cd0bef0 jdk7-b146
69e973991866c948cf1808b06884ef2d28b64fcb jdk7u1-b01
f097ca2434b1412b12ab4a5c2397ce271bf681e7 jdk7-b147
+0870207843e2a74816dff1e33a717ffaf6f0a919 7u0
2baf612764d215e6f3a5b48533f74c6924ac98d7 jdk7u1-b02
a4781b6d9cfb6901452579adee17c9a17c1b584c jdk7u1-b03
b223ed9a5fdf8ce3af42adfa8815975811d70eae jdk7u1-b04
@@ -197,5 +198,4 @@
243717d7fe9589148951ffb5551264af0e446314 jdk7u6-b21
d78f2b600d393f45d6ace8ca0f29ad677624a775 jdk7u6-b22
0ae89e53f5300da1961984a7d81c220c7cf717d7 jdk7u6-b23
-df945ef30444adf08f3ef14b0c49c8bda6dda587 jdk7u8-b01
-dd1e513c05b8b8c8402e9ecf9c0d5bdbebb1a089 jdk7u8-b02
+1c775da998735711853cfe1ae1d6baddc5f12a66 jdk7u6-b24
--- jdk/make/com/sun/nio/Makefile 2012-08-10 10:21:31.000000000 -0700
+++ jdk/make/com/sun/nio/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -31,11 +31,18 @@
include $(BUILDDIR)/common/Defs.gmk
# MMM: disable for now
-ifneq ($(PLATFORM), macosx)
+ifeq (,$(findstring $(PLATFORM), bsd macosx))
include $(BUILDDIR)/common/Subdirs.gmk
SUBDIRS = sctp
endif
+ifeq ($(OS_VENDOR), FreeBSD)
+# FreeBSD 5.x and lower are unsupported, 6.x has no sctp support.
+ifneq ($(call MajorVersion,$(shell uname -r)), 6)
+include $(BUILDDIR)/common/Subdirs.gmk
+SUBDIRS = sctp
+endif
+endif
all build clean clobber::
$(SUBDIRS-loop)
--- jdk/make/com/sun/nio/sctp/Makefile 2012-08-10 10:21:31.000000000 -0700
+++ jdk/make/com/sun/nio/sctp/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -59,15 +59,11 @@
-I$(PLATFORM_SRC)/native/java/net \
-I$(CLASSHDRDIR)/../../../../java/java.nio/nio/CClassHeaders
+OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio
ifeq ($(PLATFORM), linux)
COMPILER_WARNINGS_FATAL=true
-#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl
-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl
+OTHER_LDLIBS += -lpthread $(LIBDL)
endif
-ifeq ($(PLATFORM), solaris)
-#LIBSCTP = -lsctp
-OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio
-endif # PLATFORM
else # windows
include $(BUILDDIR)/common/Classes.gmk
--- jdk/make/com/sun/security/auth/module/Makefile 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/security/auth/module/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -67,7 +67,7 @@
include FILES_c_solaris.gmk
endif # solaris
-ifneq (,$(findstring $(PLATFORM), linux macosx))
+ifneq (,$(findstring $(PLATFORM), linux bsd macosx))
LIBRARY = jaas_unix
include FILES_export_unix.gmk
include FILES_c_unix.gmk
--- jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/Exportedfiles.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -43,7 +43,7 @@
sun/tools/attach/LinuxVirtualMachine.java
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_export = \
sun/tools/attach/BsdVirtualMachine.java
endif
--- jdk/make/com/sun/tools/attach/FILES_c.gmk 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/FILES_c.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -39,7 +39,7 @@
LinuxVirtualMachine.c
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_c = \
BsdVirtualMachine.c
endif
--- jdk/make/com/sun/tools/attach/FILES_java.gmk 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/FILES_java.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -43,7 +43,7 @@
sun/tools/attach/LinuxAttachProvider.java
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_java += \
sun/tools/attach/BsdAttachProvider.java
endif
--- jdk/make/com/sun/tools/attach/Makefile 2012-08-10 10:21:32.000000000 -0700
+++ jdk/make/com/sun/tools/attach/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -38,7 +38,7 @@
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_m = mapfile-bsd
endif
include $(BUILDDIR)/common/Mapfile-vers.gmk
@@ -57,7 +57,7 @@
EXTRA_LIBS += psapi.lib
endif
-ifeq ($PLATFORM), macosx)
+ifeq ($(PLATFORM), macosx)
vpath %.c $(call NativeSrcDirList,,native/sun/tools/attach)
else
vpath %.c $(PLATFORM_SRC)/native/sun/tools/attach
--- jdk/make/common/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800
+++ jdk/make/common/Defs-bsd.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -0,0 +1,527 @@
+#
+# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Makefile to specify compiler flags for programs and libraries
+# targeted to BSD. Should not contain any rules.
+#
+# WARNING: This file is shared with other workspaces.
+# So when it includes other files, it must use JDK_TOPDIR.
+#
+
+# Warning: the following variables are overriden by Defs.gmk. Set
+# values will be silently ignored:
+# CFLAGS (set $(OTHER_CFLAGS) instead)
+# CPPFLAGS (set $(OTHER_CPPFLAGS) instead)
+# CXXFLAGS (set $(OTHER_CXXFLAGS) instead)
+# LDFLAGS (set $(OTHER_LDFAGS) instead)
+# LDLIBS (set $(EXTRA_LIBS) instead)
+# LDLIBS_COMMON (set $(EXTRA_LIBS) instead)
+
+# Get shared JDK settings
+include $(JDK_MAKE_SHARED_DIR)/Defs.gmk
+
+# Part of INCREMENTAL_BUILD mechanism.
+# Compiler emits things like: path/file.o: file.h
+# We want something like: relative_path/file.o relative_path/file.d: file.h
+CC_DEPEND = -MM
+CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g'
+
+ifndef PLATFORM_SRC
+ PLATFORM_SRC = $(BUILDDIR)/../src/solaris
+endif # PLATFORM_SRC
+
+# Location of the various .properties files specific to BSD platform
+ifndef PLATFORM_PROPERTIES
+ PLATFORM_PROPERTIES = $(BUILDDIR)/../src/solaris/lib
+endif # PLATFORM_SRC
+
+# BSD build pulls its platform sources from the solaris tree.
+JAVA_SRCDIR_LIST = src/macosx src/solaris src/share
+NATIVE_SRCDIR_LIST = src/macosx src/solaris src/share
+
+# Platform specific closed sources
+ifndef OPENJDK
+ ifndef CLOSED_PLATFORM_SRC
+ CLOSED_PLATFORM_SRC = $(BUILDDIR)/../src/closed/solaris
+ endif
+endif
+
+# platform specific include files
+PLATFORM_INCLUDE_NAME = $(OS_NAME)
+PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME)
+
+# suffix used for make dependencies files.
+DEPEND_SUFFIX = d
+# The suffix applied to the library name for FDLIBM
+FDDLIBM_SUFFIX = a
+# The suffix applied to scripts (.bat for windows, nothing for unix)
+SCRIPT_SUFFIX =
+# CC compiler object code output directive flag value
+CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required!
+CC_PROGRAM_OUTPUT_FLAG = -o #trailing blank required!
+
+# The Full Debug Symbols (FDS) default for VARIANT == OPT builds is
+# enabled with debug info files ZIP'ed to save space. For VARIANT !=
+# OPT builds, FDS is always enabled, after all a debug build without
+# debug info isn't very useful. The ZIP_DEBUGINFO_FILES option only has
+# meaning when FDS is enabled.
+#
+# If you invoke a build with FULL_DEBUG_SYMBOLS=0, then FDS will be
+# disabled for a VARIANT == OPT build.
+#
+# Note: Use of a different variable name for the FDS override option
+# versus the FDS enabled check is intentional (FULL_DEBUG_SYMBOLS
+# versus ENABLE_FULL_DEBUG_SYMBOLS). For auto build systems that pass
+# in options via environment variables, use of distinct variables
+# prevents strange behaviours. For example, in a VARIANT != OPT build,
+# the FULL_DEBUG_SYMBOLS environment variable will be 0, but the
+# ENABLE_FULL_DEBUG_SYMBOLS make variable will be 1. If the same
+# variable name is used, then different values can be picked up by
+# different parts of the build. Just to be clear, we only need two
+# variable names because the incoming option value can be overridden
+# in some situations, e.g., a VARIANT != OPT build.
+
+ifeq ($(VARIANT), OPT)
+ FULL_DEBUG_SYMBOLS ?= 1
+ ENABLE_FULL_DEBUG_SYMBOLS = $(FULL_DEBUG_SYMBOLS)
+else
+ # debug variants always get Full Debug Symbols (if available)
+ ENABLE_FULL_DEBUG_SYMBOLS = 1
+endif
+_JUNK_ := $(shell \
+ echo >&2 "INFO: ENABLE_FULL_DEBUG_SYMBOLS=$(ENABLE_FULL_DEBUG_SYMBOLS)")
+# since objcopy is optional, we set ZIP_DEBUGINFO_FILES later
+
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ # Default OBJCOPY comes from GNU Binutils on BSD:
+ DEF_OBJCOPY=/usr/bin/objcopy
+ ifdef CROSS_COMPILE_ARCH
+ # don't try to generate .debuginfo files when cross compiling
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: cross compiling for ARCH $(CROSS_COMPILE_ARCH)," \
+ "skipping .debuginfo generation.")
+ OBJCOPY=
+ else
+ OBJCOPY=$(shell test -x $(DEF_OBJCOPY) && echo $(DEF_OBJCOPY))
+ ifneq ($(ALT_OBJCOPY),)
+ _JUNK_ := $(shell echo >&2 "INFO: ALT_OBJCOPY=$(ALT_OBJCOPY)")
+ # disable .debuginfo support by setting ALT_OBJCOPY to a non-existent path
+ OBJCOPY=$(shell test -x $(ALT_OBJCOPY) && echo $(ALT_OBJCOPY))
+ endif
+ endif
+
+ # Setting ENABLE_FULL_DEBUG_SYMBOLS=1 (and OBJCOPY) above enables the
+ # JDK build to import .debuginfo or .diz files from the HotSpot build.
+ # However, adding FDS support to the JDK build will occur in phases
+ # so a different make variable (LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS
+ # and PROGRAM_SUPPORTS_FULL_DEBUG_SYMBOLS) is used to indicate that a
+ # particular library or program supports FDS.
+
+ ifeq ($(OBJCOPY),)
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: no objcopy cmd found so cannot create .debuginfo files.")
+ ENABLE_FULL_DEBUG_SYMBOLS=0
+ else
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: $(OBJCOPY) cmd found so will create .debuginfo files.")
+
+ # Library stripping policies for .debuginfo configs:
+ # all_strip - strips everything from the library
+ # min_strip - strips most stuff from the library; leaves minimum symbols
+ # no_strip - does not strip the library at all
+ #
+ # Oracle security policy requires "all_strip". A waiver was granted on
+ # 2011.09.01 that permits using "min_strip" in the Java JDK and Java JRE.
+ #
+ # Currently, STRIP_POLICY is only used when Full Debug Symbols is enabled.
+ STRIP_POLICY ?= min_strip
+
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: STRIP_POLICY=$(STRIP_POLICY)")
+
+ ZIP_DEBUGINFO_FILES ?= 1
+
+ _JUNK_ := $(shell \
+ echo >&2 "INFO: ZIP_DEBUGINFO_FILES=$(ZIP_DEBUGINFO_FILES)")
+ endif
+endif
+
+#
+# Default optimization
+#
+
+ifndef OPTIMIZATION_LEVEL
+ ifeq ($(PRODUCT), java)
+ OPTIMIZATION_LEVEL = HIGHER
+ else
+ OPTIMIZATION_LEVEL = LOWER
+ endif
+endif
+ifndef FASTDEBUG_OPTIMIZATION_LEVEL
+ FASTDEBUG_OPTIMIZATION_LEVEL = LOWER
+endif
+
+CC_OPT/NONE =
+CC_OPT/LOWER = -O2
+CC_OPT/HIGHER = -O3
+CC_OPT/HIGHEST = -O3
+
+CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL))
+
+# For all platforms, do not omit the frame pointer register usage.
+# We need this frame pointer to make it easy to walk the stacks.
+# This should be the default on X86, but ia64 and amd64 may not have this
+# as the default.
+CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_amd64 += -m64
+CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+LDFLAGS_COMMON_i586 += -m32
+CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9
+LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9
+CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9
+LDFLAGS_COMMON_sparc += -m32 -mcpu=v9
+CFLAGS_REQUIRED_arm += -fsigned-char -D_LITTLE_ENDIAN
+CFLAGS_REQUIRED_ppc += -fsigned-char -D_BIG_ENDIAN
+ifeq ($(ZERO_BUILD), true)
+ CFLAGS_REQUIRED = $(ZERO_ARCHFLAG)
+ ifeq ($(ZERO_ENDIANNESS), little)
+ CFLAGS_REQUIRED += -D_LITTLE_ENDIAN
+ endif
+ LDFLAGS_COMMON += $(ZERO_ARCHFLAG)
+else
+ CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH))
+ LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH))
+endif
+
+# If this is a --hash-style=gnu system, use --hash-style=both
+# The gnu .hash section won't work on some Linux systems like SuSE 10.
+_HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu')
+ifneq ($(_HAS_HASH_STYLE_GNU),)
+ LDFLAGS_HASH_STYLE = -Wl,--hash-style=both
+endif
+LDFLAGS_COMMON += $(LDFLAGS_HASH_STYLE)
+
+#
+# Selection of warning messages
+#
+GCC_INHIBIT = -Wno-unused -Wno-parentheses
+GCC_STYLE =
+GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT)
+
+#
+# Treat compiler warnings as errors, if warnings not allowed
+#
+ifeq ($(COMPILER_WARNINGS_FATAL),true)
+ GCC_WARNINGS += -Werror
+endif
+
+#
+# Misc compiler options
+#
+ifneq ($(ARCH),ppc)
+ CFLAGS_COMMON = -fno-strict-aliasing
+endif
+PIC_CODE_LARGE = -fPIC
+PIC_CODE_SMALL = -fpic
+GLOBAL_KPIC = $(PIC_CODE_LARGE)
+CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS)
+ifeq ($(ARCH), amd64)
+ CFLAGS_COMMON += -pipe
+endif
+
+# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1
+DEBUG_FLAG = -g
+ifeq ($(FASTDEBUG), true)
+ ifeq ($(ARCH_DATA_MODEL), 64)
+ DEBUG_FLAG = -g1
+ endif
+endif
+
+# DEBUG_BINARIES overrides everything, use full -g debug information
+ifeq ($(DEBUG_BINARIES), true)
+ DEBUG_FLAG = -g
+ CFLAGS_REQUIRED += $(DEBUG_FLAG)
+endif
+
+# If Full Debug Symbols is enabled, then we want the same debug and
+# optimization flags as used by FASTDEBUG.
+#
+ifeq ($(ENABLE_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(LIBRARY_SUPPORTS_FULL_DEBUG_SYMBOLS),1)
+ ifeq ($(VARIANT), OPT)
+ CC_OPT = $(DEBUG_FLAG) $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+ endif
+ endif
+endif
+
+CFLAGS_OPT = $(CC_OPT)
+CFLAGS_DBG = $(DEBUG_FLAG)
+CFLAGS_COMMON += $(CFLAGS_REQUIRED)
+
+CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS)
+CXXFLAGS_OPT = $(CC_OPT)
+CXXFLAGS_DBG = $(DEBUG_FLAG)
+CXXFLAGS_COMMON += $(CFLAGS_REQUIRED)
+
+# FASTDEBUG: Optimize the code in the -g versions, gives us a faster debug java
+ifeq ($(FASTDEBUG), true)
+ CFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+ CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL))
+endif
+
+CPP_ARCH_FLAGS = -DARCH='"$(ARCH)"'
+
+# Alpha arch does not like "alpha" defined (potential general arch cleanup issue here)
+ifneq ($(ARCH),alpha)
+ CPP_ARCH_FLAGS += -D$(ARCH)
+else
+ CPP_ARCH_FLAGS += -D_$(ARCH)_
+endif
+
+CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \
+ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT
+
+ifeq ($(ARCH_DATA_MODEL), 64)
+CPPFLAGS_COMMON += -D_LP64=1
+endif
+
+CPPFLAGS_OPT = -DNDEBUG
+CPPFLAGS_DBG = -DDEBUG
+ifneq ($(PRODUCT), java)
+ CPPFLAGS_DBG += -DLOGGING
+endif
+
+# Libraries need to locate other libraries at runtime, and you can tell
+# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH)
+# buried inside the .so. The $ORIGIN says to look relative to where
+# the library itself is and it can be followed with relative paths from
+# that. By default we always look in $ORIGIN, optionally we add relative
+# paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths.
+# On BSD we add a flag -z origin, not sure if this is necessary, but
+# doesn't seem to hurt.
+# The environment variable LD_LIBRARY_PATH will over-ride these runpaths.
+# Try: 'readelf -d lib*.so' to see these settings in a library.
+#
+Z_ORIGIN_FLAG/sparc = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/i586 = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/amd64 = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/ia64 = -Xlinker -z -Xlinker origin
+Z_ORIGIN_FLAG/arm =
+Z_ORIGIN_FLAG/ppc =
+Z_ORIGIN_FLAG/zero = -Xlinker -z -Xlinker origin
+
+LDFLAG_Z_ORIGIN = $(Z_ORIGIN_FLAG/$(ARCH_FAMILY))
+
+LDFLAGS_COMMON += $(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN
+LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=$(LDFLAG_Z_ORIGIN) -Xlinker -rpath -Xlinker \$$ORIGIN/%)
+
+#
+# -L paths for finding and -ljava
+#
+LDFLAGS_OPT = -Xlinker -O1
+LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH)
+LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX)
+
+#
+# -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always
+# statically link libgcc but will print a warning with the flag. We don't
+# want the warning, so check gcc version first.
+#
+ifeq ($(CC_MAJORVER),3)
+ OTHER_LDFLAGS += -static-libgcc
+endif
+
+# Automatic precompiled header option to use (if COMPILE_APPROACH=batch)
+# (See Rules.gmk) The gcc 5 compiler might have an option for this?
+AUTOMATIC_PCH_OPTION =
+
+#
+# Post Processing of libraries/executables
+#
+ifeq ($(VARIANT), OPT)
+ ifneq ($(NO_STRIP), true)
+ ifneq ($(DEBUG_BINARIES), true)
+ # Debug 'strip -S' leaves local function Elf symbols (better stack
+ # traces)
+ POST_STRIP_PROCESS = $(STRIP) -S
+ endif
+ endif
+endif
+
+#
+# Use: ld $(LD_MAPFILE_FLAG) mapfile *.o
+#
+LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker
+
+#
+# Support for Quantify.
+#
+ifdef QUANTIFY
+QUANTIFY_CMD = quantify
+QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-use-cache-dir=yes
+LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS)
+endif
+
+# Using map files currently break compilation on FreeBSD during shared library
+# checks for some of the AWT native libraries.
+ifeq ($(OS_VENDOR), FreeBSD)
+LDNOMAP=true
+endif
+
+#
+# Path and option to link against the VM, if you have to. Note that
+# there are libraries that link against only -ljava, but they do get
+# -L to the -ljvm, this is because -ljava depends on -ljvm, whereas
+# the library itself should not.
+#
+VM_NAME = server
+JVMLIB = -Xlinker -rpath -Xlinker $(LIBDIR)/$(LIBARCH)/$(VM_NAME) -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) -ljvm
+JAVALIB = -ljava $(JVMLIB)
+
+#
+# We want to privatize JVM symbols on Solaris. This is so the user can
+# write a function called FindClass and this should not override the
+# FindClass that is inside the JVM. At this point in time we are not
+# concerned with other JNI libraries because we hope that there will
+# not be as many clashes there.
+#
+PRIVATIZE_JVM_SYMBOLS = false
+
+USE_PTHREADS = true
+override ALT_CODESET_KEY = _NL_CTYPE_CODESET_NAME
+override AWT_RUNPATH =
+override HAVE_ALTZONE = false
+override HAVE_FILIOH = false
+override HAVE_GETHRTIME = false
+override HAVE_GETHRVTIME = false
+override LEX_LIBRARY = -lfl
+ifeq ($(STATIC_CXX),true)
+override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic
+else
+override LIBCXX = -lstdc++
+endif
+override LIBPOSIX4 =
+override LIBSOCKET =
+override LIBNSL =
+override LIBSCF =
+override LIBTHREAD =
+override LIBDL =
+override MOOT_PRIORITIES = true
+override NO_INTERRUPTIBLE_IO = true
+override OPENWIN_HOME = $(X11_PATH)
+override OPENWIN_LIB = $(OPENWIN_HOME)/lib
+override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER
+override SUN_CMM_SUBDIR =
+override THREADS_FLAG = native
+override USE_GNU_M4 = true
+override USING_GNU_TAR = true
+override WRITE_LIBVERSION = false
+
+ifdef ALT_X11_PATH
+ X11_PATH = $(ALT_X11_PATH)
+else
+ ifeq ($(OS_VENDOR), NetBSD)
+ X11_PATH = /usr/X11R7
+ else
+ ifeq ($(OS_VENDOR), FreeBSD)
+ X11_PATH = /usr/local
+ else
+ X11_PATH = /usr/X11R6
+ endif
+ endif
+endif
+
+ifdef ALT_PACKAGE_PATH
+ PACKAGE_PATH = $(ALT_PACKAGE_PATH)
+else
+ ifeq ($(OS_VENDOR), NetBSD)
+ PACKAGE_PATH = /usr/pkg
+ else
+ PACKAGE_PATH = /usr/local
+ endif
+endif
+
+# ALSA
+ifdef ALT_ALSA_LIB_PATH
+ ALSA_LIB_PATH = $(ALT_ALSA_LIB_PATH)
+else
+ ALSA_LIB_PATH = $(PACKAGE_PATH)/lib
+endif
+
+ifdef ALT_ALSA_HEADERS_PATH
+ ALSA_HEADERS_PATH = $(ALT_ALSA_HEADERS_PATH)
+else
+ ALSA_HEADERS_PATH = $(PACKAGE_PATH)/include
+endif
+
+# USE_EXECNAME forces the launcher to look up argv[0] on $PATH, and put the
+# resulting resolved absolute name of the executable in the environment
+# variable EXECNAME. That executable name is then used that to locate the
+# installation area.
+override USE_EXECNAME = true
+
+# If your platform has DPS, it will have Type1 fonts too, in which case
+# it is best to enable DPS support until such time as 2D's rasteriser
+# can fully handle Type1 fonts in all cases. Default is "yes".
+# HAVE_DPS should only be "no" if the platform has no DPS headers or libs
+# DPS (Displayable PostScript) is available on Solaris machines
+HAVE_DPS = no
+
+ifeq ($(OS_VENDOR), FreeBSD)
+ SYSTEM_ZLIB = true
+endif
+
+ifeq ($(OS_VENDOR), OpenBSD)
+ SYSTEM_ZLIB = true
+endif
+
+#
+# Japanese manpages
+#
+JA_SOURCE_ENCODING = eucJP
+JA_TARGET_ENCODINGS = UTF-8
+
+# Settings for the JDI - Serviceability Agent binding.
+HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH)
+SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX)
+SA_DEBUGINFO_NAME = $(LIB_PREFIX)saproc.debuginfo
+SA_DIZ_NAME = $(LIB_PREFIX)saproc.diz
+
+# The JDI - Serviceability Agent binding is not currently supported
+# on ia64.
+ifeq ($(ARCH), ia64)
+ INCLUDE_SA = false
+else
+ INCLUDE_SA = true
+endif
+
+ifdef CROSS_COMPILE_ARCH
+ # X11 headers are not under /usr/include
+ OTHER_CFLAGS += -I$(OPENWIN_HOME)/include
+ OTHER_CXXFLAGS += -I$(OPENWIN_HOME)/include
+ OTHER_CPPFLAGS += -I$(OPENWIN_HOME)/include
+endif
--- jdk/make/common/Defs-linux.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Defs-linux.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -429,6 +429,7 @@
override LIBDL = -ldl
override MOOT_PRIORITIES = true
override NO_INTERRUPTIBLE_IO = true
+override OPENWIN_HOME = $(X11_PATH)
ifeq ($(ARCH), amd64)
override OPENWIN_LIB = $(OPENWIN_HOME)/lib64
else
--- jdk/make/common/Defs-solaris.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Defs-solaris.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -753,6 +753,9 @@
# Network Services library
LIBNSL = -lnsl
+# Dynamic Loading library
+LIBDL = -ldl
+
# service configuration facility library
LIBSCF = -lscf
--- jdk/make/common/Defs.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Defs.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -179,15 +179,15 @@
ifdef ALT_FREETYPE_LIB_PATH
FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH)
- ifeq ($(PLATFORM), macosx)
+ ifneq (,$(findstring $(PLATFORM), bsd macosx))
USING_SYSTEM_FT_LIB=true
endif
else
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib
else
- ifeq ($(PLATFORM), macosx)
- FREETYPE_LIB_PATH = /usr/X11R6/lib
+ ifneq (,$(findstring $(PLATFORM), bsd macosx))
+ FREETYPE_LIB_PATH = $(X11_PATH)/lib
else
FREETYPE_LIB_PATH = /usr/lib
endif
@@ -201,8 +201,8 @@
ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true)
FREETYPE_HEADERS_PATH = $(DEVTOOLS_FT_DIR)/include
else
- ifeq ($(PLATFORM), macosx)
- FREETYPE_HEADERS_PATH = /usr/X11R6/include
+ ifneq (,$(findstring $(PLATFORM), bsd macosx))
+ FREETYPE_HEADERS_PATH = $(X11_PATH)/include
else
FREETYPE_HEADERS_PATH = /usr/include
endif
@@ -258,6 +258,10 @@
LDLIBS_COMMON = -pthread
endif
+ ifeq ($(PLATFORM), bsd)
+ LDLIBS_COMMON = -pthread
+ endif
+
endif # PROGRAM
LDLIBS_COMMON += $(EXTRA_LIBS)
@@ -399,7 +403,7 @@
# We define an intermediate variable for Java files because
# we use its value later to help define $SOURCEPATH
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
VPATH0.java = $(subst $(ONESPACE),:,$(GENSRCDIR) $(call JavaSrcDirList,,classes))
else
VPATH0.java = $(GENSRCDIR)$(CLASSPATH_SEPARATOR)$(PLATFORM_SRC)/classes$(CLASSPATH_SEPARATOR)$(SHARE_SRC)/classes
--- jdk/make/common/Library.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Library.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -299,8 +299,12 @@
ifeq ($(PLATFORM), solaris)
$(STRIP) -x $@
else
- # assume Linux
- $(STRIP) -g $@
+ ifeq ($(PLATFORM), linux)
+ $(STRIP) -g $@
+ else
+ # assume BSD
+ $(STRIP) -S $@
+ endif
endif
# implied else here is no stripping at all
endif
--- jdk/make/common/Mapfile-vers.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Mapfile-vers.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -76,7 +76,7 @@
endif # PLATFORM
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
ifeq ($(VARIANT), OPT)
# OPT build MUST have a mapfile?
--- jdk/make/common/Program.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Program.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -95,6 +95,17 @@
endif # SYSTEM_ZLIB
endif # PLATFORM
+ifeq ($(PLATFORM), bsd)
+ LDFLAGS += -Wl,--whole-archive
+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+ LDFLAGS += -Wl,--no-whole-archive
+# Work-around an dlsym(RTLD_DEFAULT) bug in at least FreeBSD & OpenBSD
+ LDFLAGS += -Wl,--export-dynamic
+ ifeq ($(SYSTEM_ZLIB),true)
+ OTHER_LDLIBS += -lz
+ endif
+endif #PLATFORM
+
ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems
LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli
OTHER_LDLIBS += -ljli
@@ -227,6 +238,11 @@
INFO_PLIST_FILE=
endif # MACOSX
+ ifeq ($(PLATFORM), bsd)
+ THREADLIBS = -pthread
+ OTHER_CPPFLAGS += -DPACKAGE_PATH='"$(PACKAGE_PATH)"'
+ endif
+
#
# This rule only applies on unix. It supports quantify and its ilk.
#
@@ -281,8 +297,12 @@
ifeq ($(PLATFORM), solaris)
$(STRIP) -x $@
else
- # assume Linux
- $(STRIP) -g $@
+ ifeq ($(PLATFORM), linux)
+ $(STRIP) -g $@
+ else
+ # assume BSD
+ $(STRIP) -S $@
+ endif
endif
# implied else here is no stripping at all
endif
@@ -350,7 +370,9 @@
ifneq ($(PLATFORM), windows)
- HAVE_GETHRTIME=true
+ ifneq ($(PLATFORM), bsd)
+ HAVE_GETHRTIME=true
+ endif
endif #PLATFORM
ifeq ($(HAVE_GETHRTIME),true)
@@ -360,12 +382,10 @@
OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin
ifeq ($(PLATFORM), macosx)
OTHER_INCLUDES += -I$(LAUNCHER_SOLARIS_PLATFORM_SRC)/bin
- ifneq ($(SYSTEM_ZLIB), true)
- OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
- endif # SYSTEM_ZLIB
-else # PLATFORM !MACOSX
+endif # PLATFORM
+ifneq ($(SYSTEM_ZLIB), true)
OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3
-endif
+endif # SYSTEM_ZLIB
OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"'
VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"'
--- jdk/make/common/Release.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Release.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -178,6 +178,12 @@
JA_DIRNAME=ja_JP.UTF-8
endif # linux
+ifeq ($(PLATFORM), bsd)
+ MANBASEDIRS=$(JDK_TOPDIR)/src/linux/doc $(IMPORTDOCDIR)
+ MAN1SUBDIR=man
+ JA_DIRNAME=ja_JP.UTF-8
+endif # linux
+
define copy-man-pages
$(MKDIR) -p $1/man/man1
for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \
@@ -983,6 +989,12 @@
FILES_launcher = $(wildcard $(SHARE_SRC)/bin/*) \
$(wildcard $(PLATFORM_SRC)/bin/java_md*)
+ifeq ($(OS_VENDOR), OpenBSD)
+ FILES_FROM_ARG=-I
+else
+ FILES_FROM_ARG=-T
+endif
+
# Standard jdk image
initial-image-jdk:: initial-image-jdk-setup \
initial-image-jdk-db \
@@ -1070,7 +1082,7 @@
@# 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.
- ifneq (,$(findstring $(PLATFORM), linux macosx))
+ ifneq (,$(findstring $(PLATFORM), linux macosx bsd))
for d in $(SOURCE_DIRS); do \
$(RM) $(ABS_TEMPDIR)/src-files.list; \
($(CD) $$d && \
@@ -1083,7 +1095,7 @@
done ; \
) ; \
if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \
- ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \
+ ($(CD) $$d && $(TAR) cf - $(FILES_FROM_ARG) $(ABS_TEMPDIR)/src-files.list ) \
| ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \
fi; \
done
--- jdk/make/common/Rules.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/Rules.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -51,7 +51,7 @@
#
# All source tree areas for java/properties files (a few may be closed)
#
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
ifdef OPENJDK
ALL_CLASSES_SRC = $(call JavaSrcDirList,,classes)
else
@@ -212,7 +212,7 @@
$(CLASSDESTDIR)/%.class: $(GENSRCDIR)/%.java
@$(add-java-file)
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
# TODO(cpc): need to document why this is necessary...
$(CLASSDESTDIR)/%.class: $(JDK_TOPDIR)/src/macosx/classes/%.java
@$(add-java-file)
--- jdk/make/common/shared/Compiler-gcc.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/shared/Compiler-gcc.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -72,6 +72,21 @@
endif
+ifeq ($(PLATFORM), bsd)
+
+ # Settings specific to BSD
+ CC = $(COMPILER_PATH)gcc
+ CPP = $(COMPILER_PATH)gcc -E
+ CXX = $(COMPILER_PATH)g++
+
+ # Option used to create a shared library
+ ifeq ($(OS_VENDOR), Apple)
+ SHARED_LIBRARY_FLAG = -dynamiclib
+ else
+ SHARED_LIBRARY_FLAG = -shared
+ endif
+endif
+
ifeq ($(PLATFORM), solaris)
# Settings specific to Solaris
--- jdk/make/common/shared/Defs-bsd.gmk 1969-12-31 16:00:00.000000000 -0800
+++ jdk/make/common/shared/Defs-bsd.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -0,0 +1,225 @@
+#
+# Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+#
+# This code is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License version 2 only, as
+# published by the Free Software Foundation. Oracle designates this
+# particular file as subject to the "Classpath" exception as provided
+# by Oracle in the LICENSE file that accompanied this code.
+#
+# This code is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+# version 2 for more details (a copy is included in the LICENSE file that
+# accompanied this code).
+#
+# You should have received a copy of the GNU General Public License version
+# 2 along with this work; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+#
+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+# or visit www.oracle.com if you need additional information or have any
+# questions.
+#
+
+#
+# Definitions for BSD.
+#
+
+# Default for COMPILER_WARNINGS_FATAL on BSD (C & C++ compiler warnings)
+ifndef COMPILER_WARNINGS_FATAL
+ COMPILER_WARNINGS_FATAL=false
+endif
+
+# BSD should use parallel compilation for best build times
+ifndef COMPILE_APPROACH
+ COMPILE_APPROACH = parallel
+endif
+
+# Indication that we are doing an incremental build.
+# This may trigger the creation of make depend files.
+ifndef INCREMENTAL_BUILD
+ INCREMENTAL_BUILD = false
+endif
+
+# FullPath just makes sure it never ends with a / and no duplicates
+define FullPath
+$(shell cd $1 2> $(DEV_NULL) && pwd)
+endef
+
+# OptFullPath: Absolute path name of a dir that might not initially exist.
+define OptFullPath
+$(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && pwd); else echo "$1"; fi)
+endef
+
+# Location on system where jdk installs might be
+USRJDKINSTANCES_PATH = $(PACKAGE_PATH)
+
+# UNIXCOMMAND_PATH: path to where the most common Unix commands are.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_UNIXCOMMAND_PATH)" "undefined"
+ UNIXCOMMAND_PATH :=$(call PrefixPath,$(ALT_UNIXCOMMAND_PATH))
+else
+ UNIXCOMMAND_PATH = /bin/
+endif
+
+# USRBIN_PATH: path to where the most common Unix commands are.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_USRBIN_PATH)" "undefined"
+ USRBIN_PATH :=$(call PrefixPath,$(ALT_USRBIN_PATH))
+else
+ USRBIN_PATH = /usr/bin/
+endif
+
+# UNIXCCS_PATH: path to where the Solaris ported UNIX commands can be found
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_UNIXCCS_PATH)" "undefined"
+ UNIXCCS_PATH :=$(call PrefixPath,$(ALT_UNIXCCS_PATH))
+else
+ UNIXCCS_PATH = /usr/ccs/bin/
+endif
+
+# SLASH_JAVA: location of all network accessable files
+ifdef ALT_SLASH_JAVA
+ SLASH_JAVA :=$(ALT_SLASH_JAVA)
+else
+ SLASH_JAVA := $(call DirExists,/java,/java,/NOT-SET)
+endif
+
+# JDK_DEVTOOLS_DIR: common path for all the java devtools
+ifdef ALT_JDK_DEVTOOLS_DIR
+ JDK_DEVTOOLS_DIR =$(ALT_JDK_DEVTOOLS_DIR)
+else
+ JDK_DEVTOOLS_DIR =$(SLASH_JAVA)/devtools
+endif
+
+# COMPILER_PATH: path to where the compiler and tools are installed.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_COMPILER_PATH)" "undefined"
+ COMPILER_PATH :=$(call PrefixPath,$(ALT_COMPILER_PATH))
+else
+ COMPILER_PATH =/usr/bin/
+endif
+
+# OPENWIN_HOME: path to where the X11 environment is installed.
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq ($(ALT_OPENWIN_HOME),)
+ OPENWIN_HOME :=$(call PrefixPath,$(ALT_OPENWIN_HOME))
+else
+ OPENWIN_HOME =$(X11_PATH)
+endif
+
+# DEVTOOLS_PATH: for other tools required for building (such as zip, etc.)
+# NOTE: Must end with / so that it could be empty, allowing PATH usage.
+ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined"
+ DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH))
+else
+ DEVTOOLS_PATH =$(PACKAGE_PATH)/bin/
+endif
+
+# _BOOTDIR1: First choice for a Bootstrap JDK, previous released JDK.
+# _BOOTDIR2: Second choice
+ifndef ALT_BOOTDIR
+ _BOOTDIR1 =$(SLASH_JAVA)/re/jdk/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
+ _BOOTDIR2 =$(USRJDKINSTANCES_PATH)/jdk$(PREVIOUS_JDK_VERSION)
+endif
+
+# Always build headless on BSD
+BUILD_HEADLESS = true
+LIBM=-lm
+
+_CUPS_HEADERS_PATH=$(PACKAGE_PATH)/include
+
+# Import JDK images allow for partial builds, components not built are
+# imported (or copied from) these import areas when needed.
+
+# BUILD_JDK_IMPORT_PATH: location of JDK install trees to import for
+# multiple platforms, e.g. windows-i586, solaris-sparc, linux-586, etc.
+ifdef ALT_BUILD_JDK_IMPORT_PATH
+ BUILD_JDK_IMPORT_PATH :=$(call FullPath,$(ALT_BUILD_JDK_IMPORT_PATH))
+else
+ BUILD_JDK_IMPORT_PATH = $(PROMOTED_BUILD_BINARIES)
+endif
+BUILD_JDK_IMPORT_PATH:=$(call AltCheckValue,BUILD_JDK_IMPORT_PATH)
+
+# JDK_IMPORT_PATH: location of JDK install tree (this version) to import
+ifdef ALT_JDK_IMPORT_PATH
+ JDK_IMPORT_PATH :=$(call FullPath,$(ALT_JDK_IMPORT_PATH))
+else
+ JDK_IMPORT_PATH = $(BUILD_JDK_IMPORT_PATH)/$(PLATFORM)-$(ARCH)$(_JDK_IMPORT_VARIANT)
+endif
+JDK_IMPORT_PATH:=$(call AltCheckValue,JDK_IMPORT_PATH)
+
+# HOTSPOT_IMPORT_PATH: location of hotspot pre-built files
+ifdef ALT_HOTSPOT_IMPORT_PATH
+ HOTSPOT_IMPORT_PATH :=$(call FullPath,$(ALT_HOTSPOT_IMPORT_PATH))
+else
+ HOTSPOT_IMPORT_PATH =$(JDK_IMPORT_PATH)
+endif
+HOTSPOT_IMPORT_PATH:=$(call AltCheckValue,HOTSPOT_IMPORT_PATH)
+
+# HOTSPOT_CLIENT_PATH: location of client jvm library file.
+ifeq ($(ARCH_DATA_MODEL), 32)
+ ifdef ALT_HOTSPOT_CLIENT_PATH
+ HOTSPOT_CLIENT_PATH :=$(call FullPath,$(ALT_HOTSPOT_CLIENT_PATH))
+ else
+ HOTSPOT_CLIENT_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/client
+ endif
+ HOTSPOT_CLIENT_PATH:=$(call AltCheckValue,HOTSPOT_CLIENT_PATH)
+endif
+
+# HOTSPOT_SERVER_PATH: location of server jvm library file.
+ifdef ALT_HOTSPOT_SERVER_PATH
+ HOTSPOT_SERVER_PATH :=$(call FullPath,$(ALT_HOTSPOT_SERVER_PATH))
+else
+ HOTSPOT_SERVER_PATH =$(HOTSPOT_IMPORT_PATH)/$(ARCH_VM_SUBDIR)/server
+endif
+HOTSPOT_SERVER_PATH:=$(call AltCheckValue,HOTSPOT_SERVER_PATH)
+
+# Special define for checking the binaries
+
+# Debug builds should downgrade warnings to just info
+MAPFILE_WARNING-DBG=INFO
+MAPFILE_WARNING-OPT=WARNING
+MAPFILE_WARNING-=WARNING
+MAPFILE_WARNING=$(MAPFILE_WARNING-$(VARIANT))
+
+# Macro to check it's input file for banned dependencies and verify the
+# binary built properly. Relies on process exit code.
+ifndef CROSS_COMPILE_ARCH
+ifeq ($(OS_VENDOR), OpenBSD)
+define binary_file_verification # binary_file
+( \
+ $(ECHO) "Checking for mapfile use in: $1" && \
+ if [ "`$(OBJDUMP) -T $1 | $(EGREP) '[0-9a-f]* g *DF \.text.*SUNWprivate'`" = "" ] ; then \
+ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
+ fi && \
+ $(ECHO) "Library loads for: $1" && \
+ $(LDD) $1 && \
+ $(ECHO) "RUNPATH for: $1" && \
+ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+) || true
+endef
+else
+define binary_file_verification # binary_file
+( \
+ $(ECHO) "Checking for mapfile use in: $1" && \
+ if [ "`$(NM) -D -g --defined-only $1 | $(EGREP) 'SUNWprivate'`" = "" ] ; then \
+ $(ECHO) "$(MAPFILE_WARNING): File was not built with a mapfile: $1"; \
+ fi && \
+ $(ECHO) "Library loads for: $1" && \
+ $(LDD) $1 && \
+ $(ECHO) "RUNPATH for: $1" && \
+ ( $(READELF) -d $1 | $(EGREP) 'NEEDED|RUNPATH|RPATH' ) \
+)
+endef
+endif
+else
+define binary_file_verification
+( \
+ $(ECHO) "Skipping binary file verification for cross-compile build" \
+)
+endef
+endif
+
--- jdk/make/common/shared/Defs-utils.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/shared/Defs-utils.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -74,6 +74,13 @@
UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
endif
+ifeq ($(PLATFORM),bsd)
+ UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH)
+ UTILS_USR_BIN_PATH=$(USRBIN_PATH)
+ UTILS_CCS_BIN_PATH=$(USRBIN_PATH)
+ UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH)
+endif
+
# Utilities
ifdef CROSS_COMPILE_ARCH
AR = $(COMPILER_PATH)ar
@@ -251,3 +258,35 @@
# Builtin shell command, no -e option needed
ECHO = echo
endif
+
+# BSD specific
+ifeq ($(PLATFORM),bsd)
+ BASENAME = $(UTILS_USR_BIN_PATH)basename
+ EGREP = $(UTILS_USR_BIN_PATH)egrep
+ EXPR = $(UTILS_COMMAND_PATH)expr
+ FMT = $(UTILS_USR_BIN_PATH)fmt
+ GREP = $(UTILS_USR_BIN_PATH)grep
+ GUNZIP = $(UTILS_USR_BIN_PATH)gunzip
+ ID = $(UTILS_USR_BIN_PATH)id
+ MSGFMT = $(UTILS_DEVTOOL_PATH)msgfmt
+ SED = $(UTILS_USR_BIN_PATH)sed
+ SORT = $(UTILS_USR_BIN_PATH)sort
+ TEST = $(UTILS_COMMAND_PATH)test
+ TOUCH = $(UTILS_USR_BIN_PATH)touch
+ TRUE = $(UTILS_USR_BIN_PATH)true
+ UNAME = $(UTILS_USR_BIN_PATH)uname
+ UNZIP = $(UTILS_DEVTOOL_PATH)unzip
+ # BSD OS_VENDOR specific
+ ifeq ($(OS_VENDOR), OpenBSD)
+ NAWK = $(UTILS_USR_BIN_PATH)awk
+ OBJDUMP = $(UTILS_USR_BIN_PATH)objdump
+ else
+ CPIO = $(UTILS_USR_BIN_PATH)cpio
+ TAR = $(UTILS_USR_BIN_PATH)tar
+ endif
+ ifeq ($(OS_VENDOR), NetBSD)
+ NAWK = $(UTILS_USR_BIN_PATH)awk
+ ZIPEXE = $(UTILS_DEVTOOL_PATH)zip
+ UNZIP = $(UTILS_DEVTOOL_PATH)unzip
+ endif
+endif
--- jdk/make/common/shared/Defs-versions.gmk 2012-08-10 10:21:33.000000000 -0700
+++ jdk/make/common/shared/Defs-versions.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -44,6 +44,11 @@
override CC_VERSION = gcc
endif
+# BSD uses GNU compilers by default
+ifeq ($(PLATFORM), bsd)
+ override CC_VERSION = gcc
+endif
+
# Mac OS X uses LLVM by default
ifeq ($(PLATFORM), macosx)
override CC_VERSION = llvm
@@ -169,6 +174,13 @@
endif
endif
+# BSD specific
+ifeq ($(PLATFORM), macosx)
+ REQUIRED_COMPILER_NAME = GCC4
+ REQUIRED_COMPILER_VERSION = GCC4
+ REQUIRED_CC_VER = 4.2.1
+endif
+
# Mac specific
ifeq ($(PLATFORM), macosx)
REQUIRED_OS_NAME = Darwin
--- jdk/make/common/shared/Defs.gmk 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/common/shared/Defs.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -181,7 +181,7 @@
# platform and shared sources/headers. This is mainly useful for the
# Mac OS X build, which pulls its platform sources from the solaris and/or
# macosx trees, depending on the component.
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
define JavaSrcDirList
$(JAVA_SRCDIR_LIST:%=$1$(JDK_TOPDIR)/%/$2)
endef
--- jdk/make/common/shared/Platform.gmk 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/common/shared/Platform.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -298,6 +298,85 @@
# How much RAM does this machine have:
endif
+ifeq ($(SYSTEM_UNAME), FreeBSD)
+ PLATFORM = bsd
+ OS_NAME = freebsd
+ OS_VENDOR = FreeBSD
+ REQUIRED_OS_VERSION = 6.0
+endif
+
+ifeq ($(SYSTEM_UNAME), NetBSD)
+ PLATFORM = bsd
+ OS_NAME = netbsd
+ OS_VENDOR = NetBSD
+ REQUIRED_OS_VERSION = 3.0
+endif
+
+ifeq ($(SYSTEM_UNAME), OpenBSD)
+ PLATFORM = bsd
+ OS_NAME = openbsd
+ OS_VENDOR = OpenBSD
+ REQUIRED_OS_VERSION = 4.9
+endif
+
+# Platform settings specific to BSD
+ifeq ($(PLATFORM), bsd)
+ OS_VERSION := $(shell uname -r)
+ # Arch and OS name/version
+ mach := $(shell uname -m)
+ archExpr = case "$(mach)" in \
+ i[3-9]86) \
+ echo i586 \
+ ;; \
+ sparc64) \
+ echo sparcv9 \
+ ;; \
+ sparc*) \
+ echo sparc \
+ ;; \
+ x86_64) \
+ echo amd64 \
+ ;; \
+ "Power Macintosh") \
+ echo ppc \
+ ;; \
+ *) \
+ echo $(mach) \
+ ;; \
+ esac
+ ARCH := $(shell $(archExpr) )
+ ARCH_FAMILY := $(ARCH)
+
+ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64
+ ifneq (,$(findstring $(ARCH), i586 sparc ppc))
+ ARCH_DATA_MODEL=32
+ else
+ ARCH_DATA_MODEL=64
+ endif
+
+ # Need to maintain the jre/lib/i386 location for 32-bit Intel
+ ifeq ($(ARCH), i586)
+ LIBARCH = i386
+ else
+ LIBARCH = $(ARCH)
+ endif
+
+ # Value of Java os.arch property
+ ARCHPROP = $(LIBARCH)
+
+ # Suffix for file bundles used in previous release
+ BUNDLE_FILE_SUFFIX=.tar.gz
+ # Minimum disk space needed as determined by running 'du -sk' on
+ # a fully built workspace.
+ REQUIRED_FREE_SPACE=1500000
+ # How much RAM does this machine have:
+ ifeq ($(OS_VENDOR), OpenBSD)
+ MB_OF_MEMORY=$(shell sysctl -n hw.physmem | awk '{print int($$NF / 1048576); }' )
+ else
+ MB_OF_MEMORY=$(shell (sysctl -n hw.physmem64 2> /dev/null || sysctl -n hw.physmem) | awk '{print int($$NF / 1048576); }' )
+ endif
+endif
+
# Windows with and without CYGWIN will be slightly different
ifeq ($(SYSTEM_UNAME), Windows_NT)
PLATFORM = windows
--- jdk/make/java/Makefile 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/java/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -53,7 +53,7 @@
endif
endif # PLATFORM
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
SUBDIRS += jexec
endif # PLATFORM
--- jdk/make/java/instrument/Makefile 2012-08-10 10:21:34.000000000 -0700
+++ jdk/make/java/instrument/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -104,12 +104,24 @@
# equivalent of strcasecmp is stricmp on Windows
CPPFLAGS_COMMON += -Dstrcasecmp=stricmp
else
-ifneq (,$(findstring $(PLATFORM), macosx))
- ifneq ($(ARCH), universal)
- LDFLAGS += -Wl,-all_load
+ifneq (,$(findstring $(PLATFORM), macosx bsd))
+ ifeq ($(OS_VENDOR), Apple)
+ ifneq ($(ARCH), universal)
+ LDFLAGS += -Wl,-all_load
+ endif
+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+ OTHER_LDLIBS += -liconv
+ else
+ LDFLAGS += -Wl,--whole-archive
+ LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
+ LDFLAGS += -Wl,--no-whole-archive
+ ifneq ($(OS_NAME), netbsd)
+# Use CPPFLAGS instead of OTHER_INCLUDES to force this last
+ CPPFLAGS += -I$(PACKAGE_PATH)/include
+ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
+ endif
endif
- LDFLAGS += $(OUTPUTDIR)/tmp/java/jli/$(OBJDIRNAME)/static/libjli.a
- OTHER_LDLIBS += -liconv
+
ifeq ($(SYSTEM_ZLIB), true)
OTHER_LDLIBS += -lz
endif
--- jdk/make/java/java/Makefile 2012-08-10 10:21:35.000000000 -0700
+++ jdk/make/java/java/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -175,9 +175,11 @@
#
ifneq ($(PLATFORM), windows)
ifneq ($(PLATFORM), macosx)
+ifneq ($(PLATFORM), bsd)
HAVE_ALTZONE=true
endif
endif
+endif
ifeq ($(HAVE_ALTZONE),true)
OTHER_CPPFLAGS += -DHAVE_ALTZONE
--- jdk/make/java/java/genlocales.gmk 2012-08-10 10:21:35.000000000 -0700
+++ jdk/make/java/java/genlocales.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -93,17 +93,43 @@
else
+ifeq ($(PLATFORM), bsd)
+
$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
@$(RM) $@.tmp.euro $@.tmp.noneuro;
@$(prep-target)
- @$(ECHO) $(subst .properties,'\n',$(Euro_Resources_properties)) > $@.tmp.euro;
- @$(ECHO) $(subst .java,'\n',$(Euro_Resources_java)) >> $@.tmp.euro;
- @$(ECHO) $(subst .properties,'\n',$(NonEuro_Resources_properties)) > $@.tmp.noneuro;
- @$(ECHO) $(subst .java,'\n',$(NonEuro_Resources_java)) >> $@.tmp.noneuro;
+ @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.euro;
+ @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.euro;
+ @$(ECHO) $(NonEuro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.noneuro;
+ @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.noneuro;
NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
$(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
$@.tmp.noneuro $< $@
@$(RM) $@.tmp.euro $@.tmp.noneuro;
+
+else
+
+$(LocaleDataMetaInfo_Dest):$(LocaleDataMetaInfo_Src) $(LOCALEGEN_SH)
+ @$(RM) $@.tmp.euro $@.tmp.noneuro;
+ @$(prep-target)
+ @$(ECHO) $(Euro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.euro;
+ @$(ECHO) $(Euro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.euro;
+ @$(ECHO) $(NonEuro_Resources_properties) | $(SED) -e s@.properties@'\
+'@g > $@.tmp.noneuro;
+ @$(ECHO) $(NonEuro_Resources_java) | $(SED) -e s@.java@'\
+'@g >> $@.tmp.noneuro;
+ NAWK="$(NAWK)" SED="$(SED)" SORT="$(SORT)" \
+ $(SH) $(LOCALEGEN_SH) $(RESOURCE_NAMES) $@.tmp.euro \
+ $@.tmp.noneuro $< $@
+ @$(RM) $@.tmp.euro $@.tmp.noneuro;
+endif
+
endif
genlocales : $(LocaleDataMetaInfo_Dest)
--- jdk/make/java/jli/Makefile 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/jli/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -116,9 +116,9 @@
LIBARCH_DEFINES += -DLIBARCH64NAME='"$(LIBARCH64)"'
endif # PLATFORM
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), macosx bsd))
OTHER_CPPFLAGS += $(LIBARCH_DEFINES) -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
-else # ! MACOSX
+else # ! MACOSX || BSD
OTHER_CPPFLAGS += $(LIBARCH_DEFINES)
endif #PLATFORM
@@ -131,7 +131,7 @@
# Note: it is important to keep this order, meaning -lc as the
# last library, otherwise it could cause compatibility issues
# by pulling in SUNW_private symbols from libc
- LDLIBS = -ldl -lc
+ LDLIBS = $(LIBDL) -lc
ifeq ($(USE_PTHREADS),true)
LDLIBS += -lpthread
endif # USE_PTHREADS
--- jdk/make/java/net/FILES_c.gmk 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/net/FILES_c.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -47,6 +47,10 @@
FILES_c += bsd_close.c
endif
+ifeq ($(OS_VENDOR), FreeBSD)
+ FILES_c += bsd_close.c
+endif
+
ifeq ($(PLATFORM), windows)
FILES_c += TwoStacksPlainSocketImpl.c
FILES_c += DualStackPlainSocketImpl.c
--- jdk/make/java/net/Makefile 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/net/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -91,7 +91,7 @@
include $(BUILDDIR)/common/Library.gmk
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), macosx bsd))
ifdef DONT_ENABLE_IPV6
OTHER_CFLAGS += -DDONT_ENABLE_IPV6
endif
--- jdk/make/java/nio/Makefile 2012-08-10 10:21:36.000000000 -0700
+++ jdk/make/java/nio/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -260,7 +260,7 @@
sun/nio/fs/UnixConstants.java
endif # PLATFORM = linux
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_java += \
sun/nio/ch/AbstractPollSelectorImpl.java \
sun/nio/ch/BsdAsynchronousChannelProvider.java \
@@ -331,7 +331,7 @@
sun/nio/fs/UnixConstants.java
endif # PLATFORM = bsd, macosx
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_java += \
sun/nio/ch/KQueueSelectorProvider.java \
sun/nio/ch/KQueueSelectorImpl.java \
@@ -339,6 +339,9 @@
FILES_c += \
KQueueArrayWrapper.c
+endif # PLATFORM = bsd, macosx
+
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
vpath %.c $(call NativeSrcDirList,,native/sun/nio/fs)
vpath %.c $(call NativeSrcDirList,,native/sun/nio/ch)
@@ -381,7 +384,7 @@
ifeq ($(PLATFORM), linux)
OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread $(LIBDL)
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
OTHER_LDLIBS += -L$(LIBDIR) -ljava -lnet -pthread
endif
ifeq ($(PLATFORM), solaris)
@@ -406,7 +409,7 @@
ifeq ($(PLATFORM), linux)
FILES_m = mapfile-linux
endif
-ifeq ($(PLATFORM), macosx)
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
FILES_m = mapfile-bsd
endif
include $(BUILDDIR)/common/Mapfile-vers.gmk
--- jdk/make/java/nio/mapfile-linux 2012-08-10 10:21:37.000000000 -0700
+++ jdk/make/java/nio/mapfile-linux 2012-08-19 12:39:46.000000000 -0700
@@ -88,7 +88,6 @@
Java_sun_nio_ch_IOUtil_drain;
Java_sun_nio_ch_IOUtil_fdVal;
Java_sun_nio_ch_IOUtil_initIDs;
- Java_sun_nio_ch_IOUtil_iovMax;
Java_sun_nio_ch_IOUtil_makePipe;
Java_sun_nio_ch_IOUtil_randomBytes;
Java_sun_nio_ch_IOUtil_setfdVal;
--- jdk/make/java/nio/mapfile-solaris 2012-08-10 10:21:37.000000000 -0700
+++ jdk/make/java/nio/mapfile-solaris 2012-08-19 12:39:46.000000000 -0700
@@ -76,7 +76,6 @@
Java_sun_nio_ch_IOUtil_drain;
Java_sun_nio_ch_IOUtil_fdVal;
Java_sun_nio_ch_IOUtil_initIDs;
- Java_sun_nio_ch_IOUtil_iovMax;
Java_sun_nio_ch_IOUtil_makePipe;
Java_sun_nio_ch_IOUtil_randomBytes;
Java_sun_nio_ch_IOUtil_setfdVal;
--- jdk/make/java/npt/Makefile 2012-08-10 10:21:37.000000000 -0700
+++ jdk/make/java/npt/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -74,6 +74,14 @@
OTHER_LDLIBS += -liconv
endif
+# Add location of iconv headers
+ifeq ($(PLATFORM), bsd)
+ ifneq ($(OS_NAME), netbsd)
+ CPPFLAGS += -I$(PACKAGE_PATH)/include
+ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
+ endif
+endif
+
#
# Add to ambient vpath so we pick up the library files
#
--- jdk/make/java/redist/fonts/Makefile 2012-08-10 10:21:37.000000000 -0700
+++ jdk/make/java/redist/fonts/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -42,7 +42,7 @@
$(LIBDIR)/fonts/LucidaSansRegular.ttf \
$(LIBDIR)/fonts/LucidaSansDemiBold.ttf \
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
# The oblique versions of the font are derived from the base versions
# and since 2D can do this derivation on the fly at run time there is no
@@ -82,7 +82,7 @@
$(FONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.fonts.dir
$(install-file)
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
# The oblique fonts are only needed/wanted on Linux.
@@ -96,7 +96,7 @@
$(OBLFONTSDIRFILE): $(PLATFORM_SRC)/classes/sun/awt/motif/java.oblique-fonts.dir
$(install-file)
-endif # linux
+endif # linux || bsd
all build : $(INTERNAL_IMPORT_LIST)
--- jdk/make/javax/sound/Makefile 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/javax/sound/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -111,6 +111,21 @@
#MXSPP_ADD = $(PLATFORM)-$(ARCH)/
endif # PLATFORM linux
+ifeq ($(PLATFORM), bsd)
+ifeq ($(OS_VENDOR), FreeBSD)
+ # ALSA handles directaudio, ports, and MIDI
+ SUBDIRS += jsoundalsa
+ EXTRA_SOUND_JNI_LIBS += jsoundalsa
+else
+ # build with empty MIDI i/o
+ INCLUDE_MIDI = TRUE
+ # build with empty ports
+ INCLUDE_PORTS = TRUE
+ # build with empty direct audio
+ INCLUDE_DAUDIO = TRUE
+endif
+endif # PLATFORM bsd
+
ifeq ($(PLATFORM), macosx)
CPPFLAGS += -DUSE_PORTS=TRUE \
-DUSE_DAUDIO=TRUE \
--- jdk/make/javax/sound/SoundDefs.gmk 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/javax/sound/SoundDefs.gmk 2012-08-19 12:39:46.000000000 -0700
@@ -40,6 +40,10 @@
CPPFLAGS += -DX_PLATFORM=X_LINUX
endif # PLATFORM linux
+ifeq ($(PLATFORM), bsd)
+ CPPFLAGS += -DX_PLATFORM=X_BSD
+endif # PLATFORM bsd
+
ifeq ($(PLATFORM), macosx)
CPPFLAGS += -DX_PLATFORM=X_MACOSX
endif # PLATFORM macosx
--- jdk/make/javax/sound/jsoundalsa/Makefile 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/javax/sound/jsoundalsa/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -51,6 +51,7 @@
$(PORTFILES_c)
# platform dependent files
+ifeq ($(PLATFORM), linux)
FILES_c += \
PLATFORM_API_LinuxOS_ALSA_CommonUtils.c \
PLATFORM_API_LinuxOS_ALSA_PCM.c \
@@ -60,19 +61,37 @@
PLATFORM_API_LinuxOS_ALSA_MidiUtils.c \
PLATFORM_API_LinuxOS_ALSA_Ports.c
+MIDI_CPPFLAGS= \
+ -DUSE_PLATFORM_MIDI_OUT=TRUE \
+ -DUSE_PLATFORM_MIDI_IN=TRUE
+endif
+
+ifeq ($(PLATFORM), bsd)
+FILES_c += \
+ PLATFORM_API_BsdOS_ALSA_CommonUtils.c \
+ PLATFORM_API_BsdOS_ALSA_PCM.c \
+ PLATFORM_API_BsdOS_ALSA_PCMUtils.c \
+ PLATFORM_API_BsdOS_ALSA_MidiIn.c \
+ PLATFORM_API_BsdOS_ALSA_MidiOut.c \
+ PLATFORM_API_BsdOS_ALSA_MidiUtils.c \
+ PLATFORM_API_BsdOS_ALSA_Ports.c
+
+MIDI_CPPFLAGS=
+endif
+
FILES_export = \
$(DAUDIOFILES_export) \
$(MIDIFILES_export) \
$(PORTFILES_export)
-OTHER_LDLIBS += -lasound
+OTHER_LDLIBS += -L$(ALSA_LIB_PATH) -lasound
CPPFLAGS += \
-DUSE_DAUDIO=TRUE \
-DUSE_PORTS=TRUE \
- -DUSE_PLATFORM_MIDI_OUT=TRUE \
- -DUSE_PLATFORM_MIDI_IN=TRUE \
- -I$(SHARE_SRC)/native/com/sun/media/sound
+ $(MIDI_CPPFLAGS) \
+ -I$(SHARE_SRC)/native/com/sun/media/sound \
+ -I$(ALSA_HEADERS_PATH)
#
# Add to the ambient VPATH.
--- jdk/make/jpda/transport/socket/Makefile 2012-08-10 10:21:40.000000000 -0700
+++ jdk/make/jpda/transport/socket/Makefile 2012-08-19 12:39:46.000000000 -0700
@@ -38,6 +38,11 @@
include $(BUILDDIR)/common/Defs.gmk
+ifeq ($(PLATFORM), bsd))
+ LIBSOCKET =
+ OTHER_LDLIBS += -pthread
+endif
+
ifeq ($(PLATFORM), linux)
OTHER_LDLIBS += $(LIBNSL) $(LIBSOCKET) -lpthread
endif
--- jdk/make/sun/awt/Makefile 2012-08-10 10:21:49.000000000 -0700
+++ jdk/make/sun/awt/Makefile 2012-08-19 12:39:47.000000000 -0700
@@ -125,6 +125,13 @@
FILES_c += initIDs.c
+ifeq ($(PLATFORM), bsd)
+FILES_c = $(FILES_2D_c)
+FILES_c += awt_LoadLibrary.c
+OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
+OTHER_LDLIBS = $(JVMLIB) $(LIBM)
+endif
+
ifeq ($(PLATFORM), macosx)
FILES_c = $(FILES_2D_c)
FILES_c += awt_LoadLibrary.c
@@ -425,6 +432,17 @@
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS
endif # PLATFORM
+ifeq ($(PLATFORM), bsd)
+# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BSD
+
+FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/fontconfigs
+_FONTCONFIGS = \
+ fontconfig.properties
+
+FONTCONFIGS_SRC_PREFIX = $(PLATFORM).
+
+# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BSD
+endif # PLATFORM
ifeq ($(PLATFORM), macosx)
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv MAC OS X
@@ -530,6 +548,9 @@
-I$(OPENWIN_HOME)/include/X11/extensions \
-I$(PLATFORM_SRC)/native/$(PKGDIR)/font
endif
+ifeq ($(PLATFORM), bsd)
+CPPFLAGS += -I$(PLATFORM_SRC)/native/$(PKGDIR)/font
+endif
CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-I$(SHARE_SRC)/native/$(PKGDIR)/../font \
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../font \
@@ -551,7 +572,13 @@
-I$(PLATFORM_SRC)/native/$(PKGDIR) \
$(EVENT_MODEL)
-ifeq ($(PLATFORM), linux)
+# include these last so we don't pick up unintentional includes
+ifeq ($(PLATFORM), bsd)
+CPPFLAGS += -I$(OPENWIN_HOME)/include \
+ -I$(OPENWIN_HOME)/include/X11/extensions
+endif
+
+ifneq (,$(findstring $(PLATFORM), linux bsd))
LDFLAGS += -L$(OPENWIN_LIB)
endif
--- jdk/make/sun/awt/mawt.gmk 2012-08-10 10:21:49.000000000 -0700
+++ jdk/make/sun/awt/mawt.gmk 2012-08-19 12:39:47.000000000 -0700
@@ -169,7 +169,7 @@
OTHER_LDLIBS = -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 -lXi
endif
-ifneq (,$(findstring $(PLATFORM), linux macosx))
+ifneq (,$(findstring $(PLATFORM), bsd linux macosx))
OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH
# XXX what is this define below? Isn't it motif-related?
OTHER_CFLAGS += -DXMSTRINGDEFINES=1
@@ -198,6 +198,9 @@
ifndef HEADLESS
CPPFLAGS += -I$(OPENWIN_HOME)/include
LDFLAGS += -L$(OPENWIN_LIB)
+ifeq ($(OS_NAME), netbsd)
+LDFLAGS += -Wl,-R$(OPENWIN_LIB)
+endif
endif # !HEADLESS
@@ -240,6 +243,12 @@
$(wildcard /usr/include/X11/extensions))
endif
+ifeq ($(PLATFORM), bsd))
+ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
+ -I$(OPENWIN_HOME)/include \
+ -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
+
ifeq ($(PLATFORM), macosx))
CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions \
-I$(OPENWIN_HOME)/include
--- jdk/make/sun/font/Makefile 2012-08-10 10:21:50.000000000 -0700
+++ jdk/make/sun/font/Makefile 2012-08-19 12:39:47.000000000 -0700
@@ -91,7 +91,7 @@
endif # PLATFORM
# Turn off aliasing with GCC for ExtensionSubtables.cpp
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), bsd linux))
CXXFLAGS += $(CXXFLAGS_$(@F))
CXXFLAGS_ExtensionSubtables.o = -fno-strict-aliasing
endif
@@ -178,7 +178,7 @@
# Libraries to link, and other C flags.
#
-ifeq ($(PLATFORM), macosx))
+ifneq (,$(findstring $(PLATFORM), bsd macosx))
OTHER_INCLUDES += -I$(X11_PATH)/include
OTHER_LDLIBS += -lawt $(LIBM) $(LIBCXX)
ifeq ($(OS_VENDOR),Apple)
--- jdk/make/sun/jawt/Makefile 2012-08-10 10:21:52.000000000 -0700
+++ jdk/make/sun/jawt/Makefile 2012-08-19 12:39:47.000000000 -0700
@@ -94,8 +94,7 @@
#
# Other extra flags needed for compiling.
#
-CPPFLAGS += -I$(OPENWIN_HOME)/include \
- -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
+CPPFLAGS += -I$(SHARE_SRC)/native/$(PKGDIR)/debug \
-I$(SHARE_SRC)/native/$(PKGDIR)/image \
-I$(SHARE_SRC)/native/$(PKGDIR)/image/cvutils \
-I$(SHARE_SRC)/native/$(PKGDIR)/alphacomposite \
@@ -109,6 +108,7 @@
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/doe \
-I$(SHARE_SRC)/native/$(PKGDIR)/../dc/path \
-I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \
+ -I$(OPENWIN_HOME)/include \
$(EVENT_MODEL)
#
@@ -122,7 +122,7 @@
endif
endif # PLATFORM
-ifeq ($(PLATFORM), linux)
+ifneq (,$(findstring $(PLATFORM), linux bsd))
ifndef BUILD_HEADLESS_ONLY
OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt
else
--- jdk/make/sun/rmi/rmi/Makefile 2012-08-10 10:21:53.000000000 -0700
+++ jdk/make/sun/rmi/rmi/Makefile 2012-08-19 12:39:47.000000000 -0700
@@ -97,6 +97,9 @@
BUILD_TARGETS += bin
endif
endif
+ifeq ($(PLATFORM), bsd)
+ BUILD_TARGETS += bin
+endif
build: $(BUILD_TARGETS)
--- jdk/make/sun/splashscreen/Makefile 2012-08-10 10:21:55.000000000 -0700
+++ jdk/make/sun/splashscreen/Makefile 2012-08-19 12:39:47.000000000 -0700
@@ -83,15 +83,16 @@
-framework JavaNativeFoundation
else ifneq ($(PLATFORM), windows)
CFLAGS += -DWITH_X11
- ifeq ($(PLATFORM), macosx))
- OTHER_LDLIBS += -liconv
- CPPFLAGS += -I$(OPENWIN_HOME)/include \
- -I$(OPENWIN_HOME)/include/X11/extensions
- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -pthread
- else
- CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
- OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
+ ifeq ($(PLATFORM), bsd))
+ ifeq ($(OS_NAME), netbsd)
+ OTHER_LDLIBS += -Wl,-R$(OPENWIN_LIB)
+ else
+ CPPFLAGS += -I$(PACKAGE_PATH)/include
+ OTHER_LDLIBS += -L$(PACKAGE_PATH)/lib -liconv
+ endif
endif
+ CPPFLAGS += -I$(OPENWIN_HOME)/include -I$(OPENWIN_HOME)/include/X11/extensions
+ OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 -lXext $(LIBM) -lpthread
else # PLATFORM
CFLAGS += -DWITH_WIN32
OTHER_LDLIBS += kernel32.lib user32.lib gdi32.lib delayimp.lib /DELAYLOAD:user32.dll
--- jdk/make/sun/xawt/Makefile 2012-08-10 10:21:55.000000000 -0700
+++ jdk/make/sun/xawt/Makefile 2012-08-19 12:39:47.000000000 -0700
@@ -52,6 +52,9 @@
AUTO_JAVA_PRUNE = WrapperGenerator.java
LDFLAGS += -L$(OPENWIN_LIB)
+ifeq ($(OS_NAME), netbsd)
+LDFLAGS += -Wl,-R$(OPENWIN_LIB)
+endif
# For Xrender extension.
ifeq ($(PLATFORM), solaris)
@@ -63,6 +66,11 @@
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
endif
+ifeq ($(PLATFORM), bsd)
+LDFLAGS += -pthread
+dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
+endif
+
ifeq ($(PLATFORM), macosx))
LDFLAGS += -pthread
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
@@ -110,8 +118,6 @@
dummy := $(shell $(MKDIR) -p $(LIB_LOCATION))
endif
-CPPFLAGS += -I$(CUPS_HEADERS_PATH)
-
CPPFLAGS += -DXAWT -DXAWT_HACK \
-I$(TEMPDIR)/../../sun.awt/awt/CClassHeaders \
-I$(PLATFORM_SRC)/native/sun/awt \
@@ -138,6 +144,8 @@
-I$(SHARE_SRC)/native/sun/awt \
-I$(PLATFORM_SRC)/native/sun/awt
+CPPFLAGS += -I$(CUPS_HEADERS_PATH)
+
ifeq ($(PLATFORM), linux)
ifndef CROSS_COMPILE_ARCH
# Allows for builds on Debian GNU Linux, X11 is in a different place
@@ -173,6 +181,11 @@
endif
endif
+ifeq ($(PLATFORM), bsd)
+ CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(OPENWIN_HOME)/include
+ CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
+endif
+
ifeq ($(PLATFORM), macosx)
CPPFLAGS += -DX11_PATH=\"$(X11_PATH)\" -DPACKAGE_PATH=\"$(PACKAGE_PATH)\"
endif
--- jdk/make/tools/freetypecheck/Makefile 2012-08-10 10:22:31.000000000 -0700
+++ jdk/make/tools/freetypecheck/Makefile 2012-08-19 12:39:47.000000000 -0700
@@ -52,8 +52,15 @@
else
ifeq ($(PLATFORM), macosx)
FT_LD_OPTIONS += -lfreetype -lz
- else # linux
- FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
+ else
+ ifeq ($(PLATFORM), bsd)
+ ifeq ($(OS_NAME), netbsd)
+ FT_LD_OPTIONS += -Wl,-R$(FREETYPE_LIB_PATH)
+ endif
+ FT_LD_OPTIONS += -lfreetype -lz
+ else # linux
+ FT_LD_OPTIONS += -Wl,-rpath -Wl,$(FREETYPE_LIB_PATH) -lfreetype
+ endif
endif
endif
endif
--- jdk/make/tools/sharing/classlist.bsd 1969-12-31 16:00:00.000000000 -0800
+++ jdk/make/tools/sharing/classlist.bsd 2012-08-19 12:39:47.000000000 -0700
@@ -0,0 +1,2327 @@
+java/lang/Object
+java/lang/String
+java/io/Serializable
+java/lang/Comparable
+java/lang/CharSequence
+java/lang/Class
+java/lang/reflect/GenericDeclaration
+java/lang/reflect/Type
+java/lang/reflect/AnnotatedElement
+java/lang/Cloneable
+java/lang/ClassLoader
+java/lang/System
+java/lang/Throwable
+java/lang/Error
+java/lang/ThreadDeath
+java/lang/Exception
+java/lang/RuntimeException
+java/security/ProtectionDomain
+java/security/AccessControlContext
+java/lang/ClassNotFoundException
+java/lang/NoClassDefFoundError
+java/lang/LinkageError
+java/lang/ClassCastException
+java/lang/ArrayStoreException
+java/lang/VirtualMachineError
+java/lang/OutOfMemoryError
+java/lang/StackOverflowError
+java/lang/IllegalMonitorStateException
+java/lang/ref/Reference
+java/lang/ref/SoftReference
+java/lang/ref/WeakReference
+java/lang/ref/FinalReference
+java/lang/ref/PhantomReference
+java/lang/ref/Finalizer
+java/lang/Thread
+java/lang/Runnable
+java/lang/ThreadGroup
+java/lang/Thread$UncaughtExceptionHandler
+java/util/Properties
+java/util/Hashtable
+java/util/Map
+java/util/Dictionary
+java/lang/reflect/AccessibleObject
+java/lang/reflect/Field
+java/lang/reflect/Member
+java/lang/reflect/Method
+java/lang/reflect/Constructor
+sun/reflect/MagicAccessorImpl
+sun/reflect/MethodAccessorImpl
+sun/reflect/MethodAccessor
+sun/reflect/ConstructorAccessorImpl
+sun/reflect/ConstructorAccessor
+sun/reflect/DelegatingClassLoader
+sun/reflect/ConstantPool
+sun/reflect/UnsafeStaticFieldAccessorImpl
+sun/reflect/UnsafeFieldAccessorImpl
+sun/reflect/FieldAccessorImpl
+sun/reflect/FieldAccessor
+java/util/Vector
+java/util/List
+java/util/Collection
+java/lang/Iterable
+java/util/RandomAccess
+java/util/AbstractList
+java/util/AbstractCollection
+java/lang/StringBuffer
+java/lang/AbstractStringBuilder
+java/lang/Appendable
+java/lang/StackTraceElement
+java/nio/Buffer
+java/lang/Boolean
+java/lang/Character
+java/lang/Float
+java/lang/Number
+java/lang/Double
+java/lang/Byte
+java/lang/Short
+java/lang/Integer
+java/lang/Long
+java/lang/NullPointerException
+java/lang/ArithmeticException
+java/io/ObjectStreamField
+java/lang/String$CaseInsensitiveComparator
+java/util/Comparator
+java/lang/RuntimePermission
+java/security/BasicPermission
+java/security/Permission
+java/security/Guard
+sun/misc/SoftCache
+java/util/AbstractMap
+java/lang/ref/ReferenceQueue
+java/lang/ref/ReferenceQueue$Null
+java/lang/ref/ReferenceQueue$Lock
+java/util/HashMap
+java/lang/annotation/Annotation
+java/util/HashMap$Entry
+java/util/Map$Entry
+java/security/AccessController
+java/lang/reflect/ReflectPermission
+sun/reflect/ReflectionFactory$GetReflectionFactoryAction
+java/security/PrivilegedAction
+java/util/Stack
+sun/reflect/ReflectionFactory
+java/lang/ref/Reference$Lock
+java/lang/ref/Reference$ReferenceHandler
+java/lang/ref/Finalizer$FinalizerThread
+java/util/Enumeration
+java/util/Iterator
+java/util/Hashtable$Entry
+java/nio/charset/Charset
+sun/nio/cs/StandardCharsets
+sun/nio/cs/FastCharsetProvider
+java/nio/charset/spi/CharsetProvider
+sun/nio/cs/StandardCharsets$Aliases
+sun/util/PreHashedMap
+sun/nio/cs/StandardCharsets$Classes
+sun/nio/cs/StandardCharsets$Cache
+java/lang/ThreadLocal
+java/util/concurrent/atomic/AtomicInteger
+sun/misc/Unsafe
+java/lang/NoSuchMethodError
+java/lang/IncompatibleClassChangeError
+sun/reflect/Reflection
+java/util/Collections
+java/util/Collections$EmptySet
+java/util/AbstractSet
+java/util/Set
+java/util/Collections$EmptyList
+java/util/Collections$EmptyMap
+java/util/Collections$ReverseComparator
+java/util/Collections$SynchronizedMap
+java/lang/Class$3
+java/lang/reflect/Modifier
+java/lang/reflect/ReflectAccess
+sun/reflect/LangReflectAccess
+java/util/Arrays
+java/lang/Math
+sun/nio/cs/US_ASCII
+sun/nio/cs/HistoricallyNamedCharset
+sun/misc/VM
+java/lang/StringCoding
+java/lang/ThreadLocal$ThreadLocalMap
+java/lang/ThreadLocal$ThreadLocalMap$Entry
+java/lang/StringCoding$StringDecoder
+sun/nio/cs/US_ASCII$Decoder
+java/nio/charset/CharsetDecoder
+java/nio/charset/CodingErrorAction
+java/nio/ByteBuffer
+java/nio/HeapByteBuffer
+java/nio/Bits
+java/nio/ByteOrder
+java/nio/CharBuffer
+java/lang/Readable
+java/nio/HeapCharBuffer
+java/nio/charset/CoderResult
+java/nio/charset/CoderResult$1
+java/nio/charset/CoderResult$Cache
+java/nio/charset/CoderResult$2
+sun/misc/Version
+java/io/FileInputStream
+java/io/InputStream
+java/io/Closeable
+java/io/FileDescriptor
+java/io/FileOutputStream
+java/io/OutputStream
+java/io/Flushable
+java/io/BufferedInputStream
+java/io/FilterInputStream
+java/util/concurrent/atomic/AtomicReferenceFieldUpdater
+java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl
+sun/reflect/misc/ReflectUtil
+java/io/PrintStream
+java/io/FilterOutputStream
+java/io/BufferedOutputStream
+java/io/OutputStreamWriter
+java/io/Writer
+sun/nio/cs/StreamEncoder
+sun/security/action/GetPropertyAction
+sun/nio/cs/US_ASCII$Encoder
+java/nio/charset/CharsetEncoder
+sun/nio/cs/Surrogate$Parser
+sun/nio/cs/Surrogate
+java/io/BufferedWriter
+java/lang/Runtime
+java/io/File
+java/io/FileSystem
+java/io/UnixFileSystem
+java/io/ExpiringCache
+java/io/ExpiringCache$1
+java/util/LinkedHashMap
+java/util/LinkedHashMap$Entry
+java/lang/StringBuilder
+sun/misc/SharedSecrets
+java/lang/ClassLoader$3
+java/lang/StringCoding$StringEncoder
+java/io/ExpiringCache$Entry
+java/lang/ClassLoader$NativeLibrary
+java/lang/Terminator
+java/lang/Terminator$1
+sun/misc/SignalHandler
+sun/misc/Signal
+sun/misc/NativeSignalHandler
+java/io/Console
+java/io/Console$1
+sun/misc/JavaIOAccess
+java/lang/Shutdown
+java/util/ArrayList
+java/lang/Shutdown$Lock
+java/lang/ApplicationShutdownHooks
+java/util/IdentityHashMap
+sun/misc/OSEnvironment
+java/lang/System$2
+sun/misc/JavaLangAccess
+java/lang/Compiler
+java/lang/Compiler$1
+sun/misc/Launcher
+sun/misc/Launcher$Factory
+java/net/URLStreamHandlerFactory
+sun/misc/Launcher$ExtClassLoader
+java/net/URLClassLoader
+java/security/SecureClassLoader
+sun/security/util/Debug
+java/net/URLClassLoader$7
+sun/misc/JavaNetAccess
+java/util/StringTokenizer
+sun/misc/Launcher$ExtClassLoader$1
+java/security/PrivilegedExceptionAction
+sun/misc/MetaIndex
+java/io/BufferedReader
+java/io/Reader
+java/io/FileReader
+java/io/InputStreamReader
+sun/nio/cs/StreamDecoder
+java/lang/reflect/Array
+sun/net/www/ParseUtil
+java/util/BitSet
+java/io/ObjectStreamClass
+java/net/URL
+java/util/Locale
+java/util/concurrent/ConcurrentHashMap
+java/util/concurrent/ConcurrentMap
+java/util/concurrent/ConcurrentHashMap$Segment
+java/util/concurrent/locks/ReentrantLock
+java/util/concurrent/locks/Lock
+java/util/concurrent/locks/ReentrantLock$NonfairSync
+java/util/concurrent/locks/ReentrantLock$Sync
+java/util/concurrent/locks/AbstractQueuedSynchronizer
+java/util/concurrent/locks/AbstractOwnableSynchronizer
+java/util/concurrent/locks/AbstractQueuedSynchronizer$Node
+java/util/concurrent/ConcurrentHashMap$HashEntry
+java/lang/CharacterDataLatin1
+java/net/Parts
+sun/net/www/protocol/file/Handler
+java/net/URLStreamHandler
+java/lang/Class$1
+sun/reflect/ReflectionFactory$1
+sun/reflect/NativeConstructorAccessorImpl
+sun/reflect/DelegatingConstructorAccessorImpl
+java/util/HashSet
+sun/misc/URLClassPath
+sun/net/www/protocol/jar/Handler
+sun/misc/Launcher$AppClassLoader
+sun/misc/Launcher$AppClassLoader$1
+java/lang/SystemClassLoaderAction
+java/net/URLClassLoader$1
+sun/misc/URLClassPath$3
+sun/misc/URLClassPath$JarLoader
+sun/misc/URLClassPath$Loader
+java/security/PrivilegedActionException
+sun/misc/URLClassPath$FileLoader
+sun/misc/URLClassPath$FileLoader$1
+sun/misc/Resource
+sun/nio/ByteBuffered
+java/security/CodeSource
+java/security/Permissions
+java/security/PermissionCollection
+sun/net/www/protocol/file/FileURLConnection
+sun/net/www/URLConnection
+java/net/URLConnection
+java/net/UnknownContentHandler
+java/net/ContentHandler
+sun/net/www/MessageHeader
+java/io/FilePermission
+java/io/FilePermission$1
+sun/security/provider/PolicyFile
+java/security/Policy
+java/security/Policy$UnsupportedEmptyCollection
+java/io/FilePermissionCollection
+java/security/AllPermission
+java/security/UnresolvedPermission
+java/security/BasicPermissionCollection
+java/security/Principal
+java/security/cert/Certificate
+java/util/AbstractList$Itr
+java/util/IdentityHashMap$KeySet
+java/util/IdentityHashMap$KeyIterator
+java/util/IdentityHashMap$IdentityHashMapIterator
+java/io/DeleteOnExitHook
+java/util/LinkedHashSet
+java/util/HashMap$KeySet
+java/util/LinkedHashMap$KeyIterator
+java/util/LinkedHashMap$LinkedHashIterator
+java/awt/Frame
+java/awt/MenuContainer
+java/awt/Window
+javax/accessibility/Accessible
+java/awt/Container
+java/awt/Component
+java/awt/image/ImageObserver
+java/lang/InterruptedException
+java/awt/Label
+java/util/logging/Logger
+java/util/logging/Handler
+java/util/logging/Level
+java/util/logging/LogManager
+java/util/logging/LogManager$1
+java/beans/PropertyChangeSupport
+java/util/logging/LogManager$LogNode
+java/util/logging/LoggingPermission
+java/util/logging/LogManager$Cleaner
+java/util/logging/LogManager$RootLogger
+java/util/logging/LogManager$2
+java/util/Properties$LineReader
+java/util/Hashtable$Enumerator
+java/beans/PropertyChangeEvent
+java/util/EventObject
+java/awt/Component$AWTTreeLock
+sun/awt/NativeLibLoader
+sun/security/action/LoadLibraryAction
+java/awt/GraphicsEnvironment
+java/awt/GraphicsEnvironment$1
+java/lang/ProcessEnvironment
+java/lang/ProcessEnvironment$Variable
+java/lang/ProcessEnvironment$ExternalData
+java/lang/ProcessEnvironment$Value
+java/lang/ProcessEnvironment$StringEnvironment
+java/util/Collections$UnmodifiableMap
+java/awt/Toolkit
+java/awt/Toolkit$3
+sun/util/CoreResourceBundleControl
+java/util/ResourceBundle$Control
+java/util/Arrays$ArrayList
+java/util/Collections$UnmodifiableRandomAccessList
+java/util/Collections$UnmodifiableList
+java/util/Collections$UnmodifiableCollection
+java/util/ResourceBundle
+java/util/ResourceBundle$1
+java/util/ResourceBundle$RBClassLoader
+java/util/ResourceBundle$RBClassLoader$1
+java/util/ResourceBundle$CacheKey
+java/util/ResourceBundle$LoaderReference
+java/util/ResourceBundle$CacheKeyReference
+java/util/ResourceBundle$SingleFormatControl
+sun/awt/resources/awt
+java/util/ListResourceBundle
+java/awt/Toolkit$1
+java/io/FileNotFoundException
+java/io/IOException
+java/awt/event/KeyEvent
+java/awt/event/InputEvent
+java/awt/event/ComponentEvent
+java/awt/AWTEvent
+java/awt/event/NativeLibLoader
+java/util/WeakHashMap
+java/util/WeakHashMap$Entry
+java/awt/Component$DummyRequestFocusController
+sun/awt/RequestFocusController
+java/awt/LayoutManager
+java/awt/LightweightDispatcher
+java/awt/event/AWTEventListener
+java/util/EventListener
+java/awt/Dimension
+java/awt/geom/Dimension2D
+java/util/concurrent/atomic/AtomicBoolean
+java/awt/ComponentOrientation
+java/awt/Component$2
+java/lang/NoSuchMethodException
+sun/awt/AppContext
+sun/awt/AppContext$1
+sun/awt/AppContext$2
+sun/awt/MostRecentKeyValue
+java/awt/Cursor
+sun/awt/X11GraphicsEnvironment
+sun/java2d/SunGraphicsEnvironment
+sun/java2d/FontSupport
+sun/awt/DisplayChangedListener
+java/io/FilenameFilter
+sun/awt/X11GraphicsEnvironment$1
+sun/awt/SunToolkit
+sun/awt/WindowClosingSupport
+sun/awt/WindowClosingListener
+sun/awt/ComponentFactory
+sun/awt/InputMethodSupport
+java/util/concurrent/locks/AbstractQueuedSynchronizer$ConditionObject
+java/util/concurrent/locks/Condition
+sun/awt/AWTAutoShutdown
+sun/awt/SunToolkit$6
+java/awt/Dialog$ModalExclusionType
+java/lang/Enum
+java/awt/Dialog
+java/awt/Dialog$ModalityType
+java/awt/ModalEventFilter
+java/awt/EventFilter
+sun/reflect/UnsafeFieldAccessorFactory
+sun/reflect/UnsafeQualifiedStaticObjectFieldAccessorImpl
+sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl
+sun/awt/SunDisplayChanger
+sun/java2d/SunGraphicsEnvironment$1
+java/io/StreamTokenizer
+sun/font/FontManager
+sun/font/FileFont
+sun/font/PhysicalFont
+sun/font/Font2D
+sun/font/CompositeFont
+java/util/HashMap$Values
+java/util/HashMap$ValueIterator
+java/util/HashMap$HashIterator
+java/awt/Font
+java/awt/geom/AffineTransform
+sun/font/AttributeValues
+sun/font/EAttribute
+java/text/AttributedCharacterIterator$Attribute
+java/lang/Class$4
+sun/reflect/NativeMethodAccessorImpl
+sun/reflect/DelegatingMethodAccessorImpl
+java/awt/font/TextAttribute
+java/lang/Integer$IntegerCache
+sun/font/TrueTypeFont
+java/awt/font/FontRenderContext
+java/awt/RenderingHints
+sun/awt/SunHints
+sun/awt/SunHints$Key
+java/awt/RenderingHints$Key
+sun/awt/SunHints$Value
+sun/awt/SunHints$LCDContrastKey
+sun/font/Type1Font
+java/awt/geom/Point2D$Float
+java/awt/geom/Point2D
+sun/font/StrikeMetrics
+java/awt/geom/Rectangle2D$Float
+java/awt/geom/Rectangle2D
+java/awt/geom/RectangularShape
+java/awt/Shape
+java/awt/geom/GeneralPath
+java/awt/geom/Path2D$Float
+java/awt/geom/Path2D
+sun/font/CharToGlyphMapper
+sun/font/PhysicalStrike
+sun/font/FontStrike
+sun/font/GlyphList
+sun/font/StrikeCache
+sun/java2d/Disposer
+sun/java2d/Disposer$1
+sun/font/StrikeCache$1
+sun/awt/motif/MFontConfiguration
+sun/awt/FontConfiguration
+sun/awt/FontDescriptor
+java/util/Scanner
+java/util/regex/Pattern
+java/util/regex/Pattern$Node
+java/util/regex/Pattern$LastNode
+java/util/regex/Pattern$GroupHead
+java/util/regex/Pattern$CharPropertyNames
+java/util/regex/Pattern$CharPropertyNames$1
+java/util/regex/Pattern$CharPropertyNames$CharPropertyFactory
+java/util/regex/Pattern$CharPropertyNames$2
+java/util/regex/Pattern$CharPropertyNames$5
+java/util/regex/Pattern$CharPropertyNames$3
+java/util/regex/Pattern$CharPropertyNames$6
+java/util/regex/Pattern$CharPropertyNames$CloneableProperty
+java/util/regex/Pattern$CharProperty
+java/util/regex/Pattern$CharPropertyNames$4
+java/util/regex/Pattern$CharPropertyNames$7
+java/util/regex/Pattern$CharPropertyNames$8
+java/util/regex/Pattern$CharPropertyNames$9
+java/util/regex/Pattern$CharPropertyNames$10
+java/util/regex/Pattern$CharPropertyNames$11
+java/util/regex/Pattern$CharPropertyNames$12
+java/util/regex/Pattern$CharPropertyNames$13
+java/util/regex/Pattern$CharPropertyNames$14
+java/util/regex/Pattern$CharPropertyNames$15
+java/util/regex/Pattern$CharPropertyNames$16
+java/util/regex/Pattern$CharPropertyNames$17
+java/util/regex/Pattern$CharPropertyNames$18
+java/util/regex/Pattern$CharPropertyNames$19
+java/util/regex/Pattern$CharPropertyNames$20
+java/util/regex/Pattern$CharPropertyNames$21
+java/util/regex/Pattern$Curly
+java/util/regex/Pattern$Slice
+java/util/regex/Pattern$Begin
+java/util/regex/Pattern$First
+java/util/regex/Pattern$Start
+java/util/regex/Pattern$TreeInfo
+java/util/regex/Pattern$All
+java/util/regex/Pattern$BitClass
+java/util/regex/Pattern$BmpCharProperty
+java/util/regex/Pattern$6
+java/util/regex/Pattern$CharProperty$1
+sun/nio/ch/FileChannelImpl
+java/nio/channels/FileChannel
+java/nio/channels/ByteChannel
+java/nio/channels/ReadableByteChannel
+java/nio/channels/Channel
+java/nio/channels/WritableByteChannel
+java/nio/channels/GatheringByteChannel
+java/nio/channels/ScatteringByteChannel
+java/nio/channels/spi/AbstractInterruptibleChannel
+java/nio/channels/InterruptibleChannel
+sun/nio/ch/Util
+sun/nio/ch/IOUtil
+sun/nio/ch/FileDispatcher
+sun/nio/ch/NativeDispatcher
+sun/nio/ch/Reflect
+java/nio/MappedByteBuffer
+sun/nio/ch/Reflect$1
+sun/nio/ch/NativeThreadSet
+java/nio/channels/Channels
+java/util/Scanner$1
+sun/misc/LRUCache
+java/util/regex/Matcher
+java/util/regex/MatchResult
+java/text/NumberFormat
+java/text/Format
+java/text/spi/NumberFormatProvider
+java/util/spi/LocaleServiceProvider
+sun/util/LocaleServiceProviderPool
+sun/util/LocaleServiceProviderPool$1
+java/util/ServiceLoader
+java/util/ServiceLoader$LazyIterator
+java/util/ServiceLoader$1
+java/util/HashMap$EntrySet
+java/util/LinkedHashMap$EntryIterator
+sun/misc/Launcher$1
+sun/misc/URLClassPath$2
+java/lang/ClassLoader$2
+sun/misc/URLClassPath$1
+java/net/URLClassLoader$3
+sun/misc/CompoundEnumeration
+sun/misc/URLClassPath$JarLoader$1
+sun/misc/FileURLMapper
+java/net/URLClassLoader$3$1
+sun/util/resources/LocaleData
+sun/util/resources/LocaleData$1
+sun/util/resources/LocaleData$LocaleDataResourceBundleControl
+sun/util/LocaleDataMetaInfo
+sun/text/resources/FormatData
+java/util/ResourceBundle$BundleReference
+sun/text/resources/FormatData_en
+sun/text/resources/FormatData_en_US
+java/text/DecimalFormatSymbols
+java/text/spi/DecimalFormatSymbolsProvider
+java/util/Currency
+java/util/Currency$1
+java/util/spi/CurrencyNameProvider
+sun/util/resources/CurrencyNames
+sun/util/resources/LocaleNamesBundle
+sun/util/resources/OpenListResourceBundle
+sun/util/resources/CurrencyNames_en_US
+java/text/DecimalFormat
+java/text/FieldPosition
+java/text/DigitList
+java/math/RoundingMode
+java/util/regex/Pattern$GroupTail
+java/util/regex/Pattern$Ctype
+java/util/regex/Pattern$Ques
+java/util/regex/Pattern$GroupCurly
+java/util/regex/Pattern$5
+java/util/regex/Pattern$Loop
+java/util/regex/Pattern$Prolog
+java/util/regex/Pattern$BranchConn
+java/util/regex/Pattern$Branch
+java/nio/channels/spi/AbstractInterruptibleChannel$1
+sun/nio/ch/Interruptible
+sun/nio/ch/NativeThread
+sun/nio/ch/DirectBuffer
+java/nio/DirectByteBuffer
+java/nio/DirectByteBuffer$Deallocator
+sun/misc/Cleaner
+sun/nio/ch/IOStatus
+java/util/regex/ASCII
+java/io/DataInputStream
+java/io/DataInput
+java/lang/Short$ShortCache
+java/util/HashMap$KeyIterator
+sun/font/CompositeFontDescriptor
+sun/font/Font2DHandle
+sun/font/FontFamily
+java/awt/GraphicsDevice
+sun/awt/X11GraphicsDevice
+sun/awt/X11GraphicsConfig
+java/awt/GraphicsConfiguration
+java/awt/ImageCapabilities
+sun/java2d/x11/X11SurfaceData
+sun/java2d/SurfaceData
+java/awt/Transparency
+sun/java2d/DisposerTarget
+sun/java2d/InvalidPipeException
+java/lang/IllegalStateException
+sun/java2d/NullSurfaceData
+sun/java2d/loops/SurfaceType
+sun/awt/image/PixelConverter
+sun/awt/image/PixelConverter$Xrgb
+sun/awt/image/PixelConverter$Argb
+sun/awt/image/PixelConverter$ArgbPre
+sun/awt/image/PixelConverter$Xbgr
+sun/awt/image/PixelConverter$Rgba
+sun/awt/image/PixelConverter$RgbaPre
+sun/awt/image/PixelConverter$Ushort565Rgb
+sun/awt/image/PixelConverter$Ushort555Rgb
+sun/awt/image/PixelConverter$Ushort555Rgbx
+sun/awt/image/PixelConverter$Ushort4444Argb
+sun/awt/image/PixelConverter$ByteGray
+sun/awt/image/PixelConverter$UshortGray
+sun/awt/image/PixelConverter$Rgbx
+sun/awt/image/PixelConverter$Bgrx
+sun/awt/image/PixelConverter$ArgbBm
+java/awt/image/ColorModel
+java/awt/image/DirectColorModel
+java/awt/image/PackedColorModel
+java/awt/color/ColorSpace
+java/awt/color/ICC_Profile
+java/awt/color/ICC_ProfileRGB
+java/awt/color/ICC_Profile$1
+java/awt/color/ICC_ColorSpace
+sun/java2d/pipe/NullPipe
+sun/java2d/pipe/PixelDrawPipe
+sun/java2d/pipe/PixelFillPipe
+sun/java2d/pipe/ShapeDrawPipe
+sun/java2d/pipe/TextPipe
+sun/java2d/pipe/DrawImagePipe
+java/awt/image/IndexColorModel
+sun/java2d/pipe/LoopPipe
+sun/java2d/pipe/OutlineTextRenderer
+sun/java2d/pipe/SolidTextRenderer
+sun/java2d/pipe/GlyphListLoopPipe
+sun/java2d/pipe/GlyphListPipe
+sun/java2d/pipe/AATextRenderer
+sun/java2d/pipe/LCDTextRenderer
+sun/java2d/pipe/AlphaColorPipe
+sun/java2d/pipe/CompositePipe
+sun/java2d/pipe/PixelToShapeConverter
+sun/java2d/pipe/TextRenderer
+sun/java2d/pipe/SpanClipRenderer
+sun/java2d/pipe/Region
+sun/java2d/pipe/RegionIterator
+sun/java2d/pipe/AlphaPaintPipe
+sun/java2d/pipe/SpanShapeRenderer$Composite
+sun/java2d/pipe/SpanShapeRenderer
+sun/java2d/pipe/GeneralCompositePipe
+sun/java2d/pipe/DrawImage
+sun/java2d/loops/RenderCache
+sun/java2d/loops/RenderCache$Entry
+sun/java2d/loops/XORComposite
+java/awt/Composite
+sun/font/X11TextRenderer
+sun/java2d/loops/GraphicsPrimitive
+sun/java2d/x11/X11PMBlitLoops
+sun/java2d/loops/Blit
+sun/java2d/loops/GraphicsPrimitiveMgr
+sun/java2d/loops/CompositeType
+sun/java2d/SunGraphics2D
+sun/awt/ConstrainableGraphics
+java/awt/Graphics2D
+java/awt/Graphics
+java/awt/Color
+java/awt/Paint
+java/awt/AlphaComposite
+sun/java2d/loops/BlitBg
+sun/java2d/loops/ScaledBlit
+sun/java2d/loops/FillRect
+sun/java2d/loops/FillSpans
+sun/java2d/loops/DrawLine
+sun/java2d/loops/DrawRect
+sun/java2d/loops/DrawPolygons
+sun/java2d/loops/DrawPath
+sun/java2d/loops/FillPath
+sun/java2d/loops/MaskBlit
+sun/java2d/loops/MaskFill
+sun/java2d/loops/DrawGlyphList
+sun/java2d/loops/DrawGlyphListAA
+sun/java2d/loops/DrawGlyphListLCD
+sun/java2d/loops/TransformHelper
+java/awt/BasicStroke
+java/awt/Stroke
+sun/misc/PerformanceLogger
+sun/misc/PerformanceLogger$TimeData
+sun/java2d/pipe/ValidatePipe
+sun/java2d/loops/CustomComponent
+sun/java2d/loops/GraphicsPrimitiveProxy
+sun/java2d/loops/GeneralRenderer
+sun/java2d/loops/GraphicsPrimitiveMgr$1
+sun/java2d/loops/GraphicsPrimitiveMgr$2
+sun/java2d/x11/X11PMBlitLoops$DelegateBlitLoop
+sun/java2d/x11/X11PMBlitBgLoops
+sun/java2d/x11/X11SurfaceData$LazyPipe
+sun/awt/X11GraphicsConfig$X11GCDisposerRecord
+sun/java2d/DisposerRecord
+java/awt/BorderLayout
+java/awt/LayoutManager2
+java/awt/Rectangle
+java/awt/Toolkit$2
+sun/awt/X11/XToolkit
+sun/awt/X11/XConstants
+sun/awt/UNIXToolkit
+java/util/TreeMap
+java/util/NavigableMap
+java/util/SortedMap
+sun/awt/X11/XlibWrapper
+sun/awt/X11/XUtilConstants
+sun/awt/X11/XProtocolConstants
+sun/awt/X11/XCursorFontConstants
+sun/awt/X11/XlibWrapper$1
+sun/awt/X11/XToolkit$4
+sun/awt/X11/XModifierKeymap
+sun/awt/X11/XWrapperBase
+sun/awt/X11/Native
+sun/awt/X11/Native$1
+java/awt/EventQueue
+java/util/EmptyStackException
+java/lang/reflect/InvocationTargetException
+java/awt/EventDispatchThread
+java/awt/event/PaintEvent
+java/awt/event/MouseEvent
+sun/awt/PeerEvent
+java/awt/event/InvocationEvent
+java/awt/ActiveEvent
+sun/awt/X11/XToolkit$1
+sun/awt/X11/XEventDispatcher
+sun/awt/SunToolkit$ModalityListenerList
+sun/awt/ModalityListener
+sun/awt/SunToolkit$1
+java/util/MissingResourceException
+java/awt/Queue
+sun/awt/PostEventQueue
+java/util/LinkedList
+java/util/Deque
+java/util/Queue
+java/util/AbstractSequentialList
+sun/awt/X11/AwtScreenData
+sun/awt/X11/XWM
+sun/awt/X11/MWMConstants
+sun/awt/X11/XAtom
+java/awt/Insets
+sun/awt/X11/XWM$1
+sun/awt/X11/XSetWindowAttributes
+sun/awt/X11/XErrorEvent
+sun/awt/X11/XNETProtocol
+sun/awt/X11/XStateProtocol
+sun/awt/X11/XLayerProtocol
+sun/awt/X11/XProtocol
+sun/awt/X11/WindowPropertyGetter
+sun/awt/X11/UnsafeXDisposerRecord
+sun/awt/X11/XPropertyCache
+sun/awt/X11/XWINProtocol
+sun/awt/X11/XAtomList
+sun/awt/X11/XToolkit$3
+sun/awt/X11/XAnyEvent
+java/awt/Window$WindowDisposerRecord
+java/awt/KeyboardFocusManager
+java/awt/KeyEventDispatcher
+java/awt/KeyEventPostProcessor
+java/awt/AWTKeyStroke
+java/awt/AWTKeyStroke$1
+java/awt/DefaultKeyboardFocusManager
+java/awt/DefaultFocusTraversalPolicy
+java/awt/ContainerOrderFocusTraversalPolicy
+java/awt/FocusTraversalPolicy
+java/util/Collections$UnmodifiableSet
+sun/awt/HeadlessToolkit
+sun/awt/X11/XKeyboardFocusManagerPeer
+java/awt/peer/KeyboardFocusManagerPeer
+sun/awt/X11/XKeyboardFocusManagerPeer$1
+sun/awt/X11/XFramePeer
+java/awt/peer/FramePeer
+java/awt/peer/WindowPeer
+java/awt/peer/ContainerPeer
+java/awt/peer/ComponentPeer
+sun/awt/X11/XDecoratedPeer
+sun/awt/X11/XWindowPeer
+sun/awt/X11/XPanelPeer
+java/awt/peer/PanelPeer
+sun/awt/X11/XCanvasPeer
+java/awt/peer/CanvasPeer
+sun/awt/X11/XComponentPeer
+java/awt/dnd/peer/DropTargetPeer
+sun/awt/X11/XWindow
+sun/awt/X11ComponentPeer
+sun/awt/X11/XBaseWindow
+sun/awt/X11/XCreateWindowParams
+java/lang/Long$LongCache
+sun/awt/X11/XBaseWindow$InitialiseState
+sun/awt/X11/XBaseWindow$StateLock
+sun/awt/X11/AwtGraphicsConfigData
+sun/awt/X11/XVisualInfo
+java/awt/SystemColor
+sun/awt/X11/MotifColorUtilities
+java/lang/StrictMath
+sun/awt/X11/XRepaintArea
+sun/awt/RepaintArea
+sun/awt/X11/XWindowAttributesData
+java/util/concurrent/locks/LockSupport
+sun/awt/X11/WindowDimensions
+java/awt/Point
+java/util/TreeMap$Entry
+sun/nio/cs/UTF_8
+sun/nio/cs/Unicode
+sun/nio/cs/UTF_8$Encoder
+sun/nio/cs/UTF_8$Decoder
+sun/nio/cs/Surrogate$Generator
+sun/awt/X11/XPropertyEvent
+sun/awt/X11/XDropTargetEventProcessor
+sun/awt/X11/XDragSourceContextPeer
+sun/awt/X11/XDragSourceProtocolListener
+sun/awt/dnd/SunDragSourceContextPeer
+java/awt/dnd/peer/DragSourceContextPeer
+sun/awt/X11/XAwtState
+sun/awt/X11/XBaseWindow$1
+sun/awt/X11/XRootWindow
+sun/nio/cs/ISO_8859_1
+sun/nio/cs/ISO_8859_1$Encoder
+sun/nio/cs/ISO_8859_1$Decoder
+sun/java2d/x11/X11SurfaceData$X11WindowSurfaceData
+sun/java2d/loops/RenderLoops
+sun/java2d/loops/GraphicsPrimitiveMgr$PrimitiveSpec
+sun/java2d/DefaultDisposerRecord
+sun/java2d/x11/X11Renderer
+sun/awt/X11/XGlobalCursorManager
+sun/awt/GlobalCursorManager
+java/awt/Cursor$CursorDisposer
+java/awt/AWTException
+java/awt/HeadlessException
+java/lang/UnsupportedOperationException
+sun/reflect/UnsafeLongFieldAccessorImpl
+sun/reflect/UnsafeIntegerFieldAccessorImpl
+sun/awt/X11/XClientMessageEvent
+sun/awt/X11/XIconInfo
+sun/awt/X11/XAWTIcon32_java_icon16_png
+sun/awt/X11/XAWTIcon32_java_icon24_png
+sun/awt/X11/XAWTIcon32_java_icon32_png
+sun/awt/X11/XAWTIcon32_java_icon48_png
+sun/awt/X11/XSizeHints
+sun/awt/X11/XContentWindow
+sun/awt/X11/XFocusProxyWindow
+sun/awt/X11/XWMHints
+java/util/LinkedList$ListItr
+java/util/ListIterator
+sun/awt/SunToolkit$2
+java/awt/image/BufferStrategy
+java/awt/dnd/DropTarget
+java/awt/dnd/DropTargetListener
+java/awt/event/ComponentListener
+java/awt/event/FocusListener
+java/awt/event/HierarchyListener
+java/awt/event/HierarchyBoundsListener
+java/awt/event/KeyListener
+java/awt/event/MouseListener
+java/awt/event/MouseMotionListener
+java/awt/event/MouseWheelListener
+java/awt/event/InputMethodListener
+java/awt/event/ContainerListener
+javax/accessibility/AccessibleContext
+sun/reflect/UnsafeObjectFieldAccessorImpl
+java/awt/peer/LightweightPeer
+sun/awt/X11/XLabelPeer
+java/awt/peer/LabelPeer
+sun/awt/X11/XMapEvent
+sun/awt/X11/XQueryTree
+sun/awt/X11/XConfigureEvent
+sun/awt/X11/PropMwmHints
+sun/awt/GlobalCursorManager$NativeUpdater
+javax/swing/JFrame
+javax/swing/WindowConstants
+javax/swing/RootPaneContainer
+javax/swing/TransferHandler$HasGetTransferHandler
+javax/swing/JLabel
+javax/swing/SwingConstants
+javax/swing/JComponent
+javax/swing/JComponent$1
+javax/swing/SwingUtilities
+javax/swing/JRootPane
+sun/security/action/GetBooleanAction
+javax/swing/event/EventListenerList
+javax/swing/JPanel
+java/awt/FlowLayout
+javax/swing/UIManager
+javax/swing/UIManager$LookAndFeelInfo
+sun/swing/SwingUtilities2
+sun/swing/SwingUtilities2$LSBCacheEntry
+javax/swing/UIManager$LAFState
+javax/swing/UIDefaults
+javax/swing/MultiUIDefaults
+javax/swing/UIManager$1
+javax/swing/plaf/metal/MetalLookAndFeel
+javax/swing/plaf/basic/BasicLookAndFeel
+javax/swing/LookAndFeel
+sun/swing/DefaultLookup
+javax/swing/plaf/metal/OceanTheme
+javax/swing/plaf/metal/DefaultMetalTheme
+javax/swing/plaf/metal/MetalTheme
+javax/swing/plaf/ColorUIResource
+javax/swing/plaf/UIResource
+sun/swing/PrintColorUIResource
+javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate
+javax/swing/plaf/FontUIResource
+sun/swing/SwingLazyValue
+javax/swing/UIDefaults$LazyValue
+javax/swing/UIDefaults$ActiveValue
+javax/swing/plaf/InsetsUIResource
+sun/swing/SwingUtilities2$2
+javax/swing/plaf/basic/BasicLookAndFeel$2
+javax/swing/plaf/DimensionUIResource
+javax/swing/UIDefaults$LazyInputMap
+java/lang/Character$CharacterCache
+javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue
+javax/swing/plaf/metal/MetalLookAndFeel$FontActiveValue
+java/awt/print/PrinterJob
+sun/swing/SwingUtilities2$AATextInfo
+sun/awt/X11/XAWTXSettings
+sun/awt/X11/XMSelectionListener
+sun/awt/XSettings
+sun/awt/X11/XMSelection
+sun/awt/X11/XMSelection$1
+javax/swing/plaf/metal/MetalLookAndFeel$AATextListener
+java/beans/PropertyChangeListener
+java/beans/PropertyChangeListenerProxy
+java/util/EventListenerProxy
+sun/awt/EventListenerAggregate
+javax/swing/UIDefaults$ProxyLazyValue
+javax/swing/plaf/metal/OceanTheme$1
+javax/swing/plaf/metal/OceanTheme$2
+javax/swing/plaf/metal/OceanTheme$3
+javax/swing/plaf/metal/OceanTheme$4
+javax/swing/plaf/metal/OceanTheme$5
+javax/swing/plaf/metal/OceanTheme$6
+javax/swing/RepaintManager
+javax/swing/RepaintManager$DisplayChangedHandler
+javax/swing/SwingPaintEventDispatcher
+sun/awt/PaintEventDispatcher
+javax/swing/UIManager$2
+java/awt/PopupMenu
+java/awt/Menu
+java/awt/MenuItem
+java/awt/MenuComponent
+java/io/ObjectOutputStream
+java/io/ObjectOutput
+java/io/DataOutput
+java/io/ObjectStreamConstants
+java/io/PrintWriter
+java/io/ObjectInputStream
+java/io/ObjectInput
+java/awt/Event
+java/awt/im/InputContext
+java/awt/event/MouseWheelEvent
+java/awt/BufferCapabilities
+sun/awt/CausedFocusEvent$Cause
+java/awt/PointerInfo
+java/awt/Component$BaselineResizeBehavior
+java/awt/FontMetrics
+java/awt/Image
+java/awt/image/ImageProducer
+java/awt/image/VolatileImage
+java/awt/im/InputMethodRequests
+java/awt/event/FocusEvent
+java/awt/event/InputMethodEvent
+java/awt/event/HierarchyEvent
+javax/accessibility/AccessibleStateSet
+com/sun/swing/internal/plaf/metal/resources/metal
+sun/util/ResourceBundleEnumeration
+com/sun/swing/internal/plaf/basic/resources/basic
+javax/swing/plaf/basic/BasicPanelUI
+javax/swing/plaf/PanelUI
+javax/swing/plaf/ComponentUI
+sun/reflect/misc/MethodUtil
+sun/reflect/misc/MethodUtil$1
+java/util/jar/JarFile
+java/util/zip/ZipFile
+java/util/zip/ZipConstants
+java/util/jar/JavaUtilJarAccessImpl
+sun/misc/JavaUtilJarAccess
+sun/misc/JarIndex
+java/util/zip/ZipEntry
+java/util/jar/JarFile$JarFileEntry
+java/util/jar/JarEntry
+sun/misc/URLClassPath$JarLoader$2
+sun/net/www/protocol/jar/JarURLConnection
+java/net/JarURLConnection
+sun/net/www/protocol/jar/JarFileFactory
+sun/net/www/protocol/jar/URLJarFile$URLJarFileCloseController
+java/net/HttpURLConnection
+sun/net/www/protocol/jar/URLJarFile
+sun/net/www/protocol/jar/URLJarFile$URLJarFileEntry
+sun/net/www/protocol/jar/JarURLConnection$JarURLInputStream
+java/util/zip/ZipFile$ZipFileInputStream
+java/security/AllPermissionCollection
+java/lang/IllegalAccessException
+javax/swing/JPasswordField
+javax/swing/JTextField
+javax/swing/text/JTextComponent
+javax/swing/Scrollable
+javax/swing/JLayeredPane
+javax/swing/JRootPane$1
+javax/swing/ArrayTable
+javax/swing/JInternalFrame
+javax/swing/JRootPane$RootLayout
+javax/swing/BufferStrategyPaintManager
+javax/swing/RepaintManager$PaintManager
+javax/swing/plaf/metal/MetalRootPaneUI
+javax/swing/plaf/basic/BasicRootPaneUI
+javax/swing/plaf/RootPaneUI
+javax/swing/plaf/basic/BasicRootPaneUI$RootPaneInputMap
+javax/swing/plaf/ComponentInputMapUIResource
+javax/swing/ComponentInputMap
+javax/swing/InputMap
+javax/swing/plaf/InputMapUIResource
+javax/swing/KeyStroke
+java/awt/VKCollection
+sun/reflect/UnsafeQualifiedStaticIntegerFieldAccessorImpl
+javax/swing/plaf/basic/LazyActionMap
+javax/swing/plaf/ActionMapUIResource
+javax/swing/ActionMap
+javax/swing/LayoutFocusTraversalPolicy
+javax/swing/SortingFocusTraversalPolicy
+javax/swing/InternalFrameFocusTraversalPolicy
+javax/swing/SwingContainerOrderFocusTraversalPolicy
+javax/swing/SwingDefaultFocusTraversalPolicy
+javax/swing/LayoutComparator
+javax/swing/plaf/metal/MetalLabelUI
+javax/swing/plaf/basic/BasicLabelUI
+javax/swing/plaf/LabelUI
+javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate$1
+javax/swing/plaf/basic/BasicHTML
+sun/awt/NullComponentPeer
+java/awt/event/WindowEvent
+java/awt/EventQueue$1
+java/awt/EventDispatchThread$1
+java/awt/Conditional
+java/awt/EventDispatchThread$HierarchyEventFilter
+java/awt/EventFilter$FilterAction
+sun/awt/dnd/SunDropTargetEvent
+java/awt/event/ActionEvent
+java/util/jar/Manifest
+java/io/ByteArrayInputStream
+java/util/jar/Attributes
+java/util/jar/Manifest$FastInputStream
+java/util/jar/Attributes$Name
+sun/misc/ASCIICaseInsensitiveComparator
+java/util/jar/JarVerifier
+java/io/ByteArrayOutputStream
+sun/misc/ExtensionDependency
+java/lang/Package
+sun/security/util/ManifestEntryVerifier
+java/security/Provider
+java/security/Provider$ServiceKey
+java/security/Provider$EngineDescription
+java/security/Security
+java/security/Security$1
+sun/misc/FloatingDecimal
+sun/misc/FloatingDecimal$1
+sun/security/provider/NativePRNG
+java/security/SecureRandomSpi
+sun/security/provider/NativePRNG$1
+sun/security/provider/NativePRNG$RandomIO
+sun/misc/BASE64Decoder
+sun/misc/CharacterDecoder
+sun/security/util/SignatureFileVerifier
+java/awt/event/KeyAdapter
+java/lang/NumberFormatException
+java/lang/IllegalArgumentException
+java/io/FileWriter
+java/net/Authenticator
+java/net/MalformedURLException
+javax/swing/text/Element
+javax/swing/text/Document
+javax/swing/text/PlainDocument
+javax/swing/text/AbstractDocument
+javax/swing/text/GapContent
+javax/swing/text/AbstractDocument$Content
+javax/swing/text/GapVector
+javax/swing/text/GapContent$MarkVector
+javax/swing/text/GapContent$MarkData
+javax/swing/text/StyleContext
+javax/swing/text/AbstractDocument$AttributeContext
+javax/swing/text/StyleConstants
+javax/swing/text/StyleConstants$CharacterConstants
+javax/swing/text/AttributeSet$CharacterAttribute
+javax/swing/text/StyleConstants$FontConstants
+javax/swing/text/AttributeSet$FontAttribute
+javax/swing/text/StyleConstants$ColorConstants
+javax/swing/text/AttributeSet$ColorAttribute
+javax/swing/text/StyleConstants$ParagraphConstants
+javax/swing/text/AttributeSet$ParagraphAttribute
+javax/swing/text/StyleContext$FontKey
+javax/swing/text/SimpleAttributeSet
+javax/swing/text/MutableAttributeSet
+javax/swing/text/AttributeSet
+javax/swing/text/SimpleAttributeSet$EmptyAttributeSet
+javax/swing/text/StyleContext$NamedStyle
+javax/swing/text/Style
+javax/swing/text/StyleContext$SmallAttributeSet
+javax/swing/text/AbstractDocument$BidiRootElement
+javax/swing/text/AbstractDocument$BranchElement
+javax/swing/text/AbstractDocument$AbstractElement
+javax/swing/tree/TreeNode
+javax/swing/text/AbstractDocument$1
+javax/swing/text/AbstractDocument$BidiElement
+javax/swing/text/AbstractDocument$LeafElement
+javax/swing/text/GapContent$StickyPosition
+javax/swing/text/Position
+javax/swing/text/StyleContext$KeyEnumeration
+javax/swing/text/GapContent$InsertUndo
+javax/swing/undo/AbstractUndoableEdit
+javax/swing/undo/UndoableEdit
+javax/swing/text/AbstractDocument$DefaultDocumentEvent
+javax/swing/event/DocumentEvent
+javax/swing/undo/CompoundEdit
+javax/swing/event/DocumentEvent$EventType
+javax/swing/text/Segment
+java/text/CharacterIterator
+javax/swing/text/Utilities
+javax/swing/text/SegmentCache
+javax/swing/text/SegmentCache$CachedSegment
+javax/swing/event/UndoableEditEvent
+javax/swing/text/AbstractDocument$ElementEdit
+javax/swing/event/DocumentEvent$ElementChange
+java/net/Socket
+java/net/InetAddress
+java/net/InetAddress$Cache
+java/net/InetAddress$Cache$Type
+java/net/InetAddressImplFactory
+java/net/Inet4AddressImpl
+java/net/InetAddressImpl
+java/net/InetAddress$1
+sun/net/spi/nameservice/NameService
+sun/net/util/IPAddressUtil
+java/util/RandomAccessSubList
+java/util/SubList
+java/util/SubList$1
+java/util/AbstractList$ListItr
+java/net/Inet4Address
+java/net/InetSocketAddress
+java/net/SocketAddress
+java/net/SocksSocketImpl
+java/net/SocksConsts
+java/net/PlainSocketImpl
+java/net/SocketImpl
+java/net/SocketOptions
+java/net/SocketException
+java/net/SocksSocketImpl$5
+java/net/ProxySelector
+sun/net/spi/DefaultProxySelector
+sun/net/spi/DefaultProxySelector$1
+sun/net/NetProperties
+sun/net/NetProperties$1
+sun/net/spi/DefaultProxySelector$NonProxyInfo
+java/net/Inet6Address
+java/net/URI
+java/net/URI$Parser
+java/net/Proxy
+java/net/Proxy$Type
+java/net/ConnectException
+javax/swing/JMenu
+javax/swing/MenuElement
+javax/swing/JMenuItem
+javax/swing/AbstractButton
+java/awt/ItemSelectable
+javax/swing/event/MenuListener
+javax/swing/JCheckBoxMenuItem
+javax/swing/Icon
+javax/swing/JButton
+java/awt/event/WindowListener
+java/net/URLClassLoader$2
+javax/swing/ImageIcon
+javax/swing/ImageIcon$1
+java/awt/MediaTracker
+sun/misc/SoftCache$ValueCell
+sun/awt/image/URLImageSource
+sun/awt/image/InputStreamImageSource
+sun/awt/image/ImageFetchable
+sun/awt/image/ToolkitImage
+java/awt/Image$1
+sun/awt/image/SurfaceManager$ImageAccessor
+sun/awt/image/SurfaceManager
+sun/awt/image/NativeLibLoader
+java/awt/ImageMediaEntry
+java/awt/MediaEntry
+sun/awt/image/ImageRepresentation
+java/awt/image/ImageConsumer
+sun/awt/image/ImageWatched
+sun/awt/image/ImageWatched$Link
+sun/awt/image/ImageWatched$WeakLink
+sun/awt/image/ImageConsumerQueue
+sun/awt/image/ImageFetcher
+sun/awt/image/FetcherInfo
+sun/awt/image/ImageFetcher$1
+sun/awt/image/GifImageDecoder
+sun/awt/image/ImageDecoder
+sun/awt/image/GifFrame
+java/awt/image/Raster
+java/awt/image/DataBufferByte
+java/awt/image/DataBuffer
+java/awt/image/PixelInterleavedSampleModel
+java/awt/image/ComponentSampleModel
+java/awt/image/SampleModel
+sun/awt/image/ByteInterleavedRaster
+sun/awt/image/ByteComponentRaster
+sun/awt/image/SunWritableRaster
+java/awt/image/WritableRaster
+java/awt/image/BufferedImage
+java/awt/image/WritableRenderedImage
+java/awt/image/RenderedImage
+sun/awt/image/IntegerComponentRaster
+sun/awt/image/BytePackedRaster
+java/awt/Canvas
+sun/font/FontDesignMetrics
+sun/font/FontStrikeDesc
+sun/font/CompositeStrike
+sun/font/FontStrikeDisposer
+sun/font/StrikeCache$SoftDisposerRef
+sun/font/StrikeCache$DisposableStrike
+sun/font/TrueTypeFont$TTDisposerRecord
+sun/font/TrueTypeFont$1
+java/io/RandomAccessFile
+java/nio/ByteBufferAsIntBufferB
+java/nio/IntBuffer
+sun/font/TrueTypeFont$DirectoryEntry
+java/nio/ByteBufferAsShortBufferB
+java/nio/ShortBuffer
+sun/nio/cs/UTF_16
+sun/nio/cs/UTF_16$Decoder
+sun/nio/cs/UnicodeDecoder
+sun/font/FileFontStrike
+sun/font/TrueTypeGlyphMapper
+sun/font/CMap
+sun/font/CMap$NullCMapClass
+sun/font/CMap$CMapFormat4
+java/nio/ByteBufferAsCharBufferB
+sun/font/FontDesignMetrics$KeyReference
+sun/awt/image/PNGImageDecoder
+sun/awt/image/PNGFilterInputStream
+java/util/zip/InflaterInputStream
+java/util/zip/Inflater
+sun/awt/EventQueueItem
+sun/awt/SunToolkit$3
+sun/awt/X11/XExposeEvent
+sun/reflect/UnsafeBooleanFieldAccessorImpl
+sun/awt/event/IgnorePaintEvent
+java/awt/image/DataBufferInt
+java/awt/image/SinglePixelPackedSampleModel
+sun/awt/image/IntegerInterleavedRaster
+sun/awt/image/OffScreenImage
+sun/awt/image/BufImgSurfaceData
+sun/java2d/opengl/GLXGraphicsConfig
+sun/java2d/opengl/OGLGraphicsConfig
+sun/java2d/x11/X11SurfaceData$X11PixmapSurfaceData
+sun/awt/image/WritableRasterNative
+sun/awt/image/DataBufferNative
+sun/java2d/SurfaceManagerFactory
+sun/java2d/opengl/GLXSurfaceData
+sun/java2d/opengl/OGLSurfaceData
+sun/font/CompositeGlyphMapper
+sun/java2d/loops/FontInfo
+java/util/Date
+sun/util/calendar/CalendarSystem
+sun/util/calendar/Gregorian
+sun/util/calendar/BaseCalendar
+sun/util/calendar/AbstractCalendar
+java/util/TimeZone
+java/lang/InheritableThreadLocal
+sun/util/calendar/ZoneInfo
+sun/util/calendar/ZoneInfoFile
+sun/util/calendar/ZoneInfoFile$1
+java/util/TimeZone$1
+sun/util/calendar/Gregorian$Date
+sun/util/calendar/BaseCalendar$Date
+sun/util/calendar/CalendarDate
+sun/util/calendar/CalendarUtils
+java/util/TimeZone$DisplayNames
+sun/util/TimeZoneNameUtility
+sun/util/resources/TimeZoneNames
+sun/util/resources/TimeZoneNamesBundle
+sun/util/resources/TimeZoneNames_en
+java/util/spi/TimeZoneNameProvider
+java/lang/ProcessBuilder
+java/lang/ProcessImpl
+java/lang/UNIXProcess
+java/lang/Process
+java/lang/UNIXProcess$1
+java/net/ServerSocket
+java/util/Random
+java/util/concurrent/atomic/AtomicLong
+java/lang/InternalError
+java/io/StringReader
+java/lang/SecurityException
+java/io/FilterReader
+java/lang/reflect/Proxy
+java/lang/reflect/InvocationHandler
+java/lang/NoSuchFieldException
+java/lang/InstantiationException
+java/lang/ArrayIndexOutOfBoundsException
+java/lang/IndexOutOfBoundsException
+javax/swing/JDialog
+sun/awt/X11/XClipboard
+sun/awt/datatransfer/SunClipboard
+java/awt/datatransfer/Clipboard
+java/awt/datatransfer/SystemFlavorMap
+java/awt/datatransfer/FlavorMap
+java/awt/datatransfer/FlavorTable
+java/awt/datatransfer/SystemFlavorMap$1
+sun/net/ProgressMonitor
+sun/net/DefaultProgressMeteringPolicy
+sun/net/ProgressMeteringPolicy
+java/awt/datatransfer/SystemFlavorMap$2
+java/awt/datatransfer/MimeType
+java/io/Externalizable
+java/awt/datatransfer/MimeTypeParameterList
+sun/awt/datatransfer/DataTransferer
+java/util/Collections$SynchronizedSet
+java/util/Collections$SynchronizedCollection
+java/awt/datatransfer/DataFlavor
+java/awt/datatransfer/DataFlavor$1
+sun/awt/datatransfer/DataTransferer$CharsetComparator
+sun/awt/datatransfer/DataTransferer$IndexedComparator
+sun/nio/cs/UTF_16LE
+sun/nio/cs/UTF_16BE
+sun/awt/datatransfer/DataTransferer$DataFlavorComparator
+java/rmi/Remote
+sun/awt/datatransfer/DataTransferer$1
+sun/awt/X11/XDataTransferer
+sun/awt/datatransfer/ToolkitThreadBlockedHandler
+javax/imageio/ImageTypeSpecifier
+sun/awt/X11/XSelection
+sun/security/action/GetIntegerAction
+sun/awt/X11/XSelection$IncrementalTransferHandler
+sun/awt/X11/XSelection$SelectionEventHandler
+java/awt/datatransfer/Transferable
+java/io/EOFException
+java/util/Vector$1
+java/util/zip/ZipFile$1
+java/util/zip/ZipFile$2
+java/util/jar/JarFile$1
+java/util/PropertyResourceBundle
+java/util/ResourceBundle$Control$1
+java/util/Hashtable$EntrySet
+java/lang/IllegalAccessError
+java/text/MessageFormat
+java/text/MessageFormat$Field
+java/text/Format$Field
+java/lang/CloneNotSupportedException
+sun/reflect/MethodAccessorGenerator
+sun/reflect/AccessorGenerator
+sun/reflect/ClassFileConstants
+java/lang/Void
+sun/reflect/ByteVectorFactory
+sun/reflect/ByteVectorImpl
+sun/reflect/ByteVector
+sun/reflect/ClassFileAssembler
+sun/reflect/UTF8
+sun/reflect/Label
+sun/reflect/Label$PatchInfo
+sun/reflect/MethodAccessorGenerator$1
+sun/reflect/ClassDefiner
+sun/reflect/ClassDefiner$1
+sun/reflect/BootstrapConstructorAccessorImpl
+java/awt/event/ActionListener
+javax/swing/Timer
+javax/swing/Timer$DoPostEvent
+javax/swing/TimerQueue
+javax/swing/TimerQueue$1
+javax/swing/ToolTipManager
+java/awt/event/MouseAdapter
+javax/swing/ToolTipManager$insideTimerAction
+javax/swing/ToolTipManager$outsideTimerAction
+javax/swing/ToolTipManager$stillInsideTimerAction
+sun/swing/UIAction
+javax/swing/Action
+javax/swing/ToolTipManager$MoveBeforeEnterListener
+java/awt/event/MouseMotionAdapter
+java/util/Hashtable$ValueCollection
+javax/swing/event/CaretListener
+javax/swing/JToolBar
+javax/swing/JSplitPane
+javax/swing/border/Border
+javax/swing/JToggleButton
+javax/swing/border/EmptyBorder
+javax/swing/border/AbstractBorder
+javax/swing/DefaultButtonModel
+javax/swing/ButtonModel
+javax/swing/AbstractButton$Handler
+javax/swing/event/ChangeListener
+java/awt/event/ItemListener
+javax/swing/plaf/metal/MetalButtonUI
+javax/swing/plaf/basic/BasicButtonUI
+javax/swing/plaf/ButtonUI
+javax/swing/plaf/metal/MetalBorders
+javax/swing/plaf/BorderUIResource$CompoundBorderUIResource
+javax/swing/border/CompoundBorder
+javax/swing/plaf/metal/MetalBorders$ButtonBorder
+javax/swing/plaf/basic/BasicBorders$MarginBorder
+javax/swing/plaf/basic/BasicButtonListener
+java/awt/AWTEventMulticaster
+java/awt/event/WindowFocusListener
+java/awt/event/WindowStateListener
+java/awt/event/AdjustmentListener
+java/awt/event/TextListener
+javax/swing/event/AncestorListener
+java/beans/VetoableChangeListener
+javax/swing/ButtonGroup
+javax/swing/JToggleButton$ToggleButtonModel
+javax/swing/plaf/metal/MetalToggleButtonUI
+javax/swing/plaf/basic/BasicToggleButtonUI
+javax/swing/plaf/metal/MetalBorders$ToggleButtonBorder
+java/awt/CardLayout
+javax/swing/Box
+javax/swing/plaf/metal/MetalBorders$TextFieldBorder
+javax/swing/plaf/metal/MetalBorders$Flush3DBorder
+javax/swing/BoxLayout
+javax/swing/JMenuBar
+javax/swing/DefaultSingleSelectionModel
+javax/swing/SingleSelectionModel
+javax/swing/plaf/basic/BasicMenuBarUI
+javax/swing/plaf/MenuBarUI
+javax/swing/plaf/basic/DefaultMenuLayout
+javax/swing/plaf/metal/MetalBorders$MenuBarBorder
+javax/swing/plaf/basic/BasicMenuBarUI$Handler
+javax/swing/KeyboardManager
+javax/swing/event/MenuEvent
+javax/swing/JMenu$MenuChangeListener
+javax/swing/JMenuItem$MenuItemFocusListener
+javax/swing/plaf/basic/BasicMenuUI
+javax/swing/plaf/basic/BasicMenuItemUI
+javax/swing/plaf/MenuItemUI
+javax/swing/plaf/metal/MetalBorders$MenuItemBorder
+javax/swing/plaf/metal/MetalIconFactory
+javax/swing/plaf/metal/MetalIconFactory$MenuArrowIcon
+javax/swing/plaf/basic/BasicMenuUI$Handler
+javax/swing/event/MenuKeyListener
+javax/swing/plaf/basic/BasicMenuItemUI$Handler
+javax/swing/event/MenuDragMouseListener
+javax/swing/event/MouseInputListener
+javax/swing/event/ChangeEvent
+java/awt/event/ContainerEvent
+javax/swing/plaf/metal/MetalIconFactory$MenuItemArrowIcon
+javax/swing/JPopupMenu
+javax/swing/plaf/basic/BasicPopupMenuUI
+javax/swing/plaf/PopupMenuUI
+javax/swing/plaf/basic/BasicLookAndFeel$AWTEventHelper
+java/awt/event/AWTEventListenerProxy
+java/awt/Toolkit$SelectiveAWTEventListener
+java/awt/Toolkit$ToolkitEventMulticaster
+javax/swing/plaf/basic/BasicLookAndFeel$1
+javax/swing/plaf/metal/MetalBorders$PopupMenuBorder
+javax/swing/plaf/basic/BasicPopupMenuUI$BasicPopupMenuListener
+javax/swing/event/PopupMenuListener
+javax/swing/plaf/basic/BasicPopupMenuUI$BasicMenuKeyListener
+javax/swing/plaf/basic/BasicPopupMenuUI$MouseGrabber
+javax/swing/MenuSelectionManager
+javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper
+javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper$1
+java/awt/event/FocusAdapter
+javax/swing/JMenu$WinListener
+java/awt/event/WindowAdapter
+javax/swing/JPopupMenu$Separator
+javax/swing/JSeparator
+javax/swing/plaf/metal/MetalPopupMenuSeparatorUI
+javax/swing/plaf/metal/MetalSeparatorUI
+javax/swing/plaf/basic/BasicSeparatorUI
+javax/swing/plaf/SeparatorUI
+javax/swing/JComboBox
+javax/swing/event/ListDataListener
+javax/swing/event/CaretEvent
+javax/swing/text/TabExpander
+javax/swing/JScrollBar
+java/awt/Adjustable
+javax/swing/event/MouseInputAdapter
+javax/swing/JScrollBar$ModelListener
+javax/swing/DefaultBoundedRangeModel
+javax/swing/BoundedRangeModel
+javax/swing/plaf/metal/MetalScrollBarUI
+javax/swing/plaf/basic/BasicScrollBarUI
+javax/swing/plaf/ScrollBarUI
+javax/swing/plaf/metal/MetalBumps
+javax/swing/plaf/metal/MetalScrollButton
+javax/swing/plaf/basic/BasicArrowButton
+javax/swing/plaf/basic/BasicScrollBarUI$TrackListener
+javax/swing/plaf/basic/BasicScrollBarUI$ArrowButtonListener
+javax/swing/plaf/basic/BasicScrollBarUI$ModelListener
+javax/swing/plaf/metal/MetalScrollBarUI$ScrollBarListener
+javax/swing/plaf/basic/BasicScrollBarUI$PropertyChangeHandler
+javax/swing/plaf/basic/BasicScrollBarUI$Handler
+javax/swing/plaf/basic/BasicScrollBarUI$ScrollListener
+javax/swing/CellRendererPane
+java/util/HashMap$EntryIterator
+javax/swing/border/MatteBorder
+sun/font/StandardGlyphVector
+java/awt/font/GlyphVector
+sun/font/StandardGlyphVector$GlyphStrike
+sun/font/CoreMetrics
+sun/font/FontLineMetrics
+java/awt/font/LineMetrics
+javax/swing/ComboBoxModel
+javax/swing/ListModel
+javax/swing/ListCellRenderer
+javax/swing/DefaultComboBoxModel
+javax/swing/MutableComboBoxModel
+javax/swing/AbstractListModel
+javax/swing/JComboBox$1
+javax/swing/AncestorNotifier
+javax/swing/plaf/metal/MetalComboBoxUI
+javax/swing/plaf/basic/BasicComboBoxUI
+javax/swing/plaf/ComboBoxUI
+javax/swing/plaf/metal/MetalComboBoxUI$MetalComboBoxLayoutManager
+javax/swing/plaf/basic/BasicComboBoxUI$ComboBoxLayoutManager
+javax/swing/plaf/basic/BasicComboPopup
+javax/swing/plaf/basic/ComboPopup
+javax/swing/plaf/basic/BasicComboPopup$EmptyListModelClass
+javax/swing/border/LineBorder
+javax/swing/plaf/basic/BasicComboPopup$1
+javax/swing/JList
+javax/swing/DropMode
+javax/swing/DefaultListSelectionModel
+javax/swing/ListSelectionModel
+javax/swing/plaf/basic/BasicListUI
+javax/swing/plaf/ListUI
+javax/swing/plaf/basic/BasicListUI$ListTransferHandler
+javax/swing/TransferHandler
+javax/swing/TransferHandler$TransferAction
+javax/swing/DefaultListCellRenderer$UIResource
+javax/swing/DefaultListCellRenderer
+javax/swing/TransferHandler$SwingDropTarget
+java/awt/dnd/DropTargetContext
+javax/swing/TransferHandler$DropHandler
+javax/swing/TransferHandler$TransferSupport
+javax/swing/plaf/basic/BasicListUI$Handler
+javax/swing/event/ListSelectionListener
+javax/swing/plaf/basic/DragRecognitionSupport$BeforeDrag
+javax/swing/plaf/basic/BasicComboPopup$Handler
+javax/swing/JScrollPane
+javax/swing/ScrollPaneConstants
+javax/swing/ScrollPaneLayout$UIResource
+javax/swing/ScrollPaneLayout
+javax/swing/JViewport
+javax/swing/ViewportLayout
+javax/swing/plaf/basic/BasicViewportUI
+javax/swing/plaf/ViewportUI
+javax/swing/JScrollPane$ScrollBar
+javax/swing/JViewport$ViewListener
+java/awt/event/ComponentAdapter
+javax/swing/plaf/metal/MetalScrollPaneUI
+javax/swing/plaf/basic/BasicScrollPaneUI
+javax/swing/plaf/ScrollPaneUI
+javax/swing/plaf/metal/MetalBorders$ScrollPaneBorder
+javax/swing/plaf/basic/BasicScrollPaneUI$Handler
+javax/swing/plaf/metal/MetalScrollPaneUI$1
+javax/swing/plaf/basic/BasicComboBoxRenderer$UIResource
+javax/swing/plaf/basic/BasicComboBoxRenderer
+javax/swing/plaf/metal/MetalComboBoxEditor$UIResource
+javax/swing/plaf/metal/MetalComboBoxEditor
+javax/swing/plaf/basic/BasicComboBoxEditor
+javax/swing/ComboBoxEditor
+javax/swing/plaf/basic/BasicComboBoxEditor$BorderlessTextField
+javax/swing/JTextField$NotifyAction
+javax/swing/text/TextAction
+javax/swing/AbstractAction
+javax/swing/text/JTextComponent$MutableCaretEvent
+javax/swing/plaf/metal/MetalTextFieldUI
+javax/swing/plaf/basic/BasicTextFieldUI
+javax/swing/plaf/basic/BasicTextUI
+javax/swing/text/ViewFactory
+javax/swing/plaf/TextUI
+javax/swing/plaf/basic/BasicTextUI$BasicCursor
+javax/swing/text/DefaultEditorKit
+javax/swing/text/EditorKit
+javax/swing/text/DefaultEditorKit$InsertContentAction
+javax/swing/text/DefaultEditorKit$DeletePrevCharAction
+javax/swing/text/DefaultEditorKit$DeleteNextCharAction
+javax/swing/text/DefaultEditorKit$ReadOnlyAction
+javax/swing/text/DefaultEditorKit$DeleteWordAction
+javax/swing/text/DefaultEditorKit$WritableAction
+javax/swing/text/DefaultEditorKit$CutAction
+javax/swing/text/DefaultEditorKit$CopyAction
+javax/swing/text/DefaultEditorKit$PasteAction
+javax/swing/text/DefaultEditorKit$VerticalPageAction
+javax/swing/text/DefaultEditorKit$PageAction
+javax/swing/text/DefaultEditorKit$InsertBreakAction
+javax/swing/text/DefaultEditorKit$BeepAction
+javax/swing/text/DefaultEditorKit$NextVisualPositionAction
+javax/swing/text/DefaultEditorKit$BeginWordAction
+javax/swing/text/DefaultEditorKit$EndWordAction
+javax/swing/text/DefaultEditorKit$PreviousWordAction
+javax/swing/text/DefaultEditorKit$NextWordAction
+javax/swing/text/DefaultEditorKit$BeginLineAction
+javax/swing/text/DefaultEditorKit$EndLineAction
+javax/swing/text/DefaultEditorKit$BeginParagraphAction
+javax/swing/text/DefaultEditorKit$EndParagraphAction
+javax/swing/text/DefaultEditorKit$BeginAction
+javax/swing/text/DefaultEditorKit$EndAction
+javax/swing/text/DefaultEditorKit$DefaultKeyTypedAction
+javax/swing/text/DefaultEditorKit$InsertTabAction
+javax/swing/text/DefaultEditorKit$SelectWordAction
+javax/swing/text/DefaultEditorKit$SelectLineAction
+javax/swing/text/DefaultEditorKit$SelectParagraphAction
+javax/swing/text/DefaultEditorKit$SelectAllAction
+javax/swing/text/DefaultEditorKit$UnselectAction
+javax/swing/text/DefaultEditorKit$ToggleComponentOrientationAction
+javax/swing/text/DefaultEditorKit$DumpModelAction
+javax/swing/plaf/basic/BasicTextUI$TextTransferHandler
+javax/swing/text/Position$Bias
+javax/swing/plaf/basic/BasicTextUI$RootView
+javax/swing/text/View
+javax/swing/plaf/basic/BasicTextUI$UpdateHandler
+javax/swing/event/DocumentListener
+javax/swing/plaf/basic/BasicTextUI$DragListener
+javax/swing/plaf/basic/BasicComboBoxEditor$UIResource
+javax/swing/plaf/basic/BasicTextUI$BasicCaret
+javax/swing/text/DefaultCaret
+javax/swing/text/Caret
+javax/swing/text/DefaultCaret$Handler
+java/awt/datatransfer/ClipboardOwner
+javax/swing/plaf/basic/BasicTextUI$BasicHighlighter
+javax/swing/text/DefaultHighlighter
+javax/swing/text/LayeredHighlighter
+javax/swing/text/Highlighter
+javax/swing/text/Highlighter$Highlight
+javax/swing/text/DefaultHighlighter$DefaultHighlightPainter
+javax/swing/text/LayeredHighlighter$LayerPainter
+javax/swing/text/Highlighter$HighlightPainter
+javax/swing/text/DefaultHighlighter$SafeDamager
+javax/swing/text/FieldView
+javax/swing/text/PlainView
+javax/swing/text/JTextComponent$DefaultKeymap
+javax/swing/text/Keymap
+javax/swing/text/JTextComponent$KeymapWrapper
+javax/swing/text/JTextComponent$KeymapActionMap
+javax/swing/plaf/basic/BasicTextUI$FocusAction
+javax/swing/plaf/basic/BasicTextUI$TextActionWrapper
+javax/swing/JTextArea
+javax/swing/JEditorPane
+javax/swing/JTextField$ScrollRepainter
+javax/swing/plaf/metal/MetalComboBoxEditor$1
+javax/swing/plaf/metal/MetalComboBoxEditor$EditorBorder
+javax/swing/plaf/metal/MetalComboBoxUI$MetalPropertyChangeListener
+javax/swing/plaf/basic/BasicComboBoxUI$PropertyChangeHandler
+javax/swing/plaf/basic/BasicComboBoxUI$Handler
+javax/swing/plaf/metal/MetalComboBoxButton
+javax/swing/plaf/metal/MetalComboBoxIcon
+javax/swing/plaf/metal/MetalComboBoxButton$1
+javax/swing/plaf/basic/BasicComboBoxUI$DefaultKeySelectionManager
+javax/swing/JComboBox$KeySelectionManager
+javax/swing/JToolBar$DefaultToolBarLayout
+javax/swing/plaf/metal/MetalToolBarUI
+javax/swing/plaf/basic/BasicToolBarUI
+javax/swing/plaf/ToolBarUI
+javax/swing/plaf/metal/MetalBorders$ToolBarBorder
+javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue$1
+javax/swing/plaf/metal/MetalBorders$RolloverButtonBorder
+javax/swing/plaf/metal/MetalBorders$RolloverMarginBorder
+javax/swing/plaf/basic/BasicBorders$RadioButtonBorder
+javax/swing/plaf/basic/BasicBorders$ButtonBorder
+javax/swing/plaf/basic/BasicBorders$RolloverMarginBorder
+javax/swing/plaf/metal/MetalToolBarUI$MetalDockingListener
+javax/swing/plaf/basic/BasicToolBarUI$DockingListener
+javax/swing/plaf/basic/BasicToolBarUI$Handler
+javax/swing/border/EtchedBorder
+javax/swing/JToolBar$Separator
+javax/swing/plaf/basic/BasicToolBarSeparatorUI
+java/applet/Applet
+java/awt/Panel
+com/sun/awt/AWTUtilities
+javax/swing/KeyboardManager$ComponentKeyStrokePair
+sun/awt/EmbeddedFrame
+sun/awt/im/InputMethodContext
+java/awt/im/spi/InputMethodContext
+sun/awt/im/InputContext
+sun/awt/im/InputMethodManager
+sun/awt/im/ExecutableInputMethodManager
+sun/awt/X11/XInputMethodDescriptor
+sun/awt/X11InputMethodDescriptor
+java/awt/im/spi/InputMethodDescriptor
+sun/awt/im/InputMethodLocator
+sun/awt/im/ExecutableInputMethodManager$2
+sun/misc/Service
+sun/misc/Service$LazyIterator
+java/util/TreeSet
+java/util/NavigableSet
+java/util/SortedSet
+javax/swing/SizeRequirements
+javax/swing/plaf/basic/BasicGraphicsUtils
+java/awt/event/AdjustmentEvent
+java/awt/MenuBar
+sun/awt/X11/XComponentPeer$2
+java/awt/SequencedEvent
+java/beans/PropertyVetoException
+java/awt/DefaultKeyboardFocusManager$TypeAheadMarker
+java/awt/KeyboardFocusManager$HeavyweightFocusRequest
+java/awt/KeyboardFocusManager$LightweightFocusRequest
+sun/awt/KeyboardFocusManagerPeerImpl
+sun/awt/SunToolkit$7
+java/awt/Window$1DisposeAction
+java/awt/LightweightDispatcher$2
+sun/awt/X11/XReparentEvent
+sun/awt/X11/XWindowAttributes
+sun/awt/X11/XFocusChangeEvent
+sun/awt/X11/XComponentPeer$1
+sun/awt/X11/XUnmapEvent
+java/io/StringWriter
+javax/swing/JWindow
+java/io/UnsupportedEncodingException
+java/net/UnknownHostException
+java/nio/channels/SocketChannel
+java/nio/channels/spi/AbstractSelectableChannel
+java/nio/channels/SelectableChannel
+java/net/SocketImplFactory
+javax/swing/UnsupportedLookAndFeelException
+java/lang/UnsatisfiedLinkError
+javax/swing/Box$Filler
+javax/swing/JComponent$2
+sun/net/www/MimeTable
+java/net/FileNameMap
+sun/net/www/MimeTable$1
+sun/net/www/MimeEntry
+java/net/URLConnection$1
+java/text/SimpleDateFormat
+java/text/DateFormat
+java/text/DateFormat$Field
+java/util/Calendar
+java/util/GregorianCalendar
+sun/util/resources/CalendarData
+sun/util/resources/CalendarData_en
+java/text/DateFormatSymbols
+java/text/spi/DateFormatSymbolsProvider
+java/text/DontCareFieldPosition
+java/text/DontCareFieldPosition$1
+java/text/Format$FieldDelegate
+javax/swing/plaf/BorderUIResource
+javax/swing/BorderFactory
+javax/swing/border/BevelBorder
+javax/swing/plaf/metal/MetalIconFactory$TreeFolderIcon
+javax/swing/plaf/metal/MetalIconFactory$FolderIcon16
+java/util/zip/ZipInputStream
+java/io/PushbackInputStream
+java/util/zip/CRC32
+java/util/zip/Checksum
+java/lang/Thread$State
+javax/swing/SwingUtilities$SharedOwnerFrame
+javax/swing/JTable
+javax/swing/event/TableModelListener
+javax/swing/event/TableColumnModelListener
+javax/swing/event/CellEditorListener
+javax/swing/event/RowSorterListener
+javax/swing/BufferStrategyPaintManager$BufferInfo
+java/awt/Component$BltSubRegionBufferStrategy
+sun/awt/SubRegionShowable
+java/awt/Component$BltBufferStrategy
+sun/awt/image/SunVolatileImage
+sun/awt/image/BufferedImageGraphicsConfig
+sun/print/PrinterGraphicsConfig
+sun/java2d/x11/X11VolatileSurfaceManager
+sun/awt/image/VolatileSurfaceManager
+java/awt/print/PrinterGraphics
+java/awt/PrintGraphics
+java/awt/GraphicsCallback$PaintCallback
+java/awt/GraphicsCallback
+sun/awt/SunGraphicsCallback
+javax/swing/JRadioButton
+java/lang/ClassFormatError
+javax/swing/JTabbedPane
+javax/swing/JTabbedPane$ModelListener
+javax/swing/plaf/metal/MetalTabbedPaneUI
+javax/swing/plaf/basic/BasicTabbedPaneUI
+javax/swing/plaf/TabbedPaneUI
+javax/swing/plaf/metal/MetalTabbedPaneUI$TabbedPaneLayout
+javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneLayout
+javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneScrollLayout
+javax/swing/plaf/basic/BasicTabbedPaneUI$Handler
+sun/swing/ImageIconUIResource
+javax/swing/GrayFilter
+java/awt/image/RGBImageFilter
+java/awt/image/ImageFilter
+java/awt/image/FilteredImageSource
+org/w3c/dom/Node
+org/xml/sax/SAXException
+javax/xml/parsers/ParserConfigurationException
+org/xml/sax/EntityResolver
+java/security/NoSuchAlgorithmException
+java/security/GeneralSecurityException
+java/util/zip/GZIPInputStream
+java/util/zip/DeflaterOutputStream
+org/xml/sax/InputSource
+javax/xml/parsers/DocumentBuilderFactory
+javax/xml/parsers/FactoryFinder
+javax/xml/parsers/SecuritySupport
+javax/xml/parsers/SecuritySupport$2
+javax/xml/parsers/SecuritySupport$5
+javax/xml/parsers/SecuritySupport$1
+javax/xml/parsers/SecuritySupport$4
+javax/xml/parsers/DocumentBuilder
+org/w3c/dom/Document
+org/xml/sax/helpers/DefaultHandler
+org/xml/sax/DTDHandler
+org/xml/sax/ContentHandler
+org/xml/sax/ErrorHandler
+org/xml/sax/SAXNotSupportedException
+org/xml/sax/Locator
+org/xml/sax/SAXNotRecognizedException
+org/xml/sax/SAXParseException
+org/w3c/dom/NodeList
+org/w3c/dom/events/EventTarget
+org/w3c/dom/traversal/DocumentTraversal
+org/w3c/dom/events/DocumentEvent
+org/w3c/dom/ranges/DocumentRange
+org/w3c/dom/Entity
+org/w3c/dom/Element
+org/w3c/dom/CharacterData
+org/w3c/dom/CDATASection
+org/w3c/dom/Text
+org/xml/sax/AttributeList
+org/w3c/dom/DOMException
+org/w3c/dom/Notation
+org/w3c/dom/DocumentType
+org/w3c/dom/Attr
+org/w3c/dom/EntityReference
+org/w3c/dom/ProcessingInstruction
+org/w3c/dom/Comment
+org/w3c/dom/DocumentFragment
+org/w3c/dom/events/Event
+org/w3c/dom/events/MutationEvent
+org/w3c/dom/traversal/TreeWalker
+org/w3c/dom/ranges/Range
+org/w3c/dom/traversal/NodeIterator
+org/w3c/dom/events/EventException
+org/w3c/dom/NamedNodeMap
+java/lang/StringIndexOutOfBoundsException
+java/awt/GridLayout
+javax/swing/plaf/metal/MetalRadioButtonUI
+javax/swing/plaf/basic/BasicRadioButtonUI
+javax/swing/plaf/basic/BasicBorders
+javax/swing/plaf/metal/MetalIconFactory$RadioButtonIcon
+java/awt/event/ItemEvent
+java/awt/CardLayout$Card
+javax/swing/JCheckBox
+javax/swing/event/ListSelectionEvent
+javax/swing/plaf/metal/MetalCheckBoxUI
+javax/swing/plaf/metal/MetalIconFactory$CheckBoxIcon
+java/lang/ExceptionInInitializerError
+com/sun/java/swing/plaf/windows/WindowsTabbedPaneUI
+javax/swing/JProgressBar
+javax/swing/JProgressBar$ModelListener
+javax/swing/plaf/metal/MetalProgressBarUI
+javax/swing/plaf/basic/BasicProgressBarUI
+javax/swing/plaf/ProgressBarUI
+javax/swing/plaf/BorderUIResource$LineBorderUIResource
+javax/swing/plaf/basic/BasicProgressBarUI$Handler
+javax/swing/tree/TreeModel
+javax/swing/table/TableCellRenderer
+javax/swing/table/JTableHeader
+javax/swing/event/TreeExpansionListener
+javax/swing/table/AbstractTableModel
+javax/swing/table/TableModel
+javax/swing/table/DefaultTableCellRenderer
+javax/swing/JTree
+javax/swing/tree/TreeSelectionModel
+javax/swing/tree/DefaultTreeCellRenderer
+javax/swing/tree/TreeCellRenderer
+javax/swing/table/TableCellEditor
+javax/swing/CellEditor
+javax/swing/JToolTip
+javax/swing/table/TableColumn
+javax/swing/table/DefaultTableColumnModel
+javax/swing/table/TableColumnModel
+javax/swing/table/DefaultTableModel
+javax/swing/event/TableModelEvent
+sun/swing/table/DefaultTableCellHeaderRenderer
+javax/swing/plaf/basic/BasicTableHeaderUI
+javax/swing/plaf/TableHeaderUI
+javax/swing/plaf/basic/BasicTableHeaderUI$1
+javax/swing/plaf/basic/BasicTableHeaderUI$MouseInputHandler
+javax/swing/DefaultCellEditor
+javax/swing/tree/TreeCellEditor
+javax/swing/AbstractCellEditor
+javax/swing/plaf/basic/BasicTableUI
+javax/swing/plaf/TableUI
+javax/swing/plaf/basic/BasicTableUI$TableTransferHandler
+javax/swing/plaf/basic/BasicTableUI$Handler
+javax/swing/tree/DefaultTreeSelectionModel
+javax/swing/tree/TreePath
+javax/swing/plaf/metal/MetalTreeUI
+javax/swing/plaf/basic/BasicTreeUI
+javax/swing/plaf/TreeUI
+javax/swing/plaf/basic/BasicTreeUI$Actions
+javax/swing/plaf/basic/BasicTreeUI$TreeTransferHandler
+javax/swing/plaf/metal/MetalTreeUI$LineListener
+javax/swing/plaf/basic/BasicTreeUI$Handler
+javax/swing/event/TreeModelListener
+javax/swing/event/TreeSelectionListener
+javax/swing/event/SwingPropertyChangeSupport
+javax/swing/tree/VariableHeightLayoutCache
+javax/swing/tree/AbstractLayoutCache
+javax/swing/tree/RowMapper
+javax/swing/plaf/basic/BasicTreeUI$NodeDimensionsHandler
+javax/swing/tree/AbstractLayoutCache$NodeDimensions
+javax/swing/JTree$TreeModelHandler
+javax/swing/tree/VariableHeightLayoutCache$TreeStateNode
+javax/swing/tree/DefaultMutableTreeNode
+javax/swing/tree/MutableTreeNode
+javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration
+javax/swing/event/TableColumnModelEvent
+java/text/ParseException
+java/text/NumberFormat$Field
+javax/swing/event/UndoableEditListener
+javax/swing/filechooser/FileFilter
+javax/swing/tree/DefaultTreeModel
+javax/swing/tree/DefaultTreeCellEditor
+javax/swing/tree/DefaultTreeCellEditor$1
+javax/swing/tree/DefaultTreeCellEditor$DefaultTextField
+javax/swing/DefaultCellEditor$1
+javax/swing/DefaultCellEditor$EditorDelegate
+javax/swing/tree/DefaultTreeCellEditor$EditorContainer
+javax/swing/JTree$TreeSelectionRedirector
+javax/swing/event/TreeModelEvent
+javax/swing/plaf/metal/MetalSplitPaneUI
+javax/swing/plaf/basic/BasicSplitPaneUI
+javax/swing/plaf/SplitPaneUI
+javax/swing/plaf/basic/BasicSplitPaneDivider
+javax/swing/plaf/basic/BasicBorders$SplitPaneBorder
+javax/swing/plaf/metal/MetalSplitPaneDivider
+javax/swing/plaf/basic/BasicSplitPaneDivider$DividerLayout
+javax/swing/plaf/basic/BasicSplitPaneDivider$MouseHandler
+javax/swing/plaf/basic/BasicBorders$SplitPaneDividerBorder
+javax/swing/plaf/basic/BasicSplitPaneUI$BasicHorizontalLayoutManager
+javax/swing/plaf/basic/BasicSplitPaneUI$1
+javax/swing/plaf/basic/BasicSplitPaneUI$Handler
+javax/swing/plaf/metal/MetalSplitPaneDivider$1
+javax/swing/plaf/basic/BasicSplitPaneDivider$OneTouchActionHandler
+javax/swing/plaf/metal/MetalSplitPaneDivider$2
+javax/swing/border/TitledBorder
+javax/swing/plaf/basic/BasicTextAreaUI
+java/util/Collections$UnmodifiableCollection$1
+java/io/InterruptedIOException
+java/net/NoRouteToHostException
+java/net/BindException
+javax/swing/tree/PathPlaceHolder
+javax/swing/event/TreeSelectionEvent
+javax/swing/JList$3
+javax/swing/JList$ListSelectionHandler
+javax/swing/JSlider
+javax/swing/JSlider$ModelListener
+javax/swing/plaf/metal/MetalSliderUI
+javax/swing/plaf/basic/BasicSliderUI
+javax/swing/plaf/SliderUI
+javax/swing/plaf/basic/BasicSliderUI$Actions
+javax/swing/plaf/metal/MetalIconFactory$HorizontalSliderThumbIcon
+javax/swing/plaf/metal/MetalIconFactory$VerticalSliderThumbIcon
+javax/swing/plaf/basic/BasicSliderUI$TrackListener
+javax/swing/plaf/basic/BasicSliderUI$Handler
+javax/swing/plaf/basic/BasicSliderUI$ScrollListener
+javax/swing/plaf/metal/MetalSliderUI$MetalPropertyListener
+javax/swing/plaf/basic/BasicSliderUI$PropertyChangeHandler
+sun/java2d/HeadlessGraphicsEnvironment
+java/util/Hashtable$KeySet
+java/awt/FontFormatException
+sun/font/Type1Font$1
+java/nio/channels/FileChannel$MapMode
+sun/nio/ch/FileChannelImpl$Unmapper
+sun/nio/ch/Util$3
+java/nio/DirectByteBufferR
+java/nio/charset/Charset$3
+sun/nio/cs/AbstractCharsetProvider
+sun/nio/cs/SingleByteDecoder
+java/lang/CharacterData00
+javax/swing/DefaultListModel
+javax/swing/event/ListDataEvent
+javax/sound/sampled/DataLine
+javax/sound/sampled/Line
+javax/sound/sampled/Line$Info
+javax/sound/sampled/DataLine$Info
+javax/sound/sampled/Control$Type
+javax/sound/sampled/FloatControl$Type
+javax/sound/sampled/LineUnavailableException
+javax/sound/sampled/UnsupportedAudioFileException
+javax/swing/JRadioButtonMenuItem
+javax/swing/JMenuItem$AccessibleJMenuItem
+javax/swing/AbstractButton$AccessibleAbstractButton
+javax/accessibility/AccessibleAction
+javax/accessibility/AccessibleValue
+javax/accessibility/AccessibleText
+javax/accessibility/AccessibleExtendedComponent
+javax/accessibility/AccessibleComponent
+javax/swing/JComponent$AccessibleJComponent
+java/awt/Container$AccessibleAWTContainer
+java/awt/Component$AccessibleAWTComponent
+javax/accessibility/AccessibleRelationSet
+javax/accessibility/AccessibleState
+javax/accessibility/AccessibleBundle
+javax/swing/plaf/basic/BasicCheckBoxMenuItemUI
+javax/swing/plaf/metal/MetalIconFactory$CheckBoxMenuItemIcon
+javax/swing/JCheckBoxMenuItem$AccessibleJCheckBoxMenuItem
+javax/swing/plaf/basic/BasicRadioButtonMenuItemUI
+javax/swing/plaf/metal/MetalIconFactory$RadioButtonMenuItemIcon
+sun/awt/image/ImageDecoder$1
+javax/swing/JTabbedPane$Page
+java/net/DatagramSocket
+java/net/MulticastSocket
+java/net/DatagramPacket
+sun/net/InetAddressCachePolicy
+sun/net/InetAddressCachePolicy$1
+sun/net/InetAddressCachePolicy$2
+java/net/InetAddress$CacheEntry
+java/net/PlainDatagramSocketImpl
+java/net/DatagramSocketImpl
+java/net/NetworkInterface
+java/net/InterfaceAddress
+java/text/Collator
+java/text/spi/CollatorProvider
+sun/text/resources/CollationData
+sun/text/resources/CollationData_en
+sun/util/EmptyListResourceBundle
+java/text/RuleBasedCollator
+java/text/CollationRules
+java/text/RBCollationTables
+java/text/RBTableBuilder
+java/text/RBCollationTables$BuildAPI
+sun/text/IntHashtable
+sun/text/UCompactIntArray
+sun/text/normalizer/NormalizerImpl
+sun/text/normalizer/ICUData
+sun/text/normalizer/NormalizerDataReader
+sun/text/normalizer/ICUBinary$Authenticate
+sun/text/normalizer/ICUBinary
+sun/text/normalizer/NormalizerImpl$FCDTrieImpl
+sun/text/normalizer/Trie$DataManipulate
+sun/text/normalizer/NormalizerImpl$NormTrieImpl
+sun/text/normalizer/NormalizerImpl$AuxTrieImpl
+sun/text/normalizer/IntTrie
+sun/text/normalizer/Trie
+sun/text/normalizer/CharTrie
+sun/text/normalizer/CharTrie$FriendAgent
+sun/text/normalizer/UnicodeSet
+sun/text/normalizer/UnicodeMatcher
+sun/text/normalizer/NormalizerImpl$DecomposeArgs
+java/text/MergeCollation
+java/text/PatternEntry$Parser
+java/text/PatternEntry
+java/text/EntryPair
+sun/text/ComposedCharIter
+sun/text/normalizer/UTF16
+sun/net/www/protocol/http/Handler
+java/io/ObjectInputStream$BlockDataInputStream
+java/io/ObjectInputStream$PeekInputStream
+java/io/ObjectInputStream$HandleTable
+java/io/ObjectInputStream$ValidationList
+java/io/Bits
+java/io/ObjectStreamClass$Caches
+java/io/ObjectStreamClass$WeakClassKey
+java/io/ObjectStreamClass$EntryFuture
+java/io/ObjectStreamClass$2
+sun/reflect/SerializationConstructorAccessorImpl
+java/io/ObjectStreamClass$FieldReflectorKey
+java/io/ObjectStreamClass$FieldReflector
+java/io/ObjectStreamClass$1
+java/io/DataOutputStream
+java/io/ObjectStreamClass$MemberSignature
+java/io/ObjectStreamClass$3
+java/io/ObjectStreamClass$4
+java/io/ObjectStreamClass$5
+java/security/MessageDigest
+java/security/MessageDigestSpi
+sun/security/jca/GetInstance
+sun/security/jca/Providers
+sun/security/jca/ProviderList
+sun/security/jca/ProviderConfig
+sun/security/jca/ProviderList$3
+sun/security/jca/ProviderList$1
+sun/security/jca/ProviderList$2
+sun/security/jca/ProviderConfig$1
+sun/security/jca/ProviderConfig$3
+java/security/Provider$Service
+java/security/Provider$UString
+sun/security/provider/SHA
+sun/security/provider/DigestBase
+sun/security/jca/GetInstance$Instance
+java/security/MessageDigest$Delegate
+sun/security/provider/ByteArrayAccess
+java/io/ObjectStreamClass$ClassDataSlot
+sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl
+java/security/SignatureException
+java/security/InvalidKeyException
+java/security/KeyException
+java/security/Signature
+java/security/SignatureSpi
+java/io/ObjectOutputStream$BlockDataOutputStream
+sun/security/provider/DSAPublicKey
+java/security/interfaces/DSAPublicKey
+java/security/interfaces/DSAKey
+java/security/PublicKey
+java/security/Key
+sun/security/x509/X509Key
+java/io/ObjectOutputStream$HandleTable
+java/io/ObjectOutputStream$ReplaceTable
+sun/security/x509/AlgorithmId
+sun/security/util/DerEncoder
+sun/security/util/BitArray
+sun/security/util/DerOutputStream
+sun/security/util/DerValue
+java/math/BigInteger
+java/security/interfaces/DSAParams
+sun/security/util/DerInputStream
+sun/security/util/DerInputBuffer
+sun/security/util/ObjectIdentifier
+java/security/AlgorithmParameters
+java/security/AlgorithmParametersSpi
+sun/security/provider/DSAParameters
+sun/security/util/ByteArrayLexOrder
+sun/security/util/ByteArrayTagOrder
+sun/security/util/DerIndefLenConverter
+java/io/InvalidClassException
+java/io/ObjectStreamException
+java/io/ObjectInputStream$GetFieldImpl
+java/io/ObjectInputStream$GetField
+sun/security/jca/ServiceId
+sun/security/jca/ProviderList$ServiceList
+sun/security/jca/ProviderList$ServiceList$1
+java/security/Signature$Delegate
+java/security/interfaces/DSAPrivateKey
+java/security/PrivateKey
+sun/security/provider/DSA$SHA1withDSA
+sun/security/provider/DSA
+java/security/spec/DSAParameterSpec
+java/security/spec/AlgorithmParameterSpec
+java/math/MutableBigInteger
+java/math/SignedMutableBigInteger
+java/awt/EventQueue$1AWTInvocationLock
+java/awt/Component$FlipBufferStrategy
+java/awt/SentEvent
+sun/awt/X11/XDestroyWindowEvent
+sun/awt/X11/XDropTargetRegistry
+sun/awt/X11/XEmbeddedFramePeer
+sun/awt/X11/XDragAndDropProtocols
+sun/awt/X11/XDropTargetContextPeer
+sun/awt/dnd/SunDropTargetContextPeer
+java/awt/dnd/peer/DropTargetContextPeer
+sun/awt/X11/XDropTargetContextPeer$XDropTargetProtocolListenerImpl
+sun/awt/X11/XDropTargetProtocolListener
+sun/awt/X11/XDnDDragSourceProtocol
+sun/awt/X11/XDragSourceProtocol
+sun/awt/X11/MotifDnDDragSourceProtocol
+sun/awt/X11/XDnDDropTargetProtocol
+sun/awt/X11/XDropTargetProtocol
+sun/awt/X11/MotifDnDDropTargetProtocol
+sun/awt/X11/XDnDConstants
+sun/awt/X11/MotifDnDConstants
+javax/swing/JTable$2
+javax/swing/JTable$Resizable3
+javax/swing/JTable$Resizable2
+javax/swing/JTable$5
+javax/swing/event/AncestorEvent
+sun/font/FontDesignMetrics$MetricsKey
+java/awt/geom/Line2D$Float
+java/awt/geom/Line2D
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel
+javax/swing/plaf/synth/SynthLookAndFeel
+javax/swing/plaf/synth/DefaultSynthStyleFactory
+javax/swing/plaf/synth/SynthStyleFactory
+sun/swing/BakedArrayList
+javax/swing/plaf/synth/SynthLookAndFeel$Handler
+javax/swing/plaf/synth/SynthDefaultLookup
+com/sun/java/swing/plaf/gtk/GTKEngine
+com/sun/java/swing/plaf/gtk/GTKEngine$Settings
+com/sun/java/swing/plaf/gtk/GTKStyleFactory
+com/sun/java/swing/plaf/gtk/PangoFonts
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$WeakPCL
+javax/swing/plaf/synth/Region
+javax/swing/plaf/synth/SynthLookAndFeel$AATextListener
+com/sun/java/swing/plaf/gtk/GTKRegion
+com/sun/java/swing/plaf/gtk/GTKStyle
+com/sun/java/swing/plaf/gtk/GTKConstants
+javax/swing/plaf/synth/SynthStyle
+javax/swing/plaf/synth/SynthGraphicsUtils
+com/sun/java/swing/plaf/gtk/GTKGraphicsUtils
+com/sun/java/swing/plaf/gtk/GTKStyle$GTKStockIcon
+sun/swing/plaf/synth/SynthIcon
+com/sun/java/swing/plaf/gtk/GTKColorType
+javax/swing/plaf/synth/ColorType
+com/sun/java/swing/plaf/gtk/resources/gtk
+com/sun/swing/internal/plaf/synth/resources/synth
+com/sun/java/swing/plaf/gtk/GTKStyle$GTKLazyValue
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$1FontLazyValue
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$2
+com/sun/java/swing/plaf/gtk/GTKLookAndFeel$3
+javax/swing/plaf/synth/SynthPanelUI
+javax/swing/plaf/synth/SynthConstants
+javax/swing/plaf/synth/SynthContext
+javax/swing/plaf/synth/SynthBorder
+javax/swing/plaf/synth/SynthRootPaneUI
+javax/swing/plaf/synth/SynthLabelUI
+javax/swing/plaf/synth/SynthButtonUI
+javax/swing/plaf/synth/SynthToggleButtonUI
+javax/swing/plaf/basic/BasicBorders$FieldBorder
+javax/swing/plaf/synth/SynthMenuBarUI
+javax/swing/plaf/synth/SynthMenuUI
+javax/swing/plaf/synth/SynthUI
+com/sun/java/swing/plaf/gtk/GTKIconFactory
+com/sun/java/swing/plaf/gtk/GTKIconFactory$MenuArrowIcon
+com/sun/java/swing/plaf/gtk/GTKIconFactory$DelegatingIcon
+com/sun/java/swing/plaf/gtk/GTKConstants$ArrowType
+javax/swing/plaf/basic/BasicIconFactory
+javax/swing/plaf/basic/BasicIconFactory$MenuItemCheckIcon
+javax/swing/plaf/synth/SynthMenuItemUI
+javax/swing/plaf/synth/SynthPopupMenuUI
+javax/swing/plaf/synth/SynthSeparatorUI
+javax/swing/plaf/synth/SynthScrollBarUI
+javax/swing/plaf/synth/SynthArrowButton
+javax/swing/plaf/synth/SynthArrowButton$SynthArrowButtonUI
+javax/swing/plaf/synth/SynthComboBoxUI
+javax/swing/plaf/synth/SynthComboPopup
+javax/swing/plaf/synth/SynthListUI
+javax/swing/plaf/synth/SynthListUI$SynthListCellRenderer
+javax/swing/plaf/synth/SynthViewportUI
+javax/swing/plaf/synth/SynthScrollPaneUI
+javax/swing/plaf/synth/SynthScrollPaneUI$ViewportBorder
+javax/swing/plaf/synth/SynthComboBoxUI$SynthComboBoxRenderer
+javax/swing/plaf/synth/SynthComboBoxUI$SynthComboBoxEditor
+javax/swing/plaf/synth/SynthTextFieldUI
+javax/swing/plaf/synth/SynthToolBarUI
+javax/swing/plaf/synth/SynthToolBarUI$SynthToolBarLayoutManager
+com/sun/java/swing/plaf/gtk/GTKIconFactory$ToolBarHandleIcon
+com/sun/java/swing/plaf/gtk/GTKConstants$Orientation
+sun/awt/X11/XTranslateCoordinates
+com/sun/java/swing/plaf/gtk/GTKPainter
+javax/swing/plaf/synth/SynthPainter
+javax/swing/plaf/synth/SynthPainter$1
+com/sun/java/swing/plaf/gtk/GTKConstants$PositionType
+com/sun/java/swing/plaf/gtk/GTKConstants$ShadowType
+java/io/ObjectInputStream$HandleTable$HandleList
+sun/java2d/pipe/ShapeSpanIterator
+sun/java2d/pipe/SpanIterator
+sun/dc/path/PathConsumer
+sun/dc/pr/PathStroker
+sun/dc/pr/PathDasher
+java/awt/geom/LineIterator
+java/awt/geom/PathIterator
+sun/applet/Main
+sun/applet/AppletMessageHandler
+sun/applet/resources/MsgAppletViewer
+sun/applet/AppletSecurity
+sun/awt/AWTSecurityManager
+java/lang/SecurityManager
+java/security/DomainCombiner
+sun/applet/AppletSecurity$1
+java/lang/SecurityManager$1
+java/security/SecurityPermission
+java/util/PropertyPermission
+sun/applet/AppletViewer
+java/applet/AppletContext
+java/awt/print/Printable
+sun/security/util/SecurityConstants
+java/awt/AWTPermission
+java/net/NetPermission
+java/net/SocketPermission
+javax/security/auth/AuthPermission
+java/lang/Thread$1
+java/util/logging/LogManager$5
+sun/applet/StdAppletViewerFactory
+sun/applet/AppletViewerFactory
+sun/applet/AppletViewer$UserActionListener
+sun/applet/AppletViewerPanel
+sun/applet/AppletPanel
+java/applet/AppletStub
+sun/misc/MessageUtils
+sun/applet/AppletPanel$10
+java/security/Policy$1
+sun/security/provider/PolicyFile$1
+sun/security/provider/PolicyFile$3
+sun/security/util/PropertyExpander
+sun/security/provider/PolicyParser
+sun/security/util/PolicyUtil
+sun/security/provider/PolicyParser$GrantEntry
+sun/security/provider/PolicyParser$PermissionEntry
+sun/security/provider/PolicyFile$PolicyEntry
+sun/security/provider/PolicyFile$6
+sun/security/provider/PolicyFile$7
+java/net/SocketPermissionCollection
+java/util/PropertyPermissionCollection
+sun/applet/AppletPanel$9
+sun/applet/AppletClassLoader
+sun/applet/AppletThreadGroup
+sun/applet/AppContextCreator
+sun/applet/AppletPanel$1
+sun/awt/X11/XMenuBarPeer
+java/awt/peer/MenuBarPeer
+java/awt/peer/MenuComponentPeer
+sun/awt/X11/XBaseMenuWindow
+sun/awt/X11/XMenuPeer
+java/awt/peer/MenuPeer
+java/awt/peer/MenuItemPeer
+sun/awt/X11/XMenuItemPeer
+java/awt/MenuShortcut
+sun/awt/X11/XMenuWindow
+sun/awt/X11/XMenuItemPeer$TextMetrics
+sun/awt/AppContext$3
+sun/awt/X11/XMenuBarPeer$MappingData
+sun/awt/X11/XBaseMenuWindow$MappingData
+sun/applet/AppletViewer$1
+sun/applet/AppletViewer$1AppletEventListener
+sun/applet/AppletListener
+sun/applet/AppletEventMulticaster
+sun/misc/Queue
+sun/misc/QueueElement
+sun/applet/AppletEvent
+sun/applet/AppletClassLoader$1
+sun/awt/X11/XBaseMenuWindow$3
+java/awt/DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent
+sun/awt/CausedFocusEvent
+sun/awt/X11/XWindow$1
+java/net/URLClassLoader$4
+sun/applet/AppletClassLoader$2
+javax/swing/JApplet
+java/lang/ClassLoader$1
+sun/security/provider/PolicyFile$5
+java/security/PermissionsEnumerator
+java/util/Collections$1
+sun/applet/AppletPanel$11
+sun/applet/AppletPanel$8
+sun/applet/AppletPanel$2
+sun/applet/AppletPanel$3
+sun/applet/AppletPanel$6
+javax/swing/BufferStrategyPaintManager$1
+# f3ac8b467e7f8c49
--- jdk/src/macosx/classes/com/apple/laf/AquaPanelUI.java 2012-08-10 10:23:05.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaPanelUI.java 2012-08-19 12:39:48.000000000 -0700
@@ -32,20 +32,10 @@
import com.apple.laf.AquaUtils.RecyclableSingleton;
import com.apple.laf.AquaUtils.RecyclableSingletonFromDefaultConstructor;
-import java.awt.Graphics;
-
public class AquaPanelUI extends BasicPanelUI {
static RecyclableSingleton<AquaPanelUI> instance = new RecyclableSingletonFromDefaultConstructor<AquaPanelUI>(AquaPanelUI.class);
public static ComponentUI createUI(final JComponent c) {
return instance.get();
}
-
- @Override
- public final void update(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- AquaUtils.fillRect(g, c);
- }
- paint(g, c);
- }
}
--- jdk/src/macosx/classes/com/apple/laf/AquaRootPaneUI.java 2012-08-10 10:23:07.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaRootPaneUI.java 2012-08-19 12:39:48.000000000 -0700
@@ -319,12 +319,4 @@
updateComponentTreeUIActivation(element, active);
}
}
-
- @Override
- public final void update(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- AquaUtils.fillRect(g, c);
- }
- paint(g, c);
- }
}
--- jdk/src/macosx/classes/com/apple/laf/AquaToolBarUI.java 2012-08-10 10:23:07.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaToolBarUI.java 2012-08-19 12:39:48.000000000 -0700
@@ -73,7 +73,9 @@
g.translate(x, y);
if (c.isOpaque()) {
- AquaUtils.fillRect(g, c, c.getBackground(), 0, 0, w - 1, h - 1);
+ final Color background = c.getBackground();
+ g.setColor(background);
+ g.fillRect(0, 0, w - 1, h - 1);
}
final Color oldColor = g.getColor();
@@ -135,12 +137,4 @@
return true;
}
}
-
- @Override
- public final void update(final Graphics g, final JComponent c) {
- if (c.isOpaque()) {
- AquaUtils.fillRect(g, c);
- }
- paint(g, c);
- }
}
--- jdk/src/macosx/classes/com/apple/laf/AquaUtils.java 2012-08-10 10:23:08.000000000 -0700
+++ jdk/src/macosx/classes/com/apple/laf/AquaUtils.java 2012-08-19 12:39:48.000000000 -0700
@@ -28,19 +28,18 @@
import java.awt.*;
import java.awt.image.*;
import java.lang.ref.SoftReference;
+import java.lang.ref.WeakReference;
import java.lang.reflect.Method;
import java.security.PrivilegedAction;
import java.util.*;
import javax.swing.*;
import javax.swing.border.Border;
-import javax.swing.plaf.UIResource;
import sun.awt.AppContext;
import sun.lwawt.macosx.CImage;
import sun.lwawt.macosx.CImage.Creator;
-import sun.lwawt.macosx.CPlatformWindow;
import sun.swing.SwingUtilities2;
import com.apple.laf.AquaImageFactory.SlicedImageControl;
@@ -390,51 +389,4 @@
return false;
}
}
-
- protected static boolean isWindowTextured(final Component c) {
- if (!(c instanceof JComponent)) {
- return false;
- }
- final JRootPane pane = ((JComponent) c).getRootPane();
- if (pane == null) {
- return false;
- }
- Object prop = pane.getClientProperty(
- CPlatformWindow.WINDOW_BRUSH_METAL_LOOK);
- if (prop != null) {
- return Boolean.parseBoolean(prop.toString());
- }
- prop = pane.getClientProperty(CPlatformWindow.WINDOW_STYLE);
- return prop != null && "textured".equals(prop);
- }
-
- private static Color resetAlpha(final Color color) {
- return new Color(color.getRed(), color.getGreen(), color.getBlue(), 0);
- }
-
- protected static void fillRect(final Graphics g, final Component c) {
- fillRect(g, c, c.getBackground(), 0, 0, c.getWidth(), c.getHeight());
- }
-
- protected static void fillRect(final Graphics g, final Component c,
- final Color color, final int x, final int y,
- final int w, final int h) {
- if (!(g instanceof Graphics2D)) {
- return;
- }
- final Graphics2D cg = (Graphics2D) g.create();
- try {
- if (color instanceof UIResource && isWindowTextured(c)
- && color.equals(SystemColor.window)) {
- cg.setComposite(AlphaComposite.Src);
- cg.setColor(resetAlpha(color));
- } else {
- cg.setColor(color);
- }
- cg.fillRect(x, y, w, h);
- } finally {
- cg.dispose();
- }
- }
}
-
--- jdk/src/macosx/classes/sun/java2d/opengl/CGLLayer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/java2d/opengl/CGLLayer.java 2012-08-19 12:39:48.000000000 -0700
@@ -68,12 +68,11 @@
}
public boolean isOpaque() {
- return !peer.isTranslucent();
+ return peer.isOpaque();
}
public int getTransparency() {
- return peer.isTranslucent() ? Transparency.TRANSLUCENT :
- Transparency.OPAQUE;
+ return (peer.isOpaque() ? Transparency.OPAQUE : Transparency.TRANSLUCENT);
}
public Object getDestination() {
--- jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWComponentPeer.java 2012-08-19 12:39:48.000000000 -0700
@@ -424,7 +424,8 @@
@Override
public final Graphics getGraphics() {
- final Graphics g = getOnscreenGraphics();
+ Graphics g = getWindowPeerOrSelf().isOpaque() ? getOnscreenGraphics()
+ : getOffscreenGraphics();
if (g != null) {
synchronized (getPeerTreeLock()){
applyConstrain(g);
@@ -442,7 +443,13 @@
final LWWindowPeer wp = getWindowPeerOrSelf();
return wp.getOnscreenGraphics(getForeground(), getBackground(),
getFont());
+ }
+
+ public final Graphics getOffscreenGraphics() {
+ final LWWindowPeer wp = getWindowPeerOrSelf();
+ return wp.getOffscreenGraphics(getForeground(), getBackground(),
+ getFont());
}
private void applyConstrain(final Graphics g) {
@@ -456,7 +463,7 @@
}
//TODO Move this method to SG2D?
- void SG2DConstraint(final SunGraphics2D sg2d, Region r) {
+ private void SG2DConstraint(final SunGraphics2D sg2d, Region r) {
sg2d.constrainX = sg2d.transX;
sg2d.constrainY = sg2d.transY;
@@ -703,7 +710,7 @@
// Obtain the metrics from the offscreen window where this peer is
// mostly drawn to.
// TODO: check for "use platform metrics" settings
- Graphics g = getWindowPeer().getGraphics();
+ Graphics g = getWindowPeer().getOffscreenGraphics();
try {
if (g != null) {
return g.getFontMetrics(f);
@@ -1004,33 +1011,14 @@
@Override
public final void applyShape(final Region shape) {
synchronized (getStateLock()) {
- if (region == shape || (region != null && region.equals(shape))) {
- return;
- }
- }
- applyShapeImpl(shape);
- }
-
- void applyShapeImpl(final Region shape) {
- synchronized (getStateLock()) {
- if (shape != null) {
- region = Region.WHOLE_REGION.getIntersection(shape);
- } else {
- region = null;
- }
+ region = shape;
}
repaintParent(getBounds());
}
protected final Region getRegion() {
synchronized (getStateLock()) {
- return isShaped() ? region : Region.getInstance(getSize());
- }
- }
-
- public boolean isShaped() {
- synchronized (getStateLock()) {
- return region != null;
+ return region == null ? Region.getInstance(getSize()) : region;
}
}
@@ -1398,6 +1386,11 @@
}
}
+ // Just a helper method, thus final
+ protected final void flushOffscreenGraphics() {
+ flushOffscreenGraphics(getSize());
+ }
+
protected static final void flushOnscreenGraphics(){
final OGLRenderQueue rq = OGLRenderQueue.getInstance();
rq.lock();
@@ -1408,6 +1401,36 @@
}
}
+ /*
+ * Flushes the given rectangle from the back buffer to the screen.
+ */
+ protected void flushOffscreenGraphics(Rectangle r) {
+ flushOffscreenGraphics(r.x, r.y, r.width, r.height);
+ }
+
+ private void flushOffscreenGraphics(int x, int y, int width, int height) {
+ Image bb = getWindowPeerOrSelf().getBackBuffer();
+ if (bb != null) {
+ // g is a screen Graphics from the delegate
+ final Graphics g = getOnscreenGraphics();
+
+ if (g != null && g instanceof Graphics2D) {
+ try {
+ Graphics2D g2d = (Graphics2D)g;
+ Point p = localToWindow(new Point(0, 0));
+ Composite composite = g2d.getComposite();
+ g2d.setComposite(AlphaComposite.Src);
+ g.drawImage(bb, x, y, x + width, y + height, p.x + x,
+ p.y + y, p.x + x + width, p.y + y + height,
+ null);
+ g2d.setComposite(composite);
+ } finally {
+ g.dispose();
+ }
+ }
+ }
+ }
+
/**
* Used by ContainerPeer to skip all the paint events during layout.
*
--- jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWRepaintArea.java 2012-08-19 12:39:48.000000000 -0700
@@ -58,6 +58,9 @@
private static void flushBuffers(final LWComponentPeer peer) {
if (peer != null) {
+ if (!peer.getWindowPeerOrSelf().isOpaque()) {
+ peer.flushOffscreenGraphics();
+ }
peer.flushOnscreenGraphics();
}
}
--- jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWTextAreaPeer.java 2012-08-19 12:39:48.000000000 -0700
@@ -129,6 +129,16 @@
}
@Override
+ public void setText(final String l) {
+ // Please note that we do not want to post an event
+ // if TextArea.setText() replaces an empty text by an empty text,
+ // that is, if component's text remains unchanged.
+ if (!l.isEmpty() || getTextComponent().getDocument().getLength() != 0) {
+ super.setText(l);
+ }
+ }
+
+ @Override
public void replaceRange(final String text, final int start,
final int end) {
synchronized (getDelegateLock()) {
--- jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWTextComponentPeer.java 2012-08-19 12:39:48.000000000 -0700
@@ -124,7 +124,7 @@
}
@Override
- public final void setText(final String l) {
+ public void setText(final String l) {
synchronized (getDelegateLock()) {
// JTextArea.setText() posts two different events (remove & insert).
// Since we make no differences between text events,
--- jdk/src/macosx/classes/sun/lwawt/LWToolkit.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWToolkit.java 2012-08-19 12:39:48.000000000 -0700
@@ -522,6 +522,12 @@
postEvent(targetToAppContext(event.getSource()), event);
}
+ // use peer's back buffer to implement non-opaque windows.
+ @Override
+ public boolean needUpdateWindow() {
+ return true;
+ }
+
@Override
public void grab(Window w) {
if (w.getPeer() != null) {
--- jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2012-08-10 10:23:11.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/LWWindowPeer.java 2012-08-19 12:39:48.000000000 -0700
@@ -37,7 +37,6 @@
import sun.java2d.*;
import sun.java2d.loops.Blit;
import sun.java2d.loops.CompositeType;
-import sun.java2d.pipe.Region;
import sun.util.logging.PlatformLogger;
public class LWWindowPeer
@@ -110,10 +109,6 @@
private volatile boolean skipNextFocusChange;
- private static final Color nonOpaqueBackground = new Color(0, 0, 0, 0);
-
- private volatile boolean textured;
-
/**
* Current modal blocker or null.
*
@@ -174,11 +169,6 @@
setAlwaysOnTop(getTarget().isAlwaysOnTop());
updateMinimumSize();
- final Shape shape = getTarget().getShape();
- if (shape != null) {
- applyShape(Region.getInstance(shape, null));
- }
-
final float opacity = getTarget().getOpacity();
if (opacity < 1.0f) {
setOpacity(opacity);
@@ -188,7 +178,7 @@
updateInsets(platformWindow.getInsets());
if (getSurfaceData() == null) {
- replaceSurfaceData(false);
+ replaceSurfaceData();
}
}
@@ -289,7 +279,7 @@
// "buffer", that's why numBuffers - 1
assert numBuffers > 1;
- replaceSurfaceData(numBuffers - 1, caps, false);
+ replaceSurfaceData(numBuffers - 1, caps);
} catch (InvalidPipeException z) {
throw new AWTException(z.toString());
}
@@ -451,44 +441,19 @@
public final void setOpaque(final boolean isOpaque) {
if (this.isOpaque != isOpaque) {
this.isOpaque = isOpaque;
- updateOpaque();
+ getPlatformWindow().setOpaque(isOpaque);
+ replaceSurfaceData();
+ repaintPeer();
}
}
- private void updateOpaque() {
- getPlatformWindow().setOpaque(!isTranslucent());
- replaceSurfaceData(false);
- repaintPeer();
+ public final boolean isOpaque() {
+ return isOpaque;
}
@Override
public void updateWindow() {
- }
-
- public final boolean isTextured() {
- return textured;
- }
-
- public final void setTextured(final boolean isTextured) {
- textured = isTextured;
- }
-
- public final boolean isTranslucent() {
- synchronized (getStateLock()) {
- /*
- * Textured window is a special case of translucent window.
- * The difference is only in nswindow background. So when we set
- * texture property our peer became fully translucent. It doesn't
- * fill background, create non opaque backbuffers and layer etc.
- */
- return !isOpaque || isShaped() || isTextured();
- }
- }
-
- @Override
- final void applyShapeImpl(final Region shape) {
- super.applyShapeImpl(shape);
- updateOpaque();
+ flushOffscreenGraphics();
}
@Override
@@ -643,20 +608,7 @@
getFont());
if (g != null) {
try {
- if (g instanceof Graphics2D) {
- ((Graphics2D) g).setComposite(AlphaComposite.Src);
- }
- if (isTranslucent()) {
- g.setColor(nonOpaqueBackground);
- g.fillRect(0, 0, w, h);
- }
- if (!isTextured()) {
- if (g instanceof SunGraphics2D) {
- SG2DConstraint((SunGraphics2D) g, getRegion());
- }
- g.setColor(getBackground());
- g.fillRect(0, 0, w, h);
- }
+ g.clearRect(0, 0, w, h);
} finally {
g.dispose();
}
@@ -963,6 +915,35 @@
});
}
+ /**
+ * This method returns a back buffer Graphics to render all the
+ * peers to. After the peer is painted, the back buffer contents
+ * should be flushed to the screen. All the target painting
+ * (Component.paint() method) should be done directly to the screen.
+ */
+ protected final Graphics getOffscreenGraphics(Color fg, Color bg, Font f) {
+ final Image bb = getBackBuffer();
+ if (bb == null) {
+ return null;
+ }
+ if (fg == null) {
+ fg = SystemColor.windowText;
+ }
+ if (bg == null) {
+ bg = SystemColor.window;
+ }
+ if (f == null) {
+ f = DEFAULT_FONT;
+ }
+ final Graphics2D g = (Graphics2D) bb.getGraphics();
+ if (g != null) {
+ g.setColor(fg);
+ g.setBackground(bg);
+ g.setFont(f);
+ }
+ return g;
+ }
+
/*
* May be called by delegate to provide SD to Java2D code.
*/
@@ -973,16 +954,11 @@
}
private void replaceSurfaceData() {
- replaceSurfaceData(true);
- }
-
- private void replaceSurfaceData(boolean blit) {
- replaceSurfaceData(backBufferCount, backBufferCaps, blit);
+ replaceSurfaceData(backBufferCount, backBufferCaps);
}
private void replaceSurfaceData(int newBackBufferCount,
- BufferCapabilities newBackBufferCaps,
- boolean blit) {
+ BufferCapabilities newBackBufferCaps) {
synchronized (surfaceDataLock) {
final SurfaceData oldData = getSurfaceData();
surfaceData = platformWindow.replaceSurfaceData();
@@ -995,10 +971,7 @@
if (getSurfaceData() != null && oldData != getSurfaceData()) {
clearBackground(size.width, size.height);
}
-
- if (blit) {
- blitSurfaceData(oldData, getSurfaceData());
- }
+ blitSurfaceData(oldData, getSurfaceData());
if (oldData != null && oldData != getSurfaceData()) {
// TODO: drop oldData for D3D/WGL pipelines
@@ -1013,18 +986,11 @@
Graphics g = backBuffer.getGraphics();
try {
Rectangle r = getBounds();
+ g.setColor(getBackground());
if (g instanceof Graphics2D) {
((Graphics2D) g).setComposite(AlphaComposite.Src);
}
- g.setColor(nonOpaqueBackground);
g.fillRect(0, 0, r.width, r.height);
- if (g instanceof SunGraphics2D) {
- SG2DConstraint((SunGraphics2D) g, getRegion());
- }
- if (!isTextured()) {
- g.setColor(getBackground());
- g.fillRect(0, 0, r.width, r.height);
- }
if (oldBB != null) {
// Draw the old back buffer to the new one
g.drawImage(oldBB, 0, 0, null);
@@ -1048,7 +1014,7 @@
CompositeType.Src,
dst.getSurfaceType());
if (blit != null) {
- blit.Blit(src, dst, AlphaComposite.Src,
+ blit.Blit(src, dst, ((Graphics2D) getGraphics()).getComposite(),
getRegion(), 0, 0, 0, 0, size.width, size.height);
}
}
--- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java 2012-08-10 10:23:13.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformEmbeddedFrame.java 2012-08-19 12:39:48.000000000 -0700
@@ -117,7 +117,7 @@
Rectangle r = peer.getBounds();
Image im = null;
if (!r.isEmpty()) {
- int transparency = peer.isTranslucent() ? Transparency.TRANSLUCENT : Transparency.OPAQUE;
+ int transparency = (peer.isOpaque() ? Transparency.OPAQUE : Transparency.TRANSLUCENT);
im = peer.getGraphicsConfiguration().createCompatibleImage(r.width, r.height, transparency);
}
return im;
--- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java 2012-08-10 10:23:13.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformView.java 2012-08-19 12:39:48.000000000 -0700
@@ -64,7 +64,7 @@
}
public boolean isOpaque() {
- return !peer.isTranslucent();
+ return peer.isOpaque();
}
/*
--- jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2012-08-10 10:23:13.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/CPlatformWindow.java 2012-08-19 12:39:48.000000000 -0700
@@ -299,7 +299,7 @@
// If the target is a dialog, popup or tooltip we want it to ignore the brushed metal look.
if (isPopup) {
- styleBits = SET(styleBits, TEXTURED, false);
+ styleBits = SET(styleBits, TEXTURED, true);
// Popups in applets don't activate applet's process
styleBits = SET(styleBits, NONACTIVATING, true);
}
@@ -373,8 +373,6 @@
}
}
- peer.setTextured(IS(TEXTURED, styleBits));
-
return styleBits;
}
@@ -742,19 +740,10 @@
@Override
public void setOpaque(boolean isOpaque) {
CWrapper.NSWindow.setOpaque(getNSWindowPtr(), isOpaque);
- if (!isOpaque && !peer.isTextured()) {
+ if (!isOpaque) {
long clearColor = CWrapper.NSColor.clearColor();
CWrapper.NSWindow.setBackgroundColor(getNSWindowPtr(), clearColor);
}
-
- //This is a temporary workaround. Looks like after 7124236 will be fixed
- //the correct place for invalidateShadow() is CGLayer.drawInCGLContext.
- SwingUtilities.invokeLater(new Runnable() {
- @Override
- public void run() {
- invalidateShadow();
- }
- });
}
@Override
@@ -824,10 +813,6 @@
}
- public final void invalidateShadow(){
- nativeRevalidateNSWindowShadow(getNSWindowPtr());
- }
-
// ----------------------------------------------------------------------
// UTILITY METHODS
// ----------------------------------------------------------------------
--- jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2012-08-10 10:23:14.000000000 -0700
+++ jdk/src/macosx/classes/sun/lwawt/macosx/LWCToolkit.java 2012-08-19 12:39:48.000000000 -0700
@@ -759,11 +759,6 @@
}
@Override
- public boolean isWindowShapingSupported() {
- return true;
- }
-
- @Override
public boolean isWindowTranslucencySupported() {
return true;
}
@@ -773,10 +768,6 @@
return true;
}
- public boolean isSwingBackbufferTranslucencySupported() {
- return true;
- }
-
@Override
public boolean enableInputMethodsForTextComponent() {
return true;
--- jdk/src/macosx/native/sun/awt/AWTWindow.m 2012-08-10 10:23:21.000000000 -0700
+++ jdk/src/macosx/native/sun/awt/AWTWindow.m 2012-08-19 12:39:48.000000000 -0700
@@ -1017,17 +1017,14 @@
(JNIEnv *env, jclass clazz, jlong windowPtr)
{
JNF_COCOA_ENTER(env);
+AWT_ASSERT_NOT_APPKIT_THREAD;
NSWindow *nsWindow = OBJC(windowPtr);
- if ([NSThread isMainThread]) {
+ [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
+ AWT_ASSERT_APPKIT_THREAD;
+
[nsWindow invalidateShadow];
- } else {
- [JNFRunLoop performOnMainThreadWaiting:NO withBlock:^(){
- AWT_ASSERT_APPKIT_THREAD;
-
- [nsWindow invalidateShadow];
- }];
- }
+ }];
JNF_COCOA_EXIT(env);
}
--- jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-08-10 10:23:31.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/TypeResolver.java 2012-08-19 12:39:49.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2006, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -45,9 +45,6 @@
* @author Sergey Malenkov
*/
public final class TypeResolver {
-
- private static final WeakCache<Type, Map<Type, Type>> CACHE = new WeakCache<>();
-
/**
* Replaces the given {@code type} in an inherited method
* with the actual type it has in the given {@code inClass}.
@@ -152,55 +149,12 @@
* @param formal the type where occurrences of the variables
* in {@code actual} will be replaced by the corresponding bound values
* @return a resolved type
+ *
+ * @see #TypeResolver(Type)
+ * @see #resolve(Type)
*/
public static Type resolve(Type actual, Type formal) {
- if (formal instanceof Class) {
- return formal;
- }
- if (formal instanceof GenericArrayType) {
- Type comp = ((GenericArrayType) formal).getGenericComponentType();
- comp = resolve(actual, comp);
- return (comp instanceof Class)
- ? Array.newInstance((Class<?>) comp, 0).getClass()
- : GenericArrayTypeImpl.make(comp);
- }
- if (formal instanceof ParameterizedType) {
- ParameterizedType fpt = (ParameterizedType) formal;
- Type[] actuals = resolve(actual, fpt.getActualTypeArguments());
- return ParameterizedTypeImpl.make(
- (Class<?>) fpt.getRawType(), actuals, fpt.getOwnerType());
- }
- if (formal instanceof WildcardType) {
- WildcardType fwt = (WildcardType) formal;
- Type[] upper = resolve(actual, fwt.getUpperBounds());
- Type[] lower = resolve(actual, fwt.getLowerBounds());
- return new WildcardTypeImpl(upper, lower);
- }
- if (formal instanceof TypeVariable) {
- Map<Type, Type> map;
- synchronized (CACHE) {
- map = CACHE.get(actual);
- if (map == null) {
- map = new HashMap<>();
- prepare(map, actual);
- CACHE.put(actual, map);
- }
- }
- Type result = map.get(formal);
- if (result == null || result.equals(formal)) {
- return formal;
- }
- result = fixGenericArray(result);
- // A variable can be bound to another variable that is itself bound
- // to something. For example, given:
- // class Super<T> {...}
- // class Mid<X> extends Super<T> {...}
- // class Sub extends Mid<String>
- // the variable T is bound to X, which is in turn bound to String.
- // So if we have to resolve T, we need the tail recursion here.
- return resolve(actual, result);
- }
- throw new IllegalArgumentException("Bad Type kind: " + formal.getClass());
+ return getTypeResolver(actual).resolve(formal);
}
/**
@@ -210,14 +164,12 @@
* @param actual the type that supplies bindings for type variables
* @param formals the array of types to resolve
* @return an array of resolved types
+ *
+ * @see #TypeResolver(Type)
+ * @see #resolve(Type[])
*/
public static Type[] resolve(Type actual, Type[] formals) {
- int length = formals.length;
- Type[] actuals = new Type[length];
- for (int i = 0; i < length; i++) {
- actuals[i] = resolve(actual, formals[i]);
- }
- return actuals;
+ return getTypeResolver(actual).resolve(formals);
}
/**
@@ -276,6 +228,32 @@
return classes;
}
+ public static TypeResolver getTypeResolver(Type type) {
+ synchronized (CACHE) {
+ TypeResolver resolver = CACHE.get(type);
+ if (resolver == null) {
+ resolver = new TypeResolver(type);
+ CACHE.put(type, resolver);
+ }
+ return resolver;
+ }
+ }
+
+ private static final WeakCache<Type, TypeResolver> CACHE = new WeakCache<>();
+
+ private final Map<TypeVariable<?>, Type> map = new HashMap<>();
+
+ /**
+ * Constructs the type resolver for the given actual type.
+ *
+ * @param actual the type that supplies bindings for type variables
+ *
+ * @see #prepare(Type)
+ */
+ private TypeResolver(Type actual) {
+ prepare(actual);
+ }
+
/**
* Fills the map from type parameters
* to types as seen by the given {@code type}.
@@ -287,10 +265,9 @@
* to a {@link ParameterizedType ParameterizedType} with no parameters,
* or it represents the erasure of a {@link ParameterizedType ParameterizedType}.
*
- * @param map the mappings of all type variables
* @param type the next type in the hierarchy
*/
- private static void prepare(Map<Type, Type> map, Type type) {
+ private void prepare(Type type) {
Class<?> raw = (Class<?>)((type instanceof Class<?>)
? type
: ((ParameterizedType)type).getRawType());
@@ -303,25 +280,91 @@
assert formals.length == actuals.length;
for (int i = 0; i < formals.length; i++) {
- map.put(formals[i], actuals[i]);
+ this.map.put(formals[i], actuals[i]);
}
Type gSuperclass = raw.getGenericSuperclass();
if (gSuperclass != null) {
- prepare(map, gSuperclass);
+ prepare(gSuperclass);
}
for (Type gInterface : raw.getGenericInterfaces()) {
- prepare(map, gInterface);
+ prepare(gInterface);
}
// If type is the raw version of a parameterized class, we type-erase
// all of its type variables, including inherited ones.
if (type instanceof Class<?> && formals.length > 0) {
- for (Map.Entry<Type, Type> entry : map.entrySet()) {
+ for (Map.Entry<TypeVariable<?>, Type> entry : this.map.entrySet()) {
entry.setValue(erase(entry.getValue()));
}
}
}
/**
+ * Replaces the given {@code formal} type
+ * with the type it stand for in this type resolver.
+ *
+ * @param formal the array of types to resolve
+ * @return a resolved type
+ */
+ private Type resolve(Type formal) {
+ if (formal instanceof Class) {
+ return formal;
+ }
+ if (formal instanceof GenericArrayType) {
+ Type comp = ((GenericArrayType)formal).getGenericComponentType();
+ comp = resolve(comp);
+ return (comp instanceof Class)
+ ? Array.newInstance((Class<?>)comp, 0).getClass()
+ : GenericArrayTypeImpl.make(comp);
+ }
+ if (formal instanceof ParameterizedType) {
+ ParameterizedType fpt = (ParameterizedType)formal;
+ Type[] actuals = resolve(fpt.getActualTypeArguments());
+ return ParameterizedTypeImpl.make(
+ (Class<?>)fpt.getRawType(), actuals, fpt.getOwnerType());
+ }
+ if (formal instanceof WildcardType) {
+ WildcardType fwt = (WildcardType)formal;
+ Type[] upper = resolve(fwt.getUpperBounds());
+ Type[] lower = resolve(fwt.getLowerBounds());
+ return new WildcardTypeImpl(upper, lower);
+ }
+ if (!(formal instanceof TypeVariable)) {
+ throw new IllegalArgumentException("Bad Type kind: " + formal.getClass());
+ }
+ Type actual = this.map.get((TypeVariable) formal);
+ if (actual == null || actual.equals(formal)) {
+ return formal;
+ }
+ actual = fixGenericArray(actual);
+ return resolve(actual);
+ // A variable can be bound to another variable that is itself bound
+ // to something. For example, given:
+ // class Super<T> {...}
+ // class Mid<X> extends Super<T> {...}
+ // class Sub extends Mid<String>
+ // the variable T is bound to X, which is in turn bound to String.
+ // So if we have to resolve T, we need the tail recursion here.
+ }
+
+ /**
+ * Replaces all formal types in the given array
+ * with the types they stand for in this type resolver.
+ *
+ * @param formals the array of types to resolve
+ * @return an array of resolved types
+ *
+ * @see #resolve(Type)
+ */
+ private Type[] resolve(Type[] formals) {
+ int length = formals.length;
+ Type[] actuals = new Type[length];
+ for (int i = 0; i < length; i++) {
+ actuals[i] = resolve(formals[i]);
+ }
+ return actuals;
+ }
+
+ /**
* Replaces a {@link GenericArrayType GenericArrayType}
* with plain array class where it is possible.
* Bug <a href="http://bugs.sun.com/view_bug.do?bug_id=5041784">5041784</a>
--- jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java 2012-08-10 10:23:33.000000000 -0700
+++ jdk/src/share/classes/com/sun/beans/finder/MethodFinder.java 2012-08-19 12:39:49.000000000 -0700
@@ -164,10 +164,8 @@
return findAccessibleMethod(m);
}
Type[] gpts = m.getGenericParameterTypes();
- if (params.length == gpts.length) {
- if (Arrays.equals(params, TypeResolver.erase(TypeResolver.resolve(pt, gpts)))) {
- return findAccessibleMethod(m);
- }
+ if (Arrays.equals(params, TypeResolver.erase(TypeResolver.resolve(pt, gpts)))) {
+ return findAccessibleMethod(m);
}
}
}
--- jdk/src/share/classes/com/sun/jndi/ldap/Connection.java 2012-08-10 10:24:27.000000000 -0700
+++ jdk/src/share/classes/com/sun/jndi/ldap/Connection.java 2012-08-19 12:39:50.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -685,11 +685,9 @@
ldr = ldr.next;
}
}
+ parent.processConnectionClosure();
}
}
- if (nparent) {
- parent.processConnectionClosure();
- }
}
--- jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java 2012-08-10 10:24:27.000000000 -0700
+++ jdk/src/share/classes/com/sun/jndi/ldap/LdapClient.java 2012-08-19 12:39:50.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -487,16 +487,14 @@
*/
void processConnectionClosure() {
// Notify listeners
- synchronized (unsolicited) {
- if (unsolicited.size() > 0) {
- String msg;
- if (conn != null) {
- msg = conn.host + ":" + conn.port + " connection closed";
- } else {
- msg = "Connection closed";
- }
- notifyUnsolicited(new CommunicationException(msg));
+ if (unsolicited.size() > 0) {
+ String msg;
+ if (conn != null) {
+ msg = conn.host + ":" + conn.port + " connection closed";
+ } else {
+ msg = "Connection closed";
}
+ notifyUnsolicited(new CommunicationException(msg));
}
// Remove from pool
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_de.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser-Hilfe
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Ausgew\u00E4hltes Verzeichnis \u00F6ffnen
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Vorschau
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_es.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Ayuda del Selector de Archivos
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Abrir directorio seleccionado
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Vista Previa
ColorChooser.ok.textAndMnemonic=Aceptar
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_fr.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Aide du s\u00E9lecteur de fichiers
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Ouvre le r\u00E9pertoire s\u00E9lectionn\u00E9
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Aper\u00E7u
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_it.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Guida FileChooser
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Apre la directory selezionata
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Anteprima
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ja.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser\u306E\u30D8\u30EB\u30D7\u3067\u3059
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u9078\u629E\u3057\u305F\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u958B\u304D\u307E\u3059
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\u30D7\u30EC\u30D3\u30E5\u30FC
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_ko.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \uB3C4\uC6C0\uB9D0
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\uC120\uD0DD\uB41C \uB514\uB809\uD1A0\uB9AC \uC5F4\uAE30
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\uBBF8\uB9AC\uBCF4\uAE30
ColorChooser.ok.textAndMnemonic=\uD655\uC778
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_pt_BR.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Ajuda do FileChooser
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=Abrir diret\u00F3rio selecionado
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Visualizar
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_sv.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=Hj\u00E4lp - Filv\u00E4ljare
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u00D6ppna vald katalog
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=Granska
ColorChooser.ok.textAndMnemonic=OK
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_CN.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=FileChooser \u5E2E\u52A9
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u6253\u5F00\u9009\u62E9\u7684\u76EE\u5F55
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\u9884\u89C8
ColorChooser.ok.textAndMnemonic=\u786E\u5B9A
--- jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties 2012-08-10 10:25:42.000000000 -0700
+++ jdk/src/share/classes/com/sun/swing/internal/plaf/basic/resources/basic_zh_TW.properties 2012-08-19 12:39:50.000000000 -0700
@@ -70,9 +70,6 @@
FileChooser.helpButtonToolTip.textAndMnemonic=\u300C\u6A94\u6848\u9078\u64C7\u5668\u300D\u8AAA\u660E
FileChooser.directoryOpenButtonToolTip.textAndMnemonic=\u958B\u555F\u9078\u53D6\u7684\u76EE\u9304
-FileChooser.filesListAccessibleName=Files List
-FileChooser.filesDetailsAccessibleName=Files Details
-
############ COLOR CHOOSER STRINGS #############
ColorChooser.preview.textAndMnemonic=\u9810\u89BD
ColorChooser.ok.textAndMnemonic=\u78BA\u5B9A
--- jdk/src/share/classes/java/awt/TextComponent.java 2012-08-10 10:25:57.000000000 -0700
+++ jdk/src/share/classes/java/awt/TextComponent.java 2012-08-19 12:39:51.000000000 -0700
@@ -233,14 +233,9 @@
* @see java.awt.TextComponent#getText
*/
public synchronized void setText(String t) {
- boolean skipTextEvent = (text == null || text.isEmpty())
- && (t == null || t.isEmpty());
text = (t != null) ? t : "";
TextComponentPeer peer = (TextComponentPeer)this.peer;
- // Please note that we do not want to post an event
- // if TextArea.setText() or TextField.setText() replaces an empty text
- // by an empty text, that is, if component's text remains unchanged.
- if (peer != null && !skipTextEvent) {
+ if (peer != null) {
peer.setText(text);
}
}
--- jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java 2012-08-10 10:26:08.000000000 -0700
+++ jdk/src/share/classes/java/beans/IndexedPropertyDescriptor.java 2012-08-19 12:39:51.000000000 -0700
@@ -181,21 +181,20 @@
// the Indexed readMethod was explicitly set to null.
return null;
}
- String nextMethodName = Introspector.GET_PREFIX + getBaseName();
if (indexedReadMethodName == null) {
Class type = getIndexedPropertyType0();
if (type == boolean.class || type == null) {
indexedReadMethodName = Introspector.IS_PREFIX + getBaseName();
} else {
- indexedReadMethodName = nextMethodName;
+ indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
}
}
Class[] args = { int.class };
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
- if ((indexedReadMethod == null) && !indexedReadMethodName.equals(nextMethodName)) {
+ if (indexedReadMethod == null) {
// no "is" method, so look for a "get" method.
- indexedReadMethodName = nextMethodName;
+ indexedReadMethodName = Introspector.GET_PREFIX + getBaseName();
indexedReadMethod = Introspector.findMethod(cls, indexedReadMethodName, 1, args);
}
setIndexedReadMethod0(indexedReadMethod);
--- jdk/src/share/classes/java/beans/Introspector.java 2012-08-10 10:26:08.000000000 -0700
+++ jdk/src/share/classes/java/beans/Introspector.java 2012-08-19 12:39:51.000000000 -0700
@@ -25,7 +25,6 @@
package java.beans;
-import com.sun.beans.TypeResolver;
import com.sun.beans.WeakCache;
import com.sun.beans.finder.ClassFinder;
@@ -35,7 +34,6 @@
import java.lang.ref.SoftReference;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
import java.util.Map;
import java.util.ArrayList;
@@ -953,61 +951,44 @@
continue;
}
- if (name.startsWith(ADD_PREFIX)) {
- Class<?> returnType = method.getReturnType();
- if (returnType == void.class) {
- Type[] parameterTypes = method.getGenericParameterTypes();
- if (parameterTypes.length == 1) {
- Class<?> type = TypeResolver.erase(TypeResolver.resolveInClass(beanClass, parameterTypes[0]));
- if (Introspector.isSubclass(type, eventListenerType)) {
- String listenerName = name.substring(3);
- if (listenerName.length() > 0 &&
- type.getName().endsWith(listenerName)) {
- if (adds == null) {
- adds = new HashMap();
- }
- adds.put(listenerName, method);
- }
- }
+ Class argTypes[] = FeatureDescriptor.getParameterTypes(beanClass, method);
+ Class resultType = FeatureDescriptor.getReturnType(beanClass, method);
+
+ if (name.startsWith(ADD_PREFIX) && argTypes.length == 1 &&
+ resultType == Void.TYPE &&
+ Introspector.isSubclass(argTypes[0], eventListenerType)) {
+ String listenerName = name.substring(3);
+ if (listenerName.length() > 0 &&
+ argTypes[0].getName().endsWith(listenerName)) {
+ if (adds == null) {
+ adds = new HashMap();
}
+ adds.put(listenerName, method);
}
}
- else if (name.startsWith(REMOVE_PREFIX)) {
- Class<?> returnType = method.getReturnType();
- if (returnType == void.class) {
- Type[] parameterTypes = method.getGenericParameterTypes();
- if (parameterTypes.length == 1) {
- Class<?> type = TypeResolver.erase(TypeResolver.resolveInClass(beanClass, parameterTypes[0]));
- if (Introspector.isSubclass(type, eventListenerType)) {
- String listenerName = name.substring(6);
- if (listenerName.length() > 0 &&
- type.getName().endsWith(listenerName)) {
- if (removes == null) {
- removes = new HashMap();
- }
- removes.put(listenerName, method);
- }
- }
+ else if (name.startsWith(REMOVE_PREFIX) && argTypes.length == 1 &&
+ resultType == Void.TYPE &&
+ Introspector.isSubclass(argTypes[0], eventListenerType)) {
+ String listenerName = name.substring(6);
+ if (listenerName.length() > 0 &&
+ argTypes[0].getName().endsWith(listenerName)) {
+ if (removes == null) {
+ removes = new HashMap();
}
+ removes.put(listenerName, method);
}
}
- else if (name.startsWith(GET_PREFIX)) {
- Class<?>[] parameterTypes = method.getParameterTypes();
- if (parameterTypes.length == 0) {
- Class<?> returnType = FeatureDescriptor.getReturnType(beanClass, method);
- if (returnType.isArray()) {
- Class<?> type = returnType.getComponentType();
- if (Introspector.isSubclass(type, eventListenerType)) {
- String listenerName = name.substring(3, name.length() - 1);
- if (listenerName.length() > 0 &&
- type.getName().endsWith(listenerName)) {
- if (gets == null) {
- gets = new HashMap();
- }
- gets.put(listenerName, method);
- }
- }
+ else if (name.startsWith(GET_PREFIX) && argTypes.length == 0 &&
+ resultType.isArray() &&
+ Introspector.isSubclass(resultType.getComponentType(),
+ eventListenerType)) {
+ String listenerName = name.substring(3, name.length() - 1);
+ if (listenerName.length() > 0 &&
+ resultType.getComponentType().getName().endsWith(listenerName)) {
+ if (gets == null) {
+ gets = new HashMap();
}
+ gets.put(listenerName, method);
}
}
}
@@ -1259,11 +1240,11 @@
private boolean isEventHandler(Method m) {
// We assume that a method is an event handler if it has a single
// argument, whose type inherit from java.util.Event.
- Type argTypes[] = m.getGenericParameterTypes();
+ Class argTypes[] = FeatureDescriptor.getParameterTypes(beanClass, m);
if (argTypes.length != 1) {
return false;
}
- return isSubclass(TypeResolver.erase(TypeResolver.resolveInClass(beanClass, argTypes[0])), EventObject.class);
+ return isSubclass(argTypes[0], EventObject.class);
}
/*
@@ -1315,25 +1296,24 @@
}
// make sure method signature matches.
- if (method.getName().equals(methodName)) {
- Type[] params = method.getGenericParameterTypes();
- if (params.length == argCount) {
- if (args != null) {
- boolean different = false;
- if (argCount > 0) {
- for (int j = 0; j < argCount; j++) {
- if (TypeResolver.erase(TypeResolver.resolveInClass(start, params[j])) != args[j]) {
- different = true;
- continue;
- }
- }
- if (different) {
+ Class params[] = FeatureDescriptor.getParameterTypes(start, method);
+ if (method.getName().equals(methodName) &&
+ params.length == argCount) {
+ if (args != null) {
+ boolean different = false;
+ if (argCount > 0) {
+ for (int j = 0; j < argCount; j++) {
+ if (params[j] != args[j]) {
+ different = true;
continue;
}
}
+ if (different) {
+ continue;
+ }
}
- return method;
}
+ return method;
}
}
}
--- jdk/src/share/classes/java/beans/PropertyDescriptor.java 2012-08-10 10:26:08.000000000 -0700
+++ jdk/src/share/classes/java/beans/PropertyDescriptor.java 2012-08-19 12:39:51.000000000 -0700
@@ -210,13 +210,12 @@
// The read method was explicitly set to null.
return null;
}
- String nextMethodName = Introspector.GET_PREFIX + getBaseName();
if (readMethodName == null) {
Class type = getPropertyType0();
if (type == boolean.class || type == null) {
readMethodName = Introspector.IS_PREFIX + getBaseName();
} else {
- readMethodName = nextMethodName;
+ readMethodName = Introspector.GET_PREFIX + getBaseName();
}
}
@@ -226,8 +225,8 @@
// methods. If an "is" method exists, this is the official
// reader method so look for this one first.
readMethod = Introspector.findMethod(cls, readMethodName, 0);
- if ((readMethod == null) && !readMethodName.equals(nextMethodName)) {
- readMethodName = nextMethodName;
+ if (readMethod == null) {
+ readMethodName = Introspector.GET_PREFIX + getBaseName();
readMethod = Introspector.findMethod(cls, readMethodName, 0);
}
try {
--- jdk/src/share/classes/java/net/InMemoryCookieStore.java 2012-08-10 10:27:01.000000000 -0700
+++ jdk/src/share/classes/java/net/InMemoryCookieStore.java 2012-08-19 12:39:52.000000000 -0700
@@ -91,10 +91,8 @@
if (cookie.getDomain() != null) {
addIndex(domainIndex, cookie.getDomain(), cookie);
}
- if (uri != null) {
- // add it to uri index, too
- addIndex(uriIndex, getEffectiveURI(uri), cookie);
- }
+ // add it to uri index, too
+ addIndex(uriIndex, getEffectiveURI(uri), cookie);
}
} finally {
lock.unlock();
--- jdk/src/share/classes/java/util/TimeZone.java 2012-08-10 10:27:19.000000000 -0700
+++ jdk/src/share/classes/java/util/TimeZone.java 2012-08-19 12:39:52.000000000 -0700
@@ -890,15 +890,13 @@
}
int gmtOffset = (hours * 60 + num) * 60 * 1000;
+ zi = ZoneInfoFile.getCustomTimeZone(id, negative ? -gmtOffset : gmtOffset);
if (gmtOffset == 0) {
- zi = ZoneInfoFile.getZoneInfo(GMT_ID);
if (negative) {
zi.setID("GMT-00:00");
} else {
zi.setID("GMT+00:00");
}
- } else {
- zi = ZoneInfoFile.getCustomTimeZone(id, negative ? -gmtOffset : gmtOffset);
}
return zi;
}
--- jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java 2012-08-10 10:27:20.000000000 -0700
+++ jdk/src/share/classes/java/util/concurrent/PriorityBlockingQueue.java 2012-08-19 12:39:53.000000000 -0700
@@ -35,8 +35,7 @@
package java.util.concurrent;
-import java.util.concurrent.locks.Condition;
-import java.util.concurrent.locks.ReentrantLock;
+import java.util.concurrent.locks.*;
import java.util.*;
/**
@@ -111,7 +110,7 @@
* java.util.PriorityQueue operations within a lock, as was done
* in a previous version of this class. To maintain
* interoperability, a plain PriorityQueue is still used during
- * serialization, which maintains compatibility at the expense of
+ * serialization, which maintains compatibility at the espense of
* transiently doubling overhead.
*/
@@ -308,13 +307,14 @@
/**
* Mechanics for poll(). Call only while holding lock.
*/
- private E dequeue() {
+ private E extract() {
+ E result;
int n = size - 1;
if (n < 0)
- return null;
+ result = null;
else {
Object[] array = queue;
- E result = (E) array[0];
+ result = (E) array[0];
E x = (E) array[n];
array[n] = null;
Comparator<? super E> cmp = comparator;
@@ -323,8 +323,8 @@
else
siftDownUsingComparator(0, x, array, n, cmp);
size = n;
- return result;
}
+ return result;
}
/**
@@ -381,43 +381,39 @@
*/
private static <T> void siftDownComparable(int k, T x, Object[] array,
int n) {
- if (n > 0) {
- Comparable<? super T> key = (Comparable<? super T>)x;
- int half = n >>> 1; // loop while a non-leaf
- while (k < half) {
- int child = (k << 1) + 1; // assume left child is least
- Object c = array[child];
- int right = child + 1;
- if (right < n &&
- ((Comparable<? super T>) c).compareTo((T) array[right]) > 0)
- c = array[child = right];
- if (key.compareTo((T) c) <= 0)
- break;
- array[k] = c;
- k = child;
- }
- array[k] = key;
+ Comparable<? super T> key = (Comparable<? super T>)x;
+ int half = n >>> 1; // loop while a non-leaf
+ while (k < half) {
+ int child = (k << 1) + 1; // assume left child is least
+ Object c = array[child];
+ int right = child + 1;
+ if (right < n &&
+ ((Comparable<? super T>) c).compareTo((T) array[right]) > 0)
+ c = array[child = right];
+ if (key.compareTo((T) c) <= 0)
+ break;
+ array[k] = c;
+ k = child;
}
+ array[k] = key;
}
private static <T> void siftDownUsingComparator(int k, T x, Object[] array,
int n,
Comparator<? super T> cmp) {
- if (n > 0) {
- int half = n >>> 1;
- while (k < half) {
- int child = (k << 1) + 1;
- Object c = array[child];
- int right = child + 1;
- if (right < n && cmp.compare((T) c, (T) array[right]) > 0)
- c = array[child = right];
- if (cmp.compare(x, (T) c) <= 0)
- break;
- array[k] = c;
- k = child;
- }
- array[k] = x;
+ int half = n >>> 1;
+ while (k < half) {
+ int child = (k << 1) + 1;
+ Object c = array[child];
+ int right = child + 1;
+ if (right < n && cmp.compare((T) c, (T) array[right]) > 0)
+ c = array[child = right];
+ if (cmp.compare(x, (T) c) <= 0)
+ break;
+ array[k] = c;
+ k = child;
}
+ array[k] = x;
}
/**
@@ -523,11 +519,13 @@
public E poll() {
final ReentrantLock lock = this.lock;
lock.lock();
+ E result;
try {
- return dequeue();
+ result = extract();
} finally {
lock.unlock();
}
+ return result;
}
public E take() throws InterruptedException {
@@ -535,7 +533,7 @@
lock.lockInterruptibly();
E result;
try {
- while ( (result = dequeue()) == null)
+ while ( (result = extract()) == null)
notEmpty.await();
} finally {
lock.unlock();
@@ -549,7 +547,7 @@
lock.lockInterruptibly();
E result;
try {
- while ( (result = dequeue()) == null && nanos > 0)
+ while ( (result = extract()) == null && nanos > 0)
nanos = notEmpty.awaitNanos(nanos);
} finally {
lock.unlock();
@@ -560,11 +558,13 @@
public E peek() {
final ReentrantLock lock = this.lock;
lock.lock();
+ E result;
try {
- return (size == 0) ? null : (E) queue[0];
+ result = size > 0 ? (E) queue[0] : null;
} finally {
lock.unlock();
}
+ return result;
}
/**
@@ -648,28 +648,32 @@
* @return {@code true} if this queue changed as a result of the call
*/
public boolean remove(Object o) {
+ boolean removed = false;
final ReentrantLock lock = this.lock;
lock.lock();
try {
int i = indexOf(o);
- if (i == -1)
- return false;
- removeAt(i);
- return true;
+ if (i != -1) {
+ removeAt(i);
+ removed = true;
+ }
} finally {
lock.unlock();
}
+ return removed;
}
+
/**
* Identity-based version for use in Itr.remove
*/
- void removeEQ(Object o) {
+ private void removeEQ(Object o) {
final ReentrantLock lock = this.lock;
lock.lock();
try {
Object[] array = queue;
- for (int i = 0, n = size; i < n; i++) {
+ int n = size;
+ for (int i = 0; i < n; i++) {
if (o == array[i]) {
removeAt(i);
break;
@@ -689,13 +693,15 @@
* @return {@code true} if this queue contains the specified element
*/
public boolean contains(Object o) {
+ int index;
final ReentrantLock lock = this.lock;
lock.lock();
try {
- return indexOf(o) != -1;
+ index = indexOf(o);
} finally {
lock.unlock();
}
+ return index != -1;
}
/**
@@ -721,6 +727,7 @@
}
}
+
public String toString() {
final ReentrantLock lock = this.lock;
lock.lock();
@@ -731,7 +738,7 @@
StringBuilder sb = new StringBuilder();
sb.append('[');
for (int i = 0; i < n; ++i) {
- Object e = queue[i];
+ E e = (E)queue[i];
sb.append(e == this ? "(this Collection)" : e);
if (i != n - 1)
sb.append(',').append(' ');
@@ -749,7 +756,23 @@
* @throws IllegalArgumentException {@inheritDoc}
*/
public int drainTo(Collection<? super E> c) {
- return drainTo(c, Integer.MAX_VALUE);
+ if (c == null)
+ throw new NullPointerException();
+ if (c == this)
+ throw new IllegalArgumentException();
+ final ReentrantLock lock = this.lock;
+ lock.lock();
+ try {
+ int n = 0;
+ E e;
+ while ( (e = extract()) != null) {
+ c.add(e);
+ ++n;
+ }
+ return n;
+ } finally {
+ lock.unlock();
+ }
}
/**
@@ -768,10 +791,11 @@
final ReentrantLock lock = this.lock;
lock.lock();
try {
- int n = Math.min(size, maxElements);
- for (int i = 0; i < n; i++) {
- c.add((E) queue[0]); // In this order, in case add() throws.
- dequeue();
+ int n = 0;
+ E e;
+ while (n < maxElements && (e = extract()) != null) {
+ c.add(e);
+ ++n;
}
return n;
} finally {
@@ -819,7 +843,8 @@
* The following code can be used to dump the queue into a newly
* allocated array of {@code String}:
*
- * <pre> {@code String[] y = x.toArray(new String[0]);}</pre>
+ * <pre>
+ * String[] y = x.toArray(new String[0]);</pre>
*
* Note that {@code toArray(new Object[0])} is identical in function to
* {@code toArray()}.
@@ -872,7 +897,7 @@
*/
final class Itr implements Iterator<E> {
final Object[] array; // Array of all elements
- int cursor; // index of next element to return
+ int cursor; // index of next element to return;
int lastRet; // index of last element, or -1 if no such
Itr(Object[] array) {
@@ -900,18 +925,17 @@
}
/**
- * Saves this queue to a stream (that is, serializes it).
- *
- * For compatibility with previous version of this class, elements
- * are first copied to a java.util.PriorityQueue, which is then
- * serialized.
+ * Saves the state to a stream (that is, serializes it). For
+ * compatibility with previous version of this class,
+ * elements are first copied to a java.util.PriorityQueue,
+ * which is then serialized.
*/
private void writeObject(java.io.ObjectOutputStream s)
throws java.io.IOException {
lock.lock();
try {
- // avoid zero capacity argument
- q = new PriorityQueue<E>(Math.max(size, 1), comparator);
+ int n = size; // avoid zero capacity argument
+ q = new PriorityQueue<E>(n == 0 ? 1 : n, comparator);
q.addAll(this);
s.defaultWriteObject();
} finally {
@@ -921,7 +945,10 @@
}
/**
- * Reconstitutes this queue from a stream (that is, deserializes it).
+ * Reconstitutes the {@code PriorityBlockingQueue} instance from a stream
+ * (that is, deserializes it).
+ *
+ * @param s the stream
*/
private void readObject(java.io.ObjectInputStream s)
throws java.io.IOException, ClassNotFoundException {
--- jdk/src/share/classes/javax/swing/JComponent.java 2012-08-10 10:27:56.000000000 -0700
+++ jdk/src/share/classes/javax/swing/JComponent.java 2012-08-19 12:39:54.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -2636,16 +2636,17 @@
* attribute: visualUpdate true
*/
public void setVisible(boolean aFlag) {
- if (aFlag != isVisible()) {
+ if(aFlag != isVisible()) {
super.setVisible(aFlag);
- if (aFlag) {
- Container parent = getParent();
- if (parent != null) {
- Rectangle r = getBounds();
- parent.repaint(r.x, r.y, r.width, r.height);
- }
- revalidate();
+ Container parent = getParent();
+ if(parent != null) {
+ Rectangle r = getBounds();
+ parent.repaint(r.x,r.y,r.width,r.height);
}
+ // Some (all should) LayoutManagers do not consider components
+ // that are not visible. As such we need to revalidate when the
+ // visible bit changes.
+ revalidate();
}
}
@@ -5563,22 +5564,4 @@
",preferredSize=" + preferredSizeString;
}
- /**
- * {@inheritDoc}
- */
- @Override
- @Deprecated
- public void hide() {
- boolean showing = isShowing();
- super.hide();
- if (showing) {
- Container parent = getParent();
- if (parent != null) {
- Rectangle r = getBounds();
- parent.repaint(r.x, r.y, r.width, r.height);
- }
- revalidate();
- }
- }
-
}
--- jdk/src/share/classes/javax/swing/JViewport.java 2012-08-10 10:27:59.000000000 -0700
+++ jdk/src/share/classes/javax/swing/JViewport.java 2012-08-19 12:39:54.000000000 -0700
@@ -1586,18 +1586,10 @@
int bdx = blitToX - blitFromX;
int bdy = blitToY - blitFromY;
- Composite oldComposite = null;
// Shift the scrolled region
- if (g instanceof Graphics2D) {
- Graphics2D g2d = (Graphics2D) g;
- oldComposite = g2d.getComposite();
- g2d.setComposite(AlphaComposite.Src);
- }
rm.copyArea(this, g, blitFromX, blitFromY, blitW, blitH, bdx, bdy,
false);
- if (oldComposite != null) {
- ((Graphics2D) g).setComposite(oldComposite);
- }
+
// Paint the newly exposed region.
int x = view.getX();
int y = view.getY();
--- jdk/src/share/classes/javax/swing/RepaintManager.java 2012-08-10 10:28:00.000000000 -0700
+++ jdk/src/share/classes/javax/swing/RepaintManager.java 2012-08-19 12:39:54.000000000 -0700
@@ -119,11 +119,6 @@
// Whether or not a VolatileImage should be used for double-buffered painting
static boolean volatileImageBufferEnabled = true;
/**
- * Type of VolatileImage which should be used for double-buffered
- * painting.
- */
- private static final int volatileBufferType;
- /**
* Value of the system property awt.nativeDoubleBuffering.
*/
private static boolean nativeDoubleBuffering;
@@ -209,13 +204,6 @@
((SunGraphicsEnvironment)ge).addDisplayChangedListener(
new DisplayChangedHandler());
}
- Toolkit tk = Toolkit.getDefaultToolkit();
- if ((tk instanceof SunToolkit)
- && ((SunToolkit) tk).isSwingBackbufferTranslucencySupported()) {
- volatileBufferType = Transparency.TRANSLUCENT;
- } else {
- volatileBufferType = Transparency.OPAQUE;
- }
}
/**
@@ -997,8 +985,7 @@
if (image != null) {
image.flush();
}
- image = config.createCompatibleVolatileImage(width, height,
- volatileBufferType);
+ image = config.createCompatibleVolatileImage(width, height);
volatileMap.put(config, image);
}
return image;
@@ -1492,26 +1479,9 @@
for(y=clipY, maxy = clipY + clipH; y < maxy ; y += bh) {
osg.translate(-x, -y);
osg.setClip(x,y,bw,bh);
- if (volatileBufferType != Transparency.OPAQUE
- && osg instanceof Graphics2D) {
- final Graphics2D g2d = (Graphics2D) osg;
- final Color oldBg = g2d.getBackground();
- g2d.setBackground(c.getBackground());
- g2d.clearRect(x, y, bw, bh);
- g2d.setBackground(oldBg);
- }
c.paintToOffscreen(osg, x, y, bw, bh, maxx, maxy);
g.setClip(x, y, bw, bh);
- if (volatileBufferType != Transparency.OPAQUE
- && g instanceof Graphics2D) {
- final Graphics2D g2d = (Graphics2D) g;
- final Composite oldComposite = g2d.getComposite();
- g2d.setComposite(AlphaComposite.Src);
- g2d.drawImage(image, x, y, c);
- g2d.setComposite(oldComposite);
- } else {
- g.drawImage(image, x, y, c);
- }
+ g.drawImage(image, x, y, c);
osg.translate(x, y);
}
}
--- jdk/src/share/classes/javax/swing/text/DefaultCaret.java 2012-08-10 10:28:13.000000000 -0700
+++ jdk/src/share/classes/javax/swing/text/DefaultCaret.java 2012-08-19 12:39:54.000000000 -0700
@@ -403,10 +403,6 @@
* @see MouseListener#mouseClicked
*/
public void mouseClicked(MouseEvent e) {
- if (getComponent() == null) {
- return;
- }
-
int nclicks = SwingUtilities2.getAdjustedClickCount(getComponent(), e);
if (! e.isConsumed()) {
--- jdk/src/share/classes/sun/awt/FontConfiguration.java 2012-08-10 10:28:23.000000000 -0700
+++ jdk/src/share/classes/sun/awt/FontConfiguration.java 2012-08-19 12:39:55.000000000 -0700
@@ -1146,7 +1146,7 @@
*/
HashMap<String, Boolean> existsMap;
public boolean needToSearchForFile(String fileName) {
- if (!FontUtilities.isLinux) {
+ if (!FontUtilities.isLinux || FontUtilities.isBSD) {
return false;
} else if (existsMap == null) {
existsMap = new HashMap<String, Boolean>();
--- jdk/src/share/classes/sun/awt/OSInfo.java 2012-08-10 10:28:24.000000000 -0700
+++ jdk/src/share/classes/sun/awt/OSInfo.java 2012-08-19 12:39:55.000000000 -0700
@@ -39,6 +39,7 @@
WINDOWS,
LINUX,
SOLARIS,
+ BSD,
MACOSX,
UNKNOWN
}
@@ -101,6 +102,10 @@
return SOLARIS;
}
+ if (osName.contains("BSD")) {
+ return BSD;
+ }
+
if (osName.contains("OS X")) {
return MACOSX;
}
--- jdk/src/share/classes/sun/awt/SunToolkit.java 2012-08-10 10:28:24.000000000 -0700
+++ jdk/src/share/classes/sun/awt/SunToolkit.java 2012-08-19 12:39:55.000000000 -0700
@@ -1976,13 +1976,6 @@
}
/**
- * Returns true if swing backbuffer should be translucent.
- */
- public boolean isSwingBackbufferTranslucencySupported() {
- return false;
- }
-
- /**
* Returns whether or not a containing top level window for the passed
* component is
* {@link GraphicsDevice.WindowTranslucency#PERPIXEL_TRANSLUCENT PERPIXEL_TRANSLUCENT}.
@@ -2103,41 +2096,25 @@
private EventQueueItem queueTail = null;
private final EventQueue eventQueue;
- // For the case when queue is cleared but events are not posted
- private volatile boolean isFlushing = false;
-
PostEventQueue(EventQueue eq) {
eventQueue = eq;
}
public synchronized boolean noEvents() {
- return queueHead == null && !isFlushing;
+ return queueHead == null;
}
/*
* Continually post pending AWTEvents to the Java EventQueue. The method
* is synchronized to ensure the flush is completed before a new event
* can be posted to this queue.
- *
- * 7177040: The method couldn't be wholly synchronized because of calls
- * of EventQueue.postEvent() that uses pushPopLock, otherwise it could
- * potentially lead to deadlock
*/
- public void flush() {
- EventQueueItem tempQueue;
- synchronized (this) {
- tempQueue = queueHead;
- queueHead = queueTail = null;
- isFlushing = (tempQueue != null);
- }
- try {
- while (tempQueue != null) {
- eventQueue.postEvent(tempQueue.event);
- tempQueue = tempQueue.next;
- }
- }
- finally {
- isFlushing = false;
+ public synchronized void flush() {
+ EventQueueItem tempQueue = queueHead;
+ queueHead = queueTail = null;
+ while (tempQueue != null) {
+ eventQueue.postEvent(tempQueue.event);
+ tempQueue = tempQueue.next;
}
}
--- jdk/src/share/classes/sun/font/FontUtilities.java 2012-08-10 10:28:29.000000000 -0700
+++ jdk/src/share/classes/sun/font/FontUtilities.java 2012-08-19 12:39:55.000000000 -0700
@@ -48,6 +48,8 @@
public static boolean isLinux;
+ public static boolean isBSD;
+
public static boolean isMacOSX;
public static boolean isSolaris8;
@@ -78,6 +80,11 @@
isLinux = osName.startsWith("Linux");
+
+ isBSD = (osName.startsWith("FreeBSD") ||
+ osName.startsWith("NetBSD") ||
+ osName.startsWith("OpenBSD"));
+
isMacOSX = osName.contains("OS X"); // TODO: MacOSX
String t2kStr = System.getProperty("sun.java2d.font.scaler");
--- jdk/src/share/classes/sun/font/SunFontManager.java 2012-08-10 10:28:31.000000000 -0700
+++ jdk/src/share/classes/sun/font/SunFontManager.java 2012-08-19 12:39:55.000000000 -0700
@@ -417,7 +417,7 @@
* registerFonts method as on-screen these JRE fonts
* always go through the T2K rasteriser.
*/
- if (FontUtilities.isLinux) {
+ if (FontUtilities.isLinux || FontUtilities.isBSD) {
/* Linux font configuration uses these fonts */
registerFontDir(jreFontDirName);
}
--- jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2012-08-10 10:29:03.000000000 -0700
+++ jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2012-08-19 12:39:56.000000000 -0700
@@ -749,8 +749,7 @@
if (sm != null)
sm.checkConnect(isa.getAddress().getHostAddress(),
isa.getPort());
- boolean isIPv6 = (family == StandardProtocolFamily.INET6);
- disconnect0(fd, isIPv6);
+ disconnect0(fd);
remoteAddress = null;
state = ST_UNCONNECTED;
@@ -1085,7 +1084,7 @@
private static native void initIDs();
- private static native void disconnect0(FileDescriptor fd, boolean isIPv6)
+ private static native void disconnect0(FileDescriptor fd)
throws IOException;
private native int receive0(FileDescriptor fd, long address, int len,
--- jdk/src/share/classes/sun/nio/ch/IOUtil.java 2012-08-10 10:29:03.000000000 -0700
+++ jdk/src/share/classes/sun/nio/ch/IOUtil.java 2012-08-19 12:39:56.000000000 -0700
@@ -36,11 +36,6 @@
class IOUtil {
- /**
- * Max number of iovec structures that readv/writev supports
- */
- static final int IOV_MAX;
-
private IOUtil() { } // No instantiation
static int write(FileDescriptor fd, ByteBuffer src, long position,
@@ -116,8 +111,7 @@
// Iterate over buffers to populate native iovec array.
int count = offset + length;
- int i = offset;
- while (i < count && iov_len < IOV_MAX) {
+ for (int i=offset; i<count; i++) {
ByteBuffer buf = bufs[i];
int pos = buf.position();
int lim = buf.limit();
@@ -141,7 +135,6 @@
vec.putLen(iov_len, rem);
iov_len++;
}
- i++;
}
if (iov_len == 0)
return 0L;
@@ -247,8 +240,7 @@
// Iterate over buffers to populate native iovec array.
int count = offset + length;
- int i = offset;
- while (i < count && iov_len < IOV_MAX) {
+ for (int i=offset; i<count; i++) {
ByteBuffer buf = bufs[i];
if (buf.isReadOnly())
throw new IllegalArgumentException("Read-only buffer");
@@ -272,7 +264,6 @@
vec.putLen(iov_len, rem);
iov_len++;
}
- i++;
}
if (iov_len == 0)
return 0L;
@@ -342,14 +333,11 @@
static native void setfdVal(FileDescriptor fd, int value);
- static native int iovMax();
-
static native void initIDs();
static {
// Note that IOUtil.initIDs is called from within Util.load.
Util.load();
- IOV_MAX = iovMax();
}
}
--- jdk/src/share/classes/sun/nio/ch/Util.java 2012-08-10 10:29:04.000000000 -0700
+++ jdk/src/share/classes/sun/nio/ch/Util.java 2012-08-19 12:39:56.000000000 -0700
@@ -45,7 +45,7 @@
// -- Caches --
// The number of temp buffers in our pool
- private static final int TEMP_BUF_POOL_SIZE = IOUtil.IOV_MAX;
+ private static final int TEMP_BUF_POOL_SIZE = 8;
// Per-thread cache of temporary direct buffers
private static ThreadLocal<BufferCache> bufferCache =
--- jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-08-10 10:29:08.000000000 -0700
+++ jdk/src/share/classes/sun/print/PSPrinterJob.java 2012-08-19 12:39:56.000000000 -0700
@@ -1537,7 +1537,7 @@
}
String osname = System.getProperty("os.name");
- if (osname.equals("Linux") || osname.contains("OS X")) {
+ if (osname.equals("Linux") || osname.equals("FreeBSD") || osname.equals("NetBSD") || osname.equals("OpenBSD") || osname.equals("OS X")) {
execCmd = new String[ncomps];
execCmd[n++] = "/usr/bin/lpr";
if ((pFlags & PRINTER) != 0) {
--- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2012-08-10 10:29:20.000000000 -0700
+++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java 2012-08-19 12:39:57.000000000 -0700
@@ -83,7 +83,8 @@
String osname = System.getProperty("os.name");
if (osname.startsWith("SunOS")) {
gssLibs = new String[]{ "libgss.so" };
- } else if (osname.startsWith("Linux")) {
+ } else if (osname.startsWith("Linux") ||
+ osname.endsWith("BSD")) {
gssLibs = new String[]{
"libgssapi.so",
"libgssapi_krb5.so",
--- jdk/src/share/classes/sun/swing/FilePane.java 2012-08-10 10:29:34.000000000 -0700
+++ jdk/src/share/classes/sun/swing/FilePane.java 2012-08-19 12:39:57.000000000 -0700
@@ -35,7 +35,6 @@
import java.util.List;
import java.util.concurrent.Callable;
-import javax.accessibility.AccessibleContext;
import javax.swing.*;
import javax.swing.border.*;
import javax.swing.event.*;
@@ -83,9 +82,6 @@
private JPanel currentViewPanel;
private String[] viewTypeActionNames;
- private String filesListAccessibleName = null;
- private String filesDetailsAccessibleName = null;
-
private JPopupMenu contextMenu;
private JMenu viewMenu;
@@ -454,9 +450,6 @@
gigaByteString = UIManager.getString("FileChooser.fileSizeGigaBytes", l);
fullRowSelection = UIManager.getBoolean("FileView.fullRowSelection");
- filesListAccessibleName = UIManager.getString("FileChooser.filesListAccessibleName", l);
- filesDetailsAccessibleName = UIManager.getString("FileChooser.filesDetailsAccessibleName", l);
-
renameErrorTitleText = UIManager.getString("FileChooser.renameErrorTitleText", l);
renameErrorText = UIManager.getString("FileChooser.renameErrorText", l);
renameErrorFileExistsText = UIManager.getString("FileChooser.renameErrorFileExistsText", l);
@@ -641,9 +634,6 @@
if (listViewBorder != null) {
scrollpane.setBorder(listViewBorder);
}
-
- list.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, filesListAccessibleName);
-
p.add(scrollpane, BorderLayout.CENTER);
return p;
}
@@ -1238,8 +1228,6 @@
detailsTableModel.fireTableStructureChanged();
- detailsTable.putClientProperty(AccessibleContext.ACCESSIBLE_NAME_PROPERTY, filesDetailsAccessibleName);
-
return p;
} // createDetailsView
--- jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2012-08-10 10:29:42.000000000 -0700
+++ jdk/src/share/classes/sun/tools/attach/META-INF/services/com.sun.tools.attach.spi.AttachProvider 2012-08-19 12:39:58.000000000 -0700
@@ -30,4 +30,5 @@
#[solaris]sun.tools.attach.SolarisAttachProvider
#[windows]sun.tools.attach.WindowsAttachProvider
#[linux]sun.tools.attach.LinuxAttachProvider
+#[bsd]sun.tools.attach.BsdAttachProvider
#[macosx]sun.tools.attach.BsdAttachProvider
--- jdk/src/share/classes/sun/tools/jar/Main.java 2012-08-10 10:29:42.000000000 -0700
+++ jdk/src/share/classes/sun/tools/jar/Main.java 2012-08-19 12:39:58.000000000 -0700
@@ -51,6 +51,7 @@
String zname = "";
String[] files;
String rootjar = null;
+ String cwd;
// An entryName(path)->File map generated during "expand", it helps to
// decide whether or not an existing entry in a jar file needs to be
@@ -867,6 +868,19 @@
* Extracts specified entries from JAR file.
*/
void extract(InputStream in, String files[]) throws IOException {
+ // Current working directory
+
+ cwd = System.getProperty("user.dir");
+ if (cwd == null) {
+ fatalError(getMsg("error.no.cwd"));
+ }
+ cwd = (new File(cwd)).getCanonicalPath();
+ if (!cwd.endsWith(File.separator)) {
+ cwd += File.separator;
+ }
+
+ // Extract the files
+
ZipInputStream zis = new ZipInputStream(in);
ZipEntry e;
// Set of all directory entries specified in archive. Disallows
@@ -897,6 +911,19 @@
* Extracts specified entries from JAR file, via ZipFile.
*/
void extract(String fname, String files[]) throws IOException {
+ // Current working directory
+
+ cwd = System.getProperty("user.dir");
+ if (cwd == null) {
+ fatalError(getMsg("error.no.cwd"));
+ }
+ cwd = (new File(cwd)).getCanonicalPath();
+ if (!cwd.endsWith(File.separator)) {
+ cwd += File.separator;
+ }
+
+ // Extract the files
+
ZipFile zf = new ZipFile(fname);
Set<ZipEntry> dirs = newDirSet();
Enumeration<? extends ZipEntry> zes = zf.entries();
@@ -928,6 +955,10 @@
ZipEntry rc = null;
String name = e.getName();
File f = new File(e.getName().replace('/', File.separatorChar));
+ if (!f.getCanonicalPath().startsWith(cwd)) {
+ output(formatMsg("out.ignore.entry", name));
+ return null;
+ }
if (e.isDirectory()) {
if (f.exists()) {
if (!f.isDirectory()) {
@@ -949,6 +980,10 @@
} else {
if (f.getParent() != null) {
File d = new File(f.getParent());
+ if (!d.getCanonicalPath().startsWith(cwd)) {
+ output(formatMsg("out.ignore.entry", name));
+ return null;
+ }
if (!d.exists() && !d.mkdirs() || !d.isDirectory()) {
throw new IOException(formatMsg(
"error.create.dir", d.getPath()));
--- jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2012-08-10 10:29:42.000000000 -0700
+++ jdk/src/share/classes/sun/tools/jar/resources/jar.properties 2012-08-19 12:39:58.000000000 -0700
@@ -44,6 +44,8 @@
{0} : could not create directory
error.incorrect.length=\
incorrect length while processing: {0}
+error.no.cwd=\
+ {0} : could not determine current working directory
out.added.manifest=\
added manifest
out.update.manifest=\
--- jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2012-08-10 10:30:07.000000000 -0700
+++ jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt 2012-08-19 12:39:59.000000000 -0700
@@ -38,6 +38,7 @@
# gnumake JDK=<java_home> OSNAME=solaris [OPT=true] [LIBARCH=sparcv9]
# gnumake JDK=<java_home> OSNAME=linux [OPT=true]
# gnumake JDK=<java_home> OSNAME=win32 [OPT=true]
+# gnumake JDK=<java_home> OSNAME=bsd [OPT=true]
#
########################################################################
@@ -120,6 +121,29 @@
LINK_SHARED=link -dll -out:$@
endif
+# BSD GNU C Compiler
+ifeq ($(OSNAME), bsd)
+ # GNU Compiler options needed to build it
+ COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer
+ # Options that help find errors
+ COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses
+ ifeq ($(OPT), true)
+ CFLAGS=-O2 $(COMMON_FLAGS)
+ else
+ CFLAGS=-g $(COMMON_FLAGS)
+ endif
+ # Object files needed to create library
+ OBJECTS=$(SOURCES:%.c=%.o)
+ # Library name and options needed to build it
+ # XXX: Needs to be fixed for MacOS X
+ LIBRARY=lib$(LIBNAME).so
+ LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text
+ # Libraries we are dependent on
+ LIBRARIES=-lc
+ # Building a shared library
+ LINK_SHARED=$(LINK.c) -shared -o $@
+endif
+
# Common -I options
CFLAGS += -I.
CFLAGS += -I../agent_util
--- jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2012-08-10 10:30:16.000000000 -0700
+++ jdk/src/share/native/com/sun/java/util/jar/pack/defines.h 2012-08-19 12:39:59.000000000 -0700
@@ -93,7 +93,7 @@
// bytes and byte arrays
typedef unsigned int uint;
-#if !defined(MACOSX) || (defined(MACOSX) && defined(NO_ZLIB))
+#if !defined(_ALLBSD_SOURCE) || (defined(_ALLBSD_SOURCE) && defined(NO_ZLIB))
#ifdef _LP64
typedef unsigned int uLong; // Historical zlib, should be 32-bit.
#else
--- jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2012-08-10 10:30:18.000000000 -0700
+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h 2012-08-19 12:39:59.000000000 -0700
@@ -64,7 +64,7 @@
// following is needed for _LP64
-#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_MACOSX))
+#if ((X_PLATFORM == X_SOLARIS) || (X_PLATFORM == X_LINUX) || (X_PLATFORM == X_BSD) || (X_PLATFORM == X_MACOSX))
#include <sys/types.h>
#endif
--- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2012-08-10 10:30:19.000000000 -0700
+++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h 2012-08-19 12:39:59.000000000 -0700
@@ -24,6 +24,9 @@
* questions.
*/
+#ifdef __OpenBSD__
+#include <sys/types.h>
+#endif
#ifdef _ALLBSD_SOURCE
#include <machine/endian.h>
#elif __linux__
@@ -32,6 +35,12 @@
#endif
#include "jfdlibm.h"
+/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */
+#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \
+ _BYTE_ORDER == _BIG_ENDIAN
+#undef _LITTLE_ENDIAN
+#endif
+
#ifdef __NEWVALID /* special setup for Sun test regime */
#if defined(i386) || defined(i486) || \
defined(intel) || defined(x86) || defined(arm) || \
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2012-08-10 10:30:27.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv2x2_f.c 2012-08-19 12:39:59.000000000 -0700
@@ -86,7 +86,7 @@
#endif /* MLIB_USE_FTOI_CLAMPING */
/***************************************************************/
-#if defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG)
+#if (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG)
/* NB: Explicit cast to DTYPE is necessary to avoid warning from Microsoft VC compiler.
And we need to explicitly define cast behavior if source exceeds destination range.
@@ -103,7 +103,7 @@
dp[0 ] = (DTYPE) ((res0) & DTYPE_MASK); \
dp[chan1] = (DTYPE) ((res1) & DTYPE_MASK)
-#endif /* defined(_LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */
+#endif /* (BYTE_ORDER == LITTLE_ENDIAN) && !defined(_NO_LONGLONG) */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -114,17 +114,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | ((mlib_s64)sp[0] & 0xffffffff)
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | ((mlib_s64)sp[chan1] & 0xffffffff)
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2012-08-10 10:30:27.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16ext.c 2012-08-19 12:39:59.000000000 -0700
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -138,7 +138,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -149,17 +149,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2012-08-10 10:30:27.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_16nw.c 2012-08-19 12:39:59.000000000 -0700
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -106,7 +106,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -117,17 +117,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8ext.c 2012-08-19 12:39:59.000000000 -0700
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -138,7 +138,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -149,17 +149,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_8nw.c 2012-08-19 12:39:59.000000000 -0700
@@ -95,7 +95,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -107,7 +107,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -118,17 +118,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16ext.c 2012-08-19 12:39:59.000000000 -0700
@@ -126,7 +126,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -138,7 +138,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -149,17 +149,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageConv_u16nw.c 2012-08-19 12:39:59.000000000 -0700
@@ -94,7 +94,7 @@
#define D2I(x) CLAMP_S32((x) SAT_OFF)
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define STORE2(res0, res1) \
dp[0 ] = res1; \
@@ -106,7 +106,7 @@
dp[0 ] = res0; \
dp[chan1] = res1
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
#ifdef _NO_LONGLONG
@@ -117,17 +117,17 @@
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[chan1]) << 32) | S64TOS32((mlib_s64)sp[0])
-#else /* _LITTLE_ENDIAN */
+#else
#define LOAD_BUFF(buff) \
*(mlib_s64*)(buff + i) = (((mlib_s64)sp[0]) << 32) | S64TOS32((mlib_s64)sp[chan1])
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#endif /* _NO_LONGLONG */
/***************************************************************/
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageCopy_Bit.c 2012-08-19 12:39:59.000000000 -0700
@@ -95,7 +95,7 @@
dst = dp[0];
if (ld_offset + size < 32) {
dmask = (mask0 << (32 - size)) >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 >> (ld_offset - ls_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -104,12 +104,12 @@
#else
src = (src0 >> (ld_offset - ls_offset));
dp[0] = (dst & (~dmask)) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = mask0 >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 >> (ld_offset - ls_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -118,7 +118,7 @@
#else
src = (src0 >> (ld_offset - ls_offset));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = 32 - ld_offset;
dp++;
ls_offset += j;
@@ -131,7 +131,7 @@
if (ld_offset + size < 32) {
dmask = (mask0 << (32 - size)) >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << shift) | (src1 >> (32 - shift));
@@ -141,12 +141,12 @@
#else
src = (src0 << shift) | (src1 >> (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = mask0 >> ld_offset;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << shift) | (src1 >> (32 - shift));
@@ -156,7 +156,7 @@
#else
src = (src0 << shift) | (src1 >> (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = 32 - ld_offset;
dp++;
sp++;
@@ -164,19 +164,19 @@
}
if (j < size) src1 = sp[0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
for (; j <= size - 32; j += 32) {
src0 = src1;
src1 = sp[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24);
#else
dp[0] = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp++;
dp++;
}
@@ -187,7 +187,7 @@
if (ls_offset + j > 32) src1 = sp[1];
dst = dp[0];
dmask = mask0 << (32 - j);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -196,7 +196,7 @@
#else
src = (src0 << ls_offset) | (src1 >> (32 - ls_offset));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
#else /* _LONGLONG */
@@ -315,7 +315,7 @@
dst = dp[0];
if (ld_offset >= size) {
dmask = (lmask0 << (32 - size)) >> (ld_offset - size);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 << (ls_offset - ld_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -324,12 +324,12 @@
#else
src = (src0 << (ls_offset - ld_offset));
dp[0] = (dst & (~dmask)) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = lmask0 << (32 - ld_offset);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src = (src0 << (ls_offset - ld_offset));
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -338,7 +338,7 @@
#else
src = (src0 << (ls_offset - ld_offset));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = ld_offset;
dp--;
ls_offset -= j;
@@ -351,7 +351,7 @@
if (ld_offset >= size) {
dmask = (lmask0 << (32 - size)) >> (ld_offset - size);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> shift) | (src1 << (32 - shift));
@@ -361,12 +361,12 @@
#else
src = (src0 >> shift) | (src1 << (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
return;
}
dmask = lmask0 << (32 - ld_offset);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src0 = (src0 << 24) | ((src0 & 0xFF00) << 8) | ((src0 >> 8) & 0xFF00) | (src0 >> 24);
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> shift) | (src1 << (32 - shift));
@@ -376,7 +376,7 @@
#else
src = (src0 >> shift) | (src1 << (32 - shift));
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
j = ld_offset;
dp--;
sp--;
@@ -384,22 +384,22 @@
}
if (j < size) src1 = sp[0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
#ifdef __SUNPRO_C
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (; j <= size - 32; j += 32) {
src0 = src1;
src1 = sp[-1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
dp[0] = (src << 24) | ((src & 0xFF00) << 8) | ((src >> 8) & 0xFF00) | (src >> 24);
#else
dp[0] = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp--;
dp--;
}
@@ -410,7 +410,7 @@
if (ls_offset < j) src1 = sp[-1];
dst = dp[0];
dmask = lmask0 >> (32 - j);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
src1 = (src1 << 24) | ((src1 & 0xFF00) << 8) | ((src1 >> 8) & 0xFF00) | (src1 >> 24);
src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
dst = (dst << 24) | ((dst & 0xFF00) << 8) | ((dst >> 8) & 0xFF00) | (dst >> 24);
@@ -419,7 +419,7 @@
#else
src = (src0 >> (32 - ls_offset)) | (src1 << ls_offset);
dp[0] = (dst & ~dmask) | (src & dmask);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
#else /* _LONGLONG */
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c 2012-08-19 12:39:59.000000000 -0700
@@ -168,7 +168,7 @@
}
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define READ_U8_D64(table0, table1, table2, table3) \
t0 = *(mlib_d64*)((mlib_u8*)table0 + ((s0 << 3) & 0x7F8)); \
@@ -184,7 +184,7 @@
t2 = *(mlib_d64*)((mlib_u8*)table2 + ((s0 >> 5) & 0x7F8)); \
t3 = *(mlib_d64*)((mlib_u8*)table3 + ((s0 << 3) & 0x7F8))
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
void mlib_ImageLookUp_U8_D64(const mlib_u8 *src,
@@ -613,7 +613,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 8, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
@@ -623,12 +623,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
@@ -638,7 +638,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[4] = t0;
dp[5] = t1;
@@ -646,7 +646,7 @@
dp[7] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
@@ -656,12 +656,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
@@ -671,7 +671,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
@@ -719,7 +719,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 12, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -733,14 +733,14 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -754,7 +754,7 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[6] = t0;
dp[7] = t1;
@@ -764,7 +764,7 @@
dp[11] = t5;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -778,14 +778,14 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -799,7 +799,7 @@
t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[6] = t0;
dp[7] = t1;
dp[8] = t2;
@@ -852,7 +852,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 16, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -862,12 +862,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
@@ -877,12 +877,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -892,12 +892,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
@@ -907,7 +907,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[12] = t0;
dp[13] = t1;
@@ -915,7 +915,7 @@
dp[15] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
@@ -925,12 +925,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
@@ -940,12 +940,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8));
@@ -955,12 +955,12 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8));
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8));
@@ -970,7 +970,7 @@
t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8));
t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8));
t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_Bit.c 2012-08-19 12:39:59.000000000 -0700
@@ -88,7 +88,7 @@
} d64_2_f32;
/***************************************************************/
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
static const mlib_u32 mlib_bit_mask[16] = {
0x00000000u, 0xFF000000u, 0x00FF0000u, 0xFFFF0000u,
@@ -126,7 +126,7 @@
0x00000000u, 0x00FFFFFFu, 0xFF000000u, 0xFFFFFFFFu
};
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
mlib_status mlib_ImageLookUp_Bit_U8_1(const mlib_u8 *src,
@@ -228,13 +228,13 @@
#endif /* __SUNPRO_C */
for (; i <= (size - 16); i += 16) {
s0 = *(mlib_u16*)sa;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*da++ = dd_array[s0 & 0xFF];
*da++ = dd_array[s0 >> 8];
#else
*da++ = dd_array[s0 >> 8];
*da++ = dd_array[s0 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sa += 2;
}
@@ -258,20 +258,20 @@
val1 = p_dd[2*val0+1];
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u32*)da)[0] = (val1 & emask) | (((mlib_u32*)da)[0] &~ emask);
#else /* _NO_LONGLONG */
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
mlib_u64 emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8);
#else
mlib_u64 emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u64*)da)[0] = (((mlib_u64*)dd_array)[sa[0]] & emask) | (((mlib_u64*)da)[0] &~ emask);
@@ -323,13 +323,13 @@
val0 = table[0][0];
val1 = table[0][1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
val0 = val0 | (table[1][0] << 8);
val1 = val1 | (table[1][1] << 8);
#else
val0 = (val0 << 8) | table[1][0];
val1 = (val1 << 8) | table[1][1];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
val0 |= (val0 << 16);
val1 |= (val1 << 16);
@@ -394,11 +394,11 @@
dd1 = dd2;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u32*)da)[0] = (dd1 & emask) | (((mlib_u32*)da)[0] &~ emask);
#else /* _NO_LONGLONG */
@@ -412,11 +412,11 @@
dd = ((mlib_u64*)dd_array)[s0 & 0xf];
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u64)((mlib_s64)(-1)) >> ((8 - (size - i)) * 8);
#else
emask = (mlib_s64)(-1) << ((8 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u64*)da)[0] = (dd & emask) | (((mlib_u64*)da)[0] &~ emask);
#endif /* _NO_LONGLONG */
@@ -462,7 +462,7 @@
buffs = buff + size;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
l0 = (table[0][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]);
h0 = (table[0][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]);
l1 = (l0 >> 8); l1 |= (l1 << 24);
@@ -476,7 +476,7 @@
h1 = (h0 << 8); h1 |= (h1 >> 24);
l2 = (l1 << 8); l2 |= (l2 >> 24);
h2 = (h1 << 8); h2 |= (h2 >> 24);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/* calculate lookup table */
#ifdef __SUNPRO_C
@@ -564,11 +564,11 @@
dd = ((mlib_u32*)(d_array12 + (s0 & 0xF)))[1];
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
emask = (mlib_u32)((mlib_s32)(-1)) >> ((4 - (size - i)) * 8);
#else
emask = (mlib_s32)(-1) << ((4 - (size - i)) * 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = (dd & emask) | (da[0] &~ emask);
}
@@ -611,13 +611,13 @@
buffs = buff + size;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
l = (table[3][0] << 24) | (table[2][0] << 16) | (table[1][0] << 8) | (table[0][0]);
h = (table[3][1] << 24) | (table[2][1] << 16) | (table[1][1] << 8) | (table[0][1]);
#else
l = (table[0][0] << 24) | (table[1][0] << 16) | (table[2][0] << 8) | (table[3][0]);
h = (table[0][1] << 24) | (table[1][1] << 16) | (table[2][1] << 8) | (table[3][1]);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
((mlib_u32*)lh)[0] = l; ((mlib_u32*)lh)[1] = l;
((mlib_u32*)lh)[2] = l; ((mlib_u32*)lh)[3] = h;
--- jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2012-08-10 10:30:28.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageUtils.c 2012-08-19 12:39:59.000000000 -0700
@@ -30,7 +30,7 @@
typedef union {
mlib_d64 db;
struct {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
mlib_s32 int1, int0;
#else
mlib_s32 int0, int1;
--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2012-08-10 10:30:29.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageCopy.c 2012-08-19 12:39:59.000000000 -0700
@@ -275,11 +275,11 @@
for (i = 0; j <= (b_size - 4); j += 4, i++) {
src0 = src1;
src1 = pws[i + 1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
pwd[i] = (src0 >> lshift) | (src1 << rshift);
#else
pwd[i] = (src0 << lshift) | (src1 >> rshift);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
sa += i << 2;
@@ -381,11 +381,11 @@
for (; j <= (src_width - 4); j += 4) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s32 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);
#else
*((mlib_s32 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -414,11 +414,11 @@
for (; j <= (src_width - 8); j += 8) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);
#else
*((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -484,11 +484,11 @@
for (; j <= (src_width - 2); j += 2) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s32 *) (pdst_row + j)) = (src0 >> 16) | (src1 << 16);
#else
*((mlib_s32 *) (pdst_row + j)) = (src0 << 16) | (src1 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -516,11 +516,11 @@
for (; j <= (src_width - 4); j += 4) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s64 *) (pdst_row + j)) = (src0 >> shl) | (src1 << shr);
#else
*((mlib_s64 *) (pdst_row + j)) = (src0 << shl) | (src1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -585,11 +585,11 @@
for (; j <= (src_width - 2); j += 2) {
src0 = src1;
src1 = ps[1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*((mlib_s64 *) (pdst_row + j)) = (src0 >> 32) | (src1 << 32);
#else
*((mlib_s64 *) (pdst_row + j)) = (src0 << 32) | (src1 >> 32);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
ps++;
}
}
@@ -687,11 +687,11 @@
#endif /* __SUNPRO_C */
for (; n > SIZE; n -= SIZE) {
s1 = *tmp++;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*(TYPE *) dp = (s0 >> shl) | (s1 << shr);
#else
*(TYPE *) dp = (s0 << shl) | (s1 >> shr);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = s1;
dp += SIZE;
sp += SIZE;
--- jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2012-08-10 10:30:29.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_c_ImageLookUp_f.c 2012-08-19 12:39:59.000000000 -0700
@@ -120,7 +120,7 @@
} \
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
/***************************************************************/
#define READ_U8_U8_ALIGN(table0, table1, table2, table3) \
@@ -163,7 +163,7 @@
t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 14) & 0x3FC)); \
t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 >> 22) & 0x3FC))
-#else /* _LITTLE_ENDIAN */
+#else /* BYTE_ORDER == ... */
/***********/
#define READ_U8_U8_ALIGN(table0, table1, table2, table3) \
@@ -206,7 +206,7 @@
t2 = *(mlib_u32*)((mlib_u8*)table2 + ((s0 >> 6) & 0x3FC)); \
t3 = *(mlib_u32*)((mlib_u8*)table3 + ((s0 << 2) & 0x3FC))
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
/***************************************************************/
void mlib_c_ImageLookUp_U8_U8(const mlib_u8 *src,
@@ -297,11 +297,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab[s2 >> 8];
#else
*dp++ = tab[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
for (; i < size; i++, dp++, sp++)
@@ -403,11 +403,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab0[s2 >> 8];
#else
*dp++ = tab0[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
@@ -544,11 +544,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab1[s2 >> 8];
#else
*dp++ = tab1[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
@@ -694,11 +694,11 @@
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = tab0[s2 >> 8];
#else
*dp++ = tab0[s2 & 0xFF];
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sp = (mlib_u8 *) sa;
i += 5;
@@ -1852,21 +1852,21 @@
s0 = tab0[0];
s1 = tab1[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 8) + s0;
#else
s2 = (s0 << 8) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
tab[i - 1] = (mlib_u16) s2;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 8) + s0;
#else
s2 = (s0 << 8) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = (mlib_u16) s2;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -1897,11 +1897,11 @@
for (i = 0; i < size - 3; i += 2, da++, sa += 2) {
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t1 << 16) + t0;
#else
t = (t0 << 16) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
da[0] = t;
@@ -1909,11 +1909,11 @@
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t1 << 16) + t0;
#else
t = (t0 << 16) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = t;
da++;
@@ -1927,13 +1927,13 @@
if (off > 1) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[1] = (t0 >> 8);
dp[0] = t0;
#else
dp[0] = (t0 >> 8);
dp[1] = t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sa++;
size--;
dp += 2;
@@ -1941,11 +1941,11 @@
t0 = tab[sa[0]];
sa++;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = t0;
#else
*dp++ = (t0 >> 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da = (mlib_s32 *) dp;
@@ -1959,11 +1959,11 @@
for (i = 0; i < size - 4; i += 2, da++, sa += 2) {
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t0 >> 8) + (t1 << 8) + (t2 << 24);
#else
t = (t0 << 24) + (t1 << 8) + (t2 >> 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = t2;
s0 = sa[0];
s1 = sa[1];
@@ -1972,29 +1972,29 @@
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t = (t0 >> 8) + (t1 << 8) + (t2 << 24);
#else
t = (t0 << 24) + (t1 << 8) + (t2 >> 8);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = t;
da++;
dp = (mlib_u8 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[0] = (t2 >> 8);
#else
dp[0] = t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
if ((size & 1) == 0) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[2] = (t0 >> 8);
dp[1] = t0;
#else
dp[1] = (t0 >> 8);
dp[2] = t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2012,22 +2012,22 @@
s1 = tab1[0];
s2 = tab2[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s3 = (s2 << 24) + (s1 << 16) + (s0 << 8);
#else
s3 = (s0 << 16) + (s1 << 8) + s2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
tab[i - 1] = s3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s3 = (s2 << 24) + (s1 << 16) + (s0 << 8);
#else
s3 = (s0 << 16) + (s1 << 8) + s2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = s3;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -2064,24 +2064,24 @@
for (i = 0; i < size - 7; i += 4, da += 3, sa += 4) {
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t0 >> 8) + (t1 << 16);
res2 = (t1 >> 16);
#else
da[0] = (t0 << 8) + (t1 >> 16);
res2 = (t1 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += (t0 << 8);
res1 = (t0 >> 24) + t1;
#else
res2 += (t0 >> 8);
res1 = (t0 << 24) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[2];
s1 = sa[3];
da[1] = res2;
@@ -2090,24 +2090,24 @@
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t0 >> 8) + (t1 << 16);
res2 = (t1 >> 16);
#else
da[0] = (t0 << 8) + (t1 >> 16);
res2 = (t1 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab[s0];
t1 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += (t0 << 8);
res1 = (t0 >> 24) + t1;
#else
res2 += (t0 >> 8);
res1 = (t0 << 24) + t1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[1] = res2;
da[2] = res1;
da += 3;
@@ -2143,11 +2143,11 @@
s2 = tab2[0];
s3 = tab3[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0;
#else
s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
@@ -2155,11 +2155,11 @@
tab[i - 1] = s4;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s3 << 24) + (s2 << 16) + (s1 << 8) + s0;
#else
s4 = (s0 << 24) + (s1 << 16) + (s2 << 8) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = s4;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -2225,13 +2225,13 @@
for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) {
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> shift) + (t1 << shift1);
res2 = (t1 >> shift) + (t2 << shift1);
#else
res1 = (t0 << shift) + (t1 >> shift1);
res2 = (t1 << shift) + (t2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = t2;
s0 = sa[0];
s1 = sa[1];
@@ -2241,28 +2241,28 @@
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> shift) + (t1 << shift1);
res2 = (t1 >> shift) + (t2 << shift1);
#else
res1 = (t0 << shift) + (t1 >> shift1);
res2 = (t1 << shift) + (t2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = (da[2] >> shift1);
da[2] = (t2 >> shift) + (t0 << shift1);
#else
t0 = (da[2] << shift1);
da[2] = (t2 << shift) + (t0 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da += 2;
dp = (mlib_u8 *) da + (4 - off);
if ((size & 1) == 0) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[3] = (mlib_u8) (t0 >> 24);
dp[2] = (mlib_u8) (t0 >> 16);
dp[1] = (mlib_u8) (t0 >> 8);
@@ -2272,7 +2272,7 @@
dp[1] = (mlib_u8) (t0 >> 16);
dp[2] = (mlib_u8) (t0 >> 8);
dp[3] = (mlib_u8) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2348,13 +2348,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2363,13 +2363,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[2];
s1 = sa[3];
da[1] = res2;
@@ -2382,13 +2382,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2397,13 +2397,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[1] = res2;
da[2] = res1;
da += 3;
@@ -2455,11 +2455,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
da[0] = res;
}
@@ -2468,11 +2468,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
}
@@ -2496,11 +2496,11 @@
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
sa++;
@@ -2513,13 +2513,13 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
res1 = res2;
s0 = sa[0];
da[0] = res;
@@ -2529,21 +2529,21 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (da[1] >> shift1);
da[1] = (res2 >> shift) + (res1 << shift1);
#else
res1 = (da[1] << shift1);
da[1] = (res2 << shift) + (res1 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2617,13 +2617,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2632,13 +2632,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[2];
s1 = sa[3];
da[1] = res2;
@@ -2651,13 +2651,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
da[0] = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res2 = (t5 << 8) + t4;
#else
da[0] = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res2 = (t4 << 24) + (t5 << 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
s1 = sa[1];
t0 = tab0[s0];
@@ -2666,13 +2666,13 @@
t3 = tab0[s1];
t4 = tab1[s1];
t5 = tab2[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 += ((t1 << 24) + (t0 << 16));
res1 = (t5 << 24) + (t4 << 16) + (t3 << 8) + t2;
#else
res2 += ((t0 << 8) + t1);
res1 = (t2 << 24) + (t3 << 16) + (t4 << 8) + t5;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[1] = res2;
da[2] = res1;
da += 3;
@@ -2724,11 +2724,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
da[0] = res;
}
@@ -2737,11 +2737,11 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
}
@@ -2765,11 +2765,11 @@
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
#else
res1 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
sa++;
@@ -2782,13 +2782,13 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
res1 = res2;
s0 = sa[0];
da[0] = res;
@@ -2798,21 +2798,21 @@
t1 = tab1[s0];
t2 = tab2[s0];
t3 = tab3[s0];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res2 = (t3 << 24) + (t2 << 16) + (t1 << 8) + t0;
res = (res1 >> shift) + (res2 << shift1);
#else
res2 = (t0 << 24) + (t1 << 16) + (t2 << 8) + t3;
res = (res1 << shift) + (res2 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (da[1] >> shift1);
da[1] = (res2 >> shift) + (res1 << shift1);
#else
res1 = (da[1] << shift1);
da[1] = (res2 << shift) + (res1 >> shift1);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2863,21 +2863,21 @@
s0 = tab0[0];
s1 = tab1[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 16) + s0;
#else
s2 = (s0 << 16) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
tab[i - 1] = s2;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s2 = (s1 << 16) + s0;
#else
s2 = (s0 << 16) + s1;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[255] = s2;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -2919,11 +2919,11 @@
else {
t0 = tab[*sa++];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = (mlib_u16) (t0);
#else
*dp++ = (mlib_u16) (t0 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da = (mlib_u32 *) dp;
s0 = sa[0];
s1 = sa[1];
@@ -2935,13 +2935,13 @@
for (i = 0; i < size - 4; i += 2, da += 2, sa += 2) {
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + (t2 << 16);
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + (t2 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = t2;
s0 = sa[0];
s1 = sa[1];
@@ -2951,32 +2951,32 @@
t1 = tab[s0];
t2 = tab[s1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + (t2 << 16);
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + (t2 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
da += 2;
dp = (mlib_u16 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[0] = (mlib_u16) (t2 >> 16);
#else
dp[0] = (mlib_u16) t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
if ((size & 1) == 0) {
t0 = tab[sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[2] = (mlib_u16) (t0 >> 16);
dp[1] = (mlib_u16) t0;
#else
dp[1] = (mlib_u16) (t0 >> 16);
dp[2] = (mlib_u16) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -2994,13 +2994,13 @@
s1 = tab1[0];
s2 = tab2[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s3 = (s0 << 16);
s4 = (s2 << 16) + s1;
#else
s3 = s0;
s4 = (s1 << 16) + s2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
@@ -3008,13 +3008,13 @@
tab[2 * i - 1] = s4;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s2 << 16) + s1;
tab[510] = s0 << 16;
#else
s4 = (s1 << 16) + s2;
tab[510] = s0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[511] = s4;
for (j = 0; j < ysize; j++, dst += dlb, src += slb) {
@@ -3050,13 +3050,13 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + t2;
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0] << 3;
s1 = sa[1] << 3;
da[0] = res1;
@@ -3068,13 +3068,13 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t0 >> 16) + (t1 << 16);
res2 = (t1 >> 16) + t2;
#else
res1 = (t0 << 16) + (t1 >> 16);
res2 = (t1 << 16) + t2;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
da[2] = t3;
@@ -3105,13 +3105,13 @@
s2 = tab2[0];
s3 = tab3[0];
for (i = 1; i < 256; i++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s1 << 16) + s0;
s5 = (s3 << 16) + s2;
#else
s4 = (s0 << 16) + s1;
s5 = (s2 << 16) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = tab0[i];
s1 = tab1[i];
s2 = tab2[i];
@@ -3120,13 +3120,13 @@
tab[2 * i - 1] = s5;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
s4 = (s1 << 16) + s0;
s5 = (s3 << 16) + s2;
#else
s4 = (s0 << 16) + s1;
s5 = (s2 << 16) + s3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
tab[510] = s4;
tab[511] = s5;
@@ -3181,18 +3181,18 @@
t4 = tab[2 * sa[0]];
t5 = tab[2 * sa[0] + 1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*dp++ = (mlib_u16) (t4);
#else
*dp++ = (mlib_u16) (t4 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
sa++;
da = (mlib_u32 *) dp;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
*da++ = (t4 >> 16) + (t5 << 16);
#else
*da++ = (t4 << 16) + (t5 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0] << 3;
s1 = sa[1] << 3;
sa += 2;
@@ -3205,7 +3205,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t5 >> 16) + (t0 << 16);
res2 = (t0 >> 16) + (t1 << 16);
res3 = (t1 >> 16) + (t2 << 16);
@@ -3215,7 +3215,7 @@
res2 = (t0 << 16) + (t1 >> 16);
res3 = (t1 << 16) + (t2 >> 16);
res4 = (t2 << 16) + (t3 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0] << 3;
s1 = sa[1] << 3;
da[0] = res1;
@@ -3229,7 +3229,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab + s0 + 4);
t2 = *(mlib_u32 *) ((mlib_u8 *) tab + s1);
t3 = *(mlib_u32 *) ((mlib_u8 *) tab + s1 + 4);
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
res1 = (t5 >> 16) + (t0 << 16);
res2 = (t0 >> 16) + (t1 << 16);
res3 = (t1 >> 16) + (t2 << 16);
@@ -3239,36 +3239,36 @@
res2 = (t0 << 16) + (t1 >> 16);
res3 = (t1 << 16) + (t2 >> 16);
res4 = (t2 << 16) + (t3 >> 16);
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
da[0] = res1;
da[1] = res2;
da[2] = res3;
da[3] = res4;
da += 4;
dp = (mlib_u16 *) da;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[0] = (mlib_u16) (t3 >> 16);
#else
dp[0] = (mlib_u16) t3;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
if ((size & 1) == 0) {
t0 = tab[2 * sa[0]];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[2] = (mlib_u16) (t0 >> 16);
dp[1] = (mlib_u16) t0;
#else
dp[1] = (mlib_u16) (t0 >> 16);
dp[2] = (mlib_u16) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
t0 = tab[2 * sa[0] + 1];
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
dp[4] = (mlib_u16) (t0 >> 16);
dp[3] = (mlib_u16) t0;
#else
dp[3] = (mlib_u16) (t0 >> 16);
dp[4] = (mlib_u16) t0;
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
}
}
}
@@ -3439,7 +3439,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 8, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
@@ -3449,12 +3449,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
@@ -3464,7 +3464,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[4] = t0;
dp[5] = t1;
@@ -3472,7 +3472,7 @@
dp[7] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
@@ -3482,12 +3482,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
@@ -3497,7 +3497,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
@@ -3545,7 +3545,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 12, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3559,14 +3559,14 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3580,7 +3580,7 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[6] = t0;
dp[7] = t1;
@@ -3590,7 +3590,7 @@
dp[11] = t5;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3604,14 +3604,14 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
dp[4] = t4;
dp[5] = t5;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3625,7 +3625,7 @@
t3 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t4 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t5 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[6] = t0;
dp[7] = t1;
dp[8] = t2;
@@ -3678,7 +3678,7 @@
#pragma pipeloop(0)
#endif /* __SUNPRO_C */
for (i = 0; i < size - 7; i += 4, dp += 16, sa++) {
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3688,12 +3688,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
@@ -3703,12 +3703,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3718,12 +3718,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
@@ -3733,7 +3733,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
s0 = sa[0];
dp[12] = t0;
dp[13] = t1;
@@ -3741,7 +3741,7 @@
dp[15] = t3;
}
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 << 2) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
@@ -3751,12 +3751,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 22) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[0] = t0;
dp[1] = t1;
dp[2] = t2;
dp[3] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 6) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
@@ -3766,12 +3766,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 14) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[4] = t0;
dp[5] = t1;
dp[6] = t2;
dp[7] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 14) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 14) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 14) & 0x3FC));
@@ -3781,12 +3781,12 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 6) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 6) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 >> 6) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[8] = t0;
dp[9] = t1;
dp[10] = t2;
dp[11] = t3;
-#ifdef _LITTLE_ENDIAN
+#if (BYTE_ORDER == LITTLE_ENDIAN)
t0 = *(mlib_u32 *) ((mlib_u8 *) tab0 + ((s0 >> 22) & 0x3FC));
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 >> 22) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 >> 22) & 0x3FC));
@@ -3796,7 +3796,7 @@
t1 = *(mlib_u32 *) ((mlib_u8 *) tab1 + ((s0 << 2) & 0x3FC));
t2 = *(mlib_u32 *) ((mlib_u8 *) tab2 + ((s0 << 2) & 0x3FC));
t3 = *(mlib_u32 *) ((mlib_u8 *) tab3 + ((s0 << 2) & 0x3FC));
-#endif /* _LITTLE_ENDIAN */
+#endif /* BYTE_ORDER == LITTLE_ENDIAN */
dp[12] = t0;
dp[13] = t1;
dp[14] = t2;
--- jdk/src/share/native/sun/awt/medialib/mlib_image.h 2012-08-10 10:30:29.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_image.h 2012-08-19 12:39:59.000000000 -0700
@@ -27,9 +27,21 @@
#ifndef MLIB_IMAGE_H
#define MLIB_IMAGE_H
-#ifdef MACOSX
+#ifdef __OpenBSD__
+#include <sys/types.h>
+#endif
+
+#ifdef _ALLBSD_SOURCE
#include <machine/endian.h>
+
+/* BSD's always define both _LITTLE_ENDIAN && _BIG_ENDIAN */
+#if defined(_LITTLE_ENDIAN) && defined(_BIG_ENDIAN) && \
+ _BYTE_ORDER == _BIG_ENDIAN
+#undef _LITTLE_ENDIAN
#endif
+
+#endif /* _ALLBSD_SOURCE */
+
#include <mlib_types.h>
#include <mlib_status.h>
#include <mlib_sys.h>
--- jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2012-08-10 10:30:30.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_sys.c 2012-08-19 12:39:59.000000000 -0700
@@ -26,7 +26,7 @@
#include <stdlib.h>
#include <string.h>
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
#include <unistd.h>
#include <sys/param.h>
#endif
@@ -90,7 +90,10 @@
* alignment. -- from stdlib.h of MS VC++5.0.
*/
return (void *) malloc(size);
-#elif defined(MACOSX)
+#elif defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
+ void *ret;
+ return posix_memalign(&ret, 8, size) ? NULL : ret;
+#elif defined(_ALLBSD_SOURCE)
return valloc(size);
#else
return (void *) memalign(8, size);
--- jdk/src/share/native/sun/awt/medialib/mlib_types.h 2012-08-10 10:30:30.000000000 -0700
+++ jdk/src/share/native/sun/awt/medialib/mlib_types.h 2012-08-19 12:39:59.000000000 -0700
@@ -59,8 +59,16 @@
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(__GNUC__)
+#if defined(_ALLBSD_SOURCE)
#include <stddef.h> /* for ptrdiff_t */
#include <stdint.h> /* for uintptr_t */
+#elif defined(__linux__)
+#include <stdint.h> /* for uintptr_t */
+#include <malloc.h> /* for ptrdiff_t */
+#else
+#include <link.h> /* for uintptr_t */
+#include <stddef.h> /* for ptrdiff_t */
+#endif /* __linux__ */
#if defined(MLIB_OS64BIT) || (defined(MACOSX) && defined(_LP64))
--- jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2012-08-10 10:31:05.000000000 -0700
+++ jdk/src/share/native/sun/java2d/opengl/OGLBlitLoops.c 2012-08-19 12:40:00.000000000 -0700
@@ -393,16 +393,7 @@
OGLSDOps *dstOps,
jint dx1, jint dy1, jint dx2, jint dy2)
{
- jboolean adjustAlpha = (pf != NULL && !pf->hasAlpha);
j2d_glBindTexture(dstOps->textureTarget, dstOps->textureID);
-
- if (adjustAlpha) {
- // if the source surface does not have an alpha channel,
- // we need to ensure that the alpha values are forced to 1.0f
- j2d_glPixelTransferf(GL_ALPHA_SCALE, 0.0f);
- j2d_glPixelTransferf(GL_ALPHA_BIAS, 1.0f);
- }
-
// in case pixel stride is not a multiple of scanline stride the copy
// has to be done line by line (see 6207877)
if (srcInfo->scanStride % srcInfo->pixelStride != 0) {
@@ -422,11 +413,6 @@
dx1, dy1, dx2-dx1, dy2-dy1,
pf->format, pf->type, srcInfo->rasBase);
}
- if (adjustAlpha) {
- // restore scale/bias to their original values
- j2d_glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
- j2d_glPixelTransferf(GL_ALPHA_BIAS, 0.0f);
- }
}
/**
--- jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2012-08-10 10:31:05.000000000 -0700
+++ jdk/src/share/native/sun/java2d/opengl/OGLFuncs.h 2012-08-19 12:40:00.000000000 -0700
@@ -26,7 +26,7 @@
#ifndef OGLFuncs_h_Included
#define OGLFuncs_h_Included
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
#include <dlfcn.h>
#endif
#include "jni.h"
--- jdk/src/solaris/back/util_md.h 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/back/util_md.h 2012-08-19 12:40:00.000000000 -0700
@@ -51,7 +51,7 @@
/* On little endian machines, convert java big endian numbers. */
-#if defined(_LITTLE_ENDIAN)
+#if (BYTE_ORDER == LITTLE_ENDIAN)
#define HOST_TO_JAVA_CHAR(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
#define HOST_TO_JAVA_SHORT(x) (((x & 0xff) << 8) | ((x >> 8) & (0xff)))
--- jdk/src/solaris/bin/ergo.c 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/ergo.c 2012-08-19 12:40:00.000000000 -0700
@@ -100,6 +100,27 @@
/* Compute physical memory by asking the OS */
uint64_t
physical_memory(void) {
+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+ uint64_t result;
+#ifdef HW_PHYSMEM64
+ int64_t physmem;
+ int name[2] = { CTL_HW, HW_PHYSMEM64 };
+#else
+ unsigned long physmem;
+ int name[2] = { CTL_HW, HW_PHYSMEM };
+#endif
+ size_t physmem_len = sizeof(physmem);
+# define UINT64_FORMAT "%" PRIu64
+
+ if (sysctl(name, 2, &physmem, &physmem_len, NULL, 0) == -1)
+ physmem = 256 * MB;
+
+ result = (uint64_t)physmem;
+
+ JLI_TraceLauncher("physical memory: " UINT64_FORMAT " (%.3fGB)\n",
+ result, result / (double) GB);
+ return result;
+#else /* !_ALLBSD_SOURCE */
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;
@@ -110,4 +131,5 @@
" physical memory: " UINT64_FORMAT " (%.3fGB)\n",
pages, page_size, result, result / (double) GB);
return result;
+#endif
}
--- jdk/src/solaris/bin/ergo.h 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/ergo.h 2012-08-19 12:40:00.000000000 -0700
@@ -33,6 +33,10 @@
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
+#ifdef _ALLBSD_SOURCE
+#include <sys/param.h>
+#include <sys/sysctl.h>
+#endif
#include "java.h"
--- jdk/src/solaris/bin/ergo_i586.c 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/ergo_i586.c 2012-08-19 12:40:00.000000000 -0700
@@ -106,7 +106,7 @@
#endif /* __solaris__ */
-#ifdef __linux__
+#if !defined(MACOSX) && (defined(__linux__) || defined(_ALLBSD_SOURCE))
/*
* A utility method for asking the CPU about itself.
@@ -171,6 +171,12 @@
#endif /* _LP64 */
}
+#ifdef __linux__
+#define OSNAMEPREFIX "linux_"
+#else
+#define OSNAMEPREFIX "bsd_"
+#endif
+
/* The definition of a server-class machine for linux-i586 */
jboolean
ServerClassMachineImpl(void) {
@@ -193,11 +199,11 @@
result = JNI_TRUE;
}
}
- JLI_TraceLauncher("linux_" LIBARCHNAME "_ServerClassMachine: %s\n",
+ JLI_TraceLauncher(OSNAMEPREFIX LIBARCHNAME "_ServerClassMachine: %s\n",
(result == JNI_TRUE ? "true" : "false"));
return result;
}
-#endif /* __linux__ */
+#endif /* !MACOSX && (__linux__ || _ALLBSD_SOURCE) */
/*
* Routines shared by solaris-i586 and linux-i586.
@@ -308,6 +314,15 @@
/* Compute the number of physical processors, not logical processors */
static unsigned long
physical_processors(void) {
+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+ unsigned long result;
+ int name[2] = { CTL_HW, HW_NCPU };
+ size_t rlen = sizeof(result);
+
+ if (sysctl(name, 2, &result, &rlen, NULL, 0) == -1)
+ result = 1;
+ return result;
+#else
const long sys_processors = sysconf(_SC_NPROCESSORS_CONF);
unsigned long result = sys_processors;
@@ -320,4 +335,5 @@
}
JLI_TraceLauncher("physical processors: %lu\n", result);
return result;
+#endif
}
--- jdk/src/solaris/bin/java_md_solinux.c 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/java_md_solinux.c 2012-08-19 12:40:00.000000000 -0700
@@ -951,6 +951,19 @@
return exec_path;
}
+#if !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+/*
+ * BSD's implementation of CounterGet()
+ */
+int64_t
+CounterGet()
+{
+ struct timeval tv;
+ gettimeofday(&tv, NULL);
+ return (tv.tv_sec * 1000) + tv.tv_usec;
+}
+#endif
+
/* --- Splash Screen shared library support --- */
static const char* SPLASHSCREEN_SO = JNI_LIB_NAME("splashscreen");
static void* hSplashLib = NULL;
@@ -982,18 +995,7 @@
int
ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) {
int rslt;
-#ifdef __solaris__
- thread_t tid;
- long flags = 0;
- if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) {
- void * tmp;
- thr_join(tid, NULL, &tmp);
- rslt = (int)tmp;
- } else {
- /* See below. Continue in current thread if thr_create() failed */
- rslt = continuation(args);
- }
-#else /* ! __solaris__ */
+#if !defined(MACOSX) && (defined(__linux__) || defined(_ALLBSD_SOURCE))
pthread_t tid;
pthread_attr_t attr;
pthread_attr_init(&attr);
@@ -1018,7 +1020,18 @@
}
pthread_attr_destroy(&attr);
-#endif /* __solaris__ */
+#else /* ! __linux__ */
+ thread_t tid;
+ long flags = 0;
+ if (thr_create(NULL, stack_size, (void *(*)(void *))continuation, args, flags, &tid) == 0) {
+ void * tmp;
+ thr_join(tid, NULL, &tmp);
+ rslt = (int)tmp;
+ } else {
+ /* See above. Continue in current thread if thr_create() failed */
+ rslt = continuation(args);
+ }
+#endif /* __linux__ */
return rslt;
}
--- jdk/src/solaris/bin/java_md_solinux.h 2012-08-10 10:31:14.000000000 -0700
+++ jdk/src/solaris/bin/java_md_solinux.h 2012-08-19 12:40:00.000000000 -0700
@@ -33,6 +33,10 @@
#include <sys/time.h>
#define CounterGet() (gethrtime()/1000)
#define Counter2Micros(counts) (counts)
+#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+/* CounterGet() is implemented in java_md_solinux.c */
+int64_t CounterGet(void);
+#define Counter2Micros(counts) (counts)
#else /* ! HAVE_GETHRTIME */
#define CounterGet() (0)
#define Counter2Micros(counts) (1)
@@ -48,16 +52,19 @@
#ifdef __linux__
static const char *system_dir = "/usr/java";
static const char *user_dir = "/java";
+#elif !defined(MACOSX) && defined(_ALLBSD_SOURCE)
+static const char *system_dir = PACKAGE_PATH "/openjdk7";
+static const char *user_dir = "/java";
#else /* Solaris */
static const char *system_dir = "/usr/jdk";
static const char *user_dir = "/jdk";
#endif
#include <dlfcn.h>
-#ifdef __solaris__
-#include <thread.h>
-#else
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <pthread.h>
+#else
+#include <thread.h>
#endif
#define JVM_DLL "libjvm.so"
--- jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XTextAreaPeer.java 2012-08-19 12:40:00.000000000 -0700
@@ -105,6 +105,7 @@
this.target = target;
//ComponentAccessor.enableEvents(target,AWTEvent.MOUSE_WHEEL_EVENT_MASK);
+ target.enableInputMethods(true);
firstChangeSkipped = false;
String text = ((TextArea)target).getText();
@@ -112,6 +113,7 @@
jtext.setWrapStyleWord(true);
jtext.getDocument().addDocumentListener(jtext);
XToolkit.specialPeerMap.put(jtext,this);
+ jtext.enableInputMethods(true);
textPane = new AWTTextPane(jtext,this, target.getParent());
setBounds(x, y, width, height, SET_BOUNDS);
@@ -464,6 +466,13 @@
protected boolean setTextImpl(String txt) {
if (jtext != null) {
+ // Please note that we do not want to post an event
+ // if setText() replaces an empty text by an empty text,
+ // that is, if component's text remains unchanged.
+ if (jtext.getDocument().getLength() == 0 && txt.length() == 0) {
+ return true;
+ }
+
// JTextArea.setText() posts two different events (remove & insert).
// Since we make no differences between text events,
// the document listener has to be disabled while
--- jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-08-10 10:31:19.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11/XTextFieldPeer.java 2012-08-19 12:40:00.000000000 -0700
@@ -73,6 +73,8 @@
xtext = new XAWTTextField(text,this, target.getParent());
xtext.getDocument().addDocumentListener(xtext);
xtext.setCursor(target.getCursor());
+ target.enableInputMethods(true);
+ xtext.enableInputMethods(true);
XToolkit.specialPeerMap.put(xtext,this);
TextField txt = (TextField) target;
--- jdk/src/solaris/classes/sun/awt/X11FontManager.java 2012-08-10 10:31:20.000000000 -0700
+++ jdk/src/solaris/classes/sun/awt/X11FontManager.java 2012-08-19 12:40:00.000000000 -0700
@@ -213,7 +213,7 @@
if (fontID != null) {
fileName = (String)fontNameMap.get(fontID);
/* On Linux check for the Lucida Oblique fonts */
- if (fileName == null && FontUtilities.isLinux && !isOpenJDK()) {
+ if (fileName == null && (FontUtilities.isLinux || FontUtilities.isBSD) && !isOpenJDK()) {
if (oblmap == null) {
initObliqueLucidaFontMap();
}
@@ -712,7 +712,7 @@
if (fontConfigDirs == null) {
return;
}
- if (FontUtilities.isLinux) {
+ if (FontUtilities.isLinux || FontUtilities.isBSD) {
fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts");
}
fontdirs = (String[])fontConfigDirs.toArray(new String[0]);
@@ -740,7 +740,7 @@
*/
FontConfiguration mFontConfig = new MFontConfiguration(this);
if (FontUtilities.isOpenSolaris ||
- (FontUtilities.isLinux &&
+ ((FontUtilities.isLinux || FontUtilities.isBSD) &&
(!mFontConfig.foundOsSpecificFile() ||
!mFontConfig.fontFilesArePresent()) ||
(FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) {
--- jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/DefaultFileSystemProvider.java 2012-08-19 12:40:01.000000000 -0700
@@ -68,7 +68,7 @@
return createProvider("sun.nio.fs.SolarisFileSystemProvider");
if (osname.equals("Linux"))
return createProvider("sun.nio.fs.LinuxFileSystemProvider");
- if (osname.equals("Darwin") || osname.contains("OS X"))
+ if (osname.endsWith("BSD") || osname.equals("Darwin") || osname.contains("OS X"))
return createProvider("sun.nio.fs.BsdFileSystemProvider");
throw new AssertionError("Platform not recognized");
}
--- jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/LinuxUserDefinedFileAttributeView.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -55,7 +55,7 @@
name = USER_NAMESPACE + name;
byte[] bytes = name.getBytes();
if (bytes.length > XATTR_NAME_MAX) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "'" + name + "' is too big");
}
return bytes;
@@ -116,7 +116,7 @@
buffer = NativeBuffers.getNativeBuffer(size);
continue;
}
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get list of extended attributes: " +
x.getMessage());
}
@@ -138,7 +138,7 @@
// fgetxattr returns size if called with size==0
return fgetxattr(fd, nameAsBytes(file,name), 0L, 0);
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get size of extended attribute '" + name +
"': " + x.getMessage());
} finally {
@@ -191,7 +191,7 @@
} catch (UnixException x) {
String msg = (x.errno() == ERANGE) ?
"Insufficient space in buffer" : x.getMessage();
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Error reading extended attribute '" + name + "': " + msg);
} finally {
close(fd);
@@ -243,7 +243,7 @@
src.position(pos + rem);
return rem;
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Error writing extended attribute '" + name + "': " +
x.getMessage());
} finally {
@@ -264,7 +264,7 @@
try {
fremovexattr(fd, nameAsBytes(file,name));
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to delete extended attribute '" + name + "': " + x.getMessage());
} finally {
close(fd);
--- jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/LinuxWatchService.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -243,7 +243,7 @@
return x.asIOException(dir);
}
if (!attrs.isDirectory()) {
- return new NotDirectoryException(dir.getPathForExceptionMessage());
+ return new NotDirectoryException(dir.getPathForExecptionMessage());
}
// register with inotify (replaces existing mask if already registered)
--- jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/SolarisAclFileAttributeView.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -324,7 +324,7 @@
return decode(address, n);
} catch (UnixException x) {
if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, x.getMessage() + " (file system does not support NFSv4 ACLs)");
}
x.rethrowAsIOException(file);
@@ -355,7 +355,7 @@
facl(fd, ACE_SETACL, n, address);
} catch (UnixException x) {
if ((x.errno() == ENOSYS) || !isAclsEnabled(fd)) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, x.getMessage() + " (file system does not support NFSv4 ACLs)");
}
if (x.errno() == EINVAL && (n < 3))
--- jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/SolarisUserDefinedFileAttributeView.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -49,7 +49,7 @@
if (bytes.length <= 1 ||
(bytes.length == 2 && bytes[1] == '.'))
{
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "'" + name + "' is not a valid name");
}
}
@@ -96,7 +96,7 @@
}
return Collections.unmodifiableList(list);
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get list of extended attributes: " +
x.getMessage());
}
@@ -126,7 +126,7 @@
close(afd);
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to get size of extended attribute '" + name +
"': " + x.getMessage());
}
@@ -165,7 +165,7 @@
fc.close();
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to read extended attribute '" + name +
"': " + x.getMessage());
}
@@ -201,7 +201,7 @@
fc.close();
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to write extended attribute '" + name +
"': " + x.getMessage());
}
@@ -224,7 +224,7 @@
close(dfd);
}
} catch (UnixException x) {
- throw new FileSystemException(file.getPathForExceptionMessage(),
+ throw new FileSystemException(file.getPathForExecptionMessage(),
null, "Unable to delete extended attribute '" + name +
"': " + x.getMessage());
} finally {
--- jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/SolarisWatchService.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -288,7 +288,7 @@
return x.asIOException(dir);
}
if (!attrs.isDirectory()) {
- return new NotDirectoryException(dir.getPathForExceptionMessage());
+ return new NotDirectoryException(dir.getPathForExecptionMessage());
}
// return existing watch key after updating events if already
--- jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixChannelFactory.java 2012-08-19 12:40:01.000000000 -0700
@@ -36,6 +36,8 @@
import sun.misc.SharedSecrets;
import sun.misc.JavaIOFileDescriptorAccess;
+import com.sun.nio.file.ExtendedOpenOption;
+
import static sun.nio.fs.UnixNativeDispatcher.*;
import static sun.nio.fs.UnixConstants.*;
@@ -84,13 +86,13 @@
}
continue;
}
- if (option == LinkOption.NOFOLLOW_LINKS && supportsNoFollowLinks()) {
+ if (option == LinkOption.NOFOLLOW_LINKS) {
flags.noFollowLinks = true;
continue;
}
if (option == null)
throw new NullPointerException();
- throw new UnsupportedOperationException(option + " not supported");
+ throw new UnsupportedOperationException();
}
return flags;
}
@@ -218,15 +220,6 @@
// follow links by default
boolean followLinks = true;
if (!flags.createNew && (flags.noFollowLinks || flags.deleteOnClose)) {
- if (flags.deleteOnClose && !supportsNoFollowLinks()) {
- try {
- if (UnixFileAttributes.get(path, false).isSymbolicLink())
- throw new UnixException("DELETE_ON_CLOSE specified and file is a symbolic link");
- } catch (UnixException x) {
- if (!flags.create || x.errno() != ENOENT)
- throw x;
- }
- }
followLinks = false;
oflags |= O_NOFOLLOW;
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixCopyFile.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -383,8 +383,8 @@
} catch (UnixException x) {
if (x.errno() == EXDEV) {
throw new AtomicMoveNotSupportedException(
- source.getPathForExceptionMessage(),
- target.getPathForExceptionMessage(),
+ source.getPathForExecptionMessage(),
+ target.getPathForExecptionMessage(),
x.errorString());
}
x.rethrowAsIOException(source, target);
@@ -420,7 +420,7 @@
return; // nothing to do as files are identical
if (!flags.replaceExisting) {
throw new FileAlreadyExistsException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
}
// attempt to delete target
@@ -436,7 +436,7 @@
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{
throw new DirectoryNotEmptyException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
}
x.rethrowAsIOException(target);
}
@@ -489,7 +489,7 @@
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{
throw new DirectoryNotEmptyException(
- source.getPathForExceptionMessage());
+ source.getPathForExecptionMessage());
}
x.rethrowAsIOException(source);
}
@@ -542,7 +542,7 @@
return; // nothing to do as files are identical
if (!flags.replaceExisting)
throw new FileAlreadyExistsException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
try {
if (targetAttrs.isDirectory()) {
rmdir(target);
@@ -555,7 +555,7 @@
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
{
throw new DirectoryNotEmptyException(
- target.getPathForExceptionMessage());
+ target.getPathForExecptionMessage());
}
x.rethrowAsIOException(target);
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixException.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixException.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2009, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -97,8 +97,8 @@
}
void rethrowAsIOException(UnixPath file, UnixPath other) throws IOException {
- String a = (file == null) ? null : file.getPathForExceptionMessage();
- String b = (other == null) ? null : other.getPathForExceptionMessage();
+ String a = (file == null) ? null : file.getPathForExecptionMessage();
+ String b = (other == null) ? null : other.getPathForExecptionMessage();
IOException x = translateToIOException(a, b);
throw x;
}
@@ -108,6 +108,6 @@
}
IOException asIOException(UnixPath file) {
- return translateToIOException(file.getPathForExceptionMessage(), null);
+ return translateToIOException(file.getPathForExecptionMessage(), null);
}
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java 2012-08-10 10:31:24.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixFileSystemProvider.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -238,7 +238,7 @@
// DirectoryNotEmptyException if not empty
if (attrs != null && attrs.isDirectory() &&
(x.errno() == EEXIST || x.errno() == ENOTEMPTY))
- throw new DirectoryNotEmptyException(file.getPathForExceptionMessage());
+ throw new DirectoryNotEmptyException(file.getPathForExecptionMessage());
x.rethrowAsIOException(file);
return false;
@@ -395,13 +395,13 @@
// can't return SecureDirectoryStream on kernels that don't support
// openat, etc.
- if (!supportsAtSysCalls() || !supportsNoFollowLinks()) {
+ if (!supportsAtSysCalls()) {
try {
long ptr = opendir(dir);
return new UnixDirectoryStream(dir, ptr, filter);
} catch (UnixException x) {
if (x.errno() == ENOTDIR)
- throw new NotDirectoryException(dir.getPathForExceptionMessage());
+ throw new NotDirectoryException(dir.getPathForExecptionMessage());
x.rethrowAsIOException(dir);
}
}
@@ -421,7 +421,7 @@
if (dfd2 != -1)
UnixNativeDispatcher.close(dfd2);
if (x.errno() == UnixConstants.ENOTDIR)
- throw new NotDirectoryException(dir.getPathForExceptionMessage());
+ throw new NotDirectoryException(dir.getPathForExecptionMessage());
x.rethrowAsIOException(dir);
}
return new UnixSecureDirectoryStream(dir, dp, dfd2, filter);
@@ -490,7 +490,7 @@
return new UnixPath(link.getFileSystem(), target);
} catch (UnixException x) {
if (x.errno() == UnixConstants.EINVAL)
- throw new NotLinkException(link.getPathForExceptionMessage());
+ throw new NotLinkException(link.getPathForExecptionMessage());
x.rethrowAsIOException(link);
return null; // keep compiler happy
}
--- jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java 2012-08-10 10:31:25.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixNativeDispatcher.java 2012-08-19 12:40:01.000000000 -0700
@@ -548,10 +548,6 @@
return hasAtSysCalls;
}
- static boolean supportsNoFollowLinks() {
- return UnixConstants.O_NOFOLLOW != 0;
- }
-
// initialize syscalls and fieldIDs
private static native int init();
--- jdk/src/solaris/classes/sun/nio/fs/UnixPath.java 2012-08-10 10:31:25.000000000 -0700
+++ jdk/src/solaris/classes/sun/nio/fs/UnixPath.java 2012-08-19 12:40:01.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2008, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -179,7 +179,7 @@
}
// use this message when throwing exceptions
- String getPathForExceptionMessage() {
+ String getPathForExecptionMessage() {
return toString();
}
@@ -767,11 +767,8 @@
// package-private
int openForAttributeAccess(boolean followLinks) throws IOException {
int flags = O_RDONLY;
- if (!followLinks) {
- if (!supportsNoFollowLinks())
- throw new IOException("NOFOLLOW_LINKS is not supported on this platform");
+ if (!followLinks)
flags |= O_NOFOLLOW;
- }
try {
return open(this, flags, 0);
} catch (UnixException x) {
@@ -780,7 +777,7 @@
x.setError(ELOOP);
if (x.errno() == ELOOP)
- throw new FileSystemException(getPathForExceptionMessage(), null,
+ throw new FileSystemException(getPathForExecptionMessage(), null,
x.getMessage() + " or unable to access attributes of symbolic link");
x.rethrowAsIOException(this);
--- jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-08-10 10:31:25.000000000 -0700
+++ jdk/src/solaris/classes/sun/print/UnixPrintServiceLookup.java 2012-08-19 12:40:01.000000000 -0700
@@ -125,6 +125,7 @@
static boolean isBSD() {
return (osname.equals("Linux") ||
+ osname.endsWith("BSD") ||
osname.contains("OS X"));
}
--- jdk/src/solaris/javavm/export/jvm_md.h 2012-08-10 10:31:28.000000000 -0700
+++ jdk/src/solaris/javavm/export/jvm_md.h 2012-08-19 12:40:01.000000000 -0700
@@ -75,7 +75,11 @@
#define JVM_O_O_APPEND O_APPEND
#define JVM_O_EXCL O_EXCL
#define JVM_O_CREAT O_CREAT
+#if !defined(__APPLE__) && defined(_ALLBSD_SOURCE)
+#define JVM_O_DELETE 0x10000000
+#else
#define JVM_O_DELETE 0x10000
+#endif
/* Signals */
--- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2012-08-10 10:31:28.000000000 -0700
+++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -168,6 +168,9 @@
/*
* XXXBSD: there's no way available to get swap info in
* FreeBSD. Usage of libkvm is not an option here
+ *
+ * XXX: Investigate how swapinfo(8) does this.
+ * Total swap is in vm.swap_total
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (0);
@@ -242,6 +245,8 @@
#else /* _ALLBSD_SOURCE */
/*
* XXXBSD: there's no way available to do it in FreeBSD, AFAIK.
+ *
+ * XXX: Determine how linprocfs gets this.
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (64 * MB);
@@ -323,6 +328,8 @@
#elif defined(_ALLBSD_SOURCE)
/*
* XXXBSD: there's no way available to do it in FreeBSD, AFAIK.
+ *
+ * XXX: Investigate how top(8) gets this on FreeBSD.
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (128 * MB);
@@ -342,7 +349,11 @@
size_t rlen;
mib[0] = CTL_HW;
+#ifdef __APPLE__
mib[1] = HW_MEMSIZE;
+#else
+ mib[1] = HW_PHYSMEM;
+#endif
rlen = sizeof(result);
if (sysctl(mib, 2, &result, &rlen, NULL, 0) != 0) {
throw_internal_error(env, "sysctl failed");
@@ -408,6 +419,8 @@
#elif defined(_ALLBSD_SOURCE)
/*
* XXXBSD: there's no way available to do it in FreeBSD, AFAIK.
+ *
+ * XXX: Investigate getting this on FreeBSD. Look at lsof.
*/
// throw_internal_error(env, "Unimplemented in FreeBSD");
return (100);
--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -146,7 +146,6 @@
return rv;
}
-
JNIEXPORT jboolean JNICALL
Java_java_io_UnixFileSystem_setPermission(JNIEnv *env, jobject this,
jobject file,
--- jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/lang/ProcessEnvironment_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -53,7 +53,7 @@
for (i = 0; environ[i]; i++) {
/* Ignore corrupted environment variables */
- if (strchr(environ[i], '=') != NULL)
+ if (strchr(environ[i], '=') != NULL && *environ[i] != '=')
count++;
}
@@ -63,7 +63,7 @@
for (i = 0, j = 0; environ[i]; i++) {
const char * varEnd = strchr(environ[i], '=');
/* Ignore corrupted environment variables */
- if (varEnd != NULL) {
+ if (varEnd != NULL && varEnd != environ[i]) {
jbyteArray var, val;
const char * valBeg = varEnd + 1;
jsize varLength = varEnd - environ[i];
--- jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/lang/UNIXProcess_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -394,7 +394,17 @@
return c >= '0' && c <= '9';
}
-#ifdef _ALLBSD_SOURCE
+#if defined(__OpenBSD__)
+static int
+closeDescriptors(void)
+{
+ int err;
+ RESTARTABLE(closefrom(FAIL_FILENO + 1), err);
+ return err;
+}
+#else
+
+#if defined(_ALLBSD_SOURCE)
#define FD_DIR "/dev/fd"
#define dirent64 dirent
#define readdir64 readdir
@@ -436,6 +446,7 @@
return 1;
}
+#endif
static int
moveDescriptor(int fd_from, int fd_to)
--- jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c 2012-08-19 12:40:01.000000000 -0700
@@ -669,11 +669,11 @@
sizeof(struct sockaddr));
if (n < 0 && errno != EINPROGRESS ) {
#ifdef __linux__
- if (errno != EINVAL && errno != EHOSTUNREACH)
+ if (errno != EINVAL)
/*
* On some Linuxes, when bound to the loopback interface, sendto
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /*__linux__ */
NET_ThrowNew(env, errno, "Can't send ICMP packet");
@@ -828,11 +828,10 @@
case EADDRNOTAVAIL: /* address is not available on the remote machine */
#ifdef __linux__
case EINVAL:
- case EHOSTUNREACH:
/*
* On some Linuxes, when bound to the loopback interface, connect
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /* __linux__ */
close(fd);
--- jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2012-08-10 10:31:30.000000000 -0700
+++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c 2012-08-19 12:40:01.000000000 -0700
@@ -512,11 +512,11 @@
n = sendto(fd, sendbuf, plen, 0, (struct sockaddr*) him, sizeof(struct sockaddr_in6));
if (n < 0 && errno != EINPROGRESS) {
#ifdef __linux__
- if (errno != EINVAL && errno != EHOSTUNREACH)
+ if (errno != EINVAL)
/*
* On some Linuxes, when bound to the loopback interface, sendto
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /*__linux__ */
NET_ThrowNew(env, errno, "Can't send ICMP packet");
@@ -680,11 +680,10 @@
case EADDRNOTAVAIL: /* address is not available on the remote machine */
#ifdef __linux__
case EINVAL:
- case EHOSTUNREACH:
/*
* On some Linuxes, when bound to the loopback interface, connect
- * will fail and errno will be set to EINVAL or EHOSTUNREACH.
- * When that happens, don't throw an exception, just return false.
+ * will fail and errno will be set to EINVAL. When that happens,
+ * don't throw an exception, just return false.
*/
#endif /* __linux__ */
close(fd);
--- jdk/src/solaris/native/java/net/NetworkInterface.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/NetworkInterface.c 2012-08-19 12:40:01.000000000 -0700
@@ -60,14 +60,18 @@
#include <sys/param.h>
#include <sys/ioctl.h>
#include <sys/sockio.h>
-#if defined(__APPLE__)
+#if defined(__FreeBSD__) || defined(__APPLE__)
#include <net/ethernet.h>
#include <net/if_var.h>
+#elif defined(__OpenBSD__)
+#include <netinet/if_ether.h>
+#elif defined(__NetBSD__)
+#include <net/if_ether.h>
+#endif
#include <net/if_dl.h>
#include <netinet/in_var.h>
#include <ifaddrs.h>
#endif
-#endif
#include "jvm.h"
#include "jni_util.h"
@@ -1289,7 +1293,11 @@
return -1;
}
- return if2.ifr_flags;
+#ifdef __FreeBSD__
+ return ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16));
+#else
+ return (((int) if2.ifr_flags) & 0xffff);
+#endif
}
#endif
@@ -1979,7 +1987,11 @@
return -1;
}
+#ifdef __FreeBSD__
+ return ((if2.ifr_flags & 0xffff) | (if2.ifr_flagshigh << 16));
+#else
return (((int) if2.ifr_flags) & 0xffff);
+#endif
}
#endif
--- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c 2012-08-19 12:40:01.000000000 -0700
@@ -23,12 +23,12 @@
* questions.
*/
+#include <sys/types.h>
+#include <sys/socket.h>
#include <errno.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
#ifdef __solaris__
#include <fcntl.h>
@@ -357,13 +357,21 @@
#ifdef AF_INET6
if (ipv6_available()) {
struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&addr;
+#ifdef __FreeBSD__
+ him6->sin6_family = AF_INET6;
+#else
him6->sin6_family = AF_UNSPEC;
+#endif
len = sizeof(struct sockaddr_in6);
} else
#endif
{
struct sockaddr_in *him4 = (struct sockaddr_in*)&addr;
+#ifdef __FreeBSD__
+ him4->sin_family = AF_INET;
+#else
him4->sin_family = AF_UNSPEC;
+#endif
len = sizeof(struct sockaddr_in);
}
JVM_Connect(fd, (struct sockaddr *)&addr, len);
--- jdk/src/solaris/native/java/net/net_util_md.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/net_util_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -45,6 +45,10 @@
#endif
#endif
+#ifdef __OpenBSD__
+#include <sys/socketvar.h>
+#endif
+
#ifdef __solaris__
#include <sys/sockio.h>
#include <stropts.h>
@@ -1505,7 +1509,22 @@
}
}
-#endif
+#ifndef __APPLE__
+ /*
+ * Don't allow SO_LINGER value to be too big.
+ * Current max value (240) is empiric value based on tcp_timer.h's
+ * constant TCP_LINGERTIME, which was doubled.
+ *
+ * XXXBSD: maybe we should step it down to 120 ?
+ */
+ if (level == SOL_SOCKET && opt == SO_LINGER) {
+ ling = (struct linger *)arg;
+ if (ling->l_linger > 240 || ling->l_linger < 0) {
+ ling->l_linger = 240;
+ }
+ }
+#endif __APPLE__
+#endif _ALLBSD_SOURCE
return setsockopt(fd, level, opt, arg, len);
}
--- jdk/src/solaris/native/java/net/net_util_md.h 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/net/net_util_md.h 2012-08-19 12:40:01.000000000 -0700
@@ -37,7 +37,7 @@
#endif
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(__FreeBSD__) || defined(MACOSX)
extern int NET_Timeout(int s, long timeout);
extern int NET_Read(int s, void* buf, size_t len);
extern int NET_RecvFrom(int s, void *buf, int len, unsigned int flags,
--- jdk/src/solaris/native/java/util/TimeZone_md.c 2012-08-10 10:31:31.000000000 -0700
+++ jdk/src/solaris/native/java/util/TimeZone_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -123,7 +123,7 @@
return NULL;
}
-#if defined(__linux__) || defined(MACOSX) || (defined(__solaris__) \
+#if defined(__linux__) || defined(_ALLBSD_SOURCE) || (defined(__solaris__) \
&& (defined(_POSIX_PTHREAD_SEMANTICS) || defined(_LP64)))
while (readdir_r(dirp, entry, &dp) == 0 && dp != NULL) {
#else
@@ -212,7 +212,7 @@
return tz;
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/*
* Performs Linux specific mapping and returns a zone ID
@@ -678,7 +678,7 @@
* Returns a GMT-offset-based zone ID. (e.g., "GMT-08:00")
*/
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
char *
getGMTOffsetID()
@@ -738,4 +738,4 @@
sign, (int)(offset/3600), (int)((offset%3600)/60));
return strdup(buf);
}
-#endif /* MACOSX */
+#endif /* _ALLBSD_SOURCE */
--- jdk/src/solaris/native/sun/awt/awt_Font.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_Font.c 2012-08-19 12:40:01.000000000 -0700
@@ -334,7 +334,7 @@
if (strcmp(style, "regular") == 0) {
altstyle = "roman";
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
if (!strcmp(family, "lucidasans")) {
family = "lucida";
}
--- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c 2012-08-19 12:40:01.000000000 -0700
@@ -123,7 +123,7 @@
*/
#define MAXFRAMEBUFFERS 16
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
typedef struct {
int screen_number;
short x_org;
@@ -652,7 +652,7 @@
#endif /* HEADLESS */
#ifndef HEADLESS
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static void xinerama_init_linux()
{
void* libHandle = NULL;
@@ -703,7 +703,7 @@
}
}
#endif
-#if !defined(__linux__) && !defined(MACOSX) /* Solaris */
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) /* Solaris */
static void xinerama_init_solaris()
{
void* libHandle = NULL;
@@ -763,11 +763,11 @@
}
DTRACE_PRINTLN("Xinerama extension is available");
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
xinerama_init_linux();
#else /* Solaris */
xinerama_init_solaris();
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
}
#endif /* HEADLESS */
@@ -1642,7 +1642,7 @@
{
jobject point = NULL;
#ifndef HEADLESS /* return NULL in HEADLESS, Linux */
-#if !defined(__linux__) && !defined(MACOSX)
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE)
int x,y;
AWT_LOCK();
@@ -1655,7 +1655,7 @@
DTRACE_PRINTLN("unable to call XineramaSolarisCenterFunc: symbol is null");
}
AWT_FLUSH_UNLOCK();
-#endif /* __linux __ || MACOSX */
+#endif /* __linux __ || _ALLBSD_SOURCE */
#endif /* HEADLESS */
return point;
}
--- jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c 2012-08-19 12:40:01.000000000 -0700
@@ -67,7 +67,7 @@
XIMPreeditDrawCallbackStruct *);
static void PreeditCaretCallback(XIC, XPointer,
XIMPreeditCaretCallbackStruct *);
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static void StatusStartCallback(XIC, XPointer, XPointer);
static void StatusDoneCallback(XIC, XPointer, XPointer);
static void StatusDrawCallback(XIC, XPointer,
@@ -81,7 +81,7 @@
#define PreeditDoneIndex 1
#define PreeditDrawIndex 2
#define PreeditCaretIndex 3
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#define StatusStartIndex 4
#define StatusDoneIndex 5
#define StatusDrawIndex 6
@@ -99,14 +99,14 @@
(XIMProc)PreeditDoneCallback,
(XIMProc)PreeditDrawCallback,
(XIMProc)PreeditCaretCallback,
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
(XIMProc)StatusStartCallback,
(XIMProc)StatusDoneCallback,
(XIMProc)StatusDrawCallback,
#endif
};
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#define MAX_STATUS_LEN 100
typedef struct {
Window w; /*status window id */
@@ -146,7 +146,7 @@
#endif /* XAWT */
jobject x11inputmethod; /* global ref to X11InputMethod instance */
/* associated with the XIC */
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
StatusWindow *statusWindow; /* our own status window */
#else
#ifndef XAWT
@@ -425,7 +425,7 @@
static void
freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData)
{
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
if (pX11IMData->statusWindow != NULL){
StatusWindow *sw = pX11IMData->statusWindow;
XFreeGC(awt_display, sw->lightGC);
@@ -531,7 +531,7 @@
pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance);
if (pX11IMData == NULL) {
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
return False;
#else
return result;
@@ -539,7 +539,7 @@
}
if ((ic = pX11IMData->current_ic) == (XIC)0){
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
return False;
#else
return result;
@@ -648,7 +648,7 @@
return result;
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static StatusWindow *createStatusWindow(
#ifdef XAWT
Window parent) {
@@ -993,7 +993,7 @@
}
}
}
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
/*
* Creates two XICs, one for active clients and the other for passive
* clients. All information on those XICs are stored in the
@@ -1050,7 +1050,7 @@
return FALSE ;
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
on_the_spot_styles |= XIMStatusNothing;
/*kinput does not support XIMPreeditCallbacks and XIMStatusArea
@@ -1063,7 +1063,7 @@
break;
}
}
-#else /*! __linux__ && !MACOSX */
+#else /*! __linux__ && !_ALLBSD_SOURCE */
#ifdef XAWT
on_the_spot_styles |= XIMStatusNothing;
#else /* !XAWT */
@@ -1086,7 +1086,7 @@
on_the_spot_styles |= XIMStatusNothing;
#endif /* XAWT */
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
for (i = 0; i < im_styles->count_styles; i++) {
active_styles |= im_styles->supported_styles[i] & on_the_spot_styles;
@@ -1134,7 +1134,7 @@
NULL);
if (preedit == (XVaNestedList)NULL)
goto err;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/*always try XIMStatusCallbacks for active client...*/
{
status = (XVaNestedList)XVaCreateNestedList(0,
@@ -1156,7 +1156,7 @@
XFree((void *)status);
XFree((void *)preedit);
}
-#else /* !__linux__ && !MACOSX */
+#else /* !__linux__ && !_ALLBSD_SOURCE */
#ifndef XAWT
if (on_the_spot_styles & XIMStatusArea) {
Widget parent;
@@ -1184,7 +1184,7 @@
}
#endif /* XAWT */
XFree((void *)preedit);
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
pX11IMData->ic_passive = XCreateIC(X11im,
XNClientWindow, w,
XNFocusWindow, w,
@@ -1343,7 +1343,7 @@
}
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
static void
StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data)
{
@@ -1411,7 +1411,7 @@
finally:
AWT_UNLOCK();
}
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) {
JNIEnv *env = GetJNIEnv();
@@ -1517,14 +1517,14 @@
/* Use IMInstantiate call back only on Linux, as there is a bug in Solaris
(4768335)
*/
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL,
NULL, (XIDProc)OpenXIMCallback, NULL);
if (!registered) {
/* directly call openXIM callback */
#endif
OpenXIMCallback(dpy, NULL, NULL);
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
}
#endif
@@ -1588,13 +1588,13 @@
#endif /* XAWT */
globalRef = (*env)->NewGlobalRef(env, this);
pX11IMData->x11inputmethod = globalRef;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
pX11IMData->statusWindow = NULL;
-#else /* !__linux__ && !MACOSX */
+#else /* !__linux__ && !_ALLBSD_SOURCE */
#ifndef XAWT
pX11IMData->statusWidget = (Widget) NULL;
#endif /* XAWT */
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
pX11IMData->lookup_buf = 0;
pX11IMData->lookup_buf_len = 0;
@@ -1741,14 +1741,14 @@
setXICFocus(pX11IMData->current_ic, req);
currentX11InputMethodInstance = pX11IMData->x11inputmethod;
currentFocusWindow = w;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on)
onoffStatusWindow(pX11IMData, w, True);
#endif
} else {
currentX11InputMethodInstance = NULL;
currentFocusWindow = 0;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
onoffStatusWindow(pX11IMData, 0, False);
if (pX11IMData->current_ic != NULL)
#endif
@@ -1765,7 +1765,7 @@
Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env,
jobject this)
{
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
X11InputMethodData *pX11IMData;
StatusWindow *statusWindow;
@@ -1862,7 +1862,7 @@
X11InputMethodData *pX11IMData;
XVaNestedList status;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/*do nothing for linux? */
#else
AWT_LOCK();
@@ -1968,7 +1968,7 @@
JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow
(JNIEnv *env, jobject this, jlong window)
{
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
AWT_LOCK();
adjustStatusWindow(window);
AWT_UNLOCK();
--- jdk/src/solaris/native/sun/awt/awt_Robot.c 2012-08-10 10:31:32.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_Robot.c 2012-08-19 12:40:01.000000000 -0700
@@ -45,7 +45,7 @@
#include "wsutils.h"
#include "list.h"
#include "multiVis.h"
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <sys/socket.h>
#endif
--- jdk/src/solaris/native/sun/awt/awt_util.h 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_util.h 2012-08-19 12:40:01.000000000 -0700
@@ -187,7 +187,7 @@
#ifdef __solaris__
extern Widget awt_util_getXICStatusAreaWindow(Widget w);
#else
-#if defined(MACOSX)
+#if defined(_ALLBSD_SOURCE)
int32_t awt_util_getIMStatusHeight(Widget vw);
Widget awt_util_getXICStatusAreaWindow(Widget w);
#else
@@ -200,7 +200,7 @@
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
typedef struct _XmImRefRec {
Cardinal num_refs; /* Number of referencing widgets. */
Cardinal max_refs; /* Maximum length of refs array. */
--- jdk/src/solaris/native/sun/awt/awt_wm.c 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_wm.c 2012-08-19 12:40:01.000000000 -0700
@@ -121,12 +121,19 @@
static Atom XA_KWM_WIN_MAXIMIZED;
/* OpenLook */
+static Atom _XA_OL_DECOR_ADD;
static Atom _XA_OL_DECOR_DEL;
static Atom _XA_OL_DECOR_HEADER;
static Atom _XA_OL_DECOR_RESIZE;
static Atom _XA_OL_DECOR_PIN;
static Atom _XA_OL_DECOR_CLOSE;
+/* AfterStep */
+static Atom _XA_AS_STYLE;
+
+/* WindowMaker */
+static Atom _XA_WINDOWMAKER_STATE;
+
/* For _NET_WM_STATE ClientMessage requests */
#define _NET_WM_STATE_REMOVE 0 /* remove/unset property */
#define _NET_WM_STATE_ADD 1 /* add/set property */
@@ -193,7 +200,12 @@
{ &_XA_OL_DECOR_HEADER, "_OL_DECOR_HEADER" },
{ &_XA_OL_DECOR_RESIZE, "_OL_DECOR_RESIZE" },
{ &_XA_OL_DECOR_PIN, "_OL_DECOR_PIN" },
- { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" }
+ { &_XA_OL_DECOR_CLOSE, "_OL_DECOR_CLOSE" },
+ { &_XA_OL_DECOR_ADD, "_OL_DECOR_ADD" },
+
+ { &_XA_AS_STYLE, "_XA_AS_STYLE" },
+
+ { &_XA_WINDOWMAKER_STATE, "_XA_WINDOWMAKER_STATE" }
};
#define ATOM_LIST_LENGTH (sizeof(atom_list)/sizeof(atom_list[0]))
@@ -942,6 +954,39 @@
return True;
}
+/*
+ * Window Maker.
+ */
+static Boolean
+awt_wm_isWindowmaker()
+{
+ if (awt_wm_atomInterned(&_XA_WINDOWMAKER_STATE, "_WINDOWMAKER_STATE"))
+ return True;
+ return False;
+}
+
+/*
+ * Afterstep.
+ */
+static Boolean
+awt_wm_isAfterstep()
+{
+ if (awt_wm_atomInterned(&_XA_AS_STYLE, "_AS_STYLE"))
+ return True;
+ return False;
+}
+
+/*
+ * FVWM 2.
+ */
+static Boolean
+awt_wm_isFvwm2()
+{
+ if (awt_wm_atomInterned(&_XA_OL_DECOR_ADD, "_OL_DECOR_ADD")
+ && !awt_wm_atomInterned(&_XA_OL_DECOR_PIN, "_OL_DECOR_PIN"))
+ return True;
+ return False;
+}
static Boolean
awt_wm_isNetWMName(char *name)
@@ -1280,6 +1325,12 @@
else if (awt_wm_isKDE2()) {
awt_wmgr = KDE2_WM;
}
+ else if (awt_wm_isWindowmaker()) {
+ awt_wmgr = WINDOWMAKER_WM;
+ }
+ else if (awt_wm_isAfterstep()) {
+ awt_wmgr = AFTERSTEP_WM;
+ }
/*
* We don't check for legacy WM when we already know that WM
* supports WIN or _NET wm spec.
@@ -1302,6 +1353,9 @@
awt_wmgr = MOTIF_WM;
}
else if (awt_wm_isOpenLook()) {
+ awt_wmgr = OPENLOOK_WM;
+ }
+ else if (awt_wm_isFvwm2()) {
awt_wmgr = OPENLOOK_WM;
}
else {
--- jdk/src/solaris/native/sun/awt/awt_wm.h 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/awt_wm.h 2012-08-19 12:40:01.000000000 -0700
@@ -45,7 +45,10 @@
KDE2_WM,
SAWFISH_WM,
ICE_WM,
- METACITY_WM
+ METACITY_WM,
+ AFTERSTEP_WM,
+ WINDOWMAKER_WM,
+ FVWM2_WM
};
extern void awt_wm_init(void);
--- jdk/src/solaris/native/sun/awt/extutil.h 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/extutil.h 2012-08-19 12:40:01.000000000 -0700
@@ -58,7 +58,7 @@
*/
/* $XFree86: xc/include/extensions/extutil.h,v 1.5 2001/01/17 17:53:20 dawes Exp $ */
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#ifndef _EXTUTIL_H_
#define _EXTUTIL_H_
@@ -248,4 +248,4 @@
char *proc(Display *dpy, int code, XExtCodes *codes, char *buf, int n)
#endif
-#endif /* __linux__ || MACOSX */
+#endif /* __linux__ || _ALLBSD_SOURCE */
--- jdk/src/solaris/native/sun/awt/fontpath.c 2012-08-10 10:31:33.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/fontpath.c 2012-08-19 12:40:01.000000000 -0700
@@ -23,7 +23,7 @@
* questions.
*/
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <string.h>
#endif /* __linux__ */
#include <stdio.h>
@@ -78,7 +78,7 @@
#define MAXFDIRS 512 /* Max number of directories that contain fonts */
-#if !defined(__linux__) && !defined(MACOSX)
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE)
/*
* This can be set in the makefile to "/usr/X11" if so desired.
*/
@@ -144,6 +144,22 @@
PACKAGE_PATH "/share/fonts/Type1",
NULL, /* terminates the list */
};
+#elif _ALLBSD_SOURCE
+static char *fullBSDFontPath[] = {
+ X11_PATH "/lib/X11/fonts/TrueType",
+ X11_PATH "/lib/X11/fonts/truetype",
+ X11_PATH "/lib/X11/fonts/tt",
+ X11_PATH "/lib/X11/fonts/TTF",
+ X11_PATH "/lib/X11/fonts/OTF",
+ PACKAGE_PATH "/share/fonts/TrueType",
+ PACKAGE_PATH "/share/fonts/truetype",
+ PACKAGE_PATH "/share/fonts/tt",
+ PACKAGE_PATH "/share/fonts/TTF",
+ PACKAGE_PATH "/share/fonts/OTF",
+ X11_PATH "/lib/X11/fonts/Type1",
+ PACKAGE_PATH "/share/fonts/Type1",
+ NULL, /* terminates the list */
+};
#else /* __linux */
/* All the known interesting locations we have discovered on
* various flavors of Linux
@@ -395,7 +411,7 @@
#endif /* !HEADLESS */
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/* from awt_LoadLibrary.c */
JNIEXPORT jboolean JNICALL AWTIsHeadless();
#endif
@@ -524,6 +540,8 @@
knowndirs = fullLinuxFontPath;
#elif defined(MACOSX)
knowndirs = full_MACOSX_X11FontPath;
+#elif defined(_ALLBSD_SOURCE)
+ knowndirs = fullBSDFontPath;
#else /* IF SOLARIS */
knowndirs = fullSolarisFontPath;
#endif
@@ -534,7 +552,7 @@
* be initialised.
*/
#ifndef HEADLESS
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
/* There's no headless build on linux ... */
if (!AWTIsHeadless()) { /* .. so need to call a function to check */
#endif
@@ -550,7 +568,7 @@
x11dirs = getX11FontPath();
}
AWT_UNLOCK();
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
}
#endif
#endif /* !HEADLESS */
--- jdk/src/solaris/native/sun/awt/robot_common.c 2012-08-10 10:31:35.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/robot_common.c 2012-08-19 12:40:01.000000000 -0700
@@ -27,7 +27,7 @@
#error This file should not be included in headless library
#endif
-#ifdef MACOSX
+#ifdef _ALLBSD_SOURCE
#include <stdlib.h>
#endif
--- jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 2012-08-10 10:31:35.000000000 -0700
+++ jdk/src/solaris/native/sun/awt/splashscreen/splashscreen_config.h 2012-08-19 12:40:01.000000000 -0700
@@ -32,7 +32,7 @@
#include <X11/Xutil.h>
#include <X11/extensions/shape.h>
#include <sys/types.h>
-#include <unistd.h>
+#include <sys/unistd.h>
#include <pthread.h>
#include <signal.h>
#include <inttypes.h>
--- jdk/src/solaris/native/sun/java2d/j2d_md.h 2012-08-10 10:31:35.000000000 -0700
+++ jdk/src/solaris/native/sun/java2d/j2d_md.h 2012-08-19 12:40:01.000000000 -0700
@@ -28,9 +28,9 @@
#include <sys/types.h>
/*
- * Linux and MACOSX's version of <sys/types.h> does not define intptr_t
+ * Linux and BSD's's version of <sys/types.h> does not define intptr_t
*/
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <stdint.h>
#endif /* __linux__ || MACOSX */
--- jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2012-08-10 10:31:36.000000000 -0700
+++ jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c 2012-08-19 12:40:01.000000000 -0700
@@ -804,7 +804,7 @@
static int initialized;
static int usevis = JNI_TRUE;
-#if defined(__linux__) || defined(MACOSX)
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
# define ULTRA_CHIP "sparc64"
#else
# define ULTRA_CHIP "sun4u"
--- jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-19 12:40:01.000000000 -0700
@@ -77,7 +77,7 @@
JNIEXPORT void JNICALL
Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this,
- jobject fdo, jboolean isIPv6)
+ jobject fdo)
{
jint fd = fdval(env, fdo);
int rv;
@@ -94,7 +94,7 @@
memset(&sa, 0, sizeof(sa));
#ifdef AF_INET6
- if (isIPv6) {
+ if (ipv6_available()) {
struct sockaddr_in6 *him6 = (struct sockaddr_in6 *)&sa;
#if defined(_ALLBSD_SOURCE)
him6->sin6_family = AF_INET6;
--- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c 2012-08-19 12:40:01.000000000 -0700
@@ -36,7 +36,6 @@
#include <sys/socket.h>
#include "nio_util.h"
-#include <limits.h>
JNIEXPORT jint JNICALL
Java_sun_nio_ch_DatagramDispatcher_read0(JNIEnv *env, jclass clazz,
@@ -61,14 +60,23 @@
ssize_t result = 0;
struct iovec *iov = (struct iovec *)jlong_to_ptr(address);
struct msghdr m;
- if (len > IOV_MAX) {
- len = IOV_MAX;
+ if (len > 16) {
+ len = 16;
}
- // initialize the message
- memset(&m, 0, sizeof(m));
+ m.msg_name = NULL;
+ m.msg_namelen = 0;
m.msg_iov = iov;
m.msg_iovlen = len;
+#ifdef __solaris__
+ m.msg_accrights = NULL;
+ m.msg_accrightslen = 0;
+#endif
+
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ m.msg_control = NULL;
+ m.msg_controllen = 0;
+#endif
result = recvmsg(fd, &m, 0);
if (result < 0 && errno == ECONNREFUSED) {
@@ -100,14 +108,23 @@
struct iovec *iov = (struct iovec *)jlong_to_ptr(address);
struct msghdr m;
ssize_t result = 0;
- if (len > IOV_MAX) {
- len = IOV_MAX;
+ if (len > 16) {
+ len = 16;
}
- // initialize the message
- memset(&m, 0, sizeof(m));
+ m.msg_name = NULL;
+ m.msg_namelen = 0;
m.msg_iov = iov;
m.msg_iovlen = len;
+#ifdef __solaris__
+ m.msg_accrights = NULL;
+ m.msg_accrightslen = 0;
+#endif
+
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
+ m.msg_control = NULL;
+ m.msg_controllen = 0;
+#endif
result = sendmsg(fd, &m, 0);
if (result < 0 && errno == ECONNREFUSED) {
--- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c 2012-08-19 12:40:01.000000000 -0700
@@ -201,7 +201,7 @@
return IOS_THROWN;
}
return result;
-#elif defined(__APPLE__)
+#elif defined(__APPLE__) || defined(__FreeBSD__)
off_t numBytes;
int result;
@@ -209,6 +209,8 @@
#ifdef __APPLE__
result = sendfile(srcFD, dstFD, position, &numBytes, NULL, 0);
+#elif defined(__FreeBSD__)
+ result = sendfile(srcFD, dstFD, position, count, NULL, &numBytes, 0);
#endif
if (numBytes > 0)
--- jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/FileDispatcherImpl.c 2012-08-19 12:40:01.000000000 -0700
@@ -94,6 +94,9 @@
{
jint fd = fdval(env, fdo);
struct iovec *iov = (struct iovec *)jlong_to_ptr(address);
+ if (len > 16) {
+ len = 16;
+ }
return convertLongReturnVal(env, readv(fd, iov, len), JNI_TRUE);
}
@@ -123,6 +126,9 @@
{
jint fd = fdval(env, fdo);
struct iovec *iov = (struct iovec *)jlong_to_ptr(address);
+ if (len > 16) {
+ len = 16;
+ }
return convertLongReturnVal(env, writev(fd, iov, len), JNI_FALSE);
}
@@ -200,7 +206,7 @@
}
lockResult = fcntl(fd, cmd, &fl);
if (lockResult < 0) {
- if ((cmd == F_SETLK64) && (errno == EAGAIN || errno == EACCES))
+ if ((cmd == F_SETLK64) && (errno == EAGAIN))
return sun_nio_ch_FileDispatcherImpl_NO_LOCK;
if (errno == EINTR)
return sun_nio_ch_FileDispatcherImpl_INTERRUPTED;
@@ -227,6 +233,21 @@
fl.l_start = (off64_t)pos;
fl.l_type = F_UNLCK;
lockResult = fcntl(fd, cmd, &fl);
+#if defined(__FreeBSD__) || defined(__OpenBSD__)
+ /* XXXFREEBSD: While doing of preClose0() we're closing actual fd which
+ was locked, so here we'll get an error which need to be ignored to
+ satisfy TCK FileLock test */
+ if (lockResult < 0 && errno == EBADF)
+ lockResult = errno = 0;
+#endif
+#if defined(__NetBSD__)
+ /* XXXNETBSD: The dup2 in preClose0 is being done onto 1 end of a
+ socketpair which isn't a valid target for F_UNLCK. No good way to see
+ this vs. a bad lock setup so just return errno = 0 there
+ to pass JCK (lock will get removed once all fd's close anyways) */
+ if (lockResult < 0 && errno == EINVAL)
+ lockResult = errno = 0;
+#endif
if (lockResult < 0) {
JNU_ThrowIOExceptionWithLastError(env, "Release failed");
}
--- jdk/src/solaris/native/sun/nio/ch/IOUtil.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/IOUtil.c 2012-08-19 12:40:01.000000000 -0700
@@ -144,16 +144,6 @@
}
}
-JNIEXPORT jint JNICALL
-Java_sun_nio_ch_IOUtil_iovMax(JNIEnv *env, jclass this)
-{
- jlong iov_max = sysconf(_SC_IOV_MAX);
- if (iov_max == -1)
- iov_max = 16;
- return (jint)iov_max;
-}
-
-
/* Declared in nio_util.h for use elsewhere in NIO */
jlong
--- jdk/src/solaris/native/sun/nio/ch/Sctp.h 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/Sctp.h 2012-08-19 12:40:01.000000000 -0700
@@ -320,8 +320,20 @@
typedef int sctp_peeloff_func(int sock, sctp_assoc_t id);
+#elif defined(__FreeBSD__) && __FreeBSD__ >= 7
+
+#include <stdint.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/sctp.h>
+#include <netinet/sctp_peeloff.h>
+#include <netinet/sctp_uio.h>
+#include "jni.h"
+
#endif /* __linux__ */
+#if !defined(__FreeBSD__) || __FreeBSD__ < 7
+
sctp_getladdrs_func* nio_sctp_getladdrs;
sctp_freeladdrs_func* nio_sctp_freeladdrs;
sctp_getpaddrs_func* nio_sctp_getpaddrs;
@@ -329,6 +341,17 @@
sctp_bindx_func* nio_sctp_bindx;
sctp_peeloff_func* nio_sctp_peeloff;
+#else
+
+#define nio_sctp_getladdrs sctp_getladdrs
+#define nio_sctp_freeladdrs sctp_freeladdrs
+#define nio_sctp_getpaddrs sctp_getpaddrs
+#define nio_sctp_freepaddrs sctp_freepaddrs
+#define nio_sctp_bindx sctp_bindx
+#define nio_sctp_peeloff sctp_peeloff
+
+#endif
+
jboolean loadSocketExtensionFuncs(JNIEnv* env);
#endif /* !SUN_NIO_CH_SCTP_H */
--- jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2012-08-10 10:31:37.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/ch/SctpNet.c 2012-08-19 12:40:01.000000000 -0700
@@ -58,6 +58,7 @@
*/
jboolean loadSocketExtensionFuncs
(JNIEnv* env) {
+#if !defined(__FreeBSD__) || __FreeBSD__ < 7 /* On FreeBSD 7.x these functions are in libc */
if (dlopen(nativeSctpLib, RTLD_GLOBAL | RTLD_LAZY) == NULL) {
JNU_ThrowByName(env, "java/lang/UnsupportedOperationException",
dlerror());
@@ -105,6 +106,7 @@
dlerror());
return JNI_FALSE;
}
+#endif /* __FreeBSD__ */
funcsLoaded = JNI_TRUE;
return JNI_TRUE;
--- jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/fs/genSolarisConstants.c 2012-08-19 12:40:01.000000000 -0700
@@ -27,7 +27,7 @@
#include <errno.h>
#include <unistd.h>
#include <sys/acl.h>
-#include <fcntl.h>
+#include <sys/fcntl.h>
#include <sys/stat.h>
/**
--- jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/nio/fs/genUnixConstants.c 2012-08-19 12:40:01.000000000 -0700
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <errno.h>
#include <unistd.h>
-#include <fcntl.h>
+#include <sys/fcntl.h>
#include <sys/stat.h>
/**
@@ -69,12 +69,7 @@
#else
DEFX(O_DSYNC);
#endif
-#ifdef O_NOFOLLOW
DEFX(O_NOFOLLOW);
-#else
- // not supported (dummy values will not be used at runtime).
- emitX("O_NOFOLLOW", 0x0);
-#endif
// mode masks
emitX("S_IAMB",
--- jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/security/pkcs11/j2secmod_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -36,6 +36,11 @@
#include "j2secmod.h"
+#ifndef RTLD_NOLOAD
+/* A gross hack that will work if the NSS library is only opened once */
+static void *nssLibHandle = NULL;
+#endif
+
void *findFunction(JNIEnv *env, jlong jHandle, const char *functionName) {
void *hModule = (void*)jHandle;
void *fAddress = dlsym(hModule, functionName);
@@ -53,7 +58,11 @@
{
const char *libName = (*env)->GetStringUTFChars(env, jLibName, NULL);
// look up existing handle only, do not load
+#ifdef RTLD_NOLOAD
void *hModule = dlopen(libName, RTLD_NOLOAD);
+#else
+ void *hModule = nssLibHandle;
+#endif
dprintf2("-handle for %s: %u\n", libName, hModule);
(*env)->ReleaseStringUTFChars(env, jLibName, libName);
return (jlong)hModule;
@@ -67,6 +76,9 @@
dprintf1("-lib %s\n", libName);
hModule = dlopen(libName, RTLD_LAZY);
+#ifndef RTLD_NOLOAD
+ nssLibHandle = hModule;
+#endif
(*env)->ReleaseStringUTFChars(env, jLibName, libName);
dprintf2("-handle: %u (0X%X)\n", hModule, hModule);
--- jdk/src/solaris/native/sun/xawt/XWindow.c 2012-08-10 10:31:38.000000000 -0700
+++ jdk/src/solaris/native/sun/xawt/XWindow.c 2012-08-19 12:40:01.000000000 -0700
@@ -867,7 +867,7 @@
{
KeySym originalKeysym = *keysym;
-#if !defined(__linux__) && !defined(MACOSX)
+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE)
/* The following code on Linux will cause the keypad keys
* not to echo on JTextField when the NumLock is on. The
* keysyms will be 0, because the last parameter 2 is not defined.
--- jdk/src/solaris/transport/socket/socket_md.c 2012-08-10 10:31:39.000000000 -0700
+++ jdk/src/solaris/transport/socket/socket_md.c 2012-08-19 12:40:01.000000000 -0700
@@ -35,7 +35,8 @@
#include <sys/time.h>
#ifdef __solaris__
#include <thread.h>
-#else
+#endif
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
#include <pthread.h>
#include <sys/poll.h>
#endif
@@ -305,7 +306,9 @@
return r;
}
-#else
+#endif
+
+#if defined(__linux__) || defined(_ALLBSD_SOURCE)
int
dbgsysTlsAlloc() {
pthread_key_t key;
--- jdk/src/windows/native/java/net/NetworkInterface.c 2012-08-10 10:31:48.000000000 -0700
+++ jdk/src/windows/native/java/net/NetworkInterface.c 2012-08-19 12:40:02.000000000 -0700
@@ -504,7 +504,8 @@
*/
if (netaddrCount < 0) {
netaddrCount = enumAddresses_win(env, ifs, &netaddrP);
- if (netaddrCount == -1) {
+ if ((*env)->ExceptionOccurred(env)) {
+ free_netaddr(netaddrP);
return NULL;
}
}
--- jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2012-08-10 10:31:48.000000000 -0700
+++ jdk/src/windows/native/java/net/NetworkInterface_winXP.c 2012-08-19 12:40:02.000000000 -0700
@@ -194,7 +194,8 @@
while (curr != NULL) {
netaddr *netaddrP;
ret = enumAddresses_win(env, curr, &netaddrP);
- if (ret == -1) {
+ if ((*env)->ExceptionOccurred(env)) {
+ free_netaddr(netaddrP);
return -1;
}
curr->addrs = netaddrP;
@@ -448,7 +449,8 @@
*/
if (netaddrCount < 0) {
netaddrCount = enumAddresses_win(env, ifs, &netaddrP);
- if (netaddrCount == -1) {
+ if ((*env)->ExceptionOccurred(env)) {
+ free_netaddr(netaddrP);
return NULL;
}
}
--- jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-10 10:31:52.000000000 -0700
+++ jdk/src/windows/native/sun/nio/ch/DatagramChannelImpl.c 2012-08-19 12:40:02.000000000 -0700
@@ -108,7 +108,7 @@
JNIEXPORT void JNICALL
Java_sun_nio_ch_DatagramChannelImpl_disconnect0(JNIEnv *env, jobject this,
- jobject fdo, jboolean isIPv6)
+ jobject fdo)
{
jint fd = fdval(env, fdo);
int rv = 0;
--- jdk/src/windows/native/sun/nio/ch/IOUtil.c 2012-08-10 10:31:52.000000000 -0700
+++ jdk/src/windows/native/sun/nio/ch/IOUtil.c 2012-08-19 12:40:02.000000000 -0700
@@ -41,6 +41,9 @@
/* field id for jint 'fd' in java.io.FileDescriptor used for socket fds */
static jfieldID fd_fdID;
+/* false for 95/98/ME, true for NT/W2K */
+static jboolean onNT = JNI_FALSE;
+
JNIEXPORT jboolean JNICALL
Java_sun_security_provider_NativeSeedGenerator_nativeGenerateSeed
(JNIEnv *env, jclass clazz, jbyteArray randArray);
@@ -52,6 +55,13 @@
JNIEXPORT void JNICALL
Java_sun_nio_ch_IOUtil_initIDs(JNIEnv *env, jclass clazz)
{
+ OSVERSIONINFO ver;
+ ver.dwOSVersionInfoSize = sizeof(ver);
+ GetVersionEx(&ver);
+ if (ver.dwPlatformId == VER_PLATFORM_WIN32_NT) {
+ onNT = JNI_TRUE;
+ }
+
clazz = (*env)->FindClass(env, "java/io/FileDescriptor");
fd_fdID = (*env)->GetFieldID(env, clazz, "fd", "I");
handle_fdID = (*env)->GetFieldID(env, clazz, "handle", "J");
@@ -70,13 +80,6 @@
randArray);
}
-JNIEXPORT jint JNICALL
-Java_sun_nio_ch_IOUtil_iovMax(JNIEnv *env, jclass this)
-{
- return 16;
-}
-
-
jint
convertReturnVal(JNIEnv *env, jint n, jboolean reading)
{
@@ -202,3 +205,9 @@
{
return (*env)->GetLongField(env, fdo, handle_fdID);
}
+
+jboolean
+isNT()
+{
+ return onNT;
+}
--- jdk/src/windows/native/sun/nio/ch/SocketDispatcher.c 2012-08-10 10:31:52.000000000 -0700
+++ jdk/src/windows/native/sun/nio/ch/SocketDispatcher.c 2012-08-19 12:40:02.000000000 -0700
@@ -97,6 +97,10 @@
return IOS_THROWN;
}
+ if ((isNT() == JNI_FALSE) && (len > 16)) {
+ len = 16;
+ }
+
/* copy iovec into WSABUF */
for(i=0; i<len; i++) {
jint iov_len = iovp[i].iov_len;
@@ -204,6 +208,10 @@
return IOS_THROWN;
}
+ if ((isNT() == JNI_FALSE) && (len > 16)) {
+ len = 16;
+ }
+
/* copy iovec into WSABUF */
for(i=0; i<len; i++) {
jint iov_len = iovp[i].iov_len;
--- jdk/src/windows/native/sun/nio/ch/nio_util.h 2012-08-10 10:31:52.000000000 -0700
+++ jdk/src/windows/native/sun/nio/ch/nio_util.h 2012-08-19 12:40:02.000000000 -0700
@@ -35,6 +35,7 @@
jint fdval(JNIEnv *env, jobject fdo);
jlong handleval(JNIEnv *env, jobject fdo);
+jboolean isNT();
jint convertReturnVal(JNIEnv *env, jint n, jboolean r);
jlong convertLongReturnVal(JNIEnv *env, jlong n, jboolean r);
jboolean purgeOutstandingICMP(JNIEnv *env, jclass clazz, jint fd);
--- jdk/src/windows/native/sun/windows/awt_Component.cpp 2012-08-10 10:31:55.000000000 -0700
+++ jdk/src/windows/native/sun/windows/awt_Component.cpp 2012-08-19 12:40:02.000000000 -0700
@@ -558,8 +558,6 @@
m_hwnd = hwnd;
- ::ImmAssociateContext(m_hwnd, NULL);
-
SetDrawState((jint)JAWT_LOCK_SURFACE_CHANGED |
(jint)JAWT_LOCK_BOUNDS_CHANGED |
(jint)JAWT_LOCK_CLIP_CHANGED);
--- jdk/test/Makefile 2012-08-10 10:31:59.000000000 -0700
+++ jdk/test/Makefile 2012-08-19 12:40:02.000000000 -0700
@@ -79,6 +79,11 @@
endif
OS_VERSION := $(shell $(UNAME) -r)
endif
+ifeq ($(findstring BSD,$(UNAME_S)), BSD)
+ OS_NAME = bsd
+ OS_ARCH := $(shell $(UNAME) -m)
+ OS_VERSION := $(shell $(UNAME) -r)
+endif
ifeq ($(UNAME_S), Darwin)
OS_NAME = macosx
OS_ARCH := $(shell $(UNAME) -m)
--- jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2012-08-10 10:32:04.000000000 -0700
+++ jdk/test/com/sun/jdi/ImmutableResourceTest.sh 2012-08-19 12:40:02.000000000 -0700
@@ -56,7 +56,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/com/sun/jdi/JITDebug.sh 2012-08-10 10:32:04.000000000 -0700
+++ jdk/test/com/sun/jdi/JITDebug.sh 2012-08-19 12:40:02.000000000 -0700
@@ -63,7 +63,7 @@
OS=`uname -s`
export TRANSPORT_METHOD
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
TRANSPORT_METHOD=dt_socket
;;
--- jdk/test/com/sun/jdi/PrivateTransportTest.sh 2012-08-10 10:32:05.000000000 -0700
+++ jdk/test/com/sun/jdi/PrivateTransportTest.sh 2012-08-19 12:40:02.000000000 -0700
@@ -123,7 +123,7 @@
esac
libloc=${jreloc}/lib/${libarch}
;;
- Linux)
+ Linux | *BSD)
xx=`find ${jreloc}/lib -name libdt_socket.so`
libloc=`dirname ${xx}`
;;
--- jdk/test/com/sun/jdi/ShellScaffold.sh 2012-08-10 10:32:06.000000000 -0700
+++ jdk/test/com/sun/jdi/ShellScaffold.sh 2012-08-19 12:40:02.000000000 -0700
@@ -292,7 +292,7 @@
psCmd=ps
jstack=jstack.exe
;;
- SunOS | Linux | Darwin)
+ SunOS | Linux | *BSD | Darwin)
transport=dt_socket
address=
devnull=/dev/null
--- jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2012-08-10 10:32:06.000000000 -0700
+++ jdk/test/com/sun/jdi/Solaris32AndSolaris64Test.sh 2012-08-19 12:40:02.000000000 -0700
@@ -112,7 +112,7 @@
fi
;;
- Linux | Darwin )
+ Linux | *BSD | Darwin )
pass "This test always passes on $OS"
;;
--- jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2012-08-10 10:32:07.000000000 -0700
+++ jdk/test/com/sun/jdi/connect/spi/JdiLoadedByCustomLoader.sh 2012-08-19 12:40:02.000000000 -0700
@@ -45,7 +45,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
;;
Windows* | CYGWIN*)
--- jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2012-08-10 10:32:09.000000000 -0700
+++ jdk/test/com/sun/management/OperatingSystemMXBean/TestTotalSwap.sh 2012-08-19 12:40:02.000000000 -0700
@@ -72,6 +72,16 @@
done
}
+bsd_swap_size()
+{
+ total_swap=0
+ for i in `/usr/sbin/swapinfo -k | awk '{print $2}' | grep -v blocks`
+ do
+ # swapinfo -k returns size in kilobytes.
+ total_swap=`expr $i \* 1024 + $total_swap`
+ done
+}
+
# Test GetTotalSwapSpaceSize if we are running on Unix
total_swap=0
case `uname -s` in
@@ -83,6 +93,9 @@
total_swap=`free -b | grep -i swap | awk '{print $2}'`
runOne GetTotalSwapSpaceSize $total_swap
;;
+ *BSD )
+ bsd_swap_size
+ runOne GetTotalSwapSpaceSize $total_swap
Darwin )
# $ sysctl -n vm.swapusage
# total = 8192.00M used = 7471.11M free = 720.89M (encrypted)
--- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2012-08-10 10:32:11.000000000 -0700
+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetMaxFileDescriptorCount.sh 2012-08-19 12:40:02.000000000 -0700
@@ -48,7 +48,7 @@
# Test GetMaxFileDescriptorCount if we are running on Unix
case `uname -s` in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
runOne GetMaxFileDescriptorCount
;;
* )
--- jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2012-08-10 10:32:11.000000000 -0700
+++ jdk/test/com/sun/management/UnixOperatingSystemMXBean/GetOpenFileDescriptorCount.sh 2012-08-19 12:40:02.000000000 -0700
@@ -48,7 +48,7 @@
# Test GetOpenFileDescriptorCount if we are running on Unix
case `uname -s` in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
runOne GetOpenFileDescriptorCount
;;
* )
--- jdk/test/com/sun/tools/attach/CommonSetup.sh 2012-08-10 10:32:15.000000000 -0700
+++ jdk/test/com/sun/tools/attach/CommonSetup.sh 2012-08-19 12:40:03.000000000 -0700
@@ -36,7 +36,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/awt/Focus/OverrideRedirectWindowActivationTest/OverrideRedirectWindowActivationTest.java 2012-08-10 10:32:20.000000000 -0700
+++ jdk/test/java/awt/Focus/OverrideRedirectWindowActivationTest/OverrideRedirectWindowActivationTest.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,157 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 6385277
- * @summary Tests that override redirect window gets activated on click.
- * @author anton.tarasov@sun.com: area=awt.focus
- * @library ../../regtesthelpers
- * @build Util
- * @run main OverrideRedirectWindowActivationTest
- */
-import java.awt.*;
-import java.awt.event.*;
-import java.util.concurrent.Callable;
-import javax.swing.SwingUtilities;
-import sun.awt.SunToolkit;
-import test.java.awt.regtesthelpers.Util;
-
-public class OverrideRedirectWindowActivationTest {
-
- private static Frame frame;
- private static Window window;
- private static Button fbutton;
- private static Button wbutton;
- private static Label label;
- private static Robot robot;
- private static SunToolkit toolkit;
-
- public static void main(String[] args) throws Exception {
-
- if ("sun.awt.motif.MToolkit".equals(Toolkit.getDefaultToolkit().getClass().getName())) {
- System.out.println("No testing on Motif. Test passed.");
- return;
- }
-
- toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
- robot = new Robot();
- robot.setAutoDelay(50);
-
- Toolkit.getDefaultToolkit().addAWTEventListener(new AWTEventListener() {
-
- public void eventDispatched(AWTEvent e) {
- System.out.println(e);
- }
- }, FocusEvent.FOCUS_EVENT_MASK | WindowEvent.WINDOW_FOCUS_EVENT_MASK);
-
- createAndShowWindow();
- toolkit.realSync();
-
- createAndShowFrame();
- toolkit.realSync();
-
- // click on Frame
- clickOn(getClickPoint(frame));
-
- if (!frame.isFocused()) {
- throw new RuntimeException("Error: a frame couldn't be focused by click.");
- }
-
- //click on Label in Window
- clickOn(getClickPoint(label));
-
- if (!window.isFocused()) {
- throw new RuntimeException("Test failed: the window couldn't be activated by click!");
- }
-
- // bring focus back to the frame
- clickOn(getClickPoint(fbutton));
-
- if (!frame.isFocused()) {
- throw new RuntimeException("Error: a frame couldn't be focused by click.");
- }
-
- // Test 2. Verifies that clicking on a component of unfocusable Window
- // won't activate it.
-
- window.setFocusableWindowState(false);
- toolkit.realSync();
-
-
- clickOn(getClickPoint(label));
-
- if (window.isFocused()) {
- throw new RuntimeException("Test failed: unfocusable window got activated by click!");
- }
- System.out.println("Test passed.");
-
- }
-
- private static void createAndShowWindow() {
-
- frame = new Frame("Test Frame");
- window = new Window(frame);
- wbutton = new Button("wbutton");
- label = new Label("label");
-
- window.setBounds(800, 200, 200, 100);
- window.setLayout(new FlowLayout());
- window.add(wbutton);
- window.add(label);
- window.setVisible(true);
-
- }
-
- private static void createAndShowFrame() {
- fbutton = new Button("fbutton");
-
- frame.setBounds(800, 0, 200, 100);
- frame.setLayout(new FlowLayout());
- frame.add(fbutton);
- frame.setVisible(true);
-
- }
-
- static void clickOn(Point point) {
-
- robot.mouseMove(point.x, point.y);
-
- robot.mousePress(InputEvent.BUTTON1_MASK);
- robot.mouseRelease(InputEvent.BUTTON1_MASK);
-
- toolkit.realSync();
- }
-
- static Point getClickPoint(Component c) {
- Point p = c.getLocationOnScreen();
- Dimension d = c.getSize();
- return new Point(p.x + (int) (d.getWidth() / 2), p.y + (int) (d.getHeight() / 2));
- }
-
- static Point getClickPoint(Frame frame) {
- Point p = frame.getLocationOnScreen();
- Dimension d = frame.getSize();
- return new Point(p.x + (int) (d.getWidth() / 2), p.y + (frame.getInsets().top / 2));
- }
-}
--- jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2012-08-10 10:32:25.000000000 -0700
+++ jdk/test/java/awt/PrintJob/Text/stringwidth.sh 2012-08-19 12:40:03.000000000 -0700
@@ -25,10 +25,11 @@
fi
-if [ $OS = SunOS -o $OS = Linux ]
-then
- exit 0
-fi
+case "${OS}" in
+ SunOS | Linux | *BSD | Darwin )
+ exit 0
+ ;;
+esac
# Windows
if [ -z "${TESTJAVA}" ] ; then
--- jdk/test/java/awt/Window/Grab/GrabTest.java 2012-08-10 10:32:26.000000000 -0700
+++ jdk/test/java/awt/Window/Grab/GrabTest.java 2012-08-19 12:40:03.000000000 -0700
@@ -65,7 +65,7 @@
}, sun.awt.SunToolkit.GRAB_EVENT_MASK);
f = new Frame("Frame");
- f.setBounds(0, 0, 300, 300);
+ f.setSize(200, 200);
f.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
System.out.println(e);
@@ -74,7 +74,7 @@
});
f1 = new Frame("OtherFrame");
- f1.setBounds(700, 100, 200, 200);
+ f1.setBounds(600, 100, 200, 200);
w = new Window(f);
w.setLayout(new FlowLayout());
@@ -86,7 +86,7 @@
}
});
w.add(b);
- w.setBounds(400, 100, 200, 200);
+ w.setBounds(300, 100, 200, 200);
w.setBackground(Color.blue);
w.addMouseListener(new MouseAdapter() {
public void mousePressed(MouseEvent e) {
@@ -175,8 +175,7 @@
// 6. Check that press on the outside area causes ungrab
Point loc = f.getLocationOnScreen();
- robot.mouseMove(loc.x + 100, loc.y + f.getSize().height + 1);
- Util.waitForIdle(robot);
+ robot.mouseMove(loc.x + 100, loc.y + f.getSize().height + 300);
robot.mousePress(InputEvent.BUTTON1_MASK);
robot.delay(50);
robot.mouseRelease(InputEvent.BUTTON1_MASK);
--- jdk/test/java/awt/event/TextEvent/TextEventSequenceTest/TextEventSequenceTest.java 2012-08-10 10:32:28.000000000 -0700
+++ jdk/test/java/awt/event/TextEvent/TextEventSequenceTest/TextEventSequenceTest.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,138 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 4028580
- * @summary TextArea does not send TextEvent when setText. Does for insert
- * @author kdm@sparc.spb.su: area= awt.TextAvent
- * @run main TextEventSequenceTest
- */
-import java.awt.*;
-import java.awt.event.*;
-import sun.awt.SunToolkit;
-
-public class TextEventSequenceTest {
-
- private static Frame f;
- private static TextField tf;
- private static TextArea t;
- private static int cntEmptyStrings = 0;
- private static int cntNonEmptyStrings = 0;
-
- public static void main(String[] args) {
-
- test("non-empty text string");
- test("");
- test(null);
- }
-
- private static void test(String test) {
- SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
-
- createAndShowGUI(test);
- toolkit.realSync();
-
- initCounts();
- t.setText("Hello ");
- toolkit.realSync();
- t.append("World! !");
- toolkit.realSync();
- t.insert("from Roger Pham", 13);
- toolkit.realSync();
- t.replaceRange("Java Duke", 18, 28);
- toolkit.realSync();
- checkCounts(0, 4);
-
- initCounts();
- t.setText("");
- toolkit.realSync();
- t.setText("");
- toolkit.realSync();
- t.setText("");
- toolkit.realSync();
- checkCounts(1, 0);
-
- initCounts();
- tf.setText("Hello There!");
- toolkit.realSync();
- checkCounts(0, 1);
-
- initCounts();
- tf.setText("");
- toolkit.realSync();
- tf.setText("");
- toolkit.realSync();
- tf.setText("");
- toolkit.realSync();
- checkCounts(1, 0);
-
- f.dispose();
- }
-
- private static void createAndShowGUI(String text) {
- f = new Frame("TextEventSequenceTest");
- f.setLayout(new FlowLayout());
-
- TextListener listener = new MyTextListener();
-
- tf = new TextField(text);
- tf.addTextListener(listener);
- f.add(tf);
-
- t = new TextArea(text, 10, 30);
- t.addTextListener(listener);
- f.add(t);
-
- f.pack();
- f.setVisible(true);
- }
-
- static class MyTextListener implements TextListener {
-
- public synchronized void textValueChanged(TextEvent e) {
- TextComponent tc = (TextComponent) e.getSource();
- String text = tc.getText();
- if (text.length() == 0) {
- cntEmptyStrings++;
- } else {
- cntNonEmptyStrings++;
- }
- }
- }
-
- synchronized static void initCounts() {
- cntEmptyStrings = 0;
- cntNonEmptyStrings = 0;
- }
-
- synchronized static void checkCounts(int empty, int nonempty) {
- if (empty != cntEmptyStrings || nonempty != cntNonEmptyStrings) {
- throw new RuntimeException(
- String.format("Expected events: empty = %d, nonempty = %d, "
- + "actual events: empty = %d, nonempty = %d",
- empty, nonempty, cntEmptyStrings, cntNonEmptyStrings));
- }
- }
-}
-
--- jdk/test/java/beans/Performance/Test7122740.java 2012-08-10 10:32:32.000000000 -0700
+++ jdk/test/java/beans/Performance/Test7122740.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,57 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 7122740
- * @summary Tests just a benchmark of PropertyDescriptor(String, Class) performance
- * @author Sergey Malenkov
- * @run main/manual Test7122740
- */
-
-import java.beans.PropertyDescriptor;
-
-public class Test7122740 {
- public static void main(String[] args) throws Exception {
- long time = System.nanoTime();
- for (int i = 0; i < 1000; i++) {
- new PropertyDescriptor("name", PropertyDescriptor.class);
- new PropertyDescriptor("value", Concrete.class);
- }
- time -= System.nanoTime();
- System.out.println("Time (ms): " + (-time / 1000000));
- }
-
- public static class Abstract<T> {
- private T value;
- public T getValue() {
- return this.value;
- }
- public void setValue(T value) {
- this.value = value;
- }
- }
-
- private static class Concrete extends Abstract<String> {
- }
-}
--- jdk/test/java/beans/Performance/Test7184799.java 2012-08-10 10:32:32.000000000 -0700
+++ jdk/test/java/beans/Performance/Test7184799.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,71 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 7184799
- * @summary Tests just a benchmark of Introspector.getBeanInfo(Class) performance
- * @author Sergey Malenkov
- * @run main/manual Test7184799
- */
-
-import java.beans.Introspector;
-import java.util.*;
-import java.util.concurrent.ConcurrentHashMap;
-
-public class Test7184799 {
- private static final Class[] TYPES = {
- Class.class,
- String.class,
- Character.class,
- Boolean.class,
- Byte.class,
- Short.class,
- Integer.class,
- Long.class,
- Float.class,
- Double.class,
- Collection.class,
- Set.class,
- HashSet.class,
- TreeSet.class,
- LinkedHashSet.class,
- Map.class,
- HashMap.class,
- TreeMap.class,
- LinkedHashMap.class,
- WeakHashMap.class,
- ConcurrentHashMap.class,
- Dictionary.class,
- Exception.class,
- };
-
- public static void main(String[] args) throws Exception {
- long time = System.nanoTime();
- for (Class type : TYPES) {
- Introspector.getBeanInfo(type);
- }
- time -= System.nanoTime();
- System.out.println("Time (ms): " + (-time / 1000000));
- }
-}
--- jdk/test/java/io/File/GetXSpace.sh 2012-08-10 10:32:44.000000000 -0700
+++ jdk/test/java/io/File/GetXSpace.sh 2012-08-19 12:40:04.000000000 -0700
@@ -26,7 +26,7 @@
# set platform-dependent variable
OS=`uname -s`
case "$OS" in
- SunOS | Linux ) TMP=/tmp ;;
+ SunOS | Linux | *BSD | Darwin ) TMP=/tmp ;;
Windows_98 ) return ;;
Windows* ) SID=`sid`; TMP="c:/temp" ;;
* )
--- jdk/test/java/io/FileOutputStream/ManyFiles.java 2012-08-10 10:32:46.000000000 -0700
+++ jdk/test/java/io/FileOutputStream/ManyFiles.java 2012-08-19 12:40:04.000000000 -0700
@@ -43,7 +43,7 @@
// Windows capability it is much simpler to only run it
// on that platform.
String osName = System.getProperty("os.name");
- if (osName.startsWith("Linux")||osName.startsWith("SunOS"))
+ if (osName.startsWith("Linux")||osName.startsWith("SunOS")||osName.endsWith("BSD")||osName.contains("OS X"))
return;
for (int n = 0; n < NUM_FILES; n++) {
--- jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2012-08-10 10:33:10.000000000 -0700
+++ jdk/test/java/io/Serializable/evolution/RenamePackage/run.sh 2012-08-19 12:40:04.000000000 -0700
@@ -41,7 +41,7 @@
# Need to determine the classpath separator and filepath separator based on the
# operating system.
case "$OS" in
-SunOS | Linux | Darwin )
+SunOS | Linux | *BSD | Darwin )
PS=":" ;;
Windows* | CYGWIN* )
PS=";" ;;
--- jdk/test/java/io/Serializable/serialver/classpath/run.sh 2012-08-10 10:33:31.000000000 -0700
+++ jdk/test/java/io/Serializable/serialver/classpath/run.sh 2012-08-19 12:40:04.000000000 -0700
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":" ;;
Windows* | CYGWIN* )
PS=";" ;;
--- jdk/test/java/io/Serializable/serialver/nested/run.sh 2012-08-10 10:33:31.000000000 -0700
+++ jdk/test/java/io/Serializable/serialver/nested/run.sh 2012-08-19 12:40:04.000000000 -0700
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":" ;;
Windows* | CYGWIN* )
PS=";" ;;
--- jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2012-08-10 10:34:02.000000000 -0700
+++ jdk/test/java/lang/ClassLoader/deadlock/TestCrossDelegate.sh 2012-08-19 12:40:04.000000000 -0700
@@ -45,13 +45,7 @@
# set platform-specific variables
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- ;;
- Linux )
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
Windows*)
--- jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2012-08-10 10:34:02.000000000 -0700
+++ jdk/test/java/lang/ClassLoader/deadlock/TestOneWayDelegate.sh 2012-08-19 12:40:04.000000000 -0700
@@ -49,13 +49,7 @@
# set platform-specific variables
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- ;;
- Linux )
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
Windows* | CYGWIN* )
--- jdk/test/java/lang/StringCoding/CheckEncodings.sh 2012-08-10 10:34:06.000000000 -0700
+++ jdk/test/java/lang/StringCoding/CheckEncodings.sh 2012-08-19 12:40:04.000000000 -0700
@@ -30,7 +30,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin) ;;
+ SunOS | Linux | *BSD | Darwin) ;;
Windows* | CYGWIN* )
echo "Passed"; exit 0 ;;
* ) echo "Unrecognized system!" ; exit 1 ;;
--- jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2012-08-10 10:34:07.000000000 -0700
+++ jdk/test/java/lang/annotation/loaderLeak/LoaderLeak.sh 2012-08-19 12:40:04.000000000 -0700
@@ -44,7 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin)
+ SunOS | Linux | *BSD | Darwin)
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/java/lang/instrument/MakeJAR2.sh 2012-08-10 10:34:08.000000000 -0700
+++ jdk/test/java/lang/instrument/MakeJAR2.sh 2012-08-19 12:40:04.000000000 -0700
@@ -49,7 +49,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2012-08-10 10:34:11.000000000 -0700
+++ jdk/test/java/lang/instrument/appendToClassLoaderSearch/CommonSetup.sh 2012-08-19 12:40:04.000000000 -0700
@@ -35,15 +35,7 @@
OS=`uname -s`
case "$OS" in
- SunOS )
- PS=":"
- FS="/"
- ;;
- Linux )
- PS=":"
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2012-08-10 10:34:13.000000000 -0700
+++ jdk/test/java/lang/management/OperatingSystemMXBean/TestSystemLoadAvg.sh 2012-08-19 12:40:05.000000000 -0700
@@ -61,7 +61,7 @@
while true; do
echo "Run $i: TestSystemLoadAvg"
case `uname -s` in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
runOne GetSystemLoadAverage
;;
* )
--- jdk/test/java/net/Authenticator/B4933582.sh 2012-08-10 10:34:17.000000000 -0700
+++ jdk/test/java/net/Authenticator/B4933582.sh 2012-08-19 12:40:05.000000000 -0700
@@ -26,7 +26,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/CookieHandler/NullUriCookieTest.java 2012-08-10 10:34:18.000000000 -0700
+++ jdk/test/java/net/CookieHandler/NullUriCookieTest.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,80 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 6953455
- * @summary CookieStore.add() cannot handle null URI parameter
- */
-
-import java.net.CookieManager;
-import java.net.CookieStore;
-import java.net.HttpCookie;
-import java.net.URI;
-import java.net.URISyntaxException;
-import java.util.List;
-
-public class NullUriCookieTest {
- static boolean fail = false;
-
- public static void main(String[] args) throws Exception {
- checkCookieNullUri();
- }
-
- static void checkCookieNullUri() throws Exception {
- //get a cookie store implementation and add a cookie to the store with null URI
- CookieStore cookieStore = (new CookieManager()).getCookieStore();
- HttpCookie cookie = new HttpCookie("MY_COOKIE", "MY_COOKIE_VALUE");
- cookie.setDomain("foo.com");
- cookieStore.add(null, cookie);
-
- //Retrieve added cookie
- URI uri = new URI("http://foo.com");
- List<HttpCookie> addedCookieList = cookieStore.get(uri);
-
- //Verify CookieStore behaves well
- if (addedCookieList.size() != 1) {
- fail = true;
- }
- checkFail("Abnormal size of cookie jar");
-
- for (HttpCookie chip : addedCookieList) {
- if (!chip.equals(cookie)) {
- fail = true;
- }
- }
- checkFail("Cookie not retrieved from Cookie Jar");
- boolean ret = cookieStore.remove(null,cookie);
- if (!ret) {
- fail = true;
- }
- checkFail("Abnormal removal behaviour from Cookie Jar");
- }
-
- static void checkFail(String exp) {
- if (fail) {
- throw new RuntimeException(exp);
- }
- }
-}
-
--- jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2012-08-10 10:34:18.000000000 -0700
+++ jdk/test/java/net/DatagramSocket/SendDatagramToBadAddress.java 2012-08-19 12:40:05.000000000 -0700
@@ -45,6 +45,8 @@
return (true);
if (p.getProperty ("os.name").equals ("Linux"))
return (true);
+ if (p.getProperty ("os.name").endsWith ("BSD"))
+ return (true);
if (p.getProperty ("os.name").startsWith ("Mac OS"))
return (true);
// Check for specific Solaris version from here
--- jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2012-08-10 10:34:18.000000000 -0700
+++ jdk/test/java/net/DatagramSocket/SetDatagramSocketImplFactory/ADatagramSocket.sh 2012-08-19 12:40:05.000000000 -0700
@@ -27,11 +27,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/net/Socket/OldSocketImpl.sh 2012-08-10 10:34:21.000000000 -0700
+++ jdk/test/java/net/Socket/OldSocketImpl.sh 2012-08-19 12:40:05.000000000 -0700
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URL/B5086147.sh 2012-08-10 10:34:22.000000000 -0700
+++ jdk/test/java/net/URL/B5086147.sh 2012-08-19 12:40:05.000000000 -0700
@@ -26,7 +26,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
exit 0
;;
CYGWIN* )
--- jdk/test/java/net/URL/runconstructor.sh 2012-08-10 10:34:23.000000000 -0700
+++ jdk/test/java/net/URL/runconstructor.sh 2012-08-19 12:40:05.000000000 -0700
@@ -27,7 +27,7 @@
#
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URLClassLoader/B5077773.sh 2012-08-10 10:34:23.000000000 -0700
+++ jdk/test/java/net/URLClassLoader/B5077773.sh 2012-08-19 12:40:05.000000000 -0700
@@ -34,11 +34,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PS=":"
- FS="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2012-08-10 10:34:25.000000000 -0700
+++ jdk/test/java/net/URLClassLoader/sealing/checksealed.sh 2012-08-19 12:40:05.000000000 -0700
@@ -27,11 +27,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PS=":"
- FS="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/net/URLConnection/6212146/test.sh 2012-08-10 10:34:25.000000000 -0700
+++ jdk/test/java/net/URLConnection/6212146/test.sh 2012-08-19 12:40:05.000000000 -0700
@@ -33,11 +33,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- PS=":"
- FS="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/nio/channels/DatagramChannel/Disconnect.java 2012-08-10 10:34:28.000000000 -0700
+++ jdk/test/java/nio/channels/DatagramChannel/Disconnect.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,77 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/* @test
- * @bug 7132924
- * @summary Test DatagramChannel.disconnect when DatagramChannel is connected to an IPv4 socket
- * @run main Disconnect
- * @run main/othervm -Djava.net.preferIPv4Stack=true Disconnect
- */
-
-import java.net.*;
-import java.nio.*;
-import java.nio.channels.*;
-import java.io.IOException;
-
-public class Disconnect {
- public static void main(String[] args) throws IOException {
- // test with default protocol family
- try (DatagramChannel dc = DatagramChannel.open()) {
- test(dc);
- test(dc);
- }
-
- // test with IPv4 only
- try (DatagramChannel dc = DatagramChannel.open(StandardProtocolFamily.INET)) {
- test(dc);
- test(dc);
- }
- }
-
- /**
- * Connect DatagramChannel to a server, write a datagram and disconnect. Invoke
- * a second or subsequent time with the same DatagramChannel instance to check
- * that disconnect works as expected.
- */
- static void test(DatagramChannel dc) throws IOException {
- try (DatagramChannel server = DatagramChannel.open()) {
- server.bind(new InetSocketAddress(0));
-
- InetAddress lh = InetAddress.getLocalHost();
- dc.connect(new InetSocketAddress(lh, server.socket().getLocalPort()));
-
- dc.write(ByteBuffer.wrap("hello".getBytes()));
-
- ByteBuffer bb = ByteBuffer.allocate(100);
- server.receive(bb);
-
- dc.disconnect();
-
- try {
- dc.write(ByteBuffer.wrap("another message".getBytes()));
- throw new RuntimeException("write should fail, not connected");
- } catch (NotYetConnectedException expected) {
- }
- }
- }
-}
--- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2012-08-10 10:34:31.000000000 -0700
+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/Makefile 2012-08-19 12:40:05.000000000 -0700
@@ -71,6 +71,48 @@
EXTRA_LIBS = -lc
endif
+ifeq ($(uname), Darwin)
+ PLATFORM = bsd
+ archExpr = case "`$(UNAME) -m`" in \
+ i[3-6]86) \
+ $(ECHO) i586 \
+ ;; \
+ sparc*) \
+ $(ECHO) sparc \
+ ;; \
+ *) \
+ $(UNAME) -m \
+ ;; \
+ esac
+ ARCH := $(shell $(archExpr) )
+ CC = gcc
+ CFLAGS = -fno-strict-aliasing -fPIC -W -Wall
+ LD = ld
+ LDFLAGS_COMMON = -shared
+ EXTRA_LIBS = -lc
+endif
+
+ifeq ($(findstring BSD,$(uname)), BSD)
+ PLATFORM = bsd
+ archExpr = case "`$(UNAME) -m`" in \
+ i[3-6]86) \
+ $(ECHO) i586 \
+ ;; \
+ sparc*) \
+ $(ECHO) sparc \
+ ;; \
+ *) \
+ $(UNAME) -m \
+ ;; \
+ esac
+ ARCH := $(shell $(archExpr) )
+ CC = gcc
+ CFLAGS = -fno-strict-aliasing -fPIC -W -Wall
+ LD = ld
+ LDFLAGS_COMMON = -shared
+ EXTRA_LIBS = -lc
+endif
+
LIBDIR=lib/$(PLATFORM)-$(ARCH)
LAUNCHERLIB=$(LIBDIR)/libLauncher.so
--- jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/channels/spi/SelectorProvider/inheritedChannel/run_tests.sh 2012-08-19 12:40:05.000000000 -0700
@@ -33,11 +33,14 @@
# @run shell run_tests.sh
os=`uname -s`
-
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ SunOS | Linux | *BSD | Darwin )
+ ;;
+ * )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
# if TESTJAVA isn't set then we assume an interactive run. So that it's
@@ -67,7 +70,8 @@
# On Solaris we assume 64-bit if java -d64 works.
DFLAG=
-if [ "$os" = "SunOS" ]; then
+case "${os}" in
+ SunOS )
PLATFORM=solaris
case "`uname -p`" in
i[3-9]86)
@@ -84,9 +88,9 @@
fi
;;
esac
-fi
+ ;;
-if [ "$os" = "Linux" ]; then
+ Linux )
PLATFORM=linux
ARCH=unknown
case "`uname -m`" in
@@ -100,7 +104,24 @@
ARCH=amd64
;;
esac
-fi
+ ;;
+
+ *BSD | Darwin )
+ PLATFORM=bsd
+ ARCH=unknown
+ case "`uname -m`" in
+ i[3-6]86)
+ ARCH=i586
+ ;;
+ ia64)
+ ARCH=ia64
+ ;;
+ x86_64)
+ ARCH=amd64
+ ;;
+ esac
+ ;;
+esac
LIBDIR=lib/${PLATFORM}-${ARCH}
LAUNCHERLIB=${LIBDIR}/libLauncher.so
--- jdk/test/java/nio/charset/Charset/default.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/charset/Charset/default.sh 2012-08-19 12:40:05.000000000 -0700
@@ -41,10 +41,14 @@
fi
s="`uname -s`"
-if [ "$s" != Linux -a "$s" != SunOS ]; then
- echo "$s: locale command not supported on this system, skipping..."
- exit 0
-fi
+case "$s" in
+ Linux|SunOS|*BSD|Darwin)
+ ;;
+ *)
+ echo "$s: locale command not supported on this system, skipping..."
+ exit 0
+ ;;
+esac
JAVA=$TESTJAVA/bin/java
--- jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/charset/coders/CheckSJISMappingProp.sh 2012-08-19 12:40:05.000000000 -0700
@@ -34,7 +34,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin ) ;;
+ SunOS | Linux | *BSD | Darwin ) ;;
# Skip locale test for Windows
Windows* )
echo "Passed"; exit 0 ;;
--- jdk/test/java/nio/charset/spi/basic.sh 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/charset/spi/basic.sh 2012-08-19 12:40:05.000000000 -0700
@@ -70,10 +70,14 @@
L="$1"
shift
s=`uname -s`
- if [ $s != Linux -a $s != SunOS -a $s != Darwin ]; then
- echo "$L: Locales not supported on this system, skipping..."
- exit 0
- fi
+ case "$s" in
+ Linux|SunOS|*BSD|Darwin)
+ ;;
+ *)
+ echo "$L: Locales not supported on this system, skipping..."
+ exit 0
+ ;;
+ esac
if [ "x`locale -a | grep $L`" != "x$L" ]; then
echo "$L: Locale not supported, skipping..."
exit 0
@@ -85,7 +89,7 @@
cd $TMP
case `uname` in
- SunOS | Linux | Darwin ) CPS=':' ;;
+ SunOS | Linux | *BSD | Darwin ) CPS=':' ;;
Windows* ) CPS=';' ;;
*) echo "Unknown platform: `uname`"; exit 1 ;;
esac
--- jdk/test/java/nio/file/FileSystem/Basic.java 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/file/FileSystem/Basic.java 2012-08-19 12:40:05.000000000 -0700
@@ -76,6 +76,8 @@
checkSupported(fs, "posix", "unix", "owner", "acl", "user");
if (os.equals("Linux"))
checkSupported(fs, "posix", "unix", "owner", "dos", "user");
+ if (os.endsWith("BSD"))
+ checkSupported(fs, "posix", "unix", "owner");
if (os.contains("OS X"))
checkSupported(fs, "posix", "unix", "owner");
if (os.equals("Windows"))
--- jdk/test/java/nio/file/Files/CopyAndMove.java 2012-08-10 10:34:32.000000000 -0700
+++ jdk/test/java/nio/file/Files/CopyAndMove.java 2012-08-19 12:40:05.000000000 -0700
@@ -634,7 +634,7 @@
// check POSIX attributes are copied
String os = System.getProperty("os.name");
- if (os.equals("SunOS") || os.equals("Linux")) {
+ if (os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD")) {
checkPosixAttributes(
readAttributes(source, PosixFileAttributes.class, linkOptions),
readAttributes(target, PosixFileAttributes.class, linkOptions));
@@ -1136,7 +1136,7 @@
static void randomizeAttributes(Path file) throws IOException {
String os = System.getProperty("os.name");
boolean isWindows = os.startsWith("Windows");
- boolean isUnix = os.equals("SunOS") || os.equals("Linux");
+ boolean isUnix = os.equals("SunOS") || os.equals("Linux") || os.endsWith("BSD");
boolean isDirectory = isDirectory(file, NOFOLLOW_LINKS);
if (isUnix) {
--- jdk/test/java/rmi/registry/readTest/readTest.sh 2012-08-10 10:34:39.000000000 -0700
+++ jdk/test/java/rmi/registry/readTest/readTest.sh 2012-08-19 12:40:06.000000000 -0700
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
FILEURL="file:"
--- jdk/test/java/rmi/reliability/launch_reliability.ksh 2012-08-10 10:34:42.000000000 -0700
+++ jdk/test/java/rmi/reliability/launch_reliability.ksh 2012-08-19 12:40:06.000000000 -0700
@@ -84,14 +84,12 @@
# set platform-dependent variables
-if [ `uname` = "SunOS" ] ; then
+case `uname` in
+ SunOS | Linux | *BSD | Darwin )
PATH_SEP=":"
-
-elif [ `uname` = "Linux" ] ; then
- PATH_SEP=":"
-else
+ * )
PATH_SEP=";"
-fi
+esac
export PATH_SEP
mainpid=$$
--- jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/ClassLoaderDeadlock/ClassLoaderDeadlock.sh 2012-08-19 12:40:06.000000000 -0700
@@ -46,15 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock.sh 2012-08-19 12:40:06.000000000 -0700
@@ -34,15 +34,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/ClassLoaderDeadlock/Deadlock2.sh 2012-08-19 12:40:06.000000000 -0700
@@ -50,15 +50,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/signedfirst/Dyn.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/signedfirst/Dyn.sh 2012-08-19 12:40:06.000000000 -0700
@@ -46,15 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/security/Security/signedfirst/Static.sh 2012-08-10 10:34:51.000000000 -0700
+++ jdk/test/java/security/Security/signedfirst/Static.sh 2012-08-19 12:40:06.000000000 -0700
@@ -46,15 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/util/Currency/PropertiesTest.sh 2012-08-10 10:34:57.000000000 -0700
+++ jdk/test/java/util/Currency/PropertiesTest.sh 2012-08-19 12:40:06.000000000 -0700
@@ -30,7 +30,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/util/PluggableLocale/ExecTest.sh 2012-08-10 10:35:02.000000000 -0700
+++ jdk/test/java/util/PluggableLocale/ExecTest.sh 2012-08-19 12:40:06.000000000 -0700
@@ -58,7 +58,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2012-08-10 10:35:04.000000000 -0700
+++ jdk/test/java/util/ResourceBundle/Bug6299235Test.sh 2012-08-19 12:40:07.000000000 -0700
@@ -31,7 +31,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2012-08-10 10:35:05.000000000 -0700
+++ jdk/test/java/util/ResourceBundle/Control/ExpirationTest.sh 2012-08-19 12:40:07.000000000 -0700
@@ -72,10 +72,10 @@
Windows* | CYGWIN* )
DEL=";"
;;
-SunOS | Darwin)
+SunOS | Darwin )
DEL=":"
;;
-Linux)
+Linux | *BSD )
DEL=":"
HAS_S=YES
;;
--- jdk/test/java/util/ServiceLoader/basic.sh 2012-08-10 10:35:06.000000000 -0700
+++ jdk/test/java/util/ServiceLoader/basic.sh 2012-08-19 12:40:07.000000000 -0700
@@ -42,9 +42,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Darwin )
- SEP=':' ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
SEP=':' ;;
* )
SEP='\;' ;;
--- jdk/test/java/util/concurrent/BlockingQueue/LastElement.java 2012-08-10 10:35:08.000000000 -0700
+++ jdk/test/java/util/concurrent/BlockingQueue/LastElement.java 2012-08-19 12:40:07.000000000 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
/*
* @test
- * @bug 6215625 7161229
+ * @bug 6215625
* @summary Check correct behavior when last element is removed.
* @author Martin Buchholz
*/
@@ -38,7 +38,9 @@
testQueue(new ArrayBlockingQueue<Integer>(10, true));
testQueue(new ArrayBlockingQueue<Integer>(10, false));
testQueue(new LinkedTransferQueue<Integer>());
- testQueue(new PriorityBlockingQueue<Integer>());
+
+ System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
+ if (failed > 0) throw new Exception("Some tests failed");
}
void testQueue(BlockingQueue<Integer> q) throws Throwable {
@@ -57,7 +59,6 @@
try {check(q.take() == three);}
catch (Throwable t) {unexpected(t);}
check(q.isEmpty() && q.size() == 0);
- check(noRetention(q));
// iterator().remove()
q.clear();
@@ -76,26 +77,6 @@
check(q.isEmpty() && q.size() == 0);
}
- boolean noRetention(BlockingQueue<?> q) {
- if (q instanceof PriorityBlockingQueue) {
- PriorityBlockingQueue<?> pbq = (PriorityBlockingQueue) q;
- try {
- java.lang.reflect.Field queue =
- PriorityBlockingQueue.class.getDeclaredField("queue");
- queue.setAccessible(true);
- Object[] a = (Object[]) queue.get(pbq);
- return a[0] == null;
- }
- catch (NoSuchFieldException e) {
- unexpected(e);
- }
- catch (IllegalAccessException e) {
- // ignore - security manager must be installed
- }
- }
- return true;
- }
-
//--------------------- Infrastructure ---------------------------
volatile int passed = 0, failed = 0;
void pass() {passed++;}
--- jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2012-08-10 10:35:14.000000000 -0700
+++ jdk/test/javax/crypto/SecretKeyFactory/FailOverTest.sh 2012-08-19 12:40:07.000000000 -0700
@@ -51,7 +51,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2012-08-10 10:35:15.000000000 -0700
+++ jdk/test/javax/imageio/stream/StreamCloserLeak/run_test.sh 2012-08-19 12:40:07.000000000 -0700
@@ -84,7 +84,7 @@
TMP="/tmp"
;;
- Linux | Darwin )
+ Linux | *BSD | Darwin )
VAR="A different value for Linux"
DEFAULT_JDK=/usr/local/java/jdk1.4/linux-i386
FILESEP="/"
--- jdk/test/javax/script/CommonSetup.sh 2012-08-10 10:35:25.000000000 -0700
+++ jdk/test/javax/script/CommonSetup.sh 2012-08-19 12:40:07.000000000 -0700
@@ -36,7 +36,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/javax/security/auth/Subject/doAs/Test.sh 2012-08-10 10:35:26.000000000 -0700
+++ jdk/test/javax/security/auth/Subject/doAs/Test.sh 2012-08-19 12:40:07.000000000 -0700
@@ -33,17 +33,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PS=":"
- FS="/"
- RM="/bin/rm -f"
- ;;
- Linux )
- PS=":"
- FS="/"
- RM="/bin/rm -f"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
RM="/bin/rm -f"
--- jdk/test/javax/swing/JComponent/7154030/bug7154030.java 2012-08-10 10:36:00.000000000 -0700
+++ jdk/test/javax/swing/JComponent/7154030/bug7154030.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,169 +0,0 @@
-/*
- * Copyright (c) 2012 Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Portions Copyright (c) 2012 IBM Corporation
- */
-
-import javax.swing.JButton;
-import javax.swing.JDesktopPane;
-import javax.swing.JFrame;
-import javax.swing.SwingUtilities;
-import sun.awt.SunToolkit;
-
-import java.awt.AWTException;
-import java.awt.AlphaComposite;
-import java.awt.Color;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
-import java.awt.Rectangle;
-import java.awt.Robot;
-import java.awt.Toolkit;
-import java.awt.image.BufferedImage;
-
-/* @test 1.1 2012/04/12
- * @bug 7154030
- * @summary Swing components fail to hide after calling hide()
- * @author Jonathan Lu
- * @library ../../regtesthelpers/
- * @build Util
- * @run main bug7154030
- */
-
-public class bug7154030 {
-
- private static JButton button = null;
-
- public static void main(String[] args) throws Exception {
- BufferedImage imageInit = null;
-
- BufferedImage imageShow = null;
-
- BufferedImage imageHide = null;
-
- SunToolkit toolkit = (SunToolkit) Toolkit.getDefaultToolkit();
-
- Robot robot = new Robot();
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- JDesktopPane desktop = new JDesktopPane();
- button = new JButton("button");
- JFrame frame = new JFrame();
-
- button.setSize(200, 200);
- button.setLocation(100, 100);
- button.setForeground(Color.RED);
- button.setBackground(Color.RED);
- button.setOpaque(true);
- button.setVisible(false);
- desktop.add(button);
-
- frame.setContentPane(desktop);
- frame.setSize(300, 300);
- frame.setLocation(0, 0);
- frame.setVisible(true);
- frame.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
- }
- });
-
- toolkit.realSync();
- imageInit = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.show();
- }
- });
-
- toolkit.realSync();
- imageShow = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
- if (Util.compareBufferedImages(imageInit, imageShow)) {
- throw new Exception("Failed to show opaque button");
- }
-
- toolkit.realSync();
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.hide();
- }
- });
-
- toolkit.realSync();
- imageHide = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- if (!Util.compareBufferedImages(imageInit, imageHide)) {
- throw new Exception("Failed to hide opaque button");
- }
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.setOpaque(false);
- button.setBackground(new Color(128, 128, 0));
- button.setVisible(false);
- }
- });
-
- toolkit.realSync();
- imageInit = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.show();
- }
- });
-
- toolkit.realSync();
- imageShow = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- SwingUtilities.invokeAndWait(new Runnable() {
-
- @Override
- public void run() {
- button.hide();
- }
- });
-
- if (Util.compareBufferedImages(imageInit, imageShow)) {
- throw new Exception("Failed to show non-opaque button");
- }
-
- toolkit.realSync();
- imageHide = robot.createScreenCapture(new Rectangle(0, 0, 300, 300));
-
- if (!Util.compareBufferedImages(imageInit, imageHide)) {
- throw new Exception("Failed to hide non-opaque button");
- }
- }
-}
--- jdk/test/javax/swing/text/DefaultCaret/6938583/bug6938583.java 2012-08-10 10:36:15.000000000 -0700
+++ jdk/test/javax/swing/text/DefaultCaret/6938583/bug6938583.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,51 +0,0 @@
-/*
- * Copyright (c) 2011 Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * Portions Copyright (c) 2011 IBM Corporation
- */
-
-/*
- * @test
- * @bug 6938583
- * @summary Unexpected NullPointerException when use CodeIM demo on windows
- * @author LittleE
- */
-
-import javax.swing.*;
-import javax.swing.text.DefaultCaret;
-import java.awt.event.MouseEvent;
-
-public class bug6938583 {
- public static void main(String[] args) throws Exception {
- SwingUtilities.invokeAndWait(new Runnable() {
- public void run() {
- JTextArea jta = new JTextArea();
- DefaultCaret dc = new DefaultCaret();
- jta.setCaret(dc);
- dc.deinstall(jta);
- dc.mouseClicked(new MouseEvent(jta, MouseEvent.MOUSE_CLICKED, 0, 0, 0, 0, 0, false));
- }
- });
- }
-}
--- jdk/test/jprt.config 2012-08-10 10:36:17.000000000 -0700
+++ jdk/test/jprt.config 2012-08-19 12:40:08.000000000 -0700
@@ -71,8 +71,8 @@
# Uses 'uname -s', but only expect SunOS or Linux, assume Windows otherwise.
osname=`uname -s`
-if [ "${osname}" = SunOS ] ; then
-
+case "${osname}" in
+ SunOS )
# SOLARIS: Sparc or X86
osarch=`uname -p`
if [ "${osarch}" = sparc ] ; then
@@ -96,9 +96,9 @@
# File creation mask
umask 002
+ ;;
-elif [ "${osname}" = Linux ] ; then
-
+ Linux | Darwin )
# Add basic paths
path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
@@ -107,8 +107,31 @@
fileMustExist "${make}" make
umask 002
+ ;;
+
+ FreeBSD | OpenBSD )
+ # Add basic paths
+ path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
-else
+ # Find GNU make
+ make=/usr/local/bin/gmake
+ fileMustExist "${make}" make
+
+ umask 002
+ ;;
+
+ NetBSD )
+ # Add basic paths
+ path4sdk=/usr/bin:/bin:/usr/sbin:/sbin
+
+ # Find GNU make
+ make=/usr/pkg/bin/gmake
+ fileMustExist "${make}" make
+
+ umask 002
+ ;;
+
+ * )
# Windows: Differs on CYGWIN vs. MKS.
@@ -150,8 +173,8 @@
if [ "${unix_toolset}" = CYGWIN ] ; then
path4sdk="`/usr/bin/cygpath -p ${path4sdk}`"
fi
-
-fi
+ ;;
+esac
# Export PATH setting
PATH="${path4sdk}"
--- jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2012-08-10 10:36:17.000000000 -0700
+++ jdk/test/lib/security/java.policy/Ext_AllPolicy.sh 2012-08-19 12:40:08.000000000 -0700
@@ -50,7 +50,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/java2d/OpenGL/bug7181438.java 2012-08-10 10:36:19.000000000 -0700
+++ jdk/test/sun/java2d/OpenGL/bug7181438.java 1969-12-31 16:00:00.000000000 -0800
@@ -1,83 +0,0 @@
-/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-import java.awt.Color;
-import java.awt.Graphics;
-import java.awt.GraphicsConfiguration;
-import java.awt.GraphicsEnvironment;
-import java.awt.Transparency;
-import java.awt.image.BufferedImage;
-import java.awt.image.VolatileImage;
-
-/**
- * @test
- * @bug 7181438
- * @summary Verifies that we get correct alpha, when we draw opaque
- * BufferedImage to non opaque VolatileImage via intermediate opaque texture.
- * @author Sergey Bylokhov
- * @run main/othervm -Dsun.java2d.accthreshold=0 bug7181438
- */
-public final class bug7181438 {
-
- private static final int SIZE = 500;
-
- public static void main(final String[] args) {
-
- final BufferedImage bi = createBufferedImage();
- final VolatileImage vi = createVolatileImage();
- final Graphics s2dVi = vi.getGraphics();
-
- //sw->texture->surface blit
- s2dVi.drawImage(bi, 0, 0, null);
-
- final BufferedImage results = vi.getSnapshot();
- for (int i = 0; i < SIZE; ++i) {
- for (int j = 0; j < SIZE; ++j) {
- //Image should be opaque: (black color and alpha = 255)
- if (results.getRGB(i, j) != 0xFF000000) {
- throw new RuntimeException("Failed: Wrong alpha");
- }
- }
- }
- System.out.println("Passed");
- }
-
-
- private static VolatileImage createVolatileImage() {
- final GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
- final GraphicsConfiguration gc = ge.getDefaultScreenDevice().getDefaultConfiguration();
- return gc.createCompatibleVolatileImage(SIZE, SIZE,
- Transparency.TRANSLUCENT);
- }
-
- private static BufferedImage createBufferedImage() {
- final BufferedImage bi = new BufferedImage(SIZE, SIZE,
- BufferedImage.TYPE_INT_RGB);
- final Graphics bg = bi.getGraphics();
- //Black color and alpha = 0
- bg.setColor(new Color(0, 0, 0, 0));
- bg.fillRect(0, 0, SIZE, SIZE);
- bg.dispose();
- return bi;
- }
-}
--- jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/CustomLauncherTest.sh 2012-08-19 12:40:08.000000000 -0700
@@ -45,37 +45,53 @@
# has to locate libjvm.so. Also $! is not reliable on some releases of MKS.
#{
OS=`uname -s`
-if [ "$OS" != "Linux" -a "$OS" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${OS}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
#
# Locate the custom launcher for this platform
#
PLATFORM=unknown
ARCH=unknown
-if [ "$OS" = "SunOS" ]; then
- PLATFORM=solaris
- case "`uname -p`" in
- i[3-9]86)
- ARCH=i586
- ;;
- sparc)
- ARCH=sparc
- ;;
- esac
-else
- PLATFORM=linux
- case "`uname -m`" in
- i[3-6]86)
- ARCH=i586
- ;;
- x86_64)
- ARCH=amd64
- ;;
- esac
-fi
+case "${OS}" in
+ SunOS )
+ PLATFORM=solaris
+ case "`uname -p`" in
+ i[3-9]86)
+ ARCH=i586
+ ;;
+ sparc)
+ ARCH=sparc
+ ;;
+ esac
+ ;;
+ Linux )
+ PLATFORM=linux
+ case "`uname -m`" in
+ i[3-6]86)
+ ARCH=i586
+ ;;
+ x86_64)
+ ARCH=amd64
+ ;;
+ esac
+ ;;
+ *BSD | Darwin )
+ PLATFORM=bsd
+ case "`uname -m`" in
+ i[3-6]86)
+ ARCH=i586
+ ;;
+ x86_64)
+ ARCH=amd64
+ ;;
+ esac
+ ;;
+esac
#
--- jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/GeneratePropertyPassword.sh 2012-08-19 12:40:08.000000000 -0700
@@ -35,7 +35,7 @@
UMASK=`umask`
case $OS in
-SunOS | Linux | Darwin)
+SunOS | Linux | *BSD | Darwin)
PATHSEP=":"
FILESEP="/"
DFILESEP=$FILESEP
--- jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/LocalManagementTest.sh 2012-08-19 12:40:08.000000000 -0700
@@ -86,10 +86,12 @@
# on Windows 98.
os=`uname -s`
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
JAVA=${TESTJAVA}/bin/java
CLASSPATH=${TESTCLASSES}
--- jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2012-08-10 10:36:21.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/PasswordFilePermissionTest.sh 2012-08-19 12:40:08.000000000 -0700
@@ -70,10 +70,12 @@
# security the password file.
os=`uname -s`
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
# Create configuration file and dummy password file
--- jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2012-08-10 10:36:22.000000000 -0700
+++ jdk/test/sun/management/jmxremote/bootstrap/SSLConfigFilePermissionTest.sh 2012-08-19 12:40:08.000000000 -0700
@@ -69,10 +69,12 @@
# security the password file.
os=`uname -s`
-if [ "$os" != "Linux" -a "$os" != "SunOS" ]; then
- echo "Test not designed to run on this operating system, skipping..."
- exit 0
-fi
+case "${os}" in
+ Windows* | CYGWIN* )
+ echo "Test not designed to run on this operating system, skipping..."
+ exit 0
+ ;;
+esac
# Create management and SSL configuration files
--- jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2012-08-10 10:36:24.000000000 -0700
+++ jdk/test/sun/misc/URLClassPath/ClassnameCharTest.sh 2012-08-19 12:40:09.000000000 -0700
@@ -36,7 +36,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/MarkResetTest.sh 2012-08-10 10:36:27.000000000 -0700
+++ jdk/test/sun/net/www/MarkResetTest.sh 2012-08-19 12:40:09.000000000 -0700
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2012-08-10 10:36:28.000000000 -0700
+++ jdk/test/sun/net/www/http/HttpClient/RetryPost.sh 2012-08-19 12:40:09.000000000 -0700
@@ -28,7 +28,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/protocol/jar/B5105410.sh 2012-08-10 10:36:29.000000000 -0700
+++ jdk/test/sun/net/www/protocol/jar/B5105410.sh 2012-08-19 12:40:09.000000000 -0700
@@ -31,7 +31,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2012-08-10 10:36:30.000000000 -0700
+++ jdk/test/sun/net/www/protocol/jar/jarbug/run.sh 2012-08-19 12:40:09.000000000 -0700
@@ -31,7 +31,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/nio/ch/SelProvider.java 2012-08-10 10:36:30.000000000 -0700
+++ jdk/test/sun/nio/ch/SelProvider.java 2012-08-19 12:40:09.000000000 -0700
@@ -39,6 +39,8 @@
expected = "sun.nio.ch.DevPollSelectorProvider";
} else if ("Linux".equals(osname)) {
expected = "sun.nio.ch.EPollSelectorProvider";
+ } else if (osname.endsWith("BSD")) {
+ expected = "sun.nio.ch.KQueueSelectorProvider";
} else if (osname.contains("OS X")) {
expected = "sun.nio.ch.KQueueSelectorProvider";
} else
--- jdk/test/sun/security/krb5/runNameEquals.sh 2012-08-10 10:36:39.000000000 -0700
+++ jdk/test/sun/security/krb5/runNameEquals.sh 2012-08-19 12:40:09.000000000 -0700
@@ -48,15 +48,11 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | Darwin | *BSD )
PATHSEP=":"
FILESEP="/"
NATIVE=true
;;
- Darwin )
- PATHSEP=":"
- FILESEP="/"
- ;;
CYGWIN* )
PATHSEP=";"
FILESEP="/"
--- jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2012-08-10 10:36:40.000000000 -0700
+++ jdk/test/sun/security/pkcs11/KeyStore/Basic.sh 2012-08-19 12:40:09.000000000 -0700
@@ -131,6 +131,27 @@
;;
esac
;;
+ *BSD | Darwin )
+ ARCH=`uname -m`
+ case "$ARCH" in
+ i[3-6]86 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ amd64* | x86_64 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ * )
+ echo "Unsupported System: ${OS} ${ARCH}"
+ exit 0;
+ ;;
+ esac
+ ;;
Windows* )
FS="\\"
PS=";"
--- jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2012-08-10 10:36:41.000000000 -0700
+++ jdk/test/sun/security/pkcs11/KeyStore/ClientAuth.sh 2012-08-19 12:40:09.000000000 -0700
@@ -93,6 +93,27 @@
;;
esac
;;
+ *BSD | Darwin )
+ ARCH=`uname -m`
+ case "$ARCH" in
+ i[3-6]86 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ amd64* | x86_64 )
+ FS="/"
+ PS=":"
+ CP="${FS}bin${FS}cp"
+ CHMOD="${FS}bin${FS}chmod"
+ ;;
+ * )
+ echo "Unsupported System: ${OS} ${ARCH}"
+ exit 0;
+ ;;
+ esac
+ ;;
Windows* )
FS="\\"
PS=";"
--- jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2012-08-10 10:36:42.000000000 -0700
+++ jdk/test/sun/security/pkcs11/Provider/ConfigQuotedString.sh 2012-08-19 12:40:09.000000000 -0700
@@ -50,19 +50,7 @@
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Linux )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
PS=":"
CP="${FS}bin${FS}cp"
--- jdk/test/sun/security/pkcs11/Provider/Login.sh 2012-08-10 10:36:42.000000000 -0700
+++ jdk/test/sun/security/pkcs11/Provider/Login.sh 2012-08-19 12:40:09.000000000 -0700
@@ -51,19 +51,7 @@
OS=`uname -s`
case "$OS" in
- SunOS )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Linux )
- FS="/"
- PS=":"
- CP="${FS}bin${FS}cp"
- CHMOD="${FS}bin${FS}chmod"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
PS=":"
CP="${FS}bin${FS}cp"
--- jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2012-08-10 10:36:53.000000000 -0700
+++ jdk/test/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh 2012-08-19 12:40:10.000000000 -0700
@@ -44,11 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2012-08-10 10:36:55.000000000 -0700
+++ jdk/test/sun/security/provider/PolicyFile/getinstance/getinstance.sh 2012-08-19 12:40:10.000000000 -0700
@@ -47,15 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PS=":"
- FS="/"
- ;;
- Linux )
- PS=":"
- FS="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2012-08-10 10:36:58.000000000 -0700
+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/EngineArgs/DebugReportsOneExtraByte.sh 2012-08-19 12:40:10.000000000 -0700
@@ -33,7 +33,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2012-08-10 10:36:59.000000000 -0700
+++ jdk/test/sun/security/ssl/com/sun/net/ssl/internal/ssl/SSLSocketImpl/NotifyHandshakeTest.sh 2012-08-19 12:40:10.000000000 -0700
@@ -42,7 +42,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FILESEP="/"
PATHSEP=":"
;;
--- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2012-08-10 10:37:02.000000000 -0700
+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxy.sh 2012-08-19 12:40:10.000000000 -0700
@@ -32,7 +32,7 @@
HOSTNAME=`uname -n`
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/ssl/sun/net/www/protocol/https/HttpsURLConnection/PostThruProxyWithAuth.sh 2012-08-19 12:40:10.000000000 -0700
@@ -32,7 +32,7 @@
HOSTNAME=`uname -n`
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/AlgOptions.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/PercentSign.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/jarsigner/diffend.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/diffend.sh 2012-08-19 12:40:10.000000000 -0700
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/jarsigner/oldsig.sh 2012-08-10 10:37:03.000000000 -0700
+++ jdk/test/sun/security/tools/jarsigner/oldsig.sh 2012-08-19 12:40:10.000000000 -0700
@@ -42,7 +42,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/AltProviderPath.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/CloneKeyAskPassword.sh 2012-08-19 12:40:10.000000000 -0700
@@ -47,15 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Linux )
- PATHSEP=":"
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
FILESEP="/"
;;
--- jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/NoExtNPE.sh 2012-08-19 12:40:10.000000000 -0700
@@ -42,13 +42,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS )
- FILESEP="/"
- ;;
- Linux )
- FILESEP="/"
- ;;
- Darwin )
+ SunOS | Linux | *BSD | Darwin )
FILESEP="/"
;;
CYGWIN* )
--- jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/SecretKeyKS.sh 2012-08-19 12:40:10.000000000 -0700
@@ -45,7 +45,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/StandardAlgName.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/keytool/autotest.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/autotest.sh 2012-08-19 12:40:10.000000000 -0700
@@ -72,6 +72,27 @@
;;
esac
;;
+ *BSD | Darwin )
+ case "${OS}" in
+ *BSD )
+ LIBNAME=libsoftokn3.so
+ ;;
+ Darwin )
+ LIBNAME=libsoftokn3.dylib
+ ;;
+ esac
+ ARCH=`uname -m`
+ FS="/"
+ case "$ARCH" in
+ i[3-6]86 )
+ PF="bsd-i586"
+ ;;
+ * )
+ echo "Will not run test on: ${OS} ${ARCH}"
+ exit 0;
+ ;;
+ esac
+ ;;
* )
echo "Will not run test on: ${OS}"
exit 0;
--- jdk/test/sun/security/tools/keytool/i18n.sh 2012-08-10 10:37:04.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/i18n.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/keytool/printssl.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/printssl.sh 2012-08-19 12:40:10.000000000 -0700
@@ -37,7 +37,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- jdk/test/sun/security/tools/keytool/resource.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/resource.sh 2012-08-19 12:40:10.000000000 -0700
@@ -43,7 +43,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
FS="/"
TMP=/tmp
--- jdk/test/sun/security/tools/keytool/standard.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/keytool/standard.sh 2012-08-19 12:40:10.000000000 -0700
@@ -44,7 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows_* )
--- jdk/test/sun/security/tools/policytool/Alias.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/Alias.sh 2012-08-19 12:40:10.000000000 -0700
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/policytool/ChangeUI.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/ChangeUI.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/OpenPolicy.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/policytool/SaveAs.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/SaveAs.sh 2012-08-19 12:40:10.000000000 -0700
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/UpdatePermissions.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/policytool/UsePolicy.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/UsePolicy.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/tools/policytool/i18n.sh 2012-08-10 10:37:05.000000000 -0700
+++ jdk/test/sun/security/tools/policytool/i18n.sh 2012-08-19 12:40:10.000000000 -0700
@@ -46,7 +46,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- jdk/test/sun/security/util/Oid/S11N.sh 2012-08-10 10:37:06.000000000 -0700
+++ jdk/test/sun/security/util/Oid/S11N.sh 2012-08-19 12:40:10.000000000 -0700
@@ -71,7 +71,7 @@
i[3-6]86 )
PF="linux-i586"
;;
- amd64* | x86_64 )
+ amd64* )
PF="linux-amd64"
;;
* )
@@ -97,29 +97,15 @@
;;
esac
-echo "==================================================="
-echo "Try to set ALT_JAVA_RE_JDK if you see timeout error"
-echo "==================================================="
-
# the test code
${TESTJAVA}${FS}bin${FS}javac -target 1.4 -source 1.4 \
-d . ${TESTSRC}${FS}SerialTest.java || exit 10
-# You can set ALT_JAVA_RE_JDK to another location that contains the
-# binaries for older JDK releases. You can set it to a non-existent
-# directory to skip the interop tests between different versions.
-
-if [ "$ALT_JAVA_RE_JDK" = "" ]; then
- JAVA_RE_JDK=/java/re/j2se
-else
- JAVA_RE_JDK=$ALT_JAVA_RE_JDK
-fi
-
OLDJAVA="
- $JAVA_RE_JDK/1.6.0/latest/binaries/${PF}
- $JAVA_RE_JDK/1.5.0/latest/binaries/${PF}
- $JAVA_RE_JDK/1.4.2/latest/binaries/${PF}
+ /java/re/j2se/1.6.0/latest/binaries/${PF}
+ /java/re/j2se/1.5.0/latest/binaries/${PF}
+ /java/re/j2se/1.4.2/latest/binaries/${PF}
"
SMALL="
--- jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2012-08-10 10:37:09.000000000 -0700
+++ jdk/test/sun/tools/jconsole/ImmutableResourceTest.sh 2012-08-19 12:40:10.000000000 -0700
@@ -53,7 +53,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2012-08-10 10:37:09.000000000 -0700
+++ jdk/test/sun/tools/jconsole/ResourceCheckTest.sh 2012-08-19 12:40:10.000000000 -0700
@@ -54,7 +54,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2012-08-10 10:37:12.000000000 -0700
+++ jdk/test/sun/tools/native2ascii/Native2AsciiTests.sh 2012-08-19 12:40:11.000000000 -0700
@@ -33,7 +33,7 @@
case `uname -s` in
Windows* | CYGWIN*) OS=Windows;;
- SunOS|Linux) OS=Unix;;
+ SunOS|Linux|*BSD|Darwin) OS=Unix;;
esac
N2A=$TESTJAVA/bin/native2ascii
--- jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2012-08-10 10:37:12.000000000 -0700
+++ jdk/test/sun/tools/native2ascii/resources/ImmutableResourceTest.sh 2012-08-19 12:40:11.000000000 -0700
@@ -56,7 +56,7 @@
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PATHSEP=":"
;;
--- langtools/.hgtags 2012-08-10 10:39:19.000000000 -0700
+++ langtools/.hgtags 2012-08-19 11:53:31.000000000 -0700
@@ -123,6 +123,7 @@
9425dd4f53d5bfcd992d9aecea0eb7d8b2d4f62b jdk7-b146
d34578643d1c6c752d4a6b5e79c6ab1b60850b4a jdk7u1-b01
58bc532d63418ac3c9b42460d89cdaf595c6f3e1 jdk7-b147
+23aadf169f085b180803bcdc53baad4ae870f75b 7u0
cd2cc8b5edb045b950aed46d159b4fb8fc2fd1df jdk7u1-b02
82820a30201dbf4b80f1916f3d0f4a92ad21b61a jdk7u1-b03
baa2c13c70fea3d6e259a34f0903197fdceb64b5 jdk7u1-b04
@@ -197,5 +198,4 @@
a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u6-b21
4f3aafa690d1fcb18693fc4085049eeffe4778f7 jdk7u6-b22
dd3e29d8892fcaba6d76431d5fa9d49e7c088f76 jdk7u6-b23
-a35ca56cf8d09b92511f0cd71208a2ea05c8a338 jdk7u8-b01
-41bc8da868e58f7182d26b2ab9b6f8a4b09894ed jdk7u8-b02
+6aac89e84fc96d15bb78b13aa71c9e6b73d7237e jdk7u6-b24
--- langtools/test/Makefile 2012-08-10 10:39:30.000000000 -0700
+++ langtools/test/Makefile 2012-08-19 11:53:32.000000000 -0700
@@ -42,6 +42,14 @@
ARCH=i586
endif
endif
+ifeq ($(findstring BSD,$(OSNAME)), BSD)
+ PLATFORM = bsd
+ JT_PLATFORM = linux
+ ARCH = $(shell uname -m)
+ ifeq ($(ARCH), i386)
+ ARCH=i586
+ endif
+endif
ifeq ($(OSNAME), Windows_NT)
PLATFORM = windows
JT_PLATFORM = win32
@@ -101,7 +109,7 @@
ifdef JPRT_JAVA_HOME
JT_JAVA = $(JPRT_JAVA_HOME)
else
- JT_JAVA = $(SLASH_JAVA)/re/jdk/1.6.0/archive/fcs/binaries/$(PLATFORM)-$(ARCH)
+ JT_JAVA = $(TEST_ROOT)/../../build/$(PLATFORM)-$(ARCH)
endif
# Default JDK to test
@@ -196,7 +204,9 @@
# The test directories to run
DEFAULT_TESTDIRS = .
-TESTDIRS = $(DEFAULT_TESTDIRS)
+ifndef TESTDIRS
+ TESTDIRS = $(DEFAULT_TESTDIRS)
+endif
# Root of all test results
TEST_OUTPUT_DIR = $(TEST_ROOT)/../build/$(PLATFORM)-$(ARCH)/test/langtools
--- langtools/test/tools/javac/4846262/Test.sh 2012-08-10 10:39:38.000000000 -0700
+++ langtools/test/tools/javac/4846262/Test.sh 2012-08-19 11:53:33.000000000 -0700
@@ -44,7 +44,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- langtools/test/tools/javac/6302184/T6302184.sh 2012-08-10 10:39:38.000000000 -0700
+++ langtools/test/tools/javac/6302184/T6302184.sh 2012-08-19 11:53:33.000000000 -0700
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2012-08-10 10:39:41.000000000 -0700
+++ langtools/test/tools/javac/ClassPathTest/ClassPathTest.sh 2012-08-19 11:53:33.000000000 -0700
@@ -56,7 +56,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2012-08-10 10:39:43.000000000 -0700
+++ langtools/test/tools/javac/ExtDirs/ExtDirs.sh 2012-08-19 11:53:33.000000000 -0700
@@ -54,7 +54,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javac/MissingInclude.sh 2012-08-10 10:39:44.000000000 -0700
+++ langtools/test/tools/javac/MissingInclude.sh 2012-08-19 11:53:34.000000000 -0700
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2012-08-10 10:39:45.000000000 -0700
+++ langtools/test/tools/javac/ProtectedInnerClass/ProtectedInnerClass.sh 2012-08-19 11:53:34.000000000 -0700
@@ -52,7 +52,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javac/T5090006/compiler.sh 2012-08-10 10:39:47.000000000 -0700
+++ langtools/test/tools/javac/T5090006/compiler.sh 2012-08-19 11:53:34.000000000 -0700
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/apt.sh 2012-08-10 10:39:53.000000000 -0700
+++ langtools/test/tools/javac/apt.sh 2012-08-19 11:53:34.000000000 -0700
@@ -38,7 +38,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- langtools/test/tools/javac/constDebug/ConstDebug.sh 2012-08-10 10:39:55.000000000 -0700
+++ langtools/test/tools/javac/constDebug/ConstDebug.sh 2012-08-19 11:53:34.000000000 -0700
@@ -47,7 +47,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2012-08-10 10:40:03.000000000 -0700
+++ langtools/test/tools/javac/fatalErrors/NoJavaLang.sh 2012-08-19 11:53:35.000000000 -0700
@@ -48,7 +48,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
;;
CYGWIN* )
--- langtools/test/tools/javac/innerClassFile/Driver.sh 2012-08-10 10:40:14.000000000 -0700
+++ langtools/test/tools/javac/innerClassFile/Driver.sh 2012-08-19 11:53:35.000000000 -0700
@@ -53,7 +53,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/javazip/Test.sh 2012-08-10 10:40:14.000000000 -0700
+++ langtools/test/tools/javac/javazip/Test.sh 2012-08-19 11:53:35.000000000 -0700
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
FS="/"
SCR=`pwd`
;;
--- langtools/test/tools/javac/links/links.sh 2012-08-10 10:40:15.000000000 -0700
+++ langtools/test/tools/javac/links/links.sh 2012-08-19 11:53:36.000000000 -0700
@@ -53,7 +53,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
NULL=/dev/null
PS=":"
FS="/"
--- langtools/test/tools/javac/newlines/Newlines.sh 2012-08-10 10:40:17.000000000 -0700
+++ langtools/test/tools/javac/newlines/Newlines.sh 2012-08-19 11:53:36.000000000 -0700
@@ -50,7 +50,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- langtools/test/tools/javac/stackmap/T4955930.sh 2012-08-10 10:40:22.000000000 -0700
+++ langtools/test/tools/javac/stackmap/T4955930.sh 2012-08-19 11:53:36.000000000 -0700
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows_95 | Windows_98 | Windows_NT )
--- langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2012-08-10 10:40:25.000000000 -0700
+++ langtools/test/tools/javac/unicode/SupplementaryJavaID6.sh 2012-08-19 11:53:36.000000000 -0700
@@ -55,7 +55,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | Darwin | *BSD )
if [ -d /usr/lib/locale/en_US.UTF-8 -o -d /usr/lib/locale/en_US.utf8 ]
then
ENV="env LANG=en_US.UTF-8"
--- langtools/test/tools/javah/6257087/foo.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/6257087/foo.sh 2012-08-19 11:53:36.000000000 -0700
@@ -41,7 +41,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javah/ConstMacroTest.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/ConstMacroTest.sh 2012-08-19 11:53:36.000000000 -0700
@@ -56,7 +56,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin )
+ SunOS | Linux | *BSD | Darwin )
PS=":"
FS="/"
;;
--- langtools/test/tools/javah/MissingParamClassTest.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/MissingParamClassTest.sh 2012-08-19 11:53:36.000000000 -0700
@@ -58,7 +58,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
PS=":"
FS="/"
;;
--- langtools/test/tools/javah/ReadOldClass.sh 2012-08-10 10:40:28.000000000 -0700
+++ langtools/test/tools/javah/ReadOldClass.sh 2012-08-19 11:53:36.000000000 -0700
@@ -43,7 +43,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
PS=":"
FS="/"
;;
--- langtools/test/tools/javap/pathsep.sh 2012-08-10 10:40:29.000000000 -0700
+++ langtools/test/tools/javap/pathsep.sh 2012-08-19 11:53:36.000000000 -0700
@@ -40,7 +40,7 @@
# set platform-dependent variables
OS=`uname -s`
case "$OS" in
- SunOS | Linux | Darwin | CYGWIN* )
+ SunOS | Linux | *BSD | Darwin | CYGWIN* )
FS="/"
;;
Windows* )
--- make/scripts/hgforest.sh 2012-08-10 09:07:04.000000000 -0700
+++ make/scripts/hgforest.sh 2012-08-19 11:38:54.000000000 -0700
@@ -1,7 +1,7 @@
#!/bin/sh
#
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
@@ -24,8 +24,6 @@
#
# Shell script for a fast parallel forest command
-command="$1"
-pull_extra_base="$2"
tmp=/tmp/forest.$$
rm -f -r ${tmp}
@@ -37,58 +35,40 @@
# Only look in specific locations for possible forests (avoids long searches)
pull_default=""
-repos=""
-repos_extra=""
-if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
+if [ "$1" = "clone" -o "$1" = "fclone" ] ; then
subrepos="corba jaxp jaxws langtools jdk hotspot"
if [ -f .hg/hgrc ] ; then
pull_default=`hg paths default`
- if [ "${pull_default}" = "" ] ; then
- echo "ERROR: Need initial clone with 'hg paths default' defined"
- exit 1
- fi
fi
if [ "${pull_default}" = "" ] ; then
- echo "ERROR: Need initial repository to use this script"
+ echo "ERROR: Need initial clone with 'hg paths default' defined"
exit 1
fi
+ repos=""
for i in ${subrepos} ; do
if [ ! -f ${i}/.hg/hgrc ] ; then
repos="${repos} ${i}"
fi
done
- if [ "${pull_extra_base}" != "" ] ; then
- subrepos_extra="jdk/src/closed jdk/make/closed jdk/test/closed hotspot/src/closed hotspot/test/closed deploy install sponsors pubs"
- pull_default_tail=`echo ${pull_default} | sed -e 's@^.*://[^/]*/\(.*\)@\1@'`
- pull_extra="${pull_extra_base}/${pull_default_tail}"
- for i in ${subrepos_extra} ; do
- if [ ! -f ${i}/.hg/hgrc ] ; then
- repos_extra="${repos_extra} ${i}"
- fi
- done
- fi
at_a_time=2
- # Any repos to deal with?
- if [ "${repos}" = "" -a "${repos_extra}" = "" ] ; then
- echo "No repositories to clone."
- exit
- fi
else
hgdirs=`ls -d ./.hg ./*/.hg ./*/*/.hg ./*/*/*/.hg ./*/*/*/*/.hg 2>/dev/null`
# Derive repository names from the .hg directory locations
+ repos=""
for i in ${hgdirs} ; do
repos="${repos} `echo ${i} | sed -e 's@/.hg$@@'`"
done
at_a_time=8
- # Any repos to deal with?
- if [ "${repos}" = "" ] ; then
- echo "No repositories to process."
- exit
- fi
fi
-# Echo out what repositories we will clone
-echo "# Repos: ${repos} ${repos_extra}"
+# Any repos to deal with?
+if [ "${repos}" = "" ] ; then
+ echo "No repositories to process."
+ exit
+fi
+
+# Echo out what repositories we will process
+echo "# Repos: ${repos}"
# Run the supplied command on all repos in parallel, save output until end
n=0
@@ -97,9 +77,8 @@
n=`expr ${n} '+' 1`
(
(
- if [ "${command}" = "clone" -o "${command}" = "fclone" ] ; then
- pull_newrepo="`echo ${pull_default}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
- cline="hg clone ${pull_newrepo} ${i}"
+ if [ "$1" = "clone" -o "$1" = "fclone" ] ; then
+ cline="hg $* ${pull_default}/${i} ${i}"
echo "# ${cline}"
( eval "${cline}" )
else
@@ -113,29 +92,10 @@
sleep 5
fi
done
+
# Wait for all hg commands to complete
wait
-if [ "${repos_extra}" != "" ] ; then
- for i in ${repos_extra} ; do
- echo "Starting on ${i}"
- n=`expr ${n} '+' 1`
- (
- (
- pull_newextrarepo="`echo ${pull_extra}/${i} | sed -e 's@\([^:]/\)//*@\1@g'`"
- cline="hg clone ${pull_newextrarepo} ${i}"
- echo "# ${cline}"
- ( eval "${cline}" )
- echo "# exit code $?"
- ) > ${tmp}/repo.${n} 2>&1 ; cat ${tmp}/repo.${n} ) &
- if [ `expr ${n} '%' ${at_a_time}` -eq 0 ] ; then
- sleep 5
- fi
- done
- # Wait for all hg commands to complete
- wait
-fi
-
# Cleanup
rm -f -r ${tmp}
--- make/scripts/normalizer.pl 2012-08-10 09:07:04.000000000 -0700
+++ make/scripts/normalizer.pl 1969-12-31 16:00:00.000000000 -0800
@@ -1,208 +0,0 @@
-#!/usr/bin/perl
-
-#
-# Copyright (c) 2009, 2012, Oracle and/or its affiliates. All rights reserved.
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# This code is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License version 2 only, as
-# published by the Free Software Foundation.
-#
-# This code is distributed in the hope that it will be useful, but WITHOUT
-# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
-# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
-# version 2 for more details (a copy is included in the LICENSE file that
-# accompanied this code).
-#
-# You should have received a copy of the GNU General Public License version
-# 2 along with this work; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
-# or visit www.oracle.com if you need additional information or have any
-# questions.
-#
-
-#
-# Parses java files:
-# 1. Removes from the end of lines spaces and TABs
-# 2. Replaces TABs by spaces
-# 3. Replaces all NewLine separators by Unix NewLine separators
-# 4. Makes one and only one empty line at the end of each file
-
-if ($#ARGV < 0) {
- &usage;
-
- die;
-}
-
-use Cwd 'abs_path';
-
-my @extensions = ("java");
-
-# Read options
-my $dirpos = 0;
-
-while ($dirpos < $#ARGV) {
- if ($ARGV[$dirpos] eq "-e") {
- @extensions = split(/,/, $ARGV[$dirpos + 1]);
- } else {
- last;
- }
-
- $dirpos += 2;
-}
-
-if ($dirpos > $#ARGV) {
- &usage;
-
- die;
-}
-
-use Cwd;
-my $currdir = getcwd;
-
-my $allfiles = 0;
-
-my $filecount = 0;
-
-my @tabvalues;
-
-# Init tabvalues
-push (@tabvalues, " ");
-
-for (my $i = 1; $i < 8; $i++) {
- push(@tabvalues, $tabvalues[$i - 1] . " ");
-}
-
-open(FILELIST, ">$currdir/filelist") or die "Failed while open $currdir/filelist: $!\n";
-
-while ($dirpos <= $#ARGV) {
- use File::Find;
-
- find(\&parse_file, abs_path($ARGV[$dirpos]));
-
- $dirpos += 1;
-}
-
-close(FILELIST);
-
-use Cwd 'chdir';
-chdir $currdir;
-
-print "Checked $allfiles file(s)\n";
-print "Modified $filecount file(s)\n";
-print "See results in the file $currdir/filelist\n";
-
-sub parse_file {
- my $filename = $File::Find::name;
-
- # Skip directories
- return if -d;
-
- # Skip SCCS files
- return if ($filename =~ /\/SCCS\//);
-
- # Skip files with invalid extensions
- my $accepted = 0;
- foreach my $ext (@extensions) {
- if ($_ =~ /\.$ext$/i) {
- $accepted = 1;
-
- last;
- }
- }
- return if ($accepted == 0);
-
- use File::Basename;
- my $dirname = dirname($filename);
-
- use Cwd 'chdir';
- chdir $dirname;
-
- open(FILE, $filename) or die "Failed while open $filename: $!\n";
-
- # Read file
- my @content;
- my $line;
- my $emptylinescount = 0;
- my $modified = 0;
-
- while ($line = <FILE>) {
- my $originalline = $line;
-
- # Process line
-
- # Remove from the end of the line spaces and return character
- while ($line =~ /\s$/) {
- chop($line);
- }
-
- # Replace TABs
- for (my $i = 0; $i < length($line); $i++) {
- if (substr($line, $i, 1) =~ /\t/) {
- $line = substr($line, 0, $i) . $tabvalues[7 - ($i % 8)] . substr($line, $i + 1);
- }
- }
-
- if (length($line) == 0) {
- $emptylinescount++;
- } else {
- while ($emptylinescount > 0) {
- push(@content, "");
-
- $emptylinescount--;
- }
-
- push(@content, $line);
- }
-
- if ($originalline ne ($line . "\n")) {
- $modified = 1;
- }
-
- }
-
- $allfiles++;
-
- if ($emptylinescount > 0) {
- $modified = 1;
- }
-
- close(FILE);
-
- if ($modified != 0) {
- # Write file
- open(FILE, ">$filename") or die "Failed while open $filename: $!\n";
-
- for (my $i = 0; $i <= $#content; $i++) {
- print FILE "$content[$i]\n";
- }
-
- close(FILE);
-
- # Print name from current dir
- if (index($filename, $currdir) == 0) {
- print FILELIST substr($filename, length($currdir) + 1);
- } else {
- print FILELIST $filename;
- }
- print FILELIST "\n";
-
- $filecount++;
-
- print "$filename: modified\n";
- }
-}
-
-sub usage {
- print "Usage:\n";
- print " normalizer.pl [-options] <dir> [dir2 dir3 ...]\n";
- print " Available options:\n";
- print " -e comma separated files extensions. By default accepts only java files\n";
- print "\n";
- print "Examples:\n";
- print " normalizer.pl -e c,cpp,h,hpp .\n";
-}
-
-