diff -ruN jdk-1_5_0_11/control/make/Makefile jdk-1_5_0_11.ahj14/control/make/Makefile --- jdk-1_5_0_11/control/make/Makefile 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/control/make/Makefile 2007-02-24 09:06:50.000000000 +0100 @@ -73,7 +73,7 @@ source: j2se-source deploy-source sponsors-source all:: - @$(ECHO) Control workspace build finished at `$(DATE)` + @$(ECHO) "Control workspace build finished at `$(DATE)`" ################################################################ diff -ruN jdk-1_5_0_11/control/make/common/Defs-bsd.gmk jdk-1_5_0_11.ahj14/control/make/common/Defs-bsd.gmk --- jdk-1_5_0_11/control/make/common/Defs-bsd.gmk 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/control/make/common/Defs-bsd.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -0,0 +1,252 @@ +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + +# +# Defs-bsd.gmk +# derived from: @(#)Defs-linux.gmk 1.98 04/02/19 +# +# Makefile to set defaults for BSD. Should not contain any rules. +# + +# set default values for where to find the MASTER workspaces. Allow +# overrides to reset + +CONTROL_MASTER=/java/jdk/$(JDK_VERSION)/ws/MASTER/control +ifdef ALT_CONTROL_MASTER + CONTROL_MASTER=$(ALT_CONTROL_MASTER) +endif + +HOTSPOT_MASTER=/java/jdk/$(JDK_VERSION)/ws/MASTER/hotspot +ifdef ALT_HOTSPOT_MASTER + HOTSPOT_MASTER=$(ALT_HOTSPOT_MASTER) +endif + +MOTIF_MASTER=/java/jdk/$(JDK_VERSION)/ws/MASTER/motif + ifdef ALT_MOTIF_MASTER + MOTIF_MASTER=$(ALT_MOTIF_MASTER) +endif + +J2SE_MASTER=/java/jdk/$(JDK_VERSION)/ws/MASTER/j2se +ifdef ALT_J2SE_MASTER + J2SE_MASTER=$(ALT_J2SE_MASTER) +endif + +INSTALL_MASTER=/java/jdk/$(JDK_VERSION)/ws/MASTER/install +ifdef ALT_INSTALL_MASTER + INSTALL_MASTER=$(ALT_INSTALL_MASTER) +endif + +DEPLOY_MASTER=/java/jdk/$(JDK_VERSION)/ws/MASTER/deploy +ifdef ALT_DEPLOY_MASTER + DEPLOY_MASTER=$(ALT_DEPLOY_MASTER) +endif + +# define these to avoid picking up ones from aliases or from +# non-standard locations +# + +AR = $(USRBIN_PATH)ar +BASENAME = $(USRBIN_PATH)basename +CAT = $(UNIXCOMMAND_PATH)cat +CD = cd # intrinsic unix command +CHMOD = $(UNIXCOMMAND_PATH)chmod +CMP = $(USRBIN_PATH)cmp +COMM = $(USRBIN_PATH)comm +COMPRESS = $(USRBIN_PATH)compress +CP = $(UNIXCOMMAND_PATH)cp +ifeq ($(TRUE_PLATFORM), OpenBSD) +CPIO = $(UNIXCOMMAND_PATH)cpio +else +CPIO = $(USRBIN_PATH)cpio +endif +CUT = $(USRBIN_PATH)cut +DATE = $(UNIXCOMMAND_PATH)date +DF = $(UNIXCOMMAND_PATH)df +DIFF = $(USRBIN_PATH)diff +DIRNAME = $(USRBIN_PATH)dirname +ECHO = echo -e # intrinsic unix command, with backslash-escaped character interpretation +EGREP = $(USRBIN_PATH)egrep +EXPR = $(UNIXCOMMAND_PATH)expr +FIND = $(USRBIN_PATH)find +GREP = $(USRBIN_PATH)grep +LEX = $(USRBIN_PATH)lex +LN = $(UNIXCOMMAND_PATH)ln +LS = $(UNIXCOMMAND_PATH)ls +ifeq ($(TRUE_PLATFORM), NetBSD) +M4 = $(USRBIN_PATH)m4 +else +ifeq ($(TRUE_PLATFORM), OpenBSD) +M4 = $(USRBIN_PATH)m4 +else +M4 = $(DEVTOOLS_PATH)gm4 +endif +endif +MKDIR = $(UNIXCOMMAND_PATH)mkdir +MV = $(UNIXCOMMAND_PATH)mv +MSGFMT = $(DEVTOOLS_PATH)msgfmt +NAWK = $(USRBIN_PATH)awk +PWD = $(UNIXCOMMAND_PATH)pwd +#RM is defined by GNU Make as 'rm -f' +RMDIR = $(UNIXCOMMAND_PATH)rmdir +SED = $(USRBIN_PATH)sed +SH = $(UNIXCOMMAND_PATH)sh +SORT = $(USRBIN_PATH)sort +STRIP = strip +ifeq ($(TRUE_PLATFORM), OpenBSD) +TAR = $(UNIXCOMMAND_PATH)tar +else +TAR = $(USRBIN_PATH)tar +endif +TOUCH = $(USRBIN_PATH)touch +TR = $(USRBIN_PATH)tr +TRUE = $(USRBIN_PATH)true +UNAME = $(USRBIN_PATH)uname +UNIQ = $(USRBIN_PATH)uniq +UNZIPSFX = $(DEVTOOLS_PATH)unzipsfx +WC = $(USRBIN_PATH)wc +YACC = $(USRBIN_PATH)yacc +ZIPEXE = $(DEVTOOLS_PATH)zip + + +archExpr = case "`$(UNAME) -m`" in \ + i[3-9]86) \ + $(ECHO) i586 \ + ;; \ + ia64) \ + $(ECHO) ia64 \ + ;; \ + amd64) \ + $(ECHO) amd64 \ + ;; \ + sparc*) \ + $(ECHO) sparc \ + ;; \ + *) \ + $(UNAME) -m \ + ;; \ + esac + +ARCH := $(shell $(archExpr) ) +ARCH_FAMILY = $(ARCH) +OS_VERSION = $(shell $(UNAME) -r) +OS_NAME = bsd + +# +# BSD builds may be 32-bit or 64-bit data model. Select +# the default based on the build platform architecture. +# +ifndef ARCH_DATA_MODEL + ifeq ($(ARCH), i586) + ARCH_DATA_MODEL=32 + else + ARCH_DATA_MODEL=64 + endif +endif + +ifeq ($(ARCH_DATA_MODEL), 32) + HOTSPOT_ARCH = i486 +else + HOTSPOT_ARCH = $(ARCH) +endif + +# +# Need to maintain the jre/lib/i386 location for 32-bit Intel +# +ifeq ($(ARCH), i586) + LIBARCH = i386 +else + LIBARCH = $(ARCH) +endif + +# +# Default Previous jre and jdk bundle path +# +_PREVIOUS_JDK_FILE = j2sdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH).tar.gz +_PREVIOUS_JRE_FILE = j2re-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH).tar.gz +_PREVIOUS_RELEASE_PATH = /java/re/j2se/$(PREVIOUS_JDK_VERSION)/archive/fcs/bundles/$(PLATFORM)-$(ARCH) +PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE) +PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE) + +# UNIXCOMMAND_PATH is the path to where the most common Unix +# commands are installed. +UNIXCOMMAND_PATH = /bin/ +# Allow the user to override the default value... +ifdef ALT_UNIXCOMMAND_PATH +# make sure that there is a "/" on the end... +UNIXCOMMAND_PATH = $(subst //,/,$(ALT_UNIXCOMMAND_PATH)/) +endif + +# USRBIN_PATH is the path to where the most common Unix +# commands are installed. +USRBIN_PATH = /usr/bin/ +# Allow the user to override the default value... +ifdef ALT_USRBIN_PATH +# make sure that there is a "/" on the end... +USRBIN_PATH = $(subst //,/,$(ALT_USRBIN_PATH)/) +endif + +# COMPILER_PATH is the path to where the compiler and tools +# are installed. +COMPILER_PATH = /usr/bin/ +# +# Allow the user to override the default value... +ifdef ALT_COMPILER_PATH +COMPILER_PATH = $(subst //,/,$(subst \,/,$(ALT_COMPILER_PATH))/) +endif + +# DEVTOOLS_PATH is for other tools required for building (such as +# zip, etc.) +ifeq ($(TRUE_PLATFORM), NetBSD) +DEVTOOLS_PATH = /usr/pkg/bin/ +else +DEVTOOLS_PATH = /usr/local/bin/ +endif +# Allow the user to override the default value... +ifdef ALT_DEVTOOLS_PATH +DEVTOOLS_PATH = $(subst //,/,$(ALT_DEVTOOLS_PATH)/) +endif + + +# where is unwanted output to be delivered? +DEV_NULL = /dev/null +export DEV_NULL + +CLASSPATH_SEPARATOR = : + +# +# Default BOOTDIR +# +_BOOTDIR = /java/re/j2se/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH) + + +# suffix used for object file (.o for unix .obj for windows) +OBJECT_SUFFIX = o +# The suffix applied to runtime libraries +LIBRARY_SUFFIX = so +# The suffix applied to link libraries +LIB_SUFFIX = so +# The suffix applied to executables (.exe for windows, nothing for bsd) +EXE_SUFFIX = +# The prefix applied to library files (lib for bsd, nothing for windows) +LIB_PREFIX = lib + + +# Where to get motif for bsd +# +ifdef ALT_MOTIF_DIR + MOTIF_DIR = $(ALT_MOTIF_DIR) + BUILD_MOTIF := false +else + # If the motif workspace exists, use it. + ifeq ($(shell if [ -r $(MOTIF_TOPDIR)/lib/Xm/Makefile ]; then $(ECHO) true; fi), true) + MOTIF_DIR = $(OUTPUTDIR)/motif-$(ARCH) + else + MOTIF_DIR = /java/devtools/bsd/motif-$(ARCH) + endif +endif + +# Values for the JDI binding of the Serviceability Agent. +HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) +SA_OPT_LIB_NAME = $(LIB_PREFIX)saproc$(OPT_SUFFIX).$(LIBRARY_SUFFIX) +SA_DEBUG_LIB_NAME = $(LIB_PREFIX)saproc$(DBG_SUFFIX).$(LIBRARY_SUFFIX) diff -ruN jdk-1_5_0_11/control/make/common/Defs.gmk jdk-1_5_0_11.ahj14/control/make/common/Defs.gmk --- jdk-1_5_0_11/control/make/common/Defs.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/control/make/common/Defs.gmk 2007-02-24 09:40:30.000000000 +0100 @@ -118,12 +118,12 @@ endif ifndef MILESTONE - MILESTONE = internal + MILESTONE = u11b4ahj14 endif ifndef BUILD_NUMBER # use ':=' to keep this value from changing as time marches on... - BUILD_NUMBER := $(shell $(ECHO) $(USER)_`$(DATE) '+%d_%b_%Y_%H_%M' | $(TR) "A-Z" "a-z"`) + BUILD_NUMBER := $(shell $(ECHO) $(USER)_`LC_ALL=C $(DATE) '+%d_%b_%Y_%H_%M' | $(TR) "A-Z" "a-z"`) JDK_BUILD_NUMBER = b00 else JDK_BUILD_NUMBER = $(BUILD_NUMBER) @@ -328,7 +328,7 @@ $(NAWK) '$$1<2 {print $$2;}' # source bundle generation definitions -BUNDLE_DATE := $(shell $(DATE) '+%d_%b_%Y' | $(TR) "[A-Z]" "[a-z]") +BUNDLE_DATE := $(shell LC_ALL=C $(DATE) '+%d_%b_%Y' | $(TR) "[A-Z]" "[a-z]") ifdef ALT_BUNDLE_DATE BUNDLE_DATE := $(ALT_BUNDLE_DATE) endif diff -ruN jdk-1_5_0_11/control/make/common/Platform.gmk jdk-1_5_0_11.ahj14/control/make/common/Platform.gmk --- jdk-1_5_0_11/control/make/common/Platform.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/control/make/common/Platform.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -19,6 +19,7 @@ ifeq ($(uname), Linux) PLATFORM = linux +LINUX_OR_BSD = true endif ifeq ($(uname), Windows_NT) @@ -43,5 +44,29 @@ export USING_CYGWIN endif +ifeq ($(uname), FreeBSD) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +ifeq ($(uname), NetBSD) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +ifeq ($(uname), OpenBSD) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +ifeq ($(uname), BSD/OS) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +TRUE_PLATFORM = $(uname) +export TRUE_PLATFORM +export LINUX_OR_BSD + export PLATFORM endif # PLATFORM diff -ruN jdk-1_5_0_11/control/make/deploy-rules.gmk jdk-1_5_0_11.ahj14/control/make/deploy-rules.gmk --- jdk-1_5_0_11/control/make/deploy-rules.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/control/make/deploy-rules.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -10,11 +10,7 @@ # DEPLOY TARGETS ################################################################ -ifeq ($(ARCH_DATA_MODEL), 32) deploy: deploy-build -else -deploy: -endif DEPLOY = deploy @@ -80,25 +76,19 @@ endif deploy-build: -ifeq ($(ARCH_DATA_MODEL), 32) if [ -r $(DEPLOY_TOPDIR)/make/Makefile ]; then \ ( $(CD) $(DEPLOY_TOPDIR)/make; $(MAKE) $(DEPLOY_BUILD_TARGETS) $(DEPLOY_BUILD_ARGUMENTS) ); \ fi -endif deploy-clobber: deploy-source-clobber -ifeq ($(ARCH_DATA_MODEL), 32) if [ -r $(DEPLOY_TOPDIR)/make/Makefile ]; then \ ( $(CD) $(DEPLOY_TOPDIR)/make; $(MAKE) clobber $(DEPLOY_BUILD_ARGUMENTS) ; ); \ fi -endif deploy-sanity:: -ifeq ($(ARCH_DATA_MODEL), 32) if [ -r $(DEPLOY_TOPDIR)/make/Makefile ]; then \ ( $(CD) $(DEPLOY_TOPDIR)/make; $(MAKE) sanity $(DEPLOY_BUILD_ARGUMENTS) ; ); \ fi -endif deploy-bringover: @if [ -d $(DEPLOY_TOPDIR)/Codemgr_wsdata ]; then \ diff -ruN jdk-1_5_0_11/control/make/hotspot-rules.gmk jdk-1_5_0_11.ahj14/control/make/hotspot-rules.gmk --- jdk-1_5_0_11/control/make/hotspot-rules.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/control/make/hotspot-rules.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -257,9 +257,11 @@ endif ifneq ($(PLATFORM), linux) +ifneq ($(PLATFORM), bsd) HOTSPOT += \ $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm$(OPT_SUFFIX)$(DB_SUFFIX).$(LIBRARY_SUFFIX) \ $(HOTSPOT_CLIENT_PATH)/$(LIB_PREFIX)jvm$(DBG_SUFFIX)$(DB_SUFFIX).$(LIBRARY_SUFFIX) +endif endif ifeq ($(ARCH), sparc) diff -ruN jdk-1_5_0_11/control/make/sanity-rules.gmk jdk-1_5_0_11.ahj14/control/make/sanity-rules.gmk --- jdk-1_5_0_11/control/make/sanity-rules.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/control/make/sanity-rules.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -206,7 +206,7 @@ @if [ ! -f $(PREVIOUS_JDK_BUNDLE) ]; then \ $(ECHO) "ERROR: You do not have access to the previous java release sdk bundles. \n" \ " Please check your access to \n" \ - " $(PREVIOUS_sdk_BUNDLE) \n" \ + " $(PREVIOUS_JDK_BUNDLE) \n" \ " and/or check your value of ALT_PREVIOUS_RELEASE_PATH or ALT_PREVIOUS_JDK_FILE. \n" \ " This will affect you if you build the images target. \n" \ "" >> $(ERROR_FILE) ; \ diff -ruN jdk-1_5_0_11/deploy/make/Makefile jdk-1_5_0_11.ahj14/deploy/make/Makefile --- jdk-1_5_0_11/deploy/make/Makefile 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -22,10 +22,11 @@ DEPLOY_BUILDDIR=. DEPLOY_TOPDIR=.. +PLUGIN_TOP=.. include $(DEPLOY_BUILDDIR)/common/Defs.gmk all:: - @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) deploy build started: $(shell $(DATE) '+%y-%m-%d %H:%M') + @$(ECHO) "$(PLATFORM) $(ARCH) $(RELEASE) deploy build started: $(shell $(DATE) '+%y-%m-%d %H:%M')" # # Core. @@ -60,7 +61,9 @@ # Note: webstart temp image must already be built. # images: + ifeq ($(BUILD_PLUGIN), true) $(CD) $(DEPLOY_BUILDDIR)/plugin ; $(MAKE) deploy-images BUILD_PLUGIN=$(BUILD_PLUGIN) + endif # # Sanity checks. @@ -86,7 +89,7 @@ # this should be the last rule in this file: all:: - @$(ECHO) $(ARCH) "Deploy Build finished: " $(FULL_VERSION) + @$(ECHO) "$(ARCH) "Deploy Build finished: " $(FULL_VERSION)" # # Phonies to avoid accidents. diff -ruN jdk-1_5_0_11/deploy/make/common/Defs-bsd.gmk jdk-1_5_0_11.ahj14/deploy/make/common/Defs-bsd.gmk --- jdk-1_5_0_11/deploy/make/common/Defs-bsd.gmk 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/common/Defs-bsd.gmk 2007-02-24 09:05:58.000000000 +0100 @@ -0,0 +1,53 @@ +# +# Based on: @(#)Defs-linux.gmk 1.20 04/01/12 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# +include $(CONTROL_TOPDIR)/make/common/Defs-bsd.gmk + +BUNDLE_SUFFIX = .zip +CC = $(COMPILER_PATH)gcc +HEAD = $(USRBIN_PATH)head +CLASSPATH_SEP = $(CLASSPATH_SEPARATOR) +JUMP_EXE = $(BIN_DIR)/javaws$(SUFFIX) +JUMP_EXE_DBG = $(BIN_DIR_DBG)/javaws$(DBG_SUFFIX) +PATH_SEP = / +X11DIR = /usr/X11R6 +LOCALDIR = /usr/local +ifneq ($(TRUE_PLATFORM), NetBSD) +LIBS = -L$(X11DIR)/lib -lX11 -L$(LOCALDIR)/lib -liconv +else +LIBS = -L$(X11DIR)/lib -Wl,-R$(X11DIR)/lib -lX11 +endif +MD_SRC = $(JAVAWS_TOPDIR)/src/javaws/solaris +BSD_INCLUDES = -I$(X11DIR)/include -I$(LOCALDIR)/include + +TRUE_PLATFORM_INCLUDE := $(shell $(ECHO) $(TRUE_PLATFORM) | $(TR) "[:upper:]" "[:lower:]") + +C_FLAGS_COMMON = $(C_FLAGS_JPDA) -I$(SHARE_SRC)/native -I$(MD_SRC)/native -I$(SHARE_SRC)/native/jpeg -I$(GENHDIR) $(BSD_INCLUDES) -D_ALLBSD_SOURCE +CC_FLAGS_COMMON = $(CC_FLAGS_JPDA) -I$(JAVAWS_BOOTDIR)/include -I$(JAVAWS_BOOTDIR)/include/$(TRUE_PLATFORM_INCLUDE) -I$(SHARE_SRC)/native -I$(MD_SRC)/native -I$(SHARE_SRC)/native/jpeg -I$(GENHDIR) $(BSD_INCLUDES) -D_ALLBSD_SOURCE +LINK_FLAGS_COMMON = + +ifeq ($(TRUE_PLATFORM), FreeBSD) +LINK_FLAGS_COMMON = -pthread +endif + +ifeq ($(TRUE_PLATFORM), OpenBSD) +LINK_FLAGS_COMMON = -pthread +endif + +C_FLAGS_OPT = +CC_FLAGS_OPT = +C_FLAGS_DBG = -g -D_DEBUG +CC_FLAGS_DBG = -g -D_DEBUG + +ifdef JPDA + C_FLAGS_JPDA = -DJPDA=$(JPDA) + CC_FLAGS_JPDA = -DJPDA=$(JPDA) +endif + +PLATFORM_SRC = $(JAVAWS_TOPDIR)/src/javaws/bsd +UNIX_SHARE_SRC = $(JAVAWS_TOPDIR)/src/javaws/unix + +JAVAWS_SUBSTITUTE_VERSIONS = $(CAT) diff -ruN jdk-1_5_0_11/deploy/make/common/DeployRules-solaris.gmk jdk-1_5_0_11.ahj14/deploy/make/common/DeployRules-solaris.gmk --- jdk-1_5_0_11/deploy/make/common/DeployRules-solaris.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/common/DeployRules-solaris.gmk 2007-02-24 09:05:58.000000000 +0100 @@ -23,7 +23,13 @@ CXXFLAGS = -G else CXX = $(COMPILER_PATH)gcc - CXXFLAGS = -shared + CXXFLAGS = -shared -fPIC +endif + +ifeq ($(PLATFORM), bsd) +TRUE_PLATFORM_INCLUDE := $(shell $(ECHO) $(TRUE_PLATFORM) | $(TR) "[:upper:]" "[:lower:]") +else +TRUE_PLATFORM_INCLUDE = $(PLATFORM) endif deploy-native: deploy-so-mkdir $(DEPLOY_COMMON_SO) $(DEPLOY_COMMON_SO_DBG) @@ -37,10 +43,10 @@ $(CP) $(DEPLOY_COMMON_SO_DBG) $(DEPLOY_OUTPUT_LIB_DBG) $(DEPLOYOBJDIR)/%.o: $(DEPLOY_PLATFORM_SRC)/native/%.c - $(CXX) -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM) -c $? -o $@ + $(CXX) -fPIC -I$(OUTPUTDIR)/include -I$(OUTPUTDIR)/include/$(TRUE_PLATFORM_INCLUDE) -c $? -o $@ $(DEPLOYOBJDIR_DBG)/%.o: $(DEPLOY_PLATFORM_SRC)/native/%.c - $(CXX) -g -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM) -c $? -o $@ + $(CXX) -g -fPIC -I$(OUTPUTDIR)/include -I$(OUTPUTDIR)/include/$(TRUE_PLATFORM_INCLUDE) -c $? -o $@ deploy-so-mkdir: $(MKDIR) -p $(DEPLOYOBJDIR) $(DEPLOYOBJDIR_DBG) $(COMMON_LIB_DIR) $(COMMON_LIB_DIR_DBG) diff -ruN jdk-1_5_0_11/deploy/make/common/Release.gmk jdk-1_5_0_11.ahj14/deploy/make/common/Release.gmk --- jdk-1_5_0_11/deploy/make/common/Release.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/common/Release.gmk 2007-02-24 09:05:58.000000000 +0100 @@ -429,7 +429,7 @@ $(RM) -r $(JDK_IMAGE_DIR)/demo/applets $(RM) -r $(JDK_IMAGE_DIR)/demo/plugin $(RM) -r $(JDK_IMAGE_DIR)/sample/jnlp -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) $(RM) -r $(OUTPUTDIR)/$(ARCH) endif ifeq ($(PLATFORM), windows) diff -ruN jdk-1_5_0_11/deploy/make/common/Rules-bsd.gmk jdk-1_5_0_11.ahj14/deploy/make/common/Rules-bsd.gmk --- jdk-1_5_0_11/deploy/make/common/Rules-bsd.gmk 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/common/Rules-bsd.gmk 2007-02-24 09:05:58.000000000 +0100 @@ -0,0 +1,25 @@ +# +# Based on: @(#)Rules-linux.gmk 1.49 03/12/19 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +FILES_java = $(JDK_1_2_FILES) $(UNIX_SHARE_FILES) + +proto-platform: + $(MKDIR) -p $(LIB_SECURITY_DIR) $(BIN_DIR) $(LIB_JAVAWS_DIR) \ + $(LIB_ICONS_DIR) $(LIB_DIR)/$(LIBARCH) + $(CP) -f $(RESOURCE_SRC)/Java1.5.ico $(LIB_JAVAWS_DIR) + $(CP) -f $(RESOURCE_SRC)/sun-java.png $(LIB_ICONS_DIR) + $(CP) -f $(RESOURCE_SRC)/sun-java_HighContrast.png $(LIB_ICONS_DIR) + $(CP) -f $(RESOURCE_SRC)/sun-java_HighContrastInverse.png $(LIB_ICONS_DIR) + $(CP) -f $(RESOURCE_SRC)/sun-java_LowContrast.png $(LIB_ICONS_DIR) + $(CP) -f $(SHARE_SRC)/config/javaws.policy $(LIB_SECURITY_DIR) + $(CP) -f $(DEPLOY_COMMON_JAR) $(LIB_DIR) + $(CP) -f $(DEPLOY_COMMON_SO) $(LIB_DIR)/$(LIBARCH) + +dev-platform: + +FRC: +.PHONY: proto-platform dev-platform diff -ruN jdk-1_5_0_11/deploy/make/common/Sanity.gmk jdk-1_5_0_11.ahj14/deploy/make/common/Sanity.gmk --- jdk-1_5_0_11/deploy/make/common/Sanity.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/common/Sanity.gmk 2007-02-24 09:05:58.000000000 +0100 @@ -42,6 +42,22 @@ endif endif +ifeq ($(PLATFORM), bsd) + BROWSER ?= mozilla + MIN_FREE_DISK=1600000 + FREE_SPACE := $(shell $(DF) -k $(ABS_OUTPUTDIR) | $(NAWK) '{if ($$4 != "Avail") print $$4;}') + CC_VER := $(shell $(CC) -dumpversion) + ifeq ($(TRUE_PLATFORM), FreeBSD) + ifeq ($(ARCH_DATA_MODEL), 32) + REQUIRED_BSD_VERSION = 4.1[01]|5.[345]|6.* + REQUIRED_GCC_VERSION = 2.95.4|3.*|4.* + else + REQUIRED_BSD_VERSION = 5.[345]|6.* + REQUIRED_GCC_VERSION = 3.*|4.* + endif + endif +endif + ifeq ($(PLATFORM), windows) OS := $(shell $(UNAME)) MIN_FREE_DISK=50000 @@ -131,7 +147,6 @@ # MOZILLA_HEADERS_PATH must be valid ###################################################### mozilla: -ifeq ($(ARCH_DATA_MODEL), 32) ifdef ALT_MOZILLA_HEADERS_PATH @if [ `$(ECHO) $(subst \,/,$(ALT_MOZILLA_HEADERS_PATH)) | $(EGREP) -ci '^([a-z]:)?/'` -ne 1 ]; then \ $(ECHO) "ERROR: ALT_MOZILLA_HEADERS_PATH must be an Absolute Path Name, \n" \ @@ -155,6 +170,15 @@ "" >> $(ERROR_FILE) ; \ fi else + ifeq ($(PLATFORM), bsd) + @if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_ns7/nsIPlugin.h ]; then \ + $(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \ + " Please check your access to \n" \ + " $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_ns7/nsIPlugin.h \n" \ + " and/or check your value of ALT_MOZILLA_PATH, ALT_MOZILLA_HEADERS_PATH, \n" \ + "" >> $(ERROR_FILE) ; \ + fi + else @if [ ! -r $(subst \,/,$(MOZILLA_HEADERS_PATH))/mozilla_headers_ns7/bool.h ]; then \ $(ECHO) "ERROR: You do not have access to valid Mozilla header files. \n" \ " Please check your access to \n" \ @@ -162,8 +186,8 @@ " and/or check your value of ALT_JDK_DEVTOOLS_DIR, ALT_MOZILLA_HEADERS_PATH, \n" \ "" >> $(ERROR_FILE) ; \ fi + endif endif -endif # The rules sanity-* have a one-to-one correspondence with the major targets # Each sanity-* rule should have no body to ensure that the post-sanity-* is the @@ -248,10 +272,10 @@ # check for GNU Make version ###################################################### make: - @if [ `$(MAKE) -version | $(HEAD) -n 1 | $(NAWK) '{ print $$4; }' | $(EGREP) -c '3.7[89].1,'` -ne 1 ]; then \ + @if [ `$(MAKE) -version | $(HEAD) -n 1 | $(NAWK) '{ print $$3; }' | $(EGREP) -c '3.7[89].1|3.80'` -ne 1 ]; then \ $(ECHO) "WARNING: The version of make being used does not match \n" \ " the expected version for this platform. \n" \ - " The version of make found was ->`$(MAKE) -version | $(HEAD) -n 1 | $(NAWK) '{ print $$4; }'`<- \n" \ + " The version of make found was ->`$(MAKE) -version | $(HEAD) -n 1 | $(NAWK) '{ print $$3; }'`<- \n" \ " The version expected matches the pattern ->3.7[89].1,<-. \n" \ "" >> $(WARNING_FILE) ; \ fi @@ -278,6 +302,9 @@ @$(ECHO) " USRBIN_PATH = $(USRBIN_PATH) " >> $(MESSAGE_FILE) @$(ECHO) " GCC29_COMPILER_PATH = $(GCC29_COMPILER_PATH) " >> $(MESSAGE_FILE) endif +ifeq ($(PLATFORM), bsd) + @$(ECHO) " USRBIN_PATH = $(USRBIN_PATH) " >> $(MESSAGE_FILE) +endif ifeq ($(PLATFORM), windows) @$(ECHO) " MSDEVTOOLS_PATH = $(MSDEVTOOLS_PATH) " >> $(MESSAGE_FILE) @$(ECHO) " DEPLOY_MSSDK = $(DEPLOY_MSSDK) " >> $(MESSAGE_FILE) @@ -405,6 +432,19 @@ "" >> $(ERROR_FILE) ; \ fi endif +ifeq ($(TRUE_PLATFORM), FreeBSD) + @if [ "x`$(ECHO) $(subst .,,$(OS_VERSION))`" = x ]; then \ + $(ECHO) "ERROR: Cannot determine the version of FreeBSD are you running. \n" \ + " The build requires FreeBSD $(REQUIRED_BSD_VERSION). \n" \ + "" >> $(ERROR_FILE) ; \ + fi + @if [ `$(ECHO) $(OS_VERSION) | $(EGREP) -c '$(REQUIRED_BSD_VERSION)'` -ne 1 ]; then \ + $(ECHO) "WARNING: Your FreeBSD installation is not valid for building a \n" \ + " the J2SDK. You must be using FreeBSD $(REQUIRED_BSD_VERSION). \n" \ + " Your release is $(OS_VERSION) \n" \ + "" >> $(WARNING_FILE) ; \ + fi +endif ifeq ($(PLATFORM), solaris) @if [ "x`$(ECHO) $(subst .,,$(OS_VERSION))`" = x ]; then \ $(ECHO) "ERROR: Cannot determine the version of Solaris are you running. \n" \ @@ -732,7 +772,7 @@ # Check for existence of USRBIN_PATH on linux ###################################################### usrbin_path: -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) @if [ ! -r $(USRBIN_PATH) ]; then \ $(ECHO) "ERROR: You do not have a valid USRBIN_PATH setting. \n" \ " Please check your access to \n" \ @@ -853,6 +893,19 @@ "" >> $(ERROR_FILE) ; \ fi endif +ifeq ($(PLATFORM), bsd) + @# + @# check gcc version + @# + @if [ `$(ECHO) $(CC_VER) | $(EGREP) -c '$(REQUIRED_GCC_VERSION)'` -ne 1 ]; then \ + $(ECHO) "ERROR: The GCC compiler must be version $(REQUIRED_GCC_VERSION). \n" \ + " You are using the following compiler version: $(CC_VER) \n" \ + " The compiler was obtained from the following location: \n" \ + " $(COMPILER_PATH) \n" \ + " Please change your compiler. \n" \ + "" >> $(ERROR_FILE) ; \ + fi +endif ifeq ($(PLATFORM), linux) @# @# check gcc version diff -ruN jdk-1_5_0_11/deploy/make/javaws/Makefile jdk-1_5_0_11.ahj14/deploy/make/javaws/Makefile --- jdk-1_5_0_11/deploy/make/javaws/Makefile 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/javaws/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -19,7 +19,6 @@ include FILES_resource.gmk # Main Rules -ifeq ($(ARCH_DATA_MODEL),32) dummy := $(shell $(MKDIR) -p $(OUTPUTDIR) $(TMPDIR)) @@ -43,13 +42,6 @@ #Since deploy.jar/libdeploy.so is not built against J2SE rules, we need to remove it manually -$(RM) -r $(DEPLOY_OUTPUT_JAR) $(DEPLOY_OUTPUT_DBG_JAR) $(DEPLOY_OUTPUT_LIB) $(DEPLOY_OUTPUT_LIB_DBG) -else # ARCH_DATA_MODEL - -all:: -clean:: - -endif # ARCH_DATA_MODEL - include ../common/Sanity.gmk include ../common/Rules.gmk include ../common/Release.gmk diff -ruN jdk-1_5_0_11/deploy/make/plugin/adapter/ns7-adapter/Makefile jdk-1_5_0_11.ahj14/deploy/make/plugin/adapter/ns7-adapter/Makefile --- jdk-1_5_0_11/deploy/make/plugin/adapter/ns7-adapter/Makefile 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/adapter/ns7-adapter/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -49,14 +49,32 @@ ifeq ($(PLATFORM), linux) LDLIBS = -lX11 -ldl -lc else +ifeq ($(PLATFORM), bsd) +LDLIBS = -lX11 +else LDLIBS = -lX11 -ldl -lCrun -lc endif +endif +ifeq ($(PLATFORM), bsd) +TRUE_PLATFORM_INCLUDE := $(shell $(ECHO) $(TRUE_PLATFORM) | $(TR) "[:upper:]" "[:lower:]") +JNIDIR = $(OUTPUTDIR)/include/$(TRUE_PLATFORM_INCLUDE) +else JNIDIR = $(OUTPUTDIR)/include/$(PLATFORM) +endif COREDIR = $(PLUGIN_TOP)/src/plugin/solaris/nscore COMMONDIR= $(PLUGIN_TOP)/src/plugin/solaris/common +ifeq ($(PLATFORM), bsd) +MOZHDRDIR = $(subst \,/,$(MOZILLA_HEADERS_PATH)/mozilla_headers_ns7) +X11HDRDIR = /usr/X11R6/include +ICONVHDRDIR = /usr/local/include +NSPRHDRDIR = $(NSPR_HEADERS_PATH) +else MOZHDRDIR = $(subst \,/,$(MOZILLA_HEADERS_PATH)/mozilla_headers_ns7) \ - $(subst \,/, $(MOZILLA_HEADERS_PATH)/mozilla_headers_ns7/nspr) + $(subst \,/, $(MOZILLA_HEADERS_PATH)/mozilla_headers_ns7/nspr) +X11HDRDIR = +ICONVHDRDIR = +endif FILES_cpp += GetFactory5.cpp \ GetLibrary.cpp \ @@ -70,11 +88,14 @@ $(subst $(LIBRARY_OUTPUT),,$(TMPDIR)) \ $(COMMONDIR) \ $(SRCDIR) \ - $(MOZHDRDIR) \ $(ADAPTERCOMMONDIR) \ $(ADAPTERINCDIR) \ $(COREDIR) \ - $(INTERFACESDIR) + $(INTERFACESDIR) \ + $(MOZHDRDIR) \ + $(NSPRHDRDIR) \ + $(X11HDRDIR) \ + $(ICONVHDRDIR) RSCINC = -i $(SRCDIR) -i $(subst $(LIBRARY),,$(TMPDIR)) diff -ruN jdk-1_5_0_11/deploy/make/plugin/common/Defs-bsd.gmk jdk-1_5_0_11.ahj14/deploy/make/plugin/common/Defs-bsd.gmk --- jdk-1_5_0_11/deploy/make/plugin/common/Defs-bsd.gmk 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/common/Defs-bsd.gmk 2007-02-24 09:05:58.000000000 +0100 @@ -0,0 +1,26 @@ +# +# Based on: @(#)Defs-solaris.gmk 1.4 03/12/19 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# these should be specific to BSD + +# Default Mozilla Headers and Libs directories +MOZILLA_HEADERS_PATH=$(PLUGIN_TOP)/src/plugin/include +ifdef ALT_MOZILLA_HEADERS_PATH + MOZILLA_HEADERS_PATH=$(ALT_MOZILLA_HEADERS_PATH) +endif + +# Default NSPR_PATH and allow override. +NSPR_PATH = /usr/local +ifdef ALT_NSPR_PATH + NSPR_PATH = $(subst //,/,$(ALT_NSPR_PATH)) +endif + +# Default NSPR Headers directory +NSPR_HEADERS_PATH=$(NSPR_PATH)/include/nspr +ifdef ALT_NSPR_HEADERS_PATH + NSPR_HEADERS_PATH=$(ALT_NSPR_HEADERS_PATH) +endif diff -ruN jdk-1_5_0_11/deploy/make/plugin/common/config.gmk jdk-1_5_0_11.ahj14/deploy/make/plugin/common/config.gmk --- jdk-1_5_0_11/deploy/make/plugin/common/config.gmk 2007-02-19 22:56:16.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/common/config.gmk 2007-02-24 09:05:58.000000000 +0100 @@ -45,18 +45,30 @@ PLUGIN_PLATFORM_SRC := $(PLUGIN_TOP)/src/plugin/solaris endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) PLUGIN_PLATFORM_SRC := $(PLUGIN_TOP)/src/plugin/solaris -OTHER_LDFLAGS = -L/usr/X11R6/lib + OTHER_LDFLAGS = -L/usr/X11R6/lib + ifeq ($(TRUE_PLATFORM), NetBSD) + OTHER_LDFLAGS += -Wl,-R/usr/X11R6/lib + endif endif LDFLAGS_COMMON = +ifeq ($(PLATFORM), bsd) + DEF_PLATFORM = -D_ALLBSD_SOURCE + DEF_XEMBED_MOZILLA = + LDFLAGS_COMMON = $(LDLIBS_COMMON) +else + DEF_PLATFORM = -DSVR4 + DEF_XEMBED_MOZILLA = -DNO_XEMBED_MOZILLA +endif + ifdef JDK_UPDATE_VERSION UVSUFFIX = _$(JDK_UPDATE_VERSION) endif -CPPFLAGS = $(patsubst %,-I%,$(CPPINCPATH)) $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(CPPFLAGS1) -D_GNU_SOURCE -DXP_UNIX -DNO_XEMBED_MOZILLA -DSVR4 -DPLUGIN_NODOTVERSION=\"$(JDK_MAJOR_VERSION)$(JDK_MINOR_VERSION)$(JDK_MICRO_VERSION)$(UVSUFFIX)\" -DPLUGIN_VERSION=\"$(JDK_VERSION)\" -DVERSION=\"$(FULL_VERSION)\" -DRELEASE=\"$(RELEASE)\" -DARCH=\"$(ARCH)\" -DLIBARCH=\"$(LIBARCH)\" $(EXTRA_CPPFLAGS) +CPPFLAGS = $(patsubst %,-I%,$(CPPINCPATH)) $(patsubst %,-I%,$(subst $(CLASSPATH_SEPARATOR), ,$(VPATH.h))) $(CPPFLAGS1) -D_GNU_SOURCE -DXP_UNIX $(DEF_XEMBED_MOZILLA) $(DEF_PLATFORM) -DPLUGIN_NODOTVERSION=\"$(JDK_MAJOR_VERSION)$(JDK_MINOR_VERSION)$(JDK_MICRO_VERSION)$(UVSUFFIX)\" -DPLUGIN_VERSION=\"$(JDK_VERSION)\" -DVERSION=\"$(FULL_VERSION)\" -DRELEASE=\"$(RELEASE)\" -DARCH=\"$(ARCH)\" -DLIBARCH=\"$(LIBARCH)\" $(EXTRA_CPPFLAGS) endif ifeq ($(MILESTONE), rc) diff -ruN jdk-1_5_0_11/deploy/make/plugin/jvmexec/Makefile jdk-1_5_0_11.ahj14/deploy/make/plugin/jvmexec/Makefile --- jdk-1_5_0_11/deploy/make/plugin/jvmexec/Makefile 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/jvmexec/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -21,6 +21,10 @@ LDLIBS = -lpthread -ldl -lc endif +ifeq ($(PLATFORM), bsd) +LDLIBS = +endif + vpath %.cpp $(SRCDIR) vpath %.c $(SRCDIR) diff -ruN jdk-1_5_0_11/deploy/make/plugin/jvmnative/Makefile jdk-1_5_0_11.ahj14/deploy/make/plugin/jvmnative/Makefile --- jdk-1_5_0_11/deploy/make/plugin/jvmnative/Makefile 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/jvmnative/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -14,14 +14,23 @@ include $(PLUGIN_TOP)/make/plugin/common/config.gmk +ifeq ($(PLATFORM), bsd) +LDLIBS = -lm -lX11 +X11HDRDIR = /usr/X11R6/include +else +X11HDRDIR = ifeq ($(PLATFORM), linux) LDLIBS = -lX11 EXTRA_CPPFLAGS = -DLINUX else LDLIBS = /usr/lib/libm.so -ldl -lXt -lX11 -lsocket -lnsl -lintl -lc endif +endif -CPPINCPATH = $(SRCDIR) $(SRCDIR)/../common $(subst $(LIBRARY),,$(TMPDIR)) $(subst $(LIBRARY)/,,$(CLASSHDRDIR)) +CPPINCPATH = $(SRCDIR) $(SRCDIR)/../common \ + $(subst $(LIBRARY),,$(TMPDIR)) \ + $(subst $(LIBRARY)/,,$(CLASSHDRDIR)) \ + $(X11HDRDIR) vpath %.c $(SRCDIR):$(SRCDIR)/../common diff -ruN jdk-1_5_0_11/deploy/make/plugin/nscore/unix/Makefile jdk-1_5_0_11.ahj14/deploy/make/plugin/nscore/unix/Makefile --- jdk-1_5_0_11/deploy/make/plugin/nscore/unix/Makefile 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/nscore/unix/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -16,18 +16,36 @@ include $(PLUGIN_TOP)/make/plugin/common/config.gmk +ifeq ($(PLATFORM), bsd) +LDLIBS = -lX11 +X11HDRDIR = /usr/X11R6/include +ICONVHDRDIR = /usr/local/include +else +X11HDRDIR = +ICONVHDRDIR = ifeq ($(PLATFORM), linux) LDLIBS = -lX11 -ldl -lc else LDLIBS = -lXt -lX11 -ldl -lCrun -lc endif +endif + +ifeq ($(PLATFORM), bsd) +TRUE_PLATFORM_INCLUDE := $(shell $(ECHO) $(TRUE_PLATFORM) | $(TR) "[:upper:]" "[:lower:]") +JNIDIR = $(OUTPUTDIR)/include/$(TRUE_PLATFORM_INCLUDE) +else +JNIDIR = $(OUTPUTDIR)/include/$(PLATFORM) +endif -CPPINCPATH = $(SRCDIR) $(SRCDIR)/../common \ +CPPINCPATH = $(OUTPUTDIR)/include $(JNIDIR) \ + $(SRCDIR) $(SRCDIR)/../common \ $(subst $(LIBRARY),,$(TMPDIR)) \ $(subst $(LIBRARY)/,,$(CLASSHDRDIR)) \ $(COMMONDIR) \ $(PLUGIN_TOP)/src/plugin/share/jpiapi \ - $(SRCDIR)/../nsstub + $(SRCDIR)/../nsstub \ + $(X11HDRDIR) \ + $(ICONVHDRDIR) ifeq ($(PLATFORM), linux) EXTRA_CPPFLAGS = -DLINUX -DRAPTOR_API -DNEW_STREAMING_API -DXP_UNIX diff -ruN jdk-1_5_0_11/deploy/make/plugin/unsupported/jcomponent/Makefile jdk-1_5_0_11.ahj14/deploy/make/plugin/unsupported/jcomponent/Makefile --- jdk-1_5_0_11/deploy/make/plugin/unsupported/jcomponent/Makefile 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/unsupported/jcomponent/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -14,7 +14,7 @@ include $(PLUGIN_TOP)/make/plugin/common/config.gmk -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) else LDFLAGS += -z defs LDLIBS = -lsocket -lnsl -ldl -lCrun -lc diff -ruN jdk-1_5_0_11/deploy/make/plugin/unsupported/ns4-adapter/Makefile jdk-1_5_0_11.ahj14/deploy/make/plugin/unsupported/ns4-adapter/Makefile --- jdk-1_5_0_11/deploy/make/plugin/unsupported/ns4-adapter/Makefile 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/unsupported/ns4-adapter/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -18,12 +18,16 @@ dummy:=$(shell $(MKDIR) -p $(LIB_LOCATION)) +ifeq ($(PLATFORM), bsd) +LDLIBS = -lXt -lX11 -pthread +else ifeq ($(PLATFORM), linux) LDLIBS = -lXt -lX11 -ldl -lnsl -lc else LDLIBS = -lXt -lX11 -ldl -lnsl -lCrun -lc LDFLAGS += -z defs endif +endif CPPINCPATH = $(SRCDIR) $(SRCDIR)/../adapter-common $(SRCDIR)/../jcomponent/public-include $(PLUGIN_TOP)/oji-plugin/src/motif/common $(PLUGIN_TOP)/src/plugin/oji-plugin/src/motif/common $(PLUGIN_TOP)/src/plugin/oji-plugin/src/motif/badapter $(subst $(LIBRARY),,$(TMPDIR)) $(subst $(LIBRARY)/,,$(CLASSHDRDIR)) diff -ruN jdk-1_5_0_11/deploy/make/plugin/unsupported/ns6-adapter/Makefile jdk-1_5_0_11.ahj14/deploy/make/plugin/unsupported/ns6-adapter/Makefile --- jdk-1_5_0_11/deploy/make/plugin/unsupported/ns6-adapter/Makefile 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/make/plugin/unsupported/ns6-adapter/Makefile 2007-02-24 09:05:58.000000000 +0100 @@ -18,11 +18,15 @@ dummy:=$(shell $(MKDIR) -p $(LIB_LOCATION)) +ifeq ($(PLATFORM), bsd) +LDLIBS = -lXt -lX11 -pthread +else ifeq ($(PLATFORM), linux) LDLIBS = -lXt -lX11 -ldl -lc else LDLIBS = -ldl -lCrun -lc endif +endif CPPINCPATH = $(SRCDIR) $(SRCDIR)/../adapter-common $(SRCDIR)/../jcomponent/public-include $(subst $(LIBRARY),,$(TMPDIR)) $(subst $(LIBRARY)/,,$(CLASSHDRDIR)) EXTRA_CPPFLAGS = -I$(MOZILLA_HEADERS_PATH)/mozilla_headers_ns610 -I$(MOZILLA_HEADERS_PATH)/mozilla_headers_ns610/nspr -I$(MOZILLA_LIBS_PATH)/../jpi/X11/include -I$(MOZILLA_LIBS_PATH)/../jpi/X11/lib/glib/include -DRAPTOR_API -DNEW_STREAMING_API diff -ruN jdk-1_5_0_11/deploy/src/common/share/classes/com/sun/deploy/net/proxy/NSPreferences.java jdk-1_5_0_11.ahj14/deploy/src/common/share/classes/com/sun/deploy/net/proxy/NSPreferences.java --- jdk-1_5_0_11/deploy/src/common/share/classes/com/sun/deploy/net/proxy/NSPreferences.java 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/common/share/classes/com/sun/deploy/net/proxy/NSPreferences.java 2007-02-24 09:05:58.000000000 +0100 @@ -351,7 +351,12 @@ // Linux and netscape 4 and netscape 6.2 // proxy type can be -1 (None), 1 (manual) and 2 (auto) // on linux, proxyType == -1 implies NONE - if (proxyType == -1 && System.getProperty("os.name").equals("Linux") && version >= 4) { + if (proxyType == -1 && + (System.getProperty("os.name").equals("Linux") || + System.getProperty("os.name").equals("FreeBSD") || + System.getProperty("os.name").equals("NetBSD") || + System.getProperty("os.name").equals("OpenBSD")) && + version >= 4) { info.setType(ProxyType.NONE); return; } diff -ruN jdk-1_5_0_11/deploy/src/common/unix/native/GnomeVfsWrapper.c jdk-1_5_0_11.ahj14/deploy/src/common/unix/native/GnomeVfsWrapper.c --- jdk-1_5_0_11/deploy/src/common/unix/native/GnomeVfsWrapper.c 2007-02-19 22:56:17.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/common/unix/native/GnomeVfsWrapper.c 2007-02-24 09:05:58.000000000 +0100 @@ -7,6 +7,7 @@ #include #include "com_sun_deploy_association_utility_GnomeVfsWrapper.h" +#include #include #include #include @@ -14,10 +15,13 @@ JNIEXPORT jstring JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1get_1mime_1type (JNIEnv *env, jclass cl, jstring url) { + const char* urlStr; + const char* mimeTypeStr; + jws_gnome_vfs_init(); - const char* urlStr = (*env)->GetStringUTFChars(env, url, JNI_FALSE); - const char* mimeTypeStr = jws_gnome_vfs_get_mime_type(urlStr); + urlStr = (*env)->GetStringUTFChars(env, url, JNI_FALSE); + mimeTypeStr = jws_gnome_vfs_get_mime_type(urlStr); (*env)->ReleaseStringUTFChars(env, url, urlStr); if(mimeTypeStr == NULL) { @@ -31,11 +35,15 @@ JNIEXPORT jstring JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1mime_1get_1value (JNIEnv *env, jclass cl, jstring mimeType, jstring key) { + const char* mimeTypeStr; + const char* keyStr; + const char* keyValueStr; + jws_gnome_vfs_init(); - const char* mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); - const char* keyStr = (*env)->GetStringUTFChars(env, key, JNI_FALSE); - const char* keyValueStr = jws_gnome_vfs_mime_get_value(mimeTypeStr, keyStr); + mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); + keyStr = (*env)->GetStringUTFChars(env, key, JNI_FALSE); + keyValueStr = jws_gnome_vfs_mime_get_value(mimeTypeStr, keyStr); (*env)->ReleaseStringUTFChars(env, mimeType, mimeTypeStr); (*env)->ReleaseStringUTFChars(env, key, keyStr); @@ -49,10 +57,13 @@ JNIEXPORT jstring JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1mime_1get_1description (JNIEnv *env, jclass cl, jstring mimeType) { + const char* mimeTypeStr; + const char* descStr; + jws_gnome_vfs_init(); - const char* mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); - const char* descStr = jws_gnome_vfs_mime_get_description(mimeTypeStr); + mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); + descStr = jws_gnome_vfs_mime_get_description(mimeTypeStr); (*env)->ReleaseStringUTFChars(env, mimeType, mimeTypeStr); if(descStr == NULL) { @@ -65,10 +76,13 @@ JNIEXPORT jstring JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1mime_1get_1icon (JNIEnv *env, jclass cl, jstring mimeType) { + const char* mimeTypeStr; + const char* iconFileStr; + jws_gnome_vfs_init(); - const char* mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); - const char* iconFileStr = jws_gnome_vfs_mime_get_icon(mimeTypeStr); + mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); + iconFileStr = jws_gnome_vfs_mime_get_icon(mimeTypeStr); (*env)->ReleaseStringUTFChars(env, mimeType, mimeTypeStr); if(iconFileStr == NULL) { @@ -81,14 +95,17 @@ JNIEXPORT jobjectArray JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1mime_1get_1key_1list (JNIEnv *env, jclass cl, jstring mimeType) { + const char* mimeTypeStr; + GList* keyList; + int listLen; int i = 0; + jws_gnome_vfs_init(); - const char* mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); - GList* keyList = jws_gnome_vfs_mime_get_key_list(mimeTypeStr); + mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); + keyList = jws_gnome_vfs_mime_get_key_list(mimeTypeStr); (*env)->ReleaseStringUTFChars(env, mimeType, mimeTypeStr); - int listLen; if (keyList != NULL) { listLen = jws_g_list_length(keyList); } else { @@ -113,10 +130,13 @@ JNIEXPORT jstring JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1mime_1get_1default_1application_1command (JNIEnv *env, jclass cl, jstring mimeType) { + const char* mimeTypeStr; + GnomeVFSMimeApplication *mimeApp; + jws_gnome_vfs_init(); - const char* mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); - GnomeVFSMimeApplication *mimeApp = jws_gnome_vfs_mime_get_default_application(mimeTypeStr); + mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); + mimeApp = jws_gnome_vfs_mime_get_default_application(mimeTypeStr); (*env)->ReleaseStringUTFChars(env, mimeType, mimeTypeStr); if(mimeApp == NULL) { @@ -134,12 +154,13 @@ JNIEXPORT jobjectArray JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1get_1registered_1mime_1types (JNIEnv *env, jclass cl) { + GList* mimeTypeList; + int listLen; int i = 0; jws_gnome_vfs_init(); - GList* mimeTypeList = jws_gnome_vfs_get_registered_mime_types(); + mimeTypeList = jws_gnome_vfs_get_registered_mime_types(); - int listLen; if (mimeTypeList != NULL) { listLen = jws_g_list_length(mimeTypeList); } else { @@ -165,14 +186,16 @@ JNIEXPORT jobjectArray JNICALL Java_com_sun_deploy_association_utility_GnomeVfsWrapper_gnome_1vfs_1mime_1get_1extensions_1list (JNIEnv *env, jclass cl, jstring mimeType) { + const char* mimeTypeStr; + GList* extList; + int listLen; int i = 0; jws_gnome_vfs_init(); - const char* mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); - GList* extList = jws_gnome_vfs_mime_get_extensions_list(mimeTypeStr); + mimeTypeStr = (*env)->GetStringUTFChars(env, mimeType, JNI_FALSE); + extList = jws_gnome_vfs_mime_get_extensions_list(mimeTypeStr); (*env)->ReleaseStringUTFChars(env, mimeType, mimeTypeStr); - int listLen; if (extList != NULL) { listLen = jws_g_list_length(extList); } else { diff -ruN jdk-1_5_0_11/deploy/src/javaws/share/native/msgString.c jdk-1_5_0_11.ahj14/deploy/src/javaws/share/native/msgString.c --- jdk-1_5_0_11/deploy/src/javaws/share/native/msgString.c 2007-02-19 22:56:18.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/javaws/share/native/msgString.c 2007-02-24 09:05:59.000000000 +0100 @@ -146,8 +146,12 @@ if (value == NULL) { value = defaultMessage; } +#if defined(__OpenBSD__) || defined(__FreeBSD__) /* XXXBSD: DISABLE_LOCALE */ + v2 = strdup(value); +#else len2 = DecodeMessage(value, wArray); v2 = sysWideCharToMBCS(wArray, len2); +#endif msgs_inProgress = FALSE; if (v2 == NULL) { diff -ruN jdk-1_5_0_11/deploy/src/javaws/share/native/system.h jdk-1_5_0_11.ahj14/deploy/src/javaws/share/native/system.h --- jdk-1_5_0_11/deploy/src/javaws/share/native/system.h 2007-02-19 22:56:18.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/javaws/share/native/system.h 2007-02-24 09:05:59.000000000 +0100 @@ -32,6 +32,14 @@ /* This is treated as SYS_EXEC_FORK on Unix. */ #define SYS_EXEC_WAIT 2 +/* XXX: Will this work or should we include an iswspace implementation? */ +#if (defined(__FreeBSD__) && __FreeBSD__ < 5) || defined(__OpenBSD__) +#define iswspace isspace +#endif +#if defined(__NetBSD__) +#include +#endif + /* * Platform indpendent UNIX socket/io layer, etc. */ diff -ruN jdk-1_5_0_11/deploy/src/javaws/share/native/xmlparser.h jdk-1_5_0_11.ahj14/deploy/src/javaws/share/native/xmlparser.h --- jdk-1_5_0_11/deploy/src/javaws/share/native/xmlparser.h 2007-02-19 22:56:18.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/javaws/share/native/xmlparser.h 2007-02-24 09:05:59.000000000 +0100 @@ -46,7 +46,6 @@ /* Public interface */ -void RemoveNonAsciiUTF8FromBuffer(char *buf); XMLNode* ParseXMLDocument (char* buf); void FreeXMLDocument (XMLNode* root); diff -ruN jdk-1_5_0_11/deploy/src/javaws/solaris/native/launcher_md.c jdk-1_5_0_11.ahj14/deploy/src/javaws/solaris/native/launcher_md.c --- jdk-1_5_0_11/deploy/src/javaws/solaris/native/launcher_md.c 2007-02-19 22:56:19.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/javaws/solaris/native/launcher_md.c 2007-02-24 09:05:59.000000000 +0100 @@ -7,7 +7,7 @@ #include "system.h" -static char * SetExecname(char **argv); +extern char * SetExecname(char **argv); /* * diff -ruN jdk-1_5_0_11/deploy/src/javaws/solaris/native/system_md.c jdk-1_5_0_11.ahj14/deploy/src/javaws/solaris/native/system_md.c --- jdk-1_5_0_11/deploy/src/javaws/solaris/native/system_md.c 2007-02-19 22:56:19.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/javaws/solaris/native/system_md.c 2007-02-24 09:05:59.000000000 +0100 @@ -8,7 +8,6 @@ /* Implementation of solaris/linux specific OS layer */ #include #include -#include #include #include #include @@ -21,6 +20,12 @@ #include #include #include +#include +#include + +#if defined(_ALLBSD_SOURCE) +#include +#endif #ifdef SOLARIS #include /* For os_arch */ @@ -205,6 +210,14 @@ #ifdef LINUX return "i386"; +#elif _ALLBSD_SOURCE +#ifdef __amd64__ + return "amd64"; +#elif __i386__ + return "i386"; +#else +#error "Unsupported architecture" +#endif #else sysinfo(SI_ARCHITECTURE, arch, sizeof(arch)); if (strcmp(arch,"sparc") == 0 ) { @@ -354,6 +367,18 @@ exec_path = strdup(buf); } } +#elif defined(__FreeBSD__) + /* Try /proc/curproc/file if exec_path hasn't been found */ + + if (exec_path == NULL) { + const char* self = "/proc/curproc/file"; + char buf[PATH_MAX+1]; + int len = readlink(self, buf, PATH_MAX); + if (len >= 0) { + buf[len] = '\0'; /* readlink doesn't nul terminate */ + exec_path = strdup(buf); + } + } #else /* !__sun && !__linux */ { /* Not implemented */ @@ -378,8 +403,8 @@ * if program foo is run from xxx/bin/foo, return xxx */ char *getHome(void) { - char buf[MAXPATHLEN]; -#ifdef __linux__ + static char buf[MAXPATHLEN]; +#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) char *execname = GetExecname(); if (execname) { @@ -440,6 +465,7 @@ bindir = binjava; } } + free(path); } if (bindir == NULL) { @@ -496,8 +522,32 @@ * freed by the caller */ char* sysTempnam(void) { +#ifdef _ALLBSD_SOURCE + char *tmpdir, *name; + int fd; + + tmpdir = getenv("TMPDIR"); + if (tmpdir == NULL) + asprintf(&name, "%s%s.XXXXXXXX", _PATH_TMP, "javaws"); + else + asprintf(&name, "%s%s.XXXXXXXX", tmpdir, "javaws"); + + if (name != NULL) { + fd = mkstemp(name); + if (fd == -1) { + free(name); + name = NULL; + } + else { + close(fd); + } + } + + return name; +#else char* argFileName = tempnam(NULL, "javaws"); return argFileName; +#endif } /* @@ -523,6 +573,17 @@ #endif } +#ifdef DISABLE_LOCALE + +char *sysGetLocaleStr() { + return strdup("en_US"); +} + +char *sysMBCSToSeqUnicode(char *mbcs) { + return strdup(mbcs); +} + +#else /* !DISABLE_LOCALE */ static char _localeStr[64]; static int locale_initialized = FALSE; @@ -723,10 +784,12 @@ return p2; } +#endif /* DISABLE_LOCALE */ + /* argv MUST include cmd. */ void sysExec2Buf(char *cmd, int argc, char *argv[], char *buf, int *buflen) { int fdin[2], fdout[2], fderr[2], k, resultPid, n, ofs = 0, len, status; - siginfo_t info; +/*siginfo_t info;*/ len = *buflen; *buflen = 0; if ((k=0, pipe(fdin)<0) || (k=1, pipe(fdout)<0) || (k=2, pipe(fderr)<0)) { diff -ruN jdk-1_5_0_11/deploy/src/javaws/solaris/native/system_md.h jdk-1_5_0_11.ahj14/deploy/src/javaws/solaris/native/system_md.h --- jdk-1_5_0_11/deploy/src/javaws/solaris/native/system_md.h 2007-02-19 22:56:19.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/javaws/solaris/native/system_md.h 2007-02-24 09:05:59.000000000 +0100 @@ -35,6 +35,23 @@ #ifdef LINUX #define PLATFORM "Linux" #define ARCH "i386" +#elif _ALLBSD_SOURCE /* LINUX */ +#ifdef __FreeBSD__ +#define PLATFORM "FreeBSD" +#elif __NetBSD__ +#define PLATFORM "NetBSD" +#elif __OpenBSD__ +#define PLATFORM "OpenBSD" +#elif __DragonFly__ +#define PLATFORM "DragonFly" +#endif +#ifdef __amd64__ +#define ARCH "amd64" +#elif __i386__ +#define ARCH "i386" +#else +#error "Unsupported architecture" +#endif #else /* LINUX */ #define PLATFORM "SunOS" #ifdef __i386 diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsAgg.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsAgg.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsAgg.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsAgg.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,155 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsAgg_h___ +#define nsAgg_h___ + +#include "nsISupports.h" + + +//////////////////////////////////////////////////////////////////////////////// + +// Put this in your class's declaration: +#define NS_DECL_AGGREGATED \ + NS_DECL_ISUPPORTS \ + \ +public: \ + \ + /* You must implement this operation instead of the nsISupports */ \ + /* methods if you inherit from nsAggregated. */ \ + NS_IMETHOD \ + AggregatedQueryInterface(const nsIID& aIID, void** aInstancePtr); \ + \ +protected: \ + \ + class Internal : public nsISupports { \ + public: \ + \ + Internal() {} \ + \ + NS_IMETHOD QueryInterface(const nsIID& aIID, \ + void** aInstancePtr); \ + NS_IMETHOD_(nsrefcnt) AddRef(void); \ + NS_IMETHOD_(nsrefcnt) Release(void); \ + \ + }; \ + \ + friend class Internal; \ + \ + nsISupports* fOuter; \ + Internal fAggregated; \ + \ + nsISupports* GetInner(void) { return &fAggregated; } \ + \ +public: \ + + +// Put this in your class's constructor: +#define NS_INIT_AGGREGATED(outer) \ + PR_BEGIN_MACRO \ + fOuter = outer ? outer : &fAggregated; \ + PR_END_MACRO + + +// Put this in your class's implementation file: +#define NS_IMPL_AGGREGATED(_class) \ +NS_IMETHODIMP \ +_class::QueryInterface(const nsIID& aIID, void** aInstancePtr) \ +{ \ + return fOuter->QueryInterface(aIID, aInstancePtr); \ +} \ + \ +NS_IMETHODIMP_(nsrefcnt) \ +_class::AddRef(void) \ +{ \ + return fOuter->AddRef(); \ +} \ + \ +NS_IMETHODIMP_(nsrefcnt) \ +_class::Release(void) \ +{ \ + return fOuter->Release(); \ +} \ + \ +NS_IMETHODIMP \ +_class::Internal::QueryInterface(const nsIID& aIID, void** aInstancePtr) \ +{ \ + _class* agg = (_class*)((char*)(this) - offsetof(_class, fAggregated)); \ + return agg->AggregatedQueryInterface(aIID, aInstancePtr); \ +} \ + \ +NS_IMETHODIMP_(nsrefcnt) \ +_class::Internal::AddRef(void) \ +{ \ + _class* agg = (_class*)((char*)(this) - offsetof(_class, fAggregated)); \ + NS_PRECONDITION(PRInt32(agg->mRefCnt) >= 0, "illegal refcnt"); \ + ++agg->mRefCnt; \ + NS_LOG_ADDREF(this, agg->mRefCnt, #_class, sizeof(*this)); \ + return agg->mRefCnt; \ +} \ + \ +NS_IMETHODIMP_(nsrefcnt) \ +_class::Internal::Release(void) \ +{ \ + _class* agg = (_class*)((char*)(this) - offsetof(_class, fAggregated)); \ + NS_PRECONDITION(0 != agg->mRefCnt, "dup release"); \ + --agg->mRefCnt; \ + NS_LOG_RELEASE(this, agg->mRefCnt, #_class); \ + if (agg->mRefCnt == 0) { \ + agg->mRefCnt = 1; /* stabilize */ \ + NS_DELETEXPCOM(agg); \ + return 0; \ + } \ + return agg->mRefCnt; \ +} \ + +// for use with QI macros in nsISupportsUtils.h: + +#define NS_INTERFACE_MAP_BEGIN_AGGREGATED(_class) \ + NS_IMPL_AGGREGATED_QUERY_HEAD(_class) + +#define NS_IMPL_AGGREGATED_QUERY_HEAD(_class) \ +NS_IMETHODIMP \ +_class::AggregatedQueryInterface(REFNSIID aIID, void** aInstancePtr) \ +{ \ + NS_ASSERTION(aInstancePtr, \ + "AggregatedQueryInterface requires a non-NULL result ptr!"); \ + if ( !aInstancePtr ) \ + return NS_ERROR_NULL_POINTER; \ + nsISupports* foundInterface; + +#endif /* nsAgg_h___ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsCOMPtr.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsCOMPtr.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsCOMPtr.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsCOMPtr.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,1405 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Scott Collins (original author) + * L. David Baron + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsCOMPtr_h___ +#define nsCOMPtr_h___ + +/* + Having problems? + + See the User Manual at: + http://www.mozilla.org/projects/xpcom/nsCOMPtr.html + + + nsCOMPtr + better than a raw pointer + for owning objects + -- scc +*/ + + + // Wrapping includes can speed up compiles (see "Large Scale C++ Software Design") +#ifndef nsDebug_h___ +#include "nsDebug.h" + // for |NS_PRECONDITION| +#endif + +#ifndef nsISupportsUtils_h__ +#include "nsISupportsUtils.h" + // for |nsresult|, |NS_ADDREF|, |NS_GET_IID| et al +#endif + +#ifndef nscore_h___ +#include "nscore.h" + // for |NS_..._CAST|, |NS_COM| +#endif + + +/* + WARNING: + This file defines several macros for internal use only. These macros begin with the + prefix |NSCAP_|. Do not use these macros in your own code. They are for internal use + only for cross-platform compatibility, and are subject to change without notice. +*/ + + +#ifdef _MSC_VER + #define NSCAP_FEATURE_INLINE_STARTASSIGNMENT + // under VC++, we win by inlining StartAssignment + + // Also under VC++, at the highest warning level, we are overwhelmed with warnings + // about (unused) inline functions being removed. This is to be expected with + // templates, so we disable the warning. + #pragma warning( disable: 4514 ) +#endif + +#define NSCAP_FEATURE_USE_BASE + +#ifdef NS_DEBUG + #define NSCAP_FEATURE_TEST_DONTQUERY_CASES + #undef NSCAP_FEATURE_USE_BASE +//#define NSCAP_FEATURE_TEST_NONNULL_QUERY_SUCCEEDS +#endif + + /* + |...TEST_DONTQUERY_CASES| and |...DEBUG_PTR_TYPES| introduce some code that is + problematic on a select few of our platforms, e.g., QNX. Therefore, I'm providing + a mechanism by which these features can be explicitly disabled from the command-line. + */ + +#ifdef NSCAP_DISABLE_TEST_DONTQUERY_CASES + #undef NSCAP_FEATURE_TEST_DONTQUERY_CASES +#endif + +#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) + // Our use of nsCOMPtr_base::mRawPtr violates the C++ standard's aliasing + // rules. Mark it with the may_alias attribute so that gcc 3.3 and higher + // don't reorder instructions based on aliasing assumptions for + // this variable. Fortunately, gcc versions < 3.3 do not do any + // optimizations that break nsCOMPtr. + + #define NS_MAY_ALIAS_PTR(t) t* __attribute__((__may_alias__)) +#else + #define NS_MAY_ALIAS_PTR(t) t* +#endif + +#if defined(NSCAP_DISABLE_DEBUG_PTR_TYPES) + #define NSCAP_FEATURE_USE_BASE +#endif + + +#ifdef HAVE_CPP_BOOL + typedef bool NSCAP_BOOL; +#else + typedef PRBool NSCAP_BOOL; +#endif + + + + + /* + The following three macros (|NSCAP_ADDREF|, |NSCAP_RELEASE|, and |NSCAP_LOG_ASSIGNMENT|) + allow external clients the ability to add logging or other interesting debug facilities. + In fact, if you want |nsCOMPtr| to participate in the standard logging facility, you + provide (e.g., in "nsTraceRefcnt.h") suitable definitions + + #define NSCAP_ADDREF(this, ptr) NS_ADDREF(ptr) + #define NSCAP_RELEASE(this, ptr) NS_RELEASE(ptr) + */ + +#ifndef NSCAP_ADDREF + #define NSCAP_ADDREF(this, ptr) (ptr)->AddRef() +#endif + +#ifndef NSCAP_RELEASE + #define NSCAP_RELEASE(this, ptr) (ptr)->Release() +#endif + + // Clients can define |NSCAP_LOG_ASSIGNMENT| to perform logging. +#ifdef NSCAP_LOG_ASSIGNMENT + // Remember that |NSCAP_LOG_ASSIGNMENT| was defined by some client so that we know + // to instantiate |~nsGetterAddRefs| in turn to note the external assignment into + // the |nsCOMPtr|. + #define NSCAP_LOG_EXTERNAL_ASSIGNMENT +#else + // ...otherwise, just strip it out of the code + #define NSCAP_LOG_ASSIGNMENT(this, ptr) +#endif + +#ifndef NSCAP_LOG_RELEASE + #define NSCAP_LOG_RELEASE(this, ptr) +#endif + + + + + /* + WARNING: + VC++4.2 is very picky. To compile under VC++4.2, the classes must be defined + in an order that satisfies: + + nsDerivedSafe < nsCOMPtr + already_AddRefed < nsCOMPtr + nsCOMPtr < nsGetterAddRefs + + The other compilers probably won't complain, so please don't reorder these + classes, on pain of breaking 4.2 compatibility. + */ + + +template +class nsDerivedSafe : public T + /* + No client should ever see or have to type the name of this class. It is the + artifact that makes it a compile-time error to call |AddRef| and |Release| + on a |nsCOMPtr|. DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE. + + See |nsCOMPtr::operator->|, |nsCOMPtr::operator*|, et al. + + This type should be a nested class inside |nsCOMPtr|. + */ + { + private: +#ifdef HAVE_CPP_ACCESS_CHANGING_USING + using T::AddRef; + using T::Release; +#else + nsrefcnt AddRef(void); + nsrefcnt Release(void); +#endif + +#if !defined(AIX) && !defined(IRIX) + void operator delete( void*, size_t ); // NOT TO BE IMPLEMENTED + // declaring |operator delete| private makes calling delete on an interface pointer a compile error +#endif + + nsDerivedSafe& operator=( const T& ); // NOT TO BE IMPLEMENTED + // you may not call |operator=()| through a dereferenced |nsCOMPtr|, because you'd get the wrong one + + /* + Compiler warnings and errors: nsDerivedSafe operator=() hides inherited operator=(). + If you see that, that means somebody checked in a [XP]COM interface class that declares an + |operator=()|, and that's _bad_. So bad, in fact, that this declaration exists explicitly + to stop people from doing it. + */ + + protected: + nsDerivedSafe(); // NOT TO BE IMPLEMENTED + /* + This ctor exists to avoid compile errors and warnings about nsDeriviedSafe using the + default ctor but inheriting classes without an empty ctor. See bug 209667. + */ + }; + +#if !defined(HAVE_CPP_ACCESS_CHANGING_USING) && defined(NEED_CPP_UNUSED_IMPLEMENTATIONS) +template +nsrefcnt +nsDerivedSafe::AddRef() + { + return 0; + } + +template +nsrefcnt +nsDerivedSafe::Release() + { + return 0; + } + +#endif + + + +template +struct already_AddRefed + /* + ...cooperates with |nsCOMPtr| to allow you to assign in a pointer _without_ + |AddRef|ing it. You might want to use this as a return type from a function + that produces an already |AddRef|ed pointer as a result. + + See also |getter_AddRefs()|, |dont_AddRef()|, and |class nsGetterAddRefs|. + + This type should be a nested class inside |nsCOMPtr|. + + Yes, |already_AddRefed| could have been implemented as an |nsCOMPtr_helper| to + avoid adding specialized machinery to |nsCOMPtr| ... but this is the simplest + case, and perhaps worth the savings in time and space that its specific + implementation affords over the more general solution offered by + |nsCOMPtr_helper|. + */ + { + already_AddRefed( T* aRawPtr ) + : mRawPtr(aRawPtr) + { + // nothing else to do here + } + + T* get() const { return mRawPtr; } + + T* mRawPtr; + }; + +template +inline +const already_AddRefed +getter_AddRefs( T* aRawPtr ) + /* + ...makes typing easier, because it deduces the template type, e.g., + you write |dont_AddRef(fooP)| instead of |already_AddRefed(fooP)|. + */ + { + return already_AddRefed(aRawPtr); + } + +template +inline +const already_AddRefed +getter_AddRefs( const already_AddRefed aAlreadyAddRefedPtr ) + { + return aAlreadyAddRefedPtr; + } + +template +inline +const already_AddRefed +dont_AddRef( T* aRawPtr ) + { + return already_AddRefed(aRawPtr); + } + +template +inline +const already_AddRefed +dont_AddRef( const already_AddRefed aAlreadyAddRefedPtr ) + { + return aAlreadyAddRefedPtr; + } + + + +class nsCOMPtr_helper + /* + An |nsCOMPtr_helper| transforms commonly called getters into typesafe forms + that are more convenient to call, and more efficient to use with |nsCOMPtr|s. + Good candidates for helpers are |QueryInterface()|, |CreateInstance()|, etc. + + Here are the rules for a helper: + - it implements |operator()| to produce an interface pointer + - (except for its name) |operator()| is a valid [XP]COM `getter' + - the interface pointer that it returns is already |AddRef()|ed (as from any good getter) + - it matches the type requested with the supplied |nsIID| argument + - its constructor provides an optional |nsresult*| that |operator()| can fill + in with an error when it is executed + + See |class nsGetInterface| for an example. + */ + { + public: + virtual nsresult operator()( const nsIID&, void** ) const = 0; + }; + +/* + |nsQueryInterface| could have been implemented as an |nsCOMPtr_helper| to + avoid adding specialized machinery in |nsCOMPtr|, But |do_QueryInterface| + is called often enough that the codesize savings are big enough to + warrant the specialcasing. +*/ + +class NS_COM nsQueryInterface + { + public: + nsQueryInterface( nsISupports* aRawPtr ) + : mRawPtr(aRawPtr) + { + // nothing else to do here + } + + nsresult operator()( const nsIID& aIID, void** ) const; + + private: + nsISupports* mRawPtr; + }; + +class NS_COM nsQueryInterfaceWithError + { + public: + nsQueryInterfaceWithError( nsISupports* aRawPtr, nsresult* error ) + : mRawPtr(aRawPtr), + mErrorPtr(error) + { + // nothing else to do here + } + + nsresult operator()( const nsIID& aIID, void** ) const; + + private: + nsISupports* mRawPtr; + nsresult* mErrorPtr; + }; + +inline +nsQueryInterface +do_QueryInterface( nsISupports* aRawPtr ) + { + return nsQueryInterface(aRawPtr); + } + +inline +nsQueryInterfaceWithError +do_QueryInterface( nsISupports* aRawPtr, nsresult* error ) + { + return nsQueryInterfaceWithError(aRawPtr, error); + } + +template +inline +void +do_QueryInterface( already_AddRefed& ) + { + // This signature exists soley to _stop_ you from doing the bad thing. + // Saying |do_QueryInterface()| on a pointer that is not otherwise owned by + // someone else is an automatic leak. See . + } + +template +inline +void +do_QueryInterface( already_AddRefed&, nsresult* ) + { + // This signature exists soley to _stop_ you from doing the bad thing. + // Saying |do_QueryInterface()| on a pointer that is not otherwise owned by + // someone else is an automatic leak. See . + } + + + +class nsCOMPtr_base + /* + ...factors implementation for all template versions of |nsCOMPtr|. + + This should really be an |nsCOMPtr|, but this wouldn't work + because unlike the + + Here's the way people normally do things like this + + template class Foo { ... }; + template <> class Foo { ... }; + template class Foo : private Foo { ... }; + */ + { + public: + + nsCOMPtr_base( nsISupports* rawPtr = 0 ) + : mRawPtr(rawPtr) + { + // nothing else to do here + } + + NS_COM ~nsCOMPtr_base(); + + NS_COM void assign_with_AddRef( nsISupports* ); + NS_COM void assign_from_qi( const nsQueryInterface, const nsIID& ); + NS_COM void assign_from_qi_with_error( const nsQueryInterfaceWithError&, const nsIID& ); + NS_COM void assign_from_helper( const nsCOMPtr_helper&, const nsIID& ); + NS_COM void** begin_assignment(); + + protected: + NS_MAY_ALIAS_PTR(nsISupports) mRawPtr; + + void + assign_assuming_AddRef( nsISupports* newPtr ) + { + /* + |AddRef()|ing the new value (before entering this function) before + |Release()|ing the old lets us safely ignore the self-assignment case. + We must, however, be careful only to |Release()| _after_ doing the + assignment, in case the |Release()| leads to our _own_ destruction, + which would, in turn, cause an incorrect second |Release()| of our old + pointer. Thank for discovering this. + */ + nsISupports* oldPtr = mRawPtr; + mRawPtr = newPtr; + NSCAP_LOG_ASSIGNMENT(this, newPtr); + NSCAP_LOG_RELEASE(this, oldPtr); + if ( oldPtr ) + NSCAP_RELEASE(this, oldPtr); + } + }; + +// template class nsGetterAddRefs; + +template +class nsCOMPtr +#ifdef NSCAP_FEATURE_USE_BASE + : private nsCOMPtr_base +#endif + { + +#ifdef NSCAP_FEATURE_USE_BASE + #define NSCAP_CTOR_BASE(x) nsCOMPtr_base(x) +#else + #define NSCAP_CTOR_BASE(x) mRawPtr(x) + + private: + void assign_with_AddRef( nsISupports* ); + void assign_from_qi( const nsQueryInterface, const nsIID& ); + void assign_from_qi_with_error( const nsQueryInterfaceWithError&, const nsIID& ); + void assign_from_helper( const nsCOMPtr_helper&, const nsIID& ); + void** begin_assignment(); + + void + assign_assuming_AddRef( T* newPtr ) + { + T* oldPtr = mRawPtr; + mRawPtr = newPtr; + NSCAP_LOG_ASSIGNMENT(this, newPtr); + NSCAP_LOG_RELEASE(this, oldPtr); + if ( oldPtr ) + NSCAP_RELEASE(this, oldPtr); + } + + private: + T* mRawPtr; +#endif + + public: + typedef T element_type; + +#ifndef NSCAP_FEATURE_USE_BASE + ~nsCOMPtr() + { + NSCAP_LOG_RELEASE(this, mRawPtr); + if ( mRawPtr ) + NSCAP_RELEASE(this, mRawPtr); + } +#endif + +#ifdef NSCAP_FEATURE_TEST_DONTQUERY_CASES + void + Assert_NoQueryNeeded() + { + if ( mRawPtr ) + { + nsCOMPtr query_result( do_QueryInterface(mRawPtr) ); + NS_ASSERTION(query_result.get() == mRawPtr, "QueryInterface needed"); + } + } + + #define NSCAP_ASSERT_NO_QUERY_NEEDED() Assert_NoQueryNeeded(); +#else + #define NSCAP_ASSERT_NO_QUERY_NEEDED() +#endif + + + // Constructors + + nsCOMPtr() + : NSCAP_CTOR_BASE(0) + // default constructor + { + NSCAP_LOG_ASSIGNMENT(this, 0); + } + + nsCOMPtr( const nsCOMPtr& aSmartPtr ) + : NSCAP_CTOR_BASE(aSmartPtr.mRawPtr) + // copy-constructor + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + } + + nsCOMPtr( T* aRawPtr ) + : NSCAP_CTOR_BASE(aRawPtr) + // construct from a raw pointer (of the right type) + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aRawPtr); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + nsCOMPtr( const already_AddRefed& aSmartPtr ) + : NSCAP_CTOR_BASE(aSmartPtr.mRawPtr) + // construct from |dont_AddRef(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + nsCOMPtr( const nsQueryInterface qi ) + : NSCAP_CTOR_BASE(0) + // construct from |do_QueryInterface(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi(qi, NS_GET_IID(T)); + } + + nsCOMPtr( const nsQueryInterfaceWithError& qi ) + : NSCAP_CTOR_BASE(0) + // construct from |do_QueryInterface(expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi_with_error(qi, NS_GET_IID(T)); + } + + nsCOMPtr( const nsCOMPtr_helper& helper ) + : NSCAP_CTOR_BASE(0) + // ...and finally, anything else we might need to construct from + // can exploit the |nsCOMPtr_helper| facility + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_helper(helper, NS_GET_IID(T)); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + + // Assignment operators + + nsCOMPtr& + operator=( const nsCOMPtr& rhs ) + // copy assignment operator + { + assign_with_AddRef(rhs.mRawPtr); + return *this; + } + + nsCOMPtr& + operator=( T* rhs ) + // assign from a raw pointer (of the right type) + { + assign_with_AddRef(rhs); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + return *this; + } + + nsCOMPtr& + operator=( const already_AddRefed& rhs ) + // assign from |dont_AddRef(expr)| + { + assign_assuming_AddRef(rhs.mRawPtr); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + return *this; + } + + nsCOMPtr& + operator=( const nsQueryInterface rhs ) + // assign from |do_QueryInterface(expr)| + { + assign_from_qi(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr& + operator=( const nsQueryInterfaceWithError& rhs ) + // assign from |do_QueryInterface(expr, &rv)| + { + assign_from_qi_with_error(rhs, NS_GET_IID(T)); + return *this; + } + + nsCOMPtr& + operator=( const nsCOMPtr_helper& rhs ) + // ...and finally, anything else we might need to assign from + // can exploit the |nsCOMPtr_helper| facility. + { + assign_from_helper(rhs, NS_GET_IID(T)); + NSCAP_ASSERT_NO_QUERY_NEEDED(); + return *this; + } + + void + swap( nsCOMPtr& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { +#ifdef NSCAP_FEATURE_USE_BASE + nsISupports* temp = rhs.mRawPtr; +#else + T* temp = rhs.mRawPtr; +#endif + NSCAP_LOG_ASSIGNMENT(&rhs, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + NSCAP_LOG_RELEASE(&rhs, temp); + rhs.mRawPtr = mRawPtr; + mRawPtr = temp; + // |rhs| maintains the same invariants, so we don't need to |NSCAP_ASSERT_NO_QUERY_NEEDED| + } + + void + swap( T*& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { +#ifdef NSCAP_FEATURE_USE_BASE + nsISupports* temp = rhs; +#else + T* temp = rhs; +#endif + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + rhs = NS_REINTERPRET_CAST(T*, mRawPtr); + mRawPtr = temp; + NSCAP_ASSERT_NO_QUERY_NEEDED(); + } + + + // Other pointer operators + + nsDerivedSafe* + get() const + /* + Prefer the implicit conversion provided automatically by |operator nsDerivedSafe*() const|. + Use |get()| _only_ to resolve ambiguity. + + Returns a |nsDerivedSafe*| to deny clients the use of |AddRef| and |Release|. + */ + { + return NS_REINTERPRET_CAST(nsDerivedSafe*, mRawPtr); + } + + operator nsDerivedSafe*() const + /* + ...makes an |nsCOMPtr| act like its underlying raw pointer type (except against |AddRef()|, |Release()|, + and |delete|) whenever it is used in a context where a raw pointer is expected. It is this operator + that makes an |nsCOMPtr| substitutable for a raw pointer. + + Prefer the implicit use of this operator to calling |get()|, except where necessary to resolve ambiguity. + */ + { + return get(); + } + + nsDerivedSafe* + operator->() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator->()."); + return get(); + } + +#ifdef CANT_RESOLVE_CPP_CONST_AMBIGUITY + // broken version for IRIX + + nsCOMPtr* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return NS_CONST_CAST(nsCOMPtr*, this); + } + +#else // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + nsCOMPtr* + get_address() + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + + const nsCOMPtr* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + +#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + public: + nsDerivedSafe& + operator*() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator*()."); + return *get(); + } + +#if 0 + private: + friend class nsGetterAddRefs; +#endif + + T** + StartAssignment() + { +#ifndef NSCAP_FEATURE_INLINE_STARTASSIGNMENT + return NS_REINTERPRET_CAST(T**, begin_assignment()); +#else + assign_assuming_AddRef(0); + return NS_REINTERPRET_CAST(T**, &mRawPtr); +#endif + } + }; + + + + /* + Specializing |nsCOMPtr| for |nsISupports| allows us to use |nsCOMPtr| the + same way people use |nsISupports*| and |void*|, i.e., as a `catch-all' pointer pointing + to any valid [XP]COM interface. Otherwise, an |nsCOMPtr| would only be able + to point to the single [XP]COM-correct |nsISupports| instance within an object; extra + querying ensues. Clients need to be able to pass around arbitrary interface pointers, + without hassles, through intermediary code that doesn't know the exact type. + */ + +NS_SPECIALIZE_TEMPLATE +class nsCOMPtr + : private nsCOMPtr_base + { + public: + typedef nsISupports element_type; + + // Constructors + + nsCOMPtr() + : nsCOMPtr_base(0) + // default constructor + { + NSCAP_LOG_ASSIGNMENT(this, 0); + } + + nsCOMPtr( const nsCOMPtr& aSmartPtr ) + : nsCOMPtr_base(aSmartPtr.mRawPtr) + // copy constructor + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + } + + nsCOMPtr( nsISupports* aRawPtr ) + : nsCOMPtr_base(aRawPtr) + // construct from a raw pointer (of the right type) + { + if ( mRawPtr ) + NSCAP_ADDREF(this, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, aRawPtr); + } + + nsCOMPtr( const already_AddRefed& aSmartPtr ) + : nsCOMPtr_base(aSmartPtr.mRawPtr) + // construct from |dont_AddRef(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, aSmartPtr.mRawPtr); + } + + nsCOMPtr( const nsQueryInterface qi ) + : nsCOMPtr_base(0) + // assign from |do_QueryInterface(expr)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi(qi, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsQueryInterfaceWithError& qi ) + : nsCOMPtr_base(0) + // assign from |do_QueryInterface(expr, &rv)| + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_qi_with_error(qi, NS_GET_IID(nsISupports)); + } + + nsCOMPtr( const nsCOMPtr_helper& helper ) + : nsCOMPtr_base(0) + // ...and finally, anything else we might need to construct from + // can exploit the |nsCOMPtr_helper| facility + { + NSCAP_LOG_ASSIGNMENT(this, 0); + assign_from_helper(helper, NS_GET_IID(nsISupports)); + } + + + // Assignment operators + + nsCOMPtr& + operator=( const nsCOMPtr& rhs ) + // copy assignment operator + { + assign_with_AddRef(rhs.mRawPtr); + return *this; + } + + nsCOMPtr& + operator=( nsISupports* rhs ) + // assign from a raw pointer (of the right type) + { + assign_with_AddRef(rhs); + return *this; + } + + nsCOMPtr& + operator=( const already_AddRefed& rhs ) + // assign from |dont_AddRef(expr)| + { + assign_assuming_AddRef(rhs.mRawPtr); + return *this; + } + + nsCOMPtr& + operator=( const nsQueryInterface rhs ) + // assign from |do_QueryInterface(expr)| + { + assign_from_qi(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr& + operator=( const nsQueryInterfaceWithError& rhs ) + // assign from |do_QueryInterface(expr, &rv)| + { + assign_from_qi_with_error(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + nsCOMPtr& + operator=( const nsCOMPtr_helper& rhs ) + // ...and finally, anything else we might need to assign from + // can exploit the |nsCOMPtr_helper| facility. + { + assign_from_helper(rhs, NS_GET_IID(nsISupports)); + return *this; + } + + void + swap( nsCOMPtr& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { + nsISupports* temp = rhs.mRawPtr; + NSCAP_LOG_ASSIGNMENT(&rhs, mRawPtr); + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + NSCAP_LOG_RELEASE(&rhs, temp); + rhs.mRawPtr = mRawPtr; + mRawPtr = temp; + } + + void + swap( nsISupports*& rhs ) + // ...exchange ownership with |rhs|; can save a pair of refcount operations + { + nsISupports* temp = rhs; + NSCAP_LOG_ASSIGNMENT(this, temp); + NSCAP_LOG_RELEASE(this, mRawPtr); + rhs = mRawPtr; + mRawPtr = temp; + } + + + // Other pointer operators + + nsDerivedSafe* + get() const + /* + Prefer the implicit conversion provided automatically by |operator nsDerivedSafe*() const|. + Use |get()| _only_ to resolve ambiguity. + + Returns a |nsDerivedSafe*| to deny clients the use of |AddRef| and |Release|. + */ + { + return NS_REINTERPRET_CAST(nsDerivedSafe*, mRawPtr); + } + + operator nsDerivedSafe*() const + /* + ...makes an |nsCOMPtr| act like its underlying raw pointer type (except against |AddRef()|, |Release()|, + and |delete|) whenever it is used in a context where a raw pointer is expected. It is this operator + that makes an |nsCOMPtr| substitutable for a raw pointer. + + Prefer the implicit use of this operator to calling |get()|, except where necessary to resolve ambiguity. + */ + { + return get(); + } + + nsDerivedSafe* + operator->() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator->()."); + return get(); + } + +#ifdef CANT_RESOLVE_CPP_CONST_AMBIGUITY + // broken version for IRIX + + nsCOMPtr* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return NS_CONST_CAST(nsCOMPtr*, this); + } + +#else // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + nsCOMPtr* + get_address() + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + + const nsCOMPtr* + get_address() const + // This is not intended to be used by clients. See |address_of| + // below. + { + return this; + } + +#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY + + public: + + nsDerivedSafe& + operator*() const + { + NS_PRECONDITION(mRawPtr != 0, "You can't dereference a NULL nsCOMPtr with operator*()."); + return *get(); + } + +#if 0 + private: + friend class nsGetterAddRefs; +#endif + + nsISupports** + StartAssignment() + { +#ifndef NSCAP_FEATURE_INLINE_STARTASSIGNMENT + return NS_REINTERPRET_CAST(nsISupports**, begin_assignment()); +#else + assign_assuming_AddRef(0); + return NS_REINTERPRET_CAST(nsISupports**, &mRawPtr); +#endif + } + }; + +#ifndef NSCAP_FEATURE_USE_BASE +template +void +nsCOMPtr::assign_with_AddRef( nsISupports* rawPtr ) + { + if ( rawPtr ) + NSCAP_ADDREF(this, rawPtr); + assign_assuming_AddRef(NS_REINTERPRET_CAST(T*, rawPtr)); + } + +template +void +nsCOMPtr::assign_from_qi( const nsQueryInterface qi, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( qi(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template +void +nsCOMPtr::assign_from_qi_with_error( const nsQueryInterfaceWithError& qi, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( qi(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template +void +nsCOMPtr::assign_from_helper( const nsCOMPtr_helper& helper, const nsIID& aIID ) + { + T* newRawPtr; + if ( NS_FAILED( helper(aIID, NS_REINTERPRET_CAST(void**, &newRawPtr)) ) ) + newRawPtr = 0; + assign_assuming_AddRef(newRawPtr); + } + +template +void** +nsCOMPtr::begin_assignment() + { + assign_assuming_AddRef(0); + return NS_REINTERPRET_CAST(void**, &mRawPtr); + } +#endif + +#ifdef CANT_RESOLVE_CPP_CONST_AMBIGUITY + +// This is the broken version for IRIX, which can't handle the version below. + +template +inline +nsCOMPtr* +address_of( const nsCOMPtr& aPtr ) + { + return aPtr.get_address(); + } + +#else // CANT_RESOLVE_CPP_CONST_AMBIGUITY + +template +inline +nsCOMPtr* +address_of( nsCOMPtr& aPtr ) + { + return aPtr.get_address(); + } + +template +inline +const nsCOMPtr* +address_of( const nsCOMPtr& aPtr ) + { + return aPtr.get_address(); + } + +#endif // CANT_RESOLVE_CPP_CONST_AMBIGUITY + +template +class nsGetterAddRefs + /* + ... + + This class is designed to be used for anonymous temporary objects in the + argument list of calls that return COM interface pointers, e.g., + + nsCOMPtr fooP; + ...->QueryInterface(iid, getter_AddRefs(fooP)) + + DO NOT USE THIS TYPE DIRECTLY IN YOUR CODE. Use |getter_AddRefs()| instead. + + When initialized with a |nsCOMPtr|, as in the example above, it returns + a |void**|, a |T**|, or an |nsISupports**| as needed, that the outer call (|QueryInterface| in this + case) can fill in. + + This type should be a nested class inside |nsCOMPtr|. + */ + { + public: + explicit + nsGetterAddRefs( nsCOMPtr& aSmartPtr ) + : mTargetSmartPtr(aSmartPtr) + { + // nothing else to do + } + +#if defined(NSCAP_FEATURE_TEST_DONTQUERY_CASES) || defined(NSCAP_LOG_EXTERNAL_ASSIGNMENT) + ~nsGetterAddRefs() + { +#ifdef NSCAP_LOG_EXTERNAL_ASSIGNMENT + NSCAP_LOG_ASSIGNMENT(NS_REINTERPRET_CAST(void *, address_of(mTargetSmartPtr)), mTargetSmartPtr.get()); +#endif + +#ifdef NSCAP_FEATURE_TEST_DONTQUERY_CASES + mTargetSmartPtr.Assert_NoQueryNeeded(); +#endif + } +#endif + + operator void**() + { + return NS_REINTERPRET_CAST(void**, mTargetSmartPtr.StartAssignment()); + } + + operator nsISupports**() + { + return NS_REINTERPRET_CAST(nsISupports**, mTargetSmartPtr.StartAssignment()); + } + + operator T**() + { + return mTargetSmartPtr.StartAssignment(); + } + + T*& + operator*() + { + return *(mTargetSmartPtr.StartAssignment()); + } + + private: + nsCOMPtr& mTargetSmartPtr; + }; + + +NS_SPECIALIZE_TEMPLATE +class nsGetterAddRefs + { + public: + explicit + nsGetterAddRefs( nsCOMPtr& aSmartPtr ) + : mTargetSmartPtr(aSmartPtr) + { + // nothing else to do + } + +#ifdef NSCAP_LOG_EXTERNAL_ASSIGNMENT + ~nsGetterAddRefs() + { + NSCAP_LOG_ASSIGNMENT(NS_REINTERPRET_CAST(void *, address_of(mTargetSmartPtr)), mTargetSmartPtr.get()); + } +#endif + + operator void**() + { + return NS_REINTERPRET_CAST(void**, mTargetSmartPtr.StartAssignment()); + } + + operator nsISupports**() + { + return mTargetSmartPtr.StartAssignment(); + } + + nsISupports*& + operator*() + { + return *(mTargetSmartPtr.StartAssignment()); + } + + private: + nsCOMPtr& mTargetSmartPtr; + }; + + +template +inline +nsGetterAddRefs +getter_AddRefs( nsCOMPtr& aSmartPtr ) + /* + Used around a |nsCOMPtr| when + ...makes the class |nsGetterAddRefs| invisible. + */ + { + return nsGetterAddRefs(aSmartPtr); + } + + + + // Comparing two |nsCOMPtr|s + +template +inline +NSCAP_BOOL +operator==( const nsCOMPtr& lhs, const nsCOMPtr& rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) == NS_STATIC_CAST(const U*, rhs.get()); + } + + +template +inline +NSCAP_BOOL +operator!=( const nsCOMPtr& lhs, const nsCOMPtr& rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) != NS_STATIC_CAST(const U*, rhs.get()); + } + + + // Comparing an |nsCOMPtr| to a raw pointer + +template +inline +NSCAP_BOOL +operator==( const nsCOMPtr& lhs, const U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) == rhs; + } + +template +inline +NSCAP_BOOL +operator==( const U* lhs, const nsCOMPtr& rhs ) + { + return lhs == NS_STATIC_CAST(const T*, rhs.get()); + } + +template +inline +NSCAP_BOOL +operator!=( const nsCOMPtr& lhs, const U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) != rhs; + } + +template +inline +NSCAP_BOOL +operator!=( const U* lhs, const nsCOMPtr& rhs ) + { + return lhs != NS_STATIC_CAST(const T*, rhs.get()); + } + + // To avoid ambiguities caused by the presence of builtin |operator==|s + // creating a situation where one of the |operator==| defined above + // has a better conversion for one argument and the builtin has a + // better conversion for the other argument, define additional + // |operator==| without the |const| on the raw pointer. + // See bug 65664 for details. + +// This is defined by an autoconf test, but VC++ also has a bug that +// prevents us from using these. (It also, fortunately, has the bug +// that we don't need them either.) +#if defined(_MSC_VER) && (_MSC_VER < 1310) +#define NSCAP_DONT_PROVIDE_NONCONST_OPEQ +#endif + +#ifndef NSCAP_DONT_PROVIDE_NONCONST_OPEQ +template +inline +NSCAP_BOOL +operator==( const nsCOMPtr& lhs, U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) == NS_CONST_CAST(const U*, rhs); + } + +template +inline +NSCAP_BOOL +operator==( U* lhs, const nsCOMPtr& rhs ) + { + return NS_CONST_CAST(const U*, lhs) == NS_STATIC_CAST(const T*, rhs.get()); + } + +template +inline +NSCAP_BOOL +operator!=( const nsCOMPtr& lhs, U* rhs ) + { + return NS_STATIC_CAST(const T*, lhs.get()) != NS_CONST_CAST(const U*, rhs); + } + +template +inline +NSCAP_BOOL +operator!=( U* lhs, const nsCOMPtr& rhs ) + { + return NS_CONST_CAST(const U*, lhs) != NS_STATIC_CAST(const T*, rhs.get()); + } +#endif + + + + // Comparing an |nsCOMPtr| to |0| + +class NSCAP_Zero; + +template +inline +NSCAP_BOOL +operator==( const nsCOMPtr& lhs, NSCAP_Zero* rhs ) + // specifically to allow |smartPtr == 0| + { + return NS_STATIC_CAST(const void*, lhs.get()) == NS_REINTERPRET_CAST(const void*, rhs); + } + +template +inline +NSCAP_BOOL +operator==( NSCAP_Zero* lhs, const nsCOMPtr& rhs ) + // specifically to allow |0 == smartPtr| + { + return NS_REINTERPRET_CAST(const void*, lhs) == NS_STATIC_CAST(const void*, rhs.get()); + } + +template +inline +NSCAP_BOOL +operator!=( const nsCOMPtr& lhs, NSCAP_Zero* rhs ) + // specifically to allow |smartPtr != 0| + { + return NS_STATIC_CAST(const void*, lhs.get()) != NS_REINTERPRET_CAST(const void*, rhs); + } + +template +inline +NSCAP_BOOL +operator!=( NSCAP_Zero* lhs, const nsCOMPtr& rhs ) + // specifically to allow |0 != smartPtr| + { + return NS_REINTERPRET_CAST(const void*, lhs) != NS_STATIC_CAST(const void*, rhs.get()); + } + + +#ifdef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO + + // We need to explicitly define comparison operators for `int' + // because the compiler is lame. + +template +inline +NSCAP_BOOL +operator==( const nsCOMPtr& lhs, int rhs ) + // specifically to allow |smartPtr == 0| + { + return NS_STATIC_CAST(const void*, lhs.get()) == NS_REINTERPRET_CAST(const void*, rhs); + } + +template +inline +NSCAP_BOOL +operator==( int lhs, const nsCOMPtr& rhs ) + // specifically to allow |0 == smartPtr| + { + return NS_REINTERPRET_CAST(const void*, lhs) == NS_STATIC_CAST(const void*, rhs.get()); + } + +#endif // !defined(HAVE_CPP_TROUBLE_COMPARING_TO_ZERO) + + // Comparing any two [XP]COM objects for identity + +inline +NSCAP_BOOL +SameCOMIdentity( nsISupports* lhs, nsISupports* rhs ) + { + return nsCOMPtr( do_QueryInterface(lhs) ) == nsCOMPtr( do_QueryInterface(rhs) ); + } + + + +template +inline +nsresult +CallQueryInterface( nsCOMPtr& aSourcePtr, DestinationType** aDestPtr ) + { + return CallQueryInterface(aSourcePtr.get(), aDestPtr); + } + +#endif // !defined(nsCOMPtr_h___) diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerObsolete.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerObsolete.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerObsolete.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerObsolete.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,185 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is XPCOM + * + * The Initial Developer of the Original Code is Netscape Communications + * Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ +#ifndef nsComponentManagerObsolete_h___ +#define nsComponentManagerObsolete_h___ + +#include "nsIComponentManager.h" +#include "nsIComponentManagerObsolete.h" + +class nsIEnumerator; +class nsIFactory; +class nsIFile; +//////////////////////////////////////////////////////////////////// +// +// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +// +// Functions, classes, interfaces and types in this file are +// obsolete. Use at your own risk. +// Please see nsIComponentManager.idl for the supported interface +// to the component manager. +// +//////////////////////////////////////////////////////////////////// + + + +//////////////////////////////////////////////////////////////////// +// God save me from this evilness. Below is a very bad +// function. Its out var is really a nsIComponentManagerObsolete +// but it has been cast to a nsIComponentManager. +// The reason for such uglyness is that this function is require for +// backward compatiblity of some plugins. This funciton will +// be removed at some point. +//////////////////////////////////////////////////////////////////// + +extern NS_COM nsresult +NS_GetGlobalComponentManager(nsIComponentManager* *result); + + + + +class NS_COM nsComponentManager { +public: + static nsresult Initialize(void); + + // Finds a factory for a specific class ID + static nsresult FindFactory(const nsCID &aClass, + nsIFactory **aFactory); + + // Get the singleton class object that implements the CID aClass + static nsresult GetClassObject(const nsCID &aClass, const nsIID &aIID, + void **aResult); + + // Finds a class ID for a specific Program ID + static nsresult ContractIDToClassID(const char *aContractID, + nsCID *aClass); + + // Finds a Program ID for a specific class ID + // caller frees the result with delete[] + static nsresult CLSIDToContractID(nsCID *aClass, + char* *aClassName, + char* *aContractID); + + // Creates a class instance for a specific class ID + static nsresult CreateInstance(const nsCID &aClass, + nsISupports *aDelegate, + const nsIID &aIID, + void **aResult); + + // Convenience routine, creates a class instance for a specific ContractID + static nsresult CreateInstance(const char *aContractID, + nsISupports *aDelegate, + const nsIID &aIID, + void **aResult); + + // Manually registry a factory for a class + static nsresult RegisterFactory(const nsCID &aClass, + const char *aClassName, + const char *aContractID, + nsIFactory *aFactory, + PRBool aReplace); + + // Manually register a dynamically loaded component. + // The libraryPersistentDescriptor is what gets passed to the library + // self register function from ComponentManager. The format of this string + // is the same as nsIFile::GetPath() + // + // This function will go away in favour of RegisterComponentSpec. In fact, + // it internally turns around and calls RegisterComponentSpec. + static nsresult RegisterComponent(const nsCID &aClass, + const char *aClassName, + const char *aContractID, + const char *aLibraryPersistentDescriptor, + PRBool aReplace, + PRBool aPersist); + + // Register a component using its FileSpec as its identification + // This is the more prevalent use. + static nsresult RegisterComponentSpec(const nsCID &aClass, + const char *aClassName, + const char *aContractID, + nsIFile *aLibrary, + PRBool aReplace, + PRBool aPersist); + + // Register a component using its dllName. This could be a dll name with + // no path so that LD_LIBRARY_PATH on unix or PATH on win can load it. Or + // this could be a code fragment name on the Mac. + static nsresult RegisterComponentLib(const nsCID &aClass, + const char *aClassName, + const char *aContractID, + const char *adllName, + PRBool aReplace, + PRBool aPersist); + + + // Manually unregister a factory for a class + static nsresult UnregisterFactory(const nsCID &aClass, + nsIFactory *aFactory); + + // Manually unregister a dynamically loaded component + static nsresult UnregisterComponent(const nsCID &aClass, + const char *aLibrary); + + // Manually unregister a dynamically loaded component + static nsresult UnregisterComponentSpec(const nsCID &aClass, + nsIFile *aLibrarySpec); + + // Unload dynamically loaded factories that are not in use + static nsresult FreeLibraries(void); + ////////////////////////////////////////////////////////////////////////////// + // DLL registration support + + // If directory is NULL, then AutoRegister will try registering components + // in the default components directory. + static nsresult AutoRegister(PRInt32 when, nsIFile* directory); + static nsresult AutoRegisterComponent(PRInt32 when, nsIFile *component); + static nsresult AutoUnregisterComponent(PRInt32 when, nsIFile *component); + + // Is the given CID currently registered? + static nsresult IsRegistered(const nsCID &aClass, + PRBool *aRegistered); + + // Get an enumeration of all the CIDs + static nsresult EnumerateCLSIDs(nsIEnumerator** aEmumerator); + + // Get an enumeration of all the ContractIDs + static nsresult EnumerateContractIDs(nsIEnumerator** aEmumerator); + +}; + + +#endif diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerUtils.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerUtils.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerUtils.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsComponentManagerUtils.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,177 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "NPL"); you may not use this file except in + * compliance with the NPL. You may obtain a copy of the NPL at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the NPL is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL + * for the specific language governing rights and limitations under the + * NPL. + * + * The Initial Developer of this code under the NPL is Netscape + * Communications Corporation. Portions created by Netscape are + * Copyright (C) 1998 Netscape Communications Corporation. All Rights + * Reserved. + */ + +#ifndef nsComponentManagerUtils_h__ +#define nsComponentManagerUtils_h__ + +/* + * Do not include this file directly. Instead, + * |#include "nsIComponentManager.h"|. + */ + +#ifndef nsCOMPtr_h__ +#include "nsCOMPtr.h" +#endif + +#ifndef nsComponentManagerObsolete_h___ +#include "nsComponentManagerObsolete.h" +#endif + +#define NS_COMPONENTMANAGER_CID \ +{ /* 91775d60-d5dc-11d2-92fb-00e09805570f */ \ + 0x91775d60, \ + 0xd5dc, \ + 0x11d2, \ + {0x92, 0xfb, 0x00, 0xe0, 0x98, 0x05, 0x57, 0x0f} \ +} + +class NS_COM nsCreateInstanceByCID : public nsCOMPtr_helper +{ +public: + nsCreateInstanceByCID( const nsCID& aCID, nsISupports* aOuter, nsresult* aErrorPtr ) + : mCID(aCID), + mOuter(aOuter), + mErrorPtr(aErrorPtr) + { + // nothing else to do here + } + + virtual nsresult operator()( const nsIID&, void** ) const; + +private: + const nsCID& mCID; + nsISupports* mOuter; + nsresult* mErrorPtr; +}; + +class NS_COM nsCreateInstanceByContractID : public nsCOMPtr_helper +{ +public: + nsCreateInstanceByContractID( const char* aContractID, nsISupports* aOuter, nsresult* aErrorPtr ) + : mContractID(aContractID), + mOuter(aOuter), + mErrorPtr(aErrorPtr) + { + // nothing else to do here + } + + virtual nsresult operator()( const nsIID&, void** ) const; + +private: + const char* mContractID; + nsISupports* mOuter; + nsresult* mErrorPtr; +}; + +inline +const nsCreateInstanceByCID +do_CreateInstance( const nsCID& aCID, nsresult* error = 0 ) +{ + return nsCreateInstanceByCID(aCID, 0, error); +} + +inline +const nsCreateInstanceByCID +do_CreateInstance( const nsCID& aCID, nsISupports* aOuter, nsresult* error = 0 ) +{ + return nsCreateInstanceByCID(aCID, aOuter, error); +} + +inline +const nsCreateInstanceByContractID +do_CreateInstance( const char* aContractID, nsresult* error = 0 ) +{ + return nsCreateInstanceByContractID(aContractID, 0, error); +} + +inline +const nsCreateInstanceByContractID +do_CreateInstance( const char* aContractID, nsISupports* aOuter, nsresult* error = 0 ) +{ + return nsCreateInstanceByContractID(aContractID, aOuter, error); +} + +// type-safe shortcuts for calling |CreateInstance| +template +inline +nsresult +CallCreateInstance( const nsCID &aClass, + nsISupports *aDelegate, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return nsComponentManager::CreateInstance(aClass, aDelegate, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template +inline +nsresult +CallCreateInstance( const nsCID &aClass, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return nsComponentManager::CreateInstance(aClass, nsnull, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template +inline +nsresult +CallCreateInstance( const char *aContractID, + nsISupports *aDelegate, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aContractID, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return nsComponentManager::CreateInstance(aContractID, + aDelegate, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template +inline +nsresult +CallCreateInstance( const char *aContractID, + DestinationType** aDestination ) +{ + NS_PRECONDITION(aContractID, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return nsComponentManager::CreateInstance(aContractID, nsnull, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +/* keys for registry use */ +extern const char xpcomKeyName[]; +extern const char xpcomComponentsKeyName[]; +extern const char lastModValueName[]; +extern const char fileSizeValueName[]; +extern const char nativeComponentType[]; +extern const char staticComponentType[]; + +#endif /* nsComponentManagerUtils_h__ */ + + diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsDebug.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsDebug.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsDebug.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsDebug.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,276 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsDebug_h___ +#define nsDebug_h___ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsError_h__ +#include "nsError.h" +#endif + +#ifdef DEBUG +#define NS_DEBUG +#endif + +/** + * Namespace for debugging methods. Note that your code must use the + * macros defined later in this file so that the debug code can be + * conditionally compiled out. + */ + +/* in case this is included by a C file */ +#ifdef __cplusplus + +class nsDebug { +public: + + /** + * Log a warning message to the debug log. + */ + static NS_COM void Warning(const char* aMessage, + const char* aFile, PRIntn aLine); + + /** + * Abort the executing program. This works on all architectures. + */ + static NS_COM void Abort(const char* aFile, PRIntn aLine); + + /** + * Break the executing program into the debugger. + */ + static NS_COM void Break(const char* aFile, PRIntn aLine); + + /** + * Log an assertion message to the debug log + */ + static NS_COM void Assertion(const char* aStr, const char* aExpr, + const char* aFile, PRIntn aLine); +}; + +#ifdef DEBUG + +/** + * Abort the execution of the program if the expression evaluates to + * false. + * + * There is no status value returned from the macro. + * + * Note that the non-debug version of this macro does not + * evaluate the expression argument. Hence side effect statements + * as arguments to the macro will yield improper execution in a + * non-debug build. For example: + * + * NS_ABORT_IF_FALSE(0 == foo++, "yikes foo should be zero"); + * + * Note also that the non-debug version of this macro does not + * evaluate the message argument. + */ +#define NS_ABORT_IF_FALSE(_expr, _msg) \ + PR_BEGIN_MACRO \ + if (!(_expr)) { \ + nsDebug::Assertion(_msg, #_expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Warn if a given condition is false. + * + * Program execution continues past the usage of this macro. + * + * Note also that the non-debug version of this macro does not + * evaluate the message argument. + */ +#define NS_WARN_IF_FALSE(_expr,_msg) \ + PR_BEGIN_MACRO \ + if (!(_expr)) { \ + nsDebug::Assertion(_msg, #_expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Test a precondition for truth. If the expression is not true then + * trigger a program failure. + */ +#define NS_PRECONDITION(expr, str) \ + PR_BEGIN_MACRO \ + if (!(expr)) { \ + nsDebug::Assertion(str, #expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Test an assertion for truth. If the expression is not true then + * trigger a program failure. + */ +#define NS_ASSERTION(expr, str) \ + PR_BEGIN_MACRO \ + if (!(expr)) { \ + nsDebug::Assertion(str, #expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * Test a post-condition for truth. If the expression is not true then + * trigger a program failure. + */ +#define NS_POSTCONDITION(expr, str) \ + PR_BEGIN_MACRO \ + if (!(expr)) { \ + nsDebug::Assertion(str, #expr, __FILE__, __LINE__); \ + } \ + PR_END_MACRO + +/** + * This macros triggers a program failure if executed. It indicates that + * an attempt was made to execute some unimplimented functionality. + */ +#define NS_NOTYETIMPLEMENTED(str) \ + nsDebug::Assertion(str, "NotYetImplemented", __FILE__, __LINE__) + +/** + * This macros triggers a program failure if executed. It indicates that + * an attempt was made to execute some unimplimented functionality. + */ +#define NS_NOTREACHED(str) \ + nsDebug::Assertion(str, "Not Reached", __FILE__, __LINE__) + +/** + * Log an error message. + */ +#define NS_ERROR(str) \ + nsDebug::Assertion(str, "Error", __FILE__, __LINE__) + +/** + * Log a warning message. + */ +#define NS_WARNING(str) \ + nsDebug::Warning(str, __FILE__, __LINE__) + +/** + * Trigger an abort + */ +#define NS_ABORT() \ + nsDebug::Abort(__FILE__, __LINE__) + +/** + * Cause a break + */ +#define NS_BREAK() \ + nsDebug::Break(__FILE__, __LINE__) + +#else /* NS_DEBUG */ + +/** + * The non-debug version of these macros do not evaluate the + * expression or the message arguments to the macro. + */ +#define NS_ABORT_IF_FALSE(_expr, _msg) /* nothing */ +#define NS_WARN_IF_FALSE(_expr, _msg) /* nothing */ +#define NS_PRECONDITION(expr, str) /* nothing */ +#define NS_ASSERTION(expr, str) /* nothing */ +#define NS_POSTCONDITION(expr, str) /* nothing */ +#define NS_NOTYETIMPLEMENTED(str) /* nothing */ +#define NS_NOTREACHED(str) /* nothing */ +#define NS_ERROR(str) /* nothing */ +#define NS_WARNING(str) /* nothing */ +#define NS_ABORT() /* nothing */ +#define NS_BREAK() /* nothing */ + +#endif /* ! NS_DEBUG */ +#endif /* __cplusplus */ + +// Macros for checking the trueness of an expression passed in within an +// interface implementation. These need to be compiled regardless of the +// NS_DEBUG flag +/////////////////////////////////////////////////////////////////////////////// + +#define NS_ENSURE_TRUE(x, ret) \ + PR_BEGIN_MACRO \ + if (NS_UNLIKELY(!(x))) { \ + NS_WARNING("NS_ENSURE_TRUE(" #x ") failed"); \ + return ret; \ + } \ + PR_END_MACRO + +#define NS_ENSURE_FALSE(x, ret) \ + NS_ENSURE_TRUE(!(x), ret) + +/////////////////////////////////////////////////////////////////////////////// +// Macros for checking results +/////////////////////////////////////////////////////////////////////////////// + +#define NS_ENSURE_SUCCESS(res, ret) \ + NS_ENSURE_TRUE(NS_SUCCEEDED(res), ret) + +/////////////////////////////////////////////////////////////////////////////// +// Macros for checking state and arguments upon entering interface boundaries +/////////////////////////////////////////////////////////////////////////////// + +#define NS_ENSURE_ARG(arg) \ + NS_ENSURE_TRUE(arg, NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_ARG_POINTER(arg) \ + NS_ENSURE_TRUE(arg, NS_ERROR_INVALID_POINTER) + +#define NS_ENSURE_ARG_MIN(arg, min) \ + NS_ENSURE_TRUE((arg) >= min, NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_ARG_MAX(arg, max) \ + NS_ENSURE_TRUE((arg) <= max, NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_ARG_RANGE(arg, min, max) \ + NS_ENSURE_TRUE(((arg) >= min) && ((arg) <= max), NS_ERROR_INVALID_ARG) + +#define NS_ENSURE_STATE(state) \ + NS_ENSURE_TRUE(state, NS_ERROR_UNEXPECTED) + +#define NS_ENSURE_NO_AGGREGATION(outer) \ + NS_ENSURE_FALSE(outer, NS_ERROR_NO_AGGREGATION) + +#define NS_ENSURE_PROPER_AGGREGATION(outer, iid) \ + NS_ENSURE_FALSE(outer && !iid.Equals(NS_GET_IID(nsISupports)), NS_ERROR_INVALID_ARG) + +/////////////////////////////////////////////////////////////////////////////// + +#define NS_CheckThreadSafe(owningThread, msg) \ + NS_ASSERTION(owningThread == PR_GetCurrentThread(), msg) + +#endif /* nsDebug_h___ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsError.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsError.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsError.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsError.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,309 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsError_h__ +#define nsError_h__ + +#ifndef nscore_h___ +#include "nscore.h" /* needed for nsresult */ +#endif + +/* + * To add error code to your module, you need to do the following: + * + * 1) Add a module offset code. Add yours to the bottom of the list + * right below this comment, adding 1. + * + * 2) In your module, define a header file which uses one of the + * NE_ERROR_GENERATExxxxxx macros. Some examples below: + * + * #define NS_ERROR_MYMODULE_MYERROR1 NS_ERROR_GENERATE(NS_ERROR_SEVERITY_ERROR,NS_ERROR_MODULE_MYMODULE,1) + * #define NS_ERROR_MYMODULE_MYERROR2 NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_MYMODULE,2) + * #define NS_ERROR_MYMODULE_MYERROR3 NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_MYMODULE,3) + * + */ + + +/** + * @name Standard Module Offset Code. Each Module should identify a unique number + * and then all errors associated with that module become offsets from the + * base associated with that module id. There are 16 bits of code bits for + * each module. + */ + +#define NS_ERROR_MODULE_XPCOM 1 +#define NS_ERROR_MODULE_BASE 2 +#define NS_ERROR_MODULE_GFX 3 +#define NS_ERROR_MODULE_WIDGET 4 +#define NS_ERROR_MODULE_CALENDAR 5 +#define NS_ERROR_MODULE_NETWORK 6 +#define NS_ERROR_MODULE_PLUGINS 7 +#define NS_ERROR_MODULE_LAYOUT 8 +#define NS_ERROR_MODULE_HTMLPARSER 9 +#define NS_ERROR_MODULE_RDF 10 +#define NS_ERROR_MODULE_UCONV 11 +#define NS_ERROR_MODULE_REG 12 +#define NS_ERROR_MODULE_FILES 13 +#define NS_ERROR_MODULE_DOM 14 +#define NS_ERROR_MODULE_IMGLIB 15 +#define NS_ERROR_MODULE_MAILNEWS 16 +#define NS_ERROR_MODULE_EDITOR 17 +#define NS_ERROR_MODULE_XPCONNECT 18 +#define NS_ERROR_MODULE_PROFILE 19 +#define NS_ERROR_MODULE_LDAP 20 +#define NS_ERROR_MODULE_SECURITY 21 +#define NS_ERROR_MODULE_DOM_XPATH 22 +#define NS_ERROR_MODULE_DOM_RANGE 23 +#define NS_ERROR_MODULE_URILOADER 24 +#define NS_ERROR_MODULE_CONTENT 25 +#define NS_ERROR_MODULE_PYXPCOM 26 +#define NS_ERROR_MODULE_XSLT 27 + +/* NS_ERROR_MODULE_GENERAL should be used by modules that do not + * care if return code values overlap. Callers of methods that + * return such codes should be aware that they are not + * globally unique. Implementors should be careful about blindly + * returning codes from other modules that might also use + * the generic base. + */ +#define NS_ERROR_MODULE_GENERAL 51 + +/** + * @name Standard Error Handling Macros + */ + +#define NS_FAILED(_nsresult) (NS_UNLIKELY((_nsresult) & 0x80000000)) +#define NS_SUCCEEDED(_nsresult) (NS_LIKELY(!((_nsresult) & 0x80000000))) + +/** + * @name Severity Code. This flag identifies the level of warning + */ + +#define NS_ERROR_SEVERITY_SUCCESS 0 +#define NS_ERROR_SEVERITY_ERROR 1 + +/** + * @name Mozilla Code. This flag separates consumers of mozilla code + * from the native platform + */ + +#define NS_ERROR_MODULE_BASE_OFFSET 0x45 + +/** + * @name Standard Error Generating Macros + */ + +#define NS_ERROR_GENERATE(sev,module,code) \ + ((nsresult) (((PRUint32)(sev)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) ) + +#define NS_ERROR_GENERATE_SUCCESS(module,code) \ + ((nsresult) (((PRUint32)(NS_ERROR_SEVERITY_SUCCESS)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) ) + +#define NS_ERROR_GENERATE_FAILURE(module,code) \ + ((nsresult) (((PRUint32)(NS_ERROR_SEVERITY_ERROR)<<31) | ((PRUint32)(module+NS_ERROR_MODULE_BASE_OFFSET)<<16) | ((PRUint32)(code))) ) + +/** + * @name Standard Macros for retrieving error bits + */ + +#define NS_ERROR_GET_CODE(err) ((err) & 0xffff) +#define NS_ERROR_GET_MODULE(err) (((((err) >> 16) - NS_ERROR_MODULE_BASE_OFFSET) & 0x1fff)) +#define NS_ERROR_GET_SEVERITY(err) (((err) >> 31) & 0x1) + +/** + * @name Standard return values + */ + +/*@{*/ + +/* Standard "it worked" return value */ +#define NS_OK 0 + +#define NS_ERROR_BASE ((nsresult) 0xC1F30000) + +/* Returned when an instance is not initialized */ +#define NS_ERROR_NOT_INITIALIZED (NS_ERROR_BASE + 1) + +/* Returned when an instance is already initialized */ +#define NS_ERROR_ALREADY_INITIALIZED (NS_ERROR_BASE + 2) + +/* Returned by a not implemented function */ +#define NS_ERROR_NOT_IMPLEMENTED ((nsresult) 0x80004001L) + +/* Returned when a given interface is not supported. */ +#define NS_NOINTERFACE ((nsresult) 0x80004002L) +#define NS_ERROR_NO_INTERFACE NS_NOINTERFACE + +#define NS_ERROR_INVALID_POINTER ((nsresult) 0x80004003L) +#define NS_ERROR_NULL_POINTER NS_ERROR_INVALID_POINTER + +/* Returned when a function aborts */ +#define NS_ERROR_ABORT ((nsresult) 0x80004004L) + +/* Returned when a function fails */ +#define NS_ERROR_FAILURE ((nsresult) 0x80004005L) + +/* Returned when an unexpected error occurs */ +#define NS_ERROR_UNEXPECTED ((nsresult) 0x8000ffffL) + +/* Returned when a memory allocation fails */ +#define NS_ERROR_OUT_OF_MEMORY ((nsresult) 0x8007000eL) + +/* Returned when an illegal value is passed */ +#define NS_ERROR_ILLEGAL_VALUE ((nsresult) 0x80070057L) +#define NS_ERROR_INVALID_ARG NS_ERROR_ILLEGAL_VALUE + +/* Returned when a class doesn't allow aggregation */ +#define NS_ERROR_NO_AGGREGATION ((nsresult) 0x80040110L) + +/* Returned when an operation can't complete due to an unavailable resource */ +#define NS_ERROR_NOT_AVAILABLE ((nsresult) 0x80040111L) + +/* Returned when a class is not registered */ +#define NS_ERROR_FACTORY_NOT_REGISTERED ((nsresult) 0x80040154L) + +/* Returned when a class cannot be registered, but may be tried again later */ +#define NS_ERROR_FACTORY_REGISTER_AGAIN ((nsresult) 0x80040155L) + +/* Returned when a dynamically loaded factory couldn't be found */ +#define NS_ERROR_FACTORY_NOT_LOADED ((nsresult) 0x800401f8L) + +/* Returned when a factory doesn't support signatures */ +#define NS_ERROR_FACTORY_NO_SIGNATURE_SUPPORT \ + (NS_ERROR_BASE + 0x101) + +/* Returned when a factory already is registered */ +#define NS_ERROR_FACTORY_EXISTS (NS_ERROR_BASE + 0x100) + + +/* For COM compatibility reasons, we want to use exact error code numbers + for NS_ERROR_PROXY_INVALID_IN_PARAMETER and NS_ERROR_PROXY_INVALID_OUT_PARAMETER. + The first matches: + + #define RPC_E_INVALID_PARAMETER _HRESULT_TYPEDEF_(0x80010010L) + + Errors returning this mean that the xpcom proxy code could not create a proxy for + one of the in paramaters. + + Because of this, we are ignoring the convention if using a base and offset for + error numbers. + +*/ + +/* Returned when a proxy could not be create a proxy for one of the IN parameters + This is returned only when the "real" meathod has NOT been invoked. +*/ + +#define NS_ERROR_PROXY_INVALID_IN_PARAMETER ((nsresult) 0x80010010L) + +/* Returned when a proxy could not be create a proxy for one of the OUT parameters + This is returned only when the "real" meathod has ALREADY been invoked. +*/ + +#define NS_ERROR_PROXY_INVALID_OUT_PARAMETER ((nsresult) 0x80010011L) + + +/*@}*/ + + /* I/O Errors */ + + /* Stream closed */ +#define NS_BASE_STREAM_CLOSED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 2) + /* Error from the operating system */ +#define NS_BASE_STREAM_OSERROR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 3) + /* Illegal arguments */ +#define NS_BASE_STREAM_ILLEGAL_ARGS NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 4) + /* For unichar streams */ +#define NS_BASE_STREAM_NO_CONVERTER NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 5) + /* For unichar streams */ +#define NS_BASE_STREAM_BAD_CONVERSION NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 6) + +#define NS_BASE_STREAM_WOULD_BLOCK NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_BASE, 7) + + +#define NS_ERROR_FILE_UNRECOGNIZED_PATH NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 1) +#define NS_ERROR_FILE_UNRESOLVABLE_SYMLINK NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 2) +#define NS_ERROR_FILE_EXECUTION_FAILED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 3) +#define NS_ERROR_FILE_UNKNOWN_TYPE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 4) +#define NS_ERROR_FILE_DESTINATION_NOT_DIR NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 5) +#define NS_ERROR_FILE_TARGET_DOES_NOT_EXIST NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 6) +#define NS_ERROR_FILE_COPY_OR_MOVE_FAILED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 7) +#define NS_ERROR_FILE_ALREADY_EXISTS NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 8) +#define NS_ERROR_FILE_INVALID_PATH NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 9) +#define NS_ERROR_FILE_DISK_FULL NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 10) +#define NS_ERROR_FILE_CORRUPTED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 11) +#define NS_ERROR_FILE_NOT_DIRECTORY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 12) +#define NS_ERROR_FILE_IS_DIRECTORY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 13) +#define NS_ERROR_FILE_IS_LOCKED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 14) +#define NS_ERROR_FILE_TOO_BIG NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 15) +#define NS_ERROR_FILE_NO_DEVICE_SPACE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 16) +#define NS_ERROR_FILE_NAME_TOO_LONG NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 17) +#define NS_ERROR_FILE_NOT_FOUND NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 18) +#define NS_ERROR_FILE_READ_ONLY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 19) +#define NS_ERROR_FILE_DIR_NOT_EMPTY NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 20) +#define NS_ERROR_FILE_ACCESS_DENIED NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_FILES, 21) + +#define NS_SUCCESS_FILE_DIRECTORY_EMPTY NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_FILES, 1) + + /* Result codes used by nsIVariant */ + +#define NS_ERROR_CANNOT_CONVERT_DATA NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 1) +#define NS_ERROR_OBJECT_IS_IMMUTABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 2) +#define NS_ERROR_LOSS_OF_SIGNIFICANT_DATA NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 3) + +#define NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 1) + + + /* + * This will return the nsresult corresponding to the most recent NSPR failure + * returned by PR_GetError. + * + *********************************************************************** + * Do not depend on this function. It will be going away! + *********************************************************************** + */ +extern NS_COM nsresult +NS_ErrorAccordingToNSPR(); + + +#ifdef _MSC_VER +#pragma warning(disable: 4251) /* 'nsCOMPtr' needs to have dll-interface to be used by clients of class 'nsInputStream' */ +#pragma warning(disable: 4275) /* non dll-interface class 'nsISupports' used as base for dll-interface class 'nsIRDFNode' */ +#endif + +#endif + diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIClassInfo.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIClassInfo.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIClassInfo.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIClassInfo.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,245 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIClassInfo.idl + */ + +#ifndef __gen_nsIClassInfo_h__ +#define __gen_nsIClassInfo_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIProgrammingLanguage_h__ +#include "nsIProgrammingLanguage.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIClassInfo */ +#define NS_ICLASSINFO_IID_STR "986c11d0-f340-11d4-9075-0010a4e73d9a" + +#define NS_ICLASSINFO_IID \ + {0x986c11d0, 0xf340, 0x11d4, \ + { 0x90, 0x75, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }} + +/** + * Provides information about a specific implementation class + * @status FROZEN + */ +class NS_NO_VTABLE nsIClassInfo : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICLASSINFO_IID) + + /** + * Get an ordered list of the interface ids that instances of the class + * promise to implement. Note that nsISupports is an implicit member + * of any such list and need not be included. + * + * Should set *count = 0 and *array = null and return NS_OK if getting the + * list is not supported. + */ + /* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) = 0; + + /** + * Get a language mapping specific helper object that may assist in using + * objects of this class in a specific lanaguage. For instance, if asked + * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return + * an object that can be QI'd into the nsIXPCScriptable interface to assist + * XPConnect in supplying JavaScript specific behavior to callers of the + * instance object. + * + * see: nsIProgrammingLanguage.idl + * + * Should return null if no helper available for given language. + */ + /* nsISupports getHelperForLanguage (in PRUint32 language); */ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) = 0; + + /** + * A contract ID through which an instance of this class can be created + * (or accessed as a service, if |flags & SINGLETON|), or null. + */ + /* readonly attribute string contractID; */ + NS_IMETHOD GetContractID(char * *aContractID) = 0; + + /** + * A human readable string naming the class, or null. + */ + /* readonly attribute string classDescription; */ + NS_IMETHOD GetClassDescription(char * *aClassDescription) = 0; + + /** + * A class ID through which an instance of this class can be created + * (or accessed as a service, if |flags & SINGLETON|), or null. + */ + /* readonly attribute nsCIDPtr classID; */ + NS_IMETHOD GetClassID(nsCID * *aClassID) = 0; + + /** + * Return language type from list in nsIProgrammingLanguage + */ + /* readonly attribute PRUint32 implementationLanguage; */ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) = 0; + + /** + * Bitflags for 'flags' attribute. + */ + enum { SINGLETON = 1U }; + + enum { THREADSAFE = 2U }; + + enum { MAIN_THREAD_ONLY = 4U }; + + enum { DOM_OBJECT = 8U }; + + enum { PLUGIN_OBJECT = 16U }; + + enum { EAGER_CLASSINFO = 32U }; + + /** + * 'flags' attribute bitflag: whether objects of this type implement + * nsIContent. + */ + enum { CONTENT_NODE = 64U }; + + enum { RESERVED = 2147483648U }; + + /* readonly attribute PRUint32 flags; */ + NS_IMETHOD GetFlags(PRUint32 *aFlags) = 0; + + /** + * Also a class ID through which an instance of this class can be created + * (or accessed as a service, if |flags & SINGLETON|). If the class does + * not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute + * exists so C++ callers can avoid allocating and freeing a CID, as would + * happen if they used classID. + */ + /* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICLASSINFO \ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array); \ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval); \ + NS_IMETHOD GetContractID(char * *aContractID); \ + NS_IMETHOD GetClassDescription(char * *aClassDescription); \ + NS_IMETHOD GetClassID(nsCID * *aClassID); \ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage); \ + NS_IMETHOD GetFlags(PRUint32 *aFlags); \ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICLASSINFO(_to) \ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return _to GetInterfaces(count, array); } \ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return _to GetHelperForLanguage(language, _retval); } \ + NS_IMETHOD GetContractID(char * *aContractID) { return _to GetContractID(aContractID); } \ + NS_IMETHOD GetClassDescription(char * *aClassDescription) { return _to GetClassDescription(aClassDescription); } \ + NS_IMETHOD GetClassID(nsCID * *aClassID) { return _to GetClassID(aClassID); } \ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return _to GetImplementationLanguage(aImplementationLanguage); } \ + NS_IMETHOD GetFlags(PRUint32 *aFlags) { return _to GetFlags(aFlags); } \ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return _to GetClassIDNoAlloc(aClassIDNoAlloc); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICLASSINFO(_to) \ + NS_IMETHOD GetInterfaces(PRUint32 *count, nsIID * **array) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaces(count, array); } \ + NS_IMETHOD GetHelperForLanguage(PRUint32 language, nsISupports **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHelperForLanguage(language, _retval); } \ + NS_IMETHOD GetContractID(char * *aContractID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContractID(aContractID); } \ + NS_IMETHOD GetClassDescription(char * *aClassDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassDescription(aClassDescription); } \ + NS_IMETHOD GetClassID(nsCID * *aClassID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassID(aClassID); } \ + NS_IMETHOD GetImplementationLanguage(PRUint32 *aImplementationLanguage) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetImplementationLanguage(aImplementationLanguage); } \ + NS_IMETHOD GetFlags(PRUint32 *aFlags) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetFlags(aFlags); } \ + NS_IMETHOD GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassIDNoAlloc(aClassIDNoAlloc); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsClassInfo : public nsIClassInfo +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICLASSINFO + + nsClassInfo(); + +private: + ~nsClassInfo(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsClassInfo, nsIClassInfo) + +nsClassInfo::nsClassInfo() +{ + /* member initializers and constructor code */ +} + +nsClassInfo::~nsClassInfo() +{ + /* destructor code */ +} + +/* void getInterfaces (out PRUint32 count, [array, size_is (count), retval] out nsIIDPtr array); */ +NS_IMETHODIMP nsClassInfo::GetInterfaces(PRUint32 *count, nsIID * **array) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISupports getHelperForLanguage (in PRUint32 language); */ +NS_IMETHODIMP nsClassInfo::GetHelperForLanguage(PRUint32 language, nsISupports **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string contractID; */ +NS_IMETHODIMP nsClassInfo::GetContractID(char * *aContractID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string classDescription; */ +NS_IMETHODIMP nsClassInfo::GetClassDescription(char * *aClassDescription) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsCIDPtr classID; */ +NS_IMETHODIMP nsClassInfo::GetClassID(nsCID * *aClassID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRUint32 implementationLanguage; */ +NS_IMETHODIMP nsClassInfo::GetImplementationLanguage(PRUint32 *aImplementationLanguage) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute PRUint32 flags; */ +NS_IMETHODIMP nsClassInfo::GetFlags(PRUint32 *aFlags) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [notxpcom] readonly attribute nsCID classIDNoAlloc; */ +NS_IMETHODIMP nsClassInfo::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIClassInfo_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManager.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManager.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManager.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManager.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,166 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIComponentManager.idl + */ + +#ifndef __gen_nsIComponentManager_h__ +#define __gen_nsIComponentManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIFactory; /* forward declaration */ + + +/* starting interface: nsIComponentManager */ +#define NS_ICOMPONENTMANAGER_IID_STR "a88e5a60-205a-4bb1-94e1-2628daf51eae" + +#define NS_ICOMPONENTMANAGER_IID \ + {0xa88e5a60, 0x205a, 0x4bb1, \ + { 0x94, 0xe1, 0x26, 0x28, 0xda, 0xf5, 0x1e, 0xae }} + +class NS_NO_VTABLE nsIComponentManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMPONENTMANAGER_IID) + + /** + * getClassObject + * + * Returns the factory object that can be used to create instances of + * CID aClass + * + * @param aClass The classid of the factory that is being requested + */ + /* void getClassObject (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) = 0; + + /** + * getClassObjectByContractID + * + * Returns the factory object that can be used to create instances of + * CID aClass + * + * @param aClass The classid of the factory that is being requested + */ + /* void getClassObjectByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) = 0; + + /** + * createInstance + * + * Create an instance of the CID aClass and return the interface aIID. + * + * @param aClass : ClassID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ + /* void createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) = 0; + + /** + * createInstanceByContractID + * + * Create an instance of the CID that implements aContractID and return the + * interface aIID. + * + * @param aContractID : aContractID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ + /* void createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICOMPONENTMANAGER \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result); \ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result); \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result); \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICOMPONENTMANAGER(_to) \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) { return _to GetClassObject(aClass, aIID, result); } \ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return _to GetClassObjectByContractID(aContractID, aIID, result); } \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return _to CreateInstance(aClass, aDelegate, aIID, result); } \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return _to CreateInstanceByContractID(aContractID, aDelegate, aIID, result); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICOMPONENTMANAGER(_to) \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObject(aClass, aIID, result); } \ + NS_IMETHOD GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObjectByContractID(aContractID, aIID, result); } \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aClass, aDelegate, aIID, result); } \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstanceByContractID(aContractID, aDelegate, aIID, result); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsComponentManager : public nsIComponentManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICOMPONENTMANAGER + + nsComponentManager(); + +private: + ~nsComponentManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsComponentManager, nsIComponentManager) + +nsComponentManager::nsComponentManager() +{ + /* member initializers and constructor code */ +} + +nsComponentManager::~nsComponentManager() +{ + /* destructor code */ +} + +/* void getClassObject (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getClassObjectByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::GetClassObjectByContractID(const char *aContractID, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsComponentManager::CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#ifndef MOZILLA_STRICT_API +#include "nsComponentManagerUtils.h" +#include "nsComponentManagerObsolete.h" +#endif + +#endif /* __gen_nsIComponentManager_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManagerObsolete.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManagerObsolete.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManagerObsolete.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIComponentManagerObsolete.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,605 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIComponentManagerObsolete.idl + */ + +#ifndef __gen_nsIComponentManagerObsolete_h__ +#define __gen_nsIComponentManagerObsolete_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIFactory_h__ +#include "nsIFactory.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIFile; /* forward declaration */ + +class nsIEnumerator; /* forward declaration */ + + +/* starting interface: nsIComponentManagerObsolete */ +#define NS_ICOMPONENTMANAGEROBSOLETE_IID_STR "8458a740-d5dc-11d2-92fb-00e09805570f" + +#define NS_ICOMPONENTMANAGEROBSOLETE_IID \ + {0x8458a740, 0xd5dc, 0x11d2, \ + { 0x92, 0xfb, 0x00, 0xe0, 0x98, 0x05, 0x57, 0x0f }} + +class NS_NO_VTABLE nsIComponentManagerObsolete : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOMPONENTMANAGEROBSOLETE_IID) + + /** + * findFactory + * + * Returns the factory object that can be used to create instances of + * CID aClass + * + * @param aClass The classid of the factory that is being requested + */ + /* nsIFactory findFactory (in nsCIDRef aClass); */ + NS_IMETHOD FindFactory(const nsCID & aClass, nsIFactory **_retval) = 0; + + /** + * getClassObject + * + * @param aClass : CID of the class whose class object is requested + * @param aIID : IID of an interface that the class object is known to + * to implement. nsISupports and nsIFactory are known to + * be implemented by the class object. + */ + /* [noscript] voidPtr getClassObject (in nsCIDRef aClass, in nsIIDRef aIID); */ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *_retval) = 0; + + /** + * contractIDToClassID + * + * Get the ClassID for a given ContractID. Many ClassIDs may implement a + * ContractID. In such a situation, this returns the preferred ClassID, which + * happens to be the last registered ClassID. + * + * @param aContractID : Contractid for which ClassID is requested + * @return aClass : ClassID return + */ + /* [notxpcom] nsresult contractIDToClassID (in string aContractID, out nsCID aClass); */ + NS_IMETHOD_(nsresult) ContractIDToClassID(const char *aContractID, nsCID *aClass) = 0; + + /** + * classIDToContractid + * + * Get the ContractID for a given ClassID. A ClassIDs may implement multiple + * ContractIDs. This function return the last registered ContractID. + * + * @param aClass : ClassID for which ContractID is requested. + * @return aClassName : returns class name asssociated with aClass + * @return : ContractID last registered for aClass + */ + /* string CLSIDToContractID (in nsCIDRef aClass, out string aClassName); */ + NS_IMETHOD CLSIDToContractID(const nsCID & aClass, char **aClassName, char **_retval) = 0; + + /** + * createInstance + * + * Create an instance of the CID aClass and return the interface aIID. + * + * @param aClass : ClassID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ + /* [noscript] voidPtr createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID); */ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval) = 0; + + /** + * createInstanceByContractID + * + * Create an instance of the CID that implements aContractID and return the + * interface aIID. This is a convenience function that effectively does + * ContractIDToClassID() followed by CreateInstance(). + * + * @param aContractID : aContractID of object instance requested + * @param aDelegate : Used for aggregation + * @param aIID : IID of interface requested + */ + /* [noscript] voidPtr createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef IID); */ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & IID, void * *_retval) = 0; + + /** + * registryLocationForSpec + * + * Given a file specification, return the registry representation of + * the filename. Files that are found relative to the components + * directory will have a registry representation + * "rel:" while filenames that are not, will have + * "abs:". + */ + /* string registryLocationForSpec (in nsIFile aSpec); */ + NS_IMETHOD RegistryLocationForSpec(nsIFile *aSpec, char **_retval) = 0; + + /** + * specForRegistyLocation + * + * Create a file specification for the registry representation (rel:/abs:) + * got via registryLocationForSpec. + */ + /* nsIFile specForRegistryLocation (in string aLocation); */ + NS_IMETHOD SpecForRegistryLocation(const char *aLocation, nsIFile **_retval) = 0; + + /** + * registerFactory + * + * Register a factory and ContractID associated with CID aClass + * + * @param aClass : CID of object + * @param aClassName : Class Name of CID + * @param aContractID : ContractID associated with CID aClass + * @param aFactory : Factory that will be registered for CID aClass + * @param aReplace : Boolean that indicates whether to replace a previous + * registration for the CID aClass. + */ + /* void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory, in boolean aReplace); */ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace) = 0; + + /** + * registerComponent + * + * Register a native dll module via its registry representation as returned + * by registryLocationForSpec() as the container of CID implemenation + * aClass and associate aContractID and aClassName to the CID aClass. Native + * dll component type is assumed. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aLocation : Location of module (dll). Format of this is the + * registry representation as returned by + * registryLocationForSpec() + * @param aReplace : Boolean that indicates whether to replace a previous + * module registration for aClass. + * @param aPersist : Remember this registration across sessions. + */ + /* void registerComponent (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aLocation, in boolean aReplace, in boolean aPersist); */ + NS_IMETHOD RegisterComponent(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) = 0; + + /** + * registerComponentWithType + * + * Register a module's location via its registry representation + * as returned by registryLocationForSpec() as the container of CID implemenation + * aClass of type aType and associate aContractID and aClassName to the CID aClass. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aSpec : Filename spec for module's location. + * @param aLocation : Location of module of type aType. Format of this string + * is the registry representation as returned by + * registryLocationForSpec() + * @param aReplace : Boolean that indicates whether to replace a previous + * loader registration for aClass. + * @param aPersist : Remember this registration across sessions. + * @param aType : Component Type of CID aClass. + */ + /* void registerComponentWithType (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aSpec, in string aLocation, in boolean aReplace, in boolean aPersist, in string aType); */ + NS_IMETHOD RegisterComponentWithType(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType) = 0; + + /** + * registerComponentSpec + * + * Register a native dll module via its file specification as the container + * of CID implemenation aClass and associate aContractID and aClassName to the + * CID aClass. Native dll component type is assumed. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aLibrary : File specification Location of module (dll). + * @param aReplace : Boolean that indicates whether to replace a previous + * module registration for aClass. + * @param aPersist : Remember this registration across sessions. + */ + /* void registerComponentSpec (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aLibrary, in boolean aReplace, in boolean aPersist); */ + NS_IMETHOD RegisterComponentSpec(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist) = 0; + + /** + * registerComponentLib + * + * Register a native dll module via its dll name (not full path) as the + * container of CID implemenation aClass and associate aContractID and aClassName + * to the CID aClass. Native dll component type is assumed and the system + * services will be used to load this dll. + * + * @param aClass : CID implemenation contained in module + * @param aClassName : Class name associated with CID aClass + * @param aContractID : ContractID associated with CID aClass + * @param aDllNameLocation : Dll name of module. + * @param aReplace : Boolean that indicates whether to replace a previous + * module registration for aClass. + * @param aPersist : Remember this registration across sessions. + */ + /* void registerComponentLib (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aDllName, in boolean aReplace, in boolean aPersist); */ + NS_IMETHOD RegisterComponentLib(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist) = 0; + + /** + * unregisterFactory + * + * Unregister a factory associated with CID aClass. + * + * @param aClass : ClassID being unregistered + * @param aFactory : Factory previously registered to create instances of + * ClassID aClass. + */ + /* void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory); */ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) = 0; + + /** + * unregisterComponent + * + * Disassociate module aLocation represented as registry location as returned + * by registryLocationForSpec() as containing ClassID aClass. + * + * @param aClass : ClassID being unregistered + * @param aLocation : Location of module. Format of this is the registry + * representation as returned by registryLocationForSpec(). + * Components of any type will be unregistered. + */ + /* void unregisterComponent (in nsCIDRef aClass, in string aLocation); */ + NS_IMETHOD UnregisterComponent(const nsCID & aClass, const char *aLocation) = 0; + + /** + * unregisterComponentSpec + * + * Disassociate module references by file specification aLibrarySpec as + * containing ClassID aClass. + */ + /* void unregisterComponentSpec (in nsCIDRef aClass, in nsIFile aLibrarySpec); */ + NS_IMETHOD UnregisterComponentSpec(const nsCID & aClass, nsIFile *aLibrarySpec) = 0; + + /** + * freeLibraries + * + * Enumerates all loaded modules and unloads unused modules. + */ + /* void freeLibraries (); */ + NS_IMETHOD FreeLibraries(void) = 0; + + /** + * ID values for 'when' + */ + enum { NS_Startup = 0 }; + + enum { NS_Script = 1 }; + + enum { NS_Timer = 2 }; + + enum { NS_Shutdown = 3 }; + + /** + * autoRegister + * + * Enumerates directory looking for modules of all types and registers + * modules who have changed (modtime or size) since the last time + * autoRegister() was invoked. + * + * @param when : ID values of when the call is being made. + * @param directory : Directory the will be enumerated. + */ + /* void autoRegister (in long when, in nsIFile directory); */ + NS_IMETHOD AutoRegister(PRInt32 when, nsIFile *directory) = 0; + + /** + * autoRegisterComponent + * + * Loads module using appropriate loader and gives it an opportunity to + * register its CIDs if module's modtime or size changed since the last + * time this was called. + * + * @param when : ID values of when the call is being made. + * @param aFileLocation : File specification of module. + */ + /* void autoRegisterComponent (in long when, in nsIFile aFileLocation); */ + NS_IMETHOD AutoRegisterComponent(PRInt32 when, nsIFile *aFileLocation) = 0; + + /** + * autoUnregisterComponent + * + * Loads module using approriate loader and gives it an opportunity to + * unregister its CIDs + */ + /* void autoUnregisterComponent (in long when, in nsIFile aFileLocation); */ + NS_IMETHOD AutoUnregisterComponent(PRInt32 when, nsIFile *aFileLocation) = 0; + + /** + * isRegistered + * + * Returns true if a factory or module is registered for CID aClass. + * + * @param aClass : ClassID queried for registeration + * @return : true if a factory or module is registered for CID aClass. + * false otherwise. + */ + /* boolean isRegistered (in nsCIDRef aClass); */ + NS_IMETHOD IsRegistered(const nsCID & aClass, PRBool *_retval) = 0; + + /** + * enumerateCLSIDs + * + * Enumerate the list of all registered ClassIDs. + * + * @return : enumerator for ClassIDs. + */ + /* nsIEnumerator enumerateCLSIDs (); */ + NS_IMETHOD EnumerateCLSIDs(nsIEnumerator **_retval) = 0; + + /** + * enumerateContractIDs + * + * Enumerate the list of all registered ContractIDs. + * + * @return : enumerator for ContractIDs. + */ + /* nsIEnumerator enumerateContractIDs (); */ + NS_IMETHOD EnumerateContractIDs(nsIEnumerator **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICOMPONENTMANAGEROBSOLETE \ + NS_IMETHOD FindFactory(const nsCID & aClass, nsIFactory **_retval); \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *_retval); \ + NS_IMETHOD_(nsresult) ContractIDToClassID(const char *aContractID, nsCID *aClass); \ + NS_IMETHOD CLSIDToContractID(const nsCID & aClass, char **aClassName, char **_retval); \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval); \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & IID, void * *_retval); \ + NS_IMETHOD RegistryLocationForSpec(nsIFile *aSpec, char **_retval); \ + NS_IMETHOD SpecForRegistryLocation(const char *aLocation, nsIFile **_retval); \ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace); \ + NS_IMETHOD RegisterComponent(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist); \ + NS_IMETHOD RegisterComponentWithType(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType); \ + NS_IMETHOD RegisterComponentSpec(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist); \ + NS_IMETHOD RegisterComponentLib(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist); \ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory); \ + NS_IMETHOD UnregisterComponent(const nsCID & aClass, const char *aLocation); \ + NS_IMETHOD UnregisterComponentSpec(const nsCID & aClass, nsIFile *aLibrarySpec); \ + NS_IMETHOD FreeLibraries(void); \ + NS_IMETHOD AutoRegister(PRInt32 when, nsIFile *directory); \ + NS_IMETHOD AutoRegisterComponent(PRInt32 when, nsIFile *aFileLocation); \ + NS_IMETHOD AutoUnregisterComponent(PRInt32 when, nsIFile *aFileLocation); \ + NS_IMETHOD IsRegistered(const nsCID & aClass, PRBool *_retval); \ + NS_IMETHOD EnumerateCLSIDs(nsIEnumerator **_retval); \ + NS_IMETHOD EnumerateContractIDs(nsIEnumerator **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICOMPONENTMANAGEROBSOLETE(_to) \ + NS_IMETHOD FindFactory(const nsCID & aClass, nsIFactory **_retval) { return _to FindFactory(aClass, _retval); } \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *_retval) { return _to GetClassObject(aClass, aIID, _retval); } \ + NS_IMETHOD_(nsresult) ContractIDToClassID(const char *aContractID, nsCID *aClass) { return _to ContractIDToClassID(aContractID, aClass); } \ + NS_IMETHOD CLSIDToContractID(const nsCID & aClass, char **aClassName, char **_retval) { return _to CLSIDToContractID(aClass, aClassName, _retval); } \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval) { return _to CreateInstance(aClass, aDelegate, aIID, _retval); } \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & IID, void * *_retval) { return _to CreateInstanceByContractID(aContractID, aDelegate, IID, _retval); } \ + NS_IMETHOD RegistryLocationForSpec(nsIFile *aSpec, char **_retval) { return _to RegistryLocationForSpec(aSpec, _retval); } \ + NS_IMETHOD SpecForRegistryLocation(const char *aLocation, nsIFile **_retval) { return _to SpecForRegistryLocation(aLocation, _retval); } \ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace) { return _to RegisterFactory(aClass, aClassName, aContractID, aFactory, aReplace); } \ + NS_IMETHOD RegisterComponent(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) { return _to RegisterComponent(aClass, aClassName, aContractID, aLocation, aReplace, aPersist); } \ + NS_IMETHOD RegisterComponentWithType(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType) { return _to RegisterComponentWithType(aClass, aClassName, aContractID, aSpec, aLocation, aReplace, aPersist, aType); } \ + NS_IMETHOD RegisterComponentSpec(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist) { return _to RegisterComponentSpec(aClass, aClassName, aContractID, aLibrary, aReplace, aPersist); } \ + NS_IMETHOD RegisterComponentLib(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist) { return _to RegisterComponentLib(aClass, aClassName, aContractID, aDllName, aReplace, aPersist); } \ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) { return _to UnregisterFactory(aClass, aFactory); } \ + NS_IMETHOD UnregisterComponent(const nsCID & aClass, const char *aLocation) { return _to UnregisterComponent(aClass, aLocation); } \ + NS_IMETHOD UnregisterComponentSpec(const nsCID & aClass, nsIFile *aLibrarySpec) { return _to UnregisterComponentSpec(aClass, aLibrarySpec); } \ + NS_IMETHOD FreeLibraries(void) { return _to FreeLibraries(); } \ + NS_IMETHOD AutoRegister(PRInt32 when, nsIFile *directory) { return _to AutoRegister(when, directory); } \ + NS_IMETHOD AutoRegisterComponent(PRInt32 when, nsIFile *aFileLocation) { return _to AutoRegisterComponent(when, aFileLocation); } \ + NS_IMETHOD AutoUnregisterComponent(PRInt32 when, nsIFile *aFileLocation) { return _to AutoUnregisterComponent(when, aFileLocation); } \ + NS_IMETHOD IsRegistered(const nsCID & aClass, PRBool *_retval) { return _to IsRegistered(aClass, _retval); } \ + NS_IMETHOD EnumerateCLSIDs(nsIEnumerator **_retval) { return _to EnumerateCLSIDs(_retval); } \ + NS_IMETHOD EnumerateContractIDs(nsIEnumerator **_retval) { return _to EnumerateContractIDs(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICOMPONENTMANAGEROBSOLETE(_to) \ + NS_IMETHOD FindFactory(const nsCID & aClass, nsIFactory **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindFactory(aClass, _retval); } \ + NS_IMETHOD GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetClassObject(aClass, aIID, _retval); } \ + NS_IMETHOD_(nsresult) ContractIDToClassID(const char *aContractID, nsCID *aClass) { return !_to ? NS_ERROR_NULL_POINTER : _to->ContractIDToClassID(aContractID, aClass); } \ + NS_IMETHOD CLSIDToContractID(const nsCID & aClass, char **aClassName, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CLSIDToContractID(aClass, aClassName, _retval); } \ + NS_IMETHOD CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aClass, aDelegate, aIID, _retval); } \ + NS_IMETHOD CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & IID, void * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstanceByContractID(aContractID, aDelegate, IID, _retval); } \ + NS_IMETHOD RegistryLocationForSpec(nsIFile *aSpec, char **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegistryLocationForSpec(aSpec, _retval); } \ + NS_IMETHOD SpecForRegistryLocation(const char *aLocation, nsIFile **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->SpecForRegistryLocation(aLocation, _retval); } \ + NS_IMETHOD RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterFactory(aClass, aClassName, aContractID, aFactory, aReplace); } \ + NS_IMETHOD RegisterComponent(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterComponent(aClass, aClassName, aContractID, aLocation, aReplace, aPersist); } \ + NS_IMETHOD RegisterComponentWithType(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterComponentWithType(aClass, aClassName, aContractID, aSpec, aLocation, aReplace, aPersist, aType); } \ + NS_IMETHOD RegisterComponentSpec(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterComponentSpec(aClass, aClassName, aContractID, aLibrary, aReplace, aPersist); } \ + NS_IMETHOD RegisterComponentLib(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterComponentLib(aClass, aClassName, aContractID, aDllName, aReplace, aPersist); } \ + NS_IMETHOD UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterFactory(aClass, aFactory); } \ + NS_IMETHOD UnregisterComponent(const nsCID & aClass, const char *aLocation) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterComponent(aClass, aLocation); } \ + NS_IMETHOD UnregisterComponentSpec(const nsCID & aClass, nsIFile *aLibrarySpec) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterComponentSpec(aClass, aLibrarySpec); } \ + NS_IMETHOD FreeLibraries(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->FreeLibraries(); } \ + NS_IMETHOD AutoRegister(PRInt32 when, nsIFile *directory) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoRegister(when, directory); } \ + NS_IMETHOD AutoRegisterComponent(PRInt32 when, nsIFile *aFileLocation) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoRegisterComponent(when, aFileLocation); } \ + NS_IMETHOD AutoUnregisterComponent(PRInt32 when, nsIFile *aFileLocation) { return !_to ? NS_ERROR_NULL_POINTER : _to->AutoUnregisterComponent(when, aFileLocation); } \ + NS_IMETHOD IsRegistered(const nsCID & aClass, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsRegistered(aClass, _retval); } \ + NS_IMETHOD EnumerateCLSIDs(nsIEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateCLSIDs(_retval); } \ + NS_IMETHOD EnumerateContractIDs(nsIEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateContractIDs(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsComponentManagerObsolete : public nsIComponentManagerObsolete +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICOMPONENTMANAGEROBSOLETE + + nsComponentManagerObsolete(); + +private: + ~nsComponentManagerObsolete(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsComponentManagerObsolete, nsIComponentManagerObsolete) + +nsComponentManagerObsolete::nsComponentManagerObsolete() +{ + /* member initializers and constructor code */ +} + +nsComponentManagerObsolete::~nsComponentManagerObsolete() +{ + /* destructor code */ +} + +/* nsIFactory findFactory (in nsCIDRef aClass); */ +NS_IMETHODIMP nsComponentManagerObsolete::FindFactory(const nsCID & aClass, nsIFactory **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] voidPtr getClassObject (in nsCIDRef aClass, in nsIIDRef aIID); */ +NS_IMETHODIMP nsComponentManagerObsolete::GetClassObject(const nsCID & aClass, const nsIID & aIID, void * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [notxpcom] nsresult contractIDToClassID (in string aContractID, out nsCID aClass); */ +NS_IMETHODIMP_(nsresult) nsComponentManagerObsolete::ContractIDToClassID(const char *aContractID, nsCID *aClass) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string CLSIDToContractID (in nsCIDRef aClass, out string aClassName); */ +NS_IMETHODIMP nsComponentManagerObsolete::CLSIDToContractID(const nsCID & aClass, char **aClassName, char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] voidPtr createInstance (in nsCIDRef aClass, in nsISupports aDelegate, in nsIIDRef aIID); */ +NS_IMETHODIMP nsComponentManagerObsolete::CreateInstance(const nsCID & aClass, nsISupports *aDelegate, const nsIID & aIID, void * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] voidPtr createInstanceByContractID (in string aContractID, in nsISupports aDelegate, in nsIIDRef IID); */ +NS_IMETHODIMP nsComponentManagerObsolete::CreateInstanceByContractID(const char *aContractID, nsISupports *aDelegate, const nsIID & IID, void * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* string registryLocationForSpec (in nsIFile aSpec); */ +NS_IMETHODIMP nsComponentManagerObsolete::RegistryLocationForSpec(nsIFile *aSpec, char **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIFile specForRegistryLocation (in string aLocation); */ +NS_IMETHODIMP nsComponentManagerObsolete::SpecForRegistryLocation(const char *aLocation, nsIFile **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerFactory (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFactory aFactory, in boolean aReplace); */ +NS_IMETHODIMP nsComponentManagerObsolete::RegisterFactory(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFactory *aFactory, PRBool aReplace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerComponent (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aLocation, in boolean aReplace, in boolean aPersist); */ +NS_IMETHODIMP nsComponentManagerObsolete::RegisterComponent(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aLocation, PRBool aReplace, PRBool aPersist) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerComponentWithType (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aSpec, in string aLocation, in boolean aReplace, in boolean aPersist, in string aType); */ +NS_IMETHODIMP nsComponentManagerObsolete::RegisterComponentWithType(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aSpec, const char *aLocation, PRBool aReplace, PRBool aPersist, const char *aType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerComponentSpec (in nsCIDRef aClass, in string aClassName, in string aContractID, in nsIFile aLibrary, in boolean aReplace, in boolean aPersist); */ +NS_IMETHODIMP nsComponentManagerObsolete::RegisterComponentSpec(const nsCID & aClass, const char *aClassName, const char *aContractID, nsIFile *aLibrary, PRBool aReplace, PRBool aPersist) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerComponentLib (in nsCIDRef aClass, in string aClassName, in string aContractID, in string aDllName, in boolean aReplace, in boolean aPersist); */ +NS_IMETHODIMP nsComponentManagerObsolete::RegisterComponentLib(const nsCID & aClass, const char *aClassName, const char *aContractID, const char *aDllName, PRBool aReplace, PRBool aPersist) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterFactory (in nsCIDRef aClass, in nsIFactory aFactory); */ +NS_IMETHODIMP nsComponentManagerObsolete::UnregisterFactory(const nsCID & aClass, nsIFactory *aFactory) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterComponent (in nsCIDRef aClass, in string aLocation); */ +NS_IMETHODIMP nsComponentManagerObsolete::UnregisterComponent(const nsCID & aClass, const char *aLocation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterComponentSpec (in nsCIDRef aClass, in nsIFile aLibrarySpec); */ +NS_IMETHODIMP nsComponentManagerObsolete::UnregisterComponentSpec(const nsCID & aClass, nsIFile *aLibrarySpec) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void freeLibraries (); */ +NS_IMETHODIMP nsComponentManagerObsolete::FreeLibraries() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void autoRegister (in long when, in nsIFile directory); */ +NS_IMETHODIMP nsComponentManagerObsolete::AutoRegister(PRInt32 when, nsIFile *directory) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void autoRegisterComponent (in long when, in nsIFile aFileLocation); */ +NS_IMETHODIMP nsComponentManagerObsolete::AutoRegisterComponent(PRInt32 when, nsIFile *aFileLocation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void autoUnregisterComponent (in long when, in nsIFile aFileLocation); */ +NS_IMETHODIMP nsComponentManagerObsolete::AutoUnregisterComponent(PRInt32 when, nsIFile *aFileLocation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isRegistered (in nsCIDRef aClass); */ +NS_IMETHODIMP nsComponentManagerObsolete::IsRegistered(const nsCID & aClass, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIEnumerator enumerateCLSIDs (); */ +NS_IMETHODIMP nsComponentManagerObsolete::EnumerateCLSIDs(nsIEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIEnumerator enumerateContractIDs (); */ +NS_IMETHODIMP nsComponentManagerObsolete::EnumerateContractIDs(nsIEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +/* include after the class def'n, because it needs to see it. */ +#include "nsComponentManagerUtils.h" + +#endif /* __gen_nsIComponentManagerObsolete_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsICookieStorage.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsICookieStorage.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsICookieStorage.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsICookieStorage.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,123 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsICookieStorage.idl + */ + +#ifndef __gen_nsICookieStorage_h__ +#define __gen_nsICookieStorage_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nspluginroot_h__ +#include "nspluginroot.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +// {c8c05101-cfdb-11d2-bab8-b088e084e5bc} +#define NS_COOKIESTORAGE_CID \ +{ 0xc8c05101, 0xcfdb, 0x11d2, { 0xba, 0xb8, 0xb0, 0x88, 0xe0, 0x84, 0xe5, 0xbc } } + +/* starting interface: nsICookieStorage */ +#define NS_ICOOKIESTORAGE_IID_STR "c8c05100-cfdb-11d2-bab8-b088e084e5bc" + +#define NS_ICOOKIESTORAGE_IID \ + {0xc8c05100, 0xcfdb, 0x11d2, \ + { 0xba, 0xb8, 0xb0, 0x88, 0xe0, 0x84, 0xe5, 0xbc }} + +/** + * nsICookieStorage + */ +class NS_NO_VTABLE nsICookieStorage : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ICOOKIESTORAGE_IID) + + /** + * Retrieves a cookie from the browser's persistent cookie store. + * @param aCookieURL - URL string to look up cookie with. + * @param aCookieBuffer - buffer large enough to accomodate cookie data. + * @param aCookieSize - on input, size of the cookie buffer, on output cookie's size. + */ + /* void getCookie (in string aCookieURL, in voidPtr aCookieBuffer, in PRUint32Ref aCookieSize); */ + NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) = 0; + + /** + * Stores a cookie in the browser's persistent cookie store. + * @param aCookieURL - URL string store cookie with. + * @param aCookieBuffer - buffer containing cookie data. + * @param aCookieSize - specifies size of cookie data. + */ + /* void setCookie (in string aCookieURL, in constVoidPtr aCookieBuffer, in unsigned long aCookieSize); */ + NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSICOOKIESTORAGE \ + NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize); \ + NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSICOOKIESTORAGE(_to) \ + NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) { return _to GetCookie(aCookieURL, aCookieBuffer, aCookieSize); } \ + NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) { return _to SetCookie(aCookieURL, aCookieBuffer, aCookieSize); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSICOOKIESTORAGE(_to) \ + NS_IMETHOD GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCookie(aCookieURL, aCookieBuffer, aCookieSize); } \ + NS_IMETHOD SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCookie(aCookieURL, aCookieBuffer, aCookieSize); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsCookieStorage : public nsICookieStorage +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSICOOKIESTORAGE + + nsCookieStorage(); + +private: + ~nsCookieStorage(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsCookieStorage, nsICookieStorage) + +nsCookieStorage::nsCookieStorage() +{ + /* member initializers and constructor code */ +} + +nsCookieStorage::~nsCookieStorage() +{ + /* destructor code */ +} + +/* void getCookie (in string aCookieURL, in voidPtr aCookieBuffer, in PRUint32Ref aCookieSize); */ +NS_IMETHODIMP nsCookieStorage::GetCookie(const char *aCookieURL, void * aCookieBuffer, PRUint32 & aCookieSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setCookie (in string aCookieURL, in constVoidPtr aCookieBuffer, in unsigned long aCookieSize); */ +NS_IMETHODIMP nsCookieStorage::SetCookie(const char *aCookieURL, const void * aCookieBuffer, PRUint32 aCookieSize) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsICookieStorage_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsID.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsID.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsID.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsID.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,151 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsID_h__ +#define nsID_h__ + +#include + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +/** + * A "unique identifier". This is modeled after OSF DCE UUIDs. + * @status FROZEN + */ + +struct nsID { + /** + * @name Indentifier values + */ + + //@{ + PRUint32 m0; + PRUint16 m1; + PRUint16 m2; + PRUint8 m3[8]; + //@} + + /** + * @name Methods + */ + + //@{ + /** + * Equivalency method. Compares this nsID with another. + * @return PR_TRUE if they are the same, PR_FALSE if not. + */ + + inline PRBool Equals(const nsID& other) const { + // One would think that this could be done faster with a really + // efficient implementation of memcmp(), but evidently no + // memcmp()'s out there are better than this code. + // + // See bug http://bugzilla.mozilla.org/show_bug.cgi?id=164580 for + // details. + + return (PRBool) + ((((PRUint32*) &m0)[0] == ((PRUint32*) &other.m0)[0]) && + (((PRUint32*) &m0)[1] == ((PRUint32*) &other.m0)[1]) && + (((PRUint32*) &m0)[2] == ((PRUint32*) &other.m0)[2]) && + (((PRUint32*) &m0)[3] == ((PRUint32*) &other.m0)[3])); + } + + /** + * nsID Parsing method. Turns a {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} + * string into an nsID + */ + NS_COM PRBool Parse(const char *aIDStr); + + /** + * nsID string encoder. Returns an allocated string in + * {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} format. Caller should free string. + */ + NS_COM char* ToString() const; + //@} +}; + +/* + * Class IDs + */ + +typedef nsID nsCID; + +// Define an CID +#define NS_DEFINE_CID(_name, _cidspec) \ + const nsCID _name = _cidspec + +#define REFNSCID const nsCID& + +/** + * An "interface id" which can be used to uniquely identify a given + * interface. + */ + +typedef nsID nsIID; + +/** + * A macro shorthand for const nsIID& + */ + +#define REFNSIID const nsIID& + +/** + * Define an IID + * obsolete - do not use this macro + */ + +#define NS_DEFINE_IID(_name, _iidspec) \ + const nsIID _name = _iidspec + +/** + * A macro to build the static const IID accessor method + */ + +#define NS_DEFINE_STATIC_IID_ACCESSOR(the_iid) \ + static const nsIID& GetIID() {static const nsIID iid = the_iid; return iid;} + +/** + * A macro to build the static const CID accessor method + */ + +#define NS_DEFINE_STATIC_CID_ACCESSOR(the_cid) \ + static const nsID& GetCID() {static const nsID cid = the_cid; return cid;} + +#endif + diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIFactory.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIFactory.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIFactory.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIFactory.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,133 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIFactory.idl + */ + +#ifndef __gen_nsIFactory_h__ +#define __gen_nsIFactory_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIFactory */ +#define NS_IFACTORY_IID_STR "00000001-0000-0000-c000-000000000046" + +#define NS_IFACTORY_IID \ + {0x00000001, 0x0000, 0x0000, \ + { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} + +/** + * A class factory allows the creation of nsISupports derived + * components without specifying a concrete base class. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIFactory : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFACTORY_IID) + + /** + * Creates an instance of a component. + * + * @param aOuter Pointer to a component that wishes to be aggregated + * in the resulting instance. This will be nsnull if no + * aggregation is requested. + * @param iid The IID of the interface being requested in + * the component which is being currently created. + * @param result [out] Pointer to the newly created instance, if successful. + * @return NS_OK - Component successfully created and the interface + * being requested was successfully returned in result. + * NS_NOINTERFACE - Interface not accessible. + * NS_ERROR_NO_AGGREGATION - if an 'outer' object is supplied, but the + * component is not aggregatable. + * NS_ERROR* - Method failure. + */ + /* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) = 0; + + /** + * LockFactory provides the client a way to keep the component + * in memory until it is finished with it. The client can call + * LockFactory(PR_TRUE) to lock the factory and LockFactory(PR_FALSE) + * to release the factory. + * + * @param lock - Must be PR_TRUE or PR_FALSE + * @return NS_OK - If the lock operation was successful. + * NS_ERROR* - Method failure. + */ + /* void lockFactory (in PRBool lock); */ + NS_IMETHOD LockFactory(PRBool lock) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIFACTORY \ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result); \ + NS_IMETHOD LockFactory(PRBool lock); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIFACTORY(_to) \ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) { return _to CreateInstance(aOuter, iid, result); } \ + NS_IMETHOD LockFactory(PRBool lock) { return _to LockFactory(lock); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIFACTORY(_to) \ + NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateInstance(aOuter, iid, result); } \ + NS_IMETHOD LockFactory(PRBool lock) { return !_to ? NS_ERROR_NULL_POINTER : _to->LockFactory(lock); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsFactory : public nsIFactory +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIFACTORY + + nsFactory(); + +private: + ~nsFactory(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsFactory, nsIFactory) + +nsFactory::nsFactory() +{ + /* member initializers and constructor code */ +} + +nsFactory::~nsFactory() +{ + /* destructor code */ +} + +/* void createInstance (in nsISupports aOuter, in nsIIDRef iid, [iid_is (iid), retval] out nsQIResult result); */ +NS_IMETHODIMP nsFactory::CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void lockFactory (in PRBool lock); */ +NS_IMETHODIMP nsFactory::LockFactory(PRBool lock) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIFactory_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIInputStream.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIInputStream.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIInputStream.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIInputStream.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,215 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIInputStream.idl + */ + +#ifndef __gen_nsIInputStream_h__ +#define __gen_nsIInputStream_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIInputStream; /* forward declaration */ + +/** + * The signature of the writer function passed to ReadSegments. This + * is the "consumer" of data that gets read from the stream's buffer. + * + * @param aInStream stream being read + * @param aClosure opaque parameter passed to ReadSegments + * @param aFromSegment pointer to memory owned by the input stream + * @param aToOffset amount already read (since ReadSegments was called) + * @param aCount length of fromSegment + * @param aWriteCount number of bytes read + * + * Implementers should return the following: + * + * @return NS_OK and (*aWriteCount > 0) if consumed some data + * @return if not interested in consuming any data + * + * Errors are never passed to the caller of ReadSegments. + * + * NOTE: returning NS_OK and (*aWriteCount = 0) has undefined behavior. + * + * @status FROZEN + */ +typedef NS_CALLBACK(nsWriteSegmentFun)(nsIInputStream *aInStream, + void *aClosure, + const char *aFromSegment, + PRUint32 aToOffset, + PRUint32 aCount, + PRUint32 *aWriteCount); + +/* starting interface: nsIInputStream */ +#define NS_IINPUTSTREAM_IID_STR "fa9c7f6c-61b3-11d4-9877-00c04fa0cf4a" + +#define NS_IINPUTSTREAM_IID \ + {0xfa9c7f6c, 0x61b3, 0x11d4, \ + { 0x98, 0x77, 0x00, 0xc0, 0x4f, 0xa0, 0xcf, 0x4a }} + +class NS_NO_VTABLE nsIInputStream : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IINPUTSTREAM_IID) + + /** + * nsIInputStream + * + * @status FROZEN + */ +/** + * Close the stream. + */ + /* void close (); */ + NS_IMETHOD Close(void) = 0; + + /** + * @return number of bytes currently available in the stream + */ + /* unsigned long available (); */ + NS_IMETHOD Available(PRUint32 *_retval) = 0; + + /** + * Read data from the stream. + * + * @param aBuf the buffer into which the data is to be read + * @param aCount the maximum number of bytes to be read + * + * @return number of bytes read (may be less than aCount). + * @return 0 if reached end of file + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + */ + /* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) = 0; + + /** + * Low-level read method that has access to the stream's underlying buffer. + * The writer function may be called multiple times for segmented buffers. + * ReadSegments is expected to keep calling the writer until either there is + * nothing left to read or the writer returns an error. ReadSegments should + * not call the writer with zero bytes to consume. + * + * @param aWriter the "consumer" of the data to be read + * @param aClosure opaque parameter passed to writer + * @param aCount the maximum number of bytes to be read + * + * @return number of bytes read (may be less than aCount) + * @return 0 if reached end of file (or if aWriter refused to consume data) + * + * @throws NS_BASE_STREAM_WOULD_BLOCK if reading from the input stream would + * block the calling thread (non-blocking mode only) + * @throws on failure + * + * NOTE: this function may be unimplemented if a stream has no underlying + * buffer (e.g., socket input stream). + */ + /* [noscript] unsigned long readSegments (in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); */ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) = 0; + + /** + * @return true if stream is non-blocking + */ + /* boolean isNonBlocking (); */ + NS_IMETHOD IsNonBlocking(PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIINPUTSTREAM \ + NS_IMETHOD Close(void); \ + NS_IMETHOD Available(PRUint32 *_retval); \ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval); \ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval); \ + NS_IMETHOD IsNonBlocking(PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIINPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return _to Close(); } \ + NS_IMETHOD Available(PRUint32 *_retval) { return _to Available(_retval); } \ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) { return _to Read(aBuf, aCount, _retval); } \ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) { return _to ReadSegments(aWriter, aClosure, aCount, _retval); } \ + NS_IMETHOD IsNonBlocking(PRBool *_retval) { return _to IsNonBlocking(_retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIINPUTSTREAM(_to) \ + NS_IMETHOD Close(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Close(); } \ + NS_IMETHOD Available(PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Available(_retval); } \ + NS_IMETHOD Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Read(aBuf, aCount, _retval); } \ + NS_IMETHOD ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadSegments(aWriter, aClosure, aCount, _retval); } \ + NS_IMETHOD IsNonBlocking(PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsNonBlocking(_retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsInputStream : public nsIInputStream +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIINPUTSTREAM + + nsInputStream(); + +private: + ~nsInputStream(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsInputStream, nsIInputStream) + +nsInputStream::nsInputStream() +{ + /* member initializers and constructor code */ +} + +nsInputStream::~nsInputStream() +{ + /* destructor code */ +} + +/* void close (); */ +NS_IMETHODIMP nsInputStream::Close() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* unsigned long available (); */ +NS_IMETHODIMP nsInputStream::Available(PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] unsigned long read (in charPtr aBuf, in unsigned long aCount); */ +NS_IMETHODIMP nsInputStream::Read(char * aBuf, PRUint32 aCount, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] unsigned long readSegments (in nsWriteSegmentFun aWriter, in voidPtr aClosure, in unsigned long aCount); */ +NS_IMETHODIMP nsInputStream::ReadSegments(nsWriteSegmentFun aWriter, void * aClosure, PRUint32 aCount, PRUint32 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isNonBlocking (); */ +NS_IMETHODIMP nsInputStream::IsNonBlocking(PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIInputStream_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMAuthTools.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMAuthTools.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMAuthTools.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMAuthTools.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,220 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIJVMAuthTools.idl + */ + +#ifndef __gen_nsIJVMAuthTools_h__ +#define __gen_nsIJVMAuthTools_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#define NS_JVMAUTHTOOLS_CID \ +{ /* d8e716f9-c96e-4e84-ab12-980f5567e2a4 */ \ + 0xd8e716f9, \ + 0xc96e, \ + 0x4e84, \ + {0xab, 0x12, 0x98, 0x0f, 0x55, 0x67, 0xe2, 0xa4} \ +} + +/* starting interface: nsIAuthenticationInfo */ +#define NS_IAUTHENTICATIONINFO_IID_STR "078a1b99-6be2-4a57-a749-378f4a506097" + +#define NS_IAUTHENTICATIONINFO_IID \ + {0x078a1b99, 0x6be2, 0x4a57, \ + { 0xa7, 0x49, 0x37, 0x8f, 0x4a, 0x50, 0x60, 0x97 }} + +class NS_NO_VTABLE nsIAuthenticationInfo : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IAUTHENTICATIONINFO_IID) + + /** + * AuthenticationInfo (username/password pair) + */ + /* readonly attribute const_char_ptr username; */ + NS_IMETHOD GetUsername(const char * *aUsername) = 0; + + /* readonly attribute const_char_ptr password; */ + NS_IMETHOD GetPassword(const char * *aPassword) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIAUTHENTICATIONINFO \ + NS_IMETHOD GetUsername(const char * *aUsername); \ + NS_IMETHOD GetPassword(const char * *aPassword); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIAUTHENTICATIONINFO(_to) \ + NS_IMETHOD GetUsername(const char * *aUsername) { return _to GetUsername(aUsername); } \ + NS_IMETHOD GetPassword(const char * *aPassword) { return _to GetPassword(aPassword); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIAUTHENTICATIONINFO(_to) \ + NS_IMETHOD GetUsername(const char * *aUsername) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUsername(aUsername); } \ + NS_IMETHOD GetPassword(const char * *aPassword) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPassword(aPassword); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsAuthenticationInfo : public nsIAuthenticationInfo +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIAUTHENTICATIONINFO + + nsAuthenticationInfo(); + +private: + ~nsAuthenticationInfo(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsAuthenticationInfo, nsIAuthenticationInfo) + +nsAuthenticationInfo::nsAuthenticationInfo() +{ + /* member initializers and constructor code */ +} + +nsAuthenticationInfo::~nsAuthenticationInfo() +{ + /* destructor code */ +} + +/* readonly attribute const_char_ptr username; */ +NS_IMETHODIMP nsAuthenticationInfo::GetUsername(const char * *aUsername) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute const_char_ptr password; */ +NS_IMETHODIMP nsAuthenticationInfo::GetPassword(const char * *aPassword) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsIJVMAuthTools */ +#define NS_IJVMAUTHTOOLS_IID_STR "82274a32-a196-42ee-8e3b-fcb73e339518" + +#define NS_IJVMAUTHTOOLS_IID \ + {0x82274a32, 0xa196, 0x42ee, \ + { 0x8e, 0x3b, 0xfc, 0xb7, 0x3e, 0x33, 0x95, 0x18 }} + +class NS_NO_VTABLE nsIJVMAuthTools : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMAUTHTOOLS_IID) + + /** + * Export AuthenticationInfo interface to JPI. + * + * @param protocol the protocol that support (http/https) + * @param host host name + * @param port port number + * @param scheme scheme + * @param realm realm + * @param nsIAuthenticationInfo the AuthenticationInfo interface + * that export + * + * @return NS_OK if success, other if fail + */ + /* nsIAuthenticationInfo GetAuthenticationInfo (in string protocol, in string host, in PRInt32 port, in string scheme, in string realm); */ + NS_IMETHOD GetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, nsIAuthenticationInfo **_retval) = 0; + + /** + * Import username/password pair from JPI. + * + * @param protocol the protocol that support (http/https) + * @param host host name + * @param port port number + * @param scheme scheme + * @param realm realm + * @param username user name + * @param password password + * + * @return NS_OK if success, other if fail + */ + /* void SetAuthenticationInfo (in string protocol, in string host, in PRInt32 port, in string scheme, in string realm, in string username, in string password); */ + NS_IMETHOD SetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, const char *username, const char *password) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIJVMAUTHTOOLS \ + NS_IMETHOD GetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, nsIAuthenticationInfo **_retval); \ + NS_IMETHOD SetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, const char *username, const char *password); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIJVMAUTHTOOLS(_to) \ + NS_IMETHOD GetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, nsIAuthenticationInfo **_retval) { return _to GetAuthenticationInfo(protocol, host, port, scheme, realm, _retval); } \ + NS_IMETHOD SetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, const char *username, const char *password) { return _to SetAuthenticationInfo(protocol, host, port, scheme, realm, username, password); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIJVMAUTHTOOLS(_to) \ + NS_IMETHOD GetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, nsIAuthenticationInfo **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAuthenticationInfo(protocol, host, port, scheme, realm, _retval); } \ + NS_IMETHOD SetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, const char *username, const char *password) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetAuthenticationInfo(protocol, host, port, scheme, realm, username, password); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsJVMAuthTools : public nsIJVMAuthTools +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIJVMAUTHTOOLS + + nsJVMAuthTools(); + +private: + ~nsJVMAuthTools(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsJVMAuthTools, nsIJVMAuthTools) + +nsJVMAuthTools::nsJVMAuthTools() +{ + /* member initializers and constructor code */ +} + +nsJVMAuthTools::~nsJVMAuthTools() +{ + /* destructor code */ +} + +/* nsIAuthenticationInfo GetAuthenticationInfo (in string protocol, in string host, in PRInt32 port, in string scheme, in string realm); */ +NS_IMETHODIMP nsJVMAuthTools::GetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, nsIAuthenticationInfo **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void SetAuthenticationInfo (in string protocol, in string host, in PRInt32 port, in string scheme, in string realm, in string username, in string password); */ +NS_IMETHODIMP nsJVMAuthTools::SetAuthenticationInfo(const char *protocol, const char *host, PRInt32 port, const char *scheme, const char *realm, const char *username, const char *password) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIJVMAuthTools_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMConsole.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMConsole.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMConsole.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMConsole.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,88 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +//////////////////////////////////////////////////////////////////////////////// +// NETSCAPE JAVA VM PLUGIN EXTENSIONS +// +// This interface allows a Java virtual machine to be plugged into +// Communicator to implement the APPLET tag and host applets. +// +// Note that this is the C++ interface that the plugin sees. The browser +// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h. +//////////////////////////////////////////////////////////////////////////////// + +#ifndef nsIJVMConsole_h___ +#define nsIJVMConsole_h___ + +#include "nsIJVMWindow.h" + +#define NS_IJVMCONSOLE_IID \ +{ /* fefaf860-6220-11d2-8164-006008119d7a */ \ + 0xfefaf860, \ + 0x6220, \ + 0x11d2, \ + {0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \ +} + +//////////////////////////////////////////////////////////////////////////////// +// JVM Console Interface +// This interface defines the API the browser needs to show and hide the JVM's +// Java console, and to send text to it. + +class nsIJVMConsole : public nsIJVMWindow { +public: + NS_IMETHOD + Show(void) = 0; + + NS_IMETHOD + Hide(void) = 0; + + NS_IMETHOD + IsVisible(PRBool *result) = 0; + + // Prints a message to the Java console. The encodingName specifies the + // encoding of the message, and if NULL, specifies the default platform + // encoding. + NS_IMETHOD + Print(const char* msg, const char* encodingName = NULL) = 0; + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMCONSOLE_IID) +}; + +//////////////////////////////////////////////////////////////////////////////// + +#endif /* nsIJVMConsole_h___ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMManager.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMManager.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMManager.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMManager.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,203 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIJVMManager.idl + */ + +#ifndef __gen_nsIJVMManager_h__ +#define __gen_nsIJVMManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#ifndef JNI_H +#include "jni.h" +#endif +/* + Java VM Plugin Manager + This interface defines additional entry points that are available + to JVM plugins for browsers that support JVM plugins. +*/ +/* +#define NS_IJVMMANAGER_IID \ +{ / * a1e5ed50-aa4a-11d1-85b2-00805f0e4dfe * / \ + 0xa1e5ed50, \ + 0xaa4a, \ + 0x11d1, \ + {0x85, 0xb2, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \ +} +*/ +#define NS_JVMMANAGER_CID \ +{ /* 38e7ef10-58df-11d2-8164-006008119d7a */ \ + 0x38e7ef10, \ + 0x58df, \ + 0x11d2, \ + {0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \ +} +class nsIJVMPlugin; /* forward declaration */ + +class nsISecureEnv; /* forward declaration */ + +class nsIPrincipal; /* forward declaration */ + + +/* starting interface: nsIJVMManager */ +#define NS_IJVMMANAGER_IID_STR "a1e5ed50-aa4a-11d1-85b2-00805f0e4dfe" + +#define NS_IJVMMANAGER_IID \ + {0xa1e5ed50, 0xaa4a, 0x11d1, \ + { 0x85, 0xb2, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe }} + +class nsIJVMManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMMANAGER_IID) + + // NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMMANAGER_IID) + NS_DEFINE_STATIC_CID_ACCESSOR(NS_JVMMANAGER_CID) + /** + * Creates a proxy JNI with an optional secure environment (which can be NULL). + * There is a one-to-one correspondence between proxy JNIs and threads, so + * calling this method multiple times from the same thread will return + * the same proxy JNI. + */ + /* [noscript] void createProxyJNI (in nsISecureEnv secureEnv, out JNIEnv outProxyEnv); */ + NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) = 0; + + /** + * Returns the proxy JNI associated with the current thread, or NULL if no + * such association exists. + */ + /* [noscript] void getProxyJNI (out JNIEnv outProxyEnv); */ + NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv) = 0; + + /** + * Called from Java Console menu item. + */ + /* void showJavaConsole (); */ + NS_IMETHOD ShowJavaConsole(void) = 0; + + /** + * isAllPermissionGranted [Deprecated Sep-10-2000] + */ + /* boolean isAllPermissionGranted (in string lastFingerprint, in string lastCommonName, in string rootFingerprint, in string rootCommonName); */ + NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) = 0; + + /** + * isAppletTrusted + */ + /* nsIPrincipal isAppletTrusted (in string aRSABuf, in PRUint32 aRSABufLen, in string aPlaintext, in PRUint32 aPlaintextLen, out boolean isTrusted); */ + NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) = 0; + + /** + * The JavaEnabled variable to see if Java is Enabled or not + */ + /* readonly attribute boolean JavaEnabled; */ + NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIJVMMANAGER \ + NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv); \ + NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv); \ + NS_IMETHOD ShowJavaConsole(void); \ + NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval); \ + NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval); \ + NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIJVMMANAGER(_to) \ + NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) { return _to CreateProxyJNI(secureEnv, outProxyEnv); } \ + NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv) { return _to GetProxyJNI(outProxyEnv); } \ + NS_IMETHOD ShowJavaConsole(void) { return _to ShowJavaConsole(); } \ + NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) { return _to IsAllPermissionGranted(lastFingerprint, lastCommonName, rootFingerprint, rootCommonName, _retval); } \ + NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) { return _to IsAppletTrusted(aRSABuf, aRSABufLen, aPlaintext, aPlaintextLen, isTrusted, _retval); } \ + NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled) { return _to GetJavaEnabled(aJavaEnabled); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIJVMMANAGER(_to) \ + NS_IMETHOD CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateProxyJNI(secureEnv, outProxyEnv); } \ + NS_IMETHOD GetProxyJNI(JNIEnv * *outProxyEnv) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetProxyJNI(outProxyEnv); } \ + NS_IMETHOD ShowJavaConsole(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowJavaConsole(); } \ + NS_IMETHOD IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsAllPermissionGranted(lastFingerprint, lastCommonName, rootFingerprint, rootCommonName, _retval); } \ + NS_IMETHOD IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsAppletTrusted(aRSABuf, aRSABufLen, aPlaintext, aPlaintextLen, isTrusted, _retval); } \ + NS_IMETHOD GetJavaEnabled(PRBool *aJavaEnabled) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJavaEnabled(aJavaEnabled); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsJVMManager : public nsIJVMManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIJVMMANAGER + + nsJVMManager(); + +private: + ~nsJVMManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsJVMManager, nsIJVMManager) + +nsJVMManager::nsJVMManager() +{ + /* member initializers and constructor code */ +} + +nsJVMManager::~nsJVMManager() +{ + /* destructor code */ +} + +/* [noscript] void createProxyJNI (in nsISecureEnv secureEnv, out JNIEnv outProxyEnv); */ +NS_IMETHODIMP nsJVMManager::CreateProxyJNI(nsISecureEnv *secureEnv, JNIEnv * *outProxyEnv) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void getProxyJNI (out JNIEnv outProxyEnv); */ +NS_IMETHODIMP nsJVMManager::GetProxyJNI(JNIEnv * *outProxyEnv) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void showJavaConsole (); */ +NS_IMETHODIMP nsJVMManager::ShowJavaConsole() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isAllPermissionGranted (in string lastFingerprint, in string lastCommonName, in string rootFingerprint, in string rootCommonName); */ +NS_IMETHODIMP nsJVMManager::IsAllPermissionGranted(const char *lastFingerprint, const char *lastCommonName, const char *rootFingerprint, const char *rootCommonName, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsIPrincipal isAppletTrusted (in string aRSABuf, in PRUint32 aRSABufLen, in string aPlaintext, in PRUint32 aPlaintextLen, out boolean isTrusted); */ +NS_IMETHODIMP nsJVMManager::IsAppletTrusted(const char *aRSABuf, PRUint32 aRSABufLen, const char *aPlaintext, PRUint32 aPlaintextLen, PRBool *isTrusted, nsIPrincipal **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean JavaEnabled; */ +NS_IMETHODIMP nsJVMManager::GetJavaEnabled(PRBool *aJavaEnabled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIJVMManager_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPlugin.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPlugin.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPlugin.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPlugin.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,120 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +//////////////////////////////////////////////////////////////////////////////// +// NETSCAPE JAVA VM PLUGIN EXTENSIONS +// +// This interface allows a Java virtual machine to be plugged into +// Communicator to implement the APPLET tag and host applets. +// +// Note that this is the C++ interface that the plugin sees. The browser +// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h. +//////////////////////////////////////////////////////////////////////////////// + +#ifndef nsIJVMPlugin_h___ +#define nsIJVMPlugin_h___ + +#include "nsISupports.h" +#include "nsIPrincipal.h" +#include "jni.h" + +class nsISecureEnv; + +/** + * This MIME type is what should be used to signify a Java VM plugin. + */ +#define NS_JVM_MIME_TYPE "application/x-java-vm" // XXX "application/java" ? + + +#define NS_IJVMPLUGIN_IID \ +{ /* da6f3bc0-a1bc-11d1-85b1-00805f0e4dfe */ \ + 0xda6f3bc0, \ + 0xa1bc, \ + 0x11d1, \ + {0x85, 0xb1, 0x00, 0x80, 0x5f, 0x0e, 0x4d, 0xfe} \ +} + +//////////////////////////////////////////////////////////////////////////////// +// Java VM Plugin Interface +// This interface defines additional entry points that a plugin developer needs +// to implement in order to implement a Java virtual machine plugin. + +class nsIJVMPlugin : public nsISupports { +public: + // Causes the JVM to append a new directory to its classpath. + // If the JVM doesn't support this operation, an error is returned. + NS_IMETHOD + AddToClassPath(const char* dirPath) = 0; + + // Causes the JVM to remove a directory from its classpath. + // If the JVM doesn't support this operation, an error is returned. + NS_IMETHOD + RemoveFromClassPath(const char* dirPath) = 0; + + // Returns the current classpath in use by the JVM. + NS_IMETHOD + GetClassPath(const char* *result) = 0; + + NS_IMETHOD + GetJavaWrapper(JNIEnv* jenv, jint obj, jobject *jobj) = 0; + + /** + * This creates a new secure communication channel with Java. The second parameter, + * nativeEnv, if non-NULL, will be the actual thread for Java communication. + * Otherwise, a new thread should be created. + * @param proxyEnv the env to be used by all clients on the browser side + * @return outSecureEnv the secure environment used by the proxyEnv + */ + NS_IMETHOD + CreateSecureEnv(JNIEnv* proxyEnv, nsISecureEnv* *outSecureEnv) = 0; + + /** + * Gives time to the JVM from the main event loop of the browser. This is + * necessary when there aren't any plugin instances around, but Java threads exist. + */ + NS_IMETHOD + SpendTime(PRUint32 timeMillis) = 0; + + NS_IMETHOD + UnwrapJavaWrapper(JNIEnv* jenv, jobject jobj, jint* obj) = 0; + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMPLUGIN_IID) +}; + +//////////////////////////////////////////////////////////////////////////////// + +#endif /* nsIJVMPlugin_h___ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPluginInstance.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPluginInstance.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPluginInstance.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMPluginInstance.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,102 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIJVMPluginInstance.idl + */ + +#ifndef __gen_nsIJVMPluginInstance_h__ +#define __gen_nsIJVMPluginInstance_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "jni.h" + +/* starting interface: nsIJVMPluginInstance */ +#define NS_IJVMPLUGININSTANCE_IID_STR "a0c057d0-01c1-11d2-815b-006008119d7a" + +#define NS_IJVMPLUGININSTANCE_IID \ + {0xa0c057d0, 0x01c1, 0x11d2, \ + { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +class NS_NO_VTABLE nsIJVMPluginInstance : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IJVMPLUGININSTANCE_IID) + + /* [noscript] void GetJavaObject (out jobject result); */ + NS_IMETHOD GetJavaObject(jobject *result) = 0; + + /* [noscript] void GetText (in nChar result); */ + NS_IMETHOD GetText(const char ** result) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIJVMPLUGININSTANCE \ + NS_IMETHOD GetJavaObject(jobject *result); \ + NS_IMETHOD GetText(const char ** result); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIJVMPLUGININSTANCE(_to) \ + NS_IMETHOD GetJavaObject(jobject *result) { return _to GetJavaObject(result); } \ + NS_IMETHOD GetText(const char ** result) { return _to GetText(result); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIJVMPLUGININSTANCE(_to) \ + NS_IMETHOD GetJavaObject(jobject *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJavaObject(result); } \ + NS_IMETHOD GetText(const char ** result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetText(result); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsJVMPluginInstance : public nsIJVMPluginInstance +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIJVMPLUGININSTANCE + + nsJVMPluginInstance(); + +private: + ~nsJVMPluginInstance(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsJVMPluginInstance, nsIJVMPluginInstance) + +nsJVMPluginInstance::nsJVMPluginInstance() +{ + /* member initializers and constructor code */ +} + +nsJVMPluginInstance::~nsJVMPluginInstance() +{ + /* destructor code */ +} + +/* [noscript] void GetJavaObject (out jobject result); */ +NS_IMETHODIMP nsJVMPluginInstance::GetJavaObject(jobject *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void GetText (in nChar result); */ +NS_IMETHODIMP nsJVMPluginInstance::GetText(const char ** result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIJVMPluginInstance_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMWindow.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMWindow.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMWindow.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIJVMWindow.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,86 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +//////////////////////////////////////////////////////////////////////////////// +// NETSCAPE JAVA VM PLUGIN EXTENSIONS +// +// This interface allows a Java virtual machine to be plugged into +// Communicator to implement the APPLET tag and host applets. +// +// Note that this is the C++ interface that the plugin sees. The browser +// uses a specific implementation of this, nsJVMPlugin, found in jvmmgr.h. +//////////////////////////////////////////////////////////////////////////////// + +#ifndef nsIJVMWindow_h___ +#define nsIJVMWindow_h___ + +#include "nsISupports.h" + +//////////////////////////////////////////////////////////////////////////////// +// JVM Preferences Panel Interface +// This interface defines the API the browser needs to show and hide the JVM's +// preference panel. The JVM's preference panel is used by the plugin to display +// Java VM-specific preferences. + +class nsIJVMWindow : public nsISupports { +public: + + // QueryInterface on nsIJVMPlugin to get this. + + NS_IMETHOD + Show(void) = 0; + + NS_IMETHOD + Hide(void) = 0; + + NS_IMETHOD + IsVisible(PRBool *result) = 0; + +}; + +#define NS_IJVMWINDOW_IID \ +{ /* d981b540-6220-11d2-8164-006008119d7a */ \ + 0xd981b540, \ + 0x6220, \ + 0x11d2, \ + {0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \ +} + +//////////////////////////////////////////////////////////////////////////////// + +#endif /* nsIJVMWindow_h___ */ + diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsILiveconnect.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsILiveconnect.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsILiveconnect.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsILiveconnect.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,196 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ +/* + * This file is part of the Java-vendor-neutral implementation of LiveConnect + * + * It contains the public XP-COM based interface for java to javascript communication. + * + */ + +#ifndef nsILiveconnect_h___ +#define nsILiveconnect_h___ + +#include "nsISupports.h" +#include "nsIFactory.h" +#include "jni.h" + +#define NS_ILIVECONNECT_IID \ +{ /* 68190910-3318-11d2-97f0-00805f8a28d0 */ \ + 0x68190910, \ + 0x3318, \ + 0x11d2, \ + {0x97, 0xf0, 0x00, 0x80, 0x5f, 0x8a, 0x28, 0xd0} \ +} + +#define NS_CLIVECONNECT_CID \ +{ /* b8f0cef0-3931-11d2-97f0-00805f8a28d0 */ \ + 0xb8f0cef0, \ + 0x3931, \ + 0x11d2, \ + {0x97, 0xf0, 0x00, 0x80, 0x5f, 0x8a, 0x28, 0xd0} \ +} + +typedef jint jsobject; + +class nsILiveconnect : public nsISupports { +public: + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ILIVECONNECT_IID) + NS_DEFINE_STATIC_CID_ACCESSOR(NS_CLIVECONNECT_CID) + + /** + * get member of a Native JSObject for a given name. + * + * @param obj - A Native JS Object. + * @param name - Name of a member. + * @param pjobj - return parameter as a java object representing + * the member. If it is a basic data type it is converted to + * a corresponding java type. If it is a NJSObject, then it is + * wrapped up as java wrapper netscape.javascript.JSObject. + */ + NS_IMETHOD + GetMember(JNIEnv *jEnv, jsobject jsobj, const jchar *name, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) = 0; + + /** + * get member of a Native JSObject for a given index. + * + * @param obj - A Native JS Object. + * @param slot - Index of a member. + * @param pjobj - return parameter as a java object representing + * the member. + */ + NS_IMETHOD + GetSlot(JNIEnv *jEnv, jsobject jsobj, jint slot, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) = 0; + + /** + * set member of a Native JSObject for a given name. + * + * @param obj - A Native JS Object. + * @param name - Name of a member. + * @param jobj - Value to set. If this is a basic data type, it is converted + * using standard JNI calls but if it is a wrapper to a JSObject + * then a internal mapping is consulted to convert to a NJSObject. + */ + NS_IMETHOD + SetMember(JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, jobject jobj, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports) = 0; + + /** + * set member of a Native JSObject for a given index. + * + * @param obj - A Native JS Object. + * @param index - Index of a member. + * @param jobj - Value to set. If this is a basic data type, it is converted + * using standard JNI calls but if it is a wrapper to a JSObject + * then a internal mapping is consulted to convert to a NJSObject. + */ + NS_IMETHOD + SetSlot(JNIEnv *jEnv, jsobject jsobj, jint slot, jobject jobj, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports) = 0; + + /** + * remove member of a Native JSObject for a given name. + * + * @param obj - A Native JS Object. + * @param name - Name of a member. + */ + NS_IMETHOD + RemoveMember(JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports) = 0; + + /** + * call a method of Native JSObject. + * + * @param obj - A Native JS Object. + * @param name - Name of a method. + * @param jobjArr - Array of jobjects representing parameters of method being caled. + * @param pjobj - return value. + */ + NS_IMETHOD + Call(JNIEnv *jEnv, jsobject jsobj, const jchar* name, jsize length, jobjectArray jobjArr, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) = 0; + + /** + * Evaluate a script with a Native JS Object representing scope. + * + * @param obj - A Native JS Object. + * @param principalsArray - Array of principals to be used to compare privileges. + * @param numPrincipals - Number of principals being passed. + * @param script - Script to be executed. + * @param pjobj - return value. + */ + NS_IMETHOD + Eval(JNIEnv *jEnv, jsobject obj, const jchar *script, jsize length, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jobject *pjobj) = 0; + + /** + * Get the window object for a plugin instance. + * + * @param pJavaObject - Either a jobject or a pointer to a plugin instance + * representing the java object. + * @param pjobj - return value. This is a native js object + * representing the window object of a frame + * in which a applet/bean resides. + */ + NS_IMETHOD + GetWindow(JNIEnv *jEnv, void *pJavaObject, void* principalsArray[], + int numPrincipals, nsISupports *securitySupports, jsobject *pobj) = 0; + + /** + * Get the window object for a plugin instance. + * + * @param jEnv - JNIEnv on which the call is being made. + * @param obj - A Native JS Object. + */ + NS_IMETHOD + FinalizeJSObject(JNIEnv *jEnv, jsobject jsobj) = 0; + + /** + * Get the window object for a plugin instance. + * + * @param jEnv - JNIEnv on which the call is being made. + * @param obj - A Native JS Object. + * @param jstring - Return value as a jstring representing a JS object. + */ + NS_IMETHOD + ToString(JNIEnv *jEnv, jsobject obj, jstring *pjstring) = 0; +}; + +#endif // nsILiveconnect_h___ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserver.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserver.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserver.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserver.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,112 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIObserver.idl + */ + +#ifndef __gen_nsIObserver_h__ +#define __gen_nsIObserver_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIObserver */ +#define NS_IOBSERVER_IID_STR "db242e01-e4d9-11d2-9dde-000064657374" + +#define NS_IOBSERVER_IID \ + {0xdb242e01, 0xe4d9, 0x11d2, \ + { 0x9d, 0xde, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }} + +/** + * This interface is implemented by an object that wants + * to observe an event corresponding to a topic. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIObserver : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IOBSERVER_IID) + + /** + * Observe will be called when there is a notification for the + * topic |aTopic|. This assumes that the object implementing + * this interface has been registered with an observer service + * such as the nsIObserverService. + * + * If you expect multiple topics/subjects, the impl is + * responsible for filtering. + * + * You should not modify, add, remove, or enumerate + * notifications in the implemention of observe. + * + * @param aSubject : Notification specific interface pointer. + * @param aTopic : The notification topic or subject. + * @param aData : Notification specific wide string. + * subject event. + */ + /* void observe (in nsISupports aSubject, in string aTopic, in wstring aData); */ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIOBSERVER \ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIOBSERVER(_to) \ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) { return _to Observe(aSubject, aTopic, aData); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIOBSERVER(_to) \ + NS_IMETHOD Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) { return !_to ? NS_ERROR_NULL_POINTER : _to->Observe(aSubject, aTopic, aData); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsObserver : public nsIObserver +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIOBSERVER + + nsObserver(); + +private: + ~nsObserver(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsObserver, nsIObserver) + +nsObserver::nsObserver() +{ + /* member initializers and constructor code */ +} + +nsObserver::~nsObserver() +{ + /* destructor code */ +} + +/* void observe (in nsISupports aSubject, in string aTopic, in wstring aData); */ +NS_IMETHODIMP nsObserver::Observe(nsISupports *aSubject, const char *aTopic, const PRUnichar *aData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIObserver_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserverService.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserverService.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserverService.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIObserverService.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,179 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIObserverService.idl + */ + +#ifndef __gen_nsIObserverService_h__ +#define __gen_nsIObserverService_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIObserver; /* forward declaration */ + +class nsISimpleEnumerator; /* forward declaration */ + + +/* starting interface: nsIObserverService */ +#define NS_IOBSERVERSERVICE_IID_STR "d07f5192-e3d1-11d2-8acd-00105a1b8860" + +#define NS_IOBSERVERSERVICE_IID \ + {0xd07f5192, 0xe3d1, 0x11d2, \ + { 0x8a, 0xcd, 0x00, 0x10, 0x5a, 0x1b, 0x88, 0x60 }} + +/** + * nsIObserverService + * + * Service allows a client listener (nsIObserver) to register and unregister for + * notifications of specific string referenced topic. Service also provides a + * way to notify registered listeners and a way to enumerate registered client + * listeners. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIObserverService : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IOBSERVERSERVICE_IID) + + /** + * AddObserver + * + * Registers a given listener for a notifications regarding the specified + * topic. + * + * @param anObserve : The interface pointer which will receive notifications. + * @param aTopic : The notification topic or subject. + * @param ownsWeak : If set to false, the nsIObserverService will hold a + * strong reference to |anObserver|. If set to true and + * |anObserver| supports the nsIWeakReference interface, + * a weak reference will be held. Otherwise an error will be + * returned. + */ + /* void addObserver (in nsIObserver anObserver, in string aTopic, in boolean ownsWeak); */ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) = 0; + + /** + * removeObserver + * + * Unregisters a given listener from notifications regarding the specified + * topic. + * + * @param anObserver : The interface pointer which will stop recieving + * notifications. + * @param aTopic : The notification topic or subject. + */ + /* void removeObserver (in nsIObserver anObserver, in string aTopic); */ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic) = 0; + + /** + * notifyObservers + * + * Notifies all registered listeners of the given topic. + * + * @param aSubject : Notification specific interface pointer. + * @param aTopic : The notification topic or subject. + * @param someData : Notification specific wide string. + */ + /* void notifyObservers (in nsISupports aSubject, in string aTopic, in wstring someData); */ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) = 0; + + /** + * enumerateObservers + * + * Returns an enumeration of all registered listeners. + * + * @param aTopic : The notification topic or subject. + */ + /* nsISimpleEnumerator enumerateObservers (in string aTopic); */ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIOBSERVERSERVICE \ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak); \ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic); \ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData); \ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIOBSERVERSERVICE(_to) \ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) { return _to AddObserver(anObserver, aTopic, ownsWeak); } \ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic) { return _to RemoveObserver(anObserver, aTopic); } \ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) { return _to NotifyObservers(aSubject, aTopic, someData); } \ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) { return _to EnumerateObservers(aTopic, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIOBSERVERSERVICE(_to) \ + NS_IMETHOD AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddObserver(anObserver, aTopic, ownsWeak); } \ + NS_IMETHOD RemoveObserver(nsIObserver *anObserver, const char *aTopic) { return !_to ? NS_ERROR_NULL_POINTER : _to->RemoveObserver(anObserver, aTopic); } \ + NS_IMETHOD NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyObservers(aSubject, aTopic, someData); } \ + NS_IMETHOD EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnumerateObservers(aTopic, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsObserverService : public nsIObserverService +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIOBSERVERSERVICE + + nsObserverService(); + +private: + ~nsObserverService(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsObserverService, nsIObserverService) + +nsObserverService::nsObserverService() +{ + /* member initializers and constructor code */ +} + +nsObserverService::~nsObserverService() +{ + /* destructor code */ +} + +/* void addObserver (in nsIObserver anObserver, in string aTopic, in boolean ownsWeak); */ +NS_IMETHODIMP nsObserverService::AddObserver(nsIObserver *anObserver, const char *aTopic, PRBool ownsWeak) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void removeObserver (in nsIObserver anObserver, in string aTopic); */ +NS_IMETHODIMP nsObserverService::RemoveObserver(nsIObserver *anObserver, const char *aTopic) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void notifyObservers (in nsISupports aSubject, in string aTopic, in wstring someData); */ +NS_IMETHODIMP nsObserverService::NotifyObservers(nsISupports *aSubject, const char *aTopic, const PRUnichar *someData) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* nsISimpleEnumerator enumerateObservers (in string aTopic); */ +NS_IMETHODIMP nsObserverService::EnumerateObservers(const char *aTopic, nsISimpleEnumerator **_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIObserverService_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPlugin.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPlugin.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPlugin.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPlugin.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,207 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPlugin.idl + */ + +#ifndef __gen_nsIPlugin_h__ +#define __gen_nsIPlugin_h__ + + +#ifndef __gen_nsIFactory_h__ +#include "nsIFactory.h" +#endif + +#ifndef __gen_nspluginroot_h__ +#include "nspluginroot.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nsplugindefs.h" +// {ffc63200-cf09-11d2-a5a0-bc8f7ad21dfc} +#define NS_PLUGIN_CID \ +{ 0xffc63200, 0xcf09, 0x11d2, { 0xa5, 0xa0, 0xbc, 0x8f, 0x7a, 0xd2, 0x1d, 0xfc } } +// Prefix for ContractID of all plugins +#define NS_INLINE_PLUGIN_CONTRACTID_PREFIX "@mozilla.org/inline-plugin/" + +/* starting interface: nsIPlugin */ +#define NS_IPLUGIN_IID_STR "df773070-0199-11d2-815b-006008119d7a" + +#define NS_IPLUGIN_IID \ + {0xdf773070, 0x0199, 0x11d2, \ + { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +/** + * The nsIPlugin interface is the minimum interface plugin developers need to + * support in order to implement a plugin. The plugin manager may QueryInterface + * for more specific plugin types, e.g. nsILiveConnectPlugin. + * + * The old NPP_New plugin operation is now subsumed by two operations: + * + * CreateInstance -- called once, after the plugin instance is created. This + * method is used to initialize the new plugin instance (although the actual + * plugin instance object will be created by the plugin manager). + * + * nsIPluginInstance::Start -- called when the plugin instance is to be + * started. This happens in two circumstances: (1) after the plugin instance + * is first initialized, and (2) after a plugin instance is returned to + * (e.g. by going back in the window history) after previously being stopped + * by the Stop method. + */ +class NS_NO_VTABLE nsIPlugin : public nsIFactory { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGIN_IID) + + /** + * Creates a new plugin instance, based on a MIME type. This + * allows different impelementations to be created depending on + * the specified MIME type. + */ + /* void createPluginInstance (in nsISupports aOuter, in nsIIDRef aIID, in string aPluginMIMEType, [iid_is (aIID), retval] out nsQIResult aResult); */ + NS_IMETHOD CreatePluginInstance(nsISupports *aOuter, const nsIID & aIID, const char *aPluginMIMEType, void * *aResult) = 0; + + /** + * Initializes the plugin and will be called before any new instances are + * created. It is passed browserInterfaces on which QueryInterface + * may be used to obtain an nsIPluginManager, and other interfaces. + * + * @param browserInterfaces - an object that allows access to other browser + * interfaces via QueryInterface + * @result - NS_OK if this operation was successful + */ + /* void initialize (); */ + NS_IMETHOD Initialize(void) = 0; + + /** + * Called when the browser is done with the plugin factory, or when + * the plugin is disabled by the user. + * + * (Corresponds to NPP_Shutdown.) + * + * @result - NS_OK if this operation was successful + */ + /* void shutdown (); */ + NS_IMETHOD Shutdown(void) = 0; + + /** + * Returns the MIME description for the plugin. The MIME description + * is a colon-separated string containg the plugin MIME type, plugin + * data file extension, and plugin name, e.g.: + * + * "application/x-simple-plugin:smp:Simple LiveConnect Sample Plug-in" + * + * (Corresponds to NPP_GetMIMEDescription.) + * + * @param aMIMEDescription - the resulting MIME description + * @result - NS_OK if this operation was successful + */ + /* void getMIMEDescription (out constCharPtr aMIMEDescription); */ + NS_IMETHOD GetMIMEDescription(const char * *aMIMEDescription) = 0; + + /** + * Returns the value of a variable associated with the plugin. + * + * (Corresponds to NPP_GetValue.) + * + * @param aVariable - the plugin variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + /* void getValue (in nsPluginVariable aVariable, in voidPtr aValue); */ + NS_IMETHOD GetValue(nsPluginVariable aVariable, void * aValue) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGIN \ + NS_IMETHOD CreatePluginInstance(nsISupports *aOuter, const nsIID & aIID, const char *aPluginMIMEType, void * *aResult); \ + NS_IMETHOD Initialize(void); \ + NS_IMETHOD Shutdown(void); \ + NS_IMETHOD GetMIMEDescription(const char * *aMIMEDescription); \ + NS_IMETHOD GetValue(nsPluginVariable aVariable, void * aValue); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGIN(_to) \ + NS_IMETHOD CreatePluginInstance(nsISupports *aOuter, const nsIID & aIID, const char *aPluginMIMEType, void * *aResult) { return _to CreatePluginInstance(aOuter, aIID, aPluginMIMEType, aResult); } \ + NS_IMETHOD Initialize(void) { return _to Initialize(); } \ + NS_IMETHOD Shutdown(void) { return _to Shutdown(); } \ + NS_IMETHOD GetMIMEDescription(const char * *aMIMEDescription) { return _to GetMIMEDescription(aMIMEDescription); } \ + NS_IMETHOD GetValue(nsPluginVariable aVariable, void * aValue) { return _to GetValue(aVariable, aValue); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGIN(_to) \ + NS_IMETHOD CreatePluginInstance(nsISupports *aOuter, const nsIID & aIID, const char *aPluginMIMEType, void * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->CreatePluginInstance(aOuter, aIID, aPluginMIMEType, aResult); } \ + NS_IMETHOD Initialize(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(); } \ + NS_IMETHOD Shutdown(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Shutdown(); } \ + NS_IMETHOD GetMIMEDescription(const char * *aMIMEDescription) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEDescription(aMIMEDescription); } \ + NS_IMETHOD GetValue(nsPluginVariable aVariable, void * aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aVariable, aValue); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPlugin : public nsIPlugin +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGIN + + nsPlugin(); + +private: + ~nsPlugin(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPlugin, nsIPlugin) + +nsPlugin::nsPlugin() +{ + /* member initializers and constructor code */ +} + +nsPlugin::~nsPlugin() +{ + /* destructor code */ +} + +/* void createPluginInstance (in nsISupports aOuter, in nsIIDRef aIID, in string aPluginMIMEType, [iid_is (aIID), retval] out nsQIResult aResult); */ +NS_IMETHODIMP nsPlugin::CreatePluginInstance(nsISupports *aOuter, const nsIID & aIID, const char *aPluginMIMEType, void * *aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void initialize (); */ +NS_IMETHODIMP nsPlugin::Initialize() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void shutdown (); */ +NS_IMETHODIMP nsPlugin::Shutdown() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getMIMEDescription (out constCharPtr aMIMEDescription); */ +NS_IMETHODIMP nsPlugin::GetMIMEDescription(const char * *aMIMEDescription) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getValue (in nsPluginVariable aVariable, in voidPtr aValue); */ +NS_IMETHODIMP nsPlugin::GetValue(nsPluginVariable aVariable, void * aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPlugin_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstance.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstance.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstance.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstance.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,313 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginInstance.idl + */ + +#ifndef __gen_nsIPluginInstance_h__ +#define __gen_nsIPluginInstance_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nsIPluginStreamListener_h__ +#include "nsIPluginStreamListener.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nsplugindefs.h" +class nsIPluginInstancePeer; /* forward declaration */ + + +/* starting interface: nsIPluginInstance */ +#define NS_IPLUGININSTANCE_IID_STR "ebe00f40-0199-11d2-815b-006008119d7a" + +#define NS_IPLUGININSTANCE_IID \ + {0xebe00f40, 0x0199, 0x11d2, \ + { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +/** + * The nsIPluginInstance interface is the minimum interface plugin developers + * need to support in order to implement a plugin instance. The plugin manager + * may QueryInterface for more specific types, e.g. nsILiveConnectPluginInstance. + * + * (Corresponds to NPP object.) + * + * The old NPP_Destroy call has been factored into two plugin instance + * methods: + * + * Stop -- called when the plugin instance is to be stopped (e.g. by + * displaying another plugin manager window, causing the page containing + * the plugin to become removed from the display). + * + * Destroy -- called once, before the plugin instance peer is to be + * destroyed. This method is used to destroy the plugin instance. + */ +class NS_NO_VTABLE nsIPluginInstance : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGININSTANCE_IID) + + /** + * Initializes a newly created plugin instance, passing to it the + * plugin instance peer which it should use for all communication + * back to the browser. + * + * @param aPeer - the corresponding plugin instance peer + * @result - NS_OK if this operation was successful + */ + /* void initialize (in nsIPluginInstancePeer aPeer); */ + NS_IMETHOD Initialize(nsIPluginInstancePeer *aPeer) = 0; + + /** + * Returns a reference back to the plugin instance peer. This method is + * used whenever the browser needs to obtain the peer back from a plugin + * instance. The implementation of this method should be sure to increment + * the reference count on the peer by calling AddRef. + * + * @param aPeer - the resulting plugin instance peer + * @result - NS_OK if this operation was successful + */ + /* readonly attribute nsIPluginInstancePeer peer; */ + NS_IMETHOD GetPeer(nsIPluginInstancePeer * *aPeer) = 0; + + /** + * Called to instruct the plugin instance to start. This will be + * called after the plugin is first created and initialized, and + * may be called after the plugin is stopped (via the Stop method) + * if the plugin instance is returned to in the browser window's + * history. + * + * @result - NS_OK if this operation was successful + */ + /* void start (); */ + NS_IMETHOD Start(void) = 0; + + /** + * Called to instruct the plugin instance to stop, thereby + * suspending its state. This method will be called whenever the + * browser window goes on to display another page and the page + * containing the plugin goes into the window's history list. + * + * @result - NS_OK if this operation was successful + */ + /* void stop (); */ + NS_IMETHOD Stop(void) = 0; + + /** + * Called to instruct the plugin instance to destroy itself. This + * is called when it become no longer possible to return to the + * plugin instance, either because the browser window's history + * list of pages is being trimmed, or because the window + * containing this page in the history is being closed. + * + * @result - NS_OK if this operation was successful + */ + /* void destroy (); */ + NS_IMETHOD Destroy(void) = 0; + + /** + * Called when the window containing the plugin instance changes. + * + * (Corresponds to NPP_SetWindow.) + * + * @param aWindow - the plugin window structure + * @result - NS_OK if this operation was successful + */ + /* void setWindow (in nsPluginWindowPtr aWindow); */ + NS_IMETHOD SetWindow(nsPluginWindow * aWindow) = 0; + + /** + * Called to tell the plugin that the initial src/data stream is + * ready. Expects the plugin to return a nsIPluginStreamListener. + * + * (Corresponds to NPP_NewStream.) + * + * @param aListener - listener the browser will use to give the plugin the data + * @result - NS_OK if this operation was successful + */ + /* void newStream (out nsIPluginStreamListener aListener); */ + NS_IMETHOD NewStream(nsIPluginStreamListener **aListener) = 0; + + /** + * Called to instruct the plugin instance to print itself to a printer. + * + * (Corresponds to NPP_Print.) + * + * @param aPlatformPrint - platform-specific printing information + * @result - NS_OK if this operation was successful + */ + /* void print (in nsPluginPrintPtr aPlatformPrint); */ + NS_IMETHOD Print(nsPluginPrint * aPlatformPrint) = 0; + + /** + * Returns the value of a variable associated with the plugin instance. + * + * @param aVariable - the plugin instance variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + /* void getValue (in nsPluginInstanceVariable aVariable, in voidPtr aValue); */ + NS_IMETHOD GetValue(nsPluginInstanceVariable aVariable, void * aValue) = 0; + + /** + * Handles an event. An nsIEventHandler can also get registered with with + * nsIPluginManager2::RegisterWindow and will be called whenever an event + * comes in for that window. + * + * Note that for Unix and Mac the nsPluginEvent structure is different + * from the old NPEvent structure -- it's no longer the native event + * record, but is instead a struct. This was done for future extensibility, + * and so that the Mac could receive the window argument too. For Windows + * and OS2, it's always been a struct, so there's no change for them. + * + * (Corresponds to NPP_HandleEvent.) + * + * @param aEvent - the event to be handled + * @param aHandled - set to PR_TRUE if event was handled + * @result - NS_OK if this operation was successful + */ + /* void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled); */ + NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGININSTANCE \ + NS_IMETHOD Initialize(nsIPluginInstancePeer *aPeer); \ + NS_IMETHOD GetPeer(nsIPluginInstancePeer * *aPeer); \ + NS_IMETHOD Start(void); \ + NS_IMETHOD Stop(void); \ + NS_IMETHOD Destroy(void); \ + NS_IMETHOD SetWindow(nsPluginWindow * aWindow); \ + NS_IMETHOD NewStream(nsIPluginStreamListener **aListener); \ + NS_IMETHOD Print(nsPluginPrint * aPlatformPrint); \ + NS_IMETHOD GetValue(nsPluginInstanceVariable aVariable, void * aValue); \ + NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGININSTANCE(_to) \ + NS_IMETHOD Initialize(nsIPluginInstancePeer *aPeer) { return _to Initialize(aPeer); } \ + NS_IMETHOD GetPeer(nsIPluginInstancePeer * *aPeer) { return _to GetPeer(aPeer); } \ + NS_IMETHOD Start(void) { return _to Start(); } \ + NS_IMETHOD Stop(void) { return _to Stop(); } \ + NS_IMETHOD Destroy(void) { return _to Destroy(); } \ + NS_IMETHOD SetWindow(nsPluginWindow * aWindow) { return _to SetWindow(aWindow); } \ + NS_IMETHOD NewStream(nsIPluginStreamListener **aListener) { return _to NewStream(aListener); } \ + NS_IMETHOD Print(nsPluginPrint * aPlatformPrint) { return _to Print(aPlatformPrint); } \ + NS_IMETHOD GetValue(nsPluginInstanceVariable aVariable, void * aValue) { return _to GetValue(aVariable, aValue); } \ + NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) { return _to HandleEvent(aEvent, aHandled); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGININSTANCE(_to) \ + NS_IMETHOD Initialize(nsIPluginInstancePeer *aPeer) { return !_to ? NS_ERROR_NULL_POINTER : _to->Initialize(aPeer); } \ + NS_IMETHOD GetPeer(nsIPluginInstancePeer * *aPeer) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPeer(aPeer); } \ + NS_IMETHOD Start(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Start(); } \ + NS_IMETHOD Stop(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Stop(); } \ + NS_IMETHOD Destroy(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Destroy(); } \ + NS_IMETHOD SetWindow(nsPluginWindow * aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindow(aWindow); } \ + NS_IMETHOD NewStream(nsIPluginStreamListener **aListener) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewStream(aListener); } \ + NS_IMETHOD Print(nsPluginPrint * aPlatformPrint) { return !_to ? NS_ERROR_NULL_POINTER : _to->Print(aPlatformPrint); } \ + NS_IMETHOD GetValue(nsPluginInstanceVariable aVariable, void * aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aVariable, aValue); } \ + NS_IMETHOD HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) { return !_to ? NS_ERROR_NULL_POINTER : _to->HandleEvent(aEvent, aHandled); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginInstance : public nsIPluginInstance +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGININSTANCE + + nsPluginInstance(); + +private: + ~nsPluginInstance(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginInstance, nsIPluginInstance) + +nsPluginInstance::nsPluginInstance() +{ + /* member initializers and constructor code */ +} + +nsPluginInstance::~nsPluginInstance() +{ + /* destructor code */ +} + +/* void initialize (in nsIPluginInstancePeer aPeer); */ +NS_IMETHODIMP nsPluginInstance::Initialize(nsIPluginInstancePeer *aPeer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIPluginInstancePeer peer; */ +NS_IMETHODIMP nsPluginInstance::GetPeer(nsIPluginInstancePeer * *aPeer) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void start (); */ +NS_IMETHODIMP nsPluginInstance::Start() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void stop (); */ +NS_IMETHODIMP nsPluginInstance::Stop() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void destroy (); */ +NS_IMETHODIMP nsPluginInstance::Destroy() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setWindow (in nsPluginWindowPtr aWindow); */ +NS_IMETHODIMP nsPluginInstance::SetWindow(nsPluginWindow * aWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void newStream (out nsIPluginStreamListener aListener); */ +NS_IMETHODIMP nsPluginInstance::NewStream(nsIPluginStreamListener **aListener) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void print (in nsPluginPrintPtr aPlatformPrint); */ +NS_IMETHODIMP nsPluginInstance::Print(nsPluginPrint * aPlatformPrint) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getValue (in nsPluginInstanceVariable aVariable, in voidPtr aValue); */ +NS_IMETHODIMP nsPluginInstance::GetValue(nsPluginInstanceVariable aVariable, void * aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void handleEvent (in nsPluginEventPtr aEvent, out boolean aHandled); */ +NS_IMETHODIMP nsPluginInstance::HandleEvent(nsPluginEvent * aEvent, PRBool *aHandled) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginInstance_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,221 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginInstancePeer.idl + */ + +#ifndef __gen_nsIPluginInstancePeer_h__ +#define __gen_nsIPluginInstancePeer_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nspluginroot_h__ +#include "nspluginroot.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nsplugindefs.h" +struct JSObject; +class nsIOutputStream; /* forward declaration */ + + +/* starting interface: nsIPluginInstancePeer */ +#define NS_IPLUGININSTANCEPEER_IID_STR "4b7cea20-019b-11d2-815b-006008119d7a" + +#define NS_IPLUGININSTANCEPEER_IID \ + {0x4b7cea20, 0x019b, 0x11d2, \ + { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +/** + * The nsIPluginInstancePeer interface is the set of operations implemented + * by the browser to support a plugin instance. When a plugin instance is + * constructed, a nsIPluginInstancePeer is passed to its initializer + * representing the instantiation of the plugin on the page. + * + * Other interfaces may be obtained from nsIPluginInstancePeer by calling + * QueryInterface, e.g. nsIPluginTagInfo. + */ +class NS_NO_VTABLE nsIPluginInstancePeer : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGININSTANCEPEER_IID) + + /** + * Returns the value of a variable associated with the plugin manager. + * + * (Corresponds to NPN_GetValue.) + * + * @param aVariable - the plugin manager variable to get + * @param aValue - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + /* void getValue (in nsPluginInstancePeerVariable aVariable, in voidPtr aValue); */ + NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) = 0; + + /** + * Returns the MIME type of the plugin instance. + * + * (Corresponds to NPP_New's MIMEType argument.) + * + * @param aMIMEType - resulting MIME type + * @result - NS_OK if this operation was successful + */ + /* readonly attribute nsMIMEType MIMEType; */ + NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType) = 0; + + /** + * Returns the mode of the plugin instance, i.e. whether the plugin is + * embedded in the html, or full page. + * + * (Corresponds to NPP_New's mode argument.) + * + * @param result - the resulting mode + * @result - NS_OK if this operation was successful + */ + /* readonly attribute nsPluginMode mode; */ + NS_IMETHOD GetMode(nsPluginMode *aMode) = 0; + + /** + * This operation is called by the plugin instance when it wishes to send + * a stream of data to the browser. It constructs a new output stream to which + * the plugin may send the data. When complete, the Close and Release methods + * should be called on the output stream. + * + * (Corresponds to NPN_NewStream.) + * + * @param aType - MIME type of the stream to create + * @param aTarget - the target window name to receive the data + * @param aResult - the resulting output stream + * @result - NS_OK if this operation was successful + */ + /* void newStream (in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); */ + NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) = 0; + + /** + * This operation causes status information to be displayed on the window + * associated with the plugin instance. + * + * (Corresponds to NPN_Status.) + * + * @param aMessage - the status message to display + * @result - NS_OK if this operation was successful + */ + /* void showStatus (in string aMessage); */ + NS_IMETHOD ShowStatus(const char *aMessage) = 0; + + /** + * Set the desired size of the window in which the plugin instance lives. + * + * @param aWidth - new window width + * @param aHeight - new window height + * @result - NS_OK if this operation was successful + */ + /* void setWindowSize (in unsigned long aWidth, in unsigned long aHeight); */ + NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGININSTANCEPEER \ + NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue); \ + NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType); \ + NS_IMETHOD GetMode(nsPluginMode *aMode); \ + NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult); \ + NS_IMETHOD ShowStatus(const char *aMessage); \ + NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGININSTANCEPEER(_to) \ + NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) { return _to GetValue(aVariable, aValue); } \ + NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType) { return _to GetMIMEType(aMIMEType); } \ + NS_IMETHOD GetMode(nsPluginMode *aMode) { return _to GetMode(aMode); } \ + NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) { return _to NewStream(aType, aTarget, aResult); } \ + NS_IMETHOD ShowStatus(const char *aMessage) { return _to ShowStatus(aMessage); } \ + NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) { return _to SetWindowSize(aWidth, aHeight); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGININSTANCEPEER(_to) \ + NS_IMETHOD GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(aVariable, aValue); } \ + NS_IMETHOD GetMIMEType(nsMIMEType *aMIMEType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMIMEType(aMIMEType); } \ + NS_IMETHOD GetMode(nsPluginMode *aMode) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetMode(aMode); } \ + NS_IMETHOD NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->NewStream(aType, aTarget, aResult); } \ + NS_IMETHOD ShowStatus(const char *aMessage) { return !_to ? NS_ERROR_NULL_POINTER : _to->ShowStatus(aMessage); } \ + NS_IMETHOD SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetWindowSize(aWidth, aHeight); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginInstancePeer : public nsIPluginInstancePeer +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGININSTANCEPEER + + nsPluginInstancePeer(); + +private: + ~nsPluginInstancePeer(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginInstancePeer, nsIPluginInstancePeer) + +nsPluginInstancePeer::nsPluginInstancePeer() +{ + /* member initializers and constructor code */ +} + +nsPluginInstancePeer::~nsPluginInstancePeer() +{ + /* destructor code */ +} + +/* void getValue (in nsPluginInstancePeerVariable aVariable, in voidPtr aValue); */ +NS_IMETHODIMP nsPluginInstancePeer::GetValue(nsPluginInstancePeerVariable aVariable, void * aValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsMIMEType MIMEType; */ +NS_IMETHODIMP nsPluginInstancePeer::GetMIMEType(nsMIMEType *aMIMEType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsPluginMode mode; */ +NS_IMETHODIMP nsPluginInstancePeer::GetMode(nsPluginMode *aMode) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void newStream (in nsMIMEType aType, in string aTarget, out nsIOutputStream aResult); */ +NS_IMETHODIMP nsPluginInstancePeer::NewStream(nsMIMEType aType, const char *aTarget, nsIOutputStream **aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void showStatus (in string aMessage); */ +NS_IMETHODIMP nsPluginInstancePeer::ShowStatus(const char *aMessage) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setWindowSize (in unsigned long aWidth, in unsigned long aHeight); */ +NS_IMETHODIMP nsPluginInstancePeer::SetWindowSize(PRUint32 aWidth, PRUint32 aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginInstancePeer_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer2.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer2.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer2.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginInstancePeer2.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,139 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginInstancePeer2.idl + */ + +#ifndef __gen_nsIPluginInstancePeer2_h__ +#define __gen_nsIPluginInstancePeer2_h__ + + +#ifndef __gen_nsIPluginInstancePeer_h__ +#include "nsIPluginInstancePeer.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +struct JSObject; +struct JSContext; + +/* starting interface: nsIPluginInstancePeer2 */ +#define NS_IPLUGININSTANCEPEER2_IID_STR "e7d48c00-e1f1-11d2-8360-fbc8abc4ae7c" + +#define NS_IPLUGININSTANCEPEER2_IID \ + {0xe7d48c00, 0xe1f1, 0x11d2, \ + { 0x83, 0x60, 0xfb, 0xc8, 0xab, 0xc4, 0xae, 0x7c }} + +/** + * The nsIPluginInstancePeer2 interface extends the nsIPluginInstancePeer + * interface, providing access to functionality provided by newer browsers. + * All functionality in nsIPluginInstancePeer can be mapped to the 4.X + * plugin API. + */ +class NS_NO_VTABLE nsIPluginInstancePeer2 : public nsIPluginInstancePeer { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGININSTANCEPEER2_IID) + + /** + * Get the JavaScript window object corresponding to this plugin instance. + * + * @param aJSWindow - the resulting JavaScript window object + * @result - NS_OK if this operation was successful + */ + /* readonly attribute JSObjectPtr JSWindow; */ + NS_IMETHOD GetJSWindow(JSObject * *aJSWindow) = 0; + + /** + * Get the JavaScript execution thread corresponding to this plugin instance. + * + * @param aJSThread - the resulting JavaScript thread id + * @result - NS_OK if this operation was successful + */ + /* readonly attribute unsigned long JSThread; */ + NS_IMETHOD GetJSThread(PRUint32 *aJSThread) = 0; + + /** + * Get the JavaScript context to this plugin instance. + * + * @param aJSContext - the resulting JavaScript context + * @result - NS_OK if this operation was successful + */ + /* readonly attribute JSContextPtr JSContext; */ + NS_IMETHOD GetJSContext(JSContext * *aJSContext) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGININSTANCEPEER2 \ + NS_IMETHOD GetJSWindow(JSObject * *aJSWindow); \ + NS_IMETHOD GetJSThread(PRUint32 *aJSThread); \ + NS_IMETHOD GetJSContext(JSContext * *aJSContext); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGININSTANCEPEER2(_to) \ + NS_IMETHOD GetJSWindow(JSObject * *aJSWindow) { return _to GetJSWindow(aJSWindow); } \ + NS_IMETHOD GetJSThread(PRUint32 *aJSThread) { return _to GetJSThread(aJSThread); } \ + NS_IMETHOD GetJSContext(JSContext * *aJSContext) { return _to GetJSContext(aJSContext); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGININSTANCEPEER2(_to) \ + NS_IMETHOD GetJSWindow(JSObject * *aJSWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSWindow(aJSWindow); } \ + NS_IMETHOD GetJSThread(PRUint32 *aJSThread) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSThread(aJSThread); } \ + NS_IMETHOD GetJSContext(JSContext * *aJSContext) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSContext(aJSContext); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginInstancePeer2 : public nsIPluginInstancePeer2 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGININSTANCEPEER2 + + nsPluginInstancePeer2(); + +private: + ~nsPluginInstancePeer2(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginInstancePeer2, nsIPluginInstancePeer2) + +nsPluginInstancePeer2::nsPluginInstancePeer2() +{ + /* member initializers and constructor code */ +} + +nsPluginInstancePeer2::~nsPluginInstancePeer2() +{ + /* destructor code */ +} + +/* readonly attribute JSObjectPtr JSWindow; */ +NS_IMETHODIMP nsPluginInstancePeer2::GetJSWindow(JSObject * *aJSWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long JSThread; */ +NS_IMETHODIMP nsPluginInstancePeer2::GetJSThread(PRUint32 *aJSThread) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute JSContextPtr JSContext; */ +NS_IMETHODIMP nsPluginInstancePeer2::GetJSContext(JSContext * *aJSContext) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginInstancePeer2_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,295 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginManager.idl + */ + +#ifndef __gen_nsIPluginManager_h__ +#define __gen_nsIPluginManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nspluginroot_h__ +#include "nspluginroot.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nsplugindefs.h" +#define NS_PLUGINMANAGER_CID \ +{ /* ce768990-5a4e-11d2-8164-006008119d7a */ \ + 0xce768990, \ + 0x5a4e, \ + 0x11d2, \ + {0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \ +} +class nsIPluginStreamListener; /* forward declaration */ + + +/* starting interface: nsIPluginManager */ +#define NS_IPLUGINMANAGER_IID_STR "da58ad80-4eb6-11d2-8164-006008119d7a" + +#define NS_IPLUGINMANAGER_IID \ + {0xda58ad80, 0x4eb6, 0x11d2, \ + { 0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +class nsIPluginManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINMANAGER_IID) + + /** + * Returns the value of a variable associated with the plugin manager. + * + * (Corresponds to NPN_GetValue.) + * + * @param variable - the plugin manager variable to get + * @param value - the address of where to store the resulting value + * @result - NS_OK if this operation was successful + */ + /* [noscript] void GetValue (in nsPluginManagerVariable variable, in nativeVoid value); */ + NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value) = 0; + + /** + * Causes the plugins directory to be searched again for new plugin + * libraries. + * + * (Corresponds to NPN_ReloadPlugins.) + * + * @param reloadPages - indicates whether currently visible pages should + * also be reloaded + */ + /* void reloadPlugins (in boolean reloadPages); */ + NS_IMETHOD ReloadPlugins(PRBool reloadPages) = 0; + + /** + * Returns the user agent string for the browser. + * + * (Corresponds to NPN_UserAgent.) + * + * @param resultingAgentString - the resulting user agent string + */ + /* [noscript] void UserAgent (in nativeChar resultingAgentString); */ + NS_IMETHOD UserAgent(const char * * resultingAgentString) = 0; + + NS_IMETHOD + GetURL(nsISupports* pluginInst, + const char* url, + const char* target = NULL, + nsIPluginStreamListener* streamListener = NULL, + const char* altHost = NULL, + const char* referrer = NULL, + PRBool forceJSEnabled = PR_FALSE) = 0; + NS_IMETHOD + PostURL(nsISupports* pluginInst, + const char* url, + PRUint32 postDataLen, + const char* postData, + PRBool isFile = PR_FALSE, + const char* target = NULL, + nsIPluginStreamListener* streamListener = NULL, + const char* altHost = NULL, + const char* referrer = NULL, + PRBool forceJSEnabled = PR_FALSE, + PRUint32 postHeadersLength = 0, + const char* postHeaders = NULL) = 0; + /** + * Fetches a URL. + * + * (Corresponds to NPN_GetURL and NPN_GetURLNotify.) + * + * @param pluginInst - the plugin making the request. If NULL, the URL + * is fetched in the background. + * @param url - the URL to fetch + * @param target - the target window into which to load the URL, or NULL if + * the data should be returned to the plugin via streamListener. + * @param streamListener - a stream listener to be used to return data to + * the plugin. May be NULL if target is not NULL. + * @param altHost - an IP-address string that will be used instead of the + * host specified in the URL. This is used to prevent DNS-spoofing + * attacks. Can be defaulted to NULL meaning use the host in the URL. + * @param referrer - the referring URL (may be NULL) + * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:' + * URLs, even if the user currently has JavaScript disabled (usually + * specify PR_FALSE) + * @result - NS_OK if this operation was successful + */ +/** + * Posts to a URL with post data and/or post headers. + * + * (Corresponds to NPN_PostURL and NPN_PostURLNotify.) + * + * @param pluginInst - the plugin making the request. If NULL, the URL + * is fetched in the background. + * @param url - the URL to fetch + * @param postDataLength - the length of postData (if non-NULL) + * @param postData - the data to POST. NULL specifies that there is not post + * data + * @param isFile - whether the postData specifies the name of a file to + * post instead of data. The file will be deleted afterwards. + * @param target - the target window into which to load the URL, or NULL if + * the data should be returned to the plugin via streamListener. + * @param streamListener - a stream listener to be used to return data to + * the plugin. May be NULL if target is not NULL. + * @param altHost - an IP-address string that will be used instead of the + * host specified in the URL. This is used to prevent DNS-spoofing + * attacks. Can be defaulted to NULL meaning use the host in the URL. + * @param referrer - the referring URL (may be NULL) + * @param forceJSEnabled - forces JavaScript to be enabled for 'javascript:' + * URLs, even if the user currently has JavaScript disabled (usually + * specify PR_FALSE) + * @param postHeadersLength - the length of postHeaders (if non-NULL) + * @param postHeaders - the headers to POST. Must be in the form of + * "HeaderName: HeaderValue\r\n". Each header, including the last, + * must be followed by "\r\n". NULL specifies that there are no + * post headers + * @result - NS_OK if this operation was successful + */ +/** + * Persistently register a plugin with the plugin + * manager. aMimeTypes, aMimeDescriptions, and aFileExtensions are + * parallel arrays that contain information about the MIME types + * that the plugin supports. + * + * @param aCID - the plugin's CID + * @param aPluginName - the plugin's name + * @param aDescription - a description of the plugin + * @param aMimeTypes - an array of MIME types that the plugin + * is prepared to handle + * @param aMimeDescriptions - an array of descriptions for the + * MIME types that the plugin can handle. + * @param aFileExtensions - an array of file extensions for + * the MIME types that the plugin can handle. + * @param aCount - the number of elements in the aMimeTypes, + * aMimeDescriptions, and aFileExtensions arrays. + * @result - NS_OK if the operation was successful. + */ + /* [noscript] void RegisterPlugin (in REFNSIID aCID, in string aPluginName, in string aDescription, in nativeChar aMimeTypes, in nativeChar aMimeDescriptions, in nativeChar aFileExtensions, in long aCount); */ + NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) = 0; + + /** + * Unregister a plugin from the plugin manager + * + * @param aCID the CID of the plugin to unregister. + * @result - NS_OK if the operation was successful. + */ + /* [noscript] void UnregisterPlugin (in REFNSIID aCID); */ + NS_IMETHOD UnregisterPlugin(REFNSIID aCID) = 0; + + /** + * Fetches a URL, with Headers + * @see GetURL. Identical except for additional params headers and + * headersLen + * @param getHeadersLength - the length of getHeaders (if non-NULL) + * @param getHeaders - the headers to GET. Must be in the form of + * "HeaderName: HeaderValue\r\n". Each header, including the last, + * must be followed by "\r\n". NULL specifies that there are no + * get headers + * @result - NS_OK if this operation was successful + */ + NS_IMETHOD + GetURLWithHeaders(nsISupports* pluginInst, + const char* url, + const char* target = NULL, + nsIPluginStreamListener* streamListener = NULL, + const char* altHost = NULL, + const char* referrer = NULL, + PRBool forceJSEnabled = PR_FALSE, + PRUint32 getHeadersLength = 0, + const char* getHeaders = NULL) = 0; +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGINMANAGER \ + NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value); \ + NS_IMETHOD ReloadPlugins(PRBool reloadPages); \ + NS_IMETHOD UserAgent(const char * * resultingAgentString); \ + NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount); \ + NS_IMETHOD UnregisterPlugin(REFNSIID aCID); \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGINMANAGER(_to) \ + NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value) { return _to GetValue(variable, value); } \ + NS_IMETHOD ReloadPlugins(PRBool reloadPages) { return _to ReloadPlugins(reloadPages); } \ + NS_IMETHOD UserAgent(const char * * resultingAgentString) { return _to UserAgent(resultingAgentString); } \ + NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) { return _to RegisterPlugin(aCID, aPluginName, aDescription, aMimeTypes, aMimeDescriptions, aFileExtensions, aCount); } \ + NS_IMETHOD UnregisterPlugin(REFNSIID aCID) { return _to UnregisterPlugin(aCID); } \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGINMANAGER(_to) \ + NS_IMETHOD GetValue(nsPluginManagerVariable variable, void * value) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetValue(variable, value); } \ + NS_IMETHOD ReloadPlugins(PRBool reloadPages) { return !_to ? NS_ERROR_NULL_POINTER : _to->ReloadPlugins(reloadPages); } \ + NS_IMETHOD UserAgent(const char * * resultingAgentString) { return !_to ? NS_ERROR_NULL_POINTER : _to->UserAgent(resultingAgentString); } \ + NS_IMETHOD RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterPlugin(aCID, aPluginName, aDescription, aMimeTypes, aMimeDescriptions, aFileExtensions, aCount); } \ + NS_IMETHOD UnregisterPlugin(REFNSIID aCID) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterPlugin(aCID); } \ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginManager : public nsIPluginManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGINMANAGER + + nsPluginManager(); + +private: + ~nsPluginManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginManager, nsIPluginManager) + +nsPluginManager::nsPluginManager() +{ + /* member initializers and constructor code */ +} + +nsPluginManager::~nsPluginManager() +{ + /* destructor code */ +} + +/* [noscript] void GetValue (in nsPluginManagerVariable variable, in nativeVoid value); */ +NS_IMETHODIMP nsPluginManager::GetValue(nsPluginManagerVariable variable, void * value) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void reloadPlugins (in boolean reloadPages); */ +NS_IMETHODIMP nsPluginManager::ReloadPlugins(PRBool reloadPages) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void UserAgent (in nativeChar resultingAgentString); */ +NS_IMETHODIMP nsPluginManager::UserAgent(const char * * resultingAgentString) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void RegisterPlugin (in REFNSIID aCID, in string aPluginName, in string aDescription, in nativeChar aMimeTypes, in nativeChar aMimeDescriptions, in nativeChar aFileExtensions, in long aCount); */ +NS_IMETHODIMP nsPluginManager::RegisterPlugin(REFNSIID aCID, const char *aPluginName, const char *aDescription, const char * * aMimeTypes, const char * * aMimeDescriptions, const char * * aFileExtensions, PRInt32 aCount) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript] void UnregisterPlugin (in REFNSIID aCID); */ +NS_IMETHODIMP nsPluginManager::UnregisterPlugin(REFNSIID aCID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginManager_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager2.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager2.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager2.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginManager2.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,284 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginManager2.idl + */ + +#ifndef __gen_nsIPluginManager2_h__ +#define __gen_nsIPluginManager2_h__ + + +#ifndef __gen_nsIPluginManager_h__ +#include "nsIPluginManager.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIPlugin; /* forward declaration */ + +class nsIEventHandler; /* forward declaration */ + + +/* starting interface: nsIPluginManager2 */ +#define NS_IPLUGINMANAGER2_IID_STR "d2962dc0-4eb6-11d2-8164-006008119d7a" + +#define NS_IPLUGINMANAGER2_IID \ + {0xd2962dc0, 0x4eb6, 0x11d2, \ + { 0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +/** + * Plugin Manager 2 Interface + * These extensions to nsIPluginManager are only available in Communicator 5.0. + */ +class NS_NO_VTABLE nsIPluginManager2 : public nsIPluginManager { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINMANAGER2_IID) + + /** + * Puts up a wait cursor. + * + * @result - NS_OK if this operation was successful + */ + /* void beginWaitCursor (); */ + NS_IMETHOD BeginWaitCursor(void) = 0; + + /** + * Restores the previous (non-wait) cursor. + * + * @result - NS_OK if this operation was successful + */ + /* void endWaitCursor (); */ + NS_IMETHOD EndWaitCursor(void) = 0; + + /** + * Returns true if a URL protocol (e.g. "http") is supported. + * + * @param aProtocol - the protocol name + * @param aResult - true if the protocol is supported + * @result - NS_OK if this operation was successful + */ + /* void supportsURLProtocol (in string aProtocol, out boolean aResult); */ + NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) = 0; + + /** + * This method may be called by the plugin to indicate that an error + * has occurred, e.g. that the plugin has failed or is shutting down + * spontaneously. This allows the browser to clean up any plugin-specific + * state. + * + * @param aPlugin - the plugin whose status is changing + * @param aStatus - the error status value + * @result - NS_OK if this operation was successful + */ + /* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */ + NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) = 0; + + /** + * Returns the proxy info for a given URL. The caller is required to + * free the resulting memory with nsIMalloc::Free. The result will be in the + * following format + * + * i) "DIRECT" -- no proxy + * ii) "PROXY xxx.xxx.xxx.xxx" -- use proxy + * iii) "SOCKS xxx.xxx.xxx.xxx" -- use SOCKS + * iv) Mixed. e.g. "PROXY 111.111.111.111;PROXY 112.112.112.112", + * "PROXY 111.111.111.111;SOCKS 112.112.112.112".... + * + * Which proxy/SOCKS to use is determined by the plugin. + */ + /* void findProxyForURL (in string aURL, out string aResult); */ + NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) = 0; + + /** + * Registers a top-level window with the browser. Events received by that + * window will be dispatched to the event handler specified. + * + * @param aHandler - the event handler for the window + * @param aWindow - the platform window reference + * @result - NS_OK if this operation was successful + */ + /* void registerWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */ + NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) = 0; + + /** + * Unregisters a top-level window with the browser. The handler and window pair + * should be the same as that specified to RegisterWindow. + * + * @param aHandler - the event handler for the window + * @param aWindow - the platform window reference + * @result - NS_OK if this operation was successful + */ + /* void unregisterWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */ + NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) = 0; + + /** + * Allocates a new menu ID (for the Mac). + * + * @param aHandler - the event handler for the window + * @param aIsSubmenu - whether this is a sub-menu ID or not + * @param aResult - the resulting menu ID + * @result - NS_OK if this operation was successful + */ + /* void allocateMenuID (in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); */ + NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) = 0; + + /** + * Deallocates a menu ID (for the Mac). + * + * @param aHandler - the event handler for the window + * @param aMenuID - the menu ID + * @result - NS_OK if this operation was successful + */ + /* void deallocateMenuID (in nsIEventHandler aHandler, in short aMenuID); */ + NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) = 0; + + /** + * Indicates whether this event handler has allocated the given menu ID. + * + * @param aHandler - the event handler for the window + * @param aMenuID - the menu ID + * @param aResult - returns PR_TRUE if the menu ID is allocated + * @result - NS_OK if this operation was successful + */ + /* void hasAllocatedMenuID (in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); */ + NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGINMANAGER2 \ + NS_IMETHOD BeginWaitCursor(void); \ + NS_IMETHOD EndWaitCursor(void); \ + NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult); \ + NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus); \ + NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult); \ + NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); \ + NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow); \ + NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult); \ + NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID); \ + NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGINMANAGER2(_to) \ + NS_IMETHOD BeginWaitCursor(void) { return _to BeginWaitCursor(); } \ + NS_IMETHOD EndWaitCursor(void) { return _to EndWaitCursor(); } \ + NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) { return _to SupportsURLProtocol(aProtocol, aResult); } \ + NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return _to NotifyStatusChange(aPlugin, aStatus); } \ + NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) { return _to FindProxyForURL(aURL, aResult); } \ + NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return _to RegisterWindow(aHandler, aWindow); } \ + NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return _to UnregisterWindow(aHandler, aWindow); } \ + NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) { return _to AllocateMenuID(aHandler, aIsSubmenu, aResult); } \ + NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) { return _to DeallocateMenuID(aHandler, aMenuID); } \ + NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) { return _to HasAllocatedMenuID(aHandler, aMenuID, aResult); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGINMANAGER2(_to) \ + NS_IMETHOD BeginWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->BeginWaitCursor(); } \ + NS_IMETHOD EndWaitCursor(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->EndWaitCursor(); } \ + NS_IMETHOD SupportsURLProtocol(const char *aProtocol, PRBool *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->SupportsURLProtocol(aProtocol, aResult); } \ + NS_IMETHOD NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyStatusChange(aPlugin, aStatus); } \ + NS_IMETHOD FindProxyForURL(const char *aURL, char **aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->FindProxyForURL(aURL, aResult); } \ + NS_IMETHOD RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->RegisterWindow(aHandler, aWindow); } \ + NS_IMETHOD UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) { return !_to ? NS_ERROR_NULL_POINTER : _to->UnregisterWindow(aHandler, aWindow); } \ + NS_IMETHOD AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->AllocateMenuID(aHandler, aIsSubmenu, aResult); } \ + NS_IMETHOD DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) { return !_to ? NS_ERROR_NULL_POINTER : _to->DeallocateMenuID(aHandler, aMenuID); } \ + NS_IMETHOD HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->HasAllocatedMenuID(aHandler, aMenuID, aResult); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginManager2 : public nsIPluginManager2 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGINMANAGER2 + + nsPluginManager2(); + +private: + ~nsPluginManager2(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginManager2, nsIPluginManager2) + +nsPluginManager2::nsPluginManager2() +{ + /* member initializers and constructor code */ +} + +nsPluginManager2::~nsPluginManager2() +{ + /* destructor code */ +} + +/* void beginWaitCursor (); */ +NS_IMETHODIMP nsPluginManager2::BeginWaitCursor() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void endWaitCursor (); */ +NS_IMETHODIMP nsPluginManager2::EndWaitCursor() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void supportsURLProtocol (in string aProtocol, out boolean aResult); */ +NS_IMETHODIMP nsPluginManager2::SupportsURLProtocol(const char *aProtocol, PRBool *aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void notifyStatusChange (in nsIPlugin aPlugin, in nsresult aStatus); */ +NS_IMETHODIMP nsPluginManager2::NotifyStatusChange(nsIPlugin *aPlugin, nsresult aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void findProxyForURL (in string aURL, out string aResult); */ +NS_IMETHODIMP nsPluginManager2::FindProxyForURL(const char *aURL, char **aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void registerWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */ +NS_IMETHODIMP nsPluginManager2::RegisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void unregisterWindow (in nsIEventHandler aHandler, in nsPluginPlatformWindowRef aWindow); */ +NS_IMETHODIMP nsPluginManager2::UnregisterWindow(nsIEventHandler *aHandler, nsPluginPlatformWindowRef aWindow) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void allocateMenuID (in nsIEventHandler aHandler, in boolean aIsSubmenu, out short aResult); */ +NS_IMETHODIMP nsPluginManager2::AllocateMenuID(nsIEventHandler *aHandler, PRBool aIsSubmenu, PRInt16 *aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void deallocateMenuID (in nsIEventHandler aHandler, in short aMenuID); */ +NS_IMETHODIMP nsPluginManager2::DeallocateMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void hasAllocatedMenuID (in nsIEventHandler aHandler, in short aMenuID, out boolean aResult); */ +NS_IMETHODIMP nsPluginManager2::HasAllocatedMenuID(nsIEventHandler *aHandler, PRInt16 aMenuID, PRBool *aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginManager2_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamInfo.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamInfo.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamInfo.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamInfo.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,174 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginStreamInfo.idl + */ + +#ifndef __gen_nsIPluginStreamInfo_h__ +#define __gen_nsIPluginStreamInfo_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nspluginroot_h__ +#include "nspluginroot.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nsplugindefs.h" + +/* starting interface: nsIPluginStreamInfo */ +#define NS_IPLUGINSTREAMINFO_IID_STR "ed7d4ca0-b005-11d2-adaa-00805f6dec49" + +#define NS_IPLUGINSTREAMINFO_IID \ + {0xed7d4ca0, 0xb005, 0x11d2, \ + { 0xad, 0xaa, 0x00, 0x80, 0x5f, 0x6d, 0xec, 0x49 }} + +class NS_NO_VTABLE nsIPluginStreamInfo : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINSTREAMINFO_IID) + + /* readonly attribute nsMIMEType contentType; */ + NS_IMETHOD GetContentType(nsMIMEType *aContentType) = 0; + + /* void isSeekable (out boolean aSeekable); */ + NS_IMETHOD IsSeekable(PRBool *aSeekable) = 0; + + /* readonly attribute unsigned long length; */ + NS_IMETHOD GetLength(PRUint32 *aLength) = 0; + + /* readonly attribute unsigned long lastModified; */ + NS_IMETHOD GetLastModified(PRUint32 *aLastModified) = 0; + + /* void getURL (out constCharPtr aURL); */ + NS_IMETHOD GetURL(const char * *aURL) = 0; + + /* void requestRead (in nsByteRangePtr aRangeList); */ + NS_IMETHOD RequestRead(nsByteRange * aRangeList) = 0; + + /* attribute long streamOffset; */ + NS_IMETHOD GetStreamOffset(PRInt32 *aStreamOffset) = 0; + NS_IMETHOD SetStreamOffset(PRInt32 aStreamOffset) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGINSTREAMINFO \ + NS_IMETHOD GetContentType(nsMIMEType *aContentType); \ + NS_IMETHOD IsSeekable(PRBool *aSeekable); \ + NS_IMETHOD GetLength(PRUint32 *aLength); \ + NS_IMETHOD GetLastModified(PRUint32 *aLastModified); \ + NS_IMETHOD GetURL(const char * *aURL); \ + NS_IMETHOD RequestRead(nsByteRange * aRangeList); \ + NS_IMETHOD GetStreamOffset(PRInt32 *aStreamOffset); \ + NS_IMETHOD SetStreamOffset(PRInt32 aStreamOffset); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGINSTREAMINFO(_to) \ + NS_IMETHOD GetContentType(nsMIMEType *aContentType) { return _to GetContentType(aContentType); } \ + NS_IMETHOD IsSeekable(PRBool *aSeekable) { return _to IsSeekable(aSeekable); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return _to GetLength(aLength); } \ + NS_IMETHOD GetLastModified(PRUint32 *aLastModified) { return _to GetLastModified(aLastModified); } \ + NS_IMETHOD GetURL(const char * *aURL) { return _to GetURL(aURL); } \ + NS_IMETHOD RequestRead(nsByteRange * aRangeList) { return _to RequestRead(aRangeList); } \ + NS_IMETHOD GetStreamOffset(PRInt32 *aStreamOffset) { return _to GetStreamOffset(aStreamOffset); } \ + NS_IMETHOD SetStreamOffset(PRInt32 aStreamOffset) { return _to SetStreamOffset(aStreamOffset); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGINSTREAMINFO(_to) \ + NS_IMETHOD GetContentType(nsMIMEType *aContentType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetContentType(aContentType); } \ + NS_IMETHOD IsSeekable(PRBool *aSeekable) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsSeekable(aSeekable); } \ + NS_IMETHOD GetLength(PRUint32 *aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLength(aLength); } \ + NS_IMETHOD GetLastModified(PRUint32 *aLastModified) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetLastModified(aLastModified); } \ + NS_IMETHOD GetURL(const char * *aURL) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURL(aURL); } \ + NS_IMETHOD RequestRead(nsByteRange * aRangeList) { return !_to ? NS_ERROR_NULL_POINTER : _to->RequestRead(aRangeList); } \ + NS_IMETHOD GetStreamOffset(PRInt32 *aStreamOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStreamOffset(aStreamOffset); } \ + NS_IMETHOD SetStreamOffset(PRInt32 aStreamOffset) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetStreamOffset(aStreamOffset); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginStreamInfo : public nsIPluginStreamInfo +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGINSTREAMINFO + + nsPluginStreamInfo(); + +private: + ~nsPluginStreamInfo(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginStreamInfo, nsIPluginStreamInfo) + +nsPluginStreamInfo::nsPluginStreamInfo() +{ + /* member initializers and constructor code */ +} + +nsPluginStreamInfo::~nsPluginStreamInfo() +{ + /* destructor code */ +} + +/* readonly attribute nsMIMEType contentType; */ +NS_IMETHODIMP nsPluginStreamInfo::GetContentType(nsMIMEType *aContentType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void isSeekable (out boolean aSeekable); */ +NS_IMETHODIMP nsPluginStreamInfo::IsSeekable(PRBool *aSeekable) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long length; */ +NS_IMETHODIMP nsPluginStreamInfo::GetLength(PRUint32 *aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long lastModified; */ +NS_IMETHODIMP nsPluginStreamInfo::GetLastModified(PRUint32 *aLastModified) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getURL (out constCharPtr aURL); */ +NS_IMETHODIMP nsPluginStreamInfo::GetURL(const char * *aURL) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void requestRead (in nsByteRangePtr aRangeList); */ +NS_IMETHODIMP nsPluginStreamInfo::RequestRead(nsByteRange * aRangeList) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute long streamOffset; */ +NS_IMETHODIMP nsPluginStreamInfo::GetStreamOffset(PRInt32 *aStreamOffset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsPluginStreamInfo::SetStreamOffset(PRInt32 aStreamOffset) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginStreamInfo_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamListener.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamListener.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamListener.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginStreamListener.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,198 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginStreamListener.idl + */ + +#ifndef __gen_nsIPluginStreamListener_h__ +#define __gen_nsIPluginStreamListener_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nspluginroot_h__ +#include "nspluginroot.h" +#endif + +#ifndef __gen_nsIPluginStreamInfo_h__ +#include "nsIPluginStreamInfo.h" +#endif + +#ifndef __gen_nsIInputStream_h__ +#include "nsIInputStream.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nsplugindefs.h" + +/* starting interface: nsIPluginStreamListener */ +#define NS_IPLUGINSTREAMLISTENER_IID_STR "df055770-5448-11d2-8164-006008119d7a" + +#define NS_IPLUGINSTREAMLISTENER_IID \ + {0xdf055770, 0x5448, 0x11d2, \ + { 0x81, 0x64, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +/** + * The nsIPluginStreamListener interface defines the minimum set of functionality that + * the browser will support if it allows plugins. Plugins can call QueryInterface + * to determine if a plugin manager implements more specific APIs or other + * browser interfaces for the plugin to use (e.g. nsINetworkManager). + */ +class NS_NO_VTABLE nsIPluginStreamListener : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINSTREAMLISTENER_IID) + + /** + * Notify the observer that the URL has started to load. This method is + * called only once, at the beginning of a URL load.

+ * + * @param aPluginInfo - plugin stream info + * @return - the return value is currently ignored, in the future + * it may be used to cancel the URL load.. + */ + /* void onStartBinding (in nsIPluginStreamInfo aPluginInfo); */ + NS_IMETHOD OnStartBinding(nsIPluginStreamInfo *aPluginInfo) = 0; + + /** + * Notify the client that data is available in the input stream. This + * method is called whenver data is written into the input stream by the + * networking library...

+ * + * @param aPluginInfo - plugin stream info + * @param aInputStream - the input stream containing the data. This stream can + * be either a blocking or non-blocking stream. + * @param aLength - the amount of data that was just pushed into the stream. + * @return - the return value is currently ignored. + */ + /* void onDataAvailable (in nsIPluginStreamInfo aPluginInfo, in nsIInputStream aInputStream, in unsigned long aLength); */ + NS_IMETHOD OnDataAvailable(nsIPluginStreamInfo *aPluginInfo, nsIInputStream *aInputStream, PRUint32 aLength) = 0; + + /** + * Notify the client that data is available in the file. + * + * @param aPluginInfo - plugin stream info + * @param aFileName - the name of the file containing the data + * @return - the return value is currently ignored. + */ + /* void onFileAvailable (in nsIPluginStreamInfo aPluginInfo, in string aFileName); */ + NS_IMETHOD OnFileAvailable(nsIPluginStreamInfo *aPluginInfo, const char *aFileName) = 0; + + /** + * Notify the observer that the URL has finished loading. This method is + * called once when the networking library has finished processing the + * URL transaction initiatied via the nsINetService::Open(...) call.

+ * + * This method is called regardless of whether the URL loaded successfully.

+ * + * @param aPluginInfo - plugin stream info + * @param aStatus - reason why the stream has been terminated + * @return - the return value is currently ignored. + */ + /* void onStopBinding (in nsIPluginStreamInfo aPluginInfo, in nsresult aStatus); */ + NS_IMETHOD OnStopBinding(nsIPluginStreamInfo *aPluginInfo, nsresult aStatus) = 0; + + /** + * Gets the type of the stream + * + * @param aStreamType - the type of the stream + */ + /* readonly attribute nsPluginStreamType streamType; */ + NS_IMETHOD GetStreamType(nsPluginStreamType *aStreamType) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGINSTREAMLISTENER \ + NS_IMETHOD OnStartBinding(nsIPluginStreamInfo *aPluginInfo); \ + NS_IMETHOD OnDataAvailable(nsIPluginStreamInfo *aPluginInfo, nsIInputStream *aInputStream, PRUint32 aLength); \ + NS_IMETHOD OnFileAvailable(nsIPluginStreamInfo *aPluginInfo, const char *aFileName); \ + NS_IMETHOD OnStopBinding(nsIPluginStreamInfo *aPluginInfo, nsresult aStatus); \ + NS_IMETHOD GetStreamType(nsPluginStreamType *aStreamType); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGINSTREAMLISTENER(_to) \ + NS_IMETHOD OnStartBinding(nsIPluginStreamInfo *aPluginInfo) { return _to OnStartBinding(aPluginInfo); } \ + NS_IMETHOD OnDataAvailable(nsIPluginStreamInfo *aPluginInfo, nsIInputStream *aInputStream, PRUint32 aLength) { return _to OnDataAvailable(aPluginInfo, aInputStream, aLength); } \ + NS_IMETHOD OnFileAvailable(nsIPluginStreamInfo *aPluginInfo, const char *aFileName) { return _to OnFileAvailable(aPluginInfo, aFileName); } \ + NS_IMETHOD OnStopBinding(nsIPluginStreamInfo *aPluginInfo, nsresult aStatus) { return _to OnStopBinding(aPluginInfo, aStatus); } \ + NS_IMETHOD GetStreamType(nsPluginStreamType *aStreamType) { return _to GetStreamType(aStreamType); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGINSTREAMLISTENER(_to) \ + NS_IMETHOD OnStartBinding(nsIPluginStreamInfo *aPluginInfo) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStartBinding(aPluginInfo); } \ + NS_IMETHOD OnDataAvailable(nsIPluginStreamInfo *aPluginInfo, nsIInputStream *aInputStream, PRUint32 aLength) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnDataAvailable(aPluginInfo, aInputStream, aLength); } \ + NS_IMETHOD OnFileAvailable(nsIPluginStreamInfo *aPluginInfo, const char *aFileName) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnFileAvailable(aPluginInfo, aFileName); } \ + NS_IMETHOD OnStopBinding(nsIPluginStreamInfo *aPluginInfo, nsresult aStatus) { return !_to ? NS_ERROR_NULL_POINTER : _to->OnStopBinding(aPluginInfo, aStatus); } \ + NS_IMETHOD GetStreamType(nsPluginStreamType *aStreamType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetStreamType(aStreamType); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginStreamListener : public nsIPluginStreamListener +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGINSTREAMLISTENER + + nsPluginStreamListener(); + +private: + ~nsPluginStreamListener(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginStreamListener, nsIPluginStreamListener) + +nsPluginStreamListener::nsPluginStreamListener() +{ + /* member initializers and constructor code */ +} + +nsPluginStreamListener::~nsPluginStreamListener() +{ + /* destructor code */ +} + +/* void onStartBinding (in nsIPluginStreamInfo aPluginInfo); */ +NS_IMETHODIMP nsPluginStreamListener::OnStartBinding(nsIPluginStreamInfo *aPluginInfo) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onDataAvailable (in nsIPluginStreamInfo aPluginInfo, in nsIInputStream aInputStream, in unsigned long aLength); */ +NS_IMETHODIMP nsPluginStreamListener::OnDataAvailable(nsIPluginStreamInfo *aPluginInfo, nsIInputStream *aInputStream, PRUint32 aLength) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onFileAvailable (in nsIPluginStreamInfo aPluginInfo, in string aFileName); */ +NS_IMETHODIMP nsPluginStreamListener::OnFileAvailable(nsIPluginStreamInfo *aPluginInfo, const char *aFileName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void onStopBinding (in nsIPluginStreamInfo aPluginInfo, in nsresult aStatus); */ +NS_IMETHODIMP nsPluginStreamListener::OnStopBinding(nsIPluginStreamInfo *aPluginInfo, nsresult aStatus) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsPluginStreamType streamType; */ +NS_IMETHODIMP nsPluginStreamListener::GetStreamType(nsPluginStreamType *aStreamType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginStreamListener_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,131 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginTagInfo.idl + */ + +#ifndef __gen_nsIPluginTagInfo_h__ +#define __gen_nsIPluginTagInfo_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +#ifndef __gen_nspluginroot_h__ +#include "nspluginroot.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nsplugindefs.h" +class nsIDOMElement; /* forward declaration */ + + +/* starting interface: nsIPluginTagInfo */ +#define NS_IPLUGINTAGINFO_IID_STR "5f1ec1d0-019b-11d2-815b-006008119d7a" + +#define NS_IPLUGINTAGINFO_IID \ + {0x5f1ec1d0, 0x019b, 0x11d2, \ + { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +/** + * Plugin Tag Info Interface + * This interface provides information about the HTML tag on the page. + * Some day this might get superseded by a DOM API. + */ +class NS_NO_VTABLE nsIPluginTagInfo : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINTAGINFO_IID) + + /** + * QueryInterface on nsIPluginInstancePeer to get this. + * + * (Corresponds to NPP_New's argc, argn, and argv arguments.) + * Get a ptr to the paired list of attribute names and values, + * returns the length of the array. + * + * Each name or value is a null-terminated string. + */ + /* void getAttributes (in PRUint16Ref aCount, in constCharStarConstStar aNames, in constCharStarConstStar aValues); */ + NS_IMETHOD GetAttributes(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) = 0; + + /** + * Gets the value for the named attribute. + * + * @param aName - the name of the attribute to find + * @param aResult - the resulting attribute + * @result - NS_OK if this operation was successful, NS_ERROR_FAILURE if + * this operation failed. result is set to NULL if the attribute is not found + * else to the found value. + */ + /* void getAttribute (in string aName, out constCharPtr aResult); */ + NS_IMETHOD GetAttribute(const char *aName, const char * *aResult) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGINTAGINFO \ + NS_IMETHOD GetAttributes(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues); \ + NS_IMETHOD GetAttribute(const char *aName, const char * *aResult); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGINTAGINFO(_to) \ + NS_IMETHOD GetAttributes(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) { return _to GetAttributes(aCount, aNames, aValues); } \ + NS_IMETHOD GetAttribute(const char *aName, const char * *aResult) { return _to GetAttribute(aName, aResult); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGINTAGINFO(_to) \ + NS_IMETHOD GetAttributes(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttributes(aCount, aNames, aValues); } \ + NS_IMETHOD GetAttribute(const char *aName, const char * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAttribute(aName, aResult); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginTagInfo : public nsIPluginTagInfo +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGINTAGINFO + + nsPluginTagInfo(); + +private: + ~nsPluginTagInfo(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginTagInfo, nsIPluginTagInfo) + +nsPluginTagInfo::nsPluginTagInfo() +{ + /* member initializers and constructor code */ +} + +nsPluginTagInfo::~nsPluginTagInfo() +{ + /* destructor code */ +} + +/* void getAttributes (in PRUint16Ref aCount, in constCharStarConstStar aNames, in constCharStarConstStar aValues); */ +NS_IMETHODIMP nsPluginTagInfo::GetAttributes(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getAttribute (in string aName, out constCharPtr aResult); */ +NS_IMETHODIMP nsPluginTagInfo::GetAttribute(const char *aName, const char * *aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginTagInfo_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo2.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo2.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo2.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPluginTagInfo2.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,292 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPluginTagInfo2.idl + */ + +#ifndef __gen_nsIPluginTagInfo2_h__ +#define __gen_nsIPluginTagInfo2_h__ + + +#ifndef __gen_nsIPluginTagInfo_h__ +#include "nsIPluginTagInfo.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +enum nsPluginTagType { + nsPluginTagType_Unknown, + nsPluginTagType_Embed, + nsPluginTagType_Object, + nsPluginTagType_Applet +}; + +/* starting interface: nsIPluginTagInfo2 */ +#define NS_IPLUGINTAGINFO2_IID_STR "6a49c9a0-019b-11d2-815b-006008119d7a" + +#define NS_IPLUGINTAGINFO2_IID \ + {0x6a49c9a0, 0x019b, 0x11d2, \ + { 0x81, 0x5b, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a }} + +class NS_NO_VTABLE nsIPluginTagInfo2 : public nsIPluginTagInfo { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPLUGINTAGINFO2_IID) + + /** + * Get the type of the HTML tag that was used ot instantiate this + * plugin. Currently supported tags are EMBED, OBJECT and APPLET. + */ + /* readonly attribute nsPluginTagType tagType; */ + NS_IMETHOD GetTagType(nsPluginTagType *aTagType) = 0; + + /** + * Get the complete text of the HTML tag that was used to instantiate this plugin. + */ + /* void getTagText (out constCharPtr aTagText); */ + NS_IMETHOD GetTagText(const char * *aTagText) = 0; + + /** + * Get a ptr to the paired list of parameter names and values, + * returns the length of the array. + * + * Each name or value is a null-terminated string. + */ + /* void getParameters (in PRUint16Ref aCount, in constCharStarConstStar aNames, in constCharStarConstStar aValues); */ + NS_IMETHOD GetParameters(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) = 0; + + /** + * Get the value for the named parameter. Returns null + * if the parameter was not set. + * + * @param aName - name of the parameter + * @param aResult - parameter value + * @result - NS_OK if this operation was successful + */ + /* void getParameter (in string aName, out constCharPtr aResult); */ + NS_IMETHOD GetParameter(const char *aName, const char * *aResult) = 0; + + /** + * Get the document base + */ + /* void getDocumentBase (out constCharPtr aDocumentBase); */ + NS_IMETHOD GetDocumentBase(const char * *aDocumentBase) = 0; + + /** + * Return an encoding whose name is specified in: + * http://java.sun.com/products/jdk/1.1/docs/guide/intl/intl.doc.html#25303 + */ + /* void getDocumentEncoding (out constCharPtr aDocumentEncoding); */ + NS_IMETHOD GetDocumentEncoding(const char * *aDocumentEncoding) = 0; + + /** + * Get object alignment + */ + /* void getAlignment (out constCharPtr aElignment); */ + NS_IMETHOD GetAlignment(const char * *aElignment) = 0; + + /** + * Get object width + */ + /* readonly attribute unsigned long width; */ + NS_IMETHOD GetWidth(PRUint32 *aWidth) = 0; + + /** + * Get object height + */ + /* readonly attribute unsigned long height; */ + NS_IMETHOD GetHeight(PRUint32 *aHeight) = 0; + + /** + * Get border vertical space + */ + /* readonly attribute unsigned long borderVertSpace; */ + NS_IMETHOD GetBorderVertSpace(PRUint32 *aBorderVertSpace) = 0; + + /** + * Get border horizontal space + */ + /* readonly attribute unsigned long borderHorizSpace; */ + NS_IMETHOD GetBorderHorizSpace(PRUint32 *aBorderHorizSpace) = 0; + + /** + * Returns a unique id for the current document containing plugin + */ + /* readonly attribute unsigned long uniqueID; */ + NS_IMETHOD GetUniqueID(PRUint32 *aUniqueID) = 0; + + /** + * Returns the DOM element corresponding to the tag which references + * this plugin in the document. + * + * @param aDOMElement - resulting DOM element + * @result - NS_OK if this operation was successful + */ + /* readonly attribute nsIDOMElement DOMElement; */ + NS_IMETHOD GetDOMElement(nsIDOMElement * *aDOMElement) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPLUGINTAGINFO2 \ + NS_IMETHOD GetTagType(nsPluginTagType *aTagType); \ + NS_IMETHOD GetTagText(const char * *aTagText); \ + NS_IMETHOD GetParameters(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues); \ + NS_IMETHOD GetParameter(const char *aName, const char * *aResult); \ + NS_IMETHOD GetDocumentBase(const char * *aDocumentBase); \ + NS_IMETHOD GetDocumentEncoding(const char * *aDocumentEncoding); \ + NS_IMETHOD GetAlignment(const char * *aElignment); \ + NS_IMETHOD GetWidth(PRUint32 *aWidth); \ + NS_IMETHOD GetHeight(PRUint32 *aHeight); \ + NS_IMETHOD GetBorderVertSpace(PRUint32 *aBorderVertSpace); \ + NS_IMETHOD GetBorderHorizSpace(PRUint32 *aBorderHorizSpace); \ + NS_IMETHOD GetUniqueID(PRUint32 *aUniqueID); \ + NS_IMETHOD GetDOMElement(nsIDOMElement * *aDOMElement); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPLUGINTAGINFO2(_to) \ + NS_IMETHOD GetTagType(nsPluginTagType *aTagType) { return _to GetTagType(aTagType); } \ + NS_IMETHOD GetTagText(const char * *aTagText) { return _to GetTagText(aTagText); } \ + NS_IMETHOD GetParameters(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) { return _to GetParameters(aCount, aNames, aValues); } \ + NS_IMETHOD GetParameter(const char *aName, const char * *aResult) { return _to GetParameter(aName, aResult); } \ + NS_IMETHOD GetDocumentBase(const char * *aDocumentBase) { return _to GetDocumentBase(aDocumentBase); } \ + NS_IMETHOD GetDocumentEncoding(const char * *aDocumentEncoding) { return _to GetDocumentEncoding(aDocumentEncoding); } \ + NS_IMETHOD GetAlignment(const char * *aElignment) { return _to GetAlignment(aElignment); } \ + NS_IMETHOD GetWidth(PRUint32 *aWidth) { return _to GetWidth(aWidth); } \ + NS_IMETHOD GetHeight(PRUint32 *aHeight) { return _to GetHeight(aHeight); } \ + NS_IMETHOD GetBorderVertSpace(PRUint32 *aBorderVertSpace) { return _to GetBorderVertSpace(aBorderVertSpace); } \ + NS_IMETHOD GetBorderHorizSpace(PRUint32 *aBorderHorizSpace) { return _to GetBorderHorizSpace(aBorderHorizSpace); } \ + NS_IMETHOD GetUniqueID(PRUint32 *aUniqueID) { return _to GetUniqueID(aUniqueID); } \ + NS_IMETHOD GetDOMElement(nsIDOMElement * *aDOMElement) { return _to GetDOMElement(aDOMElement); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPLUGINTAGINFO2(_to) \ + NS_IMETHOD GetTagType(nsPluginTagType *aTagType) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagType(aTagType); } \ + NS_IMETHOD GetTagText(const char * *aTagText) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetTagText(aTagText); } \ + NS_IMETHOD GetParameters(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParameters(aCount, aNames, aValues); } \ + NS_IMETHOD GetParameter(const char *aName, const char * *aResult) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetParameter(aName, aResult); } \ + NS_IMETHOD GetDocumentBase(const char * *aDocumentBase) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentBase(aDocumentBase); } \ + NS_IMETHOD GetDocumentEncoding(const char * *aDocumentEncoding) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDocumentEncoding(aDocumentEncoding); } \ + NS_IMETHOD GetAlignment(const char * *aElignment) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetAlignment(aElignment); } \ + NS_IMETHOD GetWidth(PRUint32 *aWidth) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWidth(aWidth); } \ + NS_IMETHOD GetHeight(PRUint32 *aHeight) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHeight(aHeight); } \ + NS_IMETHOD GetBorderVertSpace(PRUint32 *aBorderVertSpace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBorderVertSpace(aBorderVertSpace); } \ + NS_IMETHOD GetBorderHorizSpace(PRUint32 *aBorderHorizSpace) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetBorderHorizSpace(aBorderHorizSpace); } \ + NS_IMETHOD GetUniqueID(PRUint32 *aUniqueID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetUniqueID(aUniqueID); } \ + NS_IMETHOD GetDOMElement(nsIDOMElement * *aDOMElement) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDOMElement(aDOMElement); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPluginTagInfo2 : public nsIPluginTagInfo2 +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPLUGINTAGINFO2 + + nsPluginTagInfo2(); + +private: + ~nsPluginTagInfo2(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPluginTagInfo2, nsIPluginTagInfo2) + +nsPluginTagInfo2::nsPluginTagInfo2() +{ + /* member initializers and constructor code */ +} + +nsPluginTagInfo2::~nsPluginTagInfo2() +{ + /* destructor code */ +} + +/* readonly attribute nsPluginTagType tagType; */ +NS_IMETHODIMP nsPluginTagInfo2::GetTagType(nsPluginTagType *aTagType) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getTagText (out constCharPtr aTagText); */ +NS_IMETHODIMP nsPluginTagInfo2::GetTagText(const char * *aTagText) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getParameters (in PRUint16Ref aCount, in constCharStarConstStar aNames, in constCharStarConstStar aValues); */ +NS_IMETHODIMP nsPluginTagInfo2::GetParameters(PRUint16 & aCount, const char* const* & aNames, const char* const* & aValues) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getParameter (in string aName, out constCharPtr aResult); */ +NS_IMETHODIMP nsPluginTagInfo2::GetParameter(const char *aName, const char * *aResult) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getDocumentBase (out constCharPtr aDocumentBase); */ +NS_IMETHODIMP nsPluginTagInfo2::GetDocumentBase(const char * *aDocumentBase) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getDocumentEncoding (out constCharPtr aDocumentEncoding); */ +NS_IMETHODIMP nsPluginTagInfo2::GetDocumentEncoding(const char * *aDocumentEncoding) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getAlignment (out constCharPtr aElignment); */ +NS_IMETHODIMP nsPluginTagInfo2::GetAlignment(const char * *aElignment) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long width; */ +NS_IMETHODIMP nsPluginTagInfo2::GetWidth(PRUint32 *aWidth) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long height; */ +NS_IMETHODIMP nsPluginTagInfo2::GetHeight(PRUint32 *aHeight) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long borderVertSpace; */ +NS_IMETHODIMP nsPluginTagInfo2::GetBorderVertSpace(PRUint32 *aBorderVertSpace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long borderHorizSpace; */ +NS_IMETHODIMP nsPluginTagInfo2::GetBorderHorizSpace(PRUint32 *aBorderHorizSpace) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long uniqueID; */ +NS_IMETHODIMP nsPluginTagInfo2::GetUniqueID(PRUint32 *aUniqueID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIDOMElement DOMElement; */ +NS_IMETHODIMP nsPluginTagInfo2::GetDOMElement(nsIDOMElement * *aDOMElement) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPluginTagInfo2_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPrincipal.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPrincipal.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIPrincipal.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIPrincipal.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,460 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIPrincipal.idl + */ + +#ifndef __gen_nsIPrincipal_h__ +#define __gen_nsIPrincipal_h__ + + +#ifndef __gen_nsISerializable_h__ +#include "nsISerializable.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +struct JSContext; +struct JSPrincipals; +class nsIURI; /* forward declaration */ + + +/* starting interface: nsIPrincipal */ +#define NS_IPRINCIPAL_IID_STR "0575ea96-4561-4dc6-a818-3c4c97c2430d" + +#define NS_IPRINCIPAL_IID \ + {0x0575ea96, 0x4561, 0x4dc6, \ + { 0xa8, 0x18, 0x3c, 0x4c, 0x97, 0xc2, 0x43, 0x0d }} + +class NS_NO_VTABLE nsIPrincipal : public nsISerializable { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPRINCIPAL_IID) + + /** + * Values of capabilities for each principal. Order is + * significant: if an operation is performed on a set + * of capabilities, the minimum is computed. + */ + enum { ENABLE_DENIED = 1 }; + + enum { ENABLE_UNKNOWN = 2 }; + + enum { ENABLE_WITH_USER_PERMISSION = 3 }; + + enum { ENABLE_GRANTED = 4 }; + + /** + * Returns the security preferences associated with this principal. + * prefBranch will be set to the pref branch to which these preferences + * pertain. id is a pseudo-unique identifier, pertaining to either the + * certificateID or the origin. grantedList and deniedList are + * space-separated lists of capabilities which were explicitly granted + * or denied by a pref. + */ + /* void getPreferences (out string prefBranch, out string id, out string grantedList, out string deniedList); */ + NS_IMETHOD GetPreferences(char **prefBranch, char **id, char **grantedList, char **deniedList) = 0; + + /** + * Returns whether the other principal is equivalent to this principal. + * Principals are considered equal if they are the same principal, + * they have the same origin, or have the same certificate ID + */ + /* boolean equals (in nsIPrincipal other); */ + NS_IMETHOD Equals(nsIPrincipal *other, PRBool *_retval) = 0; + + /** + * Returns a hash value for the principal. + */ + /* readonly attribute unsigned long hashValue; */ + NS_IMETHOD GetHashValue(PRUint32 *aHashValue) = 0; + + /** + * Returns the JS equivalent of the principal. + * @see JSPrincipals.h + */ + /* JSPrincipals getJSPrincipals (in JSContext cx); */ + NS_IMETHOD GetJSPrincipals(JSContext * cx, JSPrincipals * *_retval) = 0; + + /** + * The domain security policy of the principal. + */ + /* attribute voidPtr securityPolicy; */ + NS_IMETHOD GetSecurityPolicy(void * *aSecurityPolicy) = 0; + NS_IMETHOD SetSecurityPolicy(void * aSecurityPolicy) = 0; + + /* short canEnableCapability (in string capability); */ + NS_IMETHOD CanEnableCapability(const char *capability, PRInt16 *_retval) = 0; + + /* void setCanEnableCapability (in string capability, in short canEnable); */ + NS_IMETHOD SetCanEnableCapability(const char *capability, PRInt16 canEnable) = 0; + + /* boolean isCapabilityEnabled (in string capability, in voidPtr annotation); */ + NS_IMETHOD IsCapabilityEnabled(const char *capability, void * annotation, PRBool *_retval) = 0; + + /* void enableCapability (in string capability, inout voidPtr annotation); */ + NS_IMETHOD EnableCapability(const char *capability, void * *annotation) = 0; + + /* void revertCapability (in string capability, inout voidPtr annotation); */ + NS_IMETHOD RevertCapability(const char *capability, void * *annotation) = 0; + + /* void disableCapability (in string capability, inout voidPtr annotation); */ + NS_IMETHOD DisableCapability(const char *capability, void * *annotation) = 0; + + /** + * The codebase URI to which this principal pertains. This is + * generally the document URI. + */ + /* readonly attribute nsIURI URI; */ + NS_IMETHOD GetURI(nsIURI * *aURI) = 0; + + /** + * The domain URI to which this principal pertains. + * This is congruent with HTMLDocument.domain, and may be null. + * Setting this has no effect on the URI. + */ + /* attribute nsIURI domain; */ + NS_IMETHOD GetDomain(nsIURI * *aDomain) = 0; + NS_IMETHOD SetDomain(nsIURI * aDomain) = 0; + + /** + * The origin of this principal's domain, if non-null, or its + * codebase URI otherwise. An origin is defined as: + * scheme + host + port. + */ + /* readonly attribute string origin; */ + NS_IMETHOD GetOrigin(char * *aOrigin) = 0; + + /** + * Whether this principal is associated with a certificate. + */ + /* readonly attribute boolean hasCertificate; */ + NS_IMETHOD GetHasCertificate(PRBool *aHasCertificate) = 0; + + /** + * The fingerprint ID of this principal's certificate. + * Throws if there is no certificate associated with this principal. + */ + /* readonly attribute string certificateID; */ + NS_IMETHOD GetCertificateID(char * *aCertificateID) = 0; + + /** + * The common name for the certificate. + * This pertains to the certificate authority organization. + * Throws if there is no certificate associated with this principal. + */ + /* attribute string commonName; */ + NS_IMETHOD GetCommonName(char * *aCommonName) = 0; + NS_IMETHOD SetCommonName(const char * aCommonName) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPRINCIPAL \ + NS_IMETHOD GetPreferences(char **prefBranch, char **id, char **grantedList, char **deniedList); \ + NS_IMETHOD Equals(nsIPrincipal *other, PRBool *_retval); \ + NS_IMETHOD GetHashValue(PRUint32 *aHashValue); \ + NS_IMETHOD GetJSPrincipals(JSContext * cx, JSPrincipals * *_retval); \ + NS_IMETHOD GetSecurityPolicy(void * *aSecurityPolicy); \ + NS_IMETHOD SetSecurityPolicy(void * aSecurityPolicy); \ + NS_IMETHOD CanEnableCapability(const char *capability, PRInt16 *_retval); \ + NS_IMETHOD SetCanEnableCapability(const char *capability, PRInt16 canEnable); \ + NS_IMETHOD IsCapabilityEnabled(const char *capability, void * annotation, PRBool *_retval); \ + NS_IMETHOD EnableCapability(const char *capability, void * *annotation); \ + NS_IMETHOD RevertCapability(const char *capability, void * *annotation); \ + NS_IMETHOD DisableCapability(const char *capability, void * *annotation); \ + NS_IMETHOD GetURI(nsIURI * *aURI); \ + NS_IMETHOD GetDomain(nsIURI * *aDomain); \ + NS_IMETHOD SetDomain(nsIURI * aDomain); \ + NS_IMETHOD GetOrigin(char * *aOrigin); \ + NS_IMETHOD GetHasCertificate(PRBool *aHasCertificate); \ + NS_IMETHOD GetCertificateID(char * *aCertificateID); \ + NS_IMETHOD GetCommonName(char * *aCommonName); \ + NS_IMETHOD SetCommonName(const char * aCommonName); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPRINCIPAL(_to) \ + NS_IMETHOD GetPreferences(char **prefBranch, char **id, char **grantedList, char **deniedList) { return _to GetPreferences(prefBranch, id, grantedList, deniedList); } \ + NS_IMETHOD Equals(nsIPrincipal *other, PRBool *_retval) { return _to Equals(other, _retval); } \ + NS_IMETHOD GetHashValue(PRUint32 *aHashValue) { return _to GetHashValue(aHashValue); } \ + NS_IMETHOD GetJSPrincipals(JSContext * cx, JSPrincipals * *_retval) { return _to GetJSPrincipals(cx, _retval); } \ + NS_IMETHOD GetSecurityPolicy(void * *aSecurityPolicy) { return _to GetSecurityPolicy(aSecurityPolicy); } \ + NS_IMETHOD SetSecurityPolicy(void * aSecurityPolicy) { return _to SetSecurityPolicy(aSecurityPolicy); } \ + NS_IMETHOD CanEnableCapability(const char *capability, PRInt16 *_retval) { return _to CanEnableCapability(capability, _retval); } \ + NS_IMETHOD SetCanEnableCapability(const char *capability, PRInt16 canEnable) { return _to SetCanEnableCapability(capability, canEnable); } \ + NS_IMETHOD IsCapabilityEnabled(const char *capability, void * annotation, PRBool *_retval) { return _to IsCapabilityEnabled(capability, annotation, _retval); } \ + NS_IMETHOD EnableCapability(const char *capability, void * *annotation) { return _to EnableCapability(capability, annotation); } \ + NS_IMETHOD RevertCapability(const char *capability, void * *annotation) { return _to RevertCapability(capability, annotation); } \ + NS_IMETHOD DisableCapability(const char *capability, void * *annotation) { return _to DisableCapability(capability, annotation); } \ + NS_IMETHOD GetURI(nsIURI * *aURI) { return _to GetURI(aURI); } \ + NS_IMETHOD GetDomain(nsIURI * *aDomain) { return _to GetDomain(aDomain); } \ + NS_IMETHOD SetDomain(nsIURI * aDomain) { return _to SetDomain(aDomain); } \ + NS_IMETHOD GetOrigin(char * *aOrigin) { return _to GetOrigin(aOrigin); } \ + NS_IMETHOD GetHasCertificate(PRBool *aHasCertificate) { return _to GetHasCertificate(aHasCertificate); } \ + NS_IMETHOD GetCertificateID(char * *aCertificateID) { return _to GetCertificateID(aCertificateID); } \ + NS_IMETHOD GetCommonName(char * *aCommonName) { return _to GetCommonName(aCommonName); } \ + NS_IMETHOD SetCommonName(const char * aCommonName) { return _to SetCommonName(aCommonName); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPRINCIPAL(_to) \ + NS_IMETHOD GetPreferences(char **prefBranch, char **id, char **grantedList, char **deniedList) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetPreferences(prefBranch, id, grantedList, deniedList); } \ + NS_IMETHOD Equals(nsIPrincipal *other, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Equals(other, _retval); } \ + NS_IMETHOD GetHashValue(PRUint32 *aHashValue) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHashValue(aHashValue); } \ + NS_IMETHOD GetJSPrincipals(JSContext * cx, JSPrincipals * *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSPrincipals(cx, _retval); } \ + NS_IMETHOD GetSecurityPolicy(void * *aSecurityPolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetSecurityPolicy(aSecurityPolicy); } \ + NS_IMETHOD SetSecurityPolicy(void * aSecurityPolicy) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetSecurityPolicy(aSecurityPolicy); } \ + NS_IMETHOD CanEnableCapability(const char *capability, PRInt16 *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->CanEnableCapability(capability, _retval); } \ + NS_IMETHOD SetCanEnableCapability(const char *capability, PRInt16 canEnable) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCanEnableCapability(capability, canEnable); } \ + NS_IMETHOD IsCapabilityEnabled(const char *capability, void * annotation, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsCapabilityEnabled(capability, annotation, _retval); } \ + NS_IMETHOD EnableCapability(const char *capability, void * *annotation) { return !_to ? NS_ERROR_NULL_POINTER : _to->EnableCapability(capability, annotation); } \ + NS_IMETHOD RevertCapability(const char *capability, void * *annotation) { return !_to ? NS_ERROR_NULL_POINTER : _to->RevertCapability(capability, annotation); } \ + NS_IMETHOD DisableCapability(const char *capability, void * *annotation) { return !_to ? NS_ERROR_NULL_POINTER : _to->DisableCapability(capability, annotation); } \ + NS_IMETHOD GetURI(nsIURI * *aURI) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetURI(aURI); } \ + NS_IMETHOD GetDomain(nsIURI * *aDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetDomain(aDomain); } \ + NS_IMETHOD SetDomain(nsIURI * aDomain) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetDomain(aDomain); } \ + NS_IMETHOD GetOrigin(char * *aOrigin) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetOrigin(aOrigin); } \ + NS_IMETHOD GetHasCertificate(PRBool *aHasCertificate) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetHasCertificate(aHasCertificate); } \ + NS_IMETHOD GetCertificateID(char * *aCertificateID) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCertificateID(aCertificateID); } \ + NS_IMETHOD GetCommonName(char * *aCommonName) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCommonName(aCommonName); } \ + NS_IMETHOD SetCommonName(const char * aCommonName) { return !_to ? NS_ERROR_NULL_POINTER : _to->SetCommonName(aCommonName); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsPrincipal : public nsIPrincipal +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPRINCIPAL + + nsPrincipal(); + +private: + ~nsPrincipal(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsPrincipal, nsIPrincipal) + +nsPrincipal::nsPrincipal() +{ + /* member initializers and constructor code */ +} + +nsPrincipal::~nsPrincipal() +{ + /* destructor code */ +} + +/* void getPreferences (out string prefBranch, out string id, out string grantedList, out string deniedList); */ +NS_IMETHODIMP nsPrincipal::GetPreferences(char **prefBranch, char **id, char **grantedList, char **deniedList) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean equals (in nsIPrincipal other); */ +NS_IMETHODIMP nsPrincipal::Equals(nsIPrincipal *other, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute unsigned long hashValue; */ +NS_IMETHODIMP nsPrincipal::GetHashValue(PRUint32 *aHashValue) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* JSPrincipals getJSPrincipals (in JSContext cx); */ +NS_IMETHODIMP nsPrincipal::GetJSPrincipals(JSContext * cx, JSPrincipals * *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute voidPtr securityPolicy; */ +NS_IMETHODIMP nsPrincipal::GetSecurityPolicy(void * *aSecurityPolicy) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsPrincipal::SetSecurityPolicy(void * aSecurityPolicy) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* short canEnableCapability (in string capability); */ +NS_IMETHODIMP nsPrincipal::CanEnableCapability(const char *capability, PRInt16 *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void setCanEnableCapability (in string capability, in short canEnable); */ +NS_IMETHODIMP nsPrincipal::SetCanEnableCapability(const char *capability, PRInt16 canEnable) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isCapabilityEnabled (in string capability, in voidPtr annotation); */ +NS_IMETHODIMP nsPrincipal::IsCapabilityEnabled(const char *capability, void * annotation, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void enableCapability (in string capability, inout voidPtr annotation); */ +NS_IMETHODIMP nsPrincipal::EnableCapability(const char *capability, void * *annotation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void revertCapability (in string capability, inout voidPtr annotation); */ +NS_IMETHODIMP nsPrincipal::RevertCapability(const char *capability, void * *annotation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void disableCapability (in string capability, inout voidPtr annotation); */ +NS_IMETHODIMP nsPrincipal::DisableCapability(const char *capability, void * *annotation) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute nsIURI URI; */ +NS_IMETHODIMP nsPrincipal::GetURI(nsIURI * *aURI) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute nsIURI domain; */ +NS_IMETHODIMP nsPrincipal::GetDomain(nsIURI * *aDomain) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsPrincipal::SetDomain(nsIURI * aDomain) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string origin; */ +NS_IMETHODIMP nsPrincipal::GetOrigin(char * *aOrigin) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute boolean hasCertificate; */ +NS_IMETHODIMP nsPrincipal::GetHasCertificate(PRBool *aHasCertificate) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* readonly attribute string certificateID; */ +NS_IMETHODIMP nsPrincipal::GetCertificateID(char * *aCertificateID) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* attribute string commonName; */ +NS_IMETHODIMP nsPrincipal::GetCommonName(char * *aCommonName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} +NS_IMETHODIMP nsPrincipal::SetCommonName(const char * aCommonName) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +/* starting interface: nsISubsumingPrincipal */ +#define NS_ISUBSUMINGPRINCIPAL_IID_STR "a67c4736-9a95-4ce1-9ffc-3f88c0913a34" + +#define NS_ISUBSUMINGPRINCIPAL_IID \ + {0xa67c4736, 0x9a95, 0x4ce1, \ + { 0x9f, 0xfc, 0x3f, 0x88, 0xc0, 0x91, 0x3a, 0x34 }} + +class NS_NO_VTABLE nsISubsumingPrincipal : public nsIPrincipal { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUBSUMINGPRINCIPAL_IID) + + /** + * Returns whether the other principal is equal to or weaker than this + * principal. Principals are equal if they are the same object, they + * have the same origin, or they have the same certificate ID. + * + * Thus a principal subsumes itself if it is equal to itself. + * + * The system principal subsumes itself and all other principals except + * the non-principal. + * + * The non-principal is not equal to itself or any other principal, and + * therefore does not subsume itself. + * + * Both codebase and certificate principals are subsumed by the system + * principal, but no codebase or certificate principal yet subsumes any + * other codebase or certificate principal. This may change in a future + * release; note that nsIPrincipal is unfrozen, not slated to be frozen. + */ + /* boolean subsumes (in nsIPrincipal other); */ + NS_IMETHOD Subsumes(nsIPrincipal *other, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUBSUMINGPRINCIPAL \ + NS_IMETHOD Subsumes(nsIPrincipal *other, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUBSUMINGPRINCIPAL(_to) \ + NS_IMETHOD Subsumes(nsIPrincipal *other, PRBool *_retval) { return _to Subsumes(other, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUBSUMINGPRINCIPAL(_to) \ + NS_IMETHOD Subsumes(nsIPrincipal *other, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->Subsumes(other, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSubsumingPrincipal : public nsISubsumingPrincipal +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUBSUMINGPRINCIPAL + + nsSubsumingPrincipal(); + +private: + ~nsSubsumingPrincipal(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSubsumingPrincipal, nsISubsumingPrincipal) + +nsSubsumingPrincipal::nsSubsumingPrincipal() +{ + /* member initializers and constructor code */ +} + +nsSubsumingPrincipal::~nsSubsumingPrincipal() +{ + /* destructor code */ +} + +/* boolean subsumes (in nsIPrincipal other); */ +NS_IMETHODIMP nsSubsumingPrincipal::Subsumes(nsIPrincipal *other, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIPrincipal_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIProgrammingLanguage.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIProgrammingLanguage.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIProgrammingLanguage.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIProgrammingLanguage.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,103 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIProgrammingLanguage.idl + */ + +#ifndef __gen_nsIProgrammingLanguage_h__ +#define __gen_nsIProgrammingLanguage_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#ifdef XP_OS2 // OS2 has UNKNOWN problems :) +#undef UNKNOWN +#endif + +/* starting interface: nsIProgrammingLanguage */ +#define NS_IPROGRAMMINGLANGUAGE_IID_STR "ea604e90-40ba-11d5-90bb-0010a4e73d9a" + +#define NS_IPROGRAMMINGLANGUAGE_IID \ + {0xea604e90, 0x40ba, 0x11d5, \ + { 0x90, 0xbb, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }} + +/** + * Enumeration of Programming Languages + * @status FROZEN + */ +class NS_NO_VTABLE nsIProgrammingLanguage : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IPROGRAMMINGLANGUAGE_IID) + + /** + * Identifiers for programming languages. + */ + enum { UNKNOWN = 0U }; + + enum { CPLUSPLUS = 1U }; + + enum { JAVASCRIPT = 2U }; + + enum { PYTHON = 3U }; + + enum { PERL = 4U }; + + enum { JAVA = 5U }; + + enum { ZX81_BASIC = 6U }; + + enum { JAVASCRIPT2 = 7U }; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSIPROGRAMMINGLANGUAGE \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSIPROGRAMMINGLANGUAGE(_to) \ + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSIPROGRAMMINGLANGUAGE(_to) \ + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsProgrammingLanguage : public nsIProgrammingLanguage +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSIPROGRAMMINGLANGUAGE + + nsProgrammingLanguage(); + +private: + ~nsProgrammingLanguage(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsProgrammingLanguage, nsIProgrammingLanguage) + +nsProgrammingLanguage::nsProgrammingLanguage() +{ + /* member initializers and constructor code */ +} + +nsProgrammingLanguage::~nsProgrammingLanguage() +{ + /* destructor code */ +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsIProgrammingLanguage_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISecureEnv.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISecureEnv.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISecureEnv.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISecureEnv.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,362 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsISecureEnv_h___ +#define nsISecureEnv_h___ + +#include "nsISupports.h" +#include "nsIFactory.h" +#include "nsISecurityContext.h" +#include "jni.h" + +enum jni_type +{ + jobject_type = 0, + jboolean_type, + jbyte_type, + jchar_type, + jshort_type, + jint_type, + jlong_type, + jfloat_type, + jdouble_type, + jvoid_type +}; + +class nsISecureEnv : public nsISupports { +public: + + /** + * Create new Java object in LiveConnect. + * + * @param clazz -- Java Class object. + * @param methodID -- Method id + * @param args -- arguments for invoking the constructor. + * @param result -- return new Java object. + * @param ctx -- security context + */ + NS_IMETHOD NewObject(/*[in]*/ jclass clazz, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jobject* result, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + /** + * Invoke method on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param methodID -- method id + * @param args -- arguments for invoking the constructor. + * @param result -- return result of invocation. + * @param ctx -- security context + */ + NS_IMETHOD CallMethod(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + /** + * Invoke non-virtual method on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param clazz -- Class object + * @param methodID -- method id + * @param args -- arguments for invoking the constructor. + * @param ctx -- security context + * @param result -- return result of invocation. + */ + NS_IMETHOD CallNonvirtualMethod(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jclass clazz, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + /** + * Get a field on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param fieldID -- field id + * @param result -- return field value + * @param ctx -- security context + */ + NS_IMETHOD GetField(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jfieldID fieldID, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + /** + * Set a field on Java object in LiveConnect. + * + * @param type -- Return type + * @param obj -- Java object. + * @param fieldID -- field id + * @param val -- field value to set + * @param ctx -- security context + */ + NS_IMETHOD SetField(/*[in]*/ jni_type type, + /*[in]*/ jobject obj, + /*[in]*/ jfieldID fieldID, + /*[in]*/ jvalue val, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + /** + * Invoke static method on Java object in LiveConnect. + * + * @param type -- Return type + * @param clazz -- Class object. + * @param methodID -- method id + * @param args -- arguments for invoking the constructor. + * @param result -- return result of invocation. + * @param ctx -- security context + */ + NS_IMETHOD CallStaticMethod(/*[in]*/ jni_type type, + /*[in]*/ jclass clazz, + /*[in]*/ jmethodID methodID, + /*[in]*/ jvalue *args, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + /** + * Get a static field on Java object in LiveConnect. + * + * @param type -- Return type + * @param clazz -- Class object. + * @param fieldID -- field id + * @param result -- return field value + * @param ctx -- security context + */ + NS_IMETHOD GetStaticField(/*[in]*/ jni_type type, + /*[in]*/ jclass clazz, + /*[in]*/ jfieldID fieldID, + /*[out]*/ jvalue* result, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + + /** + * Set a static field on Java object in LiveConnect. + * + * @param type -- Return type + * @param clazz -- Class object. + * @param fieldID -- field id + * @param val -- field value to set + * @param ctx -- security context + */ + NS_IMETHOD SetStaticField(/*[in]*/ jni_type type, + /*[in]*/ jclass clazz, + /*[in]*/ jfieldID fieldID, + /*[in]*/ jvalue val, + /*[in]*/ nsISecurityContext* ctx = NULL) = 0; + + + NS_IMETHOD GetVersion(/*[out]*/ jint* version) = 0; + + NS_IMETHOD DefineClass(/*[in]*/ const char* name, + /*[in]*/ jobject loader, + /*[in]*/ const jbyte *buf, + /*[in]*/ jsize len, + /*[out]*/ jclass* clazz) = 0; + + NS_IMETHOD FindClass(/*[in]*/ const char* name, + /*[out]*/ jclass* clazz) = 0; + + NS_IMETHOD GetSuperclass(/*[in]*/ jclass sub, + /*[out]*/ jclass* super) = 0; + + NS_IMETHOD IsAssignableFrom(/*[in]*/ jclass sub, + /*[in]*/ jclass super, + /*[out]*/ jboolean* result) = 0; + + NS_IMETHOD Throw(/*[in]*/ jthrowable obj, + /*[out]*/ jint* result) = 0; + + NS_IMETHOD ThrowNew(/*[in]*/ jclass clazz, + /*[in]*/ const char *msg, + /*[out]*/ jint* result) = 0; + + NS_IMETHOD ExceptionOccurred(/*[out]*/ jthrowable* result) = 0; + + NS_IMETHOD ExceptionDescribe(void) = 0; + + NS_IMETHOD ExceptionClear(void) = 0; + + NS_IMETHOD FatalError(/*[in]*/ const char* msg) = 0; + + NS_IMETHOD NewGlobalRef(/*[in]*/ jobject lobj, + /*[out]*/ jobject* result) = 0; + + NS_IMETHOD DeleteGlobalRef(/*[in]*/ jobject gref) = 0; + + NS_IMETHOD DeleteLocalRef(/*[in]*/ jobject obj) = 0; + + NS_IMETHOD IsSameObject(/*[in]*/ jobject obj1, + /*[in]*/ jobject obj2, + /*[out]*/ jboolean* result) = 0; + + NS_IMETHOD AllocObject(/*[in]*/ jclass clazz, + /*[out]*/ jobject* result) = 0; + + NS_IMETHOD GetObjectClass(/*[in]*/ jobject obj, + /*[out]*/ jclass* result) = 0; + + NS_IMETHOD IsInstanceOf(/*[in]*/ jobject obj, + /*[in]*/ jclass clazz, + /*[out]*/ jboolean* result) = 0; + + NS_IMETHOD GetMethodID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jmethodID* id) = 0; + + NS_IMETHOD GetFieldID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jfieldID* id) = 0; + + NS_IMETHOD GetStaticMethodID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jmethodID* id) = 0; + + NS_IMETHOD GetStaticFieldID(/*[in]*/ jclass clazz, + /*[in]*/ const char* name, + /*[in]*/ const char* sig, + /*[out]*/ jfieldID* id) = 0; + + NS_IMETHOD NewString(/*[in]*/ const jchar* unicode, + /*[in]*/ jsize len, + /*[out]*/ jstring* result) = 0; + + NS_IMETHOD GetStringLength(/*[in]*/ jstring str, + /*[out]*/ jsize* result) = 0; + + NS_IMETHOD GetStringChars(/*[in]*/ jstring str, + /*[in]*/ jboolean *isCopy, + /*[out]*/ const jchar** result) = 0; + + NS_IMETHOD ReleaseStringChars(/*[in]*/ jstring str, + /*[in]*/ const jchar *chars) = 0; + + NS_IMETHOD NewStringUTF(/*[in]*/ const char *utf, + /*[out]*/ jstring* result) = 0; + + NS_IMETHOD GetStringUTFLength(/*[in]*/ jstring str, + /*[out]*/ jsize* result) = 0; + + NS_IMETHOD GetStringUTFChars(/*[in]*/ jstring str, + /*[in]*/ jboolean *isCopy, + /*[out]*/ const char** result) = 0; + + NS_IMETHOD ReleaseStringUTFChars(/*[in]*/ jstring str, + /*[in]*/ const char *chars) = 0; + + NS_IMETHOD GetArrayLength(/*[in]*/ jarray array, + /*[out]*/ jsize* result) = 0; + + NS_IMETHOD NewObjectArray(/*[in]*/ jsize len, + /*[in]*/ jclass clazz, + /*[in]*/ jobject init, + /*[out]*/ jobjectArray* result) = 0; + + NS_IMETHOD GetObjectArrayElement(/*[in]*/ jobjectArray array, + /*[in]*/ jsize index, + /*[out]*/ jobject* result) = 0; + + NS_IMETHOD SetObjectArrayElement(/*[in]*/ jobjectArray array, + /*[in]*/ jsize index, + /*[in]*/ jobject val) = 0; + + NS_IMETHOD NewArray(/*[in]*/ jni_type element_type, + /*[in]*/ jsize len, + /*[out]*/ jarray* result) = 0; + + NS_IMETHOD GetArrayElements(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ jboolean *isCopy, + /*[out]*/ void* result) = 0; + + NS_IMETHOD ReleaseArrayElements(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ void *elems, + /*[in]*/ jint mode) = 0; + + NS_IMETHOD GetArrayRegion(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ jsize start, + /*[in]*/ jsize len, + /*[out]*/ void* buf) = 0; + + NS_IMETHOD SetArrayRegion(/*[in]*/ jni_type type, + /*[in]*/ jarray array, + /*[in]*/ jsize start, + /*[in]*/ jsize len, + /*[in]*/ void* buf) = 0; + + NS_IMETHOD RegisterNatives(/*[in]*/ jclass clazz, + /*[in]*/ const JNINativeMethod *methods, + /*[in]*/ jint nMethods, + /*[out]*/ jint* result) = 0; + + NS_IMETHOD UnregisterNatives(/*[in]*/ jclass clazz, + /*[out]*/ jint* result) = 0; + + NS_IMETHOD MonitorEnter(/*[in]*/ jobject obj, + /*[out]*/ jint* result) = 0; + + NS_IMETHOD MonitorExit(/*[in]*/ jobject obj, + /*[out]*/ jint* result) = 0; + + NS_IMETHOD GetJavaVM(/*[in]*/ JavaVM **vm, + /*[out]*/ jint* result) = 0; +}; + +#define NS_ISECUREENV_IID \ +{ /* ca9148d0-598a-11d2-a1d4-00805f8f694d */ \ + 0xca9148d0, \ + 0x598a, \ + 0x11d2, \ + {0xa1, 0xd4, 0x00, 0x80, 0x5f, 0x8f, 0x69, 0x4d } \ +} + +#endif // nsISecureEnv_h___ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISecurityContext.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISecurityContext.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISecurityContext.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISecurityContext.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,135 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- + * + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code, released + * March 31, 1998. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either of the GNU General Public License Version 2 or later (the "GPL"), + * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ +/* + * This file is part of the Java-vendor-neutral implementation of LiveConnect + * + * It contains the public XP-COM based interface for java to javascript communication. + * This interface allows java and javascript to exchange security contexts to allow + * access to restricted resources on either side. + * + */ + +#ifndef nsISecurityContext_h___ +#define nsISecurityContext_h___ + +#include "nsISupports.h" + +#define NS_ISECURITYCONTEXT_IID \ +{ /* {209B1120-4C41-11d2-A1CB-00805F8F694D} */ \ + 0x209b1120, \ + 0x4c41, \ + 0x11d2, \ + { 0xa1, 0xcb, 0x0, 0x80, 0x5f, 0x8f, 0x69, 0x4d } \ +} + +class nsISecurityContext : public nsISupports { +public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISECURITYCONTEXT_IID) + + /** + * Get the security context to be used in LiveConnect. + * This is used for JavaScript <--> Java. + * + * @param target -- Possible target. + * @param action -- Possible action on the target. + * @return -- NS_OK if the target and action is permitted on the security context. + * -- NS_FALSE otherwise. + */ + NS_IMETHOD Implies(const char* target, const char* action, PRBool *bAllowedAccess) = 0; + + /** + * Get the origin associated with the context. + * + * @param buf -- Result buffer (managed by the caller.) + * @param len -- Buffer length. + * @return -- NS_OK if the codebase string was obtained. + * -- NS_FALSE otherwise. + */ + NS_IMETHOD GetOrigin(char* buf, int len) = 0; + + /** + * Get the certificate associated with the context. + * + * @param buf -- Result buffer (managed by the caller.) + * @param len -- Buffer length. + * @return -- NS_OK if the codebase string was obtained. + * -- NS_FALSE otherwise. + */ + NS_IMETHOD GetCertificateID(char* buf, int len) = 0; +}; + + +// Supported targets in Netscape Navigator 4.0 (Communicator): + +#define nsSecurityTarget_UniversalThreadAccess "UniversalThreadAccess" // allows manipulation of threads not belonging to the applet +#define nsSecurityTarget_UniversalExecAccess "UniversalExecAccess" // allows executing sub-processes +#define nsSecurityTarget_UniversalExitAccess "UniversalExitAccess" // allows terminating the browser session +#define nsSecurityTarget_UniversalLinkAccess "UniversalLinkAccess" // allows linking to dymanically loaded libraries (DLLs) +#define nsSecurityTarget_UniversalPropertyWrite "UniversalPropertyWrite" // allows reading and writing of all system properties (vs. restrictions on applets) +#define nsSecurityTarget_UniversalPropertyRead "UniversalPropertyRead" // allows reading of all system properties (vs. restrictions on applets) +#define nsSecurityTarget_UniversalFileRead "UniversalFileRead" // allows reading any file in the local filesystem +#define nsSecurityTarget_UniversalFileWrite "UniversalFileWrite" // allows writing any file in the local filesystem +#define nsSecurityTarget_UniversalFileDelete "UniversalFileDelete" // allows deleting of any file in the local filesystem +#define nsSecurityTarget_UniversalFdRead "UniversalFdRead" // allows reading from any arbitrary file descriptor +#define nsSecurityTarget_UniversalFdWrite "UniversalFdWrite" // allows writing to any arbitrary file descriptor +#define nsSecurityTarget_UniversalListen "UniversalListen" // allows establishing the server-side of a network connection +#define nsSecurityTarget_UniversalAccept "UniversalAccept" // allows waiting on a network connection +#define nsSecurityTarget_UniversalConnect "UniversalConnect" // allows establishing the client-side of a network connection +#define nsSecurityTarget_UniversalMulticast "UniversalMulticast" // allows establishing IP multicast a network connection +#define nsSecurityTarget_UniversalTopLevelWindow "UniversalTopLevelWindow" // allows top-level windows to be created by the applet writer. +#define nsSecurityTarget_UniversalPackageAccess "UniversalPackageAccess" // allows access to java packages +#define nsSecurityTarget_UniversalPackageDefinition "UniversalPackageDefinition" // allows access to define packages +#define nsSecurityTarget_UniversalSetFactory "UniversalSetFactory" // allows access to set a networking-related object factory +#define nsSecurityTarget_UniversalMemberAccess "UniversalMemberAccess" // allows access to members of a class +#define nsSecurityTarget_UniversalPrintJobAccess "UniversalPrintJobAccess" // allows access to initiate a print job request +#define nsSecurityTarget_UniversalSystemClipboardAccess "UniversalSystemClipboardAccess" // allows access to System Clipboard +#define nsSecurityTarget_UniversalAwtEventQueueAccess "UniversalAwtEventQueueAccess" // allows access to Awt's EventQueue +#define nsSecurityTarget_UniversalSecurityProvider "UniversalSecurityProvider" // allows access to certain operations to a given provider, for example, only a given provider (e.g. Netscape) is able to retrieve the Netscape provider properties +#define nsSecurityTarget_UniversalBrowserRead "UniversalBrowserRead" // allows access to browser data +#define nsSecurityTarget_UniversalBrowserWrite "UniversalBrowserWrite" // allows modification of browser data +#define nsSecurityTarget_UniversalSendMail "UniversalSendMail" // allows sending mail +#define nsSecurityTarget_SuperUser "SuperUser" // enables all privileges +#define nsSecurityTarget_30Capabilities "30Capabilities" // enables all privileges that are available in Navigator 3.0. +#define nsSecurityTarget_UniversalFileAccess "UniversalFileAccess" // enables read, write and delete of any file in the local filesystem +#define nsSecurityTarget_TerminalEmulator "TerminalEmulator" // enables socket connections, property read and to link dynamic libraries. + + + +#endif // nsISecurityContext_h___ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISerializable.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISerializable.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISerializable.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISerializable.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,120 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsISerializable.idl + */ + +#ifndef __gen_nsISerializable_h__ +#define __gen_nsISerializable_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +class nsIObjectInputStream; /* forward declaration */ + +class nsIObjectOutputStream; /* forward declaration */ + + +/* starting interface: nsISerializable */ +#define NS_ISERIALIZABLE_IID_STR "91cca981-c26d-44a8-bebe-d9ed4891503a" + +#define NS_ISERIALIZABLE_IID \ + {0x91cca981, 0xc26d, 0x44a8, \ + { 0xbe, 0xbe, 0xd9, 0xed, 0x48, 0x91, 0x50, 0x3a }} + +class NS_NO_VTABLE nsISerializable : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISERIALIZABLE_IID) + + /** + * Initialize the object implementing nsISerializable, which must have + * been freshly constructed via CreateInstance. All data members that + * can't be set to default values must have been serialized by write, + * and should be read from aInputStream in the same order by this method. + */ + /* void read (in nsIObjectInputStream aInputStream); */ + NS_IMETHOD Read(nsIObjectInputStream *aInputStream) = 0; + + /** + * Serialize the object implementing nsISerializable to aOutputStream, by + * writing each data member that must be recovered later to reconstitute + * a working replica of this object, in a canonical member and byte order, + * to aOutputStream. + * + * NB: a class that implements nsISerializable *must* also implement + * nsIClassInfo, in particular nsIClassInfo::GetClassID. + */ + /* void write (in nsIObjectOutputStream aOutputStream); */ + NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISERIALIZABLE \ + NS_IMETHOD Read(nsIObjectInputStream *aInputStream); \ + NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISERIALIZABLE(_to) \ + NS_IMETHOD Read(nsIObjectInputStream *aInputStream) { return _to Read(aInputStream); } \ + NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream) { return _to Write(aOutputStream); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISERIALIZABLE(_to) \ + NS_IMETHOD Read(nsIObjectInputStream *aInputStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->Read(aInputStream); } \ + NS_IMETHOD Write(nsIObjectOutputStream *aOutputStream) { return !_to ? NS_ERROR_NULL_POINTER : _to->Write(aOutputStream); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSerializable : public nsISerializable +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISERIALIZABLE + + nsSerializable(); + +private: + ~nsSerializable(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSerializable, nsISerializable) + +nsSerializable::nsSerializable() +{ + /* member initializers and constructor code */ +} + +nsSerializable::~nsSerializable() +{ + /* destructor code */ +} + +/* void read (in nsIObjectInputStream aInputStream); */ +NS_IMETHODIMP nsSerializable::Read(nsIObjectInputStream *aInputStream) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void write (in nsIObjectOutputStream aOutputStream); */ +NS_IMETHODIMP nsSerializable::Write(nsIObjectOutputStream *aOutputStream) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + + +#endif /* __gen_nsISerializable_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManager.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManager.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManager.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManager.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,182 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsIServiceManager.idl + */ + +#ifndef __gen_nsIServiceManager_h__ +#define __gen_nsIServiceManager_h__ + + +#ifndef __gen_nsISupports_h__ +#include "nsISupports.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +/* starting interface: nsIServiceManager */ +#define NS_ISERVICEMANAGER_IID_STR "8bb35ed9-e332-462d-9155-4a002ab5c958" + +#define NS_ISERVICEMANAGER_IID \ + {0x8bb35ed9, 0xe332, 0x462d, \ + { 0x91, 0x55, 0x4a, 0x00, 0x2a, 0xb5, 0xc9, 0x58 }} + +/** + * The nsIServiceManager manager interface provides a means to obtain + * global services in an application. The service manager depends on the + * repository to find and instantiate factories to obtain services. + * + * Users of the service manager must first obtain a pointer to the global + * service manager by calling NS_GetServiceManager. After that, + * they can request specific services by calling GetService. When they are + * finished they can NS_RELEASE() the service as usual. + * + * A user of a service may keep references to particular services indefinitely + * and only must call Release when it shuts down. + * + * @status FROZEN + */ +class NS_NO_VTABLE nsIServiceManager : public nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISERVICEMANAGER_IID) + + /** + * getServiceByContractID + * + * Returns the instance that implements aClass or aContractID and the + * interface aIID. This may result in the instance being created. + * + * @param aClass or aContractID : aClass or aContractID of object + * instance requested + * @param aIID : IID of interface requested + * @param result : resulting service + */ + /* void getService (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result) = 0; + + /* void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) = 0; + + /** + * isServiceInstantiated + * + * isServiceInstantiated will return a true if the service has already + * been created, otherwise false + * + * @param aClass or aContractID : aClass or aContractID of object + * instance requested + * @param aIID : IID of interface requested + * @param aIID : IID of interface requested + */ + /* boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID); */ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) = 0; + + /* boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID); */ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISERVICEMANAGER \ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result); \ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result); \ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval); \ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISERVICEMANAGER(_to) \ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result) { return _to GetService(aClass, aIID, result); } \ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return _to GetServiceByContractID(aContractID, aIID, result); } \ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) { return _to IsServiceInstantiated(aClass, aIID, _retval); } \ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) { return _to IsServiceInstantiatedByContractID(aContractID, aIID, _retval); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISERVICEMANAGER(_to) \ + NS_IMETHOD GetService(const nsCID & aClass, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetService(aClass, aIID, result); } \ + NS_IMETHOD GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->GetServiceByContractID(aContractID, aIID, result); } \ + NS_IMETHOD IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsServiceInstantiated(aClass, aIID, _retval); } \ + NS_IMETHOD IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) { return !_to ? NS_ERROR_NULL_POINTER : _to->IsServiceInstantiatedByContractID(aContractID, aIID, _retval); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsServiceManager : public nsIServiceManager +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISERVICEMANAGER + + nsServiceManager(); + +private: + ~nsServiceManager(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsServiceManager, nsIServiceManager) + +nsServiceManager::nsServiceManager() +{ + /* member initializers and constructor code */ +} + +nsServiceManager::~nsServiceManager() +{ + /* destructor code */ +} + +/* void getService (in nsCIDRef aClass, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsServiceManager::GetService(const nsCID & aClass, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* void getServiceByContractID (in string aContractID, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ +NS_IMETHODIMP nsServiceManager::GetServiceByContractID(const char *aContractID, const nsIID & aIID, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isServiceInstantiated (in nsCIDRef aClass, in nsIIDRef aIID); */ +NS_IMETHODIMP nsServiceManager::IsServiceInstantiated(const nsCID & aClass, const nsIID & aIID, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* boolean isServiceInstantiatedByContractID (in string aContractID, in nsIIDRef aIID); */ +NS_IMETHODIMP nsServiceManager::IsServiceInstantiatedByContractID(const char *aContractID, const nsIID & aIID, PRBool *_retval) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +#define NS_ERROR_SERVICE_NOT_AVAILABLE NS_ERROR_GENERATE_FAILURE(NS_ERROR_MODULE_XPCOM, 22) +/** + * @status DEPRECATED + */ +#define NS_ERROR_SERVICE_NOT_FOUND NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 22) +/** + * @status DEPRECATED + */ +#define NS_ERROR_SERVICE_IN_USE NS_ERROR_GENERATE_SUCCESS(NS_ERROR_MODULE_XPCOM, 23) +// Observing xpcom startup. If you component has not been created, it will be. +#define NS_XPCOM_STARTUP_OBSERVER_ID "xpcom-startup" +// Observing xpcom shutdown +#define NS_XPCOM_SHUTDOWN_OBSERVER_ID "xpcom-shutdown" +// Observing xpcom autoregistration. Topics will be 'start' and 'stop'. +#define NS_XPCOM_AUTOREGISTRATION_OBSERVER_ID "xpcom-autoregistration" +#ifndef MOZILLA_STRICT_API +#include "nsXPCOM.h" +#include "nsIServiceManagerUtils.h" +#include "nsIServiceManagerObsolete.h" +#endif + +#endif /* __gen_nsIServiceManager_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerObsolete.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerObsolete.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerObsolete.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerObsolete.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,250 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is XPCOM + * + * The Initial Developer of the Original Code is Netscape Communications + * Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsIServiceManagerObsolete_h___ +#define nsIServiceManagerObsolete_h___ + +//////////////////////////////////////////////////////////////////// +// +// WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING +// +// Functions, classes, interfaces and types in this file are +// obsolete. Use at your own risk. +// Please see nsIServiceManager.idl for the supported interface +// to the service manager. +// +//////////////////////////////////////////////////////////////////// + +#include "nsIComponentManager.h" +#include "nsID.h" + +#ifndef nsCOMPtr_h___ +#include "nsCOMPtr.h" +#endif + +class nsIServiceManager; +class nsIShutdownListener; +class nsIDirectoryServiceProvider; + +class nsServiceManagerObsolete; + +#define NS_ISERVICEMANAGER_OBSOLETE_IID \ +{ /* cf0df3b0-3401-11d2-8163-006008119d7a */ \ + 0xcf0df3b0, \ + 0x3401, \ + 0x11d2, \ + {0x81, 0x63, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \ +} + +/** + * The nsIServiceManagerObsolete manager is obsolete. Please refer + * to nsIServiceManager. + */ +class nsIServiceManagerObsolete : public nsISupports { +public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISERVICEMANAGER_OBSOLETE_IID); + + /** + * RegisterService may be called explicitly to register a service + * with the service manager. If a service is not registered explicitly, + * the component manager will be used to create an instance according + * to the class ID specified. + */ + NS_IMETHOD + RegisterService(const nsCID& aClass, nsISupports* aService) = 0; + + /** + * Requests a service to be shut down, possibly unloading its DLL. + * + * @returns NS_OK - if shutdown was successful and service was unloaded, + * @returns NS_ERROR_SERVICE_NOT_FOUND - if shutdown failed because + * the service was not currently loaded + * @returns NS_ERROR_SERVICE_IN_USE - if shutdown failed because some + * user of the service wouldn't voluntarily release it by using + * a shutdown listener. + */ + NS_IMETHOD + UnregisterService(const nsCID& aClass) = 0; + + NS_IMETHOD + GetService(const nsCID& aClass, const nsIID& aIID, + nsISupports* *result, + nsIShutdownListener* shutdownListener = nsnull) = 0; + + /* OBSOLETE: use NS_RELEASE(service) instead. */ + NS_IMETHOD + ReleaseService(const nsCID& aClass, nsISupports* service, + nsIShutdownListener* shutdownListener = nsnull) = 0; + + //////////////////////////////////////////////////////////////////////////// + // let's do it again, this time with ContractIDs... + + NS_IMETHOD + RegisterService(const char* aContractID, nsISupports* aService) = 0; + + NS_IMETHOD + UnregisterService(const char* aContractID) = 0; + + NS_IMETHOD + GetService(const char* aContractID, const nsIID& aIID, + nsISupports* *result, + nsIShutdownListener* shutdownListener = nsnull) = 0; + + /* OBSOLETE */ + NS_IMETHOD + ReleaseService(const char* aContractID, nsISupports* service, + nsIShutdownListener* shutdownListener = nsnull) = 0; + +}; + +// Interface to Global Services +class NS_COM nsServiceManager { +public: + + static nsresult + RegisterService(const nsCID& aClass, nsISupports* aService); + + static nsresult + UnregisterService(const nsCID& aClass); + + static nsresult + GetService(const nsCID& aClass, const nsIID& aIID, + nsISupports* *result, + nsIShutdownListener* shutdownListener = nsnull); + + /* OBSOLETE: use NS_RELEASE(service) instead. */ + static nsresult + ReleaseService(const nsCID& aClass, nsISupports* service, + nsIShutdownListener* shutdownListener = nsnull); + + //////////////////////////////////////////////////////////////////////////// + // let's do it again, this time with ContractIDs... + + static nsresult + RegisterService(const char* aContractID, nsISupports* aService); + + static nsresult + UnregisterService(const char* aContractID); + + static nsresult + GetService(const char* aContractID, const nsIID& aIID, + nsISupports* *result, + nsIShutdownListener* shutdownListener = nsnull); + + /* OBSOLETE: use NS_RELEASE(service) instead. */ + static nsresult + ReleaseService(const char* aContractID, nsISupports* service, + nsIShutdownListener* shutdownListener = nsnull); + + + //////////////////////////////////////////////////////////////////////////// + // These methods return really nsIServiceManagerObsolete, but they are + // statically cast to nsIServiceManager to preserve backwards compatiblity. + static nsresult GetGlobalServiceManager(nsIServiceManager* *result); + static nsresult ShutdownGlobalServiceManager(nsIServiceManager* *result); +}; + + +#define NS_DECL_NSISERVICEMANAGEROBSOLETE \ + NS_IMETHOD RegisterService(const nsCID& aClass, nsISupports* aService); \ + NS_IMETHOD UnregisterService(const nsCID& aClass);\ + NS_IMETHOD GetService(const nsCID& aClass, const nsIID& aIID, nsISupports* *result, nsIShutdownListener* shutdownListener);\ + NS_IMETHOD ReleaseService(const nsCID& aClass, nsISupports* service, nsIShutdownListener* shutdownListener);\ + NS_IMETHOD RegisterService(const char* aContractID, nsISupports* aService);\ + NS_IMETHOD UnregisterService(const char* aContractID);\ + NS_IMETHOD GetService(const char* aContractID, const nsIID& aIID, nsISupports* *result, nsIShutdownListener* shutdownListener);\ + NS_IMETHOD ReleaseService(const char* aContractID, nsISupports* service, nsIShutdownListener* shutdownListener); + +//////////////////////////////////////////////////////////////////////////////// + +#define NS_ISHUTDOWNLISTENER_IID \ +{ /* 56decae0-3406-11d2-8163-006008119d7a */ \ + 0x56decae0, \ + 0x3406, \ + 0x11d2, \ + {0x81, 0x63, 0x00, 0x60, 0x08, 0x11, 0x9d, 0x7a} \ +} + +class nsIShutdownListener; + + +template +inline +nsresult +CallGetService( const nsCID &aClass, + nsIShutdownListener* shutdownListener, + DestinationType** aDestination) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + return nsServiceManager::GetService(aClass, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(nsISupports**, aDestination), + shutdownListener); +} + +template +inline +nsresult +CallGetService( const char *aContractID, + nsIShutdownListener* shutdownListener, + DestinationType** aDestination) +{ + NS_PRECONDITION(aContractID, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return nsServiceManager::GetService(aContractID, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(nsISupports**, aDestination), + shutdownListener); +} + +//////////////////////////////////////////////////////////////////////////////// + + +#endif /* nsIServiceManagerObsolete_h___ */ + + + + + + + + + + diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerUtils.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerUtils.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerUtils.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIServiceManagerUtils.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,183 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is XPCOM + * + * The Initial Developer of the Original Code is Netscape Communications + * Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsIServiceManagerUtils_h__ +#define nsIServiceManagerUtils_h__ + +#include "nsIServiceManager.h" +#include "nsIServiceManagerObsolete.h" +#include "nsCOMPtr.h" + +//////////////////////////////////////////////////////////////////////////// +// Using servicemanager with COMPtrs +class NS_COM nsGetServiceByCID : public nsCOMPtr_helper +{ + public: + nsGetServiceByCID( const nsCID& aCID, nsISupports* aServiceManager, nsresult* aErrorPtr ) + : mCID(aCID), + mServiceManager( do_QueryInterface(aServiceManager) ), + mErrorPtr(aErrorPtr) + { + // nothing else to do + } + + virtual nsresult operator()( const nsIID&, void** ) const; + + private: + const nsCID& mCID; + nsCOMPtr mServiceManager; + nsresult* mErrorPtr; +}; + +inline +const nsGetServiceByCID +do_GetService( const nsCID& aCID, nsresult* error = 0 ) +{ + return nsGetServiceByCID(aCID, 0, error); +} + +inline +const nsGetServiceByCID +do_GetService( const nsCID& aCID, nsISupports* aServiceManager, nsresult* error = 0 ) +{ + return nsGetServiceByCID(aCID, aServiceManager, error); +} + +class NS_COM nsGetServiceByContractID : public nsCOMPtr_helper +{ + public: + nsGetServiceByContractID( const char* aContractID, nsISupports* aServiceManager, nsresult* aErrorPtr ) + : mContractID(aContractID), + mServiceManager( do_QueryInterface(aServiceManager) ), + mErrorPtr(aErrorPtr) + { + // nothing else to do + } + + virtual nsresult operator()( const nsIID&, void** ) const; + + private: + const char* mContractID; + nsCOMPtr mServiceManager; + nsresult* mErrorPtr; +}; + +inline +const nsGetServiceByContractID +do_GetService( const char* aContractID, nsresult* error = 0 ) +{ + return nsGetServiceByContractID(aContractID, 0, error); +} + +inline +const nsGetServiceByContractID +do_GetService( const char* aContractID, nsISupports* aServiceManager, nsresult* error = 0 ) +{ + return nsGetServiceByContractID(aContractID, aServiceManager, error); +} + +class nsGetServiceFromCategory : public nsCOMPtr_helper +{ + public: + nsGetServiceFromCategory(const char* aCategory, const char* aEntry, + nsISupports* aServiceManager, + nsresult* aErrorPtr) + : mCategory(aCategory), + mEntry(aEntry), + mServiceManager( do_QueryInterface(aServiceManager) ), + mErrorPtr(aErrorPtr) + { + // nothing else to do + } + + virtual nsresult operator()( const nsIID&, void** ) const; + protected: + const char* mCategory; + const char* mEntry; + nsCOMPtr mServiceManager; + nsresult* mErrorPtr; +}; + +inline +const nsGetServiceFromCategory +do_GetServiceFromCategory( const char* category, const char* entry, + nsresult* error = 0) +{ + return nsGetServiceFromCategory(category, entry, 0, error); +} + +// type-safe shortcuts for calling |GetService| +template +inline +nsresult +CallGetService( const nsCID &aClass, + DestinationType** aDestination) +{ + NS_PRECONDITION(aDestination, "null parameter"); + + nsCOMPtr mgr; + nsresult rv = NS_GetServiceManager(getter_AddRefs(mgr)); + + if (NS_FAILED(rv)) + return rv; + + return mgr->GetService(aClass, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +template +inline +nsresult +CallGetService( const char *aContractID, + DestinationType** aDestination) +{ + NS_PRECONDITION(aContractID, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + nsCOMPtr mgr; + nsresult rv = NS_GetServiceManager(getter_AddRefs(mgr)); + + if (NS_FAILED(rv)) + return rv; + + return mgr->GetServiceByContractID(aContractID, + NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +#endif diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupports.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupports.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupports.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupports.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,125 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsISupports.idl + */ + +#ifndef __gen_nsISupports_h__ +#define __gen_nsISupports_h__ + + +#ifndef __gen_nsrootidl_h__ +#include "nsrootidl.h" +#endif + +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +/* + * Start commenting out the C++ versions of the below in the output header + */ +#if 0 + +/* starting interface: nsISupports */ +#define NS_ISUPPORTS_IID_STR "00000000-0000-0000-c000-000000000046" + +#define NS_ISUPPORTS_IID \ + {0x00000000, 0x0000, 0x0000, \ + { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }} + +class NS_NO_VTABLE nsISupports { + public: + + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID) + + /* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) = 0; + + /* [noscript, notxpcom] nsrefcnt AddRef (); */ + NS_IMETHOD_(nsrefcnt) AddRef(void) = 0; + + /* [noscript, notxpcom] nsrefcnt Release (); */ + NS_IMETHOD_(nsrefcnt) Release(void) = 0; + +}; + +/* Use this macro when declaring classes that implement this interface. */ +#define NS_DECL_NSISUPPORTS \ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result); \ + NS_IMETHOD_(nsrefcnt) AddRef(void); \ + NS_IMETHOD_(nsrefcnt) Release(void); + +/* Use this macro to declare functions that forward the behavior of this interface to another object. */ +#define NS_FORWARD_NSISUPPORTS(_to) \ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return _to QueryInterface(uuid, result); } \ + NS_IMETHOD_(nsrefcnt) AddRef(void) { return _to AddRef(); } \ + NS_IMETHOD_(nsrefcnt) Release(void) { return _to Release(); } + +/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ +#define NS_FORWARD_SAFE_NSISUPPORTS(_to) \ + NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryInterface(uuid, result); } \ + NS_IMETHOD_(nsrefcnt) AddRef(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRef(); } \ + NS_IMETHOD_(nsrefcnt) Release(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Release(); } + +#if 0 +/* Use the code below as a template for the implementation class for this interface. */ + +/* Header file */ +class nsSupports : public nsISupports +{ +public: + NS_DECL_ISUPPORTS + NS_DECL_NSISUPPORTS + + nsSupports(); + +private: + ~nsSupports(); + +protected: + /* additional members */ +}; + +/* Implementation file */ +NS_IMPL_ISUPPORTS1(nsSupports, nsISupports) + +nsSupports::nsSupports() +{ + /* member initializers and constructor code */ +} + +nsSupports::~nsSupports() +{ + /* destructor code */ +} + +/* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ +NS_IMETHODIMP nsSupports::QueryInterface(const nsIID & uuid, void * *result) +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript, notxpcom] nsrefcnt AddRef (); */ +NS_IMETHODIMP_(nsrefcnt) nsSupports::AddRef() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* [noscript, notxpcom] nsrefcnt Release (); */ +NS_IMETHODIMP_(nsrefcnt) nsSupports::Release() +{ + return NS_ERROR_NOT_IMPLEMENTED; +} + +/* End of implementation class template. */ +#endif + +/* + * End commenting out the C++ versions of the above in the output header + */ +#endif +#include "nsISupportsBase.h" +#ifndef MOZILLA_STRICT_API +#include "nsISupportsUtils.h" +#endif + +#endif /* __gen_nsISupports_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsBase.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsBase.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsBase.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsBase.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,119 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is XPCOM. + * + * The Initial Developer of the Original Code is Netscape Communications Corp. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsISupportsBase_h__ +#define nsISupportsBase_h__ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsID_h__ +#include "nsID.h" +#endif + + +/*@{*/ +/** + * IID for the nsISupports interface + * {00000000-0000-0000-c000-000000000046} + * + * To maintain binary compatibility with COM's IUnknown, we define the IID + * of nsISupports to be the same as that of COM's IUnknown. + */ +#define NS_ISUPPORTS_IID \ + { 0x00000000, 0x0000, 0x0000, \ + {0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} } + +/** + * Reference count values + * + * This is the return type for AddRef() and Release() in nsISupports. + * IUnknown of COM returns an unsigned long from equivalent functions. + * The following ifdef exists to maintain binary compatibility with + * IUnknown. + */ +#if defined(XP_WIN) && PR_BYTES_PER_LONG == 4 +typedef unsigned long nsrefcnt; +#else +typedef PRUint32 nsrefcnt; +#endif + +/** + * Basic component object model interface. Objects which implement + * this interface support runtime interface discovery (QueryInterface) + * and a reference counted memory model (AddRef/Release). This is + * modelled after the win32 IUnknown API. + */ +class NS_NO_VTABLE nsISupports { +public: + + /** + * @name Methods + */ + + //@{ + /** + * A run time mechanism for interface discovery. + * @param aIID [in] A requested interface IID + * @param aInstancePtr [out] A pointer to an interface pointer to + * receive the result. + * @return NS_OK if the interface is supported by the associated + * instance, NS_NOINTERFACE if it is not. + * NS_ERROR_INVALID_POINTER if aInstancePtr is NULL. + */ + NS_IMETHOD QueryInterface(REFNSIID aIID, void** aInstancePtr) = 0; + /** + * Increases the reference count for this interface. + * The associated instance will not be deleted unless + * the reference count is returned to zero. + * + * @return The resulting reference count. + */ + NS_IMETHOD_(nsrefcnt) AddRef(void) = 0; + + /** + * Decreases the reference count for this interface. + * Generally, if the reference count returns to zero, + * the associated instance is deleted. + * + * @return The resulting reference count. + */ + NS_IMETHOD_(nsrefcnt) Release(void) = 0; + + //@} +}; +/*@}*/ +#endif diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsImpl.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsImpl.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsImpl.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsImpl.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,1157 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is XPCOM. + * + * The Initial Developer of the Original Code is Netscape Communications Corp. + * Portions created by the Initial Developer are Copyright (C) 2001 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + + +#ifndef nsISupportsImpl_h__ +#define nsISupportsImpl_h__ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsISupportsBase_h__ +#include "nsISupportsBase.h" +#endif + +#include "prthread.h" /* needed for thread-safety checks */ +#include "pratom.h" /* needed for PR_AtomicIncrement and PR_AtomicDecrement */ + +#include "nsDebug.h" +#include "nsTraceRefcnt.h" + +//////////////////////////////////////////////////////////////////////////////// +// Macros to help detect thread-safety: + +#if defined(NS_DEBUG) + +class nsAutoOwningThread { +public: + nsAutoOwningThread() { mThread = PR_GetCurrentThread(); } + void *GetThread() const { return mThread; } + +private: + void *mThread; +}; + +#define NS_DECL_OWNINGTHREAD nsAutoOwningThread _mOwningThread; +#define NS_ASSERT_OWNINGTHREAD(_class) \ + NS_CheckThreadSafe(_mOwningThread.GetThread(), #_class " not thread-safe") + +#else // !(defined(NS_DEBUG)) + +#define NS_DECL_OWNINGTHREAD /* nothing */ +#define NS_ASSERT_OWNINGTHREAD(_class) ((void)0) + +#endif // !(defined(NS_DEBUG)) + +class nsAutoRefCnt { + + public: + nsAutoRefCnt() : mValue(0) {} + nsAutoRefCnt(nsrefcnt aValue) : mValue(aValue) {} + + // only support prefix increment/decrement + nsrefcnt operator++() { return ++mValue; } + nsrefcnt operator--() { return --mValue; } + + nsrefcnt operator=(nsrefcnt aValue) { return (mValue = aValue); } + operator nsrefcnt() const { return mValue; } + nsrefcnt get() const { return mValue; } + private: + // do not define these to enforce the faster prefix notation + nsrefcnt operator++(int); + nsrefcnt operator--(int); + nsrefcnt mValue; +}; + +/////////////////////////////////////////////////////////////////////////////// + +/** + * Declare the reference count variable and the implementations of the + * AddRef and QueryInterface methods. + */ + +#define NS_DECL_ISUPPORTS \ +public: \ + NS_IMETHOD QueryInterface(REFNSIID aIID, \ + void** aInstancePtr); \ + NS_IMETHOD_(nsrefcnt) AddRef(void); \ + NS_IMETHOD_(nsrefcnt) Release(void); \ +protected: \ + nsAutoRefCnt mRefCnt; \ + NS_DECL_OWNINGTHREAD \ +public: + + +/////////////////////////////////////////////////////////////////////////////// + +/** + * Previously used to initialize the reference count, but no longer needed. + * + * DEPRECATED. + */ +#define NS_INIT_ISUPPORTS() ((void)0) + +/** + * Use this macro to implement the AddRef method for a given _class + * @param _class The name of the class implementing the method + */ +#define NS_IMPL_ADDREF(_class) \ +NS_IMETHODIMP_(nsrefcnt) _class::AddRef(void) \ +{ \ + NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt"); \ + NS_ASSERT_OWNINGTHREAD(_class); \ + ++mRefCnt; \ + NS_LOG_ADDREF(this, mRefCnt, #_class, sizeof(*this)); \ + return mRefCnt; \ +} + +/** + * Use this macro to implement the AddRef method for a given _class + * implemented as a wholly owned aggregated object intended to implement + * interface(s) for its owner + * @param _class The name of the class implementing the method + * @param _aggregator the owning/containing object + */ +#define NS_IMPL_ADDREF_USING_AGGREGATOR(_class, _aggregator) \ +NS_IMETHODIMP_(nsrefcnt) _class::AddRef(void) \ +{ \ + NS_PRECONDITION(_aggregator, "null aggregator"); \ + return (_aggregator)->AddRef(); \ +} + +/** + * Use this macro to implement the Release method for a given + * _class. + * @param _class The name of the class implementing the method + * @param _destroy A statement that is executed when the object's + * refcount drops to zero. + * + * For example, + * + * NS_IMPL_RELEASE_WITH_DESTROY(Foo, Destroy(this)) + * + * will cause + * + * Destroy(this); + * + * to be invoked when the object's refcount drops to zero. This + * allows for arbitrary teardown activity to occur (e.g., deallocation + * of object allocated with placement new). + */ +#define NS_IMPL_RELEASE_WITH_DESTROY(_class, _destroy) \ +NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \ +{ \ + NS_PRECONDITION(0 != mRefCnt, "dup release"); \ + NS_ASSERT_OWNINGTHREAD(_class); \ + --mRefCnt; \ + NS_LOG_RELEASE(this, mRefCnt, #_class); \ + if (mRefCnt == 0) { \ + mRefCnt = 1; /* stabilize */ \ + _destroy; \ + return 0; \ + } \ + return mRefCnt; \ +} + +/** + * Use this macro to implement the Release method for a given _class + * @param _class The name of the class implementing the method + * + * A note on the 'stabilization' of the refcnt to one. At that point, + * the object's refcount will have gone to zero. The object's + * destructor may trigger code that attempts to QueryInterface() and + * Release() 'this' again. Doing so will temporarily increment and + * decrement the refcount. (Only a logic error would make one try to + * keep a permanent hold on 'this'.) To prevent re-entering the + * destructor, we make sure that no balanced refcounting can return + * the refcount to |0|. + */ +#define NS_IMPL_RELEASE(_class) \ + NS_IMPL_RELEASE_WITH_DESTROY(_class, NS_DELETEXPCOM(this)) + +/** + * Use this macro to implement the Release method for a given _class + * implemented as a wholly owned aggregated object intended to implement + * interface(s) for its owner + * @param _class The name of the class implementing the method + * @param _aggregator the owning/containing object + */ +#define NS_IMPL_RELEASE_USING_AGGREGATOR(_class, _aggregator) \ +NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \ +{ \ + NS_PRECONDITION(_aggregator, "null aggregator"); \ + return (_aggregator)->Release(); \ +} + + + +/////////////////////////////////////////////////////////////////////////////// + +/* + * Some convenience macros for implementing QueryInterface + */ + +/** + * This implements query interface with two assumptions: First, the + * class in question implements nsISupports and its own interface and + * nothing else. Second, the implementation of the class's primary + * inheritance chain leads to its own interface. + * + * @param _class The name of the class implementing the method + * @param _classiiddef The name of the #define symbol that defines the IID + * for the class (e.g. NS_ISUPPORTS_IID) + */ + +#define NS_IMPL_QUERY_HEAD(_class) \ +NS_IMETHODIMP _class::QueryInterface(REFNSIID aIID, void** aInstancePtr) \ +{ \ + NS_ASSERTION(aInstancePtr, \ + "QueryInterface requires a non-NULL destination!"); \ + nsISupports* foundInterface; + +#define NS_IMPL_QUERY_BODY(_interface) \ + if ( aIID.Equals(NS_GET_IID(_interface)) ) \ + foundInterface = NS_STATIC_CAST(_interface*, this); \ + else + +#define NS_IMPL_QUERY_BODY_CONDITIONAL(_interface, condition) \ + if ( (condition) && aIID.Equals(NS_GET_IID(_interface))) \ + foundInterface = NS_STATIC_CAST(_interface*, this); \ + else + +#define NS_IMPL_QUERY_BODY_AMBIGUOUS(_interface, _implClass) \ + if ( aIID.Equals(NS_GET_IID(_interface)) ) \ + foundInterface = NS_STATIC_CAST(_interface*, \ + NS_STATIC_CAST(_implClass*, this)); \ + else + +#define NS_IMPL_QUERY_BODY_AGGREGATED(_interface, _aggregate) \ + if ( aIID.Equals(NS_GET_IID(_interface)) ) \ + foundInterface = NS_STATIC_CAST(_interface*, _aggregate); \ + else + +#define NS_IMPL_QUERY_TAIL_GUTS \ + foundInterface = 0; \ + nsresult status; \ + if ( !foundInterface ) \ + status = NS_NOINTERFACE; \ + else \ + { \ + NS_ADDREF(foundInterface); \ + status = NS_OK; \ + } \ + *aInstancePtr = foundInterface; \ + return status; \ +} + +#define NS_IMPL_QUERY_TAIL_INHERITING(_baseclass) \ + foundInterface = 0; \ + nsresult status; \ + if ( !foundInterface ) \ + status = _baseclass::QueryInterface(aIID, (void**)&foundInterface); \ + else \ + { \ + NS_ADDREF(foundInterface); \ + status = NS_OK; \ + } \ + *aInstancePtr = foundInterface; \ + return status; \ +} + +#define NS_IMPL_QUERY_TAIL_USING_AGGREGATOR(_aggregator) \ + foundInterface = 0; \ + nsresult status; \ + if ( !foundInterface ) { \ + NS_ASSERTION(_aggregator, "null aggregator"); \ + status = _aggregator->QueryInterface(aIID, (void**)&foundInterface); \ + } else \ + { \ + NS_ADDREF(foundInterface); \ + status = NS_OK; \ + } \ + *aInstancePtr = foundInterface; \ + return status; \ +} + +#define NS_IMPL_QUERY_TAIL(_supports_interface) \ + NS_IMPL_QUERY_BODY_AMBIGUOUS(nsISupports, _supports_interface) \ + NS_IMPL_QUERY_TAIL_GUTS + + + /* + This is the new scheme. Using this notation now will allow us to switch to + a table driven mechanism when it's ready. Note the difference between this + and the (currently) underlying NS_IMPL_QUERY_INTERFACE mechanism. You must + explicitly mention |nsISupports| when using the interface maps. + */ +#define NS_INTERFACE_MAP_BEGIN(_implClass) NS_IMPL_QUERY_HEAD(_implClass) +#define NS_INTERFACE_MAP_ENTRY(_interface) NS_IMPL_QUERY_BODY(_interface) +#define NS_INTERFACE_MAP_ENTRY_CONDITIONAL(_interface, condition) \ + NS_IMPL_QUERY_BODY_CONDITIONAL(_interface, condition) +#define NS_INTERFACE_MAP_ENTRY_AGGREGATED(_interface,_aggregate) \ + NS_IMPL_QUERY_BODY_AGGREGATED(_interface,_aggregate) + +#define NS_INTERFACE_MAP_END NS_IMPL_QUERY_TAIL_GUTS +#define NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_interface, _implClass) \ + NS_IMPL_QUERY_BODY_AMBIGUOUS(_interface, _implClass) +#define NS_INTERFACE_MAP_END_INHERITING(_baseClass) \ + NS_IMPL_QUERY_TAIL_INHERITING(_baseClass) +#define NS_INTERFACE_MAP_END_AGGREGATED(_aggregator) \ + NS_IMPL_QUERY_TAIL_USING_AGGREGATOR(_aggregator) + +#define NS_IMPL_QUERY_INTERFACE0(_class) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(nsISupports) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE1(_class, _i1) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE2(_class, _i1, _i2) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE3(_class, _i1, _i2, _i3) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE4(_class, _i1, _i2, _i3, _i4) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY(_i11) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_INTERFACE_MAP_END + + +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE0 NS_IMPL_QUERY_INTERFACE0 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1 NS_IMPL_QUERY_INTERFACE1 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2 NS_IMPL_QUERY_INTERFACE2 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3 NS_IMPL_QUERY_INTERFACE3 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4 NS_IMPL_QUERY_INTERFACE4 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE5 NS_IMPL_QUERY_INTERFACE5 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE6 NS_IMPL_QUERY_INTERFACE6 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE7 NS_IMPL_QUERY_INTERFACE7 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE8 NS_IMPL_QUERY_INTERFACE8 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE9 NS_IMPL_QUERY_INTERFACE9 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE10 NS_IMPL_QUERY_INTERFACE10 +#define NS_IMPL_THREADSAFE_QUERY_INTERFACE11 NS_IMPL_QUERY_INTERFACE11 + +/** + * Declare that you're going to inherit from something that already + * implements nsISupports, but also implements an additional interface, thus + * causing an ambiguity. In this case you don't need another mRefCnt, you + * just need to forward the definitions to the appropriate superclass. E.g. + * + * class Bar : public Foo, public nsIBar { // both provide nsISupports + * public: + * NS_DECL_ISUPPORTS_INHERITED + * ...other nsIBar and Bar methods... + * }; + */ +#define NS_DECL_ISUPPORTS_INHERITED \ +public: \ + NS_IMETHOD QueryInterface(REFNSIID aIID, \ + void** aInstancePtr); \ + NS_IMETHOD_(nsrefcnt) AddRef(void); \ + NS_IMETHOD_(nsrefcnt) Release(void); \ + +/** + * These macros can be used in conjunction with NS_DECL_ISUPPORTS_INHERITED + * to implement the nsISupports methods, forwarding the invocations to a + * superclass that already implements nsISupports. + * + * Note that I didn't make these inlined because they're virtual methods. + */ + +#define NS_IMPL_ADDREF_INHERITED(Class, Super) \ +NS_IMETHODIMP_(nsrefcnt) Class::AddRef(void) \ +{ \ + return Super::AddRef(); \ +} \ + +#define NS_IMPL_RELEASE_INHERITED(Class, Super) \ +NS_IMETHODIMP_(nsrefcnt) Class::Release(void) \ +{ \ + return Super::Release(); \ +} \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED0(Class, Super) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED1(Class, Super, i1) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED2(Class, Super, i1, i2) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED3(Class, Super, i1, i2, i3) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED4(Class, Super, i1, i2, i3, i4) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_BODY(i4) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED5(Class,Super,i1,i2,i3,i4,i5) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_BODY(i4) \ + NS_IMPL_QUERY_BODY(i5) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +#define NS_IMPL_QUERY_INTERFACE_INHERITED6(Class,Super,i1,i2,i3,i4,i5,i6) \ + NS_IMPL_QUERY_HEAD(Class) \ + NS_IMPL_QUERY_BODY(i1) \ + NS_IMPL_QUERY_BODY(i2) \ + NS_IMPL_QUERY_BODY(i3) \ + NS_IMPL_QUERY_BODY(i4) \ + NS_IMPL_QUERY_BODY(i5) \ + NS_IMPL_QUERY_BODY(i6) \ + NS_IMPL_QUERY_TAIL_INHERITING(Super) \ + +/** + * Convenience macros for implementing all nsISupports methods for + * a simple class. + * @param _class The name of the class implementing the method + * @param _classiiddef The name of the #define symbol that defines the IID + * for the class (e.g. NS_ISUPPORTS_IID) + */ + +#define NS_IMPL_ISUPPORTS0(_class) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE0(_class) + +#define NS_IMPL_ISUPPORTS1(_class, _interface) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE1(_class, _interface) + +#define NS_IMPL_ISUPPORTS2(_class, _i1, _i2) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE2(_class, _i1, _i2) + +#define NS_IMPL_ISUPPORTS3(_class, _i1, _i2, _i3) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE3(_class, _i1, _i2, _i3) + +#define NS_IMPL_ISUPPORTS4(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE4(_class, _i1, _i2, _i3, _i4) + +#define NS_IMPL_ISUPPORTS5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE5(_class, _i1, _i2, _i3, _i4, _i5) + +#define NS_IMPL_ISUPPORTS6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE6(_class, _i1, _i2, _i3, _i4, _i5, _i6) + +#define NS_IMPL_ISUPPORTS7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) + +#define NS_IMPL_ISUPPORTS8(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE8(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) + +#define NS_IMPL_ISUPPORTS9(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE9(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, _i9) + +#define NS_IMPL_ISUPPORTS10(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE10(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10) + +#define NS_IMPL_ISUPPORTS11(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10, _i11) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE11(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, \ + _i9, _i10, _i11) + +#define NS_IMPL_ISUPPORTS_INHERITED0(Class, Super) \ + NS_IMPL_QUERY_INTERFACE_INHERITED0(Class, Super) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED1(Class, Super, i1) \ + NS_IMPL_QUERY_INTERFACE_INHERITED1(Class, Super, i1) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED2(Class, Super, i1, i2) \ + NS_IMPL_QUERY_INTERFACE_INHERITED2(Class, Super, i1, i2) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED3(Class, Super, i1, i2, i3) \ + NS_IMPL_QUERY_INTERFACE_INHERITED3(Class, Super, i1, i2, i3) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED4(Class, Super, i1, i2, i3, i4) \ + NS_IMPL_QUERY_INTERFACE_INHERITED4(Class, Super, i1, i2, i3, i4) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED5(Class, Super, i1, i2, i3, i4, i5) \ + NS_IMPL_QUERY_INTERFACE_INHERITED5(Class, Super, i1, i2, i3, i4, i5) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +#define NS_IMPL_ISUPPORTS_INHERITED6(Class, Super, i1, i2, i3, i4, i5, i6) \ + NS_IMPL_QUERY_INTERFACE_INHERITED6(Class, Super, i1, i2, i3, i4, i5, i6) \ + NS_IMPL_ADDREF_INHERITED(Class, Super) \ + NS_IMPL_RELEASE_INHERITED(Class, Super) \ + +/////////////////////////////////////////////////////////////////////////////// +/** + * + * Threadsafe implementations of the ISupports convenience macros + * + */ + +/** + * Use this macro to implement the AddRef method for a given _class + * @param _class The name of the class implementing the method + */ + +#define NS_IMPL_THREADSAFE_ADDREF(_class) \ +NS_IMETHODIMP_(nsrefcnt) _class::AddRef(void) \ +{ \ + NS_PRECONDITION(PRInt32(mRefCnt) >= 0, "illegal refcnt"); \ + nsrefcnt count; \ + count = PR_AtomicIncrement((PRInt32*)&mRefCnt); \ + NS_LOG_ADDREF(this, count, #_class, sizeof(*this)); \ + return count; \ +} + +/** + * Use this macro to implement the Release method for a given _class + * @param _class The name of the class implementing the method + */ + +#define NS_IMPL_THREADSAFE_RELEASE(_class) \ +NS_IMETHODIMP_(nsrefcnt) _class::Release(void) \ +{ \ + nsrefcnt count; \ + NS_PRECONDITION(0 != mRefCnt, "dup release"); \ + count = PR_AtomicDecrement((PRInt32 *)&mRefCnt); \ + NS_LOG_RELEASE(this, count, #_class); \ + if (0 == count) { \ + mRefCnt = 1; /* stabilize */ \ + /* enable this to find non-threadsafe destructors: */ \ + /* NS_ASSERT_OWNINGTHREAD(_class); */ \ + NS_DELETEXPCOM(this); \ + return 0; \ + } \ + return count; \ +} + +#define NS_IMPL_THREADSAFE_ISUPPORTS0(_class) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE0(_class) + +#define NS_IMPL_THREADSAFE_ISUPPORTS1(_class, _interface) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE1(_class, _interface) + +#define NS_IMPL_THREADSAFE_ISUPPORTS2(_class, _i1, _i2) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE2(_class, _i1, _i2) + +#define NS_IMPL_THREADSAFE_ISUPPORTS3(_class, _i1, _i2, _i3) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE3(_class, _i1, _i2, _i3) + +#define NS_IMPL_THREADSAFE_ISUPPORTS4(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE4(_class, _i1, _i2, _i3, _i4) + +#define NS_IMPL_THREADSAFE_ISUPPORTS5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE5(_class, _i1, _i2, _i3, _i4, _i5) + +#define NS_IMPL_THREADSAFE_ISUPPORTS6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE6(_class, _i1, _i2, _i3, _i4, _i5, _i6) + +#define NS_IMPL_THREADSAFE_ISUPPORTS7(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE7(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) + +#define NS_IMPL_THREADSAFE_ISUPPORTS8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) + +#define NS_IMPL_THREADSAFE_ISUPPORTS9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) + +#define NS_IMPL_THREADSAFE_ISUPPORTS10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) + +#define NS_IMPL_THREADSAFE_ISUPPORTS11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_IMPL_THREADSAFE_ADDREF(_class) \ + NS_IMPL_THREADSAFE_RELEASE(_class) \ + NS_IMPL_THREADSAFE_QUERY_INTERFACE11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) + +/////////////////////////////////////////////////////////////////////////////// +// Macros for implementing nsIClassInfo-related stuff. +/////////////////////////////////////////////////////////////////////////////// + +// include here instead of at the top because it requires the nsISupport decl +#include "nsIClassInfo.h" + +#define NS_CLASSINFO_NAME(_class) _class##_classInfoGlobal +#define NS_CI_INTERFACE_GETTER_NAME(_class) _class##_GetInterfacesHelper + +#define NS_DECL_CI_INTERFACE_GETTER(_class) \ + extern NS_IMETHODIMP NS_CI_INTERFACE_GETTER_NAME(_class)(PRUint32 *, \ + nsIID ***); + +#define NS_DECL_CLASSINFO(_class) \ + NS_DECL_CI_INTERFACE_GETTER(_class) \ + nsIClassInfo *NS_CLASSINFO_NAME(_class); + +#define NS_IMPL_QUERY_CLASSINFO(_class) \ + if ( aIID.Equals(NS_GET_IID(nsIClassInfo)) ) { \ + extern nsIClassInfo *NS_CLASSINFO_NAME(_class); \ + foundInterface = NS_STATIC_CAST(nsIClassInfo*, NS_CLASSINFO_NAME(_class));\ + } else + +#define NS_CLASSINFO_HELPER_BEGIN(_class, _c) \ +NS_IMETHODIMP \ +NS_CI_INTERFACE_GETTER_NAME(_class)(PRUint32 *count, nsIID ***array) \ +{ \ + *count = _c; \ + *array = (nsIID **)nsMemory::Alloc(sizeof (nsIID *) * _c); + +#define NS_CLASSINFO_HELPER_ENTRY(_i, _interface) \ + (*array)[_i] = (nsIID *)nsMemory::Clone(&NS_GET_IID(_interface), \ + sizeof(nsIID)); + +#define NS_CLASSINFO_HELPER_END \ + return NS_OK; \ +} + +#define NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 1) \ + NS_CLASSINFO_HELPER_ENTRY(0, _interface) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE1_CI(_class, _i1) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS1_CI(_class, _interface) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE1_CI(_class, _interface) \ + NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface) + +#define NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 2) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE2_CI(_class, _i1, _i2) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS2_CI(_class, _i1, _i2) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE2_CI(_class, _i1, _i2) \ + NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2) + +#define NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 3) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \ + NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3) + +#define NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 4) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \ + NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4) + +#define NS_IMPL_CI_INTERFACE_GETTER5(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 5) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE5_CI(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS5_CI(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE5_CI(_class, _i1, _i2, _i3, _i4, _i5) \ + NS_IMPL_CI_INTERFACE_GETTER5(_class, _i1, _i2, _i3, _i4, _i5) + +#define NS_IMPL_CI_INTERFACE_GETTER6(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 6) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE6_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS6_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE6_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6) \ + NS_IMPL_CI_INTERFACE_GETTER6(_class, _i1, _i2, _i3, _i4, _i5, _i6) + +#define NS_IMPL_CI_INTERFACE_GETTER7(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 7) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE7_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS7_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE7_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) \ + NS_IMPL_CI_INTERFACE_GETTER7(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7) + +#define NS_IMPL_CI_INTERFACE_GETTER8(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 8) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE8_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS8_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE8_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) \ + NS_IMPL_CI_INTERFACE_GETTER8(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8) + +#define NS_IMPL_CI_INTERFACE_GETTER9(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 9) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_ENTRY(8, _i9) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE9_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS9_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE9_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9) \ + NS_IMPL_CI_INTERFACE_GETTER9(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9) + +#define NS_IMPL_CI_INTERFACE_GETTER10(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 10) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_ENTRY(8, _i9) \ + NS_CLASSINFO_HELPER_ENTRY(9, _i10) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_CI_INTERFACE_GETTER11(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_CLASSINFO_HELPER_BEGIN(_class, 10) \ + NS_CLASSINFO_HELPER_ENTRY(0, _i1) \ + NS_CLASSINFO_HELPER_ENTRY(1, _i2) \ + NS_CLASSINFO_HELPER_ENTRY(2, _i3) \ + NS_CLASSINFO_HELPER_ENTRY(3, _i4) \ + NS_CLASSINFO_HELPER_ENTRY(4, _i5) \ + NS_CLASSINFO_HELPER_ENTRY(5, _i6) \ + NS_CLASSINFO_HELPER_ENTRY(6, _i7) \ + NS_CLASSINFO_HELPER_ENTRY(7, _i8) \ + NS_CLASSINFO_HELPER_ENTRY(8, _i9) \ + NS_CLASSINFO_HELPER_ENTRY(9, _i10) \ + NS_CLASSINFO_HELPER_ENTRY(10, _i11) \ + NS_CLASSINFO_HELPER_END + +#define NS_IMPL_QUERY_INTERFACE10_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_QUERY_INTERFACE11_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, \ + _i7, _i8, _i9, _i10, _i11) \ + NS_INTERFACE_MAP_BEGIN(_class) \ + NS_INTERFACE_MAP_ENTRY(_i1) \ + NS_INTERFACE_MAP_ENTRY(_i2) \ + NS_INTERFACE_MAP_ENTRY(_i3) \ + NS_INTERFACE_MAP_ENTRY(_i4) \ + NS_INTERFACE_MAP_ENTRY(_i5) \ + NS_INTERFACE_MAP_ENTRY(_i6) \ + NS_INTERFACE_MAP_ENTRY(_i7) \ + NS_INTERFACE_MAP_ENTRY(_i8) \ + NS_INTERFACE_MAP_ENTRY(_i9) \ + NS_INTERFACE_MAP_ENTRY(_i10) \ + NS_INTERFACE_MAP_ENTRY(_i11) \ + NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _i1) \ + NS_IMPL_QUERY_CLASSINFO(_class) \ + NS_INTERFACE_MAP_END + +#define NS_IMPL_ISUPPORTS10_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE10_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10) \ + NS_IMPL_CI_INTERFACE_GETTER10(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10) + +#define NS_IMPL_ISUPPORTS11_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10, _i11) \ + NS_IMPL_ADDREF(_class) \ + NS_IMPL_RELEASE(_class) \ + NS_IMPL_QUERY_INTERFACE11_CI(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10, _i11) \ + NS_IMPL_CI_INTERFACE_GETTER11(_class, _i1, _i2, _i3, _i4, _i5, _i6, _i7, \ + _i8, _i9, _i10, _i11) + +#define NS_INTERFACE_MAP_END_THREADSAFE NS_IMPL_QUERY_TAIL_GUTS + +#endif diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsUtils.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsUtils.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsUtils.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsISupportsUtils.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,230 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Pierre Phaneuf + * Scott Collins + * Dan Mosedale + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsISupportsUtils_h__ +#define nsISupportsUtils_h__ + +#ifndef nscore_h___ +#include "nscore.h" +#endif + +#ifndef nsISupportsBase_h__ +#include "nsISupportsBase.h" +#endif + +#ifndef nsError_h__ +#include "nsError.h" +#endif + +#ifndef nsDebug_h___ +#include "nsDebug.h" +#endif + +#ifndef nsISupportsImpl_h__ +#include "nsISupportsImpl.h" +#endif + +/** + * Macro for instantiating a new object that implements nsISupports. + * Note that you can only use this if you adhere to the no arguments + * constructor com policy (which you really should!). + * @param _result Where the new instance pointer is stored + * @param _type The type of object to call "new" with. + */ +#define NS_NEWXPCOM(_result,_type) \ + PR_BEGIN_MACRO \ + _result = new _type(); \ + PR_END_MACRO + +/** + * Macro for deleting an object that implements nsISupports. + * @param _ptr The object to delete. + */ +#define NS_DELETEXPCOM(_ptr) \ + PR_BEGIN_MACRO \ + delete (_ptr); \ + PR_END_MACRO + +/** + * Macro for adding a reference to an interface. + * @param _ptr The interface pointer. + */ +#define NS_ADDREF(_ptr) \ + (_ptr)->AddRef() + +/** + * Macro for adding a reference to this. This macro should be used + * because NS_ADDREF (when tracing) may require an ambiguous cast + * from the pointers primary type to nsISupports. This macro sidesteps + * that entire problem. + */ +#define NS_ADDREF_THIS() \ + AddRef() + + +extern "C++" { +// ...because some one is accidentally including this file inside +// an |extern "C"| + + +// Making this a |inline| |template| allows |expr| to be evaluated only once, +// yet still denies you the ability to |AddRef()| an |nsCOMPtr|. +template +inline +nsrefcnt +ns_if_addref( T expr ) +{ + return expr ? expr->AddRef() : 0; +} + +} /* extern "C++" */ + +/** + * Macro for adding a reference to an interface that checks for NULL. + * @param _expr The interface pointer. + */ +#define NS_IF_ADDREF(_expr) ns_if_addref(_expr) + +/* + * Given these declarations, it explicitly OK and efficient to end a `getter' with: + * + * NS_IF_ADDREF(*result = mThing); + * + * even if |mThing| is an |nsCOMPtr|. If |mThing| is an |nsCOMPtr|, however, it is still + * _illegal_ to say |NS_IF_ADDREF(mThing)|. + */ + +/** + * Macro for releasing a reference to an interface. + * @param _ptr The interface pointer. + */ +#define NS_RELEASE(_ptr) \ + PR_BEGIN_MACRO \ + (_ptr)->Release(); \ + (_ptr) = 0; \ + PR_END_MACRO + +/** + * Macro for releasing a reference to an interface. + * @param _ptr The interface pointer. + */ +#define NS_RELEASE_THIS() \ + Release() + +/** + * Macro for releasing a reference to an interface, except that this + * macro preserves the return value from the underlying Release call. + * The interface pointer argument will only be NULLed if the reference count + * goes to zero. + * + * @param _ptr The interface pointer. + */ +#define NS_RELEASE2(_ptr,_rv) \ + PR_BEGIN_MACRO \ + _rv = (_ptr)->Release(); \ + if (0 == (_rv)) (_ptr) = 0; \ + PR_END_MACRO + +/** + * Macro for releasing a reference to an interface that checks for NULL; + * @param _ptr The interface pointer. + */ +#define NS_IF_RELEASE(_ptr) \ + PR_BEGIN_MACRO \ + if (_ptr) { \ + (_ptr)->Release(); \ + (_ptr) = 0; \ + } \ + PR_END_MACRO + +/* + * Often you have to cast an implementation pointer, e.g., |this|, to an + * |nsISupports*|, but because you have multiple inheritance, a simple cast + * is ambiguous. One could simply say, e.g., (given a base |nsIBase|), + * |NS_STATIC_CAST(nsIBase*, this)|; but that disguises the fact that what + * you are really doing is disambiguating the |nsISupports|. You could make + * that more obvious with a double cast, e.g., |NS_STATIC_CAST(nsISupports*, + * NS_STATIC_CAST(nsIBase*, this))|, but that is bulky and harder to read... + * + * The following macro is clean, short, and obvious. In the example above, + * you would use it like this: |NS_ISUPPORTS_CAST(nsIBase*, this)|. + */ + +#define NS_ISUPPORTS_CAST(__unambiguousBase, __expr) \ + NS_STATIC_CAST(nsISupports*, NS_STATIC_CAST(__unambiguousBase, __expr)) + +extern "C++" { +// ...because some one is accidentally including this file inside +// an |extern "C"| + +class nsISupports; + +template +struct nsCOMTypeInfo +{ + static const nsIID& GetIID() { return T::GetIID(); } +}; + +NS_SPECIALIZE_TEMPLATE +struct nsCOMTypeInfo +{ + static const nsIID& GetIID() { + static const nsIID iid_NS_ISUPPORTS_IID = NS_ISUPPORTS_IID; return iid_NS_ISUPPORTS_IID; + } +}; + +#define NS_GET_IID(T) nsCOMTypeInfo::GetIID() + +// a type-safe shortcut for calling the |QueryInterface()| member function +template +inline +nsresult +CallQueryInterface( T* aSource, DestinationType** aDestination ) +{ + NS_PRECONDITION(aSource, "null parameter"); + NS_PRECONDITION(aDestination, "null parameter"); + + return aSource->QueryInterface(NS_GET_IID(DestinationType), + NS_REINTERPRET_CAST(void**, aDestination)); +} + +} // extern "C++" + +#endif /* __nsISupportsUtils_h */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIThreadManager.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIThreadManager.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsIThreadManager.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsIThreadManager.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,152 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsIThreadManager_h___ +#define nsIThreadManager_h___ + +#include "nsISupports.h" + +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +// Thread Manager +// This interface provides thread primitives. + +#define NS_ITHREADMANAGER_IID \ +{ /* 97bb54c0-6846-11d2-801f-00805f71101c */ \ + 0x97bb54c0, \ + 0x6846, \ + 0x11d2, \ + {0x80, 0x1f, 0x00, 0x80, 0x5f, 0x71, 0x10, 0x1c} \ +} + +class nsIRunnable; + +typedef struct _nsPluginThread nsPluginThread; + +class nsIThreadManager : public nsISupports { +public: + NS_DEFINE_STATIC_IID_ACCESSOR(NS_ITHREADMANAGER_IID) + + /** + * Returns a unique identifier for the "current" system thread. + */ + NS_IMETHOD + GetCurrentThread(nsPluginThread* *threadID) = 0; + + /** + * Pauses the current thread for the specified number of milliseconds. + * If milli is zero, then merely yields the CPU if another thread of + * greater or equal priority. + */ + NS_IMETHOD + Sleep(PRUint32 milli = 0) = 0; + + /** + * Creates a unique monitor for the specified address, and makes the + * current system thread the owner of the monitor. + */ + NS_IMETHOD + EnterMonitor(void* address) = 0; + + /** + * Exits the monitor associated with the address. + */ + NS_IMETHOD + ExitMonitor(void* address) = 0; + + /** + * Waits on the monitor associated with the address (must be entered already). + * If milli is 0, wait indefinitely. + */ + NS_IMETHOD + Wait(void* address, PRUint32 milli = 0) = 0; + + /** + * Notifies a single thread waiting on the monitor associated with the address (must be entered already). + */ + NS_IMETHOD + Notify(void* address) = 0; + + /** + * Notifies all threads waiting on the monitor associated with the address (must be entered already). + */ + NS_IMETHOD + NotifyAll(void* address) = 0; + + /** + * Creates a new thread, calling the specified runnable's Run method (a la Java). + */ + NS_IMETHOD + CreateThread(PRUint32* threadID, nsIRunnable* runnable) = 0; + + /** + * Posts an event to specified thread, calling the runnable from that thread. + * @param threadID thread to call runnable from + * @param runnable object to invoke from thread + * @param async if true, won't block current thread waiting for result + */ + NS_IMETHOD + PostEvent(PRUint32 threadID, nsIRunnable* runnable, PRBool async) = 0; +}; + +//////////////////////////////////////////////////////////////////////////////// + +//////////////////////////////////////////////////////////////////////////////// +// Runnable +// This interface represents the invocation of a new thread. + +#define NS_IRUNNABLE_IID \ +{ /* 930f3d70-6849-11d2-801f-00805f71101c */ \ + 0x930f3d70, \ + 0x6849, \ + 0x11d2, \ + {0x80, 0x1f, 0x00, 0x80, 0x5f, 0x71, 0x10, 0x1c} \ +} + +class nsIRunnable : public nsISupports { +public: + NS_DEFINE_STATIC_IID_ACCESSOR(NS_IRUNNABLE_IID) + + /** + * Defines an entry point for a newly created thread. + */ + NS_IMETHOD + Run() = 0; +}; + +#endif /* nsIThreadManager_h___ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsTraceRefcnt.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsTraceRefcnt.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsTraceRefcnt.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsTraceRefcnt.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,135 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Communicator client code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * L. David Baron + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ +#ifndef nsTraceRefcnt_h___ +#define nsTraceRefcnt_h___ + +#include "nscore.h" + +class nsISupports; + +// By default refcnt logging is not part of the build. +#undef NS_BUILD_REFCNT_LOGGING + +#if (defined(DEBUG) || defined(FORCE_BUILD_REFCNT_LOGGING)) +// Make refcnt logging part of the build. This doesn't mean that +// actual logging will occur (that requires a separate enable; see +// nsTraceRefcnt.h for more information). +#define NS_BUILD_REFCNT_LOGGING 1 +#endif + +// If NO_BUILD_REFCNT_LOGGING is defined then disable refcnt logging +// in the build. This overrides FORCE_BUILD_REFCNT_LOGGING. +#if defined(NO_BUILD_REFCNT_LOGGING) +#undef NS_BUILD_REFCNT_LOGGING +#endif + +#ifdef NS_BUILD_REFCNT_LOGGING + +#define NS_LOG_ADDREF(_p, _rc, _type, _size) \ + nsTraceRefcnt::LogAddRef((_p), (_rc), (_type), (PRUint32) (_size)) + +#define NS_LOG_RELEASE(_p, _rc, _type) \ + nsTraceRefcnt::LogRelease((_p), (_rc), (_type)) + +#define MOZ_DECL_CTOR_COUNTER(_type) + +#define MOZ_COUNT_CTOR(_type) \ +PR_BEGIN_MACRO \ + nsTraceRefcnt::LogCtor((void*)this, #_type, sizeof(*this)); \ +PR_END_MACRO + +#define MOZ_COUNT_DTOR(_type) \ +PR_BEGIN_MACRO \ + nsTraceRefcnt::LogDtor((void*)this, #_type, sizeof(*this)); \ +PR_END_MACRO + +#ifdef HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR // from autoconf (XXX needs to be + // set for non-autoconf platforms) + +// nsCOMPtr.h allows these macros to be defined by clients +// These logging functions require dynamic_cast, so we don't +// define these macros if we don't have dynamic_cast. +#define NSCAP_LOG_ASSIGNMENT(_c, _p) \ + if (_p) \ + nsTraceRefcnt::LogAddCOMPtr((_c),NS_STATIC_CAST(nsISupports*,_p)) + +#define NSCAP_LOG_RELEASE(_c, _p) \ + if (_p) \ + nsTraceRefcnt::LogReleaseCOMPtr((_c), NS_STATIC_CAST(nsISupports*,_p)) + +#endif /* HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR */ + +#else /* !NS_BUILD_REFCNT_LOGGING */ + +#define NS_LOG_ADDREF(_p, _rc, _type, _size) +#define NS_LOG_RELEASE(_p, _rc, _type) +#define MOZ_DECL_CTOR_COUNTER(_type) +#define MOZ_COUNT_CTOR(_type) +#define MOZ_COUNT_DTOR(_type) + +#endif /* NS_BUILD_REFCNT_LOGGING */ + +//---------------------------------------------------------------------- + +/** + * Note: The implementations for these methods are no-ops in a build + * where NS_BUILD_REFCNT_LOGGING is disabled. + */ +class nsTraceRefcnt { +public: + static NS_COM void LogAddRef(void* aPtr, + nsrefcnt aNewRefCnt, + const char* aTypeName, + PRUint32 aInstanceSize); + + static NS_COM void LogRelease(void* aPtr, + nsrefcnt aNewRefCnt, + const char* aTypeName); + + static NS_COM void LogCtor(void* aPtr, const char* aTypeName, + PRUint32 aInstanceSize); + + static NS_COM void LogDtor(void* aPtr, const char* aTypeName, + PRUint32 aInstanceSize); + + static NS_COM void LogAddCOMPtr(void *aCOMPtr, nsISupports *aObject); + + static NS_COM void LogReleaseCOMPtr(void *aCOMPtr, nsISupports *aObject); + +}; +#endif /* nsTraceRefcnt_h___ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOM.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOM.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOM.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOM.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,204 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsXPCOM_h__ +#define nsXPCOM_h__ + +#include "nscore.h" +#include "nsXPCOMCID.h" + +class nsAString; +class nsACString; + +class nsIComponentManager; +class nsIComponentRegistrar; +class nsIServiceManager; +class nsIFile; +class nsILocalFile; +class nsIDirectoryServiceProvider; +class nsIMemory; +class nsIDebug; +class nsITraceRefcnt; + +/** + * Initialises XPCOM. You must call this method before proceeding + * to use xpcom. The one exception is that you may call + * NS_NewLocalFile to create a nsIFile. + * + * @status FROZEN + * + * @note Use NS_NewLocalFile or NS_NewNativeLocalFile + * to create the file object you supply as the bin directory path in this + * call. The function may be safely called before the rest of XPCOM or + * embedding has been initialised. + * + * @param result The service manager. You may pass null. + * + * @param abinDirectory The directory containing the component + * registry and runtime libraries; + * or use nsnull to use the working + * directory. + * + * @param aAppFileLocProvider The object to be used by Gecko that specifies + * to Gecko where to find profiles, the component + * registry preferences and so on; or use + * nsnull for the default behaviour. + * + * @see NS_NewLocalFile + * @see nsILocalFile + * @see nsIDirectoryServiceProvider + * + * @return NS_OK for success; + * NS_ERROR_NOT_INITIALIZED if static globals were not initialied, which + * can happen if XPCOM is reloaded, but did not completly shutdown. + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_InitXPCOM2(nsIServiceManager* *result, + nsIFile* binDirectory, + nsIDirectoryServiceProvider* appFileLocationProvider); +/** + * Shutdown XPCOM. You must call this method after you are finished + * using xpcom. + * + * @status FROZEN + * + * @param servMgr The service manager which was returned by NS_InitXPCOM2. + * This will release servMgr. You may pass null. + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_ShutdownXPCOM(nsIServiceManager* servMgr); + + +/** + * Public Method to access to the service manager. + * + * @status FROZEN + * @param result Interface pointer to the service manager + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetServiceManager(nsIServiceManager* *result); + +/** + * Public Method to access to the component manager. + * + * @status FROZEN + * @param result Interface pointer to the service + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetComponentManager(nsIComponentManager* *result); + +/** + * Public Method to access to the component registration manager. + * + * @status FROZEN + * @param result Interface pointer to the service + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetComponentRegistrar(nsIComponentRegistrar* *result); + +/** + * Public Method to access to the memory manager. See nsIMemory + * + * @status FROZEN + * @param result Interface pointer to the memory manager + * + * @return NS_OK for success; + * other error codes indicate a failure during initialisation. + * + */ +extern "C" NS_COM nsresult +NS_GetMemoryManager(nsIMemory* *result); + +/** + * Public Method to create an instance of a nsILocalFile. This function + * may be called prior to NS_InitXPCOM2. + * + * @status FROZEN + * + * @param filePath + * A string which specifies a full file path to a + * location. Relative paths will be treated as an + * error (NS_ERROR_FILE_UNRECOGNIZED_PATH). + * |NS_NewNativeLocalFile|'s path must be in the + * filesystem charset. + * @param followLinks + * This attribute will determine if the nsLocalFile will auto + * resolve symbolic links. By default, this value will be false + * on all non unix systems. On unix, this attribute is effectively + * a noop. + * @param result Interface pointer to a new instance of an nsILocalFile + * + * @return NS_OK for success; + * other error codes indicate a failure. + */ + +extern "C" NS_COM nsresult +NS_NewLocalFile(const nsAString &path, + PRBool followLinks, + nsILocalFile* *result); + +extern "C" NS_COM nsresult +NS_NewNativeLocalFile(const nsACString &path, + PRBool followLinks, + nsILocalFile* *result); + + +extern "C" NS_COM nsresult +NS_GetDebug(nsIDebug* *result); + +extern "C" NS_COM nsresult +NS_GetTraceRefcnt(nsITraceRefcnt* *result); + +#endif diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOMCID.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOMCID.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOMCID.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsXPCOMCID.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,174 @@ +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsXPCOMCID_h__ +#define nsXPCOMCID_h__ + +/** + * XPCOM Directory Service Contract ID + * The directory service provides ways to obtain file system locations. The + * directory service is a singleton. + * + * This contract supports the nsIDirectoryService and the nsIProperties + * interfaces. + * + */ +#define NS_DIRECTORY_SERVICE_CONTRACTID "@mozilla.org/file/directory_service;1" + +/** + * XPCOM File + * The file abstraction provides ways to obtain and access files and + * directories located on the local system. + * + * This contract supports the nsIFile interface and the nsILocalFile interface. + * This contract may also support platform specific interfaces such as + * nsILocalFileMac on platforms where additional interfaces are required. + * + */ +#define NS_LOCAL_FILE_CONTRACTID "@mozilla.org/file/local;1" + +/** + * XPCOM Category Manager Contract ID + * The contract supports the nsICategoryManager interface. The + * category manager is a singleton. + */ +#define NS_CATEGORYMANAGER_CONTRACTID "@mozilla.org/categorymanager;1" + +/** + * XPCOM Properties Object Contract ID + * Simple mapping object which supports the nsIProperties interface. + */ +#define NS_PROPERTIES_CONTRACTID "@mozilla.org/properties;1" + +/** + * XPCOM Array Object ContractID + * Simple array implementation which supports the nsIArray and + * nsIMutableArray interfaces. + */ +#define NS_ARRAY_CONTRACTID "@mozilla.org/array;1" + +/** + * The following are the CIDs and Contract IDs of the nsISupports wrappers for + * primative types. + */ +#define NS_SUPPORTS_ID_CID \ +{ 0xacf8dc40, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_ID_CONTRACTID "@mozilla.org/supports-id;1" + +#define NS_SUPPORTS_CSTRING_CID \ +{ 0xacf8dc41, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_CSTRING_CONTRACTID "@mozilla.org/supports-cstring;1" + +#define NS_SUPPORTS_STRING_CID \ +{ 0xacf8dc42, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_STRING_CONTRACTID "@mozilla.org/supports-string;1" + +#define NS_SUPPORTS_PRBOOL_CID \ +{ 0xacf8dc43, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRBOOL_CONTRACTID "@mozilla.org/supports-PRBool;1" + +#define NS_SUPPORTS_PRUINT8_CID \ +{ 0xacf8dc44, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT8_CONTRACTID "@mozilla.org/supports-PRUint8;1" + +#define NS_SUPPORTS_PRUINT16_CID \ +{ 0xacf8dc46, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT16_CONTRACTID "@mozilla.org/supports-PRUint16;1" + +#define NS_SUPPORTS_PRUINT32_CID \ +{ 0xacf8dc47, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT32_CONTRACTID "@mozilla.org/supports-PRUint32;1" + +#define NS_SUPPORTS_PRUINT64_CID \ +{ 0xacf8dc48, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRUINT64_CONTRACTID "@mozilla.org/supports-PRUint64;1" + +#define NS_SUPPORTS_PRTIME_CID \ +{ 0xacf8dc49, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRTIME_CONTRACTID "@mozilla.org/supports-PRTime;1" + +#define NS_SUPPORTS_CHAR_CID \ +{ 0xacf8dc4a, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_CHAR_CONTRACTID "@mozilla.org/supports-char;1" + +#define NS_SUPPORTS_PRINT16_CID \ +{ 0xacf8dc4b, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRINT16_CONTRACTID "@mozilla.org/supports-PRInt16;1" + +#define NS_SUPPORTS_PRINT32_CID \ +{ 0xacf8dc4c, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRINT32_CONTRACTID "@mozilla.org/supports-PRInt32;1" + +#define NS_SUPPORTS_PRINT64_CID \ +{ 0xacf8dc4d, 0x4a25, 0x11d3, \ +{ 0x98, 0x90, 0x0, 0x60, 0x8, 0x96, 0x24, 0x22 } } +#define NS_SUPPORTS_PRINT64_CONTRACTID "@mozilla.org/supports-PRInt64;1" + +#define NS_SUPPORTS_FLOAT_CID \ +{ 0xcbf86870, 0x4ac0, 0x11d3, \ +{ 0xba, 0xea, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } } +#define NS_SUPPORTS_FLOAT_CONTRACTID "@mozilla.org/supports-float;1" + +#define NS_SUPPORTS_DOUBLE_CID \ +{ 0xcbf86871, 0x4ac0, 0x11d3, \ +{ 0xba, 0xea, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } } +#define NS_SUPPORTS_DOUBLE_CONTRACTID "@mozilla.org/supports-double;1" + +#define NS_SUPPORTS_VOID_CID \ +{ 0xaf10f3e0, 0x568d, 0x11d3, \ +{ 0xba, 0xf8, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } } +#define NS_SUPPORTS_VOID_CONTRACTID "@mozilla.org/supports-void;1" + +#define NS_SUPPORTS_INTERFACE_POINTER_CID \ +{ 0xA99FEBBA, 0x1DD1, 0x11B2, \ +{ 0xA9, 0x43, 0xB0, 0x23, 0x34, 0xA6, 0xD0, 0x83 } } +#define NS_SUPPORTS_INTERFACE_POINTER_CONTRACTID "@mozilla.org/supports-interface-pointer;1" + + +#endif diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nscore.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nscore.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nscore.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nscore.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,394 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ +#ifndef nscore_h___ +#define nscore_h___ + +/** + * Make sure that we have the proper platform specific + * c++ definitions needed by nscore.h + */ +#ifndef _XPCOM_CONFIG_H_ +#include "xpcom-config.h" +#endif + +/** + * Incorporate the core NSPR data types which XPCOM uses. + */ +#include "prtypes.h" + +/* Core XPCOM declarations. */ + +/** + * Macros defining the target platform... + */ +#ifdef _WIN32 +#define NS_WIN32 1 + +#elif defined(__unix) +#define NS_UNIX 1 + +#elif defined(XP_OS2) +#define NS_OS2 1 +#endif +/*----------------------------------------------------------------------*/ +/* Import/export defines */ + +/** + * Using the visibility("hidden") attribute allows the compiler to use + * PC-relative addressing to call this function. If a function does not + * access any global data, and does not call any methods which are not either + * file-local or hidden, then on ELF systems we avoid loading the address of + * the PLT into a register at the start of the function, which reduces code + * size and frees up a register for general use. + * + * As a general rule, this should be used for any non-exported symbol + * (including virtual method implementations). NS_IMETHOD uses this by + * default; if you need to have your NS_IMETHOD functions exported, you can + * wrap your class as follows: + * + * #undef IMETHOD_VISIBILITY + * #define IMETHOD_VISIBILITY NS_VISIBILITY_DEFAULT + * + * class Foo { + * ... + * }; + * + * #undef IMETHOD_VISIBILITY + * #define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN + * + * Don't forget to change the visibility back to hidden before the end + * of a header! + * + * Other examples: + * + * NS_HIDDEN_(int) someMethod(); + * SomeCtor() NS_HIDDEN; + */ + +#ifdef HAVE_VISIBILITY_ATTRIBUTE +#define NS_VISIBILITY_HIDDEN __attribute__ ((visibility ("hidden"))) +#define NS_VISIBILITY_DEFAULT + +#define NS_HIDDEN_(type) NS_VISIBILITY_HIDDEN type +#else +#define NS_VISIBILITY_HIDDEN +#define NS_VISIBILITY_DEFAULT + +#define NS_HIDDEN_(type) type +#endif + +#define NS_HIDDEN NS_VISIBILITY_HIDDEN + +#undef IMETHOD_VISIBILITY +#define IMETHOD_VISIBILITY NS_VISIBILITY_HIDDEN + +#ifdef NS_WIN32 + +#define NS_IMPORT __declspec(dllimport) +#define NS_IMPORT_(type) type __declspec(dllimport) __stdcall +#define NS_EXPORT __declspec(dllexport) +#define NS_EXPORT_(type) type __declspec(dllexport) __stdcall +#define NS_IMETHOD_(type) virtual type __stdcall +#define NS_IMETHODIMP_(type) type __stdcall +#define NS_METHOD_(type) type __stdcall +#define NS_CALLBACK_(_type, _name) _type (__stdcall * _name) +#define NS_STDCALL __stdcall + +#elif defined(XP_MAC) + +#define NS_IMPORT +#define NS_IMPORT_(type) type +#define NS_EXPORT __declspec(export) +#define NS_EXPORT_(type) __declspec(export) type +#define NS_IMETHOD_(type) virtual type +#define NS_IMETHODIMP_(type) type +#define NS_METHOD_(type) type +#define NS_CALLBACK_(_type, _name) _type (* _name) +#define NS_STDCALL + +#else + +#define NS_IMPORT +#define NS_IMPORT_(type) type +#define NS_EXPORT +#define NS_EXPORT_(type) type +#define NS_IMETHOD_(type) virtual IMETHOD_VISIBILITY type +#define NS_IMETHODIMP_(type) type +#define NS_METHOD_(type) type +#define NS_CALLBACK_(_type, _name) _type (* _name) +#define NS_STDCALL +#endif + +/** + * Macro for creating typedefs for pointer-to-member types which are + * declared with stdcall. It is important to use this for any type which is + * declared as stdcall (i.e. NS_IMETHOD). For example, instead of writing: + * + * typedef nsresult (nsIFoo::*someType)(nsISupports* arg); + * + * you should write: + * + * typedef + * NS_STDCALL_FUNCPROTO(nsresult, someType, nsIFoo, typeFunc, (nsISupports*)); + * + * where nsIFoo::typeFunc is any method declared as + * NS_IMETHOD typeFunc(nsISupports*); + * + * XXX this can be simplified to always use the non-typeof implementation + * when http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11893 is fixed. + */ + +#ifdef __GNUC__ +#define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \ + typeof(&class::func) name +#else +#define NS_STDCALL_FUNCPROTO(ret, name, class, func, args) \ + ret (NS_STDCALL class::*name) args +#endif + +/** + * Generic API modifiers which return the standard XPCOM nsresult type + */ +#define NS_IMETHOD NS_IMETHOD_(nsresult) +#define NS_IMETHODIMP NS_IMETHODIMP_(nsresult) +#define NS_METHOD NS_METHOD_(nsresult) +#define NS_CALLBACK(_name) NS_CALLBACK_(nsresult, _name) + +/** + * Import/Export macros for XPCOM APIs + */ + +#ifdef _IMPL_NS_COM +#define NS_COM NS_EXPORT +#elif _IMPL_NS_COM_OFF +#define NS_COM +#elif XPCOM_GLUE +#define NS_COM +#else +#define NS_COM NS_IMPORT +#endif + +/** + * NS_NO_VTABLE is emitted by xpidl in interface declarations whenever + * xpidl can determine that the interface can't contain a constructor. + * This results in some space savings and possible runtime savings - + * see bug 49416. We undefine it first, as xpidl-generated headers + * define it for IDL uses that don't include this file. + */ +#ifdef NS_NO_VTABLE +#undef NS_NO_VTABLE +#endif +#if defined(_MSC_VER) && _MSC_VER >= 1100 +#define NS_NO_VTABLE __declspec(novtable) +#else +#define NS_NO_VTABLE +#endif + + +/** + * Generic XPCOM result data type + */ +typedef PRUint32 nsresult; + +/** + * The preferred symbol for null. + */ +#define nsnull 0 + +#include "nsError.h" + +/* ------------------------------------------------------------------------ */ +/* Casting macros for hiding C++ features from older compilers */ + + /* + All our compiler support template specialization, but not all support the + |template <>| notation. The compiler that don't understand this notation + just omit it for specialization. + + Need to add an autoconf test for this. + */ + + /* under Metrowerks (Mac), we don't have autoconf yet */ +#ifdef __MWERKS__ + #define HAVE_CPP_PARTIAL_SPECIALIZATION + #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX + + #define HAVE_CPP_ACCESS_CHANGING_USING + #define HAVE_CPP_AMBIGUITY_RESOLVING_USING + #define HAVE_CPP_EXPLICIT + #define HAVE_CPP_TYPENAME + #define HAVE_CPP_BOOL + #define HAVE_CPP_NAMESPACE_STD + #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL + #define HAVE_CPP_2BYTE_WCHAR_T +#endif + + /* under VC++ (Windows), we don't have autoconf yet */ +#if defined(_MSC_VER) && (_MSC_VER>=1100) + /* VC++ 5.0 and greater implement template specialization, 4.2 is unknown */ + #define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX + + #define HAVE_CPP_EXPLICIT + #define HAVE_CPP_TYPENAME + #define HAVE_CPP_ACCESS_CHANGING_USING + + #if (_MSC_VER==1100) + /* VC++5.0 has an internal compiler error (sometimes) without this */ + #undef HAVE_CPP_ACCESS_CHANGING_USING + #endif + + #define HAVE_CPP_NAMESPACE_STD + #define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL + #define HAVE_CPP_2BYTE_WCHAR_T +#endif + +#ifndef __PRUNICHAR__ +#define __PRUNICHAR__ + /* For now, don't use wchar_t on Unix because it breaks the Netscape + * commercial build. When this is fixed there will be no need for the + * |NS_REINTERPRET_CAST| in nsLiteralString.h either. + */ + #if defined(HAVE_CPP_2BYTE_WCHAR_T) && (defined(NS_WIN32) || defined(XP_MAC)) + typedef wchar_t PRUnichar; + #else + typedef PRUint16 PRUnichar; + #endif +#endif + + /* + If the compiler doesn't support |explicit|, we'll just make it go away, trusting + that the builds under compilers that do have it will keep us on the straight and narrow. + */ +#ifndef HAVE_CPP_EXPLICIT + #define explicit +#endif + +#ifndef HAVE_CPP_TYPENAME + #define typename +#endif + +#ifdef HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX + #define NS_SPECIALIZE_TEMPLATE template <> +#else + #define NS_SPECIALIZE_TEMPLATE +#endif + +/* unix and beos now determine this automatically */ +#if ! defined XP_UNIX && ! defined XP_BEOS && !defined(XP_OS2) +#ifndef HAVE_CPP_NEW_CASTS +#define HAVE_CPP_NEW_CASTS 1 /* we'll be optimistic. */ +#endif +#endif + +#if defined(HAVE_CPP_NEW_CASTS) +#define NS_STATIC_CAST(__type, __ptr) static_cast< __type >(__ptr) +#define NS_CONST_CAST(__type, __ptr) const_cast< __type >(__ptr) + +#define NS_REINTERPRET_POINTER_CAST(__type, __ptr) reinterpret_cast< __type >(__ptr) +#define NS_REINTERPRET_NONPOINTER_CAST(__type, __obj) reinterpret_cast< __type >(__obj) +#define NS_REINTERPRET_CAST(__type, __expr) reinterpret_cast< __type >(__expr) + +#else +#define NS_STATIC_CAST(__type, __ptr) ((__type)(__ptr)) +#define NS_CONST_CAST(__type, __ptr) ((__type)(__ptr)) + +#define NS_REINTERPRET_POINTER_CAST(__type, __ptr) ((__type)((void*)(__ptr))) +#define NS_REINTERPRET_NONPOINTER_CAST(__type, __obj) ((__type)(__obj)) + + /* Note: the following is only appropriate for pointers. */ +#define NS_REINTERPRET_CAST(__type, __expr) NS_REINTERPRET_POINTER_CAST(__type, __expr) + /* + Why cast to a |void*| first? Well, when old-style casting from + a pointer to a base to a pointer to a derived class, the cast will be + ambiguous if the source pointer type appears multiple times in the + destination, e.g., + + class Base {}; + class Derived : public Base, public Base {}; + + void foo( Base* b ) + { + ((Derived*)b)->some_derived_member ... // Error: Ambiguous, expand from which |Base|? + } + + an old-style cast (like |static_cast|) will change the pointer, but + here, doesn't know how. The cast to |void*| prevents it from thinking + it needs to expand the original pointer. + + The cost is, |NS_REINTERPRET_CAST| is no longer appropriate for non-pointer + conversions. Also, mis-applying |NS_REINTERPRET_CAST| to cast |this| to something + will still expand the pointer to the outer object in standards complying compilers. + */ + + /* + No sense in making an NS_DYNAMIC_CAST() macro: you can't duplicate + the semantics. So if you want to dynamic_cast, then just use it + "straight", no macro. + */ +#endif + +/* + * Use these macros to do 64bit safe pointer conversions. + */ + +#define NS_PTR_TO_INT32(x) ((char *)(x) - (char *)0) +#define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x))) + +/* + * These macros allow you to give a hint to the compiler about branch + * probability so that it can better optimize. Use them like this: + * + * if (NS_LIKELY(v == 1)) { + * ... expected code path ... + * } + * + * if (NS_UNLIKELY(v == 0)) { + * ... non-expected code path ... + * } + * + */ + +#if defined(__GNUC__) && (__GNUC__ > 2) +#define NS_LIKELY(x) (__builtin_expect((x), 1)) +#define NS_UNLIKELY(x) (__builtin_expect((x), 0)) +#else +#define NS_LIKELY(x) (x) +#define NS_UNLIKELY(x) (x) +#endif + +#endif /* nscore_h___ */ + diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsplugin.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsplugin.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsplugin.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsplugin.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,184 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +//////////////////////////////////////////////////////////////////////////////// +/** + * INTERFACE TO NETSCAPE COMMUNICATOR PLUGINS (NEW C++ API). + * + *

This superscedes the old plugin API (npapi.h, npupp.h), and + * eliminates the need for glue files: npunix.c, npwin.cpp and npmac.cpp that + * get linked with the plugin. You will however need to link with the "backward + * adapter" (badapter.cpp) in order to allow your plugin to run in pre-5.0 + * browsers. + * + *

This is the master header file that includes most of the other headers + * you'll need to write a plugin. + */ +//////////////////////////////////////////////////////////////////////////////// + +/** + * The following diagram depicts the relationships between various objects + * implementing the new plugin interfaces. QueryInterface can be used to switch + * between interfaces in the same box: + * + * + * the plugin (only 1) + * +----------------------+ + * | nsIPlugin or |<- - - - - -NSGetFactory() + * +----------------------+ + * | + * | + * | instances (many) + * | +-------------------+ + * | | nsIPluginInstance |+ + * | +-------------------+| + * | +------|-----------+ + * | | + * | PLUGIN SIDE |peer + *~~~~|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + * | BROWSER SIDE | + * | v + * | +---------------------------------+ + * | | nsIPluginInstancePeer |+ + * | | nsIWindowlessPluginInstancePeer || + * | | nsIPluginTagInfo || + * | | nsIPluginTagInfo2 || + * | +---------------------------------+| + * | +--------------------------------+ + * | + * | + * v the browser (only 1) + * +---------------------+ + * | nsIPluginManager | + * | nsIPluginManager2 | + * | nsIFileUtilities | + * | nsIPref | + * | nsICacheManager ... | + * +---------------------+ + */ + +#ifndef nsplugins_h___ +#define nsplugins_h___ +#include "nsIComponentManager.h" // for NSGetFactory + +//////////////////////////////////////////////////////////////////////////////// +/** + * Interfaces which must be implemented by a plugin + * These interfaces have NPP equivalents in pre-5.0 browsers (see npapi.h). + */ + +/** + * A plugin object is used to create new plugin instances. It manages the + * global state of all plugins with the same implementation. + */ +#include "nsIPlugin.h" + +/** + * A plugin instance represents a particular activation of a plugin on a page. + */ +#include "nsIPluginInstance.h" + +//////////////////////////////////////////////////////////////////////////////// +/** + * Interfaces implemented by the browser: + * These interfaces have NPN equivalents in pre-5.0 browsers (see npapi.h). + */ +//////////////////////////////////////////////////////////////////////////////// + +/** + * The plugin manager which is the main point of interaction with the browser + * and provides general operations needed by a plugin. + */ +#include "nsIPluginManager.h" + +/** + * A plugin instance peer gets created by the browser and associated with each + * plugin instance to represent tag information and other callbacks needed by + * the plugin instance. + */ +#include "nsIPluginInstancePeer.h" + +/** + * The nsIPluginTagInfo interface provides information about the html tag + * that was used to instantiate the plugin instance. + * + * To obtain: QueryInterface on nsIPluginInstancePeer + */ +#include "nsIPluginTagInfo.h" + +/** + * The nsIWindowlessPluginInstancePeer provides additional operations for + * windowless plugins. + * + * To obtain: QueryInterface on nsIPluginInstancePeer + */ +#include "nsIWindowlessPlugInstPeer.h" + +//////////////////////////////////////////////////////////////////////////////// +/** + * Interfaces implemented by the browser (new for 5.0): + */ +//////////////////////////////////////////////////////////////////////////////// + +/** + * The nsIPluginManager2 interface provides additional plugin manager features + * only available in Communicator 5.0. + * + * To obtain: QueryInterface on nsIPluginManager + */ +#include "nsIPluginManager2.h" + +/** + * The nsIFileUtilities interface provides operations to manage temporary + * files and directories. + * + * To obtain: QueryInterface on nsIPluginManager + */ +#include "nsIFileUtilities.h" + +/** + * The nsIPluginTagInfo2 interface provides additional html tag information + * only available in Communicator 5.0. + * + * To obtain: QueryInterface on nsIPluginTagInfo + */ +#include "nsIPluginTagInfo2.h" + +#include "nsIOutputStream.h" + +//////////////////////////////////////////////////////////////////////////////// +#endif // nsplugins_h___ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsplugindefs.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsplugindefs.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsplugindefs.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsplugindefs.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,394 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: NPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Netscape Public License + * Version 1.1 (the "License"); you may not use this file except in + * compliance with the License. You may obtain a copy of the License at + * http://www.mozilla.org/NPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is mozilla.org code. + * + * The Initial Developer of the Original Code is + * Netscape Communications Corporation. + * Portions created by the Initial Developer are Copyright (C) 1998 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the NPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the NPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +#ifndef nsplugindefs_h___ +#define nsplugindefs_h___ + +#if defined(XP_OS2) || defined(__OS2__) +#define INCL_BASE +#define INCL_PM +#include +#pragma pack(1) +#endif + +#ifndef prtypes_h___ +#include "prtypes.h" +#endif + +#if defined(XP_MAC) || defined(XP_MACOSX) +# include +# include +# include +#endif + +#if defined(XP_UNIX) && defined(MOZ_X11) +# include +# include +#endif + +#if defined(XP_WIN) +# include +#endif + +//////////////////////////////////////////////////////////////////////////////// + +/* The OS/2 version of Netscape uses RC_DATA to define the + mime types, file extensions, etc that are required. + Use a vertical bar to separate types, end types with \0. + FileVersion and ProductVersion are 32bit ints, all other + entries are strings the MUST be terminated wwith a \0. + +AN EXAMPLE: + +RCDATA NS_INFO_ProductVersion { 1,0,0,1,} + +RCDATA NS_INFO_MIMEType { "video/x-video|", + "video/x-flick\0" } +RCDATA NS_INFO_FileExtents { "avi|", + "flc\0" } +RCDATA NS_INFO_FileOpenName{ "MMOS2 video player(*.avi)|", + "MMOS2 Flc/Fli player(*.flc)\0" } + +RCDATA NS_INFO_FileVersion { 1,0,0,1 } +RCDATA NS_INFO_CompanyName { "Netscape Communications\0" } +RCDATA NS_INFO_FileDescription { "NPAVI32 Extension DLL\0" +RCDATA NS_INFO_InternalName { "NPAVI32\0" ) +RCDATA NS_INFO_LegalCopyright { "Copyright Netscape Communications \251 1996\0" +RCDATA NS_INFO_OriginalFilename { "NVAPI32.DLL" } +RCDATA NS_INFO_ProductName { "NPAVI32 Dynamic Link Library\0" } + +*/ + + +/* RC_DATA types for version info - required */ +#define NS_INFO_ProductVersion 1 +#define NS_INFO_MIMEType 2 +#define NS_INFO_FileOpenName 3 +#define NS_INFO_FileExtents 4 + +/* RC_DATA types for version info - used if found */ +#define NS_INFO_FileDescription 5 +#define NS_INFO_ProductName 6 + +/* RC_DATA types for version info - optional */ +#define NS_INFO_CompanyName 7 +#define NS_INFO_FileVersion 8 +#define NS_INFO_InternalName 9 +#define NS_INFO_LegalCopyright 10 +#define NS_INFO_OriginalFilename 11 + +#ifndef RC_INVOKED + +//////////////////////////////////////////////////////////////////////////////// +// Structures and definitions + +#ifdef XP_MAC +#pragma options align=mac68k +#endif + +typedef const char* nsMIMEType; + +struct nsByteRange { + PRInt32 offset; /* negative offset means from the end */ + PRUint32 length; + struct nsByteRange* next; +}; + +struct nsPluginRect { + PRUint16 top; + PRUint16 left; + PRUint16 bottom; + PRUint16 right; +}; + +//////////////////////////////////////////////////////////////////////////////// +// Unix specific structures and definitions + +#ifdef XP_UNIX + +#include + +/* + * Callback Structures. + * + * These are used to pass additional platform specific information. + */ +enum nsPluginCallbackType { + nsPluginCallbackType_SetWindow = 1, + nsPluginCallbackType_Print +}; + +struct nsPluginAnyCallbackStruct { + PRInt32 type; +}; + +#ifdef MOZ_X11 +struct nsPluginSetWindowCallbackStruct { + PRInt32 type; + Display* display; + Visual* visual; + Colormap colormap; + PRUint32 depth; +}; +#else +struct nsPluginSetWindowCallbackStruct { + PRInt32 type; +}; +#endif + + +struct nsPluginPrintCallbackStruct { + PRInt32 type; + FILE* fp; +}; + +#endif /* XP_UNIX */ + +//////////////////////////////////////////////////////////////////////////////// + +// List of variables which should be implmented by the plugin +enum nsPluginVariable { + nsPluginVariable_NameString = 1, + nsPluginVariable_DescriptionString = 2 +}; + +enum nsPluginManagerVariable { + nsPluginManagerVariable_XDisplay = 1, + nsPluginManagerVariable_XtAppContext = 2, + nsPluginManagerVariable_SupportsXEmbed = 14 +}; + +enum nsPluginInstancePeerVariable { + nsPluginInstancePeerVariable_NetscapeWindow = 3 +// nsPluginInstancePeerVariable_JavaClass = 5, +// nsPluginInstancePeerVariable_TimerInterval = 7 +}; + +enum nsPluginInstanceVariable { + nsPluginInstanceVariable_WindowlessBool = 3, + nsPluginInstanceVariable_TransparentBool = 4, + nsPluginInstanceVariable_DoCacheBool = 5, + nsPluginInstanceVariable_CallSetWindowAfterDestroyBool = 6, + nsPluginInstanceVariable_ScriptableInstance = 10, + nsPluginInstanceVariable_ScriptableIID = 11, + nsPluginInstanceVariable_NeedsXEmbed = 14 +}; + +//////////////////////////////////////////////////////////////////////////////// + +enum nsPluginMode { + nsPluginMode_Embedded = 1, + nsPluginMode_Full +}; + +// XXX this can go away now +enum nsPluginStreamType { + nsPluginStreamType_Normal = 1, + nsPluginStreamType_Seek, + nsPluginStreamType_AsFile, + nsPluginStreamType_AsFileOnly +}; + +/* + * The type of a nsPluginWindow - it specifies the type of the data structure + * returned in the window field. + */ +enum nsPluginWindowType { + nsPluginWindowType_Window = 1, + nsPluginWindowType_Drawable +}; + +#if defined(XP_MAC) || defined(XP_MACOSX) + +struct nsPluginPort { + CGrafPtr port; /* Grafport */ + PRInt32 portx; /* position inside the topmost window */ + PRInt32 porty; +}; +typedef RgnHandle nsPluginRegion; +typedef WindowRef nsPluginPlatformWindowRef; + +#elif defined(XP_WIN) || defined(XP_OS2) + +struct nsPluginPort; +typedef HRGN nsPluginRegion; +typedef HWND nsPluginPlatformWindowRef; + +#elif defined(XP_UNIX) && defined(MOZ_X11) + +struct nsPluginPort; +typedef Region nsPluginRegion; +typedef Drawable nsPluginPlatformWindowRef; + +#else + +struct nsPluginPort; +typedef void* nsPluginRegion; +typedef void* nsPluginPlatformWindowRef; + +#endif + +struct nsPluginWindow { + nsPluginPort* window; /* Platform specific window handle */ + /* OS/2: x - Position of bottom left corner */ + /* OS/2: y - relative to visible netscape window */ + PRInt32 x; /* Position of top left corner relative */ + PRInt32 y; /* to a netscape page. */ + PRUint32 width; /* Maximum window size */ + PRUint32 height; + nsPluginRect clipRect; /* Clipping rectangle in port coordinates */ + /* Used by MAC only. */ +#if defined(XP_UNIX) && !defined(XP_MACOSX) + void* ws_info; /* Platform-dependent additonal data */ +#endif /* XP_UNIX */ + nsPluginWindowType type; /* Is this a window or a drawable? */ +}; + +struct nsPluginFullPrint { + PRBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */ + /* printing */ + PRBool printOne; /* TRUE if plugin should print one copy */ + /* to default printer */ + void* platformPrint; /* Platform-specific printing info */ +}; + +struct nsPluginEmbedPrint { + nsPluginWindow window; + void* platformPrint; /* Platform-specific printing info */ +}; + +struct nsPluginPrint { + PRUint16 mode; /* nsPluginMode_Full or nsPluginMode_Embedded */ + union + { + nsPluginFullPrint fullPrint; /* if mode is nsPluginMode_Full */ + nsPluginEmbedPrint embedPrint; /* if mode is nsPluginMode_Embedded */ + } print; +}; + +struct nsPluginEvent { + +#if defined(XP_MAC) || defined(XP_MACOSX) + EventRecord* event; + nsPluginPlatformWindowRef window; + +#elif defined(XP_OS2) + uint32 event; + uint32 wParam; + uint32 lParam; + +#elif defined(XP_WIN) + uint16 event; + uint32 wParam; + uint32 lParam; + +#elif defined(XP_UNIX) && defined(MOZ_X11) + XEvent event; +#else + void *event; +#endif +}; + +/* + * Non-standard event types that can be passed to HandleEvent + * (These need to be kept in sync with the events defined in npapi.h.) + */ +enum nsPluginEventType { +#if defined(XP_MAC) || defined(XP_MACOSX) + nsPluginEventType_GetFocusEvent = (osEvt + 16), + nsPluginEventType_LoseFocusEvent, + nsPluginEventType_AdjustCursorEvent, + nsPluginEventType_MenuCommandEvent, + nsPluginEventType_ClippingChangedEvent, + nsPluginEventType_ScrollingBeginsEvent, + nsPluginEventType_ScrollingEndsEvent, +#endif /* XP_MAC || XP_MACOSX */ + nsPluginEventType_Idle = 0 +}; + +//////////////////////////////////////////////////////////////////////////////// + +enum nsPluginReason { + nsPluginReason_Base = 0, + nsPluginReason_Done = 0, + nsPluginReason_NetworkErr, + nsPluginReason_UserBreak, + nsPluginReason_NoReason +}; + +//////////////////////////////////////////////////////////////////////////////// +// Version Numbers for Structs + +// These version number are for structures whose fields may evolve over time. +// When fields are added to the end of the struct, the minor version will be +// incremented. When the struct changes in an incompatible way the major version +// will be incremented. + +#define nsMajorVersion(v) (((PRInt32)(v) >> 16) & 0xffff) +#define nsMinorVersion(v) ((PRInt32)(v) & 0xffff) + +#define nsVersionOK(suppliedV, requiredV) \ + (nsMajorVersion(suppliedV) == nsMajorVersion(requiredV) \ + && nsMinorVersion(suppliedV) >= nsMinorVersion(requiredV)) + +//////////////////////////////////////////////////////////////////////////////// +// Classes +//////////////////////////////////////////////////////////////////////////////// + +// Classes that must be implemented by the plugin DLL: +class nsIPlugin; // plugin class (MIME-type handler) +class nsIEventHandler; // event handler interface +class nsIPluginInstance; // plugin instance + +// Classes that are implemented by the browser: +class nsIPluginManager; // minimum browser requirements +class nsIFileUtilities; // file utilities (accessible from nsIPluginManager) +class nsIPluginInstancePeer; // parts of nsIPluginInstance implemented by the browser +class nsIWindowlessPluginInstancePeer; // subclass of nsIPluginInstancePeer for windowless plugins +class nsIPluginTagInfo; // describes html tag (accessible from nsIPluginInstancePeer) +//////////////////////////////////////////////////////////////////////////////// + +#ifdef XP_MAC +#pragma options align=reset +#endif + +#endif /* RC_INVOKED */ +#ifdef __OS2__ +#pragma pack() +#endif + +#endif // nsplugindefs_h___ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nspluginroot.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nspluginroot.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nspluginroot.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nspluginroot.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,12 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nspluginroot.idl + */ + +#ifndef __gen_nspluginroot_h__ +#define __gen_nspluginroot_h__ +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif + +#endif /* __gen_nspluginroot_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsrootidl.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsrootidl.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/nsrootidl.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/nsrootidl.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,57 @@ +/* + * DO NOT EDIT. THIS FILE IS GENERATED FROM nsrootidl.idl + */ + +#ifndef __gen_nsrootidl_h__ +#define __gen_nsrootidl_h__ +/* For IDL files that don't want to include root IDL files. */ +#ifndef NS_NO_VTABLE +#define NS_NO_VTABLE +#endif +#include "nscore.h" +#include "prtime.h" +/* + * Forward declarations for new string types + */ +class nsAString; +class nsACString; +/* + * Start commenting out the C++ versions of the below in the output header + */ +#if 0 +/** + * Root idl declarations to be used by all. + * @status FROZEN + */ +typedef PRBool PRBool; + +typedef PRUint8 PRUint8; + +typedef PRUint16 PRUint16; + +typedef PRUint16 PRUnichar; + +typedef PRUint32 PRUint32; + +typedef PRUint64 PRUint64; + +typedef PRUint64 PRTime; + +typedef PRInt16 PRInt16; + +typedef PRInt32 PRInt32; + +typedef PRInt64 PRInt64; + +typedef PRUint32 nsrefcnt; + +typedef PRUint32 nsresult; + +typedef PRUint32 size_t; + +/* + * End commenting out the C++ versions of the above in the output header + */ +#endif + +#endif /* __gen_nsrootidl_h__ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/xpcom-config.h jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/xpcom-config.h --- jdk-1_5_0_11/deploy/src/plugin/include/mozilla_headers_ns7/xpcom-config.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/include/mozilla_headers_ns7/xpcom-config.h 2007-02-24 09:05:59.000000000 +0100 @@ -0,0 +1,66 @@ +/* xpcom/xpcom-config.h. Generated automatically by configure. */ +/* Global defines needed by xpcom clients */ + +#ifndef _XPCOM_CONFIG_H_ +#define _XPCOM_CONFIG_H_ + +/* Define this to throw() if the compiler complains about + * constructors returning NULL + */ +#define CPP_THROW_NEW throw() + +/* Define if the c++ compiler supports a 2-byte wchar_t */ +#define HAVE_CPP_2BYTE_WCHAR_T 1 + +/* Define if the c++ compiler supports changing access with |using| */ +/* #undef HAVE_CPP_ACCESS_CHANGING_USING */ + +/* Define if the c++ compiler can resolve ambiguity with |using| */ +#define HAVE_CPP_AMBIGUITY_RESOLVING_USING 1 + +/* Define if the c++ compiler has builtin Bool type */ +/* #undef HAVE_CPP_BOOL */ + +/* Define if a dyanmic_cast to void* gives the most derived object */ +#define HAVE_CPP_DYNAMIC_CAST_TO_VOID_PTR 1 + +/* Define if the c++ compiler supports the |explicit| keyword */ +#define HAVE_CPP_EXPLICIT 1 + +/* Define if the c++ compiler supports the modern template + * specialization syntax + */ +#define HAVE_CPP_MODERN_SPECIALIZE_TEMPLATE_SYNTAX 1 + +/* Define if the c++ compiler supports the |std| namespace */ +#define HAVE_CPP_NAMESPACE_STD 1 + +/* Define if the c++ compiler supports reinterpret_cast */ +#define HAVE_CPP_NEW_CASTS 1 + +/* Define if the c++ compiler supports partial template specialization */ +#define HAVE_CPP_PARTIAL_SPECIALIZATION 1 + +/* Define if the c++ compiler has trouble comparing a constant + * reference to a templatized class to zero + */ +/* #undef HAVE_CPP_TROUBLE_COMPARING_TO_ZERO */ + +/* Define if the c++ compiler supports the |typename| keyword */ +#define HAVE_CPP_TYPENAME 1 + +/* Define if the stanard template operator!=() is ambiguous */ +#define HAVE_CPP_UNAMBIGUOUS_STD_NOTEQUAL 1 + +/* Define if statvfs() is available */ +/* #undef HAVE_STATVFS */ + +/* Define if the c++ compiler requires implementations of + * unused virtual methods + */ +#define NEED_CPP_UNUSED_IMPLEMENTATIONS 1 + +/* Define to either or */ +#define NEW_H + +#endif /* _XPCOM_CONFIG_H_ */ diff -ruN jdk-1_5_0_11/deploy/src/plugin/share/jcomponent/CPluginVM_OP.cpp jdk-1_5_0_11.ahj14/deploy/src/plugin/share/jcomponent/CPluginVM_OP.cpp --- jdk-1_5_0_11/deploy/src/plugin/share/jcomponent/CPluginVM_OP.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/share/jcomponent/CPluginVM_OP.cpp 2007-02-24 09:06:00.000000000 +0100 @@ -305,7 +305,11 @@ char * jre = m_ltstate->java_dir; // ARCH is passed in on the compile line +#if defined(_ALLBSD_SOURCE) && defined(__amd64__) + sprintf(our_ld_paths,"%s/lib/%s/server:%s/lib/%s",jre,ARCH,jre,ARCH); +#else sprintf(our_ld_paths,"%s/lib/%s/client:%s/lib/%s",jre,ARCH,jre,ARCH); +#endif char * new_ld_lib_path; diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/common/utils.c jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/common/utils.c --- jdk-1_5_0_11/deploy/src/plugin/solaris/common/utils.c 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/common/utils.c 2007-02-24 09:06:00.000000000 +0100 @@ -4,7 +4,9 @@ #include "Debug.h" #include "utils.h" #include +#ifndef _ALLBSD_SOURCE #include +#endif #include #include #include diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/controlpanel/ControlPanel jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/controlpanel/ControlPanel --- jdk-1_5_0_11/deploy/src/plugin/solaris/controlpanel/ControlPanel 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/controlpanel/ControlPanel 2007-02-24 09:06:00.000000000 +0100 @@ -72,7 +72,7 @@ REPLACEME -if [ "${os}" = "Linux" ]; then +if [ "${os}" = "Linux" -o "${os}" = "OpenBSD" ]; then case "`uname -m`" in i[3-9]86 | ia32 | ia64 | x86_64) proc=i386 diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/converter/HtmlConverter jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/converter/HtmlConverter --- jdk-1_5_0_11/deploy/src/plugin/solaris/converter/HtmlConverter 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/converter/HtmlConverter 2007-02-24 09:06:00.000000000 +0100 @@ -23,7 +23,7 @@ OS=`uname -s` -if [ "${OS}" = "Linux" ] +if [ "${OS}" = "Linux" -o "${OS}" = "FreeBSD" ] then LINKTEST="-L" else diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_exec/java_vm.c jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_exec/java_vm.c --- jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_exec/java_vm.c 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_exec/java_vm.c 2007-02-24 09:06:00.000000000 +0100 @@ -153,7 +153,7 @@ libjvm = dlopen(jvmpath, RTLD_NOW + RTLD_GLOBAL); if (libjvm == NULL) { - snprintf(jvmpath, sizeof jvmpath, "%s/lib/"LIBARCH"/%s", java_home, libname); + snprintf(jvmpath, sizeof jvmpath, "%s/lib/"LIBARCH"/server/%s", java_home, libname); libjvm = dlopen(jvmpath, RTLD_NOW + RTLD_GLOBAL); } @@ -290,6 +290,7 @@ char extbuf[1024]; char *mozDir = getenv("MOZILLA_HOME"); char jssDir[1024]; + int ret; // Add java.ext.dirs when it was not set up in Java control panel if ((optionstr != NULL && strstr(optionstr, "-Djava.ext.dirs") == NULL) @@ -299,7 +300,7 @@ { // Make sure the directory exist sprintf(jssDir, "%s/jss", mozDir); - int ret = access(jssDir, F_OK); + ret = access(jssDir, F_OK); if (ret == 0) { diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_natives/buffered_pipe_interface.c jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_natives/buffered_pipe_interface.c --- jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_natives/buffered_pipe_interface.c 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_natives/buffered_pipe_interface.c 2007-02-24 09:06:00.000000000 +0100 @@ -9,7 +9,7 @@ #include #include #include -#ifdef __linux__ +#if defined(__linux__) || defined(_ALLBSD_SOURCE) #include #else #include diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_natives/native.c jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_natives/native.c --- jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_natives/native.c 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_natives/native.c 2007-02-24 09:06:00.000000000 +0100 @@ -25,9 +25,7 @@ #include #include #include -#if 0 -#include -#else +#ifndef _ALLBSD_SOURCE #include #endif #include @@ -110,7 +108,7 @@ sprintf(awtPath, "%s/lib/" LIBARCH "/%s", getenv("JAVA_HOME"), libname); - awtHandle = dlopen(awtPath, RTLD_LAZY); + awtHandle = dlopen(awtPath, RTLD_LAZY | RTLD_GLOBAL); if (awtHandle == NULL) { fprintf(stderr,"reflect - bad awtHandle.\n"); exit(123); diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_natives/server.c jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_natives/server.c --- jdk-1_5_0_11/deploy/src/plugin/solaris/jvm_natives/server.c 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/jvm_natives/server.c 2007-02-24 09:06:00.000000000 +0100 @@ -13,7 +13,9 @@ #include #include #include +#ifndef _ALLBSD_SOURCE #include +#endif #include #include #include @@ -22,6 +24,9 @@ #include #include #include +#ifdef _ALLBSD_SOURCE +#include +#endif #include "pipe_interface.h" @@ -2598,9 +2603,11 @@ -#if 0 +#ifdef _ALLBSD_SOURCE int recvfd(int src) { - int recfd; + int *recfd; + char cmsgbuf[CMSG_SPACE(sizeof(int))]; + struct cmsghdr *cmsg; struct msghdr msg; struct iovec base[1]; int rc; @@ -2610,8 +2617,13 @@ msg.msg_iovlen = 1; msg.msg_name = NULL; msg.msg_namelen = 0; - msg.msg_accrights = (caddr_t)&recfd; - msg.msg_accrightslen = sizeof(int); + msg.msg_control = cmsgbuf; + msg.msg_controllen = CMSG_SPACE(sizeof(int)); + cmsg = (struct cmsghdr *)cmsgbuf; + cmsg->cmsg_len = msg.msg_controllen; + cmsg->cmsg_level = SOL_SOCKET; + cmsg->cmsg_type = SCM_RIGHTS; + rc = recvmsg(src, &msg, 0); if (rc < 0) { @@ -2619,7 +2631,8 @@ perror("Receiving fd:"); return -1; } - return recfd; + recfd = (int*)CMSG_DATA(cmsg); + return (*recfd); } #else int recvfd(int src) { @@ -2680,6 +2693,7 @@ inet_addr(inet_ntoa(hostPtr->h_addr_list[0])); */ client.sin_addr.s_addr = *(int *)(hostPtr->h_addr_list[0]); +/* XXX: ntohs() in 1.3 and 1.4 */ client.sin_port = htons(port); native_trace("Using port: %d\n", port); @@ -2690,6 +2704,7 @@ #else bzero(&client,sizeof(client)); client.sun_family = AF_UNIX; +/* XXX: ntohl() in 1.3 and 1.4 */ sprintf(client.sun_path,"%s.%s.%d",JAVA_PLUGIN_SOCKFILE,PLUGIN_NODOTVERSION,htonl(port)); native_trace("Using file: %s\n", client.sun_path); diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/nscore/JavaVM5.cpp jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/nscore/JavaVM5.cpp --- jdk-1_5_0_11/deploy/src/plugin/solaris/nscore/JavaVM5.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/nscore/JavaVM5.cpp 2007-02-24 09:06:00.000000000 +0100 @@ -24,13 +24,14 @@ #include #include #include +#ifndef _ALLBSD_SOURCE #include +#endif #include #include #include #include #include -#include #include #include #include @@ -48,6 +49,8 @@ #include #include #define _DIRENTRY_H +#elif _ALLBSD_SOURCE +#include #else #include #include @@ -469,7 +472,7 @@ trace("JavaVM5:Ready to fork"); /* Create our child java process */ -#if defined(__linux__) +#if defined(__linux__) || defined(_ALLBSD_SOURCE) rc = fork(); #else rc = fork1(); @@ -524,7 +527,7 @@ /* Close all other file descriptors. */ -#ifndef __linux__ +#ifdef UL_GDESLIM max = ulimit(UL_GDESLIM); #else max = sysconf(_SC_OPEN_MAX); @@ -1309,7 +1312,11 @@ // jre/lib//classic/libjvm.so // (to permit hotspot later). So this path is only needed for 1.2 +#if defined(_ALLBSD_SOURCE) && defined(__amd64__) + sprintf(buff, "LD_LIBRARY_PATH=%s/lib/%s/server:%s/lib/%s", +#else sprintf(buff, "LD_LIBRARY_PATH=%s/lib/%s/client:%s/lib/%s", +#endif jre, LIBARCH, // libjvm jre, LIBARCH); // libjava, libawt & friends @@ -1349,6 +1356,14 @@ #ifdef LINUX return "i386"; +#elif _ALLBSD_SOURCE +#ifdef __amd64__ + return "amd64"; +#elif __i386__ + return "i386"; +#else +#error "Unsupported architecture" +#endif #else sysinfo(SI_ARCHITECTURE, arch, sizeof(arch)); if (strcmp(arch,"sparc") == 0 ) { diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/nscore/ProxySupport5.cpp jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/nscore/ProxySupport5.cpp --- jdk-1_5_0_11/deploy/src/plugin/solaris/nscore/ProxySupport5.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/nscore/ProxySupport5.cpp 2007-02-24 09:06:00.000000000 +0100 @@ -25,7 +25,7 @@ #include "ProxySupport5.h" extern "C" { -#ifdef __linux__ +#if defined(__linux__) || (defined(_ALLBSD_SOURCE) && (!defined(__FreeBSD__) || __FreeBSD__ > 4)) extern int gethostname(char *, size_t); #else extern int gethostname(char *, int); diff -ruN jdk-1_5_0_11/deploy/src/plugin/solaris/nscore/util5.cpp jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/nscore/util5.cpp --- jdk-1_5_0_11/deploy/src/plugin/solaris/nscore/util5.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/deploy/src/plugin/solaris/nscore/util5.cpp 2007-02-24 09:06:00.000000000 +0100 @@ -7,6 +7,7 @@ /* Some helper routines for nspr methods */ +#include #include "commonhdr.h" #include "utils.h" #include "util5.h" diff -ruN jdk-1_5_0_11/hotspot/build/bsd/Makefile jdk-1_5_0_11.ahj14/hotspot/build/bsd/Makefile --- jdk-1_5_0_11/hotspot/build/bsd/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/Makefile 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,221 @@ +# +# @(#)Makefile 1.18 03/12/23 16:35:14 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# This makefile creates a build tree and lights off a build. +# You can go back into the build tree and perform rebuilds or +# incremental builds as desired. Be sure to reestablish +# environment variable settings for LD_LIBRARY_PATH and JAVA_HOME. + +# The make process now relies on java and javac. These can be +# specified either implicitly on the PATH, by setting the +# (JDK-inherited) ALT_BOOTDIR environment variable to full path to a +# JDK in which bin/java and bin/javac are present and working (e.g., +# /usr/local/java/jdk1.3/solaris), or via the (JDK-inherited) +# default BOOTDIR path value. Note that one of ALT_BOOTDIR +# or BOOTDIR has to be set. We do *not* search javac, javah, rmic etc. +# from the PATH. + +# Along with VM, Serviceability Agent (SA) is built for SA/JDI binding. +# JDI binding on SA produces two binaries: +# 1. sa-jdi.jar - This is build before building libjvm[_g].so +# Please refer to ./makefiles/sa.make +# 2. libsa[_g].so - Native library for SA - This is built after +# libjsig[_g].so (signal interposition library) +# Please refer to ./makefiles/vm.make +# If $(GAMMADIR)/agent dir is not present, SA components are not built. + +# Unless GAMMADIR is set on the command line, search upward from +# the current directory for a parent directory containing "src/share/vm". +# If that fails, look for $GAMMADIR in the environment. +# When the tree of subdirs is built, this setting is stored in each flags.make. +GAMMADIR := $(shell until ([ -d dev ]&&echo $${GAMMADIR:-/GAMMADIR/}) || ([ -d src/share/vm ]&&pwd); do cd ..; done) +unexport GAMMADIR + +# The below is determined by the machine you are building +# on. On a sparc system will be sparc. On an intel system +# will be i486. + +# There is an irregular correspondence between make targets and actions: +# Target Tree Type Build Dir +# debug compiler2 __compiler2/debug +# profiled compiler2 __compiler2/profiled +# (none) compiler2 __compiler2/product +# product compiler2 __compiler2/product +# optimized compiler2 __compiler2/optimized +# debug1 compiler1 __compiler1/debug +# profiled1 compiler1 __compiler1/profiled +# product1 compiler1 __compiler1/product +# optimized1 compiler1 __compiler1/optimized +# basicdebug core __core/debug +# Hmm how do these work QQQ +# (none) core __core/profiled +# (none) core __core/product +# basic core __core/optimized + +# Target with suffix of 1 build the VM with Compiler1 + +include $(GAMMADIR)/build/bsd/makefiles/rules.make + +OS = bsd +ARCH = $(shell uname -m) +LIB_ARCH= $ARCH + +ifdef ITANIUM + ARCH=ia64 +endif + +ifeq ($(ARCH), x86_64) + ARCH=amd64 +endif + +ifneq ($(ARCH), sparc) + ifneq ($(ARCH), ia64) + ifneq ($(ARCH), amd64) + ARCH=i486 + endif + endif +endif + +export ARCH + +ifeq ($(ARCH), i486) + TEST_ARCH=i386 +else + TEST_ARCH=$(ARCH) +endif + +SUBDIR_DOCS= $(OS)_$(ARCH)_docs +buildATree = ${GAMMADIR}/build/${OS}/makefiles/buildATree.sh + +.PHONY: checks check_os_version check_j2se_version docs clean_docs + +# For now, until the compiler is less wobbly: +TESTFLAGS = -Xbatch + +RUN_TEST = \ + echo "Testing $$gamma..."; \ + echo "\#!/bin/csh" > test; \ + echo "setenv LD_LIBRARY_PATH .:${JAVA_HOME}/jre/lib/${TEST_ARCH}:${JAVA_HOME}/jre/lib/${TEST_ARCH}/native_threads:${LD_LIBRARY_PATH}" >> test; \ + echo "./$$gamma < /dev/null $(TESTFLAGS) -classpath ${GAMMADIR}/build/${OS}:${JAVA_HOME}/jre/lib/lib/rt.jar:${JAVA_HOME}/classes Queens" >> test; \ + chmod +x ./test; ./test + +${OS}_${ARCH}_compiler2/debug ${OS}_${ARCH}_compiler2/optimized ${OS}_${ARCH}_compiler2/fastdebug ${OS}_${ARCH}_compiler2/jvmg ${OS}_${ARCH}_compiler2/profiled ${OS}_${ARCH}_compiler2/product : checks $(buildATree) + sh $(buildATree) compiler2 ${GAMMADIR} ${OS} ${ARCH} + +checks: check_os_version check_j2se_version + +# XXXBSD: setup a checks later +# We do not want people accidentally building on Linux 2.1.x or earlier. +#check_os_version: +# @ case ${DISABLE_HOTSPOT_OS_VERSION_CHECK},`uname -r` in \ +# ,2.[0-1].*) >&2 echo "*** This OS is not supported:" `uname -a`; exit 1;; \ +# esac +# Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok. + +# jvmti.make requires XSLT (J2SE 1.4.x or newer): +# If not found then fail fast. +check_j2se_version: + $(QUIETLY) if [ `$(RUN.JAVA) -fullversion 2>&1 | grep -c '1\.[45]'` -eq 0 ] ; then \ + $(RUN.JAVA) -version; \ + echo "*** An XSLT processor (J2SE 1.4.x or newer) is required to bootstrap this build"; \ + exit 1; \ + fi + +debug: ${OS}_${ARCH}_compiler2/debug + (cd ${OS}_${ARCH}_compiler2/debug; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler2/debug; gamma=gamma_g; $(RUN_TEST)) + +optimized: ${OS}_${ARCH}_compiler2/optimized + (cd ${OS}_${ARCH}_compiler2/optimized; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler2/optimized; gamma=gamma; $(RUN_TEST)) + +fastdebug: ${OS}_${ARCH}_compiler2/fastdebug + (cd ${OS}_${ARCH}_compiler2/fastdebug; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler2/fastdebug; gamma=gamma; $(RUN_TEST)) + +jvmg: ${OS}_${ARCH}_compiler2/jvmg + (cd ${OS}_${ARCH}_compiler2/jvmg; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler2/jvmg; gamma=gamma_g; $(RUN_TEST)) + +product: ${OS}_${ARCH}_compiler2/product + (cd ${OS}_${ARCH}_compiler2/product; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler2/product; gamma=gamma; $(RUN_TEST)) + +profiled: ${OS}_${ARCH}_compiler2/profiled + (cd ${OS}_${ARCH}_compiler2/profiled; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler2/profiled; gamma=gamma; $(RUN_TEST)) + +${OS}_${ARCH}_compiler1/debug ${OS}_${ARCH}_compiler1/optimized ${OS}_${ARCH}_compiler1/fastdebug ${OS}_${ARCH}_compiler1/jvmg ${OS}_${ARCH}_compiler1/profiled ${OS}_${ARCH}_compiler1/product : checks $(buildATree) + sh $(buildATree) compiler1 ${GAMMADIR} ${OS} ${ARCH} + +debug1: ${OS}_${ARCH}_compiler1/debug + (cd ${OS}_${ARCH}_compiler1/debug; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler1/debug; gamma=gamma_g; $(RUN_TEST)) + +optimized1: ${OS}_${ARCH}_compiler1/optimized + (cd ${OS}_${ARCH}_compiler1/optimized; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler1/optimized; gamma=gamma; $(RUN_TEST)) + +fastdebug1: ${OS}_${ARCH}_compiler1/fastdebug + (cd ${OS}_${ARCH}_compiler1/fastdebug; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler1/fastdebug; gamma=gamma; $(RUN_TEST)) + +jvmg1: ${OS}_${ARCH}_compiler1/jvmg + (cd ${OS}_${ARCH}_compiler1/jvmg; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler1/jvmg; gamma=gamma_g; $(RUN_TEST)) + +product1: ${OS}_${ARCH}_compiler1/product + (cd ${OS}_${ARCH}_compiler1/product; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler1/product; gamma=gamma; $(RUN_TEST)) + +profiled1: ${OS}_${ARCH}_compiler1/profiled + (cd ${OS}_${ARCH}_compiler1/profiled; $(MAKE)) +# @(cd ${OS}_${ARCH}_compiler1/profiled; gamma=gamma; $(RUN_TEST)) + +${OS}_${ARCH}_core/debug ${OS}_${ARCH}_core/optimized ${OS}_${ARCH}_core/fastdebug ${OS}_${ARCH}_core/jvmg ${OS}_${ARCH}_core/profiled ${OS}_${ARCH}_core/product : checks $(buildATree) + sh $(buildATree) core ${GAMMADIR} ${OS} ${ARCH} + +debugcore: ${OS}_${ARCH}_core/debug + (cd ${OS}_${ARCH}_core/debug; $(MAKE)) +# @(cd ${OS}_${ARCH}_core/debug; gamma=gamma_g; $(RUN_TEST)) + +optimizedcore: ${OS}_${ARCH}_core/optimized + (cd ${OS}_${ARCH}_core/optimized; $(MAKE)) +# @(cd ${OS}_${ARCH}_core/optimized; gamma=gamma; $(RUN_TEST)) + +fastdebugcore: ${OS}_${ARCH}_core/fastdebug + (cd ${OS}_${ARCH}_core/fastdebug; $(MAKE)) +# @(cd ${OS}_${ARCH}_core/fastdebug; gamma=gamma; $(RUN_TEST)) + +jvmgcore: ${OS}_${ARCH}_core/jvmg + (cd ${OS}_${ARCH}_core/jvmg; $(MAKE)) +# @(cd ${OS}_${ARCH}_core/jvmg; gamma=gamma_g; $(RUN_TEST)) + +productcore: ${OS}_${ARCH}_core/product + (cd ${OS}_${ARCH}_core/product; $(MAKE)) +# @(cd ${OS}_${ARCH}_core/product; gamma=gamma; $(RUN_TEST)) + +profiledcore: ${OS}_${ARCH}_core/profiled + (cd ${OS}_${ARCH}_core/profiled; $(MAKE)) +# @(cd ${OS}_${ARCH}_core/profiled; gamma=gamma; $(RUN_TEST)) + +basicdebug: debugcore +basic: optimizedcore + +# Doc target. This is the same for all build options. +# Hence create a docs directory beside ...$(ARCH)_[...] +docs: checks + $(QUIETLY) mkdir -p $(SUBDIR_DOCS) + $(MAKE) -f $(GAMMADIR)/build/bsd/makefiles/jvmti.make $(MFLAGS) GAMMADIR=$(GAMMADIR) JvmtiOutDir=$(SUBDIR_DOCS) jvmtidocs + +# Intel-style names: +compiler1: jvmg1 product1 +compiler2: jvmg product +core: jvmgcore productcore + +clean: + (rm -fr ${OS}_${ARCH}_core; rm -fr ${OS}_${ARCH}_compiler2 ; rm -fr ${OS}_${ARCH}_compiler1; rm -fr $(SUBDIR_DOCS)) diff -ruN jdk-1_5_0_11/hotspot/build/bsd/README jdk-1_5_0_11.ahj14/hotspot/build/bsd/README --- jdk-1_5_0_11/hotspot/build/bsd/README 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/README 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,10 @@ +// +// @(#)README 1.3 04/07/29 16:35:57 +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +Please refer to the comments in the Makefile in this directory +for instructions how to build the FreeBSD/NetBSD versions. + diff -ruN jdk-1_5_0_11/hotspot/build/bsd/adlc_updater jdk-1_5_0_11.ahj14/hotspot/build/bsd/adlc_updater --- jdk-1_5_0_11/hotspot/build/bsd/adlc_updater 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/adlc_updater 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,11 @@ +#! /bin/sh +# +# This file is used by adlc.make to selectively update generated +# adlc files. Because source and target diretories are relative +# paths, this file is copied to the target build directory before +# use. +# +# adlc-updater +# +[ -f $3/$1 ] && cmp -s $2/$1 $3/$1 || \ +( [ -f $3/$1 ]; echo Updating $3/$1 ; touch $2/made-change ; mv $2/$1 $3/$1 ) diff -ruN jdk-1_5_0_11/hotspot/build/bsd/build.sh jdk-1_5_0_11.ahj14/hotspot/build/bsd/build.sh --- jdk-1_5_0_11/hotspot/build/bsd/build.sh 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/build.sh 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,78 @@ +#! /bin/sh +# +# @(#)build.sh 1.5 03/12/23 16:35:14 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Make sure the variable JAVA_HOME is set before running this script. + +set -u + + +if [ $# != 2 ]; then + echo "Usage : $0 Build_Options Location" + echo "Build Options : debug or optimized or basicdebug or basic or clean" + echo "Location : specify any workspace which has gamma sources" + exit 1 +fi + +# Just in case: +case ${JAVA_HOME} in +/*) true;; +?*) JAVA_HOME=`( cd $JAVA_HOME; pwd )`;; +esac + +case `uname -m` in + i386|i486|i586|i686) + mach=i386 + ;; + *) + echo "Unsupported machine: " `uname -m` + exit 1 + ;; +esac + +if [ "${JAVA_HOME}" = "" -o ! -d "${JAVA_HOME}" -o ! -d ${JAVA_HOME}/jre/lib/${mach} ]; then + echo "JAVA_HOME needs to be set to a valid JDK path" + echo "ksh : export JAVA_HOME=/net/tetrasparc/export/gobi/JDK1.2_fcs_V/bsd" + echo "csh : setenv JAVA_HOME /net/tetrasparc/export/gobi/JDK1.2_fcs_V/bsd" + exit 1 +fi + + +LD_LIBRARY_PATH=${JAVA_HOME}/jre/lib/`uname -p`:\ +${JAVA_HOME}/jre/lib/`uname -p`/native_threads:${LD_LIBRARY_PATH-.} + +# This is necessary as long as we are using the old launcher +# with the new distribution format: +CLASSPATH=${JAVA_HOME}/jre/lib/rt.jar:${CLASSPATH-.} + + +for gm in gmake gnumake +do + if [ "${GNUMAKE-}" != "" ]; then break; fi + ($gm --version >/dev/null) 2>/dev/null && GNUMAKE=$gm +done +: ${GNUMAKE:?'Cannot locate the gnumake program. Stop.'} + + +echo "### ENVIRONMENT SETTINGS:" +export JAVA_HOME ; echo "JAVA_HOME=$JAVA_HOME" +export LD_LIBRARY_PATH ; echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" +export CLASSPATH ; echo "CLASSPATH=$CLASSPATH" +export GNUMAKE ; echo "GNUMAKE=$GNUMAKE" +echo "###" + +Build_Options=$1 +Location=$2 + +case ${Location} in +/*) true;; +?*) Location=`(cd ${Location}; pwd)`;; +esac + +echo \ +${GNUMAKE} -f ${Location}/build/bsd/Makefile $Build_Options GAMMADIR=${Location} +${GNUMAKE} -f ${Location}/build/bsd/Makefile $Build_Options GAMMADIR=${Location} diff -ruN jdk-1_5_0_11/hotspot/build/bsd/jdk_version jdk-1_5_0_11.ahj14/hotspot/build/bsd/jdk_version --- jdk-1_5_0_11/hotspot/build/bsd/jdk_version 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/jdk_version 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1 @@ +JDK1.2_fcs_V diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/adjust-mflags.sh jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/adjust-mflags.sh --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/adjust-mflags.sh 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/adjust-mflags.sh 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,70 @@ +#! /bin/sh +# +# @(#)adjust-mflags.sh 1.4 03/12/23 16:35:14 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# This script is used only from top.make. +# The macro $(MFLAGS-adjusted) calls this script to +# adjust the "-j" arguments to take into account +# the HOTSPOT_BUILD_JOBS variable. The default +# handling of the "-j" argument by gnumake does +# not meet our needs, so we must adjust it ourselves. + +# This argument adjustment applies to two recursive +# calls to "$(MAKE) $(MFLAGS-adjusted)" in top.make. +# One invokes adlc.make, and the other invokes vm.make. +# The adjustment propagates the desired concurrency +# level down to the sub-make (of the adlc or vm). +# The default behavior of gnumake is to run all +# sub-makes without concurrency ("-j1"). + +# Also, we use a make variable rather than an explicit +# "-j" argument to control this setting, so that +# the concurrency setting (which must be tuned separately +# for each MP system) can be set via an environment variable. +# The recommended setting is 1.5x to 2x the number of available +# CPUs on the MP system, which is large enough to keep the CPUs +# busy (even though some jobs may be I/O bound) but not too large, +# we may presume, to overflow the system's swap space. + +set -eu + +default_build_jobs=4 + +case $# in +[12]) true;; +*) >&2 echo "Usage: $0 ${MFLAGS} ${HOTSPOT_BUILD_JOBS}"; exit 2;; +esac + +MFLAGS=$1 +HOTSPOT_BUILD_JOBS=${2-} + +# Normalize any -jN argument to the form " -j${HBJ}" +MFLAGS=` + echo "$MFLAGS" \ + | sed ' + s/^-/ -/ + s/ -\([^ ][^ ]*\)j/ -\1 -j/ + s/ -j[0-9][0-9]*/ -j/ + s/ -j\([^ ]\)/ -j -\1/ + s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/ + ' ` + +case ${HOTSPOT_BUILD_JOBS} in \ + +'') case ${MFLAGS} in + *\ -j*) + >&2 echo "# Note: -jN is ineffective for setting parallelism in this makefile." + >&2 echo "# please set HOTSPOT_BUILD_JOBS=${default_build_jobs} in the command line or environment." + esac;; + +?*) case ${MFLAGS} in + *\ -j*) true;; + *) MFLAGS="-j${HOTSPOT_BUILD_JOBS} ${MFLAGS}";; + esac;; +esac + +echo "${MFLAGS}" diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/adlc.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/adlc.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/adlc.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/adlc.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,230 @@ +# +# @(#)adlc.make 1.7 03/12/23 16:35:15 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# This makefile (adlc.make) is included from the adlc.make in the +# build directories. +# It knows how to compile, link, and run the adlc. + +# ######################################################################### + +# OUTDIR must be the same as AD_Dir = $(GENERATED)/adfiles in top.make: +OUTDIR = ../generated/adfiles + +ARCH = $(Platform_arch) +OS = $(Platform_os_family) + +SOURCE.AD = $(OUTDIR)/$(OS)_$(ARCH).ad + +SOURCES.AD = $(GAMMADIR)/src/cpu/$(ARCH)/vm/$(ARCH).ad \ + $(GAMMADIR)/src/os_cpu/$(OS)_$(ARCH)/vm/$(OS)_$(ARCH).ad + +Src_Dirs += $(GAMMADIR)/src/share/vm/adlc + +EXEC = $(OUTDIR)/adlc + +all: + +# ######################################################################### +# THE FOLLOWING IS TAKEN FROM VM.MAKE + +# tell make that .cpp is important + +.SUFFIXES: .cpp $(SUFFIXES) + + +# set VPATH so make knows where to look for source files + +Src_Dirs_V = ${Src_Dirs} $(GENERATED)/incls +VPATH += $(Src_Dirs_V:%=%:) + + +# set INCLUDES for C preprocessor + +Src_Dirs_I = ${Src_Dirs} $(GENERATED) +INCLUDES += $(Src_Dirs_I:%=-I%) + +# Suppress warnings (for now) +CFLAGS += -w + +# ######################################################################### + + +# /usr/ccs/bin/make +# /usr/dist/share/devpro/5.x-sparc/bin/CC +# man -M /usr/dist/share/devpro/5.x-sparc/man CC + +CPP = g++ +CC = gcc +CPPFLAGS = -DASSERT -g -o $@ +# -o object file-name +# +w Additional warnings: Nonportable, Likely mistakes or inefficient +# -xwe Treat all warnings as errors (skipped for now) +# +p Use -features=no%anachronisms. +# -E Runs a source file through the preprocessor, output to stdout +# +# $< first component of target name +# $@ target name + +CPPFLAGS += ${SYSDEFS} ${INCLUDES} + +OBJECTNAMES = \ + adlparse.o \ + archDesc.o \ + arena.o \ + dfa.o \ + dict2.o \ + filebuff.o \ + forms.o \ + formsopt.o \ + formssel.o \ + main.o \ + adlc-opcodes.o \ + output_c.o \ + output_h.o \ + +OBJECTS = $(OBJECTNAMES:%=$(OUTDIR)/%) + +GENERATEDNAMES = \ + ad_$(ARCH).cpp \ + ad_$(ARCH).hpp \ + ad_$(ARCH)_clone.cpp \ + ad_$(ARCH)_expand.cpp \ + ad_$(ARCH)_format.cpp \ + ad_$(ARCH)_gen.cpp \ + ad_$(ARCH)_misc.cpp \ + ad_$(ARCH)_peephole.cpp \ + ad_$(ARCH)_pipeline.cpp \ + adGlobals_$(ARCH).hpp \ + dfa_$(ARCH).cpp \ + +GENERATEDFILES = $(GENERATEDNAMES:%=$(OUTDIR)/%) + +# Random dependencies: +$(OBJECTS): opcodes.hpp classes.hpp adlc.hpp adlcVMDeps.hpp adlparse.hpp archDesc.hpp arena.hpp dict2.hpp filebuff.hpp forms.hpp formsopt.hpp formssel.hpp + +# ######################################################################### + +all: $(EXEC) + +$(EXEC) : $(OBJECTS) + @echo Making adlc + @$(CC) $(DFLAGS) $(LFLAGS) $(OBJECTS) -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic -o $(EXEC) -lm + +# The source files refer to ostream.h, which sparcworks calls iostream.h +$(OBJECTS): ostream.h +ostream.h : + @echo >$@ '#include ' + +dump: + : OUTDIR=$(OUTDIR) + : OBJECTS=$(OBJECTS) + : products = $(OUTDIR)/ad_$(ARCH).cpp $(OUTDIR)/ad_$(ARCH).hpp $(OUTDIR)/dfa_$(ARCH).cpp + +all: $(GENERATEDFILES) + +$(GENERATEDFILES): refresh_adfiles + +# Get a unique temporary directory name, so multiple makes can run in parallel. +# Note that product files are updated via "mv", which is atomic. +TEMPDIR := $(OUTDIR)/mktmp$(shell echo $$$$) + +verbose-echo = echo +verbose-echo$(MAKE_VERBOSE) = : + +# +# adlc_updater is a simple sh script, under sccs control. It is +# used to selectively update generated adlc files. This should +# provide a nice compilation speed improvement. +# +ADLC_UPDATER_DIRECTORY = $(GAMMADIR)/build/bsd +ADLC_UPDATER = adlc_updater + +# This action refreshes all generated adlc files simultaneously. +# The way it works is this: +# 1) create a scratch directory to work in. +# 2) if the current working directory does not have $(ADLC_UPDATER), copy it. +# 3) run the compiled adlc executable. This will create new adlc files in the scratch directory. +# 4) call $(ADLC_UPDATER) on each generated adlc file. It will selectively update changed or missing files. +# 5) If we actually updated any files, echo a notice. +# + +refresh_adfiles: $(EXEC) $(SOURCE.AD) + @rm -rf $(TEMPDIR); mkdir $(TEMPDIR) + @ [ -f $(ADLC_UPDATER) ] || ( cp $(ADLC_UPDATER_DIRECTORY)/$(ADLC_UPDATER) . ; chmod +x $(ADLC_UPDATER) ) + @$(verbose-echo) \ + $(EXEC) -q -T $(SOURCE.AD) \ + -c$(TEMPDIR)/ad_$(ARCH).cpp -h$(TEMPDIR)/ad_$(ARCH).hpp -a$(TEMPDIR)/dfa_$(ARCH).cpp -v$(TEMPDIR)/adGlobals_$(ARCH).hpp + @$(EXEC) -q -T $(SOURCE.AD) \ + -c$(TEMPDIR)/ad_$(ARCH).cpp -h$(TEMPDIR)/ad_$(ARCH).hpp -a$(TEMPDIR)/dfa_$(ARCH).cpp -v$(TEMPDIR)/adGlobals_$(ARCH).hpp \ + || { rm -rf $(TEMPDIR); exit 1; } + @ ./$(ADLC_UPDATER) ad_$(ARCH).cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH).hpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH)_clone.cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH)_expand.cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH)_format.cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH)_gen.cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH)_misc.cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH)_peephole.cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) ad_$(ARCH)_pipeline.cpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) adGlobals_$(ARCH).hpp $(TEMPDIR) $(OUTDIR) + @ ./$(ADLC_UPDATER) dfa_$(ARCH).cpp $(TEMPDIR) $(OUTDIR) + @[ -f $(TEMPDIR)/made-change ] \ + || echo "Rescanned $(SOURCE.AD) but encountered no changes." + + @rm -rf $(TEMPDIR) + + +# ######################################################################### + +$(SOURCE.AD): $(SOURCES.AD) + @cat $(SOURCES.AD) > $(SOURCE.AD) + +COMPILE = ${CPP} ${CPPFLAGS} ${CFLAGS} + +COMPILE.o = ${COMPILE} -c +COMPILE.i = ${COMPILE} -E + +verbose-echo = echo +verbose-echo$(MAKE_VERBOSE) = : + +$(OUTDIR)/%.o: %.cpp + @echo Compiling $< ; \ + rm -f $@ ; \ + $(verbose-echo) \ + ${COMPILE.o} $< ; \ + ${COMPILE.o} $< && \ + case "$(MFLAGS)" in *j*) echo Done with $<;; esac + +# Some object files are given a prefix, to disambiguate +# them from objects of the same name built for the VM. +$(OUTDIR)/adlc-%.o: %.cpp + @echo Compiling $< ; \ + rm -f $@ ; \ + $(verbose-echo) \ + ${COMPILE.o} $< ; \ + ${COMPILE.o} $< + +# Intermediate files (for debugging macros) + +%.i: %.cpp + @echo Preprocessing $< to $@; \ + $(verbose-echo) \ + ${COMPILE.i} $< >$@ ; \ + ${COMPILE.i} $< >$@ + +# ######################################################################### + +clean : + rm $(OBJECTS) + +cleanall : + rm $(OBJECTS) $(EXEC) + +# ######################################################################### + + +.PHONY: all dump refresh_adfiles clean cleanall diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/amd64.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/amd64.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/amd64.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/amd64.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,21 @@ +# +# @(#)amd64.make 1.4 04/04/28 19:22:17 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Not included in includeDB because it has no dependencies +Obj_Files += bsd_amd64.o + +# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized +OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) +# Must also specify if CPU is little endian +CFLAGS += -DVM_LITTLE_ENDIAN + +CFLAGS += -D_LP64=1 + +# The serviceability agent relies on frame pointer (%rbp) to walk thread stack +CFLAGS += -fno-omit-frame-pointer + +OPT_CFLAGS/compactingPermGenGen.o = -O1 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/buildATree.sh jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/buildATree.sh --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/buildATree.sh 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/buildATree.sh 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,191 @@ +#! /bin/sh +# +# @(#)buildATree.sh 1.9 03/12/23 16:35:15 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +set -eu + +# This shell script builds gamma from a workspace +# - adopted from the buildATree script by David Ungar + +# It should be invoked with three arguments: +# the variant of gamma to build, the workspace location and the platform + +case $# in +4) true;; +*) + echo "Usage: $0 [core | compiler1 | compiler2] gamma-directory-name platform arch" + echo " e.g.: $0 core /import/hotsparc/gamma bsd sparc" + exit 1 +esac + +variant=$1 +gammadir=$2 +os_family=$3 +arch=$4 + +platform=${os_family}_${arch} +platform_file=$gammadir/build/${os_family}/platform_${arch} +dir_name=`pwd`/${platform}_${variant} + +# +# We do two levels of exclusion in the shared directory. +# TOPLEVEL excludes are pruned, they are not recursively searched, +# but lower level directories can be named without fear of collision. +# ALWAYS excludes are excluded at any level in the directory tree. +# + +always_exclude_dirs="-name SCCS -o -name CVS" +set toplevel_exclude_dirs=-none- + +case $variant in + compiler2) + toplevel_exclude_dirs="${always_exclude_dirs} -o -name adlc -o -name c1 -o -name agent" + ;; + compiler1) + toplevel_exclude_dirs="${always_exclude_dirs} -o -name adlc -o -name opto -o -name libadt -o -name agent" + ;; + core) + toplevel_exclude_dirs="${always_exclude_dirs} -o -name adlc -o -name opto -o -name libadt -o -name agent" + ;; + *) + echo "${0}: First argument (variant) must be one of core, compiler1, or compiler2." + exit 1 +esac + +# +#set compiler +# +eval "`sed -n '/compiler/s/ *= */=/p' < $platform_file`" + +# +#set lib_arch +# +eval "`sed -n '/lib_arch/s/ *= */=/p' < $platform_file`" + +# +# Set up the build tree it not already there +# +mkdir -p $dir_name/generated/incls +mkdir -p $dir_name/generated/adfiles +mkdir -p $dir_name/generated/jvmtifiles + +for i in debug release optimized fastdebug jvmg profiled product +do + ( + mkdir -p $dir_name/$i + cd $dir_name/$i >/dev/null + + # make 3 makefiles: + # flags.make with macro settings, + # Makefile for "make foo" + # vm.make to support making "make -v vm.make" in makefiles. + # (The makefiles are split this way so that "make foo" + # will run faster by not having to read the dependency files for the vm.) + + Src_Shared_Dirs=` find $gammadir/src/share/vm/* -prune ! \( -name SCCS -o -name CVS -o -name .cvsignore \) -type d -print ` + + echo "# Generated by $0" >flags.make + echo "" >>flags.make + echo Platform_file = $platform_file >>flags.make + sed -n < $platform_file \ + '/=/s/^ */Platform_/p' >>flags.make + echo "" >>flags.make + echo GAMMADIR = $gammadir >>flags.make + echo SYSDEFS = \$\(Platform_sysdefs\) >>flags.make + echo "" >>flags.make + + # collect all source directories in vm for Makefile Src_Dirs macro + # (be careful to skip such names as SCCS) + echo "" >>flags.make + echo Src_Dirs = \\ >>flags.make + +# BSDNOTE: we do not have suppor for find's -printf option, so workaround it +# find ${gammadir}/src/share/vm/* -prune \ +# -type d \! \( ${toplevel_exclude_dirs} \) -exec find {} \ +# -type d \! \( ${always_exclude_dirs} \) -printf "%p \\\\\\n" \; >> flags.make + + for eldir in `find ${gammadir}/src/share/vm/* -prune \ + -type d \! \( ${toplevel_exclude_dirs} \)` + do + find $eldir -type d \! \( ${always_exclude_dirs} \) \ + -exec echo "{} \\" \; >> flags.make + done + + echo $gammadir/src/cpu/$arch/vm \\ >> flags.make + echo $gammadir/src/os/$os_family/vm \\ >> flags.make + echo $gammadir/src/os_cpu/${os_family}_$arch/vm \\ >> flags.make + echo "" >>flags.make + echo include $gammadir/build/$os_family/makefiles/${variant}.make >>flags.make + [ ${i} = profiled ] && \ + echo include $gammadir/build/$os_family/makefiles/optimized.make >>flags.make + echo include $gammadir/build/$os_family/makefiles/${i}.make >>flags.make + echo include $gammadir/build/$os_family/makefiles/${compiler}.make >>flags.make + + echo "# Generated by $0" >Makefile + echo "" >>Makefile + echo include flags.make >>Makefile + echo "" >>Makefile + echo include $gammadir/build/$os_family/makefiles/top.make >>Makefile + + echo "# Generated by $0" >vm.make + echo "" >>vm.make + echo include flags.make >>vm.make + echo "" >>vm.make + echo include $gammadir/build/$os_family/makefiles/vm.make >>vm.make + + echo "# Generated by $0" >adlc.make + echo "" >>adlc.make + echo include flags.make >>adlc.make + echo "" >>adlc.make + echo include $gammadir/build/$os_family/makefiles/adlc.make >>adlc.make + + echo "# Generated by $0" >jvmti.make + echo "" >>jvmti.make + echo include flags.make >>jvmti.make + echo "" >>jvmti.make + echo include $gammadir/build/$os_family/makefiles/jvmti.make >>jvmti.make + + echo "# Generated by $0" >sa.make + echo "" >>sa.make + echo include flags.make >>sa.make + echo "" >>sa.make + echo include $gammadir/build/$os_family/makefiles/sa.make >>sa.make + + + : ${JAVA_HOME:='${JAVA_HOME}'} + export JAVA_HOME + + case ${CLASSPATH-} in + '') + CLASSPATH=".:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/i18n.jar" + ;; + *) + CLASSPATH="${CLASSPATH}:.:${JAVA_HOME}/jre/lib/rt.jar:${JAVA_HOME}/jre/lib/i18n.jar" + esac + export CLASSPATH + + case ${LD_LIBRARY_PATH-} in + '') + LD_LIBRARY_PATH="${JAVA_HOME}/jre/lib/${lib_arch}" + ;; + *) + LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:${JAVA_HOME}/jre/lib/${lib_arch}" + esac + export LD_LIBRARY_PATH + + echo "# Environment settings recorded by $0" >env.csh + echo setenv JAVA_HOME ${JAVA_HOME} >>env.csh + echo setenv LD_LIBRARY_PATH .:${LD_LIBRARY_PATH} \ + | sed s:${JAVA_HOME}:\${JAVA_HOME}:g >>env.csh + echo setenv CLASSPATH $CLASSPATH \ + | sed s:${JAVA_HOME}:\${JAVA_HOME}:g >>env.csh + + sed < env.csh > env.ksh \ + -e '/^#/{p;d;}' \ + -e 's/^setenv //;s/ /=/;s/^/export /' + ) +done diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/compiler1.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/compiler1.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/compiler1.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/compiler1.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,12 @@ +# +# @(#)compiler1.make 1.4 03/12/23 16:35:15 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making client version of VM + +TYPE=COMPILER1 + +CFLAGS += -DCOMPILER1 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/compiler2.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/compiler2.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/compiler2.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/compiler2.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,12 @@ +# +# @(#)compiler2.make 1.4 03/12/23 16:35:16 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making server version of VM + +TYPE=COMPILER2 + +CFLAGS += -DCOMPILER2 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/core.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/core.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/core.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/core.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,14 @@ +# +# @(#)core.make 1.4 03/12/23 16:35:16 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making core version of VM + +# Note the effect on includeDB lists in top.make: +# includeDB_compiler* and ad_.*pp are excluded from the build, +TYPE=CORE + +# Note: macros.hpp defines CORE diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/debug.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/debug.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/debug.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/debug.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,17 @@ +# +# @(#)debug.make 1.4 03/12/23 16:35:16 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making debug version of VM + +# Compiler specific DEBUG_CFLAGS are passed in from gcc.make, sparcWorks.make +DEBUG_CFLAGS/DEFAULT= $(DEBUG_CFLAGS) +DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@)) +CFLAGS += $(DEBUG_CFLAGS/BYFILE) + +G_SUFFIX = _g +SYSDEFS += -DASSERT -DDEBUG +VERSION = debug diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/fastdebug.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/fastdebug.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/fastdebug.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/fastdebug.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,25 @@ +# +# @(#)fastdebug.make 1.5 03/12/23 16:35:17 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making debug version of VM + +# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make +OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS) +OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@)) + +# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files) + +# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings +CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE) + +# Set the environment variable HOTSPARC_GENERIC to "true" +# to inhibit the effect of the previous line on CFLAGS. + +G_SUFFIX = +VERSION = optimized +SYSDEFS += -DASSERT -DFASTDEBUG +PICFLAGS = DEFAULT diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/gcc.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/gcc.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/gcc.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/gcc.make 2007-02-24 09:40:30.000000000 +0100 @@ -0,0 +1,123 @@ +# XXXBSD: more sync is needed + +# +# @(#)gcc.make 1.30 03/12/23 16:35:17 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# put the *.o files in the a.out, not the shared library +LINK_INTO = $(LINK_INTO/$(VERSION)) +LINK_INTO/debug = AOUT +#LINK_INTO/optimized = AOUT +LINK_INTO/optimized = LIBJVM + +# apply this setting to link into the shared library even in the debug version: +LINK_INTO = LIBJVM + +# If MAKE_OPTO is null, then we will compile with the -DOPTO. +# That switch, despite its name, has the effect of __disabling__ OPTO. +$(MAKE_OPTO)CFLAGS += -DOPTO + +CFLAGS += -DHOTSPOT_BUILD_USER=$(shell whoami) + +# [jk]: +# * Removed useless -D__GNU__ +# XXXBSD: below's comment! +# * Removed superfluous -D_LARGEFILE64_SOURCE (this is already +# included by -D_GNU_SOURCE) +# * Removed superfluos -D__STDC__=1 + +ifdef CC_INTERP +CFLAGS += -DCC_INTERP +endif +ifdef NEED_ASM +CFLAGS += -save-temps +endif + +# XXXBSD: we need to take a look over warnings generated while compiling +# of hotspot sources. +CFLAGS += -fPIC +CFLAGS += -Winline +CFLAGS += -fno-rtti +CFLAGS += -fno-exceptions +CFLAGS += -D_REENTRANT -D_THREAD_SAFE +CFLAGS += -pipe +#CFLAGS += -fcheck-new + +# Set GCC_SAVE_TEMPS=-save-temps to keep temporary files (.ii, .s). +CFLAGS += $(GCC_SAVE_TEMPS) + +# The flags to use for an Optimized g++ build +OPT_CFLAGS += -O3 +# Hotspot uses very unstrict aliasing turn this optimization off +OPT_CFLAGS += -fno-strict-aliasing + +# The gcc compiler segv's on ia64 when compiling cInterpreter.cpp +# if we use expensive-optimizations +ifeq ($(ARCH), ia64) +OPT_CFLAGS += -fno-expensive-optimizations +endif + +OPT_CFLAGS/NOOPT=-O0 + +# Set the environment variable HOTSPARC_GENERIC to "true" +# to inhibit the effect of the previous line on CFLAGS. + +# -dumpversion in gcc-2.91 shows "egcs-2.91.66". In later version, it only +# prints the numbers (e.g. "2.95", "3.2.1") +CC_VER_MAJOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1) +CC_VER_MINOR := $(shell $(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f2) + +ifdef USE_EGCS +CPP = egcs +CC = egcs +else +# unlike g++, gcc statically links libstdc++ (add 83K in filesize), so people +# without gcc/2.91 (or whatever version we use to build the binaries) can +# run java without installing the compatibility libstdc++ +CPP = gcc +CC = gcc +endif + +ifeq ($(ARCH), amd64) +CPP = g++ +else +# statically link libstdc++.so +LIBS += -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic +endif + +ifeq ($(ARCH), ia64) +LIBS += -Wl,-relax +endif + +# +# -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. +# +STATIC_LIBGCC := $(shell if [ $$($(CC) -dumpversion | sed 's/egcs-//' | cut -d'.' -f1) -ge 3 ]; then echo true; else echo false; fi) +ifeq ("$(STATIC_LIBGCC)", "true") +LIB_FLAGS += -static-libgcc +endif + +LIB_FLAGS += -Xlinker -O1 + +AOUT_FLAGS += -export-dynamic + +# Use the stabs format for debugging information (this is the default +# on gcc-2.91). It's good enough, has all the information about line +# numbers and local variables, and libjvm_g.so is only about 16M. +# Change this back to "-g" if you want the most expressive format. +# (warning: that could easily inflate libjvm_g.so to 150M!) +# Note: The Itanium gcc compiler crashes when using -gstabs. +ifeq ($(ARCH), ia64) +DEBUG_CFLAGS += -g +else +ifeq ($(ARCH), amd64) +DEBUG_CFLAGS += -g +else +DEBUG_CFLAGS += -gstabs +endif +endif diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/hp.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/hp.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/hp.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/hp.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,12 @@ +# +# @(#)hp.make 1.4 03/12/23 16:35:17 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making premium version of VM + +TYPE=HP + +CFLAGS += -DCOMPILER2 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/hp1.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/hp1.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/hp1.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/hp1.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,12 @@ +# +# @(#)hp1.make 1.4 03/12/23 16:35:18 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making premium version of VM + +TYPE=HP1 + +CFLAGS += -DCOMPILER1 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/i486.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/i486.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/i486.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/i486.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,22 @@ +# +# @(#)i486.make 1.13 04/04/27 15:40:36 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# TLS helper, assembled from .s file +# Not included in includeDB because it has no dependencies + +# XXXBSD: not sure +# Obj_Files += linux_i486.o +Obj_Files += bsd_i486.o + +# The copied fdlibm routines in sharedRuntimeTrig.o must not be optimized +OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT) +# Must also specify if CPU is little endian +CFLAGS += -DVM_LITTLE_ENDIAN + +CFLAGS += -march=i586 + +OPT_CFLAGS/compactingPermGenGen.o = -O1 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/ia64.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/ia64.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/ia64.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/ia64.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,20 @@ +# +# @(#)ia64.make 1.18 03/12/23 16:35:18 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# +# IA64 only uses c++ based interpreter +CFLAGS += -DCC_INTERP -D_LP64=1 -DVM_LITTLE_ENDIAN +# Hotspot uses very unstrict aliasing turn this optimization off +OPT_CFLAGS += -fno-strict-aliasing +ifeq ($(VERSION),debug) +ASM_FLAGS= -DDEBUG +else +ASM_FLAGS= +endif +# workaround gcc bug in compiling varargs +OPT_CFLAGS/jni.o = -O0 + diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/jvmg.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/jvmg.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/jvmg.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/jvmg.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,21 @@ +# +# @(#)jvmg.make 1.8 03/12/23 16:35:18 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making debug version of VM + +# Compiler specific DEBUG_CFLAGS are passed in from gcc.make, sparcWorks.make +DEBUG_CFLAGS/DEFAULT= $(DEBUG_CFLAGS) +DEBUG_CFLAGS/BYFILE = $(DEBUG_CFLAGS/$@)$(DEBUG_CFLAGS/DEFAULT$(DEBUG_CFLAGS/$@)) +CFLAGS += $(DEBUG_CFLAGS/BYFILE) + +# Set the environment variable HOTSPARC_GENERIC to "true" +# to inhibit the effect of the previous line on CFLAGS. + +G_SUFFIX = _g +VERSION = optimized +SYSDEFS += -DASSERT -DDEBUG +PICFLAGS = DEFAULT diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/jvmti.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/jvmti.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/jvmti.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/jvmti.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,103 @@ +# +# @(#)jvmti.make 1.10 03/12/23 16:35:19 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# This makefile (jvmti.make) is included from the jvmti.make in the +# build directories. +# +# It knows how to build and run the tools to generate jvmti/jvmdi. + +include $(GAMMADIR)/build/bsd/makefiles/rules.make + +# ######################################################################### + +JvmtiOutDir = ../generated/jvmtifiles + +JvmtiSrcDir = $(GAMMADIR)/src/share/vm/prims +Src_Dirs += $(JvmtiSrcDir) + +# set VPATH so make knows where to look for source files +Src_Dirs_V = ${Src_Dirs} +VPATH += $(Src_Dirs_V:%=%:) + +JvmtiGeneratedNames = \ + jvmdiEnter.cpp \ + jvmdiEnterTrace.cpp \ + jvmtiEnv.hpp \ + jvmtiEnter.cpp \ + jvmtiEnterTrace.cpp \ + jvmtiEnvRecommended.cpp\ + jvmti.h \ + +JvmtiEnvFillSource = $(JvmtiSrcDir)/jvmtiEnvFill.java +JvmtiEnvFillClass = $(JvmtiOutDir)/jvmtiEnvFill.class + +JvmtiGenSource = $(JvmtiSrcDir)/jvmtiGen.java +JvmtiGenClass = $(JvmtiOutDir)/jvmtiGen.class + +JvmtiGeneratedFiles = $(JvmtiGeneratedNames:%=$(JvmtiOutDir)/%) + +XSLT = $(QUIETLY) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiGen + +.PHONY: all jvmtidocs clean cleanall + +# ######################################################################### + +all: $(JvmtiGeneratedFiles) + +both = $(JvmtiGenClass) $(JvmtiSrcDir)/jvmti.xml $(JvmtiSrcDir)/jvmtiLib.xsl + +$(JvmtiGenClass): $(JvmtiGenSource) + $(QUIETLY) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiGenSource) + +$(JvmtiEnvFillClass): $(JvmtiEnvFillSource) + $(QUIETLY) $(COMPILE.JAVAC) -g -d $(JvmtiOutDir) $(JvmtiEnvFillSource) + +$(JvmtiOutDir)/jvmtiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnter.cpp -PARAM interface jvmti + +$(JvmtiOutDir)/jvmtiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnter.xsl + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnter.xsl -OUT $(JvmtiOutDir)/jvmtiEnterTrace.cpp -PARAM interface jvmti -PARAM trace Trace + +$(JvmtiOutDir)/jvmdiEnter.cpp: $(both) $(JvmtiSrcDir)/jvmdiEnter.xsl $(JvmtiSrcDir)/jvmtiEnter.xsl + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmdiEnter.xsl -OUT $(JvmtiOutDir)/jvmdiEnter.cpp -PARAM interface jvmdi + +$(JvmtiOutDir)/jvmdiEnterTrace.cpp: $(both) $(JvmtiSrcDir)/jvmdiEnter.xsl $(JvmtiSrcDir)/jvmtiEnter.xsl + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmdiEnter.xsl -OUT $(JvmtiOutDir)/jvmdiEnterTrace.cpp -PARAM interface jvmdi -PARAM trace Trace + +$(JvmtiOutDir)/jvmtiEnvRecommended.cpp: $(both) $(JvmtiSrcDir)/jvmtiEnv.xsl $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiEnvFillClass) + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiEnv.xsl -OUT $(JvmtiOutDir)/jvmtiEnvStub.cpp + $(QUIETLY) $(RUN.JAVA) -classpath $(JvmtiOutDir) jvmtiEnvFill $(JvmtiSrcDir)/jvmtiEnv.cpp $(JvmtiOutDir)/jvmtiEnvStub.cpp $(JvmtiOutDir)/jvmtiEnvRecommended.cpp + +$(JvmtiOutDir)/jvmtiEnv.hpp: $(both) $(JvmtiSrcDir)/jvmtiHpp.xsl + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiHpp.xsl -OUT $(JvmtiOutDir)/jvmtiEnv.hpp + +$(JvmtiOutDir)/jvmti.h: $(both) $(JvmtiSrcDir)/jvmtiH.xsl + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmtiH.xsl -OUT $(JvmtiOutDir)/jvmti.h + +jvmtidocs: $(JvmtiOutDir)/jvmti.html + +$(JvmtiOutDir)/jvmti.html: $(both) $(JvmtiSrcDir)/jvmti.xsl + @echo Generating $@ + $(XSLT) -IN $(JvmtiSrcDir)/jvmti.xml -XSL $(JvmtiSrcDir)/jvmti.xsl -OUT $(JvmtiOutDir)/jvmti.html + +# ######################################################################### + +clean : + rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles) + +cleanall : + rm $(JvmtiGenClass) $(JvmtiEnvFillClass) $(JvmtiGeneratedFiles) + +# ######################################################################### + diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/makedeps.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/makedeps.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/makedeps.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/makedeps.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,26 @@ +# @(#)makedeps.make 1.9 03/12/23 16:35:19 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +include $(GAMMADIR)/build/bsd/makefiles/rules.make + +COMPILE.JAVAC.FLAGS += -d $(OUTDIR) + +MakeDepsSources=\ + $(GAMMADIR)/src/share/tools/MakeDeps/Database.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/DirectoryTree.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/DirectoryTreeNode.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/FileFormatException.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/FileList.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/FileName.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/Macro.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/MacroDefinitions.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/MakeDeps.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/MetroWerksMacPlatform.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/Platform.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/UnixPlatform.java \ + $(GAMMADIR)/src/share/tools/MakeDeps/WinGammaPlatform.java + +MakeDepsOptions= diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/optimized.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/optimized.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/optimized.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/optimized.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,24 @@ +# +# @(#)optimized.make 1.4 03/12/23 16:35:19 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making optimized version of Gamma VM +# (This is the "product", not the "release" version.) + +# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make +OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS) +OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@)) + +# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files) + +# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings +CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE) + +# Set the environment variable HOTSPARC_GENERIC to "true" +# to inhibit the effect of the previous line on CFLAGS. + +G_SUFFIX = +VERSION = optimized diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/product.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/product.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/product.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/product.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,27 @@ +# +# @(#)product.make 1.8 04/01/16 14:17:17 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making optimized version of Gamma VM +# (This is the "product", not the "release" version.) + +# Compiler specific OPT_CFLAGS are passed in from gcc.make, sparcWorks.make +OPT_CFLAGS/DEFAULT= $(OPT_CFLAGS) +OPT_CFLAGS/BYFILE = $(OPT_CFLAGS/$@)$(OPT_CFLAGS/DEFAULT$(OPT_CFLAGS/$@)) + +# (OPT_CFLAGS/SLOWER is also available, to alter compilation of buggy files) + +# If you set HOTSPARC_GENERIC=yes, you disable all OPT_CFLAGS settings +CFLAGS$(HOTSPARC_GENERIC) += $(OPT_CFLAGS/BYFILE) + +# Set the environment variable HOTSPARC_GENERIC to "true" +# to inhibit the effect of the previous line on CFLAGS. + +G_SUFFIX = +SYSDEFS += -DPRODUCT +VERSION = optimized + +STRIP = strip --strip-debug diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/profiled.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/profiled.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/profiled.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/profiled.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,12 @@ +# +# @(#)profiled.make 1.4 03/12/23 16:35:20 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Sets make macros for making profiled version of Gamma VM +# (It is also optimized.) + +CFLAGS += -pg +AOUT_FLAGS += -pg diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/rules.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/rules.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/rules.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/rules.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,62 @@ +# @(#)rules.make 1.8 03/12/23 16:35:20 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# Note use of ALT_BOOTDIR to explicitly specify location of java and +# javac; this is the same environment variable used in the J2SE build +# process for overriding the default spec, which is BOOTDIR. +# Note also that we fall back to using JAVA_HOME if neither of these is +# specified. + +ifdef ALT_BOOTDIR + +RUN.JAVA = $(ALT_BOOTDIR)/bin/java +RUN.JAVAP = $(ALT_BOOTDIR)/bin/javap +RUN.JAVAH = $(ALT_BOOTDIR)/bin/javah +RUN.JAR = $(ALT_BOOTDIR)/bin/jar +COMPILE.JAVAC = $(ALT_BOOTDIR)/bin/javac +COMPILE.RMIC = $(ALT_BOOTDIR)/bin/rmic +BOOT_JAVA_HOME = $(ALT_BOOTDIR) + +else + +ifdef BOOTDIR + +RUN.JAVA = $(BOOTDIR)/bin/java +RUN.JAVAP = $(BOOTDIR)/bin/javap +RUN.JAVAH = $(BOOTDIR)/bin/javah +RUN.JAR = $(BOOTDIR)/bin/jar +COMPILE.JAVAC = $(BOOTDIR)/bin/javac +COMPILE.RMIC = $(BOOTDIR)/bin/rmic +BOOT_JAVA_HOME = $(BOOTDIR) + +else + +ifdef JAVA_HOME + +RUN.JAVA = $(JAVA_HOME)/bin/java +RUN.JAVAP = $(JAVA_HOME)/bin/javap +RUN.JAVAH = $(JAVA_HOME)/bin/javah +RUN.JAR = $(JAVA_HOME)/bin/jar +COMPILE.JAVAC = $(JAVA_HOME)/bin/javac +COMPILE.RMIC = $(JAVA_HOME)/bin/rmic +BOOT_JAVA_HOME = $(JAVA_HOME) + +else + +# take from the PATH, if ALT_BOOTDIR, BOOTDIR and JAVA_HOME are not defined +# note that this is to support hotspot build without SA. To build +# SA along with hotspot, you need to define ALT_BOOTDIR, BOOTDIR or JAVA_HOME + +RUN.JAVA = java +RUN.JAVAP = javap +RUN.JAVAH = javah +RUN.JAR = jar +COMPILE.JAVAC = javac +COMPILE.RMIC = rmic + +endif +endif +endif diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/sa.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/sa.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/sa.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/sa.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,53 @@ +# +# @(#)sa.make 1.22 04/04/28 14:30:59 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# This makefile (sa.make) is included from the sa.make in the +# build directories. + +# This makefile is used to build Serviceability Agent java code +# and generate JNI header file for native methods. + +include $(GAMMADIR)/build/bsd/makefiles/rules.make +AGENT_DIR = $(GAMMADIR)/agent +include $(GAMMADIR)/build/sa.files +GENERATED = ../generated + +# tools.jar is needed by the JDI - SA binding +SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar + +# gnumake 3.78.1 does not accept the *s that +# are in AGENT_ALLFILES, so use the shell to expand them +AGENT_ALLFILES := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_ALLFILES)) + +# if $(AGENT_DIR) does not exist, we don't build SA +# also, we don't build SA on Itanium. + +all: + if [ -d $(AGENT_DIR) -a "$(ARCH)" != "ia64" ] ; then \ + $(MAKE) -f sa.make $(GENERATED)/sa-jdi.jar; \ + fi + +$(GENERATED)/sa-jdi.jar: $(AGENT_ALLFILES) + $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ + echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ + exit 1; \ + fi + $(QUIETLY) echo "Making $@" + $(QUIETLY) if [ ! -d $(GENERATED)/saclasses ] ; then \ + mkdir -p $(GENERATED)/saclasses; \ + fi + $(QUIETLY) $(COMPILE.JAVAC) -source 1.4 -classpath $(SA_CLASSPATH) -g -d $(GENERATED)/saclasses $(AGENT_ALLFILES) + $(QUIETLY) $(COMPILE.RMIC) -classpath $(GENERATED)/saclasses -d $(GENERATED)/saclasses sun.jvm.hotspot.debugger.remote.RemoteDebuggerServer + $(QUIETLY) $(RUN.JAR) cvf $@ -C $(GENERATED)/saclasses/ . + $(QUIETLY) $(RUN.JAR) uvf $@ -C $(AGENT_SRC_DIR) META-INF/services/com.sun.jdi.connect.Connector + $(QUIETLY) $(RUN.JAVAH) -classpath $(GENERATED)/saclasses -d $(GENERATED) -jni sun.jvm.hotspot.debugger.x86.X86ThreadContext + $(QUIETLY) $(RUN.JAVAH) -classpath $(GENERATED)/saclasses -d $(GENERATED) -jni sun.jvm.hotspot.debugger.ia64.IA64ThreadContext + $(QUIETLY) $(RUN.JAVAH) -classpath $(GENERATED)/saclasses -d $(GENERATED) -jni sun.jvm.hotspot.debugger.amd64.AMD64ThreadContext + +clean: + rm -rf $(GENERATED)/saclasses + rm -rf $(GENERATED)/sa-jdi.jar diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/top.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/top.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/top.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/top.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,148 @@ +# +# @(#)top.make 1.13 03/12/23 16:35:21 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# top.make is included in the Makefile in the build directories. +# It DOES NOT include the vm dependency info in order to be faster. +# It's main job is to implement the incremental form of make lists. +# It also: +# -builds and runs adlc via adlc.make +# -generates JVMTI/JVMDI source and docs via jvmti.make (JSR-163) +# -generate sa-jdi.jar (JDI binding to core files) + +# It assumes the following flags are set: +# CFLAGS Platform_file, Src_Dirs, SYSDEFS, AOUT, Obj_Files + +# -- D. Ungar (5/97) from a file by Bill Bush + +# Don't override the built-in $(MAKE). +# Instead, use "gmake" (or "gnumake") from the command line. --Rose +#MAKE = gmake + +GENERATED = ../generated +VM = $(GAMMADIR)/src/share/vm +Plat_File = $(Platform_file) +CDG = cd $(GENERATED); + +# Pick up MakeDeps' sources and definitions +include $(GAMMADIR)/build/bsd/makefiles/makedeps.make +MakeDepsClass = MakeDeps.class +MakeDeps = $(RUN.JAVA) -classpath . MakeDeps + +Include_DBs/GC = $(VM)/includeDB_gc \ + $(VM)/gc_implementation/includeDB_gc_parallelScavenge \ + $(VM)/gc_implementation/includeDB_gc_shared + +Include_DBs/CORE = $(VM)/includeDB_core $(Include_DBs/GC) $(VM)/includeDB_coreonly +Include_DBs/CORE+CI = $(VM)/includeDB_core $(Include_DBs/GC) $(VM)/includeDB_ci +Include_DBs/COMPILER1 = $(Include_DBs/CORE+CI) $(VM)/includeDB_compiler1 +Include_DBs/COMPILER2 = $(Include_DBs/CORE+CI) $(VM)/includeDB_compiler2 +Include_DBs = $(Include_DBs/$(TYPE)) + +Cached_plat = platform.current +Cached_db = includeDB.current + +Incremental_Lists =$(GENERATED)/$(Cached_db) +# list generation also creates $(GENERATED)/$(Cached_plat) + + +AD_Dir = $(GENERATED)/adfiles +ADLC = $(AD_Dir)/adlc +AD_Spec = $(GAMMADIR)/src/cpu/$(Platform_arch)/vm/$(Platform_arch).ad +AD_Src = $(GAMMADIR)/src/share/vm/adlc +AD_Names = ad_$(Platform_arch).hpp ad_$(Platform_arch).cpp +AD_Files = $(AD_Names:%=$(AD_Dir)/%) + +# AD_Files_If_Required/COMPILER1 = ad_stuff +AD_Files_If_Required/COMPILER2 = ad_stuff +AD_Files_If_Required = $(AD_Files_If_Required/$(TYPE)) + +# Wierd argument adjustment for "gnumake -j..." +adjust-mflags = $(GENERATED)/adjust-mflags +MFLAGS-adjusted = `$(adjust-mflags) "$(MFLAGS)" "$(HOTSPOT_BUILD_JOBS)"` + + +# default target: make makeDeps, update lists, make vm +# done in stages to force sequential order with parallel make +# + +default: vm_build_preliminaries the_vm + @echo All done. + +# This is an explicit dependency for the sake of parallel makes. +vm_build_preliminaries: $(Incremental_Lists) $(AD_Files_If_Required) jvmti_stuff sa_stuff + @# We need a null action here, so implicit rules don't get consulted. + +# make makeDeps: (and zap the cached db files to force a nonincremental run) + +$(GENERATED)/$(MakeDepsClass): $(MakeDepsSources) + @$(COMPILE.JAVAC) -classpath $(GAMMADIR)/src/share/tools/MakeDeps -g -d $(GENERATED) $(MakeDepsSources) + @echo Removing $(Incremental_Lists) to force regeneration. + @rm -f $(Incremental_Lists) + @$(CDG) echo >$(Cached_plat) + +# make incremental_lists, if cached files out of date, run makeDeps + +$(Incremental_Lists): $(Include_DBs) $(Plat_File) $(GENERATED)/$(MakeDepsClass) + $(CDG) cat $(Include_DBs) > includeDB + $(CDG) if [ ! -r incls ] ; then \ + mkdir incls ; \ + fi + $(CDG) $(MakeDeps) diffs UnixPlatform $(Cached_plat) $(Cached_db) $(Plat_File) includeDB $(MakeDepsOptions) + $(CDG) cp includeDB $(Cached_db) + $(CDG) cp $(Plat_File) $(Cached_plat) + +# symbolic target for command lines +lists: $(Incremental_Lists) + @: lists are now up to date + +# make AD files as necessary +ad_stuff: $(Incremental_Lists) $(adjust-mflags) + @$(MAKE) -f adlc.make $(MFLAGS-adjusted) + +# generate JVMTI/JVMDI files from the spec +jvmti_stuff: $(Incremental_Lists) $(adjust-mflags) + @$(MAKE) -f jvmti.make $(MFLAGS-adjusted) + +# generate SA jar files and native header +sa_stuff: + @$(MAKE) -f sa.make $(MFLAGS-adjusted) + +# and the VM: must use other makefile with dependencies included + +# We have to go to great lengths to get control over the -jN argument +# to the recursive invocation of vm.make. The problem is that gnumake +# resets -jN to -j1 for recursive runs. (How helpful.) +# Note that the user must specify the desired parallelism level via a +# command-line or environment variable name HOTSPOT_BUILD_JOBS. +$(adjust-mflags): $(GAMMADIR)/build/bsd/makefiles/adjust-mflags.sh + @+rm -f $@ $@+ + @+cat $< > $@+ + @+chmod +x $@+ + @+mv $@+ $@ + +the_vm: vm_build_preliminaries $(adjust-mflags) + @$(MAKE) -f vm.make $(MFLAGS-adjusted) + +# next rules support "make foo.[oi]" + +%.o %.i %.s: + $(MAKE) -f vm.make $(MFLAGS) $@ + #$(MAKE) -f vm.make $@ + +# this should force everything to be rebuilt +clean: + rm -f $(GENERATED)/*.class + $(MAKE) $(MFLAGS) $(GENERATED)/$(MakeDepsClass) + $(MAKE) -f vm.make $(MFLAGS) clean + +# just in case it doesn't, this should do it +realclean: + $(MAKE) -f vm.make $(MFLAGS) clean + rm -fr $(GENERATED) + +.PHONY: default vm_build_preliminaries +.PHONY: lists ad_stuff jvmti_stuff sa_stuff the_vm clean realclean diff -ruN jdk-1_5_0_11/hotspot/build/bsd/makefiles/vm.make jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/vm.make --- jdk-1_5_0_11/hotspot/build/bsd/makefiles/vm.make 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/makefiles/vm.make 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,265 @@ +# +# @(#)vm.make 1.30 04/03/08 21:20:34 +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# This makefile (vm.make) is included from the vm.make in the +# build directories. +# It knows how to compile and link the VM. + +# It assumes the following flags are set: +# CFLAGS Platform_file, Src_Dirs, SYSDEFS, AOUT, LIB, Obj_Files, Lib_H_Files, Lib_C_Files + +# And it assumes that the deps and incls have already been built. + +# -- D. Ungar (5/97) from a file by Bill Bush + +# build whole VM by default, I can also build foo.o or foo.i + +AOUT = gamma$(G_SUFFIX) + +ARCH = $(Platform_arch) + +JSIG = jsig$(G_SUFFIX) +LIBJSIG = lib$(JSIG).so + +SAPROC = saproc$(G_SUFFIX) +LIBSAPROC = lib$(SAPROC).so + +default: $(AOUT) $(LIBJSIG) checkAndBuildSA + +GENERATED = ../generated + +# read a generated file defining the set of .o's and the .o .h dependencies + +include $(GENERATED)/Dependencies +Obj_Files += $(EXTRA_OBJS) + + +# read machine-specific adjustments (%%% should do this via buildATree?) + +include $(GAMMADIR)/build/bsd/makefiles/$(Platform_arch).make + +# tell make that .cpp is important + +.SUFFIXES: .cpp $(SUFFIXES) + + +# set VPATH so make knows where to look for source files +# Src_Dirs is everything in src/share/vm/*, plus the right os/*/vm and cpu/*/vm +# The incls directory contains generated header file lists for inclusion. +# The adfiles directory contains ad_.[ch]pp. +# The jvmtifiles directory contains jvmti*.[ch]pp and jvmdi*.[ch]pp +Src_Dirs_V = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED)/incls +VPATH += $(Src_Dirs_V:%=%:) + +# set INCLUDES for C preprocessor + +Src_Dirs_I = $(GENERATED)/adfiles $(GENERATED)/jvmtifiles ${Src_Dirs} $(GENERATED) +INCLUDES += $(Src_Dirs_I:%=-I%) + +# Bill had this, I don't know why +# SYSDEFS += -Dvolatile='' + +# Bill had this, I don't know why +# SYSDEFS += -DNOASM + +BUILD_VERSION = -DHOTSPOT_BUILD_VERSION="\"$(HOTSPOT_BUILD_VERSION)\"" +BUILD_VERSION$(HOTSPOT_BUILD_VERSION) = + +CPPFLAGS = ${SYSDEFS} ${INCLUDES} ${BUILD_VERSION} + +# Suppress warnings (for now) +CFLAGS += -w + +# do not include shared lib path in a.outs +#AOUT_FLAGS += -norunpath + +COMPILE = ${CPP} ${CPPFLAGS} ${CFLAGS} +LINK_LIB = ${CPP} -shared -mimpure-text +LINK = ${CPP} ${AOUT_FLAGS} + + +COMPILE.s = ${COMPILE} -S +COMPILE.o = ${COMPILE} -c +COMPILE.i = ${COMPILE} -E + +verbose-echo = echo +verbose-echo$(MAKE_VERBOSE) = : + +# Compiling + +# Generate Disassembly for Inspection +%.s: %.cpp + @echo Compiling $< ; \ + rm -f $@ ; \ + $(verbose-echo) \ + ${COMPILE.s} $< ; \ + ${COMPILE.s} $<; \ + rm -f c++filt.out; \ + cat $@ | c++filt > c++filt.out; \ + rm -f $@; \ + mv c++filt.out $@ + +%.o: %.cpp + @echo Compiling $< ; \ + rm -f $@ ; \ + $(verbose-echo) \ + ${COMPILE.o} $< ; \ + ${COMPILE.o} $< && \ + case "$(MFLAGS)" in *j*) echo Done with $<;; esac + +%.o: %.S + @echo Assembling-cpp $< ; \ + rm -f $@ ; \ + $(verbose-echo) \ + ${COMPILE.o} $< ; \ + ${COMPILE.o} $< && \ + case "$(MFLAGS)" in *j*) echo Done with $<;; esac + +%.o: %.s + @echo Assembling $< ; \ + rm -f $@ ; \ + $(verbose-echo) \ + ${COMPILE.o} $< ; \ + ${COMPILE.o} $< && \ + case "$(MFLAGS)" in *j*) echo Done with $<;; esac + +# Intermediate files (for debugging macros) + +%.i: %.cpp + @echo Preprocessing $< to $@; \ + $(verbose-echo) \ + ${COMPILE.i} $< >$@ ; \ + ${COMPILE.i} $< >$@ + + +# The whole megilla: + +LIBS += -lm -pthread + +# g++ doesn't recognize -pthread, add it manually +ifeq ($(TRUE_PLATFORM), OpenBSD) +LIBS += -lpthread +endif + +JVM = jvm$(G_SUFFIX) +LIBJVM = lib$(JVM).so + +ifeq ("${G_SUFFIX}", "_g") +LN_LIBJVM = libjvm.so +else +LN_LIBJVM = libjvm_g.so +endif + +# By default, link the *.o into the library, not the executable. +LINK_INTO$(LINK_INTO) = LIBJVM + + +# making launch: + +AOUT.o = $(AOUT.o/LINK_INTO_$(LINK_INTO)) +AOUT.o/LINK_INTO_AOUT = $(Obj_Files) +AOUT.o/LINK_INTO_LIBJVM = + +# For now, build a copy of the JDK1.2beta4 launcher. +# This is useful, because the development cycle goes faster +# if we can use ild to statically link the VM into the launcher. +# Eventually, we should expunge all use of $(AOUT) from the makefiles. +# The optimized (product) build should certainly avoid making a new launcher. +AOUT.o += launcher.o + +LAUNCHER = $(GAMMADIR)/src/os/$(Platform_os_family)/launcher +LAUNCHERFLAGS = -I$(LAUNCHER) -I$(GAMMADIR)/src/share/vm/prims +launcher.o: launcher.c $(LAUNCHER)/java.c $(LAUNCHER)/java_md.c + $(CC) -g -c -o $@ launcher.c $(LAUNCHERFLAGS) $(CPPFLAGS) + +# Figure out how to turn this off: +#LAUNCHERFLAGS += -DOLDJAVA + + +launcher.c: + @rm -f $@ $@+ + echo '#define debug launcher_debug' >>$@+ + echo '#include "java.c"' >>$@+ + echo '#include "java_md.c"' >>$@+ + mv $@+ $@ + +$(AOUT): $(AOUT.o) $(LIBJVM) + @echo Linking launcher... ; \ + $(verbose-echo) \ + ${LINK} -o $@ ${AOUT_FLAGS} $(AOUT.o) -L `pwd` -L ${JAVA_HOME}/jre/lib/$(Platform_gnu_dis_arch) -L ${JAVA_HOME}/lib/$(Platform_gnu_dis_arch) -l$(JVM) $(LIBS) ; \ + ${LINK} -o $@ ${AOUT_FLAGS} $(AOUT.o) -L `pwd` -L ${JAVA_HOME}/jre/lib/$(Platform_gnu_dis_arch) -L ${JAVA_HOME}/lib/$(Platform_gnu_dis_arch) -l$(JVM) $(LIBS) + +# Set soname, see 5009832 +LFLAGS_VM += -Xlinker -soname=$(LIBJVM) + +# making the library: + +LIBJVM.o = $(LIBJVM.o/LINK_INTO_$(LINK_INTO)) +LIBJVM.o/LINK_INTO_AOUT = +LIBJVM.o/LINK_INTO_LIBJVM = $(Obj_Files) + + +$(LIBJVM): $(LIBJVM.o) + echo Linking vm... ; \ + ${LINK_LIB} ${LIB_FLAGS} ${LFLAGS_VM} -o $@ $(LIBJVM.o) $(LIBS) +ifdef STRIP + echo Stripping vm... ; \ + $(STRIP) $(LIBJVM) +endif +# @rm -f $@.1; ln -s $@ $@.1 +# @rm -f ${LN_LIBJVM}; ln -s $@ ${LN_LIBJVM} +# @rm -f ${LN_LIBJVM}.1; ln -s ${LN_LIBJVM} ${LN_LIBJVM}.1 + +# making libjsig + +JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm +ifeq ("${G_SUFFIX}", "_g") +SYMFLAG = -g +else +SYMFLAG = +endif + +$(LIBJSIG): $(JSIGSRCDIR)/jsig.c + echo Making signal interposition lib...; \ + $(CC) $(SYMFLAG) -D_GNU_SOURCE -D_REENTRANT $(LIB_FLAGS) -shared -fPIC -o $@ $(JSIGSRCDIR)/jsig.c + +include $(GAMMADIR)/build/bsd/makefiles/rules.make + +# making libsaproc +AGENT_DIR = $(GAMMADIR)/agent +SASRCDIR = $(AGENT_DIR)/src/os/bsd + +SASRCFILES = $(SASRCDIR)/salibelf.c \ + $(SASRCDIR)/symtab.c \ + $(SASRCDIR)/libproc_impl.c \ + $(SASRCDIR)/ps_proc.c \ + $(SASRCDIR)/ps_core.c \ + $(SASRCDIR)/LinuxDebuggerLocal.c + +# if $(AGENT_DIR) does not exist, we don't build SA +# also, we don't build SA on Itanium. + +checkAndBuildSA: + if [ -d $(AGENT_DIR) -a "$(ARCH)" != "ia64" ] ; then \ + $(MAKE) -f vm.make $(LIBSAPROC); \ + fi + +$(LIBSAPROC): $(SASRCFILES) + if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ + echo "ALT_BOOTDIR, BOOTDIR or JAVA_HOME needs to be defined to build SA"; \ + exit 1; \ + fi + echo Making SA debugger back-end...; \ + $(CC) $(SYMFLAG) -shared -fPIC \ + -D$(ARCH) -D_GNU_SOURCE \ + -I$(GENERATED) \ + -I$(BOOT_JAVA_HOME)/include \ + -I$(BOOT_JAVA_HOME)/include/bsd \ + $(SASRCFILES) \ + $(SA_LFLAGS) -o $@ + +.PHONY: default diff -ruN jdk-1_5_0_11/hotspot/build/bsd/platform_amd64 jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_amd64 --- jdk-1_5_0_11/hotspot/build/bsd/platform_amd64 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_amd64 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,13 @@ +os_family = bsd + +arch = amd64 + +os_arch = bsd_amd64 + +lib_arch = amd64 + +compiler = gcc + +gnu_dis_arch = amd64 + +sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DAMD64 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/platform_i486 jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_i486 --- jdk-1_5_0_11/hotspot/build/bsd/platform_i486 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_i486 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,13 @@ +os_family = bsd + +arch = i486 + +os_arch = bsd_i486 + +lib_arch = i386 + +compiler = gcc + +gnu_dis_arch = i386 + +sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA32 diff -ruN jdk-1_5_0_11/hotspot/build/bsd/platform_ia64 jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_ia64 --- jdk-1_5_0_11/hotspot/build/bsd/platform_ia64 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_ia64 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,15 @@ +os_family = bsd + +arch = ia64 + +os_arch = bsd_ia64 + +lib_arch = ia64 + +compiler = gcc + +gnu_dis_arch = ia64 + +sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA64 -DCC_INTERP + +mark_style = alignment diff -ruN jdk-1_5_0_11/hotspot/build/bsd/platform_sparc jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_sparc --- jdk-1_5_0_11/hotspot/build/bsd/platform_sparc 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/build/bsd/platform_sparc 2007-02-24 09:06:00.000000000 +0100 @@ -0,0 +1,13 @@ +os_family = bsd + +arch = sparc + +os_arch = bsd_sparc + +lib_arch = sparc + +compiler = gcc + +gnu_dis_arch = sparc + +sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DSPARC diff -ruN jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/extendedPC_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/extendedPC_amd64.cpp --- jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/extendedPC_amd64.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/extendedPC_amd64.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -20,7 +20,7 @@ // the safepoint code. If we stopped at the second nop instruction, the pc // will no longer point to a valid instruction. address new_pc = _pc; - while (nativeInstruction_at(new_pc)->is_nop()) { + while (NativeInstruction::nativeInstruction_at(new_pc)->is_nop()) { new_pc += NativeInstruction:: nop_instruction_size; } new_pc = new_begin + (new_pc - begin); diff -ruN jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/icBuffer_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/icBuffer_amd64.cpp --- jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/icBuffer_amd64.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/icBuffer_amd64.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -40,8 +40,8 @@ address InlineCacheBuffer::ic_buffer_entry_point(address code_begin) { // creation also verifies the object - NativeMovConstReg* move = nativeMovConstReg_at(code_begin); - NativeJump* jump = nativeJump_at(move->next_instruction_address()); + NativeMovConstReg* move = NativeMovConstReg::nativeMovConstReg_at(code_begin); + NativeJump* jump = NativeJump::nativeJump_at(move->next_instruction_address()); return jump->jump_destination(); } @@ -49,6 +49,6 @@ oop InlineCacheBuffer::ic_buffer_cached_oop(address code_begin) { // creation also verifies the object - NativeMovConstReg* move = nativeMovConstReg_at(code_begin); + NativeMovConstReg* move = NativeMovConstReg::nativeMovConstReg_at(code_begin); return (oop) move->data(); } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/jni_amd64.h jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/jni_amd64.h --- jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/jni_amd64.h 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/jni_amd64.h 2007-02-24 09:06:01.000000000 +0100 @@ -11,7 +11,7 @@ #ifndef _JAVASOFT_JNI_MD_H_ #define _JAVASOFT_JNI_MD_H_ -#if defined(SOLARIS) || defined(LINUX) +#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE) #ifdef __cplusplus #define JNIEXPORT extern "C" diff -ruN jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/nativeInst_amd64.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/nativeInst_amd64.hpp --- jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/nativeInst_amd64.hpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/nativeInst_amd64.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -109,10 +109,10 @@ // unit test stuff static void test() {} // override for testing - inline friend NativeInstruction* nativeInstruction_at(address address); + inline static NativeInstruction* nativeInstruction_at(address address); }; -inline NativeInstruction* nativeInstruction_at(address address) +inline NativeInstruction* NativeInstruction::nativeInstruction_at(address address) { NativeInstruction* inst = (NativeInstruction*) address; #ifdef ASSERT @@ -195,9 +195,9 @@ void print(); // Creation - inline friend NativeCall* nativeCall_at(address address); + inline static NativeCall* nativeCall_at(address address); - inline friend NativeCall* nativeCall_before(address return_address); + inline static NativeCall* nativeCall_before(address return_address); static bool is_call_at(address instr) { @@ -222,7 +222,7 @@ static void replace_mt_safe(address instr_addr, address code_buffer); }; -inline NativeCall* nativeCall_before(address return_address) +inline NativeCall* NativeCall::nativeCall_before(address return_address) { NativeCall* call = (NativeCall*) (return_address - NativeCall::return_address_offset); #ifdef ASSERT @@ -231,7 +231,7 @@ return call; } -inline NativeCall* nativeCall_at(address address) +inline NativeCall* NativeCall::nativeCall_at(address address) { NativeCall* call = (NativeCall*) (address - NativeCall::instruction_offset); #ifdef ASSERT @@ -282,12 +282,12 @@ static void test() {} // Creation - inline friend NativeMovConstReg* nativeMovConstReg_at(address address); + inline static NativeMovConstReg* nativeMovConstReg_at(address address); - inline friend NativeMovConstReg* nativeMovConstReg_before(address address); + inline static NativeMovConstReg* nativeMovConstReg_before(address address); }; -inline NativeMovConstReg* nativeMovConstReg_at(address address) +inline NativeMovConstReg* NativeMovConstReg::nativeMovConstReg_at(address address) { NativeMovConstReg* test = (NativeMovConstReg*) (address - NativeMovConstReg::instruction_offset); @@ -297,7 +297,7 @@ return test; } -inline NativeMovConstReg* nativeMovConstReg_before(address address) +inline NativeMovConstReg* NativeMovConstReg::nativeMovConstReg_before(address address) { NativeMovConstReg* test = (NativeMovConstReg*) (address - NativeMovConstReg::instruction_size - NativeMovConstReg::instruction_offset); @@ -310,11 +310,11 @@ class NativeMovConstRegPatching : public NativeMovConstReg { private: - inline friend NativeMovConstRegPatching* nativeMovConstRegPatching_at( + inline static NativeMovConstRegPatching* nativeMovConstRegPatching_at( address address); }; -inline NativeMovConstRegPatching* nativeMovConstRegPatching_at( +inline NativeMovConstRegPatching* NativeMovConstRegPatching::nativeMovConstRegPatching_at( address address) { NativeMovConstRegPatching* test = @@ -368,7 +368,7 @@ } // Creation - inline friend NativeJump* nativeJump_at(address address); + inline static NativeJump* nativeJump_at(address address); void verify(); @@ -385,7 +385,7 @@ address dest); }; -inline NativeJump* nativeJump_at(address address) +inline NativeJump* NativeJump::nativeJump_at(address address) { NativeJump* jump = (NativeJump*) (address - NativeJump::instruction_offset); #ifdef ASSERT @@ -417,7 +417,7 @@ address jump_destination() const; // Creation - inline friend NativeGeneralJump* nativeGeneralJump_at(address address); + inline static NativeGeneralJump* nativeGeneralJump_at(address address); // Insertion of native general jump instruction static void insert_unconditional(address code_pos, address entry); @@ -428,7 +428,7 @@ void verify(); }; -inline NativeGeneralJump* nativeGeneralJump_at(address address) +inline NativeGeneralJump* NativeGeneralJump::nativeGeneralJump_at(address address) { NativeGeneralJump* jump = (NativeGeneralJump*) address; debug_only(jump->verify();) diff -ruN jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/relocInfo_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/relocInfo_amd64.cpp --- jdk-1_5_0_11/hotspot/src/cpu/amd64/vm/relocInfo_amd64.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/amd64/vm/relocInfo_amd64.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -30,13 +30,13 @@ address Relocation::pd_call_destination() { - NativeInstruction* ni = nativeInstruction_at(addr()); + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(addr()); if (ni->is_call()) { - return nativeCall_at(addr())->destination(); + return NativeCall::nativeCall_at(addr())->destination(); } else if (ni->is_jump()) { - return nativeJump_at(addr())->jump_destination(); + return NativeJump::nativeJump_at(addr())->jump_destination(); } else if (ni->is_cond_jump()) { - return nativeGeneralJump_at(addr())->jump_destination(); + return NativeGeneralJump::nativeGeneralJump_at(addr())->jump_destination(); } else { ShouldNotReachHere(); return NULL; @@ -47,18 +47,18 @@ void Relocation::pd_set_call_destination(address x, intptr_t off) { x -= off; - NativeInstruction* ni = nativeInstruction_at(addr()); + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(addr()); if (ni->is_call()) { - nativeCall_at(addr())->set_destination(x); + NativeCall::nativeCall_at(addr())->set_destination(x); } else if (ni->is_jump()) { - NativeJump* nj = nativeJump_at(addr()); + NativeJump* nj = NativeJump::nativeJump_at(addr()); if (nj->jump_destination() == (address) -1) { x = (address) -1; // retain jump to self } nj->set_jump_destination(x); } else if (ni->is_cond_jump()) { // %%%% kludge this, for now, until we get a jump_destination method - address old_dest = nativeGeneralJump_at(addr())->jump_destination(); + address old_dest = NativeGeneralJump::nativeGeneralJump_at(addr())->jump_destination(); address disp = Assembler::locate_operand(addr(), Assembler::call32_operand); *(jint*) disp += (x - old_dest); @@ -136,6 +136,6 @@ Untested("pd_swap_out_breakpoint"); assert(NativeIllegalInstruction::instruction_size == sizeof(short), "right address unit for update"); - NativeInstruction* ni = nativeInstruction_at(x); + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(x); *(short*) ni->addr_at(0) = instrs[0]; } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/c1_CodeGenerator_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/c1_CodeGenerator_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/c1_CodeGenerator_i486.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/c1_CodeGenerator_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -393,8 +393,8 @@ Item left(x->x()); Item right(x->y()); - RInfo first_arg = as_RInfo(eax, edx);; - RInfo second_arg = as_RInfo(ebx, ecx);; + RInfo first_arg = RInfo::as_RInfo(eax, edx);; + RInfo second_arg = RInfo::as_RInfo(ebx, ecx);; HintItem left_hint(x->x()->type(), first_arg); HintItem right_hint(x->x()->type(), second_arg); @@ -875,13 +875,13 @@ // compare value must be in edx,eax (hi,lo); may be destroyed by cmpxchg8 instruction cmp_value.set_destroys_register(); - RInfo cmp_value_rinfo = as_RInfo(eax, edx); + RInfo cmp_value_rinfo = RInfo::as_RInfo(eax, edx); HintItem cmp_value_hint(longType, cmp_value_rinfo); ValueGen cmp_value_v(&cmp_value, &cmp_value_hint, this); load_item_force(&cmp_value, cmp_value_rinfo); // new value must be in ecx,ebx (hi,lo) - RInfo new_value_rinfo = as_RInfo(ebx, ecx); + RInfo new_value_rinfo = RInfo::as_RInfo(ebx, ecx); HintItem new_value_hint(longType, new_value_rinfo); ValueGen new_value_v(&new_value, &new_value_hint, this); load_item_force(&new_value, new_value_rinfo); @@ -1609,7 +1609,7 @@ // stressing out register allocator. if (type == intType || type == objectType) { - RInfo cmp_rinfo = as_RInfo(eax); // cmpxchg requires cmp val in eax + RInfo cmp_rinfo = RInfo::as_RInfo(eax); // cmpxchg requires cmp val in eax HintItem cmp_hint(type, cmp_rinfo); ValueGen cmp_v(&cmp, &cmp_hint, this); load_item_force(&cmp, cmp_rinfo); @@ -1651,13 +1651,13 @@ } else if (type == longType) { // cmpxch8 requires cmp in edx,eax (hi,lo); - RInfo cmp_rinfo = as_RInfo(eax, edx); + RInfo cmp_rinfo = RInfo::as_RInfo(eax, edx); HintItem cmp_hint(longType, cmp_rinfo); ValueGen cmp_v(&cmp, &cmp_hint, this); load_item_force(&cmp, cmp_rinfo); // new value must be in ecx,ebx (hi,lo) - RInfo val_rinfo = as_RInfo(ebx, ecx); + RInfo val_rinfo = RInfo::as_RInfo(ebx, ecx); HintItem val_hint(longType, val_rinfo); ValueGen val_v(&val, &val_hint, this); load_item_force(&val, val_rinfo); diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/c1_LIRAssembler_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/c1_LIRAssembler_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/c1_LIRAssembler_i486.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/c1_LIRAssembler_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -2848,11 +2848,11 @@ StaticCallStub* call_stub = new StaticCallStub(); // pc will get filled in by ArrayCopyStub ArrayCopyStub* stub = new ArrayCopyStub(op->info(), call_stub); stub->set_tmp(op->tmp()->rinfo()); - stub->set_src(as_RInfo(src)); - stub->set_src_pos(as_RInfo(src_pos)); - stub->set_dst(as_RInfo(dst)); - stub->set_dst_pos(as_RInfo(dst_pos)); - stub->set_length(as_RInfo(length)); + stub->set_src(RInfo::as_RInfo(src)); + stub->set_src_pos(RInfo::as_RInfo(src_pos)); + stub->set_dst(RInfo::as_RInfo(dst)); + stub->set_dst_pos(RInfo::as_RInfo(dst_pos)); + stub->set_length(RInfo::as_RInfo(length)); emit_code_stub(stub); emit_code_stub(call_stub); diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/c1_Runtime1_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/c1_Runtime1_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/c1_Runtime1_i486.cpp 2007-02-19 22:56:20.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/c1_Runtime1_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -1417,21 +1417,21 @@ } -jint* GC_Support::get_argument_addr_at(const frame fr, ArgumentLocation location) { +intptr_t* GC_Support::get_argument_addr_at(const frame fr, ArgumentLocation location) { // not used for i486 Unimplemented(); return NULL; } -jint* GC_Support::get_stack_argument_addr_at(const frame fr, int offset_from_sp_in_words) { +intptr_t* GC_Support::get_stack_argument_addr_at(const frame fr, int offset_from_sp_in_words) { // not used for i486 Unimplemented(); return NULL; } -jint* GC_Support::get_register_argument_addr_at(const frame fr, Register r) { +intptr_t* GC_Support::get_register_argument_addr_at(const frame fr, Register r) { // not used for i486 Unimplemented(); return NULL; diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/extendedPC_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/extendedPC_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/extendedPC_i486.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/extendedPC_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -20,7 +20,7 @@ // the safepoint code. If we stopped at the second nop instruction, the pc // will no longer point to a valid instruction. address new_pc = _pc; - while(nativeInstruction_at(new_pc)->is_nop()) { + while(NativeInstruction::nativeInstruction_at(new_pc)->is_nop()) { new_pc += NativeInstruction:: nop_instruction_size; } new_pc = new_begin + (new_pc - begin); diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/frame_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/frame_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/frame_i486.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/frame_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -15,8 +15,8 @@ // Profiling/safepoint support bool JavaThread::get_top_frame(frame* _fr, ExtendedPC* _addr, bool for_profile_only) { - jint* sp; - jint* fp; + intptr_t* sp; + intptr_t* fp; ExtendedPC addr = os::fetch_top_frame(this, &sp, &fp); @@ -72,14 +72,14 @@ // sender_sp -jint* frame::interpreter_frame_sender_sp() const { +intptr_t* frame::interpreter_frame_sender_sp() const { assert(is_interpreted_frame(), "interpreted frame expected"); - return (jint*) at(interpreter_frame_sender_sp_offset); + return (intptr_t*) at(interpreter_frame_sender_sp_offset); } -void frame::set_interpreter_frame_sender_sp(jint* sender_sp) { +void frame::set_interpreter_frame_sender_sp(intptr_t* sender_sp) { assert(is_interpreted_frame(), "interpreted frame expected"); - int_at_put(interpreter_frame_sender_sp_offset, (jint) sender_sp); + int_at_put(interpreter_frame_sender_sp_offset, (intptr_t) sender_sp); } @@ -119,7 +119,7 @@ // This basically makes sp in a frame the original sp before the interpreter // adjusted it. This is handled by _interpreter_sp_adjustment handling on // sparc. This is much less visible. - jint* sp = (jint*) at(interpreter_frame_sender_sp_offset); + intptr_t* sp = (intptr_t*) at(interpreter_frame_sender_sp_offset); // We do not need to update the callee-save register mapping because above // us is either another interpreter frame or a converter-frame, but never // directly a compiled frame. @@ -175,7 +175,7 @@ assert(map != NULL, "map must be set"); // frame owned by optimizing compiler - jint* sender_sp = NULL; + intptr_t* sender_sp = NULL; #ifdef COMPILER1 sender_sp = fp() + frame::sender_sp_offset; assert(sender_sp == sp() + cb->frame_size() || cb->frame_size() == -1, "must match"); @@ -185,7 +185,7 @@ sender_sp = sp() + cb->frame_size(); if( cb->is_i2c_adapter()) { // Sender's SP is stored at the end of the frame - sender_sp = (jint*)*(sender_sp-1)+1; + sender_sp = (intptr_t*)*(sender_sp-1)+1; } #endif @@ -199,16 +199,16 @@ // Move this here for C1 and collecting oops in arguments (According to Rene) COMPILER1_ONLY(map->set_include_argument_oops(cb->caller_must_gc_arguments(map->thread()));) - jint *saved_fp = (jint*)*(sender_sp - frame::sender_sp_offset); + intptr_t *saved_fp = (intptr_t*)*(sender_sp - frame::sender_sp_offset); #ifdef COMPILER1 - assert(saved_fp == (jint*) (*fp()), "should match"); + assert(saved_fp == (intptr_t*) (*fp()), "should match"); #endif #ifdef COMPILER2 if (!cb->is_osr_adapter()) { int llink_offset = cb->link_offset(); if (llink_offset >= 0) { // Restore base-pointer, since next frame might be an interpreter frame. - jint* fp_addr = sp() + llink_offset; + intptr_t* fp_addr = sp() + llink_offset; #ifdef ASSERT // Check to see if regmap has same info if (map->update_map()) { @@ -216,7 +216,7 @@ assert(fp2_addr == NULL || fp2_addr == (address)fp_addr, "inconsistent framepointer info."); } #endif - saved_fp = (jint*)*fp_addr; + saved_fp = (intptr_t*)*fp_addr; } } #endif // COMPILER2 @@ -229,8 +229,8 @@ // This is different from normal, because the current interpreter frame // (which has been mangled into an OSR-adapter) pushed a bunch of space // on the caller's frame to make space for Java locals. - jint* sp_addr = (sender_sp - frame::sender_sp_offset) + frame::interpreter_frame_sender_sp_offset; - sender_sp = (jint*)*sp_addr; + intptr_t* sp_addr = (sender_sp - frame::sender_sp_offset) + frame::interpreter_frame_sender_sp_offset; + sender_sp = (intptr_t*)*sp_addr; } #ifndef CORE @@ -271,7 +271,7 @@ } -bool frame::interpreter_frame_equals_unpacked_fp(jint* fp) { +bool frame::interpreter_frame_equals_unpacked_fp(intptr_t* fp) { assert(is_interpreted_frame(), "must be interpreter frame"); methodOop method = interpreter_frame_method(); // When unpacking an optimized frame the frame pointer is @@ -331,7 +331,7 @@ // This is different from normal, because the current interpreter frame // (which has been mangled into an OSR-adapter) pushed a bunch of space // on the caller's frame to make space for Java locals. - jint* sp_addr = (sender_sp - frame::sender_sp_offset) + frame::interpreter_frame_sender_sp_offset; + intptr_t* sp_addr = (sender_sp - frame::sender_sp_offset) + frame::interpreter_frame_sender_sp_offset; intptr_t* new_sp = (intptr_t*)*sp_addr; frame_size_in_words = new_sp - sp(); } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/frame_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/frame_i486.hpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/frame_i486.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/frame_i486.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -68,17 +68,17 @@ private: // an additional field beyond _sp and _pc: - jint* _fp; // frame pointer + intptr_t* _fp; // frame pointer public: // Constructors - frame(jint* sp, jint* fp, address pc) { + frame(intptr_t* sp, intptr_t* fp, address pc) { _sp = sp; _fp = fp; _pc = pc; } - frame(jint* sp, jint* fp) { + frame(intptr_t* sp, intptr_t* fp) { _sp = sp; _fp = fp; _pc = (address)(sp[-1]); @@ -88,12 +88,12 @@ } // accessors for the instance variables - jint* fp() const { return _fp; } + intptr_t* fp() const { return _fp; } void patch_pc(Thread* thread, address pc); inline address* sender_pc_addr() const; // return address of param, zero origin index. - inline address* frame::native_param_addr(int idx) const; + inline address* native_param_addr(int idx) const; diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/frame_i486.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/frame_i486.inline.hpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/frame_i486.inline.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/frame_i486.inline.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -69,30 +69,30 @@ // return address of param, zero origin index. inline address* frame::native_param_addr(int idx) const { return (address*) addr_at( native_frame_initial_param_offset+idx); } -inline jint* frame::sender_sp() const { return addr_at( sender_sp_offset); } +inline intptr_t* frame::sender_sp() const { return addr_at( sender_sp_offset); } inline int frame::pd_oop_map_offset_adjustment() const { return 0; } -inline jint** frame::interpreter_frame_locals_addr() const { - return (jint**)addr_at(interpreter_frame_locals_offset); +inline intptr_t** frame::interpreter_frame_locals_addr() const { + return (intptr_t**)addr_at(interpreter_frame_locals_offset); } -inline jint* frame::interpreter_frame_bcx_addr() const { - return (jint*)addr_at(interpreter_frame_bcx_offset); +inline intptr_t* frame::interpreter_frame_bcx_addr() const { + return (intptr_t*)addr_at(interpreter_frame_bcx_offset); } #ifndef CORE -inline jint* frame::interpreter_frame_mdx_addr() const { - return (jint*)addr_at(interpreter_frame_mdx_offset); +inline intptr_t* frame::interpreter_frame_mdx_addr() const { + return (intptr_t*)addr_at(interpreter_frame_mdx_offset); } #endif // !CORE -inline jint& frame::interpreter_frame_local_at(int index) const { +inline intptr_t& frame::interpreter_frame_local_at(int index) const { return (*interpreter_frame_locals_addr()) [ -index]; } @@ -105,13 +105,13 @@ // expression stack // (the max_stack arguments are used by the GC; see class FrameClosure) -inline jint* frame::interpreter_frame_expression_stack() const { - jint* monitor_end = (jint*) interpreter_frame_monitor_end(); +inline intptr_t* frame::interpreter_frame_expression_stack() const { + intptr_t* monitor_end = (intptr_t*) interpreter_frame_monitor_end(); return monitor_end-1; } -inline jint& frame::interpreter_frame_expression_stack_at(jint offset) const { +inline intptr_t& frame::interpreter_frame_expression_stack_at(jint offset) const { return interpreter_frame_expression_stack()[-offset]; } @@ -119,12 +119,12 @@ inline jint frame::interpreter_frame_expression_stack_direction() { return -1; } // top of expression stack -inline jint* frame::interpreter_frame_tos_address() const { +inline intptr_t* frame::interpreter_frame_tos_address() const { return sp(); } -inline jint& frame::interpreter_frame_tos_at(jint offset) const { +inline intptr_t& frame::interpreter_frame_tos_at(jint offset) const { return interpreter_frame_tos_address()[offset]; } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/i486.ad jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/i486.ad --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/i486.ad 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/i486.ad 2007-02-24 09:06:01.000000000 +0100 @@ -246,10 +246,10 @@ static jlong fp_signmask_pool[(4+1)*2]; // 4*128bits(data) + 128bits(alignment) // Static initialization during VM startup. -static jlong *float_signmask_pool = double_quadword(&fp_signmask_pool[1*2], 0x7FFFFFFF7FFFFFFF, 0x7FFFFFFF7FFFFFFF); -static jlong *double_signmask_pool = double_quadword(&fp_signmask_pool[2*2], 0x7FFFFFFFFFFFFFFF, 0x7FFFFFFFFFFFFFFF); -static jlong *float_signflip_pool = double_quadword(&fp_signmask_pool[3*2], 0x8000000080000000, 0x8000000080000000); -static jlong *double_signflip_pool = double_quadword(&fp_signmask_pool[4*2], 0x8000000000000000, 0x8000000000000000); +static jlong *float_signmask_pool = double_quadword(&fp_signmask_pool[1*2], 0x7FFFFFFF7FFFFFFFLL, 0x7FFFFFFF7FFFFFFFLL); +static jlong *double_signmask_pool = double_quadword(&fp_signmask_pool[2*2], 0x7FFFFFFFFFFFFFFFLL, 0x7FFFFFFFFFFFFFFFLL); +static jlong *float_signflip_pool = double_quadword(&fp_signmask_pool[3*2], 0x8000000080000000LL, 0x8000000080000000LL); +static jlong *double_signflip_pool = double_quadword(&fp_signmask_pool[4*2], 0x8000000000000000LL, 0x8000000000000000LL); // !!!!! Special hack to get all type of calls to specify the byte offset // from the start of the call to the point where the return address @@ -1684,10 +1684,10 @@ %} enc_class enc_PartialSubtypeCheck( ) %{ - Register Redi = as_Register(EDI_enc); // result register - Register Reax = as_Register(EAX_enc); // super class - Register Recx = as_Register(ECX_enc); // killed - Register Resi = as_Register(ESI_enc); // sub class + Register Redi = RegisterImpl::as_Register(EDI_enc); // result register + Register Reax = RegisterImpl::as_Register(EAX_enc); // super class + Register Recx = RegisterImpl::as_Register(ECX_enc); // killed + Register Resi = RegisterImpl::as_Register(ESI_enc); // sub class Label miss; MacroAssembler masm(&cbuf); @@ -3048,12 +3048,12 @@ // eax: killed tmp enc_class Fast_Lock( nabxRegP obj, nabxRegP box, eAXRegI tmp, eBXRegP scr ) %{ - Register objReg = as_Register($obj$$reg); - Register boxReg = as_Register($box$$reg); + Register objReg = RegisterImpl::as_Register($obj$$reg); + Register boxReg = RegisterImpl::as_Register($box$$reg); // Due to bug in the ADLC, I cannot use $tmp$$reg below. // Instead I must use EAX and EBX explicitly - Register tmpReg = as_Register(EAX_enc/*$tmp$$reg*/); - Register scrReg = as_Register(EBX_enc/*$scr$$reg*/); + Register tmpReg = RegisterImpl::as_Register(EAX_enc/*$tmp$$reg*/); + Register scrReg = RegisterImpl::as_Register(EBX_enc/*$scr$$reg*/); MacroAssembler masm(&cbuf); Label DONE_LABEL; @@ -3091,11 +3091,11 @@ enc_class Fast_Unlock( nabxRegP obj, eAXRegP box, eBXRegP tmp ) %{ Label DONE_LABEL; - Register objReg = as_Register($obj$$reg); - Register boxReg = as_Register($box$$reg); + Register objReg = RegisterImpl::as_Register($obj$$reg); + Register boxReg = RegisterImpl::as_Register($box$$reg); // Due to bug in the ADLC, I cannot use $tmp$$reg below. // Instead I must use EBX explicitly - Register tmpReg = as_Register(EBX_enc/*$tmp$$reg*/); + Register tmpReg = RegisterImpl::as_Register(EBX_enc/*$tmp$$reg*/); MacroAssembler masm(&cbuf); if (UseBiasedLocking) { diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/icBuffer_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/icBuffer_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/icBuffer_i486.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/icBuffer_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -32,14 +32,14 @@ address InlineCacheBuffer::ic_buffer_entry_point(address code_begin) { - NativeMovConstReg* move = nativeMovConstReg_at(code_begin); // creation also verifies the object - NativeJump* jump = nativeJump_at(move->next_instruction_address()); + NativeMovConstReg* move = NativeMovConstReg::nativeMovConstReg_at(code_begin); // creation also verifies the object + NativeJump* jump = NativeJump::nativeJump_at(move->next_instruction_address()); return jump->jump_destination(); } oop InlineCacheBuffer::ic_buffer_cached_oop(address code_begin) { - NativeMovConstReg* move = nativeMovConstReg_at(code_begin); // creation also verifies the object - NativeJump* jump = nativeJump_at(move->next_instruction_address()); + NativeMovConstReg* move = NativeMovConstReg::nativeMovConstReg_at(code_begin); // creation also verifies the object + NativeJump* jump = NativeJump::nativeJump_at(move->next_instruction_address()); return (oop)move->data(); } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/interpreter_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/interpreter_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/interpreter_i486.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/interpreter_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -1549,7 +1549,7 @@ // NOTE the difference in using sender_sp and interpreter_frame_sender_sp // interpreter_frame_sender_sp is the original sp of the caller (the unextended_sp) // and sender_sp is fp+8 - jint* locals = interpreter_frame->sender_sp() + max_locals - 1; + intptr_t* locals = interpreter_frame->sender_sp() + max_locals - 1; interpreter_frame->interpreter_frame_set_locals(locals); BasicObjectLock* montop = interpreter_frame->interpreter_frame_monitor_begin(); diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/interpreter_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/interpreter_i486.hpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/interpreter_i486.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/interpreter_i486.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -52,8 +52,8 @@ void generate_stack_overflow_check(void); #ifndef CORE - void InterpreterGenerator::generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue); - void InterpreterGenerator::generate_counter_overflow(address entry_point); + void generate_counter_incr(Label* overflow, Label* profile_method, Label* profile_method_continue); + void generate_counter_overflow(address entry_point); void generate_run_compiled_code(void); void check_for_compiled_code(Label & run_compiled_code); #endif diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/javaFrameAnchor_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/javaFrameAnchor_i486.hpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/javaFrameAnchor_i486.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/javaFrameAnchor_i486.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -11,7 +11,7 @@ private: // FP value associated with _last_Java_sp: - jint* volatile _last_Java_fp; // pointer is volatile not what it points to + intptr_t* volatile _last_Java_fp; // pointer is volatile not what it points to public: // Each arch must define reset, save, restore @@ -65,9 +65,9 @@ public: - jint* last_Java_fp(void) { return _last_Java_fp; } + intptr_t* last_Java_fp(void) { return _last_Java_fp; } // Assert (last_Java_sp == NULL || fp == NULL) - void set_last_Java_fp(jint* fp) { _last_Java_fp = fp; } + void set_last_Java_fp(intptr_t* fp) { _last_Java_fp = fp; } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/jni_i486.h jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/jni_i486.h --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/jni_i486.h 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/jni_i486.h 2007-02-24 09:06:01.000000000 +0100 @@ -19,7 +19,7 @@ #ifndef _JAVASOFT_JNI_MD_H_ #define _JAVASOFT_JNI_MD_H_ -#if defined(SOLARIS) || defined(LINUX) +#if defined(SOLARIS) || defined(LINUX) || defined(_ALLBSD_SOURCE) #ifdef __cplusplus #define JNIEXPORT extern "C" #define JNIIMPORT extern "C" diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/nativeInst_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/nativeInst_i486.hpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/nativeInst_i486.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/nativeInst_i486.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -63,7 +63,7 @@ // unit test stuff static void test() {} // override for testing - friend NativeInstruction* nativeInstruction_at(address address) { + static NativeInstruction* nativeInstruction_at(address address) { NativeInstruction* inst = (NativeInstruction*)address; #ifdef ASSERT //inst->verify(); @@ -102,7 +102,7 @@ void print(); // Creation - friend NativeCall* nativeCall_at(address address) { + static NativeCall* nativeCall_at(address address) { NativeCall* call = (NativeCall*)(address - instruction_offset); #ifdef ASSERT call->verify(); @@ -110,7 +110,7 @@ return call; } - friend NativeCall* nativeCall_before(address return_address) { + static NativeCall* nativeCall_before(address return_address) { NativeCall* call = (NativeCall*)(return_address - return_address_offset); #ifdef ASSERT call->verify(); @@ -163,7 +163,7 @@ static void test() {} // Creation - friend NativeMovConstReg* nativeMovConstReg_at(address address) { + static NativeMovConstReg* nativeMovConstReg_at(address address) { NativeMovConstReg* test = (NativeMovConstReg*)(address - instruction_offset); #ifdef ASSERT test->verify(); @@ -172,7 +172,7 @@ } - friend NativeMovConstReg* nativeMovConstReg_before(address address) { + static NativeMovConstReg* nativeMovConstReg_before(address address) { NativeMovConstReg* test = (NativeMovConstReg*)(address - instruction_size - instruction_offset); #ifdef ASSERT test->verify(); @@ -186,7 +186,7 @@ class NativeMovConstRegPatching: public NativeMovConstReg { private: - friend NativeMovConstRegPatching* nativeMovConstRegPatching_at(address address) { + static NativeMovConstRegPatching* nativeMovConstRegPatching_at(address address) { NativeMovConstRegPatching* test = (NativeMovConstRegPatching*)(address - instruction_offset); #ifdef ASSERT test->verify(); @@ -280,8 +280,7 @@ // unit test stuff static void test() {} - private: - friend NativeMovRegMem* nativeMovRegMem_at (address address) { + static NativeMovRegMem* nativeMovRegMem_at (address address) { NativeMovRegMem* test = (NativeMovRegMem*)(address - instruction_offset); #ifdef ASSERT test->verify(); @@ -293,7 +292,7 @@ class NativeMovRegMemPatching: public NativeMovRegMem { private: - friend NativeMovRegMemPatching* nativeMovRegMemPatching_at (address address) { + static NativeMovRegMemPatching* nativeMovRegMemPatching_at (address address) { NativeMovRegMemPatching* test = (NativeMovRegMemPatching*)(address - instruction_offset); #ifdef ASSERT test->verify(); @@ -320,7 +319,7 @@ static void test() {} private: - friend NativeLoadAddress* nativeLoadAddress_at (address address) { + static NativeLoadAddress* nativeLoadAddress_at (address address) { NativeLoadAddress* test = (NativeLoadAddress*)(address - instruction_offset); #ifdef ASSERT test->verify(); @@ -346,7 +345,7 @@ void set_jump_destination(address dest) { set_long_at(data_offset, int(dest - next_instruction_address()) ); } // Creation - friend NativeJump* nativeJump_at(address address) { + static NativeJump* nativeJump_at(address address) { NativeJump* jump = (NativeJump*)(address - instruction_offset); #ifdef ASSERT jump->verify(); @@ -384,7 +383,7 @@ address jump_destination() const; // Creation - friend NativeGeneralJump* nativeGeneralJump_at(address address) { + static NativeGeneralJump* nativeGeneralJump_at(address address) { NativeGeneralJump* jump = (NativeGeneralJump*)(address); debug_only(jump->verify();) return jump; diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/register_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/register_i486.hpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/register_i486.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/register_i486.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -23,7 +23,7 @@ }; // construction - friend Register as_Register(int encoding) { return (Register)encoding; } + static Register as_Register(int encoding) { return (Register)encoding; } // accessors int encoding() const { assert(is_valid(), "invalid register"); return (int)this; } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/relocInfo_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/relocInfo_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/relocInfo_i486.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/relocInfo_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -18,13 +18,13 @@ address Relocation::pd_call_destination() { - NativeInstruction* ni = nativeInstruction_at(addr()); + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(addr()); if (ni->is_call()) - return nativeCall_at(addr())->destination(); + return NativeCall::nativeCall_at(addr())->destination(); else if (ni->is_jump()) - return nativeJump_at(addr())->jump_destination(); + return NativeJump::nativeJump_at(addr())->jump_destination(); else if (ni->is_cond_jump()) - return nativeGeneralJump_at(addr())->jump_destination(); + return NativeGeneralJump::nativeGeneralJump_at(addr())->jump_destination(); else { ShouldNotReachHere(); return NULL; } } @@ -32,14 +32,14 @@ void Relocation::pd_set_call_destination(address x, intptr_t off) { x -= off; - NativeInstruction* ni = nativeInstruction_at(addr()); + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(addr()); if (ni->is_call()) - nativeCall_at(addr())->set_destination(x); + NativeCall::nativeCall_at(addr())->set_destination(x); else if (ni->is_jump()) - nativeJump_at(addr())->set_jump_destination(x); + NativeJump::nativeJump_at(addr())->set_jump_destination(x); else if (ni->is_cond_jump()) { // %%%% kludge this, for now, until we get a jump_destination method - address old_dest = nativeGeneralJump_at(addr())->jump_destination(); + address old_dest = NativeGeneralJump::nativeGeneralJump_at(addr())->jump_destination(); address disp = Assembler::locate_operand(addr(), Assembler::call32_operand); *(jint*)disp += (x - old_dest); } else @@ -84,6 +84,6 @@ void Relocation::pd_swap_out_breakpoint(address x, short* instrs, int instrlen) { Untested("pd_swap_out_breakpoint"); assert(NativeIllegalInstruction::instruction_size == sizeof(short), "right address unit for update"); - NativeInstruction* ni = nativeInstruction_at(x); + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(x); *(short*)ni->addr_at(0) = instrs[0]; } diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/runtime_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/runtime_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/runtime_i486.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/runtime_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -335,7 +335,7 @@ { Label L; __ cmpl(Address(ecx, JavaThread::last_Java_fp_offset()), - (intptr_t) 0); + (int) 0); __ jcc(Assembler::equal, L); __ stop("OptoRuntime::generate_deopt_blob: last_Java_fp not cleared"); __ bind(L); diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/stubGenerator_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/stubGenerator_i486.cpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/stubGenerator_i486.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/stubGenerator_i486.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -1198,7 +1198,7 @@ // // Note: the routine set_pc_not_at_call_for_caller in SharedRuntime.cpp requires // that this code be generated into a RuntimeStub. - address StubGenerator::generate_throw_exception(const char* name, address runtime_entry, bool restore_saved_exception_pc) { + address generate_throw_exception(const char* name, address runtime_entry, bool restore_saved_exception_pc) { int insts_size = 256; int locs_size = 32; diff -ruN jdk-1_5_0_11/hotspot/src/cpu/i486/vm/vmStructs_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/vmStructs_i486.hpp --- jdk-1_5_0_11/hotspot/src/cpu/i486/vm/vmStructs_i486.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/cpu/i486/vm/vmStructs_i486.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -20,7 +20,7 @@ /******************************/ \ /* JavaFrameAnchor */ \ /******************************/ \ - volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, jint*) \ + volatile_nonstatic_field(JavaFrameAnchor, _last_Java_fp, intptr_t*) \ \ /* NOTE that we do not use the last_entry() macro here; it is used */ diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java.c jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java.c --- jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java.c 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java.c 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,834 @@ +#ifdef USE_PRAGMA_IDENT_SRC +#pragma ident "@(#)java.c 1.12 03/12/23 16:37:40 JVM" +#endif +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +/* + * Shared source for 'java' command line tool. + * + * If JAVA_ARGS is defined, then acts as a launcher for applications. For + * instance, the JDK command line tools such as javac and javadoc (see + * makefiles for more details) are built with this program. Any arguments + * prefixed with '-J' will be passed directly to the 'java' command. + */ + +#include +#include +#include + +#include +#include "java.h" + +#ifndef FULL_VERSION +#define FULL_VERSION "1.2" +#endif + +static jboolean printVersion = JNI_FALSE; +static char *progname; +jboolean debug = JNI_FALSE; + +/* + * List of VM options to be specified when the VM is created. + */ +static JavaVMOption *options; +static int numOptions, maxOptions; + +/* + * Prototypes for functions internal to launcher. + */ +static void AddOption(char *str, void *info); +static void SetClassPath(char *s); +static jboolean ParseArguments(int *pargc, char ***pargv, char **pjarfile, + char **pclassname, int *pret); +static jboolean InitializeJVM(JavaVM **pvm, JNIEnv **penv, + InvocationFunctions *ifn); +static void* MemAlloc(size_t size); +static jstring NewPlatformString(JNIEnv *env, char *s); +static jobjectArray NewPlatformStringArray(JNIEnv *env, char **strv, int strc); +static jstring NewPlatformString(JNIEnv *env, char *s); +static jclass LoadClass(JNIEnv *env, char *name); +static jstring GetMainClassName(JNIEnv *env, char *jarname); +static void SetJavaCommandLineProp(char* classname, char* jarfile, int argc, char** argv); + + +#ifdef JAVA_ARGS +static void TranslateDashJArgs(int *pargc, char ***pargv); +static jboolean AddApplicationOptions(void); +#endif + +static void PrintJavaVersion(JNIEnv *env); +static void PrintUsage(void); +static jint PrintXUsage(void); + +/* + * Entry point. + */ +int +main(int argc, char **argv) +{ + JavaVM *vm = 0; + JNIEnv *env = 0; + char *jarfile = 0; + char *classname = 0; + char *s = 0; + jclass mainClass; + jmethodID mainID; + jobjectArray mainArgs; + int ret; + InvocationFunctions ifn; + char *jvmtype = 0; + jboolean jvmspecified = JNI_FALSE; /* Assume no option specified. */ + jlong start, end; + + if (getenv("_JAVA_LAUNCHER_DEBUG") != 0) { + debug = JNI_TRUE; + printf("----_JAVA_LAUNCHER_DEBUG----\n"); + } + + /* Did the user pass a -classic or -hotspot as the first option to + * the launcher? */ + if (argc > 1) { + if (strcmp(argv[1], "-hotspot") == 0) { + jvmtype = "hotspot"; + jvmspecified = JNI_TRUE; + } else if (strcmp(argv[1], "-classic") == 0) { + jvmtype = "classic"; + jvmspecified = JNI_TRUE; + } + } + ifn.CreateJavaVM = 0; ifn.GetDefaultJavaVMInitArgs = 0; + if (!LoadJavaVM(jvmtype, &ifn)) + return 1; + + /* Grab the program name */ + progname = *argv++; + if ((s = strrchr(progname, FILE_SEPARATOR)) != 0) { + progname = s + 1; + } + --argc; + + /* Skip over a specified -classic/-hotspot option */ + if (jvmspecified) { + argv++; + argc--; + } + +#ifdef JAVA_ARGS + /* Preprocess wrapper arguments */ + TranslateDashJArgs(&argc, &argv); + if (!AddApplicationOptions()) + return 1; +#endif + + /* Set default CLASSPATH */ + if ((s = getenv("CLASSPATH")) == 0) { + s = "."; + } +#ifndef JAVA_ARGS + SetClassPath(s); +#endif + + /* Parse command line options */ + if (!ParseArguments(&argc, &argv, &jarfile, &classname, &ret)) { + return ret; + } + + /* Override class path if -jar flag was specified */ + if (jarfile != 0) { + SetClassPath(jarfile); + } + + /* set the -Dsun.java.command pseudo property */ + SetJavaCommandLineProp(classname, jarfile, argc, argv); + + /* Initialize the virtual machine */ + + if (debug) + start = CounterGet(); + if (!InitializeJVM(&vm, &env, &ifn)) { + fprintf(stderr, "Could not create the Java virtual machine.\n"); + return 1; + } + + if (printVersion) { + PrintJavaVersion(env); + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionDescribe(env); + ret = 1; + } else { + ret = 0; + } + goto leave; + } + + /* If the user specified neither a class name or a JAR file */ + if (jarfile == 0 && classname == 0) { + PrintUsage(); + goto leave; + } + + if (debug) { + end = CounterGet(); + printf("%ld micro seconds to InitializeJVM\n", + (jint)Counter2Micros(end-start)); + } + + /* At this stage, argc/argv have the applications' arguments */ + if (debug) { + int i = 0; + printf("Main-Class is '%s'\n", classname ? classname : ""); + printf("Apps' argc is %d\n", argc); + for (; i < argc; i++) { + printf(" argv[%2d] = '%s'\n", i, argv[i]); + } + } + + ret = 1; + + /* Get the application's main class */ + if (jarfile != 0) { + jstring mainClassName = GetMainClassName(env, jarfile); + if (mainClassName == NULL) { + fprintf(stderr, "Failed to load Main-Class manifest attribute " + "from\n%s\n", jarfile); + goto leave; + } + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionDescribe(env); + goto leave; + } + classname = (char *)(*env)->GetStringUTFChars(env, mainClassName, 0); + if (classname == NULL) { + (*env)->ExceptionDescribe(env); + goto leave; + } + mainClass = LoadClass(env, classname); + (*env)->ReleaseStringUTFChars(env, mainClassName, classname); + } else { + mainClass = LoadClass(env, classname); + } + if (mainClass == NULL) { + (*env)->ExceptionDescribe(env); + goto leave; + } + + /* Get the application's main method */ + mainID = (*env)->GetStaticMethodID(env, mainClass, "main", + "([Ljava/lang/String;)V"); + if (mainID == NULL) { + if ((*env)->ExceptionOccurred(env)) { + (*env)->ExceptionDescribe(env); + } else { + fprintf(stderr, "No main method found in specified class.\n"); + } + goto leave; + } + + /* Build argument array */ + mainArgs = NewPlatformStringArray(env, argv, argc); + if (mainArgs == NULL) { + (*env)->ExceptionDescribe(env); + goto leave; + } + + /* Invoke main method. */ + (*env)->CallStaticVoidMethod(env, mainClass, mainID, mainArgs); + if ((*env)->ExceptionOccurred(env)) { + /* Formerly, we used to call the "uncaughtException" method of the + main thread group, but this was later shown to be unnecessary + since the default definition merely printed out the same exception + stack trace as ExceptionDescribe and could never actually be + overridden by application programs. */ + (*env)->ExceptionDescribe(env); + goto leave; + } + + /* + * Detach the current thread so that it appears to have exited when + * the application's main method exits. + */ + if ((*vm)->DetachCurrentThread(vm) != 0) { + fprintf(stderr, "Could not detach main thread.\n"); + goto leave; + } + ret = 0; + +leave: + (*vm)->DestroyJavaVM(vm); + return ret; +} + +/* + * Adds a new VM option with the given given name and value. + */ +static void +AddOption(char *str, void *info) +{ + /* + * Expand options array if needed to accomodate at least one more + * VM option. + */ + if (numOptions >= maxOptions) { + if (options == 0) { + maxOptions = 4; + options = MemAlloc(maxOptions * sizeof(JavaVMOption)); + } else { + JavaVMOption *tmp; + maxOptions *= 2; + tmp = MemAlloc(maxOptions * sizeof(JavaVMOption)); + memcpy(tmp, options, numOptions * sizeof(JavaVMOption)); + free(options); + options = tmp; + } + } + options[numOptions].optionString = str; + options[numOptions++].extraInfo = info; +} + +static void +SetClassPath(char *s) +{ + char *def = MemAlloc(strlen(s) + 40); + sprintf(def, "-Djava.class.path=%s", s); + AddOption(def, NULL); +} + +/* + * Parses command line arguments. + */ +static jboolean +ParseArguments(int *pargc, char ***pargv, char **pjarfile, + char **pclassname, int *pret) +{ + int argc = *pargc; + char **argv = *pargv; + jboolean jarflag = JNI_FALSE; + char *arg; + + *pret = 1; + while ((arg = *argv) != 0 && *arg == '-') { + argv++; --argc; + if (strcmp(arg, "-classpath") == 0 || strcmp(arg, "-cp") == 0) { + if (argc < 1) { + fprintf(stderr, "%s requires class path specification\n", arg); + PrintUsage(); + return JNI_FALSE; + } + SetClassPath(*argv); + argv++; --argc; + } else if (strcmp(arg, "-jar") == 0) { + jarflag = JNI_TRUE; + } else if (strcmp(arg, "-help") == 0 || + strcmp(arg, "-h") == 0 || + strcmp(arg, "-?") == 0) { + PrintUsage(); + *pret = 0; + return JNI_FALSE; + } else if (strcmp(arg, "-version") == 0) { + printVersion = JNI_TRUE; + return JNI_TRUE; + } else if (strcmp(arg, "-X") == 0) { + *pret = PrintXUsage(); + return JNI_FALSE; +/* + * The following case provide backward compatibility with old-style + * command line options. + */ + } else if (strcmp(arg, "-fullversion") == 0) { + fprintf(stderr, "%s full version \"%s\"\n", progname, + FULL_VERSION); + *pret = 0; + return JNI_FALSE; + } else if (strcmp(arg, "-verbosegc") == 0) { + AddOption("-verbose:gc", NULL); + } else if (strcmp(arg, "-t") == 0) { + AddOption("-Xt", NULL); + } else if (strcmp(arg, "-tm") == 0) { + AddOption("-Xtm", NULL); + } else if (strcmp(arg, "-debug") == 0) { + AddOption("-Xdebug", NULL); + } else if (strcmp(arg, "-noclassgc") == 0) { + AddOption("-Xnoclassgc", NULL); + } else if (strcmp(arg, "-verify") == 0) { + AddOption("-Xverify:all", NULL); + } else if (strcmp(arg, "-verifyremote") == 0) { + AddOption("-Xverify:remote", NULL); + } else if (strcmp(arg, "-noverify") == 0) { + AddOption("-Xverify:none", NULL); + } else if (strncmp(arg, "-prof", 5) == 0) { + char *p = arg + 5; + char *tmp = MemAlloc(strlen(arg) + 50); + if (*p) { + sprintf(tmp, "-Xrunhprof:cpu=old,file=%s", p + 1); + } else { + sprintf(tmp, "-Xrunhprof:cpu=old,file=java.prof"); + } + AddOption(tmp, NULL); + } else if (strncmp(arg, "-ss", 3) == 0 || + strncmp(arg, "-oss", 4) == 0 || + strncmp(arg, "-ms", 3) == 0 || + strncmp(arg, "-mx", 3) == 0) { + char *tmp = MemAlloc(strlen(arg) + 6); + sprintf(tmp, "-X%s", arg + 1); /* skip '-' */ + AddOption(tmp, NULL); + } else if (strcmp(arg, "-checksource") == 0 || + strcmp(arg, "-cs") == 0 || + strcmp(arg, "-noasyncgc") == 0) { + /* No longer supported */ + fprintf(stderr, + "Warning: %s option is no longer supported.\n", + arg); + } else { + AddOption(arg, NULL); + } + } + + if (--argc >= 0) { + if (jarflag) { + *pjarfile = *argv++; + *pclassname = 0; + } else { + *pjarfile = 0; + *pclassname = *argv++; + } + *pargc = argc; + *pargv = argv; + } + + return JNI_TRUE; +} + +/* + * Initializes the Java Virtual Machine. Also frees options array when + * finished. + */ +static jboolean +InitializeJVM(JavaVM **pvm, JNIEnv **penv, InvocationFunctions *ifn) +{ + JavaVMInitArgs args; + jint r; + + memset(&args, 0, sizeof(args)); + args.version = JNI_VERSION_1_2; + args.nOptions = numOptions; + args.options = options; + args.ignoreUnrecognized = JNI_FALSE; + + if (debug) { + int i = 0; + printf("JavaVM args:\n "); + printf("version 0x%08lx, ", args.version); + printf("ignoreUnrecognized is %s, ", + args.ignoreUnrecognized ? "JNI_TRUE" : "JNI_FALSE"); + printf("nOptions is %ld\n", args.nOptions); + for (i = 0; i < numOptions; i++) + printf(" option[%2d] = '%s'\n", + i, args.options[i].optionString); + } + + r = ifn->CreateJavaVM(pvm, (void **)penv, &args); + free(options); + return r == JNI_OK; +} + + +#define NULL_CHECK0(e) if ((e) == 0) return 0 +#define NULL_CHECK(e) if ((e) == 0) return + +/* + * Returns a pointer to a block of at least 'size' bytes of memory. + * Prints error message and exits if the memory could not be allocated. + */ +static void * +MemAlloc(size_t size) +{ + void *p = malloc(size); + if (p == 0) { + perror("malloc"); + exit(1); + } + return p; +} + +/* + * Returns a new Java string object for the specified platform string. + */ +static jstring +NewPlatformString(JNIEnv *env, char *s) +{ + int len = strlen(s); + jclass cls; + jmethodID mid; + jbyteArray ary; + + NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String")); + NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "", "([B)V")); + ary = (*env)->NewByteArray(env, len); + if (ary != 0) { + jstring str = 0; + (*env)->SetByteArrayRegion(env, ary, 0, len, (jbyte *)s); + if (!(*env)->ExceptionOccurred(env)) { + str = (*env)->NewObject(env, cls, mid, ary); + } + (*env)->DeleteLocalRef(env, ary); + return str; + } + return 0; +} + +/* + * Returns a new array of Java string objects for the specified + * array of platform strings. + */ +static jobjectArray +NewPlatformStringArray(JNIEnv *env, char **strv, int strc) +{ + jarray cls; + jarray ary; + int i; + + NULL_CHECK0(cls = (*env)->FindClass(env, "java/lang/String")); + NULL_CHECK0(ary = (*env)->NewObjectArray(env, strc, cls, 0)); + for (i = 0; i < strc; i++) { + jstring str = NewPlatformString(env, *strv++); + NULL_CHECK0(str); + (*env)->SetObjectArrayElement(env, ary, i, str); + (*env)->DeleteLocalRef(env, str); + } + return ary; +} + +/* + * Loads a class, convert the '.' to '/'. + */ +static jclass +LoadClass(JNIEnv *env, char *name) +{ + char *buf = MemAlloc(strlen(name) + 1); + char *s = buf, *t = name, c; + jclass cls; + jlong start, end; + + if (debug) + start = CounterGet(); + + do { + c = *t++; + *s++ = (c == '.') ? '/' : c; + } while (c != '\0'); + cls = (*env)->FindClass(env, buf); + free(buf); + + if (debug) { + end = CounterGet(); + printf("%ld micro seconds to load main class\n", + (jint)Counter2Micros(end-start)); + printf("----_JAVA_LAUNCHER_DEBUG----\n"); + } + + return cls; +} + +/* + * Returns the main class name for the specified jar file. + */ +static jstring +GetMainClassName(JNIEnv *env, char *jarname) +{ +#define MAIN_CLASS "Main-Class" + jclass cls; + jmethodID mid; + jobject jar, man, attr; + jstring str, result = 0; + + NULL_CHECK0(cls = (*env)->FindClass(env, "java/util/jar/JarFile")); + NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "", + "(Ljava/lang/String;)V")); + NULL_CHECK0(str = NewPlatformString(env, jarname)); + NULL_CHECK0(jar = (*env)->NewObject(env, cls, mid, str)); + NULL_CHECK0(mid = (*env)->GetMethodID(env, cls, "getManifest", + "()Ljava/util/jar/Manifest;")); + man = (*env)->CallObjectMethod(env, jar, mid); + if (man != 0) { + NULL_CHECK0(mid = (*env)->GetMethodID(env, + (*env)->GetObjectClass(env, man), + "getMainAttributes", + "()Ljava/util/jar/Attributes;")); + attr = (*env)->CallObjectMethod(env, man, mid); + if (attr != 0) { + NULL_CHECK0(mid = (*env)->GetMethodID(env, + (*env)->GetObjectClass(env, attr), + "getValue", + "(Ljava/lang/String;)Ljava/lang/String;")); + NULL_CHECK0(str = NewPlatformString(env, MAIN_CLASS)); + result = (*env)->CallObjectMethod(env, attr, mid, str); + } + } + return result; +} + +#ifdef JAVA_ARGS +static char *java_args[] = JAVA_ARGS; +static char *app_classpath[] = APP_CLASSPATH; +#define NUM_ARGS (sizeof(java_args) / sizeof(char *)) +#define NUM_APP_CLASSPATH (sizeof(app_classpath) / sizeof(char *)) + +/* + * For tools convert 'javac -J-ms32m' to 'java -ms32m ...' + */ +static void +TranslateDashJArgs(int *pargc, char ***pargv) +{ + int argc = *pargc; + char **argv = *pargv; + int nargc = argc + NUM_ARGS; + char **nargv = MemAlloc((nargc + 1) * sizeof(char *)); + int i; + + *pargc = nargc; + *pargv = nargv; + + /* Copy the VM arguments (i.e. prefixed with -J) */ + for (i = 0; i < NUM_ARGS; i++) { + char *arg = java_args[i]; + if (arg[0] == '-' && arg[1] == 'J') + *nargv++ = arg + 2; + } + + for (i = 0; i < argc; i++) { + char *arg = argv[i]; + if (arg[0] == '-' && arg[1] == 'J') + *nargv++ = arg + 2; + } + + /* Copy the rest of the arguments */ + for (i = 0; i < NUM_ARGS; i++) { + char *arg = java_args[i]; + if (arg[0] != '-' || arg[1] != 'J') { + *nargv++ = arg; + } + } + for (i = 0; i < argc; i++) { + char *arg = argv[i]; + if (arg[0] != '-' || arg[1] != 'J') { + *nargv++ = arg; + } + } + *nargv = 0; +} + +/* + * For our tools, we try to add 3 VM options: + * -Denv.class.path= + * -Dapplication.home= + * -Djava.class.path= + * is the user's setting of CLASSPATH -- for instance the user + * tells javac where to find binary classes through this environment + * variable. Notice that users will be able to compile against our + * tools classes (sun.tools.javac.Main) only if they explicitly add + * tools.jar to CLASSPATH. + * is the directory where the application is installed. + * is the classpath to where our apps' classfiles are. + */ +static jboolean +AddApplicationOptions() +{ + char *s, *envcp, *appcp, *apphome; + char home[MAXPATHLEN]; /* application home */ + char separator[] = { PATH_SEPARATOR, '\0' }; + int size, i; + + s = getenv("CLASSPATH"); + if (s) { + /* 40 for -Denv.class.path= */ + envcp = (char *)MemAlloc(strlen(s) + 40); + sprintf(envcp, "-Denv.class.path=%s", s); + AddOption(envcp, NULL); + } + + if (!GetApplicationHome(home, sizeof(home))) { + fprintf(stderr, "Can't determine application home\n"); + return JNI_FALSE; + } + + /* 40 for '-Dapplication.home=' */ + apphome = (char *)MemAlloc(strlen(home) + 40); + sprintf(apphome, "-Dapplication.home=%s", home); + AddOption(apphome, NULL); + + /* How big is the application's classpath? */ + size = strlen(home) * NUM_APP_CLASSPATH + 40; /* 40: -Djava.class.path */ + for (i = 0; i < NUM_APP_CLASSPATH; i++) { + size += strlen(app_classpath[i]); + } + appcp = (char *)MemAlloc(size + 1); + strcpy(appcp, "-Djava.class.path="); + for (i = 0; i < NUM_APP_CLASSPATH; i++) { + strcat(appcp, home); /* c:\program files\myapp */ + strcat(appcp, app_classpath[i]); /* lib\myapp.jar */ + strcat(appcp, separator); /* ; */ + } + appcp[strlen(appcp)-1] = '\0'; /* remove trailing path seperator */ + AddOption(appcp, NULL); + return JNI_TRUE; +} +#endif + +/* + * inject the -Dsun.java.command pseudo property into the args structure + * this pseudo property is used in the HotSpot VM to expose the + * Java class name and arguments to the main method to the VM. The + * HotSpot VM uses this pseudo property to store the Java class name + * (or jar file name) and the arguments to the class's main method + * to the instrumentation memory region. The sun.java.command pseudo + * property is not exported by HotSpot to the Java layer. + */ +void SetJavaCommandLineProp(char* classname, char* jarfile, int argc, char** argv) { + + int i = 0; + int len = 0; + char* javaCommand = NULL; + char* dashDstr = "-Dsun.java.command="; + + if (classname == NULL && jarfile == NULL) { + /* unexpected, one of these should be set. just return without + * setting the property + */ + return; + } + + /* if the class name is not set, then use the jarfile name */ + if (classname == NULL) { + classname = jarfile; + } + + /* determine the amount of memory to allocate assuming + * the individual components will be space separated + */ + len = strlen(classname); + for (i = 0; i < argc; i++) { + len += strlen(argv[i]) + 1; + } + + /* allocate the memory */ + javaCommand = (char*) MemAlloc(len + strlen(dashDstr) + 1); + + /* build the -D string */ + *javaCommand = '\0'; + strcat(javaCommand, dashDstr); + strcat(javaCommand, classname); + + for (i = 0; i < argc; i++) { + /* the components of the string are space separated. In + * the case of embeded white space, the relationship of + * the white space separated components to their true + * positional arguments will be ambiguous. This issue may + * be addressed in a future release. + */ + strcat(javaCommand, " "); + strcat(javaCommand, argv[i]); + } + + AddOption(javaCommand, NULL); +} + +/* + * Prints the version information from the java.version and other properties. + */ +static void +PrintJavaVersion(JNIEnv *env) +{ + jclass sysClass; + jmethodID getPropID; + + jstring java_version; + jstring java_vm_name; + jstring java_vm_info; + + char c_version[128]; + char c_vm_name[256]; + char c_vm_info[256]; + + NULL_CHECK(sysClass = (*env)->FindClass(env, "java/lang/System")); + NULL_CHECK(getPropID = (*env)->GetStaticMethodID(env, sysClass, + "getProperty", + "(Ljava/lang/String;)Ljava/lang/String;")); + + NULL_CHECK(java_version = (*env)->NewStringUTF(env, "java.version")); + NULL_CHECK(java_vm_name = (*env)->NewStringUTF(env, "java.vm.name")); + NULL_CHECK(java_vm_info = (*env)->NewStringUTF(env, "java.vm.info")); + + NULL_CHECK(java_version = + (*env)->CallStaticObjectMethod(env, sysClass, getPropID, java_version)); + NULL_CHECK(java_vm_name = + (*env)->CallStaticObjectMethod(env, sysClass, getPropID, java_vm_name)); + NULL_CHECK(java_vm_info = + (*env)->CallStaticObjectMethod(env, sysClass, getPropID, java_vm_info)); + + (*env)->GetStringUTFRegion(env, java_version, 0, + (*env)->GetStringLength(env, java_version), + c_version); + (*env)->GetStringUTFRegion(env, java_vm_name, 0, + (*env)->GetStringLength(env, java_vm_name), + c_vm_name); + (*env)->GetStringUTFRegion(env, java_vm_info, 0, + (*env)->GetStringLength(env, java_vm_info), + c_vm_info); + + fprintf(stderr, "java version \"%s\"\n", c_version); + fprintf(stderr, "%s (%s)\n", c_vm_name, c_vm_info); +} + +/* + * Prints default usage message. + */ +static void +PrintUsage(void) +{ + fprintf(stdout, + "Usage: %s [-options] class [args...]\n" + " (to execute a class)\n" + " or %s -jar [-options] jarfile [args...]\n" + " (to execute a jar file)\n" + "\n" + "where options include:\n" + " -cp -classpath \n" + " set search path for application classes and resources\n" + " -D=\n" + " set a system property\n" + " -verbose[:class|gc|jni]\n" + " enable verbose output\n" + " -version print product version\n" + " -? -help print this help message\n" + " -X print help on non-standard options\n", + progname, + progname, PATH_SEPARATOR + ); +} + +/* + * Print usage message for -X options. + */ +static jint +PrintXUsage(void) +{ + char path[MAXPATHLEN]; + char buf[128]; + int n; + FILE *fp; + + GetXUsagePath(path, sizeof(path)); + fp = fopen(path, "r"); + if (fp == 0) { + fprintf(stderr, "Can't open %s\n", path); + return 1; + } + while ((n = fread(buf, 1, sizeof(buf), fp)) != 0) { + fwrite(buf, 1, n, stdout); + } + fclose(fp); + return 0; +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java.h jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java.h --- jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java.h 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,43 @@ +#ifdef USE_PRAGMA_IDENT_HDR +#pragma ident "@(#)java.h 1.6 03/12/23 16:37:40 JVM" +#endif +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +/* +/// Temporary copy of JDK1.2beta4 launcher for HotSPARC. +/// "$JDK/src/share/bin/java.h":15 +*/ + +#ifndef _JAVA_H_ +#define _JAVA_H_ + +/* + * Get system specific defines. + */ +#include "jni.h" +#include "java_md.h" + +/* + * Pointers to the needed JNI invocation API, initialized by LoadJavaVM. + */ +typedef struct { + jint (JNICALL *CreateJavaVM)(JavaVM **pvm, void **env, void *args); + jint (JNICALL *GetDefaultJavaVMInitArgs)(void *args); +} InvocationFunctions; + +/* + * Protoypes for launcher functions in the system specific java_md.c. + */ +jboolean LoadJavaVM(char *jvmtype, InvocationFunctions *ifn); +void GetXUsagePath(char *buf, jint bufsize); +jboolean GetApplicationHome(char *buf, jint bufsize); + +/* + * Make launcher spit debug output. + */ +extern jboolean debug; + +#endif /* _JAVA_H_ */ diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java_md.c jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java_md.c --- jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java_md.c 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java_md.c 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,77 @@ +#ifdef USE_PRAGMA_IDENT_SRC +#pragma ident "@(#)java_md.c 1.13 03/12/23 16:37:41 JVM" +#endif +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "java.h" +#include +#include +#include +#include + +#ifdef DEBUG +#define JVM_DLL "libjvm_g.so" +#else +#define JVM_DLL "libjvm.so" +#endif + +/* + * Load JVM of "jvmtype", and intialize the invocation functions. On + * Solaris, currently, this is a no-op, and we always use classic VM. + */ +jboolean +LoadJavaVM(char *jvmtype, InvocationFunctions *ifn) +{ + ifn->CreateJavaVM = JNI_CreateJavaVM; + ifn->GetDefaultJavaVMInitArgs = JNI_GetDefaultJavaVMInitArgs; + return JNI_TRUE; +} + +/* + * Get the path to the file that has the usage message for -X options. + */ +void +GetXUsagePath(char *buf, jint bufsize) +{ + Dl_info dlinfo; + + /* we use RTLD_NOW because of problems with ld.so.1 and green threads */ + dladdr(dlsym(dlopen(JVM_DLL, RTLD_NOW), "JNI_CreateJavaVM"), &dlinfo); + strncpy(buf, (char *)dlinfo.dli_fname, bufsize - 1); + buf[bufsize] = '\0'; + *(strrchr(buf, '/')) = '\0'; + strcat(buf, "/Xusage.txt"); +} + +/* + * If app is "/foo/bin/sparc/green_threads/javac", then put "/foo" into buf. + */ +jboolean +GetApplicationHome(char *buf, jint bufsize) +{ +#ifdef USE_APPHOME + char *apphome = getenv("APPHOME"); + if (apphome) { + strncpy(buf, apphome, bufsize-1); + buf[bufsize] = '\0'; + return JNI_TRUE; + } else { + return JNI_FALSE; + } +#else + Dl_info dlinfo; + + dladdr((void *)GetApplicationHome, &dlinfo); + strncpy(buf, dlinfo.dli_fname, bufsize - 1); + buf[bufsize] = '\0'; + + *(strrchr(buf, '/')) = '\0'; /* executable file */ + *(strrchr(buf, '/')) = '\0'; /* green|native_threads */ + *(strrchr(buf, '/')) = '\0'; /* sparc|i386 */ + *(strrchr(buf, '/')) = '\0'; /* bin */ + return JNI_TRUE; +#endif +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java_md.h jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java_md.h --- jdk-1_5_0_11/hotspot/src/os/bsd/launcher/java_md.h 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/launcher/java_md.h 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,41 @@ +#ifdef USE_PRAGMA_IDENT_HDR +#pragma ident "@(#)java_md.h 1.7 03/12/23 16:37:41 JVM" +#endif +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#ifndef JAVA_MD_H +#define JAVA_MD_H + +#include + +#define PATH_SEPARATOR ':' +#define FILE_SEPARATOR '/' +#define MAXPATHLEN PATH_MAX + +#ifdef JAVA_ARGS +/* + * ApplicationHome is prepended to each of these entries; the resulting + * strings are concatenated (seperated by PATH_SEPARATOR) and used as the + * value of -cp option to the launcher. + */ +#ifndef APP_CLASSPATH +#define APP_CLASSPATH { "/lib/tools.jar", "/classes" } +#endif +#endif + +#ifdef HAVE_GETHRTIME +/* + * Support for doing cheap, accurate interval timing. + */ +#include +#define CounterGet() (gethrtime()/1000) +#define Counter2Micros(counts) (counts) +#else +#define CounterGet() (0) +#define Counter2Micros(counts) (1) +#endif /* HAVE_GETHRTIME */ + +#endif diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/c1_globals_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/c1_globals_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/c1_globals_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/c1_globals_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,12 @@ +/* + * $Id: c1_globals_bsd.hpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// +// Sets the default values for operating system dependent flags used by the +// client compiler. (see c1_globals.hpp) +// diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/c2_globals_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/c2_globals_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/c2_globals_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/c2_globals_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,12 @@ +/* + * $Id: c2_globals_bsd.hpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// +// Sets the default values for operating system dependent flags used by the +// server compiler. (see c2_globals.hpp) +// diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/chaitin_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/chaitin_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/chaitin_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/chaitin_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,29 @@ +/* + * $Id: chaitin_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_chaitin_bsd.cpp.incl" + +void PhaseRegAlloc::pd_preallocate_hook() { + // no action +} + +#ifdef ASSERT +void PhaseRegAlloc::pd_postallocate_verify_hook() { + // no action +} +#endif + + +//Reconciliation History +// 1.1 99/02/12 15:35:26 chaitin_win32.cpp +// 1.2 99/02/18 15:38:56 chaitin_win32.cpp +// 1.4 99/03/09 10:37:48 chaitin_win32.cpp +// 1.6 99/03/25 11:07:44 chaitin_win32.cpp +// 1.8 99/06/22 16:38:58 chaitin_win32.cpp +//End diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/globals_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/globals_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/globals_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/globals_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,16 @@ +/* + * $Id: $ + */ + +// +// Defines BSD specific flags (none). +// +#define RUNTIME_OS_FLAGS(develop, develop_pd, product, product_pd, diagnostic) \ + + +// +// Defines BSD-specific default values. The flags are available on all +// platforms, but they may have different default values on other platforms. +// +define_pd_global(bool, UseMembar, false); +define_pd_global(bool, UseLargePages, false); diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/hpi_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/hpi_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/hpi_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/hpi_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,74 @@ +/* + * $Id: hpi_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +# include "incls/_precompiled.incl" +# include "incls/_hpi_bsd.cpp.incl" + +# include + +typedef jint (JNICALL *init_t)(GetInterfaceFunc *, void *); + +// HotSpot integration note: +// code below matches code in JDK1.2fcs K build. +// "$JDK/src/solaris/javavm/runtime/javai_md.c":23 (ver. 1.7 98/09/15) + +void hpi::initialize_get_interface(vm_calls_t *callbacks) +{ +#define args callbacks + + // "$JDK/src/solaris/javavm/runtime/javai_md.c":32 (ver. 1.7 98/09/15) + char buf[MAXPATHLEN]; + Dl_info dlinfo; + void *hpi_handle; + GetInterfaceFunc& getintf = _get_interface; + jint (JNICALL * DLL_Initialize)(GetInterfaceFunc *, void *); + + char *thread_type = strdup("native_threads"); + + os::jvm_path(buf, sizeof buf); + +#ifdef PRODUCT + const char * hpi_lib = "/libhpi.so"; +#else + char * ptr = strrchr(buf, '/'); + assert(strstr(ptr, "/libjvm") == ptr, "invalid library name"); + const char * hpi_lib = strstr(ptr, "_g") ? "/libhpi_g.so" : "/libhpi.so"; +#endif + + *(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */ + char* p = strrchr(buf, '/'); + if (p != NULL) p[1] = '\0'; /* get rid of hotspot */ + strcat(buf, thread_type); + strcat(buf, hpi_lib); + /* we use RTLD_NOW because of bug 4032715 */ + if (TraceHPI) tty->print("Loading HPI %s ", buf); + hpi_handle = dlopen(buf, RTLD_NOW); + if (hpi_handle == NULL) { + if (TraceHPI) tty->print_cr("HPI dlopen failed: %s", dlerror()); + goto bail; + } + DLL_Initialize = CAST_TO_FN_PTR(jint (JNICALL *)(GetInterfaceFunc *, void *), + dlsym(hpi_handle, "DLL_Initialize")); + if (TraceHPI && DLL_Initialize == NULL) tty->print_cr("HPI dlsym of DLL_Initialize failed: %s", dlerror()); + if (DLL_Initialize == NULL || + (*DLL_Initialize)(&getintf, args) < 0) { + if (TraceHPI) tty->print_cr("HPI DLL_Initialize failed"); + goto bail; + } + if (TraceHPI) tty->print_cr("HPI loaded successfully"); +bail: + free(thread_type); + +#undef args +} + +//Reconciliation History +// 1.3 98/10/01 11:19:43 hpi_win32.cpp +// 1.4 98/10/06 13:57:10 hpi_win32.cpp +// 1.6 99/06/22 16:38:59 hpi_win32.cpp +//End diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/hpi_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/hpi_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/hpi_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/hpi_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,207 @@ +/* + * $Id: hpi_bsd.hpp,v 1.3 2005/01/14 19:53:48 christos Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// +// Parts of the HPI interface for which the HotSparc does not use the +// HPI (because the interruptible IO mechanims used are different). +// + +#include +#include +#include +#include +#include +#include + +// HPI_FileInterface + +// Many system calls can be interrupted by signals and must be restarted. +// Restart support was added without disturbing the extent of thread +// interruption support. + +inline int hpi::close(int fd) { + RESTARTABLE_RETURN_INT(::close(fd)); +} + +inline size_t hpi::read(int fd, void *buf, unsigned int nBytes) { + INTERRUPTIBLE_RETURN_INT(::read(fd, buf, nBytes), os::Bsd::clear_interrupted); +} + +inline size_t hpi::write(int fd, const void *buf, unsigned int nBytes) { + INTERRUPTIBLE_RETURN_INT(::write(fd, buf, nBytes), os::Bsd::clear_interrupted); +} + + +// HPI_SocketInterface + +inline int hpi::socket_close(int fd) { + RESTARTABLE_RETURN_INT(::close(fd)); +} + +inline int hpi::socket(int domain, int type, int protocol) { + return ::socket(domain, type, protocol); +} + +inline int hpi::recv(int fd, char *buf, int nBytes, int flags) { + INTERRUPTIBLE_RETURN_INT(::recv(fd, buf, nBytes, flags), os::Bsd::clear_interrupted); +} + +inline int hpi::send(int fd, char *buf, int nBytes, int flags) { + INTERRUPTIBLE_RETURN_INT(::send(fd, buf, nBytes, flags), os::Bsd::clear_interrupted); +} + +// As both poll and select can be interrupted by signals, we have to be +// prepared to restart the system call after updating the timeout, unless +// a poll() is done with timeout == -1, in which case we repeat with this +// "wait forever" value. + +inline int hpi::timeout(int fd, long timeout) { + int res; + struct timeval t; + julong prevtime, newtime; + + struct pollfd pfd; + pfd.fd = fd; + pfd.events = POLLIN|POLLERR; + + gettimeofday(&t, NULL); + prevtime = ((julong)t.tv_sec * 1000) + t.tv_usec / 1000; + + for(;;) { + + INTERRUPTIBLE_NORESTART(::poll(&pfd, 1, timeout), res, os::Bsd::clear_interrupted); + if(res == OS_ERR && errno == EINTR) { + gettimeofday(&t, NULL); + newtime = ((julong)t.tv_sec * 1000) + t.tv_usec /1000; + timeout -= newtime - prevtime; + if(timeout <= 0) + return OS_OK; + prevtime = newtime; + } else + return res; + } +} + +inline int hpi::listen(int fd, int count) { + if (fd < 0) + return OS_ERR; + + return ::listen(fd, count); +} + +inline int hpi::connect(int fd, struct sockaddr *him, int len) { + INTERRUPTIBLE_RETURN_INT(::connect(fd, him, len), os::Bsd::clear_interrupted); +} + +inline int hpi::accept(int fd, struct sockaddr *him, int *len) { + if (fd < 0) + return OS_ERR; + INTERRUPTIBLE_RETURN_INT((int)::accept(fd, him, (socklen_t*)len), os::Bsd::clear_interrupted); +} + +inline int hpi::recvfrom(int fd, char *buf, int nBytes, int flags, + sockaddr *from, int *fromlen) { + //%%note jvm_r11 + INTERRUPTIBLE_RETURN_INT((int)::recvfrom(fd, buf, nBytes, flags, from, (socklen_t*)fromlen), os::Bsd::clear_interrupted); +} + +inline int hpi::sendto(int fd, char *buf, int len, int flags, + struct sockaddr *to, int tolen) { + //%%note jvm_r11 + INTERRUPTIBLE_RETURN_INT((int)::sendto(fd, buf, len, flags, to, tolen), os::Bsd::clear_interrupted); +} + +inline int hpi::socket_available(int fd, long *pbytes) { + if (fd < 0) + return OS_OK; + + int ret; + + RESTARTABLE(::ioctl(fd, FIONREAD, pbytes), ret); + + //%% note ioctl can return 0 when successful, JVM_SocketAvailable + // is expected to return 0 on failure and 1 on success to the jdk. + + return (ret == OS_ERR) ? 0 : 1; +} + + +/* +HPIDECL(socket_shutdown, "socket_shutdown", _socket, SocketShutdown, + int, "%d", + (int fd, int howto), + ("fd = %d, howto = %d", fd, howto), + (fd, howto)); + */ +inline int hpi::socket_shutdown(int fd, int howto){ + return ::shutdown(fd, howto); +} + +/* +HPIDECL(bind, "bind", _socket, Bind, + int, "%d", + (int fd, struct sockaddr *him, int len), + ("fd = %d, him = %p, len = %d", + fd, him, len), + (fd, him, len)); +*/ +inline int hpi::bind(int fd, struct sockaddr *him, int len){ + INTERRUPTIBLE_RETURN_INT_NORESTART(::bind(fd, him, len),os::Bsd::clear_interrupted); +} + +/* +HPIDECL(get_sock_name, "get_sock_name", _socket, GetSocketName, + int, "%d", + (int fd, struct sockaddr *him, int *len), + ("fd = %d, him = %p, len = %p", + fd, him, len), + (fd, him, len)); + */ +inline int hpi::get_sock_name(int fd, struct sockaddr *him, int *len){ + return ::getsockname(fd, him, (socklen_t*)len); +} + +/* +HPIDECL(get_host_name, "get_host_name", _socket, GetHostName, int, "%d", + (char *hostname, int namelen), + ("hostname = %p, namelen = %d", + hostname, namelen), + (hostname, namelen)); + */ +inline int hpi::get_host_name(char* name, int namelen){ + return ::gethostname(name, namelen); +} + +/* +HPIDECL(get_sock_opt, "get_sock_opt", _socket, SocketGetOption, int, "%d", + (int fd, int level, int optname, char *optval, int* optlen), + ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %p", + fd, level, optname, optval, optlen), + (fd, level, optname, optval, optlen)); + */ +inline int hpi::get_sock_opt(int fd, int level, int optname, + char *optval, int* optlen){ + return ::getsockopt(fd, level, optname, optval, (socklen_t*)optlen); +} + +/* +HPIDECL(set_sock_opt, "set_sock_opt", _socket, SocketSetOption, int, "%d", + (int fd, int level, int optname, const char *optval, int optlen), + ("fd = %d, level = %d, optname = %d, optval = %p, optlen = %d", + fd, level, optname, optval, optlen), + (fd, level, optname, optval, optlen)); + */ +inline int hpi::set_sock_opt(int fd, int level, int optname, + const char *optval, int optlen){ + return ::setsockopt(fd, level, optname, optval, optlen); +} + +//Reconciliation History +// 1.3 98/10/21 18:17:14 hpi_win32.hpp +// 1.6 99/06/28 11:01:36 hpi_win32.hpp +//End diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/interfaceSupport_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/interfaceSupport_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/interfaceSupport_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/interfaceSupport_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,13 @@ +#ifdef USE_PRAGMA_IDENT_HDR +#pragma ident "@(#)interfaceSupport_solaris.hpp 1.1 05/09/15 15:13:34 JVM" +#endif +// +// Copyright 2005 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// Contains inlined functions for class InterfaceSupport + +static inline void serialize_memory(JavaThread *thread) { + os::write_memory_serialize_page(thread); +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/jsig.c jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/jsig.c --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/jsig.c 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/jsig.c 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,263 @@ +/* + * $Id: jsig.c,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +/* CopyrightVersion 1.2 */ + +/* + * BSDNOTE: Solaris comment said: + * + * : This is a special library that should be loaded before libc & + * : libthread to interpose the signal handler installation functions: + * : sigaction(), signal(), sigset(). + * : Used for signal-chaining. See RFE 4381843. + */ + +/* + * BSDNOTE: Since FreeBSD does not support sigset() -- I have completely + * removed it. --phantom + */ + +#include +#include +#include +#include +#include +#include +#include "jvm_bsd.h" + +#define bool int +#define true 1 +#define false 0 + +static struct sigaction *sact = (struct sigaction *)NULL; /* saved signal handlers */ +static sigset_t jvmsigs; + +/* used to synchronize the installation of signal handlers */ +static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t cond = PTHREAD_COND_INITIALIZER; +static pthread_t tid = NULL; + +typedef void (*sa_handler_t)(int); +typedef void (*sa_sigaction_t)(int, siginfo_t *, void *); +typedef sa_handler_t (*signal_t)(int, sa_handler_t); +typedef int (*sigaction_t)(int, const struct sigaction *, struct sigaction *); + +static signal_t os_signal = 0; /* os's version of signal()/sigset() */ +static sigaction_t os_sigaction = 0; /* os's version of sigaction() */ + +static bool jvm_signal_installing = false; +static bool jvm_signal_installed = false; + + +/* assume called within signal_lock */ +static void allocate_sact() { + size_t maxsignum; + maxsignum = SIGRTMAX; + if (sact == NULL) { + sact = (struct sigaction *)malloc((maxsignum+1) * (size_t)sizeof(struct sigaction)); + memset(sact, 0, (maxsignum+1) * (size_t)sizeof(struct sigaction)); + } + + if (sact == NULL) { + printf("libjsig.so unable to allocate memory"); + exit(0); + } + + sigemptyset(&jvmsigs); +} + +static void signal_lock() { + pthread_mutex_lock(&mutex); + /* When the jvm is installing its set of signal handlers, threads + * other than the jvm thread should wait */ + if (jvm_signal_installing) { + if (tid != pthread_self()) { + pthread_cond_wait(&cond, &mutex); + } + } +} + +static void signal_unlock() { + pthread_mutex_unlock(&mutex); +} + +static sa_handler_t call_os_signal(int sig, sa_handler_t disp) { + + if (os_signal == NULL) { + os_signal = (signal_t)dlsym(RTLD_NEXT, "signal"); + if (os_signal == NULL) { + printf("%s\n", dlerror()); + exit(0); + } + } + return (*os_signal)(sig, disp); +} + +static void save_signal_handler(int sig, sa_handler_t disp) { + sigset_t set; + if (sact == NULL) { + allocate_sact(); + } + sact[sig].sa_handler = disp; + sigemptyset(&set); + sact[sig].sa_mask = set; + sact[sig].sa_flags = SA_NODEFER; + if (sig != SIGILL && sig != SIGTRAP) { + sact[sig].sa_flags |= SA_RESETHAND; + } +} + +static sa_handler_t set_signal(int sig, sa_handler_t disp) { + sa_handler_t oldhandler; + + signal_lock(); + if (sact == NULL) { + allocate_sact(); + } + + if (jvm_signal_installed && sigismember(&jvmsigs, sig)) { + /* jvm has installed its signal handler for this signal. */ + /* Save the handler. Don't really install it. */ + + oldhandler = sact[sig].sa_handler; + save_signal_handler(sig, disp); + + signal_unlock(); + return oldhandler; + } else if (jvm_signal_installing) { + /* jvm is installing its signal handlers. Install the new + * handlers and save the old ones. jvm uses sigaction(). + * Leave the piece here just in case. */ + oldhandler = call_os_signal(sig, disp); + save_signal_handler(sig, oldhandler); + + /* Record the signals used by jvm */ + sigaddset(&jvmsigs, sig); + + signal_unlock(); + return oldhandler; + } else { + /* jvm has no relation with this signal (yet). Install the + * the handler. */ + oldhandler = call_os_signal(sig, disp); + + signal_unlock(); + return oldhandler; + } +} + +sa_handler_t signal(int sig, sa_handler_t disp) { + return set_signal(sig, disp); +} + +sa_handler_t sigset(int sig, sa_handler_t disp) { + printf("sigset() is not supported by FreeBSD"); + exit(0); +} + +static int call_os_sigaction(int sig, const struct sigaction *act, + struct sigaction *oact) { + if (os_sigaction == NULL) { + os_sigaction = (sigaction_t)dlsym(RTLD_NEXT, "sigaction"); + if (os_sigaction == NULL) { + printf("%s\n", dlerror()); + exit(0); + } + } + return (*os_sigaction)(sig, act, oact); +} + +int sigaction(int sig, const struct sigaction *act, struct sigaction *oact) { + int res; + struct sigaction oldAct; + + signal_lock(); + + if (sact == NULL ) { + allocate_sact(); + } + if (jvm_signal_installed && sigismember(&jvmsigs, sig)) { + /* jvm has installed its signal handler for this signal. */ + /* Save the handler. Don't really install it. */ + if (oact != NULL) { + *oact = sact[sig]; + } + if (act != NULL) { + sact[sig] = *act; + } + + signal_unlock(); + return 0; + } else if (jvm_signal_installing) { + /* jvm is installing its signal handlers. Install the new + * handlers and save the old ones. */ + res = call_os_sigaction(sig, act, &oldAct); + sact[sig] = oldAct; + if (oact != NULL) { + *oact = oldAct; + } + + /* Record the signals used by jvm */ + sigaddset(&jvmsigs, sig); + + signal_unlock(); + return res; + } else { + /* jvm has no relation with this signal (yet). Install the + * the handler. */ + res = call_os_sigaction(sig, act, oact); + + signal_unlock(); + return res; + } +} + +/* The four functions for the jvm to call into */ +void JVM_begin_signal_setting() { + + int status; + + status = pthread_mutex_init(&mutex, NULL); + if (status != 0) { + printf("Could not initialize libjsig mutex\n"); + exit(0); + } + status = pthread_cond_init(&cond, NULL); + if (status != 0) { + printf("Could not initialize libjsig condvar\n"); + exit(0); + } + + signal_lock(); + jvm_signal_installing = true; + tid = pthread_self(); + signal_unlock(); +} + +void JVM_end_signal_setting() { + signal_lock(); + jvm_signal_installed = true; + jvm_signal_installing = false; + pthread_cond_broadcast(&cond); + signal_unlock(); +} + +struct sigaction *JVM_get_signal_action(int sig) { + if (sact == NULL) { + allocate_sact(); + } + /* Does race condition make sense here? */ + if (sigismember(&jvmsigs, sig)) { + return &sact[sig]; + } + return NULL; +} + +int JVM_get_libjsig_version() { + return JSIG_VERSION_1_4_1; +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/jvm_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/jvm_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/jvm_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/jvm_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,178 @@ +/* + * $Id: jvm_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_jvm_bsd.cpp.incl" + +#include + +// sun.misc.Signal /////////////////////////////////////////////////////////// +// Signal code is mostly copied from classic vm, signals_md.c 1.4 98/08/23 +/* + * This function is included primarily as a debugging aid. If Java is + * running in a console window, then pressing will cause + * the current state of all active threads and monitors to be written + * to the console window. + */ + +JVM_ENTRY_NO_ENV(void*, JVM_RegisterSignal(jint sig, void* handler)) + // Copied from classic vm + // @(#)signals_md.c 1.4 98/08/23 + void* newHandler = handler == (void *)2 + ? os::user_handler() + : handler; + switch (sig) { + /* The following are already used by the VM. */ + case SIGFPE: + case SIGILL: + case SIGSEGV: + + /* The following signal is used by the VM to dump thread stacks unless + ReduceSignalUsage is set, in which case the user is allowed to set + his own _native_ handler for this signal; thus, in either case, + we do not allow JVM_RegisterSignal to change the handler. */ + case BREAK_SIGNAL: + return (void *)-1; + + /* The following signals are used for Shutdown Hooks support. However, if + ReduceSignalUsage (-Xrs) is set, Shutdown Hooks must be invoked via + System.exit(), Java is not allowed to use these signals, and the the + user is allowed to set his own _native_ handler for these signals and + invoke System.exit() as needed. Terminator.setup() is avoiding + registration of these signals when -Xrs is present. + - If the HUP signal is ignored (from the nohup) command, then Java + is not allowed to use this signal. + */ + case SHUTDOWN1_SIGNAL: + case SHUTDOWN2_SIGNAL: + case SHUTDOWN3_SIGNAL: + if (ReduceSignalUsage) return (void*)-1; + if (os::Bsd::is_sig_ignored(sig)) return (void*)1; + } + + /* Check parameterized signals. Don't allow sharing of our interrupt signal */ + if (sig == os::Bsd::SIGinterrupt()) { + return (void *)-1; + } + + void* oldHandler = os::signal(sig, newHandler); + if (oldHandler == os::user_handler()) { + return (void *)2; + } else { + return oldHandler; + } +JVM_END + + +JVM_ENTRY_NO_ENV(jboolean, JVM_RaiseSignal(jint sig)) + if (ReduceSignalUsage) { + // do not allow SHUTDOWN1_SIGNAL,SHUTDOWN2_SIGNAL,SHUTDOWN3_SIGNAL, + // BREAK_SIGNAL to be raised when ReduceSignalUsage is set, since + // no handler for them is actually registered in JVM or via + // JVM_RegisterSignal. + if (sig == SHUTDOWN1_SIGNAL || sig == SHUTDOWN2_SIGNAL || + sig == SHUTDOWN3_SIGNAL || sig == BREAK_SIGNAL) { + return JNI_FALSE; + } + } + else if ((sig == SHUTDOWN1_SIGNAL || sig == SHUTDOWN2_SIGNAL || + sig == SHUTDOWN3_SIGNAL) && os::Bsd::is_sig_ignored(sig)) { + // do not allow SHUTDOWN1_SIGNAL to be raised when SHUTDOWN1_SIGNAL + // is ignored, since no handler for them is actually registered in JVM + // or via JVM_RegisterSignal. + // This also applies for SHUTDOWN2_SIGNAL and SHUTDOWN3_SIGNAL + return JNI_FALSE; + } + + os::signal_raise(sig); + return JNI_TRUE; +JVM_END + +/* + All the defined signal names for FreeBSD. + + NOTE that not all of these names are accepted by our Java implementation + + Via an existing claim by the VM, sigaction restrictions, or + the "rules of Unix" some of these names will be rejected at runtime. + For example the VM sets up to handle USR1, sigaction returns EINVAL for + CANCEL, and Solaris simply doesn't allow catching of KILL. + + Here are the names currently accepted by a user of sun.misc.Signal with + 1.4.1 (ignoring potential interaction with use of chaining, etc): + +FreeBSD: + XXXBSD + +Linux: + HUP, INT, TRAP, ABRT, IOT, BUS, USR2, PIPE, ALRM, TERM, STKFLT, + CLD, CHLD, CONT, TSTP, TTIN, TTOU, URG, XCPU, XFSZ, VTALRM, PROF, + WINCH, POLL, IO, PWR, SYS +Solaris: + HUP, INT, TRAP, IOT, ABRT, EMT, BUS, SYS, PIPE, ALRM, TERM, USR2, + CLD, CHLD, PWR, WINCH, URG, POLL, IO, TSTP, CONT, TTIN, TTOU, VTALRM, + PROF, XCPU, XFSZ, FREEZE, THAW, LOST + +*/ + +struct siglabel { + char *name; + int number; +}; + +struct siglabel siglabels[] = + /* derived from /usr/include/sys/signal.h on FreeBSD 4.7-STABLE */ + {"HUP", SIGHUP, /* Hangup (POSIX). */ + "INT", SIGINT, /* Interrupt (ANSI). */ + "QUIT", SIGQUIT, /* Quit (POSIX). */ + "ILL", SIGILL, /* Illegal instruction (ANSI). */ + "TRAP", SIGTRAP, /* Trace trap (POSIX). */ + "ABRT", SIGABRT, /* Abort (ANSI). */ + "EMT", SIGEMT, /* EMT trap. */ + "FPE", SIGFPE, /* Floating-point exception (ANSI). */ + "KILL", SIGKILL, /* Kill, unblockable (POSIX). */ + "BUS", SIGBUS, /* BUS error. */ + "SEGV", SIGSEGV, /* Segmentation violation (ANSI). */ + "SYS", SIGSYS, /* Not existent system call */ + "PIPE", SIGPIPE, /* Broken pipe (POSIX). */ + "ALRM", SIGALRM, /* Alarm clock (POSIX). */ + "TERM", SIGTERM, /* Termination (ANSI). */ + "URG", SIGURG, /* Urgent condition on socket (4.2 BSD). */ + "STOP", SIGSTOP, /* Stop, unblockable (POSIX). */ + "TSTP", SIGTSTP, /* Keyboard stop (POSIX). */ + "CONT", SIGCONT, /* Continue (POSIX). */ + "CHLD", SIGCHLD, /* Child status has changed (POSIX). */ + "TTIN", SIGTTIN, /* Background read from tty (POSIX). */ + "TTOU", SIGTTOU, /* Background write to tty (POSIX). */ + "IO", SIGIO, /* I/O now possible (4.2 BSD). */ + "XCPU", SIGXCPU, /* CPU limit exceeded (4.2 BSD). */ + "XFSZ", SIGXFSZ, /* File size limit exceeded (4.2 BSD). */ + "VTALRM", SIGVTALRM, /* Virtual alarm clock (4.2 BSD). */ + "PROF", SIGPROF, /* Profiling alarm clock (4.2 BSD). */ + "WINCH", SIGWINCH, /* Window size change (4.3 BSD, Sun). */ + "INFO", SIGINFO, /* Information request. */ + "USR1", SIGUSR1, /* User-defined signal 1 (POSIX). */ + "USR2", SIGUSR2 /* User-defined signal 2 (POSIX). */ + }; + +JVM_ENTRY_NO_ENV(jint, JVM_FindSignal(const char *name)) + + /* find and return the named signal's number */ + + for(int i=0;i /* For DIR */ +#include /* For MAXPATHLEN */ +#include /* For F_OK, R_OK, W_OK */ +#include /* for intptr_t types (64 Bit cleanliness) */ + +#define JNI_ONLOAD_SYMBOLS {"JNI_OnLoad"} +#define JNI_ONUNLOAD_SYMBOLS {"JNI_OnUnload"} +#define JVM_ONLOAD_SYMBOLS {"JVM_OnLoad"} +#define AGENT_ONLOAD_SYMBOLS {"Agent_OnLoad"} +#define AGENT_ONUNLOAD_SYMBOLS {"Agent_OnUnload"} + +#define JNI_LIB_PREFIX "lib" +#define JNI_LIB_SUFFIX ".so" + +#define JVM_MAXPATHLEN MAXPATHLEN + +#define JVM_R_OK R_OK +#define JVM_W_OK W_OK +#define JVM_X_OK X_OK +#define JVM_F_OK F_OK + +/* + * File I/O + */ + +#include +#include +#include +#include + +/* O Flags */ + +#define JVM_O_RDONLY O_RDONLY +#define JVM_O_WRONLY O_WRONLY +#define JVM_O_RDWR O_RDWR +#define JVM_O_O_APPEND O_APPEND +#define JVM_O_EXCL O_EXCL +#define JVM_O_CREAT O_CREAT + + +/* Signal definitions */ + +#define BREAK_SIGNAL SIGQUIT /* Thread dumping support. */ +#define INTERRUPT_SIGNAL SIGUSR1 /* Interruptible I/O support. */ +#define ASYNC_SIGNAL SIGUSR2 /* Watcher & async err support. */ +#define SHUTDOWN1_SIGNAL SIGHUP /* Shutdown Hooks support. */ +#define SHUTDOWN2_SIGNAL SIGINT +#define SHUTDOWN3_SIGNAL SIGTERM +/* alternative signals used with -XX:+UseAltSigs (or for backward + compatibility with 1.2, -Xusealtsigs) flag. Chosen to be + unlikely to conflict with applications embedding the vm */ +#define ALT_INTERRUPT_SIGNAL (SIGRTMIN + SIGRTMAX)/2 /* alternate intio signal */ +#define ALT_ASYNC_SIGNAL ALT_INTERRUPT_SIGNAL+1 /* alternate async signal */ + +/* XXXBSD: compat? */ +#define SIGRTMIN 33 +#define SIGRTMAX 63 + +/* With 1.4.1 libjsig added versioning: used in os_bsd.cpp and jsig.c */ +#define JSIG_VERSION_1_4_1 0x30140100 + +#endif /* JVM_MD_H */ + diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/mutex_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/mutex_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/mutex_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/mutex_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,457 @@ +/* + * $Id: mutex_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +# include "incls/_precompiled.incl" +# include "incls/_mutex_bsd.cpp.incl" + +// put OS-includes here +# include + +// Implementation of Mutex + +// A simple Mutex for VM locking: it is not guaranteed to interoperate with +// the fast object locking, so exclusively use Mutex locking or exclusively +// use fast object locking. + +Mutex::Mutex(int rank, const char *name, bool allow_vm_block) + debug_only( : _rank(rank) ) +{ + _lock_event = new os::Bsd::Event; + _suppress_signal = false; + _owner = INVALID_THREAD; + _name = name; + +#ifndef PRODUCT + _lock_count = -1; // unused in solaris + _allow_vm_block = allow_vm_block; + debug_only(_next = NULL;) + debug_only(_last_owner = INVALID_THREAD;) +#endif +} + +Mutex::~Mutex() { + os::Bsd::Event* const _Lock_Event = (os::Bsd::Event*)_lock_event; + + assert(_owner == INVALID_THREAD, "Owned Mutex being deleted"); + assert(_lock_count == -1, "Mutex being deleted with non -1 lock count"); + delete _Lock_Event; +} + + +void Mutex::unlock() { + os::Bsd::Event* const _Lock_Event = (os::Bsd::Event*)_lock_event; + + assert(_owner == Thread::current(), "Mutex not being unlocked by owner"); + + set_owner(INVALID_THREAD); + + if (_suppress_signal) { + assert(SafepointSynchronize::at_vmthread_safepoint(), "can't sneak"); + _suppress_signal = false; + } + else { + assert(_lock_count >= 0, "Mutex being unlocked without positive lock count"); + debug_only(_lock_count--;) + _Lock_Event->unlock(); + } +} + + +// Can be called by non-Java threads (JVM_RawMonitorExit) +void Mutex::jvm_raw_unlock() { + os::Bsd::Event* const _Lock_Event = (os::Bsd::Event*)_lock_event; + // Do not call set_owner, as this would break. + _owner = INVALID_THREAD; + if (_suppress_signal) { + assert(SafepointSynchronize::at_vmthread_safepoint(), "can't sneak"); + _suppress_signal = false; + } + else { + debug_only(_lock_count--;) + _Lock_Event->unlock(); + } +} + + +void Mutex::wait_for_lock_blocking_implementation(JavaThread *thread) { + ThreadBlockInVM tbivm(thread); + + bool threadIsSuspended; + do { + thread->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() + wait_for_lock_implementation(); + + // were we externally suspended while we were waiting? + threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); + if (threadIsSuspended) { + // + // We have been granted the contended Mutex, but while we were + // waiting another thread suspended us. We don't want to enter + // the Mutex while suspended because that would surprise the + // thread that suspended us. + // + debug_only(_lock_count--;) + ((os::Bsd::Event*)_lock_event)->unlock(); + thread->java_suspend_self(); + } + } while (threadIsSuspended); +} + + +#ifndef PRODUCT +void Mutex::print() const { + os::Bsd::Event* const _Lock_Event = (os::Bsd::Event*)_lock_event; + + tty->print_cr("Mutex: [0x%lx/0x%lx] %s - owner: 0x%lx", this, _Lock_Event, _name, _owner); +} +#endif + + +// +// Monitor +// + + +Monitor::Monitor(int rank, const char *name, bool allow_vm_block) : Mutex(rank, name, allow_vm_block) { + _event = NULL; + _counter = 0; + _tickets = 0; + _waiters = 0; +} + + +Monitor::~Monitor() { +} + + +bool Monitor::wait(bool no_safepoint_check, long timeout) { + os::Bsd::Event* const _Lock_Event = (os::Bsd::Event*)_lock_event; + Thread* thread = Thread::current(); + + assert(_owner != INVALID_THREAD, "Wait on unknown thread"); + assert(_owner == thread, "Wait on Monitor not by owner"); + + // The design rule for use of mutexes of rank special or less is + // that we are guaranteed not to block while holding such mutexes. + // Here we verify that the least ranked mutex that we hold, + // modulo the mutex we are about to relinquish, satisfies that + // constraint, since we are about to block in a wait. + #ifdef ASSERT + Mutex* least = get_least_ranked_lock_besides_this(thread->owned_locks()); + assert(least != this, "Specification of get_least_... call above"); + if (least != NULL && least->rank() <= special) { + tty->print("Attempting to wait on monitor %s/%d while holding" + " lock %s/%d -- possible deadlock", + name(), rank(), least->name(), least->rank()); + assert(false, + "Shouldn't block(wait) while holding a lock of rank special"); + } + #endif // ASSERT + + long c = _counter; + +#ifdef ASSERT + // Don't catch signals while blocked; let the running threads have the signals. + // (This allows a debugger to break into the running thread.) + sigset_t oldsigs; + sigset_t* allowdebug_blocked = os::Bsd::allowdebug_blocked_signals(); + pthread_sigmask(SIG_BLOCK, allowdebug_blocked, &oldsigs); +#endif + + _waiters++; + // Loop until condition variable is signaled. Tickets will + // reflect the number of threads which have been notified. The counter + // field is used to make sure we don't respond to notifications that + // have occurred *before* we started waiting, and is incremented each + // time the condition variable is signaled. + // Use a ticket scheme to guard against spurious wakeups. + int wait_status; + + while (true) { + + if (no_safepoint_check) { + + // conceptually set the owner to INVALID_THREAD in anticipation of yielding the lock in wait + set_owner(Mutex::INVALID_THREAD); + + // (SafepointTimeout is not implemented) + if(timeout == 0) { + wait_status = _Lock_Event->wait(); + } + else { + wait_status = _Lock_Event->timedwait(timeout); + } + } else { + JavaThread *jt = (JavaThread *)thread; + // save thread state around the lock + + // conceptually set the owner to INVALID_THREAD in anticipation of yielding the lock in wait + set_owner(Mutex::INVALID_THREAD); + + // Enter safepoint region + ThreadBlockInVM tbivm(jt); + OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */); + + jt->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() + if(timeout == 0) { + wait_status = _Lock_Event->wait(); + } + else { + wait_status = _Lock_Event->timedwait(timeout); + } + + // were we externally suspended while we were waiting? + if (jt->handle_special_suspend_equivalent_condition()) { + // + // Our event wait has finished and we own the _Lock_Event, but + // while we were waiting another thread suspended us. We don't + // want to hold the _Lock_Event while suspended because that + // would surprise the thread that suspended us. + // + _Lock_Event->unlock(); + jt->java_suspend_self(); + _Lock_Event->lock(); + } + } // if no_safepoint_check + + // conceptually reaquire the lock (the actual Solaris lock is already reacquired after waiting) + set_owner(thread); + + // We get to this point if either: + // a) a notify has been executed by some other thread and woke us up + // b) a signal has been delivered to this thread and terminated wait + // c) the above two events happened while we were waiting - that is a signal + // was delivered while notify was executed by some other thread. + + // Handle cases a) and c) here. We consume one ticket even in case c) when notify + // and a signal arrive together + if (_tickets != 0 && _counter != c) { + break; + } + + // If wait was interrupted by a signal or timeout, do not use up a ticket + if (wait_status == EINTR || wait_status == ETIMEDOUT) { + ++_tickets; // will be decremented again below + break; + } + + + } + _waiters--; + _tickets--; + +#ifdef ASSERT + pthread_sigmask(SIG_SETMASK, &oldsigs, NULL); +#endif + + // return true if timed out + return (wait_status == ETIMEDOUT); +} + + +// Notify a single thread waiting on this condition variable +bool Monitor::notify() { + os::Bsd::Event* const _Lock_Event = (os::Bsd::Event*)_lock_event; + + assert(_owner != INVALID_THREAD, "notify on unknown thread"); + assert(_owner == Thread::current(), "notify on Monitor not by owner"); + + if (_waiters > _tickets) { + + _Lock_Event->signal(); + + _tickets++; + _counter++; + } + + return true; + +} + + +// Notify all threads waiting on this ConditionVariable +bool Monitor::notify_all() { + os::Bsd::Event* const _Lock_Event = (os::Bsd::Event*)_lock_event; + + assert(_owner != INVALID_THREAD, "notify on unknown thread"); + assert(_owner == Thread::current(), "notify on Monitor not by owner"); + + if (_waiters > 0) { + + _Lock_Event->broadcast(); + + _tickets = _waiters; + _counter++; + } + + return true; +} + +// JSR166 +// ------------------------------------------------------- + +/* + * The solaris and linux implementations of park/unpark are fairly + * conservative for now, but can be improved. They currently use a + * mutex/condvar pair, plus a a count (reused from Monitor::_counter) + * Park decrements count if > 0, else does a condvar wait. Unpark + * sets count to 1 and signals condvar. There are a few + * simplifications and specialization wrt Monitor::wait though: Only + * one thread ever waits on the condvar. Contention seen when trying + * to park implies that someone is unparking you, so don't wait. And + * spurious returns are fine, so there is no need to track + * notifications. + * + * (I lifted as much code+comments as possible from Monitor::wait + * here to try to make the correspondances clear - dl) + */ + +Parker::Parker() + // Even though park can block, we must act as "leaf" wrt rank rules. + // Otherwise, rank assertion can incorreclty trigger when unpark is + // called from Thread::interrupt. + : Monitor(Mutex::leaf, "Park Semaphore", true) { +} + +Parker::~Parker() { +} + +#define NANOSECS_PER_SEC 1000000000 + +void Parker::park(bool isAbsolute, jlong time) { + // First, demultiplex/decode time arguments + struct timespec absTime; + if (time < 0) { // don't wait at all + return; + } + else if (time > 0) { + struct timeval now; + int todstatus = gettimeofday(&now, NULL); + assert(todstatus == 0, "gettimeofday"); + + if (!isAbsolute) { + // convert to absolute time (could replace with solaris cond_relwait) + absTime.tv_sec = time / NANOSECS_PER_SEC + now.tv_sec; + absTime.tv_nsec = (time % NANOSECS_PER_SEC) + now.tv_usec * 1000; + if (absTime.tv_nsec > NANOSECS_PER_SEC) { + absTime.tv_nsec -= NANOSECS_PER_SEC; + ++absTime.tv_sec; + } + } + else { + absTime.tv_sec = time / 1000; + absTime.tv_nsec = (time % 1000) * (1000 * 1000); + } + + // Solaris cond_timedwait(3T) says arg must be within + // current_time + 100000000. So we need to + // check and possibly saturate + + if (absTime.tv_sec >= now.tv_sec + 100000000) { + absTime.tv_sec = now.tv_sec + 100000000; + absTime.tv_nsec = 0; + } + } + + Thread* thread = Thread::current(); + assert(thread->is_Java_thread(), "Must be JavaThread"); + JavaThread *jt = (JavaThread *)thread; + os::Bsd::Event* const mon = (os::Bsd::Event*)_lock_event; + + // Don't wait if cannot get lock since interference arises from + // unblocking. Also. check interrupt before trying wait + if (Thread::is_interrupted(thread, false) || !try_lock()) { + return; + } + +#ifdef ASSERT + // (The following checks lifted from Monitor::wait - dl) + assert(_owner != INVALID_THREAD, "Wait on unknown thread"); + assert(_owner == thread, "Wait on Monitor not by owner"); + + // The design rule for use of mutexes of rank special or less is + // that we are guaranteed not to block while holding such mutexes. + // Here we verify that the least ranked mutex that we hold, + // modulo the mutex we are about to relinquish, satisfies that + // constraint, since we are about to block in a wait. + Mutex* least = get_least_ranked_lock_besides_this(thread->owned_locks()); + assert(least != this, "Specification of get_least_... call above"); + if (least != NULL && least->rank() <= special) { + tty->print("Attempting to wait on monitor %s/%d while holding" + " lock %s/%d -- possible deadlock", + name(), rank(), least->name(), least->rank()); + assert(false, + "Shouldn't block(wait) while holding a lock of rank special"); + } +#endif // ASSERT + + if (_counter > 0) { // no wait needed + _counter = 0; + unlock(); + return; + } + +#ifdef ASSERT + // Don't catch signals while blocked; let the running threads have the signals. + // (This allows a debugger to break into the running thread.) + sigset_t oldsigs; + sigset_t* allowdebug_blocked = os::Bsd::allowdebug_blocked_signals(); + pthread_sigmask(SIG_BLOCK, allowdebug_blocked, &oldsigs); +#endif + + // conceptually set the owner to INVALID_THREAD in anticipation of yielding the lock in wait + set_owner(Mutex::INVALID_THREAD); + + // Enter safepoint region + ThreadBlockInVM tbivm(jt); + OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */); + jt->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() + + if (time == 0) { + mon->wait(); + } + else { + mon->timedwait(&absTime); + } + + // conceptually reaquire the lock (the actual lock is already reacquired after waiting) + set_owner(thread); + +#ifdef ASSERT + pthread_sigmask(SIG_SETMASK, &oldsigs, NULL); +#endif + + unlock(); + // If externally suspended while waiting, re-suspend + if (jt->handle_special_suspend_equivalent_condition()) { + jt->java_suspend_self(); + } + +} + +void Parker::unpark() { + int s; + lock(); + s = _counter; + _counter = 1; + unlock(); + + if (s < 1) { + os::Bsd::Event* const mon = (os::Bsd::Event*)_lock_event; + mon->signal(); + } +} + + +//Reconciliation History +// 1.15 99/01/05 11:27:27 mutex_win32.cpp +// 1.20 99/06/28 11:01:40 mutex_win32.cpp +//End diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/mutex_bsd.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/mutex_bsd.inline.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/mutex_bsd.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/mutex_bsd.inline.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,28 @@ +/* + * $Id: mutex_bsd.inline.hpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +inline bool Mutex::lock_implementation() { + int status = ((os::Bsd::Event*)_lock_event)->trylock(); + if (status != 0) { + debug_only(_lock_count++); + return true; + } + return false; +} + +inline bool Mutex::try_lock_implementation() { + // Same on Solaris. + return lock_implementation(); +} + + +inline void Mutex::wait_for_lock_implementation() { + assert(!owned_by_self(), "deadlock"); + ((os::Bsd::Event*)_lock_event)->lock(); + debug_only(_lock_count++;) +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/objectMonitor_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/objectMonitor_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/objectMonitor_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/objectMonitor_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,1044 @@ +/* + * $Id: objectMonitor_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +# include "incls/_precompiled.incl" +# include "incls/_objectMonitor_bsd.cpp.incl" + +typedef os::Bsd::Event* event_t; + +// A macro is used below because there may already be a pending +// exception which should not abort the execution of the routines +// which use this (which is why we don't put this into check_slow and +// call it with a CHECK argument). +#define CHECK_OWNER() \ + do { \ + if (THREAD != _owner) { \ + if (THREAD->is_lock_owned((address) _owner)) { \ + _owner = THREAD ; /* Convert from basiclock addr to Thread addr */ \ + _recursions = 0; \ + } else { \ + THROW(vmSymbols::java_lang_IllegalMonitorStateException()); \ + } \ + } \ + } while (false) + +class ObjectWaiter : public StackObj { + // ObjectWaiter serves as a "proxy" or surrogate thread. +public: + enum TStates { TS_UNDEF, TS_READY, TS_RUN, TS_WAIT, TS_ENTER } ; + ObjectWaiter* _next; + ObjectWaiter* _prev; + Thread* _thread; + volatile intptr_t _notified; + volatile TStates TState ; + event_t _event; +public: + ObjectWaiter(Thread* thread) { + _next = NULL; + _prev = NULL; + _thread = thread; + _notified = 0; + _event = thread->osthread()->interrupt_event() ; + TState = TS_RUN ; + } +}; + +ObjectWaiter* ObjectMonitor::first_waiter() { + return (ObjectWaiter*)_queue; +} + +ObjectWaiter* ObjectMonitor::next_waiter(ObjectWaiter* o) { + return o->_next; +} + +Thread* ObjectMonitor::thread_of_waiter(ObjectWaiter* o) { + return o->_thread; +} + +// initialize the monitor, exception the semaphore, all other fields +// are simple integers or pointers +ObjectMonitor::ObjectMonitor() { + _header = NULL; + _count = 0; + _waiters = 0, + _recursions = 0; + _object = NULL; + _owner = NULL; + _queue = NULL; + _succ = NULL ; + _EntryQueue = NULL ; + _QMix = 0 ; +} + +ObjectMonitor::~ObjectMonitor() { +} + +intptr_t ObjectMonitor::is_busy() const { + return (_count|_waiters|(intptr_t)_owner); +} + +void ObjectMonitor::Recycle () { + _succ = NULL ; + _EntryQueue = NULL ; + _QMix = 0 ; +} + + +inline void ObjectMonitor::enqueue(ObjectWaiter* node) { + assert(node != NULL, "should not dequeue NULL node"); + assert(node->_prev == NULL, "node already in list"); + assert(node->_next == NULL, "node already in list"); + // put node at end of queue (circular doubly linked list) + if (_queue == NULL) { + _queue = node; + node->_prev = node; + node->_next = node; + } else { + ObjectWaiter* head = (ObjectWaiter*)_queue; + ObjectWaiter* tail = head->_prev; + assert(tail->_next == head, "invariant check"); + tail->_next = node; + head->_prev = node; + node->_next = head; + node->_prev = tail; + } +} + +inline ObjectWaiter* ObjectMonitor::dequeue() { + // dequeue the very first waiter + ObjectWaiter* waiter = (ObjectWaiter*)_queue; + if (waiter) { + dequeue2(waiter); + } + return waiter; +} + +inline void ObjectMonitor::dequeue2(ObjectWaiter* node) { + assert(node != NULL, "should not dequeue NULL node"); + assert(node->_prev != NULL, "node already removed from list"); + assert(node->_next != NULL, "node already removed from list"); + // when the waiter has woken up because of interrupt, + // timeout or other suprious wake-up, dequeue the + // waiter from waiting list + ObjectWaiter* next = node->_next; + if (next == node) { + assert(node->_prev == node, "invariant check"); + _queue = NULL; + } else { + ObjectWaiter* prev = node->_prev; + assert(prev->_next == node, "invariant check"); + assert(next->_prev == node, "invariant check"); + next->_prev = prev; + prev->_next = next; + if (_queue == node) { + _queue = next; + } + } + node->_next = NULL; + node->_prev = NULL; +} + +void ObjectMonitor::EntryQueue_insert (ObjectWaiter * node, int PrePend) { + assert(node != NULL, "should not dequeue NULL node"); + assert(node->_prev == NULL, "node already in list"); + assert(node->_next == NULL, "node already in list"); + debug_only(_mutex.verify_locked();) + if (_EntryQueue == NULL) { + _EntryQueue = node; + node->_prev = node; + node->_next = node; + } else { + ObjectWaiter* head = _EntryQueue ; + ObjectWaiter* tail = head->_prev; + assert(tail->_next == head, "invariant check"); + tail->_next = node; + head->_prev = node; + node->_next = head; + node->_prev = tail; + if (PrePend) _EntryQueue = node ; + } +} + +void ObjectMonitor::EntryQueue_unlink (ObjectWaiter* node) { + assert(node != NULL, "should not dequeue NULL node"); + assert(node->_prev != NULL, "node already removed from list"); + assert(node->_next != NULL, "node already removed from list"); + debug_only(_mutex.verify_locked();) + ObjectWaiter* next = node->_next; + if (next == node) { + assert(node->_prev == node, "invariant check"); + _EntryQueue = NULL; + } else { + ObjectWaiter* prev = node->_prev; + assert(prev->_next == node, "invariant check"); + assert(next->_prev == node, "invariant check"); + next->_prev = prev; + prev->_next = next; + if (_EntryQueue == node) { + _EntryQueue = next; + } + } + node->_next = NULL; + node->_prev = NULL; +} + +// Pick an appropriate successor ("heir presumptive") from the +// EntryQueue and unlink it. +// +// In the future we'll try to bias the selection mechanism +// to preferentially pick a thread that recently ran on +// a processor element that shares cache with the CPU on which +// the exiting thread is running. We need access to Solaris' +// schedctl.sc_cpu to make that work. + +ObjectWaiter * ObjectMonitor::EntryQueue_SelectSuccessor () { + ObjectWaiter * node ; + node = _EntryQueue ; + if (node == NULL) return NULL ; + + assert(node->_prev != NULL, "node already removed from list"); + assert(node->_next != NULL, "node already removed from list"); + ObjectWaiter* next = node->_next; + if (next == node) { + assert(node->_prev == node, "invariant check"); + _EntryQueue = NULL; + } else { + ObjectWaiter* prev = node->_prev; + assert(prev->_next == node, "invariant check"); + assert(next->_prev == node, "invariant check"); + next->_prev = prev; + prev->_next = next; + if (_EntryQueue == node) { + _EntryQueue = next; + } + } + assert (node != _EntryQueue, "invariant check") ; + node->_next = NULL; + node->_prev = NULL; + return node ; +} + +// Spin-then-block strategies ... +// +// In some circumstances it makes sense use a brief, bounded spin +// in EnterI(). We can spin (a) on initial contention only, or (b) +// in each iteration of the loop in Enter(), prior to blocking. +// +// Naive "uninformed" spinning is a horrible idea. It doesn't scale. +// There are a number of schemes we could use to rationalize spinning: +// +// a. Use informed-spinning. Apply the schedctl.sc_state & SC_ONPROC +// test to _owner. Spin +only+ if the onwer is ONPROC. Beware +// of references to schedctl blocks, however. Because of fork() issues +// the schedctl block can disappear without warning. That means we need +// to use either non-faulting loads or make the SEGV/BUS signal handler +// complicit by way of a "SafeFetchWord()" helper. In addition, the +// reader must tolerate fetches of undefined values from sc_state. +// Despite those restrictions, schedctl.sc_state is likely the best +// solution. +// +// b. We could also check the _owner's thread_state() value and +// only spin if the owner is _thread_in_Java or _thread_in_vm. +// Of course the owner might be blocked on a page-fault or +// be preempted and sitting on a ready/dispatch queue, so this +// mechanism is less informed than (a). In addition _owner is +// sometimes a BasicLock address and sometimes a Thread address, +// so we'd need to add logic to differentiate the two (or make +// the mechanism 'garbage value' tolerant if we were to fetch +// junk from _owner->_thread_state. Finally, there are lifecycle +// and liveness issues concerning the fetched _owner pointer. +// _owner might disappear while a spinning holds a pointer to it. +// Again, we could use SafeFetchWord() or non-faulting LDs to +// get around that problem. +// +// c. Periodically sample getloadavg() and spin only if the system +// is less than fully saturated. Alternately, we could mmap() +// a read-only kernel page that contained a word with the # of +// idle CPUs. (Spinning only if there are idle CPUs is overly +// conservative). Without damping this scheme could "ring" or +// oscillate - it's a feedback mechanism. +// +// d. Use reactive or adaptive spinning. Some papers suggest varying +// the spin count adaptively based on recent successful spin history. +// Instead, I've prototyped a version that uses a fixed spin count but +// varies the spin frequency using a spin-1-out-of-every-N attempts policy. +// N varies based on the rate of recent succesful spin attempts. +// Initial data showed this to be effective. (d) is likely the next +// best choice after (a). +// +// Variations: +// +// * Don't spin if there are more than N = (CPUs/2) threads +// currently spinning on the monitor. That is, limit the number +// of concurrent spinners. +// +// * If a spinning thread observes _owner change hands it should +// abort the spin and block immediately. +// +// * Avoid transitive spinning. +// +// * Use PAUSE (rep:nop) on IA32. +// +// * Classically, the spin count is either K*(CPUs-1) or is a +// simple constant that approximatees the length of a context switch. +// + +void ObjectMonitor::EnterI (TRAPS) { + static int AppendFrq = -1 ; + + if (AppendFrq < 0) { + AppendFrq = (1 << AppendRatio) - 1 ; + } + + for (;;) { + // Try the lock - TATAS + if (_owner == NULL && Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) == NULL) break ; + + // Consider spinning here ... see comments above ... + + // Enqueue "Self" on ObjectMonitor's EntryQueue + ObjectWaiter node(THREAD) ; + node.TState = ObjectWaiter::TS_ENTER ; + node._event->reset() ; + _mutex.lock () ; + if (_owner == NULL) { // optimization - not strictly necessary + _mutex.unlock() ; + continue; + } + EntryQueue_insert (&node, (++_QMix) & AppendFrq) ; + OrderAccess::fence(); // ST _EntryQ; membar #storeload; LD _owner + if (_owner == NULL) { // resample _owner + // TODO: Consider CAS() attempt to acquire lock + EntryQueue_unlink (&node); + _mutex.unlock () ; + continue ; + } + _mutex.unlock () ; + node._event->park(); // Park self + + + // CONSIDER: keep perf stats on futile wakeup counts + // Use a double-checked locking idiom on node.TState. + // (Doubled-checked locking is flawed in Java's memory + // model but is safe in this specific context). + + if (node.TState == ObjectWaiter::TS_ENTER) { + _mutex.lock (); + if (node.TState == ObjectWaiter::TS_ENTER) { + EntryQueue_unlink (&node); + } + _mutex.unlock () ; + } + if (_succ == &node) _succ = NULL ; + OrderAccess::fence() ; // Not rqrd for TSO/SPO/PO. + } + guarantee (_owner == THREAD && _succ != THREAD, "invariant violation") ; + + // The park() call above may have consumed a pending unpark() associated + // with an interrupt. Subsequent() wait() and sleep() operations need to test + // for pending async exceptions before blocking. +} + +// enter2() - contended entry + +void ObjectMonitor::enter2(TRAPS) { + guarantee (_owner != THREAD, "invariant violation") ; + assert(THREAD->is_Java_thread(), "Must be Java thread!"); + JavaThread *jt = (JavaThread *)THREAD; + + Atomic::inc_ptr(&_count); + { + // Change java thread status to indicate blocked on monitor enter. + JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this); + + if (JvmtiExport::should_post_monitor_contended_enter()) { + JvmtiExport::post_monitor_contended_enter(jt, this); + } + if (jvmpi::is_event_enabled(JVMPI_EVENT_MONITOR_CONTENDED_ENTER)) { + jvmpi::post_monitor_contended_enter_event(object()); + } + + OSThreadContendState osts(THREAD->osthread()); + ThreadBlockInVM tbivm(jt); + + bool threadIsSuspended; + THREAD->set_current_pending_monitor(this); + do { + jt->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() + + EnterI (THREAD) ; + + // were we externally suspended while we were waiting? + threadIsSuspended = jt->handle_special_suspend_equivalent_condition(); + if (threadIsSuspended) { + // + // We have acquired the contended monitor, but while we were + // waiting another thread suspended us. We don't want to enter + // the monitor while suspended because that would surprise the + // thread that suspended us. + // + _recursions = 0 ; + _succ = NULL ; + exit (THREAD) ; + jt->java_suspend_self(); + } + } while (threadIsSuspended); + THREAD->set_current_pending_monitor(NULL); + + // CONSIDER: guarantee _recursions = 0. + } + + // Thread is back in vm mode + if (JvmtiExport::should_post_monitor_contended_entered()) { + JvmtiExport::post_monitor_contended_entered(jt, this); + } + if (jvmpi::is_event_enabled(JVMPI_EVENT_MONITOR_CONTENDED_ENTERED)) { + jvmpi::post_monitor_contended_entered_event(object()); + } + + Atomic::dec_ptr(&_count); +} + + +void ObjectMonitor::enter(TRAPS) { + // TODO-FIXME: in 1.5.1 we'll want to reorder this code to avoid + // RTS->RTO upgrades on SPARC. Specifically, we'll want to change the + // ordering to: + // 1. Try CAS(). Avoid fetching _owner before the CAS(). + // 2. Test recursion + // 3. Try to convert _Owner from a basiclock-ed stack pointer to a Thread pointer. + // 4. enter2() -- contention. + + if (THREAD != _owner) { + if (THREAD->is_lock_owned ((address)_owner)) { + assert(_recursions == 0, "internal state error"); + _owner = THREAD ; + _recursions = 1 ; + return ; + } + if (Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) != NULL) { + enter2(THREAD) ; // true contention + } + // CONSIDER: it'd seem sensible to either set _recursions to 0 + // or ASSERT _recursions == 0. That logic isn't present in + // the original form, however. + } else { + _recursions++; + } + // Invariant: we never return to java-code holding _mutex. + assert (_owner == THREAD, "invariant") ; +} + +enum { SignalAfter = true } ; + +void ObjectMonitor::exit(TRAPS) { + if (THREAD != _owner) { + if (THREAD->is_lock_owned((address) _owner)) { + // Transmute _owner from a BasicLock pointer to a Thread address. + // We don't need to hold _mutex for this transition. + // Non-null to Non-null is safe as long as all readers can + // tolerate either flavor. + _owner = THREAD ; + _recursions = 0 ; + } else { + // NOTE: we need to handle unbalanced monitor enter/exit + // in native code by throwing an exception.a + // TODO: Throw an IllegalMonitorStateException ? + assert(false, "Non-balanced monitor enter/exit!"); + return; + } + } + if (_recursions != 0) { + _recursions--; // this is simple recursive enter + return ; + } + + // Contended exit ... + // Pay attention to the Dekker/Lamport duality. + // The contended exit path executes ST _owner; membar; LD _EntryQueue. + // The contended enter path executes ST _EntryQueue; membar; LD _owner. + // + // Note that there's a benign race in the exit path. We can drop the + // lock, another thread can reacquire the lock immediately, and we can + // then wake a thread unnecessarily (yet another flavor of futile wakeup). + // This is benign, and we've structured the code so the windows are short + // and the frequency of such futile wakeups is low. + + _owner = NULL ; // Drop the lock + OrderAccess::fence(); // ST _owner; membar #storeload; LD _EntryQueue and _succ + intptr_t savedcount = _count ; // probabilistic contention indication + if (_EntryQueue != NULL && _succ == NULL) { + ObjectWaiter * wakee = NULL ; + os::Bsd::Event * Trigger = NULL ; + // An interesting optimization is to use _mutex.trylock() instead + // of _mutex.lock(). If trylock() failed to acquire _mutex we know that + // either an enqueue or dequeue operation is taking place concurrently. + // In either case progess is assured so we could safely bail-out early + // from exit(). This avoid traffic on _mutex and avoids waking + // a successor. The interleavings are quite subtle and the resulting + // code would be brittle so I'm leaving this for future generations ... + _mutex.lock () ; + + // The following (_owner == NULL && _succ == NULL) test is purely + // an optimization. The mechanism would properly without the refinement. + // We can skip waking a successor if some other thread grabbed the lock + // in the interim. Succession & progress are now that thread's + // responsibility. + // + // The _succ variable is critical in reducing futile wakeup frequency. + // _succ identifies the "heir presumptive" thread that has been made + // ready (unparked) but that has not yet run. We only need one successor + // to guarantee progress. + // See http://www.usenix.org/events/jvm01/full_papers/dice/dice.pdf + // for details. + + if (_owner == NULL && _succ == NULL) { + wakee = EntryQueue_SelectSuccessor () ; + if (wakee != NULL) { + _succ = wakee ; // futile wakeup throttle + OrderAccess::fence(); // ST-ST -- Critical ordering: + // ST to _succ must be visible before ST to TState. + wakee->TState = ObjectWaiter::TS_RUN ; + Trigger = wakee->_event ; + if (!SignalAfter) { + Trigger->unpark() ; // unpark wakee + } + } + } + _mutex.unlock () ; + + // We can signal the condvar associated with the wakee either inside + // or after the critial section defined by _mutex. Signaling inside + // is free of node/Thread/Event lifecycle and liveness issues (IE, is the + // Thread/node/Event referenced by wakee still alive?) but can result + // in lock jams and futile wakeups on the mutex. If we elect to + // signal inside then the path in Enter() should be designed to avoid + // re-grabbing the mutex (and lock jams). + // + // Signaling after dropping the _mutex is more efficient but requires + // that either the ObjectWaiter, Thread, or the Event reside in TSM. + // This implementation maintains the Event in TSM - see osThread::pd_initialize(). + // Signaling a stale Event is benign. If the Event is stale then - by + // definition - the associated thread has made progress. That gives us + // the requisite progress properties. + if (SignalAfter && Trigger != NULL) { + Trigger->unpark() ; // unpark wakee + } + } + + // Exit is contended only if count had monitor enter requestors + if (savedcount > 0) { + if (jvmpi::is_event_enabled(JVMPI_EVENT_MONITOR_CONTENDED_EXIT)) { + jvmpi::post_monitor_contended_exit_event(object()); + } + } +} + +// complete_exit exits a lock returning recursion count +// complete_exit/reenter operate as a wait without waiting +// complete_exit requires inflated monitor +intptr_t ObjectMonitor::complete_exit(TRAPS) { + Thread * const Self = THREAD; + assert(Self->is_Java_thread(), "Must be Java thread!"); + JavaThread *jt = (JavaThread *)THREAD; + + /* CHECK_OWNER, but can't handle thrown exception here */ + if (THREAD != _owner) { + if (THREAD->is_lock_owned ((address)_owner)) { + assert(_recursions == 0, "internal state error"); + _owner = THREAD ; /* Convert from basiclock addr to Thread addr */ + _recursions = 0 ; + } + } + + guarantee(Self == _owner, "complete_exit not owner"); + intptr_t save = _recursions; // record the old recursion count + _recursions = 0; // set the recursion level to be 0 + exit (Self) ; // exit the monitor + guarantee (_owner != Self, "invariant"); + return save; +} + +// reenter() enters a lock and sets recursion count +// complete_exit/reenter operate as a wait without waiting +void ObjectMonitor::reenter(intptr_t recursions, TRAPS) { + Thread * const Self = THREAD; + assert(Self->is_Java_thread(), "Must be Java thread!"); + JavaThread *jt = (JavaThread *)THREAD; + + guarantee(_owner != Self, "reenter already owner"); + enter (THREAD); // enter the monitor + guarantee (_recursions == 0, "reenter recursion"); + _recursions = recursions; + return; +} + +void ObjectMonitor::wait(jlong millis, bool interruptible, TRAPS) { + assert(THREAD->is_Java_thread(), "Must be Java thread!"); + JavaThread *jt = (JavaThread *)THREAD; + + CHECK_OWNER(); + // check interrupt event + if (interruptible && Thread::is_interrupted(THREAD, true) && !HAS_PENDING_EXCEPTION) { + THROW(vmSymbols::java_lang_InterruptedException()); + } + + jt->set_current_waiting_monitor(this); + + // create a node to be put into the queue + ObjectWaiter node(THREAD); + node.TState = ObjectWaiter::TS_WAIT ; + node._event->reset(); + OrderAccess::fence(); // ST into Event; membar ; LD interrupted-flag + + // enter the waiting queue, which is a circular doubly linked list in this case + // how it could be a priority queue, or any data structure + _mutex.lock () ; + enqueue(&node); + // Implicit membar here ... we can avoid the real thing + // as Solaris sync primitives provide barrier-equivalent semantics with + // at least release consistency (RC). + _mutex.unlock () ; + + if (jvmpi::is_event_enabled(JVMPI_EVENT_MONITOR_WAIT)) { + jvmpi::post_monitor_wait_event((oop)object(), millis); + } + jlong start_wait; + if (jvmpi::is_event_enabled(JVMPI_EVENT_MONITOR_WAITED)) { + start_wait = os::javaTimeNanos(); + } + + intptr_t save = _recursions; // record the old recursion count + _waiters++; // increment the number of waiters + _recursions = 0; // set the recursion level to be 1 + exit (THREAD) ; // exit the monitor + + // As soon as the ObjectMonitor's ownership is dropped in the exit() + // call above, another thread can enter() the ObjectMonitor, do the + // notify(), and exit() the ObjectMonitor. If the other thread's + // exit() call chooses this thread as the successor and the unpark() + // call happens to occur while this thread is posting a + // MONITOR_CONTENDED_EXIT event, then we run the risk of the event + // handler using RawMonitors and consuming the unpark(). + // + // To avoid the problem, we re-post the event. This does no harm + // even if the original unpark() was not consumed because we are the + // chosen successor for this monitor. + if (node._notified == 1 && _succ == &node) { + node._event->unpark(); + } + + int ret = OS_OK ; + int WasNotified ; + + { + OSThread* osthread = THREAD->osthread(); + OSThreadWaitState osts(osthread, true /* is Object.wait() */); + { + // external suspend retry for this ThreadBlockInVM is in raw_enter() + ThreadBlockInVM tbivm(jt); + // Thread is in thread_blocked state and oop access is unsafe in this block. + jt->set_suspend_equivalent(); + + if (interruptible && (Thread::is_interrupted(THREAD, false) || HAS_PENDING_EXCEPTION)) { + // Intentionally empty + } else { + if (millis <= 0) { + node._event->park(); + } else { + ret = node._event->park(millis); + } + } + + // TODO: in the future it makes sense to use double-checked + // locking to avoid grabbing _mutex if the current thread + // is on neither the EntryQueue nor the _queue (wait queue). + // We can fetch node.TState and grab _mutex IFF TState is + // not TS_RUN. + + _mutex.lock () ; + if (_succ == &node) _succ = NULL ; + WasNotified = node._notified ; + if (node.TState == ObjectWaiter::TS_WAIT) { + dequeue2 (&node); // unlink from WaitQueue + } else + if (node.TState == ObjectWaiter::TS_ENTER) { + EntryQueue_unlink (&node) ; // unlink from EntryQueue + } else { + guarantee (node.TState == ObjectWaiter::TS_RUN, "invariant violation") ; + } + _mutex.unlock () ; + + // were we externally suspended while we were waiting? + if (jt->handle_special_suspend_equivalent_condition()) { + jt->java_suspend_self(); + } + } // End thread_blocked and thread in vm. + + // Reentry phase -- reacquire the monitor. + // TODO: refactor enter(), enter2(), EnterI(), exit() and the various + // specialized inline copies of enter() and exit(). + // retain OBJECT_WAIT state until re-enter successfully completes + + // Thread state is thread_in_vm and oop access is safe. + // re-enter contended monitor after object.wait(). + + // post monitor waited event. Note that this is past-tense, we are done waiting. + if (JvmtiExport::should_post_monitor_waited()) { + JvmtiExport::post_monitor_waited(jt, this, (ret == OS_TIMEOUT)?true:false); + } + + // Change java thread status to indicate blocked on monitor re-enter. + JavaThreadBlockedOnMonitorEnterState jtbmes(jt, this); + { + ThreadBlockInVM tbivm(jt); + // Thread is in thread_blocked state and oop access is unsafe in this block. + + bool threadIsSuspended ; + do { + jt->set_suspend_equivalent(); + EnterI (THREAD) ; + + threadIsSuspended = jt->handle_special_suspend_equivalent_condition(); + if (threadIsSuspended) { + // We have reentered the contended monitor, but while we were + // waiting another thread suspended us. We don't want to reenter + // the monitor while suspended because that would surprise the + // thread that suspended us. + + // Drop the lock - + ObjectWaiter * wakee = NULL ; + _owner = NULL ; + _mutex.lock (); + _succ = NULL ; + wakee = EntryQueue_SelectSuccessor () ; + if (wakee != NULL) { + wakee->TState = ObjectWaiter::TS_RUN ; + wakee->_event->unpark() ; // unpark wakee + } + _mutex.unlock(); + + jt->java_suspend_self(); + } + } while (threadIsSuspended); + } // End thread_blocked, thread no thread_in_vm + } // End OSThreadWaitState. + + jt->set_current_waiting_monitor(NULL); + + if (jvmpi::is_event_enabled(JVMPI_EVENT_MONITOR_WAITED)) { + jlong end_wait = os::javaTimeNanos(); + jvmpi::post_monitor_waited_event((oop)object(), (end_wait - start_wait)/1000000L); + } + _recursions = save; // restore the old recursion count + _waiters--; // decrement the number of waiters + + // NOTE: this line must be here, because a notification + // may be right after the timeout, but before re-enter + // so the event may still be in signalled state + node._event->reset(); + + // check if the notification happened + if (!WasNotified) { + // no, it could be timeout or Thread.interrupt() or both + // check for interrupt event, otherwise it is timeout + if (interruptible && Thread::is_interrupted(THREAD, true) && !HAS_PENDING_EXCEPTION) { + THROW(vmSymbols::java_lang_InterruptedException()); + } + } + + // NOTE: Spurious wake up will be consider as timeout. + // Monitor notify has precedence over thread interrupt. +} + + +void ObjectMonitor::notify(TRAPS) { + CHECK_OWNER(); + ObjectWaiter* iterator; + if (_queue == NULL) return ; + _mutex.lock () ; + if ((iterator = dequeue()) != NULL) { + guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant violation") ; + EntryQueue_insert (iterator, 0) ; + iterator->TState = ObjectWaiter::TS_ENTER ; + iterator->_notified = 1 ; + } + _mutex.unlock () ; +} + +void ObjectMonitor::notifyAll(TRAPS) { + CHECK_OWNER(); + ObjectWaiter* iterator; + if (_queue == NULL) return ; + _mutex.lock() ; + while ((iterator = dequeue()) != NULL) { + guarantee (iterator->TState == ObjectWaiter::TS_WAIT, "invariant violation") ; + EntryQueue_insert (iterator, 0) ; + iterator->TState = ObjectWaiter::TS_ENTER ; + iterator->_notified = 1 ; + } + _mutex.unlock () ; +} + +// Used mainly for JVMTI, JVMPI raw monitor implementation +// Also used for ObjectMonitor::wait(). +// Any JavaThread will enter here with state _thread_blocked +int ObjectMonitor::raw_enter(TRAPS, bool isRawMonitor) { + void * Contended ; + + // don't enter raw monitor if thread is being externally suspended, it will + // surprise the suspender if a "suspended" thread can still enter monitor + JavaThread * jt = (JavaThread *)THREAD; + if (THREAD->is_Java_thread()) { + jt->SR_lock()->lock_without_safepoint_check(); + while (jt->is_external_suspend()) { + jt->SR_lock()->unlock(); + jt->java_suspend_self(); + jt->SR_lock()->lock_without_safepoint_check(); + } + // guarded by SR_lock to avoid racing with new external suspend requests. + Contended = Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) ; + jt->SR_lock()->unlock(); + } else { + Contended = Atomic::cmpxchg_ptr (THREAD, &_owner, NULL) ; + } + + if (Contended == THREAD) { + _recursions ++ ; + } else + if (Contended == NULL) { + guarantee (_owner == THREAD, "invariant") ; + } else { + // true contention ... + // It might be easier to call enter2() directly ... + if (isRawMonitor) { + Atomic::inc_ptr(&_count); + if (jvmpi::is_event_enabled(JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTER)) { + jvmpi::post_raw_monitor_contended_enter_event((RawMonitor *)this); + } + } + + bool threadIsSuspended; + THREAD->set_current_pending_monitor(this); + if (!THREAD->is_Java_thread()) { + // No other non-Java threads besides VM thread would acquire + // a raw monitor. + assert(THREAD->is_VM_thread(), "must be VM thread"); + EnterI (THREAD) ; + } else { + do { + jt->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or + // java_suspend_self() + EnterI (THREAD) ; + + // were we externally suspended while we were waiting? + threadIsSuspended = jt->handle_special_suspend_equivalent_condition(); + if (threadIsSuspended) { + // + // This logic isn't needed for JVMTI or JVM/PI raw monitors, + // but doesn't hurt just in case the suspend rules change. This + // logic is needed for the ObjectMonitor.wait() reentry phase. + // We have reentered the contended monitor, but while we were + // waiting another thread suspended us. We don't want to reenter + // the monitor while suspended because that would surprise the + // thread that suspended us. + // + + // Drop the lock - + ObjectWaiter * wakee = NULL ; + _owner = NULL ; + _mutex.lock (); + _succ = NULL ; + wakee = EntryQueue_SelectSuccessor () ; + if (wakee != NULL) { + wakee->TState = ObjectWaiter::TS_RUN ; + wakee->_event->unpark() ; // unpark wakee + } + _mutex.unlock(); + + jt->java_suspend_self(); + } + } while (threadIsSuspended); + } + THREAD->set_current_pending_monitor(NULL); + + assert(_owner == THREAD, "Fatal error with monitor owner!"); + assert(_recursions == 0, "Fatal error with monitor recursions!"); + if (isRawMonitor) { + if (jvmpi::is_event_enabled(JVMPI_EVENT_RAW_MONITOR_CONTENDED_ENTERED)) { + jvmpi::post_raw_monitor_contended_entered_event((RawMonitor *)this); + } + Atomic::dec_ptr(&_count); + } + } + + if (isRawMonitor) { + if (_recursions == 0) { + ((RawMonitor *)this)->add_to_locked_list(); + } + } + return OM_OK; +} + +// Used mainly for JVMTI, JVMPI raw monitor implementation +// Also used for ObjectMonitor::wait(). +int ObjectMonitor::raw_exit(TRAPS, bool isRawMonitor) { + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + if (_recursions == 0) { + if (isRawMonitor) { + ((RawMonitor *)this)->remove_from_locked_list(); + } + + // What follows is a slightly simplified form of + // ObjectMonitor::exit(). We avoid the optimizations in + // exit() as debuggers often embody odd & undocumented + // dependencies on the behaviour of the synchronization + // primitives. (Better to be conservative). + intptr_t savedcount = _count; + ObjectWaiter * wakee = NULL ; + _owner = NULL ; + _mutex.lock (); + _succ = NULL ; + wakee = EntryQueue_SelectSuccessor () ; + if (wakee != NULL) { + wakee->TState = ObjectWaiter::TS_RUN ; + wakee->_event->unpark() ; // unpark wakee + } + _mutex.unlock(); + + if (isRawMonitor) { + if (savedcount > 0) { + if (jvmpi::is_event_enabled(JVMPI_EVENT_RAW_MONITOR_CONTENDED_EXIT)) { + jvmpi::post_raw_monitor_contended_exit_event((RawMonitor*)this); + } + } + } + } else { + _recursions--; + } + return OM_OK; +} + +// Used for JVMTI, JVMPI raw monitor implementation. +// All JavaThreads will enter here with state _thread_blocked +int ObjectMonitor::raw_wait(jlong millis, bool interruptible, TRAPS) { + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + // check interrupt event + if (interruptible && Thread::is_interrupted(THREAD, true)) { + return OM_INTERRUPTED; + } + // create a node to be put into the queue + ObjectWaiter node(THREAD); + node.TState = ObjectWaiter::TS_WAIT ; + // enter the waiting queue, which is a circular doubly linked list in this case + // how it could be a priority queue, or any data structure + _mutex.lock (); + enqueue(&node); + _mutex.unlock () ; + + intptr_t save = _recursions; // record the old recursion count + _waiters++; // increment the number of waiters + _recursions = 0; // set the recursion level to be 1 + + if (THREAD->is_Java_thread()) { + ((JavaThread *)THREAD)->set_suspend_equivalent(); + } + int ret = OS_OK ; + raw_exit(THREAD, false); // exit the monitor + + if (millis <= 0) { + node._event->park(); + } else { + ret = node._event->park(millis); + } + + _mutex.lock () ; + int WasNotified = node._notified ; + if (node.TState == ObjectWaiter::TS_WAIT) { + dequeue2 (&node); // unlink from WaitQueue + } else + if (node.TState == ObjectWaiter::TS_ENTER) { + EntryQueue_unlink (&node) ; // unlink from EntryQueue + } else { + guarantee (node.TState == ObjectWaiter::TS_RUN, "invariant violation") ; + } + if (_succ == &node) _succ = NULL ; + _mutex.unlock () ; + + // were we externally suspended while we were waiting? + if (THREAD->is_Java_thread() && + ((JavaThread *)THREAD)->handle_special_suspend_equivalent_condition()) { + // + // If we were suspended while we were waiting in park() above, + // then we don't want to re-enter the monitor while suspended + // because that would surprise the thread that suspended us. + // The raw_enter() call below handles the contended monitor + // case. However, if the thread that notified us has already + // released the monitor, then we may complete the raw_enter() + // without contention and without self-suspending. + // + ((JavaThread *)THREAD)->java_suspend_self(); + } + + raw_enter(THREAD, false); // re-enter the monitor + _recursions = save; // restore the old recursion count + _waiters--; // decrement the number of waiters + + // NOTE: this line must be here, because a notification + // may be right after the timeout, but before re-enter + // so the event may still be in signed state + node._event->reset(); + // check if the notification happened + if (!WasNotified) { + // no, it could be timeout or Thread.interrupt() or both + // check for interrupt event, otherwise it is timeout + if (interruptible && Thread::is_interrupted(THREAD, true)) { + return OM_INTERRUPTED; + } + } + // NOTES: Suprious wake up will be consider as timeout. + // Monitor notify has precedence over thread interrupt. + return OM_OK; +} + +int ObjectMonitor::raw_notify(TRAPS) { + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + notify (THREAD) ; + return OM_OK; +} + +int ObjectMonitor::raw_notifyAll(TRAPS) { + if (THREAD != _owner) { + return OM_ILLEGAL_MONITOR_STATE; + } + notifyAll (THREAD); + return OM_OK; +} + +// %%% should move this to objectMonitor.cpp +void ObjectMonitor::check_slow(TRAPS) { + // called only from check() (NOTE: unused in this implementation) + assert(THREAD != _owner && !THREAD->is_lock_owned((address) _owner), "must not be owner"); + THROW_MSG(vmSymbols::java_lang_IllegalMonitorStateException(), "current thread not owner"); +} + +#ifndef PRODUCT +void ObjectMonitor::verify() { +} + +void ObjectMonitor::print() { +} +#endif diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/objectMonitor_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/objectMonitor_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/objectMonitor_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/objectMonitor_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,32 @@ +/* + * $Id: objectMonitor_bsd.hpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + + private: + + void enter2(TRAPS); + void enqueue(ObjectWaiter* waiter); + ObjectWaiter* dequeue(); + void dequeue2(ObjectWaiter* waiter); + void EntryQueue_unlink (ObjectWaiter* node) ; + void EntryQueue_insert (ObjectWaiter * node, int PrePend) ; + ObjectWaiter * EntryQueue_SelectSuccessor () ; + void EnterI (TRAPS) ; + + public: + intptr_t contentions() const; + ObjectWaiter* first_waiter(); + ObjectWaiter* next_waiter(ObjectWaiter* o); + Thread* thread_of_waiter(ObjectWaiter* o); + void Recycle() ; + + private: + os::Bsd::OSMutex _mutex; // platform specific mutex + ObjectWaiter * volatile _EntryQueue ; + void * volatile _succ ; // Heir presumptive for wakeup throttling + int _QMix ; // mostly prepend queue discipline + diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/objectMonitor_bsd.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/objectMonitor_bsd.inline.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/objectMonitor_bsd.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/objectMonitor_bsd.inline.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,18 @@ +/* + * $Id: objectMonitor_bsd.inline.hpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// return number of threads contending for this monitor +inline intptr_t ObjectMonitor::contentions() const { + return _count; +} + +inline void ObjectMonitor::set_owner(void* owner) { + _owner = owner; + _recursions = 0; + _count = 0; +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/osThread_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/osThread_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/osThread_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/osThread_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,241 @@ +/* + * $Id: osThread_bsd.cpp,v 1.4 2005/09/25 03:50:16 christos Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// XXXBSD: I am not sure about correctness of replacement *lwp* with +// pthread* functions + +// do not include precompiled header file +# include "incls/_osThread_bsd.cpp.incl" +# include + +// Events associated with threads via "interrupt_event" must +// reside in a TSM (type-stable memory) pool. See objectMonitor_solaris.cpp:exit(). +// The relationship between the interrupt_event and a thread +// must be stable for the lifetime of the thread. +// +// A slightly better implementation would be to subclass Event +// with a "TSMEvent" that added the FreeNext field. + +static os::Bsd::Event *EventFreeList = NULL; +static pthread_mutex_t EventFreeLock = PTHREAD_MUTEX_INITIALIZER; + + // *************************************************************** + // Platform dependent initialization and cleanup + // *************************************************************** + +void OSThread::pd_initialize() { + _thread_id = 0; + sigemptyset(&_caller_sigmask); + + _current_callback = NULL; + _current_callback_lock = NULL; + + _saved_interrupt_thread_state = _thread_new; + + // Try to allocate an Event from the global free list otherwise "new". + pthread_mutex_lock(&EventFreeLock); + os::Bsd::Event *ie = EventFreeList; + if (ie != NULL) { + EventFreeList = ie->FreeNext; + ie->reset(); + } + pthread_mutex_unlock(&EventFreeLock); + if (ie == NULL) { + ie = new os::Bsd::Event(); + } + ie->FreeNext = (os::Bsd::Event *) 0xBAD; + ie->Immortal = 1; + _interrupt_event = ie; + + assert(_interrupt_event != NULL, "check"); + _vm_created_thread = false; +} + +void OSThread::pd_destroy() { + // Transfer the Event referenced by _interrupt_event to the + // global free list. It's now immortal. + os::Bsd::Event * ie = _interrupt_event; + guarantee (ie != NULL, "invariant"); + guarantee (ie->Immortal, "invariant"); + _interrupt_event = NULL; + pthread_mutex_lock(&EventFreeLock); + ie->FreeNext = EventFreeList; + EventFreeList = ie; + pthread_mutex_unlock(&EventFreeLock); +} + +// Synchronous interrupt support +// +// _current_callback == NULL no pending callback +// == 1 callback_in_progress +// == other value pointer to the pending callback +// + +// CAS on v8 is implemented by using a global atomic_memory_operation_lock, +// which is shared by other atomic functions. It is OK for normal uses, but +// dangerous if used after some thread is suspended or if used in signal +// handlers. Instead here we use a special per-thread lock to synchronize +// updating _current_callback if we are running on v8. Note in general trying +// to grab locks after a thread is suspended is not safe, but it is safe for +// updating _current_callback, because synchronous interrupt callbacks are +// currently only used in: +// 1. SetThreadPC_Callback - used by VM thread to change a JavaThread's PC +// 2. GetThreadPC_Callback - used by WatcherThread to profile VM thread +// There is no overlap between the callbacks, which means we won't try to +// grab a thread's sync lock after the thread has been suspended while holding +// the same lock. + +// used after a thread is suspended +static intptr_t compare_and_exchange_current_callback ( + intptr_t callback, intptr_t *addr, intptr_t compare_value, Mutex *sync) { + return Atomic::cmpxchg_ptr(callback, addr, compare_value); +} + +// used in signal handler +static intptr_t exchange_current_callback(intptr_t callback, intptr_t *addr, Mutex *sync) { + return Atomic::xchg_ptr(callback, addr); +} + +// one interrupt at a time. spin if _current_callback != NULL +int OSThread::set_interrupt_callback(Sync_Interrupt_Callback * cb) { + int count = 0; + while (compare_and_exchange_current_callback( + (intptr_t)cb, (intptr_t *)&_current_callback, (intptr_t)NULL, _current_callback_lock) != NULL) { + while (_current_callback != NULL) { + count++; +#ifdef ASSERT + if ((WarnOnStalledSpinLock > 0) && + (count % WarnOnStalledSpinLock == 0)) { + warning("_current_callback seems to be stalled: %p", _current_callback); + } +#endif + os::yield_all(count); + } + } + return 0; +} + +// reset _current_callback, spin if _current_callback is callback_in_progress +void OSThread::remove_interrupt_callback(Sync_Interrupt_Callback * cb) { + int count = 0; + while (compare_and_exchange_current_callback( + (intptr_t)NULL, (intptr_t *)&_current_callback, (intptr_t)cb, _current_callback_lock) != (intptr_t)cb) { +#ifdef ASSERT + intptr_t p = (intptr_t)_current_callback; + assert(p == (intptr_t)callback_in_progress || + p == (intptr_t)cb, "wrong _current_callback value"); +#endif + while (_current_callback != cb) { + count++; +#ifdef ASSERT + if ((WarnOnStalledSpinLock > 0) && + (count % WarnOnStalledSpinLock == 0)) { + warning("_current_callback seems to be stalled: %p", _current_callback); + } +#endif + os::yield_all(count); + } + } +} + +void OSThread::do_interrupt_callbacks_at_interrupt(InterruptArguments *args) { + Sync_Interrupt_Callback * cb; + cb = (Sync_Interrupt_Callback *)exchange_current_callback( + (intptr_t)callback_in_progress, (intptr_t *)&_current_callback, _current_callback_lock); + + if (cb == NULL) { + // signal is delivered too late (thread is masking interrupt signal??). + // there is nothing we need to do because requesting thread has given up. + } else if ((intptr_t)cb == (intptr_t)callback_in_progress) { + fatal("invalid _current_callback state"); + } else { + assert(cb->target()->osthread() == this, "wrong target"); + cb->execute(args); + cb->leave_callback(); // notify the requester + } + + // restore original _current_callback value + intptr_t p; + p = exchange_current_callback((intptr_t)cb, (intptr_t *)&_current_callback, _current_callback_lock); + assert(p == (intptr_t)callback_in_progress, "just checking"); +} + +// Called by the requesting thread to send a signal to target thread and +// execute "this" callback from the signal handler. If target thread is +// suspended, we will first resume the thread to deliver the signal. +int OSThread::Sync_Interrupt_Callback::interrupt(Thread * target, + bool target_is_suspended, int timeout) { + // Let signals to the vm_thread go even if the Threads_lock is not aquired + assert(Threads_lock->owned_by_self() || (target == VMThread::vm_thread()), + "must have threads lock to call this"); + + OSThread * osthread = target->osthread(); + + // may block if target thread already has a pending callback + osthread->set_interrupt_callback(this); + + _target = target; + + int rslt = pthread_kill(osthread->thread_id(), os::Bsd::SIGasync()); + assert(rslt == 0, "pthread_kill != 0"); + + if (target_is_suspended) { + // if target thread is suspended, we need to resume it so the signal + // can be delivered - only used by set_thread_pc_and_resume() + assert(target->is_vm_suspended(), "target thread not suspended"); + target->vm_resume(); + } + + bool status = false; + jlong t1 = os::javaTimeMillis(); + { // don't use safepoint check because we might be the watcher thread. + MutexLockerEx ml(_sync, Mutex::_no_safepoint_check_flag); + while (!is_done()) { + status = _sync->wait(Mutex::_no_safepoint_check_flag, timeout); + + // status == true if timed out + if (status) break; + + // update timeout + jlong t2 = os::javaTimeMillis(); + timeout -= t2 - t1; + t1 = t2; + } + } + + // reset current_callback + osthread->remove_interrupt_callback(this); + + return status; +} + +void OSThread::Sync_Interrupt_Callback::leave_callback() { + if (!_sync->owned_by_self()) { + // notify requesting thread + MutexLockerEx ml(_sync, Mutex::_no_safepoint_check_flag); + _is_done = true; + _sync->notify_all(); + } else { + // Current thread is interrupted while it is holding the _sync lock, trying + // to grab it again will deadlock. The requester will timeout anyway, + // so just return. + _is_done = true; + } +} + +// copied from synchronizer.cpp + +void OSThread::handle_spinlock_contention(int tries) { + if (NoYieldsInMicrolock) return; + + if (tries > 10) { + os::yield_all(tries); // Yield to threads of any priority + } else if (tries > 5) { + os::yield(); // Yield to threads of same or higher priority + } +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/osThread_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/osThread_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/osThread_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/osThread_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,134 @@ +/* + * $Id: osThread_bsd.hpp,v 1.3 2007/01/15 04:55:02 christos Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// This is embedded via include into the class OSThread + + private: + + pthread_t _thread_id; // Solaris thread id + sigset_t _caller_sigmask; // Caller's signal mask + bool _vm_created_thread; // true if the VM create this thread + // false if primary thread or attached thread + public: + + pthread_t thread_id() const { return _thread_id; } + + // Set and get state of _vm_created_thread flag + void set_vm_created() { _vm_created_thread = true; } + bool is_vm_created() { return _vm_created_thread; } + + // Methods to save/restore caller's signal mask + sigset_t caller_sigmask() const { return _caller_sigmask; } + void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; } + +#ifndef PRODUCT + // Used for debugging, return a unique integer for each thread. + int thread_identifier() const { return (int)_thread_id; } +#endif +#ifdef ASSERT + // On solaris reposition can fail in two ways: + // 1: a mismatched pc, because signal is delivered too late, target thread + // is resumed. + // 2: on a timeout where signal is lost, target thread is resumed. + bool valid_reposition_failure() { + // only 1 and 2 can happen and we can handle both of them + return true; + } +#endif + void set_thread_id(pthread_t id) { _thread_id = id; } + + // *************************************************************** + // interrupt support. interrupts (using signals) are used to get + // the thread context (get_thread_pc), to set the thread context + // (set_thread_pc), and to implement java.lang.Thread.interrupt. + // *************************************************************** + + public: + + class InterruptArguments : StackObj { + private: + Thread* _thread; // the thread to signal was dispatched to + ucontext_t* _ucontext; // the machine context at the time of the signal + + public: + InterruptArguments(Thread* thread, ucontext_t* ucontext) { + _thread = thread; + _ucontext = ucontext; + } + + Thread* thread() const { return _thread; } + ucontext_t* ucontext() const { return _ucontext; } + }; + + // There are currently no asynchronous callbacks - and we'd better not + // support them in the future either, as they need to be deallocated from + // the interrupt handler, which is not safe; they also require locks to + // protect the callback queue. + + class Sync_Interrupt_Callback : private StackObj { + protected: + volatile bool _is_done; + Monitor* _sync; + Thread* _target; + public: + Sync_Interrupt_Callback(Monitor * sync) { + _is_done = false; _target = NULL; _sync = sync; + } + + bool is_done() const { return _is_done; } + Thread* target() const { return _target; } + + int interrupt(Thread * target, bool target_is_suspended, int timeout); + + // override to implement the callback. + virtual void execute(InterruptArguments *args) = 0; + + void leave_callback(); + }; + + private: + + Sync_Interrupt_Callback * volatile _current_callback; + enum { + callback_in_progress = 1 + }; + Mutex * _current_callback_lock; // only used on v8 + + public: + + int set_interrupt_callback (Sync_Interrupt_Callback * cb); + void remove_interrupt_callback(Sync_Interrupt_Callback * cb); + void do_interrupt_callbacks_at_interrupt(InterruptArguments *args); + + // *************************************************************** + // java.lang.Thread.interrupt state. + // *************************************************************** + + private: + + os::Bsd::Event* _interrupt_event; + JavaThreadState _saved_interrupt_thread_state; // the thread state before a system call -- restored afterward + + public: + + os::Bsd::Event* interrupt_event() const { return _interrupt_event; } + void set_interrupt_event(os::Bsd::Event* ptr) { _interrupt_event = ptr; } + + JavaThreadState saved_interrupt_thread_state() { return _saved_interrupt_thread_state; } + void set_saved_interrupt_thread_state(JavaThreadState state) { _saved_interrupt_thread_state = state; } + + static void handle_spinlock_contention(int tries); // Used for thread local eden locking + + // *************************************************************** + // Platform dependent initialization and cleanup + // *************************************************************** + +private: + + void pd_initialize(); + void pd_destroy(); diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_bsd.cpp 2007-02-24 09:40:30.000000000 +0100 @@ -0,0 +1,3361 @@ +// XXXBSD: double check of semantics of mmap() and family +// XXXBSD: understand meaning and workaround related to yield + +/* + * $Id: os_bsd.cpp,v 1.19 2007/01/19 17:07:43 truk Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// do not include precompiled header file +# include "incls/_os_bsd.cpp.incl" + +// put OS-includes here +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +#if defined(__FreeBSD__) || defined(__OpenBSD__) +# include +# include +#endif +#if defined(__NetBSD__) +# include +# include +# include +# define pthread_yield() sched_yield() +# define pthread_getprio(a) 0 +# define pthread_setprio(a, b) 0 +# define pthread_main_np() 0 +#endif + +#ifndef timespecsub +#define timespecsub(tsp, usp, vsp) \ + do { \ + (vsp)->tv_sec = (tsp)->tv_sec - (usp)->tv_sec; \ + (vsp)->tv_nsec = (tsp)->tv_nsec - (usp)->tv_nsec; \ + if ((vsp)->tv_nsec < 0) { \ + (vsp)->tv_sec--; \ + (vsp)->tv_nsec += 1000000000L; \ + } \ + } while (0) +#endif + +#define MAX_PATH (1 * K) + +// for timer info max values which include all bits +#define ALL_64_BITS CONST64(0xFFFFFFFFFFFFFFFF) + +// see thr_setprio(3T) for the basis of these numbers +#define MinimumPriority 0 +#define NormalPriority 64 +#define MaximumPriority 127 + +// Values for ThreadPriorityPolicy == 1 +int prio_policy1[MaxPriority+1] = { -99999, 0, 16, 32, 48, 64, + 80, 96, 112, 124, 127 }; + +// Thread Local Storage +// This is common to all Solaris platforms so it is defined here, +// in this common file. +// The declarations are in the os_cpu threadLS*.hpp files. +// +// Static member initialization for TLS +Thread* ThreadLocalStorage::_get_thread_cache[ThreadLocalStorage::_pd_cache_size] = {NULL}; + +#ifndef PRODUCT +#define _PCT(n,d) ((100.0*(double)(n))/(double)(d)) + +int ThreadLocalStorage::_tcacheHit = 0; +int ThreadLocalStorage::_tcacheMiss = 0; + +void ThreadLocalStorage::print_statistics() { + int total = _tcacheMiss+_tcacheHit; + tty->print_cr("Thread cache hits %d misses %d total %d percent %f\n", + _tcacheHit, _tcacheMiss, total, _PCT(_tcacheHit, total)); +} +#undef _PCT +#endif // PRODUCT + + +// XXXBSD: ??? +Thread* ThreadLocalStorage::get_thread_via_cache_slowly(uintptr_t raw_id, + int index) { + Thread *thread = get_thread_slow(); + + if (thread != NULL) { + address sp = os::current_stack_pointer(); + guarantee(thread->_stack_base == NULL || + (sp <= thread->_stack_base && + sp >= thread->_stack_base - thread->_stack_size) || + is_error_reported(), + "sp must be inside of selected thread stack"); + + thread->_self_raw_id = raw_id; // mark for quick retrieval + _get_thread_cache[ index ] = thread; + } + return thread; +} + + +static const double all_zero[ sizeof(Thread) / sizeof(double) + 1 ] = {0}; +#define NO_CACHED_THREAD ((Thread*)all_zero) + +void ThreadLocalStorage::pd_set_thread(Thread* thread) { + +#ifdef ASSERT + Thread* old_thread = get_thread_slow(); + if (thread == NULL) { + // delete not_current_thread cannot clear the TLS so catch this case + assert(old_thread == Thread::current(), "caller must be current thread"); + } + // implied else: + // We cannot assert(old_thread == NULL, ...) because we might be + // initializing a recycled thread from the thread library. If the + // recycled thread was once a Thread, then the assert() is okay. + // However, if it was previously an internal thread library thread, + // then there is no guarantee what the old_thread value might be. + // + // We cannot assert() that the caller is the current thread on + // this initial set because we have not yet defined the current + // thread value in thread local storage. +#endif + + uintptr_t raw = pd_raw_thread_id(); + int ix = pd_cache_index(raw); + + if (thread != NULL) { + // first make sure that nobody gets a cache collision pointing to + // this thread by updating its raw id + thread->_self_raw_id = raw; + + // Store the new value before updating the cache to prevent a race + // between get_thread_via_cache_slowly() and this store operation. + os::thread_local_storage_at_put(ThreadLocalStorage::thread_index(), thread); + + // Update thread cache with new thread if setting on thread create + _get_thread_cache[ix] = thread; + } else { + // deleting current thread, must get old value first + Thread* was_thread = Thread::current(); + + // first make sure that nobody gets a cache collision pointing to + // the old thread data (soon to be free'd) by updating the raw id + was_thread->_self_raw_id = raw; + + // again, update the "real" value first: + os::thread_local_storage_at_put(ThreadLocalStorage::thread_index(), thread); + + // then invalidate all cache elements that pointed to this thread + // by setting them to NO_CACHED_THREAD (zeroed thread) + for (int ix = 0; ix < _pd_cache_size; ++ix) { + if (_get_thread_cache[ix] == was_thread) { + _get_thread_cache[ix] = NO_CACHED_THREAD; + } + } + } +} + +void ThreadLocalStorage::pd_init() { + for (int i = 0; i < _pd_cache_size; i++) { + _get_thread_cache[i] = NO_CACHED_THREAD; + } +} + +// Invalidate all the caches (happens to be the same as pd_init). +void ThreadLocalStorage::pd_invalidate_all() { pd_init(); } + +#undef NO_CACHED_THREAD + +// END Thread Local Storage + +#if SOLARIS +static inline size_t adjust_stack_size(address base, size_t size) { + if ((ssize_t)size < 0) { + // 4759953: Compensate for ridiculous stack size. + size = max_intx; + } + if (size > (size_t)base) { + // 4812466: Make sure size doesn't allow the stack to wrap the address space. + size = (size_t)base; + } + return size; +} +#endif + +address os::current_stack_base() { +#ifdef __OpenBSD__ + stack_t ss; + if (pthread_stackseg_np(pthread_self(), &ss)) + goto err; + return (address) ss.ss_sp; +#else + uintptr_t addr = NULL; + pthread_attr_t attr; + void *mystack = NULL; + size_t mysize = 0; + + if (pthread_attr_init(&attr) == 0) { + if (pthread_attr_get_np(pthread_self(), &attr) != 0) + goto err; + if (pthread_attr_getstackaddr(&attr, &mystack) != 0) + goto err; + if (pthread_attr_getstacksize(&attr, &mysize) != 0) + goto err; + + addr = (uintptr_t) mystack + mysize; + pthread_attr_destroy(&attr); + + return (address) addr; + } +#endif + +err: + fatal("Unable to get current thread stack base pointer"); + +} + +size_t os::current_stack_size() { +#ifdef __OpenBSD__ + stack_t ss; + if (!pthread_stackseg_np(pthread_self(), &ss)) + return ss.ss_size; +#else + pthread_attr_t attr; + size_t sizep = 0; + + if (pthread_attr_init(&attr) == 0) { + if (pthread_attr_get_np(pthread_self(), &attr) == 0) { + pthread_attr_getstacksize(&attr, &sizep); + } + pthread_attr_destroy(&attr); + return sizep; + } +#endif + + fatal("Unable to get current thread stack base size"); +} + +// interruptible infrastructure + +// setup_interruptible saves the thread state before going into an +// interruptible system call. +// The saved state is used to restore the thread to +// its former state whether or not an interrupt is received. +// Used by os_sleep, and classloader os::read +// hpi calls skip this layer and stay in _thread_in_native + +void os::Bsd::setup_interruptible(JavaThread* thread) { + + JavaThreadState thread_state = thread->thread_state(); + + assert(thread_state != _thread_blocked, "Coming from the wrong thread"); + assert(thread_state != _thread_in_native, "Native threads skip setup_interruptible"); + OSThread* osthread = thread->osthread(); + osthread->set_saved_interrupt_thread_state(thread_state); + thread->frame_anchor()->make_walkable(thread); + ThreadStateTransition::transition(thread, thread_state, _thread_blocked); +} + +JavaThread* os::Bsd::setup_interruptible() { + JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); + setup_interruptible(thread); + return thread; +} + +#ifdef ASSERT + +JavaThread* os::Bsd::setup_interruptible_native() { + JavaThread* thread = (JavaThread*)ThreadLocalStorage::thread(); + JavaThreadState thread_state = thread->thread_state(); + assert(thread_state == _thread_in_native, "Assumed thread_in_native"); + return thread; +} + +void os::Bsd::cleanup_interruptible_native(JavaThread* thread) { + JavaThreadState thread_state = thread->thread_state(); + assert(thread_state == _thread_in_native, "Assumed thread_in_native"); +} +#endif + +// cleanup_interruptible reverses the effects of setup_interruptible + +void os::Bsd::cleanup_interruptible(JavaThread* thread) { + OSThread* osthread = thread->osthread(); + + ThreadStateTransition::transition(thread, _thread_blocked, osthread->saved_interrupt_thread_state()); +} + + +int os::Bsd::_processor_count = 0; + + jint os::Bsd::_os_thread_limit = 0; +volatile jint os::Bsd::_os_thread_count = 0; + +julong os::Bsd::_physical_memory = 0; + +julong os::physical_memory() { + return Bsd::physical_memory(); +} + +julong os::available_memory() { + return physical_memory() >> 2; +} + + +julong os::allocatable_physical_memory(julong size) { +#ifdef __OpenBSD__ +#ifdef _LP64 + julong reasonable_size = (julong)650*M - 2 * LargePageSizeInBytes; +#else + julong reasonable_size = (julong)900*M - 2 * LargePageSizeInBytes; +#endif + return MIN2(size, reasonable_size); +#else +#ifdef _LP64 + return size; +#else + // XXXBSD: check it + julong result = MIN2(size, (julong)3835*M); + if (!is_allocatable(result)) { + // Memory allocations will be aligned but the alignment + // is not known at this point. Alignments will + // be at most to LargePageSizeInBytes. Protect + // allocations from alignments up to illegal + // values. + julong reasonable_size = (julong)2*G - 2 * LargePageSizeInBytes; + result = MIN2(size, reasonable_size); + } + return result; +#endif +#endif +} + +// XXXBSD: hack around +static jlong start_time = 0; +static const jlong hrtime_hz = 1000*1000*1000; +#if SOLARIS +const int LOCK_BUSY = 1; +const int LOCK_FREE = 0; +const int LOCK_INVALID = -1; +static volatile hrtime_t max_hrtime = 0; +static volatile int max_hrtime_lock = LOCK_FREE; // Update counter with LSB as lock-in-progress +#endif + + +void os::Bsd::initialize_system_info() { + int mib[2]; + size_t len; + int cpu_val; + u_long mem_val; + + /* get processors count via hw.ncpus sysctl */ + mib[0] = CTL_HW; + mib[1] = HW_NCPU; + len = sizeof(cpu_val); + if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1) + _processor_count = cpu_val; + else + _processor_count = 1; // fallback + + /* get physical memory via hw.usermem sysctl (hw.usermem is used + * instead of hw.physmem because we need size of allocatable memory + */ + mib[0] = CTL_HW; + mib[1] = HW_USERMEM; + len = sizeof(mem_val); + if (sysctl(mib, 2, &mem_val, &len, NULL, 0) != -1) + _physical_memory = mem_val; + else + _physical_memory = 256*1024*1024; // fallback (XXXBSD?) +} + +int os::processor_count() { + return Bsd::_processor_count; +} + +int os::active_processor_count() { + // BSDNOTE: FreeBSD does not have a notion of processor sets, + // so just return number of available processors. + return Bsd::_processor_count; +} + +bool os::distribute_processes(uint length, uint* distribution) { + // BSDNOTE: not implemented for FreeBSD + return false; +} + +bool os::bind_to_processor(uint processor_id) { + // BSDNOTE: not implemented for FreeBSD + return false; +} + +bool os::getenv(const char* name, char* buffer, int len) { + char* val = ::getenv( name ); + if ( val == NULL + || strlen(val) + 1 > len ) { + if (len > 0) buffer[0] = 0; // return a null string + return false; + } + strcpy( buffer, val ); + return true; +} + +// Return true if user is running as root. + +bool os::have_special_privileges() { + static bool init = false; + static bool privileges = false; + if (!init) { + privileges = (getuid() != geteuid()) || (getgid() != getegid()); + init = true; + } + return privileges; +} + + +static char* get_property(char* name, char* buffer, int buffer_size) { + if (os::getenv(name, buffer, buffer_size)) { + return buffer; + } + static char empty[] = ""; + return empty; +} + + +void os::init_system_properties_values() { +#ifdef _ALLBSD_SOURCE + struct utsname uts; + uname(&uts); + const char *arch = uts.machine; +#else + char arch[12]; + sysinfo(SI_ARCHITECTURE, arch, sizeof(arch)); +#endif + + // The next steps are taken in the product version: + // + // Obtain the JAVA_HOME value from the location of libjvm[_g].so. + // This library should be located at: + // /jre/lib//{client|server}/libjvm[_g].so. + // + // If "/jre/lib/" appears at the right place in the path, then we + // assume libjvm[_g].so is installed in a JDK and we use this path. + // + // Otherwise exit with message: "Could not create the Java virtual machine." + // + // The following extra steps are taken in the debugging version: + // + // If "/jre/lib/" does NOT appear at the right place in the path + // instead of exit check for $JAVA_HOME environment variable. + // + // If it is defined and we are able to locate $JAVA_HOME/jre/lib/, + // then we append a fake suffix "hotspot/libjvm[_g].so" to this path so + // it looks like libjvm[_g].so is installed there + // /jre/lib//hotspot/libjvm[_g].so. + // + // Otherwise exit. + // + // Important note: if the location of libjvm.so changes this + // code needs to be changed accordingly. + + // The next few definitions allow the code to be verbatim: +#define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n)) +#define getenv(n) ::getenv(n) + +#define DEFAULT_LD_LIBRARY_PATH "/usr/lib" /* See ld.so.1(1) */ +#define EXTENSIONS_DIR "/lib/ext" +#define ENDORSED_DIR "/lib/endorsed" + + { + /* sysclasspath, java_home, dll_dir */ + { + char *home_path; + char *dll_path; + char *pslash; + char buf[MAXPATHLEN]; + os::jvm_path(buf, sizeof(buf)); + + // Found the full path to libjvm.so. + // Now cut the path to /jre if we can. + *(strrchr(buf, '/')) = '\0'; /* get rid of /libjvm.so */ + pslash = strrchr(buf, '/'); + if (pslash != NULL) + *pslash = '\0'; /* get rid of /{client|server|hotspot} */ + dll_path = malloc(strlen(buf) + 1); + if (dll_path == NULL) + return; + strcpy(dll_path, buf); + Arguments::set_dll_dir(dll_path); + + if (pslash != NULL) { + pslash = strrchr(buf, '/'); + if (pslash != NULL) { + *pslash = '\0'; /* get rid of / */ + pslash = strrchr(buf, '/'); + if (pslash != NULL) + *pslash = '\0'; /* get rid of /lib */ + } + } + + home_path = malloc(strlen(buf) + 1); + if (home_path == NULL) + return; + strcpy(home_path, buf); + Arguments::set_java_home(home_path); + + if (!set_boot_path('/', ':')) + return; + } + + /* Where to look for native libraries */ + { + /* Get the user setting of LD_LIBRARY_PATH */ + char *v = getenv("LD_LIBRARY_PATH"); + + if (v == NULL) { + /* This is never the case. */ + v = (char *) malloc(sizeof(DEFAULT_LD_LIBRARY_PATH)); + strcpy(v, DEFAULT_LD_LIBRARY_PATH); + } else { + char *ld_library_path = (char *) + malloc(sizeof(DEFAULT_LD_LIBRARY_PATH) /* enough for '\0' */ + + 1 /* colon */ + + strlen(v)); + strcpy(ld_library_path, v); + strcat(ld_library_path, ":" DEFAULT_LD_LIBRARY_PATH); + v = ld_library_path; + } + Arguments::set_library_path(v); + } + + /* Extensions directories */ + { + char * buf; + buf = malloc(strlen(Arguments::get_java_home()) + sizeof(EXTENSIONS_DIR)); + sprintf(buf, "%s" EXTENSIONS_DIR, Arguments::get_java_home()); + Arguments::set_ext_dirs(buf); + } + + /* Endorsed standards default directory. */ + { + char * buf = malloc(strlen(Arguments::get_java_home()) + sizeof(ENDORSED_DIR)); + sprintf(buf, "%s" ENDORSED_DIR, Arguments::get_java_home()); + Arguments::set_endorsed_dirs(buf); + } + } + +#undef malloc +#undef getenv +#undef DEFAULT_LD_LIBRARY_PATH +#undef EXTENSIONS_DIR +#undef ENDORSED_DIR + +} + +void os::breakpoint() { + BREAKPOINT; +} + +bool os::obsolete_option(const JavaVMOption *option) +{ + if (!strncmp(option->optionString, "-Xt", 3)) { + return true; + } else if (!strncmp(option->optionString, "-Xtm", 4)) { + return true; + } else if (!strncmp(option->optionString, "-Xverifyheap", 12)) { + return true; + } else if (!strncmp(option->optionString, "-Xmaxjitcodesize", 16)) { + return true; + } + return false; +} + +bool os::Bsd::valid_stack_address(Thread* thread, address sp) { + address stackStart = (address)thread->stack_base(); + address stackEnd = (address)(stackStart - (address)thread->stack_size()); + if (sp < stackStart && sp >= stackEnd ) return true; + return false; +} + +#ifndef PRODUCT +void os::Bsd::Event::verify() { + guarantee(!Universe::is_fully_initialized() || + !Universe::heap()->is_in_reserved(this), + "Event must be in C heap only."); +} + +void os::Bsd::OSMutex::verify() { + guarantee(!Universe::is_fully_initialized() || + !Universe::heap()->is_in_reserved(oop(this)), + "OSMutex must be in C heap only."); +} + +void os::Bsd::OSMutex::verify_locked() { + pthread_t my_id = pthread_self(); + assert(_is_owned, "OSMutex should be locked"); + // XXXBSD: pthread_equal() ? + assert(_owner == my_id, "OSMutex should be locked by me"); +} +#endif + +extern "C" void breakpoint() { + // use debugger to set breakpoint here +} + +// Returns an estimate of the current stack pointer. Result must be guaranteed to +// point into the calling threads stack, and be no lower than the current stack +// pointer. +address os::current_stack_pointer() { + int dummy; + address sp = (address)&dummy + 8; // %%%% need to confirm if this is right + return sp; +} + +char* os::reserve_memory(size_t bytes, char* requested_addr) { + + // Map uncommitted pages PROT_NONE so we fail early if we touch an + // uncommitted page. Otherwise, the read/write might succeed if we + // have enough swap space to back the physical page. + + char *addr = (char*)::mmap(0, (size_t)bytes, PROT_NONE, + MAP_PRIVATE|MAP_NORESERVE|MAP_ANON, -1, 0); + + return addr == MAP_FAILED ? NULL : addr; +} + +static pthread_t main_thread; + +// Thread start routine for all new Java threads +extern "C" { + static void* _start(void* data) { + // Try to randomize the cache line index of hot stack frames. + // This helps when threads of the same stack traces evict each other's + // cache lines. The threads can be either from the same JVM instance, or + // from different JVM instances. The benefit is especially true for + // processors with hyperthreading technology. + static int counter = 0; + int pid = os::current_process_id(); + alloca(((pid ^ counter++) & 7) * 128); + + // %%%%% should do the os::initialize_thread actions in here + int prio; + Thread* thread = (Thread*)data; + OSThread* osthr = thread->osthread(); + + // XXXBSD: libc_r update required check was here + + assert(osthr->get_state() == RUNNABLE, "invalid os thread state"); + + // initialize signal mask for this thread + os::Bsd::hotspot_sigmask(thread); + + thread->run(); + + // One less thread is executing + // When the VMThread gets here, the main thread may have already exited + // which frees the CodeHeap containing the Atomic::dec code + if (thread != VMThread::vm_thread() && VMThread::vm_thread() != NULL) { + Atomic::dec(&os::Bsd::_os_thread_count); + } + + if (UseDetachedThreads) { + pthread_exit(NULL); + ShouldNotReachHere(); + } + return NULL; + } +} + + +static OSThread* create_os_thread(Thread* thread, pthread_t thread_id) { + // Allocate the OSThread object + OSThread* osthread = new OSThread(NULL, NULL); + if (osthread == NULL) return NULL; + + { + MutexLockerEx ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag); + // Initial state is ALLOCATED but not INITIALIZED + osthread->set_state(ALLOCATED); + + // Store info on the Solaris thread into the OSThread + osthread->set_thread_id(thread_id); + + if ( ThreadPriorityVerbose ) { + tty->print_cr("In create_os_thread, Thread " INTPTR_FORMAT "\n", + osthread->thread_id()); + } + + // Initial thread state is INITIALIZED, not SUSPENDED + osthread->set_state(INITIALIZED); + } + return osthread; +} + +void os::Bsd::hotspot_sigmask(Thread* thread) { + + // XXXBSD: review this function + + //Save caller's signal mask + sigset_t sigmask; + pthread_sigmask(SIG_SETMASK, NULL, &sigmask); + OSThread *osthread = thread->osthread(); + osthread->set_caller_sigmask(sigmask); + + pthread_sigmask(SIG_UNBLOCK, os::Bsd::unblocked_signals(), NULL); + if (!ReduceSignalUsage) { + if (thread->is_VM_thread()) { + // Only the VM thread handles BREAK_SIGNAL ... + pthread_sigmask(SIG_UNBLOCK, vm_signals(), NULL); + } else { + // ... all other threads block BREAK_SIGNAL + assert(!sigismember(vm_signals(), SIGINT), "SIGINT should not be blocked"); + pthread_sigmask(SIG_BLOCK, vm_signals(), NULL); + } + } +} + +bool os::create_attached_thread(Thread* thread) { + OSThread* osthread = create_os_thread(thread, pthread_self()); + if (osthread == NULL) { + return false; + } + + { + MutexLockerEx ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag); + thread->clear_is_baby_thread(); + osthread->set_state(RUNNABLE); + } + thread->set_osthread(osthread); + + // initialize signal mask for this thread + // and save the caller's signal mask + os::Bsd::hotspot_sigmask(thread); + + return true; +} + +bool os::create_main_thread(Thread* thread) { + if (_starting_thread == NULL) { + _starting_thread = create_os_thread(thread, main_thread); + if (_starting_thread == NULL) { + return false; + } + } + + // The primodial thread is runnable from the start + { + MutexLockerEx ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag); + thread->clear_is_baby_thread(); + _starting_thread->set_state(RUNNABLE); + } + thread->set_osthread(_starting_thread); + + // initialize signal mask for this thread + // and save the caller's signal mask + os::Bsd::hotspot_sigmask(thread); + + return true; +} + +bool os::create_thread(Thread* thread, ThreadType thr_type, size_t stack_size) { + // Allocate the OSThread object + OSThread* osthread = new OSThread(NULL, NULL); + if (osthread == NULL) { + return false; + } + + if ( ThreadPriorityVerbose ) { + char *thrtyp; + switch ( thr_type ) { + case vm_thread: + thrtyp = (char *)"vm"; + break; + case cms_thread: + thrtyp = (char *)"cms"; + break; + case pgc_thread: + thrtyp = (char *)"pgc"; + break; + case java_thread: + thrtyp = (char *)"java"; + break; + case compiler_thread: + thrtyp = (char *)"compiler"; + break; + case watcher_thread: + thrtyp = (char *)"watcher"; + break; + case gc_thread: + thrtyp = (char *)"gc"; + break; + default: + thrtyp = (char *)"unknown"; + break; + } + tty->print_cr("In create_thread, creating a %s thread\n", thrtyp); + } + + // Calculate stack size if it's not specified by caller. + if (stack_size == 0) { + // The default stack size 1M (2M for LP64). + stack_size = (BytesPerWord >> 2) * K * K; + + switch (thr_type) { + case os::java_thread: + // Java threads use ThreadStackSize which default value can be changed with the flag -Xss + if (JavaThread::stack_size_at_create() > 0) stack_size = JavaThread::stack_size_at_create(); + break; + case os::compiler_thread: + if (CompilerThreadStackSize > 0) { + stack_size = (size_t)(CompilerThreadStackSize * K); + break; + } // else fall through: + // use VMThreadStackSize if CompilerThreadStackSize is not defined + case os::vm_thread: + case os::gc_thread: + case os::pgc_thread: + case os::cms_thread: + case os::watcher_thread: + if (VMThreadStackSize > 0) stack_size = (size_t)(VMThreadStackSize * K); + break; + } + } + stack_size = MAX2(stack_size, os::Bsd::min_stack_allowed); + + // Initial state is ALLOCATED but not INITIALIZED + { + MutexLockerEx ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag); + osthread->set_state(ALLOCATED); + } + + if (os::Bsd::_os_thread_count > os::Bsd::_os_thread_limit) { + // We got lots of threads. Check if we still have some address space left. + // Need to be at least 5Mb of unreserved address space. We do check by + // trying to reserve some. + const size_t VirtualMemoryBangSize = 20*K*K; + char* mem = os::reserve_memory(VirtualMemoryBangSize); + if (mem == NULL) { + delete osthread; + return false; + } else { + // Release the memory again + os::release_memory(mem, VirtualMemoryBangSize); + } + } + + // Setup osthread because the child thread may need it. + thread->set_osthread(osthread); + + int status; + pthread_t tid; + pthread_attr_t tattr; + + // XXXBSD: read about AdjustConcurency, and if it's applicable backport + // things from Solaris + + // XXXBSD: read about *HintNoPreemt and maybe backport things + + if (pthread_attr_init(&tattr) != 0) + goto err; + + pthread_attr_setstacksize(&tattr, stack_size); + pthread_attr_setcreatesuspend_np(&tattr); + if (UseDetachedThreads) + pthread_attr_setdetachstate(&tattr, true); + + // Mark that we don't have a thread id yet. + // In case we attempt to set the priority before the thread starts. + osthread->set_thread_id(NULL); + + status = pthread_create(&tid, &tattr, _start, thread); + pthread_attr_destroy(&tattr); + if (status != 0) { +err: + if (PrintMiscellaneous && (Verbose || WizardMode)) { + perror("os::create_thread"); + } + thread->set_osthread(NULL); + // Need to clean up stuff we've allocated so far + delete osthread; + return false; + } + + Atomic::inc(&os::Bsd::_os_thread_count); + + // Store info on the Solaris thread into the OSThread + osthread->set_thread_id(tid); + + // Remember that we created this thread so we can set priority on it + osthread->set_vm_created(); + + // Set the default thread priority otherwise use NormalPriority + + if ( UseThreadPriorities ) { + //pthread_setprio is not supported yet on OpenBSD +#ifndef __OpenBSD__ + pthread_setprio(tid, (DefaultThreadPriority == -1) ? + java_to_os_priority[NormPriority] : + DefaultThreadPriority); +#endif + } + + // Initial thread state is INITIALIZED, not SUSPENDED + { + MutexLockerEx ml(thread->SR_lock(), Mutex::_no_safepoint_check_flag); + osthread->set_state(INITIALIZED); + } + + // The thread is returned suspended (in state INITIALIZED), and is started higher up in the call chain + return true; +} + +/* defined for >= Solaris 10. This allows builds on earlier versions + * of Solaris to take advantage of the newly reserved Solaris JVM signals + * With SIGJVM1, SIGJVM2, INTERRUPT_SIGNAL is SIGJVM1, ASYNC_SIGNAL is SIGJVM2 + * and -XX:+UseAltSigs does nothing since these should have no conflict + */ +// XXXBSD: check values (RTMIN,RTMAX too) +#if !defined(SIGJVM1) +#define SIGJVM1 39 +#define SIGJVM2 40 +#endif + +debug_only(static bool signal_sets_initialized = false); +static sigset_t unblocked_sigs, vm_sigs, allowdebug_blocked_sigs; +int os::Bsd::_SIGinterrupt = INTERRUPT_SIGNAL; +int os::Bsd::_SIGasync = ASYNC_SIGNAL; + +bool os::Bsd::is_sig_ignored(int sig) { + struct sigaction oact; + sigaction(sig, (struct sigaction*)NULL, &oact); + void* ohlr = oact.sa_sigaction ? CAST_FROM_FN_PTR(void*, oact.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oact.sa_handler); + if (ohlr == CAST_FROM_FN_PTR(void*, SIG_IGN)) + return true; + else + return false; +} + +void os::Bsd::signal_sets_init() { + // Should also have an assertion stating we are still single-threaded. + assert(!signal_sets_initialized, "Already initialized"); + // Fill in signals that are necessarily unblocked for all threads in + // the VM. Currently, we unblock the following signals: + // SHUTDOWN{1,2,3}_SIGNAL: for shutdown hooks support (unless over-ridden + // by -Xrs (=ReduceSignalUsage)); + // BREAK_SIGNAL which is unblocked only by the VM thread and blocked by all + // other threads. The "ReduceSignalUsage" boolean tells us not to alter + // the dispositions or masks wrt these signals. + // Programs embedding the VM that want to use the above signals for their + // own purposes must, at this time, use the "-Xrs" option to prevent + // interference with shutdown hooks and BREAK_SIGNAL thread dumping. + // (See bug 4345157, and other related bugs). + // In reality, though, unblocking these signals is really a nop, since + // these signals are not blocked by default. + sigemptyset(&unblocked_sigs); + sigemptyset(&allowdebug_blocked_sigs); + sigaddset(&unblocked_sigs, SIGILL); + sigaddset(&unblocked_sigs, SIGSEGV); + sigaddset(&unblocked_sigs, SIGBUS); + sigaddset(&unblocked_sigs, SIGFPE); + + // Note: SIGRTMIN is a macro that calls sysconf() so it will + // dynamically detect SIGRTMIN value for the system at runtime, not buildtime + if (SIGJVM1 < SIGRTMIN) { + os::Bsd::set_SIGinterrupt(SIGJVM1); + os::Bsd::set_SIGasync(SIGJVM2); + } else if (UseAltSigs) { + os::Bsd::set_SIGinterrupt(ALT_INTERRUPT_SIGNAL); + os::Bsd::set_SIGasync(ALT_ASYNC_SIGNAL); + } else { + os::Bsd::set_SIGinterrupt(INTERRUPT_SIGNAL); + os::Bsd::set_SIGasync(ASYNC_SIGNAL); + } + + sigaddset(&unblocked_sigs, os::Bsd::SIGinterrupt()); + sigaddset(&unblocked_sigs, os::Bsd::SIGasync()); + + if (!ReduceSignalUsage) { + if (!os::Bsd::is_sig_ignored(SHUTDOWN1_SIGNAL)) { + sigaddset(&unblocked_sigs, SHUTDOWN1_SIGNAL); + sigaddset(&allowdebug_blocked_sigs, SHUTDOWN1_SIGNAL); + } + if (!os::Bsd::is_sig_ignored(SHUTDOWN2_SIGNAL)) { + sigaddset(&unblocked_sigs, SHUTDOWN2_SIGNAL); + sigaddset(&allowdebug_blocked_sigs, SHUTDOWN2_SIGNAL); + } + if (!os::Bsd::is_sig_ignored(SHUTDOWN3_SIGNAL)) { + sigaddset(&unblocked_sigs, SHUTDOWN3_SIGNAL); + sigaddset(&allowdebug_blocked_sigs, SHUTDOWN3_SIGNAL); + } + } + // Fill in signals that are blocked by all but the VM thread. + sigemptyset(&vm_sigs); + if (!ReduceSignalUsage) + sigaddset(&vm_sigs, BREAK_SIGNAL); + debug_only(signal_sets_initialized = true); + +} + +// These are signals that are unblocked while a thread is running Java. +// (For some reason, they get blocked by default.) +sigset_t* os::Bsd::unblocked_signals() { + assert(signal_sets_initialized, "Not initialized"); + return &unblocked_sigs; +} + +// These are the signals that are blocked while a (non-VM) thread is +// running Java. Only the VM thread handles these signals. +sigset_t* os::Bsd::vm_signals() { + assert(signal_sets_initialized, "Not initialized"); + return &vm_sigs; +} + +// These are signals that are blocked during cond_wait to allow debugger in +sigset_t* os::Bsd::allowdebug_blocked_signals() { + assert(signal_sets_initialized, "Not initialized"); + return &allowdebug_blocked_sigs; +} + +// First crack at OS-specific initialization, from inside the new thread. +void os::initialize_thread() { + if (pthread_main_np()) { + JavaThread* jt = (JavaThread *)Thread::current(); + assert(jt != NULL,"Sanity check"); + // Use 2MB to allow for Solaris 7 64 bit mode. + size_t stack_size = JavaThread::stack_size_at_create() == 0 + ? 2048*K : JavaThread::stack_size_at_create(); + +#if SOLARIS + // There are rare cases when we may have already used more than + // the basic stack size allotment before this method is invoked. + // Attempt to allow for a normally sized java_stack. + size_t current_stack_offset = (size_t)(jt->stack_base() - (address)&stack_size); + stack_size += ReservedSpace::page_align_size_down(current_stack_offset); + + if (stack_size > jt->stack_size()) { + NOT_PRODUCT( + struct rlimit limits; + getrlimit(RLIMIT_STACK, &limits); + size_t size = adjust_stack_size(jt->stack_base(), (size_t)limits.rlim_cur); + assert(size == jt->stack_size(), "Stack size problem in main thread"); + ) + tty->print_cr( + "Stack size of %d Kb exceeds current limit of %d Kb.\n" + "(Stack sizes are rounded up to a multiple of the system page size.)\n" + "See limit(1) to increase the stack size limit.", + stack_size / K, jt->stack_size() / K); + vm_exit(1); + } + assert(jt->stack_size() >= stack_size, + "Attempt to map more stack than was allocated"); + jt->set_stack_size(stack_size); +#endif + } + +#if SOLARIS + // XXXBSD: double check situations of usage of altsigstacks (no use!) + // we should be using StackBanging only! + + // 5/22/01: Right now alternate signal stacks do not handle + // throwing stack overflow exceptions, see bug 4463178 + // Until a fix is found for this, T2 will NOT imply alternate signal + // stacks. + // If using T2 libthread threads, install an alternate signal stack. + // Because alternate stacks associate with LWPs on Solaris, + // see sigaltstack(2), if using UNBOUND threads, or if UseBoundThreads + // we prefer to explicitly stack bang. + // If not using T2 libthread, but using UseBoundThreads any threads + // (primordial thread, jni_attachCurrentThread) we do not create, + // probably are not bound, therefore they can not have an alternate + // signal stack. Since our stack banging code is generated and + // is shared across threads, all threads must be bound to allow + // using alternate signal stacks. The alternative is to interpose + // on _lwp_create to associate an alt sig stack with each LWP, + // and this could be a problem when the JVM is embedded. + // We would prefer to use alternate signal stacks with T2 + // Since there is currently no accurate way to detect T2 + // we do not. Assuming T2 when running T1 causes sig 11s or assertions + // on installing alternate signal stacks + + + // 05/09/03: removed alternate signal stack support for Solaris + // The alternate signal stack mechanism is no longer needed to + // handle stack overflow. This is now handled by allocating + // guard pages (red zone) and stackbanging. + // Initially the alternate signal stack mechanism was removed because + // it did not work with T1 llibthread. Alternate + // signal stacks MUST have all threads bound to lwps. Applications + // can create their own threads and attach them without their being + // bound under T1. This is frequently the case for the primordial thread. + // If we were ever to reenable this mechanism we would need to + // use the dynamic check for T2 libthread. +#endif + + os::Bsd::init_thread_fpu_state(); +} + + + +// Free FreeBSD resources related to the OSThread +void os::free_thread(OSThread* osthread) { + assert(osthread != NULL, "os::free_thread but osthread not set"); + + // We are told to free resources of the argument thread, + // but we can only really operate on the current thread. + // The main thread must take the VMThread down synchronously + // before the main thread exits and frees up CodeHeap + guarantee((Thread::current()->osthread() == osthread + || (osthread == VMThread::vm_thread()->osthread())), "os::free_thread but not current thread"); + if (Thread::current()->osthread() == osthread) { + // Restore caller's signal mask + sigset_t sigmask = osthread->caller_sigmask(); + pthread_sigmask(SIG_SETMASK, &sigmask, NULL); + } + delete osthread; +} + + // *************************************************************** + // Platform dependent Suspend and Resume + // *************************************************************** + +// this is for the normal thr_suspend case for non-self suspension +// Returns 0 for success +int os::pd_suspend_thread(Thread* thread, bool fence) { + // fence off shared mutexes prior to suspension of target to avoid + // any deadlocks + + OSThread* osthread = thread->osthread(); + long sts; + if (fence) { + ThreadCritical tc; + + sts = pthread_suspend_np(osthread->thread_id()); + } else { + sts = pthread_suspend_np(osthread->thread_id()); + } + return sts; +} + +// Resume a thread by one level. +// Return 0 for success +// Nesting of suspend/resume is handled +// by Thread::suspend_thread_impl, Thread::resume_thread_impl +// resume_thread +int os::pd_resume_thread(Thread* thread) { + return pthread_resume_np(thread->osthread()->thread_id()); +} + +// we need to be able to suspend ourself while at the same (atomic) time +// giving up the SR_lock -- we do this by using the +// SR_lock to implement a suspend_self +int os::pd_self_suspend_thread(Thread* thread) { + thread->SR_lock()->wait(Mutex::_no_safepoint_check_flag); + return 0; +} + +void os::pd_start_thread(Thread* thread) { + int status = pthread_resume_np(thread->osthread()->thread_id()); + assert(status == 0, "pthread_resume_np failed"); +} + + +intx os::current_thread_id() { + // XXXBSD: pthread_main_np() ? + return (intx)pthread_self(); +} + +static pid_t _initial_pid = 0; + +int os::current_process_id() { + return (int)(_initial_pid ? _initial_pid : getpid()); +} + +// XXXBSD: look below later +int os::allocate_thread_local_storage() { + // %%% in Win32 this allocates a memory segment pointed to by a + // register. Dan Stein can implement a similar feature in + // Solaris. Alternatively, the VM can do the same thing + // explicitly: malloc some storage and keep the pointer in a + // register (which is part of the thread's context) (or keep it + // in TLS). + // %%% In current versions of Solaris, thr_self and TSD can + // be accessed via short sequences of displaced indirections. + // The value of thr_self is available as %g7(36). + // The value of thr_getspecific(k) is stored in %g7(12)(4)(k*4-4), + // assuming that the current thread already has a value bound to k. + // It may be worth experimenting with such access patterns, + // and later having the parameters formally exported from a Solaris + // interface. I think, however, that it will be faster to + // maintain the invariant that %g2 always contains the + // JavaThread in Java code, and have stubs simply + // treat %g2 as a caller-save register, preserving it in a %lN. + pthread_key_t tk; + // XXXBSD: backport to 1.4.2 + int err = pthread_key_create(&tk, NULL); + if (err) + fatal1("os::allocate_thread_local_storage: pthread_key_create failed (%s)", strerror(err)); + return int(tk); +} + +// XXXBSD: hmm... really do not need? +void os::free_thread_local_storage(int index) { + // %%% don't think we need anything here + // if ( pthread_key_delete((pthread_key_t) index) ) + // fatal("os::free_thread_local_storage: pthread_key_delete failed"); +} + +#define SMALLINT 32 // libthread allocate for tsd_common is a version specific + // small number - point is NO swap space available +void os::thread_local_storage_at_put(int index, void* value) { + // %%% this is used only in threadLocalStorage.cpp + // XXBSD: backport to 1.4.2 + int err = pthread_setspecific((pthread_key_t)index, value); + if (err) { + if (err == ENOMEM) { + vm_exit_out_of_memory(SMALLINT, "pthread_setspecific: out of swap space"); + } else { + fatal1("os::thread_local_storage_at_put: pthread_setspecific failed (%s)", strerror(err)); + } + } else { +#if SOLARIS + ThreadLocalStorage::set_thread_in_slot ((Thread *) value) ; +#endif + } +} + +// This function could be called before TLS is initialized, for example, when +// VM receives an async signal or when VM causes a fatal error during +// initialization. Return NULL if thr_getspecific() fails. +void* os::thread_local_storage_at(int index) { + // %%% this is used only in threadLocalStorage.cpp + return pthread_getspecific((pthread_key_t)index); +} + + // Loads .dll/.so and + // in case of error it checks if .dll/.so was built for the + // same architecture as Hotspot is running on + +void * os::dll_load(const char *filename, char *ebuf, int ebuflen) +{ + void * result= ::dlopen(filename, RTLD_LAZY); + if (result != NULL) + { + // Successful loading + return result; + } + + Elf32_Ehdr elf_head; + + // Read system error message into ebuf + // It may or may not be overwritten below + strncpy(ebuf, dlerror(), ebuflen-1); + ebuf[ebuflen-1]='\0'; + + int file_descriptor= ::open(filename, O_RDONLY | O_NONBLOCK); + + if (file_descriptor < 0) { + // Can't open library, report dlerror() message + return NULL; + } + + bool failed_to_read_elf_head= + (sizeof(elf_head)!= + (::read(file_descriptor, &elf_head,sizeof(elf_head)))) ; + + ::close(file_descriptor); + if (failed_to_read_elf_head) + { + // file i/o error - report dlerror() msg + return NULL; + } + + Elf32_Half lib_arch = elf_head.e_machine; + + typedef struct + { + Elf32_Half arch_code; + char* arch_name; + } arch_t; + + static const arch_t arch_array[]={ + {EM_386, (char*)"IA 32"}, + {EM_IA_64, (char*)"IA 64"}, + {EM_X86_64, (char*)"AMD 64"} + }; + #if (defined IA32) + static const Elf32_Half running_arch=EM_386; + #elif (defined AMD64) + static const Elf32_Half running_arch=EM_X86_64; + #elif (defined IA64) + static const Elf32_Half running_arch=EM_IA_64; + #else + #error Method os::dll_load requires that one of following is defined:\ + IA32, AMD64, IA64 + #endif + + // Obtain a string for printf operation + // lib_arch_str shall contain string what platform this .so was built for + // running_arch_str shall string contain what platform Hotspot was built for + char *running_arch_str=NULL,*lib_arch_str=NULL; + for (unsigned int i=0;i max_hrtime) { + max_hrtime = newtime; + } else { + newtime = max_hrtime; + } + // release lock + max_hrtime_lock = LOCK_FREE; + return newtime; + } +} +// gethrtime can move backwards if read from one cpu and then a different cpu +// getTimeNanos is guaranteed to not move backward on Solaris +inline hrtime_t getTimeNanos() { + if (VM_Version::supports_cx8()) { + bool retry = false; + hrtime_t newtime = gethrtime(); + hrtime_t oldmaxtime = max_hrtime; + hrtime_t retmaxtime = oldmaxtime; + while ((newtime > retmaxtime) && (retry == false || retmaxtime != oldmaxtime)) { + oldmaxtime = retmaxtime; + retmaxtime = Atomic::cmpxchg(newtime, (volatile jlong *)&max_hrtime, oldmaxtime); + retry = true; + } + return (newtime > retmaxtime) ? newtime : retmaxtime; + } else { + return oldgetTimeNanos(); + } +} +#endif /* SOLARIS */ + +static jlong getTimeNanos() { + struct timespec ts; + clock_gettime(CLOCK_REALTIME, &ts); + return (jlong(ts.tv_sec) * hrtime_hz + jlong(ts.tv_nsec)); +} + +// Time since start-up in seconds to a fine granularity. +// Used by VMSelfDestructTimer and the MemProfiler. +double os::elapsedTime() { + return (double)(getTimeNanos() - start_time) / (double)hrtime_hz; +} + +jlong os::elapsed_counter() { + return (jlong)(getTimeNanos() - start_time); +} + +jlong os::elapsed_frequency() { + return hrtime_hz; +} + +// Used internally for comparisons only +// getTimeMillis guaranteed to not move backwards on Solaris +jlong getTimeMillis() { + jlong nanotime = getTimeNanos(); + return (jlong)(nanotime / NANOSECS_PER_MILLISECS); +} + +// Must return millis since Jan 1 1970 for JVM_CurrentTimeMillis +jlong os::javaTimeMillis() { + struct timeval t; + if (gettimeofday( &t, NULL) == -1) + fatal1("os::javaTimeMillis: gettimeofday (%s)", strerror(errno)); + return jlong(t.tv_sec) * 1000 + jlong(t.tv_usec) / 1000; +} + +jlong os::javaTimeNanos() { + return (jlong)getTimeNanos(); +} + +void os::javaTimeNanos_info(jvmtiTimerInfo *info_ptr) { + info_ptr->max_value = ALL_64_BITS; // gethrtime() uses all 64 bits + info_ptr->may_skip_backward = false; // not subject to resetting or drifting + info_ptr->may_skip_forward = false; // not subject to resetting or drifting + info_ptr->kind = JVMTI_TIMER_ELAPSED; // elapsed not CPU time +} + +// Note: os::shutdown() might be called very early during initialization, or +// called from signal handler. Before adding something to os::shutdown(), make +// sure it is async-safe and can handle partially initialized VM. +void os::shutdown() { + + // allow PerfMemory to attempt cleanup of any persistent resources + perfMemory_exit(); + + // flush buffered output, finish log files + ostream_abort(); + + // Check for abort hook + abort_hook_t abort_hook = Arguments::abort_hook(); + if (abort_hook != NULL) { + abort_hook(); + } +} + +// Note: os::abort() might be called very early during initialization, or +// called from signal handler. Before adding something to os::abort(), make +// sure it is async-safe and can handle partially initialized VM. +void os::abort(bool dump_core) { + os::shutdown(); + if (dump_core) { +#ifndef PRODUCT + fdStream out(defaultStream::output_fd()); + out.print_raw("Current thread is "); + char buf[16]; +// jio_snprintf(buf, sizeof(buf), UINTX_FORMAT, os::current_thread_id()); + jio_snprintf(buf, sizeof(buf), "0x%x", os::current_thread_id()); + out.print_raw_cr(buf); + out.print_raw_cr("Dumping core ..."); +#endif + ::abort(); // dump core (for debugging) + } + + ::exit(1); +} + +// Die immediately, no exit hook, no abort hook, no cleanup. +void os::die() { + _exit(-1); +} + +// DLL functions + +const char* os::dll_file_extension() { return ".so"; } + +const char* os::get_temp_directory() { return "/tmp/"; } + +// check if addr is inside libjvm[_g].so +bool os::address_is_in_vm(address addr) { + static address libjvm_base_addr; + Dl_info dlinfo; + + if (libjvm_base_addr == NULL) { + dladdr(CAST_FROM_FN_PTR(void *, os::address_is_in_vm), &dlinfo); + libjvm_base_addr = (address)dlinfo.dli_fbase; + assert(libjvm_base_addr !=NULL, "Cannot obtain base address for libjvm"); + } + + if (dladdr((void *)addr, &dlinfo)) { + if (libjvm_base_addr == (address)dlinfo.dli_fbase) return true; + } + + return false; +} + +bool os::dll_address_to_function_name(address addr, char *buf, + int buflen, int * offset) { + Dl_info dlinfo; + + // no, only dladdr is available + if(dladdr((void *)addr, &dlinfo)) { + if (buf) jio_snprintf(buf, buflen, dlinfo.dli_sname); + if (offset) *offset = addr - (address)dlinfo.dli_saddr; + return true; + } else { + if (buf) buf[0] = '\0'; + if (offset) *offset = -1; + return false; + } +} + +bool os::dll_address_to_library_name(address addr, char* buf, + int buflen, int* offset) { + Dl_info dlinfo; + + if (dladdr((void*)addr, &dlinfo)){ + if (buf) jio_snprintf(buf, buflen, "%s", dlinfo.dli_fname); + if (offset) *offset = addr - (address)dlinfo.dli_fbase; + return true; + } else { + if (buf) buf[0] = '\0'; + if (offset) *offset = -1; + return false; + } +} + +// Prints the names and full paths of all opened dynamic libraries +// for current process +void os::print_dll_info(outputStream * st) { +#ifdef RTLD_DI_LINKMAP + Dl_info dli; + void *handle; + Link_map *map; + Link_map *p; + + st->print_cr("Dynamic libraries:"); st->flush(); + + if (!dladdr(CAST_FROM_FN_PTR(void *, os::print_dll_info), &dli)) { + st->print_cr("Error: Cannot print dynamic libraries."); + return; + } + handle = dlopen(dli.dli_fname, RTLD_LAZY); + if (handle == NULL) { + st->print_cr("Error: Cannot print dynamic libraries."); + return; + } + dlinfo(handle, RTLD_DI_LINKMAP, &map); + if (map == NULL) { + st->print_cr("Error: Cannot print dynamic libraries."); + return; + } + + while (map->l_prev != NULL) + map = map->l_prev; + + while (map != NULL) { + st->print_cr(PTR_FORMAT " \t%s", map->l_addr, map->l_name); + map = map->l_next; + } + + dlclose(handle); + return; +done: +#endif + st->print_cr("Error: Cannot print dynamic libraries."); +} + +bool _print_ascii_file(const char* filename, outputStream* st) { + int fd = open(filename, O_RDONLY); + if (fd == -1) { + return false; + } + + char buf[32]; + int bytes; + while ((bytes = read(fd, buf, sizeof(buf))) > 0) { + st->print_raw(buf, bytes); + } + + close(fd); + + return true; +} + +void os::print_os_info(outputStream* st) { + st->print("OS:"); + +#if defined(__FreeBSD__) + st->print_cr("FreeBSD"); +#elif defined(__OpenBSD__) + st->print_cr("OpenBSD"); +#elif defined(__NetBSD__) + st->print_cr("NetBSD"); +#endif + + // kernel + st->print("uname:"); + struct utsname name; + uname(&name); + st->print(name.sysname); st->print(" "); + st->print(name.release); st->print(" "); + st->print(name.version); st->print(" "); + st->print(name.machine); + +#if SOLARIS + // libthread + if (os::Bsd::T2_libthread()) st->print(" (T2 libthread)"); + else st->print(" (T1 libthread)"); +#endif + st->cr(); + + // rlimit + st->print("rlimit:"); + struct rlimit rlim; + + st->print(" STACK "); + getrlimit(RLIMIT_STACK, &rlim); + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%uk", rlim.rlim_cur >> 10); + + st->print(", CORE "); + getrlimit(RLIMIT_CORE, &rlim); + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%uk", rlim.rlim_cur >> 10); + + st->print(", NOFILE "); + getrlimit(RLIMIT_NOFILE, &rlim); + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%d", rlim.rlim_cur); + +#if SOLARIS + st->print(", AS "); + getrlimit(RLIMIT_AS, &rlim); + if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); + else st->print("%uk", rlim.rlim_cur >> 10); + st->cr(); +#endif + +#if SOLARIS + // load average + st->print("load average:"); + double loadavg[3]; + getloadavg(loadavg, 3); + st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]); + st->cr(); +#endif +} + +void os::print_memory_info(outputStream* st) { + st->print("Memory:"); + st->print(" %dk page", os::vm_page_size()>>10); + st->print(", physical " UINT64_FORMAT "k", os::physical_memory()>>10); +#if SOLARIS + julong avail_memory = (julong)sysconf(_SC_AVPHYS_PAGES) * os::vm_page_size(); + st->print("(" UINT64_FORMAT "k free)", avail_memory >> 10); +#endif + st->cr(); +} + +void os::print_siginfo(outputStream* st, void* siginfo) { + st->print("siginfo:"); + + siginfo_t *si = (siginfo_t*)siginfo; + st->print("si_signo=%d", si->si_signo); + st->print(", si_errno=%d", si->si_errno); + st->print(", si_code=%d", si->si_code); + switch (si->si_signo) { + case SIGILL: + case SIGFPE: + case SIGSEGV: + case SIGBUS: + st->print(", si_addr=" PTR_FORMAT, si->si_addr); + break; + } + st->cr(); +} + +static char saved_jvm_path[MAXPATHLEN] = {0}; + +// Find the full path to the current module, libjvm.so or libjvm_g.so +void os::jvm_path(char *buf, jint buflen) { + // Error checking. + if (buflen < MAXPATHLEN) { + assert(false, "must use a large-enough buffer"); + buf[0] = '\0'; + return; + } + // Lazy resolve the path to current module. + if (saved_jvm_path[0] != 0) { + strcpy(buf, saved_jvm_path); + return; + } + + Dl_info dlinfo; + int ret = dladdr(CAST_FROM_FN_PTR(void *, os::jvm_path), &dlinfo); + assert(ret != 0, "cannot locate libjvm"); + realpath((char *)dlinfo.dli_fname, buf); + +#ifndef PRODUCT + // Support for the gamma launcher. Typical value for buf is + // "/jre/lib///libjvm.so". If "/jre/lib/" appears at + // the right place in the string, then assume we are installed in a JDK and + // we're done. Otherwise, check for a JAVA_HOME environment variable and fix + // up the path so it looks like libjvm.so is installed there (append a + // fake suffix hotspot/libjvm.so). + const char *p = buf + strlen(buf) - 1; + for (int count = 0; p > buf && count < 5; ++count) { + for (--p; p > buf && *p != '/'; --p) + /* empty */ ; + } + + if (strncmp(p, "/jre/lib/", 9) != 0) { + // Look for JAVA_HOME in the environment. + char* java_home_var = ::getenv("JAVA_HOME"); + if (java_home_var != NULL && java_home_var[0] != 0) { +#ifdef _ALLBSD_SOURCE + struct utsname uts; + char cpu_arch[12]; + uname(&uts); + strncpy(cpu_arch, uts.machine, sizeof(cpu_arch)); +#else + char cpu_arch[12]; + sysinfo(SI_ARCHITECTURE, cpu_arch, sizeof(cpu_arch)); +#endif +#ifdef _LP64 + // If we are on sparc running a 64-bit vm, look in jre/lib/sparcv9. + if (strcmp(cpu_arch, "sparc") == 0) { + strcat(cpu_arch, "v9"); + } +#endif + // Check the current module name "libjvm.so" or "libjvm_g.so". + p = strrchr(buf, '/'); + assert(strstr(p, "/libjvm") == p, "invalid library name"); + p = strstr(p, "_g") ? "_g" : ""; + + realpath(java_home_var, buf); + sprintf(buf + strlen(buf), "/jre/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"! + // It is used when we are choosing the HPI library's name + // "libhpi[_g].so" in hpi::initialize_get_interface(). + sprintf(buf + strlen(buf), "/hotspot/libjvm%s.so", p); + } else { + // Go back to path of .so + realpath((char *)dlinfo.dli_fname, buf); + } + } + } +#endif // #ifndef PRODUCT + + strcpy(saved_jvm_path, buf); +} + + +void os::print_jni_name_prefix_on(outputStream* st, int args_size) { + // no prefix required, not even "_" +} + + +void os::print_jni_name_suffix_on(outputStream* st, int args_size) { + // no suffix required +} + + +// sun.misc.Signal + +extern "C" { + static void UserHandler(int sig, void *siginfo, void *context) { + // Ctrl-C is pressed during error reporting, likely because the error + // handler fails to abort. Let VM die immediately. + if (sig == SIGINT && is_error_reported()) { + os::die(); + } + + os::signal_notify(sig); + // We do not need to reinstate the signal handler each time... + } +} + +void* os::user_handler() { + return CAST_FROM_FN_PTR(void*, UserHandler); +} +extern "C" { + typedef void (*sa_handler_t)(int); + typedef void (*sa_sigaction_t)(int, siginfo_t *, void *); +} + +void* os::signal(int signal_number, void* handler) { + struct sigaction sigAct, oldSigAct; + sigfillset(&(sigAct.sa_mask)); + sigAct.sa_flags = SA_RESTART & ~SA_RESETHAND; + sigAct.sa_handler = CAST_TO_FN_PTR(sa_handler_t, handler); + + if (sigaction(signal_number, &sigAct, &oldSigAct)) + // -1 means registration failed + return (void *)-1; + + return CAST_FROM_FN_PTR(void*, oldSigAct.sa_handler); +} + +void os::signal_raise(int signal_number) { + raise(signal_number); +} + +/* + * The following code is moved from os.cpp for making this + * code platform specific, which it is by its very nature. + */ + +// a counter for each possible signal value +#define OLDMAXSIGNUM 32 +static int Maxsignum = 0; +static int Sigexit = 0; +static int Maxlibjsigsigs; +static jint *pending_signals = NULL; +static int *preinstalled_sigs = NULL; +static struct sigaction *chainedsigactions = NULL; +static sem_t sig_sem; +typedef int (*version_getting_t)(); +version_getting_t os::Bsd::get_libjsig_version = NULL; +static int libjsigversion = NULL; + +int os::sigexitnum_pd() { + assert(Sigexit > 0, "signal memory not yet initialized"); + return Sigexit; +} + +void os::Bsd::init_signal_mem() { + // Initialize signal structures + Maxsignum = SIGRTMAX; + Sigexit = Maxsignum+1; + assert(Maxsignum >0, "Unable to obtain max signal number"); + + Maxlibjsigsigs = Maxsignum; + + // pending_signals has one int per signal + // The additional signal is for SIGEXIT - exit signal to signal_thread + pending_signals = (jint *)os::malloc(sizeof(jint) * (Sigexit+1)); + memset(pending_signals, 0, (sizeof(jint) * (Sigexit+1))); + + if (UseSignalChaining) { + chainedsigactions = (struct sigaction *)malloc(sizeof(struct sigaction) + * (Maxsignum + 1)); + memset(chainedsigactions, 0, (sizeof(struct sigaction) * (Maxsignum + 1))); + preinstalled_sigs = (int *)os::malloc(sizeof(int) * (Maxsignum + 1)); + memset(preinstalled_sigs, 0, (sizeof(int) * (Maxsignum + 1))); + } +} + +void os::signal_init_pd() { + if (sig_sem == 0) { + int ret; + ret = ::sem_init(&sig_sem, 0, 0); + assert(ret == 0, "sem_init() failed"); + } +} + +void os::signal_notify(int signal_number) { + int ret; + + Atomic::inc(&pending_signals[signal_number]); + ret = ::sem_post(&sig_sem); + assert(ret == 0, "sem_post() failed"); +} + +static int check_pending_signals(bool wait_for_signal) { + int ret; + while (true) { + for (int i = 0; i < Sigexit + 1; i++) { + jint n = pending_signals[i]; + if (n > 0 && n == Atomic::cmpxchg(n - 1, &pending_signals[i], n)) { + return i; + } + } + if (!wait_for_signal) { + return -1; + } + JavaThread *thread = JavaThread::current(); + ThreadBlockInVM tbivm(thread); + + bool threadIsSuspended; + do { + thread->set_suspend_equivalent(); + // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() + ret = ::sem_wait(&sig_sem); + assert(ret == 0, "sem_wait() failed"); + + // were we externally suspended while we were waiting? + threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); + if (threadIsSuspended) { + // + // The semaphore has been incremented, but while we were waiting + // another thread suspended us. We don't want to continue running + // while suspended because that would surprise the thread that + // suspended us. + // + ret = ::sem_post(&sig_sem); + assert(ret == 0, "sem_post() failed"); + + thread->java_suspend_self(); + } + } while (threadIsSuspended); + } +} + +int os::signal_lookup() { + return check_pending_signals(false); +} + +int os::signal_wait() { + return check_pending_signals(true); +} + +// Virtual Memory + +static int page_size = -1; + +int os::vm_page_size() { + assert(page_size != -1, "must call os::init"); + return page_size; +} + +// Solaris allocates memory by pages. +int os::vm_allocation_granularity() { + assert(page_size != -1, "must call os::init"); + return page_size; +} + +// The mmap functions commit_memory, uncommit_memory, +// release_memory, guard memory, unguard memory +bool os::commit_memory(char* addr, size_t bytes) { +// XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD +#ifdef __OpenBSD__ + return mprotect(addr, bytes, PROT_READ|PROT_WRITE|PROT_EXEC) == 0; +#else + return ::mmap(addr, bytes, PROT_READ|PROT_WRITE|PROT_EXEC, + MAP_PRIVATE|MAP_FIXED|MAP_ANON, -1, 0) + != MAP_FAILED; +#endif +} + +bool os::commit_memory(char* addr, size_t bytes, size_t alignment_hint) { + if (commit_memory(addr, bytes)) + return true; + return false; +} + +bool os::uncommit_memory(char* addr, size_t bytes) { +// XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD +#ifdef __OpenBSD__ + return mprotect(addr, bytes, PROT_NONE) == 0; +#else + return ::mmap(addr, bytes, PROT_NONE, + MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANON, -1, 0) + != MAP_FAILED; +#endif +} + +// XXXBSD: review and adopt !!! + +// Reserve memory at an arbitrary address, only if that area is +// available (and not reserved for something else). + +char* os::attempt_reserve_memory_at(size_t bytes, char* requested_addr) { + const int max_tries = 5; + char* base[max_tries]; + size_t size[max_tries]; + const size_t gap = 0x400000; + + // Assert that this block is a multiple of 4MB (which is the minimum + // size increment for the Java heap). A multiple of the page size + // would probably do. + assert(bytes % (4*1024*1024) == 0, "reserving unexpected size block"); + + // Repeatedly allocate blocks until the block is allocated at the + // right spot. Give up after max_tries. + + int i; + for (i = 0; i < max_tries; ++i) { + base[i] = reserve_memory(bytes); + + if (base[i] != NULL) { + // Is this the block we wanted? + if (base[i] == requested_addr) { + size[i] = bytes; + break; + } + + // Does this overlap the block we wanted? Give back the overlapped + // parts and try again. + + size_t top_overlap = requested_addr + (bytes + gap) - base[i]; + if (top_overlap >= 0 && top_overlap < bytes) { + unmap_memory(base[i], top_overlap); + base[i] += top_overlap; + size[i] = bytes - top_overlap; + } else { + size_t bottom_overlap = base[i] + bytes - requested_addr; + if (bottom_overlap >= 0 && bottom_overlap < bytes) { + unmap_memory(requested_addr, bottom_overlap); + size[i] = bytes - bottom_overlap; + } else { + size[i] = bytes; + } + } + } + } + + // Give back the unused reserved pieces. + + for (int j = 0; j < i; ++j) { + if (base[j] != NULL) { + unmap_memory(base[j], size[j]); + } + } + + return (i < max_tries) ? requested_addr : NULL; +} + +bool os::release_memory(char* addr, size_t bytes) { + return ::munmap(addr, bytes) == 0; +} + +// Protect memory (make it read-only. (Used to pass readonly pages through +// JNI GetArrayElements with empty arrays.) +bool os::protect_memory(char* addr, size_t bytes) { + return ::mprotect(addr, bytes, PROT_READ) == 0; +} + +// guard_memory and unguard_memory only happens within stack guard pages. +// Since ISM pertains only to the heap, guard and unguard memory should not +/// happen with an ISM region. +bool os::guard_memory(char* addr, size_t bytes) { + return ::mprotect(addr, bytes, PROT_NONE) == 0; +} + +bool os::unguard_memory(char* addr, size_t bytes) { + return mprotect(addr, bytes, PROT_READ|PROT_WRITE|PROT_EXEC) == 0; +} + +char* os::reserve_memory_special(size_t bytes) { + ShouldNotReachHere(); + return NULL; +} + +jint os::release_memory_special(char*, size_t) { + ShouldNotReachHere(); + return 0; +} + +// BSDXXX: cap nanosleep to 100 million to avoid overflow of +// tv_sec. Both FreeBSD and OpenBSD use a signed value for tv_sec +// and add the time of day to tv_sec. +#define MAX_TV_SEC 100000000 + +static int os_nanosleep(jlong *millis) { + jlong sec; + int res; + struct timespec t, rt; + + while (*millis > 0) { + + sec = *millis / 1000L; + t.tv_nsec = (long)((*millis % 1000L) * 1000000); + + switch (sizeof(t.tv_sec)) { + case 8: + t.tv_sec = (time_t)sec; + break; + case 4: + t.tv_sec = sec > MAX_TV_SEC ? MAX_TV_SEC : (time_t)sec; + break; + default: + ::abort(); + } + + if ((res = nanosleep(&t, &rt)) != OS_ERR) + *millis -= (t.tv_sec * 1000L) + (t.tv_nsec / 1000000); + else if (errno == EINTR) { + timespecsub(&t, &rt, &t); + *millis -= (t.tv_sec * 1000L) + (t.tv_nsec / 1000000); + } + if (res == OS_ERR) + return res; + } + + return OS_OK; +} + +static int os_sleep(jlong millis, bool interruptible) { + int res; + + while (millis > 0) { + if (!interruptible) { + res = os_nanosleep(&millis); + } else { + INTERRUPTIBLE_NORESTART_VM(os_nanosleep(&millis), res, os::Bsd::clear_interrupted); + } + // INTERRUPTIBLE_NORESTART_VM returns res == OS_INTRPT for thread.Interrupt + + if((res == OS_ERR) && (errno == EINTR)) { + if(millis <= 0) + return OS_OK; + } else + return res; + } + + return OS_OK; +} + +int os::Bsd::naked_sleep() { + // %% make the sleep time an interger flag. for now use 1 millisec. + return os_sleep(1, false); +} + +// Read calls from inside the vm need to perform state transitions +size_t os::read(int fd, void *buf, unsigned int nBytes) { + INTERRUPTIBLE_RETURN_INT_VM(::read(fd, buf, nBytes), os::Bsd::clear_interrupted); +} + +// XXXBSD: done differently in 1.3.1, take a look +int os::sleep(Thread* thread, jlong millis, bool interruptible) { + assert(thread == Thread::current(), "thread consistency check"); + + // On Solaris machines (especially 2.5.1) we found that sometimes the VM gets into a live lock + // situation with a JavaThread being starved out of a lwp. The kernel doesn't seem to generate + // a SIGWAITING signal which would enable the threads library to create a new lwp for the starving + // thread. We suspect that because the Watcher thread keeps waking up at periodic intervals the kernel + // is fooled into believing that the system is making progress. In the code below we block the + // the watcher thread while safepoint is in progress so that it would not appear as though the + // system is making progress. + if (thread->is_Watcher_thread() && SafepointSynchronize::is_synchronizing() && !Arguments::has_profile()) { + // We now try to acquire the threads lock. Since this lock is held by the VM thread during + // the entire safepoint, the watcher thread will line up here during the safepoint. + Threads_lock->lock_without_safepoint_check(); + Threads_lock->unlock(); + } + + if (millis <= 0) { + // NOTE: workaround for bug 4338139 + if (thread->is_Java_thread()) { + ThreadBlockInVM tbivm((JavaThread*) thread); + +// BSDXXX: Only use pthread_yield here and below if the system thread +// scheduler gives time slices to lower priority threads when yielding. +#ifdef __FreeBSD__ + os_sleep(MinSleepInterval, interruptible); +#else + pthread_yield(); +#endif + +#if SOLARIS + // XXX - This code was not exercised during the Merlin RC1 + // pre-integration test cycle so it has been removed to + // reduce risk. + // + // were we externally suspended while we were waiting? + if (((JavaThread *) thread)->is_external_suspend_with_lock()) { + // + // While we were waiting in thr_yield() another thread suspended + // us. We don't want to continue running while suspended because + // that would surprise the thread that suspended us. + // + ((JavaThread *) thread)->java_suspend_self(); + } +#endif + return 0; + } + +// BSDXXX: Only use pthread_yield here and above if the system thread +// scheduler gives time slices to lower priority threads when yielding. +#ifdef __FreeBSD__ + os_sleep(MinSleepInterval, interruptible); +#else + pthread_yield(); +#endif + return 0; + } + + OSThreadWaitState osts(thread->osthread(), false /* not Object.wait() */); + + return os_sleep(millis, interruptible); +} + +// Sleep forever; naked call to OS-specific sleep; use with CAUTION +void os::infinite_sleep() { + while (true) { // sleep forever ... + ::sleep(100); // ... 100 seconds at a time + } +} + +// Used to convert frequent JVM_Yield() to nops +bool os::dont_yield() { + if (DontYieldALot) { + static jlong last_time = 0; + jlong diff = getTimeNanos() - last_time; + + if (diff < DontYieldALotInterval * 1000000) + return true; + + last_time += diff; + + return false; + } + else { + return false; + } +} + +void os::yield() { + // Yields to all threads with same or greater priority + os::sleep(Thread::current(), 0, false); +} + + +// On Solaris we found that yield_all doesn't always yield to all other threads. +// There have been cases where there is a thread ready to execute but it doesn't +// get an lwp as the VM thread continues to spin with sleeps of 1 millisecond. +// The 1 millisecond wait doesn't seem long enough for the kernel to issue a +// SIGWAITING signal which will cause a new lwp to be created. So we count the +// number of times yield_all is called in the one loop and increase the sleep +// time after 8 attempts. If this fails too we increase the concurrency level +// so that the starving thread would get an lwp + +void os::yield_all(int attempts) { + // Yields to all threads, including threads with lower priorities + if (attempts == 0) { + os::sleep(Thread::current(), 1, false); + } else { + int iterations = attempts % 30; + if (iterations == 0) { +#if SOLARIS + int noofLWPS = pthread_getconcurrency(); + if (noofLWPS < (Threads::number_of_threads() + 2)) { + pthreadsetconcurrency(pthreadgetconcurrency() + 1); + } +#endif + } else if (iterations < 25) { + os::sleep(Thread::current(), 1, false); + } else { + os::sleep(Thread::current(), 10, false); + } + } +} + +// Called from the tight loops to possibly influence time-sharing heuristics +void os::loop_breaker(int attempts) { + os::yield_all(attempts); +} + + +// XXXBSD: is number 31 valid for libpthread? + +// FreeBSD only gives access to 31 real priorities at a time, +// so we expand Java's ten to fill this range. This would be better +// if we dynamically adjusted relative priorities. +// +// The ThreadPriorityPolicy option allows us to select 2 different +// priority scales. +// +// ThreadPriorityPolicy=0 +// Since the Solaris' default priority is MaximumPriority, we do not +// set a priority lower than Max unless a priority lower than +// NormPriority is requested. +// +// ThreadPriorityPolicy=1 +// This mode causes the priority table to get filled with +// linear values. NormPriority get's mapped to 50% of the +// Maximum priority an so on. This will cause VM threads +// to get unfair treatment against other Solaris processes +// which do not explicitly alter their thread priorities. +// + + +int os::java_to_os_priority[MaxPriority + 1] = { + -99999, // 0 Entry should never be used + + 0, // 1 MinPriority + 3, // 2 + 6, // 3 + + 10, // 4 + 15, // 5 NormPriority + 18, // 6 + + 21, // 7 + 25, // 8 + 28, // 9 NearMaxPriority + + 31 // 10 MaxPriority +}; + + +OSReturn os::set_native_priority(Thread* thread, int newpri) { + assert(newpri >= MinimumPriority && newpri <= MaximumPriority, "bad priority mapping"); +#ifdef __OpenBSD__ + // OpenBSD doesn't support pthread_setprio yet + return OS_OK; +#else + if ( !UseThreadPriorities ) return OS_OK; + int status = pthread_setprio(thread->osthread()->thread_id(), newpri); + return (status == 0) ? OS_OK : OS_ERR; +#endif +} + + +OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) { + if ( !UseThreadPriorities ) { + *priority_ptr = NormalPriority; + return OS_OK; + } + int res = pthread_getprio(thread->osthread()->thread_id()); + if (res < 0) { + return OS_ERR; + } + *priority_ptr = res; + return OS_OK; +} + + +// XXXBSD: !? +// Hint to the underlying OS that a task switch would not be good. +// Void return because it's a hint and can fail. +void os::hint_no_preempt() { +#if SOLARIS + schedctl_start(schedctl_init()); +#endif +} + +void os::interrupt(Thread* thread) { + assert(Thread::current() == thread || Threads_lock->owned_by_self(), "possibility of dangling Thread pointer"); + + OSThread* osthread = thread->osthread(); + + int isInterrupted = osthread->interrupted(); + if (!isInterrupted) { + osthread->set_interrupted(true); + OrderAccess::fence(); + osthread->interrupt_event()->unpark(); + } + + // For JSR166: unpark after setting status but before thr_kill -dl + if (thread->is_Java_thread()) { + ((JavaThread*)thread)->parker()->unpark(); + } + + if (!isInterrupted) { + int status = pthread_kill(osthread->thread_id(), os::Bsd::SIGinterrupt()); + assert(status == 0, "pthread_kill != 0"); + } +} + + +bool os::is_interrupted(Thread* thread, bool clear_interrupted) { + assert(Thread::current() == thread || Threads_lock->owned_by_self(), "possibility of dangling Thread pointer"); + + OSThread* osthread = thread->osthread(); + + bool res = osthread->interrupted(); + + // NOTE that since there is no "lock" around these two operations, + // there is the possibility that the interrupted flag will be + // "false" but that the interrupt event will be set. This is + // intentional. The effect of this is that Object.wait() will appear + // to have a spurious wakeup, which is not harmful, and the + // possibility is so rare that it is not worth the added complexity + // to add yet another lock. It has also been recommended not to put + // the interrupted flag into the os::Bsd::Event structure, + // because it hides the issue. + if (res && clear_interrupted) { + osthread->set_interrupted(false); + osthread->interrupt_event()->reset(); + } + return res; +} + +#ifndef CORE +// Use signals to set up pc for a suspended thread. Only used for compiled +// safepoint. +bool os::set_thread_pc_and_resume(JavaThread* thread, ExtendedPC old_addr, ExtendedPC new_addr) { + assert(thread->is_vm_suspended(), "must be suspended"); + assert(thread->is_in_compiled_safepoint(), "only for compiled safepoint"); + + bool result; + const int time_to_wait = 100; // 100ms wait for initial response. + OSThread* osthread = thread->osthread(); + SetThreadPC_Callback cb(old_addr, new_addr, Interrupt_lock); + + // true - target thread is suspended + int status = cb.interrupt(thread, true, time_to_wait); + + if (cb.is_done() ) { + result = cb.result(); + } else { + DEBUG_ONLY(tty->print_cr("Failed to set pc for thread: %d got %d status", + osthread->thread_id(), status);) + result = false; + } + return result; +} +#endif + +ExtendedPC os::fetch_top_frame(Thread* thread, intptr_t** ret_younger_sp, intptr_t** ret_sp) { + assert(ProfilerLight || thread->is_vm_suspended(), "must be suspended"); + + return os::Bsd::fetch_top_frame_fast(thread, ret_younger_sp, ret_sp); +} + + +void os::print_statistics() { +} + +int os::message_box(const char* title, const char* message) { + int i; + fdStream err(defaultStream::error_fd()); + for (i = 0; i < 78; i++) err.print_raw("="); + err.cr(); + err.print_raw_cr(title); + for (i = 0; i < 78; i++) err.print_raw("-"); + err.cr(); + err.print_raw_cr(message); + for (i = 0; i < 78; i++) err.print_raw("="); + err.cr(); + + char buf[16]; + // Prevent process from exiting upon "read error" without consuming all CPU + while (::read(0, buf, sizeof(buf)) <= 0) { ::sleep(100); } + + return buf[0] == 'y' || buf[0] == 'Y'; +} + +// A lightweight implementation that does not suspend the target thread and +// thus returns only a hint. Used for profiling only! +ExtendedPC os::get_thread_pc(Thread* thread) { + // Make sure that it is called by the watcher and the Threads lock is owned. + assert(Thread::current()->is_Watcher_thread(), "Must be watcher and own Threads_lock"); + // For now, is only used to profile the VM Thread + assert(thread->is_VM_thread(), "Can only be called for VMThread"); + ExtendedPC epc; + + GetThreadPC_Callback cb(ProfileVM_lock); + OSThread *osthread = thread->osthread(); + const int time_to_wait = 400; // 400ms wait for initial response + int status = cb.interrupt(thread, false, time_to_wait); // target is not suspended + + if (cb.is_done() ) { + epc = cb.addr(); + } else { + DEBUG_ONLY(tty->print_cr("Failed to get pc for thread: %d got %d status", + osthread->thread_id(), status);); + // epc is already NULL + } + return epc; +} + + +// This does not do anything on Solaris. This is basically a hook for being +// able to use structured exception handling (thread-local exception filters) on, e.g., Win32. +void os::os_exception_wrapper(java_call_t f, JavaValue* value, methodHandle* method, JavaCallArguments* args, Thread* thread) { + f(value, method, args, thread); +} + +// This routine may be used by user applications as a "hook" to catch signals. +// The user-defined signal handler must pass unrecognized signals to this +// routine, and if it returns true (non-zero), then the signal handler must +// return immediately. If the flag "abort_if_unrecognized" is true, then this +// routine will never retun false (zero), but instead will execute a VM panic +// routine kill the process. +// +// If this routine returns false, it is OK to call it again. This allows +// the user-defined signal handler to perform checks either before or after +// the VM performs its own checks. Naturally, the user code would be making +// a serious error if it tried to handle an exception (such as a null check +// or breakpoint) that the VM was generating for its own correct operation. +// +// This routine may recognize any of the following kinds of signals: +// SIGBUS, SIGSEGV, SIGILL, SIGFPE, BREAK_SIGNAL, SIGPIPE, os::Bsd::SIGasync +// It should be consulted by handlers for any of those signals. +// It explicitly does not recognize os::Bsd::SIGinterrupt +// +// The caller of this routine must pass in the three arguments supplied +// to the function referred to in the "sa_sigaction" (not the "sa_handler") +// field of the structure passed to sigaction(). This routine assumes that +// the sa_flags field passed to sigaction() includes SA_SIGINFO and SA_RESTART. +// +// Note that the VM will print warnings if it detects conflicting signal +// handlers, unless invoked with the option "-XX:+AllowUserSignalHandlers". +// +extern "C" int JVM_handle_bsd_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized); + + +void signalHandler(int sig, siginfo_t* info, void* ucVoid) { + JVM_handle_bsd_signal(sig, info, ucVoid, true); +} + +/* Do not delete - if guarantee is ever removed, a signal handler (even empty) + is needed to provoke threads blocked on IO to return an EINTR + Note: this explicitly does NOT call JVM_handle_solaris_signal and + does NOT participate in signal chaining due to requirement for + NOT setting SA_RESTART to make EINTR work. */ +extern "C" void sigINTRHandler(int sig, siginfo_t* info, void* ucVoid) { + if (UseSignalChaining) { + struct sigaction *actp = os::Bsd::get_chained_signal_action(sig); + if (actp && actp->sa_handler) { + vm_exit_during_initialization("Signal chaining detected for VM interrupt signal, try -XX:+UseAltSigs"); + } + } +} + +// This boolean allows users to forward their own non-matching signals +// to JVM_handle_solaris_signal, harmlessly. +bool os::Bsd::signal_handlers_are_installed = false; + +// For signal-chaining +bool os::Bsd::libjsig_is_loaded = false; +typedef struct sigaction *(*get_signal_t)(int); +get_signal_t os::Bsd::get_signal_action = NULL; + +struct sigaction* os::Bsd::get_chained_signal_action(int sig) { + struct sigaction *actp = NULL; + + if ((libjsig_is_loaded) && (sig <= Maxlibjsigsigs)) { + // Retrieve the old signal handler from libjsig + actp = (*get_signal_action)(sig); + } + if (actp == NULL) { + // Retrieve the preinstalled signal handler from jvm + actp = get_preinstalled_handler(sig); + } + + return actp; +} + +bool os::Bsd::chained_handler(struct sigaction *actp, int sig, + siginfo_t *siginfo, void *context) { + // Call the old signal handler + if (actp->sa_handler == SIG_DFL) { + // It's more reasonable to let jvm treat it as an unexpected exception + // instead of taking the default action. + return false; + } else if (actp->sa_handler != SIG_IGN) { + if ((actp->sa_flags & SA_NODEFER) == 0) { + // automaticlly block the signal + sigaddset(&(actp->sa_mask), sig); + } + + sa_handler_t hand; + sa_sigaction_t sa; + bool siginfo_flag_set = (actp->sa_flags & SA_SIGINFO) != 0; + // retrieve the chained handler + if (siginfo_flag_set) { + sa = actp->sa_sigaction; + } else { + hand = actp->sa_handler; + } + + if ((actp->sa_flags & SA_RESETHAND) != 0) { + actp->sa_handler = SIG_DFL; + } + + // try to honor the signal mask + sigset_t oset; + pthread_sigmask(SIG_SETMASK, &(actp->sa_mask), &oset); + + // call into the chained handler + if (siginfo_flag_set) { + (*sa)(sig, siginfo, context); + } else { + (*hand)(sig); + } + + // restore the signal mask + pthread_sigmask(SIG_SETMASK, &oset, 0); + } + // Tell jvm's signal handler the signal is taken care of. + return true; +} + +struct sigaction* os::Bsd::get_preinstalled_handler(int sig) { + assert((chainedsigactions != (struct sigaction *)NULL) && (preinstalled_sigs != (int *)NULL) , "signals not yet initialized"); + if (preinstalled_sigs[sig] != 0) { + return &chainedsigactions[sig]; + } + return NULL; +} + +void os::Bsd::save_preinstalled_handler(int sig, struct sigaction& oldAct) { + + assert(sig > 0 && sig <= Maxsignum, "vm signal out of expected range"); + assert((chainedsigactions != (struct sigaction *)NULL) && (preinstalled_sigs != (int *)NULL) , "signals not yet initialized"); + chainedsigactions[sig] = oldAct; + preinstalled_sigs[sig] = 1; +} + +void os::Bsd::set_signal_handler(int sig, bool set_installed, bool oktochain) { + // Check for overwrite. + struct sigaction oldAct; + sigaction(sig, (struct sigaction*)NULL, &oldAct); + void* oldhand = oldAct.sa_sigaction ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); + if (oldhand != CAST_FROM_FN_PTR(void*, SIG_DFL) && + oldhand != CAST_FROM_FN_PTR(void*, SIG_IGN) && + oldhand != CAST_FROM_FN_PTR(void*, signalHandler)) { + if (AllowUserSignalHandlers || !set_installed) { + // Do not overwrite; user takes responsibility to forward to us. + return; + } else if (UseSignalChaining) { + if (oktochain) { + // save the old handler in jvm + save_preinstalled_handler(sig, oldAct); + } else { + vm_exit_during_initialization("Signal chaining not allowed for VM interrupt signal, try -XX:+UseAltSigs."); + } + // libjsig also interposes the sigaction() call below and saves the + // old sigaction on it own. + } else { + fatal2("Encountered unexpected pre-existing sigaction handler %#lx for signal %d.", (long)oldhand, sig); + } + } + + struct sigaction sigAct; + sigfillset(&(sigAct.sa_mask)); + sigAct.sa_handler = SIG_DFL; + + sigAct.sa_sigaction = signalHandler; + // Handle SIGSEGV on alternate signal stack if + // not using stack banging + if (!UseStackBanging && sig == SIGSEGV) { + sigAct.sa_flags = SA_SIGINFO | SA_RESTART | SA_ONSTACK; + // Interruptible i/o requires SA_RESTART cleared so EINTR + // is returned instead of restarting system calls + } else if (sig == os::Bsd::SIGinterrupt()) { + memset((char *)&(sigAct.sa_mask), 0, sizeof (sigset_t)); + sigAct.sa_handler = NULL; + sigAct.sa_flags = SA_SIGINFO; + sigAct.sa_sigaction = sigINTRHandler; + } else { + sigAct.sa_flags = SA_SIGINFO | SA_RESTART; + } + + sigaction(sig, &sigAct, &oldAct); + + void* oldhand2 = oldAct.sa_sigaction ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); + assert(oldhand2 == oldhand, "no concurrent signal handler installation"); +} + + +void os::Bsd::install_signal_handlers() { + bool libjsigdone = false; + signal_handlers_are_installed = true; + + // signal-chaining + typedef void (*signal_setting_t)(); + signal_setting_t begin_signal_setting = NULL; + signal_setting_t end_signal_setting = NULL; + begin_signal_setting = CAST_TO_FN_PTR(signal_setting_t, + dlsym(RTLD_DEFAULT, "JVM_begin_signal_setting")); + if (begin_signal_setting != NULL) { + end_signal_setting = CAST_TO_FN_PTR(signal_setting_t, + dlsym(RTLD_DEFAULT, "JVM_end_signal_setting")); + get_signal_action = CAST_TO_FN_PTR(get_signal_t, + dlsym(RTLD_DEFAULT, "JVM_get_signal_action")); + get_libjsig_version = CAST_TO_FN_PTR(version_getting_t, + dlsym(RTLD_DEFAULT, "JVM_get_libjsig_version")); + libjsig_is_loaded = true; + if (os::Bsd::get_libjsig_version != NULL) { + libjsigversion = (*os::Bsd::get_libjsig_version)(); + } + assert(UseSignalChaining, "should enable signal-chaining"); + } + if (libjsig_is_loaded) { + // Tell libjsig jvm is setting signal handlers + (*begin_signal_setting)(); + } + + set_signal_handler(SIGSEGV, true, true); + set_signal_handler(SIGPIPE, true, true); + set_signal_handler(SIGBUS, true, true); + set_signal_handler(SIGILL, true, true); + set_signal_handler(SIGFPE, true, true); + + + if (os::Bsd::SIGinterrupt() > OLDMAXSIGNUM || os::Bsd::SIGasync() > OLDMAXSIGNUM) { + + // Pre-1.4.1 Libjsig limited to signal chaining signals <= 32 so + // can not register overridable signals which might be > 32 + if (libjsig_is_loaded && libjsigversion <= JSIG_VERSION_1_4_1) { + // Tell libjsig jvm has finished setting signal handlers + (*end_signal_setting)(); + libjsigdone = true; + } + } + + // Never ok to chain our SIGinterrupt + set_signal_handler(os::Bsd::SIGinterrupt(), true, false); + set_signal_handler(os::Bsd::SIGasync(), true, true); + + if (libjsig_is_loaded && !libjsigdone) { + // Tell libjsig jvm finishes setting signal handlers + (*end_signal_setting)(); + } +} + + +void report_error(const char* file_name, int line_no, const char* title, const char* format, ...); + +#if defined(__OpenBSD__) || defined(__FreeBSD__) +const char * signames[] = { + "SIG0", + "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP", + "SIGABRT", "SIGEMT", "SIGFPE", "SIGKILL", "SIGBUS", + "SIGSEGV", "SIGSYS", "SIGPIPE", "SIGALRM", "SIGTERM", + "SIGURG", "SIGSTOP", "SIGTSP", "SIGCONT", "SIGCHLD", + "SIGTTIN", "SIGTTOU", "SIGIO", "SIGXCPU", "SIGXFSZ", + "SIGVTALRM", "SIGPROF", "SIGWINCH", "SIGINFO", "SIGUSR1", + "SIGUSR2" +}; +#else +// XXXBSD: fix names (order) +const char * signames[] = { + "SIG0", + "SIGHUP", "SIGINT", "SIGQUIT", "SIGILL", "SIGTRAP", + "SIGABRT", "SIGEMT", "SIGFPE", "SIGKILL", "SIGBUS", + "SIGSEGV", "SIGSYS", "SIGPIPE", "SIGALRM", "SIGTERM", + "SIGUSR1", "SIGUSR2", "SIGCLD", "SIGPWR", "SIGWINCH", + "SIGURG", "SIGPOLL", "SIGSTOP", "SIGTSTP", "SIGCONT", + "SIGTTIN", "SIGTTOU", "SIGVTALRM", "SIGPROF", "SIGXCPU", + "SIGXFSZ", "SIGWAITING", "SIGLWP", "SIGFREEZE", "SIGTHAW", + "SIGCANCEL", "SIGLOST" +}; +#endif + +const char * os::exception_name(int exception_code, char* buf, int size) { + if (0 < exception_code && exception_code <= SIGRTMAX) { + // signal + if (exception_code < sizeof(signames)/sizeof(const char*)) { + jio_snprintf(buf, size, "%s", signames[exception_code]); + } else { + jio_snprintf(buf, size, "SIG%d", exception_code); + } + return buf; + } else { + return NULL; + } +} + +#if SOLARIS +static address resolve_symbol(const char *name) { + address addr; + + addr = (address) dlsym(RTLD_DEFAULT, name); + if(addr == NULL) { + // RTLD_DEFAULT was not defined on some early versions of 2.5.1 + addr = (address) dlsym(RTLD_NEXT, name); + if(addr == NULL) { + fatal(dlerror()); + } + } + return addr; +} +#endif + +// this is called _before_ the global arguments have been parsed +void os::init(void) { + _initial_pid = getpid(); + +#if SOLARIS + max_hrtime = first_hrtime = gethrtime(); +#endif + start_time = getTimeNanos(); + + init_random(1234567); + +#if 1 + page_size = getpagesize(); +#else + page_size = sysconf(_SC_PAGESIZE); + if (page_size == -1) + fatal1("os_bsd.cpp: os::init: sysconf failed (%s)", strerror(errno)); +#endif + + Bsd::initialize_system_info(); + + // (Solaris only) this switches to calls that actually do locking. + ThreadCritical::initialize(); + + main_thread = pthread_self(); + + // Constant minimum stack size allowed. It must be at least + // the minimum of what the OS supports (thr_min_stack()), and + // enough to allow the thread to get to user bytecode execution. +/* + Bsd::min_stack_allowed = MAX2(thr_min_stack(), Bsd::min_stack_allowed); + */ + + // If the pagesize of the VM is greater than 8K determine the appropriate + // number of initial guard pages. The user can change this with the + // command line arguments, if needed. + if (vm_page_size() > 8*K) { + StackYellowPages = 1; + StackRedPages = 1; + StackShadowPages = round_to((StackShadowPages*8*K), vm_page_size()); + } +} + +// To install functions for atexit system call +extern "C" { + static void perfMemory_exit_helper() { + perfMemory_exit(); + } +} + +// this is called _after_ the global arguments have been parsed +jint os::init_2(void) { + + // XXX ugly hack for 32-bit address space, since we know the + // java heap is allocated with mmap() not sbrk(): +#if SSIZE_MAX == 0x7fffffff + // set the max datasegment size to something reasonable + // complain if getrlimit/setrlimit fails but continue regardless. + struct rlimit dseg_size; + int status = getrlimit(RLIMIT_DATA, &dseg_size); + if (status != 0) { + if (PrintMiscellaneous && (Verbose || WizardMode)) + perror("os::init_2 getrlimit failed"); + } else { + if (dseg_size.rlim_max > 1000 * 1024 * 1024) { + dseg_size.rlim_max = 500 * 1024 * 1024; + dseg_size.rlim_cur = 500 * 1024 * 1024; + status = setrlimit(RLIMIT_DATA, &dseg_size); + if (status != 0) { + if (PrintMiscellaneous && (Verbose || WizardMode)) + perror("os::init_2 setrlimit failed"); + } + } + } +#endif + + // Allocate a single page and mark it as readable for safepoint polling + if( SafepointPolling ) { + address polling_page = (address) ::mmap(NULL, page_size, + PROT_READ, MAP_PRIVATE|MAP_ANON, -1, 0); + os::set_polling_page( polling_page ); + +#ifndef PRODUCT + if( Verbose ) + tty->print("[SafePoint Polling address: " INTPTR_FORMAT "]\n", (intptr_t)polling_page); +#endif + } + + if (!UseMembar) { + address mem_serialize_page = (address) ::mmap(NULL, page_size, + PROT_READ | PROT_WRITE, + MAP_PRIVATE|MAP_ANON, + -1, 0); + guarantee( mem_serialize_page != NULL, + "mmap Failed for memory serialize page"); + os::set_memory_serialize_page( mem_serialize_page ); + } + + if (UseLargePages) { + tty->print_cr("\nLarge pages not supported on this OS.\n"); + exit(1); + } + + // Check minimum allowable stack size for thread creation and to initialize + // the java system classes, including StackOverflowError - depends on page + // size. Add a page for compiler2 recursion in main thread. + // Add in BytesPerWord times page size to account for VM stack during + // class initialization depending on 32 or 64 bit VM. + guarantee((Bsd::min_stack_allowed >= + (StackYellowPages+StackRedPages+StackShadowPages+BytesPerWord + COMPILER2_ONLY(+1)) * page_size), + "need to increase Bsd::min_stack_allowed on this platform"); + + size_t threadStackSizeInBytes = ThreadStackSize * K; + if (threadStackSizeInBytes != 0 && + threadStackSizeInBytes < Bsd::min_stack_allowed) { + tty->print_cr("\nThe stack size specified is too small, Specify at least %dk", + Bsd::min_stack_allowed/K); + return JNI_ERR; + } + + // For Solaris 10+, there will be a 64kb page size, which makes + // the usable default stack size quite a bit less. Increase the + // stack for 64kb (or any > than 8kb) pages, this increases + // virtual memory fragmentation (since we're not creating the + // stack on a power of 2 boundary. The real fix for this + // should be to fix the guard page mechanism. + + if (vm_page_size() > 8*K) { + threadStackSizeInBytes = (threadStackSizeInBytes != 0) + ? threadStackSizeInBytes + + ((StackYellowPages + StackRedPages) * vm_page_size()) + : 0; + ThreadStackSize = threadStackSizeInBytes/K; + } + + // Make the stack size a multiple of the page size so that + // the yellow/red zones can be guarded. + JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes, + vm_page_size())); + + Bsd::signal_sets_init(); + Bsd::init_signal_mem(); + os::signal_init_pd(); + // XXXBSD always UseTopLevelExceptionFilter ? + Bsd::install_signal_handlers(); + + if (libjsigversion < JSIG_VERSION_1_4_1) { + Maxlibjsigsigs = OLDMAXSIGNUM; + } + + // XXXBSD: ??? + if (MaxFDLimit) { + // set the number of file descriptors to max. print out error + // if getrlimit/setrlimit fails but continue regardless. + struct rlimit nbr_files; + int status = getrlimit(RLIMIT_NOFILE, &nbr_files); + if (status != 0) { + if (PrintMiscellaneous && (Verbose || WizardMode)) + perror("os::init_2 getrlimit failed"); + } else { + nbr_files.rlim_cur = nbr_files.rlim_max; + status = setrlimit(RLIMIT_NOFILE, &nbr_files); + if (status != 0) { + if (PrintMiscellaneous && (Verbose || WizardMode)) + perror("os::init_2 setrlimit failed"); + } + } + } + + // Initialize HPI. + jint hpi_result = hpi::initialize(); + if (hpi_result != JNI_OK) { + tty->print_cr("There was an error trying to initialize the HPI library."); + tty->print_cr("Please check your installation, HotSpot does not work correctly"); + tty->print_cr("when installed in the JDK 1.2 Solaris Production Release, or"); + tty->print_cr("with any JDK 1.1.x release."); + return hpi_result; + } + + // Calculate theoretical max. size of Threads to guard gainst + // artifical out-of-memory situations, where all available address- + // space has been reserved by thread stacks. Default stack size is 1Mb. + size_t pre_thread_stack_size = (JavaThread::stack_size_at_create()) ? + JavaThread::stack_size_at_create() : (1*K*K); + assert(pre_thread_stack_size != 0, "Must have a stack"); + // Solaris has a maximum of 4Gb of user programs. Calculate the thread limit when + // we should start doing Virtual Memory banging. Currently when the threads will + // have used all but 200Mb of space. + size_t max_address_space = ((unsigned int)4 * K * K * K) - (200 * K * K); + Bsd::_os_thread_limit = max_address_space / pre_thread_stack_size; + + // at-exit methods are called in the reverse order of their registration. + // In Solaris 7 and earlier, atexit functions are called on return from + // main or as a result of a call to exit(3C). There can be only 32 of + // these functions registered and atexit() does not set errno. In Solaris + // 8 and later, there is no limit to the number of functions registered + // and atexit() sets errno. In addition, in Solaris 8 and later, atexit + // functions are called upon dlclose(3DL) in addition to return from main + // and exit(3C). + + if (PerfAllowAtExitRegistration) { + // only register atexit functions if PerfAllowAtExitRegistration is set. + // atexit functions can be delayed until process exit time, which + // can be problematic for embedded VM situations. Embedded VMs should + // call DestroyJavaVM() to assure that VM resources are released. + + // note: perfMemory_exit_helper atexit function may be removed in + // the future if the appropriate cleanup code can be added to the + // VM_Exit VMOperation's doit method. + if (atexit(perfMemory_exit_helper) != 0) { + warning("os::init2 atexit(perfMemory_exit_helper) failed"); + } + } + + return JNI_OK; +} + + +// Mark the polling page as unreadable +void os::make_polling_page_unreadable(void) { + if( !SafepointPolling ) + return; + + if( ::mprotect((char *)_polling_page, page_size, PROT_NONE) != 0 ) + fatal("Could not disable polling page"); +}; + +// Mark the polling page as readable +void os::make_polling_page_readable(void) { + if( !SafepointPolling ) + return; + + if( ::mprotect((char *)_polling_page, page_size, PROT_READ) != 0 ) + fatal("Could not enable polling page"); +}; + +// OS interface. + +int os::stat(const char *path, struct stat *sbuf) { + char pathbuf[MAX_PATH]; + if (strlen(path) > MAX_PATH - 1) { + errno = ENAMETOOLONG; + return -1; + } + hpi::native_path(strcpy(pathbuf, path)); + return ::stat(pathbuf, sbuf); +} + + +bool os::check_heap(bool force) { return true; } + +typedef int (*vsnprintf_t)(char* buf, size_t count, const char* fmt, va_list argptr); +static vsnprintf_t sol_vsnprintf = NULL; + +int local_vsnprintf(char* buf, size_t count, const char* fmt, va_list argptr) { + if (!sol_vsnprintf) { + //search for the named symbol in the objects that were loaded after libjvm + void* where = RTLD_NEXT; + if ((sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "__vsnprintf"))) == NULL) + sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "vsnprintf")); + if (!sol_vsnprintf){ + //search for the named symbol in the objects that were loaded before libjvm + where = RTLD_DEFAULT; + if ((sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "__vsnprintf"))) == NULL) + sol_vsnprintf = CAST_TO_FN_PTR(vsnprintf_t, dlsym(where, "vsnprintf")); + assert(sol_vsnprintf != NULL, "vsnprintf not found"); + } + } + return (*sol_vsnprintf)(buf, count, fmt, argptr); +} + + +// Is a (classpath) directory empty? +bool os::dir_is_empty(const char* path) { + DIR *dir = NULL; + struct dirent *ptr; + + dir = opendir(path); + if (dir == NULL) return true; + + /* Scan the directory */ + bool result = true; + char buf[sizeof(struct dirent) + MAX_PATH]; + struct dirent *dbuf = (struct dirent *) buf; + while (result && (ptr = readdir(dir, dbuf)) != NULL) { + if (strcmp(ptr->d_name, ".") != 0 && strcmp(ptr->d_name, "..") != 0) { + result = false; + } + } + closedir(dir); + return result; +} + +// create binary file, rewriting existing file if required +int os::create_binary_file(const char* path, bool rewrite_existing) { + int oflags = O_WRONLY | O_CREAT; + if (!rewrite_existing) { + oflags |= O_EXCL; + } + return ::open(path, oflags, S_IREAD | S_IWRITE); +} + +// return current position of file pointer +jlong os::current_file_offset(int fd) { + return (jlong)::lseek(fd, (off_t)0, SEEK_CUR); +} + +// move file pointer to the specified offset +jlong os::seek_to_file_offset(int fd, jlong offset) { + return (jlong)::lseek(fd, offset, SEEK_SET); +} + + +// XXXBSD: ??? +// Map a block of memory. +char* os::map_memory(int fd, const char* file_name, size_t file_offset, + char *addr, size_t bytes, bool read_only, + bool allow_exec) { + int prot; + int flags; + + if (read_only) { + prot = PROT_READ; + flags = MAP_SHARED; + } else { + prot = PROT_READ | PROT_WRITE; + flags = MAP_PRIVATE; + } + + if (allow_exec) { + prot |= PROT_EXEC; + } + + if (addr != NULL) { + flags |= MAP_FIXED; + } + + char* mapped_address = (char*)mmap(addr, (size_t)bytes, prot, flags, + fd, file_offset); + if (mapped_address == MAP_FAILED) { + return NULL; + } + return mapped_address; +} + + +// Unmap a block of memory. +bool os::unmap_memory(char* addr, size_t bytes) { + return munmap(addr, bytes) == 0; +} + + +#if SOLARIS +const intptr_t thr_time_off = (intptr_t)(&((prusage_t *)(NULL))->pr_utime); +const intptr_t thr_time_size = (intptr_t)(&((prusage_t *)(NULL))->pr_ttime) - + (intptr_t)(&((prusage_t *)(NULL))->pr_utime); +#endif + + +// JVMTI & JVM monitoring and management support +// The thread_cpu_time() and current_thread_cpu_time() are only +// supported if is_thread_cpu_time_supported() returns true. +// They are not supported on Solaris T1. + +// current_thread_cpu_time(bool) and thread_cpu_time(Thread*, bool) +// are used by JVM M&M and JVMTI to get user+sys or user CPU time +// of a thread. +// +// current_thread_cpu_time() and thread_cpu_time(Thread *) +// returns the fast estimate available on the platform. + +// hrtime_t gethrvtime() return value includes +// user time but does not include system time +jlong os::current_thread_cpu_time() { +#if SOLARIS + return (jlong) gethrvtime(); +#endif +} + +jlong os::thread_cpu_time(Thread *thread) { +#if SOLARIS + // return user level CPU time only to be consistent with + // what current_thread_cpu_time returns. + // thread_cpu_time_info() must be changed if this changes + return os::thread_cpu_time(thread, false /* user time only */); +#endif +} + +jlong os::current_thread_cpu_time(bool user_sys_cpu_time) { +#if SOLARIS + if (user_sys_cpu_time) { + return os::thread_cpu_time(Thread::current(), user_sys_cpu_time); + } else { + return os::current_thread_cpu_time(); + } +#endif +} + +jlong os::thread_cpu_time(Thread *thread, bool user_sys_cpu_time) { +#if SOLARIS + char proc_name[64]; + int count; + prusage_t prusage; + jlong lwp_time; + int fd; + + sprintf(proc_name, "/proc/%d/lwp/%d/lwpusage", + getpid(), + thread->osthread()->lwp_id()); + fd = open(proc_name, O_RDONLY); + if ( fd == -1 ) return -1; + + do { + count = pread(fd, + (void *)&prusage.pr_utime, + thr_time_size, + thr_time_off); + } while (count < 0 && errno == EINTR); + close(fd); + if ( count < 0 ) return -1; + + if (user_sys_cpu_time) { + // user + system CPU time + lwp_time = (((jlong)prusage.pr_stime.tv_sec + + (jlong)prusage.pr_utime.tv_sec) * (jlong)1000000000) + + (jlong)prusage.pr_stime.tv_nsec + + (jlong)prusage.pr_utime.tv_nsec; + } else { + // user level CPU time only + lwp_time = ((jlong)prusage.pr_utime.tv_sec * (jlong)1000000000) + + (jlong)prusage.pr_utime.tv_nsec; + } + + return(lwp_time); +#endif +} + +void os::current_thread_cpu_time_info(jvmtiTimerInfo *info_ptr) { + info_ptr->max_value = ALL_64_BITS; // will not wrap in less than 64 bits + info_ptr->may_skip_backward = false; // elapsed time not wall time + info_ptr->may_skip_forward = false; // elapsed time not wall time + info_ptr->kind = JVMTI_TIMER_USER_CPU; // only user time is returned +} + +void os::thread_cpu_time_info(jvmtiTimerInfo *info_ptr) { + info_ptr->max_value = ALL_64_BITS; // will not wrap in less than 64 bits + info_ptr->may_skip_backward = false; // elapsed time not wall time + info_ptr->may_skip_forward = false; // elapsed time not wall time + info_ptr->kind = JVMTI_TIMER_USER_CPU; // only user time is returned +} + +// XXXBSD: !!! +bool os::is_thread_cpu_time_supported() { + return false; +#if SOLARIS + if ( os::Bsd::T2_libthread() || UseBoundThreads ) { + return true; + } else { + return false; + } +#endif +} + +//--------------------------------------------------------------------------------- +#ifndef PRODUCT + +static address same_page(address x, address y) { + intptr_t page_bits = -os::vm_page_size(); + if ((intptr_t(x) & page_bits) == (intptr_t(y) & page_bits)) + return x; + else if (x > y) + return (address)(intptr_t(y) | ~page_bits) + 1; + else + return (address)(intptr_t(y) & page_bits); +} + +bool os::find(address addr) { + Dl_info dlinfo; + memset(&dlinfo, 0, sizeof(dlinfo)); + if (dladdr(addr, &dlinfo)) { +#ifdef _LP64 + tty->print("0x%016lx: ", addr); +#else + tty->print("0x%08x: ", addr); +#endif + if (dlinfo.dli_sname != NULL) + tty->print("%s+%#lx", dlinfo.dli_sname, addr-(intptr_t)dlinfo.dli_saddr); + else if (dlinfo.dli_fname) + tty->print("", addr-(intptr_t)dlinfo.dli_fbase); + else + tty->print(""); + if (dlinfo.dli_fname) tty->print(" in %s", dlinfo.dli_fname); +#ifdef _LP64 + if (dlinfo.dli_fbase) tty->print(" at 0x%016lx", dlinfo.dli_fbase); +#else + if (dlinfo.dli_fbase) tty->print(" at 0x%08x", dlinfo.dli_fbase); +#endif + tty->cr(); + + if (Verbose) { + // decode some bytes around the PC + address begin = same_page(addr-40, addr); + address end = same_page(addr+40, addr); + address lowest = (address) dlinfo.dli_sname; + if (!lowest) lowest = (address) dlinfo.dli_fbase; + if (begin < lowest) begin = lowest; + Dl_info dlinfo2; + if (dladdr(end, &dlinfo2) && dlinfo2.dli_saddr != dlinfo.dli_saddr + && end > dlinfo2.dli_saddr && dlinfo2.dli_saddr > begin) + end = (address) dlinfo2.dli_saddr; + Disassembler::decode(begin, end); + } + return true; + } + return false; +} + +#endif + +// We do not support anonymous mmap with large page memory. +bool os::can_commit_large_page_memory() { + return false; +} + +static void print_signal_handler(outputStream* st, int sig, + char* buf, int buflen) { + struct sigaction sa; + + sigaction(sig, NULL, &sa); + + st->print("%s: ", os::exception_name(sig, buf, buflen)); + + address handler = (sa.sa_flags & SA_SIGINFO) + ? CAST_FROM_FN_PTR(address, sa.sa_sigaction) + : CAST_FROM_FN_PTR(address, sa.sa_handler); + + if (handler == CAST_FROM_FN_PTR(address, SIG_DFL)) { + st->print("SIG_DFL"); + } else if (handler == CAST_FROM_FN_PTR(address, SIG_IGN)) { + st->print("SIG_IGN"); + } else { + int offset; + bool found = os::dll_address_to_library_name(handler, buf, buflen, &offset); + if (found) { + // skip directory names + const char *p1, *p2; + p1 = buf; + size_t len = strlen(os::file_separator()); + while ((p2 = strstr(p1, os::file_separator())) != NULL) p1 = p2 + len; + st->print("[%s+0x%x]", p1, offset); + } else { + st->print(PTR_FORMAT, handler); + } + } + + st->print (", sa_mask[0]=" PTR32_FORMAT, *(uint32_t*)&sa.sa_mask); + st->print_cr(", sa_flags=" PTR32_FORMAT, sa.sa_flags); +} + +void os::print_signal_handlers(outputStream* st, char* buf, int buflen) { + st->print_cr("Signal Handlers:"); + print_signal_handler(st, SIGSEGV, buf, buflen); + print_signal_handler(st, SIGBUS , buf, buflen); + print_signal_handler(st, SIGFPE , buf, buflen); + print_signal_handler(st, SIGPIPE, buf, buflen); + print_signal_handler(st, SIGILL , buf, buflen); + print_signal_handler(st, SIGUSR1, buf, buflen); + print_signal_handler(st, SIGUSR2, buf, buflen); + print_signal_handler(st, SIGHUP , buf, buflen); + print_signal_handler(st, SIGINT , buf, buflen); + print_signal_handler(st, SIGQUIT, buf, buflen); + print_signal_handler(st, SIGTERM, buf, buflen); +} + +size_t os::large_page_size() { + ShouldNotReachHere(); + return 0; +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,438 @@ +/* + * $Id: os_bsd.hpp,v 1.3 2006/03/13 19:44:56 glewis Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Solaris_OS defines the interface to Solaris operating systems + +class Bsd { + friend class os; + + private: + + static ExtendedPC fetch_top_frame_fast(Thread* thread, intptr_t** ret_younger_sp, intptr_t** ret_sp); + + static void init_thread_fpu_state(void); + + // For signal-chaining + static unsigned long sigs; // mask of signals that have + // preinstalled signal handlers + static struct sigaction *(*get_signal_action)(int); + static struct sigaction *get_preinstalled_handler(int); + static int (*get_libjsig_version)(); + static void save_preinstalled_handler(int, struct sigaction&); + + // For overridable signals + static int _SIGinterrupt; // user-overridable INTERRUPT_SIGNAL + static int _SIGasync; // user-overridable ASYNC_SIGNAL + static void set_SIGinterrupt(int newsig) { _SIGinterrupt = newsig; } + static void set_SIGasync(int newsig) { _SIGasync = newsig; } + + public: + static int SIGinterrupt() { return _SIGinterrupt; } + static int SIGasync() { return _SIGasync; } + static address handler_start, handler_end; // start and end pc of thr_sighndlrinfo + + static bool valid_stack_address(Thread* thread, address sp); + static bool valid_ucontext(Thread* thread, ucontext_t* valid, ucontext_t* suspect); + static ucontext_t* get_valid_uc_in_signal_handler(Thread* thread, + ucontext_t* uc); + + static ExtendedPC ucontext_get_ExtendedPC(ucontext_t* uc); + static intptr_t* ucontext_get_sp(ucontext_t* uc); + // ucontext_get_fp() is only used by Solaris X86 (see note below) + static intptr_t* ucontext_get_fp(ucontext_t* uc); + + // For Analyzer Forte AsyncGetCallTrace profiling support: + // Parameter ret_fp is only used by Solaris X86. + // + // We should have different declarations of this interface in + // os_solaris_i486.hpp and os_solaris_sparc.hpp, but that file + // provides extensions to the os class and not the Solaris class. + static ExtendedPC fetch_frame_from_ucontext(Thread* thread, ucontext_t* uc, + intptr_t** ret_sp, intptr_t** ret_fp); + + static void hotspot_sigmask(Thread* thread); + + protected: + // FreeBSD-specific interface goes here + + static int _processor_count; + static int processor_count() { return _processor_count; } + static julong physical_memory() { return _physical_memory; } + static julong _physical_memory; + static void initialize_system_info(); + static void mpss_sanity_check(); + + public: + + // This boolean allows users to forward their own non-matching signals + // to JVM_handle_solaris_signal, harmlessly. + static bool signal_handlers_are_installed; + + static void signal_sets_init(); + static void install_signal_handlers(); + static void set_signal_handler(int sig, bool set_installed, bool oktochain); + static void init_signal_mem(); + static bool is_sig_ignored(int sig); + + // For signal-chaining + static bool libjsig_is_loaded; // libjsig that interposes sigaction(), + // signal(), sigset() is loaded + static struct sigaction *get_chained_signal_action(int sig); + static bool chained_handler(struct sigaction *actp, int sig, + siginfo_t *siginfo, void *context); + + enum { + clear_interrupted = true + }; + static void setup_interruptible(JavaThread* thread); + static JavaThread* setup_interruptible(); + static void cleanup_interruptible(JavaThread* thread); + +#ifdef ASSERT + static JavaThread* setup_interruptible_native(); + static void cleanup_interruptible_native(JavaThread* thread); +#endif + + static sigset_t* unblocked_signals(); + static sigset_t* vm_signals(); + static sigset_t* allowdebug_blocked_signals(); + + // %%% Following should be promoted to os.hpp: + // Trace number of created threads + static jint _os_thread_limit; + static volatile jint _os_thread_count; + + // Tells whether we're running on an MP machine + static bool is_MP() { + return processor_count() > 1; + }; + + // Minimum stack size a thread can be created with (allowing + // the VM to completely create the thread and enter user code) + + static size_t min_stack_allowed; + + // Stack repair handling + + // none present + + // naked sleep for v8 + static int naked_sleep(); + + // An event is a condition variable with associated mutex. + // (A cond_t is only usable in combination with a mutex_t.) + class Event : public CHeapObj { + private: + #ifndef PRODUCT + debug_only(pthread_t _owner;) + #endif + volatile int _count; + volatile int _nParked ; // # of threads blocked on the _cond + double CachePad [4] ; // increase odds that _mutex is sole occupant of cache line + pthread_mutex_t _mutex[1]; + pthread_cond_t _cond[1]; + public: + Event * FreeNext ; // TSM free list linkage + int Immortal ; // Resides in TSM pool + + public: + Event() { + verify(); + int status; + status = pthread_cond_init(_cond, NULL); + assert(status == 0, "pthread_cond_init"); + status = pthread_mutex_init(_mutex, NULL); + assert(status == 0, "pthread_mutex_init"); + #ifndef PRODUCT + debug_only(_owner = NULL;) + #endif + _count = 0; + _nParked = 0 ; + FreeNext = NULL ; + Immortal = 0 ; + } + ~Event() { + int status; + guarantee (Immortal == 0, "invariant") ; + guarantee (_nParked == 0, "invariant") ; + status = pthread_cond_destroy(_cond); + assert(status == 0, "pthread_cond_destroy"); + status = pthread_mutex_destroy(_mutex); + assert(status == 0, "pthread_mutex_destroy"); + } + // for use in critical sections: + void lock() { + verify(); + int status = pthread_mutex_lock(_mutex); + assert(status == 0, "pthread_mutex_lock"); + #ifndef PRODUCT + debug_only(_owner = pthread_self();) + #endif + } + bool trylock() { + verify(); + int status = pthread_mutex_trylock(_mutex); + if (status == EBUSY || status == EDEADLK) + return false; + assert(status == 0, "pthread_mutex_lock"); + #ifndef PRODUCT + debug_only(_owner = pthread_self();) + #endif + return true; + } + void unlock() { + verify(); + int status = pthread_mutex_unlock(_mutex); + assert(status == 0, "pthread_mutex_unlock"); + #ifndef PRODUCT + debug_only(_owner = NULL;) + #endif + } + int timedwait(struct timespec* abstime) { + verify(); + ++_nParked ; + int status = pthread_cond_timedwait(_cond, _mutex, abstime); + --_nParked ; + assert(status == 0 || status == EINTR || status == ETIMEDOUT, "pthread_cond_timedwait"); + return status; + } + int timedwait(jlong millis) { + struct timespec abst; + Event::compute_abstime(&abst, millis); + return timedwait(&abst); + } + int wait() { + verify(); + ++_nParked ; + int status = pthread_cond_wait(_cond, _mutex); + --_nParked ; + assert(status == 0 || status == EINTR, "pthread_cond_wait"); + return status; + } + void signal() { + verify(); + int status = pthread_cond_signal(_cond); + assert(status == 0, "pthread_cond_signal"); + } + void broadcast() { + verify(); + int status = pthread_cond_broadcast(_cond); + assert(status == 0, "pthread_cond_broadcast"); + } + // functions used to support monitor and interrupt + // Note: park() may wake up spuriously. Use it in a loop. + void park() { + verify(); + lock () ; + while (_count <= 0) { + wait(); + } + assert(_count > 0, "logic error"); + _count--; + unlock(); + } + int park(jlong millis) { + struct timespec abst; + Event::compute_abstime(&abst, millis); + verify(); + int raw ; + int ret = OS_TIMEOUT; + lock(); + + // Object.wait(timo) will return because of + // (a) notification + // (b) timeout + // (c) thread.interrupt + // + // Thread.interrupt and object.notify{All} both call Event::set. + // That is, we treat thread.interrupt as a special case of notification. + // The underlying Solaris implementation, cond_timedwait, admits + // spurious/premature wakeups, but the JLS/JVM spec prevents the + // JVM from making those visible to Java code. As such, we must + // filter out spurious wakeups. We assume all ETIME returns are valid. + // + // TODO: properly differentiate simultaneous notify+interrupt. + // In that case, we should propagate the notify to another waiter. + + while (_count <= 0) { + raw = timedwait(&abst); + if (!FilterSpuriousWakeups) break ; // previous semantics + if (raw == ETIMEDOUT) break ; + // We consume and ignore EINTR and spurious wakeups. + } + if (_count > 0) { + _count--; + ret = OS_OK; + } + unlock(); + return ret; + } + + void unpark() { + verify(); + lock(); + int AnyWaiters = _nParked - _count ; + _count = 1; + + // note - no membars are required. + // Solaris' mutex primitives provide release consistency (at minimum) so + // we don't need to use memory barriers in conjunction with _count + // and _nParked. In fact _count and _nParked don't even need to be volatile. + // + // Note that we signal() _after dropping the lock for "immortal" Events. + // This is safe and avoids a common class of futile wakeups. In rare + // circumstances this can cause a thread to return prematurely from + // cond_{timed}wait() but the spurious wakeup is benign and the victim will + // simply re-test the condition and re-park itself. + // + // Is it safe to signal _after dropping the lock? Viz., + // ... ; unlock(); if (AnyWaiters) signal(); + // From a synchronization standpoint the code fragment is safe, but + // are we guaranteed that the Event referenced by "this" is live at + // the time we signal()? + // Consider the the following scenario: + // + // Code for Thread A: + // { E = new Event(); create new thread B passing E; ... ; E.unpark();} + // Code for Thread B: + // B(E) { E.park(); delete E; ... } + // + // 1: Thread A creates E and then creates a new Thread B, passing E. + // 2: B calls E.park(), sets _nParked = 1 and then and parks. + // 3: A calls E.unpark(), acquires the lock, samples nParked (1), sets _count = 1. + // and then releases the lock(). + // 4: B returns spuriously from cond_{timed}wait(), tests and clears + // _count and returns from park(). B then deletes E. + // Note that the scenarios requires a spurious wakeup! + // 5: A (still in E.unpark()) calls signal() but the Event E is defunct. + // The reference to E is stale. + // + // To avoid the problem we can restrict use signal-after-unlock to + // Immortal Events. Alternately, we could keep _all events in TSM. + + if (AnyWaiters > 0) { + if (Immortal) { + unlock(); signal () ; + } else { + signal(); unlock () ; + } + } else { + unlock () ; + } + } + void reset() { + verify(); + guarantee (_nParked == 0, "invariant") ; + _count = 0; + _nParked = 0 ; + } + + // utility to compute the abstime argument to timedwait: + static struct timespec* compute_abstime(struct timespec* abstime, jlong millis) { + int status = clock_gettime(CLOCK_REALTIME, abstime); + assert(status == 0, "clock_gettime"); + + if (millis <= 0) + return abstime; + + jlong seconds = millis / 1000; + if (seconds > 50000000) + seconds = 50000000; + + millis %= 1000; + + abstime->tv_sec += seconds; + long nsec = abstime->tv_nsec + millis * 1000000; + + if (nsec >= 1000000000) { + abstime->tv_sec += 1; + nsec -= 1000000000; + } + if (nsec >= 1000000000) { // paranoid + abstime->tv_sec += 1; + nsec = 0; + } + abstime->tv_nsec = nsec; + return abstime; + } + + // hook to check for mutex corruption: + void verify() PRODUCT_RETURN; + }; + + // An OSMutex is an abstraction over the different thread libraries' + // mutexes. NOTE that this assumes that mutex_t is identical for + // libthread, liblwp, and pthreads. + class OSMutex : public CHeapObj { + private: + #ifndef PRODUCT + debug_only(volatile pthread_t _owner;) + debug_only(volatile bool _is_owned;) + #endif + pthread_mutex_t _mutex[1]; + + public: + OSMutex() { + verify(); + int status = pthread_mutex_init(_mutex, NULL); + assert(status == 0, "pthread_mutex_init"); + #ifndef PRODUCT + debug_only(_is_owned = false;) + #endif + } + ~OSMutex() { + int status = pthread_mutex_destroy(_mutex); + assert(status == 0, "pthread_mutex_destroy"); + } + // for use in critical sections: + void lock() { + verify(); + int status = pthread_mutex_lock(_mutex); + assert(status == 0, "pthread_mutex_lock"); + #ifndef PRODUCT + assert(_is_owned == false, "pthread_mutex_lock should not have had owner"); + debug_only(_owner = pthread_self();) + debug_only(_is_owned = true;) + #endif + } + bool trylock() { + verify(); + int status = pthread_mutex_trylock(_mutex); + if (status == EBUSY || status == EDEADLK) + return false; + assert(status == 0, "pthread_mutex_trylock"); + #ifndef PRODUCT + debug_only(_owner = pthread_self();) + debug_only(_is_owned = true;) + #endif + return true; + } + void unlock() { + verify(); + #ifndef PRODUCT + debug_only(pthread_t my_id = pthread_self();) + // XXXBSD: pthread_equal()? + assert(_owner == my_id, "pthread_mutex_unlock"); + debug_only(_is_owned = false;) + #endif + int status = pthread_mutex_unlock(_mutex); + assert(status == 0, "pthread_mutex_unlock"); + } + + // hook to check for mutex corruption: + void verify() PRODUCT_RETURN; + void verify_locked() PRODUCT_RETURN; + }; +}; + +//Reconciliation History +// 1.17 99/03/24 14:00:00 os_win32.hpp +// 1.19 99/06/22 16:39:06 os_win32.hpp +// 1.20 99/07/30 14:35:24 os_win32.hpp +// 1.22 99/08/25 11:16:05 os_win32.hpp +//End diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_bsd.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_bsd.inline.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_bsd.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_bsd.inline.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,190 @@ +/* + * $Id: os_bsd.inline.hpp,v 1.4 2006/02/25 15:26:09 truk Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// #include + +inline const char* os::file_separator() { return "/"; } +inline const char* os::line_separator() { return "\n"; } +inline const char* os::path_separator() { return ":"; } + +inline const char* os::jlong_format_specifier() { return "%lld"; } +inline const char* os::julong_format_specifier() { return "%llu"; } + +// Tells whether we're running on an MP machine +inline bool os::is_MP() { return Bsd::is_MP();} + +// File names are case-sensitive on windows only +inline int os::file_name_strcmp(const char* s1, const char* s2) { + return strcmp(s1, s2); +} + +inline bool os::uses_stack_guard_pages() { + return true; +} + +inline bool os::allocate_stack_guard_pages() { + assert(uses_stack_guard_pages(), "sanity check"); +#if !defined(__FreeBSD__) || __FreeBSD__ < 5 + // Since FreeBSD 4 uses malloc() for allocating the thread stack + // there is no need to do anything extra to allocate the guard pages + return false; +#else + // FreeBSD 5+ uses mmap MAP_STACK for allocating the thread stacks. + // Must 'allocate' them or guard pages are ignored. + return true; +#endif +} + + +// On Solaris, reservations are made on a page by page basis, nothing to do. +inline void os::split_reserved_memory(char *base, size_t size, + size_t split, bool realloc) { +} + + +// Bang the shadow pages if they need to be touched to be mapped. +inline void os::bang_stack_shadow_pages() { +} + + +inline DIR* os::opendir(const char* dirname) +{ + assert(dirname != NULL, "just checking"); + return ::opendir(dirname); +} + +inline int os::readdir_buf_size(const char *path) +{ + int size = pathconf(path, _PC_NAME_MAX); + return (size < 0 ? MAXPATHLEN : size) + sizeof(dirent) + 1; +} + +inline struct dirent* os::readdir(DIR* dirp, dirent* dbuf) +{ + dirent* p; + int status; + + assert(dirp != NULL, "just checking"); + + if((status = ::readdir_r(dirp, dbuf, &p)) != 0) { + errno = status; + return NULL; + } else + return p; +} + +inline int os::closedir(DIR *dirp) +{ + assert(dirp != NULL, "just checking"); + return ::closedir(dirp); +} + +//////////////////////////////////////////////////////////////////////////////// +//////////////////////////////////////////////////////////////////////////////// + +// macros for interruptible io and system calls and system call restarting + +#define _INTERRUPTIBLE(_setup, _cmd, _result, _thread, _clear, _before, _after) \ +do { \ + _setup; \ + _before; \ + OSThread* _osthread = _thread->osthread(); \ + if (_thread->has_last_Java_frame()) { \ + /* this is java interruptible io stuff */ \ + if ((os::is_interrupted(_thread, _clear)) \ + || ((_cmd) < 0 && errno == EINTR \ + && os::is_interrupted(_thread, _clear))) { \ + _result = OS_INTRPT; \ + } \ + } else { \ + /* this is normal blocking io stuff */ \ + _cmd; \ + } \ + _after; \ +} while(false) + +// Interruptible io support + restarting of interrupted system calls + +#ifndef ASSERT + +#define INTERRUPTIBLE(_cmd, _result, _clear) do { \ + _INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , ); \ +} while((_result == OS_ERR) && (errno == EINTR)) + +#else + +// This adds an assertion that it is only called from thread_in_native +// The call overhead is skipped for performance in product mode +#define INTERRUPTIBLE(_cmd, _result, _clear) do { \ + _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible_native(_thread) ); \ +} while((_result == OS_ERR) && (errno == EINTR)) + +#endif + +// Used for calls from _thread_in_vm, not from _thread_in_native +#define INTERRUPTIBLE_VM(_cmd, _result, _clear) do { \ + _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible(_thread) ); \ +} while((_result == OS_ERR) && (errno == EINTR)) + +/* Use NORESTART when the system call cannot return EINTR, when something other + than a system call is being invoked, or when the caller must do EINTR + handling. */ + +#ifndef ASSERT + +#define INTERRUPTIBLE_NORESTART(_cmd, _result, _clear) \ + _INTERRUPTIBLE( JavaThread* _thread = (JavaThread*)ThreadLocalStorage::thread(),_result = _cmd, _result, _thread, _clear, , ) + +#else + +// This adds an assertion that it is only called from thread_in_native +// The call overhead is skipped for performance in product mode +#define INTERRUPTIBLE_NORESTART(_cmd, _result, _clear) \ + _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible_native(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible_native(_thread) ) + +#endif + +#define INTERRUPTIBLE_NORESTART_VM(_cmd, _result, _clear) \ + _INTERRUPTIBLE(JavaThread* _thread = os::Bsd::setup_interruptible(), _result = _cmd, _result, _thread, _clear, , os::Bsd::cleanup_interruptible(_thread) ) + +#define INTERRUPTIBLE_RETURN_INT(_cmd, _clear) do { \ + int _result; \ + do { \ + INTERRUPTIBLE(_cmd, _result, _clear); \ + } while((_result == OS_ERR) && (errno == EINTR)); \ + return _result; \ +} while(false) + +#define INTERRUPTIBLE_RETURN_INT_VM(_cmd, _clear) do { \ + int _result; \ + do { \ + INTERRUPTIBLE_VM(_cmd, _result, _clear); \ + } while((_result == OS_ERR) && (errno == EINTR)); \ + return _result; \ +} while(false) + +#define INTERRUPTIBLE_RETURN_INT_NORESTART(_cmd, _clear) do { \ + int _result; \ + INTERRUPTIBLE_NORESTART(_cmd, _result, _clear); \ + return _result; \ +} while(false) + +/* Use the RESTARTABLE macros when interruptible io is not needed */ + +#define RESTARTABLE(_cmd, _result) do { \ + do { \ + _result = _cmd; \ + } while((_result == OS_ERR) && (errno == EINTR)); \ +} while(false) + +#define RESTARTABLE_RETURN_INT(_cmd) do { \ + int _result; \ + RESTARTABLE(_cmd, _result); \ + return _result; \ +} while(false) + diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_share_bsd.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_share_bsd.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/os_share_bsd.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/os_share_bsd.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,65 @@ +/* + * $Id: os_share_bsd.hpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// Defines the interfaces to Solaris operating systems that vary across platforms + +#ifndef CORE +// Synchronous: signal sender waits for the processing to see if update succeeded. +class SetThreadPC_Callback : public OSThread::Sync_Interrupt_Callback { + private: + ExtendedPC _old_addr; + ExtendedPC _new_addr; + volatile bool _result; + + public: + + SetThreadPC_Callback(ExtendedPC old_addr, ExtendedPC new_addr, Monitor *sync) : + OSThread::Sync_Interrupt_Callback(sync) { + _result = false; + _old_addr = old_addr; + _new_addr = new_addr; + } + + void execute(OSThread::InterruptArguments *args); + bool result() { return _result; } +}; +#endif + +// This is a simple callback that just fetches a PC for an interrupted thread. +// The thread need not be suspended and the fetched PC is just a hint. +// Returned PC and nPC are not necessarily consecutive. +// This one is currently used for profiling the VMThread ONLY! + +// Must be synchronous +class GetThreadPC_Callback : public OSThread::Sync_Interrupt_Callback { + private: + ExtendedPC _addr; + + public: + + GetThreadPC_Callback(Monitor *sync) : + OSThread::Sync_Interrupt_Callback(sync) { } + ExtendedPC addr() const { return _addr; } + + void set_addr(ExtendedPC addr) { _addr = addr; } + + void execute(OSThread::InterruptArguments *args); +}; + +// misc +extern "C" { + void signalHandler(int, siginfo_t*, void*); +} +void resolve_lwp_exit_calls(void); +void handle_unexpected_exception(Thread* thread, int sig, siginfo_t* info, address pc, address adjusted_pc); +#ifndef PRODUCT +void continue_with_dump(void); +#endif + +#define PROCFILE_LENGTH 128 + diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/perfMemory_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,1051 @@ +/* + * $Id: perfMemory_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +# include "incls/_precompiled.incl" +# include "incls/_perfMemory_bsd.cpp.incl" + +// put OS-includes here +# include +# include +# include +# include +# include +# include +# include +# include + + +#define PERFDATA_NAME "hsperfdata" +#define UINT_CHARS 11 // 2^32 - 1 can be represented as a string + // using 11 characters, not including a + // null terminator character. + +static char* backing_store_file_name = NULL; // name of the backing store + // file, if successfully created. + +// Standard Memory Implementation Details + +// create the PerfData memory region in standard memory. +// +static char* create_standard_memory(size_t size) { + + // allocate an aligned chuck of memory + char* mapAddress = os::reserve_memory(size); + + if (mapAddress == NULL) { + return NULL; + } + + // commit memory + if (!os::commit_memory(mapAddress, size)) { + if (PrintMiscellaneous && Verbose) { + warning("Could not commit PerfData memory\n"); + } + os::release_memory(mapAddress, size); + return NULL; + } + + return mapAddress; +} + +// delete the PerfData memory region +// +static void delete_standard_memory(char* addr, size_t size) { + + // there are no persistent external resources to cleanup for standard + // memory. since DestroyJavaVM does not support unloading of the JVM, + // cleanup of the memory resource is not performed. The memory will be + // reclaimed by the OS upon termination of the process. + // + return; +} + +// save the specified memory region to the given file +// +// Note: this function might be called from signal handler (by os::abort()), +// don't allocate heap memory. +// +static void save_memory_to_file(char* addr, size_t size) { + + // sizeof(char array) should include the terminating '\0', add 1 for "_" + char destfile[sizeof(PERFDATA_NAME) + UINT_CHARS + 1]; + + // create the name of the file for retaining the instrumentation memory + jio_snprintf(destfile, sizeof(destfile), + "%s_%d", PERFDATA_NAME, os::current_process_id()); + + int result; + + RESTARTABLE(::open(destfile, O_CREAT | O_WRONLY | O_TRUNC, S_IREAD|S_IWRITE),result);; + if (result == OS_ERR) { + if (PrintMiscellaneous && Verbose) { + warning("Could not create Perfdata save file: %s: %s\n", + destfile, strerror(errno)); + } + return; + } + + int fd = result; + + for (size_t remaining = size; remaining > 0;) { + + RESTARTABLE(::write(fd, addr, remaining), result); + if (result == OS_ERR) { + if (PrintMiscellaneous && Verbose) { + warning("Could not write Perfdata save file: %s: %s\n", + destfile, strerror(errno)); + } + return; + } + + remaining -= (size_t)result; + addr += result; + } + + RESTARTABLE(::close(fd), result); + if (PrintMiscellaneous && Verbose) { + if (result == OS_ERR) { + warning("Could not close %s: %s\n", destfile, strerror(errno)); + } + } +} + + +// Shared Memory Implementation Details + +// Note: the solaris and linux shared memory implementation uses the mmap +// interface with a backing store file to implement named shared memory. +// Using the file system as the name space for shared memory allows a +// common name space to be supported across a variety of platforms. It +// also provides a name space that Java applications can deal with through +// simple file apis. +// +// The solaris and linux implementations store the backing store file in +// a user specific temporary directory located in the /tmp file system, +// which is always a local file system and is sometimes a RAM based file +// system. + +// return the user specific temporary directory name. +// +// the caller is expected to free the allocated memory. +// +static char* get_user_tmp_dir(const char* user) { + + const char* tmpdir = os::get_temp_directory(); + const char* perfdir = PERFDATA_NAME; + size_t nbytes = strlen(tmpdir) + strlen(perfdir) + strlen(user) + 2; + char* dirname = NEW_C_HEAP_ARRAY(char, nbytes); + + // construct the path name to user specific tmp directory + snprintf(dirname, nbytes, "%s%s_%s", tmpdir, perfdir, user); + + return dirname; +} + +// convert the given file name into a process id. if the file +// does not meet the file naming constraints, return 0. +// +static pid_t filename_to_pid(const char* filename) { + + // a filename that doesn't begin with a digit is not a + // candidate for conversion. + // + if (!isdigit(*filename)) { + return 0; + } + + // check if file name can be converted to an integer without + // any leftover characters. + // + char* remainder = NULL; + errno = 0; + pid_t pid = (pid_t)strtol(filename, &remainder, 10); + + if (errno != 0) { + return 0; + } + + // check for left over characters. If any, then the filename is + // not a candidate for conversion. + // + if (remainder != NULL && *remainder != '\0') { + return 0; + } + + // successful conversion, return the pid + return pid; +} + + +// check if the given path is considered a secure directory for +// the backing store files. Returns true if the directory exists +// and is considered a secure location. Returns false if the path +// is a symbolic link or if an error occured. +// +static bool is_directory_secure(const char* path) { + struct stat statbuf; + int result = 0; + + RESTARTABLE(::lstat(path, &statbuf), result); + if (result == OS_ERR) { + return false; + } + + // the path exists, now check it's mode + if (S_ISLNK(statbuf.st_mode) || !S_ISDIR(statbuf.st_mode)) { + // the path represents a link or some non-directory file type, + // which is not what we expected. declare it insecure. + // + return false; + } + else { + // we have an existing directory, check if the permissions are safe. + // + if ((statbuf.st_mode & (S_IWGRP|S_IWOTH)) != 0) { + // the directory is open for writing and could be subjected + // to a symlnk attack. declare it insecure. + // + return false; + } + } + return true; +} + + +// return the user name for the given user id +// +// the caller is expected to free the allocated memory. +// +static char* get_user_name(uid_t uid) { + +#if bsd_not_yet + + struct passwd pwent; + + // determine the max pwbuf size from sysconf, and hardcode + // a default if this not available through sysconf. + // + long bufsize = sysconf(_SC_GETPW_R_SIZE_MAX); + if (bufsize == -1) + bufsize = 1024; + + char* pwbuf = NEW_C_HEAP_ARRAY(char, bufsize); + + struct passwd* p = getpwuid_r(uid, &pwent, pwbuf, (int)bufsize); + + if (p == NULL || p->pw_name == NULL || *(p->pw_name) == '\0') { + if (PrintMiscellaneous && Verbose) { + if (p == NULL) { + warning("Could not retrieve passwd entry: %s\n", + strerror(errno)); + } + else { + warning("Could not determine user name: %s\n", + p->pw_name == NULL ? "pw_name = NULL" : + "pw_name zero length"); + } + } + FREE_C_HEAP_ARRAY(char, pwbuf); + return NULL; + } + + char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1); + strcpy(user_name, p->pw_name); + + FREE_C_HEAP_ARRAY(char, pwbuf); + return user_name; + +#else + + struct passwd* p = getpwuid(uid); + if (PrintMiscellaneous && Verbose) { + if (p == NULL) { + jio_fprintf(stderr, "Could not retrieve passwd entry: %s\n", + strerror(errno)); + } + else { + jio_fprintf(stderr, "Could not determine user name: %s\n", + p->pw_name == NULL ? "pw_name = NULL" : + "pw_name zero length"); + } + } + + char* user_name = NEW_C_HEAP_ARRAY(char, strlen(p->pw_name) + 1); + strcpy(user_name, p->pw_name); + return user_name; + +#endif +} + +// return the name of the user that owns the process identified by vmid. +// +// This method uses a slow directory search algorithm to find the backing +// store file for the specified vmid and returns the user name, as determined +// by the user name suffix of the hsperfdata_ directory name. +// +// the caller is expected to free the allocated memory. +// +static char* get_user_name_slow(int vmid, TRAPS) { + + // short circuit the directory search if the process doesn't even exist. + if (kill(vmid, 0) == OS_ERR) { + if (errno == ESRCH) { + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), + "Process not found"); + } + else /* EPERM */ { + THROW_MSG_0(vmSymbols::java_io_IOException(), strerror(errno)); + } + } + + // directory search + char* oldest_user = NULL; + time_t oldest_ctime = 0; + + const char* tmpdirname = os::get_temp_directory(); + + DIR* tmpdirp = os::opendir(tmpdirname); + + if (tmpdirp == NULL) { + return NULL; + } + + // for each entry in the directory that matches the pattern hsperfdata_*, + // open the directory and check if the file for the given vmid exists. + // The file with the expected name and the latest creation date is used + // to determine the user name for the process id. + // + struct dirent* dentry; + char* tdbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(tmpdirname)); + errno = 0; + while ((dentry = os::readdir(tmpdirp, (struct dirent *)tdbuf)) != NULL) { + + // check if the directory entry is a hsperfdata file + if (strncmp(dentry->d_name, PERFDATA_NAME, strlen(PERFDATA_NAME)) != 0) { + continue; + } + + char* usrdir_name = NEW_C_HEAP_ARRAY(char, + strlen(tmpdirname) + strlen(dentry->d_name) + 1); + strcpy(usrdir_name, tmpdirname); + strcat(usrdir_name, dentry->d_name); + + DIR* subdirp = os::opendir(usrdir_name); + + if (subdirp == NULL) { + FREE_C_HEAP_ARRAY(char, usrdir_name); + continue; + } + + // Since we don't create the backing store files in directories + // pointed to by symbolic links, we also don't follow them when + // looking for the files. We check for a symbolic link after the + // call to opendir in order to eliminate a small window where the + // symlink can be exploited. + // + if (!is_directory_secure(usrdir_name)) { + FREE_C_HEAP_ARRAY(char, usrdir_name); + os::closedir(subdirp); + continue; + } + + struct dirent* udentry; + char* udbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(usrdir_name)); + errno = 0; + while ((udentry = os::readdir(subdirp, (struct dirent *)udbuf)) != NULL) { + + if (filename_to_pid(udentry->d_name) == vmid) { + struct stat statbuf; + int result; + + char* filename = NEW_C_HEAP_ARRAY(char, + strlen(usrdir_name) + strlen(udentry->d_name) + 2); + + strcpy(filename, usrdir_name); + strcat(filename, "/"); + strcat(filename, udentry->d_name); + + // don't follow symbolic links for the file + RESTARTABLE(::lstat(filename, &statbuf), result); + if (result == OS_ERR) { + FREE_C_HEAP_ARRAY(char, filename); + continue; + } + + // skip over files that are not regular files. + if (!S_ISREG(statbuf.st_mode)) { + FREE_C_HEAP_ARRAY(char, filename); + continue; + } + + // compare and save filename with latest creation time + if (statbuf.st_size > 0 && statbuf.st_ctime > oldest_ctime) { + + if (statbuf.st_ctime > oldest_ctime) { + char* user = strrchr(dentry->d_name, '_') + 1; + + if (oldest_user != NULL) FREE_C_HEAP_ARRAY(char, oldest_user); + oldest_user = NEW_C_HEAP_ARRAY(char, strlen(user)+1); + + strcpy(oldest_user, user); + oldest_ctime = statbuf.st_ctime; + } + } + + FREE_C_HEAP_ARRAY(char, filename); + } + } + os::closedir(subdirp); + FREE_C_HEAP_ARRAY(char, udbuf); + FREE_C_HEAP_ARRAY(char, usrdir_name); + } + os::closedir(tmpdirp); + FREE_C_HEAP_ARRAY(char, tdbuf); + + return(oldest_user); +} + +// return the name of the user that owns the JVM indicated by the given vmid. +// +static char* get_user_name(int vmid, TRAPS) { + +#if bsd_not_yet + + char psinfo_name[PATH_MAX]; + int result; + + snprintf(psinfo_name, PATH_MAX, "/proc/%d/psinfo", vmid); + + RESTARTABLE(::open(psinfo_name, O_RDONLY), result); + + if (result != OS_ERR) { + int fd = result; + + psinfo_t psinfo; + char* addr = (char*)&psinfo; + + for (size_t remaining = sizeof(psinfo_t); remaining > 0;) { + + RESTARTABLE(::read(fd, addr, remaining), result); + if (result == OS_ERR) { + THROW_MSG_0(vmSymbols::java_io_IOException(), "Read error"); + } + remaining-=result; + addr+=result; + } + + RESTARTABLE(::close(fd), result); + + // get the user name for the effective user id of the process + char* user_name = get_user_name(psinfo.pr_euid); + + return user_name; + } + + if (result == OS_ERR && errno == EACCES) { + + // In this case, the psinfo file for the process id existed, + // but we didn't have permission to access it. + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), + strerror(errno)); + } +#endif + + // at this point, we don't know if the process id itself doesn't + // exist or if the psinfo file doesn't exit. If the psinfo file + // doesn't exist, then we are running on Solaris 2.5.1 or earlier. + // since the structured procfs and old procfs interfaces can't be + // mixed, we attempt to find the file through a directory search. + + return get_user_name_slow(vmid, CHECK_0); +} + +// return the file name of the backing store file for the named +// shared memory region for the given user name and vmid. +// +// the caller is expected to free the allocated memory. +// +static char* get_sharedmem_filename(const char* dirname, int vmid) { + + size_t nbytes = strlen(dirname) + UINT_CHARS + 2; + + char* name = NEW_C_HEAP_ARRAY(char, nbytes); + snprintf(name, nbytes, "%s/%d", dirname, vmid); + + return name; +} + + +// remove file +// +// this method removes the file specified by the given path +// +static void remove_file(const char* path) { + + int result; + + // if the file is a directory, the following unlink will fail. since + // we don't expect to find directories in the user temp directory, we + // won't try to handle this situation. even if accidentially or + // maliciously planted, the directory's presence won't hurt anything. + // + RESTARTABLE(::unlink(path), result); + if (PrintMiscellaneous && Verbose && result == OS_ERR) { + if (errno != ENOENT) { + warning("Could not unlink shared memory backing" + " store file %s : %s\n", path, strerror(errno)); + } + } +} + + +// remove file +// +// this method removes the file with the given file name in the +// named directory. +// +static void remove_file(const char* dirname, const char* filename) { + + size_t nbytes = strlen(dirname) + strlen(filename) + 2; + char* path = NEW_C_HEAP_ARRAY(char, nbytes); + + strcpy(path, dirname); + strcat(path, "/"); + strcat(path, filename); + + remove_file(path); + + FREE_C_HEAP_ARRAY(char, path); +} + + +// cleanup stale shared memory resources +// +// This method attempts to remove all stale shared memory files in +// the named user temporary directory. It scans the named directory +// for files matching the pattern ^$[0-9]*$. For each file found, the +// process id is extracted from the file name and a test is run to +// determine if the process is alive. If the process is not alive, +// any stale file resources are removed. +// +static void cleanup_sharedmem_resources(const char* dirname) { + + // open the user temp directory + DIR* dirp = os::opendir(dirname); + + if (dirp == NULL) { + // directory doesn't exist, so there is nothing to cleanup + return; + } + + if (!is_directory_secure(dirname)) { + // the directory is not a secure directory + return; + } + + // for each entry in the directory that matches the expected file + // name pattern, determine if the file resources are stale and if + // so, remove the file resources. Note, instrumented HotSpot processes + // for this user may start and/or terminate during this search and + // remove or create new files in this directory. The behavior of this + // loop under these conditions is dependent upon the implementation of + // opendir/readdir. + // + struct dirent* entry; + char* dbuf = NEW_C_HEAP_ARRAY(char, os::readdir_buf_size(dirname)); + errno = 0; + while ((entry = os::readdir(dirp, (struct dirent *)dbuf)) != NULL) { + + pid_t pid = filename_to_pid(entry->d_name); + + if (pid == 0) { + + if (strcmp(entry->d_name, ".") != 0 && strcmp(entry->d_name, "..") != 0) { + + // attempt to remove all unexpected files, except "." and ".." + remove_file(dirname, entry->d_name); + } + + errno = 0; + continue; + } + + // we now have a file name that converts to a valid integer + // that could represent a process id . if this process id + // matches the current process id or the process is not running, + // then remove the stale file resources. + // + // process liveness is detected by sending signal number 0 to + // the process id (see kill(2)). if kill determines that the + // process does not exist, then the file resources are removed. + // if kill determines that that we don't have permission to + // signal the process, then the file resources are assumed to + // be stale and are removed because the resources for such a + // process should be in a different user specific directory. + // + if ((pid == os::current_process_id()) || + (kill(pid, 0) == OS_ERR && (errno == ESRCH || errno == EPERM))) { + + remove_file(dirname, entry->d_name); + } + errno = 0; + } + os::closedir(dirp); + FREE_C_HEAP_ARRAY(char, dbuf); +} + +// make the user specific temporary directory. Returns true if +// the directory exists and is secure upon return. Returns false +// if the directory exists but is either a symlink, is otherwise +// insecure, or if an error occurred. +// +static bool make_user_tmp_dir(const char* dirname) { + + // create the directory with 0755 permissions. note that the directory + // will be owned by euid::egid, which may not be the same as uid::gid. + // + if (mkdir(dirname, S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH) == OS_ERR) { + if (errno == EEXIST) { + // The directory already exists and was probably created by another + // JVM instance. However, this could also be the result of a + // deliberate symlink. Verify that the existing directory is safe. + // + if (!is_directory_secure(dirname)) { + // directory is not secure + if (PrintMiscellaneous && Verbose) { + warning("%s directory is insecure\n", dirname); + } + return false; + } + } + else { + // we encountered some other failure while attempting + // to create the directory + // + if (PrintMiscellaneous && Verbose) { + warning("could not create directory %s: %s\n", + dirname, strerror(errno)); + } + return false; + } + } + return true; +} + +// create the shared memory file resources +// +// This method creates the shared memory file with the given size +// This method also creates the user specific temporary directory, if +// it does not yet exist. +// +static int create_sharedmem_resources(const char* dirname, const char* filename, size_t size) { + + // make the user temporary directory + if (!make_user_tmp_dir(dirname)) { + // could not make/find the directory or the found directory + // was not secure + return -1; + } + + int result; + + RESTARTABLE(::open(filename, O_RDWR|O_CREAT|O_TRUNC, S_IREAD|S_IWRITE), result); + if (result == OS_ERR) { + if (PrintMiscellaneous && Verbose) { + warning("could not create file %s: %s\n", filename, strerror(errno)); + } + return -1; + } + + // save the file descriptor + int fd = result; + + // set the file size + RESTARTABLE(::ftruncate(fd, (off_t)size), result); + if (result == OS_ERR) { + if (PrintMiscellaneous && Verbose) { + warning("could not set shared memory file size: %s\n", strerror(errno)); + } + RESTARTABLE(::close(fd), result); + return -1; + } + + return fd; +} + +// open the shared memory file for the given user and vmid. returns +// the file descriptor for the open file or -1 if the file could not +// be opened. +// +static int open_sharedmem_file(const char* filename, int oflags, TRAPS) { + + // open the file + int result; + RESTARTABLE(::open(filename, oflags), result); + if (result == OS_ERR) { + if (errno == ENOENT) { + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), + "Process not found"); + } + else if (errno == EACCES) { + THROW_MSG_0(vmSymbols::java_lang_IllegalArgumentException(), + "Permission denied"); + } + else { + THROW_MSG_0(vmSymbols::java_io_IOException(), strerror(errno)); + } + } + + return result; +} + +// create a named shared memory region. returns the address of the +// memory region on success or NULL on failure. A return value of +// NULL will ultimately disable the shared memory feature. +// +// On Solaris and Linux, the name space for shared memory objects +// is the file system name space. +// +// A monitoring application attaching to a JVM does not need to know +// the file system name of the shared memory object. However, it may +// be convenient for applications to discover the existence of newly +// created and terminating JVMs by watching the file system name space +// for files being created or removed. +// +static char* mmap_create_shared(size_t size) { + + int result; + int fd; + char* mapAddress; + + int vmid = os::current_process_id(); + + char* user_name = get_user_name(geteuid()); + + if (user_name == NULL) + return NULL; + + char* dirname = get_user_tmp_dir(user_name); + char* filename = get_sharedmem_filename(dirname, vmid); + + // cleanup any stale shared memory files + cleanup_sharedmem_resources(dirname); + + assert(((size > 0) && (size % os::vm_page_size() == 0)), + "unexpected PerfMemory region size"); + + fd = create_sharedmem_resources(dirname, filename, size); + + FREE_C_HEAP_ARRAY(char, user_name); + FREE_C_HEAP_ARRAY(char, dirname); + + if (fd == -1) { + FREE_C_HEAP_ARRAY(char, filename); + return NULL; + } + + mapAddress = (char*)::mmap((char*)0, size, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0); + + // attempt to close the file - restart it if it was interrupted, + // but ignore other failures + RESTARTABLE(::close(fd), result); + assert(result != OS_ERR, "could not close file"); + + if (mapAddress == MAP_FAILED) { + if (PrintMiscellaneous && Verbose) { + warning("mmap failed - %s\n", strerror(errno)); + } + remove_file(filename); + FREE_C_HEAP_ARRAY(char, filename); + return NULL; + } + + // save the file name for use in delete_shared_memory() + backing_store_file_name = filename; + + // clear the shared memory region + (void)::memset((void*) mapAddress, 0, size); + + return mapAddress; +} + +// release a named shared memory region +// +static void unmap_shared(char* addr, size_t bytes) { + os::release_memory(addr, bytes); +} + +// create the PerfData memory region in shared memory. +// +static char* create_shared_memory(size_t size) { + + // create the shared memory region. + return mmap_create_shared(size); +} + +// delete the shared PerfData memory region +// +static void delete_shared_memory(char* addr, size_t size) { + + // cleanup the persistent shared memory resources. since DestroyJavaVM does + // not support unloading of the JVM, unmapping of the memory resource is + // not performed. The memory will be reclaimed by the OS upon termination of + // the process. The backing store file is deleted from the file system. + + assert(!PerfDisableSharedMem, "shouldn't be here"); + + if (backing_store_file_name != NULL) { + remove_file(backing_store_file_name); + // Don't.. Free heap memory could deadlock os::abort() if it is called + // from signal handler. OS will reclaim the heap memory. + // FREE_C_HEAP_ARRAY(char, backing_store_file_name); + backing_store_file_name = NULL; + } +} + +// return the size of the file for the given file descriptor +// or 0 if it is not a valid size for a shared memory file +// +static size_t sharedmem_filesize(int fd, TRAPS) { + + struct stat statbuf; + int result; + + RESTARTABLE(::fstat(fd, &statbuf), result); + if (result == OS_ERR) { + if (PrintMiscellaneous && Verbose) { + warning("fstat failed: %s\n", strerror(errno)); + } + THROW_MSG_0(vmSymbols::java_io_IOException(), + "Could not determine PerfMemory size"); + } + + if ((statbuf.st_size == 0) || + ((size_t)statbuf.st_size % os::vm_page_size() != 0)) { + THROW_MSG_0(vmSymbols::java_lang_Exception(), + "Invalid PerfMemory size"); + } + + return (size_t)statbuf.st_size; +} + +// attach to a named shared memory region. +// +static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemoryMode mode, char** addr, size_t* sizep, TRAPS) { + + char* mapAddress; + int result; + int fd; + size_t size; + const char* luser = NULL; + + int mmap_prot; + int file_flags; + + ResourceMark rm; + + // map the high level access mode to the appropriate permission + // constructs for the file and the shared memory mapping. + if (mode == PerfMemory::PERF_MODE_RO) { + mmap_prot = PROT_READ; + file_flags = O_RDONLY; + } + else if (mode == PerfMemory::PERF_MODE_RW) { +#ifdef LATER + mmap_prot = PROT_READ | PROT_WRITE; + file_flags = O_RDWR; +#else + THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), + "Unsupported access mode"); +#endif + } + else { + THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), + "Illegal access mode"); + } + + if (user == NULL || strlen(user) == 0) { + luser = get_user_name(vmid, CHECK); + } + else { + luser = user; + } + + if (luser == NULL) { + THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), + "Could not map vmid to user Name"); + } + + char* dirname = get_user_tmp_dir(luser); + + // since we don't follow symbolic links when creating the backing + // store file, we don't follow them when attaching either. + // + if (!is_directory_secure(dirname)) { + FREE_C_HEAP_ARRAY(char, dirname); + THROW_MSG(vmSymbols::java_lang_IllegalArgumentException(), + "Process not found"); + } + + char* filename = get_sharedmem_filename(dirname, vmid); + + // copy heap memory to resource memory. the open_sharedmem_file + // method below need to use the filename, but could throw an + // exception. using a resource array prevents the leak that + // would otherwise occur. + char* rfilename = NEW_RESOURCE_ARRAY(char, strlen(filename) + 1); + strcpy(rfilename, filename); + + // free the c heap resources that are no longer needed + if (luser != user) FREE_C_HEAP_ARRAY(char, luser); + FREE_C_HEAP_ARRAY(char, dirname); + FREE_C_HEAP_ARRAY(char, filename); + + // open the shared memory file for the give vmid + fd = open_sharedmem_file(rfilename, file_flags, CHECK); + assert(fd != OS_ERR, "unexpected value"); + + if (*sizep == 0) { + size = sharedmem_filesize(fd, CHECK); + assert(size != 0, "unexpected size"); + } + + mapAddress = (char*)::mmap((char*)0, size, mmap_prot, MAP_SHARED, fd, 0); + + // attempt to close the file - restart if it gets interrupted, + // but ignore other failures + RESTARTABLE(::close(fd), result); + assert(result != OS_ERR, "could not close file"); + + if (mapAddress == MAP_FAILED) { + if (PrintMiscellaneous && Verbose) { + warning("mmap failed: %s\n", strerror(errno)); + } + THROW_MSG(vmSymbols::java_lang_OutOfMemoryError(), + "Could not map PerfMemory"); + } + + *addr = mapAddress; + *sizep = size; + + if (PerfTraceMemOps) { + tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at " + INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress); + } +} + + + + +// create the PerfData memory region +// +// This method creates the memory region used to store performance +// data for the JVM. The memory may be created in standard or +// shared memory. +// +void PerfMemory::create_memory_region(size_t size) { + + if (PerfDisableSharedMem) { + // do not share the memory for the performance data. + _start = create_standard_memory(size); + } + else { + _start = create_shared_memory(size); + if (_start == NULL) { + + // creation of the shared memory region failed, attempt + // to create a contiguous, non-shared memory region instead. + // + if (PrintMiscellaneous && Verbose) { + warning("Reverting to non-shared PerfMemory region.\n"); + } + PerfDisableSharedMem = true; + _start = create_standard_memory(size); + } + } + + if (_start != NULL) _capacity = size; + +} + +// delete the PerfData memory region +// +// This method deletes the memory region used to store performance +// data for the JVM. The memory region indicated by the +// tuple will be inaccessible after a call to this method. +// +void PerfMemory::delete_memory_region() { + + assert((start() != NULL && capacity() > 0), "verify proper state"); + + if (PerfDataSaveToFile) { + save_memory_to_file(start(), capacity()); + } + + if (PerfDisableSharedMem) { + delete_standard_memory(start(), capacity()); + } + else { + delete_shared_memory(start(), capacity()); + } +} + +// attach to the PerfData memory region for another JVM +// +// This method returns an tuple that points to +// a memory buffer that is kept reasonably synchronized with +// the PerfData memory region for the indicated JVM. This +// buffer may be kept in synchronization via shared memory +// or some other mechanism that keeps the buffer updated. +// +// If the JVM chooses not to support the attachability feature, +// this method should throw an UnsupportedOperation exception. +// +// This implementation utilizes named shared memory to map +// the indicated process's PerfData memory region into this JVMs +// address space. +// +void PerfMemory::attach(const char* user, int vmid, PerfMemoryMode mode, char** addrp, size_t* sizep, TRAPS) { + + if (vmid == 0 || vmid == os::current_process_id()) { + *addrp = start(); + *sizep = capacity(); + return; + } + + mmap_attach_shared(user, vmid, mode, addrp, sizep, CHECK); +} + +// detach from the PerfData memory region of another JVM +// +// This method detaches the PerfData memory region of another +// JVM, specified as an tuple of a buffer +// in this process's address space. This method may perform +// arbitrary actions to accomplish the detachment. The memory +// region specified by will be inaccessible after +// a call to this method. +// +// If the JVM chooses not to support the attachability feature, +// this method should throw an UnsupportedOperation exception. +// +// This implementation utilizes named shared memory to detach +// the indicated process's PerfData memory region from this +// process's address space. +// +void PerfMemory::detach(char* addr, size_t bytes, TRAPS) { + + assert(addr != 0, "address sanity check"); + assert(bytes > 0, "capacity sanity check"); + + if (PerfMemory::contains(addr) || PerfMemory::contains(addr + bytes - 1)) { + // prevent accidental detachment of this process's PerfMemory region + return; + } + + unmap_shared(addr, bytes); +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/stubRoutines_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/stubRoutines_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/stubRoutines_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/stubRoutines_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,10 @@ +/* + * $Id: stubRoutines_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_stubRoutines_bsd.cpp.incl" diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/threadCritical_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/threadCritical_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/threadCritical_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/threadCritical_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,75 @@ +/* + * $Id: threadCritical_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ + +/* + * Copyright 2003 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_threadCritical_bsd.cpp.incl" + +// OS-includes here +#include + +// +// See threadCritical.hpp for details of this class. +// +// For some reason, we don't do locking until the +// os::init() call completes. I'm not sure why this +// is, and have left it that way for now. This should +// be reviewed later. + +// already initialized if all zeroes +static pthread_mutex_t global_mut = PTHREAD_MUTEX_INITIALIZER;; + +static pthread_t global_mut_owner = NULL; +static int global_mut_count = 0; +static bool initialized = false; + +ThreadCritical::ThreadCritical() { + if (initialized) { + pthread_t owner = pthread_self(); + if (global_mut_owner != owner) { + if (pthread_mutex_lock(&global_mut)) + fatal1("ThreadCritical::ThreadCritical: mutex_lock failed (%s)", strerror(errno)); + assert(global_mut_count == 0, "must have clean count"); + assert(global_mut_owner == NULL, "must have clean owner"); + } + global_mut_owner = owner; + ++global_mut_count; + } else { + assert (Threads::number_of_threads() == 0, "valid only during initialization"); + } +} + +ThreadCritical::~ThreadCritical() { + if (initialized) { + assert(global_mut_owner == pthread_self(), "must have correct owner"); + assert(global_mut_count > 0, "must have correct count"); + --global_mut_count; + if (global_mut_count == 0) { + global_mut_owner = NULL; + if (pthread_mutex_unlock(&global_mut)) + fatal1("ThreadCritical::~ThreadCritical: mutex_unlock failed (%s)", strerror(errno)); + } + } else { + assert (Threads::number_of_threads() == 0, "valid only during initialization"); + } +} + +void ThreadCritical::initialize() { + // This method is called at the end of os::init(). Until + // then, we don't do real locking. + if (pthread_mutex_init(&global_mut, NULL) != 0) { + fatal("Unable to initalize ThreadCritical mutex"); + } else { + initialized = true; + } +} + +void ThreadCritical::release() { + pthread_mutex_destroy(&global_mut); + initialized = false; +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/thread_bsd.inline.hpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,49 @@ +/* + * $Id: thread_bsd.inline.hpp,v 1.4 2006/06/15 21:56:09 truk Exp $ + */ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// Thread::current is "hot" it's called > 128K times in the 1st 500 msecs of +// startup. +// ThreadLocalStorage::thread is warm -- it's called > 16K times in the same +// period. Thread::current() now calls ThreadLocalStorage::thread() directly. +// For SPARC, to avoid excessive register window spill-fill faults, +// we aggressively inline these routines. + +inline Thread* ThreadLocalStorage::thread() { + // don't use specialized code if +UseMallocOnly -- may confuse Purify et al. + debug_only(if (UseMallocOnly) return get_thread_slow();); + + uintptr_t raw = pd_raw_thread_id(); + int ix = pd_cache_index(raw); +// XXXBSD: fast case. +// there was a race condition where the fast case returned a different +// thread from the slow case and has been seen on both OpenBSD and +// FreeBSD, but I think it's fixed, so enable it for now: +#if 1 + Thread *Candidate = ThreadLocalStorage::_get_thread_cache[ix]; + + if (Candidate->_self_raw_id == raw) { + // direct hit + return Candidate; + } + + address stacktop = Candidate->_stack_base; + address stackbot = Candidate->_stack_base - Candidate->_stack_size; + + address sp = pd_sp_address(); + + // is this still the right thread? Check if current stack pointer + // is within the thread's stack, if ok update it with current raw id. + if (stacktop > sp && stackbot <= sp ) { + Candidate->_self_raw_id = raw; + // indirect hit + return Candidate; + } + ix = pd_cache_index(raw); +#endif + return ThreadLocalStorage::get_thread_via_cache_slowly(raw, ix); +} diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/vmError_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/vmError_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/vmError_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/vmError_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,119 @@ +/* + * $Id: vmError_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +# include "incls/_precompiled.incl" +# include "incls/_vmError_bsd.cpp.incl" + +#include +#include +#include + +extern char** environ; + +// Run the specified command in a separate process. Return its exit value, +// or -1 on failure (e.g. can't fork a new process). +// Unlike system(), this function can be called from signal handler. It +// doesn't block SIGINT et al. +int VMError::fork_and_exec(char* cmd) { + char * argv[4]; + argv[0] = (char *)"sh"; + argv[1] = (char *)"-c"; + argv[2] = cmd; + argv[3] = NULL; + + // fork is async-safe, fork1 is not. + pid_t pid = fork(); + + if (pid < 0) { + // fork failed + return -1; + + } else if (pid == 0) { + // child process + + // try to be consistent with system(), which uses "/usr/bin/sh" on Solaris + execve("/usr/bin/sh", argv, environ); + + // execve failed + _exit(-1); + + } else { + // copied from J2SE ..._waitForProcessExit() in UNIXProcess_md.c; we don't + // care about the actual exit code, for now. + + int status; + + // Wait for the child process to exit. This returns immediately if + // the child has already exited. */ + while (waitpid(pid, &status, 0) < 0) { + switch (errno) { + case ECHILD: return 0; + case EINTR: break; + default: return -1; + } + } + + if (WIFEXITED(status)) { + // The child exited normally; get its exit code. + return WEXITSTATUS(status); + } else if (WIFSIGNALED(status)) { + // The child exited because of a signal + // The best value to return is 0x80 + signal number, + // because that is what all Unix shells do, and because + // it allows callers to distinguish between process exit and + // process death by signal. + return 0x80 + WTERMSIG(status); + } else { + // Unknown exit code; pass it through + return status; + } + } +} + +void VMError::show_message_box(char *buf, int buflen) { + bool yes; + do { + error_string(buf, buflen); + int len = (int)strlen(buf); + char *p = &buf[len]; + + jio_snprintf(p, buflen - len, + "\n\n" + "Do you want to debug the problem?\n\n" + "To debug, run 'dbx - %d'; then switch to thread " INTX_FORMAT "\n" + "Enter 'yes' to launch dbx automatically (PATH must include dbx)\n" + "Otherwise, press RETURN to abort...", + os::current_process_id(), os::current_thread_id()); + + yes = os::message_box("Unexpected Error", buf); + + if (yes) { + // yes, user asked VM to launch debugger + jio_snprintf(buf, buflen, "dbx - %d", os::current_process_id()); + + fork_and_exec(buf); + } + } while (yes); +} + +static void crash_handler(int sig, siginfo_t* info, void* ucVoid) { + // unmask current signal + sigset_t newset; + sigemptyset(&newset); + sigaddset(&newset, sig); + sigprocmask(SIG_UNBLOCK, &newset, NULL); + + VMError err(NULL, sig, NULL, info, ucVoid); + err.report_and_die(); +} + +void VMError::reset_signal_handlers() { + os::signal(SIGSEGV, CAST_FROM_FN_PTR(void *, crash_handler)); + os::signal(SIGBUS, CAST_FROM_FN_PTR(void *, crash_handler)); +} + diff -ruN jdk-1_5_0_11/hotspot/src/os/bsd/vm/vtune_bsd.cpp jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/vtune_bsd.cpp --- jdk-1_5_0_11/hotspot/src/os/bsd/vm/vtune_bsd.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os/bsd/vm/vtune_bsd.cpp 2007-02-24 09:06:01.000000000 +0100 @@ -0,0 +1,34 @@ +/* + * $Id: vtune_bsd.cpp,v 1.2 2004/12/20 10:06:24 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_vtune_bsd.cpp.incl" + +// empty implementation + +void VTune::start_GC() {} +void VTune::end_GC() {} +void VTune::start_class_load() {} +void VTune::end_class_load() {} +void VTune::exit() {} +void VTune::register_stub(const char* name, address start, address end) {} + +#ifndef CORE +void VTune::create_nmethod(nmethod* nm) {} +void VTune::delete_nmethod(nmethod* nm) {} +#endif + +void vtune_init() {} + + +//Reconciliation History +// 1.7 98/05/15 09:52:12 vtune_win32.cpp +// 1.8 98/11/11 13:22:55 vtune_win32.cpp +// 1.9 98/12/04 17:37:54 vtune_win32.cpp +// 1.12 99/06/28 11:01:49 vtune_win32.cpp +//End diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/assembler_bsd_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/assembler_bsd_amd64.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/assembler_bsd_amd64.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/assembler_bsd_amd64.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,62 @@ +/* + * $Id: assembler_bsd_amd64.cpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_assembler_bsd_amd64.cpp.incl" + +void Assembler::int3() +{ + call(CAST_FROM_FN_PTR(address, os::breakpoint), + relocInfo::runtime_call_type); +} + +void MacroAssembler::get_thread(Register thread) +{ + // call pthread_getspecific + // void * pthread_getspecific(pthread_key_t key); + if (thread != rax) { + pushq(rax); + } + pushq(rdi); + pushq(rsi); + pushq(rdx); + pushq(rcx); + pushq(r8); + pushq(r9); + pushq(r10); + // XXX + movq(r10, rsp); + andq(rsp, -16); + pushq(r10); + pushq(r11); + + movl(rdi, ThreadLocalStorage::thread_index()); + call(CAST_FROM_FN_PTR(address, pthread_getspecific), + relocInfo::runtime_call_type); + + popq(r11); + popq(rsp); + popq(r10); + popq(r9); + popq(r8); + popq(rcx); + popq(rdx); + popq(rsi); + popq(rdi); + if (thread != rax) { + movq(thread, rax); + popq(rax); + } +} + +// NOTE: since the linux kernel resides at the low end of +// user address space, no null pointer check is needed. +bool MacroAssembler::needs_explicit_null_check(int offset) +{ + return offset < 0 || offset >= 0x100000; +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/atomic_bsd_amd64.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/atomic_bsd_amd64.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/atomic_bsd_amd64.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/atomic_bsd_amd64.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,214 @@ +/* + * $Id: atomic_bsd_amd64.inline.hpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Implementation of class atomic + +inline void Atomic::store(jbyte store_value, jbyte*dest) +{ + *dest = store_value; +} + +inline void Atomic::store(jshort store_value, jshort* dest) +{ + *dest = store_value; +} + +inline void Atomic::store(jint store_value, jint* dest) +{ + *dest = store_value; +} + +inline void Atomic::store(jlong store_value, jlong* dest) +{ + *dest = store_value; +} + +inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) +{ + *dest = store_value; +} + +inline void Atomic::store_ptr(void* store_value, void* dest) +{ + *(void**) dest = store_value; +} + +inline void Atomic::store(jbyte store_value, volatile jbyte* dest) +{ + *dest = store_value; +} + +inline void Atomic::store(jshort store_value, volatile jshort* dest) +{ + *dest = store_value; +} + +inline void Atomic::store(jint store_value, volatile jint* dest) +{ + *dest = store_value; +} + +inline void Atomic::store(jlong store_value, volatile jlong* dest) +{ + *dest = store_value; +} + +inline void Atomic::store_ptr(intptr_t store_value, volatile intptr_t* dest) +{ + *dest = store_value; +} + +inline void Atomic::store_ptr(void* store_value, volatile void* dest) +{ + *(void* volatile *) dest = store_value; +} + +// XXX remove LOCKs on non-mp +// Adding a lock prefix to an instruction on MP machine +// #define LOCK_IF_MP(mp) "cmp $0, " #mp "; je 1f; lock; 1: " + +inline jint Atomic::add(jint add_value, volatile jint* dest) +{ + jint addend = add_value; + __asm__ __volatile__ ("lock ; xaddl %0, (%2)" + : "=r" (addend) + : "0" (addend), "r" (dest) + : "memory"); + return addend + add_value; +} + +inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) +{ + intptr_t addend = add_value; + __asm__ __volatile__ ("lock ; xaddq %0,(%2)" + : "=r" (addend) + : "0" (addend), "r" (dest) + : "memory"); + return addend + add_value; +} + +inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) +{ + intptr_t addend = add_value; + __asm__ __volatile__ ("lock ; xaddq %0,(%2)" + : "=r" (addend) + : "0" (addend), "r" (dest) + : "memory"); + return (void*) (addend + add_value); +} + +inline void Atomic::inc(volatile jint* dest) +{ + __asm__ __volatile__ ("lock ; incl (%0)" : : "r" (dest) : "memory"); +} + +inline void Atomic::inc_ptr(volatile intptr_t* dest) +{ + __asm__ __volatile__ ("lock ; incq (%0)" : : "r" (dest) : "memory"); +} + +inline void Atomic::inc_ptr(volatile void* dest) +{ + __asm__ __volatile__ ("lock ; incq (%0)" : : "r" (dest) : "memory"); +} + +inline void Atomic::dec(volatile jint* dest) +{ + __asm__ __volatile__ ("lock ; decl (%0)" : : "r" (dest) : "memory"); +} + +inline void Atomic::dec_ptr(volatile intptr_t* dest) +{ + __asm__ __volatile__ ("lock ; decq (%0)" : : "r" (dest) : "memory"); +} + +inline void Atomic::dec_ptr(volatile void* dest) +{ + __asm__ __volatile__ ("lock ; decq (%0)" : : "r" (dest) : "memory"); +} + + +inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) +{ + __asm__ __volatile__ ("xchgl (%2),%0" + : "=r" (exchange_value) + : "0" (exchange_value), "r" (dest) + : "memory"); + return exchange_value; +} + +inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, + volatile intptr_t* dest) +{ + __asm__ __volatile__ ("xchgq (%2),%0" + : "=r" (exchange_value) + : "0" (exchange_value), "r" (dest) + : "memory"); + return exchange_value; +} + +inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) +{ + __asm__ __volatile__ ("xchgq (%2),%0" + : "=r" (exchange_value) + : "0" (exchange_value), "r" (dest) + : "memory"); + return exchange_value; +} + +inline jint Atomic::cmpxchg(jint exchange_value, + volatile jint* dest, + jint compare_value) +{ + __asm__ __volatile__ ("lock ; cmpxchgl %1,(%3)" + : "=a" (exchange_value) + : "r" (exchange_value), + "a" (compare_value), + "r" (dest) + : "memory"); + return exchange_value; +} + +inline jlong Atomic::cmpxchg(jlong exchange_value, + volatile jlong* dest, + jlong compare_value) +{ + __asm__ __volatile__ ("lock ; cmpxchgq %1,(%3)" + : "=a" (exchange_value) + : "r" (exchange_value), + "a" (compare_value), + "r" (dest) + : "memory"); + return exchange_value; +} + +inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, + volatile intptr_t* dest, + intptr_t compare_value) +{ + __asm__ __volatile__ ("lock ; cmpxchgq %1,(%3)" + : "=a" (exchange_value) + : "r" (exchange_value), + "a" (compare_value), + "r" (dest) + : "memory"); + return exchange_value; +} + +inline void* Atomic::cmpxchg_ptr(void* exchange_value, + volatile void* dest, + void* compare_value) +{ + __asm__ __volatile__ ("lock ; cmpxchgq %1,(%3)" + : "=a" (exchange_value) + : "r" (exchange_value), + "a" (compare_value), + "r" (dest) + : "memory"); + return exchange_value; +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.ad jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.ad --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.ad 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.ad 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,211 @@ +// $Id: bsd_amd64.ad,v 1.2 2004/12/23 19:35:20 phantom Exp $ +// +// Based on: @(#)linux_amd64.ad 1.7 04/07/29 16:36:13 JVM +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// AMD64 Bsd Architecture Description File + +//----------OS-DEPENDENT ENCODING BLOCK---------------------------------------- +// This block specifies the encoding classes used by the compiler to +// output byte streams. Encoding classes generate functions which are +// called by Machine Instruction Nodes in order to generate the bit +// encoding of the instruction. Operands specify their base encoding +// interface with the interface keyword. There are currently +// supported four interfaces, REG_INTER, CONST_INTER, MEMORY_INTER, & +// COND_INTER. REG_INTER causes an operand to generate a function +// which returns its register number when queried. CONST_INTER causes +// an operand to generate a function which returns the value of the +// constant when queried. MEMORY_INTER causes an operand to generate +// four functions which return the Base Register, the Index Register, +// the Scale Value, and the Offset Value of the operand when queried. +// COND_INTER causes an operand to generate six functions which return +// the encoding code (ie - encoding bits for the instruction) +// associated with each basic boolean condition for a conditional +// instruction. Instructions specify two basic values for encoding. +// They use the ins_encode keyword to specify their encoding class +// (which must be one of the class names specified in the encoding +// block), and they use the opcode keyword to specify, in order, their +// primary, secondary, and tertiary opcode. Only the opcode sections +// which a particular instruction needs for encoding need to be +// specified. +encode %{ + // Build emit functions for each basic byte or larger field in the intel + // encoding scheme (opcode, rm, sib, immediate), and call them from C++ + // code in the enc_class source block. Emit functions will live in the + // main source block for now. In future, we can generalize this by + // adding a syntax that specifies the sizes of fields in an order, + // so that the adlc can build the emit functions automagically + + enc_class Java_To_Runtime(method meth) + %{ + // No relocation needed + + // movq r10, + emit_opcode(cbuf, Assembler::REX_WB); + emit_opcode(cbuf, 0xB8 | (R10_enc - 8)); + emit_d64(cbuf, (int64_t) $meth$$method); + + // call (r10) + emit_opcode(cbuf, Assembler::REX_B); + emit_opcode(cbuf, 0xFF); + emit_opcode(cbuf, 0xD0 | (R10_enc - 8)); + %} + + enc_class Java_To_Native(method meth) + %{ + // No relocation needed + + // movq r10, + emit_opcode(cbuf, Assembler::REX_WB); + emit_opcode(cbuf, 0xB8 | (R10_enc - 8)); + emit_d64(cbuf, (int64_t) $meth$$method); + + // call (r10) + emit_opcode(cbuf, Assembler::REX_B); + emit_opcode(cbuf, 0xFF); + emit_opcode(cbuf, 0xD0 | (R10_enc - 8)); + %} + + enc_class bsd_breakpoint + %{ + MacroAssembler* masm = new MacroAssembler(&cbuf); + masm->call(CAST_FROM_FN_PTR(address, os::breakpoint), + relocInfo::runtime_call_type); + %} + + enc_class call_epilog + %{ + if (VerifyStackAtCalls) { + // Check that stack depth is unchanged: find majik cookie on stack + int framesize = + ra_->reg2offset_unchecked(OptoReg::add(ra_->_matcher._old_SP, -2)); + if (framesize) { + if (framesize < 0x80) { + emit_opcode(cbuf, Assembler::REX_W); + emit_opcode(cbuf, 0x81); // cmpq [rsp+0],0xbadb1ood + emit_d8(cbuf, 0x7C); + emit_d8(cbuf, 0x24); + emit_d8(cbuf, framesize); // Find majik cookie from ESP + emit_d32(cbuf, 0xbadb100d); + } else { + emit_opcode(cbuf, Assembler::REX_W); + emit_opcode(cbuf, 0x81); // cmpq [rsp+0],0xbadb1ood + emit_d8(cbuf, 0xBC); + emit_d8(cbuf, 0x24); + emit_d32(cbuf, framesize); // Find majik cookie from ESP + emit_d32(cbuf, 0xbadb100d); + } + } + // jmp EQ around INT3 + // QQQ TODO + const int jump_around = 5; // size of call to breakpoint, 1 for CC + emit_opcode(cbuf, 0x74); + emit_d8(cbuf, jump_around); + // QQQ temporary + emit_break(cbuf); + // Die if stack mismatch + // emit_opcode(cbuf,0xCC); + } + %} + + enc_class post_call_restore_mxcsr %{ + cbuf.set_mark(); + // ldmxcsr mxcsr_std + emit_opcode(cbuf, 0x0F); + emit_opcode(cbuf, 0xAE); + emit_rm(cbuf, 0x0, 0x2, 0x5); // 00 /2 101 + emit_d32_reloc(cbuf, + (int) (StubRoutines::amd64::mxcsr_std() - cbuf.code_end() - 4), + relocInfo::external_word_type, + RELOC_DISP32); + %} +%} + +// INSTRUCTIONS -- Platform dependent + +//----------OS and Locking Instructions---------------------------------------- + +// This name is KNOWN by the ADLC and cannot be changed. +// The ADLC forces a 'TypeRawPtr::BOTTOM' output type +// for this guy. +instruct tlsLoadP(rRegP dst) +%{ + match(Set dst (ThreadLocal)); + effect(DEF dst); + + format %{ "movq $dst, R15_TLS\t# tlsLoad" %} + ins_encode(enc_copy_wide(dst, R15)); + ins_pipe(ialu_reg_reg); +%} + +instruct TLS(rRegP dst) +%{ + match(Set dst (ThreadLocal)); + + expand %{ + tlsLoadP(dst); + %} +%} + +// Call Native Instruction +instruct CallNativeDirect(method meth) +%{ + match(CallNative); + effect(USE meth); + + ins_cost(300); + format %{ "call,native " %} + opcode(0xE8); /* E8 cd */ + ins_encode(Java_To_Native(meth), post_call_restore_mxcsr, call_epilog); + ins_pipe(pipe_slow); + ins_pc_relative(1); +%} + +// Die now +instruct ShouldNotReachHere() +%{ + match(Halt); + + // Use the following format syntax + format %{ "int3\t# ShouldNotReachHere" %} + // QQQ TODO for now call breakpoint + // opcode(0xCC); + // ins_encode(Opc); + ins_encode(bsd_breakpoint); + ins_pipe(pipe_slow); +%} + + +// Platform dependent source + +source +%{ + +int MachCallRuntimeNode::ret_addr_offset() +{ + return 13; // movq r10,#addr; callq (r10) +} + +// emit an interrupt that is caught by the debugger +void emit_break(CodeBuffer& cbuf) +{ + // Debugger doesn't really catch this but best we can do so far QQQ + MacroAssembler* masm = new MacroAssembler(&cbuf); + masm->call(CAST_FROM_FN_PTR(address, os::breakpoint), + relocInfo::runtime_call_type); +} + +void MachBreakpointNode::emit(CodeBuffer& cbuf, PhaseRegAlloc* ra_) const +{ + emit_break(cbuf); +} + +uint MachBreakpointNode::size(PhaseRegAlloc* ra_) const +{ + return 5; +} + +%} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.s jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.s --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.s 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/bsd_amd64.s 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,353 @@ +.ident "$Id: bsd_amd64.s,v 1.2 2004/12/23 19:35:20 phantom Exp $" +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + + # NOTE WELL! The _Copy functions are called directly + # from server-compiler-generated code via CallLeafNoFP, + # which means that they *must* either not use floating + # point or use it in the same manner as does the server + # compiler. + + .globl _Copy_arrayof_conjoint_bytes + .globl _Copy_arrayof_conjoint_jshorts + .globl _Copy_conjoint_jshorts_atomic + .globl _Copy_arrayof_conjoint_jints + .globl _Copy_conjoint_jints_atomic + .globl _Copy_arrayof_conjoint_jlongs + .globl _Copy_conjoint_jlongs_atomic + + .text + + # Support for void Copy::arrayof_conjoint_bytes(void* from, + # void* to, + # size_t count) + # rdi - from + # rsi - to + # rdx - count, treated as ssize_t + # + .p2align 4,,15 + .type _Copy_arrayof_conjoint_bytes,@function +_Copy_arrayof_conjoint_bytes: + movq %rdx,%r8 # byte count + shrq $3,%rdx # qword count + cmpq %rdi,%rsi + leaq -1(%rdi,%r8,1),%rax # from + bcount*1 - 1 + jbe acb_CopyRight + cmpq %rax,%rsi + jbe acb_CopyLeft +acb_CopyRight: + leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8 + leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8 + negq %rdx + jmp 7f + .p2align 4,,15 +1: movq 8(%rax,%rdx,8),%rsi + movq %rsi,8(%rcx,%rdx,8) + addq $1,%rdx + jnz 1b +2: testq $4,%r8 # check for trailing dword + jz 3f + movl 8(%rax),%esi # copy trailing dword + movl %esi,8(%rcx) + addq $4,%rax + addq $4,%rcx # original %rsi is trashed, so we + # can't use it as a base register +3: testq $2,%r8 # check for trailing word + jz 4f + movw 8(%rax),%si # copy trailing word + movw %si,8(%rcx) + addq $2,%rcx +4: testq $1,%r8 # check for trailing byte + jz 5f + movb -1(%rdi,%r8,1),%al # copy trailing byte + movb %al,8(%rcx) +5: ret + .p2align 4,,15 +6: movq -24(%rax,%rdx,8),%rsi + movq %rsi,-24(%rcx,%rdx,8) + movq -16(%rax,%rdx,8),%rsi + movq %rsi,-16(%rcx,%rdx,8) + movq -8(%rax,%rdx,8),%rsi + movq %rsi,-8(%rcx,%rdx,8) + movq (%rax,%rdx,8),%rsi + movq %rsi,(%rcx,%rdx,8) +7: addq $4,%rdx + jle 6b + subq $4,%rdx + jl 1b + jmp 2b +acb_CopyLeft: + testq $1,%r8 # check for trailing byte + jz 1f + movb -1(%rdi,%r8,1),%cl # copy trailing byte + movb %cl,-1(%rsi,%r8,1) + subq $1,%r8 # adjust for possible trailing word +1: testq $2,%r8 # check for trailing word + jz 2f + movw -2(%rdi,%r8,1),%cx # copy trailing word + movw %cx,-2(%rsi,%r8,1) +2: testq $4,%r8 # check for trailing dword + jz 5f + movl (%rdi,%rdx,8),%ecx # copy trailing dword + movl %ecx,(%rsi,%rdx,8) + jmp 5f + .p2align 4,,15 +3: movq -8(%rdi,%rdx,8),%rcx + movq %rcx,-8(%rsi,%rdx,8) + subq $1,%rdx + jnz 3b + ret + .p2align 4,,15 +4: movq 24(%rdi,%rdx,8),%rcx + movq %rcx,24(%rsi,%rdx,8) + movq 16(%rdi,%rdx,8),%rcx + movq %rcx,16(%rsi,%rdx,8) + movq 8(%rdi,%rdx,8),%rcx + movq %rcx,8(%rsi,%rdx,8) + movq (%rdi,%rdx,8),%rcx + movq %rcx,(%rsi,%rdx,8) +5: subq $4,%rdx + jge 4b + addq $4,%rdx + jg 3b + ret + + # Support for void Copy::arrayof_conjoint_jshorts(void* from, + # void* to, + # size_t count) + # Equivalent to + # conjoint_jshorts_atomic + # + # If 'from' and/or 'to' are aligned on 4- or 2-byte boundaries, we + # let the hardware handle it. The tow or four words within dwords + # or qwords that span cache line boundaries will still be loaded + # and stored atomically. + # + # rdi - from + # rsi - to + # rdx - count, treated as ssize_t + # + .p2align 4,,15 + .type _Copy_arrayof_conjoint_jshorts,@function + .type _Copy_conjoint_jshorts_atomic,@function +_Copy_arrayof_conjoint_jshorts: +_Copy_conjoint_jshorts_atomic: + movq %rdx,%r8 # word count + shrq $2,%rdx # qword count + cmpq %rdi,%rsi + leaq -2(%rdi,%r8,2),%rax # from + wcount*2 - 2 + jbe acs_CopyRight + cmpq %rax,%rsi + jbe acs_CopyLeft +acs_CopyRight: + leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8 + leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8 + negq %rdx + jmp 6f +1: movq 8(%rax,%rdx,8),%rsi + movq %rsi,8(%rcx,%rdx,8) + addq $1,%rdx + jnz 1b +2: testq $2,%r8 # check for trailing dword + jz 3f + movl 8(%rax),%esi # copy trailing dword + movl %esi,8(%rcx) + addq $4,%rcx # original %rsi is trashed, so we + # can't use it as a base register +3: testq $1,%r8 # check for trailing word + jz 4f + movw -2(%rdi,%r8,2),%si # copy trailing word + movw %si,8(%rcx) +4: ret + .p2align 4,,15 +5: movq -24(%rax,%rdx,8),%rsi + movq %rsi,-24(%rcx,%rdx,8) + movq -16(%rax,%rdx,8),%rsi + movq %rsi,-16(%rcx,%rdx,8) + movq -8(%rax,%rdx,8),%rsi + movq %rsi,-8(%rcx,%rdx,8) + movq (%rax,%rdx,8),%rsi + movq %rsi,(%rcx,%rdx,8) +6: addq $4,%rdx + jle 5b + subq $4,%rdx + jl 1b + jmp 2b +acs_CopyLeft: + testq $1,%r8 # check for trailing word + jz 1f + movw -2(%rdi,%r8,2),%cx # copy trailing word + movw %cx,-2(%rsi,%r8,2) +1: testq $2,%r8 # check for trailing dword + jz 4f + movl (%rdi,%rdx,8),%ecx # copy trailing dword + movl %ecx,(%rsi,%rdx,8) + jmp 4f +2: movq -8(%rdi,%rdx,8),%rcx + movq %rcx,-8(%rsi,%rdx,8) + subq $1,%rdx + jnz 2b + ret + .p2align 4,,15 +3: movq 24(%rdi,%rdx,8),%rcx + movq %rcx,24(%rsi,%rdx,8) + movq 16(%rdi,%rdx,8),%rcx + movq %rcx,16(%rsi,%rdx,8) + movq 8(%rdi,%rdx,8),%rcx + movq %rcx,8(%rsi,%rdx,8) + movq (%rdi,%rdx,8),%rcx + movq %rcx,(%rsi,%rdx,8) +4: subq $4,%rdx + jge 3b + addq $4,%rdx + jg 2b + ret + + # Support for void Copy::arrayof_conjoint_jints(jint* from, + # jint* to, + # size_t count) + # Equivalent to + # conjoint_jints_atomic + # + # If 'from' and/or 'to' are aligned on 4-byte boundaries, we let + # the hardware handle it. The two dwords within qwords that span + # cache line boundaries will still be loaded and stored atomically. + # + # rdi - from + # rsi - to + # rdx - count, treated as ssize_t + # + .p2align 4,,15 + .type _Copy_arrayof_conjoint_jints,@function + .type _Copy_conjoint_jints_atomic,@function +_Copy_arrayof_conjoint_jints: +_Copy_conjoint_jints_atomic: + movq %rdx,%r8 # dword count + shrq %rdx # qword count + cmpq %rdi,%rsi + leaq -4(%rdi,%r8,4),%rax # from + dcount*4 - 4 + jbe aci_CopyRight + cmpq %rax,%rsi + jbe aci_CopyLeft +aci_CopyRight: + leaq -8(%rdi,%rdx,8),%rax # from + qcount*8 - 8 + leaq -8(%rsi,%rdx,8),%rcx # to + qcount*8 - 8 + negq %rdx + jmp 5f + .p2align 4,,15 +1: movq 8(%rax,%rdx,8),%rsi + movq %rsi,8(%rcx,%rdx,8) + addq $1,%rdx + jnz 1b +2: testq $1,%r8 # check for trailing dword + jz 3f + movl 8(%rax),%esi # copy trailing dword + movl %esi,8(%rcx) +3: ret + .p2align 4,,15 +4: movq -24(%rax,%rdx,8),%rsi + movq %rsi,-24(%rcx,%rdx,8) + movq -16(%rax,%rdx,8),%rsi + movq %rsi,-16(%rcx,%rdx,8) + movq -8(%rax,%rdx,8),%rsi + movq %rsi,-8(%rcx,%rdx,8) + movq (%rax,%rdx,8),%rsi + movq %rsi,(%rcx,%rdx,8) +5: addq $4,%rdx + jle 4b + subq $4,%rdx + jl 1b + jmp 2b +aci_CopyLeft: + testq $1,%r8 # check for trailing dword + jz 3f + movl -4(%rdi,%r8,4),%ecx # copy trailing dword + movl %ecx,-4(%rsi,%r8,4) + jmp 3f +1: movq -8(%rdi,%rdx,8),%rcx + movq %rcx,-8(%rsi,%rdx,8) + subq $1,%rdx + jnz 1b + ret + .p2align 4,,15 +2: movq 24(%rdi,%rdx,8),%rcx + movq %rcx,24(%rsi,%rdx,8) + movq 16(%rdi,%rdx,8),%rcx + movq %rcx,16(%rsi,%rdx,8) + movq 8(%rdi,%rdx,8),%rcx + movq %rcx,8(%rsi,%rdx,8) + movq (%rdi,%rdx,8),%rcx + movq %rcx,(%rsi,%rdx,8) +3: subq $4,%rdx + jge 2b + addq $4,%rdx + jg 1b + ret + + # Support for void Copy::arrayof_conjoint_jlongs(jlong* from, + # jlong* to, + # size_t count) + # Equivalent to + # conjoint_jlongs_atomic + # arrayof_conjoint_oops + # conjoint_oops_atomic + # + # rdi - from + # rsi - to + # rdx - count, treated as ssize_t + # + .p2align 4,,15 + .type _Copy_arrayof_conjoint_jlongs,@function + .type _Copy_conjoint_jlongs_atomic,@function +_Copy_arrayof_conjoint_jlongs: +_Copy_conjoint_jlongs_atomic: + cmpq %rdi,%rsi + leaq -8(%rdi,%rdx,8),%rax # from + count*8 - 8 + jbe acl_CopyRight + cmpq %rax,%rsi + jbe acl_CopyLeft +acl_CopyRight: + leaq -8(%rsi,%rdx,8),%rcx # to + count*8 - 8 + negq %rdx + jmp 3f +1: movq 8(%rax,%rdx,8),%rsi + movq %rsi,8(%rcx,%rdx,8) + addq $1,%rdx + jnz 1b + ret + .p2align 4,,15 +2: movq -24(%rax,%rdx,8),%rsi + movq %rsi,-24(%rcx,%rdx,8) + movq -16(%rax,%rdx,8),%rsi + movq %rsi,-16(%rcx,%rdx,8) + movq -8(%rax,%rdx,8),%rsi + movq %rsi,-8(%rcx,%rdx,8) + movq (%rax,%rdx,8),%rsi + movq %rsi,(%rcx,%rdx,8) +3: addq $4,%rdx + jle 2b + subq $4,%rdx + jl 1b + ret +4: movq -8(%rdi,%rdx,8),%rcx + movq %rcx,-8(%rsi,%rdx,8) + subq $1,%rdx + jnz 4b + ret + .p2align 4,,15 +5: movq 24(%rdi,%rdx,8),%rcx + movq %rcx,24(%rsi,%rdx,8) + movq 16(%rdi,%rdx,8),%rcx + movq %rcx,16(%rsi,%rdx,8) + movq 8(%rdi,%rdx,8),%rcx + movq %rcx,8(%rsi,%rdx,8) + movq (%rdi,%rdx,8),%rcx + movq %rcx,(%rsi,%rdx,8) +acl_CopyLeft: + subq $4,%rdx + jge 5b + addq $4,%rdx + jg 4b + ret diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/bytes_bsd_amd64.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/bytes_bsd_amd64.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/bytes_bsd_amd64.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/bytes_bsd_amd64.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,37 @@ +/* + * $Id: bytes_bsd_amd64.inline.hpp,v 1.3 2006/12/20 18:45:41 truk Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Efficient swapping of data bytes from Java byte +// ordering to native byte ordering and vice versa. + +inline u2 Bytes::swap_u2(u2 x) +{ +#ifdef __OpenBSD__ + return swap16(x); +#else + return __bswap16(x); +#endif +} + +inline u4 Bytes::swap_u4(u4 x) +{ +#ifdef __OpenBSD__ + return swap32(x); +#else + return __bswap32(x); +#endif +} + +inline u8 Bytes::swap_u8(u8 x) +{ +#ifdef __OpenBSD__ + return swap64(x); +#else + return __bswap64(x); +#endif +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/copy_bsd_amd64.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/copy_bsd_amd64.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/copy_bsd_amd64.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/copy_bsd_amd64.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,53 @@ +/* + * $Id: copy_bsd_amd64.inline.hpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +static void pd_conjoint_bytes(void* from, void* to, size_t count) { + (void)memmove(to, from, count); +} + +static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) { + (void)memmove(to, from, count); +} + +static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) { + _Copy_conjoint_jshorts_atomic(from, to, count); +} + +static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) { + _Copy_conjoint_jints_atomic(from, to, count); +} + +static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) { + _Copy_conjoint_jlongs_atomic(from, to, count); +} + +static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) { + assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size"); + _Copy_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count); +} + +static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_bytes(from, to, count); +} + +static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jshorts(from, to, count); +} + +static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jints(from, to, count); +} + +static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jlongs(from, to, count); +} + +static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) { + assert(BytesPerLong == BytesPerOop, "jlongs and oops must be the same size"); + _Copy_arrayof_conjoint_jlongs(from, to, count); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/getThread_bsd_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/getThread_bsd_amd64.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/getThread_bsd_amd64.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/getThread_bsd_amd64.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,15 @@ +/* + * $Id: getThread_bsd_amd64.cpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Provides an entry point we can link against and +// a buffer we can emit code into. The buffer is +// filled by ThreadLocalStorage::generate_code_for_get_thread +// and called from ThreadLocalStorage::thread() + +// do not include precompiled header file +#include "incls/_getThread_bsd_amd64.cpp.incl" diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/globals_bsd_amd64.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/globals_bsd_amd64.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/globals_bsd_amd64.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/globals_bsd_amd64.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,25 @@ +/* + * $Id: globals_bsd_amd64.hpp,v 1.3 2006/06/15 21:53:12 truk Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// +// Sets the default values for platform dependent flags used by the +// runtime system. (see globals.hpp) +// +define_pd_global(bool, DontYieldALot, false); +//define_pd_global(intx, ThreadStackSize, 0); // 0 => use system default +define_pd_global(intx, ThreadStackSize, 1024); +define_pd_global(intx, VMThreadStackSize, 1024); +define_pd_global(intx, CompilerThreadStackSize, 0); +define_pd_global(intx, SurvivorRatio, 8); + +// Allow extra space in DEBUG builds for asserts. +define_pd_global(uintx, JVMInvokeMethodSlack, 8192); +define_pd_global(bool, UseDefaultStackSize, false); + +// Only used on 64 bit Windows platforms +define_pd_global(bool, UseVectoredExceptions, false); diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/orderAccess_bsd_amd64.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/orderAccess_bsd_amd64.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/orderAccess_bsd_amd64.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/orderAccess_bsd_amd64.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,357 @@ +/* + * $Id: orderAccess_bsd_amd64.inline.hpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Implementation of class OrderAccess. + +inline void OrderAccess::loadload() +{ + acquire(); +} + +inline void OrderAccess::storestore() +{ + release(); +} + +inline void OrderAccess::loadstore() +{ + acquire(); +} + +inline void OrderAccess::storeload() +{ + fence(); +} + +// XXX +inline void OrderAccess::acquire() +{ + volatile intptr_t dummy; + __asm__ volatile ("movq 0(%%rsp), %0" : "=r" (dummy) : : "memory"); +} + +// XXX +inline void OrderAccess::release() +{ + dummy = 0; +} + +inline void OrderAccess::fence() +{ + if (os::is_MP()) { + __asm__ __volatile__ ("mfence":::"memory"); + } +} + +inline jbyte OrderAccess::load_acquire(volatile jbyte* p) +{ + return *p; +} + +inline jshort OrderAccess::load_acquire(volatile jshort* p) +{ + return *p; +} + +inline jint OrderAccess::load_acquire(volatile jint* p) +{ + return *p; +} + +inline jlong OrderAccess::load_acquire(volatile jlong* p) +{ + return *p; +} + +inline jubyte OrderAccess::load_acquire(volatile jubyte* p) +{ + return *p; +} + +inline jushort OrderAccess::load_acquire(volatile jushort* p) +{ + return *p; +} + +inline juint OrderAccess::load_acquire(volatile juint* p) +{ + return *p; +} + +inline julong OrderAccess::load_acquire(volatile julong* p) +{ + return *p; +} + +inline jfloat OrderAccess::load_acquire(volatile jfloat* p) +{ + return *p; +} + +inline jdouble OrderAccess::load_acquire(volatile jdouble* p) +{ + return *p; +} + +inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) +{ + return *p; +} + +inline void* OrderAccess::load_ptr_acquire(volatile void* p) +{ + return *(void* volatile*) p; +} + +inline void* OrderAccess::load_ptr_acquire(const volatile void* p) +{ + return *(void* const volatile*) p; +} + +inline void OrderAccess::release_store(volatile jbyte* p, jbyte v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile jshort* p, jshort v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile jint* p, jint v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile jlong* p, jlong v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile jubyte* p, jubyte v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile jushort* p, jushort v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile juint* p, juint v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile julong* p, julong v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) +{ + *p = v; +} + +inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) +{ + *p = v; +} + +inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) +{ + *p = v; +} + +inline void OrderAccess::release_store_ptr(volatile void* p, void* v) +{ + *(void* volatile*) p = v; +} + +inline void OrderAccess::store_fence(jbyte* p, jbyte v) +{ + __asm__ __volatile__ ("xchgb (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::store_fence(jshort* p, jshort v) +{ + __asm__ __volatile__ ("xchgw (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::store_fence(jint* p, jint v) +{ + __asm__ __volatile__ ("xchgl (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::store_fence(jlong* p, jlong v) +{ + __asm__ __volatile__ ("xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::store_fence(jubyte* p, jubyte v) +{ + __asm__ __volatile__ ("xchgb (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::store_fence(jushort* p, jushort v) +{ + __asm__ __volatile__ ("xchgw (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::store_fence(juint* p, juint v) +{ + __asm__ __volatile__ ("xchgl (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::store_fence(julong* p, julong v) +{ + __asm__ __volatile__ ("xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::store_fence(jfloat* p, jfloat v) +{ + *p = v; + fence(); +} + +inline void OrderAccess::store_fence(jdouble* p, jdouble v) +{ + *p = v; + fence(); +} + +inline void OrderAccess::store_ptr_fence(intptr_t* p, intptr_t v) +{ + __asm__ __volatile__ ("xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::store_ptr_fence(void** p, void* v) +{ + __asm__ __volatile__ ("xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +// Must duplicate definitions instead of calling store_fence because +// we don't want to cast away volatile. +inline void OrderAccess::release_store_fence(volatile jbyte* p, jbyte v) +{ + __asm__ __volatile__ ("xchgb (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile jshort* p, jshort v) +{ + __asm__ __volatile__ ("xchgw (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile jint* p, jint v) +{ + __asm__ __volatile__ ( "xchgl (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile jlong* p, jlong v) +{ + __asm__ __volatile__ ( "xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile jubyte* p, jubyte v) +{ + __asm__ __volatile__ ("xchgb (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile jushort* p, jushort v) +{ + __asm__ __volatile__ ("xchgw (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile juint* p, juint v) +{ + __asm__ __volatile__ ( "xchgl (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile julong* p, julong v) +{ + __asm__ __volatile__ ( "xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_fence(volatile jfloat* p, jfloat v) +{ + *p = v; + fence(); +} + +inline void OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) +{ + *p = v; + fence(); +} + +inline void OrderAccess::release_store_ptr_fence(volatile intptr_t* p, + intptr_t v) +{ + __asm__ __volatile__ ( "xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} + +inline void OrderAccess::release_store_ptr_fence(volatile void* p, void* v) +{ + __asm__ __volatile__ ( "xchgq (%2), %0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,686 @@ +/* + * $Id: os_bsd_amd64.cpp,v 1.5 2007/01/19 23:27:01 truk Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// do not include precompiled header file +#include "incls/_os_bsd_amd64.cpp.incl" +#include "incls/_os_pd.hpp.incl" + +// put OS-includes here +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +# ifdef __FreeBSD__ +# define context_rip uc_mcontext.mc_rip +# define context_rsp uc_mcontext.mc_rsp +# define context_rax uc_mcontext.mc_rax +# define context_rbx uc_mcontext.mc_rbx +# define context_rcx uc_mcontext.mc_rcx +# define context_rdx uc_mcontext.mc_rdx +# define context_rbp uc_mcontext.mc_rbp +# define context_rsi uc_mcontext.mc_rsi +# define context_rdi uc_mcontext.mc_rdi +# define context_r8 uc_mcontext.mc_r8 +# define context_r9 uc_mcontext.mc_r9 +# define context_r10 uc_mcontext.mc_r10 +# define context_r11 uc_mcontext.mc_r11 +# define context_r12 uc_mcontext.mc_r12 +# define context_r13 uc_mcontext.mc_r13 +# define context_r14 uc_mcontext.mc_r14 +# define context_r15 uc_mcontext.mc_r15 +# define context_flags uc_mcontext.mc_flags +# define context_trapno uc_mcontext.mc_trapno +# define context_err uc_mcontext.mc_err +# endif + +# ifdef __OpenBSD__ +# define context_rip sc_rip +# define context_rsp sc_rsp +# define context_rax sc_rax +# define context_rbx sc_rbx +# define context_rcx sc_rcx +# define context_rdx sc_rdx +# define context_rbp sc_rbp +# define context_rsi sc_rsi +# define context_rdi sc_rdi +# define context_r8 sc_r8 +# define context_r9 sc_r9 +# define context_r10 sc_r10 +# define context_r11 sc_r11 +# define context_r12 sc_r12 +# define context_r13 sc_r13 +# define context_r14 sc_r14 +# define context_r15 sc_r15 +# define context_flags sc_rflags +# define context_trapno sc_trapno +# define context_err sc_err +# endif + + +// XXXBSD: find best value +size_t os::Bsd::min_stack_allowed = 256 * K; + +char* os::non_memory_address_word() +{ + // Must never look like an address returned by reserve_memory, even + // in its subfields (as defined by the CPU immediate fields, if the + // CPU splits constants across multiple instructions). + + return (char*) -1; +} + +// +// Validate a ucontext retrieved from walking a uc_link of a ucontext. +// There are issues with libthread giving out uc_links for different threads +// on the same uc_link chain and bad or circular links. +// +#ifndef __OpenBSD__ +bool os::Bsd::valid_ucontext(Thread* thread, ucontext_t* valid, ucontext_t* suspect) { + if (valid >= suspect || + valid->uc_stack.ss_flags != suspect->uc_stack.ss_flags || + valid->uc_stack.ss_sp != suspect->uc_stack.ss_sp || + valid->uc_stack.ss_size != suspect->uc_stack.ss_size) { + DEBUG_ONLY(tty->print_cr("valid_ucontext: failed test 1");) + return false; + } + + if (thread->is_Java_thread()) { + if (!valid_stack_address(thread, (address)suspect)) { + DEBUG_ONLY(tty->print_cr("valid_ucontext: uc_link not in thread stack");) + return false; + } + if (!valid_stack_address(thread, (address) suspect->context_rsp)) { + DEBUG_ONLY(tty->print_cr("valid_ucontext: stackpointer not in thread stack");) + return false; + } + } + return true; +} + +// We will only follow one level of uc_link since there are libthread +// issues with ucontext linking and it is better to be safe and just +// let caller retry later. +ucontext_t* os::Bsd::get_valid_uc_in_signal_handler(Thread *thread, + ucontext_t *uc) { + + ucontext_t *retuc = NULL; + + if (uc != NULL) { + if (uc->uc_link == NULL) { + // cannot validate without uc_link so accept current ucontext + retuc = uc; + } else if (os::Bsd::valid_ucontext(thread, uc, uc->uc_link)) { + // first ucontext is valid so try the next one + uc = uc->uc_link; + if (uc->uc_link == NULL) { + // cannot validate without uc_link so accept current ucontext + retuc = uc; + } else if (os::Bsd::valid_ucontext(thread, uc, uc->uc_link)) { + // the ucontext one level down is also valid so return it + retuc = uc; + } + } + } + return retuc; +} +#endif // !__OpenBSD__ + +// Assumes ucontext is valid +// XXXBSD: my additional... +address ucontext_get_pc(ucontext_t *uc) { + return (address)uc->context_rip; +} + +// Assumes ucontext is valid +ExtendedPC os::Bsd::ucontext_get_ExtendedPC(ucontext_t *uc) { + return ExtendedPC((address)uc->context_rip); +} + +// Assumes ucontext is valid +intptr_t* os::Bsd::ucontext_get_sp(ucontext_t *uc) { + return (intptr_t*)uc->context_rsp; +} + +// Assumes ucontext is valid +intptr_t* os::Bsd::ucontext_get_fp(ucontext_t *uc) { + return (intptr_t*)uc->context_rbp; +} + +// For Forte Analyzer AsyncGetCallTrace profiling support - thread +// is currently interrupted by SIGPROF. +// +// The difference between this and os::fetch_frame_from_context() is that +// here we try to skip nested signal frames. +ExtendedPC os::Bsd::fetch_frame_from_ucontext(Thread* thread, + ucontext_t* uc, intptr_t** ret_sp, intptr_t** ret_fp) { + + assert(thread != NULL, "just checking"); + assert(ret_sp != NULL, "just checking"); + assert(ret_fp != NULL, "just checking"); + +#ifdef __OpenBSD__ + return os::fetch_frame_from_context(uc, ret_sp, ret_fp); +#else + ucontext_t *luc = os::Bsd::get_valid_uc_in_signal_handler(thread, uc); + return os::fetch_frame_from_context(luc, ret_sp, ret_fp); +#endif +} + +ExtendedPC os::fetch_frame_from_context(void* ucVoid, + intptr_t** ret_sp, intptr_t** ret_fp) { + + ExtendedPC epc; + ucontext_t *uc = (ucontext_t*)ucVoid; + + if (uc != NULL) { + epc = os::Bsd::ucontext_get_ExtendedPC(uc); + if (ret_sp) *ret_sp = os::Bsd::ucontext_get_sp(uc); + if (ret_fp) *ret_fp = os::Bsd::ucontext_get_fp(uc); + } else { + // construct empty ExtendedPC for return value checking + epc = ExtendedPC(NULL); + if (ret_sp) *ret_sp = (intptr_t *)NULL; + if (ret_fp) *ret_fp = (intptr_t *)NULL; + } + + return epc; +} + +frame os::fetch_frame_from_context(void* ucVoid) { + intptr_t* sp; + intptr_t* fp; + ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, &fp); + return frame(sp, fp, epc.pc()); +} + +// XXX +// By default, gcc always saves frame pointer (%rbp) on stack. It may get +// turned off by -fomit-frame-pointer, +frame os::get_sender_for_C_frame(frame* fr) { + return frame(fr->sender_sp(), fr->link(), fr->sender_pc()); +} + +frame os::current_frame() +{ + intptr_t* fp = + (*CAST_TO_FN_PTR(intptr_t* (*)(void), + StubRoutines::amd64::get_previous_fp_entry()))(); + frame myframe((intptr_t*) os::current_stack_pointer(), + (intptr_t*) fp, + CAST_FROM_FN_PTR(address, os::current_frame)); + if (os::is_first_C_frame(&myframe)) { + // stack is not walkable + return frame(NULL, NULL, NULL); + } else { + return os::get_sender_for_C_frame(&myframe); + } +} + +#ifndef CORE +// synchronous: cancelled by the sender thread +void SetThreadPC_Callback::execute(OSThread::InterruptArguments *args) { + assert(args->thread()->is_Java_thread(), "must be a java thread"); + + JavaThread* thread = (JavaThread*)args->thread(); + ucontext_t* uc = args->ucontext(); + + // In some instances with some versions of libthread we get this callback while + // we are executing libthread signal handling code (during preemption/resumption) + // and we used to blindly try update the pc with a java code pc. This seriously + // messes up the state of the world. Now that we have made the operation synchronous + // we can examine the pc and either find the expected pc or not. We are willing to + // examine at most a single nest ucontext. There are libthread issues with the + // sanity of uc_link (cycles, cross thread stacks, ...) so the less we use uc_link + // the better. If we find the expected pc we patch it and return (to VM thread typically) + // success, if not we return failure and the caller can retry. + // + _result = false; + if (uc->context_rip == (int)_old_addr.pc() ) { + uc->context_rip = (int)_new_addr.pc(); + _result = true; +#ifndef __OpenBSD__ + } else if (uc->uc_link != NULL) { + // Check (and validate) one level of stacked ucontext + ucontext_t* linked_uc = uc->uc_link; + if (os::Bsd::valid_ucontext(thread, uc, linked_uc) && linked_uc->context_rip == (int)_old_addr.pc()) { + linked_uc->context_rip = (int)_new_addr.pc(); + _result = true; + } +#endif + } + + thread->safepoint_state()->notify_set_thread_pc_result(_result); + +#ifdef ASSERT + if (!_result) { +#ifndef __OpenBSD__ + if (uc->uc_link != NULL) { + tty->print_cr("set_thread_pc:(nested) failed to set pc " INTPTR_FORMAT " -> " INTPTR_FORMAT, _old_addr.pc(), _new_addr.pc()); + } else { +#else + { +#endif + tty->print_cr("set_thread_pc: failed to set pc " INTPTR_FORMAT " -> " INTPTR_FORMAT, _old_addr.pc(), _new_addr.pc()); + } + } +#endif +} +#endif + +// This is a simple callback that just fetches a PC for an interrupted thread. +// The thread need not be suspended and the fetched PC is just a hint. +// Returned PC and nPC are not necessarily consecutive. +// This one is currently used for profiling the VMThread ONLY! + +// Must be synchronous +void GetThreadPC_Callback::execute(OSThread::InterruptArguments *args) { + Thread* thread = args->thread(); + ucontext_t* uc = args->ucontext(); + jint* sp; + + assert(ProfileVM && thread->is_VM_thread(), "just checking"); + + ExtendedPC new_addr((address)uc->context_rip); + _addr = new_addr; +} + +// This is a "fast" implementation of fetch_top_frame that relies on the +// new libthread APIs to get pc for a suspended thread +// XXXBSD: This is Solaris specific. Get rid or implement... +ExtendedPC os::Bsd::fetch_top_frame_fast(Thread* thread, intptr_t** sp, intptr_t** fp) { + ExtendedPC new_addr(NULL); + *sp = (intptr_t*)0; + *fp = (intptr_t*)0; + return new_addr; // bail out +} + +extern "C" int +JVM_handle_bsd_signal(int sig, + siginfo_t* info, + void* ucVoid, + int abort_if_unrecognized) +{ + ucontext_t* uc = (ucontext_t*) ucVoid; + + Thread* t = ThreadLocalStorage::get_thread_slow(); + + SignalHandlerMark shm(t); + + JavaThread* thread = NULL; + VMThread* vmthread = NULL; + if (os::Bsd::signal_handlers_are_installed) { + if (t != NULL ){ + if(t->is_Java_thread()) { + thread = (JavaThread*)t; + } + else if(t->is_VM_thread()){ + vmthread = (VMThread *)t; + } + } + } + + // decide if this trap can be handled by a stub + address stub = NULL; + + address pc = NULL; + address adjusted_pc = NULL; + + //%note os_trap_1 + if (info != NULL && thread != NULL) { + // factor me: getPCfromContext + pc = (address) uc->context_rip; +#ifndef CORE + adjusted_pc = + SafepointPolling + ? pc + : thread->safepoint_state()->compute_adjusted_pc(pc); +#else + adjusted_pc = pc; +#endif + + // Handle ALL stack overflow variations here + if (sig == SIGSEGV || sig == SIGBUS) { + address addr = (address) info->si_addr; + + // check if fault address is within thread stack + if (addr < thread->stack_base() && + addr >= thread->stack_base() - thread->stack_size()) { + // stack overflow + if (thread->in_stack_yellow_zone(addr)) { + thread->disable_stack_yellow_zone(); + if (thread->thread_state() == _thread_in_Java) { + // Throw a stack overflow exception. Guard pages will be reenabled + // while unwinding the stack. + stub = + SharedRuntime:: + continuation_for_implicit_exception(thread, + pc, + SharedRuntime::STACK_OVERFLOW); + } else { + // Thread was in the vm or native code. Return and try to finish. + return 1; + } + } else if (thread->in_stack_red_zone(addr)) { + // Fatal red zone violation. Disable the guard pages and fall through + // to handle_unexpected_exception way down below. + thread->disable_stack_red_zone(); + tty->print_raw_cr("An irrecoverable stack overflow has occurred."); +/* XXXBSD!!! */ +#ifdef WARNING_WARNING + } else { + // Accessing stack address below sp may cause SEGV if current + // thread has MAP_GROWSDOWN stack. This should only happen when + // current thread was created by user code with MAP_GROWSDOWN flag + // and then attached to VM. See notes in os_linux.cpp. + if (thread->osthread()->expanding_stack() == 0) { + thread->osthread()->set_expanding_stack(); + if (os::Bsd::manually_expand_stack(thread, addr)) { + thread->osthread()->clear_expanding_stack(); + return 1; + } + thread->osthread()->clear_expanding_stack(); + } else { + fatal("recursive segv. expanding stack."); + } +#endif + } + } + } + + if (thread->thread_state() == _thread_in_Java) { + // Java thread running in Java code => find exception handler if any + // a fault inside compiled code, the interpreter, or a stub + +#ifndef CORE + if (sig == SIGILL && NativeInstruction::nativeInstruction_at(pc)->is_illegal()) { +#ifdef COMPILER1 + stub = Runtime1::entry_for(Runtime1::illegal_instruction_handler_id); +#else + // debugging trap, or a safepoint + assert(OptoRuntime::illegal_exception_handler_blob() != NULL, + "stub not created yet"); + stub = + OptoRuntime::illegal_exception_handler_blob()->instructions_begin(); +#endif // COMPILER1 + CompiledCodeSafepointHandler* handler = + (CompiledCodeSafepointHandler *) thread->safepoint_state()->handle(); + if (handler != NULL && thread->is_in_compiled_safepoint()) { + nmethod* nm = handler->get_nmethod(); + assert(nm != NULL, "safepoint handler is not setup correctly"); + + relocInfo::relocType type = nm->reloc_type_for_address(adjusted_pc); + assert(((NativeInstruction*) adjusted_pc)->is_call() || + type == relocInfo::return_type || + type == relocInfo::safepoint_type, + "Only calls, returns, and backward branches are patched " + "at safepoint"); + + if(type == relocInfo::return_type) { + // The retl case: restore has already happened. The + // safepoint blob frame will appear immediately below + // caller of the orignal method that we have patched. The + // stack could be walked properly (the frame of the + // patched method is already popped). Will need to be + // revisited if and when we put restore in the delay slot + // of ret. + } else { + // This is the case when either a call or a branch was + // patched with an illegal instruction. At this point we + // are done with the patched method and would like things + // to appear as if the orignal method simply called the + // safepoint blob at a "safe point". To achieve this, we + // set up the correct linkage by placing the adjusted trap + // pc in O7 and then "returning" from this trap handler to + // the safepoint blob. + + // QQQ TODO + // uc->uc_mcontext.gregs[REG_O7] = (greg_t) adjusted_pc; + } + } + } else if ((sig == SIGSEGV || sig == SIGBUS) && SafepointPolling && + (address) info->si_addr == os::get_polling_page()) { + // Look up the code blob + CodeBlob* cb = CodeCache::find_blob(pc); + + // Should be an nmethod + assert(cb && cb->is_nmethod(), + "safepoint polling: pc must refer to an nmethod"); + + // Look up the relocation information + assert( ((nmethod*) cb)->is_at_poll_or_poll_return(pc), + "safepoint polling: type must be poll" ); + + assert(((NativeInstruction*) pc)->is_safepoint_poll(), + "Only polling locations are used for safepoint"); + + // return + if (((nmethod*)cb)->is_at_poll_return(pc)) { +#ifdef COMPILER1 + stub = Runtime1::entry_for(Runtime1::polling_page_return_handler_id); +#else + assert(OptoRuntime::polling_page_return_handler_blob() != NULL, + "polling page return stub not created yet"); + stub = OptoRuntime::polling_page_return_handler_blob()->instructions_begin(); +#endif + +#ifndef PRODUCT + if (TraceSafepoint) + tty->print("... found polling page return exception at pc = " + INTPTR_FORMAT ", stub = " INTPTR_FORMAT "\n", + (intptr_t) pc, (intptr_t) stub); +#endif + } + else { +#ifdef COMPILER1 + stub = Runtime1::entry_for(Runtime1::polling_page_safepoint_handler_id); +#else + assert(OptoRuntime::polling_page_safepoint_handler_blob() != NULL, + "polling page safepoint stub not created yet"); + stub = OptoRuntime::polling_page_safepoint_handler_blob()->instructions_begin(); +#endif + +#ifndef PRODUCT + if (TraceSafepoint) + tty->print("... found polling page safepoint exception at pc = " + INTPTR_FORMAT ", stub = " INTPTR_FORMAT "\n", + (intptr_t) pc, (intptr_t) stub); +#endif + } + } else +#endif // NOT CORE + + if (sig == SIGFPE && + (info->si_code == FPE_INTDIV || info->si_code == FPE_FLTDIV)) { + stub = + SharedRuntime:: + continuation_for_implicit_exception(thread, + pc, + SharedRuntime:: + IMPLICIT_DIVIDE_BY_ZERO); + } + +#ifdef COMPILER2 + else if ((sig == SIGSEGV || sig == SIGBUS) && + OptoRuntime::illegal_exception_handler_blob() != NULL && + OptoRuntime::illegal_exception_handler_blob()->contains(pc)) { + // This is the case when we use a trap to restore the context + // at the end of safepoint taken in compiled code. The + // "return" address is passed in O7 QQQ TODO + ShouldNotReachHere(); + +#if 0 + greg_t ret_pc = uc->uc_mcontext.gregs[REG_RIP]; + // Recover global regs saved at the original illegal + // instruction trap. (%o are handled "automatically" and are + // possibly modified by the gc - don't touch them) + thread->restore_global_regs_from_saved_context(uc); + uc->uc_mcontext.gregs[REG_RIP] = ret_pc; + return true; +#endif // 0 + } +#endif // COMPILER2 + + else if ((sig == SIGSEGV || sig == SIGBUS) && + !MacroAssembler::needs_explicit_null_check((intptr_t) + info->si_addr)) { + // Determination of interpreter/vtable stub/compiled code null + // exception + stub = + SharedRuntime:: + continuation_for_implicit_exception(thread, pc, + SharedRuntime:: + IMPLICIT_NULL); + } + } + } + + if (stub != NULL) { + // save all thread context in case we need to restore it + + thread->set_saved_exception_pc(pc); + // TODO: + // Fastlane -- is this all? Do we need to save off any context? + // Currently, no, but might need to if we'll be returning to the + // context where the trap occurred. Will need to revisit this for + // compiled safepoint stubs. factor me: setPC + uc->context_rip = (__register_t) stub; + return true; + } + + // jni_fast_GetField can trap at certain pc's if a GC kicks in + // and the heap gets shrunk before the field access. + if ((sig == SIGSEGV) || (sig == SIGBUS)) { + address addr = JNI_FastGetField::find_slowcase_pc(pc); + if (addr != (address)-1) { + uc->context_rip = (__register_t)addr; + return true; + } + } + + // Check to see if we caught the safepoint code in the + // process of write protecting the memory serialization page. + // It write enables the page immediately after protecting it + // so we can just return to retry the write. + if (sig == SIGSEGV || sig == SIGBUS) { + if (os::is_memory_serialize_page(thread, (address) info->si_addr)) { + return true; + } + } + + // signal-chaining + if (UseSignalChaining) { + bool chained = false; + struct sigaction* actp = os::Bsd::get_chained_signal_action(sig); + if (actp != NULL) { + chained = os::Bsd::chained_handler(actp, sig, info, ucVoid); + } + if (chained) { + // signal-chaining in effect. Continue. + return true; + } + } + + if (sig == SIGPIPE) { + if (PrintMiscellaneous && (WizardMode || Verbose)) { + warning("Ignoring SIGPIPE - see bug 4229104"); + } + return 1; + } + + if (!abort_if_unrecognized) { + // caller wants another chance, so give it to him + return false; + } + + if (pc == NULL && uc != NULL) { + pc = (address) uc->context_rip; + } + + // unmask current signal + sigset_t newset; + sigemptyset(&newset); + sigaddset(&newset, sig); + sigprocmask(SIG_UNBLOCK, &newset, NULL); + + VMError err(t, sig, pc, info, ucVoid); + err.report_and_die(); + + ShouldNotReachHere(); +} + +void os::Bsd::init_thread_fpu_state(void) +{ + // Nothing to do +} + +///////////////////////////////////////////////////////////////////////////// +// helper functions for fatal error handler + +void os::print_context(outputStream* st, void* context) +{ + if (context == NULL) { + return; + } + + ucontext_t* uc = (ucontext_t*) context; + st->print_cr("Registers:"); + st->print( "RAX=" INTPTR_FORMAT, uc->context_rax); + st->print(", RBX=" INTPTR_FORMAT, uc->context_rbx); + st->print(", RCX=" INTPTR_FORMAT, uc->context_rcx); + st->print(", RDX=" INTPTR_FORMAT, uc->context_rdx); + st->cr(); + st->print( "RSP=" INTPTR_FORMAT, uc->context_rsp); + st->print(", RBP=" INTPTR_FORMAT, uc->context_rbp); + st->print(", RSI=" INTPTR_FORMAT, uc->context_rsi); + st->print(", RDI=" INTPTR_FORMAT, uc->context_rdi); + st->cr(); + st->print( "R8 =" INTPTR_FORMAT, uc->context_r8); + st->print(", R9 =" INTPTR_FORMAT, uc->context_r9); + st->print(", R10=" INTPTR_FORMAT, uc->context_r10); + st->print(", R11=" INTPTR_FORMAT, uc->context_r11); + st->cr(); + st->print( "R12=" INTPTR_FORMAT, uc->context_r12); + st->print(", R13=" INTPTR_FORMAT, uc->context_r13); + st->print(", R14=" INTPTR_FORMAT, uc->context_r14); + st->print(", R15=" INTPTR_FORMAT, uc->context_r15); + st->cr(); + st->print( "RIP=" INTPTR_FORMAT, uc->context_rip); + st->print(", EFL=" INTPTR_FORMAT, uc->context_flags); + st->print(", ERR=" INTPTR_FORMAT, uc->context_err); + st->cr(); + st->print(" TRAPNO=" INTPTR_FORMAT, uc->context_trapno); + st->cr(); + st->cr(); + + intptr_t* sp = (intptr_t*) os::Bsd::ucontext_get_sp(uc); + st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp); + print_hex_dump(st, (address) sp, (address) (sp + 8*sizeof(intptr_t)), sizeof(intptr_t)); + st->cr(); + + // Note: it may be unsafe to inspect memory near pc. For example, pc + // may point to garbage if entry point in an nmethod is + // corrupted. Leave this at the end, and hope for the best. + address pc = ucontext_get_pc(uc); + st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); + print_hex_dump(st, pc - 16, pc + 16, sizeof(char)); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,12 @@ +/* + * $Id: os_bsd_amd64.hpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + + + // Used to register dynamic code cache area with the OS + // Note: Currently only used in 64 bit Windows implementations + static bool register_code_area(char *low, char *high) { return true; } diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/prefetch_bsd_amd64.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/prefetch_bsd_amd64.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/prefetch_bsd_amd64.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/prefetch_bsd_amd64.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,29 @@ +/* + * $Id: prefetch_bsd_amd64.inline.hpp,v 1.3 2005/08/06 06:45:55 glewis Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +inline void Prefetch::read(void* loc, intx interval) +{ + __builtin_prefetch((char*) loc + interval, 0); // prefetcht0 (%rsi, %rdi,1) +} + +inline void Prefetch::write(void* loc, intx interval) +{ + // Force prefetchw. The gcc builtin produces prefetcht0 or prefetchw + // depending on command line switches we don't control here. + // Use of this method should be gated by VM_Version::has_prefetchw. + /* + * How do we invoke VM_Version::has_prefetchw here? + * Can we do something at compile time instead to remove that overhead? + */ +//#ifdef __amd64__ +// __asm__ ("prefetchw (%0,%1,1)" : : "r" (loc), "r" (interval)); +//#elif __em64t__ + __asm__ ("prefetcht0 (%0,%1,1)" : : "r" (loc), "r" (interval)); +//#endif + // __builtin_prefetch((char*) loc + interval, 1); // prefetcht0/prefetchw (%rsi,%rdi,1) +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/runtime_bsd_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/runtime_bsd_amd64.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/runtime_bsd_amd64.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/runtime_bsd_amd64.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,22 @@ +/* + * $Id: runtime_bsd_amd64.cpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_runtime_bsd_amd64.cpp.incl" + +void OptoRuntime::generate_arraycopy_stubs() { + // Use default for _jbyte_arraycopy + _jshort_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_jshorts_atomic); + _jint_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_jints_atomic); + _jlong_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_jlongs_atomic); + + _arrayof_jbyte_arraycopy = CAST_FROM_FN_PTR(address, _Copy_arrayof_conjoint_bytes); + _arrayof_jshort_arraycopy = CAST_FROM_FN_PTR(address, _Copy_arrayof_conjoint_jshorts); + _arrayof_jint_arraycopy = CAST_FROM_FN_PTR(address, _Copy_arrayof_conjoint_jints); + _arrayof_jlong_arraycopy = CAST_FROM_FN_PTR(address, _Copy_arrayof_conjoint_jlongs); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/safepoint_bsd_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/safepoint_bsd_amd64.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/safepoint_bsd_amd64.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/safepoint_bsd_amd64.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,188 @@ +/* + * $Id: safepoint_bsd_amd64.cpp,v 1.3 2007/01/19 23:27:01 truk Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_safepoint_bsd_amd64.cpp.incl" + + +bool +SafepointSynchronize::safepoint_safe(JavaThread* thread, + JavaThreadState state) +{ + switch(state) { + // blocked threads and native threads are already safepoint safe. + case _thread_in_native: + case _thread_blocked: + return true; + + default: + return false; + } +} + +// The patching of the return instruction is machine-specific +void SafepointSynchronize::patch_return_instruction_md(address cb_pc) +{ + // The relocation info. is actually after the ret + // (i.e., where we are going to patch with an illegal instruction. + cb_pc -= NativeReturn::instruction_size; + + assert(((NativeInstruction*) cb_pc)->is_return(), + "must be a return instruction"); + + // In C1 code is part of ret eventually + NOT_COMPILER1(assert(((NativeInstruction*) (cb_pc + 1))->is_nop(), + "must be a nop instruction");) + NOT_COMPILER1(assert(((NativeInstruction*) (cb_pc + 2))->is_nop(), + "must be a nop instruction");) + assert(NativePopReg::instruction_size + + NativeIllegalInstruction::instruction_size == 3, + "wrong code format"); + // Pop return address (it is getting pushed by the SafepointBlob again) + NativePopReg::insert(cb_pc, rbx); + NativeIllegalInstruction::insert(cb_pc + NativePopReg::instruction_size); +} + +#ifndef CORE + +int CompiledCodeSafepointHandler::pd_thread_code_buffer_size(nmethod* nm) +{ + // Worst case: only calls/jmps (5 bytes), 16 additional bytes for each + return nm->instructions_size() * 5 + 4 * 128 + 64; // 1 + 4 +} + +void +CompiledCodeSafepointHandler:: +pd_patch_runtime_calls_with_trampolines(ThreadCodeBuffer* cb, + int offset_of_first_trampoline) +{ + nmethod* nm = cb->method(); + + uintptr_t* data = (uintptr_t*) align_size_up((uintptr_t) cb->code_begin() + + offset_of_first_trampoline, + 128); + + assert(((uintptr_t) data) % 128 == 0, "must be aligned"); + + __int128_t* float_signflip = (__int128_t*) data; + *float_signflip = 0x80000000800000008000000080000000LL; + data += 2; + + __int128_t* double_signflip = (__int128_t*) data; + *double_signflip = 0x80000000000000008000000000000000LL; + data += 2; + + __int128_t* float_signmask = (__int128_t*) data; + *float_signmask = 0x7FFFFFFF7FFFFFFF7FFFFFFF7FFFFFFFLL; + data += 2; + + __int128_t* double_signmask = (__int128_t*) data; + *double_signmask = 0x7FFFFFFFFFFFFFFF7FFFFFFFFFFFFFFFLL; + data += 2; + + RelocIterator iter(nm); + while (iter.next()) { + address reloc_pc = iter.addr(); + if (reloc_pc >= nm->exception_end()) { // XXX + break; + } + + assert(((address) data) - cb->code_begin() < cb->size(), + "trampolines must fit within ThreadCodeBuffer"); + + address cb_pc = cb->code_begin() + (reloc_pc - nm->instructions_begin()); + assert(cb->contains(cb_pc), "pc must be in temp buffer"); + + switch (iter.type()) { + case relocInfo::external_word_type: { + if (ShowSafepointMsgs && Verbose) { + tty->print_cr("fixing global reference at " INTPTR_FORMAT + " (org. pc: " INTPTR_FORMAT ")", cb_pc, reloc_pc); + } + if (iter.datalen() == 0) { + address disp = Assembler::locate_operand(reloc_pc, + Assembler::disp32_operand); + __int128_t old_value = *(__int128_t*) (disp + *(int*) disp + 4); + + disp = Assembler::locate_operand(cb_pc, Assembler::disp32_operand); + if (old_value == *float_signflip) { + *(int*) disp = ((address) float_signflip) - disp - 4; + } else if (old_value == *double_signflip) { + *(int*) disp = ((address) double_signflip) - disp - 4; + } else if (old_value == *float_signmask) { + *(int*) disp = ((address) float_signmask) - disp - 4; + } else if (old_value == *double_signmask) { + *(int*) disp = ((address) double_signmask) - disp - 4; + } else { + ShouldNotReachHere(); + } + } + break; + } + case relocInfo::runtime_call_type: { + if (ShowSafepointMsgs && Verbose) { + tty->print_cr("trampolining runtime call at " INTPTR_FORMAT + " (org. pc: " INTPTR_FORMAT ")", cb_pc, reloc_pc); + } + // Replace offset of call/jmp instruction with that of + // trampoline, which will fabricate the real 64-bit destination + // address and jump to it. + // Contents of trampoline (14 bytes + 2 bytes padding) + // 0: dest address + // 8: ff 25 f2 ff ff ff jmp *-14(%rip) #*0 + // e: 66 data16 + // f: 90 nop + // Entry point is 8. + + // original call/jmp + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(reloc_pc); + // real dest address + uintptr_t real_dest_pc; + if (ni->is_call()) { + real_dest_pc = (uintptr_t) NativeCall::nativeCall_at(reloc_pc)->destination(); + } else if (ni->is_jump()) { + real_dest_pc = (uintptr_t) NativeJump::nativeJump_at(reloc_pc)->jump_destination(); + } else if (ni->is_cond_jump()) { + real_dest_pc = + (uintptr_t) NativeGeneralJump::nativeGeneralJump_at(reloc_pc)->jump_destination(); + } else { + ShouldNotReachHere(); + } + + // insert real dest address + *data++ = real_dest_pc; + + // call/jmp we have to patch + ni = NativeInstruction::nativeInstruction_at(cb_pc); + // patch the call/jmp + if (ni->is_call()) { + NativeCall::nativeCall_at(cb_pc)->set_destination((address) data); + } else if (ni->is_jump()) { + NativeJump::nativeJump_at(cb_pc)->set_jump_destination((address) data); + } else if (ni->is_cond_jump()) { + // %%%% kludge this, for now, until we get a jump_destination method + address old_dest = NativeGeneralJump::nativeGeneralJump_at(cb_pc)->jump_destination(); + address disp = Assembler::locate_operand(cb_pc, + Assembler::call32_operand); + *(int*) disp += (((address) data) - old_dest); + } else { + ShouldNotReachHere(); + } + + // insert jmp *-14(%rip) ; data16 nop + *data++ = 0x9066fffffff225ff; + + break; + } + default: + break; + } + } +} + +#endif // !CORE diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,20 @@ +/* + * $Id: threadLS_bsd_amd64.cpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// XXXBSD: look for linux implementation +// XXXBSD: utilize %gs defs in FreeBSD-5 + +#include "incls/_precompiled.incl" +#include "incls/_threadLS_bsd_amd64.cpp.incl" + +void ThreadLocalStorage::generate_code_for_get_thread() { +} + +extern "C" Thread* get_thread() { + return ThreadLocalStorage::thread(); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.hpp 2007-02-24 09:42:07.000000000 +0100 @@ -0,0 +1,46 @@ +/* + * $Id: threadLS_bsd_amd64.hpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Processor dependent parts of ThreadLocalStorage + +private: + static Thread* _get_thread_cache[]; // index by [(raw_id^(raw_id>>10)) % _pd_cache_size] + static Thread* get_thread_via_cache_slowly(uintptr_t raw_id, int index); + + NOT_PRODUCT(static int _tcacheHit;) + NOT_PRODUCT(static int _tcacheMiss;) + +public: + // Cache hit/miss statistics + static void print_statistics() PRODUCT_RETURN; + + enum Constants { + // projected typical # of threads * 2 * typical active stack pages + _pd_cache_size = 128*2*4, + _pd_min_page_size = 4*K, + _pd_typical_stack_size = 512*K + }; + + static address pd_sp_address() { + register void *rsp __asm__ ("rsp"); + return (address) rsp; + } + + static uintptr_t pd_raw_thread_id() { + address sp = pd_sp_address(); + return (unsigned int)sp / _pd_min_page_size; + } + + static int pd_cache_index(uintptr_t sp_page) { + // _pd_cache_size == 1<<10 + return (sp_page ^ (sp_page >> 10)) % _pd_cache_size; + } + + // Java Thread + static inline Thread* thread(); + diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,56 @@ +/* + * $Id: thread_bsd_amd64.cpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_thread_bsd_amd64.cpp.incl" + +// For Forte Analyzer AsyncGetCallTrace profiling support - thread is +// currently interrupted by SIGPROF +bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, + void* ucontext, + bool isInJava) +{ + assert(Thread::current() == this, "caller must be current thread"); + assert(this->is_Java_thread(), "must be JavaThread"); + + JavaThread* jt = (JavaThread*) this; + + // If we have a last_Java_frame, then we should use it even if + // isInJava == true. It should be more reliable than ucontext info. + if (jt->has_last_Java_frame()) { + *fr_addr = jt->pd_last_frame(); + return true; + } + + // At this point, we don't have a last_Java_frame, so + // we try to glean some information out of the ucontext + // if we were running Java code when SIGPROF came in. + if (isInJava) { + ucontext_t* uc = (ucontext_t*) ucontext; + + intptr_t* ret_fp; + intptr_t* ret_sp; + ExtendedPC addr = os::Bsd::fetch_frame_from_ucontext(this, uc, + &ret_sp, &ret_fp); + if (addr.contained_pc() == NULL || ret_sp == NULL || ret_fp == NULL) { + // ucontext wasn't useful + return false; + } + + frame ret_frame(ret_sp, ret_fp, addr.pc()); + if (!ret_frame.safe_for_sender(jt)) { + // nothing else to try if the frame isn't good + return false; + } + *fr_addr = ret_frame; + return true; + } + + // nothing else to try + return false; +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/thread_bsd_amd64.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,85 @@ +/* + * $Id: thread_bsd_amd64.hpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + + private: + void pd_initialize() + { + _anchor.clear(); + } + + frame pd_last_frame() + { + assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); + if (_anchor.last_Java_pc() != NULL) { + return frame(_anchor.last_Java_sp(), + _anchor.last_Java_fp(), + _anchor.last_Java_pc()); + } else { + // This will pick up pc from sp + return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp()); + } + } + + public: + // Mutators are highly dangerous.... + intptr_t* last_Java_fp() + { + return _anchor.last_Java_fp(); + } + + void set_last_Java_fp(intptr_t* fp) + { + _anchor.set_last_Java_fp(fp); + } + + void set_base_of_stack_pointer(intptr_t* base_sp) + { + } + + static ByteSize last_Java_fp_offset() + { + return byte_offset_of(JavaThread, _anchor) + + JavaFrameAnchor::last_Java_fp_offset(); + } + + intptr_t* base_of_stack_pointer() + { + return NULL; + } + + void record_base_of_stack_pointer() + { + } + + // debugging support + static frame current_frame_guess() + { + intptr_t* fp = + (*CAST_TO_FN_PTR(intptr_t* (*)(void), + StubRoutines::amd64::get_previous_fp_entry()))(); + + // fp points to the frame of the ps stub routine + frame f(NULL, fp, (address) NULL); + RegisterMap map(JavaThread::current(), false); + return f.sender(&map); + } + + intptr_t pd_get_fast_thread_id() + { + return (intptr_t) ThreadLocalStorage::thread(); + } + + bool pd_get_top_frame_for_signal_handler(frame* fr_addr, + void* ucontext, + bool isInJava); + + // These routines are only used on cpu architectures that + // have separate register stacks (Itanium). + static bool register_stack_overflow() { return false; } + static void enable_register_stack_guard() {} + static void disable_register_stack_guard() {} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/vmStructs_bsd_amd64.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/vmStructs_bsd_amd64.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_amd64/vm/vmStructs_bsd_amd64.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_amd64/vm/vmStructs_bsd_amd64.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,42 @@ +/* + * $Id: vmStructs_bsd_amd64.hpp,v 1.2 2004/12/23 19:35:20 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// These are the OS and CPU-specific fields, types and integer +// constants required by the Serviceability Agent. This file is +// referenced by vmStructs.cpp. + +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, nonproduct_noncore_nonstatic_field, c2_nonstatic_field, noncore_nonstatic_field, volatile_noncore_nonstatic_field, noncore_static_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ + \ + /******************************/ \ + /* Threads (NOTE: incomplete) */ \ + /******************************/ \ + nonstatic_field(OSThread, _thread_id, pthread_t) \ + /* This must be the last entry, and must be present */ \ + last_entry() + + +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_noncore_type, declare_noncore_toplevel_type, declare_noncore_oop_type, declare_noncore_integer_type, declare_noncore_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ + \ + /**********************/ \ + /* Posix Thread IDs */ \ + /**********************/ \ + \ + declare_unsigned_integer_type(pthread_t) \ + \ + /* This must be the last entry, and must be present */ \ + last_entry() + +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_noncore_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ + \ + /* This must be the last entry, and must be present */ \ + last_entry() + +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ + \ + /* This must be the last entry, and must be present */ \ + last_entry() diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/assembler_bsd_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/assembler_bsd_i486.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/assembler_bsd_i486.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/assembler_bsd_i486.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,69 @@ +/* + * $Id: assembler_bsd_i486.cpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_assembler_bsd_i486.cpp.incl" + + +void Assembler::int3() { + pushl(eax); + pushl(edx); + pushl(ecx); + call(CAST_FROM_FN_PTR(address, os::breakpoint), relocInfo::runtime_call_type); + popl(ecx); + popl(edx); + popl(eax); +} + +void MacroAssembler::get_thread(Register thread) { + + // XXXBSD: cleanup tls* code +#if SOLARIS + // Try to emit a Solaris-specific fast TSD/TLS accessor. + ThreadLocalStorage::pd_tlsAccessMode tlsMode = ThreadLocalStorage::pd_getTlsAccessMode () ; + if (tlsMode == ThreadLocalStorage::pd_tlsAccessIndirect) { // T1 + // Use thread as a temporary: mov r, gs:[0]; mov r, [r+tlsOffset] + emit_byte (Assembler::GS_segment) ; + movl (thread, Address(0, relocInfo::none)) ; + movl (thread, Address(thread, ThreadLocalStorage::pd_getTlsOffset())) ; + return ; + } else + if (tlsMode == ThreadLocalStorage::pd_tlsAccessDirect) { // T2 + // mov r, gs:[tlsOffset] + emit_byte (Assembler::GS_segment) ; + movl (thread, Address(ThreadLocalStorage::pd_getTlsOffset(), relocInfo::none)) ; + return ; + } +#endif + + // call pthread_getspecific + // void * pthread_getspecific(pthread_key_t key); + if (thread != eax) pushl(eax); + pushl(ecx); + pushl(edx); + + pushl(ThreadLocalStorage::thread_index()); + call(CAST_FROM_FN_PTR(address, pthread_getspecific), relocInfo::runtime_call_type); + increment(esp, wordSize); + + popl(edx); + popl(ecx); + if (thread != eax) { + movl(thread, eax); + popl(eax); + } +} + +bool MacroAssembler::needs_explicit_null_check(int offset) { + // Identical to Sparc/Solaris code + bool offset_in_first_page = 0 <= offset && offset < os::vm_page_size(); + return !offset_in_first_page; +} + + + diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/atomic_bsd_i486.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/atomic_bsd_i486.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/atomic_bsd_i486.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/atomic_bsd_i486.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,127 @@ +/* + * $Id: atomic_bsd_i486.inline.hpp,v 1.3 2004/12/23 19:38:38 phantom Exp $ + */ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// Implementation of class atomic + +inline void Atomic::store (jbyte store_value, jbyte* dest) { *dest = store_value; } +inline void Atomic::store (jshort store_value, jshort* dest) { *dest = store_value; } +inline void Atomic::store (jint store_value, jint* dest) { *dest = store_value; } +//inline void Atomic::store (jlong store_value, jlong* dest) { *dest = store_value; } +inline void Atomic::store_ptr(intptr_t store_value, intptr_t* dest) { *dest = store_value; } +inline void Atomic::store_ptr(void* store_value, void* dest) { *(void**)dest = store_value; } + +inline void Atomic::store (jbyte store_value, volatile jbyte* dest) { *dest = store_value; } +inline void Atomic::store (jshort store_value, volatile jshort* dest) { *dest = store_value; } +inline void Atomic::store (jint store_value, volatile jint* dest) { *dest = store_value; } +//inline void Atomic::store (jlong store_value, volatile jlong* dest) { *dest = store_value; } +inline void Atomic::store_ptr(intptr_t store_value, volatile intptr_t* dest) { *dest = store_value; } +inline void Atomic::store_ptr(void* store_value, volatile void* dest) { *(void* volatile *)dest = store_value; } + + +// Adding a lock prefix to an instruction on MP machine +#define LOCK_IF_MP(mp) "cmp $0, " #mp "; je 1f; lock; 1: " + +inline jint Atomic::add (jint add_value, volatile jint* dest) { + jint addend = add_value; + bool mp = os::is_MP(); + __asm__ volatile ( LOCK_IF_MP(%3) "xaddl %0,(%2)" + : "=r" (addend) + : "0" (addend), "r" (dest), "r" (mp) + : "cc", "memory"); + return addend + add_value; +} + +inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) { + return (intptr_t)Atomic::add((jint)add_value, (volatile jint*)dest); +} + +inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) { + return (void*)Atomic::add((jint)add_value, (volatile jint*)dest); +} + + +inline void Atomic::inc (volatile jint* dest) { + bool mp = os::is_MP(); + __asm__ volatile (LOCK_IF_MP(%1) "incl (%0)" : + : "r" (dest), "r" (mp) : "cc", "memory"); +} + +inline void Atomic::inc_ptr(volatile intptr_t* dest) { + inc((volatile jint*)dest); +} + +inline void Atomic::inc_ptr(volatile void* dest) { + inc((volatile jint*)dest); +} + + +inline void Atomic::dec (volatile jint* dest) { + bool mp = os::is_MP(); + __asm__ volatile (LOCK_IF_MP(%1) "decl (%0)" : + : "r" (dest), "r" (mp) : "cc", "memory"); +} + +inline void Atomic::dec_ptr(volatile intptr_t* dest) { + dec((volatile jint*)dest); +} + +inline void Atomic::dec_ptr(volatile void* dest) { + dec((volatile jint*)dest); +} + + +inline jint Atomic::xchg (jint exchange_value, volatile jint* dest) { + __asm__ volatile ( "xchgl (%2),%0" + : "=r" (exchange_value) + : "0" (exchange_value), "r" (dest) + : "memory"); + return exchange_value; +} + +inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, volatile intptr_t* dest) { + return (intptr_t)xchg((jint)exchange_value, (volatile jint*)dest); +} + +inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) { + return (void*)xchg((jint)exchange_value, (volatile jint*)dest); +} + + +inline jint Atomic::cmpxchg (jint exchange_value, volatile jint* dest, jint compare_value) { + bool mp = os::is_MP(); + __asm__ volatile (LOCK_IF_MP(%4) "cmpxchgl %1,(%3)" + : "=a" (exchange_value) + : "r" (exchange_value), "a" (compare_value), "r" (dest), "r" (mp) + : "cc", "memory"); + return exchange_value; +} + +inline jlong Atomic::cmpxchg (jlong exchange_value, volatile jlong* dest, jlong compare_value) { + bool mp = os::is_MP(); + jlong old_value; + jint lo = (jint)exchange_value; + jint hi = (jint)(exchange_value >> 32); + /* XXXBSD: cannot declare %%ebx as clobber register, since it's not allowed */ + __asm__ volatile ("pushl %%ebx;" + "xchgl %%ebx, %1;" + LOCK_IF_MP(%6) + "cmpxchg8b (%5); xchgl %%ebx, %1;" + "popl %%ebx;" + : "=A" (old_value), "=r" (lo) + : "1" (lo), "c" (hi), "A" (compare_value), "r" (dest), "m" (mp) + : "cc", "memory"); + return old_value; +} + +inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, volatile intptr_t* dest, intptr_t compare_value) { + return (intptr_t)cmpxchg((jint)exchange_value, (volatile jint*)dest, (jint)compare_value); +} + +inline void* Atomic::cmpxchg_ptr(void* exchange_value, volatile void* dest, void* compare_value) { + return (void*)cmpxchg((jint)exchange_value, (volatile jint*)dest, (jint)compare_value); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.ad jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.ad --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.ad 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.ad 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,166 @@ +// $Id: bsd_i486.ad,v 1.3 2007/01/15 04:55:02 christos Exp $ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// X86 Bsd Architecture Description File + +//----------OS-DEPENDENT ENCODING BLOCK----------------------------------------------------- +// This block specifies the encoding classes used by the compiler to output +// byte streams. Encoding classes generate functions which are called by +// Machine Instruction Nodes in order to generate the bit encoding of the +// instruction. Operands specify their base encoding interface with the +// interface keyword. There are currently supported four interfaces, +// REG_INTER, CONST_INTER, MEMORY_INTER, & COND_INTER. REG_INTER causes an +// operand to generate a function which returns its register number when +// queried. CONST_INTER causes an operand to generate a function which +// returns the value of the constant when queried. MEMORY_INTER causes an +// operand to generate four functions which return the Base Register, the +// Index Register, the Scale Value, and the Offset Value of the operand when +// queried. COND_INTER causes an operand to generate six functions which +// return the encoding code (ie - encoding bits for the instruction) +// associated with each basic boolean condition for a conditional instruction. +// Instructions specify two basic values for encoding. They use the +// ins_encode keyword to specify their encoding class (which must be one of +// the class names specified in the encoding block), and they use the +// opcode keyword to specify, in order, their primary, secondary, and +// tertiary opcode. Only the opcode sections which a particular instruction +// needs for encoding need to be specified. +encode %{ + // Build emit functions for each basic byte or larger field in the intel + // encoding scheme (opcode, rm, sib, immediate), and call them from C++ + // code in the enc_class source block. Emit functions will live in the + // main source block for now. In future, we can generalize this by + // adding a syntax that specifies the sizes of fields in an order, + // so that the adlc can build the emit functions automagically + + enc_class Java_To_Native (method meth) %{ // CALL Java_To_Native + // This is the instruction starting address for relocation info. + cbuf.set_mark(); + $$$emit8$primary; + // CALL directly to the runtime + emit_d32_reloc(cbuf, ($meth$$method - (int)(cbuf.code_end()) - 4), + runtime_call_Relocation::spec(), RELOC_IMM32 ); + %} + + enc_class bsd_tlsencode (eRegP dst) %{ + Register dstReg = RegisterImpl::as_Register($dst$$reg); + MacroAssembler* masm = new MacroAssembler(&cbuf); + masm->get_thread(dstReg); + %} + + enc_class bsd_breakpoint %{ + MacroAssembler* masm = new MacroAssembler(&cbuf); + masm->call(CAST_FROM_FN_PTR(address, os::breakpoint), relocInfo::runtime_call_type); + %} + + enc_class call_epilog %{ + if( VerifyStackAtCalls ) { + // Check that stack depth is unchanged: find majik cookie on stack + int framesize = ra_->reg2offset_unchecked(OptoReg::add(ra_->_matcher._old_SP,-2)); + if(framesize >= 128) { + emit_opcode(cbuf, 0x81); // cmp [esp+0],0xbadb1ood + emit_d8(cbuf,0xBC); + emit_d8(cbuf,0x24); + emit_d32(cbuf,framesize); // Find majik cookie from ESP + emit_d32(cbuf, 0xbadb100d); + } + else { + emit_opcode(cbuf, 0x81); // cmp [esp+0],0xbadb1ood + emit_d8(cbuf,0x7C); + emit_d8(cbuf,0x24); + emit_d8(cbuf,framesize); // Find majik cookie from ESP + emit_d32(cbuf, 0xbadb100d); + } + // jmp EQ around INT3 + // QQQ TODO + const int jump_around = 5; // size of call to breakpoint, 1 for CC + emit_opcode(cbuf,0x74); + emit_d8(cbuf, jump_around); + // QQQ temporary + emit_break(cbuf); + // Die if stack mismatch + // emit_opcode(cbuf,0xCC); + } + %} + +%} + +// INSTRUCTIONS -- Platform dependent + +//----------OS and Locking Instructions---------------------------------------- + +// This name is KNOWN by the ADLC and cannot be changed. +// The ADLC forces a 'TypeRawPtr::BOTTOM' output type +// for this guy. +instruct tlsLoadP(eAXRegP dst, eFlagsReg cr) %{ + match(Set dst (ThreadLocal)); + effect(DEF dst, KILL cr); + + format %{ "MOV EAX, Thread::current()" %} + ins_encode( bsd_tlsencode(dst) ); + ins_pipe( ialu_reg_fat ); +%} + +instruct TLS(eAXRegP dst) %{ + match(Set dst (ThreadLocal)); + + expand %{ + tlsLoadP(dst); + %} +%} + +// Call Native Instruction +instruct CallNativeDirect(method meth) %{ + match(CallNative ); + effect(USE meth); + + ins_cost(300); + format %{ "CALL,native " %} + opcode(0xE8); /* E8 cd */ + // Use FFREEs to clear entries in float stack + ins_encode( pre_call_FPU, FFree_Float_Stack_All, Java_To_Native( meth ), + call_epilog, post_call_FPU, post_call_verify_mxcsr ); + ins_pipe( pipe_slow ); + ins_pc_relative(1); +%} + +// Die now +instruct ShouldNotReachHere( ) +%{ + match(Halt); + + // Use the following format syntax + format %{ "INT3 ; ShouldNotReachHere" %} + // QQQ TODO for now call breakpoint + // opcode(0xCC); + // ins_encode(Opc); + ins_encode(bsd_breakpoint); + ins_pipe( pipe_slow ); +%} + + + +// Platform dependent source + +source %{ + +// emit an interrupt that is caught by the debugger +void emit_break(CodeBuffer &cbuf) { + + // Debugger doesn't really catch this but best we can do so far QQQ + MacroAssembler* masm = new MacroAssembler(&cbuf); + masm->call(CAST_FROM_FN_PTR(address, os::breakpoint), relocInfo::runtime_call_type); +} + +void MachBreakpointNode::emit(CodeBuffer &cbuf, PhaseRegAlloc *ra_) const { + emit_break(cbuf); +} + + +uint MachBreakpointNode::size(PhaseRegAlloc *ra_) const { + return 5; +} + +%} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.s jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.s --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.s 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/bsd_i486.s 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,611 @@ +.ident "$Id: bsd_i486.s,v 1.2 2004/12/20 10:00:42 phantom Exp $" +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + + .globl fixcw + .globl sse_check + .globl sse_unavailable +# .globl gs_load +# .globl gs_thread + + # NOTE WELL! The _Copy functions are called directly + # from server-compiler-generated code via CallLeafNoFP, + # which means that they *must* either not use floating + # point or use it in the same manner as does the server + # compiler. + + .globl _Copy_conjoint_bytes + .globl _Copy_arrayof_conjoint_bytes + .globl _Copy_conjoint_jshorts_atomic + .globl _Copy_arrayof_conjoint_jshorts + .globl _Copy_conjoint_jints_atomic + .globl _Copy_arrayof_conjoint_jints + .globl _Copy_conjoint_jlongs_atomic + .globl _mmx_Copy_arrayof_conjoint_jshorts + + .section .text,"ax" + +# Support for void os::Solaris::init_thread_fpu_state() in os_solaris_i486.cpp +# Set fpu to 53 bit precision. This happens too early to use a stub. + .align 16 +fixcw: + pushl $0x27f + fldcw 0(%esp) + popl %eax + ret + +# Test SSE availability, used by os_solaris_i486.cpp + .align 16 +sse_check: + # Fault if SSE not available + xorps %xmm0,%xmm0 + # No fault + movl $1,%eax + ret + # Signal handler continues here if SSE is not available +sse_unavailable: + xorl %eax,%eax + ret + +# # Fast thread accessors, used by threadLS_solaris_i486.cpp +# .align 16 +# gs_load: +# movl 4(%esp),%ecx +# movl %gs:(%ecx),%eax +# ret + +# .align 16 +# gs_thread: +# movl %gs:0x0,%eax +# ret + + # Support for void Copy::conjoint_bytes(void* from, + # void* to, + # size_t count) + .align 16 +_Copy_conjoint_bytes: + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi + movl 8+ 4(%esp),%esi # from + movl 8+ 8(%esp),%edi # to + cmpl %esi,%edi + leal -1(%esi,%ecx),%eax #/ from + count - 1 + jbe cb_CopyRight + cmpl %eax,%edi + jbe cb_CopyLeft + # copy from low to high +cb_CopyRight: + cmpl $3,%ecx + jbe 5f # <= 3 bytes + # align source address at dword address boundary + movl %ecx,%eax # original count + movl $4,%ecx + subl %esi,%ecx + andl $3,%ecx # prefix byte count + jz 1f # no prefix + subl %ecx,%eax # byte count less prefix + # copy prefix + subl %esi,%edi +0: movb (%esi),%dl + movb %dl,(%edi,%esi,1) + incl %esi + decl %ecx + jnz 0b + addl %esi,%edi +1: movl %eax,%ecx # byte count less prefix + shrl $2,%ecx # dword count + jz 4f # no dwords to move + cmpl $32,%ecx + jbe 2f # <= 32 dwords + # copy aligned dwords + rep; smovl + jmp 4f + # copy aligned dwords +2: subl %esi,%edi + .align 16 +3: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + addl $4,%esi + decl %ecx + jnz 3b + addl %esi,%edi +4: movl %eax,%ecx # byte count less prefix + andl $3,%ecx # suffix byte count + jz 7f # no suffix + # copy suffix +5: xorl %eax,%eax +6: movb (%esi,%eax,1),%dl + movb %dl,(%edi,%eax,1) + incl %eax + decl %ecx + jnz 6b +7: popl %edi + popl %esi + ret + # copy from high to low +cb_CopyLeft: + std + leal -4(%edi,%ecx),%edi # to + count - 4 + movl %eax,%esi # from + count - 1 + movl %ecx,%eax + subl $3,%esi # from + count - 4 + cmpl $3,%ecx + jbe 5f # <= 3 bytes +1: shrl $2,%ecx # dword count + jz 4f # no dwords to move + cmpl $32,%ecx + ja 3f # > 32 dwords + # copy dwords, aligned or not + subl %esi,%edi + .align 16 +2: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + subl $4,%esi + decl %ecx + jnz 2b + addl %esi,%edi + jmp 4f + # copy dwords, aligned or not +3: rep; smovl +4: movl %eax,%ecx # byte count + andl $3,%ecx # suffix byte count + jz 7f # no suffix + # copy suffix +5: subl %esi,%edi + addl $3,%esi +6: movb (%esi),%dl + movb %dl,(%edi,%esi,1) + decl %esi + decl %ecx + jnz 6b +7: cld + popl %edi + popl %esi + ret + + # Support for void Copy::arrayof_conjoint_bytes(void* from, + # void* to, + # size_t count) + # + # Same as _Copy_conjoint_bytes, except no source alignment check. + .align 16 +_Copy_arrayof_conjoint_bytes: + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi + movl 8+ 4(%esp),%esi # from + movl 8+ 8(%esp),%edi # to + cmpl %esi,%edi + leal -1(%esi,%ecx),%eax # from + count - 1 + jbe acb_CopyRight + cmpl %eax,%edi + jbe acb_CopyLeft + # copy from low to high +acb_CopyRight: + cmpl $3,%ecx + jbe 5f +1: movl %ecx,%eax + shrl $2,%ecx + jz 4f + cmpl $32,%ecx + ja 3f + # copy aligned dwords + subl %esi,%edi + .align 16 +2: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + addl $4,%esi + decl %ecx + jnz 2b + addl %esi,%edi + jmp 4f + # copy aligned dwords +3: rep; smovl +4: movl %eax,%ecx + andl $3,%ecx + jz 7f + # copy suffix +5: xorl %eax,%eax +6: movb (%esi,%eax,1),%dl + movb %dl,(%edi,%eax,1) + incl %eax + decl %ecx + jnz 6b +7: popl %edi + popl %esi + ret +acb_CopyLeft: + std + leal -4(%edi,%ecx),%edi # to + count - 4 + movl %eax,%esi # from + count - 1 + movl %ecx,%eax + subl $3,%esi # from + count - 4 + cmpl $3,%ecx + jbe 5f +1: shrl $2,%ecx + jz 4f + cmpl $32,%ecx + jbe 2f # <= 32 dwords + rep; smovl + jmp 4f + .=.+8 +2: subl %esi,%edi + .align 16 +3: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + subl $4,%esi + decl %ecx + jnz 3b + addl %esi,%edi +4: movl %eax,%ecx + andl $3,%ecx + jz 7f +5: subl %esi,%edi + addl $3,%esi +6: movb (%esi),%dl + movb %dl,(%edi,%esi,1) + decl %esi + decl %ecx + jnz 6b +7: cld + popl %edi + popl %esi + ret + + # Support for void Copy::conjoint_jshorts_atomic(void* from, + # void* to, + # size_t count) + .align 16 +_Copy_conjoint_jshorts_atomic: + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi + movl 8+ 4(%esp),%esi # from + movl 8+ 8(%esp),%edi # to + cmpl %esi,%edi + leal -2(%esi,%ecx,2),%eax # from + count*2 - 2 + jbe cs_CopyRight + cmpl %eax,%edi + jbe cs_CopyLeft + # copy from low to high +cs_CopyRight: + # align source address at dword address boundary + movl %esi,%eax # original from + andl $3,%eax # either 0 or 2 + jz 1f # no prefix + # copy prefix + movw (%esi),%dx + movw %dx,(%edi) + addl %eax,%esi # %eax == 2 + addl %eax,%edi + decl %ecx +1: movl %ecx,%eax # word count less prefix + sarl %ecx # dword count + jz 4f # no dwords to move + cmpl $32,%ecx + jbe 2f # <= 32 dwords + # copy aligned dwords + rep; smovl + jmp 4f + # copy aligned dwords +2: subl %esi,%edi + .align 16 +3: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + addl $4,%esi + decl %ecx + jnz 3b + addl %esi,%edi +4: andl $1,%eax # suffix count + jz 5f # no suffix + # copy suffix + movw (%esi),%dx + movw %dx,(%edi) +5: popl %edi + popl %esi + ret + # copy from high to low +cs_CopyLeft: + std + leal -4(%edi,%ecx,2),%edi # to + count*2 - 4 + movl %eax,%esi # from + count*2 - 2 + movl %ecx,%eax + subl $2,%esi # from + count*2 - 4 +1: sarl %ecx # dword count + jz 4f # no dwords to move + cmpl $32,%ecx + ja 3f # > 32 dwords + subl %esi,%edi + .align 16 +2: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + subl $4,%esi + decl %ecx + jnz 2b + addl %esi,%edi + jmp 4f +3: rep; smovl +4: andl $1,%eax # suffix count + jz 5f # no suffix + # copy suffix + addl $2,%esi + addl $2,%edi + movw (%esi),%dx + movw %dx,(%edi) +5: cld + popl %edi + popl %esi + ret + + # Support for void Copy::arrayof_conjoint_jshorts(void* from, + # void* to, + # size_t count) + .align 16 +_Copy_arrayof_conjoint_jshorts: + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi + movl 8+ 4(%esp),%esi # from + movl 8+ 8(%esp),%edi # to + cmpl %esi,%edi + leal -2(%esi,%ecx,2),%eax # from + count*2 - 2 + jbe acs_CopyRight + cmpl %eax,%edi + jbe acs_CopyLeft +acs_CopyRight: + movl %ecx,%eax # word count + sarl %ecx # dword count + jz 4f # no dwords to move + cmpl $32,%ecx + jbe 2f # <= 32 dwords + # copy aligned dwords + rep; smovl + jmp 4f + # copy aligned dwords + .=.+5 +2: subl %esi,%edi + .align 16 +3: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + addl $4,%esi + decl %ecx + jnz 3b + addl %esi,%edi +4: andl $1,%eax # suffix count + jz 5f # no suffix + # copy suffix + movw (%esi),%dx + movw %dx,(%edi) +5: popl %edi + popl %esi + ret +acs_CopyLeft: + std + leal -4(%edi,%ecx,2),%edi # to + count*2 - 4 + movl %eax,%esi # from + count*2 - 2 + movl %ecx,%eax + subl $2,%esi # from + count*2 - 4 + sarl %ecx # dword count + jz 4f # no dwords to move + cmpl $32,%ecx + ja 3f # > 32 dwords + subl %esi,%edi + .align 16 +2: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + subl $4,%esi + decl %ecx + jnz 2b + addl %esi,%edi + jmp 4f +3: rep; smovl +4: andl $1,%eax # suffix count + jz 5f # no suffix + # copy suffix + addl $2,%esi + addl $2,%edi + movw (%esi),%dx + movw %dx,(%edi) +5: cld + popl %edi + popl %esi + ret + + # Support for void Copy::conjoint_jints_atomic(void* from, + # void* to, + # size_t count) + # Equivalent to + # arrayof_conjoint_jints + .align 16 +_Copy_conjoint_jints_atomic: +_Copy_arrayof_conjoint_jints: + pushl %esi + movl 4+12(%esp),%ecx # count + pushl %edi + movl 8+ 4(%esp),%esi # from + movl 8+ 8(%esp),%edi # to + cmpl %esi,%edi + leal -4(%esi,%ecx,4),%eax # from + count*4 - 4 + jbe ci_CopyRight + cmpl %eax,%edi + jbe ci_CopyLeft +ci_CopyRight: + cmpl $32,%ecx + jbe 2f # <= 32 dwords + rep; smovl + popl %edi + popl %esi + ret + .=.+10 +2: subl %esi,%edi + .align 16 +3: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + addl $4,%esi + decl %ecx + jnz 3b + popl %edi + popl %esi + ret +ci_CopyLeft: + std + leal -4(%edi,%ecx,4),%edi # to + count*4 - 4 + cmpl $32,%ecx + ja 3f # > 32 dwords + subl %eax,%edi # eax == from + count*4 - 4 + .align 16 +2: movl (%eax),%edx + movl %edx,(%edi,%eax,1) + subl $4,%eax + decl %ecx + jnz 2b + cld + popl %edi + popl %esi + ret +3: movl %eax,%esi # from + count*4 - 4 + rep; smovl + cld + popl %edi + popl %esi + ret + + # Support for void Copy::conjoint_jlongs_atomic(jlong* from, + # jlong* to, + # size_t count) + # + # 32-bit + # + # count treated as signed + # + # if (from > to) { + # while (--count >= 0) { + # *to++ = *from++; + # } + # } else { + # while (--count >= 0) { + # to[count] = from[count]; + # } + # } + .align 16 +_Copy_conjoint_jlongs_atomic: + movl 4+8(%esp),%ecx # count + movl 4+0(%esp),%eax # from + movl 4+4(%esp),%edx # to + cmpl %eax,%edx + jae cla_CopyLeft +cla_CopyRight: + subl %eax,%edx + jmp 2f + .align 16 +1: fildll (%eax) + fistpll (%edx,%eax,1) + addl $8,%eax +2: decl %ecx + jge 1b + ret + .align 16 +3: fildll (%eax,%ecx,8) + fistpll (%edx,%ecx,8) +cla_CopyLeft: + decl %ecx + jge 3b + ret + + # Support for void Copy::arrayof_conjoint_jshorts(void* from, + # void* to, + # size_t count) + .align 16 +_mmx_Copy_arrayof_conjoint_jshorts: + pushl %esi + movl 4+12(%esp),%ecx + pushl %edi + movl 8+ 4(%esp),%esi + movl 8+ 8(%esp),%edi + cmpl %esi,%edi + leal -2(%esi,%ecx,2),%eax + jbe mmx_acs_CopyRight + cmpl %eax,%edi + jbe mmx_acs_CopyLeft +mmx_acs_CopyRight: + movl %ecx,%eax + sarl %ecx + je 5f + cmpl $33,%ecx + jae 3f +1: subl %esi,%edi + .align 16 +2: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + addl $4,%esi + decl %ecx + jnz 2b + addl %esi,%edi + jmp 5f +3: smovl # align to 8 bytes, we know we are 4 byte aligned to start + decl %ecx +4: .align 16 + movq 0(%esi),%mm0 + addl $64,%edi + movq 8(%esi),%mm1 + subl $16,%ecx + movq 16(%esi),%mm2 + movq %mm0,-64(%edi) + movq 24(%esi),%mm0 + movq %mm1,-56(%edi) + movq 32(%esi),%mm1 + movq %mm2,-48(%edi) + movq 40(%esi),%mm2 + movq %mm0,-40(%edi) + movq 48(%esi),%mm0 + movq %mm1,-32(%edi) + movq 56(%esi),%mm1 + movq %mm2,-24(%edi) + movq %mm0,-16(%edi) + addl $64,%esi + movq %mm1,-8(%edi) + cmpl $16,%ecx + jge 4b + emms + testl %ecx,%ecx + ja 1b +5: andl $1,%eax + je 7f +6: movw (%esi),%dx + movw %dx,(%edi) +7: popl %edi + popl %esi + ret +mmx_acs_CopyLeft: + std + leal -4(%edi,%ecx,2),%edi + movl %eax,%esi + movl %ecx,%eax + subl $2,%esi + sarl %ecx + je 4f + cmpl $32,%ecx + ja 3f + subl %esi,%edi + .align 16 +2: movl (%esi),%edx + movl %edx,(%edi,%esi,1) + subl $4,%esi + decl %ecx + jnz 2b + addl %esi,%edi + jmp 4f +3: rep; smovl +4: andl $1,%eax + je 6f + addl $2,%esi + addl $2,%edi +5: movw (%esi),%dx + movw %dx,(%edi) +6: cld + popl %edi + popl %esi + ret diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/bytes_bsd_i486.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/bytes_bsd_i486.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/bytes_bsd_i486.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/bytes_bsd_i486.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,42 @@ +/* + * $Id: bytes_bsd_i486.inline.hpp,v 1.2 2004/12/20 09:56:11 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Efficient swapping of data bytes from Java byte +// ordering to native byte ordering and vice versa. +inline u2 Bytes::swap_u2(u2 x) { + u2 ret; + __asm__ __volatile__ ( + "movw %0, %%ax;" + "xchg %%al, %%ah;" + "movw %%ax, %0" + :"=r" (ret) // output : register 0 => ret + :"0" (x) // input : x => register 0 + :"ax", "0" // clobbered registers + ); + return ret; +} + +inline u4 Bytes::swap_u4(u4 x) { + u4 ret; + __asm__ __volatile__ ( + "bswap %0" + :"=r" (ret) // output : register 0 => ret + :"0" (x) // input : x => register 0 + :"0" // clobbered register + ); + return ret; +} + +// Helper function for swap_u8 +inline u8 Bytes::swap_u8_base(u4 x, u4 y) { + return (((u8)swap_u4(x))<<32) | swap_u4(y); +} + +// Reconciliation History +// 1.3 99/06/22 16:38:43 bytes_solaris_i486.inline.hpp +// diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/copy_bsd_i486.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/copy_bsd_i486.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/copy_bsd_i486.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/copy_bsd_i486.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,87 @@ +/* + * $Id: copy_bsd_i486.inline.hpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +static void pd_conjoint_words(HeapWord* from, HeapWord* to, size_t count) { + (void)memmove(to, from, count * HeapWordSize); +} + +static void pd_disjoint_words(HeapWord* from, HeapWord* to, size_t count) { + (void)memcpy(to, from, count * HeapWordSize); +} + +static void pd_disjoint_words_atomic(HeapWord* from, HeapWord* to, size_t count) { + switch (count) { + case 8: to[7] = from[7]; + case 7: to[6] = from[6]; + case 6: to[5] = from[5]; + case 5: to[4] = from[4]; + case 4: to[3] = from[3]; + case 3: to[2] = from[2]; + case 2: to[1] = from[1]; + case 1: to[0] = from[0]; + case 0: break; + default: while (count-- > 0) { + *to++ = *from++; + } + break; + } +} + +static void pd_aligned_conjoint_words(HeapWord* from, HeapWord* to, size_t count) { + (void)memmove(to, from, count * HeapWordSize); +} + +static void pd_aligned_disjoint_words(HeapWord* from, HeapWord* to, size_t count) { + pd_disjoint_words(from, to, count); +} + +static void pd_conjoint_bytes(void* from, void* to, size_t count) { + _Copy_conjoint_bytes(from, to, count); +} + +static void pd_conjoint_bytes_atomic(void* from, void* to, size_t count) { + _Copy_conjoint_bytes(from, to, count); +} + +static void pd_conjoint_jshorts_atomic(jshort* from, jshort* to, size_t count) { + _Copy_conjoint_jshorts_atomic(from, to, count); +} + +static void pd_conjoint_jints_atomic(jint* from, jint* to, size_t count) { + _Copy_conjoint_jints_atomic(from, to, count); +} + +static void pd_conjoint_jlongs_atomic(jlong* from, jlong* to, size_t count) { + // Guarantee use of fild/fistp or xmm regs via some asm code, because compilers won't. + _Copy_conjoint_jlongs_atomic(from, to, count); +} + +static void pd_conjoint_oops_atomic(oop* from, oop* to, size_t count) { + _Copy_conjoint_jints_atomic((jint*)from, (jint*)to, count); +} + +static void pd_arrayof_conjoint_bytes(HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_bytes(from, to, count); +} + +static void pd_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jshorts(from, to, count); +} + +static void pd_arrayof_conjoint_jints(HeapWord* from, HeapWord* to, size_t count) { + _Copy_arrayof_conjoint_jints(from, to, count); +} + +static void pd_arrayof_conjoint_jlongs(HeapWord* from, HeapWord* to, size_t count) { + pd_conjoint_jlongs_atomic((jlong*)from, (jlong*)to, count); +} + +static void pd_arrayof_conjoint_oops(HeapWord* from, HeapWord* to, size_t count) { + assert(BytesPerInt == BytesPerOop, "jints and oops must be the same size"); + _Copy_arrayof_conjoint_jints(from, to, count); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/getThread_bsd_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/getThread_bsd_i486.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/getThread_bsd_i486.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/getThread_bsd_i486.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,16 @@ +/* + * $Id: getThread_bsd_i486.cpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Provides an entry point we can link against and +// a buffer we can emit code into. The buffer is +// filled by ThreadLocalStorage::generate_code_for_get_thread +// and called from ThreadLocalStorage::thread() + +// do not include precompiled header file +#include "incls/_getThread_bsd_i486.cpp.incl" + diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/globals_bsd_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/globals_bsd_i486.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/globals_bsd_i486.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/globals_bsd_i486.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,26 @@ +/* + * $Id: globals_bsd_i486.hpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// +// Sets the default values for platform dependent flags used by the runtime system. +// (see globals.hpp) +// +// XXXBSD: ??? +define_pd_global(bool, DontYieldALot, false); // Determined in the design center +define_pd_global(bool, UseStackBanging, true); +define_pd_global(intx, ThreadStackSize, 256); +define_pd_global(intx, VMThreadStackSize, 256); + +// XXXBSD: ??? +define_pd_global(intx, SurvivorRatio, 8); // Design center runs on 1.3.1 +define_pd_global(intx, CompilerThreadStackSize, 0); +define_pd_global(uintx, JVMInvokeMethodSlack, 10*K); +define_pd_global(bool, UseDefaultStackSize, false); + +// Only used on 64 bit Windows platforms +define_pd_global(bool, UseVectoredExceptions, false); diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/orderAccess_bsd_i486.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/orderAccess_bsd_i486.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/orderAccess_bsd_i486.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/orderAccess_bsd_i486.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,117 @@ +/* + * $Id: orderAccess_bsd_i486.inline.hpp,v 1.2 2004/12/20 09:56:11 phantom Exp $ + */ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// Implementation of class OrderAccess. + +inline void OrderAccess::loadload() { acquire(); } +inline void OrderAccess::storestore() { release(); } +inline void OrderAccess::loadstore() { acquire(); } +inline void OrderAccess::storeload() { fence(); } + +inline void OrderAccess::acquire() { + volatile jint dummy; + __asm__ volatile ("movl 0(%%esp),%0" : "=r" (dummy) : : "memory"); +} + +inline void OrderAccess::release() { + dummy = 0; +} + +inline void OrderAccess::fence() { + if (os::is_MP()) { + __asm__ volatile ("lock; addl $0,0(%%esp)" : : : "cc", "memory"); + } +} + +inline jbyte OrderAccess::load_acquire(volatile jbyte* p) { return *p; } +inline jshort OrderAccess::load_acquire(volatile jshort* p) { return *p; } +inline jint OrderAccess::load_acquire(volatile jint* p) { return *p; } +inline jlong OrderAccess::load_acquire(volatile jlong* p) { return *p; } +inline jubyte OrderAccess::load_acquire(volatile jubyte* p) { return *p; } +inline jushort OrderAccess::load_acquire(volatile jushort* p) { return *p; } +inline juint OrderAccess::load_acquire(volatile juint* p) { return *p; } +inline julong OrderAccess::load_acquire(volatile julong* p) { return *p; } +inline jfloat OrderAccess::load_acquire(volatile jfloat* p) { return *p; } +inline jdouble OrderAccess::load_acquire(volatile jdouble* p) { return *p; } + +inline intptr_t OrderAccess::load_ptr_acquire(volatile intptr_t* p) { return *p; } +inline void* OrderAccess::load_ptr_acquire(volatile void* p) { return *(void* volatile *)p; } +inline void* OrderAccess::load_ptr_acquire(const volatile void* p) { return *(void* const volatile *)p; } + +inline void OrderAccess::release_store(volatile jbyte* p, jbyte v) { *p = v; } +inline void OrderAccess::release_store(volatile jshort* p, jshort v) { *p = v; } +inline void OrderAccess::release_store(volatile jint* p, jint v) { *p = v; } +inline void OrderAccess::release_store(volatile jlong* p, jlong v) { *p = v; } +inline void OrderAccess::release_store(volatile jubyte* p, jubyte v) { *p = v; } +inline void OrderAccess::release_store(volatile jushort* p, jushort v) { *p = v; } +inline void OrderAccess::release_store(volatile juint* p, juint v) { *p = v; } +inline void OrderAccess::release_store(volatile julong* p, julong v) { *p = v; } +inline void OrderAccess::release_store(volatile jfloat* p, jfloat v) { *p = v; } +inline void OrderAccess::release_store(volatile jdouble* p, jdouble v) { *p = v; } + +inline void OrderAccess::release_store_ptr(volatile intptr_t* p, intptr_t v) { *p = v; } +inline void OrderAccess::release_store_ptr(volatile void* p, void* v) { *(void* volatile *)p = v; } + +inline void OrderAccess::store_fence(jbyte* p, jbyte v) { + __asm__ volatile ( "xchgb (%2),%0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::store_fence(jshort* p, jshort v) { + __asm__ volatile ( "xchgw (%2),%0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::store_fence(jint* p, jint v) { + __asm__ volatile ( "xchgl (%2),%0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::store_fence(jlong* p, jlong v) { *p = v; fence(); } +inline void OrderAccess::store_fence(jubyte* p, jubyte v) { store_fence((jbyte*)p, (jbyte)v); } +inline void OrderAccess::store_fence(jushort* p, jushort v) { store_fence((jshort*)p, (jshort)v); } +inline void OrderAccess::store_fence(juint* p, juint v) { store_fence((jint*)p, (jint)v); } +inline void OrderAccess::store_fence(julong* p, julong v) { store_fence((jlong*)p, (jlong)v); } +inline void OrderAccess::store_fence(jfloat* p, jfloat v) { *p = v; fence(); } +inline void OrderAccess::store_fence(jdouble* p, jdouble v) { *p = v; fence(); } + +inline void OrderAccess::store_ptr_fence(intptr_t* p, intptr_t v) { store_fence((jint*)p, (jint)v); } +inline void OrderAccess::store_ptr_fence(void** p, void* v) { store_fence((jint*)p, (jint)v); } + +// Must duplicate definitions instead of calling store_fence because we don't want to cast away volatile. +inline void OrderAccess::release_store_fence(volatile jbyte* p, jbyte v) { + __asm__ volatile ( "xchgb (%2),%0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::release_store_fence(volatile jshort* p, jshort v) { + __asm__ volatile ( "xchgw (%2),%0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::release_store_fence(volatile jint* p, jint v) { + __asm__ volatile ( "xchgl (%2),%0" + : "=r" (v) + : "0" (v), "r" (p) + : "memory"); +} +inline void OrderAccess::release_store_fence(volatile jlong* p, jlong v) { *p = v; fence(); } +inline void OrderAccess::release_store_fence(volatile jubyte* p, jubyte v) { release_store_fence((volatile jbyte*)p, (jbyte)v); } +inline void OrderAccess::release_store_fence(volatile jushort* p, jushort v) { release_store_fence((volatile jshort*)p, (jshort)v); } +inline void OrderAccess::release_store_fence(volatile juint* p, juint v) { release_store_fence((volatile jint*)p, (jint)v); } +inline void OrderAccess::release_store_fence(volatile julong* p, julong v) { release_store_fence((volatile jlong*)p, (jlong)v); } +inline void OrderAccess::release_store_fence(volatile jfloat* p, jfloat v) { *p = v; fence(); } +inline void OrderAccess::release_store_fence(volatile jdouble* p, jdouble v) { *p = v; fence(); } + +inline void OrderAccess::release_store_ptr_fence(volatile intptr_t* p, intptr_t v) { release_store_fence((volatile jint*)p, (jint)v); } +inline void OrderAccess::release_store_ptr_fence(volatile void* p, void* v) { release_store_fence((volatile jint*)p, (jint)v); } diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp 2007-02-24 09:40:30.000000000 +0100 @@ -0,0 +1,953 @@ +/* + * $Id: os_bsd_i486.cpp,v 1.10 2007/01/15 04:55:02 christos Exp $ + */ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +// do not include precompiled header file +# include "incls/_os_bsd_i486.cpp.incl" +# include "incls/_os_pd.hpp.incl" + +// put OS-includes here +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include +# include + +# ifdef __FreeBSD__ +# define context_eip uc_mcontext.mc_eip +# define context_esp uc_mcontext.mc_esp +# define context_eax uc_mcontext.mc_eax +# define context_ebx uc_mcontext.mc_ebx +# define context_ecx uc_mcontext.mc_ecx +# define context_edx uc_mcontext.mc_edx +# define context_ebp uc_mcontext.mc_ebp +# define context_esi uc_mcontext.mc_esi +# define context_edi uc_mcontext.mc_edi +# define context_eflags uc_mcontext.mc_eflags +# define context_trapno uc_mcontext.mc_trapno +# endif + +# ifdef __NetBSD__ +# define context_eip uc_mcontext.__gregs[_REG_EIP] +# define context_esp uc_mcontext.__gregs[_REG_UESP] +# define context_eax uc_mcontext.__gregs[_REG_EAX] +# define context_ebx uc_mcontext.__gregs[_REG_EBX] +# define context_ecx uc_mcontext.__gregs[_REG_ECX] +# define context_edx uc_mcontext.__gregs[_REG_EDX] +# define context_ebp uc_mcontext.__gregs[_REG_EBP] +# define context_esi uc_mcontext.__gregs[_REG_ESI] +# define context_edi uc_mcontext.__gregs[_REG_EDI] +# define context_eflags uc_mcontext.__gregs[_REG_EFL] +# define context_trapno uc_mcontext.mc_trapno +# endif + +# ifdef __OpenBSD__ +# define context_eip sc_eip +# define context_esp sc_esp +# define context_eax sc_eax +# define context_ebx sc_ebx +# define context_ecx sc_ecx +# define context_edx sc_edx +# define context_ebp sc_ebp +# define context_esi sc_esi +# define context_edi sc_edi +# define context_eflags sc_eflags +# define context_trapno sc_trapno +# endif + +// Minimum stack size for the VM. It's easier to document a constant value +// but it's different for x86 and sparc because the page sizes are different. +size_t os::Bsd::min_stack_allowed = 64*K; + +char* os::non_memory_address_word() { + // Must never look like an address returned by reserve_memory, + // even in its subfields (as defined by the CPU immediate fields, + // if the CPU splits constants across multiple instructions). + + // On Intel, virtual addresses never have the sign bit set. + return (char*) -1; +} + +// +// Validate a ucontext retrieved from walking a uc_link of a ucontext. +// There are issues with libthread giving out uc_links for different threads +// on the same uc_link chain and bad or circular links. +// +// OpenBSD dosn't have a uc_link so can't do this check +#ifndef __OpenBSD__ +bool os::Bsd::valid_ucontext(Thread* thread, ucontext_t* valid, ucontext_t* suspect) { + if (valid >= suspect || + valid->uc_stack.ss_flags != suspect->uc_stack.ss_flags || + valid->uc_stack.ss_sp != suspect->uc_stack.ss_sp || + valid->uc_stack.ss_size != suspect->uc_stack.ss_size) { + DEBUG_ONLY(tty->print_cr("valid_ucontext: failed test 1");) + return false; + } + + if (thread->is_Java_thread()) { + if (!valid_stack_address(thread, (address)suspect)) { + DEBUG_ONLY(tty->print_cr("valid_ucontext: uc_link not in thread stack");) + return false; + } + if (!valid_stack_address(thread, (address) suspect->context_esp)) { + DEBUG_ONLY(tty->print_cr("valid_ucontext: stackpointer not in thread stack");) + return false; + } + } + return true; +} + +// We will only follow one level of uc_link since there are libthread +// issues with ucontext linking and it is better to be safe and just +// let caller retry later. +ucontext_t* os::Bsd::get_valid_uc_in_signal_handler(Thread *thread, + ucontext_t *uc) { + + ucontext_t *retuc = NULL; + + if (uc != NULL) { + if (uc->uc_link == NULL) { + // cannot validate without uc_link so accept current ucontext + retuc = uc; + } else if (os::Bsd::valid_ucontext(thread, uc, uc->uc_link)) { + // first ucontext is valid so try the next one + uc = uc->uc_link; + if (uc->uc_link == NULL) { + // cannot validate without uc_link so accept current ucontext + retuc = uc; + } else if (os::Bsd::valid_ucontext(thread, uc, uc->uc_link)) { + // the ucontext one level down is also valid so return it + retuc = uc; + } + } + } + return retuc; +} +#endif // !__OpenBSD__ + +// Assumes ucontext is valid +ExtendedPC os::Bsd::ucontext_get_ExtendedPC(ucontext_t *uc) { + return ExtendedPC((address)uc->context_eip); +} + +// Assumes ucontext is valid +intptr_t* os::Bsd::ucontext_get_sp(ucontext_t *uc) { + return (intptr_t*)uc->context_esp; +} + +// Assumes ucontext is valid +intptr_t* os::Bsd::ucontext_get_fp(ucontext_t *uc) { + return (intptr_t*)uc->context_ebp; +} + +// For Forte Analyzer AsyncGetCallTrace profiling support - thread +// is currently interrupted by SIGPROF. +// +// The difference between this and os::fetch_frame_from_context() is that +// here we try to skip nested signal frames. +ExtendedPC os::Bsd::fetch_frame_from_ucontext(Thread* thread, + ucontext_t* uc, intptr_t** ret_sp, intptr_t** ret_fp) { + + assert(thread != NULL, "just checking"); + assert(ret_sp != NULL, "just checking"); + assert(ret_fp != NULL, "just checking"); + +#ifdef __OpenBSD__ + return os::fetch_frame_from_context(uc, ret_sp, ret_fp); +#else + ucontext_t *luc = os::Bsd::get_valid_uc_in_signal_handler(thread, uc); + return os::fetch_frame_from_context(luc, ret_sp, ret_fp); +#endif +} + +ExtendedPC os::fetch_frame_from_context(void* ucVoid, + intptr_t** ret_sp, intptr_t** ret_fp) { + + ExtendedPC epc; + ucontext_t *uc = (ucontext_t*)ucVoid; + + if (uc != NULL) { + epc = os::Bsd::ucontext_get_ExtendedPC(uc); + if (ret_sp) *ret_sp = os::Bsd::ucontext_get_sp(uc); + if (ret_fp) *ret_fp = os::Bsd::ucontext_get_fp(uc); + } else { + // construct empty ExtendedPC for return value checking + epc = ExtendedPC(NULL); + if (ret_sp) *ret_sp = (intptr_t *)NULL; + if (ret_fp) *ret_fp = (intptr_t *)NULL; + } + + return epc; +} + +frame os::fetch_frame_from_context(void* ucVoid) { + intptr_t* sp; + intptr_t* fp; + ExtendedPC epc = fetch_frame_from_context(ucVoid, &sp, &fp); + return frame(sp, fp, epc.pc()); +} + +frame os::get_sender_for_C_frame(frame* fr) { + return frame(fr->sender_sp(), fr->link(), fr->sender_pc()); +} + +frame os::current_frame() { + jint* fp = (*CAST_TO_FN_PTR( jint* (*)(void), StubRoutines::i486::get_previous_fp_entry()))(); + frame myframe((intptr_t*)os::current_stack_pointer(), + (intptr_t*)fp, + CAST_FROM_FN_PTR(address, os::current_frame)); + if (os::is_first_C_frame(&myframe)) { + // stack is not walkable + return frame(NULL, NULL, NULL); + } else { + return os::get_sender_for_C_frame(&myframe); + } +} + +#ifndef CORE +// synchronous: cancelled by the sender thread +void SetThreadPC_Callback::execute(OSThread::InterruptArguments *args) { + assert(args->thread()->is_Java_thread(), "must be a java thread"); + + JavaThread* thread = (JavaThread*)args->thread(); + ucontext_t* uc = args->ucontext(); + + // In some instances with some versions of libthread we get this callback while + // we are executing libthread signal handling code (during preemption/resumption) + // and we used to blindly try update the pc with a java code pc. This seriously + // messes up the state of the world. Now that we have made the operation synchronous + // we can examine the pc and either find the expected pc or not. We are willing to + // examine at most a single nest ucontext. There are libthread issues with the + // sanity of uc_link (cycles, cross thread stacks, ...) so the less we use uc_link + // the better. If we find the expected pc we patch it and return (to VM thread typically) + // success, if not we return failure and the caller can retry. + // + _result = false; + if (uc->context_eip == (int)_old_addr.pc() ) { + uc->context_eip = (int)_new_addr.pc(); + _result = true; +#ifndef __OpenBSD__ + } else if (uc->uc_link != NULL) { + // Check (and validate) one level of stacked ucontext + ucontext_t* linked_uc = uc->uc_link; + if (os::Bsd::valid_ucontext(thread, uc, linked_uc) && linked_uc->context_eip == (int)_old_addr.pc()) { + linked_uc->context_eip = (int)_new_addr.pc(); + _result = true; + } + } +#else + } +#endif + + thread->safepoint_state()->notify_set_thread_pc_result(_result); + +#ifdef ASSERT + if (!_result) { +#ifndef __OpenBSD__ + if (uc->uc_link != NULL) { + tty->print_cr("set_thread_pc:(nested) failed to set pc " INTPTR_FORMAT " -> " INTPTR_FORMAT, _old_addr.pc(), _new_addr.pc()); + } else { +#else + { +#endif + tty->print_cr("set_thread_pc: failed to set pc " INTPTR_FORMAT " -> " INTPTR_FORMAT, _old_addr.pc(), _new_addr.pc()); + } + } +#endif +} +#endif + +// This is a simple callback that just fetches a PC for an interrupted thread. +// The thread need not be suspended and the fetched PC is just a hint. +// Returned PC and nPC are not necessarily consecutive. +// This one is currently used for profiling the VMThread ONLY! + +// Must be synchronous +void GetThreadPC_Callback::execute(OSThread::InterruptArguments *args) { + Thread* thread = args->thread(); + ucontext_t* uc = args->ucontext(); + jint* sp; + + assert(ProfileVM && thread->is_VM_thread(), "just checking"); + + ExtendedPC new_addr((address)uc->context_eip); + _addr = new_addr; +} + +// This is a "fast" implementation of fetch_top_frame that relies on the +// new libthread APIs to get pc for a suspended thread +// XXXBSD: This is Solaris specific. Get rid or implement... +ExtendedPC os::Bsd::fetch_top_frame_fast(Thread* thread, intptr_t** sp, intptr_t** fp) { + ExtendedPC new_addr(NULL); + *sp = (intptr_t*)0; + *fp = (intptr_t*)0; + return new_addr; // bail out +} + +// Detecting SSE support by OS +// From solaris_i486.s +extern "C" bool sse_check(); +extern "C" bool sse_unavailable(); + +enum { SSE_UNKNOWN, SSE_NOT_SUPPORTED, SSE_SUPPORTED}; +static int sse_status = SSE_UNKNOWN; + + +static void check_for_sse_support() { +// XXXBSD: implement it +#if 1 + sse_status = SSE_NOT_SUPPORTED; + return; +#else + if (!VM_Version::supports_sse()) { + sse_status = SSE_NOT_SUPPORTED; + return; + } + // looking for _sse_hw in libc.so, if it does not exist or + // the value (int) is 0, OS has no support for SSE + int *sse_hwp; + void *h; + + if ((h=dlopen("/usr/lib/libc.so", RTLD_LAZY)) == NULL) { + //open failed, presume no support for SSE + sse_status = SSE_NOT_SUPPORTED; + return; + } + if ((sse_hwp = (int *)dlsym(h, "_sse_hw")) == NULL) { + sse_status = SSE_NOT_SUPPORTED; + } else if (*sse_hwp == 0) { + sse_status = SSE_NOT_SUPPORTED; + } + dlclose(h); + + if (sse_status == SSE_UNKNOWN) { + bool (*try_sse)() = (bool (*)())sse_check; + sse_status = (*try_sse)() ? SSE_SUPPORTED : SSE_NOT_SUPPORTED; + } +#endif +} + +bool os::supports_sse() { + if (sse_status == SSE_UNKNOWN) + check_for_sse_support(); + return sse_status == SSE_SUPPORTED; +} + +bool os::is_allocatable(size_t bytes) { + +#ifdef __OpenBSD__ + if (bytes < 1 * G) { +#else + if (bytes < 2 * G) { +#endif + return true; + } + + char* addr = reserve_memory(bytes, NULL); + + if (addr != NULL) { + release_memory(addr, bytes); + } + + return addr != NULL; +} + +extern "C" int JVM_handle_bsd_signal(int signo, siginfo_t* siginfo, void* ucontext, int abort_if_unrecognized); + +int JVM_handle_bsd_signal(int sig, siginfo_t* info, void* ucVoid, int abort_if_unrecognized) { + ucontext_t* uc = (ucontext_t*) ucVoid; + + if (sig == SIGILL && info->si_addr == (caddr_t)sse_check) { + // the SSE instruction faulted. supports_sse() need return false. + uc->context_eip = (int)sse_unavailable; + return true; + } + + Thread* t = ThreadLocalStorage::get_thread_slow(); // slow & steady + + SignalHandlerMark shm(t); + + JavaThread* thread = NULL; + VMThread* vmthread = NULL; + + if (os::Bsd::signal_handlers_are_installed) { + if (t != NULL ){ + if(t->is_Java_thread()) { + thread = (JavaThread*)t; + } + else if(t->is_VM_thread()){ + vmthread = (VMThread *)t; + } + } + } + + guarantee(sig != os::Bsd::SIGinterrupt(), "Can not chain VM interrupt signal, try -XX:+UseAltSigs"); + + if (sig == os::Bsd::SIGasync()) { + if(thread){ + OSThread::InterruptArguments args(thread, uc); + thread->osthread()->do_interrupt_callbacks_at_interrupt(&args); + return true; + } + else if(vmthread){ + OSThread::InterruptArguments args(vmthread, uc); + vmthread->osthread()->do_interrupt_callbacks_at_interrupt(&args); + return true; + } + } + + assert(sig == info->si_signo, "bad siginfo"); + + // decide if this trap can be handled by a stub + address stub = NULL; + + address pc = NULL; + address adjusted_pc = NULL; + + //%note os_trap_1 + if (info != NULL && thread != NULL) { + // factor me: getPCfromContext + pc = (address) uc->context_eip; + #ifndef CORE + adjusted_pc = SafepointPolling ? pc : thread->safepoint_state()->compute_adjusted_pc(pc); + #else + adjusted_pc = pc; + #endif + + // XXXBSD: more comments here + + // Handle ALL stack overflow variations here + /* if (sig == SIGSEGV && info->si_code == SEGV_ACCERR) { */ + if (sig == SIGSEGV || sig == SIGBUS) { + address addr = (address) info->si_addr; + if (thread->in_stack_yellow_zone(addr)) { + thread->disable_stack_yellow_zone(); + if (thread->thread_state() == _thread_in_Java) { + // Throw a stack overflow exception. Guard pages will be reenabled + // while unwinding the stack. + stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::STACK_OVERFLOW); + } else { + // Thread was in the vm or native code. Return and try to finish. + return true; + } + } else if (thread->in_stack_red_zone(addr)) { + // Fatal red zone violation. Disable the guard pages and fall through + // to handle_unexpected_exception way down below. + thread->disable_stack_red_zone(); + tty->print_raw_cr("An irrecoverable stack overflow has occurred."); + } + } + + if (thread->thread_state() == _thread_in_vm) { + if (sig == SIGBUS /*&& info->si_code == BUS_OBJERR*/ && thread->doing_unsafe_access()) { + stub = StubRoutines::i486::handler_for_unsafe_access(); + } + } + + if (thread->thread_state() == _thread_in_Java) { + // Java thread running in Java code => find exception handler if any + // a fault inside compiled code, the interpreter, or a stub +#ifndef CORE + if (sig == SIGILL && NativeInstruction::nativeInstruction_at(pc)->is_illegal()) { +#ifdef COMPILER1 + stub = Runtime1::entry_for(Runtime1::illegal_instruction_handler_id); +#else + // debugging trap, or a safepoint + assert(OptoRuntime::illegal_exception_handler_blob() != NULL, "stub not created yet"); + stub = OptoRuntime::illegal_exception_handler_blob()->instructions_begin(); +#endif // COMPILER1 + + CompiledCodeSafepointHandler *handler = (CompiledCodeSafepointHandler *) thread->safepoint_state()->handle(); + if (handler != NULL && thread->is_in_compiled_safepoint()) { + nmethod* nm = handler->get_nmethod(); + assert(nm != NULL, "safepoint handler is not setup correctly"); + + relocInfo::relocType type = nm->reloc_type_for_address(adjusted_pc); + assert( ((NativeInstruction*)adjusted_pc)->is_call() || + (type == relocInfo::return_type) || (type == relocInfo::safepoint_type), + "Only calls, returns, and backward branches are patched at safepoint"); + + // if(type == relocInfo::return_type) { + // The retl case: restore has already happened. The safepoint blob frame will appear + // immediately below caller of the orignal method that we have patched. The stack could + // be walked properly (the frame of the patched method is already popped). + // Sparc: Will need to be revisited if and when we put restore in the delay slot of ret. + // } + // else { + // This is the case when either a call or a branch was patched with an illegal instruction. + // At this point we are done with the patched method and would like things to + // appear as if the orignal method simply called the safepoint blob at a "safe point". + // Sparc: To achieve this, we set up the correct linkage by placing the adjusted trap pc in O7 + // and then "returning" from this trap handler to the safepoint blob. + // Intel: to achieve this the handle_illegal_instruction_exception code + // called by the stub will place saved_exception_pc into %sp and return there + + // } + } + } + + // Support Safepoint Polling + else if ( (sig == SIGSEGV || sig == SIGBUS) && SafepointPolling && os::is_poll_address((address)info->si_addr)) { + + // Look up the code blob + CodeBlob *cb = CodeCache::find_blob(pc); + + // Should be an nmethod + if( cb && cb->is_nmethod() ) { + + // Look up the relocation information + assert( ((nmethod*)cb)->is_at_poll_or_poll_return(pc), + "not poll or poll_return" ); + assert( ((NativeInstruction*)pc)->is_safepoint_poll(), + "Only polling locations are used for safepoint"); + + // safepoint + if (((nmethod*)cb)->is_at_poll_return(pc)) { +#ifdef COMPILER1 + stub = Runtime1::entry_for(Runtime1::polling_page_return_handler_id); +#else + assert(OptoRuntime::polling_page_return_handler_blob() != NULL, "stub not created yet"); + stub = OptoRuntime::polling_page_return_handler_blob()->instructions_begin(); +#endif + +#ifndef PRODUCT + if( TraceSafepoint ) + tty->print("... found polling page return exception at pc = " INTPTR_FORMAT ", stub = " INTPTR_FORMAT "\n", + (intptr_t)pc, (intptr_t)stub); +#endif + } + + // return + else { +#ifdef COMPILER1 + stub = Runtime1::entry_for(Runtime1::polling_page_safepoint_handler_id); +#else + assert(OptoRuntime::polling_page_safepoint_handler_blob() != NULL, "stub not created yet"); + stub = OptoRuntime::polling_page_safepoint_handler_blob()->instructions_begin(); +#endif + +#ifndef PRODUCT + if( TraceSafepoint ) + tty->print("... found polling page safepoint exception at pc = " INTPTR_FORMAT ", stub = " INTPTR_FORMAT "\n", + (intptr_t)pc, (intptr_t)stub); +#endif + } + } + } + else if (sig == SIGFPE /*&& info->si_code == FPE_INTDIV*/) { +#else + if (sig == SIGFPE /*&& info->si_code == FPE_INTDIV*/) { +#endif // ! CORE +// TODO -- needs work - fastlane +// is_zombie needs factoring? + // integer divide by zero +// TODO -- needs work - fastlane + stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO); + } + else if (sig == SIGFPE && info->si_code == FPE_FLTDIV) { + // floating-point divide by zero +// TODO -- needs work - fastlane + stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_DIVIDE_BY_ZERO); + } + else if (sig == SIGFPE && info->si_code == FPE_FLTINV) { + // The encoding of D2I in i486.ad can cause an exception prior + // to the fist instruction if there was an invalid operation + // pending. We want to dismiss that exception. From the win_32 + // side it also seems that if it really was the fist causing + // the exception that we do the d2i by hand with different + // rounding. Seems kind of weird. QQQ TODO + // Note that we take the exception at the NEXT floating point instruction. + if (pc[0] == 0xDB) { + assert(pc[0] == 0xDB, "not a FIST opcode"); + assert(pc[1] == 0x14, "not a FIST opcode"); + assert(pc[2] == 0x24, "not a FIST opcode"); + return true; + } else { + assert(pc[-3] == 0xDB, "not an flt invalid opcode"); + assert(pc[-2] == 0x14, "not an flt invalid opcode"); + assert(pc[-1] == 0x24, "not an flt invalid opcode"); + } + } + else if (sig == SIGFPE ) { + tty->print_cr("caught SIGFPE, info 0x%x.", info->si_code); + } + // QQQ It doesn't seem that we need to do this on x86 because we should be able + // to return properly from the handler without this extra stuff on the back side. + +#ifdef COMPILER2 + else if (sig == SIGSEGV && OptoRuntime::illegal_exception_handler_blob() != NULL && + OptoRuntime::illegal_exception_handler_blob()->contains(pc)) { + // This is the case when we use a trap to restore the context at the end of safepoint + // taken in compiled code. The "return" address is passed in O7 + // QQQ TODO + ShouldNotReachHere(); + + } +#endif // COMPILER2 + + /* else if (sig == SIGSEGV && info->si_code > 0 && !MacroAssembler::needs_explicit_null_check((int)info->si_addr)) { */ + else if ((sig == SIGSEGV || sig == SIGBUS) && !MacroAssembler::needs_explicit_null_check((int)info->si_addr)) { + // Determination of interpreter/vtable stub/compiled code null exception + stub = SharedRuntime::continuation_for_implicit_exception(thread, pc, SharedRuntime::IMPLICIT_NULL); + } + +#ifndef CORE + else if (sig == SIGBUS /*&& info->si_code == BUS_OBJERR*/) { + // BugId 4454115: A read from a MappedByteBuffer can fault + // here if the underlying file has been truncated. + // Do not crash the VM in such a case. + CodeBlob* cb = CodeCache::find_blob_unsafe(adjusted_pc); + nmethod* nm = cb->is_nmethod() ? (nmethod*)cb : NULL; + if (nm != NULL && nm->has_unsafe_access()) { + stub = StubRoutines::i486::handler_for_unsafe_access(); + } + } +#endif //CORE + } + } + +#if 0 + // Execution protection violation + // + // Preventative code for future versions of Solaris which may + // enable execution protection when running the 32-bit VM on AMD64. + // + // This should be kept as the last step in the triage. We don't + // have a dedicated trap number for a no-execute fault, so be + // conservative and allow other handlers the first shot. + // + // Note: We don't test that info->si_code == SEGV_ACCERR here. + // this si_code is so generic that it is almost meaningless; and + // the si_code for this condition may change in the future. + // Furthermore, a false-positive should be harmless. + if (UnguardOnExecutionViolation > 0 && + (sig == SIGSEGV || sig == SIGBUS) && + uc->context_trapno == T_PAGEFLT) { // page fault + int page_size = os::vm_page_size(); + address addr = (address) info->si_addr; + address pc = (address) uc->context_eip; + // Make sure the pc and the faulting address are sane. + // + // If an instruction spans a page boundary, and the page containing + // the beginning of the instruction is executable but the following + // page is not, the pc and the faulting address might be slightly + // different - we still want to unguard the 2nd page in this case. + // + // 15 bytes seems to be a (very) safe value for max instruction size. + bool pc_is_near_addr = + (pointer_delta((void*) addr, (void*) pc, sizeof(char)) < 15); + bool instr_spans_page_boundary = + (align_size_down((intptr_t) pc ^ (intptr_t) addr, + (intptr_t) page_size) > 0); + + if (pc == addr || (pc_is_near_addr && instr_spans_page_boundary)) { + static volatile address last_addr = + (address) os::non_memory_address_word(); + + // In conservative mode, don't unguard unless the address is in the VM + if (addr != last_addr && + (UnguardOnExecutionViolation > 1 || os::address_is_in_vm(addr))) { + + // Unguard and retry + address page_start = + (address) align_size_down((intptr_t) addr, (intptr_t) page_size); + bool res = os::unguard_memory((char*) page_start, page_size); + + if (PrintMiscellaneous && Verbose) { + char buf[256]; + jio_snprintf(buf, sizeof(buf), "Execution protection violation " + "at " INTPTR_FORMAT + ", unguarding " INTPTR_FORMAT ": %s, errno=%d", addr, + page_start, (res ? "success" : "failed"), errno); + tty->print_raw_cr(buf); + } + stub = pc; + + // Set last_addr so if we fault again at the same address, we don't end + // up in an endless loop. + // + // There are two potential complications here. Two threads trapping at + // the same address at the same time could cause one of the threads to + // think it already unguarded, and abort the VM. Likely very rare. + // + // The other race involves two threads alternately trapping at + // different addresses and failing to unguard the page, resulting in + // an endless loop. This condition is probably even more unlikely than + // the first. + // + // Although both cases could be avoided by using locks or thread local + // last_addr, these solutions are unnecessary complication: this + // handler is a best-effort safety net, not a complete solution. It is + // disabled by default and should only be used as a workaround in case + // we missed any no-execute-unsafe VM code. + + last_addr = addr; + } + } + } +#endif /* 0 */ + + if (stub != NULL) { + // save all thread context in case we need to restore it + + if (thread != NULL) thread->set_saved_exception_pc(pc); + // 12/02/99: On Sparc it appears that the full context is alsosaved + // but as yet, no one looks at or restores that saved context + // factor me: setPC + uc->context_eip = (int)stub; + return true; + } + + // jni_fast_GetField can trap at certain pc's if a GC kicks in + // and the heap gets shrunk before the field access. + if (sig == SIGSEGV || sig == SIGBUS) { + address addr = JNI_FastGetField::find_slowcase_pc(pc); + if (addr != (address)-1) { + uc->context_eip = (int)addr; + return true; + } + } + + // Check to see if we caught the safepoint code in the + // process of write protecting the memory serialization page. + // It write enables the page immediately after protecting it + // so we can just return to retry the write. + if (sig == SIGSEGV || sig == SIGBUS) { + if (os::is_memory_serialize_page(thread, (address) info->si_addr)) { + return true; + } + } + + // signal-chaining + if (UseSignalChaining) { + bool chained = false; + struct sigaction *actp = os::Bsd::get_chained_signal_action(sig); + if (actp != NULL) { + chained = os::Bsd::chained_handler(actp, sig, info, ucVoid); + } + if (chained) { + // signal-chaining in effect. Continue. + return true; + } + } + + +// If os::Bsd::SIGasync not chained, and this is a non-vm and non-java thread + if (sig == os::Bsd::SIGasync()) { + return true; + } + + if(sig == SIGPIPE) { + if (PrintMiscellaneous && (WizardMode || Verbose)) { + warning("Ignoring SIGPIPE - see bug 4229104"); + } + return true; + } + + if (!abort_if_unrecognized) { + // caller wants another chance, so give it to him + return false; + } + + if (!os::Bsd::libjsig_is_loaded) { + struct sigaction oldAct; + sigaction(sig, (struct sigaction *)0, &oldAct); + if (oldAct.sa_sigaction != signalHandler) { + void* sighand = oldAct.sa_sigaction ? CAST_FROM_FN_PTR(void*, oldAct.sa_sigaction) + : CAST_FROM_FN_PTR(void*, oldAct.sa_handler); + warning("Unexpected Signal %d occured under user-defined signal handler %#lx", sig, (long)sighand); + } + } + + if (pc == NULL && uc != NULL) { + pc = (address) uc->context_eip; + } + + // unmask current signal + sigset_t newset; + sigemptyset(&newset); + sigaddset(&newset, sig); + sigprocmask(SIG_UNBLOCK, &newset, NULL); + + VMError err(t, sig, pc, info, ucVoid); + err.report_and_die(); + + ShouldNotReachHere(); +} + +void os::print_context(outputStream *st, void *context) { + if (context == NULL) return; + + ucontext_t *uc = (ucontext_t*)context; + st->print_cr("Registers:"); + st->print( "EAX=" INTPTR_FORMAT, uc->context_eax); + st->print(", EBX=" INTPTR_FORMAT, uc->context_ebx); + st->print(", ECX=" INTPTR_FORMAT, uc->context_ecx); + st->print(", EDX=" INTPTR_FORMAT, uc->context_edx); + st->cr(); + st->print( "ESP=" INTPTR_FORMAT, uc->context_esp); + st->print(", EBP=" INTPTR_FORMAT, uc->context_ebp); + st->print(", ESI=" INTPTR_FORMAT, uc->context_esi); + st->print(", EDI=" INTPTR_FORMAT, uc->context_edi); + st->cr(); + st->print( "EIP=" INTPTR_FORMAT, uc->context_eip); + st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags); + st->cr(); + st->cr(); + + intptr_t *sp = (intptr_t *)os::Bsd::ucontext_get_sp(uc); + st->print_cr("Top of Stack: (sp=" PTR_FORMAT ")", sp); + print_hex_dump(st, (address)sp, (address)(sp + 32), sizeof(intptr_t)); + st->cr(); + + // Note: it may be unsafe to inspect memory near pc. For example, pc may + // point to garbage if entry point in an nmethod is corrupted. Leave + // this at the end, and hope for the best. + ExtendedPC epc = os::Bsd::ucontext_get_ExtendedPC(uc); + address pc = epc.pc(); + st->print_cr("Instructions: (pc=" PTR_FORMAT ")", pc); + print_hex_dump(st, pc - 16, pc + 16, sizeof(char)); +} + +// From solaris_i486.s +extern "C" void fixcw(); + +void os::Bsd::init_thread_fpu_state(void) { + // Set fpu to 53 bit precision. This happens too early to use a stub. + fixcw(); +} + +// JVMPI code +bool os::thread_is_running(JavaThread* tp) { +// XXXBSD: implement ? +#if 1 + return false; +#else + int flag; + lwpid_t lwpid; + gregset_t reg; + lwpstatus_t lwpstatus; + int res; + thread_t tid = tp->osthread()->thread_id(); + res = threadgetstate(tid, &flag, &lwpid, NULL, reg, &lwpstatus); + assert(res == 0, "threadgetstate() failure"); + if(res != 0) return false; // Safe return value + + unsigned int sum = 0; + // give TRS_NONVOLATILE doesn't trust any other registers, just use these + sum += reg[UESP]; sum += reg[EIP]; sum += reg[EBP]; + + if (tp->last_sum() == sum) { + return false; + } else { + tp->set_last_sum(sum); + return true; + } +#endif +} + +// These routines are the initial value of atomic_xchg_entry(), +// atomic_cmpxchg_entry(), atomic_inc_entry() and fence_entry() +// until initialization is complete. +// TODO - replace with .il implementation when compiler supports it. + +typedef jint xchg_func_t (jint, volatile jint*); +typedef jint cmpxchg_func_t (jint, volatile jint*, jint); +typedef jlong cmpxchg_long_func_t(jlong, volatile jlong*, jlong); +typedef jint add_func_t (jint, volatile jint*); +typedef void fence_func_t (); + +jint os::atomic_xchg_bootstrap(jint exchange_value, volatile jint* dest) { + // try to use the stub: + xchg_func_t* func = CAST_TO_FN_PTR(xchg_func_t*, StubRoutines::atomic_xchg_entry()); + + if (func != NULL) { + os::atomic_xchg_func = func; + return (*func)(exchange_value, dest); + } + assert(Threads::number_of_threads() == 0, "for bootstrap only"); + + jint old_value = *dest; + *dest = exchange_value; + return old_value; +} + +jint os::atomic_cmpxchg_bootstrap(jint exchange_value, volatile jint* dest, jint compare_value) { + // try to use the stub: + cmpxchg_func_t* func = CAST_TO_FN_PTR(cmpxchg_func_t*, StubRoutines::atomic_cmpxchg_entry()); + + if (func != NULL) { + os::atomic_cmpxchg_func = func; + return (*func)(exchange_value, dest, compare_value); + } + assert(Threads::number_of_threads() == 0, "for bootstrap only"); + + jint old_value = *dest; + if (old_value == compare_value) + *dest = exchange_value; + return old_value; +} + +jlong os::atomic_cmpxchg_long_bootstrap(jlong exchange_value, volatile jlong* dest, jlong compare_value) { + // try to use the stub: + cmpxchg_long_func_t* func = CAST_TO_FN_PTR(cmpxchg_long_func_t*, StubRoutines::atomic_cmpxchg_long_entry()); + + if (func != NULL) { + os::atomic_cmpxchg_long_func = func; + return (*func)(exchange_value, dest, compare_value); + } + assert(Threads::number_of_threads() == 0, "for bootstrap only"); + + jlong old_value = *dest; + if (old_value == compare_value) + *dest = exchange_value; + return old_value; +} + +jint os::atomic_add_bootstrap(jint add_value, volatile jint* dest) { + // try to use the stub: + add_func_t* func = CAST_TO_FN_PTR(add_func_t*, StubRoutines::atomic_add_entry()); + + if (func != NULL) { + os::atomic_add_func = func; + return (*func)(add_value, dest); + } + assert(Threads::number_of_threads() == 0, "for bootstrap only"); + + return (*dest) += add_value; +} + +void os::fence_bootstrap() { + // try to use the stub: + fence_func_t* func = CAST_TO_FN_PTR(fence_func_t*, StubRoutines::fence_entry()); + + if (func != NULL) { + os::fence_func = func; + (*func)(); + return; + } + assert(Threads::number_of_threads() == 0, "for bootstrap only"); + + // don't have to do anything for a single thread +} + +xchg_func_t* os::atomic_xchg_func = os::atomic_xchg_bootstrap; +cmpxchg_func_t* os::atomic_cmpxchg_func = os::atomic_cmpxchg_bootstrap; +cmpxchg_long_func_t* os::atomic_cmpxchg_long_func = os::atomic_cmpxchg_long_bootstrap; +add_func_t* os::atomic_add_func = os::atomic_add_bootstrap; +fence_func_t* os::fence_func = os::fence_bootstrap; diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,29 @@ +/* + * $Id: os_bsd_i486.hpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + + // + // NOTE: we are back in class os here, not Bsd + // + static jint (*atomic_xchg_func) (jint, volatile jint*); + static jint (*atomic_cmpxchg_func) (jint, volatile jint*, jint); + static jlong (*atomic_cmpxchg_long_func)(jlong, volatile jlong*, jlong); + static jint (*atomic_add_func) (jint, volatile jint*); + static void (*fence_func) (); + + static jint atomic_xchg_bootstrap (jint, volatile jint*); + static jint atomic_cmpxchg_bootstrap (jint, volatile jint*, jint); + static jlong atomic_cmpxchg_long_bootstrap(jlong, volatile jlong*, jlong); + static jint atomic_add_bootstrap (jint, volatile jint*); + static void fence_bootstrap (); + + static bool supports_sse(); + static bool is_allocatable(size_t bytes); + + // Used to register dynamic code cache area with the OS + // Note: Currently only used in 64 bit Windows implementations + static bool register_code_area(char *low, char *high) { return true; } diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/prefetch_bsd_i486.inline.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/prefetch_bsd_i486.inline.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/prefetch_bsd_i486.inline.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/prefetch_bsd_i486.inline.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,10 @@ +/* + * $Id: prefetch_bsd_i486.inline.hpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +// +// Copyright 2004 Sun Microsystems, Inc. All rights reserved. +// SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +// + +inline void Prefetch::read (void *loc, intx interval) {} +inline void Prefetch::write(void *loc, intx interval) {} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/runtime_bsd_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/runtime_bsd_i486.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/runtime_bsd_i486.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/runtime_bsd_i486.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,31 @@ +/* + * $Id: runtime_bsd_i486.cpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_runtime_bsd_i486.cpp.incl" + +extern "C" { + void _mmx_Copy_arrayof_conjoint_jshorts(HeapWord* from, HeapWord* to, size_t count); +} + +void OptoRuntime::generate_arraycopy_stubs() { + _jbyte_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_bytes); + _jshort_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_jshorts_atomic); + _jint_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_jints_atomic); + _jlong_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_jlongs_atomic); + + _arrayof_jbyte_arraycopy = CAST_FROM_FN_PTR(address, _Copy_arrayof_conjoint_bytes); + if (VM_Version::supports_sse()) { + _arrayof_jshort_arraycopy = CAST_FROM_FN_PTR(address, _mmx_Copy_arrayof_conjoint_jshorts); + } else { + _arrayof_jshort_arraycopy = CAST_FROM_FN_PTR(address, _Copy_arrayof_conjoint_jshorts); + } + _arrayof_jint_arraycopy = CAST_FROM_FN_PTR(address, _Copy_arrayof_conjoint_jints); + // No specialized _Copy_arrayof_conjoint_jlongs, so use the generic one + _arrayof_jlong_arraycopy = CAST_FROM_FN_PTR(address, _Copy_conjoint_jlongs_atomic); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/safepoint_bsd_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/safepoint_bsd_i486.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/safepoint_bsd_i486.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/safepoint_bsd_i486.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,51 @@ +/* + * $Id: safepoint_bsd_i486.cpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +# include "incls/_precompiled.incl" +# include "incls/_safepoint_bsd_i486.cpp.incl" + +bool SafepointSynchronize::safepoint_safe(JavaThread *thread, JavaThreadState state) { + switch(state) { + // blocked threads and native threads are already safepoint safe. + case _thread_in_native: + case _thread_blocked: + return true; + + default: + return false; + } +} + +// The patching of the return instruction is machine-specific +void SafepointSynchronize::patch_return_instruction_md(address cb_pc) { + // The relocation info. is actually after the ret (i.e., where we are going to patch with + // an illegal instruction. + cb_pc -= NativeReturn::instruction_size; + + assert(((NativeInstruction*)cb_pc)->is_return(), "must be a return instruction"); + + // In C1 code is part of ret eventually + NOT_COMPILER1(assert(((NativeInstruction*)(cb_pc+1))->is_nop(), "must be a nop instruction");) + NOT_COMPILER1(assert(((NativeInstruction*)(cb_pc+2))->is_nop(), "must be a nop instruction");) + assert(NativePopReg::instruction_size + NativeIllegalInstruction::instruction_size == 3, "wrong code format"); + NativePopReg::insert(cb_pc, ebx); // Pop return address (it is getting pushed by the SafepointBlob again) + NativeIllegalInstruction::insert(cb_pc + NativePopReg::instruction_size); +} + +#ifndef CORE + +int CompiledCodeSafepointHandler::pd_thread_code_buffer_size(nmethod* nm) { + return nm->instructions_size(); +} + +void CompiledCodeSafepointHandler::pd_patch_runtime_calls_with_trampolines(ThreadCodeBuffer* cb, + int offset_of_first_trampoline) { + // Nothing to do +} + +#endif // !CORE diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,20 @@ +/* + * $Id: threadLS_bsd_i486.cpp,v 1.3 2004/12/23 19:40:08 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// XXXBSD: look for linux implementation +// XXXBSD: utilize %gs defs in FreeBSD-5 + +#include "incls/_precompiled.incl" +#include "incls/_threadLS_bsd_i486.cpp.incl" + +void ThreadLocalStorage::generate_code_for_get_thread() { +} + +extern "C" Thread* get_thread() { + return ThreadLocalStorage::thread(); +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.hpp 2007-02-24 09:40:30.000000000 +0100 @@ -0,0 +1,47 @@ +/* + * $Id: threadLS_bsd_i486.hpp,v 1.3 2004/12/23 19:40:08 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// Processor dependent parts of ThreadLocalStorage + +private: + static Thread* _get_thread_cache[]; // index by [(raw_id^(raw_id>>10)) % _pd_cache_size] + static Thread* get_thread_via_cache_slowly(uintptr_t raw_id, int index); + + NOT_PRODUCT(static int _tcacheHit;) + NOT_PRODUCT(static int _tcacheMiss;) + +public: + // Cache hit/miss statistics + static void print_statistics() PRODUCT_RETURN; + + enum Constants { + // projected typical # of threads * typical active stack pages * 2 + _pd_cache_size = 128*2*4, + _pd_min_page_size = 4*K, + _pd_typical_stack_size = 512*K + }; + + static address pd_sp_address() { + address sp; + __asm__ volatile ("movl %%esp, %0" : "=r" (sp)); + return sp; + } + + static uintptr_t pd_raw_thread_id() { + // _pd_min_page_size == 1 << 12 + return ((unsigned int)pd_sp_address()) >> 12; + } + + static int pd_cache_index(uintptr_t sp_page) { + // _pd_cache_size == 1<<10 + return (sp_page ^ (sp_page >> 10)) % _pd_cache_size; + } + + // Java Thread + static inline Thread* thread(); + diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.cpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.cpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.cpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,55 @@ +/* + * $Id: thread_bsd_i486.cpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +#include "incls/_precompiled.incl" +#include "incls/_thread_bsd_i486.cpp.incl" + +// For Forte Analyzer AsyncGetCallTrace profiling support - thread is +// currently interrupted by SIGPROF +bool JavaThread::pd_get_top_frame_for_signal_handler(frame* fr_addr, + void* ucontext, bool isInJava) { + + assert(Thread::current() == this, "caller must be current thread"); + assert(this->is_Java_thread(), "must be JavaThread"); + + JavaThread* jt = (JavaThread *)this; + + // If we have a last_Java_frame, then we should use it even if + // isInJava == true. It should be more reliable than ucontext info. + if (jt->has_last_Java_frame()) { + *fr_addr = jt->pd_last_frame(); + return true; + } + + // At this point, we don't have a last_Java_frame, so + // we try to glean some information out of the ucontext + // if we were running Java code when SIGPROF came in. + if (isInJava) { + ucontext_t* uc = (ucontext_t*) ucontext; + + intptr_t* ret_fp; + intptr_t* ret_sp; + ExtendedPC addr = os::Bsd::fetch_frame_from_ucontext(this, uc, + &ret_sp, &ret_fp); + if (addr.contained_pc() == NULL || ret_sp == NULL || ret_fp == NULL) { + // ucontext wasn't useful + return false; + } + + frame ret_frame(ret_sp, ret_fp, addr.pc()); + if (!ret_frame.safe_for_sender(jt)) { + // nothing else to try if the frame isn't good + return false; + } + *fr_addr = ret_frame; + return true; + } + + // nothing else to try + return false; +} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/thread_bsd_i486.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,57 @@ +/* + * $Id: thread_bsd_i486.hpp,v 1.3 2006/02/24 23:52:52 truk Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + + private: + void pd_initialize() { _anchor.clear(); } + + frame pd_last_frame() { + assert(has_last_Java_frame(), "must have last_Java_sp() when suspended"); + if (_anchor.last_Java_pc() != NULL) { + return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp(), _anchor.last_Java_pc()); + } else { + // This will pick up pc from sp + return frame(_anchor.last_Java_sp(), _anchor.last_Java_fp()); + } + } + + public: + // Mutators are highly dangerous.... + intptr_t* last_Java_fp() { return _anchor.last_Java_fp(); } + void set_last_Java_fp(intptr_t* fp) { _anchor.set_last_Java_fp(fp); } + + void set_base_of_stack_pointer(intptr_t* base_sp) {} + + static ByteSize last_Java_fp_offset() { + return byte_offset_of(JavaThread, _anchor) + JavaFrameAnchor::last_Java_fp_offset(); + } + + intptr_t* base_of_stack_pointer() { return NULL; } + void record_base_of_stack_pointer() {} + + // debugging support + static frame current_frame_guess() { + intptr_t* fp = (*CAST_TO_FN_PTR( intptr_t* (*)(void), StubRoutines::i486::get_previous_fp_entry()))(); + // fp points to the frame of the ps stub routine + frame f(NULL, fp, (address)NULL); + RegisterMap map(JavaThread::current(), false); + return f.sender(&map); + } + + int pd_get_fast_thread_id() { + return (int) ThreadLocalStorage::thread(); + } + + bool pd_get_top_frame_for_signal_handler(frame* fr_addr, void* ucontext, + bool isInJava); + + // These routines are only used on cpu architectures that + // have separate register stacks (Itanium). + static bool register_stack_overflow() { return false; } + static void enable_register_stack_guard() {} + static void disable_register_stack_guard() {} + diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/vmStructs_bsd_i486.hpp jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/vmStructs_bsd_i486.hpp --- jdk-1_5_0_11/hotspot/src/os_cpu/bsd_i486/vm/vmStructs_bsd_i486.hpp 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/bsd_i486/vm/vmStructs_bsd_i486.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -0,0 +1,43 @@ +/* + * $Id: vmStructs_bsd_i486.hpp,v 1.2 2004/12/20 10:00:42 phantom Exp $ + */ +/* + * Copyright 2004 Sun Microsystems, Inc. All rights reserved. + * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. + */ + +// These are the OS and CPU-specific fields, types and integer +// constants required by the Serviceability Agent. This file is +// referenced by vmStructs.cpp. + +#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, nonproduct_noncore_nonstatic_field, c2_nonstatic_field, noncore_nonstatic_field, volatile_noncore_nonstatic_field, noncore_static_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \ + \ + /******************************/ \ + /* Threads (NOTE: incomplete) */ \ + /******************************/ \ + \ + nonstatic_field(OSThread, _thread_id, pthread_t) \ + \ + /* This must be the last entry, and must be present */ \ + last_entry() + +#define VM_TYPES_OS_CPU(declare_type, declare_toplevel_type, declare_oop_type, declare_integer_type, declare_unsigned_integer_type, declare_noncore_type, declare_noncore_toplevel_type, declare_noncore_oop_type, declare_noncore_integer_type, declare_noncore_unsigned_integer_type, declare_c1_toplevel_type, declare_c2_type, declare_c2_toplevel_type, last_entry) \ + \ + /**********************/ \ + /* FreeBSD Thread IDs */ \ + /**********************/ \ + \ + declare_unsigned_integer_type(pthread_t) \ + \ + /* This must be the last entry, and must be present */ \ + last_entry() + +#define VM_INT_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_noncore_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ + \ + /* This must be the last entry, and must be present */ \ + last_entry() + +#define VM_LONG_CONSTANTS_OS_CPU(declare_constant, declare_preprocessor_constant, declare_c1_constant, declare_c2_constant, declare_c2_preprocessor_constant, last_entry) \ + \ + /* This must be the last entry, and must be present */ \ + last_entry() diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/linux_i486/vm/linux_i486.ad jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/linux_i486/vm/linux_i486.ad --- jdk-1_5_0_11/hotspot/src/os_cpu/linux_i486/vm/linux_i486.ad 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/linux_i486/vm/linux_i486.ad 2007-02-24 09:06:02.000000000 +0100 @@ -46,7 +46,7 @@ %} enc_class linux_tlsencode (eRegP dst) %{ - Register dstReg = as_Register($dst$$reg); + Register dstReg = RegisterImpl::as_Register($dst$$reg); MacroAssembler* masm = new MacroAssembler(&cbuf); masm->get_thread(dstReg); %} diff -ruN jdk-1_5_0_11/hotspot/src/os_cpu/solaris_i486/vm/solaris_i486.ad jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/solaris_i486/vm/solaris_i486.ad --- jdk-1_5_0_11/hotspot/src/os_cpu/solaris_i486/vm/solaris_i486.ad 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/os_cpu/solaris_i486/vm/solaris_i486.ad 2007-02-24 09:06:02.000000000 +0100 @@ -45,7 +45,7 @@ %} enc_class solaris_tlsencode (eRegP dst) %{ - Register dstReg = as_Register($dst$$reg); + Register dstReg = RegisterImpl::as_Register($dst$$reg); MacroAssembler* masm = new MacroAssembler(&cbuf); masm->get_thread(dstReg); %} diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/adlc/adlc.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/adlc/adlc.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/adlc/adlc.hpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/adlc/adlc.hpp 2007-02-24 09:06:03.000000000 +0100 @@ -47,9 +47,9 @@ #endif #endif // _WIN32 -#ifdef LINUX +#if defined(LINUX) || defined(_ALLBSD_SOURCE) #include -#endif // LINUX +#endif // LINUX || _ALLBSD_SOURCE #define true v_true #define false v_false diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/adlc/output_c.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/adlc/output_c.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/adlc/output_c.cpp 2007-02-19 22:56:21.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/adlc/output_c.cpp 2007-02-24 09:06:03.000000000 +0100 @@ -752,7 +752,7 @@ fprintf(fp_cpp, "in1._mask%d | in2._mask%d%s", l, l, l < masklen ? ", " : ""); fprintf(fp_cpp, ");\n"); fprintf(fp_cpp, "}\n\n"); - fprintf(fp_cpp, "void Pipeline_Use_Cycle_Mask::Or(const Pipeline_Use_Cycle_Mask &in2) {\n "); + fprintf(fp_cpp, "void Or(const Pipeline_Use_Cycle_Mask &in2) {\n "); for (l = 1; l <= masklen; l++) fprintf(fp_cpp, " _mask%d |= in2._mask%d;", l, l); fprintf(fp_cpp, "\n}\n\n"); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/adlc/output_h.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/adlc/output_h.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/adlc/output_h.cpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/adlc/output_h.cpp 2007-02-24 09:06:03.000000000 +0100 @@ -672,7 +672,7 @@ fprintf(fp_hpp, " _mask <<= n;\n"); fprintf(fp_hpp, " return *this;\n"); fprintf(fp_hpp, " }\n\n"); - fprintf(fp_hpp, " void Pipeline_Use_Cycle_Mask::Or(const Pipeline_Use_Cycle_Mask &in2) {\n"); + fprintf(fp_hpp, " void Or(const Pipeline_Use_Cycle_Mask &in2) {\n"); fprintf(fp_hpp, " _mask |= in2._mask;\n"); fprintf(fp_hpp, " }\n\n"); fprintf(fp_hpp, " friend Pipeline_Use_Cycle_Mask operator&(const Pipeline_Use_Cycle_Mask &, const Pipeline_Use_Cycle_Mask &);\n"); @@ -1870,7 +1870,7 @@ fprintf(fp," bool DFA( int opcode, const Node *ideal );\n"); fprintf(fp,"\n"); fprintf(fp," // Access function for _valid bit vector\n"); - fprintf(fp," bool State::valid(uint index) {\n"); + fprintf(fp," bool valid(uint index) {\n"); fprintf(fp," return( STATE__VALID(index) );\n"); fprintf(fp," }\n"); fprintf(fp,"\n"); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/asm/assembler.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/asm/assembler.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/asm/assembler.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/asm/assembler.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -12,6 +12,8 @@ class CodeBuffer; class MacroAssembler; +class AbstractAssembler; +class Displacement; // Labels represent target destinations for jumps and calls. // diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_AllocTable.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_AllocTable.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_AllocTable.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_AllocTable.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -27,7 +27,7 @@ allFreeState = 0 // state when all registers are released }; - int c1_AllocTable::get_free_helper(intx lock_state); + int get_free_helper(intx lock_state); public: c1_AllocTable(int size); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_CacheLocals.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_CacheLocals.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_CacheLocals.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_CacheLocals.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -13,6 +13,8 @@ class RInfoCollection; class RegisterState; class LIR_ScanInfo; +class RegisterManager; +class WordSizeList; class LocalMapping: public CompilationResourceObj { private: diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_CodeStubs.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_CodeStubs.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_CodeStubs.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_CodeStubs.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -347,12 +347,12 @@ case LIR_Op1::patch_normal: field_offset = 0; break; default: ShouldNotReachHere(); } - NativeMovRegMem* n_move = nativeMovRegMem_at(pc_start()); + NativeMovRegMem* n_move = NativeMovRegMem::nativeMovRegMem_at(pc_start()); n_move->set_offset(field_offset); } else if (_id == load_klass_id) { #ifdef ASSERT // verify that we're pointing at a NativeMovConstReg - nativeMovConstReg_at(pc_start()); + NativeMovConstReg::nativeMovConstReg_at(pc_start()); #endif } else { ShouldNotReachHere(); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_RInfo.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_RInfo.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_RInfo.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_RInfo.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -136,8 +136,8 @@ // constructors: RInfo () : _number(illegal_reg_number) {} - friend RInfo as_RInfo(const Register r) { RInfo rinfo; rinfo.set_word_reg(r); return rinfo; } - friend RInfo as_RInfo(const Register lo, const Register hi) { RInfo rinfo; rinfo.set_long_reg(lo, hi); return rinfo; } + static RInfo as_RInfo(const Register r) { RInfo rinfo; rinfo.set_word_reg(r); return rinfo; } + static RInfo as_RInfo(const Register lo, const Register hi) { RInfo rinfo; rinfo.set_long_reg(lo, hi); return rinfo; } // accessors and tests: void set_no_rinfo () { _number = illegal_reg_number; } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_Runtime1.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_Runtime1.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_Runtime1.cpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_Runtime1.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -851,9 +851,9 @@ // In that case we don't bother to do any patching we just return // and let the deopt happen if (!caller_code->is_patched_for_deopt()) { - NativeGeneralJump* jump = nativeGeneralJump_at(caller_frame.pc()); + NativeGeneralJump* jump = NativeGeneralJump::nativeGeneralJump_at(caller_frame.pc()); address instr_pc = jump->jump_destination(); - NativeInstruction* ni = nativeInstruction_at(instr_pc); + NativeInstruction* ni = NativeInstruction::nativeInstruction_at(instr_pc); if (ni->is_jump() ) { // the jump has not been patched yet // The jump destination is slow case and therefore not part of the stubs @@ -887,20 +887,20 @@ if (stub_id == Runtime1::init_check_patching_id) { do_patch = instanceKlass::cast(init_klass())->is_initialized() || (code != Bytecodes::_getstatic && code != Bytecodes::_putstatic); - NativeGeneralJump* jump = nativeGeneralJump_at(instr_pc); + NativeGeneralJump* jump = NativeGeneralJump::nativeGeneralJump_at(instr_pc); if (jump->jump_destination() == being_initialized_entry) { assert(do_patch == true, "initialization must be complete at this point"); } else { // The offset may not be correct if the class was not loaded at code generation time. // Set it now. - NativeMovRegMem* n_move = nativeMovRegMem_at(copy_buff); + NativeMovRegMem* n_move = NativeMovRegMem::nativeMovRegMem_at(copy_buff); assert(n_move->offset() == 0 || (n_move->offset() == 4 && (patch_field_type == T_DOUBLE || patch_field_type == T_LONG)), "illegal offset for type"); assert(patch_field_offset >= 0, "illegal offset"); n_move->add_offset_in_bytes(patch_field_offset); } } else if (stub_id == Runtime1::load_klass_patching_id) { // patch the instruction - NativeMovConstReg* n_copy = nativeMovConstReg_at(copy_buff); + NativeMovConstReg* n_copy = NativeMovConstReg::nativeMovConstReg_at(copy_buff); assert(n_copy->data() == 0, "illegal init value"); assert(load_klass() != NULL, "klass not set"); n_copy->set_data((intx) (load_klass())); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_ValueMap.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_ValueMap.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/c1/c1_ValueMap.cpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/c1/c1_ValueMap.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -37,7 +37,7 @@ public: // creation - Bucket::Bucket(int id) + Bucket(int id) : _values(ValueMapBucketInitialSize) , _hashes(ValueMapBucketInitialSize) #ifndef PRODUCT diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/ci/ciMethodData.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/ci/ciMethodData.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/ci/ciMethodData.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/ci/ciMethodData.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -54,7 +54,7 @@ // Copy & translate from oop based VirtualCallData void translate_from(ProfileData* data); #ifndef PRODUCT - void ciVirtualCallData::print_data_on(outputStream* st); + void print_data_on(outputStream* st); #endif }; diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/ci/ciObject.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/ci/ciObject.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/ci/ciObject.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/ci/ciObject.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -50,7 +50,7 @@ jobject handle() const { return _handle; } // Get the VM oop that this object holds. - oop ciObject::get_oop() const { + oop get_oop() const { assert(_handle != NULL, "null oop"); return JNIHandles::resolve_non_null(_handle); } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/ci/ciObjectFactory.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/ci/ciObjectFactory.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/ci/ciObjectFactory.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/ci/ciObjectFactory.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -87,7 +87,7 @@ // Get the ciMethodData representing the methodData for a method // with none. - ciMethodData* ciObjectFactory::get_empty_methodData(); + ciMethodData* get_empty_methodData(); ciReturnAddress* get_return_address(int bci); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/code/compiledIC.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/code/compiledIC.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/code/compiledIC.cpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/code/compiledIC.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -423,7 +423,7 @@ CompiledIC::CompiledIC(Relocation* ic_reloc) - : _ic_call(nativeCall_at(ic_reloc->addr())), + : _ic_call(NativeCall::nativeCall_at(ic_reloc->addr())), _oops(parse_ic(ic_reloc->code(), ic_reloc->addr(), _oop_addr, &_is_optimized)) { assert(ic_reloc->type() == relocInfo::virtual_call_type || @@ -488,8 +488,8 @@ callee->name_and_sig_as_C_string()); } - NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object - NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); + NativeMovConstReg* method_holder = NativeMovConstReg::nativeMovConstReg_at(stub); // creation also verifies the object + NativeJump* jump = NativeJump::nativeJump_at(method_holder->next_instruction_address()); assert(method_holder->data() == 0 || method_holder->data() == (intptr_t)callee(), "a) MT-unsafe modification of inline cache"); assert(jump->jump_destination() == (address)-1 || jump->jump_destination() == entry, "b) MT-unsafe modification of inline cache"); @@ -556,8 +556,8 @@ // Reset stub address stub = static_stub->addr(); assert(stub!=NULL, "stub not found"); - NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object - NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); + NativeMovConstReg* method_holder = NativeMovConstReg::nativeMovConstReg_at(stub); // creation also verifies the object + NativeJump* jump = NativeJump::nativeJump_at(method_holder->next_instruction_address()); method_holder->set_data(0); jump->set_jump_destination((address)-1); } @@ -643,8 +643,8 @@ // Verify stub address stub = find_stub(); assert(stub != NULL, "no stub found for static call"); - NativeMovConstReg* method_holder = nativeMovConstReg_at(stub); // creation also verifies the object - NativeJump* jump = nativeJump_at(method_holder->next_instruction_address()); + NativeMovConstReg* method_holder = NativeMovConstReg::nativeMovConstReg_at(stub); // creation also verifies the object + NativeJump* jump = NativeJump::nativeJump_at(method_holder->next_instruction_address()); // Verify state assert(is_clean() || is_call_to_compiled() || is_call_to_interpreted(), "sanity check"); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/code/compiledIC.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/code/compiledIC.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/code/compiledIC.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/code/compiledIC.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -123,13 +123,13 @@ }; inline CompiledIC* CompiledIC_before(address return_addr) { - CompiledIC* c_ic = new CompiledIC(nativeCall_before(return_addr)); + CompiledIC* c_ic = new CompiledIC(NativeCall::nativeCall_before(return_addr)); c_ic->verify(); return c_ic; } inline CompiledIC* CompiledIC_at(address call_site) { - CompiledIC* c_ic = new CompiledIC(nativeCall_at(call_site)); + CompiledIC* c_ic = new CompiledIC(NativeCall::nativeCall_at(call_site)); c_ic->verify(); return c_ic; } @@ -211,7 +211,7 @@ inline CompiledStaticCall* compiledStaticCall_before(address return_addr) { - CompiledStaticCall* st = (CompiledStaticCall*)nativeCall_before(return_addr); + CompiledStaticCall* st = (CompiledStaticCall*)NativeCall::nativeCall_before(return_addr); st->verify(); return st; } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/code/onStackReplacement.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/code/onStackReplacement.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/code/onStackReplacement.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/code/onStackReplacement.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -23,8 +23,8 @@ private: int _returning_fp_entry_offset; - OSRAdapter::OSRAdapter(CodeBuffer *cb, OopMapSet *oop_maps, int size, - int frame_size, int returning_fp_entry_offset); + OSRAdapter(CodeBuffer *cb, OopMapSet *oop_maps, int size, + int frame_size, int returning_fp_entry_offset); void* operator new(size_t s, unsigned size); public: diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/gc_implementation/parallelScavenge/generationSizer.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -19,7 +19,7 @@ initialize_size_info(); } - void GenerationSizer::initialize_flags() { + void initialize_flags() { // Do basic sizing work this->TwoGenerationCollectorPolicy::initialize_flags(); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/gc_implementation/parallelScavenge/parallelScavengeHeap.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -9,6 +9,7 @@ */ class PSAdaptiveSizePolicy; +class AdjoiningGenerations; class GCTaskManager; class ParallelScavengeHeap : public CollectedHeap { diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/interpreter/bytecodeHistogram.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/interpreter/bytecodeHistogram.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/interpreter/bytecodeHistogram.cpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/interpreter/bytecodeHistogram.cpp 2007-02-24 09:06:02.000000000 +0100 @@ -35,7 +35,7 @@ double BytecodeCounter::frequency() { return (double)counter_value() / elapsed_time(); } - +#endif void BytecodeCounter::print() { tty->print_cr( @@ -46,7 +46,7 @@ ); } - +#ifndef PRODUCT // Helper class for sorting class HistoEntry: public ResourceObj { diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/interpreter/bytecodes.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/interpreter/bytecodes.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/interpreter/bytecodes.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/interpreter/bytecodes.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -11,6 +11,8 @@ // Bytecodes specifies all bytecodes used in the VM and // provides utility functions to get bytecode attributes. +#include + // NOTE: replicated in SA in vm/agent/sun/jvm/hotspot/interpreter/Bytecodes.java class Bytecodes: AllStatic { public: @@ -261,7 +263,8 @@ // Platform specific JVM bytecodes #include "incls/_bytecodes_pd.hpp.incl" - number_of_codes + number_of_codes, + WIDTH_HINT = INT_MAX }; private: diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/interpreter/shared.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/interpreter/shared.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/interpreter/shared.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/interpreter/shared.hpp 2007-02-24 09:06:02.000000000 +0100 @@ -43,19 +43,18 @@ // to control the C++ namespace. class OptoReg VALUE_OBJ_CLASS_SPEC { public: - enum Name { - // Chunk 0 + typedef int Name; + #ifdef COMPILER2 - Physical = AdlcVMDeps::Physical, // Start of physical regs + static const Name Physical = AdlcVMDeps::Physical; // Start of physical regs #endif - // A few oddballs at the edge of the world - Special = -2, // All special (not allocated) values - Bad = -1 // Not a register - }; + // A few oddballs at the edge of the world + static const Name Special = -2; // All special (not allocated) values + static const Name Bad = -1; // Not a register // Increment a register number. As in: // "for ( OptoReg::Name i; i=Control; i = add(i,1) ) ..." - static Name add( Name x, int y ) { return Name(x+y); } + static Name add( Name x, int y ) { return (x+y); } // (We would like to have an operator+ for RegName, but it is not // a class, so this would be illegal in C++.) @@ -72,7 +71,7 @@ // when we do not yet know how big the frame will be. class VMReg VALUE_OBJ_CLASS_SPEC { public: - enum Name { }; + typedef int Name; }; diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/memory/concurrentMarkSweepGeneration.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/concurrentMarkSweepGeneration.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/memory/concurrentMarkSweepGeneration.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/concurrentMarkSweepGeneration.hpp 2007-02-24 09:06:03.000000000 +0100 @@ -21,10 +21,12 @@ // means of a sliding mark-compact. (Not yet implemented.) class ConcurrentMarkSweepGeneration; +class ConcurrentMarkSweepThread; class CompactibleFreeListSpace; class FreeChunk; class PromotionInfo; class ScanMarkedObjectsAgainCarefullyClosure; +class ReferenceProcessorMT; // A generic CMS bit map. It's the basis for both the CMS marking bit map // as well as for the mod union table (in each case only a subset of the diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/memory/dump.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/dump.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/memory/dump.cpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/dump.cpp 2007-02-24 09:06:03.000000000 +0100 @@ -1037,7 +1037,7 @@ // Support for a simple checksum of the contents of the class list // file to prevent trivial tampering. The algorithm matches that in // the MakeClassList program used by the J2SE build process. -#define JSUM_SEED ((jlong)0xcafebabebabecafe) +#define JSUM_SEED ((jlong)0xcafebabebabecafeLL) static jlong jsum(jlong start, const char *buf, const int len) { diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/memory/referenceProcessor.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/referenceProcessor.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/memory/referenceProcessor.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/referenceProcessor.hpp 2007-02-24 09:06:03.000000000 +0100 @@ -115,7 +115,7 @@ // Returns the name of the discovered reference list // occupying the i / _num_q slot. - const char* ReferenceProcessor::list_name(int i); + const char* list_name(int i); protected: virtual void enqueue_discovered_reflists(oop* pending_list_addr); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/memory/symbolTable.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/symbolTable.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/memory/symbolTable.hpp 2007-02-19 22:56:22.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/memory/symbolTable.hpp 2007-02-24 09:06:03.000000000 +0100 @@ -145,7 +145,7 @@ } - static int StringTable::hash_string(jchar* s, int len); + static int hash_string(jchar* s, int len); // GC support diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/opto/callnode.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/opto/callnode.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/opto/callnode.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/opto/callnode.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -335,8 +335,8 @@ // Handle monitor stack void push_monitor( const FastLockNode *lock ); void pop_monitor (); - Node *SafePointNode::peek_monitor_box() const; - Node *SafePointNode::peek_monitor_obj() const; + Node *peek_monitor_box() const; + Node *peek_monitor_obj() const; // Access functions for the JVM Node *control () const { return in(TypeFunc::Control ); } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/opto/node.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/opto/node.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/opto/node.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/opto/node.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -98,6 +98,7 @@ #if OPTO_DU_ITERATOR_ASSERT class DUIterator; class DUIterator_Fast; +class DUIterator_Last; #else typedef uint DUIterator; typedef Node** DUIterator_Fast; diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/opto/parse.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/opto/parse.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/opto/parse.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/opto/parse.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -11,6 +11,7 @@ class InlineTree; class Parse; class BytecodeParseHistogram; +class SwitchRange; //------------------------------InlineTree------------------------------------- @@ -405,7 +406,7 @@ void do_call(); // Helper function to uncommon-trap or bailout for non-compilable call-sites - bool Parse::can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass *klass); + bool can_not_compile_call_site(ciMethod *dest_method, ciInstanceKlass *klass); // Helper function to identify inlining potential at call-site ciMethod* optimize_inlining(ciMethod* caller, int bci, ciInstanceKlass* klass, diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/prims/jniId.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jniId.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/prims/jniId.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jniId.cpp 2007-02-24 09:06:03.000000000 +0100 @@ -63,8 +63,8 @@ int bucket_count(int index_cnt); // Converts the number of indicies into the number of bucket slots. public: - jniIdTableHolder::jniIdTableHolder(int index_cnt); - jniIdTableHolder::~jniIdTableHolder(); + jniIdTableHolder(int index_cnt); + ~jniIdTableHolder(); void set_default_bucket(int index_cnt, jniIdBucket *initial_bucket); inline jniIdBucket** bucket_table() const { return _bucket_table; } jniIdTableHolder** addr_next() { return &_next; } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiEnvBase.hpp 2007-02-24 09:06:03.000000000 +0100 @@ -263,19 +263,19 @@ // JVMTI API helper functions which are called at safepoint or thread is suspended. - jvmtiError JvmtiEnvBase::get_frame_count(JvmtiThreadState *state, jint *count_ptr); - jvmtiError JvmtiEnvBase::get_frame_location(JavaThread* java_thread, jint depth, + jvmtiError get_frame_count(JvmtiThreadState *state, jint *count_ptr); + jvmtiError get_frame_location(JavaThread* java_thread, jint depth, jmethodID* method_ptr, jlocation* location_ptr); - jvmtiError JvmtiEnvBase::get_object_monitor_usage(JavaThread *calling_thread, + jvmtiError get_object_monitor_usage(JavaThread *calling_thread, jobject object, jvmtiMonitorUsage* info_ptr); - jvmtiError JvmtiEnvBase::get_stack_trace(JavaThread *java_thread, + jvmtiError get_stack_trace(JavaThread *java_thread, jint stack_depth, jint max_count, jvmtiFrameInfo* frame_buffer, jint* count_ptr); - jvmtiError JvmtiEnvBase::get_owned_monitor_info(JavaThread *calling_thread, + jvmtiError get_owned_monitor_info(JavaThread *calling_thread, JavaThread *java_thread, jint* count_ptr, jobject** owned_monitors_ptr); - jvmtiError JvmtiEnvBase::get_current_contended_monitor(JavaThread *calling_thread, + jvmtiError get_current_contended_monitor(JavaThread *calling_thread, JavaThread *java_thread, jobject *monitor_ptr); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiEnvThreadState.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiEnvThreadState.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiEnvThreadState.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiEnvThreadState.hpp 2007-02-24 09:06:03.000000000 +0100 @@ -10,6 +10,9 @@ #ifndef _JAVA_JVMTIENVTHREADSTATE_H_ #define _JAVA_JVMTIENVTHREADSTATE_H_ +class JvmtiEnv; +class JvmtiFramePops; + /////////////////////////////////////////////////////////////// // // class JvmtiFramePop diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiEventController.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiEventController.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiEventController.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiEventController.cpp 2007-02-24 09:06:03.000000000 +0100 @@ -12,7 +12,7 @@ # include "incls/_jvmtiEventController.cpp.incl" #ifdef JVMTI_TRACE -#define EC_TRACE(out) if (JvmtiTrace::trace_event_controller()) { SafeResourceMark rm; tty->print_cr##out; } while (0) +#define EC_TRACE(out) if (JvmtiTrace::trace_event_controller()) { SafeResourceMark rm; tty->print_cr out; } while (0) #else #define EC_TRACE(out) #endif /*JVMTI_TRACE */ diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiExport.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiExport.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/prims/jvmtiExport.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/prims/jvmtiExport.cpp 2007-02-24 09:06:03.000000000 +0100 @@ -15,8 +15,8 @@ extern struct JVMDI_Interface_1_ jvmdiTrace_Interface; // temporary #ifdef JVMTI_TRACE -#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr##out; } -#define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; tty->print_cr##out; } +#define EVT_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_SENT) != 0) { SafeResourceMark rm; tty->print_cr out; } +#define EVT_TRIG_TRACE(evt,out) if ((JvmtiTrace::event_trace_flags(evt) & JvmtiTrace::SHOW_EVENT_TRIGGER) != 0) { SafeResourceMark rm; tty->print_cr out; } #else #define EVT_TRIG_TRACE(evt,out) #define EVT_TRACE(evt,out) diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/arguments.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/arguments.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/arguments.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/arguments.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -408,7 +408,7 @@ } //System properties - static void Arguments::init_system_properties(JavaVMInitArgs* args); + static void init_system_properties(JavaVMInitArgs* args); // Proptery List manipulation static void PropertyList_add(SystemProperty** plist, SystemProperty *element); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/compilationPolicy.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/compilationPolicy.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/compilationPolicy.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/compilationPolicy.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -60,8 +60,8 @@ int compilation_level(methodHandle m, int branch_bci); private: - RFrame* StackWalkCompPolicy::findTopInlinableFrame(GrowableArray* stack); - RFrame* StackWalkCompPolicy::senderOf(RFrame* rf, GrowableArray* stack); + RFrame* findTopInlinableFrame(GrowableArray* stack); + RFrame* senderOf(RFrame* rf, GrowableArray* stack); // the following variables hold values computed by the last inlining decision // they are used for performance debugging only (print better messages) diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/globals.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/globals.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/globals.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/globals.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -148,6 +148,16 @@ // option, you must first specify +UnlockDiagnosticVMOptions. // (This master switch also affects the behavior of -Xprintflags.) +#ifdef __OpenBSD__ +#ifdef _LP64 +#define OSDefaultMaxRAM 650*M +#else +#define OSDefaultMaxRAM 900*M +#endif +#else +#define OSDefaultMaxRAM 1*G +#endif + #define RUNTIME_FLAGS(develop, develop_pd, product, product_pd, diagnostic) \ \ product_pd(bool, UseMembar, \ @@ -1290,7 +1300,7 @@ product(bool, AlwaysActAsServerClassMachine, false, \ "Always act like a server-class machine") \ \ - product(uintx, DefaultMaxRAM, G, \ + product(uintx, DefaultMaxRAM, OSDefaultMaxRAM, \ "Maximum real memory size for setting server class heap size") \ \ product(uintx, DefaultMaxRAMFraction, 4, \ diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/globals_extension.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/globals_extension.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/globals_extension.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/globals_extension.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -117,7 +117,7 @@ #define FLAG_SET_DEFAULT(name, value) ((name) = (value)) -#define FLAG_SET(type, name, value) (CommandLineFlagsEx::##type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value))) +#define FLAG_SET(type, name, value) (CommandLineFlagsEx::type##AtPut(FLAG_MEMBER_WITH_TYPE(name,type), (type)(value))) // Can't put the following in CommandLineFlags because // of a circular dependency on the enum definition. diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/mutex.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/mutex.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/mutex.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/mutex.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -74,7 +74,7 @@ debug_only(int _rank;) // rank (to avoid/detect potential deadlocks) debug_only(Mutex* _next;) // Used by a Thread to link up owned locks debug_only(Thread* _last_owner;) // the last thread to own the lock - debug_only(static bool Mutex::contains(Mutex* locks, Mutex* lock);) + debug_only(static bool contains(Mutex* locks, Mutex* lock);) debug_only(static Mutex* get_least_ranked_lock(Mutex* locks);) debug_only(Mutex* get_least_ranked_lock_besides_this(Mutex* locks);) #endif diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/os.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/os.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/os.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/os.cpp 2007-02-24 09:06:04.000000000 +0100 @@ -133,6 +133,9 @@ void os::signal_init() { if (!ReduceSignalUsage) { + + os::signal_init_pd(); + // Setup JavaThread for processing signals EXCEPTION_MARK; klassOop k = SystemDictionary::resolve_or_fail(vmSymbolHandles::java_lang_Thread(), true, CHECK); @@ -162,8 +165,6 @@ thread_oop, // ARG 1 CHECK); - os::signal_init_pd(); - { MutexLocker mu(Threads_lock); JavaThread* signal_thread = new JavaThread(&signal_thread_entry); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/os.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/os.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/os.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/os.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -327,7 +327,7 @@ // returns a string to describe the exception/signal; // returns NULL if exception_code is not an OS exception/signal. - static const char * os::exception_name(int exception_code, char* buf, int buflen); + static const char * exception_name(int exception_code, char* buf, int buflen); // Returns native Java library, loads if necessary static void* native_java_library(); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/safepoint.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/safepoint.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/safepoint.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/safepoint.cpp 2007-02-24 09:06:04.000000000 +0100 @@ -1237,7 +1237,7 @@ if ( type == relocInfo::virtual_call_type || type == relocInfo::static_call_type || type == relocInfo::opt_virtual_call_type ) { - NativeCall* call = nativeCall_at(real_return_addr); + NativeCall* call = NativeCall::nativeCall_at(real_return_addr); call_dest = call->destination(); } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/sharedRuntime.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/sharedRuntime.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/sharedRuntime.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/sharedRuntime.cpp 2007-02-24 09:06:04.000000000 +0100 @@ -1002,7 +1002,7 @@ MutexLockerEx ml_patch(Patching_lock, Mutex::_no_safepoint_check_flag); // Location of call instruction if (NativeCall::is_call_before(pc)) { - NativeCall *ncall = nativeCall_before(pc); + NativeCall *ncall = NativeCall::nativeCall_before(pc); call_addr = ncall->instruction_address(); } } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/stackMapTable.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/stackMapTable.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/stackMapTable.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/stackMapTable.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -9,6 +9,8 @@ */ // StackMapTable class is the StackMap table used by type checker +class StackMapReader; + class StackMapTable : public CHeapObj { friend class ClassVerifier; diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/thread.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/thread.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/thread.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/thread.cpp 2007-02-24 09:06:04.000000000 +0100 @@ -147,7 +147,12 @@ if (osthread() != NULL) os::free_thread(osthread()); delete _SR_lock; - + + // to make sure nobody finds the deleted thread as a current thread + // in the cache (when comparing stack pointers) + set_stack_base(0); + set_stack_size(0); + // clear thread local storage if the Thread is deleting itself if (this == Thread::current()) { ThreadLocalStorage::set_thread(NULL); diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/thread.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/thread.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/thread.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/thread.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -470,7 +470,7 @@ static ByteSize stack_size_offset() { return byte_offset_of(Thread, _stack_size ); } #define TLAB_FIELD_OFFSET(name) \ - static ByteSize tlab_##name##_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::##name##_offset(); } + static ByteSize tlab_##name##_offset() { return byte_offset_of(Thread, _tlab) + ThreadLocalAllocBuffer::name##_offset(); } TLAB_FIELD_OFFSET(start) TLAB_FIELD_OFFSET(end) @@ -1518,7 +1518,7 @@ static void find_deadlocks(GrowableArray* deadlock_threads, bool print_to_tty); // Fabricate heavyweight monitor info for each lightweight monitor. - static GrowableArray* Threads::jvmpi_fab_heavy_monitors(); + static GrowableArray* jvmpi_fab_heavy_monitors(); // Get Java threads that are waiting to enter a monitor. If doLock // is true, then Threads_lock is grabbed as needed. Otherwise, the diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/verificationType.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/verificationType.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/verificationType.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/verificationType.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -41,6 +41,7 @@ class ArrType; class ObjType; class UninitializedType; +class ClassVerifier; // represents primary types // super class of all other inference types diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/verifier.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/verifier.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/verifier.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/verifier.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -27,6 +27,7 @@ class ObjType; class RefType; +class ClassVerifier; // Hash bucket in class type hash table class ClassTypeBucket : public CHeapObj { diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/runtime/vm_version.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/vm_version.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/runtime/vm_version.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/runtime/vm_version.cpp 2007-02-24 09:06:04.000000000 +0100 @@ -105,7 +105,8 @@ #define OS LINUX_ONLY("linux") \ WINDOWS_ONLY("windows") \ - SOLARIS_ONLY("solaris") + SOLARIS_ONLY("solaris") \ + FREEBSD_ONLY("freebsd") #define CPU IA32_ONLY("x86") \ IA64_ONLY("ia64") \ diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/utilities/events.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/events.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/utilities/events.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/events.cpp 2007-02-24 09:06:04.000000000 +0100 @@ -143,7 +143,7 @@ } } - static void EventBuffer::print_all(outputStream* st) { + static void print_all(outputStream* st) { print_last(st, size); } diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -18,7 +18,9 @@ #include #include #include +#ifndef __OpenBSD__ #include +#endif #ifdef SOLARIS #include #endif // SOLARIS @@ -42,12 +44,14 @@ # include # endif -#ifdef LINUX +#if defined(LINUX) || defined(_ALLBSD_SOURCE) #include #include +#ifndef __OpenBSD__ #include +#endif #include -#endif // LINUX +#endif // LINUX || _ALLBSD_SOURCE // 4810578: varargs unsafe on 32-bit integer/64-bit pointer architectures // When __cplusplus is defined, NULL is defined as 0 (32-bit constant) in @@ -71,7 +75,7 @@ #endif #endif -#ifndef LINUX +#if !defined(LINUX) && !defined(_ALLBSD_SOURCE) // Compiler-specific primitive types typedef unsigned short uint16_t; #ifndef _UINT32_T @@ -91,7 +95,7 @@ // prior definition of intptr_t, and add "&& !defined(XXX)" above. #endif // _SYS_INT_TYPES_H -#endif // !LINUX +#endif // !LINUX && !BSD // Additional Java basic types @@ -174,7 +178,7 @@ inline int g_isnan(float f) { return isnand(f); } #endif inline int g_isnan(double f) { return isnand(f); } -#elif LINUX +#elif defined(LINUX) || defined(_ALLBSD_SOURCE) inline int g_isnan(float f) { return isnanf(f); } inline int g_isnan(double f) { return isnan(f); } #else @@ -189,7 +193,18 @@ // Wide characters +#ifdef __OpenBSD__ +inline int wcslen(const jchar* x) { + short l = 0; + while (*x) { + l++; + x++; + } + return l; +} +#else inline int wcslen(const jchar* x) { return wcslen((const wchar_t*)x); } +#endif // [RGV] Need to check for accurate sizes diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/utilities/macros.hpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/macros.hpp --- jdk-1_5_0_11/hotspot/src/share/vm/utilities/macros.hpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/macros.hpp 2007-02-24 09:06:04.000000000 +0100 @@ -101,6 +101,14 @@ #define NOT_LINUX(code) code #endif +#ifdef __FreeBSD__ +#define FREEBSD_ONLY(code) code +#define NOT_FREEBSD(code) +#else +#define FREEBSD_ONLY(code) +#define NOT_FREEBSD(code) code +#endif + #ifdef SOLARIS #define SOLARIS_ONLY(code) code #define NOT_SOLARIS(code) diff -ruN jdk-1_5_0_11/hotspot/src/share/vm/utilities/vmError.cpp jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/vmError.cpp --- jdk-1_5_0_11/hotspot/src/share/vm/utilities/vmError.cpp 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/hotspot/src/share/vm/utilities/vmError.cpp 2007-02-24 09:06:04.000000000 +0100 @@ -17,7 +17,7 @@ "JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH", "JAVA_COMPILER", "PATH", "USERNAME", - // Env variables that are defined on Solaris/Linux + // Env variables that are defined on Solaris/Linux/BSD "LD_LIBRARY_PATH", "LD_PRELOAD", "SHELL", "DISPLAY", "HOSTTYPE", "OSTYPE", "ARCH", "MACHTYPE", @@ -221,7 +221,11 @@ // process id, thread id st->print(", pid=%d", os::current_process_id()); +#if 0 st->print(", tid=" UINTX_FORMAT, os::current_thread_id()); +#else + st->print(", tid=0x%x" , os::current_thread_id()); +#endif st->cr(); STEP(40) @@ -664,7 +668,7 @@ const char* ptr = OnError; while ((cmd = next_OnError_command(buffer, sizeof(buffer), &ptr)) != NULL){ out.print_raw ("# Executing "); -#if defined(LINUX) +#if defined(LINUX) || defined(_ALLBSD_SOURCE) out.print_raw ("/bin/sh -c "); #elif defined(SOLARIS) out.print_raw ("/usr/bin/sh -c "); @@ -684,11 +688,18 @@ if (!skip_bug_url) { skip_bug_url = true; +#ifdef __FreeBSD__ + out.print_raw_cr("#"); + out.print_raw_cr("# If you would like to submit a bug report, please write"); + out.print_raw_cr("# a letter to freebsd-java@FreeBSD.org mailing list"); + out.print_raw_cr("#"); +#else out.print_raw_cr("#"); out.print_raw_cr("# If you would like to submit a bug report, please visit:"); out.print_raw ("# "); out.print_raw_cr(Arguments::java_vendor_url_bug()); out.print_raw_cr("#"); +#endif } // os::abort() will call abort hooks, try it first. diff -ruN jdk-1_5_0_11/install/make/common/Defs-bsd.gmk jdk-1_5_0_11.ahj14/install/make/common/Defs-bsd.gmk --- jdk-1_5_0_11/install/make/common/Defs-bsd.gmk 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/install/make/common/Defs-bsd.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -0,0 +1,34 @@ +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# +# @(#)Defs-linux.gmk 1.5 03/12/19 +# Makefile to specify compiler flags for programs and libraries +# targeted to Windows builds. Should not contain any rules. + + +include $(CONTROL_TOPDIR)/make/common/Defs-bsd.gmk + +# We need printf! +PRINTF = $(UNIXCOMMAND_PATH)printf.exe + +# the temporary input tar file that rpm will consume +JRE_RPM_TARFILE = $(JRE_TEMPORARY_DIR).tar +JDK_RPM_TARFILE = $(JDK_TEMPORARY_DIR).tar + +# We set and use our ARCH variable, what ever uname -a returns for all the platforms. +# But for amd64 platform we are using amd64 as our ARCH perhaps uname -a would return x86_64. +# Some of place in the build requires x86_64 as a arch ( For eg rpm bundle generation ), so +# we use NATIVE_ARCH variable instead of ARCH on those places. +NATIVE_ARCH = $(ARCH) +ifeq ($(ARCH), amd64) + NATIVE_ARCH = x86_64 +endif + +# This the name of the file generated by rpm +TEMP_JRE_RPMFILE_NAME = $(JRE_NAME)-$(JDK_VERSION)-$(MILESTONE).$(NATIVE_ARCH).rpm +TEMP_JDK_RPMFILE_NAME = $(JDK_NAME)-$(JDK_VERSION)-$(MILESTONE).$(NATIVE_ARCH).rpm + +MANDIR=$(TOPDIR)/src/linux/doc/man +JA_MANDIR=$(TOPDIR)/src/linux/doc/man +DEST_MAN_PATH = man/man1 diff -ruN jdk-1_5_0_11/install/make/common/Pack.gmk jdk-1_5_0_11.ahj14/install/make/common/Pack.gmk --- jdk-1_5_0_11/install/make/common/Pack.gmk 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/install/make/common/Pack.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -37,7 +37,7 @@ # JRE_PACKED_JARS are defined in each of the Platform variants JRE_PACKED_JARS = lib/rt.jar lib/jsse.jar lib/charsets.jar lib/ext/localedata.jar -ifeq ($(ARCH_DATA_MODEL),32) +ifndef DONT_BUILD_DEPLOY JRE_PACKED_JARS += lib/plugin.jar JRE_PACKED_JARS += lib/javaws.jar JRE_PACKED_JARS += lib/deploy.jar diff -ruN jdk-1_5_0_11/install/make/common/Sanity.gmk jdk-1_5_0_11.ahj14/install/make/common/Sanity.gmk --- jdk-1_5_0_11/install/make/common/Sanity.gmk 2007-02-19 22:56:23.000000000 +0100 +++ jdk-1_5_0_11.ahj14/install/make/common/Sanity.gmk 2007-02-24 09:06:50.000000000 +0100 @@ -34,6 +34,10 @@ MIN_FREE_DISK=50000 FREE_SPACE := $(shell $(DF) -k $(OUTPUTDIR) | $(NAWK) '{if ($$4 != "avail") print $$4;}') endif +ifeq ($(PLATFORM), bsd) + MIN_FREE_DISK=50000 + FREE_SPACE := $(shell $(DF) -kP $(OUTPUTDIR) | $(NAWK) 'NR == 2 {print $$4;}') +endif sanity-base:: $(OUTPUTDIR) $(TMPDIR) pre-sanity settings outputdir patching installing diff -ruN jdk-1_5_0_11/install/make/installer/binaries/bsd/Makefile jdk-1_5_0_11.ahj14/install/make/installer/binaries/bsd/Makefile --- jdk-1_5_0_11/install/make/installer/binaries/bsd/Makefile 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/install/make/installer/binaries/bsd/Makefile 2007-02-24 09:06:49.000000000 +0100 @@ -0,0 +1,32 @@ +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# +# +# @(#)Makefile 1.1 02/09/30 +# +# +# Most frequently used targets: +# +# all -- builds +# clobber -- clobber the builds +# +INSTALL_BUILDDIR=../../.. + +include $(INSTALL_BUILDDIR)/common/Defs.gmk + +all: sanity-binaries post-sanity-binaries docs-tar binaries-jdk binaries-jdk-debug binaries-jre + +binaries-clobber: binaries-jre-clobber binaries-jdk-clobber binaries-jdk-debug-clobber + +clean:: binaries-clobber + +include $(INSTALL_BUILDDIR)/common/Binaries.gmk +include $(INSTALL_BUILDDIR)/common/Sanity.gmk + +# +# Phonies to avoid accidents. +# +.PHONY: all clean docs-tar binaries-jre binaries-jdk binaries-jdk-debug \ + binaries-jre-clobber binaries-jdk-clobber \ + binaries-jdk-debug-clobber diff -ruN jdk-1_5_0_11/j2se/make/Makefile jdk-1_5_0_11.ahj14/j2se/make/Makefile --- jdk-1_5_0_11/j2se/make/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/Makefile 2007-02-24 09:06:07.000000000 +0100 @@ -23,7 +23,7 @@ # makefile only) all:: - @$(ECHO) $(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M') + @$(ECHO) "$(PLATFORM) $(ARCH) $(RELEASE) build started: $(shell $(DATE) '+%y-%m-%d %H:%M')" BUILDDIR=. include $(BUILDDIR)/common/Defs.gmk @@ -43,6 +43,9 @@ # # Docs # +ifdef DONT_BUILD_DOCS +docs: sanity-docs post-sanity-docs +else DOCSUBDIRS = docs docs: sanity-docs post-sanity-docs @for i in $(DOCSUBDIRS) ; do \ @@ -51,6 +54,7 @@ || exit 1; $(CD) ..; \ $(ECHO) "<< cscope.files - -find $(CSDIRS) -name SCCS -prune -o -type d \( -name '.del-*' -o \ + -find $(CSDIRS) -name SCCS -prune -o -name CVS -prune \ + -o -type d \( -name '.del-*' -o \ -name '*demo' -o -name pkgarchive $(RMCCHEADERS) \) -prune -o \ -type f \( -name '*.[Ccshlxy]' -o -name '*.il' -o -name '*.cc' -o \ -name 'Makefile*' -o -name GNUmakefile -o -name '*.gmk' -o \ diff -ruN jdk-1_5_0_11/j2se/make/common/Defs-bsd.gmk jdk-1_5_0_11.ahj14/j2se/make/common/Defs-bsd.gmk --- jdk-1_5_0_11/j2se/make/common/Defs-bsd.gmk 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/common/Defs-bsd.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -0,0 +1,514 @@ +# +# Copyright 2004 Sun Microsystems, Inc. All rights reserved. +# SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. +# + +# +# Based on: @(#)Defs-linux.gmk 1.116 04/05/26 +# +# Makefile to specify compiler flags for programs and libraries +# targeted to FreeBSD. Should not contain any rules. +# + +# 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) +# LCFLAGS (set $(OTHER_CFLAGS) instead) +# LCPPFLAGS (set $(OTHER_CPPFLAGS) instead) +# LDFLAGS (set $(OTHER_LDFLAGS) instead) +# LDLIBS (set $(EXTRA_LIBS) instead) +# LDLIBS_COMMON (set $(EXTRA_LIBS) instead) + +# statically link libstdc++ before C++ ABI is stablized on Linux +STATIC_CXX = false + +# define these to avoid picking up ones from aliases or from +# non-standard locations +# + +AR = $(USRBIN_PATH)ar +BASENAME = $(USRBIN_PATH)basename +CAT = $(UNIXCOMMAND_PATH)cat +CC = $(COMPILER_PATH)gcc +CPP = $(COMPILER_PATH)gcc -E +ifeq ($(STATIC_CXX),true) +# g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" +# We need to use gcc to statically link the C++ runtime. gcc and g++ use +# the same subprocess to compile C++ files, so it is OK to build using gcc. +CXX = $(COMPILER_PATH)gcc +else +CXX = $(COMPILER_PATH)g++ +endif +CD = cd # intrinsic unix command +CHMOD = $(UNIXCOMMAND_PATH)chmod +CMP = $(USRBIN_PATH)cmp +COMPRESS = $(USRBIN_PATH)compress +CP = $(UNIXCOMMAND_PATH)cp +ifeq ($(TRUE_PLATFORM), OpenBSD) +CPIO = $(UNIXCOMMAND_PATH)cpio +else +CPIO = $(USRBIN_PATH)cpio +endif +CUT = $(USRBIN_PATH)cut +DATE = $(UNIXCOMMAND_PATH)date +DF = $(UNIXCOMMAND_PATH)df +DIFF = $(USRBIN_PATH)diff +DIRNAME = $(USRBIN_PATH)dirname +ECHO = echo -e # intrinsic unix command, with backslash-escaped character interpretation +EGREP = $(USRBIN_PATH)egrep +EXPR = $(UNIXCOMMAND_PATH)expr +FIND = $(USRBIN_PATH)find +HEAD = $(USRBIN_PATH)head +GDB = $(USRBIN_PATH)gdb +GREP = $(USRBIN_PATH)grep +GUNZIP = $(USRBIN_PATH)gunzip +LEX = $(USRBIN_PATH)lex +LN = $(UNIXCOMMAND_PATH)ln +LS = $(UNIXCOMMAND_PATH)ls +ifeq ($(TRUE_PLATFORM), NetBSD) +M4 = $(USRBIN_PATH)m4 +else +ifeq ($(TRUE_PLATFORM), OpenBSD) +M4 = $(USRBIN_PATH)m4 +else +M4 = $(DEVTOOLS_PATH)gm4 +endif +endif +MKDIR = $(UNIXCOMMAND_PATH)mkdir +MV = $(UNIXCOMMAND_PATH)mv +NAWK = $(USRBIN_PATH)awk +PWD = $(UNIXCOMMAND_PATH)pwd +#RM is defined by GNU Make as 'rm -f' +RMDIR = $(UNIXCOMMAND_PATH)rmdir +#RPM = $(UNIXCOMMAND_PATH)rpm +SED = $(USRBIN_PATH)sed +SH = $(UNIXCOMMAND_PATH)sh +SORT = $(USRBIN_PATH)sort +STRIP = strip +TAIL = $(USRBIN_PATH)tail +ifeq ($(TRUE_PLATFORM), OpenBSD) +TAR = $(UNIXCOMMAND_PATH)tar +else +TAR = $(USRBIN_PATH)tar +endif +TEST = $(UNIXCOMMAND_PATH)test +TOUCH = $(USRBIN_PATH)touch +TR = $(USRBIN_PATH)tr +TRUE = $(USRBIN_PATH)true +UNAME = $(USRBIN_PATH)uname +UNIQ = $(USRBIN_PATH)uniq +UNZIPSFX = $(DEVTOOLS_PATH)unzipsfx +YACC = $(USRBIN_PATH)yacc +ZIPEXE = $(DEVTOOLS_PATH)zip + + +archExpr = case "`$(UNAME) -m`" in \ + i[3-6]86) \ + $(ECHO) i586 \ + ;; \ + ia64) \ + $(ECHO) ia64 \ + ;; \ + x86_64) \ + $(ECHO) amd64 \ + ;; \ + sparc*) \ + $(ECHO) sparc \ + ;; \ + *) \ + $(UNAME) -m \ + ;; \ + esac + +ARCH := $(shell $(archExpr) ) +ARCH_FAMILY = $(ARCH) +OS_VERSION = $(shell $(UNAME) -r) +OS_NAME = bsd + +BINDIR = $(OUTPUTDIR)/bin + +# +# FreeBSD builds may be 32-bit or 64-bit data model. Select +# the default based on the build platform architecture. +# +ifndef ARCH_DATA_MODEL + ifeq ($(ARCH), i586) + ARCH_DATA_MODEL=32 + else + ARCH_DATA_MODEL=64 + endif +endif + +# +# Need to maintain the jre/lib/i386 location for 32-bit Intel +# +ifeq ($(ARCH), i586) + LIBARCH = i386 +else + LIBARCH = $(ARCH) +endif + +# UNIXCOMMAND_PATH is the path to where the most common Unix +# commands are installed. +UNIXCOMMAND_PATH = /bin/ +# Allow the user to override the default value... +ifdef ALT_UNIXCOMMAND_PATH +# make sure that there is a "/" on the end... +UNIXCOMMAND_PATH = $(subst //,/,$(ALT_UNIXCOMMAND_PATH)/) +endif + +# USRBIN_PATH is the path to where the most common Unix +# commands are installed. +USRBIN_PATH = /usr/bin/ +# Allow the user to override the default value... +ifdef ALT_USRBIN_PATH +# make sure that there is a "/" on the end... +USRBIN_PATH = $(subst //,/,$(ALT_USRBIN_PATH)/) +endif + +# COMPILER_PATH is the path to where the compiler and tools +# are installed. +COMPILER_PATH = /usr/bin/ +# +# Allow the user to override the default value... +ifdef ALT_COMPILER_PATH +COMPILER_PATH = $(subst //,/,$(subst \,/,$(ALT_COMPILER_PATH))/) +endif + +# DEVTOOLS_PATH is for other tools required for building (such as +# zip, etc.) +ifeq ($(TRUE_PLATFORM), NetBSD) +DEVTOOLS_PATH = /usr/pkg/bin/ +else +DEVTOOLS_PATH = /usr/local/bin/ +endif +# Allow the user to override the default value... +ifdef ALT_DEVTOOLS_PATH +DEVTOOLS_PATH = $(subst //,/,$(ALT_DEVTOOLS_PATH)/) +endif + +override CC_VERSION = gcc + +# 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' + +# where is unwanted output to be delivered? +DEV_NULL = /dev/null +export DEV_NULL + +CLASSPATH_SEPARATOR = : + +ifndef PLATFORM_SRC +# PLATFORM_SRC may be set by .../ext/*/build/.../Defs.gmk +PLATFORM_SRC = $(TOPDIR)/src/solaris +endif # PLATFORM_SRC + +# platform specific include files +TRUE_PLATFORM_INCLUDE := $(shell $(ECHO) $(TRUE_PLATFORM) | $(TR) "[:upper:]" "[:lower:]") +PLATFORM_INCLUDE = $(INCLUDEDIR)/$(TRUE_PLATFORM_INCLUDE) + +# +# Default BOOTDIR +# +_BOOTDIR = /java/re/j2se/$(PREVIOUS_JDK_VERSION)/archive/fcs/binaries/$(PLATFORM)-$(ARCH) + +# +# Default Hotspot dirs +# +_PROMOTED_BUILD_PATH = /java/re/j2se/$(JDK_VERSION)/promoted/latest/binaries/$(PLATFORM)-$(ARCH) +_HOTSPOT_IMPORT_PATH = $(_PROMOTED_BUILD_PATH) +_HOTSPOT_CLIENT_PATH = $(_PROMOTED_BUILD_PATH)/jre/lib/$(LIBARCH)/client +_HOTSPOT_SERVER_PATH = $(_PROMOTED_BUILD_PATH)/jre/lib/$(LIBARCH)/server + +# +# Default Previous jre and jdk bundle path +# +_PREVIOUS_JDK_FILE = j2sdk-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH).tar.gz +_PREVIOUS_JRE_FILE = j2re-$(PREVIOUS_JDK_UNDERSCORE_VERSION)-$(PLATFORM)-$(ARCH).tar.gz +_PREVIOUS_RELEASE_PATH = /java/re/j2se/$(PREVIOUS_JDK_VERSION)/archive/fcs/bundles/$(PLATFORM)-$(ARCH) +PREVIOUS_JRE_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JRE_FILE) +PREVIOUS_JDK_BUNDLE = $(PREVIOUS_RELEASE_PATH)/$(PREVIOUS_JDK_FILE) + +# suffix used for object file (.o for unix .obj for windows) +OBJECT_SUFFIX = o +# suffix used for make dependencies files. +DEPEND_SUFFIX = d +# The suffix applied to runtime libraries +LIBRARY_SUFFIX = so +# The suffix applied to link libraries +LIB_SUFFIX = so +# The suffix applied to the library name for FDLIBM +FDDLIBM_SUFFIX = a +# The suffix applied to executables (.exe for windows, nothing for solaris) +EXE_SUFFIX = +# The suffix applied to scripts (.bat for windows, nothing for unix) +SCRIPT_SUFFIX = +# The prefix applied to library files (lib for solaris, nothing for windows) +LIB_PREFIX = lib +# CC compiler object code output directive flag value +CC_OBJECT_OUTPUT_FLAG = -o #trailing blank required! + +# +# Default HPI libraries. Build will build only native, unless +# overriden at the make command line. This makes it convenient for +# people doing, say, a pthreads port -- they can create a posix +# directory here, and say "gnumake HPIS=posix" at the top +# level. +# +HPIS = native + +# +# Java default optimization (-x04/-O3) etc. Applies to the VM. +# +CC_HIGHER_OPT = -O3 +CC_LOWER_OPT = -O2 + +ifeq ($(PRODUCT), java) + _OPT = $(CC_HIGHER_OPT) +else + CPPFLAGS_DBG += -DLOGGING +endif + +# +# If -Xa is in CFLAGS_COMMON it will end up ahead of $(POPT) for the +# optimized build, and that ordering of the flags completely freaks +# out cc. Hence, -Xa is instead in each CFLAGS variant. +# +# The extra options to the C++ compiler prevent it from: +# - adding runpath (dump -Lv) to *your* C++ compile install dir +# - adding stubs to various things such as thr_getspecific (hence -nolib) +# - creating Templates.DB in current directory (arch specific) +# +GCC_INHIBIT = -Wno-unused -Wno-parentheses +GCC_STYLE = +GCC_WARNINGS = -W -Wall $(GCC_STYLE) $(GCC_INHIBIT) +ifeq ($(ARCH),ppc) + CFLAGS_COMMON = -fsigned-char +else # ARCH + CFLAGS_COMMON = -fno-strict-aliasing +endif # ARCH +PIC_CODE_LARGE = -fPIC +PIC_CODE_SMALL = -fpic +GLOBAL_KPIC = $(PIC_CODE_LARGE) + +CFLAGS_COMMON += $(GLOBAL_KPIC) $(GCC_WARNINGS) -pipe + +# For most 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. The ia64 was intentionally left out here due to +# questionable value to the option and compiler instability. +ifeq ($(ARCH), amd64) + CFLAGS_COMMON += -fno-omit-frame-pointer +endif +ifeq ($(ARCH), i586) + CFLAGS_COMMON += -fno-omit-frame-pointer +endif + +CFLAGS_OPT = $(POPT) +CFLAGS_DBG = -g + +CXXFLAGS_COMMON = $(GLOBAL_KPIC) -DCC_NOEX $(GCC_WARNINGS) +CXXFLAGS_OPT = $(POPT) +CXXFLAGS_DBG = -g + +# FASTDEBUG: Optimize the code in the -g versions, gives us a faster java_g +ifeq ($(FASTDEBUG), true) + CFLAGS_DBG += -O2 + CXXFLAGS_DBG += -O2 +endif + +CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' $(VERSION_DEFINES) \ + -D_GNU_SOURCE -D_REENTRANT -D_THREAD_SAFE -D_ALLBSD_SOURCE + +ifeq ($(ARCH_DATA_MODEL), 64) +CPPFLAGS_COMMON += -D_LP64=1 +endif + +CPPFLAGS_OPT = +CPPFLAGS_DBG = -DDEBUG + +EXTRA_LIBS += -pthread + +# ifndef PRGM +# ifneq ($(LIBRARY),JdbcOdbc) +# ifneq ($(LIBRARY),fontmanager) +# ifneq ($(ARCH_DATA_MODEL),64) +# LDFLAGS_COMMON = -z defs -lpthread -lc /usr/lib/crt1.o /tmp/main.o +# endif # ARCH_DATA_MODEL +# endif # fontmanager +# endif # JdbcOdbc +# endif # !PRGM + +# +# -L paths for finding and -ljava +# +LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) +LDFLAGS_OPT = -Xlinker -O1 -Wl,-soname=$(LIB_PREFIX)$(LIBRARY)$(OPT_SUFFIX).$(LIBRARY_SUFFIX) +LDFLAGS_DBG = -Wl,-soname=$(LIB_PREFIX)$(LIBRARY)$(DBG_SUFFIX).$(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. +# +STATIC_LIBGCC := $(shell if [ $$($(CC) -dumpversion | $(SED) 's/egcs-//' | $(CUT) -d'.' -f1) -ge 3 ]; then echo true; else echo false; fi) +ifeq ("$(STATIC_LIBGCC)", "true") +OTHER_LDFLAGS += -static-libgcc +endif + +# +# Post Processing of libraries/executables +# +ifeq ($(VARIANT), OPT) + # Debug 'strip -g' leaves local function Elf symbols (better stack traces) + ifeq ($(DEBUG_STRIP), true) + POST_PROCESS= $(STRIP) -g $@ ; + else + POST_PROCESS= $(STRIP) $@ ; + endif +endif + +# javac Boot Flags +JAVAC_BOOT_FLAGS = -J-Xmx128m + +# +# 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 + +# +# 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 = -L$(LIBDIR)/$(LIBARCH)/$(VM_NAME) +JVMLIB += -ljvm$(SUFFIX) +JAVALIB = -ljava$(SUFFIX) $(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 AWT_RUNPATH = +override HAVE_ALTZONE = false +override HAVE_DGA = false +override HAVE_FILIOH = true +override HAVE_GETHRTIME = false +override HAVE_GETHRVTIME = false +ifeq ($(TRUE_PLATFORM), NetBSD) +override HAVE_SIGIGNORE = true +else +override HAVE_SIGIGNORE = false +endif +override LEX_LIBRARY = -lfl +ifeq ($(STATIC_CXX),true) +override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic +else +override LIBCXX = +endif +override LIBPOSIX4 = +override LIBSOCKET = +override LIBTHREAD = +override MOOT_PRIORITIES = true +override NO_INTERRUPTIBLE_IO = false +override OPENWIN_HOME = /usr/X11R6 +override OPENWIN_LIB = $(OPENWIN_HOME)/lib +override OTHER_M4FLAGS = -DGNU_ASSEMBLER +override SUN_CMM_SUBDIR = +override THREADS_FLAG = native +ifeq ($(TRUE_PLATFORM), OpenBSD) +override USE_GNU_M4 = false +override USING_GNU_TAR = false +else +override USE_GNU_M4 = true +override USING_GNU_TAR = true +endif +override WRITE_LIBVERSION = false + +# 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 + +# +# Motif settings +# +# XXX: OpenBSD confirm static motif still causes issues - truk +ifeq ($(TRUE_PLATFORM), OpenBSD) +STATIC_MOTIF=false +else +STATIC_MOTIF=true +endif +LIBM=-lm + +# where to get motif for freebsd... +MOTIF_DIR=$(OPENWIN_HOME) + +ifdef ALT_MOTIF_DIR + MOTIF_DIR = $(ALT_MOTIF_DIR) +endif + +MOTIF_LIB = $(MOTIF_DIR)/lib + +BUILD_MOTIF21 = true +# Always build headless on FreeBSD +BUILD_HEADLESS = true + +ifeq ($(TRUE_PLATFORM), FreeBSD) + SYSTEM_ZLIB = true +endif + +ifeq ($(TRUE_PLATFORM), OpenBSD) + SYSTEM_ZLIB = true +endif + +# +# Japanese manpages +# +JA_SOURCE_ENCODING = eucJP +JA_TARGET_ENCODINGS = eucJP + +# Settings for the JDI - Serviceability Agent binding. +HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/$(LIBARCH) +OPTIMIZED_SALIB_NAME = $(LIB_PREFIX)saproc$(OPT_SUFFIX).$(LIBRARY_SUFFIX) +DEBUG_SALIB_NAME = $(LIB_PREFIX)saproc$(DBG_SUFFIX).$(LIBRARY_SUFFIX) + +# The JDI - Serviceability Agent binding is not currently supported +# on Linux-ia64. +ifeq ($(ARCH), ia64) + INCLUDE_SA = false +else + INCLUDE_SA = true +endif + diff -ruN jdk-1_5_0_11/j2se/make/common/Defs.gmk jdk-1_5_0_11.ahj14/j2se/make/common/Defs.gmk --- jdk-1_5_0_11/j2se/make/common/Defs.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/common/Defs.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -120,6 +120,18 @@ LDLIBS_COMMON = -ldl endif + ifeq ($(TRUE_PLATFORM), FreeBSD) + LDLIBS_COMMON = -pthread + endif + + ifeq ($(TRUE_PLATFORM), OpenBSD) + LDLIBS_COMMON = + endif + + ifeq ($(TRUE_PLATFORM), NetBSD) + LDLIBS_COMMON = -pthread + endif + endif # PROGRAM LDLIBS_COMMON += $(EXTRA_LIBS) @@ -517,6 +529,25 @@ #temporary fix: Due to the bug 4656697, we have defined JAVAH_SUFFIX in the various Defs-*.gmk. JAVAH_CMD = $(BINDIR)/javah$(JAVAH_SUFFIX) RMIC = $(BINDIR)/rmic$(SUFFIX) + + # BSDNOTE: Debug binaries fails on early K6, SMP and some old Pentium + # machines. So, do not use _g binaries till these problems resolved. + # --phantom + ifeq ($(PLATFORM), bsd) + JAVAH_CMD = $(BINDIR)/javah + JAVA = $(BINDIR)/java + JAVAC = $(BINDIR)/javac + JAR = $(BINDIR)/jar + RMIC = $(BINDIR)/rmic + + # XXXBSD: Force interpreter mode until compiler is fixed + #JAVAH_CMD = $(BINDIR)/javah -J-Xint + #JAVA = $(BINDIR)/java -Xint + #JAVAC = $(BINDIR)/javac -J-Xint + #JAR = $(BINDIR)/jar -J-Xint + #RMIC = $(BINDIR)/rmic -Xint + + endif endif # diff -ruN jdk-1_5_0_11/j2se/make/common/Library.gmk jdk-1_5_0_11.ahj14/j2se/make/common/Library.gmk --- jdk-1_5_0_11/j2se/make/common/Library.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/common/Library.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -168,11 +168,15 @@ ifeq ($(LIBRARY), fdlibm) $(AR) -r $@ $(FILES_o) else # LIBRARY +ifeq ($(PLATFORM), bsd) + $(LINKER) -shared -mimpure-text -o $@ `lorder $(FILES_o) | tsort -q` $(LDLIBS) +else ifeq ($(CC_VERSION), gcc) $(LINKER) -shared -mimpure-text -o $@ $(FILES_o) $(LDLIBS) else # CC_VERSION $(LINKER) -G -o $@ $(FILES_o) $(LDLIBS) endif # CC_VERSION +endif # PLATFORM == bsd $(POST_PROCESS) ifeq ($(WRITE_LIBVERSION),true) diff -ruN jdk-1_5_0_11/j2se/make/common/Platform.gmk jdk-1_5_0_11.ahj14/j2se/make/common/Platform.gmk --- jdk-1_5_0_11/j2se/make/common/Platform.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/common/Platform.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -14,6 +14,7 @@ ifeq ($(uname), Linux) PLATFORM = linux +LINUX_OR_BSD = true endif ifeq ($(uname), Windows_NT) @@ -26,6 +27,31 @@ export USING_CYGWIN endif +ifeq ($(uname), FreeBSD) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +ifeq ($(uname), NetBSD) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +ifeq ($(uname), OpenBSD) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +ifeq ($(uname), BSD/OS) +PLATFORM = bsd +LINUX_OR_BSD = true +endif + +TRUE_PLATFORM = $(uname) +export TRUE_PLATFORM + +export LINUX_OR_BSD + export PLATFORM endif # PLATFORM diff -ruN jdk-1_5_0_11/j2se/make/common/Program.gmk jdk-1_5_0_11.ahj14/j2se/make/common/Program.gmk --- jdk-1_5_0_11/j2se/make/common/Program.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/common/Program.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -34,6 +34,7 @@ $(OBJDIR)/parse_manifest.$(OBJECT_SUFFIX) \ $(OBJDIR)/version_comp.$(OBJECT_SUFFIX) +ifneq ($(SYSTEM_ZLIB),true) # # zlib files statically imported # @@ -47,6 +48,10 @@ $(OBJDIR)/zutil.$(OBJECT_SUFFIX) FILES_o = $(LAUNCHER_o) $(ZLIB_o) +else +FILES_o = $(LAUNCHER_o) +LDFLAGS += -lz +endif ifeq ($(PLATFORM), windows) @@ -74,6 +79,10 @@ endif # USE_PTHREADS endif # PLATFORM +ifeq ($(PLATFORM), bsd) +THREADLIBS = -pthread +endif + $(BINDIR)/$(PROGRAM)$(SUFFIX)$(EXE_SUFFIX):: \ classes $(OBJDIR) @$(MKDIR) -p $(@D) @@ -175,15 +184,19 @@ ifneq ($(PLATFORM), windows) +ifneq ($(PLATFORM), bsd) HAVE_GETHRTIME=true endif +endif ifeq ($(HAVE_GETHRTIME),true) OTHER_CPPFLAGS += -DHAVE_GETHRTIME endif OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC)/bin -I$(LAUNCHER_PLATFORM_SRC)/bin +ifneq ($(SYSTEM_ZLIB),true) OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 +endif # this may not be necessrary... ifeq ($(PLATFORM), windows) diff -ruN jdk-1_5_0_11/j2se/make/common/Release.gmk jdk-1_5_0_11.ahj14/j2se/make/common/Release.gmk --- jdk-1_5_0_11/j2se/make/common/Release.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/common/Release.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -132,7 +132,7 @@ JRE_MAN_PAGES += javaws.1 endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) JRE_MAN_PAGES += \ kinit.1 \ klist.1 \ @@ -177,6 +177,17 @@ DEST_MAN_PATH = man/man1 endif +ifeq ($(PLATFORM), bsd) + MANDIR=$(TOPDIR)/src/bsd/doc/man + JA_MANDIR=$(TOPDIR)/src/bsd/doc/man + DEST_MAN_PATH = man/man1 +endif + +ifeq ($(TRUE_PLATFORM), OpenBSD) + FILES_FROM_ARG=-I +else + FILES_FROM_ARG=-T +endif # # Targets. @@ -494,7 +505,7 @@ @# @# Add Japanese manpages @# - ifeq ($(PLATFORM), linux) + ifeq ($(LINUX_OR_BSD), true) for manpage in $(JRE_MAN_PAGES); do \ for encoding in $(JA_TARGET_ENCODINGS); do \ MAN_DEST_PATH=$(JRE_IMAGE_DIR)/man/ja; \ @@ -733,12 +744,12 @@ @# generated by the more efficient solaris/windows method of copying files. @# So for Linux, make use of the -T option (like Solaris' -I option) of @# obtaining the list of files from a file. MKS tar has no such option. - ifeq ($(PLATFORM), linux) + ifeq ($(LINUX_OR_BSD), true) for d in $(SOURCE_DIRS); do \ ($(CD) $$d; \ - $(FIND) $(SOURCES) -name SCCS -prune \ + $(FIND) $(SOURCES) -name SCCS -prune -o -name CVS -prune \ -o -name '*.java' \! -name '*-*' -print > $(ABS_TMPDIR)/src-files.list ; \ - $(TAR) cf - -T $(ABS_TMPDIR)/src-files.list | \ + $(TAR) cf - $(FILES_FROM_ARG) $(ABS_TMPDIR)/src-files.list | \ ($(CD) $(JDK_IMAGE_DIR)/src; $(TAR) xf -); \ ); \ done @@ -803,7 +814,7 @@ @# @# Add Japanese manpages for Solaris @# - ifeq ($(PLATFORM), linux) + ifeq ($(LINUX_OR_BSD), true) for manpage in $(JDK_MAN_PAGES); do \ for encoding in $(JA_TARGET_ENCODINGS); do \ MAN_DEST_PATH=$(JDK_IMAGE_DIR)/man/ja; \ @@ -938,7 +949,7 @@ ################################################################### compare-image-jre:: $(TMPDIR)/previous_jre $(TMPDIR)/DirDiff $(CP) $(PREVIOUS_JRE_BUNDLE) $(TMPDIR)/previous_jre -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) ($(CD) $(TMPDIR)/previous_jre; \ $(GUNZIP) -dc $(PREVIOUS_JRE_FILE) | \ $(TAR) xf - ) @@ -956,7 +967,7 @@ ################################################################### compare-image-jdk:: $(TMPDIR)/previous_jdk $(TMPDIR)/DirDiff $(CP) $(PREVIOUS_JDK_BUNDLE) $(TMPDIR)/previous_jdk -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) ($(CD) $(TMPDIR)/previous_jdk; \ $(GUNZIP) -dc $(PREVIOUS_JDK_FILE) | \ $(TAR) xf - ) @@ -980,7 +991,7 @@ $(RM) $(TMPDIR)/tmp.jar $(RM) -r $(TMPDIR)/jre $(TMPDIR)/jdk endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) $(RM) -r $(OUTPUTDIR)/$(ARCH) endif ifeq ($(PLATFORM), windows) diff -ruN jdk-1_5_0_11/j2se/make/common/Sanity.gmk jdk-1_5_0_11.ahj14/j2se/make/common/Sanity.gmk --- jdk-1_5_0_11/j2se/make/common/Sanity.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/common/Sanity.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -79,6 +79,14 @@ endif endif +ifeq ($(PLATFORM), bsd) + MIN_FREE_DISK=1460000 + FREE_SPACE := $(shell $(DF) -kP $(OUTPUTDIR) | $(NAWK) 'NR == 2 {print $$4;}') + CC_VER := $(shell $(CC) -dumpversion) + FREEBSD_VERSION := $(shell $(UNAME) -r | $(SED) -e 's/-[A-Z]*//') + OS_VERSION := $(shell $(UNAME) -r) +endif + ifeq ($(PLATFORM), windows) OS := $(shell $(UNAME)) MIN_FREE_DISK=500000 @@ -206,6 +214,11 @@ endif endif +# on BSD, only check motif path if we are not building it from scratch +ifeq ($(PLATFORM), bsd) +sanity-all:: motif +endif + # only check hotspot binary paths if we are not building them from scratch ifneq ($(BUILD_HOTSPOT), true) sanity-all:: hotspot_binaries hotspot_import @@ -273,13 +286,16 @@ # check for GNU Make version ###################################################### make: - @if [ `$(MAKE) -version | $(HEAD) -n 1 | $(NAWK) '{ print $$4; }' | $(EGREP) -c '3.7[89].1,'` -ne 1 ]; then \ + @v=`$(MAKE) -version | $(NAWK) 'NR == 1 { if ($$3 == "version") v = $$4 ; else v = $$3; sub(",", "", v); print v }'` ; \ + case "$$v" in \ + 3.7[89].1|3.8*) ;; \ + *) \ $(ECHO) "WARNING: The version of make being used does not match \n" \ " the expected version for this platform. \n" \ - " The version of make found was ->`$(MAKE) -version | $(HEAD) -n 1 | $(NAWK) '{ print $$4; }'`<- \n" \ - " The version expected matches the pattern ->3.7[89].1,<-. \n" \ + " The version of make found was ->$$v<- \n" \ + " The version expected matches the pattern ->3.7[89].1|3.8<-. \n" \ "" >> $(WARNING_FILE) ; \ - fi + esac ###################################################### # dump out the variable settings... @@ -305,7 +321,7 @@ @$(ECHO) " GCC_COMPILER_PATH = $(GCC_COMPILER_PATH) " >> $(MESSAGE_FILE) endif endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) @$(ECHO) " USRBIN_PATH = $(USRBIN_PATH) " >> $(MESSAGE_FILE) endif ifeq ($(PLATFORM), windows) @@ -363,6 +379,9 @@ ifeq ($(PLATFORM), linux) @$(ECHO) " LINUX_VERSION = $(LINUX_VERSION) " >> $(MESSAGE_FILE) endif +ifeq ($(PLATFORM), bsd) + @$(ECHO) " TRUE_PLATFORM = $(TRUE_PLATFORM) " >> $(MESSAGE_FILE) +endif @$(ECHO) " OS_VERSION = $(OS_VERSION) " >> $(MESSAGE_FILE) ifeq ($(PLATFORM), linux) ifneq ($(ARCH), ia64) @@ -562,6 +581,7 @@ } \ }' $(REQ_PATCH_LIST) readingInstallPatches=1 $(INSTALL_PATCHES_FILE) >> $(WARNING_FILE) endif # PLATFORM +# XXXBSD: put system checks here ###################################################### # CLASSPATH cannot be set, unless you are insane. @@ -825,7 +845,8 @@ ###################################################### # BOOTDIR must point to a valid JDK. ###################################################### -JAVA_VERSION_OK := $(shell $(ECHO) $(JAVA_VERSION) | $(EGREP) -c '^1.4.[2-9]') +JAVA_VERSION_OK := $(shell $(ECHO) $(JAVA_VERSION) | \ + $(EGREP) -c '^(1.4.[2-9]|1.5)') bootdir: @if [ -x $(BOOTDIR)/bin/java$(EXE_SUFFIX) ]; then \ if [ $(JAVA_VERSION_OK) -ne 1 ]; then \ @@ -919,7 +940,7 @@ fi endif endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) @if [ ! -r $(MOTIF_LIB)/libXm.a ]; then \ $(ECHO) "ERROR: You do not have access to a valid Motif library. \n" \ " Please check your access to \n" \ @@ -1055,7 +1076,7 @@ # Check for existence of USRBIN_PATH on linux ###################################################### usrbin_path: -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) @if [ ! -r $(USRBIN_PATH) ]; then \ $(ECHO) "ERROR: You do not have a valid USRBIN_PATH setting. \n" \ " Please check your access to \n" \ @@ -1540,6 +1561,7 @@ fi endif # DATA_MODEL endif # PLATFORM +# XXXBSD: put compiler checks here ###################################################### # Check that ALSA headers and libs are installed and diff -ruN jdk-1_5_0_11/j2se/make/docs/Makefile jdk-1_5_0_11.ahj14/j2se/make/docs/Makefile --- jdk-1_5_0_11/j2se/make/docs/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/docs/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -189,7 +189,7 @@ # you get "No packages or classes specified." due to $(CLASSPATH_SEPARATOR) # being interpreted as an end of command (newline) -JAAS_SOURCEPATH = "$(TOPDIR)/src/share/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/solaris/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/windows/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/linux/classes" +JAAS_SOURCEPATH = "$(TOPDIR)/src/share/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/solaris/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/windows/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/linux/classes$(CLASSPATH_SEPARATOR)$(TOPDIR)/src/bsd/classes" JAAS_DOCDIR = $(DOCSDIR)/guide/security/jaas/spec JAAS_JAVADOCFLAGS = $(COMMON_JAVADOCFLAGS) \ -encoding ascii \ diff -ruN jdk-1_5_0_11/j2se/make/java/fdlibm/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/fdlibm/Makefile --- jdk-1_5_0_11/j2se/make/java/fdlibm/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/fdlibm/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -57,7 +57,7 @@ # Disable optimization to get correctly reproducible # floating-point results. # -ifeq ($(PLATFORM),linux) +ifeq ($(LINUX_OR_BSD),true) _OPT = -g endif diff -ruN jdk-1_5_0_11/j2se/make/java/hpi/hpi_common.gmk jdk-1_5_0_11.ahj14/j2se/make/java/hpi/hpi_common.gmk --- jdk-1_5_0_11/j2se/make/java/hpi/hpi_common.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/hpi/hpi_common.gmk 2007-02-24 09:06:04.000000000 +0100 @@ -63,6 +63,10 @@ # Things that must be linked in. # ifneq ($(PLATFORM), windows) +ifeq ($(PLATFORM), bsd) +OTHER_LDLIBS += $(LIBM) +else LIBSOCKET = -lsocket OTHER_LDLIBS += $(LIBSOCKET) -lnsl $(LIBM) -ldl endif +endif diff -ruN jdk-1_5_0_11/j2se/make/java/hpi/native/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/hpi/native/Makefile --- jdk-1_5_0_11/j2se/make/java/hpi/native/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/hpi/native/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -59,11 +59,14 @@ ifeq ($(MOOT_PRIORITIES),true) OTHER_CPPFLAGS += -DMOOT_PRIORITIES endif +ifeq ($(PLATFORM), bsd) +OTHER_LDLIBS += -pthread +else LIBPOSIX4 = -lposix4 OTHER_LDLIBS += -lpthread $(LIBPOSIX4) endif +endif -HAVE_GETHRVTIME=true ifeq ($(HAVE_GETHRVTIME),true) OTHER_CPPFLAGS += -DHAVE_GETHRVTIME endif @@ -73,6 +76,10 @@ OTHER_CPPFLAGS += -DHAVE_FILIOH endif +ifeq ($(HAVE_SIGIGNORE),true) +OTHER_CPPFLAGS += -DHAVE_SIGIGNORE +endif + ifeq ($(NO_INTERRUPTIBLE_IO),true) OTHER_CPPFLAGS += -DNO_INTERRUPTIBLE_IO endif diff -ruN jdk-1_5_0_11/j2se/make/java/instrument/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/instrument/Makefile --- jdk-1_5_0_11/j2se/make/java/instrument/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/instrument/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -43,6 +43,7 @@ LAUNCHER_SHARE_SRC = $(SHARE_SRC)/bin LAUNCHER_PLATFORM_SRC = $(PLATFORM_SRC)/bin +ifneq ($(SYSTEM_ZLIB),true) FILES_c += \ inflate.c \ infblock.c \ @@ -51,7 +52,10 @@ inftrees.c \ zadler32.c \ infutil.c \ - zutil.c \ + zutil.c +endif + +FILES_c += \ canonicalize_md.c \ parse_manifest.c @@ -60,7 +64,9 @@ OTHER_INCLUDES = -I$(SHARE_SRC)/instrument OTHER_INCLUDES += -I$(PLATFORM_SRC)/instrument +ifneq ($(SYSTEM_ZLIB),true) OTHER_INCLUDES += -I$(ZIP_SRC) +endif OTHER_INCLUDES += -I$(IO_PLATFORM_SRC) OTHER_INCLUDES += -I$(LAUNCHER_SHARE_SRC) -I$(LAUNCHER_PLATFORM_SRC) @@ -70,8 +76,18 @@ # Also zlib files do not compile with warning level 3 COMPILER_WARNING_LEVEL=0 else +ifeq ($(SYSTEM_ZLIB),true) +OTHER_LDLIBS += -lz +endif +ifeq ($(PLATFORM), bsd) + ifneq ($(TRUE_PLATFORM), NetBSD) + OTHER_INCLUDES += -I/usr/local/include + OTHER_LDLIBS += -L/usr/local/lib -liconv + endif +else OTHER_LDLIBS = -lnsl -ldl endif +endif ifeq ($(PLATFORM), linux) # fork1() is declared in libjvm.so @@ -115,7 +131,9 @@ # Add to ambient vpath so we pick up the library files # vpath %.c $(SHARE_SRC)/instrument $(PLATFORM_SRC)/instrument +ifneq ($(SYSTEM_ZLIB),true) vpath %.c $(ZIP_SRC) +endif vpath %.c $(IO_PLATFORM_SRC) vpath %.c $(LAUNCHER_SHARE_SRC) $(LAUNCHER_PLATFORM_SRC) diff -ruN jdk-1_5_0_11/j2se/make/java/java/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/java/Makefile --- jdk-1_5_0_11/j2se/make/java/java/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/java/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -127,8 +127,10 @@ # Is the altzone extern documented in ctime(3C) available? # ifneq ($(PLATFORM), windows) +ifneq ($(PLATFORM), bsd) HAVE_ALTZONE=true endif +endif ifeq ($(HAVE_ALTZONE),true) OTHER_CPPFLAGS += -DHAVE_ALTZONE @@ -170,10 +172,16 @@ OTHER_LDLIBS += $(JVMLIB) -libpath:$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) fdlibm$(SUFFIX).lib \ -libpath:$(OBJDIR)/../../../verify/$(OBJDIRNAME) verify$(SUFFIX).lib else +ifeq ($(PLATFORM), bsd) +OTHER_LDLIBS += $(JVMLIB) -lverify$(SUFFIX) \ + -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) \ + -lfdlibm$(SUFFIX).$(ARCH) +else LIBSOCKET = -lsocket OTHER_LDLIBS += $(JVMLIB) -lverify$(SUFFIX) $(LIBSOCKET) -lnsl -ldl \ -L$(OBJDIR)/../../../fdlibm/$(OBJDIRNAME) -lfdlibm$(SUFFIX).$(ARCH) endif +endif # # Rules. diff -ruN jdk-1_5_0_11/j2se/make/java/java_crw_demo/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/java_crw_demo/Makefile --- jdk-1_5_0_11/j2se/make/java/java_crw_demo/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/java_crw_demo/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -28,7 +28,7 @@ endif # Turn on optimization on Linux -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) _OPT = $(CC_LOWER_OPT) endif diff -ruN jdk-1_5_0_11/j2se/make/java/java_hprof_demo/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/java_hprof_demo/Makefile --- jdk-1_5_0_11/j2se/make/java/java_hprof_demo/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/java_hprof_demo/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -32,7 +32,7 @@ endif # Turn on optimization on Linux -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) _OPT = $(CC_LOWER_OPT) endif @@ -49,6 +49,9 @@ ifeq ($(PLATFORM), linux) CFLAGS_COMMON += -Werror endif + ifeq ($(PLATFORM), bsd) + CFLAGS_COMMON += -Werror + endif ifeq ($(PLATFORM), windows) # The default for non-amd64 seems to already be -WX? Why? ifeq ($(ARCH), amd64) @@ -72,12 +75,14 @@ OTHER_INCLUDES = -I$(SRCDIR) \ -I$(SHARE_SRC)/demo/jvmti/java_crw_demo +ifneq ($(PLATFORM), bsd) ifeq ($(PLATFORM), windows) OTHER_LDLIBS += wsock32.lib winmm.lib else LIBSOCKET = -lsocket OTHER_LDLIBS += $(LIBSOCKET) -lnsl -ldl endif +endif # # Tell library.gmk to copy the txt file first diff -ruN jdk-1_5_0_11/j2se/make/java/main/java/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/main/java/Makefile --- jdk-1_5_0_11/j2se/make/java/main/java/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/main/java/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -27,3 +27,6 @@ LDFLAGS += -M mapfile-$(ARCH) endif +ifeq ($(TRUE_PLATFORM), NetBSD) +LDFLAGS += -Wl,-R$(OPENWIN_LIB) +endif diff -ruN jdk-1_5_0_11/j2se/make/java/management/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/management/Makefile --- jdk-1_5_0_11/j2se/make/java/management/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/management/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -29,7 +29,7 @@ FILES_export += com/sun/management/OperatingSystem.java -else # PLATFORM (i.e. solaris & linux) +else # PLATFORM (i.e. solaris & linux & bsd) FILES_java += $(TARGDIR)com/sun/management/UnixOperatingSystem.java \ $(TARGDIR)com/sun/management/UnixOperatingSystemMXBean.java @@ -64,7 +64,8 @@ # OTHER_INCLUDES += \ - -I$(SHARE_SRC)/native/sun/management + -I$(SHARE_SRC)/native/sun/management \ + -I$(PLATFORM_SRC)/hpi/include ifeq ($(PLATFORM),windows) OTHER_LDLIBS += $(JVMLIB) diff -ruN jdk-1_5_0_11/j2se/make/java/net/FILES_c.gmk jdk-1_5_0_11.ahj14/j2se/make/java/net/FILES_c.gmk --- jdk-1_5_0_11/j2se/make/java/net/FILES_c.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/net/FILES_c.gmk 2007-02-24 09:06:05.000000000 +0100 @@ -26,3 +26,7 @@ ifeq ($(PLATFORM), linux) FILES_c += $(CTARGDIR)linux_close.c endif + +ifeq ($(PLATFORM), bsd) + FILES_c += $(CTARGDIR)bsd_close.c +endif diff -ruN jdk-1_5_0_11/j2se/make/java/net/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/net/Makefile --- jdk-1_5_0_11/j2se/make/java/net/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/net/Makefile 2007-02-24 09:06:05.000000000 +0100 @@ -69,6 +69,12 @@ include $(BUILDDIR)/common/Library.gmk +ifeq ($(PLATFORM), bsd) +ifdef DONT_ENABLE_IPV6 + OTHER_CFLAGS += -DDONT_ENABLE_IPV6 +endif + OTHER_LDLIBS = $(JVMLIB) -pthread +else ifeq ($(PLATFORM), windows) OTHER_LDLIBS = ws2_32.lib $(JVMLIB) COMPILER_WARNING_LEVEL=2 @@ -79,6 +85,7 @@ ifeq ($(PLATFORM), linux) OTHER_LDLIBS += -lpthread endif +endif # PLATFORM == bsd CLASSES.export += java.lang.Integer java.io.FileDescriptor java.net.InetAddressImplFactory java.net.Inet4AddressImpl java.net.Inet6AddressImpl diff -ruN jdk-1_5_0_11/j2se/make/java/nio/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/nio/Makefile --- jdk-1_5_0_11/j2se/make/java/nio/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/nio/Makefile 2007-02-24 09:06:05.000000000 +0100 @@ -63,7 +63,7 @@ sun/nio/ch/WindowsSelectorImpl.java endif # PLATFORM = windows -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) FILES_java += \ sun/nio/ch/AbstractPollSelectorImpl.java \ sun/nio/ch/EPollArrayWrapper.java \ @@ -112,6 +112,7 @@ -I$(SHARE_SRC)/native/java/io \ -I$(SHARE_SRC)/native/java/net \ -I$(PLATFORM_SRC)/native/java/net \ + -I$(PLATFORM_SRC)/hpi/include \ -I$(CLASSHDRDIR)/../../../java.lang/java/CClassHeaders ifeq ($(PLATFORM),windows) @@ -121,9 +122,14 @@ $(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/io_util.obj \ $(OBJDIR)/../../../java.lang/java/$(OBJDIRNAME)/FileDescriptor_md.obj endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) OTHER_CFLAGS += -Werror -OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH)$(SUFFIX) -ljava$(SUFFIX) -lnet$(SUFFIX) -lpthread -ldl +OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH)$(SUFFIX) -ljava$(SUFFIX) -lnet$(SUFFIX) +ifeq ($(PLATFORM), linux) +OTHER_LDLIBS += -lpthread -ldl +else # bsd +OTHER_LDLIBS += -pthread +endif endif ifeq ($(PLATFORM), solaris) OTHER_LDLIBS += $(JVMLIB) -lsocket -lposix4 -ldl \ diff -ruN jdk-1_5_0_11/j2se/make/java/redist/FILES.gmk jdk-1_5_0_11.ahj14/j2se/make/java/redist/FILES.gmk --- jdk-1_5_0_11/j2se/make/java/redist/FILES.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/redist/FILES.gmk 2007-02-24 09:06:05.000000000 +0100 @@ -15,6 +15,14 @@ $(LIBDIR)/fonts/LucidaSansDemiBold.ttf \ ifeq ($(PLATFORM), linux) +LINUX_OR_BSD = true +endif + +ifeq ($(PLATFORM), bsd) +LINUX_OR_BSD = true +endif + +ifeq ($(LINUX_OR_BSD), true) # 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 diff -ruN jdk-1_5_0_11/j2se/make/java/redist/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/redist/Makefile --- jdk-1_5_0_11/j2se/make/java/redist/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/redist/Makefile 2007-02-24 09:06:05.000000000 +0100 @@ -96,8 +96,8 @@ $(LIB_LOCATION)/$(CLIENT_LOCATION)/Xusage.txt endif -ifeq ($(PLATFORM), linux) -# linux +ifeq ($(LINUX_OR_BSD), true) +# linux || bsd OPTIMIZED_LIBCHMOD_NAME = $(LIB_PREFIX)native_chmod$(OPT_SUFFIX).$(LIBRARY_SUFFIX) DEBUG_LIBCHMOD_NAME = $(LIB_PREFIX)native_chmod$(DBG_SUFFIX).$(LIBRARY_SUFFIX) @@ -111,7 +111,7 @@ $(RM) $@ ($(GUNZIP) < $<) | ($(CD) $(LIBDIR)/$(LIBARCH); $(TAR) xf -) $(ECHO) $@ >> $(INSTALLED_FILES_FILE) -# linux +# linux || bsd endif ifeq ($(PLATFORM), windows) @@ -497,7 +497,7 @@ $(CP) $< $@ $(ECHO) $@ >> $(INSTALLED_FILES_FILE) -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) # The oblique fonts are only needed/wanted on Linux. diff -ruN jdk-1_5_0_11/j2se/make/java/sun_io/FILES_java.gmk jdk-1_5_0_11.ahj14/j2se/make/java/sun_io/FILES_java.gmk --- jdk-1_5_0_11/j2se/make/java/sun_io/FILES_java.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/sun_io/FILES_java.gmk 2007-02-24 09:06:05.000000000 +0100 @@ -66,6 +66,8 @@ $(TARGDIR)sun/io/CharToByteCp1257.java \ $(TARGDIR)sun/io/ByteToCharKOI8_R.java \ $(TARGDIR)sun/io/CharToByteKOI8_R.java \ + $(TARGDIR)sun/io/ByteToCharKOI8_U.java \ + $(TARGDIR)sun/io/CharToByteKOI8_U.java \ $(TARGDIR)sun/io/ByteToCharSingleByte.java \ $(TARGDIR)sun/io/CharToByteSingleByte.java \ $(TARGDIR)sun/nio/cs/StandardCharsets.java \ @@ -85,6 +87,7 @@ $(TARGDIR)sun/nio/cs/ISO_8859_13.java \ $(TARGDIR)sun/nio/cs/ISO_8859_15.java \ $(TARGDIR)sun/nio/cs/KOI8_R.java \ + $(TARGDIR)sun/nio/cs/KOI8_U.java \ $(TARGDIR)sun/nio/cs/MS1250.java \ $(TARGDIR)sun/nio/cs/MS1251.java \ $(TARGDIR)sun/nio/cs/MS1252.java \ diff -ruN jdk-1_5_0_11/j2se/make/java/zip/FILES_c.gmk jdk-1_5_0_11.ahj14/j2se/make/java/zip/FILES_c.gmk --- jdk-1_5_0_11/j2se/make/java/zip/FILES_c.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/zip/FILES_c.gmk 2007-02-24 09:06:05.000000000 +0100 @@ -8,6 +8,10 @@ $(CTARGDIR)Inflater.c \ $(CTARGDIR)ZipFile.c \ $(CTARGDIR)ZipEntry.c \ + $(CTARGDIR)zip_util.c + +ifneq ($(SYSTEM_ZLIB),true) +FILES_c += \ $(CTARGDIR)zadler32.c \ $(CTARGDIR)zcrc32.c \ $(CTARGDIR)deflate.c \ @@ -18,5 +22,5 @@ $(CTARGDIR)inftrees.c \ $(CTARGDIR)infcodes.c \ $(CTARGDIR)infutil.c \ - $(CTARGDIR)inffast.c \ - $(CTARGDIR)zip_util.c + $(CTARGDIR)inffast.c +endif diff -ruN jdk-1_5_0_11/j2se/make/java/zip/Makefile jdk-1_5_0_11.ahj14/j2se/make/java/zip/Makefile --- jdk-1_5_0_11/j2se/make/java/zip/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/java/zip/Makefile 2007-02-24 09:06:05.000000000 +0100 @@ -60,12 +60,14 @@ CPPFLAGS += -UDEBUG endif +ifneq ($(SYSTEM_ZLIB),true) CPPFLAGS += -I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) # # Add to ambient vpath so we pick up the library files # vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/zlib-$(ZLIB_VERSION) +endif # # Has been converted to the JNI: generate JNI-style header files @@ -75,4 +77,8 @@ # # Link to JVM library for JVM_Zip* functions # +ifeq ($(SYSTEM_ZLIB),true) +OTHER_LDLIBS = -lz +else OTHER_LDLIBS = $(JVMLIB) +endif diff -ruN jdk-1_5_0_11/j2se/make/javax/sound/FILES_c.gmk jdk-1_5_0_11.ahj14/j2se/make/javax/sound/FILES_c.gmk --- jdk-1_5_0_11/j2se/make/javax/sound/FILES_c.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/javax/sound/FILES_c.gmk 2007-02-24 09:06:05.000000000 +0100 @@ -54,6 +54,10 @@ $(CTARGDIR)HAE_API_LinuxOS.c \ $(CTARGDIR)HAE_API_LinuxOS_Capture.c +FILES_bsd = \ + $(CTARGDIR)HAE_API_BSDOS.c \ + $(CTARGDIR)HAE_API_BSDOS_Capture.c + FILES_windows = \ $(CTARGDIR)HAE_API_WinOS.c \ $(CTARGDIR)HAE_API_WinOS_Capture.c \ diff -ruN jdk-1_5_0_11/j2se/make/javax/sound/Makefile jdk-1_5_0_11.ahj14/j2se/make/javax/sound/Makefile --- jdk-1_5_0_11/j2se/make/javax/sound/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/javax/sound/Makefile 2007-02-24 09:06:05.000000000 +0100 @@ -66,6 +66,22 @@ endif endif # PLATFORM linux +# XXXBSD: ??? +ifeq ($(PLATFORM), bsd) + # build with empty MIDI i/o + INCLUDE_MIDI = TRUE + # build with empty ports + INCLUDE_PORTS = TRUE + # build with empty direct audio + INCLUDE_DAUDIO = TRUE + ifeq ($(TRUE_PLATFORM), OpenBSD) + LDFLAGS += -lossaudio + endif + ifeq ($(TRUE_PLATFORM), NetBSD) + LDFLAGS += -lossaudio + endif +endif # PLATFORM bsd + ifeq ($(PLATFORM), solaris) ifneq ($(ARCH), amd64) # build with ports and direct audio diff -ruN jdk-1_5_0_11/j2se/make/javax/sound/SoundDefs.gmk jdk-1_5_0_11.ahj14/j2se/make/javax/sound/SoundDefs.gmk --- jdk-1_5_0_11/j2se/make/javax/sound/SoundDefs.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/javax/sound/SoundDefs.gmk 2007-02-24 09:06:05.000000000 +0100 @@ -41,6 +41,10 @@ CPPFLAGS += -DX_PLATFORM=X_LINUX endif # PLATFORM linux +ifeq ($(PLATFORM), bsd) + CPPFLAGS += -DX_PLATFORM=X_BSD +endif # PLATFORM bsd + ifeq ($(PLATFORM), solaris) CPPFLAGS += -DX_PLATFORM=X_SOLARIS diff -ruN jdk-1_5_0_11/j2se/make/javax/swing/beaninfo/SwingBeans.gmk jdk-1_5_0_11.ahj14/j2se/make/javax/swing/beaninfo/SwingBeans.gmk --- jdk-1_5_0_11/j2se/make/javax/swing/beaninfo/SwingBeans.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/javax/swing/beaninfo/SwingBeans.gmk 2007-02-24 09:06:05.000000000 +0100 @@ -53,6 +53,10 @@ LATEST_JDK12 = $(BUILDDIR) JAVAC_BOOTCLASSPATH_NAME = -bootclasspath endif + ifeq ($(PLATFORM), bsd) + LATEST_JDK12 = $(BUILDDIR) + JAVAC_BOOTCLASSPATH_NAME = -bootclasspath + endif BEANINFO_PATH = $(CLASSBINDIR) LOCAL_CLASSPATH = "$(CLASSBINDIR)$(CLASSPATH_SEPARATOR)$(LATEST_JDK12)/jre/lib/rt.jar$(CLASSPATH_SEPARATOR)$(LATEST_JDK12)/lib/tools.jar$(CLASSPATH_SEPARATOR)$(BEANINFO_PATH)" diff -ruN jdk-1_5_0_11/j2se/make/jpda/back/Makefile jdk-1_5_0_11.ahj14/j2se/make/jpda/back/Makefile --- jdk-1_5_0_11/j2se/make/jpda/back/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/jpda/back/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -25,7 +25,7 @@ include $(BUILDDIR)/common/Defs.gmk # Optimize the linux version -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) _OPT = $(CC_LOWER_OPT) endif diff -ruN jdk-1_5_0_11/j2se/make/jpda/transport/socket/Makefile jdk-1_5_0_11.ahj14/j2se/make/jpda/transport/socket/Makefile --- jdk-1_5_0_11/j2se/make/jpda/transport/socket/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/jpda/transport/socket/Makefile 2007-02-24 09:06:04.000000000 +0100 @@ -24,6 +24,11 @@ OTHER_LDLIBS += -lnsl -lpthread endif +ifeq ($(PLATFORM), bsd) + LIBSOCKET = + OTHER_LDLIBS += -pthread +endif + ifeq ($(PLATFORM), solaris) LIBSOCKET = -lsocket OTHER_LDLIBS += -lnsl -lsocket diff -ruN jdk-1_5_0_11/j2se/make/mkdemo/jvmti/Demo.gmk jdk-1_5_0_11.ahj14/j2se/make/mkdemo/jvmti/Demo.gmk --- jdk-1_5_0_11/j2se/make/mkdemo/jvmti/Demo.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/mkdemo/jvmti/Demo.gmk 2007-02-24 09:06:06.000000000 +0100 @@ -52,7 +52,7 @@ CFLAGS_COMMON += -errwarn=%all CXXFLAGS_COMMON += -errwarn=%all,no%doubunder,no%notused endif - ifeq ($(PLATFORM), linux) + ifeq ($(LINUX_OR_BSD), true) CFLAGS_COMMON += -Werror CXXFLAGS_COMMON += -Werror endif diff -ruN jdk-1_5_0_11/j2se/make/sun/applet/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/applet/Makefile --- jdk-1_5_0_11/j2se/make/sun/applet/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/applet/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -37,5 +37,8 @@ # # Anything with a GUI needs X11 to be linked in. # +ifeq ($(TRUE_PLATFORM), NetBSD) +OTHER_LDLIBS += -Wl,-R$(OPENWIN_LIB) +endif OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 endif # PLATFORM diff -ruN jdk-1_5_0_11/j2se/make/sun/awt/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/awt/Makefile --- jdk-1_5_0_11/j2se/make/sun/awt/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/awt/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -74,6 +74,14 @@ OTHER_LDLIBS = -lmlib_image$(SUFFIX) $(JVMLIB) $(LIBM) -ldl endif +ifeq ($(PLATFORM), bsd) +FILES_c = $(FILES_2D_c) +FILES_c += awt_LoadLibrary.c +OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH +OTHER_CFLAGS += -DMOTIF_VERSION=2 +OTHER_LDLIBS = -lmlib_image$(SUFFIX) $(JVMLIB) $(LIBM) +endif + FILES_c += initIDs.c @@ -156,6 +164,10 @@ LDNOMAP=true endif +ifeq ($(PLATFORM), bsd) + LDNOMAP = true +endif + include $(BUILDDIR)/common/Mapfile-vers.gmk include $(BUILDDIR)/common/Library.gmk @@ -178,7 +190,7 @@ endif # PLATFORM ifneq ($(PLATFORM), windows) -# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX +# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX/BSD ifeq ($(PLATFORM), solaris) # Solaris production release specific @@ -216,8 +228,14 @@ robot_child : $(ROBOT_CHILD_EXE) $(CP) $(ROBOT_CHILD_EXE) $(LIBDIR)/$(LIBARCH) +ifneq ($(TRUE_PLATFORM), NetBSD) +LDFLAGS_PLATFORM=-L$(OPENWIN_LIB) +else +LDFLAGS_PLATFORM=-L$(OPENWIN_LIB) -Wl,-R$(OPENWIN_LIB) +endif + $(ROBOT_CHILD_EXE) : $(ROBOT_CHILD_FILES_o) - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS_COMMON) -L$(OPENWIN_LIB) \ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_PLATFORM) \ $(AWT_RUNPATH) $(OTHER_LDFLAGS) $(TARGET_ARCH) -lXt -lXext \ -lXtst -lXi -lX11 $(ROBOT_CHILD_FILES_o) -o $(ROBOT_CHILD_EXE) $(POST_PROCESS) @@ -240,10 +258,10 @@ $(GTK_HELPER_EXE) : $(GTK_HELPER_FILES_o) $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS_COMMON) \ $(AWT_RUNPATH) $(OTHER_LDFLAGS) $(TARGET_ARCH) \ - -ldl $(GTK_HELPER_FILES_o) -o $(GTK_HELPER_EXE) + $(GTK_HELPER_FILES_o) -o $(GTK_HELPER_EXE) $(POST_PROCESS) -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX/BSD endif # PLATFORM # @@ -321,6 +339,15 @@ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LINUX endif # PLATFORM +ifeq ($(PLATFORM), bsd) +# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BSD +vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/robot_child +vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/opengl +vpath %.c $(PLATFORM_SRC)/native/$(PKGDIR)/../java2d/opengl +vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../font +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BSD +endif # PLATFORM + ifeq ($(PLATFORM), windows) # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv WINDOWS ifeq ($(ARCH_DATA_MODEL), 64) @@ -350,7 +377,7 @@ endif # PLATFORM ifneq ($(PLATFORM), windows) -# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX +# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX/BSD ifeq ($(STATIC_MOTIF),true) LIBXM = $(MOTIF_LIB)/libXm.a -lXp @@ -430,7 +457,7 @@ dgalib.clean: $(RM) $(LIBDIR)/$(LIBARCH)/libjdgaSUNW* $(LIBDIR)/$(LIBARCH)/libxinerama.so -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX/BSD endif # PLATFORM # @@ -473,6 +500,18 @@ # ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ LINUX endif # PLATFORM +ifeq ($(PLATFORM), bsd) +# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv BSD + +FONTCONFIGS_SRC = $(PLATFORM_SRC)/classes/sun/awt/motif +_FONTCONFIGS = \ + fontconfig.properties + +FONTCONFIGS_SRC_PREFIX = $(PLATFORM). + +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ BSD +endif # PLATFORM + ifeq ($(PLATFORM), solaris) # vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS @@ -560,7 +599,7 @@ endif # PLATFORM ifneq ($(PLATFORM), windows) -# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX +# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX/BSD # # Other extra flags needed for compiling. @@ -572,6 +611,12 @@ -I$(OPENWIN_HOME)/include/X11/extensions \ -I$(PLATFORM_SRC)/native/$(PKGDIR)/font endif +ifeq ($(PLATFORM), bsd) +CPPFLAGS += -I$(MOTIF_DIR)/include \ + -I$(OPENWIN_HOME)/include \ + -I$(OPENWIN_HOME)/include/X11/extensions \ + -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 \ @@ -596,10 +641,17 @@ LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) endif +ifeq ($(PLATFORM), bsd) +LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) +ifeq ($(TRUE_PLATFORM), NetBSD) +LDFLAGS += -Wl,-R$(MOTIF_LIB) -Wl,-R$(OPENWIN_LIB) +endif +endif + LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \ $(AWT_RUNPATH) -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX/BSD endif # PLATFORM CLASSES.export += java.io.InputStream \ @@ -614,7 +666,7 @@ JAVAHFLAGS += -jni ifneq ($(PLATFORM), windows) -# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX +# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv SOLARIS/LINUX/BSD # # Remove some files that are created in the main classes directory # during compilation of X11 character converters, but should live in @@ -656,7 +708,7 @@ undesiredfiles: $(RM) $(UNDESIRED_FILES) -# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX +# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ SOLARIS/LINUX/BSD endif # PLATFORM .PHONY: robot_child gtkhelper debughelper debughelper.clean java2d.clean awt.clean motif motif.clean \ diff -ruN jdk-1_5_0_11/j2se/make/sun/awt/mawt.gmk jdk-1_5_0_11.ahj14/j2se/make/sun/awt/mawt.gmk --- jdk-1_5_0_11/j2se/make/sun/awt/mawt.gmk 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/awt/mawt.gmk 2007-02-24 09:06:06.000000000 +0100 @@ -11,12 +11,14 @@ INIT += $(LIB_LOCATION) ifndef HEADLESS -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) ifeq ($(STATIC_MOTIF),false) +ifneq ($(TRUE_PLATFORM), OpenBSD) INIT += $(LIB_LOCATION)/libXm.so endif endif endif +endif # # Files @@ -39,7 +41,7 @@ ifeq ($(MOTIF_VERSION), 2) FILES_c += $(TARGDIR)awt_motif21.c FILES_c += $(TARGDIR)awt_Choice21.c - ifeq ($(PLATFORM), linux) + ifeq ($(LINUX_OR_BSD), true) FILES_c += $(TARGDIR)Xinerama.c endif endif @@ -74,7 +76,7 @@ $(LIB_LOCATION): $(MKDIR) -p $@ -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) ifeq ($(STATIC_MOTIF),false) $(LIB_LOCATION)/libXm.so: $(CP) $(MOTIF_LIB)/libXm.so $(LIB_LOCATION)/libXm.so @@ -128,7 +130,7 @@ ifeq ($(STATIC_MOTIF),true) LIBXM = $(MOTIF_LIB)/libXm.a -lXp - ifeq ($(PLATFORM), linux) + ifeq ($(LINUX_OR_BSD), true) ifeq ($(ARCH_DATA_MODEL), 64) LIBXT = -lXt else @@ -138,8 +140,12 @@ endif endif else + ifeq ($(TRUE_PLATFORM), NetBSD) + LIBXM += -Wl,-R$(MOTIF_LIB) + endif LIBXM = -L$(MOTIF_LIB) -lXm -lXp - ifeq ($(PLATFORM), linux) + + ifeq ($(LINUX_OR_BSD), true) LIBXT = -lXt LIBSM = LIBICE = @@ -148,18 +154,22 @@ LIBXTST = -lXtst -ifeq ($(VARIANT),DBG) # Use -lXmu for EditRes support +ifeq ($(VARIANT),DBG) +LIBXMU = -lXmu +else +ifeq ($(TRUE_PLATFORM), NetBSD) LIBXMU = -lXmu else LIBXMU = endif +endif ifeq ($(PLATFORM), solaris) OTHER_LDLIBS = $(LIBXM) -lXt -lXext $(LIBXTST) $(LIBXMU) -lX11 endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) OTHER_CFLAGS += -DMLIB_NO_LIBSUNMATH OTHER_CFLAGS += -DMOTIF_VERSION=2 OTHER_CFLAGS += -DXMSTRINGDEFINES=1 @@ -170,7 +180,10 @@ # !HEADLESS OTHER_LDLIBS += -lmlib_image$(SUFFIX) $(JVMLIB) $(LIBCXX) \ - -lawt$(SUFFIX) $(LIBM) -ldl + -lawt$(SUFFIX) $(LIBM) +ifneq ($(PLATFORM), bsd) +OTHER_LDLIBS += -ldl +endif # # Extra C flags. @@ -195,6 +208,9 @@ CPPFLAGS += -I$(MOTIF_DIR)/include \ -I$(OPENWIN_HOME)/include LDFLAGS += -L$(MOTIF_LIB) -L$(OPENWIN_LIB) +ifeq ($(TRUE_PLATFORM), NetBSD) +LDFLAGS += -Wl,-R$(MOTIF_LIB) -Wl,-R$(OPENWIN_LIB) +endif endif # !HEADLESS @@ -218,8 +234,8 @@ -I$(PLATFORM_SRC)/native/$(PKGDIR)/../jdga \ $(EVENT_MODEL) -ifeq ($(PLATFORM), linux) - CPPFLAGS += -I/usr/X11R6/include/X11/extensions +ifeq ($(LINUX_OR_BSD), true) + CPPFLAGS += -I/usr/X11R6/include -I/usr/X11R6/include/X11/extensions endif ifeq ($(PLATFORM), solaris) @@ -229,6 +245,10 @@ LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) \ $(AWT_RUNPATH) +ifeq ($(TRUE_PLATFORM), NetBSD) +LDFLAGS += -Wl,-R$(LIBDIR)/$(LIBARCH)/$(TSOBJDIR) +endif + CLASSES.export += java.io.InputStream \ java.lang.ThreadGroup \ diff -ruN jdk-1_5_0_11/j2se/make/sun/cmm/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/cmm/Makefile --- jdk-1_5_0_11/j2se/make/sun/cmm/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/cmm/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -46,6 +46,10 @@ LDLIBS += -lpthread endif +ifeq ($(PLATFORM), bsd) +LDLIBS += -pthread +endif + OPTIMIZED += iccprofiles DEBUG += iccprofiles clean clobber:: iccprofiles.clean diff -ruN jdk-1_5_0_11/j2se/make/sun/font/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/font/Makefile --- jdk-1_5_0_11/j2se/make/sun/font/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/font/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -117,14 +117,23 @@ CFLAGS += -xCC endif # CC_VERSION +ifeq ($(PLATFORM), bsd) + CXXFLAGS += -DNEED_BOGUS_DELETE_OPERATORS +else ifeq ($(PLATFORM), linux) CXXFLAGS += -DNEED_BOGUS_DELETE_OPERATORS else # Note that on Solaris, fontmanager is built against the headless library. LDFLAGS += -L$(LIBDIR)/$(LIBARCH)/headless endif +endif # setup the list of libraries to link in... +ifeq ($(PLATFORM), bsd) +# XXXBSD: why here? +OTHER_INCLUDES += -I/usr/X11R6/include +OTHER_LDLIBS += -lawt$(SUFFIX) $(LIBM) $(LIBCXX) +else ifeq ($(PLATFORM), linux) OTHER_LDLIBS += -lawt$(SUFFIX) $(LIBM) $(LIBCXX) ifeq ("$(CC_VER_MAJOR)", "3") @@ -133,6 +142,7 @@ else OTHER_LDLIBS += -lawt$(SUFFIX) -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt$(SUFFIX) $(LIBM) $(LIBCXX) endif +endif endif # PLATFORM diff -ruN jdk-1_5_0_11/j2se/make/sun/image/generic/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/image/generic/Makefile --- jdk-1_5_0_11/j2se/make/sun/image/generic/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/image/generic/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -61,13 +61,16 @@ -I$(PLATFORM_SRC)/native/$(PKGDIR)/medialib OTHER_CFLAGS += -D__USE_J2D_NAMES -D__MEDIALIB_OLD_NAMES -OTHER_LDLIBS = $(LIBM) -ldl +OTHER_LDLIBS = $(LIBM) +ifneq ($(PLATFORM), bsd) +OTHER_LDLIBS += -ldl ifeq ($(CC_VERSION), gcc) OTHER_LDFLAGS += --version-script mapfile.linux else OTHER_LDFLAGS += -M mapfile.solaris endif +endif # PLATFORM != bsd # # Has been converted to the JNI: generate JNI-style header files diff -ruN jdk-1_5_0_11/j2se/make/sun/jawt/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/jawt/Makefile --- jdk-1_5_0_11/j2se/make/sun/jawt/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/jawt/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -110,6 +110,10 @@ OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt$(SUFFIX) -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt$(SUFFIX) endif # PLATFORM +ifeq ($(PLATFORM), bsd) +OTHER_LDLIBS = -L$(LIBDIR)/$(LIBARCH) -lawt$(SUFFIX) -L$(LIBDIR)/$(LIBARCH)/xawt -lmawt$(SUFFIX) +endif # PLATFORM + endif # PLATFORM diff -ruN jdk-1_5_0_11/j2se/make/sun/jdbc/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/jdbc/Makefile --- jdk-1_5_0_11/j2se/make/sun/jdbc/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/jdbc/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -30,7 +30,7 @@ FILES_export = \ sun/jdbc/odbc/JdbcOdbc.java -ifeq ($(PLATFORM),linux) +ifeq ($(LINUX_OR_BSD),true) # on linux you may not have an odbc library INIT = make_libs endif @@ -56,7 +56,7 @@ endif endif -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) LDFLAGS += -L$(TMPDIR) -lodbcinst -lodbc endif @@ -84,7 +84,7 @@ # JAVAHFLAGS += -jni -ifeq ($(PLATFORM), linux) +ifeq ($(LINUX_OR_BSD), true) make_libs: $(TMPDIR)/libodbcinst.so $(TMPDIR)/libodbc.so diff -ruN jdk-1_5_0_11/j2se/make/sun/jdga/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/jdga/Makefile --- jdk-1_5_0_11/j2se/make/sun/jdga/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/jdga/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -37,4 +37,8 @@ -I$(OPENWIN_HOME)/include endif +ifneq ($(TRUE_PLATFORM), NetBSD) LDFLAGS += -L$(OPENWIN_LIB) -R$(OPENWIN_RUNTIME_LIB) +else +LDFLAGS += -L$(OPENWIN_LIB) -Wl,-R$(OPENWIN_RUNTIME_LIB) +endif diff -ruN jdk-1_5_0_11/j2se/make/sun/security/policytool/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/security/policytool/Makefile --- jdk-1_5_0_11/j2se/make/sun/security/policytool/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/security/policytool/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -29,5 +29,9 @@ # # Anything with a GUI needs X11 to be linked in. # +ifeq ($(TRUE_PLATFORM), NetBSD) +OTHER_LDLIBS += -Wl,-R$(OPENWIN_LIB) +endif OTHER_LDLIBS += -L$(OPENWIN_LIB) -lX11 + endif # PLATFORM diff -ruN jdk-1_5_0_11/j2se/make/sun/xawt/Makefile jdk-1_5_0_11.ahj14/j2se/make/sun/xawt/Makefile --- jdk-1_5_0_11/j2se/make/sun/xawt/Makefile 2007-02-19 22:56:25.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/sun/xawt/Makefile 2007-02-24 09:06:06.000000000 +0100 @@ -35,10 +35,22 @@ ifeq ($(PLATFORM), linux) FILES_c += Xinerama.c -LDFLAGS += -L$(OPENWIN_LIB) -lpthread dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) endif +ifeq ($(PLATFORM), bsd) +FILES_c += Xinerama.c +dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) +endif + +ifeq ($(TRUE_PLATFORM), NetBSD) +LDFLAGS_PLATFORM = -L$(OPENWIN_LIB) -Wl,-R$(OPENWIN_LIB) +else +LDFLAGS_PLATFORM = -L$(OPENWIN_LIB) +endif + +LDFLAGS += ${LDFLAGS_PLATFORM} + # # Rules. # @@ -66,7 +78,10 @@ vpath %.c $(SHARE_SRC)/native/sun/java2d/opengl vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl -OTHER_LDLIBS = $(LIBM) -lmlib_image$(SUFFIX) -lawt$(SUFFIX) -lXext -lX11 -ldl +OTHER_LDLIBS = $(LIBM) -lmlib_image$(SUFFIX) -lawt$(SUFFIX) -lXext -lX11 +ifneq ($(PLATFORM), bsd) +OTHER_LDLIBS += -ldl +endif ifeq ($(PLATFORM), solaris) CPPFLAGS += -xCC -DFUNCPROTO=15 @@ -101,6 +116,10 @@ CPPFLAGS += -I/usr/X11R6/include/X11/extensions -I$(MOTIF_DIR)/include -I$(OPENWIN_HOME)/include endif +ifeq ($(PLATFORM), bsd) + CPPFLAGS += -I/usr/X11R6/include/X11/extensions -I$(MOTIF_DIR)/include -I$(OPENWIN_HOME)/include +endif + ifeq ($(PLATFORM), solaris) CPPFLAGS += -I$(OPENWIN_HOME)/include/X11/extensions -I$(MOTIF_DIR)/include endif @@ -139,7 +158,7 @@ $(CP) $(ROBOT_CHILD_EXE) $(LIBDIR)/$(LIBARCH) $(ROBOT_CHILD_EXE) : $(ROBOT_CHILD_FILES_o) - $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS_COMMON) -L$(OPENWIN_LIB) \ + $(CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS_COMMON) $(LDFLAGS_PLATFORM) \ $(AWT_RUNPATH) $(OTHER_LDFLAGS) $(TARGET_ARCH) -lXt -lXext \ -lXtst -lXi -lX11 $(ROBOT_CHILD_FILES_o) -o $(ROBOT_CHILD_EXE) $(POST_PROCESS) diff -ruN jdk-1_5_0_11/j2se/make/tools/sharing/classlist.bsd jdk-1_5_0_11.ahj14/j2se/make/tools/sharing/classlist.bsd --- jdk-1_5_0_11/j2se/make/tools/sharing/classlist.bsd 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/make/tools/sharing/classlist.bsd 2007-02-24 09:06:06.000000000 +0100 @@ -0,0 +1,2341 @@ +java/lang/Object +java/io/Serializable +java/lang/Comparable +java/lang/CharSequence +java/lang/String +java/lang/reflect/GenericDeclaration +java/lang/reflect/Type +java/lang/reflect/AnnotatedElement +java/lang/Class +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/LinkageError +java/lang/NoClassDefFoundError +java/lang/ClassCastException +java/lang/ArrayStoreException +java/lang/VirtualMachineError +java/lang/OutOfMemoryError +java/lang/StackOverflowError +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/Runnable +java/lang/Thread +java/lang/Thread$UncaughtExceptionHandler +java/lang/ThreadGroup +java/util/Map +java/util/Dictionary +java/util/Hashtable +java/util/Properties +java/lang/reflect/AccessibleObject +java/lang/reflect/Member +java/lang/reflect/Field +java/lang/reflect/Method +java/lang/reflect/Constructor +sun/reflect/MagicAccessorImpl +sun/reflect/MethodAccessor +sun/reflect/MethodAccessorImpl +sun/reflect/ConstructorAccessor +sun/reflect/ConstructorAccessorImpl +sun/reflect/DelegatingClassLoader +sun/reflect/ConstantPool +java/lang/Iterable +java/util/Collection +java/util/List +java/util/RandomAccess +java/util/AbstractCollection +java/util/AbstractList +java/util/Vector +java/lang/Appendable +java/lang/AbstractStringBuilder +java/lang/StringBuffer +java/lang/StackTraceElement +java/nio/Buffer +sun/misc/AtomicLong +sun/misc/AtomicLongCSImpl +java/lang/Boolean +java/lang/Character +java/lang/Number +java/lang/Float +java/lang/Double +java/lang/Byte +java/lang/Short +java/lang/Integer +java/lang/Long +java/lang/management/MemoryUsage +java/lang/NullPointerException +java/lang/ArithmeticException +java/lang/StrictMath +java/io/ObjectStreamField +java/util/Comparator +java/lang/String$CaseInsensitiveComparator +java/security/Guard +java/security/Permission +java/security/BasicPermission +java/lang/RuntimePermission +java/util/AbstractMap +sun/misc/SoftCache +java/lang/ref/ReferenceQueue +java/lang/ref/ReferenceQueue$Null +java/lang/ref/ReferenceQueue$Lock +java/util/HashMap +java/io/ObjectStreamClass +java/security/PrivilegedAction +sun/reflect/ReflectionFactory$GetReflectionFactoryAction +java/security/AccessController +java/util/Stack +sun/reflect/ReflectionFactory +java/util/Map$Entry +java/util/HashMap$Entry +java/lang/IncompatibleClassChangeError +java/lang/NoSuchMethodError +java/lang/annotation/Annotation +java/lang/reflect/ReflectPermission +java/lang/ref/Reference$Lock +java/lang/ref/Reference$ReferenceHandler +java/lang/ref/Finalizer$FinalizerThread +java/util/Enumeration +java/util/Hashtable$EmptyEnumerator +java/util/Iterator +java/util/Hashtable$EmptyIterator +java/util/Hashtable$Entry +java/nio/charset/Charset +java/nio/charset/spi/CharsetProvider +sun/nio/cs/FastCharsetProvider +sun/nio/cs/StandardCharsets +sun/util/PreHashedMap +sun/nio/cs/StandardCharsets$Aliases +sun/nio/cs/StandardCharsets$Classes +sun/nio/cs/StandardCharsets$Cache +java/lang/ThreadLocal +java/lang/StringBuilder +sun/nio/cs/HistoricallyNamedCharset +sun/nio/cs/UTF_8 +java/lang/Class$3 +java/lang/reflect/Modifier +sun/reflect/LangReflectAccess +java/lang/reflect/ReflectAccess +java/lang/Class$1 +sun/reflect/Reflection +java/util/Collections +java/util/Random +java/util/concurrent/atomic/AtomicLong +sun/misc/Unsafe +java/util/Set +java/util/AbstractSet +java/util/Collections$EmptySet +java/util/Collections$EmptyList +java/util/Collections$EmptyMap +java/util/Collections$ReverseComparator +java/util/Collections$SynchronizedMap +sun/reflect/ReflectionFactory$1 +sun/reflect/NativeConstructorAccessorImpl +sun/reflect/DelegatingConstructorAccessorImpl +sun/misc/VM +java/lang/StringCoding +java/lang/ThreadLocal$ThreadLocalMap +java/lang/ThreadLocal$ThreadLocalMap$Entry +java/lang/StringCoding$StringDecoder +java/lang/StringCoding$CharsetSD +java/nio/charset/CharsetDecoder +sun/nio/cs/UTF_8$Decoder +java/nio/charset/CodingErrorAction +sun/nio/cs/Surrogate$Generator +sun/nio/cs/Surrogate +java/nio/charset/CoderResult +java/nio/charset/CoderResult$Cache +java/nio/charset/CoderResult$1 +java/nio/charset/CoderResult$2 +java/nio/ByteBuffer +java/nio/HeapByteBuffer +java/nio/Bits +java/nio/ByteOrder +java/lang/Readable +java/nio/CharBuffer +java/nio/HeapCharBuffer +sun/misc/Version +java/io/Closeable +java/io/InputStream +java/io/FileInputStream +java/io/FileDescriptor +java/io/Flushable +java/io/OutputStream +java/io/FileOutputStream +java/io/FilterInputStream +java/io/BufferedInputStream +java/util/concurrent/atomic/AtomicReferenceFieldUpdater +java/util/concurrent/atomic/AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl +java/io/FilterOutputStream +java/io/PrintStream +java/io/BufferedOutputStream +java/io/Writer +java/io/OutputStreamWriter +sun/nio/cs/StreamEncoder +sun/io/Converters +sun/security/action/GetPropertyAction +sun/nio/cs/StreamEncoder$CharsetSE +java/nio/charset/CharsetEncoder +sun/nio/cs/UTF_8$Encoder +sun/nio/cs/Surrogate$Parser +java/io/BufferedWriter +java/lang/Runtime +java/io/File +java/io/FileSystem +java/io/UnixFileSystem +java/io/ExpiringCache +java/util/LinkedHashMap +java/io/ExpiringCache$1 +java/util/LinkedHashMap$Entry +java/lang/ClassLoader$3 +java/lang/StringCoding$StringEncoder +java/lang/StringCoding$CharsetSE +java/io/ExpiringCache$Entry +java/lang/ClassLoader$NativeLibrary +java/lang/Terminator +sun/misc/SignalHandler +java/lang/Terminator$1 +sun/misc/Signal +sun/misc/NativeSignalHandler +sun/misc/JavaLangAccess +java/lang/System$2 +sun/misc/SharedSecrets +java/lang/Compiler +java/lang/Compiler$1 +sun/misc/Launcher +java/net/URLStreamHandlerFactory +sun/misc/Launcher$Factory +java/security/SecureClassLoader +java/net/URLClassLoader +sun/misc/Launcher$ExtClassLoader +sun/security/util/Debug +java/util/StringTokenizer +java/security/PrivilegedExceptionAction +sun/misc/Launcher$ExtClassLoader$1 +sun/net/www/ParseUtil +java/util/BitSet +java/net/URL +java/util/Locale +java/lang/CharacterDataLatin1 +java/net/Parts +java/net/URLStreamHandler +sun/net/www/protocol/file/Handler +java/util/HashSet +sun/misc/URLClassPath +java/util/ArrayList +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$Loader +sun/misc/URLClassPath$JarLoader +sun/misc/FileURLMapper +java/util/zip/ZipConstants +java/util/zip/ZipFile +java/util/jar/JarFile +sun/security/action/LoadLibraryAction +sun/misc/JavaUtilJarAccess +java/util/jar/JavaUtilJarAccessImpl +java/util/zip/ZipFile$ZipCloser +java/util/zip/ZipFile$1 +sun/nio/ch/DirectBuffer +java/nio/MappedByteBuffer +java/nio/DirectByteBuffer +sun/misc/Cleaner +sun/misc/JarIndex +sun/misc/ExtensionDependency +java/util/zip/ZipEntry +java/util/jar/JarEntry +java/util/jar/JarFile$JarFileEntry +java/io/DataInput +java/io/DataInputStream +sun/nio/ByteBuffered +java/util/zip/ZipFile$ZipFileInputStream +java/util/zip/ZipFile$MappedZipFileInputStream +java/util/zip/InflaterInputStream +java/util/zip/ZipFile$2 +java/util/zip/Inflater +java/lang/Math +java/security/PrivilegedActionException +java/lang/Shutdown +java/lang/Shutdown$Lock +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/Resource +sun/misc/URLClassPath$JarLoader$1 +java/lang/Package +sun/security/util/ManifestEntryVerifier +java/security/Provider +sun/security/provider/Sun +java/security/Provider$ServiceKey +sun/security/provider/Sun$1 +java/security/Security +java/security/Security$1 +java/util/Properties$LineReader +java/util/concurrent/ConcurrentMap +java/util/concurrent/ConcurrentHashMap +java/util/concurrent/locks/Lock +java/util/concurrent/locks/ReentrantLock +java/util/concurrent/ConcurrentHashMap$Segment +java/util/concurrent/locks/AbstractQueuedSynchronizer +java/util/concurrent/locks/ReentrantLock$Sync +java/util/concurrent/locks/ReentrantLock$NonfairSync +java/util/concurrent/locks/AbstractQueuedSynchronizer$Node +java/util/concurrent/ConcurrentHashMap$HashEntry +sun/misc/FloatingDecimal +sun/misc/FloatingDecimal$1 +java/util/regex/Pattern +java/util/regex/Pattern$Node +java/util/regex/Pattern$LastNode +java/util/regex/Pattern$GroupHead +java/util/regex/Pattern$GroupTail +java/util/regex/Pattern$BitClass +java/util/regex/Pattern$Ques +java/util/regex/Pattern$Dummy +java/util/regex/Pattern$Branch +java/util/regex/Pattern$Single +java/util/regex/Pattern$categoryNames +java/util/regex/Pattern$Category +java/util/regex/Pattern$Range +java/util/regex/Pattern$All +java/util/regex/Pattern$Ctype +java/util/regex/Pattern$JavaTypeClass +java/util/regex/Pattern$JavaLowerCase +java/util/regex/Pattern$JavaUpperCase +java/util/regex/Pattern$JavaTitleCase +java/util/regex/Pattern$JavaDigit +java/util/regex/Pattern$JavaDefined +java/util/regex/Pattern$JavaLetter +java/util/regex/Pattern$JavaLetterOrDigit +java/util/regex/Pattern$JavaJavaIdentifierStart +java/util/regex/Pattern$JavaJavaIdentifierPart +java/util/regex/Pattern$JavaUnicodeIdentifierStart +java/util/regex/Pattern$JavaUnicodeIdentifierPart +java/util/regex/Pattern$JavaIdentifierIgnorable +java/util/regex/Pattern$JavaSpaceChar +java/util/regex/Pattern$JavaWhitespace +java/util/regex/Pattern$JavaISOControl +java/util/regex/Pattern$JavaMirrored +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/security/SecureRandomSpi +sun/security/provider/NativePRNG +sun/security/provider/NativePRNG$1 +sun/security/provider/NativePRNG$RandomIO +java/io/IOException +java/io/FileNotFoundException +sun/misc/CharacterDecoder +sun/misc/BASE64Decoder +sun/security/util/SignatureFileVerifier +java/security/CodeSource +java/security/PermissionCollection +java/security/Permissions +java/net/URLConnection +sun/net/www/URLConnection +sun/net/www/protocol/file/FileURLConnection +java/net/ContentHandler +java/net/UnknownContentHandler +sun/net/www/MessageHeader +java/io/FilePermission +java/io/FilePermission$1 +java/io/FilePermissionCollection +java/security/AllPermission +java/security/UnresolvedPermission +java/security/BasicPermissionCollection +java/security/Principal +java/security/cert/Certificate +java/io/Reader +java/io/InputStreamReader +java/io/BufferedReader +javax/swing/plaf/metal/MetalTheme +javax/swing/plaf/metal/DefaultMetalTheme +java/util/EventListener +java/awt/event/KeyListener +java/awt/event/KeyAdapter +java/io/FileReader +java/awt/image/ImageObserver +java/awt/MenuContainer +java/awt/Component +javax/swing/WindowConstants +javax/accessibility/Accessible +javax/swing/RootPaneContainer +java/awt/Container +java/awt/Window +java/awt/Frame +javax/swing/JFrame +javax/swing/JComponent +java/lang/IllegalArgumentException +java/lang/NumberFormatException +java/io/FileWriter +java/net/Authenticator +java/net/MalformedURLException +javax/swing/text/Element +javax/swing/text/Document +javax/swing/text/AbstractDocument +javax/swing/text/PlainDocument +javax/swing/text/AbstractDocument$Content +javax/swing/text/GapVector +javax/swing/text/GapContent +javax/swing/text/GapContent$MarkVector +javax/swing/text/GapContent$MarkData +javax/swing/text/AbstractDocument$AttributeContext +javax/swing/text/StyleContext +javax/swing/text/StyleConstants +javax/swing/text/AttributeSet$CharacterAttribute +javax/swing/text/StyleConstants$CharacterConstants +javax/swing/text/AttributeSet$FontAttribute +javax/swing/text/StyleConstants$FontConstants +javax/swing/text/AttributeSet$ColorAttribute +javax/swing/text/StyleConstants$ColorConstants +javax/swing/text/AttributeSet$ParagraphAttribute +javax/swing/text/StyleConstants$ParagraphConstants +javax/swing/text/StyleContext$FontKey +java/util/WeakHashMap +java/util/WeakHashMap$Entry +javax/swing/text/AttributeSet +javax/swing/text/MutableAttributeSet +javax/swing/text/SimpleAttributeSet +javax/swing/text/SimpleAttributeSet$EmptyAttributeSet +javax/swing/text/Style +javax/swing/text/StyleContext$NamedStyle +javax/swing/event/EventListenerList +javax/swing/text/SimpleAttributeSet$1 +javax/swing/SwingConstants +javax/swing/SwingUtilities +java/awt/EventQueue +sun/awt/DebugHelper +sun/awt/NativeLibLoader +java/awt/GraphicsEnvironment +java/awt/GraphicsEnvironment$1 +java/lang/ProcessEnvironment +java/lang/ProcessEnvironment$ExternalData +java/lang/ProcessEnvironment$Variable +java/lang/ProcessEnvironment$Value +java/lang/ProcessEnvironment$StringEnvironment +java/util/Collections$UnmodifiableMap +sun/awt/DebugHelperStub +java/awt/Toolkit +java/awt/Toolkit$3 +java/util/ResourceBundle +java/util/ResourceBundle$ResourceCacheKey +java/util/ResourceBundle$LoaderReference +sun/misc/SoftCache$ValueCell +java/util/ListResourceBundle +sun/awt/resources/awt +java/util/ResourceBundle$1 +sun/misc/Launcher$1 +java/net/URLClassLoader$2 +java/awt/Toolkit$1 +java/awt/Toolkit$2 +sun/awt/X11/XConstants +sun/awt/WindowClosingSupport +sun/awt/WindowClosingListener +sun/awt/ComponentFactory +sun/awt/InputMethodSupport +sun/awt/SunToolkit +sun/awt/UNIXToolkit +sun/awt/X11/XToolkit +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/lang/Shutdown$WrappedHook +java/util/logging/LogManager$RootLogger +java/util/logging/LogManager$2 +java/util/Hashtable$Enumerator +java/util/EventObject +java/beans/PropertyChangeEvent +sun/awt/AWTAutoShutdown +sun/awt/AWTAutoShutdown$PeerMap +java/awt/FontMetrics +java/util/regex/Pattern$Add +java/util/SortedMap +java/util/TreeMap +sun/awt/X11/XUtilConstants +sun/awt/X11/XProtocolConstants +sun/awt/X11/XCursorFontConstants +sun/awt/X11/XlibWrapper +sun/awt/X11/XlibWrapper$1 +sun/awt/X11/XToolkit$4 +sun/java2d/FontSupport +sun/java2d/SunGraphicsEnvironment +sun/awt/X11GraphicsEnvironment +java/io/FilenameFilter +sun/java2d/SunGraphicsEnvironment$TTFilter +sun/java2d/SunGraphicsEnvironment$T1Filter +sun/awt/X11GraphicsEnvironment$1 +sun/java2d/SunGraphicsEnvironment$1 +sun/nio/cs/StreamDecoder +sun/nio/cs/StreamDecoder$CharsetSD +java/io/StreamTokenizer +java/lang/reflect/Array +sun/font/FontManager +sun/font/Font2D +sun/font/PhysicalFont +sun/font/FileFont +sun/font/CompositeFont +sun/font/FontManager$1 +java/awt/Font +java/awt/font/TransformAttribute +java/awt/geom/AffineTransform +sun/font/TrueTypeFont +java/awt/font/FontRenderContext +sun/font/Type1Font +java/awt/geom/Point2D +java/awt/geom/Point2D$Float +sun/font/StrikeMetrics +java/awt/Shape +java/awt/geom/RectangularShape +java/awt/geom/Rectangle2D +java/awt/geom/Rectangle2D$Float +java/awt/geom/GeneralPath +sun/font/CharToGlyphMapper +sun/font/FontStrike +sun/font/PhysicalStrike +sun/font/GlyphList +sun/font/StrikeCache +sun/java2d/Disposer +sun/font/StrikeCache$1 +sun/font/FontManager$FontRegistrationInfo +sun/awt/FontConfiguration +sun/awt/motif/MFontConfiguration +sun/awt/FontDescriptor +java/lang/Integer$IntegerCache +java/lang/Short$ShortCache +java/util/HashMap$KeySet +java/util/HashMap$HashIterator +java/util/HashMap$KeyIterator +sun/font/CompositeFontDescriptor +sun/font/Font2DHandle +sun/font/FontFamily +java/awt/GraphicsDevice +sun/awt/X11GraphicsDevice +java/awt/GraphicsConfiguration +sun/awt/X11GraphicsConfig +sun/java2d/opengl/GLXGraphicsConfig +java/awt/ImageCapabilities +sun/java2d/opengl/GLXGraphicsConfig$2 +sun/awt/X11/XWrapperBase +sun/awt/X11/XModifierKeymap +sun/awt/X11/Native +sun/awt/X11/Native$1 +sun/awt/X11/XToolkit$7 +java/util/EmptyStackException +java/awt/AWTEvent +java/lang/InterruptedException +java/lang/reflect/InvocationTargetException +java/awt/EventDispatchThread +sun/awt/X11/XToolkit$XErrorHandler +sun/awt/X11/XToolkit$1 +sun/awt/X11/XEventDispatcher +sun/awt/X11/XToolkit$5 +sun/awt/SunToolkit$1 +java/util/MissingResourceException +java/awt/Queue +sun/awt/AppContext +sun/awt/AppContext$1 +sun/awt/AppContext$2 +sun/awt/PostEventQueue +java/lang/Enum +sun/awt/UNIXToolkit$GTKLoadStatus +sun/misc/PerformanceLogger +sun/misc/PerformanceLogger$TimeData +sun/awt/X11/AwtScreenData +sun/awt/X11/MWMConstants +sun/awt/X11/XWM +sun/awt/X11/XAtom +java/awt/Insets +sun/awt/X11/XWM$1 +sun/awt/X11/XWM$2 +sun/awt/X11/XSetWindowAttributes +sun/awt/X11/XErrorEvent +sun/awt/X11/XStateProtocol +sun/awt/X11/XLayerProtocol +sun/awt/X11/XModalityProtocol +sun/awt/X11/XProtocol +sun/awt/X11/XNETProtocol +sun/awt/X11/XProtocol$1 +sun/awt/X11/XTransientForModality +sun/awt/X11/XMWMModality +sun/awt/X11/WindowPropertyGetter +sun/awt/X11/XWINProtocol +sun/awt/X11/XAtomList +java/util/Queue +java/util/AbstractSequentialList +java/util/LinkedList +java/util/LinkedList$Entry +sun/awt/X11/XToolkit$3 +sun/awt/MostRecentKeyValue +javax/swing/text/StyleContext$SmallAttributeSet +javax/swing/tree/TreeNode +javax/swing/text/AbstractDocument$AbstractElement +javax/swing/text/AbstractDocument$BranchElement +javax/swing/text/AbstractDocument$BidiRootElement +javax/swing/text/AbstractDocument$1 +java/text/AttributedCharacterIterator$Attribute +java/awt/font/TextAttribute +javax/swing/text/AbstractDocument$LeafElement +javax/swing/text/AbstractDocument$BidiElement +javax/swing/text/Position +javax/swing/text/GapContent$StickyPosition +javax/swing/text/StyleContext$KeyEnumeration +javax/swing/undo/UndoableEdit +javax/swing/undo/AbstractUndoableEdit +javax/swing/text/GapContent$InsertUndo +javax/swing/event/DocumentEvent +javax/swing/undo/CompoundEdit +javax/swing/text/AbstractDocument$DefaultDocumentEvent +javax/swing/event/DocumentEvent$EventType +java/text/Bidi +sun/text/CodePointIterator +sun/text/CharArrayCodePointIterator +java/awt/Transparency +java/awt/Paint +java/awt/Color +java/awt/SystemColor +sun/awt/X11/MotifColorUtilities +javax/swing/LookAndFeel +javax/swing/plaf/basic/BasicLookAndFeel +com/sun/java/swing/plaf/motif/MotifLookAndFeel +sun/awt/X11/XAWTLookAndFeel +java/beans/PropertyChangeListener +java/awt/Image +java/awt/image/ImageProducer +java/awt/image/ColorModel +java/lang/UnsupportedOperationException +java/awt/HeadlessException +java/awt/geom/Dimension2D +java/awt/Dimension +java/awt/event/AWTEventListener +java/awt/Point +java/awt/Cursor +java/lang/IndexOutOfBoundsException +java/awt/dnd/DragSource +java/awt/dnd/DragGestureListener +java/awt/dnd/DragGestureRecognizer +java/awt/dnd/DragGestureEvent +java/awt/dnd/peer/DragSourceContextPeer +java/lang/IllegalStateException +java/awt/dnd/InvalidDnDOperationException +java/awt/PrintJob +java/awt/JobAttributes +java/awt/PageAttributes +java/awt/datatransfer/Clipboard +java/awt/im/InputMethodHighlight +javax/swing/UIDefaults +sun/reflect/UnsafeFieldAccessorFactory +sun/reflect/FieldAccessor +sun/reflect/FieldAccessorImpl +sun/reflect/UnsafeFieldAccessorImpl +sun/reflect/UnsafeStaticFieldAccessorImpl +sun/reflect/UnsafeQualifiedStaticFieldAccessorImpl +sun/reflect/UnsafeQualifiedStaticObjectFieldAccessorImpl +javax/swing/plaf/UIResource +javax/swing/plaf/ColorUIResource +java/lang/NoSuchFieldException +javax/swing/UIDefaults$LazyValue +sun/swing/SwingLazyValue +javax/swing/UIDefaults$ActiveValue +javax/swing/plaf/InsetsUIResource +javax/swing/LookAndFeel$1 +javax/swing/plaf/basic/BasicLookAndFeel$1 +javax/swing/plaf/DimensionUIResource +javax/swing/UIDefaults$LazyInputMap +javax/swing/plaf/FontUIResource +javax/swing/border/Border +javax/swing/border/AbstractBorder +com/sun/java/swing/plaf/motif/MotifBorders$BevelBorder +javax/swing/UIManager +javax/swing/UIManager$LookAndFeelInfo +javax/swing/UIManager$LAFState +javax/swing/MultiUIDefaults +javax/swing/UIManager$1 +javax/swing/plaf/metal/MetalLookAndFeel +sun/swing/DefaultLookup +javax/swing/plaf/metal/OceanTheme +javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate +java/text/CharacterIterator +javax/swing/text/Segment +javax/swing/text/Utilities +javax/swing/text/SegmentCache +javax/swing/text/SegmentCache$CachedSegment +javax/swing/event/UndoableEditEvent +javax/swing/event/DocumentEvent$ElementChange +javax/swing/text/AbstractDocument$ElementEdit +javax/swing/plaf/metal/MetalLookAndFeel$MetalLazyValue +javax/swing/plaf/metal/MetalLookAndFeel$FontActiveValue +javax/swing/UIDefaults$ProxyLazyValue +java/util/Arrays +java/util/Arrays$ArrayList +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 +java/awt/KeyEventDispatcher +java/awt/KeyEventPostProcessor +java/awt/KeyboardFocusManager +java/awt/AWTKeyStroke +java/awt/AWTKeyStroke$1 +java/awt/DefaultKeyboardFocusManager +java/awt/FocusTraversalPolicy +java/awt/ContainerOrderFocusTraversalPolicy +java/awt/DefaultFocusTraversalPolicy +java/awt/MutableBoolean +java/util/Collections$UnmodifiableCollection +java/util/Collections$UnmodifiableSet +sun/awt/HeadlessToolkit +java/awt/peer/KeyboardFocusManagerPeer +sun/awt/X11/XKeyboardFocusManagerPeer +sun/awt/X11/XKeyboardFocusManagerPeer$1 +javax/swing/UIManager$2 +javax/swing/plaf/basic/BasicBorders$MarginBorder +com/sun/java/swing/plaf/motif/MotifBorders$FocusBorder +javax/swing/border/CompoundBorder +javax/swing/plaf/BorderUIResource$CompoundBorderUIResource +com/sun/java/swing/plaf/motif/MotifBorders$ButtonBorder +com/sun/java/swing/plaf/motif/MotifBorders$ToggleButtonBorder +com/sun/java/swing/plaf/motif/MotifBorders$MotifPopupMenuBorder +com/sun/java/swing/plaf/motif/MotifLookAndFeel$1 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$2 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$3 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$4 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$5 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$6 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$7 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$8 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$9 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$10 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$11 +com/sun/java/swing/plaf/motif/MotifLookAndFeel$12 +com/sun/java/swing/plaf/motif/MotifBorders$MenuBarBorder +com/sun/java/swing/plaf/motif/resources/motif +java/util/ResourceBundleEnumeration +com/sun/swing/internal/plaf/basic/resources/basic +javax/swing/border/LineBorder +javax/swing/plaf/BorderUIResource$LineBorderUIResource +javax/swing/border/EmptyBorder +javax/swing/plaf/BorderUIResource$EmptyBorderUIResource +sun/awt/X11/XAWTLookAndFeel$1 +sun/awt/X11/XAWTLookAndFeel$2 +sun/awt/X11/XAWTLookAndFeel$3 +sun/awt/X11/XAWTLookAndFeel$4 +sun/awt/X11/XAWTLookAndFeel$5 +sun/awt/X11/XAWTLookAndFeel$6 +sun/awt/X11/XAWTLookAndFeel$7 +sun/awt/X11/XAWTLookAndFeel$8 +sun/awt/X11/XAWTLookAndFeel$9 +sun/awt/X11/XAWTLookAndFeel$10 +sun/awt/X11/XAWTLookAndFeel$11 +sun/awt/X11/XAWTLookAndFeel$12 +java/net/Socket +java/net/InetAddress +sun/security/action/GetBooleanAction +sun/awt/X11/IXAnyEvent +sun/awt/X11/XAnyEvent +java/net/InetAddress$Cache +sun/net/InetAddressCachePolicy +sun/net/InetAddressCachePolicy$1 +sun/security/action/GetIntegerAction +sun/net/InetAddressCachePolicy$2 +java/net/InetAddressImplFactory +java/net/InetAddressImpl +java/net/Inet4AddressImpl +sun/net/spi/nameservice/NameService +java/net/InetAddress$1 +sun/net/util/IPAddressUtil +java/util/regex/MatchResult +java/util/regex/Matcher +java/util/SubList +java/util/RandomAccessSubList +java/util/ListIterator +java/util/SubList$1 +java/util/AbstractList$Itr +java/util/AbstractList$ListItr +java/net/Inet4Address +java/net/SocketAddress +java/net/InetSocketAddress +java/net/SocksConsts +java/net/SocketOptions +java/net/SocketImpl +java/net/PlainSocketImpl +java/net/SocksSocketImpl +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/util/regex/ASCII +java/util/regex/Pattern$GroupCurly +java/net/InetAddress$CacheEntry +java/net/Inet6Address +java/net/URI +java/net/URI$Parser +sun/net/spi/DefaultProxySelector$2 +java/net/Proxy +java/net/Proxy$Type +java/net/ConnectException +javax/swing/MenuElement +java/awt/ItemSelectable +javax/swing/AbstractButton +javax/swing/JMenuItem +javax/swing/JMenu +javax/swing/event/MenuListener +java/awt/LayoutManager +javax/swing/JLabel +javax/swing/JPanel +javax/swing/JCheckBoxMenuItem +javax/swing/Icon +javax/swing/JButton +java/awt/event/WindowListener +javax/swing/ImageIcon +javax/swing/ImageIcon$1 +java/awt/Component$AWTTreeLock +java/awt/event/ComponentEvent +java/awt/event/InputEvent +java/awt/event/KeyEvent +java/awt/event/NativeLibLoader +java/awt/ComponentOrientation +java/awt/MediaTracker +sun/awt/image/ImageFetchable +sun/awt/image/InputStreamImageSource +sun/awt/image/URLImageSource +sun/awt/image/ToolkitImage +sun/awt/image/NativeLibLoader +java/awt/MediaEntry +java/awt/ImageMediaEntry +java/awt/image/ImageConsumer +sun/awt/image/ImageWatched +sun/awt/image/ImageRepresentation +sun/awt/image/ImageWatched$Link +java/awt/image/PackedColorModel +java/awt/image/DirectColorModel +java/awt/color/ColorSpace +java/awt/color/ICC_Profile +sun/awt/color/ProfileDeferralInfo +sun/awt/color/ProfileDeferralMgr +java/awt/color/ICC_ProfileRGB +sun/awt/color/ProfileActivator +java/awt/color/ICC_Profile$1 +java/awt/color/ICC_ColorSpace +java/awt/image/IndexColorModel +sun/awt/image/ImageWatched$WeakLink +sun/awt/image/ImageConsumerQueue +sun/awt/image/ImageFetcher +sun/awt/image/FetcherInfo +sun/awt/image/ImageFetcher$1 +java/net/JarURLConnection +sun/net/www/protocol/jar/JarURLConnection +sun/net/www/protocol/jar/JarFileFactory +sun/net/www/protocol/jar/URLJarFile +sun/net/www/protocol/jar/URLJarFile$URLJarFileEntry +sun/awt/image/ImageDecoder +sun/awt/image/GifImageDecoder +sun/awt/image/GifFrame +java/awt/image/Raster +java/awt/image/DataBuffer +java/awt/image/DataBufferByte +java/awt/image/SampleModel +java/awt/image/ComponentSampleModel +java/awt/image/PixelInterleavedSampleModel +java/awt/image/WritableRaster +sun/awt/image/SunWritableRaster +sun/awt/image/ByteComponentRaster +sun/awt/image/ByteInterleavedRaster +java/awt/Rectangle +java/awt/image/RenderedImage +java/awt/image/WritableRenderedImage +java/awt/image/BufferedImage +sun/awt/image/IntegerComponentRaster +sun/awt/image/BytePackedRaster +java/awt/Canvas +sun/font/FontDesignMetrics +sun/font/FontStrikeDesc +sun/font/CompositeStrike +sun/java2d/DisposerRecord +sun/font/FontStrikeDisposer +sun/font/StrikeCache$DisposableStrike +sun/font/StrikeCache$SoftDisposerRef +sun/font/TrueTypeFont$TTDisposerRecord +sun/font/TrueTypeFont$1 +java/io/DataOutput +java/io/RandomAccessFile +java/nio/channels/Channel +java/nio/channels/ReadableByteChannel +java/nio/channels/WritableByteChannel +java/nio/channels/ByteChannel +java/nio/channels/GatheringByteChannel +java/nio/channels/ScatteringByteChannel +java/nio/channels/InterruptibleChannel +java/nio/channels/spi/AbstractInterruptibleChannel +java/nio/channels/FileChannel +sun/nio/ch/FileChannelImpl +java/nio/channels/spi/AbstractInterruptibleChannel$FooChannel +sun/nio/ch/Interruptible +java/nio/channels/spi/AbstractInterruptibleChannel$1 +java/nio/channels/spi/AbstractInterruptibleChannel$2 +java/lang/Thread$State +sun/reflect/NativeMethodAccessorImpl +sun/reflect/DelegatingMethodAccessorImpl +sun/nio/ch/Util +sun/nio/ch/IOUtil +sun/nio/ch/NativeDispatcher +sun/nio/ch/FileDispatcher +sun/nio/ch/Reflect +sun/nio/ch/Reflect$1 +sun/nio/ch/NativeThreadSet +sun/nio/ch/NativeThread +sun/nio/ch/IOStatus +java/nio/DirectByteBuffer$Deallocator +sun/reflect/ClassFileConstants +sun/reflect/AccessorGenerator +sun/reflect/MethodAccessorGenerator +sun/reflect/ByteVectorFactory +sun/reflect/ByteVector +sun/reflect/ByteVectorImpl +sun/reflect/ClassFileAssembler +sun/reflect/UTF8 +java/lang/Void +sun/reflect/Label +sun/reflect/Label$PatchInfo +sun/reflect/MethodAccessorGenerator$1 +sun/reflect/ClassDefiner +sun/reflect/ClassDefiner$1 +java/nio/IntBuffer +java/nio/ByteBufferAsIntBufferB +sun/font/TrueTypeFont$DirectoryEntry +java/nio/ShortBuffer +java/nio/ByteBufferAsShortBufferB +sun/nio/cs/UTF_16 +sun/nio/cs/UnicodeDecoder +sun/nio/cs/UTF_16$Decoder +sun/font/FileFontStrike +sun/font/FileFont$FileFontDisposer +sun/font/TrueTypeGlyphMapper +sun/font/CMap +sun/font/CMap$NullCMapClass +sun/font/CMap$CMapFormat4 +java/nio/ByteBufferAsCharBufferB +sun/awt/image/PNGImageDecoder +sun/awt/image/PNGFilterInputStream +java/awt/LightweightDispatcher +java/awt/LayoutManager2 +java/awt/BorderLayout +java/awt/peer/ComponentPeer +java/awt/peer/ContainerPeer +java/awt/peer/WindowPeer +java/awt/peer/FramePeer +sun/awt/DisplayChangedListener +java/awt/peer/PanelPeer +java/awt/peer/CanvasPeer +java/awt/dnd/peer/DropTargetPeer +sun/awt/X11ComponentPeer +sun/awt/X11/XBaseWindow +sun/awt/X11/XWindow +sun/awt/X11/XComponentPeer +sun/awt/X11/XCanvasPeer +sun/awt/X11/XPanelPeer +sun/awt/X11/XWindowPeer +sun/awt/X11/XDecoratedPeer +sun/awt/X11/XFramePeer +sun/awt/X11/ComponentAccessor +sun/awt/X11/ComponentAccessor$1 +java/awt/image/BufferStrategy +java/awt/dnd/DropTargetListener +java/awt/dnd/DropTarget +java/awt/event/ComponentListener +java/awt/event/FocusListener +java/awt/event/HierarchyListener +java/awt/event/HierarchyBoundsListener +java/awt/event/MouseListener +java/awt/event/MouseMotionListener +java/awt/event/MouseWheelListener +java/awt/event/InputMethodListener +java/awt/event/ContainerListener +java/awt/Component$NativeInLightFixer +javax/accessibility/AccessibleContext +java/awt/MenuComponent +java/awt/MenuItem +java/awt/Menu +java/awt/PopupMenu +java/io/ObjectOutput +java/io/ObjectStreamConstants +java/io/ObjectOutputStream +java/io/PrintWriter +java/awt/Graphics +java/io/ObjectInput +java/io/ObjectInputStream +java/awt/Event +java/awt/event/MouseEvent +java/awt/event/MouseWheelEvent +java/awt/BufferCapabilities +java/awt/AWTException +java/awt/image/VolatileImage +java/awt/PointerInfo +javax/accessibility/AccessibleStateSet +java/awt/im/InputContext +java/awt/im/InputMethodRequests +java/awt/event/FocusEvent +java/awt/event/HierarchyEvent +java/awt/event/InputMethodEvent +sun/reflect/UnsafeStaticObjectFieldAccessorImpl +java/util/HashMap$Values +java/util/HashMap$ValueIterator +sun/awt/X11/XCreateWindowParams +sun/awt/X11/XBaseWindow$StateLock +sun/awt/X11/AwtGraphicsConfigData +sun/awt/X11/XVisualInfo +sun/awt/RepaintArea +sun/awt/X11/XRepaintArea +sun/awt/X11/XWindowAttributesData +sun/awt/X11/WindowDimensions +java/util/TreeMap$Entry +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/DisposerTarget +sun/java2d/SurfaceData +sun/awt/X11SurfaceData +sun/java2d/InvalidPipeException +sun/java2d/NullSurfaceData +sun/java2d/loops/SurfaceType +sun/awt/image/PixelConverter +sun/awt/X11/XDropTargetEventProcessor +sun/awt/X11/XDragSourceProtocolListener +sun/awt/dnd/SunDragSourceContextPeer +sun/awt/X11/XDragSourceContextPeer +sun/awt/X11/XAwtState +sun/awt/X11/XPropertyEvent +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 +sun/java2d/pipe/PixelDrawPipe +sun/java2d/pipe/PixelFillPipe +sun/java2d/pipe/ShapeDrawPipe +sun/java2d/pipe/TextPipe +sun/java2d/pipe/DrawImagePipe +sun/java2d/pipe/NullPipe +sun/java2d/pipe/Region +sun/java2d/pipe/LoopPipe +sun/java2d/pipe/OutlineTextRenderer +sun/java2d/pipe/GlyphListPipe +sun/java2d/pipe/SolidTextRenderer +sun/java2d/pipe/AATextRenderer +sun/java2d/pipe/CompositePipe +sun/java2d/pipe/AlphaColorPipe +sun/java2d/pipe/PixelToShapeConverter +sun/java2d/pipe/TextRenderer +sun/java2d/pipe/SpanClipRenderer +sun/java2d/pipe/RegionIterator +sun/java2d/pipe/DuctusRenderer +sun/java2d/pipe/DuctusShapeRenderer +sun/java2d/pipe/AlphaPaintPipe +sun/java2d/pipe/SpanShapeRenderer +sun/java2d/pipe/SpanShapeRenderer$Composite +sun/java2d/pipe/GeneralCompositePipe +sun/java2d/pipe/DrawImage +sun/java2d/loops/RenderCache +sun/java2d/loops/RenderCache$Entry +java/awt/Composite +sun/java2d/loops/XORComposite +sun/font/X11TextRenderer +sun/java2d/loops/GraphicsPrimitive +sun/java2d/loops/Blit +sun/awt/X11PMBlitLoops +sun/java2d/loops/GraphicsPrimitiveMgr +sun/java2d/loops/CompositeType +sun/awt/ConstrainableGraphics +java/awt/Graphics2D +sun/java2d/SunGraphics2D +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/MaskBlit +sun/java2d/loops/MaskFill +sun/java2d/loops/DrawGlyphList +sun/java2d/loops/DrawGlyphListAA +java/awt/Stroke +java/awt/BasicStroke +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/awt/X11PMBlitLoops$DelegateBlitLoop +sun/awt/X11PMBlitBgLoops +sun/awt/X11SurfaceData$LazyPipe +sun/awt/X11SurfaceData$X11WindowSurfaceData +sun/java2d/loops/RenderLoops +sun/java2d/loops/GraphicsPrimitiveMgr$PrimitiveSpec +sun/java2d/DefaultDisposerRecord +sun/awt/X11Renderer +sun/awt/GlobalCursorManager +sun/awt/X11/XGlobalCursorManager +sun/awt/X11/XToolkit$6 +sun/reflect/UnsafeLongFieldAccessorImpl +sun/reflect/UnsafeIntegerFieldAccessorImpl +sun/awt/X11/XSizeHints +sun/awt/X11/XContentWindow +sun/awt/X11/XWMHints +java/util/LinkedList$ListItr +sun/awt/SunToolkit$2 +java/awt/peer/MenuComponentPeer +sun/reflect/UnsafeObjectFieldAccessorImpl +java/awt/peer/LightweightPeer +sun/awt/X11/XQueryTree +java/awt/Dialog +sun/awt/GlobalCursorManager$NativeUpdater +sun/awt/X11/XMapEvent +sun/awt/X11/XConfigureEvent +sun/awt/X11/XClientMessageEvent +sun/awt/X11/XExposeEvent +sun/reflect/UnsafeBooleanFieldAccessorImpl +java/awt/event/PaintEvent +sun/awt/EventQueueItem +sun/awt/SunToolkit$3 +java/util/Date +sun/util/calendar/CalendarSystem +sun/util/calendar/AbstractCalendar +sun/util/calendar/BaseCalendar +sun/util/calendar/Gregorian +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/CalendarDate +sun/util/calendar/BaseCalendar$Date +sun/util/calendar/Gregorian$Date +sun/util/calendar/CalendarUtils +java/text/DateFormatSymbols +sun/text/resources/LocaleData +sun/text/resources/LocaleData$1 +sun/text/resources/LocaleElements +sun/text/resources/LocaleElements_en +sun/text/resources/LocaleElements_en_US +sun/text/resources/DateFormatZoneData +sun/text/resources/DateFormatZoneData_en +java/util/Vector$1 +sun/text/resources/DateFormatZoneData$1 +java/awt/EventQueue$1 +java/awt/Conditional +java/awt/EventDispatchThread$1 +java/awt/ActiveEvent +java/awt/event/InvocationEvent +sun/awt/PeerEvent +java/awt/EventQueueItem +java/awt/event/ActionEvent +sun/awt/dnd/SunDropTargetEvent +java/awt/image/DataBufferInt +java/awt/image/SinglePixelPackedSampleModel +sun/awt/image/IntegerInterleavedRaster +sun/awt/image/Manageable +sun/awt/image/OffScreenImage +sun/awt/image/RemoteOffScreenImage +sun/awt/motif/X11RemoteOffScreenImage +sun/awt/image/RasterListener +sun/awt/image/SurfaceManager +sun/awt/image/CachingSurfaceManager +sun/awt/motif/X11CachingSurfaceManager +sun/awt/motif/X11RemoteOffScreenImage$X11RemoteSurfaceManager +sun/awt/image/BufImgSurfaceData +sun/awt/X11SurfaceData$X11PixmapSurfaceData +sun/awt/image/WritableRasterNative +sun/awt/image/DataBufferNative +sun/java2d/SurfaceManagerFactory +sun/java2d/opengl/OGLSurfaceData +sun/java2d/opengl/GLXSurfaceData +sun/font/CompositeGlyphMapper +sun/java2d/loops/FontInfo +java/lang/ProcessBuilder +java/lang/ProcessImpl +java/lang/Process +java/lang/UNIXProcess +java/lang/UNIXProcess$Gate +java/lang/UNIXProcess$1 +java/lang/UNIXProcess$1$1 +java/lang/UNIXProcess$1$1$1 +java/net/ServerSocket +java/lang/InternalError +java/io/StringReader +java/lang/SecurityException +java/io/FilterReader +java/lang/reflect/Proxy +java/lang/reflect/InvocationHandler +java/lang/NoSuchMethodException +java/lang/IllegalAccessException +java/lang/InstantiationException +java/lang/ArrayIndexOutOfBoundsException +javax/swing/plaf/metal/DefaultMetalTheme$FontDelegate$1 +com/sun/swing/internal/plaf/metal/resources/metal +javax/swing/JDialog +javax/swing/InternalFrameFocusTraversalPolicy +javax/swing/SortingFocusTraversalPolicy +javax/swing/LayoutFocusTraversalPolicy +javax/swing/SwingContainerOrderFocusTraversalPolicy +javax/swing/SwingDefaultFocusTraversalPolicy +javax/swing/LayoutComparator +sun/awt/datatransfer/SunClipboard +sun/awt/X11/XClipboard +java/awt/datatransfer/FlavorMap +java/awt/datatransfer/FlavorTable +java/awt/datatransfer/SystemFlavorMap +java/awt/datatransfer/SystemFlavorMap$1 +sun/net/ProgressMonitor +sun/net/ProgressMeteringPolicy +sun/net/DefaultProgressMeteringPolicy +java/awt/datatransfer/SystemFlavorMap$2 +java/io/Externalizable +java/awt/datatransfer/MimeType +java/awt/datatransfer/MimeTypeParameterList +sun/awt/datatransfer/DataTransferer +java/util/Collections$SynchronizedCollection +java/util/Collections$SynchronizedSet +java/awt/datatransfer/DataFlavor +java/awt/datatransfer/DataFlavor$1 +sun/awt/datatransfer/DataTransferer$IndexedComparator +sun/awt/datatransfer/DataTransferer$CharsetComparator +sun/io/CharacterEncoding +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/awt/X11/XSelection$IncrementalTransferHandler +sun/awt/X11/XSelection$SelectionEventHandler +java/awt/datatransfer/Transferable +java/io/EOFException +javax/swing/JRootPane +java/util/zip/ZipFile$3 +java/util/jar/JarFile$1 +java/util/PropertyResourceBundle +java/util/Hashtable$EntrySet +java/lang/IllegalAccessError +java/util/LinkedHashMap$LinkedHashIterator +java/util/LinkedHashMap$KeyIterator +java/text/Format +java/text/MessageFormat +java/text/FieldPosition +java/text/Format$Field +java/text/MessageFormat$Field +java/lang/CloneNotSupportedException +sun/reflect/UnsafeQualifiedStaticIntegerFieldAccessorImpl +javax/swing/KeyStroke +sun/reflect/BootstrapConstructorAccessorImpl +java/awt/event/ActionListener +javax/swing/Timer +javax/swing/Timer$DoPostEvent +javax/swing/TimerQueue +javax/swing/TimerQueue$1 +java/awt/event/MouseAdapter +javax/swing/ToolTipManager +javax/swing/ToolTipManager$insideTimerAction +javax/swing/ToolTipManager$outsideTimerAction +javax/swing/ToolTipManager$stillInsideTimerAction +javax/swing/Action +sun/swing/UIAction +javax/swing/ToolTipManager$Actions +java/awt/event/MouseMotionAdapter +javax/swing/ToolTipManager$MoveBeforeEnterListener +java/util/Hashtable$ValueCollection +javax/swing/event/CaretListener +javax/swing/JToolBar +javax/swing/JSplitPane +java/awt/FlowLayout +javax/swing/plaf/ComponentUI +javax/swing/plaf/PanelUI +javax/swing/plaf/basic/BasicPanelUI +javax/swing/RepaintManager +javax/swing/JLayeredPane +javax/swing/JRootPane$1 +com/sun/java/swing/SwingUtilities2 +com/sun/java/swing/SwingUtilities2$LSBCacheEntry +javax/swing/ArrayTable +javax/swing/JInternalFrame +javax/swing/JRootPane$RootLayout +javax/swing/plaf/RootPaneUI +javax/swing/plaf/basic/BasicRootPaneUI +javax/swing/plaf/metal/MetalRootPaneUI +java/util/EventListenerProxy +java/beans/PropertyChangeListenerProxy +sun/awt/EventListenerAggregate +javax/swing/InputMap +javax/swing/ComponentInputMap +javax/swing/plaf/ComponentInputMapUIResource +javax/swing/plaf/basic/BasicRootPaneUI$RootPaneInputMap +javax/swing/plaf/InputMapUIResource +java/awt/VKCollection +javax/swing/ActionMap +javax/swing/plaf/ActionMapUIResource +javax/swing/plaf/basic/LazyActionMap +javax/swing/JToggleButton +javax/swing/ButtonModel +javax/swing/DefaultButtonModel +javax/swing/event/ChangeListener +java/awt/event/ItemListener +javax/swing/AbstractButton$Handler +javax/swing/plaf/ButtonUI +javax/swing/plaf/basic/BasicButtonUI +javax/swing/plaf/metal/MetalButtonUI +javax/swing/plaf/metal/MetalBorders +javax/swing/plaf/metal/MetalBorders$ButtonBorder +javax/swing/plaf/basic/BasicButtonListener +java/awt/event/WindowFocusListener +java/awt/event/WindowStateListener +java/awt/event/AdjustmentListener +java/awt/event/TextListener +java/awt/AWTEventMulticaster +javax/swing/event/AncestorListener +java/beans/VetoableChangeListener +javax/swing/plaf/basic/BasicHTML +javax/swing/ButtonGroup +javax/swing/JToggleButton$ToggleButtonModel +javax/swing/plaf/basic/BasicToggleButtonUI +javax/swing/plaf/metal/MetalToggleButtonUI +javax/swing/plaf/metal/MetalBorders$ToggleButtonBorder +java/awt/CardLayout +javax/swing/Box +javax/swing/plaf/metal/MetalBorders$Flush3DBorder +javax/swing/plaf/metal/MetalBorders$TextFieldBorder +javax/swing/BoxLayout +javax/swing/plaf/LabelUI +javax/swing/plaf/basic/BasicLabelUI +javax/swing/plaf/metal/MetalLabelUI +javax/swing/JMenuBar +javax/swing/SingleSelectionModel +javax/swing/DefaultSingleSelectionModel +javax/swing/plaf/MenuBarUI +javax/swing/plaf/basic/BasicMenuBarUI +javax/swing/plaf/metal/MetalMenuBarUI +javax/swing/plaf/basic/DefaultMenuLayout +javax/swing/plaf/metal/MetalBorders$MenuBarBorder +javax/swing/plaf/basic/BasicMenuBarUI$Handler +javax/swing/KeyboardManager +javax/swing/plaf/ToolBarUI +javax/swing/plaf/basic/BasicToolBarUI +javax/swing/plaf/metal/MetalToolBarUI +javax/swing/JMenu$MenuChangeListener +javax/swing/JMenuItem$MenuItemFocusListener +javax/swing/plaf/MenuItemUI +javax/swing/plaf/basic/BasicMenuItemUI +javax/swing/plaf/basic/BasicMenuUI +javax/swing/plaf/metal/MetalBorders$MenuItemBorder +javax/swing/plaf/metal/MetalIconFactory +javax/swing/plaf/metal/MetalIconFactory$MenuArrowIcon +javax/swing/event/MenuKeyListener +javax/swing/event/MenuDragMouseListener +javax/swing/event/MouseInputListener +javax/swing/plaf/basic/BasicMenuItemUI$Handler +javax/swing/plaf/basic/BasicMenuUI$Handler +javax/swing/event/ChangeEvent +java/awt/event/ContainerEvent +javax/swing/plaf/metal/MetalIconFactory$MenuItemArrowIcon +javax/accessibility/AccessibleAction +javax/accessibility/AccessibleValue +javax/accessibility/AccessibleText +javax/accessibility/AccessibleComponent +javax/accessibility/AccessibleExtendedComponent +java/awt/Component$AccessibleAWTComponent +java/awt/Container$AccessibleAWTContainer +javax/swing/JComponent$AccessibleJComponent +javax/swing/AbstractButton$AccessibleAbstractButton +javax/swing/JMenuItem$AccessibleJMenuItem +javax/accessibility/AccessibleRelationSet +javax/swing/JPopupMenu +javax/swing/plaf/PopupMenuUI +javax/swing/plaf/basic/BasicPopupMenuUI +javax/swing/plaf/basic/BasicLookAndFeel$PopupInvocationHelper +java/awt/event/AWTEventListenerProxy +java/awt/Toolkit$SelectiveAWTEventListener +java/awt/Toolkit$ToolkitEventMulticaster +javax/swing/plaf/metal/MetalBorders$PopupMenuBorder +javax/swing/event/PopupMenuListener +javax/swing/plaf/basic/BasicPopupMenuUI$BasicPopupMenuListener +javax/swing/plaf/basic/BasicPopupMenuUI$BasicMenuKeyListener +javax/swing/plaf/basic/BasicPopupMenuUI$MouseGrabber +javax/swing/MenuSelectionManager +javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper +java/awt/event/FocusAdapter +javax/swing/plaf/basic/BasicPopupMenuUI$MenuKeyboardHelper$1 +javax/swing/plaf/basic/BasicPopupMenuUI$MouseGrabber$2 +java/awt/event/WindowAdapter +javax/swing/JMenu$WinListener +javax/swing/JSeparator +javax/swing/JPopupMenu$Separator +javax/swing/plaf/SeparatorUI +javax/swing/plaf/basic/BasicSeparatorUI +javax/swing/plaf/metal/MetalSeparatorUI +javax/swing/plaf/metal/MetalPopupMenuSeparatorUI +javax/accessibility/AccessibleSelection +javax/swing/JMenu$AccessibleJMenu +javax/swing/event/ListDataListener +javax/swing/JComboBox +javax/swing/event/CaretEvent +javax/swing/text/TabExpander +java/awt/Adjustable +javax/swing/JScrollBar +javax/swing/event/MouseInputAdapter +javax/swing/JScrollBar$ModelListener +javax/swing/BoundedRangeModel +javax/swing/DefaultBoundedRangeModel +javax/swing/plaf/ScrollBarUI +javax/swing/plaf/basic/BasicScrollBarUI +javax/swing/plaf/metal/MetalScrollBarUI +javax/swing/plaf/metal/MetalBumps +javax/swing/plaf/basic/BasicArrowButton +javax/swing/plaf/metal/MetalScrollButton +javax/swing/plaf/basic/BasicScrollBarUI$TrackListener +javax/swing/plaf/basic/BasicScrollBarUI$ArrowButtonListener +javax/swing/plaf/basic/BasicScrollBarUI$ModelListener +javax/swing/plaf/basic/BasicScrollBarUI$PropertyChangeHandler +javax/swing/plaf/metal/MetalScrollBarUI$ScrollBarListener +javax/swing/plaf/basic/BasicScrollBarUI$Handler +javax/swing/plaf/basic/BasicScrollBarUI$ScrollListener +javax/swing/CellRendererPane +java/awt/RenderingHints +sun/awt/SunHints +java/awt/RenderingHints$Key +sun/awt/SunHints$Key +sun/awt/SunHints$Value +java/util/HashMap$EntrySet +java/util/HashMap$EntryIterator +javax/swing/border/MatteBorder +java/awt/font/GlyphVector +sun/font/StandardGlyphVector +sun/font/StandardGlyphVector$GlyphStrike +sun/font/CoreMetrics +java/awt/font/LineMetrics +sun/font/FontLineMetrics +javax/swing/ListModel +javax/swing/ComboBoxModel +javax/swing/ListCellRenderer +javax/swing/MutableComboBoxModel +javax/swing/AbstractListModel +javax/swing/DefaultComboBoxModel +javax/swing/JComboBox$1 +javax/swing/AncestorNotifier +javax/swing/plaf/ComboBoxUI +javax/swing/plaf/basic/BasicComboBoxUI +javax/swing/plaf/metal/MetalComboBoxUI +javax/swing/plaf/basic/BasicComboBoxUI$ComboBoxLayoutManager +javax/swing/plaf/metal/MetalComboBoxUI$MetalComboBoxLayoutManager +javax/swing/plaf/basic/ComboPopup +javax/swing/plaf/basic/BasicComboPopup +javax/swing/plaf/basic/BasicComboPopup$EmptyListModelClass +javax/swing/Scrollable +javax/swing/JList +javax/swing/plaf/basic/BasicComboPopup$1 +javax/swing/ListSelectionModel +javax/swing/DefaultListSelectionModel +javax/swing/plaf/ListUI +javax/swing/plaf/basic/BasicListUI +javax/swing/plaf/basic/BasicDragGestureRecognizer +javax/swing/plaf/basic/BasicListUI$ListDragGestureRecognizer +javax/swing/TransferHandler +javax/swing/plaf/basic/BasicListUI$ListTransferHandler +javax/swing/AbstractAction +javax/swing/TransferHandler$TransferAction +javax/swing/DefaultListCellRenderer +javax/swing/DefaultListCellRenderer$UIResource +javax/swing/JComponent$1 +javax/swing/TransferHandler$SwingDropTarget +java/awt/dnd/DropTargetContext +javax/swing/TransferHandler$DropHandler +javax/swing/plaf/basic/BasicDropTargetListener +javax/swing/plaf/basic/BasicListUI$ListDropTargetListener +javax/swing/event/ListSelectionListener +javax/swing/plaf/basic/BasicListUI$Handler +javax/swing/plaf/basic/BasicComboPopup$Handler +javax/swing/ScrollPaneConstants +javax/swing/JScrollPane +javax/swing/ScrollPaneLayout +javax/swing/ScrollPaneLayout$UIResource +javax/swing/JViewport +javax/swing/ViewportLayout +javax/swing/plaf/ViewportUI +javax/swing/plaf/basic/BasicViewportUI +javax/swing/JScrollPane$ScrollBar +java/awt/event/ComponentAdapter +javax/swing/JViewport$ViewListener +javax/swing/plaf/ScrollPaneUI +javax/swing/plaf/basic/BasicScrollPaneUI +javax/swing/plaf/metal/MetalScrollPaneUI +javax/swing/plaf/metal/MetalBorders$ScrollPaneBorder +javax/swing/plaf/basic/BasicScrollPaneUI$Handler +javax/swing/plaf/metal/MetalScrollPaneUI$1 +javax/swing/plaf/basic/BasicComboBoxRenderer +javax/swing/plaf/basic/BasicComboBoxRenderer$UIResource +javax/swing/ComboBoxEditor +javax/swing/plaf/basic/BasicComboBoxEditor +javax/swing/plaf/metal/MetalComboBoxEditor +javax/swing/plaf/metal/MetalComboBoxEditor$UIResource +javax/swing/text/JTextComponent +javax/swing/JTextField +javax/swing/plaf/basic/BasicComboBoxEditor$BorderlessTextField +javax/swing/text/TextAction +javax/swing/JTextField$NotifyAction +javax/swing/text/JTextComponent$MutableCaretEvent +javax/swing/text/ViewFactory +javax/swing/plaf/TextUI +javax/swing/plaf/basic/BasicTextUI +javax/swing/plaf/basic/BasicTextFieldUI +javax/swing/plaf/metal/MetalTextFieldUI +javax/swing/text/EditorKit +javax/swing/text/DefaultEditorKit +javax/swing/text/DefaultEditorKit$InsertContentAction +javax/swing/text/DefaultEditorKit$DeletePrevCharAction +javax/swing/text/DefaultEditorKit$DeleteNextCharAction +javax/swing/text/DefaultEditorKit$ReadOnlyAction +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/plaf/basic/BasicTextUI$TextDragGestureRecognizer +javax/swing/text/Position$Bias +javax/swing/text/View +javax/swing/plaf/basic/BasicTextUI$RootView +javax/swing/event/DocumentListener +javax/swing/plaf/basic/BasicTextUI$UpdateHandler +javax/swing/text/Caret +javax/swing/text/DefaultCaret +javax/swing/plaf/basic/BasicTextUI$BasicCaret +java/awt/datatransfer/ClipboardOwner +javax/swing/text/DefaultCaret$Handler +javax/swing/text/Highlighter +javax/swing/text/LayeredHighlighter +javax/swing/text/DefaultHighlighter +javax/swing/plaf/basic/BasicTextUI$BasicHighlighter +javax/swing/text/Highlighter$Highlight +javax/swing/text/Highlighter$HighlightPainter +javax/swing/text/LayeredHighlighter$LayerPainter +javax/swing/text/DefaultHighlighter$DefaultHighlightPainter +javax/swing/text/DefaultHighlighter$SafeDamager +javax/swing/plaf/basic/BasicTextUI$TextDropTargetListener +javax/swing/text/PlainView +javax/swing/text/FieldView +javax/swing/text/Keymap +javax/swing/text/JTextComponent$DefaultKeymap +javax/swing/text/JTextComponent$KeymapWrapper +javax/swing/text/JTextComponent$KeymapActionMap +javax/swing/plaf/basic/BasicTextUI$FocusAction +javax/swing/plaf/basic/BasicTextUI$TextActionWrapper +javax/swing/JTextField$ScrollRepainter +javax/swing/plaf/metal/MetalComboBoxEditor$1 +javax/swing/plaf/metal/MetalComboBoxEditor$EditorBorder +javax/swing/plaf/basic/BasicComboBoxUI$PropertyChangeHandler +javax/swing/plaf/metal/MetalComboBoxUI$MetalPropertyChangeListener +javax/swing/plaf/basic/BasicComboBoxUI$Handler +javax/swing/plaf/metal/MetalComboBoxButton +javax/swing/plaf/metal/MetalComboBoxIcon +javax/swing/plaf/metal/MetalComboBoxButton$1 +javax/swing/JComboBox$KeySelectionManager +javax/swing/plaf/basic/BasicComboBoxUI$DefaultKeySelectionManager +javax/swing/JToolBar$DefaultToolBarLayout +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$ButtonBorder +javax/swing/plaf/basic/BasicBorders$RadioButtonBorder +javax/swing/plaf/basic/BasicBorders$RolloverMarginBorder +javax/swing/plaf/basic/BasicToolBarUI$DockingListener +javax/swing/plaf/metal/MetalToolBarUI$MetalDockingListener +javax/swing/plaf/basic/BasicToolBarUI$Handler +javax/swing/border/EtchedBorder +javax/swing/JToolBar$Separator +javax/swing/plaf/basic/BasicToolBarSeparatorUI +sun/awt/X11/XIconWindow +sun/awt/X11/awtImageData +sun/awt/X11/XPixmapFormatValues +javax/swing/SystemEventQueueUtilities +javax/swing/SystemEventQueueUtilities$SystemEventQueue +sun/awt/NullComponentPeer +java/awt/Panel +java/applet/Applet +javax/swing/KeyboardManager$ComponentKeyStrokePair +java/awt/im/spi/InputMethodContext +sun/awt/im/InputContext +sun/awt/im/InputMethodContext +sun/awt/im/InputMethodManager +sun/awt/im/ExecutableInputMethodManager +java/awt/im/spi/InputMethodDescriptor +sun/awt/X11InputMethodDescriptor +sun/awt/X11/XInputMethodDescriptor +sun/awt/im/InputMethodLocator +sun/awt/im/ExecutableInputMethodManager$2 +sun/misc/Service +sun/misc/Service$LazyIterator +java/util/SortedSet +java/util/TreeSet +java/util/TreeMap$1 +sun/misc/URLClassPath$2 +java/lang/ClassLoader$2 +sun/misc/URLClassPath$1 +java/net/URLClassLoader$3 +sun/misc/CompoundEnumeration +java/net/URLClassLoader$3$1 +javax/swing/SizeRequirements +javax/swing/plaf/basic/BasicGraphicsUtils +java/awt/event/AdjustmentEvent +java/awt/MenuBar +sun/awt/X11/PropMwmHints +java/awt/event/WindowEvent +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$5 +sun/awt/X11/XReparentEvent +sun/awt/X11/XWindowAttributes +sun/awt/X11/XFocusChangeEvent +sun/awt/X11/XComponentPeer$1 +java/awt/Window$1DisposeAction +java/awt/LightweightDispatcher$2 +sun/awt/X11/XUnmapEvent +javax/swing/JTextArea +java/io/StringWriter +javax/swing/JWindow +java/io/UnsupportedEncodingException +sun/misc/URLClassPath$FileLoader +java/net/UnknownHostException +java/nio/channels/SelectableChannel +java/nio/channels/spi/AbstractSelectableChannel +java/nio/channels/SocketChannel +java/net/SocketImplFactory +javax/swing/UnsupportedLookAndFeelException +java/lang/UnsatisfiedLinkError +javax/swing/Box$Filler +javax/swing/JComponent$2 +java/net/FileNameMap +sun/net/www/MimeTable +sun/net/www/MimeTable$1 +sun/net/www/MimeTable$2 +sun/net/www/MimeEntry +java/net/URLConnection$1 +java/text/DateFormat +java/text/SimpleDateFormat +java/text/DateFormat$Field +java/util/Calendar +java/util/GregorianCalendar +java/text/NumberFormat +java/text/DecimalFormatSymbols +java/util/Currency +java/util/Currency$1 +java/util/CurrencyData +java/text/DecimalFormat +java/text/DigitList +java/text/DontCareFieldPosition +java/text/Format$FieldDelegate +java/text/DontCareFieldPosition$1 +javax/swing/plaf/BorderUIResource +javax/swing/BorderFactory +javax/swing/border/BevelBorder +javax/swing/plaf/metal/MetalIconFactory$FolderIcon16 +javax/swing/plaf/metal/MetalIconFactory$TreeFolderIcon +java/util/zip/ZipInputStream +java/io/PushbackInputStream +java/util/zip/Checksum +java/util/zip/CRC32 +javax/swing/SwingUtilities$SharedOwnerFrame +javax/swing/SystemEventQueueUtilities$ComponentWorkRequest +sun/awt/image/SunVolatileImage +sun/awt/image/BufferedImageGraphicsConfig +sun/awt/image/VolatileSurfaceManager +sun/awt/motif/X11VolatileSurfaceManager +javax/swing/JRadioButton +java/lang/ClassFormatError +java/awt/print/PrinterGraphics +java/awt/PrintGraphics +javax/swing/JTabbedPane +javax/swing/JTabbedPane$ModelListener +javax/swing/plaf/TabbedPaneUI +javax/swing/plaf/basic/BasicTabbedPaneUI +javax/swing/plaf/metal/MetalTabbedPaneUI +javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneLayout +javax/swing/plaf/metal/MetalTabbedPaneUI$TabbedPaneLayout +javax/swing/plaf/basic/BasicTabbedPaneUI$TabbedPaneScrollLayout +javax/swing/plaf/basic/BasicTabbedPaneUI$Handler +javax/swing/plaf/IconUIResource +java/awt/image/ImageFilter +java/awt/image/RGBImageFilter +javax/swing/GrayFilter +java/awt/image/FilteredImageSource +org/w3c/dom/Node +org/xml/sax/SAXException +javax/xml/parsers/ParserConfigurationException +org/xml/sax/EntityResolver +java/security/GeneralSecurityException +java/security/NoSuchAlgorithmException +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$1 +javax/xml/parsers/SecuritySupport$5 +javax/xml/parsers/SecuritySupport$4 +javax/xml/parsers/DocumentBuilder +org/xml/sax/DTDHandler +org/xml/sax/ContentHandler +org/xml/sax/ErrorHandler +org/xml/sax/helpers/DefaultHandler +org/w3c/dom/Document +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/Text +org/w3c/dom/CDATASection +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/DocumentFragment +org/w3c/dom/Comment +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/basic/BasicRadioButtonUI +javax/swing/plaf/metal/MetalRadioButtonUI +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/ProgressBarUI +javax/swing/plaf/basic/BasicProgressBarUI +javax/swing/plaf/metal/MetalProgressBarUI +javax/swing/plaf/basic/BasicProgressBarUI$Handler +javax/swing/event/TableModelListener +javax/swing/event/TableColumnModelListener +javax/swing/event/CellEditorListener +javax/swing/JTable +javax/swing/tree/TreeModel +javax/swing/table/TableCellRenderer +javax/swing/table/JTableHeader +javax/swing/event/TreeExpansionListener +javax/swing/table/TableModel +javax/swing/table/AbstractTableModel +javax/swing/table/DefaultTableCellRenderer +javax/swing/JTree +javax/swing/tree/TreeSelectionModel +javax/swing/tree/TreeCellRenderer +javax/swing/tree/DefaultTreeCellRenderer +javax/swing/CellEditor +javax/swing/table/TableCellEditor +javax/swing/JToolTip +java/util/TreeMap$PrivateEntryIterator +java/util/TreeMap$KeyIterator +javax/swing/table/TableColumnModel +javax/swing/table/DefaultTableColumnModel +javax/swing/table/DefaultTableModel +javax/swing/event/TableModelEvent +javax/swing/table/JTableHeader$UIResourceTableCellRenderer +javax/swing/plaf/TableHeaderUI +javax/swing/plaf/basic/BasicTableHeaderUI +javax/swing/plaf/basic/BasicTableHeaderUI$MouseInputHandler +javax/swing/tree/TreeCellEditor +javax/swing/AbstractCellEditor +javax/swing/DefaultCellEditor +javax/swing/plaf/TableUI +javax/swing/plaf/basic/BasicTableUI +javax/swing/plaf/basic/BasicTableUI$TableDragGestureRecognizer +javax/swing/plaf/basic/BasicTableUI$TableTransferHandler +javax/swing/plaf/basic/BasicTableUI$TableDropTargetListener +javax/swing/plaf/basic/BasicTableUI$Handler +javax/swing/tree/DefaultTreeSelectionModel +javax/swing/tree/TreePath +javax/swing/plaf/TreeUI +javax/swing/plaf/basic/BasicTreeUI +javax/swing/plaf/metal/MetalTreeUI +javax/swing/plaf/basic/BasicTreeUI$Actions +javax/swing/plaf/basic/BasicTreeUI$TreeDragGestureRecognizer +javax/swing/plaf/basic/BasicTreeUI$TreeTransferHandler +javax/swing/plaf/metal/MetalTreeUI$LineListener +javax/swing/event/TreeModelListener +javax/swing/event/TreeSelectionListener +javax/swing/plaf/basic/BasicTreeUI$Handler +javax/swing/plaf/basic/BasicTreeUI$TreeDropTargetListener +javax/swing/event/SwingPropertyChangeSupport +javax/swing/tree/RowMapper +javax/swing/tree/AbstractLayoutCache +javax/swing/tree/VariableHeightLayoutCache +javax/swing/tree/AbstractLayoutCache$NodeDimensions +javax/swing/plaf/basic/BasicTreeUI$NodeDimensionsHandler +javax/swing/JTree$TreeModelHandler +javax/swing/tree/MutableTreeNode +javax/swing/tree/DefaultMutableTreeNode +javax/swing/tree/VariableHeightLayoutCache$TreeStateNode +javax/swing/tree/DefaultMutableTreeNode$1 +javax/swing/tree/DefaultMutableTreeNode$PreorderEnumeration +javax/swing/table/TableColumn +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$EditorDelegate +javax/swing/DefaultCellEditor$1 +javax/swing/tree/DefaultTreeCellEditor$EditorContainer +javax/swing/JTree$TreeSelectionRedirector +javax/swing/event/TreeModelEvent +javax/swing/plaf/SplitPaneUI +javax/swing/plaf/basic/BasicSplitPaneUI +javax/swing/plaf/metal/MetalSplitPaneUI +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/SliderUI +javax/swing/plaf/basic/BasicSliderUI +javax/swing/plaf/metal/MetalSliderUI +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/basic/BasicSliderUI$PropertyChangeHandler +javax/swing/plaf/metal/MetalSliderUI$MetalPropertyListener +sun/java2d/HeadlessGraphicsEnvironment +java/util/Hashtable$KeySet +java/awt/FontFormatException +sun/java2d/SunGraphicsEnvironment$2 +sun/font/Type1Font$1 +java/nio/channels/FileChannel$MapMode +sun/nio/ch/FileChannelImpl$Unmapper +sun/nio/ch/Util$3 +java/nio/DirectByteBufferR +sun/nio/cs/US_ASCII +sun/nio/cs/US_ASCII$Decoder +java/nio/BufferUnderflowException +javax/swing/DefaultListModel +javax/swing/event/ListDataEvent +javax/sound/sampled/Line +javax/sound/sampled/DataLine +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/accessibility/AccessibleBundle +javax/accessibility/AccessibleState +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 +javax/swing/JRadioButtonMenuItem$AccessibleJRadioButtonMenuItem +sun/awt/image/ImageDecoder$1 +javax/swing/JTabbedPane$Page +javax/swing/JSplitPane$AccessibleJSplitPane +javax/swing/JTabbedPane$AccessibleJTabbedPane +javax/swing/JPanel$AccessibleJPanel +java/net/DatagramSocket +java/net/MulticastSocket +java/net/DatagramPacket +java/net/DatagramSocketImpl +java/net/PlainDatagramSocketImpl +java/net/NetworkInterface +java/text/Collator +java/text/RuleBasedCollator +java/text/CollationRules +java/text/RBCollationTables +java/text/RBTableBuilder +java/text/RBCollationTables$BuildAPI +sun/text/IntHashtable +sun/text/UCompactIntArray +sun/text/NormalizerImpl +sun/text/NormalizerImpl$1 +sun/text/ICUBinary$Authenticate +sun/text/NormalizerDataReader +sun/text/ICUBinary +sun/text/Trie$DataManipulate +sun/text/NormalizerImpl$FCDTrieImpl +sun/text/NormalizerImpl$NormTrieImpl +sun/text/Trie +sun/text/IntTrie +sun/text/CharTrie +sun/text/NormalizerImpl$DecomposeArgs +java/text/MergeCollation +java/text/PatternEntry$Parser +java/text/PatternEntry +java/text/EntryPair +sun/text/ComposedCharIter +sun/net/www/protocol/http/Handler +java/io/ObjectInputStream$1 +java/io/ObjectInputStream$BlockDataInputStream +java/io/ObjectInputStream$PeekInputStream +java/io/ObjectInputStream$HandleTable +java/io/ObjectInputStream$HandleTable$HandleList +java/io/ObjectInputStream$ValidationList +java/io/Bits +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/MessageDigestSpi +java/security/MessageDigest +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/util/LinkedHashMap$EntryIterator +java/security/Provider$Service +sun/security/provider/DigestBase +sun/security/provider/SHA +sun/security/jca/GetInstance$Instance +java/security/MessageDigest$Delegate +java/io/ObjectStreamClass$ClassDataSlot +sun/reflect/UnsafeQualifiedStaticLongFieldAccessorImpl +java/security/SignatureException +java/security/KeyException +java/security/InvalidKeyException +java/security/SignatureSpi +java/security/Signature +java/io/ObjectOutputStream$1 +java/io/ObjectOutputStream$BlockDataOutputStream +java/io/ObjectOutputStream$HandleTable +java/io/ObjectOutputStream$ReplaceTable +java/security/interfaces/DSAKey +java/security/Key +java/security/PublicKey +java/security/interfaces/DSAPublicKey +sun/security/x509/X509Key +sun/security/provider/DSAPublicKey +sun/security/util/DerEncoder +sun/security/x509/AlgorithmId +sun/security/util/BitArray +sun/security/util/DerOutputStream +sun/security/util/DerValue +java/io/ObjectStreamException +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/ObjectInputStream$GetField +java/io/ObjectInputStream$GetFieldImpl +sun/security/jca/ServiceId +sun/security/jca/ProviderList$ServiceList +sun/security/jca/ProviderList$ServiceList$1 +java/security/Signature$Delegate +java/security/PrivateKey +java/security/interfaces/DSAPrivateKey +sun/security/provider/DSA +sun/security/provider/DSA$SHA1withDSA +java/security/spec/AlgorithmParameterSpec +java/security/spec/DSAParameterSpec +java/math/MutableBigInteger +java/math/SignedMutableBigInteger +java/awt/EventQueue$1AWTInvocationLock +javax/swing/SystemEventQueueUtilities$RunnableCanvas +javax/swing/SystemEventQueueUtilities$RunnableCanvasGraphics +sun/awt/X11/XDropTargetRegistry +sun/awt/X11/XDropTargetRegistry$1 +javax/swing/JTable$Resizable2 +javax/swing/JTable$Resizable3 +javax/swing/JTable$2 +javax/swing/JTable$5 +javax/swing/event/AncestorEvent +sun/awt/X11/MotifDnDConstants +sun/awt/X11/XDragAndDropProtocols +java/awt/dnd/peer/DropTargetContextPeer +sun/awt/dnd/SunDropTargetContextPeer +sun/awt/X11/XDropTargetContextPeer +sun/awt/X11/XDropTargetProtocolListener +sun/awt/X11/XDropTargetContextPeer$XDropTargetProtocolListenerImpl +sun/awt/X11/XDragSourceProtocol +sun/awt/X11/XDnDDragSourceProtocol +sun/awt/X11/MotifDnDDragSourceProtocol +sun/awt/X11/XDropTargetProtocol +sun/awt/X11/XDnDDropTargetProtocol +sun/awt/X11/MotifDnDDropTargetProtocol +java/util/Collections$UnmodifiableList +java/util/Collections$UnmodifiableRandomAccessList +sun/awt/X11/XDnDConstants +java/awt/SentEvent +java/awt/DefaultKeyboardFocusManager$DefaultKeyboardFocusManagerSentEvent +sun/awt/X11/XWindow$1 +java/awt/im/spi/InputMethod +sun/awt/im/InputMethodAdapter +sun/awt/X11InputMethod +sun/awt/X11/XInputMethod +java/util/NoSuchElementException +java/io/FileFilter +java/net/URISyntaxException +java/security/AllPermissionCollection +java/lang/SecurityManager +org/xml/sax/DocumentHandler +java/io/InvalidObjectException +javax/swing/JFileChooser +java/beans/IntrospectionException +java/beans/FeatureDescriptor +java/beans/PropertyDescriptor +javax/xml/parsers/SAXParserFactory +javax/xml/parsers/FactoryConfigurationError +java/util/Timer +java/util/TaskQueue +java/util/TimerTask +java/util/TimerThread +java/util/Timer$1 +java/util/Collections$1 +java/util/Collections$SingletonSet +java/util/Collections$SingletonSet$1 +javax/swing/FocusManager +javax/swing/DefaultFocusManager +sun/misc/ProxyGenerator +sun/misc/ProxyGenerator$ConstantPool +sun/misc/ProxyGenerator$ProxyMethod +java/lang/Class$MethodArray +sun/misc/ProxyGenerator$MethodInfo +sun/misc/ProxyGenerator$ConstantPool$Entry +sun/misc/ProxyGenerator$ConstantPool$ValueEntry +sun/misc/ProxyGenerator$ConstantPool$IndirectEntry +sun/misc/ProxyGenerator$FieldInfo +sun/misc/ProxyGenerator$ExceptionTableEntry +sun/misc/ProxyGenerator$PrimitiveTypeInfo +org/xml/sax/Parser +org/xml/sax/helpers/XMLReaderAdapter +java/io/NotSerializableException +java/io/SyncFailedException +java/io/ObjectInputValidation +java/util/ConcurrentModificationException +sun/awt/SunGraphicsCallback +java/awt/GraphicsCallback +java/awt/GraphicsCallback$PaintCallback +java/util/Collections$SynchronizedList +java/util/Collections$SynchronizedRandomAccessList +java/util/Collections$EmptySet$1 +javax/swing/Popup +javax/swing/text/html/CSS +javax/swing/text/html/CSS$Attribute +javax/swing/text/html/CSS$Value +javax/swing/text/html/HTML$Attribute +java/beans/Introspector +java/beans/EventSetDescriptor +java/beans/PropertyEditorManager +java/beans/PropertyEditor +java/beans/PropertyEditorSupport +sun/beans/editors/NumberEditor +sun/beans/editors/ByteEditor +sun/beans/editors/ShortEditor +sun/beans/editors/IntEditor +sun/beans/editors/LongEditor +sun/beans/editors/BoolEditor +sun/beans/editors/FloatEditor +sun/beans/editors/DoubleEditor +java/beans/BeanInfo +java/lang/IllegalThreadStateException +java/net/UnknownServiceException +java/io/CharConversionException +javax/xml/parsers/SAXParser +org/xml/sax/XMLReader +org/xml/sax/Attributes +org/xml/sax/helpers/AttributesImpl +org/xml/sax/ext/LexicalHandler +org/xml/sax/ext/DeclHandler +java/util/jar/JarInputStream +java/io/CharArrayWriter +java/beans/beancontext/BeanContextProxy +java/util/WeakHashMap$EntrySet +java/util/WeakHashMap$HashIterator +java/util/WeakHashMap$EntryIterator +java/io/OptionalDataException +org/xml/sax/HandlerBase +org/xml/sax/helpers/XMLReaderAdapter$AttributesAdapter +java/util/PropertyPermission +java/beans/BeanDescriptor +java/lang/reflect/UndeclaredThrowableException +javax/naming/Context +javax/imageio/ImageIO +javax/imageio/spi/ServiceRegistry +javax/imageio/spi/IIORegistry +javax/imageio/spi/RegisterableService +javax/imageio/spi/IIOServiceProvider +javax/imageio/spi/ImageReaderWriterSpi +javax/imageio/spi/ImageReaderSpi +javax/imageio/spi/ImageWriterSpi +javax/imageio/spi/ImageTranscoderSpi +javax/imageio/spi/ImageInputStreamSpi +javax/imageio/spi/ImageOutputStreamSpi +javax/imageio/spi/SubRegistry +javax/imageio/spi/PartiallyOrderedSet +com/sun/imageio/plugins/gif/GIFImageReaderSpi +javax/imageio/stream/ImageInputStream +javax/imageio/spi/DigraphNode +com/sun/imageio/plugins/bmp/BMPImageReaderSpi +com/sun/imageio/plugins/bmp/BMPImageWriterSpi +javax/imageio/stream/ImageOutputStream +com/sun/imageio/plugins/wbmp/WBMPImageReaderSpi +com/sun/imageio/plugins/wbmp/WBMPImageWriterSpi +com/sun/imageio/plugins/png/PNGImageReaderSpi +com/sun/imageio/plugins/png/PNGImageWriterSpi +com/sun/imageio/plugins/jpeg/JPEGImageReaderSpi +com/sun/imageio/plugins/jpeg/JPEG +java/awt/color/ICC_Profile$2 +java/awt/color/ICC_Profile$3 +sun/awt/color/CMM +com/sun/imageio/plugins/jpeg/JPEGImageWriterSpi +com/sun/imageio/spi/FileImageInputStreamSpi +com/sun/imageio/spi/FileImageOutputStreamSpi +com/sun/imageio/spi/InputStreamImageInputStreamSpi +com/sun/imageio/spi/OutputStreamImageOutputStreamSpi +com/sun/imageio/spi/RAFImageInputStreamSpi +com/sun/imageio/spi/RAFImageOutputStreamSpi +javax/imageio/ImageReader +javax/imageio/metadata/IIOMetadataFormat +javax/imageio/ImageTranscoder +javax/imageio/ImageWriter +javax/imageio/spi/ServiceRegistry$Filter +javax/imageio/ImageIO$ContainsFilter +javax/imageio/spi/PartialOrderIterator +javax/imageio/spi/FilterIterator +javax/imageio/ImageIO$ImageReaderIterator +java/text/BreakIterator +javax/swing/text/StyledDocument +javax/swing/JEditorPane +javax/swing/text/BadLocationException +java/awt/print/PrinterException +java/awt/print/PrinterAbortException +java/awt/print/PrinterJob +java/beans/IndexedPropertyDescriptor +java/security/Policy +java/security/Policy$1 +sun/security/provider/PolicyFile +sun/security/provider/PolicyFile$1 +sun/security/provider/PolicyInfo +sun/security/provider/PolicyFile$2 +sun/security/util/PropertyExpander +sun/security/provider/PolicyParser +sun/security/provider/PolicyParser$GrantEntry +sun/security/provider/PolicyParser$PermissionEntry +sun/security/provider/PolicyFile$PolicyEntry +java/net/SocketPermission +java/net/NetPermission +sun/security/util/SecurityConstants +java/awt/AWTPermission +java/security/SecurityPermission +javax/security/auth/AuthPermission +java/net/HttpURLConnection +sun/net/www/protocol/http/HttpURLConnection +sun/net/www/protocol/http/HttpURLConnection$2 +java/net/CookieHandler +sun/net/www/protocol/http/HttpURLConnection$3 +java/net/ResponseCache +sun/security/provider/PolicyParser$ParsingException +sun/security/provider/PolicyFile$4 +sun/security/provider/PolicyFile$6 +sun/security/provider/SelfPermission +java/net/SocketPermissionCollection +java/util/PropertyPermissionCollection +java/security/PermissionsEnumerator +javax/swing/plaf/metal/MetalIconFactory$InternalFrameMinimizeIcon +javax/swing/plaf/metal/MetalIconFactory$InternalFrameAltMaximizeIcon +javax/swing/plaf/metal/MetalIconFactory$InternalFrameCloseIcon +java/beans/SimpleBeanInfo +java/beans/Introspector$1 +java/beans/MethodDescriptor +java/beans/NameGenerator +java/util/TreeMap$2 +java/util/TreeMap$ValueIterator +java/beans/GenericBeanInfo +java/beans/beancontext/BeanContextChild +javax/swing/JEditorPane$PageStream +java/beans/DesignMode +java/beans/Visibility +java/beans/beancontext/BeanContext +java/beans/beancontext/BeanContextServiceRevokedListener +java/beans/beancontext/BeanContextServicesListener +java/beans/beancontext/BeanContextChildSupport +java/beans/beancontext/BeanContextSupport +java/beans/VetoableChangeSupport +java/beans/beancontext/BeanContextSupport$1 +java/beans/beancontext/BeanContextSupport$2 +java/awt/print/PageFormat +java/beans/beancontext/BeanContextSupport$BCSChild +java/beans/beancontext/BeanContextEvent +java/beans/beancontext/BeanContextMembershipEvent +java/beans/Beans +javax/swing/text/JTextComponent$KeyBinding +java/util/Collections$UnmodifiableList$1 +org/xml/sax/helpers/NamespaceSupport +org/xml/sax/helpers/NamespaceSupport$Context +java/util/zip/ZipException +java/awt/Window$AccessibleAWTWindow +java/awt/Frame$AccessibleAWTFrame +javax/swing/JFrame$AccessibleJFrame +java/awt/AWTError +javax/swing/JDesktopPane +javax/swing/JDesktopPane$1 +javax/swing/plaf/DesktopPaneUI +javax/swing/plaf/basic/BasicDesktopPaneUI +javax/swing/plaf/basic/BasicDesktopPaneUI$Actions +javax/swing/DesktopManager +javax/swing/DefaultDesktopManager +javax/swing/plaf/basic/BasicDesktopPaneUI$BasicDesktopManager +javax/swing/plaf/basic/BasicDesktopPaneUI$Handler +javax/swing/JInternalFrame$JDesktopIcon +javax/swing/JComponent$ActionStandin +javax/swing/event/MenuKeyEvent +javax/swing/event/MenuDragMouseEvent +javax/swing/JToolBar$AccessibleJToolBar +java/util/WeakHashMap$KeySet +java/util/WeakHashMap$KeyIterator +java/lang/SecurityManager$1 +java/lang/System$1 +java/lang/ClassLoader$1 +java/security/DomainCombiner diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/appletviewer.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/appletviewer.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/appletviewer.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/appletviewer.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,70 @@ +'\" t +.\" @(#)appletviewer.1 1.9 00/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits réservés. +.\" +.TH appletviewer 1 "23 Apr 2001" +.SH NAME +appletviewer \- Java applet viewer +.\" +.\" This comment retained for historical purposes only: +.\" This document was created by saving an HTML file as text +.\" from the JavaSoft web site: +.\" +.\" http://java.sun.com/j2se/1.5/docs/tooldocs/tools.html +.\" +.\" and adding appropriate troff macros. +.\" +.SH SYNOPSIS +.BR appletviewer " [" +.BR options " ]" +.IR "urls " \|.\|.\|. +.SH DESCRIPTION +.IX "appletviewer" "" "\fLappletviewer\fP \(em run applets" +.IX "appletviewer" "" "\fLappletviewer\fP \(em Web browser" +The +.B appletviewer +command connects to the documents or +resources designated by +.I urls +and displays each applet +referenced by that document in its own window. +Note: if the documents referred to by +.I urls +do not reference any +applets with the +\s-1\f3OBJECT\f1\s0, \s-1\f3EMBED\f1\s0, or +.SB APPLET +tag, +.B appletviewer +does nothing. +For details on the HTML tags that appletviewer supports, +see http://java.sun.com/j2se/1.5.0/docs/tooldocs/appletviewertags.html. +.SH OPTIONS +The following options are supported: +.TP 10 +.B \-debug +Starts the applet viewer in the Java debugger, +.B jdb , +thus allowing you to debug applets in the document. +(See +.BR jdb (1).) +.TP 10 +.BI \-encoding " encoding_name" +Specifies the input +.SM HTML +file encoding name. +.TP 10 +.BI \-J " javaoption" +Passes the string +.I javaoption +through as a single argument to +the Java interpreter +which runs +the appletviewer. +The argument should not contain spaces. +Multiple argument words must all begin with the prefix +.BR \-J , +which is stripped. +This is useful for adjusting the compiler's execution +environment or compiler memory usage. diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/apt.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/apt.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/apt.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/apt.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,105 @@ +'\" t +.\" @(#)apt.1 1.10 04/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits réservés. +.\" +.TH apt 1 "13 June 2004" +.SH NAME +apt \- annotation processing tool +.\" +.SH SYNOPSIS +.B apt +.BI [\-classpath " classpath]" +.BI [\-sourcepath " sourcepath]" +.BI [\-d " directory]" +.BI [\-s " directory]" +.BI [\-factorypath " path]" +.BI [\-factory " class]" +.BI [\-print] +.BI [\-nocompile] +.BI [\-Akey[=val] ...] +.BI [javac option] +.BI sourcefiles +.BI [@files] +.SH DESCRIPTION +The tool apt, annotation processing tool, includes a set of +new reflective APIs and supporting infrastructure to +process program annotations. The apt reflective APIs +provide a build-time, source-based, read-only view of +program structure. These reflective APIs are designed +to cleanly model the JavaTM programming language's +type system after the addition of generics. First, +apt runs annotation processors that can produce new source +code and other files. Next, apt can cause compilation of +both original and generated source files, easing +development. The reflective APIs and other APIs used +to interact with the tool are subpackages of com.sun.mirror. +.LP +A fuller discussion of how the tool operates as well as +instructions for developing with apt are in Getting +Started with apt at +http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html. +.SH PARAMETERS +Options may be in any order. For a discussion of parameters +which apply to a specific option, see OPTIONS below. +.if t .TP 20 +.if n .TP 15 +.BI sourcefiles +Zero or more source files to be processed. +.if t .TP 20 +.if n .TP 15 +.BI @files +One or more files that list source files or other options. +.SH OPTIONS +.SS apt specific options +.if t .TP 20 +.if n .TP 15 +.BI \-s " dir" +Specify the directory root under which processor-generated +source files will be placed; files are placed +in subdirectories based on package namespace. +.if t .TP 20 +.if n .TP 15 +.BI \-nocompile +Do not compile sources files to class files. +.if t .TP 20 +.if n .TP 15 +.BI \-print +Print out textual representation of specified types; +perform no annotation processing or compilation. +.if t .TP 20 +.if n .TP 15 +.BI \-A[key[=val]] +Options to pass to annotation processors -- these are +not interpreted by apt directly, but are made +available for use by individual processors +.if t .TP 20 +.if n .TP 15 +.BI \-factorypath " path" +Specify where to find annotation processor factories; if +this option is used, the classpath is not searched +for factories. +.if t .TP 20 +.if n .TP 15 +.BI \-factory " classname" +Name of annotation processor factory to use; +bypasses default discovery process +.SS Options shared with javac +.if t .TP 20 +.if n .TP 15 +.BI \-d " dir" +Specify where to place processor and javac generated class files +.if t .TP 20 +.if n .TP 15 +.BI \-cp " path " or \-classpath " path" +Specify where to find user class files and annotation processor +factories. If \-factorypath is given, the +classpath is not searched for factories. +.LP +Consult the javac(1) man page for information on javac options. +.SH NOTES +The apt tool and its associated APIs may be changed or +superseded in future j2se releases. +.SH SEE ALSO +.BR javac (1) +.BR java (1) diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/extcheck.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/extcheck.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/extcheck.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/extcheck.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,80 @@ +'\" t +.\" @(#)extcheck.1 1.8 00/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits r\351serv\351s. +.\" +.TH extcheck 1 "13 June 2000" +.SH NAME +extcheck \- jar conflict detection utility +.SH SYNOPSIS +.B extcheck +[ +.B \-verbose +] +[ +.B \-J " option" +] +.I targetfile.jar +.SH DESCRIPTION +.IX "jar conflict detection utility" "" "jar conflict detection utility \(em \fLextcheck\fP" +.IX "extcheck" "" "\fLextcheck\fP \(em jar conflict detection utility" +The +.B extcheck +utility checks a specified +.B jar +file for title and +version conflicts with any extensions installed in the JDK +software. +Before installing an extension, you can use this utility +to see if the same or a more recent version of the extension is +already installed. +.LP +The +.B extcheck +utility compares the Specification-title and +Specification-version headers in the manifest of +.I targetfile.jar +file against the corresponding headers in all Jar files currently +installed in the extension directory. +(The extension directory is +.B jre/lib/ext +by default.) The +.B extcheck +utility compares version +numbers in the same way as the method +.BR java.lang.Package.isCompatibleWith . +.LP +If no conflict is detected, the return code is 0. +.LP +If the manifest of any jar file in the extensions +directory has the same Specification-title and +the same or a newer Specification-version +number, a non-zero error code is returned. A +non-zero error code is also returned if +targetfile.jar does not have the Specification-title +or Specification-version attributes in its manifest. +.SH OPTIONS +The following options are supported: +.TP 15 +.B \-verbose +Lists +.B jar +files in the extension directory as they are +checked. +Additionally, manifest attributes of the target +.B jar +file and any conflicting +.B jar +files are also reported. +.TP 15 +.B \-J " option" +Pass +.I option +to the Java virtual machine, where +.I option +is one of the options described on the man page for the +java application launcher, java(1). For example, +.I \-J-Xms48m +sets the startup memory to 48 megabytes. +.SH SEE ALSO +.BR jar (1) diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/idlj.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/idlj.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/idlj.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/idlj.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,798 @@ +'\" t +.\" @(#)idlj.1 1.20 01/03/10 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits riservis. +.\" +.TH idlj 1 "10 March 2001" +.SH NAME +idlj - The IDL-to-Java Compiler (RMI-IIOP version) +.LP +.B idlj +generates Java bindings from a given IDL file. +.SH SYNOPSIS +.B idlj +[ +.IB options +] +.B idl-file +.LP +where +.BR idl-file +is the name of a file containing Interface Definition Language (IDL) +definitions. +.BR Options +may appear in any order, but must precede the +.BR idl-file . +.SH DESCRIPTION +The IDL-to-Java Compiler generates the Java bindings for a +given IDL file. For binding details, see the OMG IDL to Java +Language Mapping Specification. Some previous releases of the +IDL-to-Java compiler were named +.BR idltojava . +.SH Emitting Client and Server Bindings +To generate Java bindings for an IDL file named +.BR My.idl : +.LP +.RS +.ft 3 +.nf +idlj My.idl +.fi +.ft 1 +.RE +.LP +This generates the client-side bindings and is equivalent to: +.LP +.RS +.ft 3 +.nf +idlj -fclient My.idl +.fi +.ft 1 +.RE +.LP +The client-side bindings do not include the server-side +skeleton. If you want to generate the server-side bindings for +the interfaces: +.LP +.RS +.ft 3 +.nf +idlj -fserver My.idl +.fi +.ft 1 +.RE +.LP +Server-side bindings include the client-side bindings plus the +skeleton, all of which are POA (that is, Inheritance Model) classes. +If you want to generate both client and server-side bindings, +use one of the following (equivalent) commands: +.LP +.RS +.ft 3 +.nf +idlj -fclient -fserver My.idl +.br +idlj -fall My.idl +.fi +.ft 1 +.RE +.LP +There are two possible server-side models: the Inneritance Model and +the Tie Model. +.LP +NEW in 1.4! The default server-side model is the +.BI Portable +.BI Servant +.BI Inheritance +.BI Model . +Given an interface My defined in +.BR My.idl , +the file +.BR MyPOA.java +is generated. You must provide the +implementation for +.BR My +and it must inherit from +.BR MyPOA . +.LP +.BR MyPOA.java +is a stream-based skeleton that extends +.BR org.omg.PortableServer.Servant +and implements the +.BR InvokeHandler +interface and the operations interface associated +with the IDL interface the skeleton implements. +.LP +The +.BR PortableServer +module for the +.BR Portable Object Adapter +.BR (POA) +defines the native Servant type. In the Java programming +language, the +.BR Servant +type is mapped to the Java +.BR org.omg.PortableServer.Servant +class. It serves as the base +class for all POA servant implementations and provides a +number of methods that may be invoked by the application +programmer, as well as methods which are invoked by the POA +itself and may be overridden by the user to control aspects of +servant behavior. +.LP +Another option for the Inheritance Model is to use the +.BR -oldImplBase +flag in order to generate server-side bindings that +are compatible with older version of the Java programming +language (prior to J2SE 1.4). To generate server-side bindings +that are backwards compatible: +.LP +.RS +.ft 3 +.nf +idlj -fclient -fserver -oldImplBase My.idl +.br +idlj -fall -oldImplBase My.idl +.fi +.ft 1 +.RE +.LP +Given an interface +.BR My +defined in +.BR My.idl , +the file +.BR _MyImpleBase.java +is generated. You must provide the implementation for +.BR My +and it must inherit from +.BR _MyImplBase . +.LP +The other server-side model is called the Tie Model. This is a +delegation model. Because it is not possible to generate ties and +skeletons at the same time, they must be generated separately. +The following commands generate the bindings for the Tie +Model: +.LP +.RS +.ft 3 +.nf +idlj -fall My.idl +.br +idlj -fallTIE My.idl +.fi +.ft 1 +.RE +.LP +For the interface +.BR My , +the second command generates +.BR MyPOATie.java . +The constructor to +.BR MyPOATie +takes a delegate. +You must provide the implementation for delegate, but it does +not have to inherit from any other class, only the interface +.BR MyOperations . +But to use it with the ORB, you must wrap your +implementation within +.BR MyPOATie . +For instance: +.LP +.RS +.ft 3 +.nf +MyImpl myImpl = new MyImpl (); +.br +My POATie tie = new MyPOATie (myImpl); +.br +orb.connect (tie); +.fi +.ft 1 +.RE +.LP +You might want to use the Tie model instead of the typical +Inheritance model if your implementation must inherit from +some other implementation. Java allows any number of interface +inheritance, but there is only one slot for class inheritance. If you +the inheritance model, that slot is used up . By using the Tie +Model, that slot is freed up for your own use. The drawback is +that it introduces a level of indirection: one extra method call +occurs when invoking a method. +.LP +To generate server-side, Tie model bindings that are compatible +with older version of the IDL to Java language mapping in +versions of J2SE before 1.4. +.LP +.RS +.ft 3 +.nf +idlj -oldImplBase -fall My.idl +.br +idlj -oldImplBase -fallTIE My.idl +.fi +.ft 1 +.RE +.LP +For the interface +.BR My , +this will generate +.BR My_Tie.java . +The constructor to +.BR My_Tie +takes a +.BR impl . +You must provide the +implementation for +.BR impl , +but it does not have to inherit from +any other class, only the interface +.BR HelloOperations . +But to use it +with the ORB, you must wrap your implementation within +.BR My_Tie . +For instance: +.LP +.RS +.ft 3 +.nf +MyImpl myImpl = new MyImpl (); +.br +My_Tie tie = new My_Tie (myImpl); +.br +orb.connect (tie); +.fi +.ft 1 +.RE +.LP +.SH Specifying Alternate Locations for Emitted Files +.br +If you want to direct the emitted files to a directory other than +the current directory, invoke the compiler as: +.LP +.RS +.ft 3 +.nf +idlj -td /altdir My.idl +.fi +.ft 1 +.RE +.LP +For the interface +.BR My , +the bindings will be emitted to +.BR /altdir/My.java , +etc., instead of +.BR ./My.java. +.SH +Specifying Alternate Locations for Include Files +If +.BR My.idl +included another idl file, +.BR MyOther.idl , +the compiler +assumes that +.BR MyOther.idl +resides in the local directory. If it +resides in +.BR /includes , +for example, then you would invoke the +compiler with the following command: +.LP +.RS +.ft 3 +.nf +idlj -i /includes My.idl +.fi +.ft 1 +.RE +.LP +If +.BR My.idl +also included +.BR Another.idl +that resided in +.BR /moreIncludes , +for example, then you would invoke the +compiler with the following command: +.LP +.RS +.ft 3 +.nf +idlj -i /includes -i /moreIncludes My.idl +.fi +.ft 1 +.RE +.LP +Since this form of include can become irritatingly long, another +means of indicating to the compiler where to search for included +files is provided. This technique is similar to the idea of an +environment variable. Create a file named +.BR idl.config +in a +directory that is listed in your CLASSPATH. Inside of +.BR idl.config , +provide a line with the following form: +.LP +.RS +.ft 3 +.nf +includes=/includes;/moreIncludes +.fi +.ft 1 +.RE +.LP +The compiler will find this file and read in the includes list. Note +that in this example the separator character between the two +directories is a semicolon (;). This separator character is platform +dependent. On NT it is a semicolon, on Solaris it is a colon, etc. +For more information on includes, read the CLASSPATH +documentation. +.SH Emitting Bindings for Include Files +By default, only those interfaces, structs, etc, that are defined in +the idl file on the command line have Java bindings generated +for them. The types defined in included files are not generated. +For example, assume the following two idl files: +.TP +.B My.idl +.LP +.RS +#include +.br +interface My +.br +{ +.br +}; +.RE +.TP +.B MyOther.idl +.LP +.RS +interface MyOther +.br +{ +.br +}; +.RE +.LP +The following command will only generate the java bindings for +.BR My : +.LP +.RS +.ft 3 +.nf +idlj My.idl +.fi +.ft 1 +.RE +.LP +To generate all of the types in +.BR My.idl +and all of the types in the +files that +.BR My.idl +includes (in this example, +.BR MyOther.idl ), +use +the following command: +.LP +.RS +.ft 3 +.nf +idlj -emitAll My.idl +.fi +.ft 1 +.RE +.LP +There is a caveat to the default rule. +.BR #include +statements which +appear at global scope are treated as described. These +.BR #include +statements can be thought of as import statements. +.BR #include +statements which appear within some enclosing scope are +treated as true +.BR #include +statements, meaning that the code +within the included file is treated as if it appeared in the +original file and, therefore, Java bindings are emitted for it. Here +is an example: +.TP +.B My.idl +.LP +.RS +#include +.br +interface My +.br +{ +.br + #include +.br +}; +.RE +.TP +.B MyOther.idl +.LP +.RS +interface MyOther +.br +{ +.br +}; +.RE +.TP +.B Embedded.idl +.LP +.RS +enum E {one, two, three}; +.RE +.LP +Running the following command: +.LP +.RS +.ft 3 +.nf +idlj My.idl +.fi +.ft 1 +.RE +.LP +will generate the following list of Java files: +.LP +.RS +.ft 3 +.nf +./MyHolder.java +./MyHelper.java +./_MyStub.java +./MyPackage +./MyPackage/EHolder.java +./MyPackage/EHelper.java +./MyPackage/E.java +./My.java +.fi +.ft 1 +.RE +.LP +Notice that +.BR MyOther.java +was not generated because it is +defined in an import-like +.BR #include . +But +.BR E.java +was generated +because it was defined in a true +.BR #include . +Also notice that since +.BR Embedded.idl +was included within the scope of the interface +.BR My , +it appears within the scope of +.BR My +(that is,in +.BR MyPackage ). +.LP +If the +.BI -emitAll +flag had been used in the previous example, then +all types in all included files would be emitted. +.SH Inserting Package Prefixes +Suppose that you work for a company named ABC that has +constructed the following IDL file: +.TP +.B Widgets. idl +module Widgets +.br +{ +.br + interface W1 {...}; +.br + interface W2 {...}; +.br +}; +.LP +Running this file through the IDL-to-Java compiler will place the +Java bindings for W1 and W2 within the package Widgets. But +there is an industry convention that states that a company's +packages should reside within a package named +.BR com. . +The +.BR Widgets +package is not good enough. To follow +convention, it should be +.BR com.abc.Widgets . +To place this package +prefix onto the +.BR Widgets +module, execute the following: +.LP +.RS +.ft 3 +.nf +idlj -pkgPrefix Widgets com.abc Widgets.idl +.fi +.ft 1 +.RE +.LP +If you have an IDL file which includes +.BR Widgets.idl , +the +.BI \-pkgPrefix +flag must appear in that command also. If it does +not, then your IDL file will be looking for a +.BR Widgets +package +rather than a +.BR com.abc.Widgets +package. +.LP +If you have a number of these packages that require prefixes, it +might be easier to place them into the +.BR idl.config +file described +above. Each package prefix line should be of the form: +.LP +.RS +.ft 3 +.nf +PkgPrefix.= +.fi +.ft 1 +.RE +.LP +So the line for the above example would be: +.LP +.RS +.ft 3 +.nf +PkgPrefix.Widgets=com.abc +.fi +.ft 1 +.RE +.LP +The use of this options does not affect the Repository ID. +.SH Defining Symbols Before Compilation +You may need to define a symbol for compilation that is not +defined within the IDL file, perhaps to include debugging code +in the bindings. The command +.LP +.RS +.ft 3 +.nf +idlj -d MYDEF My.idl +.fi +.ft 1 +.RE +.LP +is the equivalent of putting the line +.BR #define +.BR MYDEF +inside +.BR My.idl . +.SH +Preserving Pre-Existing Bindings +If the Java binding files already exist, the +.BI \-keep +flag will keep +the compiler from overwriting them. The default is to generate +all files without considering if they already exist. If you've +customized those files (which you should not do unless you are +very comfortable with their contents), then the +.BI \-keep +option is +very useful. The command +.LP +.RS +.ft 3 +.nf +idlj -keep My.idl +.fi +.ft 1 +.RE +.LP +emit all client-side bindings that do not already exist. +.SH Viewing Progress of Compilation +The IDL-to-Java compiler will generate status messages as it +progresses through its phases of execution. Use the +.BR -v +option to +activate this "verbose" mode: +.LP +.RS +.ft 3 +.nf +idlj -v My.idl +.fi +.ft 1 +.RE +.LP +By default the compiler does not operate in verbose mode. +.SH Displaying Version Information +To display the build version of the IDL-to-Java compiler, specify +the +.BI \-version +option on the command-line: +.LP +.RS +.ft 3 +.nf +idlj -version +.fi +.ft 1 +.RE +.LP +Version information also appears within the bindings generated +by the compiler. Any additional options appearing on the +command-line are ignored. +.SH OPTIONS +.TP +.BI \-d " symbol" +This is equivalent to the following line in an IDL file: +.LP +.RS +.ft 3 +.nf +#define symbol +.fi +.ft 1 +.RE +.TP +.BI \-emitAll +Emit all types, including those found in +.BR #include +files. +.TP +.BI \-fside +Defines what bindings to emit. +.BI side +is one of +.BR client, +.BR server, +.BR serverTIE, +.BR all, +or +.BR allTIE. The +.BR \-fserverTIE and +.BR \-fallTIE +options cause delegate model skeletons to be +emitted. Assumes +.BR \-fclient +if the flag is not specified. +.TP +.BI \-i " include-path" +By default, the current directory is scanned for included +files. This option adds another directory. +.TP +.BI \-keep +If a file to be generated already exists, do not overwrite it. +By default it is overwritten. +.TP +.BI \-noWarn +Supresses warning messages. +.TP +.BI \-oldImplBase +Generates skeletons compatible with old (pre-1.4) JDK +ORBs. By default, the POA Inheritance Model server-side +bindings are generated. This option provides +backward-compatibility with older versions of the Java +programming language by generating server-side +bindings that are +.BR ImplBase +Inheritance Model classes. +.TP +.BI \-pkgPrefix " type prefix" +Wherever +.BI type +is encountered at file scope, prefix the +generated Java package name with +.BI prefix +for all files +generated for that type. The +.BI type +is the simple name of +either a top-level module, or an IDL type defined outside +of any module. +.TP +.BI \-pkgTranslate " type package" +Wherever the type or module name +.BI type +is encountered, +replace it in the with +.BI package +for all files in the +generated Java package. Note that +.BR pkgPrefix +changes are +made first. +.BI type +is the simple name of either a top-level +module, or an IDL type defined outside of any module, +and must match the full package name exactly. Also note +that the following package names cannot be translated: +.LP +.RS +.TP 2 +\(bu org +.TP 2 +\(bu org.omg or any subpackages of org.omg +.LP +Any attempt to translate these packages will result in +uncompilable code, and the use of these packages as the +first argument after +.BR \-pkgTranslate +will be treated as an error. +.RE +.TP +.BI \-skeletonName " xxx%yyy" +Use +.BI xxx%yyy +as the pattern for naming the skeleton. The defaults are +.LP +.RS +.TP 2 +\(bu %POA for the POA base class ( +.BR \-fserver +or +.BR \-fall ) +.TP 2 +\(bu %ImplBase for the oldImplBase class ( +.BR \-oldImplBase +and ( +.BR \-fserver +or +.BR \-fall )) +.RE +.TP +.BI \-td " dir" +Use +.BI dir +for the output directory instead of the current directory. +.TP +.BI \-tieName " xxx%yyy" +Name the tie according to the pattern. The defaults are: +.LP +.RS +.TP 2 +\(bu %POATie for the POA tie base class ( +.BR \-fserverTie +or +.BR \-fallTie ) +.TP 2 +\(bu %_Tie for the +.BR oldImplBase +tie class ( +.BR \-oldImplBase +and ( +.BR \-fserverTie +or +.BR \-fallTie )) +.RE +.TP +.BI \-nowarn, \-verbose +Verbose mode. +.TP +.BI \-version +Display version information and terminate. +.LP +See the Description section for more option information. +.SH Restrictions +.LP +.TP 2 +\(bu Escaped identifiers in the global scope may not have the +same spelling as IDL primitive types, +.BR Object , +or +.BR ValueBase . +This is because the symbol table is pre-loaded +with these identifiers; allowing them to be redefined +would overwrite their original definitions. (Possible +permanent restriction). +.TP 2 +\(bu The fixed IDL type is not supported. +.SH Known Problems +None at this time. diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/appletviewer.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/appletviewer.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/appletviewer.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/appletviewer.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,78 @@ +'\" t +.\" @(#)appletviewer.1 1.9 99/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits rñÔervñÔ. +.\" +'\"macro stdmacro +.TH appletviewer 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +appletviewer \- Java ¥¢¥×¥ì¥Ã¥È¥Ó¥å¡¼¥¢ +.\" +.\" This document was created by saving an HTML file as text +.\" from the JavaSoft web site: +.\" +.\" http://java.sun.com/j2se/1.5/docs/tooldocs/tools.html +.\" +.\" and adding appropriate troff macros. Because the JavaSoft web site +.\" man pages can change without notice, it may be helpful to diff +.\" files to identify changes other than new functionality. +.\" +.SH "·Á¼°" +.BR appletviewer " [" +.BR options " ]" +.I urls ... +.SH "µ¡Ç½ÀâÌÀ" +.IX "appletviewer" "" "\fLappletviewer\fP \(em run applets" +.IX "appletviewer" "" "\fLappletviewer\fP \(em Web browser" +.B appletviewer +¥³¥Þ¥ó¥É¤Ï¡¢ +.I urls +¤Ç»ØÄꤷ¤¿¥É¥­¥å¥á¥ó¥È¤Þ¤¿¤Ï¥ê¥½¡¼¥¹¤ËÀܳ¤·¤Æ¡¢ +Æȼ«¤Î¥¦¥£¥ó¥É¥¦¾å¤Ë¤½¤Î¥É¥­¥å¥á¥ó¥È¤¬»²¾È¤·¤Æ¤¤¤ë +¸Ä¡¹¤Î¥¢¥×¥ì¥Ã¥È¤òɽ¼¨¤·¤Þ¤¹¡£ +Ãí : +.I urls +¤¬¼¨¤¹¥É¥­¥å¥á¥ó¥ÈÃæ¤Ë +.SB OBJECT +¡¢ +.SB EMBED +¡¢¤Þ¤¿¤Ï +.SB APPLET +¥¿¥°¤ò»È¤Ã¤¿¥¢¥×¥ì¥Ã¥È»²¾È¤¬Â¸ºß¤·¤Ê¤¤¾ì¹ç¡¢ +.B appletviewer +¤Ï²¿¤â¹Ô¤¤¤Þ¤»¤ó¡£ +appletviewer ¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë HTML ¥¿¥°¤Î¾ÜºÙ¤Ï¡¢ +http://java.sun.com/j2se/1.5.0/docs/tooldocs/appletviewertags.html +¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.SH "¥ª¥×¥·¥ç¥ó" +°Ê²¼¤Î¥ª¥×¥·¥ç¥ó¤¬»ÈÍѤǤ­¤Þ¤¹¡£ +.TP 15 +.B \-debug +Java +¥Ç¥Ð¥Ã¥¬ "jdb" Æâ¤Ç¥¢¥×¥ì¥Ã¥È¥Ó¥å¡¼¥¢¤òµ¯Æ°¤·¤Þ¤¹¡£ +¤³¤ì¤Ë¤è¤ê¥É¥­¥å¥á¥ó¥ÈÃæ¤Î¥¢¥×¥ì¥Ã¥È¤ò¥Ç¥Ð¥Ã¥°¤Ç¤­¤Þ¤¹¡£ +(¾ÜºÙ¤Ï +.BR jdb (1) +¤ò»²¾È)¡£ +.TP 15 +.BI \-encoding " encoding_name" +ÆþÎÏ +HTML +¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°Ì¾¤ò»ØÄꤷ¤Þ¤¹¡£ +.TP 15 +.BI \-J "javaoption" +ʸ»úÎó +.I javaoption +¤ò¡¢¥¢¥×¥ì¥Ã¥È¥Ó¥å¡¼¥¢¤ò¼Â¹Ô¤¹¤ë +Java ¥¤¥ó¥¿¥×¥ê¥¿ +¤Ë +1 +¤Ä¤Î°ú¿ô¤È¤·¤ÆÅϤ·¤Þ¤¹¡£ +°ú¿ôÃæ¤Ë¤Ï¶õÇòʸ»ú¤ò´Þ¤á¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£ +Ê£¿ô¤Î°ú¿ô¤ò»ØÄꤹ¤ë¾ì¹ç¤Ë¤Ï¡¢¤½¤ì¤¾¤ì¤ÎÀèƬ¤Ë +.BR \-J +¤òɬ¤ºÉղ䷤Ƥ¯¤À¤µ¤¤¡£¤³¤Îʸ»ú¤Ï +.BR java (1) +¤ËÅϤ¹ÆâÍƤ«¤é¤Ï¼è¤ê½ü¤«¤ì¤Þ¤¹¡£ +¤³¤Î°ú¿ô»ØÄê¤òÍѤ¤¤Æ¡¢¼Â¹Ô´Ä¶­¤ä¥³¥ó¥Ñ¥¤¥é¤Î +¥á¥â¥ê»ÈÍÑÎ̤òÍ­¸ú¤ËÄ´À°¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/apt.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/apt.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/apt.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/apt.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,119 @@ +'\" t +.\" @(#)apt.1 1.10 04/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits rñÔervñÔ. +.\" +.TH apt 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +apt \- Ãí¼á½èÍý¥Ä¡¼¥ë +.\" +.SH "·Á¼°" +.B apt +.BI [\-classpath " classpath"] +.BI [\-sourcepath " sourcepath"] +.BI [\-d " directory"] +.BI [\-s " directory"] +.BI [\-factorypath " path"] +.BI [\-factory " class"] +.B [\-print] +.B [\-nocompile] +.B [\-Akey[=val] ...] +.BI [javac option] +.BI sourcefiles +.BI [@files] +.SH "µ¡Ç½ÀâÌÀ" +Ãí¼á½èÍý¥Ä¡¼¥ë +.B apt +¤Ë¤Ï¡¢¥×¥í¥°¥é¥àÃí¼á¤ò½èÍý¤¹¤ë¤¿¤á¤Î°ìÏ¢¤Î +¿·¤·¤¤¥ê¥Õ¥ì¥¯¥·¥ç¥ó API ¤È¥¤¥ó¥Õ¥é¥¹¥È¥é¥¯¥Á¥ã¥µ¥Ý¡¼¥È¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +.B apt +¤Î¥ê¥Õ¥ì¥¯¥·¥ç¥ó API ¤Ç¤Ï¡¢¥×¥í¥°¥é¥à¹½Â¤¤Î¥Ó¥å¡¼¤¬¡¢ +¥Ó¥ë¥É»þ¤Î¥½¡¼¥¹¥Ù¡¼¥¹¤ÎÆɤ߼è¤êÀìÍѤȤ·¤ÆÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +¤³¤ì¤é¤Î¥ê¥Õ¥ì¥¯¥·¥ç¥ó API ¤Ï¡¢Áí¾Î·¿¤ÎÄɲøå¤Ë¡¢ +Java(TM) ¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤Î·¿¥·¥¹¥Æ¥à¤ò +¤ï¤«¤ê¤ä¤¹¤¯¥â¥Ç¥ë²½¤Ç¤­¤ë¤è¤¦¤ËÀ߷פµ¤ì¤Þ¤·¤¿¡£ +¤Ï¤¸¤á¤Ë¡¢ +.B apt +¤ÏÃí¼á¥×¥í¥»¥Ã¥µ¤ò¼Â¹Ô¤·¤Þ¤¹¡£¤³¤ÎÃí¼á¥×¥í¥»¥Ã¥µ¤Ç¤Ï¡¢ +¿·µ¬¤Î¥½¡¼¥¹¥³¡¼¥É¤ª¤è¤Ó¤½¤Î¾¤Î¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ +¼¡¤Ë¡¢¥ª¥ê¥¸¥Ê¥ë¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÈÀ¸À®¤·¤¿¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÎξÊý¤ò¥³¥ó¥Ñ¥¤¥ë¤·¡¢ +³«È¯¤òÍưפˤ·¤Þ¤¹¡£¥Ä¡¼¥ë¤ÈÂÐÏ乤뤿¤á¤Î¥ê¥Õ¥ì¥¯¥·¥ç¥ó API ¤È +¤½¤Î¾¤Î API ¤Ï¡¢ +.B com.sun.mirror +¤Î¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¤Ç¤¹¡£ +.LP +.B apt +¤Ë¤è¤ë¥Ä¡¼¥ë¤ÎÁàºîÊýË¡¤È³«È¯¼ê½ç¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢ +http://java.sun.com/j2se/1.5.0/docs/guide/apt/GettingStarted.html +¤Î¡ÖGetting Started with apt¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.SH "¥Ñ¥é¥á¡¼¥¿" +¥ª¥×¥·¥ç¥ó¤ÏǤ°Õ¤Î½ç½ø¤Ç»ÈÍѤǤ­¤Þ¤¹¡£ÆÃÄê¤Î¥ª¥×¥·¥ç¥ó¤ËŬÍѤµ¤ì¤ë +¥Ñ¥é¥á¡¼¥¿¤Ë¤Ä¤¤¤Æ¤Ï¡¢¸å½Ò¤Î¡Ö¥ª¥×¥·¥ç¥ó¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.if t .TP 20 +.if n .TP 15 +.I sourcefiles +½èÍý¤µ¤ì¤ë 0 ¸Ä°Ê¾å¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¡£ +.if t .TP 20 +.if n .TP 15 +.I @files +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï¤½¤Î¾¤Î¥ª¥×¥·¥ç¥ó¤ò¥ê¥¹¥È¤¹¤ë 1 ¸Ä°Ê¾å¤Î¥Õ¥¡¥¤¥ë¡£ +.SH "¥ª¥×¥·¥ç¥ó" +.SS apt ¸ÇÍ­¤Î¥ª¥×¥·¥ç¥ó +.if t .TP 20 +.if n .TP 15 +.BI \-s " dir" +¥×¥í¥»¥Ã¥µ¤¬À¸À®¤¹¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬ÇÛÃÖ¤µ¤ì¤ë¥Ç¥£¥ì¥¯¥È¥ê¥ë¡¼¥È¤ò +»ØÄꤷ¤Þ¤¹¡£¥Õ¥¡¥¤¥ë¤Ï¥Ñ¥Ã¥±¡¼¥¸¤Î¥Í¡¼¥à¥¹¥Ú¡¼¥¹¤Ë½¾¤Ã¤Æ¡¢ +¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤ËÇÛÃÖ¤µ¤ì¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-nocompile +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Ë¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤»¤ó¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-print +»ØÄꤷ¤¿·¿¤Î¥Æ¥­¥¹¥Èɽ¸½¤ò½ÐÎϤ·¤Þ¤¹¡£ +Ãí¼á½èÍý¤ä¥³¥ó¥Ñ¥¤¥ë¤Ï¼Â¹Ô¤·¤Þ¤»¤ó¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-A[key[=val]] +Ãí¼á¥×¥í¥»¥Ã¥µ¤ËÅϤµ¤ì¤ë¥ª¥×¥·¥ç¥ó¡£ +.B apt +¤Ï¡¢¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤òľÀܲò¼á¤·¤Þ¤»¤ó¤¬¡¢¸ÄÊÌ¤Î¥×¥í¥»¥Ã¥µ +¤Ë¤è¤Ã¤Æ»ÈÍѲÄǽ¤Ë¤Ê¤ê¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-factorypath " path" +Ãí¼á¥×¥í¥»¥Ã¥µ¥Õ¥¡¥¯¥È¥ê¤ò¸¡º÷¤¹¤ë¾ì½ê¤ò»ØÄꤷ¤Þ¤¹¡£ +¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ë¾ì¹ç¡¢¥Õ¥¡¥¯¥È¥ê¤Î¸¡º÷¤Ë +¥¯¥é¥¹¥Ñ¥¹¤Ï»ÈÍѤµ¤ì¤Þ¤»¤ó¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-factory " classname" +»ÈÍѤ¹¤ëÃí¼á¥×¥í¥»¥Ã¥µ¥Õ¥¡¥¯¥È¥ê¤Î̾Á°¡£ +¥Ç¥Õ¥©¥ë¥È¤Î¸¡½Ð½èÍý¤Ï¥Ð¥¤¥Ñ¥¹¤µ¤ì¤Þ¤¹¡£ +.SS javac ¤È¶¦Í­¤µ¤ì¤ë¥ª¥×¥·¥ç¥ó +.if t .TP 20 +.if n .TP 15 +.BI \-d " dir" +¥×¥í¥»¥Ã¥µ¤ª¤è¤Ó +.B javac +¤¬À¸À®¤·¤¿¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÇÛÃÖ¤¹¤ë¾ì½ê¤ò»ØÄꤷ¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-cp " path " \fL¤Þ¤¿¤Ï\fP \fL\-classpath " path" +¥æ¡¼¥¶¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ª¤è¤ÓÃí¼á¥×¥í¥»¥Ã¥µ¥Õ¥¡¥¯¥È¥ê¤ò¸¡º÷¤¹¤ë¾ì½ê¤ò +»ØÄꤷ¤Þ¤¹¡£ +.B \-factorypath +¤ò»ØÄꤷ¤¿¾ì¹ç¡¢¥Õ¥¡¥¯¥È¥ê¤Î¸¡º÷¤Ë¥¯¥é¥¹¥Ñ¥¹¤Ï»ÈÍѤµ¤ì¤Þ¤»¤ó¡£ +.LP +javac ¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Ï¡¢ +.BR javac(1) +¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.SH Ãí°Õ»ö¹à +.B apt +¥Ä¡¼¥ë¤ª¤è¤Ó´ØÏ¢¤¹¤ë API ¤Ï¡¢¾­Íè¤Î J2SE ¥ê¥ê¡¼¥¹¤Ç +Êѹ¹¤Þ¤¿¤ÏÇѻߤµ¤ì¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£ +.SH "´ØÏ¢¹àÌÜ" +.BR javac (1), +.BR java (1) diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/extcheck.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/extcheck.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/extcheck.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/extcheck.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,79 @@ +'\" t +.\" @(#)extcheck.1 1.8 99/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits r\351serv\351s. +.\" ` +'\"macro stdmacro +.TH extcheck 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +extcheck \- jar ¤Î¶¥¹ç¸¡½Ð¥æ¡¼¥Æ¥£¥ê¥Æ¥£ +.SH "·Á¼°" +.B extcheck +[ +.B \-verbose +] +[ +.BI \-J "option" +] +.I targetfile.jar +.SH "µ¡Ç½ÀâÌÀ" +.IX "jar conflict detection utility" "" "jar conflict detection utility \(em \fLextcheck\fP" +.IX "extcheck" "" "\fLextcheck\fP \(em jar conflict detection utility" +.B extcheck +¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢»ØÄꤵ¤ì¤¿ +.B jar +¥Õ¥¡¥¤¥ë¤Î¥¿¥¤¥È¥ë¤ª¤è¤Ó¥Ð¡¼¥¸¥ç¥ó¤¬ JDK +¥½¥Õ¥È¥¦¥§¥¢¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë³ÈÄ¥µ¡Ç½¤È¶¥¹ç¤·¤Æ¤¤¤Ê¤¤¤«¤ò +¸¡ºº¤·¤Þ¤¹¡£ +³ÈÄ¥µ¡Ç½¤ò¥¤¥ó¥¹¥È¡¼¥ë¤¹¤ëÁ°¤Ë¡¢¤³¤Î¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»È¤Ã¤Æ¡¢ +¥Ð¡¼¥¸¥ç¥ó¤¬Æ±¤¸¤«¡¢ +¤è¤ê¿·¤·¤¤³ÈÄ¥µ¡Ç½¤¬¤¹¤Ç¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤¤«¤É¤¦¤«¤òÄ´¤Ù¤ë +¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +.B extcheck +¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢ +.I targetfile.jar +¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥ÈÆâ¤Î¥Ø¥Ã¥À Specification-title ¤ª¤è¤Ó +Specification-version +¤ò¡¢³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î jar +¥Õ¥¡¥¤¥ëÆâ¤ÎÂбþ¤¹¤ë¥Ø¥Ã¥À¤ÈÈæ³Ó¤·¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢ +.B jre/lib/ext +¤Ç¤¹¡£ +.B extcheck +¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ï¡¢ +.BR java.lang.Package.isCompatibleWith +¥á¥½¥Ã¥É¤ÈƱÍͤÎÊýË¡¤Ç¥Ð¡¼¥¸¥ç¥óÈÖ¹æ¤òÈæ³Ó¤·¤Þ¤¹¡£ +.LP +¶¥¹ç¤¬¸¡½Ð¤µ¤ì¤Ê¤¤¾ì¹ç¡¢¥ê¥¿¡¼¥ó¥³¡¼¥É¤Ï 0 ¤Ç¤¹¡£ +.LP +³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î +.B jar +¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Ë¡¢Æ±°ì¤Î Specification-title¡¢ +¤ª¤è¤ÓƱ°ì¤Þ¤¿¤Ï¤è¤ê¿·¤·¤¤ Specification-version Èֹ椬¤¢¤ë¾ì¹ç¡¢¥¼¥í¤Ç¤Ê¤¤¥¨¥é¡¼ +¥³¡¼¥É¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£ +.I targetfile.jar +¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Ë Specification-title ¤Þ¤¿¤Ï +Specification-version °À­¤¬¤Ê¤¤¾ì¹ç¤â¡¢¥¼¥í¤Ç¤Ê¤¤¥¨¥é¡¼¥³¡¼¥É¤¬ÊÖ¤µ¤ì¤Þ¤¹¡£ +.SH "¥ª¥×¥·¥ç¥ó" +°Ê²¼¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄê¤Ç¤­¤Þ¤¹¡£ +.TP 15 +.B -verbose +³ÈÄ¥µ¡Ç½¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î +.B jar +¥Õ¥¡¥¤¥ë¤ò¡¢¸¡ºº»þ¤Ë°ìÍ÷ɽ¼¨¤·¤Þ¤¹¡£¤Þ¤¿¡¢¥¿¡¼¥²¥Ã¥È +.B jar +¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Î°À­¡¢¤ª¤è¤Ó¶¥¹ç¤¹¤ë +.B jar +¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¤âÊó¹ð¤·¤Þ¤¹¡£ +.TP 15 +.BI \-J "option" +.I option +¤ò Java ²¾ÁÛ¥Þ¥·¥ó¤ËÅϤ·¤Þ¤¹¡£¤³¤³¤Ç¡¢ +.I option +¤Ï¡¢Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥óµ¯Æ°¥×¥í¥°¥é¥à java(1) ¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ç +ÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¥ª¥×¥·¥ç¥ó¤Î 1 ¤Ä¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢ +.I \-J-Xms48m +¤Ï¡¢µ¯Æ°»þ¤Ë»ÈÍѤ¹¤ë¥á¥â¥ê¤ò 48M ¥Ð¥¤¥È¤ËÀßÄꤷ¤Þ¤¹¡£ +.SH "´ØÏ¢¹àÌÜ" +.BR jar (1) diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/idlj.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/idlj.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/idlj.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/idlj.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,762 @@ +'\" t +.\" @(#)idlj.1 1.20 01/03/10 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits riservis. +.\" +.TH idlj 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +idlj - IDL-to-Java ¥³¥ó¥Ñ¥¤¥é (RMI-IIOP ¥Ð¡¼¥¸¥ç¥ó) +.LP +.B idlj +¤Ï¡¢»ØÄꤵ¤ì¤¿ IDL ¥Õ¥¡¥¤¥ë¤«¤é Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤·¤Þ¤¹¡£ +.SH "·Á¼°" +.B idlj +[ +.IB options +] +.B idl-file +.LP +.BR idl-file +¤Ë¤Ï¡¢Interface Definition Language (IDL) ÄêµÁ¤¬³ÊǼ¤µ¤ì¤Æ¤¤¤ë +¥Õ¥¡¥¤¥ë¤Î̾Á°¤ò»ØÄꤷ¤Þ¤¹¡£ +.BR Options +¤ÏǤ°Õ¤Î½ç½ø¤Ç»ØÄê¤Ç¤­¤Þ¤¹¤¬¡¢ +.BR idl-file +¤è¤ê¤âÁ°¤Ë»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.SH "µ¡Ç½ÀâÌÀ" +IDL-to-Java ¥³¥ó¥Ñ¥¤¥é¤Ï¡¢»ØÄꤵ¤ì¤¿ IDL ¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ Java +¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤·¤Þ¤¹¡£¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Î¾ÜºÙ¤Ï¡¢¡ØOMG IDL +to Java Language Mapping Specification¡Ù¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +IDL-to-Java ¥³¥ó¥Ñ¥¤¥é¤Îµì¥ê¥ê¡¼¥¹¤Î¤Ê¤«¤Ë¤Ï¡¢ +.BR idltojava ¤È¤¤¤¦Ì¾Á°¤¬ÉÕ¤±¤é¤ì¤Æ¤¤¤¿¤â¤Î¤¬¤¢¤ê¤Þ¤¹¡£ +.SH "¥¯¥é¥¤¥¢¥ó¥È¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤È¥µ¡¼¥Ð¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Îȯ¹Ô" +.BR My.idl +¤È¤¤¤¦Ì¾Á°¤Î IDL ¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À® +¤¹¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj My.idl +.fi +.ft 1 +.RE +.LP +¥¯¥é¥¤¥¢¥ó¥È¦¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤¹¤ë¾åµ­¤Î¥³¥Þ¥ó¥É¤Ï¡¢ +¼¡¤Î¤è¤¦¤Ë¤â»ØÄê¤Ç¤­¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj -fclient My.idl +.fi +.ft 1 +.RE +.LP +¥¯¥é¥¤¥¢¥ó¥È¦¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ë¤Ï¡¢¥µ¡¼¥Ð¦¤Î¥¹¥±¥ë¥È¥ó¤Ï +¼è¤ê¹þ¤Þ¤ì¤Æ¤¤¤Þ¤»¤ó¡£¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ËÂФ·¤Æ¥µ¡¼¥Ð¦¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥° +¤òÀ¸À®¤¹¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj -fserver My.idl +.fi +.ft 1 +.RE +.LP +¥µ¡¼¥Ð¦¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ë¤Ï¡¢¥¯¥é¥¤¥¢¥ó¥È¦¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Î¤Û¤« +¤Ë¥¹¥±¥ë¥È¥ó¤¬¼è¤ê¹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤é¤Ï¤¹¤Ù¤Æ¡¢POA (·Ñ¾µ¥â¥Ç¥ë) +¥¯¥é¥¹¤Ç¤¹¡£¥¯¥é¥¤¥¢¥ó¥È¦¤È¥µ¡¼¥Ð¦¤ÎξÊý¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤¹¤ë +¤Ë¤Ï¡¢°Ê²¼¤ÎÅù²Á¥³¥Þ¥ó¥É¤Î¤É¤Á¤é¤«°ìÊý¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.RS +.ft 3 +.nf +idlj -fclient -fserver My.idl +.br +idlj -fall My.idl +.fi +.ft 1 +.RE +.LP +¥µ¡¼¥Ð¦¥â¥Ç¥ë¤È¤·¤Æ¤Ï¡¢·Ñ¾µ¥â¥Ç¥ë¤È Tie ¥â¥Ç¥ë¤Î 2 ¼ïÎà¤ò +ÍøÍѤǤ­¤Þ¤¹¡£ +.LP +1.4 ¤Ë¤ª¤±¤ë¿·µ¡Ç½: ¥Ç¥Õ¥©¥ë¥È¤Î¥µ¡¼¥Ð¦¥â¥Ç¥ë¤Ï¡¢ +.BI Portable +.BI Servant +.BI Inheritance +.BI Model +¤Ç¤¹¡£ +.BR My.idl +¤Ç¥¤¥ó¥¿¥Õ¥§¡¼¥¹ My ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤È¡¢¥Õ¥¡¥¤¥ë +.BR MyPOA.java ¤¬À¸À®¤µ¤ì¤Þ¤¹¡£¥æ¡¼¥¶¤Ï¡¢ +.BR My ¤ËÂФ·¤Æ¤½¤Î¼ÂÁõ¤òÄ󶡤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¼ÂÁõ¤Ï¡¢ +.BR MyPOA ¤«¤é·Ñ¾µ¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +.LP +.BR MyPOA.java ¤Ï¡¢ +.BR org.omg.PortableServer.Servant +¤ò³ÈÄ¥¤¹¤ë¥¹¥È¥ê¡¼¥à¥Ù¡¼¥¹¤Î¥¹¥±¥ë¥È¥ó¤Ç¤¢¤ê¡¢¤³¤Î¥¹¥±¥ë¥È¥ó¤¬¼ÂÁõ¤¹¤ë +IDL ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ë´ØÏ¢¤·¤¿ +.BR InvokeHandler +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤È¥ª¥Ú¥ì¡¼¥·¥ç¥ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò¼ÂÁõ¤·¤Þ¤¹¡£ +.LP +Portable Object Adapter (POA) ¤Î +.BR PortableServer +¥â¥¸¥å¡¼¥ë¤Ï¡¢¥Í¥¤¥Æ¥£¥Ö Servant ·¿¤òÄêµÁ¤·¤Þ¤¹¡£Java ¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤Ç¤Ï¡¢ +.BR Servant +·¿¤Ï¡¢Java +.BR org.omg.PortableServer.Servant +¥¯¥é¥¹¤Ë¥Þ¥Ã¥×¤µ¤ì¤Þ¤¹¡£¤³¤ì¤Ï¤¹¤Ù¤Æ¤Î +.BR (POA) +¥µ¡¼¥Ð¥ó¥È¼ÂÁõ¤Î´ðÄ쥯¥é¥¹¤È¤·¤Æµ¡Ç½¤·¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó³«È¯¼Ô¤¬¸Æ¤Ó½Ð¤»¤ë +¿¿ô¤Î¥á¥½¥Ã¥É¤òÄ󶡤·¤Þ¤¹¡£¤Þ¤¿¡¢POA ¼«ÂΤ¬¸Æ¤Ó½Ð¤·¤¿¤ê¡¢¥µ¡¼¥Ð¥ó¥ÈÆ°ºî¤ò +À©¸æ¤¹¤ë¤¿¤á¤Ë¥æ¡¼¥¶¤¬¾å½ñ¤­¤·¤¿¤ê¤Ç¤­¤ë¥á¥½¥Ã¥É¤âÄ󶡤·¤Þ¤¹¡£ +.LP +·Ñ¾µ¥â¥Ç¥ë¤Ë¤Ï¡¢µì¥Ð¡¼¥¸¥ç¥ó¤Î Java ¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì (J2SE 1.4 ¤è¤êÁ°) +¤È¸ß´¹À­¤Î¤¢¤ë¥µ¡¼¥Ð¦¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤¹¤ë¤¿¤á¤Ë +.BR -oldImplBase +¥Õ¥é¥°¤ò»ÈÍѤ¹¤ë¤È¤¤¤¦¥ª¥×¥·¥ç¥ó¤â¤¢¤ê¤Þ¤¹¡£²¼°Ì¸ß´¹¤ò°Ý»ý¤·¤¿¥µ¡¼¥Ð¦ +¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤¹¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj -fclient -fserver -oldImplBase My.idl +.br +idlj -fall -oldImplBase My.idl +.fi +.ft 1 +.RE +.LP +.BR My.idl +Æâ¤Ç¥¤¥ó¥¿¥Õ¥§¡¼¥¹ My ¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤È¡¢¥Õ¥¡¥¤¥ë +.BR _MyImpleBase.java +¤¬À¸À®¤µ¤ì¤Þ¤¹¡£¥æ¡¼¥¶¤Ï¡¢ +.BR My +¤ËÂФ·¤Æ¤½¤Î¼ÂÁõ¤òÄ󶡤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¼Â¾Ú¤Ï¡¢ +.BR _MyImplBase + ¤«¤é·Ñ¾µ¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +.LP +¤â¤¦°ìÊý¤Î¥µ¡¼¥Ð¦¥â¥Ç¥ë¤Ï¡¢Tie ¥â¥Ç¥ë¤È¸Æ¤Ð¤ì¤Þ¤¹¡£¤³¤ì¤Ï¡¢ +°Ñ¾ù¥â¥Ç¥ë¤Ç¤¹¡£Tie ¥â¥Ç¥ë¤Ï Tie ¤È¥¹¥±¥ë¥È¥ó¤òƱ»þ¤Ë¤ÏÀ¸À® +¤Ç¤­¤Ê¤¤¤¿¤á¡¢¤³¤ì¤é¤ÏÊÌ¡¹¤ËÀ¸À®¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¼¡¤Î¥³ +¥Þ¥ó¥É¤Ï¡¢Tie ¥â¥Ç¥ë¤ËÂФ·¤Æ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj -fall My.idl +.br +idlj -fallTIE My.idl +.fi +.ft 1 +.RE +.LP +¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +.BR My +¤Î¾ì¹ç¡¢2 ¤Ä¤á¤Î¥³¥Þ¥ó¥É¤Ï +.BR MyPOATie.java + ¤òÀ¸À®¤·¤Þ¤¹¡£ +.BR MyPOATie +¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¤Ï¡¢delegate ¤ò¼õ¤±¼è¤ê¤Þ¤¹¡£¥æ¡¼¥¶¤Ï¡¢delegate +¤ËÂФ·¤Æ¼ÂÁõ¤òÄ󶡤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤¿¤À¤·¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +.BR MyOperations +¤ò·Ñ¾µ¤¹¤ì¤Ð¤è¤¯¡¢¤Û¤«¤Î¥¯¥é¥¹¤«¤é·Ñ¾µ¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£ +¤·¤«¤·¡¢¤³¤Î¼ÂÁõ¤ò ORB ¤È¶¦¤Ë»ÈÍѤ¹¤ë¤Ë¤Ï¡¢ +.BR MyPOATie +Æâ¤Ë¼ÂÁõ¤ò¥é¥Ã¥×¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£Îã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +MyImpl myImpl = new MyImpl (); +.br +My POATie tie = new MyPOATie (myImpl); +.br +orb.connect (tie); +.fi +.ft 1 +.RE +.LP +¼ÂÁõ¤ò¤Û¤«¤Î¼ÂÁõ¤«¤é·Ñ¾µ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¾ì¹ç¤Ï¡¢É¸½à¤Î·Ñ¾µ¥â¥Ç¥ë +¤ÎÂå¤ï¤ê¤Ë Tie ¥â¥Ç¥ë¤ò»ÈÍѤ¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£Java ¤ÏǤ°Õ¤Î¿ô¤Î +¥¤¥ó¥¿¥Õ¥§¡¼¥¹·Ñ¾µ¤òǧ¤á¤Æ¤¤¤Þ¤¹¤¬¡¢¥¯¥é¥¹¤Î·Ñ¾µ¤Ë»ÈÍѤǤ­¤ë +¥¹¥í¥Ã¥È¤Ï 1 ¤Ä¤À¤±¤Ç¤¹¡£·Ñ¾µ¥â¥Ç¥ë¤ò»ÈÍѤ¹¤ë¤È¡¢¤³¤Î¥¹¥í¥Ã¥È¤¬Àê +Í­¤µ¤ì¤Þ¤¹¡£Tie ¥â¥Ç¥ë¤ò»ÈÍѤ¹¤ë¤È¡¢¥¹¥í¥Ã¥È¤ò¥æ¡¼¥¶¼«¿È¤Î»ÈÍѤΠ+¤¿¤á¤Ë²òÊü¤Ç¤­¤Þ¤¹¡£¤¿¤À¤·¡¢°ìÄê¥ì¥Ù¥ë¤Î´ÖÀÜ»²¾È¤ò°ú¤­µ¯¤³¤¹¤È +¤¤¤¦·çÅÀ¤¬¤¢¤ê¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤¹¤È¡¢Í¾Ê¬¤Ê¥á¥½¥Ã¥É¸Æ +¤Ó½Ð¤·¤¬ 1 ¤ÄȯÀ¸¤·¤Þ¤¹¡£ +.LP +1.4 ¤è¤ê¤âÁ°¤Î J2SE ¥Ð¡¼¥¸¥ç¥ó¤Çµì¥Ð¡¼¥¸¥ç¥ó¤Î IDL-to-Java ¸À¸ì +¥Þ¥Ã¥Ô¥ó¥°¤È¸ß´¹À­¤¬¤¢¤ë¥µ¡¼¥Ð¦¤Î Tie ¥â¥Ç¥ë¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À® +¤¹¤ë¤Ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj -oldImplBase -fall My.idl +.br +idlj -oldImplBase -fallTIE My.idl +.fi +.ft 1 +.RE +.LP +¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +.BR My +¤Î¾ì¹ç¡¢¤³¤Î¥³¥Þ¥ó¥É¤Ï +.BR My_Tie.java +¤òÀ¸À®¤·¤Þ¤¹¡£ +.BR My_Tie +¤Î¥³¥ó¥¹¥È¥é¥¯¥¿¤Ï¡¢ +.BR impl +¤ò¼õ¤±¼è¤ê¤Þ¤¹¡£¥æ¡¼¥¶¤Ï¡¢ +.BR impl +¤ËÂФ·¤Æ¼ÂÁõ¤òÄ󶡤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤¿¤À¤·¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +.BR HelloOperations +¤ò·Ñ¾µ¤¹¤ì¤Ð¤è¤¯¡¢¤Û¤«¤Î¥¯¥é¥¹¤«¤é·Ñ¾µ¤¹¤ëɬÍפϤ¢¤ê¤Þ¤»¤ó¡£ +¤·¤«¤·¡¢¤³¤Î¼ÂÁõ¤ò ORB ¤È¶¦¤Ë»ÈÍѤ¹¤ë¤Ë¤Ï¡¢ +.BR My_Tie + Æâ¤Ë¼ÂÁõ¤ò¥é¥Ã¥×¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£Îã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +MyImpl myImpl = new MyImpl (); +.br +My_Tie tie = new My_Tie (myImpl); +.br +orb.connect (tie); +.fi +.ft 1 +.RE +.LP +.SH "ȯ¹Ô¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ÎÂåÂؾì½ê¤Î»ØÄê" +.br +ȯ¹Ô¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤ò¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê°Ê³°¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ËÊݸ¤·¤¿¤¤¾ì¹ç¤Ï¡¢ +¼¡¤Î¤è¤¦¤Ë¥³¥ó¥Ñ¥¤¥é¤ò¸Æ¤Ó½Ð¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.RS +.ft 3 +.nf +idlj -td /altdir My.idl +.fi +.ft 1 +.RE +.LP +¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +.BR My +¤Î¾ì¹ç¡¢¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Ï +.BR ./My.java + ¤Ç¤Ï¤Ê¤¯ +.BR /altdir/My.java +¤Ê¤É¤ËÂФ·¤Æȯ¹Ô¤µ¤ì¤Þ¤¹¡£ +.SH "¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤ÎÂåÂؾì½ê¤Î»ØÄê" +.BR My.idl +¤Ë¤Û¤«¤Î idl ¥Õ¥¡¥¤¥ë¡¢ +.BR MyOther.idl +¤¬¼è¤ê¹þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¥³¥ó¥Ñ¥¤¥é¤Ï +.BR MyOther.idl +¤¬¥í¡¼¥«¥ë¥Ç¥£¥ì¥¯¥È¥ê¤Ë¸ºß¤¹¤ë¤È¸«¤Ê¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢ +.BR MyOther.idl +¤¬ +.BR /includes +¤Ë¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢¼¡¤Î¥³¥Þ¥ó¥É¤Ç¥³¥ó¥Ñ¥¤¥é¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj -i /includes My.idl +.fi +.ft 1 +.RE +.LP +.BR ¤¿¤È¤¨¤Ð¡¢My.idl ¤¬ +.BR /moreIncludes +¤Ë¸ºß¤¹¤ë +.BR Another.idl +¤â¼è¤ê¹þ¤ó¤Ç¤¤¤ë¾ì¹ç¤Ï¡¢¼¡¤Î¥³¥Þ¥ó¥É¤Ç¥³¥ó¥Ñ¥¤¥é¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +idlj -i /includes -i /moreIncludes My.idl +.fi +.ft 1 +.RE +.LP +¤³¤Î·Á¼°¤Ç¥Õ¥¡¥¤¥ë¤ò¼è¤ê¹þ¤à¤È¡¢¥³¥Þ¥ó¥É¤¬Èó¾ï¤ËŤ¯¤Ê¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ +¤³¤Î¤¿¤á¡¢¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤Î¸¡º÷¾ì½ê¤ò¥³¥ó¥Ñ¥¤¥é¤ËÃΤ餻¤ëÊýË¡¤¬ +Ê̤ËÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤ÎÊýË¡¤Ï¡¢´Ä¶­ÊÑ¿ô¤Î³µÇ°¤Ë»÷¤Æ¤¤¤Þ¤¹¡£¤Þ¤º¡¢ +CLASSPATH ¤Ë¥ê¥¹¥È¤µ¤ì¤Æ¤¤¤ë¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë¡¢ +.BR idl.config +¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£¤½¤·¤Æ¡¢ +.BR idl.config +Æâ¤Ë¼¡¤Î·Á¼°¤Î¹Ô¤ò 1 ¤ÄºîÀ®¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +includes=/includes;/moreIncludes +.fi +.ft 1 +.RE +.LP +¥³¥ó¥Ñ¥¤¥é¤Ï¤³¤Î¥Õ¥¡¥¤¥ë¤ò¸«¤Ä¤±¡¢¥¤¥ó¥¯¥ë¡¼¥É¥ê¥¹¥È¤ËÆɤ߹þ¤ß¤Þ¤¹¡£ +¤³¤ÎÎã¤Ç¤Ï 2 ¤Ä¤Î¥Ç¥£¥ì¥¯¥È¥ê´Ö¤Î¶èÀÚ¤êʸ»ú¤Ï¥»¥ß¥³¥í¥ó (;) ¤Ç¤¢¤ë¤³¤È +¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤Î¶èÀÚ¤êʸ»ú¤Ï¡¢NT ¤Ç¤Ï¥»¥ß¥³¥í¥ó¡¢Solaris ¤Ç¤Ï +¥³¥í¥ó¤È¤¤¤¦¤è¤¦¤Ë¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ë¤è¤Ã¤Æ°Û¤Ê¤ê¤Þ¤¹¡£¥¤¥ó¥¯¥ë¡¼¥É¤Î¾Ü +ºÙ¤Ï¡¢CLASSPATH (Solaris)¡¢CLASSPATH (Linux)¡¢CLASSPATH (Windows) +¤Î¥É¥­¥å¥á¥ó¥È¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.SH "¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤ËÂФ¹¤ë¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤Îȯ¹Ô" +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥³¥Þ¥ó¥É¹Ô idl ¥Õ¥¡¥¤¥ë¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢ +¹½Â¤ÂΤʤɤËÂФ·¤Æ¤Î¤ß¡¢Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤¬À¸À®¤µ¤ì¤Þ¤¹¡£¥¤¥ó¥¯¥ë¡¼¥É +¥Õ¥¡¥¤¥ë¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¥¿¥¤¥×¤Î Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ÏÀ¸À®¤µ¤ì¤Þ¤»¤ó¡£ +Îã¤È¤·¤Æ¡¢¼¡¤Î 2 ¤Ä¤Î idl ¥Õ¥¡¥¤¥ë¤ò¹Í¤¨¤Æ¤ß¤Þ¤·¤ç¤¦¡£ +.TP +.B My.idl +.LP +.RS +#include +.br +interface My +.br +{ +.br +}; +.RE +.TP +.B MyOther.idl +.LP +.RS +interface MyOther +.br +{ +.br +}; +.RE +.LP +¼¡¤Î¥³¥Þ¥ó¥É¤Ï¡¢ +.BR My +¤ËÂФ¹¤ë Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤·¤«À¸À®¤·¤Þ¤»¤ó¡£ +.LP +.RS +.ft 3 +.nf +idlj My.idl +.fi +.ft 1 +.RE +.LP +.BR My.idl +Æâ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥¿¥¤¥×¡¢¤ª¤è¤Ó +.BR My.idl +¤Ë¼è¤ê¹þ¤Þ¤ì¤Æ¤¤¤ë¥Õ¥¡¥¤¥ë (¤³¤ÎÎã¤Ç¤Ï +.BR MyOther.idl +) Æâ¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥¿¥¤¥×¤òÀ¸À®¤¹¤ë¤Ë¤Ï¡¢ +¼¡¤Î¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.RS +.ft 3 +.nf +idlj -emitAll My.idl +.fi +.ft 1 +.RE +.LP +¤³¤Î¥Ç¥Õ¥©¥ë¥È¤Îµ¬Â§¤Ë¤Ä¤¤¤Æ¤Ï¡¢¼¡¤ÎÅÀ¤ËÃí°Õ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +¥°¥í¡¼¥Ð¥ë¥¹¥³¡¼¥×¤Ë½Ð¸½¤¹¤ë +.BR #include +ʸ¤Ï¡¢µ­½Ò¤É¤ª¤ê¤Ë½èÍý¤µ¤ì¤Þ¤¹¡£¤³¤ì¤é¤Î +.BR #include +ʸ¤Ï¡¢¥¤¥ó¥Ý¡¼¥Èʸ¤È¸«¤Ê¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£°ìÉô¤Î°Ï¤ß¥¹¥³¡¼¥×Æâ¤Ë +½Ð¸½¤¹¤ë #include ʸ¤Ï¡¢Ä̾ï¤Î +.BR #include +ʸ¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ëÆâ¤Î¥³¡¼¥É¤Ï +¥ª¥ê¥¸¥Ê¥ë¥Õ¥¡¥¤¥ëÆâ¤Ë½Ð¸½¤·¤Æ¤¤¤ë¤«¤Î¤è¤¦¤Ë°·¤ï¤ì¡¢¤³¤ì¤Ë +ÂФ·¤Æ Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤¬È¯¹Ô¤µ¤ì¤Þ¤¹¡£Îã¤ò¼¨¤·¤Þ¤¹¡£ +.TP +.B My.idl +.LP +.RS +#include +.br +interface My +.br +{ +.br + #include +.br +}; +.RE +.TP +.B MyOther.idl +.LP +.RS +interface MyOther +.br +{ +.br +}; +.RE +.TP +.B Embedded.idl +.LP +.RS +enum E {one, two, three}; +.RE +.LP +¼¡¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤È¡¢ +.LP +.RS +.ft 3 +.nf +idlj My.idl +.fi +.ft 1 +.RE +.LP +°Ê²¼¤Î Java ¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +./MyHolder.java +./MyHelper.java +./_MyStub.java +./MyPackage +./MyPackage/EHolder.java +./MyPackage/EHelper.java +./MyPackage/E.java +./My.java +.fi +.ft 1 +.RE +.LP +.BR MyOther.java +¤ÏÀ¸À®¤µ¤ì¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ì¤Ï¡¢¥¤¥ó¥Ý¡¼¥È¤ËÎà»÷¤·¤¿ +.BR #include +¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤¿¤á¤Ç¤¹¡£¤·¤«¤·¡¢Ä̾ï¤Î +.BR #include +¤ËÄêµÁ¤µ¤ì¤¿ +.BR E.java +¤ÏÀ¸À®¤µ¤ì¤Þ¤¹¡£ +.BR Embedded.idl +¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹ My ¤Î¥¹¥³¡¼¥×Æâ¤Ë¼è¤ê¹þ¤Þ¤ì¤Æ¤¤¤ë¤¿¤á¡¢ +.BR My +¤Î¥¹¥³¡¼¥×Æâ (¤Ä¤Þ¤ê +.BR MyPackage +) ¤ËÀ¸À®¤µ¤ì¤Þ¤¹¡£ +.LP +¾åµ­¤ÎÎã¤Ç +.BI -emitAll +¥Õ¥é¥°¤¬»ÈÍѤµ¤ì¤Æ¤¤¤¿¾ì¹ç¤Ï¡¢¤¹¤Ù¤Æ¤Î¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ëÆâ¤Ë +ÄêµÁ¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥¿¥¤¥×¤¬È¯¹Ô¤µ¤ì¤Þ¤¹¡£ +.SH "¥Ñ¥Ã¥±¡¼¥¸ÀÜƬ¼­¤ÎÁÞÆþ" +¤¢¤Ê¤¿¤¬¼¡¤Î IDL ¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤¿ ABC ¤È¤¤¤¦Ì¾¤Î´ë¶È¤Ë¶Ð̳¤·¤Æ¤¤¤ë¤È +²¾Äꤷ¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.B Widgets. idl +module Widgets +.br +{ +.br + interface W1 {...}; +.br + interface W2 {...}; +.br +}; +.LP +¤³¤Î¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ IDL-to-Java ¥³¥ó¥Ñ¥¤¥é¤ò¼Â¹Ô¤¹¤ë¤È¡¢¥Ñ¥Ã¥±¡¼¥¸ +Widgets Æâ¤Î W1 ¤È W2 ¤ËÂФ·¤Æ Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +¤·¤«¤·¡¢¶È³¦µ¬Ìó¤Ç¤Ï¡¢´ë¶È¤Î¥Ñ¥Ã¥±¡¼¥¸¤Ï +.BR com. +¤È¤¤¤¦Ì¾Á°¤Î¥Ñ¥Ã¥±¡¼¥¸Æâ¤ËÇÛÃÖ¤·¤Ê¤±¤ì¤Ð¤Ê¤é¤Ê¤¤¤Èµ¬Äꤵ¤ì¤Æ¤¤¤Þ¤¹¡£ +¤½¤Î¤¿¤á¡¢¤³¤Î +.BR Widgets +¥Ñ¥Ã¥±¡¼¥¸¤Î¤Þ¤Þ¤Ç¤ÏÉÔ½½Ê¬¤Ç¤¹¡£µ¬Äê¤Ë½¾¤¦¤Ë¤Ï¡¢ +.BR com.abc.Widgets +¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +.BR Widgets +¥â¥¸¥å¡¼¥ë¤Ë¤³¤Î¥Ñ¥Ã¥±¡¼¥¸ÀÜƬ¼­¤òÇÛÃÖ¤¹¤ë¤Ë¤Ï¡¢¼¡¤Î¥³¥Þ¥ó¥É¤ò +¼Â¹Ô¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.RS +.ft 3 +.nf +idlj -pkgPrefix Widgets com.abc Widgets.idl +.fi +.ft 1 +.RE +.LP +.BR Widgets.idl +¤ò¼è¤ê¹þ¤ó¤Ç¤¤¤ë IDL ¥Õ¥¡¥¤¥ë¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢¤½¤Î¥³¥Þ¥ó¥ÉÆâ¤Ë¤â +.BI \-pkgPrefix +¥Õ¥é¥°¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¥Õ¥é¥°¤ò»ØÄꤷ¤Ê¤¤¤È¡¢IDL ¥Õ¥¡¥¤¥ë¤Ï +.BR com.abc.Widgets +¥Ñ¥Ã¥±¡¼¥¸¤Ç¤Ï¤Ê¤¯ +.BR Widgets +¥Ñ¥Ã¥±¡¼¥¸¤ò¸¡º÷¤·¤Þ¤¹¡£ +.LP +ÀÜƬ¼­¤òɬÍפȤ¹¤ë¤³¤ì¤é¤Î¥Ñ¥Ã¥±¡¼¥¸¤¬Â¿¿ô¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢Á°½Ò¤·¤¿ +.BR idl.config +¥Õ¥¡¥¤¥ë¤ËÇÛÃÖ¤¹¤ëÊý¤¬´Êñ¤Ç¤·¤ç¤¦¡£³Æ¥Ñ¥Ã¥±¡¼¥¸ÀÜƬ¼­¹Ô¤Ï¡¢¼¡¤Î½ñ¼°¤Çµ­½Ò¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +PkgPrefix.= +.fi +.ft 1 +.RE +.LP +¤³¤Î½ñ¼°¤Ë½¾¤¦¤È¡¢¾åµ­Îã¤Î¹Ô¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +PkgPrefix.Widgets=com.abc +.fi +.ft 1 +.RE +.LP +¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤â¡¢¥ê¥Ý¥¸¥È¥ê ID ¤Ë¤Ï±Æ¶Á¤òÍ¿¤¨¤Þ¤»¤ó¡£ +.SH "¥³¥ó¥Ñ¥¤¥ëÁ°¤Î¥·¥ó¥Ü¥ë¤ÎÄêµÁ" +¥Ð¥¤¥ó¥Ç¥£¥ó¥°Æâ¤Ë¥Ç¥Ð¥Ã¥°¥³¡¼¥É¤ò¼è¤ê¹þ¤à¾ì¹ç¤Ê¤É¤Ë IDL ¥Õ¥¡¥¤¥ëÆâ +¤Ë¥³¥ó¥Ñ¥¤¥ëÍѤΥ·¥ó¥Ü¥ë¤¬ÄêµÁ¤µ¤ì¤Æ¤¤¤Ê¤¤¤È¤­¤Ï¡¢¤½¤ì¤é¤Î¥·¥ó¥Ü¥ë +¤òÄêµÁ¤¹¤ëɬÍפ¬¤¢¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¼¡¤Î¥³¥Þ¥ó¥É¤Ï¡¢ +.LP +.RS +.ft 3 +.nf +idlj -d MYDEF My.idl +.fi +.ft 1 +.RE +.LP +My.idl Æâ¤Ë +.BR #define +.BR MYDEF +¤È¤¤¤¦¹Ô¤ò´Þ¤á¤ë¤Î¤ËƱ¤¸¤Ç¤¹¡£ +.SH "´û¸¤Î¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤ÎÊÝ»ý" +Java ¥Ð¥¤¥ó¥Ç¥£¥ó¥°¥Õ¥¡¥¤¥ë¤¬´û¤Ë¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢ +.BI \-keep +¥Õ¥é¥°¤ò»ÈÍѤ·¤Æ¥³¥ó¥Ñ¥¤¥é¤Ë¤è¤ë¾å½ñ¤­¤òËɻߤǤ­¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢ +´û¤Ë¸ºß¤¹¤ë¤«¤É¤¦¤«¤Ë¤«¤«¤ï¤é¤º¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +¥Õ¥¡¥¤¥ë¤ò¥«¥¹¥¿¥Þ¥¤¥º (¥«¥¹¥¿¥Þ¥¤¥º¤Ï¤½¤ÎÆâÍƤ¬¤è¤Û¤ÉŬÀڤǤʤ¤¸Â¤ê¿ä¾© +¤µ¤ì¤Þ¤»¤ó) ¤·¤Æ¤¢¤ë¾ì¹ç¤Ï¡¢ +.BI \-keep +¥ª¥×¥·¥ç¥ó¤¬Èó¾ï¤ËÌòΩ¤Á¤Þ¤¹¡£¼¡¤Î¥³¥Þ¥ó¥É¤Ï¡¢ +.LP +.RS +.ft 3 +.nf +idlj -keep My.idl +.fi +.ft 1 +.RE +.LP +¤Þ¤À¸ºß¤·¤Æ¤¤¤Ê¤¤¤¹¤Ù¤Æ¤Î¥¯¥é¥¤¥¢¥ó¥È¦¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òȯ¹Ô¤·¤Þ¤¹¡£ +.SH "¥³¥ó¥Ñ¥¤¥ë¤Î¿ÊĽ¤Îɽ¼¨" +IDL-to-Java ¥³¥ó¥Ñ¥¤¥é¤Ï¡¢¤½¤Î¼Â¹ÔÃʳ¬¤Ç¥¹¥Æ¡¼¥¿¥¹¥á¥Ã¥»¡¼¥¸¤ò +À¸À®¤·¤Þ¤¹¡£¤³¤ÎÀ¸À®¤ò¾ÜºÙ (verbose) ¥â¡¼¥É¤Ë¤¹¤ë¤Ë¤Ï¡¢ +.BR -v +¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.RS +.ft 3 +.nf +idlj -v My.idl +.fi +.ft 1 +.RE +.LP +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥³¥ó¥Ñ¥¤¥é¤Ï¾ÜºÙ¥â¡¼¥É¤ÇÆ°ºî¤·¤Þ¤»¤ó¡£ +.SH "¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤Îɽ¼¨" +IDL-to-Java ¥³¥ó¥Ñ¥¤¥é¤Î¥Ó¥ë¥É¥Ð¡¼¥¸¥ç¥ó¤òɽ¼¨¤¹¤ë¤Ë¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ç +.BI \-version +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.RS +.ft 3 +.nf +idlj -version +.fi +.ft 1 +.RE +.LP +¥³¥ó¥Ñ¥¤¥é¤¬À¸À®¤·¤¿¥Ð¥¤¥ó¥Ç¥£¥ó¥°Æâ¤Ë¡¢¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤âɽ¼¨¤µ¤ì¤Þ¤¹¡£ +¥³¥Þ¥ó¥É¹Ô¤Ë»ØÄꤵ¤ì¤ë¤½¤Î¾¤Î¥ª¥×¥·¥ç¥ó¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£ +.SH "¥ª¥×¥·¥ç¥ó" +.TP +.BI \-d " symbol" +¤³¤ì¤Ï¡¢IDL ¥Õ¥¡¥¤¥ë¤Ë¼¡¤Î¹Ô¤ò»ØÄꤹ¤ë¤Î¤ÈƱ¤¸¤Ç¤¹¡£ +.LP +.RS +.ft 3 +.nf +#define symbol +.fi +.ft 1 +.RE +.TP +.BI \-emitAll +.BR #include +¥Õ¥¡¥¤¥ëÆâ¤Ë»ØÄꤵ¤ì¤Æ¤¤¤ë¤â¤Î¤â´Þ¤á¡¢¤¹¤Ù¤Æ¤Î¥¿¥¤¥×¤òȯ¹Ô¤·¤Þ¤¹¡£ +.TP +.BI \-fside +ȯ¹Ô¤¹¤ë¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÄêµÁ¤·¤Þ¤¹¡£ +.BI side +¤Ë¤Ï¡¢ +.BR client +¡¢ +.BR server +¡¢ +.BR serverTIE +¡¢ +.BR all +¡¢ +.BR allTIE +¤Î¤¦¤Á¤¤¤º¤ì¤« 1 ¤Ä¤ò»ØÄꤷ¤Þ¤¹¡£ +.BR -fserverTIE +¤È +.BR -fallTIE +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢°Ñ¾ù¥â¥Ç¥ë¥¹¥±¥ë¥È¥ó¤¬È¯¹Ô¤µ¤ì¤Þ¤¹¡£ +¥Õ¥é¥°¤ò»ØÄꤷ¤Ê¤¤¾ì¹ç¤Ï¡¢ +.BR -fclient +¤È¸«¤Ê¤µ¤ì¤Þ¤¹¡£ +.TP +.BI \-i " include-path" +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ç¥¤¥ó¥¯¥ë¡¼¥É¥Õ¥¡¥¤¥ë¤¬ +¸¡º÷¤µ¤ì¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ë¤È¡¢¤Û¤«¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ò +ÄɲäǤ­¤Þ¤¹¡£ +.TP +.BI \-keep +À¸À®¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤¬´û¤Ë¸ºß¤¹¤ë¾ì¹ç¡¢´û¸¥Õ¥¡¥¤¥ë¤ò¾å½ñ¤­¤·¤Þ¤»¤ó¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢´û¸¥Õ¥¡¥¤¥ë¤¬¾å½ñ¤­¤µ¤ì¤Þ¤¹¡£ +.TP +.BI \-noWarn +·Ù¹ð¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤·¤Ê¤¤¤è¤¦¤Ë¤·¤Þ¤¹¡£ +.TP +.BI \-oldImplBase +¸Å¤¤ JDK ORB (1.4 ¤è¤êÁ°) ¤È¸ß´¹À­¤Î¤¢¤ë¥¹¥±¥ë¥È¥ó¤òÀ¸À®¤·¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢POA ·Ñ¾µ¥â¥Ç¥ë¤Î¥µ¡¼¥Ð¦¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢ +.BR ImplBase +·Ñ¾µ¥â¥Ç¥ë¥¯¥é¥¹¤Ç¤¢¤ë¥µ¡¼¥Ð¦¥Ð¥¤¥ó¥Ç¥£¥ó¥°¤òÀ¸À®¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢ +µì¥Ð¡¼¥¸¥ç¥ó¤Î Java ¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤È¤Î²¼°Ì¸ß´¹À­¤òÄ󶡤·¤Þ¤¹¡£ +.TP +.BI \-pkgPrefix " type prefix" +¥Õ¥¡¥¤¥ë¥¹¥³¡¼¥×¤Ç +.BI type +¤¬¸¡½Ð¤µ¤ì¤¿¾ì¹ç¡¢¤½¤Î¥¿¥¤¥×¤ËÂФ·¤ÆÀ¸À®¤µ¤ì¤ë¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¡¢ +À¸À®¤µ¤ì¤ë Java ¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Ë +.BI prefix +¤È¤¤¤¦ÀÜƬ¼­¤òÉÕ¤±¤Þ¤¹¡£ +.BI type +¤Ï¡¢¥È¥Ã¥×¥ì¥Ù¥ë¥â¥¸¥å¡¼¥ë¤Îñ½ã̾¤«¡¢¥â¥¸¥å¡¼¥ë¤Î³°Éô¤ÇÄêµÁ¤µ¤ì¤¿ +IDL ¥¿¥¤¥×¤Îñ½ã̾¤Ç¤¹¡£ +.TP +.BI \-pkgTranslate " type package" +¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢ +.BI type +¤Þ¤¿¤Ï¥â¥¸¥å¡¼¥ë̾ +.BI type +¤¬¸«¤Ä¤«¤ë¤¿¤Ó¤Ë¡¢À¸À®¤µ¤ì¤ë Java ¥Ñ¥Ã¥±¡¼¥¸Æâ¤Î¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ë¤Ä¤¤¤Æ¡¢ +.BI type +¤ò +.BI package +¤ËÃÖ¤­´¹¤¨¤Þ¤¹¡£ +.BR pkgPrefix +Êѹ¹¤¬½é¤á¤Ë¹Ô¤ï¤ì¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ +.BI type +¤Ï¥È¥Ã¥×¥ì¥Ù¥ë¥â¥¸¥å¡¼¥ë¤Îñ½ã̾¤«¡¢¥â¥¸¥å¡¼¥ë¤Î³°Éô¤ÇÄêµÁ¤µ¤ì¤¿ IDL ¥¿¥¤¥×¤Î +ñ½ã̾¤Î¤¤¤º¤ì¤«¤Ç¤¢¤ê¡¢¥Ñ¥Ã¥±¡¼¥¸¤Î¥Õ¥ë¥Í¡¼¥à¤ÈÀµ³Î¤Ë°ìÃפ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +¤Þ¤¿¡¢°Ê²¼¤Î¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ÏÊÑ´¹¤Ç¤­¤Þ¤»¤ó¡£ +.LP +.RS +.TP 2 +\(bu org +.TP 2 +\(bu org.omg ¤Þ¤¿¤Ï org.omg ¤Î¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸ +.LP +¤³¤ì¤é¤Î¥Ñ¥Ã¥±¡¼¥¸¤ÎÊÑ´¹¤ò»î¤ß¤ë¤È¡¢¥³¥ó¥Ñ¥¤¥ëÉÔ²Äǽ¤Ê¥³¡¼¥É¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +¤³¤ì¤é¤Î¥Ñ¥Ã¥±¡¼¥¸¤ò +.BR \-pkgTranslate +¤Î¸å¤ÎºÇ½é¤Î°ú¿ô¤È¤·¤Æ»ÈÍѤ¹¤ë¤È¡¢¥¨¥é¡¼¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£ +.RE +.TP +.BI \-skeletonName " xxx%yyy" +.BI xxx%yyy +¤ò¥¹¥±¥ë¥È¥ó¤Î̾Á°ÉÕ¤±¤Î¥Ñ¥¿¡¼¥ó¤È¤·¤Æ»ÈÍѤ·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£ +.LP +.RS +.TP 2 +\(bu POA ´ðÄ쥯¥é¥¹ ( +.BR \-fserver +¤Þ¤¿¤Ï +.BR \-fall +) ¤Î¾ì¹ç¡¢%POA +.TP 2 +\(bu +.BR \-oldImplBase +¥¯¥é¥¹ ( +.BR \-oldImplBase +¤ª¤è¤Ó¡¢ +.BR \-fserver +¤Þ¤¿¤Ï +.BR \-fall +) ¤Î¾ì¹ç¡¢_%ImplBase +.RE +.TP +.BI \-td " dir" +½ÐÎϥǥ£¥ì¥¯¥È¥ê¤È¤·¤Æ¡¢¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤Ï¤Ê¤¯ +.BI dir +¤ò»ÈÍѤ·¤Þ¤¹¡£ +.TP +.BI \-tieName " xxx%yyy" +¥Ñ¥¿¡¼¥ó¤Ë±þ¤¸¤Æ Tie ¤Ë̾Á°¤òÉÕ¤±¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£ +.LP +.RS +.TP 2 +\(bu POA Tie ´ðÄ쥯¥é¥¹ ( +.BR \-fserverTie +¤Þ¤¿¤Ï +.BR \-fallTie +) ¤Î¾ì¹ç¡¢%POATie +.TP 2 +\(bu +.BR oldImplBase +¥¯¥é¥¹ ( +.BR \-oldImplBase +¤ª¤è¤Ó¡¢ +.BR \-fserverTie +¤Þ¤¿¤Ï +.BR \-fallTie +¤Î¤¤¤º¤ì¤«) ¤Î¾ì¹ç¡¢%_Tie +.RE +.TP +.BI \-nowarn, \-verbose +¾ÜºÙ¥â¡¼¥É¤Ë¤·¤Þ¤¹¡£ +.TP +.BI \-version +¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤òɽ¼¨¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£ +.LP +¥ª¥×¥·¥ç¥ó¤Î¾ÜºÙ¤Ï¡¢¡Öµ¡Ç½ÀâÌÀ¡×¤ÎÀá¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.SH "À©¸Â»ö¹à" +.LP +.TP 2 +\(bu ¥°¥í¡¼¥Ð¥ë¥¹¥³¡¼¥×Æâ¤Ç¥¨¥¹¥±¡¼¥×¤µ¤ì¤¿¼±Ê̻Ҥϡ¢ +IDL ¥×¥ê¥ß¥Æ¥£¥Ö·¿ ( +.BR Object +¤Þ¤¿¤Ï +.BR ValueBase +) ¤ÈƱ¤¸¥¹¥Ú¥ë¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¤³¤ì¤Ï¡¢¥·¥ó¥Ü¥ë¥Æ¡¼¥Ö¥ë¤¬¤³¤ì¤é¤Î +¼±Ê̻Ҥò»ÈÍѤ·¤Æ¤¹¤Ç¤Ë¥í¡¼¥É¤µ¤ì¤Æ¤¤¤ë¤¿¤á¤Ç¤¹¡£¤³¤ì¤é¤òÄêµÁ¤·Ä¾¤¹¤È¡¢ +¤½¤ì¤é¤ÎËÜÍè¤ÎÄêµÁ¤ò¾å½ñ¤­¤¹¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹ (¤³¤ÎÀ©¸Â¤Ï±Ê³Ū¤Ë +ŬÍѤµ¤ì¤ë¸«¹þ¤ß)¡£ +.TP 2 +\(bu IDL ¤Î fixed ·¿¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ +.SH "´ûÃΤÎÌäÂê" +¸½»þÅÀ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/jar.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/jar.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/jar.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/jar.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,777 @@ +'\" t +.\" @(#)jar.1 1.16 00/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits r\351serv\351s. +.\" ` +.TH jar 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +jar \- Java ¥¢¡¼¥«¥¤¥Ö¥Ä¡¼¥ë +.\" +.\" This document was created by saving an HTML file as text +.\" from the JavaSoft web site: +.\" +.\" http://java.sun.com/j2se/1.5/docs/tooldocs/tools.html +.\" +.\" and adding appropriate troff macros. Because the JavaSoft web site +.\" man pages can change without notice, it may be helpful to diff +.\" files to identify changes other than new functionality. +.\" +.SH "·Á¼°" +jar ¥Õ¥¡¥¤¥ë¤ÎºîÀ® +.br +.B jar +.BI c[v0M]f +.I jarfile +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.br +.B jar +.BI c[v0]mf +.I manifest +.I jarfile +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.br +.B jar +.BI c[v0M] +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.br +.B jar +.BI c[v0]m +.I manifest +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.LP +.B jar ¥Õ¥¡¥¤¥ë¤Î¹¹¿· +.br +.B jar +.BI u[v0M]f +.I jarfile +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.br +.br +.B jar +.BI u[v0]mf +.I manifest +.I jarfile +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.br +.br +.B jar +.BI u[v0M] +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.br +.B jar +.BI u[v0]m +.I manifest +[ +.BI \-C " dir" +] +.I inputfiles +[ +.BI \-J option +] +.LP +.B jar +¥Õ¥¡¥¤¥ë¤ÎÃê½Ð +.br +.B jar +.BI x[v]f +.I jarfile +[ +.I inputfiles +] +[ +.BI \-J option +] +.br +.B jar +.BI x[v] +[ +.I inputfiles +] [ +.BI \-J option +] +.LP +.B jar +¥Õ¥¡¥¤¥ë¤ÎÆâÍƤΰìÍ÷¤òºîÀ® +.br +.B jar +.BI t[v]f +.I jarfile +[ +.I inputfiles +] [ +.BI \-J option +] +.br +.B jar +.BI t[v] +[ +.I inputfiles +] [ +.BI \-J option +] +.LP +.B jar +¥Õ¥¡¥¤¥ë¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¤òÄɲà +.br +.B jar +.BI i +.I jarfile +[ +.BI \-J option +] +.SH "¥Ñ¥é¥á¡¼¥¿" +.if t .TP 20 +.if n .TP 15 +.B cuxtivOMmf +.B jar +¥³¥Þ¥ó¥É¤òÀ©¸æ¤¹¤ë¥ª¥×¥·¥ç¥ó¡£ +.if t .TP 20 +.if n .TP 15 +.I jarfile +ºîÀ® (c)¡¢¹¹¿· (u)¡¢Ãê½Ð (x)¡¢¤Þ¤¿¤Ï±ÜÍ÷¤µ¤ì¤ëÆâÍƤΰìÍ÷¤òºîÀ® (t) ¤¹¤ë +jar ¥Õ¥¡¥¤¥ë¤Ç¤¹¡£ +.B f +¥ª¥×¥·¥ç¥ó¤È¥Õ¥¡¥¤¥ë̾ +.I jarfile +¤ÏÂФˤʤäƤ¤¤Þ¤¹¡£ +»ÈÍѤ¹¤ë¾ì¹ç¤Ï¡¢Î¾Êý¤ò°ì½ï¤Ë»ÈÍѤ·¤Þ¤¹¡£ +.B f +¤ª¤è¤Ó +.I jarfile +¤ò¾Êά¤¹¤ë¤È¡¢É¸½àÆþÎϤ«¤é¡Öjar ¥Õ¥¡¥¤¥ë¡×¤¬ +»ÈÍѤµ¤ì¤¿¤ê (x ¤ª¤è¤Ó t ¤Î¾ì¹ç)¡¢É¸½à½ÐÎϤˤ³¤Î¡Öjar ¥Õ¥¡¥¤¥ë¡×¤¬ +Á÷¿®¤µ¤ì¤¿¤ê¤·¤Þ¤¹ (c ¤ª¤è¤Ó u ¤Î¾ì¹ç)¡£ +.if t .TP 20 +.if n .TP 15 +.I inputfiles +jar ¥Õ¥¡¥¤¥ë¤Ë·ë¹ç (c ¤ª¤è¤Ó u ¤Î¾ì¹ç)¡¢¤Þ¤¿¤Ï jar ¥Õ¥¡¥¤¥ë¤«¤é +Ãê½Ð (x ¤Î¾ì¹ç) ¤Þ¤¿¤Ï°ìÍ÷ɽ¼¨ (t ¤Î¾ì¹ç) ¤µ¤ì¤ë¥Õ¥¡¥¤¥ë +¤Þ¤¿¤Ï¥Ç¥£¥ì¥¯¥È¥ê¡£¶õÇòʸ»ú¤Ç¶èÀÚ¤ê¤Þ¤¹¡£ +¤¹¤Ù¤Æ¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ÏºÆµ¢Åª¤Ë½èÍý¤µ¤ì¤Þ¤¹¡£ +¥ª¥×¥·¥ç¥ó 0 (¥¼¥í) ¤¬»ÈÍѤµ¤ì¤Ê¤¤¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ë¤¬°µ½Ì¤µ¤ì¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +.I manifest +jar ¥Õ¥¡¥¤¥ë¤Î MANIFEST.MF ¤Ë´Þ¤á¤è¤¦¤È¤¹¤ë̾Á°:ÃÍ¥Ú¥¢¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë +´û¸¤Î manifest ¥Õ¥¡¥¤¥ë¤Ç¤¹¡£ +.B m +¥ª¥×¥·¥ç¥ó¤È +.I manifest +¤Î¥Õ¥¡¥¤¥ë̾¤ÏÂФˤʤäƤ¤¤Þ¤¹¡£ +»ÈÍѤ¹¤ë¾ì¹ç¤Ï¡¢Î¾Êý¤ò°ì½ï¤Ë»ÈÍѤ·¤Þ¤¹¡£ +ʸ»ú +.B m +¤È +.B f +¤Ï¡¢ +.I manifest +¤È +.I jarfile +¤¬½Ð¸½¤¹¤ë½ç½ø¤È +Ʊ¤¸½ç½ø¤Ç»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-C " dir" +¸å³¤ÎÆþÎÏ¥Õ¥¡¥¤¥ë°ú¿ô¤Î½èÍýÃæ¡¢ +¥Ç¥£¥ì¥¯¥È¥ê¤ò +.I dir +¤Ë°ì»þŪ¤ËÊѹ¹¤·¤Þ¤¹¡£ +Ê£¿ô¤Î +.BI \-C " dir" +ÆþÎÏ¥Õ¥¡¥¤¥ë¤Î¥»¥Ã¥È¤ò»ÈÍѤǤ­¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +.BI \-J "option" +Java Runtime Environment ¤ËÅϤµ¤ì¤ë¥ª¥×¥·¥ç¥ó +( +.B \-J +¤È +.I option +¤Î´Ö¤Ë¤Ï¶õÇòʸ»ú¤òÆþ¤ì¤Ê¤¤¤Ç¤¯¤À¤µ¤¤)¡£ +.SH "µ¡Ç½ÀâÌÀ" +.IX "Java archive tool" "" "Java archive tool \(em \fLjar\fP" +.IX "jar" "" "\fLjar\fP \(em Java archive tool" +.B jar +¥Ä¡¼¥ë¤Ï +Java +¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î +1 +¤Ä¤Ç¡¢Ê£¿ô¸Ä¤Î¥Õ¥¡¥¤¥ë¤ò +1 +¸Ä¤Î +JAR +¥¢¡¼¥«¥¤¥Ö¥Õ¥¡¥¤¥ë¤ËÅý¹ç¤·¤Þ¤¹¡£¤Þ¤¿¡¢ +jar ¤ÏÈÆÍÑŪ¤Ê¥¢¡¼¥«¥¤¥ÖºîÀ®ÍÑ +¤ª¤è¤Ó°µ½ÌÍѤΥġ¼¥ë¤Ç¤â¤¢¤ê¡¢°µ½Ì¤Ï +.SM ZIP +¤Þ¤¿¤Ï +.SM ZLIB +·Á¼°¤Ç¹Ô¤¤¤Þ¤¹¡£¤¿¤À¤· +.B jar +¥Ä¡¼¥ë¤Î¼ç¤ÊÌÜŪ¤Ï¡¢¤¤¤¯¤Ä¤«¤Î +Java +¥¢¥×¥ì¥Ã¥È¤ä¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò +1 +¸Ä¤Î¥¢¡¼¥«¥¤¥Ö¤ËÅý¹ç¤·¤Æ´Êά²½¤¹¤ë¤³¤È¤Ç¤¹¡£ +¥¢¥×¥ì¥Ã¥È¤ä¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥³¥ó¥Ý¡¼¥Í¥ó¥È¡¢¤¿¤È¤¨¤Ð +¥¯¥é¥¹¥Õ¥¡¥¤¥ë¡¢¥¤¥á¡¼¥¸¡¢¥µ¥¦¥ó¥É¤Ê¤É¤òñ°ì¤Î¥¢¡¼¥«¥¤¥Ö¤Ë +¤Þ¤È¤á¤ë¤È¡¢¥Ö¥é¥¦¥¶¤Î¤è¤¦¤Ê +Java +¥¨¡¼¥¸¥§¥ó¥È¤Ë¥À¥¦¥ó¥í¡¼¥É¤¹¤ë¤È¤­¤Ë¡¢°ìÅ٤Π+HTTP +¥È¥é¥ó¥¶¥¯¥·¥ç¥ó¤ÇºÑ¤ß¤Þ¤¹¡£¥³¥ó¥Ý¡¼¥Í¥ó¥È¤´¤È¤Ë +¿·¤¿¤ËÀܳ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤»¤ó¡£ +¤³¤ì¤Ë¤è¤ê¥À¥¦¥ó¥í¡¼¥É»þ´Ö¤¬ÂçÉý¤Ëû½Ì¤Ç¤­¤Þ¤¹¡£ +¤Þ¤¿ +.B jar +¤Ï¥Õ¥¡¥¤¥ë¤Î°µ½Ì¤â¹Ô¤¦¤Î¤Ç¡¢¥À¥¦¥ó¥í¡¼¥É¤¬¤è¤ê¹â®¤Ë¤Ê¤ê¤Þ¤¹¡£ +¤µ¤é¤Ë¡¢¥Õ¥¡¥¤¥ëÃæ¤Î¸Ä¡¹¤Î¥¨¥ó¥È¥ê¤ËÂФ·¤Æ¥¢¥×¥ì¥Ã¥È¤ÎºîÀ®¼Ô¤¬ +½ð̾¤Ç¤­¤ë¤Î¤Ç¡¢ºîÀ®¸µ¤òÌÀ³Î²½¤Ç¤­¤Þ¤¹¡£ +.B jar +¥Ä¡¼¥ë¤Î¹½Ê¸¤Ï¡¢ +.BR tar (1) +¥³¥Þ¥ó¥É¤Î¹½Ê¸¤È¤Û¤ÜƱ°ì¤Ç¤¹¡£ +.B jar +¥¢¡¼¥«¥¤¥Ö¤Ï¡¢°µ½Ì¤µ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ë¤«¤«¤ï¤é¤º¡¢ +¥¯¥é¥¹¥Ñ¥¹¥¨¥ó¥È¥ê¤È¤·¤Æ»ÈÍѤǤ­¤Þ¤¹¡£ +.LP +Ê£¿ô¤Î¥Õ¥¡¥¤¥ë¤ò jar ¥Õ¥¡¥¤¥ë¤ËÅý¹ç¤¹¤ëɸ½àŪ¤Ê»È¤¤Êý¤Ï¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£ +.LP +.RS +.ft 3 +.nf +% jar cf myFile.jar *.class +.fi +.ft 1 +.RE +.LP +¤³¤ÎÎã¤Ç¤Ï¡¢¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤¬ +.BR myjarfile +¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤ËÃÖ¤«¤ì¤Þ¤¹¡£ +META-INF/MANIFEST.MF ¤È¤¤¤¦Ì¾Á°¤Î manifest ¥Õ¥¡¥¤¥ë¤Ï +.B jar +¥Ä¡¼¥ë¤¬ +¼«Æ°Åª¤ËÀ¸À®¤·¡¢¾ï¤Ë jar ¥Õ¥¡¥¤¥ë¤ÎÀèƬ¤Î¥¨¥ó¥È¥ê¤È¤Ê¤ê¤Þ¤¹¡£ +manifest ¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¥¢¡¼¥«¥¤¥Ö¤Ë´Ø¤¹¤ë¤¹¤Ù¤Æ¤Î¥á¥¿¾ðÊó¤¬ +̾Á°:ÃÍ¥Ú¥¢¤È¤·¤Æµ­Ï¿¤µ¤ì¤Þ¤¹¡£ +¤É¤Î¤è¤¦¤Ëµ­Ï¿¤µ¤ì¤ë¤«¤Ë¤Ä¤¤¤Æ¤Ï¡¢ +¡ÖJar ¥Õ¥¡¥¤¥ë»ÅÍÍ¡× +¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +´û¸¤Î manifest ¥Õ¥¡¥¤¥ë¤Î̾Á°:ÃÍ¥Ú¥¢¤ò´Þ¤ó¤À¿·¤¿¤Ê jar ¥¢¡¼¥«¥¤¥Ö¤ò +jar ¥Ä¡¼¥ë¤ÇºîÀ®¤·¤¿¤¤¤È¤­¤Ï¡¢ +.B m +¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¤½¤Î manifest ¥Õ¥¡¥¤¥ë¤ò +»ØÄꤷ¤Þ¤¹¡£°Ê²¼¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +.B % jar cmf myManifestFile myJarFile *.class +.RE +.LP +»ÈÍѤ¹¤ë´û¸¤Î manifest ¥Õ¥¡¥¤¥ë¤ÏÉüµ¢²þ¹Ô¤Ç½ª¤ï¤ë¤è¤¦¤Ë¤·¤Æ¤¯¤À¤µ¤¤¡£ +manifest ¥Õ¥¡¥¤¥ë¤ÎºÇ¸å¤Î¹Ô¤Ï¡¢Éüµ¢²þ¹Ôʸ»ú¤Ç½ª¤ï¤Ã¤Æ¤¤¤Ê¤¤¤È¡¢ +¹½Ê¸²òÀϤµ¤ì¤Þ¤»¤ó¡£ +.B cmf +¤Ç¤Ï¤Ê¤¯ +.B cfm +¤ò»ØÄꤹ¤ë¾ì¹ç (¤Ä¤Þ¤ê¡¢ +.B m +¥ª¥×¥·¥ç¥ó¤È +.B f +¥ª¥×¥·¥ç¥ó¤Î½çÈÖ¤ò +µÕ¤Ë¤¹¤ë¾ì¹ç)¡¢ºÇ½é¤Ë jar ¥¢¡¼¥«¥¤¥Ö̾¤ò»ØÄꤷ¡¢¼¡¤Ë manifest ¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤹ¤ë +ɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.RS 5 +.B % jar cfm myJarFile myManifestFile *.class +.RE +.LP +manifest ¤Ï RFC822 +.SM ASCII +·Á¼°¤Ë´ð¤Å¤¤¤¿¥Æ¥­¥¹¥È·Á¼°¤ò»ÈÍѤ¹¤ë¤¿¤á¡¢manifest ¥Õ¥¡¥¤¥ë¤ÎÆâÍÆ¤Ï +´Êñ¤Ëɽ¼¨¤ª¤è¤Ó½èÍý¤Ç¤­¤Þ¤¹¡£ +.LP +jar ¥Õ¥¡¥¤¥ë¤«¤é¥Õ¥¡¥¤¥ë¤òÃê½Ð¤¹¤ë¾ì¹ç¤Ï¡¢ +.B x +¤ò»ÈÍѤ·¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +% jar xf myFile.jar +.RE +.LP +jar ¥Õ¥¡¥¤¥ë¤«¤éÆÃÄê¤Î¥Õ¥¡¥¤¥ë¤À¤±¤òÃê½Ð¤¹¤ë¾ì¹ç¤Ï¡¢ +¤½¤Î¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤷ¤Þ¤¹¡£ +.LP +.RS 5 +% jar xf myFile.jar foo bar +.RE +.LP +JDK ¤Î¥Ð¡¼¥¸¥ç¥ó 1.3 ¤«¤é¡¢jar ¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Ç +JarIndex ¤ò¥µ¥Ý¡¼¥È¤¹¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£¤³¤ì¤Ë¤è¤ê¡¢ +¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥¯¥é¥¹¥í¡¼¥À¤Ï¡¢jar ¥Õ¥¡¥¤¥ë¤«¤é +¥¯¥é¥¹¤ò¤è¤ê¹â®¤ËÆɤ߹þ¤á¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ +¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Þ¤¿¤Ï¥¢¥×¥ì¥Ã¥È¤¬Ê£¿ô¤Î jar ¥Õ¥¡¥¤¥ë¤Ë +¥Ð¥ó¥É¥ë¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢É¬Í×¤Ê jar ¥Õ¥¡¥¤¥ë¤À¤±¤¬¥À¥¦¥ó¥í¡¼¥É¤µ¤ì¤Æ +³«¤«¤ì¡¢¥¯¥é¥¹¤¬Æɤ߹þ¤Þ¤ì¤Þ¤¹¡£ +¤³¤Î¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤ÎºÇŬ²½¤Ï¡¢ +.B jar ¤ò +.B i +¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¼Â¹Ô¤¹¤ë¤È +Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£»ØÄꤷ¤¿¥á¥¤¥ó¤Î jar ¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¤½¤Î¥Õ¥¡¥¤¥ë¤¬ +°Í¸¤·¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î jar ¥Õ¥¡¥¤¥ë¤Î¥Ñ¥Ã¥±¡¼¥¸°ÌÃÖ¾ðÊó¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +¤³¤ì¤é¤Î¾ðÊó¤Ï¡¢¥á¥¤¥ó jar ¥Õ¥¡¥¤¥ë¤Î manifest ¤Î Class-Path °À­¤Ç +»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.RS 5 +% jar i main.jar +.RE +.LP +¤³¤ÎÎã¤Ç¤Ï¡¢INDEX.LIST ¥Õ¥¡¥¤¥ë¤¬ main.jar ¤Î +META-INF ¥Ç¥£¥ì¥¯¥È¥ê¤ËÄɲ䵤ì¤Þ¤¹¡£ +¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥¯¥é¥¹¥í¡¼¥À¤Ç¤Ï¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤µ¤ì¤¿¾ðÊó¤ò +»ÈÍѤ·¤Æ¡¢¥¯¥é¥¹¤Î¥í¡¼¥É¤ò¹â®²½¤·¤Þ¤¹¡£ +¥¤¥ó¥Ç¥Ã¥¯¥¹¥Õ¥¡¥¤¥ë¤Ë°ÌÃÖ¾ðÊó¤ò³ÊǼ¤¹¤ëÊýË¡¤Î¾ÜºÙ¤Ï¡¢ +¡ÖJarIndex »ÅÍ͡פò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +¥Ç¥£¥ì¥¯¥È¥ê¤ò¥³¥Ô¡¼¤¹¤ëɸ½àŪ¤ÊÊýË¡¤Ï¡¢¤Þ¤º +.I dir1 +Æâ¤Î¥Õ¥¡¥¤¥ë¤òɸ½à½ÐÎϤ˰µ½Ì¤·¡¢ +¼¡¤Ëɸ½àÆþÎϤ«¤é +.I dir2 +¤ËÃê½Ð¤·¤Þ¤¹ (ξÊý¤Î +.B jar +¥³¥Þ¥ó¥É¤«¤é +.B f +¤ò¾Êά¤·¤Þ¤¹)¡£ +.LP +.RS 5 +% (cd dir1; jar c .) | (cd dir2; jar x) +.RE +.LP +.B jar +¥Ä¡¼¥ë¤ò»ÈÍѤ·¤Æ jar ¥Õ¥¡¥¤¥ë¤ä jar ¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤òÁàºî¤¹¤ëÊýË¡¤ÎÎã¤Ï¡¢ +°Ê²¼¤ÎÀâÌÀ¤È¡¢¡ÖJava Tutorial¡×¤Î¡ÖJar¡×Àá¤Ë¤¢¤ê¤Þ¤¹¡£ +.SH "¥ª¥×¥·¥ç¥ó" +.if t .TP 10 +.if n .TP 5 +.B c +¿·µ¬¤Î¥¢¡¼¥«¥¤¥Ö¥Õ¥¡¥¤¥ë¤ò +.I jarfile +¤È¤¤¤¦Ì¾Á° ( +.B f +¤ò»ØÄꤷ¤¿¾ì¹ç)¡¢¤Þ¤¿¤Ïɸ½à½ÐÎϾå¤Ë ( +.B f +¤È +.I jarfile +¤ò¾Êά¤·¤¿¾ì¹ç) ºîÀ®¤·¤Þ¤¹¡£ +¥¢¡¼¥«¥¤¥Ö¤Ë¤ÏÆþÎÏ¥Õ¥¡¥¤¥ë¤Ç»ØÄꤷ¤¿¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤¬Äɲ䵤ì¤Þ¤¹¡£ +.if t .TP 10 +.if n .TP 5 +.B u +´û¸¤Î +.I jarfile +( +.B f +¤ò»ØÄꤷ¤¿¾ì¹ç) ¤ò¹¹¿·¤·¤Þ¤¹¡£ +¤³¤Î¤È¤­¡¢¤³¤Î +.I jarfile +¤Ë¤ÏÆþÎÏ¥Õ¥¡¥¤¥ë¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤¬Äɲ䵤ì¤Þ¤¹¡£°Ê²¼¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +% jar uf foo.jar foo.class +.RE +.LP +¤³¤ÎÎã¤Ç¤Ï¡¢¥Õ¥¡¥¤¥ë foo.class ¤¬´û¸¤Î jar ¥Õ¥¡¥¤¥ë foo.jar ¤ËÄɲ䵤ì¤Þ¤¹¡£ +.B u +¥ª¥×¥·¥ç¥ó¤Ç¤Ï¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¤Î¥¨¥ó¥È¥ê¤ò¹¹¿·¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£°Ê²¼¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +% jar umf manifest foo.jar +.RE +.LP +foo.jar ¥Þ¥Ë¥Õ¥§¥¹¥È¤ò¥Þ¥Ë¥Õ¥§¥¹¥ÈÆâ¤Î̾Á°:ÃÍ¥Ú¥¢¤Ç¹¹¿·¤·¤Þ¤¹¡£ +.if t .TP 10 +.if n .TP 5 +.B x +¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤ò +.I jarfile +( +.B f +¤ò»ØÄꤷ¤¿¾ì¹ç)¡¢ +¤Þ¤¿¤Ïɸ½àÆþÎÏ ( +.B f +¤È +.I jarfile +¤ò¾Êά¤·¤¿¾ì¹ç) ¤«¤éÃê½Ð¤·¤Þ¤¹¡£ +ÆþÎÏ¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤¿¾ì¹ç¡¢¤½¤ÎÆþÎÏ¥Õ¥¡¥¤¥ë¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤À¤±¤¬ +Ãê½Ð¤µ¤ì¤Þ¤¹¡£»ØÄꤷ¤Ê¤¤¾ì¹ç¤Ï¡¢¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤¬Ãê½Ð¤µ¤ì¤Þ¤¹¡£ +.if t .TP 10 +.if n .TP 5 +.B t +.I jarfile +( +.B f +¤ò»ØÄꤷ¤¿¾ì¹ç)¡¢¤Þ¤¿¤Ïɸ½àÆþÎÏ ( +.B f +¤È +.I jarfile +¤ò¾Êά¤·¤¿¾ì¹ç) ¤«¤éÆâÍƤò¥ê¥¹¥È¤·¤Þ¤¹¡£ÆþÎÏ¥Õ¥¡¥¤¥ë¤ò»ØÄꤷ¤¿¾ì¹ç¡¢ +¤½¤ÎÆþÎÏ¥Õ¥¡¥¤¥ë¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤À¤±¤¬ +¥ê¥¹¥È¤µ¤ì¤Þ¤¹¡£»ØÄꤷ¤Ê¤¤¾ì¹ç¤Ï¡¢¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤¬¥ê¥¹¥È¤µ¤ì¤Þ¤¹¡£ +.if t .TP 10 +.if n .TP 5 +.B i +»ØÄꤵ¤ì¤¿ +.I jarfile +¤ª¤è¤Ó´ØÏ¢¤Å¤±¤é¤ì¤Æ¤¤¤ë jar ¥Õ¥¡¥¤¥ë¤Î +¥¤¥ó¥Ç¥Ã¥¯¥¹¾ðÊó¤òÀ¸À®¤·¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +% jar i foo.jar +.RE +.LP +foo.jar ¤Ë INDEX.LIST ¥Õ¥¡¥¤¥ë¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢foo.jar ¤Î³Æ¥Ñ¥Ã¥±¡¼¥¸¤ª¤è¤Ó foo.jar ¤Î +Class-Path °À­¤Ë»ØÄꤵ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î jar ¥Õ¥¡¥¤¥ë¤Î +°ÌÃÖ¾ðÊ󤬽ñ¤­¹þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +¥¤¥ó¥Ç¥Ã¥¯¥¹¤ÎÎã¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.if t .TP 10 +.if n .TP 5 +.B f +ºîÀ® (c)¡¢¹¹¿· (u)¡¢Ãê½Ð (x)¡¢¥¤¥ó¥Ç¥Ã¥¯¥¹ºîÀ®(i)¡¢ +¤Þ¤¿¤Ïɽ¼¨ (t) ¤¹¤ë +.I jarfile +¤ò»ØÄꤷ¤Þ¤¹¡£ +.b f +¥ª¥×¥·¥ç¥ó¤È +.I jarfile +¤Î¥Õ¥¡¥¤¥ë̾¤ÏÂФˤʤäƤ¤¤Þ¤¹¡£ +»ÈÍѤ¹¤ë¾ì¹ç¤Ï¡¢Î¾Êý¤ò°ì½ï¤Ë»ÈÍѤ·¤Þ¤¹¡£ +.B f +¤È +.I jarfile +¤ò¾Êά¤¹¤ë¤È¡¢É¸½àÆþÎϤ«¤é¡Öjar ¥Õ¥¡¥¤¥ë¡×¤¬ +»ÈÍѤµ¤ì¤¿¤ê (x ¤ª¤è¤Ó t ¤Î¾ì¹ç)¡¢É¸½à½ÐÎϤˤ³¤Î¡Öjar ¥Õ¥¡¥¤¥ë¡×¤¬ +Á÷¿®¤µ¤ì¤¿¤ê¤·¤Þ¤¹ (c ¤ª¤è¤Ó u ¤Î¾ì¹ç)¡£ +.if t .TP 10 +.if n .TP 5 +.B v +ɸ½à½ÐÎϤ˾ܺ٤ʽÐÎϤòÀ¸À®¤·¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.if t .TP 10 +.if n .TP 5 +.B 0 +¥¼¥í¡£ZIP °µ½Ì¤ò»ÈÍѤ»¤º¤Ë³ÊǼ¤·¤Þ¤¹¡£ +.if t .TP 10 +.if n .TP 5 +.B M +manifest ¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê¤òºîÀ®¤·¤Þ¤»¤ó (c ¤ª¤è¤Ó u ¤Î¾ì¹ç)¡£¤Þ¤¿¤Ï +¤¹¤Ç¤Ë¸ºß¤¹¤ë manifest ¥Õ¥¡¥¤¥ë¥¨¥ó¥È¥ê¤òºï½ü¤·¤Þ¤¹ (u ¤Î¾ì¹ç)¡£ +.if t .TP 10 +.if n .TP 5 +.B m +META-INF/MANIFEST.MF Æâ¤Î»ØÄꤷ¤¿ manifest ¥Õ¥¡¥¤¥ë¤«¤é +̾Á°:ÃÍ°À­¤ò¥¤¥ó¥¯¥ë¡¼¥É¤·¤Þ¤¹¡£ +¤¹¤Ç¤ËƱ¤¸Ì¾Á°¤Ç¸ºß¤·¤Ê¤¤¸Â¤ê¡¢¤½¤Î̾Á°:ÃÍ¥Ú¥¢¤¬Äɲ䵤ì¤Þ¤¹¡£Æ±¤¸Ì¾Á°¤Ç¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢¤½¤ÎÃͤ¬¹¹¿·¤µ¤ì¤Þ¤¹¡£ +.LP +¥³¥Þ¥ó¥É¹Ô¤Ç¤Ï¡¢Ê¸»ú +.B m +¤È +.B f +¤Ï¡¢ +.I manifest +¤È +.I jarfile +¤¬½Ð¸½¤¹¤ë¤Î¤È +Ʊ¤¸½ç½ø¤Ç»ÈÍѤ·¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +% jar cmf myManifestFile myFile.jar *.class +.RE +.LP +manifest ¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¡¢ +ÀìÍѤÎ̾Á°:ÃÍ°À­¥Ú¥¢¤òÄɲäǤ­¤Þ¤¹¡£¤³¤Î¤è¤¦¤Ê°À­¥Ú¥¢¤Î +Îã¤È¤·¤Æ¤Ï¡¢¥Ù¥ó¥À¾ðÊ󡢥С¼¥¸¥ç¥ó¾ðÊ󡢥ѥ屡¼¥¸¥·¡¼¥ê¥ó¥°¡¢ +¤ª¤è¤Ó JAR ¤Ë´Þ¤Þ¤ì¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¼Â¹Ô¤¹¤ë¤¿¤á¤Î°À­¤¬ +¤¢¤ê¤Þ¤¹¡£ +.B m +¥ª¥×¥·¥ç¥ó¤Î»ÈÍÑÎã¤Ë¤Ä¤¤¤Æ¤Ï¡¢¡ÖJava Tutorial¡×¤Î¡ÖJAR Files¡×Àá¤È +¡ÖJRE ³«È¯¼Ô¸þ¤±¥Î¡¼¥È¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.if t .TP 10 +.if n .TP 5 +.B \-C +.B jar +¥³¥Þ¥ó¥É¤Î¼Â¹ÔÃæ¤Ë°ì»þŪ¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤òÊѹ¹¤·¤Þ¤¹ ( +.BI cd " dir" +)¡£ +¤³¤Î¤È¤­¡¢¸å³¤ÎÆþÎÏ¥Õ¥¡¥¤¥ë°ú¿ô¤¬½èÍý¤µ¤ì¤Þ¤¹¡£ +¤³¤ÎÆ°ºî¤Ï¡¢UNIX ¤Î +.B tar +¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Î +.B \-C +¥ª¥×¥·¥ç¥ó¤È +ƱÍͤÎÆ°ºî¤Ë¤Ê¤ê¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.if t .RS 15 +.if n .RS 8 +.ft 3 +% jar uf foo.jar \-C classes bar.classes +.ft 1 +.RE +.LP +classes ¥Ç¥£¥ì¥¯¥È¥ê¤Ë°ÜÆ°¤·¡¢¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤«¤é bar.classes ¤ò +foo.jar ¤ËÄɲä·¤Þ¤¹¡£ +.LP +.if t .RS 15 +.if n .RS 8 +.ft 3 +% jar uf foo.jar -C classes . -C bin xyz.class +.ft 1 +.RE +.LP +¤³¤Î¥³¥Þ¥ó¥É¤Ç¤Ï¡¢classes ¥Ç¥£¥ì¥¯¥È¥ê¤Ë°ÜÆ°¤·¡¢classes ¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤ò +foo.jar ¤ËÄɲä·¤Þ¤¹ (jar ¥Õ¥¡¥¤¥ë¤Ë¤Ï classes ¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¤Þ¤»¤ó)¡£ +¼¡¤Ë¸µ¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ËÌá¤Ã¤Æ¤«¤é¡¢bin ¥Ç¥£¥ì¥¯¥È¥ê¤Ë°ÜÆ°¤·¡¢xyz.class ¤ò foo.jar ¤ËÄɲä·¤Þ¤¹¡£ +classes ¤Ë¥Õ¥¡¥¤¥ë bar1 ¤ª¤è¤Ó bar2 ¤¬¤¢¤ë¾ì¹ç¡¢ +.B "jar tf foo.jar" +¤ò¼Â¹Ô¤¹¤ë¤È¡¢ +jar ¥Õ¥¡¥¤¥ë¤ÎÆâÍƤ¬¼¡¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.if t .RS 15 +.if n .RS 8 +.ft 3 +.nf +META-INF/ +META-INF/MANIFEST.MF +bar1 +bar2 +xyz.class +.fi +.ft 1 +.RE +.if t .TP 10 +.if n .TP 5 +.BI J " option" +.I option +¤ò Java Runtime Environment ¤ËÅϤ·¤Þ¤¹¡£¤³¤³¤Ç¡¢ +.I option +¤Ï¡¢Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥óµ¯Æ°¥×¥í¥°¥é¥à +.BR java(1) +¤Î¥Þ¥Ë¥å¥¢¥ë¥Ú¡¼¥¸¤Ç +ÀâÌÀ¤µ¤ì¤Æ¤¤¤ë¥ª¥×¥·¥ç¥ó¤Î 1 ¤Ä¤Ç¤¹¡£¤¿¤È¤¨¤Ð +.B \-J-Xms48m +¤Ï¡¢µ¯Æ°¥á¥â¥ê¤ò 48M ¥Ð¥¤¥È¤ËÀßÄꤷ¤Þ¤¹¡£ +.B \-J +¤¬´ðËܤˤ¹¤ë²¾ÁÛ¥Þ¥·¥ó¤Ë¥ª¥×¥·¥ç¥ó¤òÅϤ¹¤³¤È¤Ï¡¢¶¦Ä̤ε¬Ìó¤Ç¤¹¡£ +.SH "¥³¥Þ¥ó¥É¹Ô°ú¿ô¥Õ¥¡¥¤¥ë" +.B jar +¥³¥Þ¥ó¥É¹Ô¤òû¤¯¤Þ¤¿¤Ï´Êñ¤Ë¤¹¤ë¤¿¤á¤Ë¡¢ +.B jar +¥³¥Þ¥ó¥É¤Î°ú¿ô ( +.B \-J +¥ª¥×¥·¥ç¥ó¤ò½ü¤¯) ¤ò´Þ¤à¥Õ¥¡¥¤¥ë¤ò 1 ¤Ä°Ê¾å»ØÄê¤Ç¤­¤Þ¤¹¡£ +¤³¤ì¤Ë¤è¤ê¡¢Ç¤°Õ¤ÎŤµ¤Î +.B jar +¥³¥Þ¥ó¥É¤òºîÀ®¤Ç¤­¡¢ +¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ë¤è¤ë¥³¥Þ¥ó¥É¹Ô¤ÎÀ©¸Â¤ò +²óÈò¤Ç¤­¤Þ¤¹¡£ +.LP +°ú¿ô¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¥ª¥×¥·¥ç¥ó¤È¥Õ¥¡¥¤¥ë̾¤ò´Þ¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +°ú¿ô¥Õ¥¡¥¤¥ëÆâ¤Î°ú¿ô¤Ï¶õÇòʸ»ú¶èÀÚ¤ê¤Þ¤¿¤Ï²þ¹Ô¶èÀÚ¤ê¤Ë¤·¤Þ¤¹¡£ +°ú¿ô¥Õ¥¡¥¤¥ëÆâ¤Î¥Õ¥¡¥¤¥ë̾¤Ï¡¢°ú¿ô¥Õ¥¡¥¤¥ë¤Î°ÌÃ֤ǤϤʤ¯¡¢ +¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤ËÂФ·¤ÆÁêÂÐŪ¤Ë»ØÄꤷ¤Þ¤¹¡£ +Ä̾ï¤Ï¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¤Ë¤è¤Ã¤ÆŸ³«¤µ¤ì¤ë¥ï¥¤¥ë¥É¥«¡¼¥É (*) ¤Ï +Ÿ³«¤µ¤ì¤Þ¤»¤ó¡£¥Õ¥¡¥¤¥ë¤òºÆµ¢Åª¤Ë²ò¼á¤¹¤ë¤¿¤á¤Î¡Ö@¡×ʸ»ú¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£ +.B \-J +¥ª¥×¥·¥ç¥ó¤Ï¡¢µ¯Æ°¥×¥í¥°¥é¥à¤ËÅϤµ¤ì¤ë¤¿¤á¡¢¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ +µ¯Æ°¥×¥í¥°¥é¥à¤Ç¤Ï°ú¿ô¥Õ¥¡¥¤¥ë¤ò»ÈÍѤǤ­¤Ê¤¤¤¿¤á¤Ç¤¹¡£ +.LP +.B jar +¤Î¼Â¹Ô»þ¡¢³Æ°ú¿ô¤Î¥Ñ¥¹¤ª¤è¤Ó̾Á°¤ÇÀèƬ¤Ë¡Ö@¡×ʸ»ú¤òÉÕ¤±¤ÆÅϤµ¤ì¤Þ¤¹¡£ +.B jar +¤ÇÀèƬ¤Ëʸ»ú¡Ö@¡×¤ÎÉÕ¤¤¤¿°ú¿ô¤¬½Ð¸½¤¹¤ë¤¿¤Ó¤Ë¡¢ +¤½¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤ¬°ú¿ô¥ê¥¹¥È¤ËŸ³«¤µ¤ì¤Þ¤¹¡£ +.LP +¤¿¤È¤¨¤Ð¡¢¡Öclasses.list¡×¤È¤¤¤¦Ì¾Á°¤Î°ú¿ô¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Æ¡¢ +¥Õ¥¡¥¤¥ë¤Î̾Á°¤òÊÝ»ý¤·¤Þ¤¹¡£ +.LP +.RS 5 +% find . -name '*.class' -print > classes.list +.RE +.LP +¼¡¤Ë¡¢°ú¿ô¥Õ¥¡¥¤¥ë¤ÇÅϤ¹ +.B jar +¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤·¤Þ¤¹¡£ +.LP +.RS 5 +% jar cf my.jar @classes.list +.RE +.LP +°ú¿ô¥Õ¥¡¥¤¥ë¤Ï¥Ñ¥¹¤ÇÅϤµ¤ì¤Þ¤¹¤¬¡¢ÁêÂХѥ¹¤¬µ­½Ò¤µ¤ì¤¿°ú¿ô¥Õ¥¡¥¤¥ëÆâ¤Î +¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë̾¤Ï¡¢ÅϤµ¤ì¤¿¥Ñ¥¹¤ËÁêÂÐŪ¤Ç¤Ï¤Ê¤¯¡¢ +¸½ºß¤Îºî¶È¥Ç¥£¥ì¥¯¥È¥ê¤ËÁêÂÐŪ¤È¤Ê¤ê¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +% jar @path1/classes.list +.RE +.SH "»ÈÍÑÎã" +¤¢¤ë¥Ç¥£¥ì¥¯¥È¥êÃæ¤Î¥Õ¥¡¥¤¥ë¤ò¤¹¤Ù¤Æ¥¢¡¼¥«¥¤¥Ö¤ËÄɲ乤ëÎã¤ò¼¨¤·¤Þ¤¹ +(¥¢¡¼¥«¥¤¥Ö¤¬¤¹¤Ç¤Ë¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢ÆâÍƤ¬¾å½ñ¤­¤µ¤ì¤Þ¤¹)¡£ +¾ÜºÙ¤ËÎóµó¤¹¤ë¤è¤¦¤Ë¤¹¤ë¤È (¡Öv¡×¥ª¥×¥·¥ç¥ó¤ò»ÈÍÑ)¡¢ +¥µ¥¤¥º¤äºÇ½ª¹¹¿·Æü¤Ê¤É¡¢ +¥¢¡¼¥«¥¤¥ÖÆâ¤Î¥Õ¥¡¥¤¥ë¤Ë´Ø¤·¤Æ¾Ü¤·¤¤¾ðÊó¤¬ÆÀ¤é¤ì¤Þ¤¹¡£ +.RS +\f3 +.nf +% ls +1.au Animator.class monkey.jpg +2.au Wave.class spacemusic.au +3.au at_work.gif +% jar cvf bundle.jar * +added manifest +adding: 1.au(in = 2324) (out= 67)(deflated 97%) +adding: 2.au(in = 6970) (out= 90)(deflated 98%) +adding: 3.au(in = 11616) (out= 108)(deflated 99%) +adding: Animator.class(in = 2266) (out= 66)(deflated 97%) +adding: Wave.class(in = 3778) (out= 81)(deflated 97%) +adding: at_work.gif(in = 6621) (out= 89)(deflated 98%) +adding: monkey.jpg(in = 7667) (out= 91)(deflated 98%) +adding: spacemusic.au(in = 3079) (out= 73)(deflated 97%) +\f1 +.fi +.RE +¥¤¥á¡¼¥¸¡¢¥ª¡¼¥Ç¥£¥ª¥Õ¥¡¥¤¥ë¡¢¤ª¤è¤Ó¥¯¥é¥¹ÍѤΥµ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤¬ +¤¹¤Ç¤Ë¸ºß¤¹¤ë¾ì¹ç¡¢Ã±°ì¤Î +.B jar +¥Õ¥¡¥¤¥ë¤Ë·ë¹ç¤Ç¤­¤Þ¤¹¡£ +.RS +\f3 +.nf +% ls -F +audio/ classes/ images/ + +% jar cvf bundle.jar audio classes images +added manifest +adding: audio/(in = 0) (out= 0)(stored 0%) +adding: audio/1.au(in = 2324) (out= 67)(deflated 97%) +adding: audio/2.au(in = 6970) (out= 90)(deflated 98%) +adding: audio/3.au(in = 11616) (out= 108)(deflated 99%) +adding: audio/spacemusic.au(in = 3079) (out= 73)(deflated 97%) +adding: classes/(in = 0) (out= 0)(stored 0%) +adding: classes/Animator.class(in = 2266) (out= 66)(deflated 97%) +adding: classes/Wave.class(in = 3778) (out= 81)(deflated 97%) +adding: images/(in = 0) (out= 0)(stored 0%) +adding: images/monkey.jpg(in = 7667) (out= 91)(deflated 98%) +adding: images/at_work.gif(in = 6621) (out= 89)(deflated 98%) + +% ls -F +audio/ bundle.jar classes/ images/ +.fi +\f1 +.RE +¼¡¤ÎÎã¤Ç¤Ï¡¢ +.B t +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Æ¡¢jar ¥Õ¥¡¥¤¥ëÃæ¤Î¥¨¥ó¥È¥ê̾¤òɽ¼¨¤·¤Þ¤¹¡£ +.RS +\f3 +.nf +% jar tf bundle.jar +META-INF/ +META-INF/MANIFEST.MF +audio/1.au +audio/2.au +audio/3.au +audio/spacemusic.au +classes/Animator.class +classes/Wave.class +images/monkey.jpg +images/at_work.gif +.fi +\f1 +.RE +¥¯¥é¥¹¤ÎÆɤ߹þ¤ß¤ò¹â®²½¤¹¤ë¤¿¤á¤Ë jar ¥Õ¥¡¥¤¥ë¤Ë¥¤¥ó¥Ç¥Ã¥¯¥¹¥Õ¥¡¥¤¥ë¤ò +Äɲ乤ë¾ì¹ç¤Ï¡¢¡Öi¡×¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +¤¿¤È¤¨¤Ð³ô¼è°ú¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÎÆâÉô°Í¸¤·¤Æ¤¤¤ë¥¯¥é¥¹¤ò +main.jar¡¢buy.jar¡¢¤ª¤è¤Ó sell.jar ¤È¤¤¤¦ 3 ¤Ä¤Î jar ¥Õ¥¡¥¤¥ë +¤Ëʬ³ä¤·¤¿¤È¤·¤Þ¤¹¡£ +main.jar ¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Î Class-Path +°À­¤Ë¼¡¤Î¤è¤¦¤Ë»ØÄꤷ¤¿¾ì¹ç¡¢ +.LP +.RS 5 +Class-Path: buy.jar sell.jar +.RE +.LP +.B i +¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ì¤Ð¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥¯¥é¥¹¤Î +Æɤ߹þ¤ß¤ò¹â®²½¤Ç¤­¤Þ¤¹¡£ +.LP +.RS 5 +% jar i main.jar +.RE +.LP +INDEX.LIST ¥Õ¥¡¥¤¥ë¤¬ META-INF ¥Ç¥£¥ì¥¯¥È¥ê¤ËÄɲ䵤ì¤Þ¤¹¡£ +¤³¤Î·ë²Ì¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î¥¯¥é¥¹¥í¡¼¥À¤Ë¤è¤Ã¤Æ¥¯¥é¥¹¤Þ¤¿¤Ï +¥ê¥½¡¼¥¹¤Î¸¡º÷¤¬¹Ô¤ï¤ì¤ë¤È¤­¤Ë¡¢Å¬ÀÚ¤Ê jar ¥Õ¥¡¥¤¥ë¤¬¥À¥¦¥ó¥í¡¼¥É¤µ¤ì¤Þ¤¹¡£ +.SH "´ØÏ¢¹àÌÜ" +.LP +.TP 2 +\f2JAR Overview\fP @ +http://java.sun.com/j2se/1.5.0/docs/guide/jar/jarGuide.html/ +.LP +.TP 2 +\f2JAR Files Specification\fP @ +http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html/ +.LP +.TP 2 +\f2JARIndex Spec\fP @ +http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html/ +.LP +.TP 2 +\f2JAR Tutorial\fP @ +http://java.sun.com/docs/books/tutorial/jar/ +.LP +.TP 2 +\f2pack200 Reference Page\fP @ +http://java.sun.com/j2se/1.5.0/tooldocs/solaris/pack200.html/ diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/jarsigner.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/jarsigner.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/jarsigner.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/jarsigner.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,1084 @@ +'\" t +.\" @(#)jarsigner.1 1.7 00/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits r\351serv\351s. +.\" +.TH jarsigner 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +jarsigner \- JAR ½ð̾¤ª¤è¤Ó¸¡¾Ú¥Ä¡¼¥ë +.SH "·Á¼°" +.B jarsigner +[ +.BI options +] +jar-file alias +.br +.B jarsigner +.BI \-verify +[ +.BI options +] +jar-file alias +.SH "µ¡Ç½ÀâÌÀ" +.IX "JAR signing and verification tool " "" "JAR signing and verification tool \(em \fLjarsigner\fP" +.IX "jarsigner" "" "\fLjarsigner\fP \(em JAR signing and verification tool " +.B jarsigner +¥Ä¡¼¥ë¤Ï¡¢¼¡¤Î 2 ¤Ä¤ÎÌÜŪ¤Ç»ÈÍѤ·¤Þ¤¹¡£ +.TP 5 +1. +Java ARchive (JAR) ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë +.TP 5 +2. +½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Î½ð̾¤È´°Á´À­¤ò¸¡¾Ú¤¹¤ë +.LP +JAR µ¡Ç½¤ò»È¤¦¤È¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¡¢¥¤¥á¡¼¥¸¡¢¥µ¥¦¥ó¥É¡¢¤ª¤è¤Ó¤½¤Î¾¤Î¥Ç¥¸¥¿¥ë¥Ç¡¼¥¿ +¤òñ°ì¤Î¥Õ¥¡¥¤¥ë¤Ë¥Ñ¥Ã¥±¡¼¥¸²½¤Ç¤­¤ë¤Î¤Ç¡¢¥Õ¥¡¥¤¥ë¤ò¿×®¤«¤ÄÍưפËÇÛÉۤǤ­¤Þ¤¹¡£ +³«È¯¼Ô¤Ï¡¢ +.B jar +¤È¤¤¤¦Ì¾Á°¤Î¥Ä¡¼¥ë¤ò»È¤Ã¤Æ JAR ¥Õ¥¡¥¤¥ë¤òºîÀ®¤Ç¤­¤Þ¤¹¡£µ»½ÑŪ¤Ê´ÑÅÀ¤«¤é¸À¤¨¤Ð¡¢ +¤¹¤Ù¤Æ¤Î ZIP ¥Õ¥¡¥¤¥ë¤â JAR ¥Õ¥¡¥¤¥ë¤È¤ß¤Ê¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +¡Ö¥Ç¥¸¥¿¥ë½ð̾¡×¤Ï¡¢¤Ê¤ó¤é¤«¤Î¥Ç¡¼¥¿ (¡Ö½ð̾¡×¤ÎÂоݤȤʤë¥Ç¡¼¥¿) ¤È¡¢¥¨¥ó¥Æ¥£¥Æ¥£ +(¿Í¡¢²ñ¼Ò¤Ê¤É) ¤ÎÈó¸ø³«¸°¤È¤Ë´ð¤Å¤¤¤Æ·×»»¤µ¤ì¤ë¥Ó¥Ã¥ÈÎó¤Ç¤¹¡£¼ê½ñ¤­¤Î½ð̾ƱÍÍ¡¢ +¥Ç¥¸¥¿¥ë½ð̾¤Ë¤Ï¿¤¯¤ÎÍøÅÀ¤¬¤¢¤ê¤Þ¤¹¡£ +.TP 2 +\(bu +½ð̾¤ÎÀ¸À®¤Ë»È¤ï¤ì¤¿Èó¸ø³«¸°¤ÈÂФˤʤë¸ø³«¸°¤ò»È¤Ã¤Æ·×»»¤ò¹Ô¤¦¤³¤È¤Ç¡¢ +¥Ç¥¸¥¿¥ë½ð̾¤¬ËÜʪ¤«¤É¤¦¤«¤ò¸¡¾Ú¤Ç¤­¤ë +.TP 2 +\(bu +Èó¸ø³«¸°¤¬Â¾¿Í¤ËÃΤé¤ì¤Ê¤¤¸Â¤ê¡¢¥Ç¥¸¥¿¥ë½ð̾¤Îµ¶Â¤¤ÏÉÔ²Äǽ¤Ç¤¢¤ë +.TP 2 +\(bu +¥Ç¥¸¥¿¥ë½ð̾¤Ï¡¢¤½¤Î½ð̾¤¬ÉÕ¤¤¤¿¥Ç¡¼¥¿¤À¤±¤òÂоݤȤ¹¤ë¤â¤Î¤Ç¤¢¤ê¡¢¤Û¤«¤Î¥Ç¡¼¥¿¤Î +½ð̾¤È¤·¤Æµ¡Ç½¤¹¤ë¤³¤È¤Ï¤Ê¤¤ +.TP 2 +\(bu +½ð̾ÉÕ¤­¤Î¥Ç¡¼¥¿¤ÏÊѹ¹¤Ç¤­¤Ê¤¤¡£¥Ç¡¼¥¿¤¬Êѹ¹¤µ¤ì¤¿¾ì¹ç¤Ï¡¢¤½¤Î½ð̾¤Ë¤è¤Ã¤Æ¥Ç¡¼¥¿ +¤¬ËÜʪ¤Ç¤Ï¤Ê¤¤¤³¤È¤¬¸¡¾Ú¤µ¤ì¤ë +.LP +¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ¥¨¥ó¥Æ¥£¥Æ¥£¤Î½ð̾¤òÀ¸À®¤¹¤ë¤Ë¤Ï¡¢¤Þ¤º¡¢¤½¤Î¥¨¥ó¥Æ¥£¥Æ¥£¤¬¸ø³«¸°¤È +Èó¸ø³«¸°¤Î¥Ú¥¢¤ò»ý¤ÄɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤Þ¤¿¡¢¸ø³«¸°¤òǧ¾Ú¤¹¤ë 1 ¤Ä°Ê¾å¤Î¾ÚÌÀ½ñ¤â +ɬÍפǤ¹¡£¡Ö¾ÚÌÀ½ñ¡×¤È¤Ï¡¢¤¢¤ë¥¨¥ó¥Æ¥£¥Æ¥£¤«¤é¤Î¥Ç¥¸¥¿¥ë½ð̾ÉÕ¤­¤Îʸ½ñ¤Î¤³¤È¤Ç¤¹¡£ +¾ÚÌÀ½ñ¤Ë¤Ï¡¢¤Û¤«¤Î¤¢¤ë¥¨¥ó¥Æ¥£¥Æ¥£¤Î¸ø³«¸°¤¬ÆÃÊ̤ÊÃͤò»ý¤Ã¤Æ¤¤¤ë¤³¤È¤¬½ñ¤«¤ì¤Æ +¤¤¤Þ¤¹¡£ +.LP +.B jarsigner +¤Ï¡¢¡Ö¥­¡¼¥¹¥È¥¢¡×¤Ë´Þ¤Þ¤ì¤ë¸°¤È¾ÚÌÀ½ñ¾ðÊó¤ò»È¤Ã¤Æ¡¢JAR ¥Õ¥¡¥¤¥ë¤Î¥Ç¥¸¥¿¥ë½ð̾¤ò +À¸À®¤·¤Þ¤¹¡£¥­¡¼¥¹¥È¥¢¤Ï¡¢Èó¸ø³«¸°¤È¡¢Èó¸ø³«¸°¤Ë´ØÏ¢ÉÕ¤±¤é¤ì¤¿ X.509 ¾ÚÌÀÏ¢º¿¤¬ +¼ý¤á¤é¤ì¤¿¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç¤¹¡£¾ÚÌÀÏ¢º¿¤Ï¡¢Èó¸ø³«¸°¤ËÂбþ¤¹¤ë¸ø³«¸°¤òǧ¾Ú¤·¤Þ¤¹¡£ +¥­¡¼¥¹¥È¥¢¤ÎºîÀ®¤È´ÉÍý¤Ë¤Ï¡¢ +.B keytool +¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»È¤¤¤Þ¤¹¡£ +.LP +.B jarsigner +¤Ï¡¢¥¨¥ó¥Æ¥£¥Æ¥£¤ÎÈó¸ø³«¸°¤ò»È¤Ã¤Æ½ð̾¤òÀ¸À®¤·¤Þ¤¹¡£½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢ +¥­¡¼¥¹¥È¥¢¤«¤é¤Î¾ÚÌÀ½ñ¤Î¥³¥Ô¡¼¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Î½ð̾¤Ë»È¤ï +¤ì¤¿Èó¸ø³«¸°¤ËÂбþ¤¹¤ë¸ø³«¸°¤Î¾ÚÌÀ½ñ¤Î¥³¥Ô¡¼¤Ç¤¹¡£ +.B jarsigner +¤Ï¡¢½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Î¥Ç¥¸¥¿¥ë½ð̾¤ò¡¢¥Õ¥¡¥¤¥ëÆâ (¤Î½ð̾¥Ö¥í¥Ã¥¯¥Õ¥¡¥¤¥ë) ¤Ë´Þ +¤Þ¤ì¤Æ¤¤¤ë¾ÚÌÀ½ñ¤ò»È¤Ã¤Æ¸¡¾Ú¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +¸½»þÅÀ¤Ç¤Ï¡¢ +.B jarsigner +¤Ç½ð̾¤Ç¤­¤ë¤Î¤Ï¡¢JDK ¤Î +.B jar +¥Ä¡¼¥ë¤ÇºîÀ®¤µ¤ì¤¿ JAR ¥Õ¥¡¥¤¥ë¡¢¤Þ¤¿¤Ï ZIP ¥Õ¥¡¥¤¥ë¤À¤±¤Ç¤¹¡£JAR ¥Õ¥¡¥¤¥ë¤Ï ZIP ¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¤Ç¤¹¤¬¡¢JAR ¥Õ¥¡¥¤¥ë¤Ë¤Ï +.B META-INF/MANIFEST.MF +¥Õ¥¡¥¤¥ë¤¬´Þ¤Þ¤ì¤Æ¤¤¤ëÅÀ¤¬°Û¤Ê¤ê¤Þ¤¹¡£ +.B META-INF/MANIFEST.MF +¥Õ¥¡¥¤¥ë¤Ï¡¢ +.B jarsigner +¤¬ ZIP ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¤È¤­¤Ë¼«Æ°Åª¤ËºîÀ®¤µ¤ì¤Þ¤¹¡£ +.LP +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢ +.B jarsigner +¤Ï JAR ¥Õ¥¡¥¤¥ë¤Ë¡Ö½ð̾¡×¤òÉÕ¤±¤Þ¤¹¡£ +½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤ò¡Ö¸¡¾Ú¡×¤¹¤ë¾ì¹ç¤Ï¡¢ +.B -verify +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Þ¤¹¡£ +.SS "JDK 1.1 ¤È¤Î¸ß´¹À­" +.IX "jarsigner" "Compatibility with JDK 1.1" "\fLjarsigner\fP \(em JAR signing and verification tool " +.B keytool +¥Ä¡¼¥ë¤È +.B jarsigner +¥Ä¡¼¥ë¤Ï¡¢JDK 1.1 ¤ÇÄ󶡤µ¤ì¤Æ¤¤¤¿ +.B javakey +¥Ä¡¼¥ë¤ò´°Á´¤ËÃÖ¤­´¹¤¨¤ë¤â¤Î¤Ç¤¹¡£¤³¤ì¤é¤Î¿·¤·¤¤¥Ä¡¼¥ë¤Ï +.B javakey +¤è¤ê¤â¿¤¯¤Îµ¡Ç½¤òÈ÷¤¨¤Æ¤ª¤ê¡¢¥­¡¼¥¹¥È¥¢¤ÈÈó¸ø³«¸°¤ò¥Ñ¥¹¥ï¡¼¥É¤ÇÊݸ¤ëµ¡Ç½¤ä¡¢ +½ð̾¤ÎÀ¸À®¤À¤±¤Ç¤Ê¤¯½ð̾¤ò¸¡¾Ú¤¹¤ëµ¡Ç½¤ò»ý¤Ã¤Æ¤¤¤Þ¤¹¡£ +.LP +¿·¤·¤¤¥­¡¼¥¹¥È¥¢¥¢¡¼¥­¥Æ¥¯¥Á¥ã¤Ï¡¢ +.B javakey +¤¬ºîÀ®¤·¤Æ´ÉÍý¤·¤Æ¤¤¤¿¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËÂå¤ï¤ë¤â¤Î¤Ç¤¹¡£¥­¡¼¥¹¥È¥¢·Á¼°¤È¡¢JDK 1.1 ¤Î +.B javakey +¤¬»È¤Ã¤Æ¤¤¤¿¥Ç¡¼¥¿¥Ù¡¼¥¹·Á¼°¤È¤Î´Ö¤Ë¤Ï²¼°Ì¸ß´¹À­¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤¿¤À¤·¡¢¼¡¤Î¤è¤¦¤Ê +¤³¤È¤Ï²Äǽ¤Ç¤¹¡£ +.TP 2 +\(bu +.B keytool +¤Î +.B -identitydb +¥³¥Þ¥ó¥É¤ò»È¤¦¤È¡¢¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹¤Î¾ðÊó¤ò¥­¡¼¥¹¥È¥¢¤Ë¥¤¥ó¥Ý¡¼¥È¤Ç¤­¤Þ¤¹¡£ +.TP 2 +\(bu + +.B jarsigner +¤Ï¡¢°ÊÁ°¤Ë +.B javakey +¤ò»È¤Ã¤Æ½ð̾¤µ¤ì¤¿ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.TP 2 +\(bu +.B jarsigner +¤Ï¡¢ +.B javakey +¤ò»È¤Ã¤Æ½ð̾¤µ¤ì¤¿ JAR ¥Õ¥¡¥¤¥ë¤ò¸¡¾Ú¤Ç¤­¤Þ¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢ +.B jarsigner +¤Ï¡¢JDK 1.2 ¤Î¥­¡¼¥¹¥È¥¢¤Ç¤Ï¤Ê¤¯ JDK 1.1 ¤Î¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹¤«¤é¤Î½ð̾¼ÔÊÌ +̾¤òǧ¼±¤·¡¢¤³¤ì¤é¤òÂоݤ˽èÍý¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +¼¡¤Îɽ¤Ï¡¢JDK 1.1.x ¤Ç½ð̾¤µ¤ì¤¿ JAR ¥Õ¥¡¥¤¥ë¤¬¡¢Java 2 ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤É¤Î¤è¤¦¤Ë°·¤ï¤ì¤ë¤«¤ò +¼¨¤·¤Æ¤¤¤Þ¤¹¡£ +.LP +.nf +.ft 3 + 1.1 ¥Ç¡¼¥¿ + 1.1 ¥Ç¡¼¥¿ ¥Ù¡¼¥¹¤«¤é ¥Ý¥ê¥·¡¼ +JAR ¥Ù¡¼¥¹Æâ¤Î 1.2 ¥­¡¼¥¹ ¥Õ¥¡¥¤¥ë +¥Õ¥¡¥¤¥ë ¥¢¥¤¥Ç¥ó ¥È¥¢¤Ë¥¤¥ó ¤¬¥¢¥¤¥Ç¥ó Í¿¤¨¤é¤ì¤ë +¤Î¥¿¥¤¥× ¥Æ¥£¥Æ¥£ ¥Ý¡¼¥È¤µ¤ì ¥Æ¥£¥Æ¥£/ Æø¢ + ¤ë¿®Íê¤Ç¤­ ÊÌ̾¤ËÆø¢ + ¤ë¥¢¥¤¥Ç¥ó ¤òÍ¿¤¨¤ë + ¥Æ¥£¥Æ¥£(4) + +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î¥³¡¼¥É¤Ë +JAR x x x Í¿¤¨¤é¤ì¤ë + ¥Ç¥Õ¥©¥ë¥È¤Î + Æø¢ + +½ð̾¤Î¤Ê¤¤ ¤¹¤Ù¤Æ¤Î¥³¡¼¥É¤Ë +JAR x x x Í¿¤¨¤é¤ì¤ë + ¥Ç¥Õ¥©¥ë¥È¤Î + Æø¢ + +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î¥³¡¼¥É¤Ë +JAR x ¡û x Í¿¤¨¤é¤ì¤ë + ¥Ç¥Õ¥©¥ë¥È¤Î + Æø¢ + +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î¥³¡¼¥É¤Ë +JAR ¡û/¿®Íê¤Ç x x Í¿¤¨¤é¤ì¤ë + ¤­¤Ê¤¤ ¥Ç¥Õ¥©¥ë¥È¤Î + Æø¢ (3) + +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î¥³¡¼¥É¤Ë +JAR ¡û/¿®Íê¤Ç x ¡û Í¿¤¨¤é¤ì¤ë + ¤­¤Ê¤¤ ¥Ç¥Õ¥©¥ë¥È¤Î + Æø¢ (1,3) + +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î¥³¡¼¥É¤Ë +JAR x ¡û ¡û Í¿¤¨¤é¤ì¤ë + ¥Ç¥Õ¥©¥ë¥È¤Î + Æø¢¤È¥Ý¥ê¥·¡¼ + ¥Õ¥¡¥¤¥ëÆâ + ¤ÇÍ¿¤¨¤é¤ì¤ë + Æø¢ + +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î¥³¡¼¥É¤Ë +JAR ¡û/¿®Íê ¡û ¡û Í¿¤¨¤é¤ì¤ë + ¤Ç¤­¤ë ¥Ç¥Õ¥©¥ë¥È¤Î + Æø¢¤È¥Ý¥ê¥·¡¼ + ¥Õ¥¡¥¤¥ëÆâ + ¤ÇÍ¿¤¨¤é¤ì¤ë + Æø¢ (2) + +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î +JAR ¡û/¿®Íê x x Æø¢ + ¤Ç¤­¤ë +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î +JAR ¡û/¿®Íê ¡û x Æø¢ (1) + ¤Ç¤­¤ë +½ð̾ÉÕ¤­ ¤¹¤Ù¤Æ¤Î +JAR ¡û/¿®Íê x ¡û Æø¢ (1) + ¤Ç¤­¤ë +.fi +.ft 1 +.LP +Ãí: +.TP 5 +1. +¥Ý¥ê¥·¡¼¥Õ¥¡¥¤¥ëÆâ¤Ë¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£/ÊÌ̾¤Ë¤Ä¤¤¤Æ¤Î¸ÀµÚ¤¬¤¢¤ë¾ì¹ç¡¢ +¤½¤ì¤ò¥­¡¼¥¹¥È¥¢¤Ë¥¤¥ó¥Ý¡¼¥È¤·¤Æ¡¢¥Ý¥ê¥·¡¼¥Õ¥¡¥¤¥ë¤ÎÀßÄ꤬Ϳ¤¨¤é¤ì¤¿ +Æø¢¤ËÈ¿±Ç¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.TP 5 +2. +¥Ý¥ê¥·¡¼¥Õ¥¡¥¤¥ë/¥­¡¼¥¹¥È¥¢¤ÎÁȤ߹ç¤ï¤»¤Ï¡¢¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹ +Æâ¤Î¿®Íê¤Ç¤­¤ë¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¤è¤ê¤âÍ¥À褵¤ì¤Þ¤¹¡£ +.TP 5 +3. +Java 2 ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Ç¤Ï¡¢¿®Íê¤Ç¤­¤Ê¤¤¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£ +.TP 5 +4. +JDK ¥­¡¼¥¹¥È¥¢¤Ë¥¤¥ó¥Ý¡¼¥È¤Ç¤­¤ë¤Î¤Ï¡¢¿®Íê¤Ç¤­¤ë¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¤À¤±¤Ç¤¹¡£ +.SS "¥­¡¼¥¹¥È¥¢¤ÎÊÌ̾" +.IX "jarsigner" "Keystore Aliases" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +¥­¡¼¥¹¥È¥¢¤Î¤¹¤Ù¤Æ¤Î¥¨¥ó¥È¥ê¤Ï¡¢°ì°Õ¤Î¡ÖÊÌ̾¡×¤ò²ð¤·¤Æ¥¢¥¯¥»¥¹¤µ¤ì¤Þ¤¹¡£ +.LP +.B jarsigner +¤ò»È¤Ã¤Æ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¤È¤­¤Ï¡¢½ð̾¤ÎÀ¸À®¤ËɬÍפÊÈó¸ø³«¸°¤ò +´Þ¤à¥­¡¼¥¹¥È¥¢¥¨¥ó¥È¥ê¤ÎÊÌ̾¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤ÎÎã¤Ï¡¢ +working ¥Ç¥£¥ì¥¯¥È¥ê¤Î +.B mystore +¤È¤¤¤¦Ì¾Á°¤Î¥­¡¼¥¹¥È¥¢¤Ë´Þ¤Þ¤ì¤ëÊÌ̾ +.B duke +¤Ë´ØÏ¢ÉÕ¤±¤é¤ì¤¿Èó¸ø³«¸°¤ò»È¤Ã¤Æ¡¢ +.BR MyJARFile.jar +¤È¤¤¤¦Ì¾Á°¤Î JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤Þ¤¹¡£½ÐÎÏ¥Õ¥¡¥¤¥ë¤Ï»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤ +¤Î¤Ç¡¢ +.BR MyJARFile.jar +¤Ï½ð̾ÉÕ¤­¤Î JAR ¥Õ¥¡¥¤¥ë¤Ë¤è¤Ã¤Æ¾å½ñ¤­¤µ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jarsigner -keystore /working/mystore -storepass + myspass -keypass dukekeypasswd MyJARFile.jar duke +.fi +.ft 1 +.LP +¥­¡¼¥¹¥È¥¢¤Ï¥Ñ¥¹¥ï¡¼¥É¤ÇÊݸ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¥¹¥È¥¢¤Î¥Ñ¥¹¥ï¡¼¥É (¾å¤ÎÎã¤Ç¤Ï +.BR myspass +) ¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥³¥Þ¥ó¥É¹Ô¤Ç¥¹¥È¥¢¤Î¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢¥Ñ¥¹¥ï¡¼¥É¤ÎÆþÎϤòµá¤á¤é¤ì¤Þ¤¹¡£Æ±Íͤˡ¢Èó¸ø³«¸°¤â¥­¡¼¥¹¥È¥¢Æâ¤Ç¥Ñ¥¹¥ï¡¼¥É¤Ë¤è¤Ã¤ÆÊݸ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢Èó¸ø³«¸°¤Î¥Ñ¥¹¥ï¡¼¥É (¾å¤ÎÎã¤Ç¤Ï +.BR dukekeypasswd +) ¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥³¥Þ¥ó¥É¹Ô¤ÇÈó¸ø³«¸°¤Î¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Æ¤ª¤é¤º¡¢Èó¸ø³«¸°¤Î¥Ñ¥¹¥ï¡¼¥È¤¬¥¹¥È¥¢¤Î¥Ñ¥¹¥ï¡¼¥É¤È°ã¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢Èó¸ø³«¸°¤Î¥Ñ¥¹¥ï¡¼¥É¤ÎÆþÎϤòµá¤á¤é¤ì¤Þ¤¹¡£ +.LP +.SS "¥­¡¼¥¹¥È¥¢¤Î¾ì½ê" +.IX "jarsigner" "Keystore Location" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +.B jarsigner +¤Ë¤Ï¡¢»ÈÍѤ¹¤ë¥­¡¼¥¹¥È¥¢¤Î̾Á°¤È¾ì½ê¤ò»ØÄꤹ¤ë +.B -keystore +¥ª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¡£¥­¡¼¥¹¥È¥¢¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¥æ¡¼¥¶¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Î +.B .keystore +¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¡£¥æ¡¼¥¶¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢ +.B user.home +¥·¥¹¥Æ¥à¥×¥í¥Ñ¥Æ¥£¤Ë¤è¤Ã¤Æ·è¤Þ¤ê¤Þ¤¹¡£ +.LP +.B \-keystore +¥ª¥×¥·¥ç¥ó¤«¤é¤ÎÆþÎÏ¥¹¥È¥ê¡¼¥à¤Ï +.B KeyStore.load +¥á¥½¥Ã¥É¤ËÅϤµ¤ì¤Þ¤¹¡£ +URL ¤È¤·¤Æ NONE ¤¬»ØÄꤵ¤ì¤¿¾ì¹ç¤Ï¡¢NULL ¥¹¥È¥ê¡¼¥à¤¬ +.B KeyStore.load +¥á¥½¥Ã¥É¤ËÅϤµ¤ì¤Þ¤¹¡£¥­¡¼¥¹¥È¥¢¤¬¥Ï¡¼¥É¥¦¥§¥¢¥È¡¼¥¯¥ó¥Ç¥Ð¥¤¥¹¾å¤Ë¤¢¤ë¤Ê¤É¡¢ +¥Õ¥¡¥¤¥ë¥Ù¡¼¥¹¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢NONE ¤ò»ØÄꤷ¤Æ¤¯¤À¤µ¤¤¡£ +.SS "¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ" +.IX "jarsigner" "Keystore Implementation" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +.B java.security +¥Ñ¥Ã¥±¡¼¥¸Æâ¤Ë¤¢¤ë KeyStore ¥¯¥é¥¹ +¤Ç¤Ï¡¢¥­¡¼¥¹¥È¥¢Æâ¤Î¾ðÊó¤Ë¥¢¥¯¥»¥¹¤·¡¢Êѹ¹¤Ç¤­¤ë¤è¤¦¤Ë +ŬÀÚ¤ËÄêµÁ¤µ¤ì¤¿¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤¬Ä󶡤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +¤³¤Î¥¯¥é¥¹¤ÏÊ£¿ô¤Î¤µ¤Þ¤¶¤Þ¤Ê¸ÇÄê¼ÂÁõ¤¬²Äǽ¤Ç¡¢ +¤½¤ì¤¾¤ì¤Î¼ÂÁõ¤Ï¡¢ÆÃÄê¤Î¼ïÎà¤Î¥­¡¼¥¹¥È¥¢ÍѤθÇÄê¼ÂÁõ¤Ç¤¹¡£ +.LP +¸½ºß¡¢¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤ò»ÈÍѤ¹¤ë¤â¤Î¤È¤·¤Æ¡¢keytool ¤È +.BR jarsigner +¤Î 2 ¤Ä¤Î¥³¥Þ¥ó¥É¹Ô¥Ä¡¼¥ë¤È¡¢ +.BR policytool +¤È¤¤¤¦Ì¾Á°¤Î 1 ¤Ä¤Î GUI ¥Ù¡¼¥¹¤Î¥Ä¡¼¥ë¤¬¤¢¤ê¤Þ¤¹¡£ +.BR KeyStore +¥¯¥é¥¹¤Ï public ¤È¤·¤Æ»ÈÍѲÄǽ¤Ê¤Î¤Ç¡¢JDK ¥æ¡¼¥¶¤Ï +.B KeyStore +¤ò»È¤Ã¤Æ¤Û¤«¤Î¥»¥­¥å¥ê¥Æ¥£¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤âºîÀ®¤Ç¤­¤Þ¤¹¡£ +.LP +¥­¡¼¥¹¥È¥¢¤Ë¤Ï¡¢Sun ¤¬Ä󶡤¹¤ëÁȤ߹þ¤ß¤Î¥Ç¥Õ¥©¥ë¥È¤Î¼ÂÁõ¤¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ï¡¢ +JKS ¤È¤¤¤¦Ì¾Á°¤ÎÆȼ«¤Î¥­¡¼¥¹¥È¥¢¥¿¥¤¥× (·Á¼°) ¤òÍøÍѤ¹¤ë¤â¤Î¤Ç¡¢¥­¡¼¥¹¥È¥¢¤ò +¥Õ¥¡¥¤¥ë¤È¤·¤Æ¼ÂÁõ¤·¤Æ¤¤¤Þ¤¹¡£¤³¤Î¼ÂÁõ¤Ç¤Ï¡¢¸Ä¡¹¤ÎÈó¸ø³«¸°¤Ï¸ÄÊ̤Υѥ¹¥ï¡¼¥É +¤Ë¤è¤Ã¤ÆÊݸ¤ì¡¢¥­¡¼¥¹¥È¥¢Á´ÂΤδ°Á´À­¤â (Èó¸ø³«¸°¤È¤ÏÊ̤Î) ¥Ñ¥¹¥ï¡¼¥É¤Ë +¤è¤Ã¤ÆÊݸ¤ì¤Þ¤¹¡£ +.LP + +¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤Ï¡¢¥×¥í¥Ð¥¤¥À¥Ù¡¼¥¹¤Ç¤¹¡£¶ñÂÎŪ¤Ë¤Ï¡¢ +.B KeyStore +¥¯¥é¥¹¤¬Ä󶡤¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ï¡¢Service Provider Interface (SPI) +¤È¤¤¤¦·Á¤Ç¼ÂÁõ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢Âбþ¤¹¤ë +.B KeystoreSpi +Ãê¾Ý¥¯¥é¥¹ (¤³¤ì¤â +.B java.security +¥Ñ¥Ã¥±¡¼¥¸¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë) ¤¬¤¢¤ê¡¢¤³¤Î¥¯¥é¥¹¤¬ Service Provider Interface ¤Î +¥á¥½¥Ã¥É¤òÄêµÁ¤·¤Æ¤¤¤Þ¤¹¡£¤³¤ì¤é¤Î¥á¥½¥Ã¥É¤Ï¡¢¡Ö¥×¥í¥Ð¥¤¥À¡×¤¬¼ÂÁõ¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ +¤»¤ó¡£¤³¤³¤Ç¡¢¡Ö¥×¥í¥Ð¥¤¥À¡×¤È¤Ï¡¢Java Security API ¤Ë¤è¤Ã¤Æ¥¢¥¯¥»¥¹²Äǽ¤Ê¥µ¡¼¥Ó¥¹ +¤Î¥µ¥Ö¥»¥Ã¥È¤ËÂФ·¡¢¤½¤Î¸ÇÄê¼ÂÁõ¤òÄ󶡤¹¤ë¥Ñ¥Ã¥±¡¼¥¸¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸¤Î½¸¹ç¤Î +¤³¤È¤Ç¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤òÄ󶡤¹¤ë¤Ë¤Ï¡¢¡ÖJava °Å¹æ²½¥¢¡¼¥­¥Æ¥¯ +¥Á¥ãÍÑ¥×¥í¥Ð¥¤¥À¤Î¼ÂÁõÊýË¡¡×¤Î¥Ú¡¼¥¸¤ÇÀâÌÀ¤·¤Æ¤¤¤ë¤è¤¦¤Ë¡¢¥¯¥é¥¤¥¢¥ó¥È¤¬¥×¥í¥Ð¥¤¥À¤ò¼ÂÁõ¤·¡¢ +.B KeystoreSpi +¥µ¥Ö¥¯¥é¥¹¤Î¼ÂÁõ¤òÄ󶡤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï¡¢ +.B KeyStore +¥¯¥é¥¹¤¬Ä󶡤¹¤ë +.B getInstance +¥Õ¥¡¥¯¥È¥ê¥á¥½¥Ã¥É¤ò»È¤¦¤³¤È¤Ç¡¢¤µ¤Þ¤¶¤Þ¤Ê¥×¥í¥Ð¥¤¥À¤«¤é°Û¤Ê¤ë¡Ö¥¿¥¤¥×¡×¤Î¥­¡¼¥¹¥È¥¢¤Î +¼ÂÁõ¤òÁªÂò¤Ç¤­¤Þ¤¹¡£¥­¡¼¥¹¥È¥¢¤Î¥¿¥¤¥×¤Ï¡¢¥­¡¼¥¹¥È¥¢¾ðÊó¤Î³ÊǼ·Á¼°¤È¥Ç¡¼¥¿·Á¼°¡¢ +¤ª¤è¤Ó¥­¡¼¥¹¥È¥¢Æâ¤ÎÈó¸ø³«¸°¤È¥­¡¼¥¹¥È¥¢¼«ÂΤδ°Á´À­¤òÊݸ¤ë¤¿¤á¤Ë»È¤ï¤ì¤ë +¥¢¥ë¥´¥ê¥º¥à¤òÄêµÁ¤·¤Þ¤¹¡£°Û¤Ê¤ë¥¿¥¤¥×¤Î¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤Ë¤Ï¡¢¸ß¤¤¤Ë¸ß´¹À­¤Ï +¤¢¤ê¤Þ¤»¤ó¡£keytool¡¢jarsigner¡¢¤ª¤è¤Ó policytool ¤Î³Æ¥Ä¡¼¥ë¤Ï¡¢ +.B KeyStore +¤¬Ä󶡤¹¤ë¶¦Ä̤Υ¢¥×¥ê¥±¡¼¥·¥ç¥ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤À¤±¤ò»È¤Ã¤Æ¤¤¤ë¤Î¤Ç¡¢Ç¤°Õ¤Î +¥¿¥¤¥×¤Î¥­¡¼¥¹¥È¥¢¤Ç»ÈÍѤǤ­¤Þ¤¹¡£ +.LP +.B keytool +¤Ï¡¢¥Õ¥¡¥¤¥ë¥Ù¡¼¥¹¤Î¥­¡¼¥¹¥È¥¢¼ÂÁõ¤ËÂФ·¤Æµ¡Ç½¤·¤Þ¤¹¡£ +.B keytool +¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤ÇÅϤµ¤ì¤¿¥­¡¼¥¹¥È¥¢¤Î°ÌÃÖ¤ò¥Õ¥¡¥¤¥ë̾¤È¤·¤Æ°·¤¤¡¢ +.BR FileInputStream +¤ËÊÑ´¹¤·¤Æ¡¢¤½¤³¤«¤é¥­¡¼¥¹¥È¥¢¾ðÊó¤ò¥í¡¼¥É¤·¤Þ¤¹¡£°ìÊý¡¢ +.B jarsigner +¥Ä¡¼¥ë¤ª¤è¤Ó +.B policytool +¥Ä¡¼¥ë¤Ï¡¢URL ¤ò»È¤Ã¤Æ»ØÄꤹ¤ë¤³¤È¤¬²Äǽ¤ÊǤ°Õ¤Î°ÌÃ֤ˤ¢¤ë¥­¡¼¥¹¥È¥¢¤ò +Æɤ߼è¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +.B jarsigner +¤È +.BR keytool +¤Î¾ì¹ç¡¢ +.B -storetype +¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¥³¥Þ¥ó¥É¹Ô¤Ç¥­¡¼¥¹¥È¥¢¤Î¥¿¥¤¥×¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£ +.BR policytool +¤Î¾ì¹ç¤Ï¡¢[Edit] ¥á¥Ë¥å¡¼¤Î [Change Keystore] ¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¥­¡¼¥¹¥È¥¢¤Î +¥¿¥¤¥×¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£ +.LP +¥­¡¼¥¹¥È¥¢¤Î¥¿¥¤¥×¤òÌÀ¼¨Åª¤Ë»ØÄꤷ¤Ê¤¤¾ì¹ç¡¢ +.B keytool +¡¢ +.B jarsigner +¡¢¤ª¤è¤Ó +.B policytool +¤Î³Æ¥Ä¡¼¥ë¤Ï¡¢¥»¥­¥å¥ê¥Æ¥£¥×¥í¥Ñ¥Æ¥£¥Õ¥¡¥¤¥ëÆâ¤Ç»ØÄê +¤µ¤ì¤¿ +.B keystore.type +¥×¥í¥Ñ¥Æ¥£¤ÎÃͤ˴ð¤Å¤¤¤Æ¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤òÁªÂò¤·¤Þ¤¹¡£¥»¥­¥å¥ê¥Æ¥£¥×¥í¥Ñ¥Æ¥£¥Õ¥¡ +¥¤¥ë¤Ï¡¢ +.BR java.security +¤È¤¤¤¦Ì¾Á°¤Ç¥»¥­¥å¥ê¥Æ¥£¥×¥í¥Ñ¥Æ¥£¥Ç¥£¥ì¥¯¥È¥ê +.BR java.home/lib/security +¤ËÃÖ¤«¤ì¤Æ¤¤¤Þ¤¹¡£ +.B java.home +¤Ï¡¢JDK ¤Î¼Â¹Ô´Ä¶­¥Ç¥£¥ì¥¯¥È¥ê¤Ç¤¹¡£(SDK Æâ¤Î jre ¥Ç¥£¥ì¥¯¥È¥ê +¤Þ¤¿¤Ï Java Runtime Environment ¤Î¥È¥Ã¥×¥ì¥Ù¥ë¤Î¥Ç¥£¥ì¥¯¥È¥ê)¡£ +.LP +³Æ¥Ä¡¼¥ë¤Ï¡¢ +.B keystore.type +¤ÎÃͤò¼èÆÀ¤·¡¢¤³¤ÎÃͤǻØÄꤵ¤ì¤¿¥¿¥¤¥×¤Î¥­¡¼¥¹¥È¥¢¤ò¼ÂÁõ¤·¤Æ¤¤¤ë¥×¥í¥Ð¥¤¥À¤¬ +¸«¤Ä¤«¤ë¤Þ¤Ç¡¢¸½ºß¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤ë¤¹¤Ù¤Æ¤Î¥×¥í¥Ð¥¤¥À¤òÄ´¤Ù¤Þ¤¹¡£ÌÜŪ¤Î +¥×¥í¥Ð¥¤¥À¤¬¸«¤Ä¤«¤ë¤È¡¢¤½¤Î¥×¥í¥Ð¥¤¥À¤«¤é¤Î¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤ò»È¤¤¤Þ¤¹¡£ +.LP +.B KeyStore +¥¯¥é¥¹¤Ç¤Ï +.B getDefaultType +¤È¤¤¤¦Ì¾Á°¤Î static ¥á¥½¥Ã¥É¤¬ÄêµÁ¤µ¤ì¤Æ¤ª¤ê¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È¥¢¥×¥ì¥Ã¥È¤Ï¤³¤Î +¥á¥½¥Ã¥É¤ò»È¤¦¤³¤È¤Ç +.B keystore.type +¥×¥í¥Ñ¥Æ¥£¤ÎÃͤò¼èÆÀ¤Ç¤­¤Þ¤¹¡£¼¡¤Î¥³¡¼¥É¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥¹¥È¥¢¥¿¥¤¥× ( +.B keystore.type +¥×¥í¥Ñ¥Æ¥£¤Ç»ØÄꤵ¤ì¤¿¥¿¥¤¥×) ¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤òÀ¸À®¤·¤Þ¤¹¡£ +.LP +.RS 5 +.B KeyStore keyStore = KeyStore.getInstance(KeyStore.getDefaultType()); +.RE +.LP +¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥¹¥È¥¢¥¿¥¤¥×¤Ï jks (Sun ¤¬Ä󶡤¹¤ëÆȼ«¤Î¥¿¥¤¥×¤Î¥­¡¼¥¹¥È¥¢¤Î +¼ÂÁõ) ¤Ç¤¹¡£¤³¤ì¤Ï¡¢¥»¥­¥å¥ê¥Æ¥£¥×¥í¥Ñ¥Æ¥£¥Õ¥¡¥¤¥ëÆâ¤Î¼¡¤Î¹Ô¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤Æ +¤¤¤Þ¤¹¡£ +.LP +.RS 5 +.B keystore.type=jks +.RE +.LP +³Æ¥Ä¡¼¥ë¤Ç¥Ç¥Õ¥©¥ë¥È°Ê³°¤Î¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤ò»ÈÍѤ¹¤ë¤Ë¤Ï¡¢¾å¤Î¹Ô¤òÊѹ¹¤·¤Æ +Ê̤Υ­¡¼¥¹¥È¥¢¤Î¥¿¥¤¥×¤ò»ØÄꤷ¤Þ¤¹¡£ +.LP +¤¿¤È¤¨¤Ð¡¢pkcs12 ¤È¸Æ¤Ð¤ì¤ë¥¿¥¤¥×¤Î¥­¡¼¥¹¥È¥¢¤Î¼ÂÁõ¤òÄ󶡤·¤Æ¤¤¤ë +¥×¥í¥Ð¥¤¥À¥Ñ¥Ã¥±¡¼¥¸¤ò»ÈÍѤ¹¤ë¤Ë¤Ï¡¢¾å¤Î¹Ô¤ò¼¡¤Î¤è¤¦¤ËÊѹ¹¤·¤Þ¤¹¡£ +.LP +.B keystore.type=pkcs12 +.LP +Ãí: ¥­¡¼¥¹¥È¥¢¤Î¥¿¥¤¥×¤Î»ØÄê¤Ç¤Ï¡¢Âçʸ»ú¤È¾®Ê¸»ú¤Ï¶èÊ̤µ¤ì¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢ +JKS ¤È jks ¤ÏƱ¤¸¤â¤Î¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£ +.SS "¥µ¥Ý¡¼¥È¤µ¤ì¤ë¥¢¥ë¥´¥ê¥º¥à¤È¥­¡¼¥µ¥¤¥º" +.IX "jarsigner" "Supported Algorithms and Key Sizes" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +¸½»þÅÀ¤Ç¤Ï¡¢ +.B jarsigner +¤Ï¼¡¤Î¤É¤Á¤é¤«¤Î¥¢¥ë¥´¥ê¥º¥à¤ò»È¤Ã¤Æ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.TP 2 +\(bu +SHA-1 ¥À¥¤¥¸¥§¥¹¥È¥¢¥ë¥´¥ê¥º¥à¤ò»È¤Ã¤¿ DSA (¥Ç¥¸¥¿¥ë½ð̾¥¢¥ë¥´¥ê¥º¥à) +.TP 2 +\(bu +MD5 ¥À¥¤¥¸¥§¥¹¥È¥¢¥ë¥´¥ê¥º¥à¤ò»È¤Ã¤¿ RSA ¥¢¥ë¥´¥ê¥º¥à +.LP +¶ñÂÎŪ¤Ë¤Ï¡¢½ð̾¼Ô¤Î¸ø³«¸°¤ÈÈó¸ø³«¸°¤¬ DSA ¸°¤Ç¤¢¤ë¾ì¹ç¡¢ +.B jarsigner +¤Ï SHA-1/DSA ¥¢¥ë¥´¥ê¥º¥à¤ò»È¤Ã¤Æ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤è¤¦¤È¤·¤Þ¤¹¡£½ð̾¼Ô¤Î +¸°¤¬ RSA ¸°¤Ç¤¢¤ë¾ì¹ç¡¢ +.B jarsigner +¤Ï MD5/RSA ¥¢¥ë¥´¥ê¥º¥à¤ò»È¤Ã¤Æ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤Þ¤¹¡£¤¿¤À¤·¡¢ +MD5/RSA ¥¢¥ë¥´¥ê¥º¥à¤ò»ÈÍѤǤ­¤ë¤Î¤Ï¡¢MD5/RSA ¥¢¥ë¥´¥ê¥º¥à¤Î¼ÂÁõ¤ò +Ä󶡤¹¤ë¡¢ÀÅŪ¤Ë¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿¥×¥í¥Ð¥¤¥À¤¬Â¸ºß¤¹¤ë¾ì¹ç¤À¤±¤Ç¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Î SUN ¥×¥í¥Ð¥¤¥À¤«¤é¤Î SHA-1/DSA ¥¢¥ë¥´¥ê¥º¥à¤Ï¾ï¤Ë»ÈÍѤǤ­¤Þ¤¹¡£ + +.LP +.SS "½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë" +.IX "jarsigner" "The Signed JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +.B jarsigner +¤ò»È¤Ã¤Æ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤¿¾ì¹ç¡¢½ÐÎϤµ¤ì¤ë½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Ï +ÆþÎÏ JAR ¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¤Ç¤¹¤¬¡¢¼¡¤Î 2 ¤Ä¤ÎÄɲåե¡¥¤¥ë¤¬ +.B META-INF +¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤«¤ì¤ëÅÀ¤¬°Û¤Ê¤ê¤Þ¤¹¡£ +.TP 2 +\(bu +.B .SF +³ÈÄ¥»Ò¤ÎÉÕ¤¤¤¿½ð̾¥Õ¥¡¥¤¥ë +.TP 2 +\(bu +.B .DSA +³ÈÄ¥»Ò¤ÎÉÕ¤¤¤¿½ð̾¥Ö¥í¥Ã¥¯¥Õ¥¡¥¤¥ë +.LP +¤³¤ì¤é 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤Î¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Ï¡¢ +.B -sigFile +¥ª¥×¥·¥ç¥ó¤ÎÃͤ«¤éºîÀ®¤µ¤ì¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¤È¤·¤Þ¤¹¡£ +.LP +.B -sigFile MKSIGN +.LP +¤³¤Î¾ì¹ç¡¢¥Õ¥¡¥¤¥ë̾¤Ï¤½¤ì¤¾¤ì +.B MKSIGN.SF +¤È +.BR MKSIGN.DSA +¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +¥³¥Þ¥ó¥É¹Ô¤Ë +.B -sigfile +¥ª¥×¥·¥ç¥ó¤Î»ØÄ꤬¤Ê¤¤¾ì¹ç¡¢ +.B .SF +¥Õ¥¡¥¤¥ë¤È +.B .DSA +¥Õ¥¡¥¤¥ë¤Î¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ç»ØÄꤵ¤ì¤¿ÊÌ̾¤ÎÀèƬ¤Î 8 ʸ»ú¤ò +¤¹¤Ù¤ÆÂçʸ»ú¤ËÊÑ´¹¤·¤¿¤â¤Î¤Ë¤Ê¤ê¤Þ¤¹¡£ÊÌ̾¤¬ 8 ʸ»ṳ́Ëþ¤Î¾ì¹ç¤Ï¡¢ÊÌ̾¤¬ +¤½¤Î¤Þ¤Þ»È¤ï¤ì¤Þ¤¹¡£ÊÌ̾¤ÎÃæ¤Ë¡¢½ð̾¥Õ¥¡¥¤¥ë̾¤Ë»ÈÍѤǤ­¤Ê¤¤Ê¸»ú¤¬´Þ¤Þ¤ì +¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢³ºÅö¤¹¤ëʸ»ú¤ò²¼Àþ (_) ¤ËÃÖ¤­´¹¤¨¤Æ¥Õ¥¡¥¤¥ë̾¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£ +»ÈÍѤǤ­¤ëʸ»ú¤Ï¡¢¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È¡¢¿ô»ú¡¢²¼Àþ (_)¡¢¥Ï¥¤¥Õ¥ó¤Ç¤¹¡£ +.LP +½ð̾ (\f3.SF\f1) ¥Õ¥¡¥¤¥ë +.LP +½ð̾¥Õ¥¡¥¤¥ë ( +.B .SF +¥Õ¥¡¥¤¥ë) ¤Ï¡¢ +.B jar +¥Ä¡¼¥ë¤ÇÀ¸À®¤µ¤ì¤¿ JAR ¥Õ¥¡¥¤¥ë¤Ë¾ï¤Ë´Þ¤Þ¤ì¤ë¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ë¤È»÷¤Æ¤¤¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëƱÍÍ¡¢ +.B .SF +¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤´¤È¤Ë¡¢¼¡¤Î 3 ¤Ä¤Î¹Ô¤¬¤¢¤ê¤Þ¤¹¡£ +.TP 2 +\(bu +¥Õ¥¡¥¤¥ë̾ +.TP 2 +\(bu +»È¤ï¤ì¤Æ¤¤¤ë¥À¥¤¥¸¥§¥¹¥È¥¢¥ë¥´¥ê¥º¥à (SHA) ¤Î̾Á° +.TP 2 +\(bu +SHA ¥À¥¤¥¸¥§¥¹¥È¤ÎÃÍ +.LP +¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢SHA ¥À¥¤¥¸¥§¥¹¥È¤ÎÃͤϡ¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥Ð¥¤¥Ê¥ê¥Ç¡¼¥¿ +¤Î¥À¥¤¥¸¥§¥¹¥È (¥Ï¥Ã¥·¥å) ¤Ç¤¹¡£°ìÊý¡¢ +.B .SF +¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥À¥¤¥¸¥§¥¹¥È¤ÎÃͤϡ¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÃæ¤Î³ºÅö¤¹¤ë +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ËÂбþ¤¹¤ë 3 ¹Ô¤Î¥Ï¥Ã¥·¥å¤Ç¤¹¡£ +.LP +½ð̾¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÁ´ÂΤΥϥå·¥å¤â´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +¸å½Ò¤Î¡ÖJAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú¡×¤ÇÀâÌÀ¤¹¤ë¤è¤¦¤Ë¡¢¤³¤Î¥Ø¥Ã¥À¤Î¸ºß¤Ë¤è¤Ã¤Æ¸¡¾Ú¤Î +ºÇŬ²½¤¬²Äǽ¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ +.LP +½ð̾¥Ö¥í¥Ã¥¯ (\f3.DSA\f1) ¥Õ¥¡¥¤¥ë +.LP +.B .SF +¥Õ¥¡¥¤¥ë¤Ë¤Ï½ð̾¤¬ÉÕ¤±¤é¤ì¡¢½ð̾¤Ï +.B .DSA +¥Õ¥¡¥¤¥ë¤ËÃÖ¤«¤ì¤Þ¤¹¡£ +.B .DSA +¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¥­¡¼¥¹¥È¥¢¤«¤é¤Î¾ÚÌÀ½ñ¤Þ¤¿¤Ï¾ÚÌÀÏ¢º¿¤âÉä¹æ²½¤µ¤ì¤¿·Á¤Ç´Þ¤Þ¤ì¤Æ +¤¤¤Þ¤¹¡£¾ÚÌÀ½ñ¤Þ¤¿¤Ï¾ÚÌÀÏ¢º¿¤Ï¡¢½ð̾¤Ë»È¤ï¤ì¤¿Èó¸ø³«¸°¤ËÂбþ¤¹¤ë¸ø³«¸°¤ò +ǧ¾Ú¤·¤Þ¤¹¡£ +.LP +.SS "JAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú" +.IX "jarsigner" "JAR File Verification" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +JAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú¤¬À®¸ù¤¹¤ë¤Î¤Ï¡¢½ð̾¤¬Í­¸ú¤Ç¤¢¤ê¡¢¤«¤Ä½ð̾¤ÎÀ¸À®°Ê¸å¤Ë +JAR ¥Õ¥¡¥¤¥ëÆâ¤Î¤É¤Î¥Õ¥¡¥¤¥ë¤âÊѹ¹¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ç¤¹¡£JAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú¤Ï¡¢¼¡¤Î¼ê½ç¤Ç¹Ô¤ï¤ì¤Þ¤¹¡£ +.TP 5 +1. +.B .SF +¥Õ¥¡¥¤¥ë¤½¤ì¼«ÂΤνð̾¤ò¸¡¾Ú¤·¤Þ¤¹¡£ +.RS +.LP +¤³¤Î¼ê½ç¤Ç¤Ï¡¢³Æ½ð̾¥Ö¥í¥Ã¥¯ ( +.B .DSA +) ¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤µ¤ì¤Æ¤¤¤ë½ð̾¤¬¡¢¼ÂºÝ¤Ë¡¢¸ø³«¸°¤ËÂбþ¤¹¤ëÈó¸ø³«¸°¤ò»È¤Ã¤Æ +À¸À®¤µ¤ì¤¿¤â¤Î¤Ç¤¢¤ë¤³¤È¤ò³Îǧ¤·¤Þ¤¹¡£ +.B .DSA +¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¸ø³«¸°¤Î¾ÚÌÀ½ñ¤â´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿¡¢¤³¤Î¼ê½ç +¤Ç¤Ï¡¢ÌÜŪ¤Î½ð̾¤¬¡¢Âбþ¤¹¤ë½ð̾ ( +.B .SF +) ¥Õ¥¡¥¤¥ëÆâ¤ÎÍ­¸ú¤Ê½ð̾¤Ç¤¢¤ë¤«¤É¤¦¤«¤òÄ´¤Ù¡¢ +.B .SF +¥Õ¥¡¥¤¥ë¤¬²þÊѤµ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤â³Îǧ¤·¤Þ¤¹¡£ +.RE +.TP 5 +2. +.B .SF +¥Õ¥¡¥¤¥ëÆâ¤Î³Æ¥¨¥ó¥È¥ê¤Î¥À¥¤¥¸¥§¥¹¥È¤ò¥Þ¥Ë¥Õ¥§¥¹¥ÈÆâ¤ÎÂбþ¤¹¤ë³Æ¥»¥¯¥·¥ç¥ó¤ÈÆͤ­ +¹ç¤ï¤»¤Æ¸¡¾Ú¤·¤Þ¤¹¡£ +.RS +.LP +.B .SF +¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÁ´ÂΤΥϥ工夬³ÊǼ¤µ¤ì¤¿¥Ø¥Ã¥À¤¬¥Ç¥Õ¥©¥ë¥È¤Ç +´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£¤³¤Î¥Ø¥Ã¥À¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢¥Ø¥Ã¥ÀÆâ¤Î¥Ï¥Ã¥·¥å¤¬¼ÂºÝ¤Ë¥Þ¥Ë¥Õ¥§ +¥¹¥È¥Õ¥¡¥¤¥ë¤Î¥Ï¥Ã¥·¥å¤È°ìÃפ¹¤ë¤«¤É¤¦¤«¤ò¸¡¾Ú¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Ï¥Ã¥·¥å¤¬°ìÃפ¹ +¤ë¾ì¹ç¤Ï¡¢¼¡¤Î¼ê½ç¤Ë¿Ê¤ß¤Þ¤¹¡£ +.LP +¥Ï¥Ã¥·¥å¤¬°ìÃפ·¤Ê¤¤¾ì¹ç¤Ï¡¢¸úΨŪ¤Ë¤ÏÎô¤ëÊýË¡¤ò»È¤Ã¤Æ¸¡¾Ú¤ò¹Ô¤¤¤Þ¤¹¡£¶ñÂÎŪ +¤Ë¤Ï¡¢ +.B .SF +¥Õ¥¡¥¤¥ëÆâ¤Î³Æ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¾ðÊ󥻥¯¥·¥ç¥ó¤Î¥Ï¥Ã¥·¥å¤¬¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÆâ¤Î +Âбþ¤¹¤ë¥»¥¯¥·¥ç¥ó¤Î¥Ï¥Ã¥·¥å¤È°ìÃפ¹¤ë¤«¤É¤¦¤«¤ò³Îǧ¤·¤Þ¤¹ (¡Ö½ð̾ (\f3.SF\f1) +¥Õ¥¡¥¤¥ë¡×¤ò»²¾È)¡£ +.LP +.B .SF +¥Õ¥¡¥¤¥ë¤Î¥Ø¥Ã¥À¤Ë³ÊǼ¤µ¤ì¤¿¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ë¤Î¥Ï¥Ã¥·¥å¤È¡¢¼ÂºÝ¤Î¥Þ¥Ë¥Õ¥§¥¹¥È +¥Õ¥¡¥¤¥ë¤Î¥Ï¥Ã¥·¥å¤È¤¬°ìÃפ·¤Ê¤¤¾ì¹ç¤Ï¡¢½ð̾ (¤ª¤è¤Ó +.B .SF +¥Õ¥¡¥¤¥ë) ¤ÎÀ¸À®¸å¤Ë¡¢¥Õ¥¡¥¤¥ë¤Ë 1 ¤Ä°Ê¾å¤Î¥Õ¥¡¥¤¥ë¤¬Äɲà ( +.B jar +¥Ä¡¼¥ë¤ò»ÈÍÑ) ¤µ¤ì¤¿²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£ +.B jar +¥Ä¡¼¥ë¤ò»È¤Ã¤Æ¥Õ¥¡¥¤¥ë¤òÄɲä·¤¿¾ì¹ç¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ë¤ÏÊѹ¹¤µ¤ì¤Þ¤¹¤¬ +(¿·¤·¤¤¥Õ¥¡¥¤¥ëÍѤΥ»¥¯¥·¥ç¥ó¤¬Äɲ䵤ì¤ë)¡¢ +.B .SF +¥Õ¥¡¥¤¥ë¤ÏÊѹ¹¤µ¤ì¤Þ¤»¤ó¡£¤³¤Î¾ì¹ç¡¢ +.B .SF +¥Õ¥¡¥¤¥ë¤Î¥Ø¥Ã¥À°Ê³°¤Î¥»¥¯¥·¥ç¥ó¤Ë³ÊǼ¤µ¤ì¤¿¥Ï¥Ã¥·¥å¤¬¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÆâ¤Î +Âбþ¤¹¤ë¥»¥¯¥·¥ç¥ó¤Î¥Ï¥Ã¥·¥å¤È°ìÃפ¹¤ë¤È¤­¤Ï¡¢½ð̾¤ÎÀ¸À®»þ¤Ë JAR ¥Õ¥¡¥¤¥ëÆâ¤Ë +¸ºß¤·¤Æ¤¤¤¿¥Õ¥¡¥¤¥ë¤Î¤¦¤Á¡¢¤É¤Î¥Õ¥¡¥¤¥ë¤âÊѹ¹¤µ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤Ë¤Ê¤ê¡¢¸¡¾Ú¤ÏÀ®¸ù +¤·¤¿¤â¤Î¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£ +.RE +.TP 5 +3. +JAR ¥Õ¥¡¥¤¥ëÆâ¤Î¥Õ¥¡¥¤¥ë¤Î¤¦¤Á¡¢ +.B .SF +¥Õ¥¡¥¤¥ëÆâ¤Ë¥¨¥ó¥È¥ê¤ò»ý¤Ä³Æ¥Õ¥¡¥¤¥ë¤òÆɤ߹þ¤ß¤Þ¤¹¡£Æɤ߹þ¤ßÃæ¤Ë¥Õ¥¡¥¤¥ë¤Î +¥À¥¤¥¸¥§¥¹¥È¤ò·×»»¤·¡¢·ë²Ì¤ò¥Þ¥Ë¥Õ¥§¥¹¥È¥»¥¯¥·¥ç¥óÆâ¤Î³ºÅö¤¹¤ë¥Õ¥¡¥¤¥ë¤Î +¥À¥¤¥¸¥§¥¹¥È¤ÈÈæ³Ó¤·¤Þ¤¹¡£2 ¤Ä¤Î¥À¥¤¥¸¥§¥¹¥È¤ÏƱ¤¸¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢¤½¤¦¤Ç¤Ê¤¤ +¾ì¹ç¤Ï¸¡¾Ú¤¬¼ºÇÔ¤·¤Þ¤¹¡£ +.LP +¸¡¾Ú¥×¥í¥»¥¹¤ÎÅÓÃæ¤Ç¤Ê¤ó¤é¤«¤Î½ÅÂç¤Ê¸¡¾Ú¥¨¥é¡¼¤¬È¯À¸¤·¤¿¾ì¹ç¡¢¸¡¾Ú¥×¥í¥»¥¹ +¤ÏÃæ»ß¤µ¤ì¡¢¥»¥­¥å¥ê¥Æ¥£Îã³°¤¬¥¹¥í¡¼¤µ¤ì¤Þ¤¹¡£¥¹¥í¡¼¤µ¤ì¤¿¥»¥­¥å¥ê¥Æ¥£Îã³°¤Ï¡¢ +.BR jarsigner +¤¬¥­¥ã¥Ã¥Á¤·¤Æɽ¼¨¤·¤Þ¤¹¡£ +.LP +.SS "1 ¤Ä¤Î JAR ¥Õ¥¡¥¤¥ë¤òÂоݤȤ¹¤ëÊ£¿ô¤Î½ð̾" +.IX "jarsigner" "Multiple Signatures for a JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +1 ¤Ä¤Î JAR ¥Õ¥¡¥¤¥ë¤ËÂФ·¤Æ +.B jarsigner +¥Ä¡¼¥ë¤òÊ£¿ô²ó¼Â¹Ô¤·¡¢¼Â¹Ô¤Î¤¿¤Ó¤Ë¡¢°Û¤Ê¤ë¥æ¡¼¥¶¤ÎÊÌ̾¤ò»ØÄꤹ¤ì¤Ð¡¢JAR +¥Õ¥¡¥¤¥ë¤ËÊ£¿ô¤Î¥æ¡¼¥¶¤Î½ð̾¤òÉÕ¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë¤·¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jarsigner myBundle.jar susan +jarsigner myBundle.jar kevin +.fi +.ft 1 +.LP +JAR ¥Õ¥¡¥¤¥ë¤¬Ê£¿ô²ó½ð̾¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¤½¤Î JAR ¥Õ¥¡¥¤¥ë¤Ë¤Ï +.B .SF +¥Õ¥¡¥¤¥ë¤È +.B .DSA +¥Õ¥¡¥¤¥ë¤ÎÂФ¬Ê£¿ô´Þ¤Þ¤ì¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£ +.B .SF +¥Õ¥¡¥¤¥ë¤È +.B .DSA +¥Õ¥¡¥¤¥ë¤ÎÂФϡ¢1 ²ó¤Î½ð̾¤ËÂФ·¤Æ 1 ¤ÄºîÀ®¤µ¤ì¤Þ¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢¾å¤ÎÎã¤Ç½ÐÎÏ +¤µ¤ì¤ë JAR ¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¼¡¤Î̾Á°¤ò»ý¤Ä¥Õ¥¡¥¤¥ë¤¬´Þ¤Þ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +SUSAN.SF +SUSAN.DSA +KEVIN.SF +KEVIN.DSA +.fi +.ft 1 +.LP +Ãí: JDK 1.1 ¤Î +.B javakey +¥Ä¡¼¥ë¤ÇÀ¸À®¤·¤¿½ð̾¤È¡¢ +.B jarsigner +¤ÇÀ¸À®¤·¤¿½ð̾¤È¤¤¤¦¤è¤¦¤Ë¡¢ +1 ¤Ä¤Î JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òº®ºß¤µ¤»¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¤Ä¤Þ¤ê +.B javakey +¤Ç¤¹¤Ç¤Ë°ÊÁ°½ð̾¤·¤¿ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤¹¤ë¤¿¤á¤Ë¡¢ +.B jarsigner +¤ò»ÈÍѤǤ­¤Þ¤¹¡£ +.SH "¥ª¥×¥·¥ç¥ó" +.LP +°Ê²¼¤Ç¤Ï¡¢ +.B jarsigner +¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤Þ¤¹¡£¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¤­¤Ï¡¢¼¡¤ÎÅÀ¤ËÃí°Õ +¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP 2 +\(bu +¤É¤Î¥ª¥×¥·¥ç¥ó̾¤Ë¤âÀèƬ¤Ë¥Þ¥¤¥Ê¥¹µ­¹æ (-) ¤¬ÉÕ¤¯ +.TP 2 +\(bu +¥ª¥×¥·¥ç¥ó¤ÏǤ°Õ¤Î½ç½ø¤Ç»ØÄê¤Ç¤­¤ë +.TP 2 +\(bu +¥¤¥¿¥ê¥Ã¥¯ÂΤιàÌܤμºݤÎÃÍ (¥ª¥×¥·¥ç¥ó¤ÎÃÍ) ¤Ï¡¢¥æ¡¼¥¶¤¬»ØÄꤹ¤ëɬÍפ¬¤¢¤ë +.TP 2 +\(bu +.BR -keystore¡¢ +.BR -storepass¡¢ +.BR -keypass¡¢ +.BR -sigfile +¤ª¤è¤Ó +.B -signedjar +¤Î³Æ¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤǤ­¤ë¤Î¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¾ì¹ç¤À¤±¤Ç¤¢¤ë¡£ +¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤ò¸¡¾Ú¤¹¤ë¾ì¹ç¤Ë¤Ï»ÈÍѤǤ­¤Ê¤¤¡£Æ±Íͤˡ¢ +ÊÌ̾¤ò¥³¥Þ¥ó¥É¹Ô¤Ç»ØÄꤹ¤ë¤Î¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¾ì¹ç¤À¤±¤Ç¤¢¤ë +.TP 15 +.BI -keystore " url" +¥­¡¼¥¹¥È¥¢¤Î¾ì½ê¤ò¼¨¤¹ URL ¤ò»ØÄꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ï¡¢¥æ¡¼¥¶¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È +¥êÆâ¤Î¥Õ¥¡¥¤¥ë +.B .keystore +¤Ç¤¹¡£¥æ¡¼¥¶¤Î¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢ +.B user.home +¥·¥¹¥Æ¥à¥×¥í¥Ñ¥Æ¥£¤Ë¤è¤Ã¤Æ·è¤Þ¤ê¤Þ¤¹¡£ +.RS +.LP +½ð̾¤¹¤ë¤È¤­¤Ï¥­¡¼¥¹¥È¥¢¤¬É¬ÍפǤ¹¡£¤³¤Î¤¿¤á¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥¹¥È¥¢¤¬Â¸ºß +¤·¤Ê¤¤¾ì¹ç¡¢¤¢¤ë¤¤¤Ï¥Ç¥Õ¥©¥ë¥È°Ê³°¤Î¤Û¤«¤Î¥­¡¼¥¹¥È¥¢¤ò»ÈÍѤ¹¤ë¾ì¹ç¤Ï¡¢ +¥­¡¼¥¹¥È¥¢¤òÌÀ¼¨Åª¤Ë»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +¸¡¾Ú¤¹¤ë¤È¤­¤Ï¥­¡¼¥¹¥È¥¢¤ÏɬÍפ¢¤ê¤Þ¤»¤ó¡£¤¿¤À¤·¡¢¥­¡¼¥¹¥È¥¢¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¤«¡¢ +¤¢¤ë¤¤¤Ï¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥¹¥È¥¢¤¬Â¸ºß¤·¤Æ¤¤¤Æ¡¢¤µ¤é¤Ë +.B -verbose +¥ª¥×¥·¥ç¥ó¤â»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú¤Ë»È¤ï¤ì¤ë¾ÚÌÀ½ñ¤¬ +¥­¡¼¥¹¥È¥¢¤Ë¸ºß¤¹¤ë¤«¤É¤¦¤«¤Ë¤Ä¤¤¤Æ¤ÎÄɲþðÊ󤬽ÐÎϤµ¤ì¤Þ¤¹¡£ +.LP +Ãí: +.B -keystore +¤Î°ú¿ô¤Ë¤Ï¡¢URL ¤ÎÂå¤ï¤ê¤Ë¥Õ¥¡¥¤¥ë̾ (¤È¥Ñ¥¹) ¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£¥Õ¥¡¥¤¥ë̾ +(¤È¥Ñ¥¹) ¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢¡Öfile:¡×URL ¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë +»ØÄê¤Ç¤­¤Þ¤¹¡£ +.LP +.B -keystore filePathAndName +.LP +¤³¤ì¤Ï¡¢¼¡¤Î»ØÄê¤ÈƱ¤¸¤â¤Î¤È¤·¤Æ°·¤ï¤ì¤Þ¤¹¡£ +.LP +.B -keystore file:filePathAndName +.LP +.RE +.TP +.BI -storetype " storetype" +¥¤¥ó¥¹¥¿¥ó¥¹¤òÀ¸À®¤¹¤ë¥­¡¼¥¹¥È¥¢¤Î¥¿¥¤¥×¤ò»ØÄꤷ¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥¹¥È¥¢¤Î +¥¿¥¤¥×¤Ï¡¢¥»¥­¥å¥ê¥Æ¥£¥×¥í¥Ñ¥Æ¥£¥Õ¥¡¥¤¥ë¤Ç keystore.type ¥×¥í¥Ñ¥Æ¥£¤ÎÃͤȤ·¤Æ +»ØÄꤵ¤ì¤¿¥¿¥¤¥×¤Ç¡¢ +.BR java.security.KeyStore +¤Î static +.B getDefaultType +¥á¥½¥Ã¥É¤Ë¤è¤Ã¤ÆÊÖ¤µ¤ì¤Þ¤¹¡£ +.TP +.BI -storepass " password" +¥­¡¼¥¹¥È¥¢¤Ë¥¢¥¯¥»¥¹¤¹¤ë¤Î¤ËɬÍפʥѥ¹¥ï¡¼¥É¤ò»ØÄꤷ¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤¬É¬Í× +¤Ê¤Î¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¤È¤­¤À¤±¤Ç¤¹ (JAR ¥Õ¥¡¥¤¥ë¤ò¸¡¾Ú¤¹¤ë¤È¤­¤Ï +ÉÔÍ×)¡£½ð̾¤òÉÕ¤±¤ë¤È¤­¤Ë¡¢¥³¥Þ¥ó¥É¹Ô¤Ç +.B -storepass +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢¥Ñ¥¹¥ï¡¼¥É¤ÎÆþÎϤòµá¤á¤é¤ì¤Þ¤¹¡£ +.RS +.LP +Ãí: ¥Æ¥¹¥È¤òÌÜŪ¤È¤¹¤ë¾ì¹ç¡¢¤Þ¤¿¤Ï°ÂÁ´¤¬Êݾ㤵¤ì¤¿¥·¥¹¥Æ¥à¤Ç¼Â¹Ô¤¹¤ë¾ì¹ç +°Ê³°¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤ä¥¹¥¯¥ê¥×¥È¤Ç¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£¤Þ¤¿¡¢ +password ¥×¥í¥ó¥×¥È¤Ç¥Ñ¥¹¥ï¡¼¥É¤òÆþÎϤ¹¤ë¤È¡¢ÆþÎϤ·¤¿¥Ñ¥¹¥ï¡¼¥É¤¬¥¨¥³¡¼¤µ¤ì¡¢ +¤½¤Î¤Þ¤Þ²èÌ̤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢¼þ°Ï¤Ë¤Û¤«¤Î¥æ¡¼¥¶¤¬¤¤¤ë¾ì¹ç¤Ï¡¢ +¥Ñ¥¹¥ï¡¼¥É¤ò¸«¤é¤ì¤Ê¤¤¤è¤¦¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ +.RE +.TP +.BI -keypass " password" +¥³¥Þ¥ó¥É¹Ô¤Ç»ØÄꤵ¤ì¤¿ÊÌ̾¤ËÂбþ¤¹¤ë¥­¡¼¥¹¥È¥¢¥¨¥ó¥È¥ê¤ÎÈó¸ø³«¸°¤òÊݸ¤ë¤Î +¤Ë»È¤¦¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Þ¤¹¡£ +.B jarsigner +¤ò»È¤Ã¤Æ JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤ë¤È¤­¤Ï¡¢¥Ñ¥¹¥ï¡¼¥É¤¬É¬ÍפǤ¹¡£¥³¥Þ¥ó¥É¹Ô¤Ç +¥Ñ¥¹¥ï¡¼¥É¤¬»ØÄꤵ¤ì¤Æ¤ª¤é¤º¡¢É¬Íפʥѥ¹¥ï¡¼¥É¤¬¥¹¥È¥¢¤Î¥Ñ¥¹¥ï¡¼¥É¤È°Û¤Ê¤ë +¾ì¹ç¤Ï¡¢¥Ñ¥¹¥ï¡¼¥É¤ÎÆþÎϤòµá¤á¤é¤ì¤Þ¤¹¡£ +.RS +.LP +Ãí: ¥Æ¥¹¥È¤òÌÜŪ¤È¤¹¤ë¾ì¹ç¡¢¤Þ¤¿¤Ï°ÂÁ´¤Ç¤¢¤ë¤³¤È¤¬¤ï¤«¤Ã¤Æ¤¤¤ë¥·¥¹¥Æ¥à¤Ç +¼Â¹Ô¤¹¤ë¾ì¹ç°Ê³°¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤ä¥¹¥¯¥ê¥×¥È¤Ç¥Ñ¥¹¥ï¡¼¥É¤ò»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£ +¤Þ¤¿¡¢password ¥×¥í¥ó¥×¥È¤Ç¥Ñ¥¹¥ï¡¼¥É¤òÆþÎϤ¹¤ë¤È¡¢ÆþÎϤ·¤¿¥Ñ¥¹¥ï¡¼¥É¤¬¥¨¥³¡¼ +¤µ¤ì¡¢¤½¤Î¤Þ¤Þ²èÌ̤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢¼þ°Ï¤Ë¤Û¤«¤Î¥æ¡¼¥¶¤¬¤¤¤ë¾ì¹ç¤Ï¡¢ +¥Ñ¥¹¥ï¡¼¥É¤ò¸«¤é¤ì¤Ê¤¤¤è¤¦¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ +.RE +.TP +.BI -sigfile " file" +.B .SF +¥Õ¥¡¥¤¥ë¤È +.B .DSA +¥Õ¥¡¥¤¥ë¤ÎÀ¸À®¤Ë»È¤¦¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤷ¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢file ¤Ë +.BR DUKESIGN +¤ò»ØÄꤹ¤ë¤È¡¢À¸À®¤µ¤ì¤ë +.B .SF +¥Õ¥¡¥¤¥ë¤È +.B .DSA +¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ï¡¢¤½¤ì¤¾¤ì +.B DUKESIGN.SF +¤È +.BR DUKESIGN.DSA +¤Ë¤Ê¤ê¤Þ¤¹¡£¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Î +.B META-INF +¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤«¤ì¤Þ¤¹¡£ +.RS +.LP +.I file +¤Ë»ÈÍѤǤ­¤ëʸ»ú¤Ï¡Öa-zA-Z0-9_-¡×¤Ç¤¹¡£¤Ä¤Þ¤ê¡¢Ê¸»ú¡¢¿ô»ú¡¢²¼Àþ¡¢ +¤ª¤è¤Ó¥Ï¥¤¥Õ¥ó¤À¤±¤ò»ÈÍѤǤ­¤Þ¤¹¡£Ãí: +.B .SF +¤ª¤è¤Ó +.B .DSA +¤Î¥Õ¥¡¥¤¥ë̾¤Ç¤Ï¡¢¾®Ê¸»ú¤Ï¤¹¤Ù¤ÆÂçʸ»ú¤ËÊÑ´¹¤µ¤ì¤Þ¤¹¡£ +.LP +¥³¥Þ¥ó¥É¹Ô¤Ç +.B -sigfile +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¡¢ +.B .SF +¥Õ¥¡¥¤¥ë¤È +.B .DSA +¥Õ¥¡¥¤¥ë¤Î¥Ù¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ç»ØÄꤵ¤ì¤¿ÊÌ̾¤ÎÀèƬ¤Î 8 ʸ»ú¤ò +¤¹¤Ù¤ÆÂçʸ»ú¤ËÊÑ´¹¤·¤¿¤â¤Î¤Ë¤Ê¤ê¤Þ¤¹¡£ÊÌ̾¤¬ 8 ʸ»ṳ́Ëþ¤Î¾ì¹ç¤Ï¡¢ÊÌ̾¤¬ +¤½¤Î¤Þ¤Þ»È¤ï¤ì¤Þ¤¹¡£ÊÌ̾¤ÎÃæ¤Ë¡¢½ð̾¥Õ¥¡¥¤¥ë̾¤Ë»ÈÍѤǤ­¤Ê¤¤Ê¸»ú¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë +¾ì¹ç¤Ï¡¢³ºÅö¤¹¤ëʸ»ú¤ò²¼Àþ (_) ¤ËÃÖ¤­´¹¤¨¤Æ¥Õ¥¡¥¤¥ë̾¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£ +.RE +.TP +.BI -signedjar " file" +½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Î̾Á°¤ò»ØÄꤷ¤Þ¤¹¡£ +.RS +.LP +¥³¥Þ¥ó¥É¹Ô¤Ç̾Á°¤ò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢ÆþÎÏ JAR ¥Õ¥¡¥¤¥ë (½ð̾¤ÎÂоݤȤʤë +JAR ¥Õ¥¡¥¤¥ë) ¤Î̾Á°¤ÈƱ¤¸Ì¾Á°¤¬»È¤ï¤ì¤Þ¤¹¡£¤³¤Î¾ì¹ç¡¢ÆþÎÏ JAR ¥Õ¥¡¥¤¥ë¤Ï½ð̾ +ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Ë¤è¤Ã¤Æ¾å½ñ¤­¤µ¤ì¤Þ¤¹¡£ +.RE +.TP +.B -verify +¥³¥Þ¥ó¥É¹Ô¤Ç¤³¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢»ØÄꤵ¤ì¤¿ JAR ¥Õ¥¡¥¤¥ë¤¬ +¸¡¾Ú¤µ¤ì¤Þ¤¹¡£JAR ¥Õ¥¡¥¤¥ë¤Ø¤Î½ð̾¤Ï¹Ô¤ï¤ì¤Þ¤»¤ó¡£¸¡¾Ú¤¬À®¸ù¤¹¤ë¤È¡¢ +¡Öjar verified¡×¤È¤¤¤¦¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£½ð̾¤µ¤ì¤Æ¤¤¤Ê¤¤ JAR ¥Õ¥¡¥¤¥ë¡¢ +¤Þ¤¿¤Ï¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¥¢¥ë¥´¥ê¥º¥à (RSA ¥×¥í¥Ð¥¤¥À¤¬¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Æ¤¤¤Ê¤¤ +¾ì¹ç¤Î RSA ¤Ê¤É) ¤ò»È¤Ã¤Æ½ð̾¤µ¤ì¤¿ JAR ¥Õ¥¡¥¤¥ë¤ò¸¡¾Ú¤·¤è¤¦¤È¤¹¤ë¤È¡¢ +¡Öjar is unsigned. (signatures missing or not parsable)¡×¤È¤¤¤¦¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ +.RS +.LP +½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Ï¡¢ +.B jarsigner +¤Þ¤¿¤Ï JDK 1.1 ¤Î +.B javakey +¥Ä¡¼¥ë¡¢¤¢¤ë¤¤¤Ï¤½¤ÎξÊý¤ò»È¤Ã¤Æ¸¡¾Ú¤Ç¤­¤Þ¤¹¡£ +.LP +¸¡¾Ú¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢¡ÖJAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.RE +.TP +.B -certs +¥³¥Þ¥ó¥É¹Ô¤Ç¡¢ +.B -verify +¤ª¤è¤Ó +.B -verbose +¥ª¥×¥·¥ç¥ó¤È¤È¤â¤Ë¤³¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Î³Æ½ð̾¼Ô +¤Î¾ÚÌÀ½ñ¾ðÊó¤â½ÐÎϤµ¤ì¤Þ¤¹¡£¾ÚÌÀ½ñ¾ðÊó¤Ë¤Ï¼¡¤Î¤â¤Î¤¬´Þ¤Þ¤ì¤Þ¤¹¡£ +.RS +.TP 2 +\(bu +½ð̾¼Ô¤Î¸ø³«¸°¤ò¾ÚÌÀ¤¹¤ë ( +.B .DSA +¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤µ¤ì¤¿) ¾ÚÌÀ½ñ¤Î¼ïÎà¤Î̾Á° +.TP 2 +\(bu +¾ÚÌÀ½ñ¤¬ X.509 ¾ÚÌÀ½ñ (¶ñÂÎŪ¤Ë¤Ï java.security.cert.X509Certificate ¤Î +¥¤¥ó¥¹¥¿¥ó¥¹) ¤Ç¤¢¤ë¾ì¹ç¤Ï¡¢½ð̾¼Ô¤Î¼±ÊÌ̾ +.LP +¥­¡¼¥¹¥È¥¢¤Î³Îǧ¤â¹Ô¤ï¤ì¤Þ¤¹¡£¥³¥Þ¥ó¥É¹Ô¤Ç¥­¡¼¥¹¥È¥¢¤ÎÃͤ¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤ +¾ì¹ç¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥¹¥È¥¢¥Õ¥¡¥¤¥ë¤¬¤¢¤ì¤Ð¡¢¤½¤ì¤¬³Îǧ¤µ¤ì¤Þ¤¹¡£½ð̾¼Ô¤Î +¸ø³«¸°¤Î¾ÚÌÀ½ñ¤¬¥­¡¼¥¹¥È¥¢Æâ¤Î¥¨¥ó¥È¥ê¤È°ìÃפ·¤¿¾ì¹ç¤Ï¡¢¼¡¤Î¾ðÊó¤âɽ¼¨ +¤µ¤ì¤Þ¤¹¡£ +.TP 2 +\(bu +½ð̾¼Ô¤Ë³ºÅö¤¹¤ë¥­¡¼¥¹¥È¥¢¥¨¥ó¥È¥ê¤ÎÊÌ̾¡£¤³¤ÎÊÌ̾¤Ï³ç¸Ì¤Ç°Ï¤Þ¤ì¤Þ¤¹¡£ +¤¿¤À¤·¡¢¥­¡¼¥¹¥È¥¢¤Ç¤Ï¤Ê¤¯ JDK 1.1 ¤Î¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹¤ËͳÍ褹¤ë +½ð̾¼Ô¤Î¾ì¹ç¤Ï¡¢³ç¸Ì¤Ç¤Ï¤Ê¤¯³Ñ³ç¸Ì¤Ç°Ï¤Þ¤ì¤Þ¤¹¡£ +.RE +.TP +.B -verbose +¥³¥Þ¥ó¥É¹Ô¤Ç¤³¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢ +.B jarsigner +¤Ï¡Ö¾éĹ¡×¥â¡¼¥É¤ÇÆ°ºî¤·¡¢JAR ¤Î½ð̾¤Þ¤¿¤Ï¸¡¾Ú¤Î¿Ê¹Ô¾õ¶·¤Ë´Ø¤¹¤ëÄɲþðÊó¤ò½Ð +ÎϤ·¤Þ¤¹¡£ +.TP +.B -internalsf +°ÊÁ°¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Î½ð̾»þ¤ËÀ¸À®¤µ¤ì¤¿ +.B .DSA +(½ð̾¥Ö¥í¥Ã¥¯) ¥Õ¥¡¥¤¥ë¤ÎÃæ¤Ë¡¢À¸À®¤µ¤ì¤¿ +.B .SF +¥Õ¥¡¥¤¥ë (½ð̾¥Õ¥¡¥¤¥ë) ¤Î´°Á´¤Ê¥³¥Ô¡¼¤¬Éä¹æ²½¤µ¤ì¤¿·Á¤Ç´Þ¤Þ¤ì¤Æ¤¤¤Þ¤·¤¿¡£¤³¤Î +Æ°ºî¤ÏÊѹ¹¤Ë¤Ê¤ê¡¢¸½ºß¤Ç¤Ï¡¢½ÐÎÏ JAR ¥Õ¥¡¥¤¥ëÁ´ÂΤΥµ¥¤¥º¤ò¾®¤µ¤¯¤¹¤ë¤¿¤á¤Ë¡¢ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï +.B .SF +¥Õ¥¡¥¤¥ë¤¬ +.B .DSA +¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤Ê¤¤¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤¿¤À¤·¡¢¥³¥Þ¥ó¥É¹Ô¤Ç +.B -internalsf +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤹ¤ë¤È¡¢°ÊÁ°¤ÈƱ¤¸¤è¤¦¤ËÆ°ºî¤·¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥Æ¥¹¥È¤ò¹Ô¤¦ +¾ì¹ç¤Ë¤ÏÊØÍø¤Ç¤¹¤¬¡¢¤½¤ì°Ê³°¤Ë¤Ï»ÈÍѤ·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ë +¤È¡¢Í­±×¤ÊºÇŬ²½¤¬¹Ô¤ï¤ì¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£ +.TP +.B -sectionsonly +¥³¥Þ¥ó¥É¹Ô¤Ç¤³¤Î¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢JAR ¥Õ¥¡¥¤¥ë¤Î½ð̾»þ¤ËÀ¸À®¤µ¤ì¤ë +.B .SF +¥Õ¥¡¥¤¥ë (½ð̾¥Õ¥¡¥¤¥ë) ¤Ë¤Ï¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÁ´ÂΤΥϥå·¥å¤ò´Þ¤à¥Ø¥Ã¥À¤ÏÄɲ䵤ì¤Þ¤»¤ó¡£¤³¤Î¾ì¹ç¡¢.SF ¥Õ¥¡¥¤¥ë¤Ë´Þ¤Þ¤ì¤ë¤Î¤Ï¡¢JAR ¥Õ¥¡¥¤¥ëÆâ¤Î³Æ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ë´Ø¤¹¤ë¾ðÊ󤪤è¤Ó¥Ï¥Ã¥·¥å¤À¤±¤Ç¤¹¡£¾ÜºÙ¤Ï¡¢¡Ö½ð̾ (\f3.SF\f1) ¥Õ¥¡¥¤¥ë¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.RS +.LP +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢ºÇŬ²½¤ò¹Ô¤¦¤¿¤á¤Ë¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÁ´ÂΤΥϥå·¥å¤ò´Þ¤à¥Ø¥Ã¥À +¤¬Äɲ䵤ì¤Þ¤¹¡£¥Ø¥Ã¥À¤¬Â¸ºß¤¹¤ë¾ì¹ç¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú»þ¤Ë¡¢¤Þ¤º¥Ø¥Ã¥ÀÆâ +¤Î¥Ï¥Ã¥·¥å¤¬¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÁ´ÂΤΥϥå·¥å¤È¼ÂºÝ¤Ë°ìÃפ¹¤ë¤«¤É¤¦¤«¤¬³Îǧ +¤µ¤ì¤Þ¤¹¡£¥Ï¥Ã¥·¥å¤¬°ìÃפ¹¤ë¾ì¹ç¡¢¸¡¾Ú¤Ï¼¡¤Î¼ê½ç¤Ë¿Ê¤ß¤Þ¤¹¡£¥Ï¥Ã¥·¥å¤¬°ìÃ× +¤·¤Ê¤¤¾ì¹ç¤Ï¡¢¸úΨŪ¤Ë¤ÏÎô¤ëÊýË¡¤ò»È¤Ã¤Æ¸¡¾Ú¤ò¹Ô¤¤¤Þ¤¹¡£¶ñÂÎŪ¤Ë¤Ï¡¢ +.B .SF +¥Õ¥¡¥¤¥ëÆâ¤Î³Æ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¾ðÊ󥻥¯¥·¥ç¥ó¤Î¥Ï¥Ã¥·¥å¤¬¡¢¥Þ¥Ë¥Õ¥§¥¹¥È¥Õ¥¡¥¤¥ëÆâ¤Î +Âбþ¤¹¤ë¥»¥¯¥·¥ç¥ó¤Î¥Ï¥Ã¥·¥å¤È°ìÃפ¹¤ë¤«¤É¤¦¤«¤ò³Îǧ¤·¤Þ¤¹¡£ +.LP +¾ÜºÙ¤Ï¡¢¡ÖJAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥Æ¥¹¥È¤ò¹Ô¤¦¾ì¹ç¤Ë¤ÏÊØÍø¤Ç¤¹¤¬¡¢¤½¤ì°Ê³°¤Ë¤Ï»ÈÍѤ·¤Ê¤¤¤Ç +¤¯¤À¤µ¤¤¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ë¤È¡¢Í­±×¤ÊºÇŬ²½¤¬¹Ô¤ï¤ì¤Ê¤¯¤Ê¤ê¤Þ¤¹¡£ +.RE +.TP +.BI \-provider " provider_class_name" +¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À¤¬¥»¥­¥å¥ê¥Æ¥£¥×¥í¥Ñ¥Æ¥£¥Õ¥¡¥¤¥ë¤Î¥ê¥¹¥È¤Ë +Æþ¤Ã¤Æ¤¤¤Ê¤¤¤È¤­¤Ë¡¢°Å¹æ²½¥µ¡¼¥Ó¥¹¥×¥í¥Ð¥¤¥À¤Î¥Þ¥¹¥¿¡¼¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Î +̾Á°¤ò»ØÄꤷ¤Þ¤¹¡£ +.TP +.BI \-J javaoption +»ØÄꤷ¤¿ +.I javaoption +ʸ»úÎó¤òľÀܼ¹Իþ¥·¥¹¥Æ¥à¤ËÅϤ·¤Þ¤¹¡£ +\f3jarsigner\f1 ¤Ï¡¢¼ÂºÝ¤Ë¤Ï Java ¥¤¥ó¥¿¥×¥ê¥¿¤ËÂФ¹¤ë¡Ö¥é¥Ã¥Ñ¡¼¡×¤Ç¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ë¤Ï¡¢¶õÇò¤ò´Þ¤á¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¼Â¹Ô´Ä¶­¤Þ¤¿¤Ï¥á¥â¥ê»ÈÍѤòÄ´À°¤¹¤ë¾ì¹ç¤ËÊØÍø¤Ç¤¹¡£»ØÄê¤Ç¤­¤ë¥Õ¥é¥°¤ò°ìÍ÷ɽ¼¨¤¹¤ë¤Ë¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ç +.B java -h +¤Þ¤¿¤Ï +.B java -X +¤ÈÆþÎϤ·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.SH "»ÈÍÑÎã" +.LP +.SS "JAR ¥Õ¥¡¥¤¥ë¤Î½ð̾" +.IX "jarsigner" "Signing a JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +.B bundle.jar +¤È¤¤¤¦Ì¾Á°¤Î JAR ¥Õ¥¡¥¤¥ë¤¬¤¢¤ê¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤Ë¡¢¥­¡¼¥¹¥È¥¢¤ÎÊÌ̾¤¬ jane ¤Ç¤¢¤ë¥æ¡¼¥¶¤ÎÈó¸ø³«¸°¤ò»È¤Ã¤Æ¡¢½ð̾¤òÉÕ¤±¤ë¤È¤·¤Þ¤¹¡£¥­¡¼¥¹¥È¥¢¤Ï¡¢mystore ¤È¤¤¤¦Ì¾Á°¤Ç working ¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤¢¤ê¡¢¥­¡¼¥¹¥È¥¢¤Î¥Ñ¥¹¥ï¡¼¥É¤Ï mypass¡¢jane ¤ÎÈó¸ø³«¸°¤Î¥Ñ¥¹¥ï¡¼¥É¤Ï j638klm ¤È¤·¤Þ¤¹¡£¤³¤Î¾ì¹ç¡¢¼¡¤Î¥³¥Þ¥ó¥É¤ò¼Â¹Ô¤¹¤ë¤È¡¢JAR ¥Õ¥¡¥¤¥ë¤Ë½ð̾¤òÉÕ¤±¤Æ sbundle.jar ¤È¤¤¤¦½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤òºîÀ®¤Ç¤­¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jarsigner \-keystore "/working/mystore" \-storepass myspass + -keypass j638klm -signedjar sbundle.jar bundle.jar jane +.fi +.ft 1 +.LP +¾å¤Î¥³¥Þ¥ó¥É¤Ç¤Ï +.B -sigfile +¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¤Î¤Ç¡¢½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Ë³ÊǼ¤µ¤ì¤ë +.B .SF +¥Õ¥¡¥¤¥ë¤È +.B .DSA +¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ï¡¢ÊÌ̾¤Ë´ð¤Å¤¯¥Ç¥Õ¥©¥ë¥È¤Î̾Á°¤Ë¤Ê¤ê¡¢¤½¤ì¤¾¤ì +.B JANE.SF +¤È +.BR JANE.DSA +¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +¥¹¥È¥¢¤Î¥Ñ¥¹¥ï¡¼¥É¤ÈÈó¸ø³«¸°¤Î¥Ñ¥¹¥ï¡¼¥É¤ò¤¢¤È¤ÇÆþÎϤ¹¤ë¾ì¹ç¤Ï¡¢ +¾å¤Î¥³¥Þ¥ó¥É¤òû½Ì¤·¤Æ¼¡¤Î¤è¤¦¤ËÆþÎϤǤ­¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jarsigner \-keystore /working/mystore + -signedjar sbundle.jar bundle.jar jane +.fi +.ft 1 +.LP +¥Ç¥Õ¥©¥ë¥È¤Î¥­¡¼¥¹¥È¥¢ (¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î +.B .keystore +¤È¤¤¤¦Ì¾Á°¤Î¥­¡¼¥¹¥È¥¢) ¤ò»ÈÍѤ¹¤ë¾ì¹ç¤Ï¡¢¼¡¤Ë¼¨¤¹¤è¤¦¤Ë¡¢¥­¡¼¥¹¥È¥¢¤Î»ØÄê¤ò +¾Êά¤Ç¤­¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jarsigner \-signedjar sbundle.jar bundle.jar jane +.fi +.ft 1 +.LP +¤Þ¤¿¡¢½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤ÇÆþÎÏ JAR ¥Õ¥¡¥¤¥ë (bundle.jar) ¤ò¾å½ñ¤­¤¹¤ë¾ì¹ç¤Ï¡¢ +.B -signedjar +¥ª¥×¥·¥ç¥ó¤Î»ØÄê¤â¾Êά¤Ç¤­¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jarsigner bundle.jar jane +.fi +.ft 1 +.LP +.SS "½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú" +.IX "jarsigner" "Verifying a Signed JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool " +.LP +¼¡¤Ë¼¨¤¹¤Î¤Ï¡¢½ð̾ÉÕ¤­ JAR ¥Õ¥¡¥¤¥ë¤ò¸¡¾Ú¤·¡¢½ð̾¤¬Í­¸ú¤Ç JAR ¥Õ¥¡¥¤¥ë¤¬ +²þÊѤµ¤ì¤Æ¤¤¤Ê¤¤¤³¤È¤ò³Îǧ¤¹¤ë¤¿¤á¤Î¥³¥Þ¥ó¥ÉÎã¤Ç¤¹¡£ +.LP +.ft 3 +.nf +jarsigner \-verify sbundle.jar +.fi +.ft 1 +.LP +¸¡¾Ú¤¬À®¸ù¤¹¤ë¤È¡¢¼¡¤Î¤è¤¦¤Ê¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jar verified. +.fi +.ft 1 +.LP +¸¡¾Ú¤¬À®¸ù¤·¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢¥¨¥é¡¼¥á¥Ã¥»¡¼¥¸¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.B -verbose +¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤È¡¢¤è¤ê¿¤¯¤Î¾ðÊó¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¼¡¤Ë¼¨¤¹¤Î¤Ï¡¢ +.B -verbose +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿ +.B jarsigner +¤Î¼Â¹ÔÎã¤È¤½¤Î½ÐÎÏ·ë²Ì¤Ç¤¹¡£ +.LP +.ft 3 +.nf +jarsigner -verify -verbose sbundle.jar + + 198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF + 199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF + 1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA + smk 2752 Fri Sep 26 16:12:30 PDT 1997 AclEx.class + smk 849 Fri Sep 26 16:12:46 PDT 1997 test.class + + s = signature was verified + m = entry is listed in manifest + k = at least one certificate was found in keystore + + jar verified. +.fi +.ft 1 +.LP +.SS "¾ÚÌÀ½ñ¾ðÊó¤ò»È¤Ã¤¿¸¡¾Ú" +.IX "jarsigner" "Verification with Certificate Information" "\fLjarsigner\fP \(em JAR signing and verification tool " + +¸¡¾Ú»þ¤Ë¡¢ +.B -verify +¤È +.B -verbose +¥ª¥×¥·¥ç¥ó¤Ë²Ã¤¨¤Æ +.B -certs +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¤Ï¡¢JAR ¥Õ¥¡¥¤¥ëÆâ¤Î³Æ½ð̾¼Ô¤Î¾ÚÌÀ½ñ¾ðÊó¤â½ÐÎϤµ¤ì¤Þ +¤¹¡£¤³¤ì¤Ë¤Ï¡¢¾ÚÌÀ½ñ¤Î¥¿¥¤¥×¡¢½ð̾¼Ô¤Î¼±ÊÌ̾¾ðÊó (X.509 ¾ÚÌÀ½ñ¤Î¾ì¹ç)¡¢¤ª¤è¤Ó¡¢ +JAR ¥Õ¥¡¥¤¥ë¤Î¸ø³«¸°¤Î¾ÚÌÀ½ñ¤¬¥­¡¼¥¹¥È¥¢¥¨¥ó¥È¥ê¤Î¸ø³«¸°¤Î¾ÚÌÀ½ñ¤È°ìÃפ¹¤ë¾ì¹ç +¤Ë¤Ï¡¢³ç¸Ì¤Ç°Ï¤Þ¤ì¤¿½ð̾¼Ô¤Î¥­¡¼¥¹¥È¥¢ÊÌ̾¤¬´Þ¤Þ¤ì¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë +½ÐÎϤµ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +example% jarsigner -keystore /working/mystore -verify -verbose -certs myTest.jar + + 198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF + 199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF + 1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA + 208 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.SF + 1087 Fri Sep 26 16:23:30 PDT 1997 META-INF/JAVATEST.DSA +smk 2752 Fri Sep 26 16:12:30 PDT 1997 Tst.class + + X.509, CN=Test Group, OU=Java Software, O=Sun Microsystems, L=CUP, S=CA, C=US (javatest) + X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane) + + s = signature was verified + m = entry is listed in manifest + k = at least one certificate was found in keystore + +jar verified. +.fi +.ft 1 +.LP +½ð̾¼Ô¤Î¾ÚÌÀ½ñ¤¬ X.509 ¾ÚÌÀ½ñ¤Ç¤Ê¤¤¾ì¹ç¤Ï¡¢¼±ÊÌ̾¾ðÊó¤Ïɽ¼¨¤µ¤ì¤º¡¢¾ÚÌÀ½ñ¤Î +¥¿¥¤¥×¤ÈÊÌ̾¤À¤±¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¾ÚÌÀ½ñ¤¬ PGP ¾ÚÌÀ½ñ¤Ç¡¢ÊÌ̾¤¬ bob ¤Î +¾ì¹ç¤Ï¡¢¼¡¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +PGP, (bob) +.fi +.ft 1 +.LP +.SS ¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹½ð̾¼Ô¤ò´Þ¤à JAR ¥Õ¥¡¥¤¥ë¤Î¸¡¾Ú +.IX "jarsigner" "Verification of a JAR File" "\fLjarsigner\fP \(em JAR signing and verification tool " +JAR ¥Õ¥¡¥¤¥ë¤¬¡¢JDK 1.1 ¤Î +.B javakey +¥Ä¡¼¥ë¤ò»È¤Ã¤Æ½ð̾¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢½ð̾¼Ô¤Ï¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤Î +ÊÌ̾¤Ç¤¹¡£¤³¤Î¾ì¹ç¡¢¸¡¾Ú¤Î½ÐÎÏ¤Ë¤Ï i ¤È¤¤¤¦µ­¹æ¤¬´Þ¤Þ¤ì¤Þ¤¹¡£JAR ¥Õ¥¡¥¤¥ë¤¬¡¢ +¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤ÎÊÌ̾¤È¥­¡¼¥¹¥È¥¢Æâ¤ÎÊÌ̾¤ÎξÊý¤Ë¤è¤Ã¤Æ½ð̾ +¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢k ¤È i ¤ÎξÊý¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.B -certs +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¡¢¥­¡¼¥¹¥È¥¢¤ÎÊÌ̾¤Ï³ç¸Ì¤Ç°Ï¤Þ¤ì¤ë¤Î¤ËÂФ·¡¢¥¢¥¤¥Ç¥ó¥Æ¥£ +¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹Æâ¤ÎÊÌ̾¤Ï³Ñ³ç¸Ì¤Ç°Ï¤Þ¤ì¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë +ɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +jarsigner \-keystore /working/mystore \-verify \-verbose \-certs writeFile.jar + + 198 Fri Sep 26 16:14:06 PDT 1997 META-INF/MANIFEST.MF + 199 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.SF + 1013 Fri Sep 26 16:22:10 PDT 1997 META-INF/JANE.DSA + 199 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.SF + 1013 Fri Sep 27 12:22:30 PDT 1997 META-INF/DUKE.DSA +smki 2752 Fri Sep 26 16:12:30 PDT 1997 writeFile.html + + X.509, CN=Jane Smith, OU=Java Software, O=Sun, L=cup, S=ca, C=us (jane) + X.509, CN=Duke, OU=Java Software, O=Sun, L=cup, S=ca, C=us [duke] + + s = signature was verified + m = entry is listed in manifest + k = at least one certificate was found in keystore + i = at least one certificate was found in identity scope + +jar verified. +.fi +.ft 1 +.LP +ÊÌ̾ duke ¤Ï³Ñ³ç¸Ì¤Ç°Ï¤Þ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¤³¤ÎÊÌ̾¤Ï¥­¡¼¥¹¥È¥¢¤ÎÊÌ̾¤Ç¤Ï¤Ê¤¯¡¢ +¥¢¥¤¥Ç¥ó¥Æ¥£¥Æ¥£¥Ç¡¼¥¿¥Ù¡¼¥¹¤ÎÊÌ̾¤Ç¤¹¡£ +.SH "´ØÏ¢¹àÌÜ" +.BR jar (1), +.BR keytool (1) diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/java.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/java.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/java.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/java.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,570 @@ +'\" t +.\" @(#)java.1 1.20 00/06/13 SMI; +.\" Copyright 2003 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2003 Sun Microsystems, Inc. Tous droits réóervéó. +.\" +.TH java 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +java \- Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥óµ¯Æ°¥×¥í¥°¥é¥à +.SH "·Á¼°" +.B java +[ +.IB options +] +.I class +[ +.I argument ... +] +.LP +.B java +[ +.I options +] +.BI \-jar " file.jar" +.if n .ti +5n +[ +.I argument ... +] +.SH "¥Ñ¥é¥á¡¼¥¿" +.TP 15 +.I options +¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¡£ +.TP +.I class +¸Æ¤Ó½Ð¤µ¤ì¤ë¥¯¥é¥¹¤Î̾Á°¡£ +.TP +.I file.jar +¸Æ¤Ó½Ð¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤Î̾Á°¡£É¬¤º +.B \-jar +¤ÈƱ»þ¤Ë»ÈÍѤµ¤ì¤ë¡£ +.TP +.I argument +.B main +´Ø¿ô¤ËÅϤµ¤ì¤ë°ú¿ô¡£ +.SH "µ¡Ç½ÀâÌÀ" +.IX "Java interpreter" "" "Java interpreter \(em \fLjava\fP" +.IX "java" "" "\fLjava\fP \(em Java interpreter" +.LP +.B java +¥Ä¡¼¥ë¤Ï¡¢Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òµ¯Æ°¤·¤Þ¤¹¡£ +.B java +¥Ä¡¼¥ë¤Ï¡¢Java Runtime Environment ¤òµ¯Æ°¤·¤¿¤¢¤È¡¢»ØÄꤵ¤ì¤¿¥¯¥é¥¹¤ò¥í¡¼¥É¤·¡¢¤³¤Î¥¯¥é¥¹¤Î +.B main +¥á¥½¥Ã¥É¤ò¸Æ¤Ó½Ð¤·¤Æ Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤òµ¯Æ°¤·¤Þ¤¹¡£ +.B main +¤³¤Î¥á¥½¥Ã¥É¤Ï +.B public +¤ª¤è¤Ó +.B static +¤ÇÀë¸À¤µ¤ì¡¢ÃͤòÊÖ¤µ¤º¡¢¥Ñ¥é¥á¡¼¥¿¤È¤·¤Æ +.B String +ÇÛÎó¤ò»ÈÍѤǤ­¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +¥á¥½¥Ã¥ÉÀë¸À¤Ï¼¡¤Î¤è¤¦¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.ft 3 +.nf + public static void main(String args[]) +.fi +.ft 1 +.LP +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥ª¥×¥·¥ç¥ó¤Ç¤Ï¤Ê¤¤ºÇ½é¤Î°ú¿ô¤¬¡¢¸Æ¤Ó½Ð¤¹¥¯¥é¥¹¤Î̾Á°¤Ë +¤Ê¤ê¤Þ¤¹¡£¤³¤Î̾Á°¤Ë¤Ï¡¢´°Á´»ØÄê¤Î¥¯¥é¥¹Ì¾¤ò»ÈÍѤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.B \-jar +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤷ¤¿¾ì¹ç¡¢¥ª¥×¥·¥ç¥ó¤Ç¤Ï¤Ê¤¤ºÇ½é¤Î°ú¿ô¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î +¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤È¥ê¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò´Þ¤à JAR ¥¢¡¼¥«¥¤¥Ö¤Î̾Á°¤Ë¤Ê¤ê¤Þ¤¹¡£ +¤³¤Î¾ì¹ç¡¢Main-Class ¥Þ¥Ë¥Õ¥§¥¹¥È¥Ø¥Ã¥À¤Ç»ØÄꤵ¤ì¤¿¥¯¥é¥¹¤¬¥¹¥¿¡¼¥È +¥¢¥Ã¥×¥¯¥é¥¹¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +Java Runtime ¤Ï¡¢¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¥Ñ¥¹¡¢¥¤¥ó¥¹¥È¡¼¥ë·¿³ÈÄ¥µ¡Ç½¡¢ +¤ª¤è¤Ó¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Î 3 ¤Ä¤Î¾ì½ê¤«¤é¡¢µ¯Æ°¥¯¥é¥¹¤È¤½¤Î¾¤Î +»ÈÍѤ¹¤ë¥¯¥é¥¹¤òõ¤·¤Þ¤¹¡£ +.LP +¥¯¥é¥¹Ì¾¤Þ¤¿¤Ï JAR ¥Õ¥¡¥¤¥ë̾¤Î¤¢¤È¤Ë¤¢¤ë¥ª¥×¥·¥ç¥ó¤Ç¤Ï¤Ê¤¤°ú¿ô¤Ï¡¢ +main ´Ø¿ô¤ËÅϤµ¤ì¤Þ¤¹¡£ +.LP +.SH "¥ª¥×¥·¥ç¥ó" +µ¯Æ°¥³¥Þ¥ó¥É¤Ë¤Ï¡¢¸½ºß¤Î¼Â¹Ô´Ä¶­¤ª¤è¤Ó¾­Íè¤Î¥ê¥ê¡¼¥¹¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤ë +ɸ½à¥ª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¡£ +¤Þ¤¿¡¢²¾ÁÛ¥Þ¥·¥ó¤Î¸½ºß¤Î¼ÂÁõ¤Ç¤Ï¡¢Èóɸ½à¥ª¥×¥·¥ç¥ó¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ¤¹¡£ +¤³¤Î»ÅÍͤϾ­ÍèÊѹ¹¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£ +.SS "ɸ½à¥ª¥×¥·¥ç¥ó" +.IX "java" "Standard Options" "\fLjava\fP \(em Java interpreter" +.TP 20 +.B \-client +Java HotSpot Client +.SM VM\s0 +¤òÁªÂò¤·¤Þ¤¹¡£ +¾ÜºÙ¤Ï¡¢ +http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html +¤Î¡ÖServer-Class Machine Detection¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.B \-server +Java HotSpot Server +VM +¤òÁªÂò¤·¤Þ¤¹¡£ +¾ÜºÙ¤Ï¡¢ +http://java.sun.com/j2se/1.5.0/docs/guide/vm/server-class.html +¤Î¡ÖServer-Class Machine Detection¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.B \-agentlib:libname[=options] +¥Í¥¤¥Æ¥£¥Ö¤Î¥¨¡¼¥¸¥§¥ó¥È¥é¥¤¥Ö¥é¥ê +.I libname +¤òÆɤ߹þ¤ß¤·¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +.nf +\-agentlib:hprof +\-agentlib:jdwp=help +\-agentlib:hprof=help +.fi +.RE +.LP +¾ÜºÙ¤Ï¡¢ +http://java.sun.com/j2se.1.5.0/docs/guide/jvmti/jvmti.html +¤Î¡ÖJVMTI Agent Command Line Options¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.B \-agentpath:pathname[=options] +¥Í¥¤¥Æ¥£¥Ö¤Î¥¨¡¼¥¸¥§¥ó¥È¥é¥¤¥Ö¥é¥ê¤ò¥Õ¥ë¥Ñ¥¹Ì¾¤ò»ÈÍѤ·¤ÆÆɤ߹þ¤ß¤·¤Þ¤¹¡£ +¾ÜºÙ¤Ï¡¢ +http://java.sun.com/j2se.1.5.0/docs/guide/jvmti/jvmti.html +¤Î¡ÖJVMTI Agent Command Line Options¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.BI \-classpath " classpath" +.PD 0 +.TP +.BI \-cp " classpath" +.PD +¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òõ¤¹¥Ç¥£¥ì¥¯¥È¥ê¡¢JAR ¥¢¡¼¥«¥¤¥Ö¡¢¤ª¤è¤Ó ZIP ¥¢¡¼¥«¥¤¥Ö¤Î¥ê¥¹¥È¤ò»ØÄꤷ¤Þ¤¹¡£¥¯¥é¥¹¥Ñ¥¹¤Î³Æ¥¨¥ó¥È¥ê¤Ï¥³¥í¥ó (:) ¤Ç¶èÀÚ¤ê¤Þ¤¹¡£ +.B \-classpath +¤Þ¤¿¤Ï +.B \-cp +¤ò»ØÄꤹ¤ë¤È¡¢¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤ÎÃͤˤè¤Ã¤Æ +.SB CLASSPATH +´Ä¶­ÊÑ¿ô¤ÎÀßÄê¤Ï¾å½ñ¤­¤µ¤ì¤Þ¤¹¡£ +.sp 1n +.BR java +¤Ç +.B \-classpath +¤Þ¤¿¤Ï +.B \-cp +¤ò»È¤¦¾ì¹ç¡¢¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤ë¤Î¤Ï¥æ¡¼¥¶¥¯¥é¥¹¤Î +¥¯¥é¥¹¥Ñ¥¹¤À¤±¤Ç¤¹¡£ +.B \-classpath +¤Þ¤¿¤Ï +.B \-cp +¤ò»È¤¦¾ì¹ç¡¢¤³¤ì¤é¤Î¥ª¥×¥·¥ç¥ó¤Ë¤è¤Ã¤Æ»ØÄꤵ¤ì¤ë¤Î¤Ï¡¢¥æ¡¼¥¶¥¯¥é¥¹¤È +¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¤ÎξÊý¤Î¥¯¥é¥¹¥Ñ¥¹¤Ç¤¹¡£ +.sp 1n +.B \-classpath +¤È +.B \-cp +¤ò»ÈÍѤ»¤º¡¢ +.SB CLASSPATH +¤âÀßÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ï¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê (.) ¤Ë¤Ê¤ê¤Þ¤¹¡£ +.TP +.BI \-D property=value +¥·¥¹¥Æ¥à¥×¥í¥Ñ¥Æ¥£¤ÎÃͤòÀßÄꤷ¤Þ¤¹¡£ +.TP +.B \-d32 +.TP +.B \-d64 +¥×¥í¥°¥é¥à¤ò 32 ¥Ó¥Ã¥È´Ä¶­¤Ç¼Â¹Ô¤¹¤ë¤«¡¢64 ¥Ó¥Ã¥È´Ä¶­ +¤Ç¼Â¹Ô¤¹¤ë¤« (²Äǽ¤Ê¾ì¹ç) ¤ò»ØÄꤷ¤Þ¤¹¡£ +.LP +¸½»þÅÀ¤Ç¤Ï¡¢64 ¥Ó¥Ã¥ÈÁàºî¤ò¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤ë¤Î¤Ï Java HotSpot Server VM +¤À¤±¤Ç¤¢¤ê¡¢ +.B \-server +¥ª¥×¥·¥ç¥ó¤Ç¤Ï¡¢ +.B \-d64 +¤¬°ÅÌÛŪ¤Ë»ÈÍѤµ¤ì¤Þ¤¹¡£ +¤³¤Î»ÅÍͤϾ­ÍèÊѹ¹¤µ¤ì¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£ +.LP +.B \-d32 +¤È +.B \-d64 +¤Î¤É¤Á¤é¤â»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¡¢ +64 ¥Ó¥Ã¥ÈÀìÍÑ¥·¥¹¥Æ¥à¤ò½ü¤¤¤Æ¡¢ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï 32 ¥Ó¥Ã¥È´Ä¶­¤Ç¼Â¹Ô¤µ¤ì¤Þ¤¹¡£ +¤³¤Î»ÅÍͤϾ­ÍèÊѹ¹¤µ¤ì¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£ +.TP +.BR \-enableassertions " :... |:" +.PD 0 +.TP +.BR \-ea " :... |:" +ɽÌÀ¤òÍ­¸ú¤Ë¤·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¡¢É½ÌÀ¤Ï̵¸ú¤Ç¤¹¡£ +.sp 1n +°ú¿ô¤ò»ØÄꤷ¤Ê¤¯¤Æ¤â¡¢ +.BR enableassertions +¤Þ¤¿¤Ï +.BR \-ea +¤ÇɽÌÀ¤¬Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ +¡Ö...¡×¤Ç½ª¤ï¤ë°ú¿ô¤ò 1 ¤Ä»ØÄꤹ¤ë¤È¡¢ +¥¹¥¤¥Ã¥Á¤Ë¤è¤ê¡¢»ØÄꤷ¤¿¥Ñ¥Ã¥±¡¼¥¸¤ª¤è¤Ó¤¹¤Ù¤Æ¤Î +¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸Æâ¤ÎɽÌÀ¤¬Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ +¡Ö...¡×¤È¤¤¤¦°ú¿ô¤ò»ØÄꤹ¤ë¤È¡¢¥¹¥¤¥Ã¥Á¤Ë¤è¤ê¡¢ +¸½ºß¤Îºî¶ÈÍѥǥ£¥ì¥¯¥È¥êÆâ¤Ë¤¢¤ë̾Á°¤Î¤Ê¤¤¥Ñ¥Ã¥±¡¼¥¸Æâ¤Î +ɽÌÀ¤¬Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ +¡Ö...¡×¤Ç½ª¤ï¤é¤Ê¤¤°ú¿ô¤ò 1 ¤Ä»ØÄꤹ¤ë¤È¡¢ +¥¹¥¤¥Ã¥Á¤Ë¤è¤ê¡¢»ØÄꤷ¤¿¥¯¥é¥¹Æâ¤ÎɽÌÀ¤¬Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ +.sp 1n +1 ¹Ô¤Î¥³¥Þ¥ó¥É¤Ë¡¢¤³¤ì¤é¤Î¥¹¥¤¥Ã¥Á¤ÎÊ£¿ô¤Î¥¤¥ó¥¹¥¿¥ó¥¹¤¬ +´Þ¤Þ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¥¯¥é¥¹¤òÆɤ߹þ¤àÁ°¤Ë¡¢Àµ¤·¤¯½èÍý¤µ¤ì¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð¡¢¥Ñ¥Ã¥±¡¼¥¸ +.BR com.wombat.fruitbat + (¤ª¤è¤Ó¤¹¤Ù¤Æ¤Î¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸) Æâ¤À¤±¤ÎÍ­¸ú¤ÊɽÌÀ¤ò +´Þ¤ó¤À¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë¾ì¹ç¡¢¼¡¤Î¥³¥Þ¥ó¥É¤ò»ÈÍѤǤ­¤Þ¤¹¡£ +.sp 1n +example% java -ea:com.wombat.fruitbat...

+.sp 1n +.BR \-enableassertions +¤ª¤è¤Ó +.BR \-ea +¥¹¥¤¥Ã¥Á¤Ï¡¢¤¹¤Ù¤Æ¤Î +¥¯¥é¥¹¥í¡¼¥À¤ª¤è¤Ó¥·¥¹¥Æ¥à¥¯¥é¥¹ (¥¯¥é¥¹¥í¡¼¥À¤ò»ý¤¿¤Ê¤¤) ¤ËŬÍѤµ¤ì¤Þ¤¹¡£ +¤³¤Îµ¬Â§¤Ë¤Ï 1 ¤ÄÎã³°¤¬¤¢¤ê¤Þ¤¹¡£°ú¿ô¤¬¤Ê¤¤·Á¼°¤Î¾ì¹ç¡¢ +¥¹¥¤¥Ã¥Á¤Ï¥·¥¹¥Æ¥à¤ËŬÍѤµ¤ì¤Þ¤»¤ó¡£¤³¤ì¤òÍøÍѤ·¤Æ¡¢´Êñ¤Ë¡¢ +¥·¥¹¥Æ¥à¥¯¥é¥¹¤ò½ü¤¯¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤ÎɽÌÀ¤òÍ­¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¤¹¤Ù¤Æ¤Î¥·¥¹¥Æ¥à¥¯¥é¥¹¤ÎɽÌÀ¤òÍ­¸ú¤Ë¤¹¤ë¸ÄÊ̤Υ¹¥¤¥Ã¥Á¤â +ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +.BR \-enablesystemassertions +¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.sp 1n +.TP +.BR \-disableassertions " :... |:" +.PD 0 +.TP +.BR \-da " :... |:" +ɽÌÀ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£¤³¤ì¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¤¹¡£ +.sp 1n +°ú¿ô¤ò»ØÄꤻ¤º¤Ë¡¢ +.BR disableassertions +¤Þ¤¿¤Ï +.BR \-da +¤ÇɽÌÀ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£ +¡Ö...¡×¤Ç½ª¤ï¤ë°ú¿ô¤ò 1 ¤Ä»ØÄꤹ¤ë¤È¡¢ +¥¹¥¤¥Ã¥Á¤Ë¤è¤ê¡¢»ØÄꤷ¤¿¥Ñ¥Ã¥±¡¼¥¸¤ª¤è¤Ó¤¹¤Ù¤Æ¤Î +¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸Æâ¤ÎɽÌÀ¤¬Ìµ¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ +¡Ö...¡×¤È¤¤¤¦°ú¿ô¤ò»ØÄꤹ¤ë¤È¡¢¥¹¥¤¥Ã¥Á¤Ë¤è¤ê¡¢¸½ºß¤Îºî¶ÈÍÑ +¥Ç¥£¥ì¥¯¥È¥êÆâ¤Ë¤¢¤ë̾Á°¤Î¤Ê¤¤¥Ñ¥Ã¥±¡¼¥¸Æâ¤ÎɽÌÀ¤¬Ìµ¸ú¤Ë +¤Ê¤ê¤Þ¤¹¡£¡Ö...¡×¤Ç½ª¤ï¤é¤Ê¤¤°ú¿ô¤ò 1 ¤Ä»ØÄꤹ¤ë¤È¡¢¥¹¥¤¥Ã¥Á¤Ë¤è¤ê¡¢ +»ØÄꤷ¤¿¥¯¥é¥¹Æâ¤ÎɽÌÀ¤¬Ìµ¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£ +.sp 1n +¥Ñ¥Ã¥±¡¼¥¸ +.BR com.wombat.fruitbat +¤ÎɽÌÀ¤ÏÍ­¸ú¤Ë¡¢¥¯¥é¥¹ +.BR com.wombat.fruitbat.Brickbat +¤ÎɽÌÀ¤Ï̵¸ú¤Ë¤·¤Æ¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤¹¤ë¤Ë¤Ï¡¢ +¼¡¤Î¥³¥Þ¥ó¥É¤ò»ÈÍѤ·¤Þ¤¹¡£ +.sp 1n +example% java -ea:com.wombat.fruitbat... -da:com.wombat.fruitbat.Brickbat
+.sp 1n +.BR \-disableassertions +¤ª¤è¤Ó +.BR \-da +¥¹¥¤¥Ã¥Á¤Ï¡¢¤¹¤Ù¤Æ¤Î +¥¯¥é¥¹¥í¡¼¥À¤ª¤è¤Ó¥·¥¹¥Æ¥à¥¯¥é¥¹ (¥¯¥é¥¹¥í¡¼¥À¤ò»ý¤¿¤Ê¤¤) ¤ËŬÍѤµ¤ì¤Þ¤¹¡£ +¤³¤Îµ¬Â§¤Ë¤Ï 1 ¤ÄÎã³°¤¬¤¢¤ê¤Þ¤¹¡£ +°ú¿ô¤ò»ý¤¿¤Ê¤¤·Á¼°¤Î¾ì¹ç¡¢¥¹¥¤¥Ã¥Á¤Ï¥·¥¹¥Æ¥à¤ËŬÍѤµ¤ì¤Þ¤»¤ó¡£ +¤³¤ì¤òÍøÍѤ·¤Æ¡¢´Êñ¤Ë¡¢ +¥·¥¹¥Æ¥à¥¯¥é¥¹¤ò½ü¤¯¤¹¤Ù¤Æ¤Î¥¯¥é¥¹Æâ¤ÎɽÌÀ¤òÍ­¸ú¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¤¹¤Ù¤Æ¤Î¥·¥¹¥Æ¥à¥¯¥é¥¹ÆâÆâ¤ÎɽÌÀ¤òÍ­¸ú¤Ë¤¹¤ë¸ÄÊ̤Υ¹¥¤¥Ã¥Á¤â +ÍÑ°Õ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +.BR \-disablesystemassertions +¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.sp 1n +.TP +.BR \-enablesystemassertions +.PD 0 +.TP +.BR \-esa +¤¹¤Ù¤Æ¤Î¥·¥¹¥Æ¥à¥¯¥é¥¹¤ÎɽÌÀ¤òÍ­¸ú¤Ë¤·¤Þ¤¹ (¥·¥¹¥Æ¥à¥¯¥é¥¹¤Î +¥Ç¥Õ¥©¥ë¥È¤ÎɽÌÀ¥¹¥Æ¡¼¥¿¥¹¤ò true ¤ËÀßÄꤷ¤Þ¤¹)¡£ +.sp 1n +.TP +.BR \-disablesystemassertions +.PD 0 +.TP +.BR \-dsa +¤¹¤Ù¤Æ¤Î¥·¥¹¥Æ¥à¥¯¥é¥¹¤ÎɽÌÀ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£ +.sp 1n +.TP +.B \-jar +JAR ¤ÎÃæ¤Ë¥«¥×¥»¥ë²½¤µ¤ì¤¿¥×¥í¥°¥é¥à¤ò¼Â¹Ô¤·¤Þ¤¹¡£ºÇ½é¤Î°ú¿ô¤Ï¡¢µ¯Æ°¥¯¥é¥¹¤Î̾Á°¤Ç¤Ï¤Ê¤¯¡¢JAR ¥¢¡¼¥«¥¤¥Ö¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ë¤Ê¤ê¤Þ¤¹¡£ +¤³¤Î¥ª¥×¥·¥ç¥ó¤¬Æ°ºî¤¹¤ë¤¿¤á¤Ë¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤Ë·Á¼° \f3Main-Class:\f1\f2classname\f1 ¤Î¹Ô¤¬Æþ¤Ã¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +.I classname +¤Ï¡¢¥æ¡¼¥¶¤Î¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Î³«»ÏÅÀ¤È¤Ê¤ë +.B public static void main(String[] args) +¥á¥½¥Ã¥É¤ò»ý¤Ä¥¯¥é¥¹¤ò¼±Ê̤·¤Þ¤¹¡£Jar ¥Õ¥¡¥¤¥ë¤È Jar ¥Õ¥¡¥¤¥ë¤Î¥Þ¥Ë¥Õ¥§¥¹¥È¤ò°·¤¦ÊýË¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢Jar ¥Ä¡¼¥ë¤Î¥ê¥Õ¥¡¥ì¥ó¥¹¥Ú¡¼¥¸¤È¡ÖJava Tutorial¡×¤Î¡ÖJar Files¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ë¤È¤­¤Ï¡¢JAR ¥Õ¥¡¥¤¥ë¤¬¤¹¤Ù¤Æ¤Î¥æ¡¼¥¶¥¯¥é¥¹¤Î¥½¡¼¥¹¤È¤Ê¤ë¤¿¤á¡¢Â¾¤Î¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤ÎÀßÄê¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£ +.LP +.B "java \-jar" +¥ª¥×¥·¥ç¥ó¤Ç¼Â¹Ô¤Ç¤­¤ë JAR ¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢ +.B "java \-jar" +¤Ê¤·¤Ç¤â¼Â¹Ô¤Ç¤­¤ë¤è¤¦¤Ë¡¢¼Â¹Ô¸¢¸Â¤òÀßÄê¤Ç¤­¤Þ¤¹¡£ +¡ÖJava Archive (JAR) ¥Õ¥¡¥¤¥ë¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.sp 1n +.TP +.B \-javaagent:jarpath[=options] +Java ¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¥¨¡¼¥¸¥§¥ó¥È¤òÆɤ߹þ¤ß¤·¤Þ¤¹¡£java.lang.instrument ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.B \-verbose +.PD 0 +.TP +.BI \-verbose: class +¥¯¥é¥¹¤¬Æɤ߹þ¤Þ¤ì¤ë¤¿¤Ó¤Ë¥¯¥é¥¹¤Ë´Ø¤¹¤ë¾ðÊó¤òɽ¼¨¤·¤Þ¤¹¡£ +.PD +.TP +.B \-verbose:gc +¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥·¥ç¥ó¥¤¥Ù¥ó¥È¤¬È¯À¸¤¹¤ë¤¿¤Ó¤ËÊó¹ð¤·¤Þ¤¹¡£ +.TP +.B \-verbose:jni +¥Í¥¤¥Æ¥£¥Ö¥á¥½¥Ã¥É¤ª¤è¤Ó¤½¤Î¾¤Î Java Native Interface (JNI) ¤Î»ÈÍѤ˴ؤ¹¤ë +¾ðÊó¤òÊó¹ð¤·¤Þ¤¹¡£ +.TP +.B \-version +¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤òɽ¼¨¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£ +.TP +.B \-showversion +¥Ð¡¼¥¸¥ç¥ó¾ðÊó¤òɽ¼¨¤·¤Æ¡¢¼Â¹Ô¤ò·Ñ³¤·¤Þ¤¹¡£ +.TP +.B \-? +.PD 0 +.TP +.B \-help +»ÈÍÑË¡¤òɽ¼¨¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£ +.PD +.TP +.B \-X +Èóɸ½à¥ª¥×¥·¥ç¥ó¤Ë´Ø¤¹¤ë¾ðÊó¤òɽ¼¨¤·¤Æ½ªÎ»¤·¤Þ¤¹¡£ +.LP +.SS "Èóɸ½à¥ª¥×¥·¥ç¥ó" +.IX "java" "Non-Standard Options" "\fLjava\fP \(em Java interpreter" +.TP 20 +.B \-Xint +¥¤¥ó¥¿¥×¥ê¥¿ÀìÍѥ⡼¥É¤ÇÆ°ºî¤·¤Þ¤¹¡£¥Í¥¤¥Æ¥£¥Ö¥³¡¼¥É¤Ø¤Î¥³¥ó¥Ñ¥¤¥ë¤Ï +̵¸ú¤Ë¤Ê¤ê¡¢¤¹¤Ù¤Æ¤Î¥Ð¥¤¥È¥³¡¼¥É¤¬¥¤¥ó¥¿¥×¥ê¥¿¤Ë¤è¤Ã¤Æ¼Â¹Ô¤µ¤ì¤Þ¤¹¡£ +Java HotSpot VM Ŭ±þ·¿¥³¥ó¥Ñ¥¤¥é¤Ë¤è¤Ã¤ÆÆÀ¤é¤ì¤ë¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¾å¤Î +ÍøÅÀ¤Ï¡¢¤³¤Î¥â¡¼¥É¤Ç¤Ï¼Â¸½¤µ¤ì¤Þ¤»¤ó¡£ +.TP 20 +.B \-Xbatch +¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥³¥ó¥Ñ¥¤¥ë¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£ +Ä̾VM ¤Ç¤Ï¥á¥½¥Ã¥É¤ò¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥¿¥¹¥¯¤È¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£ +¤³¤Î¤È¤­¡¢¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥³¥ó¥Ñ¥¤¥ë¤¬½ªÎ»¤¹¤ë¤Þ¤Ç¤Ï¡¢ +¥¤¥ó¥¿¥×¥ê¥¿¥â¡¼¥É¤Ç¥á¥½¥Ã¥É¤¬¼Â¹Ô¤µ¤ì¤Þ¤¹¡£ +.B \-Xbatch +¥Õ¥é¥°¤ò»ÈÍѤ¹¤ë¤È¡¢¥Ð¥Ã¥¯¥°¥é¥¦¥ó¥É¥³¥ó¥Ñ¥¤¥ë¤¬ +̵¸ú¤Ë¤Ê¤ë¤¿¤á¡¢¤¹¤Ù¤Æ¤Î¥á¥½¥Ã¥É¤Î¥³¥ó¥Ñ¥¤¥ë¤Ï´°Î»¤¹¤ë¤Þ¤Ç +¥Õ¥©¥¢¥°¥é¥¦¥ó¥É¤Î¥¿¥¹¥¯¤È¤·¤Æ½èÍý¤µ¤ì¤Þ¤¹¡£ +.TP 20 +.B \-Xdebug +JVMDI ¤Î¥µ¥Ý¡¼¥È¤òÍ­¸ú¤Ë¤·¤Æ³«»Ï¤·¤Þ¤¹¡£ +JVMDI ¤Ï¿ä¾©¤µ¤ì¤Ê¤¯¤Ê¤ê¡¢J2SE 5.0 ¤Ç¤Î¥Ç¥Ð¥Ã¥°¤Ë¤Ï +»ÈÍѤµ¤ì¤Þ¤»¤ó¡£¤½¤Î¤¿¤á¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï +J2SE 5.0 ¤Ç¤Î¥Ç¥Ð¥Ã¥°¤Ë¤ÏɬÍפ¢¤ê¤Þ¤»¤ó¡£ +.TP 20 +.BI \-Xbootclasspath: bootclasspath +¥Ö¡¼¥È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òõ¤¹¤¿¤á¡¢¥Ç¥£¥ì¥¯¥È¥ê¡¢JAR ¥¢¡¼¥«¥¤¥Ö¡¢¤ª¤è¤Ó ZIP +¥¢¡¼¥«¥¤¥Ö¤ò¥³¥í¥ó¤Ç¶èÀڤ俥ꥹ¥È¤ò»ØÄꤷ¤Þ¤¹¡£»ØÄꤵ¤ì¤¿¥Ñ¥¹¤Ë +¸ºß¤¹¤ë¥Ö¡¼¥È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Ï¡¢JDK ¤Ë´Þ¤Þ¤ì¤ë +¥Ö¡¼¥È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ÎÂå¤ï¤ê¤Ë»È¤ï¤ì¤Þ¤¹¡£ +Ãí: rt.jar Æâ¤Î¥¯¥é¥¹¤ò¾å½ñ¤­¤¹¤ëÌÜŪ¤Ç¤³¤Î¥ª¥×¥·¥ç¥ó¤ò +»ÈÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ÏÇÛÈ÷¤·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£ +ÇÛÈ÷¤¹¤ë¤È¡¢Java Runtime Environment +¥Ð¥¤¥Ê¥ê¥³¡¼¥É¥é¥¤¥»¥ó¥¹°ãÈ¿¤Ë¤Ê¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ +.TP +.BI \-Xbootclasspath/a: path +¥Ç¥Õ¥©¥ë¥È¤Î¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¥Ñ¥¹¤ËÄɲ乤ë¥Ç¥£¥ì¥¯¥È¥ê¡¢ +.SM JAR +¥¢¡¼¥«¥¤¥Ö¡¢¤ª¤è¤Ó +.SM ZIP +¥¢¡¼¥«¥¤¥Ö¤Î¥Ñ¥¹¤ò¥³¥í¥ó¤Ç¶èÀڤäƻØÄꤷ¤Þ¤¹¡£ +.TP +.BI \-Xbootclasspath/p: path +¥Ç¥Õ¥©¥ë¥È¤Î¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¥Ñ¥¹¤ÎÁ°¤ËÄɲ乤ë +¥Ç¥£¥ì¥¯¥È¥ê¡¢ +.SM JAR +¥¢¡¼¥«¥¤¥Ö¡¢¤ª¤è¤Ó +.SM ZIP +¥¢¡¼¥«¥¤¥Ö¤Î¥Ñ¥¹¤ò¥³¥í¥ó¤Ç¶èÀڤäƻØÄꤷ¤Þ¤¹¡£ +Ãí: ¤³¤Î¥ª¥×¥·¥ç¥ó¤ò¡¢ +.B rt.jar +Æâ¤Î¥¯¥é¥¹¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É +¤¹¤ëÌÜŪ¤Ç»ÈÍѤ¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï»ØÄꤷ¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£ +»ØÄꤹ¤ë¤È¡¢Java Runtime Environment +¥Ð¥¤¥Ê¥ê¥³¡¼¥É¥é¥¤¥»¥ó¥¹°ãÈ¿¤Ë¤Ê¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ +.TP +.B \-Xcheck:jni +Java Native Interface (JNI) µ¡Ç½¤ËÂФ·¤Æ +ÄɲåÁ¥§¥Ã¥¯¤ò¼Â¹Ô¤·¤Þ¤¹¡£Æäˡ¢Java ²¾ÁÛ¥Þ¥·¥ó (JVM) ¤Ï +JNI Í×µá¤ò½èÍý¤¹¤ëÁ°¤Ë¡¢JNI µ¡Ç½¤ËÅϤµ¤ì¤ë +¥Ñ¥é¥á¡¼¥¿¤ª¤è¤Ó¼Â¹Ô´Ä¶­¥Ç¡¼¥¿¤ò¸¡¾Ú¤·¤Þ¤¹¡£ +̵¸ú¤Ê¥Ç¡¼¥¿¤ò¸¡½Ð¤·¤¿¾ì¹ç¡¢¥Í¥¤¥Æ¥£¥Ö¥³¡¼¥É¤Ë +ÌäÂ꤬¤¢¤ë¤ÈȽÃǤ·¡¢Java ²¾ÁÛ¥Þ¥·¥ó¤Ï +Ã×̿Ū¤Ê¥¨¥é¡¼¤Ç½ªÎ»¤·¤Þ¤¹¡£ +¤³¤Î¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ë¤È¡¢ +¥Ñ¥Õ¥©¡¼¥Þ¥ó¥¹¤¬Äã²¼¤·¤Þ¤¹¡£ +.TP +.B \-Xfuture +¸·Ì©¤Ê¥¯¥é¥¹¥Õ¥¡¥¤¥ë·Á¼°¤Î¸¡ºº¤ò¼Â¹Ô¤·¤Þ¤¹¡£²¼°Ì¸ß´¹À­¤ò°Ý»ý +¤¹¤ë¤¿¤á¡¢JDK ¤Î Virtual Machine ¤Ç¼Â¹Ô¤µ¤ì¤ë¥Ç¥Õ¥©¥ë¥È¤Î +·Á¼°¸¡ºº¤Ï¡¢JDK ¥½¥Õ¥È¥¦¥§¥¢¤Î 1.1.x ¥Ð¡¼¥¸¥ç¥ó¤Ç¼Â¹Ô¤µ¤ì¤ë¸¡ºº¤è¤ê¤â +¸·Ì©¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ +.B \-Xfuture +¥Õ¥é¥°¤ò»ÈÍѤ¹¤ë¤È¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë·Á¼°¤ò +¤è¤ê»ÅÍͤ˽àµò¤·¤¿¤â¤Î¤Ë¤¹¤ë¤¿¤á¤Î¡¢¤µ¤é¤Ë¸·Ì©¤Ê¥¯¥é¥¹¥Õ¥¡¥¤¥ë·Á¼°¸¡ºº¤¬ +Í­¸ú¤Ë¤Ê¤ê¤Þ¤¹¡£³«È¯¼Ô¤¬¿·¤·¤¤¥³¡¼¥É¤ò³«È¯¤¹¤ëºÝ¤Ë¤Ï¡¢¤³¤Î¥Õ¥é¥°¤Î +»ÈÍѤò¿ä¾©¤·¤Þ¤¹¡£Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥óµ¯Æ°¥Ä¡¼¥ë¤Î +¾­Íè¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢¤è¤ê¸·Ì©¤Ê¸¡ºº¤¬¥Ç¥Õ¥©¥ë¥È¤Ë¤Ê¤ë¤«¤é¤Ç¤¹¡£ +.TP +.B \-Xnoclassgc +¥¯¥é¥¹¤Î¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥·¥ç¥ó¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£ +.TP +.BI \-Xincgc +¥¤¥ó¥¯¥ê¥á¥ó¥¿¥ë¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥¿¤òÍ­¸ú¤Ë¤·¤Þ¤¹¡£ +¥¤¥ó¥¯¥ê¥á¥ó¥¿¥ë¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥¿¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï +̵¸ú¤ËÀßÄꤵ¤ì¤Æ¤¤¤Þ¤¹¤¬¡¢Í­¸ú¤Ë¤¹¤ë¤È¥×¥í¥°¥é¥à¤Î¼Â¹ÔÃæ¤Î +¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥·¥ç¥ó¤Ë¤è¤ëÄä»ß¤òËɤ®¤Þ¤¹¡£ +¥¤¥ó¥¯¥ê¥á¥ó¥¿¥ë¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥¿¤Ï¡¢¾ì¹ç¤Ë¤è¤Ã¤Æ¤Ï¥×¥í¥°¥é¥à¤ÈƱ»þ¤Ë +¼Â¹Ô¤µ¤ì¤Þ¤¹¡£Æ±»þ¤Ë¼Â¹Ô¤µ¤ì¤Æ¤¤¤ë´Ö¤Ï¡¢¥×¥í¥°¥é¥à¤ÇÍøÍѲÄǽ¤Ê +¥×¥í¥»¥Ã¥µÇ½ÎϤ¬¸º¾¯¤·¤Þ¤¹¡£ +.TP +.BI \-Xloggc: " file" +.BR \-verbose:gc +¤ÈƱÍÍ¡¢³Æ¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥·¥ç¥ó¥¤¥Ù¥ó¥È¤Ç +¥ì¥Ý¡¼¥È¤òºîÀ®¤·¡¢¤³¤Î¥Ç¡¼¥¿¤ò +.I file +¤Ëµ­Ï¿¤·¤Þ¤¹¡£ +.BR \-verbose:gc +¤Ë¤è¤êÆþ¼ê¤Ç¤­¤ë¾ðÊó¤Ë²Ã¤¨¤Æ¡¢¥ì¥Ý¡¼¥È¤µ¤ì¤ë¥¤¥Ù¥ó¥È¤Ë¤Ï +ºÇ½é¤Î¥¬¥Ù¡¼¥¸¥³¥ì¥¯¥·¥ç¥ó¥¤¥Ù¥ó¥È¤«¤é¤Î·Ð²á»þ´Ö (Éÿô) ¤¬ÉÕ¤±¤é¤ì¤Þ¤¹¡£ +.sp 1 +¥Í¥Ã¥È¥ï¡¼¥¯¤ÎÃÙ±ä¤Ë¤è¤ë JVM ¤ÎÄä»ß¤òÈò¤±¤ë¤¿¤á¤Ë¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤Î +µ­²±°è¤È¤·¤Æ¾ï¤Ë¥í¡¼¥«¥ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ò»ÈÍѤ·¤Þ¤¹¡£ +¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢¥Õ¥ë¥Õ¥¡¥¤¥ë¥·¥¹¥Æ¥à¤ª¤è¤Ó¥í¥®¥ó¥°¤¬ÉÔ´°Á´¤Ê¥Õ¥¡¥¤¥ë +¤ËÄɲ䵤ì¤ë¾ì¹ç¡¢ÀÚ¤êµÍ¤á¤é¤ì¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£ +¥³¥Þ¥ó¥É¹Ô¤Ç +.BR \-verbose:gc +¤È¤¤¤Ã¤·¤ç¤Ë»ØÄꤵ¤ì¤¿¾ì¹ç¡¢¤³¤Î¥ª¥×¥·¥ç¥ó¤¬Í¥À褵¤ì¤Þ¤¹¡£ +.TP +.BI \-Xms n +¥á¥â¥ê³ä¤êÅö¤Æ¥×¡¼¥ë¤Î½é´ü¥µ¥¤¥º¤ò»ØÄꤷ¤Þ¤¹¡£ +»ØÄꤹ¤ëÃͤϡ¢1M ¥Ð¥¤¥È¤è¤ê¤âÂ礭¤Ê 1024 ¤ÎÇÜ¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +ʸ»ú +.B k +¤Þ¤¿¤Ï +.B K +¤òÉÕ¤±¤ë¤È K ¥Ð¥¤¥È¡¢Ê¸»ú +.B m +¤Þ¤¿¤Ï +.B M +¤òÉÕ¤±¤ë¤È M ¥Ð¥¤¥È¤òɽ¤·¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï 2M ¥Ð¥¤¥È¤Ç¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +.nf +\-Xms6291456 +\-Xms6144k +\-Xms6m +.fi +.RE +.TP +.BI \-Xmx n +¥á¥â¥ê³ä¤êÅö¤Æ¥×¡¼¥ë¤ÎºÇÂ祵¥¤¥º¤ò¥Ð¥¤¥Èñ°Ì¤Ç»ØÄꤷ¤Þ¤¹¡£ +»ØÄꤹ¤ëÃͤϡ¢2M ¥Ð¥¤¥È¤è¤ê¤âÂ礭¤Ê 1024 ¤ÎÇÜ¿ô¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +ʸ»ú +.B k +¤Þ¤¿¤Ï +.B K +¤òÉÕ¤±¤ë¤È K ¥Ð¥¤¥È¡¢Ê¸»ú +.B m +¤Þ¤¿¤Ï +.B M +¤òÉÕ¤±¤ë¤È M ¥Ð¥¤¥È¤òɽ¤·¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥ÈÃÍ¤Ï 64M ¥Ð¥¤¥È¤Ç¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS 5 +.nf +\-Xmx83886080 +\-Xmx81920k +\-Xmx80m +.fi +.RE +.LP +Solaris 7 ¤ª¤è¤Ó Solaris 8 SPARC ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¾ì¹ç¡¢¤³¤ÎÃͤξå¸Â¤Ï¤ª¤è¤½ + 4000m ¤«¤é¥ª¡¼¥Ð¡¼¥Ø¥Ã¥É¤ÎÎ̤ò°ú¤¤¤¿¤â¤Î¤Ç¤¢¤ê¡¢Solaris 2.6 ¤ª¤è¤Ó x86 +¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¾ì¹ç¤Ï 2000m ¤«¤é¥ª¡¼¥Ð¡¼¥Ø¥Ã¥É¤ÎÎ̤ò°ú¤¤¤¿¤â¤Î¤Ç¤¹¡£ +Linux ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¾ì¹ç¤Î¾å¸Â¤Ï¡¢¤ª¤è¤½ +2000m ¤«¤é¥ª¡¼¥Ð¡¼¥Ø¥Ã¥É¤ÎÎ̤ò°ú¤¤¤¿¤â¤Î¤Ç¤¹¡£ +.TP +.BI \-Xprof +¼Â¹ÔÃæ¤Î¥×¥í¥°¥é¥à¤Î¥×¥í¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¡¢¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¥Ç¡¼¥¿¤ò +ɸ½à½ÐÎϤËÁ÷¤ê¤Þ¤¹¡£¤³¤Î¥ª¥×¥·¥ç¥ó¤Ï¡¢¥×¥í¥°¥é¥à³«È¯¤ËÌòΩ¤Ä +¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤È¤·¤ÆÄ󶡤µ¤ì¤Æ¤¤¤ë¤â¤Î¤Ç¡¢ËÜÈÖ²ÔÆ°¥·¥¹¥Æ¥à¤Ç¤Î»ÈÍѤò +ÌÜŪ¤È¤·¤¿¤â¤Î¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ +.TP +\f3\-Xrunhprof[:help][:\f2suboption\f3=\f2value\f1,...] +CPU¡¢¥Ò¡¼¥×¡¢¤Þ¤¿¤Ï¥â¥Ë¥¿¡¼¤Î¥×¥í¥Õ¥¡¥¤¥ê¥ó¥°¤òÍ­¸ú¤Ë¤·¤Þ¤¹¡£Ä̾¤³¤Î¥ª¥×¥·¥ç¥ó¤Î¤¢¤È¤Ë¤Ï¡¢¥³¥ó¥Þ¤Ç¶èÀÚ¤é¤ì¤¿¡Ö +.IR suboption = value +¡×¤Î¥Ú¥¢¤¬Â³¤­¤Þ¤¹¡£¥µ¥Ö¥ª¥×¥·¥ç¥ó¤ª¤è¤Ó¤½¤ì¤é¤Î¥Ç¥Õ¥©¥ë¥ÈÃͤΰìÍ÷¤ò¼èÆÀ¤¹¤ë¤Ë¤Ï¡¢¥³¥Þ¥ó¥É +.B java \-Xrunhprof:help +¤ò¼Â¹Ô¤·¤Þ¤¹¡£ +.TP +.BI \-Xrs +Java ²¾ÁÛ¥Þ¥·¥ó (JVM) ¤Ë¤è¤ë¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¥·¥°¥Ê¥ë¤ÎÍøÍÑ +¤ò¸º¤é¤·¤Þ¤¹¡£ +.sp 1n +Á°²ó¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¥·¥ã¥Ã¥È¥À¥¦¥ó¥Õ¥Ã¥¯µ¡Ç½¤¬Äɲ䵤졢 +Java ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò½çÈ֤˥·¥ã¥Ã¥È¥À¥¦¥ó¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ +¤³¤Îµ¡Ç½¤Ë¤è¤ê¡¢JVM ¤¬°Û¾ï½ªÎ»¤·¤¿¾ì¹ç¤Ç¤â¡¢¥·¥ã¥Ã¥È¥À¥¦¥ó»þ¤Ë +¥¯¥ê¡¼¥ó¥¢¥Ã¥×¥³¡¼¥É (¥Ç¡¼¥¿¥Ù¡¼¥¹Àܳ¤òÊĤ¸¤ë¡¢¤Ê¤É) ¤ò +¼Â¹Ô¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤·¤¿¡£ +.sp 1n +Sun ¤Î JVM ¤Ï¡¢¥·¥°¥Ê¥ë¤ò¥­¥ã¥Ã¥Á¤·¤Æ°Û¾ï¤Ê JVM ½ªÎ» +¤ËÂФ¹¤ë¥·¥ã¥Ã¥È¥À¥¦¥ó¥Õ¥Ã¥¯¤ò¼ÂÁõ¤·¤Þ¤¹¡£JVM ¤Ï¡¢SIGHUP¡¢SIGINT¡¢SIGTERM ¤ò +»ÈÍѤ·¤Æ¥·¥ã¥Ã¥È¥À¥¦¥ó¥Õ¥Ã¥¯¤Î¼Â¹Ô¤ò³«»Ï¤·¤Þ¤¹¡£ +.sp 1n +JVM ¤Ç¤Ï¡¢Æ±Íͤε¡¹½¤ò»ÈÍѤ·¤Æ¡¢1.2 °ÊÁ°¤Î¥Ç¥Ð¥Ã¥°ÍѤΠ+¥¹¥ì¥Ã¥É¥¹¥¿¥Ã¥¯¥À¥ó¥×µ¡Ç½¤ò¼ÂÁõ¤·¤Æ¤¤¤Þ¤¹¡£Sun ¤Î JVM ¤Ï¡¢ +SIGQUIT ¤ò»ÈÍѤ·¤Æ¥¹¥ì¥Ã¥É¥À¥ó¥×¤ò¼Â¹Ô¤·¤Þ¤¹¡£ +.sp 1n +JVM ¤òÁȤ߹þ¤ó¤À¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ï¡¢SIGINT ¤ä SIGTERM ¤Î¤è¤¦¤Ê +¥·¥°¥Ê¥ë¤òÉÑÈˤ˥ȥé¥Ã¥×¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤Î¤è¤¦¤Ê¾ì¹ç¡¢JVM ¤Î +¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤È¤Î´Ö¤Ë´³¾Ä¤¬È¯À¸¤¹¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£ +¤³¤Î¤è¤¦¤Ê´³¾Ä¤òÈò¤±¤ë¤¿¤á¤Ë¡¢\-Xrs ¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤ò +»ÈÍѤǤ­¤Þ¤¹¡£ +Sun ¤Î JVM ¤Ç \-Xrs ¤¬»ÈÍѤµ¤ì¤ë¤È¡¢SIGINT¡¢SIGTERM¡¢SIGHUP¡¢ +¤ª¤è¤Ó SIGQUIT ¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤Ï JVM ¤Ë¤è¤Ã¤ÆÊѹ¹¤µ¤ì¤º¡¢ +¤³¤ì¤é¤Î¥·¥°¥Ê¥ë¤Î¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ï¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤Þ¤»¤ó¡£ +.sp 1n +\-Xrs ¤ò»ØÄꤹ¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢±Æ¶Á¤¬ 2 ¤Ä¤¢¤ê¤Þ¤¹¡£ +.TP 2 +\(bu SIGQUIT ¥¹¥ì¥Ã¥É¥À¥ó¥×¤Ï»ÈÍѤǤ­¤Þ¤»¤ó¡£ +.TP 2 +\(bu ¥·¥ã¥Ã¥È¥À¥¦¥ó¥Õ¥Ã¥¯¤Î¼Â¹Ô¤Ï¡¢¥æ¡¼¥¶¥³¡¼¥É¤¬¼õ¤±»ý¤Á¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð JVM ¤¬½ªÎ»¤¹¤ë¤È¤­¤Ë System.exit() ¤ò¸Æ¤Ó½Ð¤·¤Þ¤¹¡£ +.TP +.BI \-Xss n +¥¹¥ì¥Ã¥É¥¹¥¿¥Ã¥¯¥µ¥¤¥º¤òÀßÄꤷ¤Þ¤¹¡£ +/TP +.BI \-XX:+UseAltSigs +VM ¤Ç¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç SIGUSR1 ¤ª¤è¤Ó SIGUSR2 ¤ò»ÈÍѤ·¤Þ¤¹¤¬¡¢ +SIGUSR1 ¤ª¤è¤Ó SIGUSR2 ¤ò¥·¥°¥Ê¥ëÏ¢º¿¤¹¤ë¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤È +¶¥¹ç¤¹¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£ +\-XX:+UseAltSigs ¥ª¥×¥·¥ç¥ó¤Ï¡¢VM ¤Ë¥Ç¥Õ¥©¥ë¥È¤È¤·¤Æ +SIGUSR1 ¤È SIGUSR2 °Ê³°¤Î¥·¥°¥Ê¥ë¤ò»ÈÍѤµ¤»¤Þ¤¹¡£ +.SH "´ØÏ¢¹àÌÜ" +.BR javac (1), +.BR jdb (1), +.BR javah (1), +.BR jar (1), +.LP +¼¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢ +.BR java.sun.com +¤ò»²¾È¤Þ¤¿¤Ï¸¡º÷¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP 2 +.B The Java Extensions Framework @ +http://java.sun.com/j2se/1.5.0/docs/guide/extensions/index.html +.TP +.B Security Features @ +http://java.sun.com/j2se/1.5.0/docs/guide/security/index.html diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/javac.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/javac.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/javac.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/javac.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,807 @@ +'\" t +.\" @(#)javac.1 1.9 00/06/13 SMI; +.\" Copyright 2004 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2004 Sun Microsystems, Inc. Tous droits rñÔervñÔ. +.\" +'\"macro stdmacro +.TH javac 1 "2004 ǯ 6 ·î 22 Æü" +.SH "̾Á°" +javac \- Java ¥³¥ó¥Ñ¥¤¥é +.SH "·Á¼°" +.B javac +[ +.BI options +] +[ +.BI sourcefiles +] +[ +.BI @argfiles +] +.SH ¥Ñ¥é¥á¡¼¥¿ +°ú¿ô¤ÏǤ°Õ¤Î½çÈ֤ǻØÄê¤Ç¤­¤Þ¤¹¡£ +.TP 15 +.I options +¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó +.TP 15 +.I sourcefiles +¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤ë 1 ¤Ä°Ê¾å¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë (\f3MyClass.java\f1 ¤Ê¤É) +.TP 15 +\f3@\f1\f2argfiles\f1 +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò°ìÍ÷ɽ¼¨¤¹¤ë 1 ¤Ä°Ê¾å¤Î¥Õ¥¡¥¤¥ë +¤³¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢ +.B \-J +¥ª¥×¥·¥ç¥ó¤Ïµö²Ä¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ +.SH "µ¡Ç½ÀâÌÀ" +.B javac +¥Ä¡¼¥ë¤Ï¡¢Java ¥×¥í¥°¥é¥ß¥ó¥°¸À¸ì¤Çµ­½Ò¤µ¤ì¤¿¥¯¥é¥¹¤È¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +¤ÎÄêµÁ¤òÆɤ߼è¤ê¡¢¥Ð¥¤¥È¥³¡¼¥É¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Ë¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£ +.LP +¥½¡¼¥¹¥³¡¼¥É¤Î¥Õ¥¡¥¤¥ë̾¤ò +.BR javac +¤ËÅϤ¹¤Ë¤Ï¡¢¼¡¤Î 2 ¤Ä¤ÎÊýË¡¤¬¤¢¤ê¤Þ¤¹¡£ +.TP 2 +\(bu +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¿ô¤¬¾¯¤Ê¤¤¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ë̾¤ò¥³¥Þ¥ó¥É¹Ô¤Ç +ľÀÜ»ØÄꤷ¤Þ¤¹¡£ +.TP 2 +\(bu +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¿ô¤¬Â¿¤¤¾ì¹ç¤Ï¡¢¥Õ¥¡¥¤¥ë̾¤ò¶õÇò¤Þ¤¿¤Ï¹Ô¥Ö¥ì¡¼¥¯¤Ç +¶èÀڤäƥե¡¥¤¥ë¤Ëµ­½Ò¤·¤Þ¤¹¡£¼¡¤Ë¡¢¤³¤Î¥ê¥¹¥È¥Õ¥¡¥¤¥ë̾¤ÎÀèƬ¤Ë @ ¤ò +ÉÕ¤±¤Æ +.B javac +¤Î¥³¥Þ¥ó¥É¹Ô¤Ç»ØÄꤷ¤Þ¤¹¡£ +.LP +¥½¡¼¥¹¥³¡¼¥É¤Î¥Õ¥¡¥¤¥ë̾¤Ï +.B .java +³ÈÄ¥»Ò¡¢¥¯¥é¥¹¤Î¥Õ¥¡¥¤¥ë̾¤Ï .class ³ÈÄ¥»Ò¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +¤Þ¤¿¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Î¤É¤Á¤é¤â¡¢³ºÅö¤¹¤ë¥¯¥é¥¹¤ËÂбþ¤·¤¿ +¥ë¡¼¥È̾¤ò»ý¤¿¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢ +.B MyClass +¤È¤¤¤¦Ì¾Á°¤Î +¥¯¥é¥¹¤Ï¡¢ +.B MyClass.java +¤È¤¤¤¦Ì¾Á°¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ëµ­½Ò¤·¤Þ¤¹¡£¤³¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ï¡¢ +.BR MyClass.class +¤È¤¤¤¦Ì¾Á°¤Î¥Ð¥¤¥È¥³¡¼¥É¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Ë¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Þ¤¹¡£ +.LP +ÆâÉô¥¯¥é¥¹ÄêµÁ¤Ï¡¢ÄɲäΥ¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£¤³¤ì¤é¤Î¥¯¥é¥¹¥Õ¥¡ +¥¤¥ë¤Î̾Á°¤Ï¡¢ +.BR MyClass$MyInnerClass.class +¤Î¤è¤¦¤Ë¡¢ÆâÉô¥¯¥é¥¹Ì¾¤È³°Éô¥¯¥é¥¹Ì¾¤òÁȤ߹ç¤ï¤»¤¿¤â¤Î¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸¥Ä¥ê¡¼¤òÈ¿±Ç¤·¤¿¥Ç¥£¥ì¥¯¥È¥ê¥Ä¥ê¡¼¤ËÇÛÃÖ +¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¤¹¤Ù¤Æ¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò +.BR /workspace +¤ËÃÖ¤¤¤Æ¤¤¤ë¾ì¹ç¡¢ +.B com.mysoft.mypack.MyClass +¤Î¥½¡¼¥¹¥³¡¼¥É¤Ï +.BR /workspace/com/mysoft/mypack/MyClass.java +¤Ë¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥³¥ó¥Ñ¥¤¥é¤Ï³Æ¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÂбþ¤¹¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤È +Ʊ¤¸¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤­¤Þ¤¹¡£ +.B -d +(¸å½Ò¤Î¡Ö¥ª¥×¥·¥ç¥ó¡×¤ò»²¾È) ¤ò»È¤¦¤È¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¤¢¤ë¾ì½ê¤È¤Ï°Û +¤Ê¤ë½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£ +.LP +.SS "·¿¤Î¸¡º÷" +.IX "javac" "Searching for Types" "\fLjavac\fP \(em Java compiler" +.LP +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤È¤­¡¢¥³¥ó¥Ñ¥¤¥é¤Ï +¤½¤ÎÄêµÁ¤¬¥³¥Þ¥ó¥É¹Ô¤Ç»ØÄꤵ¤ì¤¿¥½¡¼¥¹¥Õ¥¡¥¤¥ëÃæ¤Ë¸½¤ì¤Ê¤«¤Ã¤¿ +·¿¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤òɬÍפȤ·¤Þ¤¹¡£¥³¥ó¥Ñ¥¤¥é¤Ë¤Ï¡¢¥½¡¼¥¹ +¥Õ¥¡¥¤¥ë¤Ç»È¤ï¤ì¤Æ¤¤¤ë¥¯¥é¥¹¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢³ÈÄ¥¤µ¤ì¤Æ¤¤¤ë¥¯¥é¥¹ +¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¤¢¤ë¤¤¤Ï¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¥¯¥é¥¹¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +¤½¤ì¤¾¤ì¤Î·¿¾ðÊó¤¬É¬ÍפǤ¹¡£¤³¤ì¤Ë¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÇÌÀ¼¨Åª¤Ë¤Ï +¸ÀµÚ¤µ¤ì¤Æ¤¤¤Ê¤¯¤Æ¤â¡¢·Ñ¾µ¤òÄ̤¸¤Æ¾ðÊó¤òÄ󶡤¹¤ë¥¯¥é¥¹¤È¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +¤â´Þ¤Þ¤ì¤Þ¤¹¡£ +.LP +¤¿¤È¤¨¤Ð¡¢java.applet.Applet ¤ò¥µ¥Ö¥¯¥é¥¹²½¤¹¤ë¾ì¹ç¤Ï¡¢Applet ¤Î¾å°Ì¥¯¥é¥¹¤Ç¤¢¤ë +.BR java.awt.Panel¡¢ +.BR java.awt.Container¡¢ +.BR java.awt.Component +¡¢¤ª¤è¤Ó +.BR java.awt.Object +¤â»È¤Ã¤Æ¤¤¤ë¤³¤È¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +¥³¥ó¥Ñ¥¤¥é¤Ï¡¢·¿¾ðÊó¤¬É¬Íפˤʤë¤È¡¢³ºÅö¤¹¤ë·¿¤òÄêµÁ¤·¤Æ¤¤¤ë¥½¡¼¥¹ +¥Õ¥¡¥¤¥ë¤Þ¤¿¤Ï¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òõ¤·¤Þ¤¹¡£¥³¥ó¥Ñ¥¤¥é¤Ï¡¢¤Þ¤º¡¢¥Ö¡¼¥È¥¹ +¥È¥é¥Ã¥×¥¯¥é¥¹¤È³ÈÄ¥µ¡Ç½¥¯¥é¥¹¤ò¸¡º÷¤·¡¢¼¡¤Ë¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹ +(¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê) ¤ò¸¡º÷¤·¤Þ¤¹¡£ +¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ï¡¢ +.SB CLASSPATH +´Ä¶­ÊÑ¿ô¤òÀßÄꤹ¤ë¤«¡¢¤¢¤ë¤¤¤Ï +.B -classpath +¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤ÆÀßÄꤷ¤Þ¤¹ (¾ÜºÙ¤Ï¡¢¡Ö +.BR "¥¯¥é¥¹¥Ñ¥¹¤ÎÀßÄê" +¡× +¤ò»²¾È)¡£ +.LP +.B -sourcepath +¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¥³¥ó¥Ñ¥¤¥é¤Ï¡¢»ØÄꤵ¤ì¤¿¥Ñ¥¹¤Ç¥½¡¼¥¹ +¥Õ¥¡¥¤¥ë¤ò¸¡º÷¤·¤Þ¤¹¡£¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¡¢¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ç¥¯¥é¥¹ +¥Õ¥¡¥¤¥ë¤È¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÎξÊý¤ò¸¡º÷¤·¤Þ¤¹¡£ +.B -bootclasspath +¥ª¥×¥·¥ç¥ó¤È +.B -extdirs +¥ª¥×¥·¥ç¥ó¤ò»È¤¦¤È¡¢Ê̤Υ֡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¤ä³ÈÄ¥µ¡Ç½¥¯¥é¥¹¤ò»ØÄê +¤Ç¤­¤Þ¤¹¡£¸å½Ò¤Î¡Ö +.BR "¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó" +¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +·¿¤Î¸¡º÷¤ËÀ®¸ù¤·¤¿¤È¤­¤ËÆÀ¤é¤ì¤ë·ë²Ì¤Ï¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¡¢¤Þ¤¿¤Ï¤½¤ÎξÊý¤Ç¤¢¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£¤½¤ì¤¾¤ì¤Î¾ì¹ç¤Ë +.B javac +¤¬¤É¤Î¤è¤¦¤Ë½èÍý¤ò¹Ô¤¦¤«¤ò¼¡¤Ë¼¨¤·¤Þ¤¹¡£ +.TP 2 +\(bu +¸¡º÷¤Ç¸«¤Ä¤«¤Ã¤¿¤â¤Î¤¬¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¯¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Ç¤¢¤ë +¾ì¹ç¡¢ +.B javac +¤Ï¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Þ¤¹¡£ +.TP 2 +\(bu +¸¡º÷¤Ç¸«¤Ä¤«¤Ã¤¿¤â¤Î¤¬¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¯¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ç¤¢¤ë +¾ì¹ç¡¢ +.B javac +¤Ï¡¢³ºÅö¤¹¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤·¡¢¤½¤Î·ë²ÌºîÀ®¤µ¤ì¤ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Þ¤¹¡£ +.TP 2 +\(bu +¸¡º÷¤Ç¸«¤Ä¤«¤Ã¤¿¤â¤Î¤¬¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ÎξÊý¤Ç¤¢¤ë +¾ì¹ç¡¢ +.B javac +¤Ï¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤¬¸Å¤¯¤Ê¤Ã¤Æ¤¤¤ë¤«¤É¤¦¤«¤òÄ´¤Ù¤Þ¤¹¡£¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤¬ +¸Å¤¯¤Ê¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤òºÆ¥³¥ó¥Ñ¥¤¥ë¤·¡¢¹¹¿·¸å¤Î +¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ò»ÈÍѤ·¤Þ¤¹¡£¤½¤ì°Ê³°¤Î¾ì¹ç¤Ï¡¢¸«¤Ä¤«¤Ã¤¿¥¯¥é¥¹¥Õ¥¡¥¤ +¥ë¤ò»ÈÍѤ·¤Þ¤¹¡£ +.RS 2 +.LP +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤¬¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤è¤ê¸Å¤¤¾ì¹ç¤Ë¤Î¤ß¡¢ +.B javac +¤Ï¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤¬¸Å¤¯¤Ê¤Ã¤Æ¤¤¤ë¤ÈȽÃǤ·¤Þ¤¹¡£ +.RE +.LP +.B javac +¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ë»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤È¤­¤Ç +¤â¡¢¤½¤Î¤³¤È¤ò¼¨¤¹¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤·¤Þ¤»¤ó¡£¼«Æ°¥³¥ó¥Ñ¥¤¥ë¤ò¥È¥ì¡¼¥¹¤¹ +¤ë¤Ë¤Ï¡¢ +.B -verbose +¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.SH "¥ª¥×¥·¥ç¥ó" +¥³¥ó¥Ñ¥¤¥é¤Ë¤Ï¡¢¸½ºß¤Î³«È¯´Ä¶­¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¡¢¾­Íè¤Î¥ê¥ê¡¼¥¹¤Ç¤â +¥µ¥Ý¡¼¥È¤µ¤ì¤ëɸ½à¥ª¥×¥·¥ç¥ó¤Î¥»¥Ã¥È¤¬¤¢¤ê¤Þ¤¹¡£Èóɸ½à¥ª¥×¥·¥ç¥ó¤Î +Êä­Ū¤Ê¥»¥Ã¥È¤Ï¡¢¸½ºß¤Î Virtual Machine ¤Î¼ÂÁõÆÃÍ­¤Î¤â¤Î¤Ç¡¢¾­Íè +Êѹ¹¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£Èóɸ½à¥ª¥×¥·¥ç¥ó¤Ï¡¢ +.BR \-X +¤Ç»Ï¤Þ¤ê¤Þ¤¹¡£ +.SS "ɸ½à¥ª¥×¥·¥ç¥ó" +.IX "javac" "Standard Options" "\fLjavac\fP \(em Java compiler" +.TP +.BI \-classpath " classpath" +¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤òÀßÄꤷ¡¢ +.SB CLASSPATH +´Ä¶­ÊÑ¿ô¤Î¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤ò¾å½ñ¤­¤·¤Þ¤¹¡£ +.SB CLASSPATH +¤È +.B \-classpath +¤Î¤É¤Á¤é¤â»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ï¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ê¤ê¤Þ¤¹¡£¾ÜºÙ¤Ï¡¢¡Ö +.B ¥¯¥é¥¹¥Ñ¥¹¤ÎÀßÄê +¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.RS +.LP +.B \-sourcepath +¥ª¥×¥·¥ç¥ó¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤È¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î +ξÊý¤¬¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ç¸¡º÷¤µ¤ì¤Þ¤¹¡£ +.RE +.TP +.BI \-Djava.ext.dirs=directories +¥¤¥ó¥¹¥È¡¼¥ë¤µ¤ì¤¿³ÈÄ¥µ¡Ç½¤Î¾ì½ê¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Þ¤¹¡£ +.TP +.BI \-Djava.endorsed.dirs=directories +¾µÇ§¤µ¤ì¤¿É¸½à¥Ñ¥¹¤Î¾ì½ê¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Þ¤¹¡£ +.TP +.BI -d " directory" +¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Î½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê¤òÀßÄꤷ¤Þ¤¹¡£ +½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê¤Ï¤¹¤Ç¤Ë¸ºß¤·¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£javac ¤Ï½ÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¤Þ¤»¤ó¡£ +¥¯¥é¥¹¤¬¥Ñ¥Ã¥±¡¼¥¸¤Î +°ìÉô¤Ç¤¢¤ë¾ì¹ç¡¢ +.B javac +¤Ï¡¢É¬Íפ˱þ¤¸¤Æ¥Ç¥£¥ì¥¯¥È¥ê¤òºîÀ®¤·¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¤òÈ¿±Ç¤·¤¿¥µ¥Ö¥Ç¥£ +¥ì¥¯¥È¥ê¤Ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÃÖ¤­¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢ +.B -d /home/myclasses +¤È»ØÄꤷ¡¢¥¯¥é¥¹¤Î̾Á°¤¬ +.BR com.mypackage.MyClass +¤Ç¤¢¤ë¾ì¹ç¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤Ï +.BR /home/myclasses/com/mypackage/MyClass.class +¤Ë¤Ê¤ê¤Þ¤¹¡£ +.RS +.LP +.B -d +¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ +.B javac +¤Ï¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÃÖ¤­¤Þ¤¹¡£ +.LP +.B -d +¤Ç»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤¬¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ë¼«Æ°Åª¤ËÄɲ䵤ì¤ë¤ï¤± +¤Ç¤Ï¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ +.RE +.TP +.B -deprecation +¿ä¾©¤µ¤ì¤Ê¤¤¥á¥ó¥Ð¤ä¥¯¥é¥¹¤¬¡¢»ÈÍѤ¢¤ë¤¤¤Ï¥ª¡¼¥Ð¡¼¥é¥¤¥É¤µ¤ì¤ë¤¿¤Ó¤ËÀâÌÀ¤òɽ¼¨¤·¤Þ¤¹¡£ +.BR -deprecation +¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ +.B javac +¤Ï¡¢¿ä¾©¤µ¤ì¤Ê¤¤¥á¥ó¥Ð¤ä¥¯¥é¥¹¤ò»ÈÍѤ¢¤ë¤¤¤Ï¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Æ¤¤¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î̾Á°¤òɽ¼¨¤·¤Þ¤¹¡£ +.BR -deprecation +¤Ï +.BR \-Xlint:deprecation ¤Îû½Ì·Á¤Ç¤¹¡£ +.TP +.BI \-encoding " encoding" +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥¨¥ó¥³¡¼¥Ç¥£¥ó¥°Ì¾ (EUCJIS/SJIS/ISO8859-1/UTF8 ¤Ê¤É) ¤ò»ØÄꤷ¤Þ¤¹¡£ +.B -encoding +¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¥Ç¥Õ¥©¥ë¥È¥³¥ó¥Ð¡¼¥¿¤¬ +»È¤ï¤ì¤Þ¤¹¡£ +.TP +.B -g +¶É½êÊÑ¿ô¤ò´Þ¤à¤¹¤Ù¤Æ¤Î¥Ç¥Ð¥Ã¥°¾ðÊó¤òÀ¸À®¤·¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢ +¹ÔÈֹ椪¤è¤Ó¥½¡¼¥¹¥Õ¥¡¥¤¥ë¾ðÊó¤À¤±¤¬À¸À®¤µ¤ì¤Þ¤¹¡£ +.TP +.B -g:none +¥Ç¥Ð¥Ã¥°¾ðÊó¤òÀ¸À®¤·¤Þ¤»¤ó¡£ +.TP +.BI -g: keyword-list +¥«¥ó¥Þ¤Ç¶èÀÚ¤é¤ì¤¿¥­¡¼¥ï¡¼¥É¥ê¥¹¥È¤Ë¤è¤ê»ØÄꤵ¤ì¤¿¡¢ÆÃÄê¤Î¼ïÎà¤Î +¥Ç¥Ð¥Ã¥°¾ðÊó¤À¤±¤òÀ¸À®¤·¤Þ¤¹¡£¼¡¤Î¥­¡¼¥ï¡¼¥É¤¬Í­¸ú¤Ç¤¹¡£ +.RS +.TP +.B source +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥Ç¥Ð¥Ã¥°¾ðÊó +.TP +.B lines +¹ÔÈÖ¹æ¤Î¥Ç¥Ð¥Ã¥°¾ðÊó +.TP +.B vars +¶É½êÊÑ¿ô¤Î¥Ç¥Ð¥Ã¥°¾ðÊó +.RE +.TP +.B \-help +ɸ½à¥ª¥×¥·¥ç¥ó¤Î·Á¼°¤òɽ¼¨¤·¤Þ¤¹¡£ +.TP +.B -nowarn +·Ù¹ð¥á¥Ã¥»¡¼¥¸¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£¤³¤ì¤Ï¡¢ +.BR \-Xlint:none +¤ÈƱ¤¸°ÕÌ£¤Ç¤¹¡£ +.TP +.BI \-source " release" +Àë¸À¤ò´Þ¤à¥½¡¼¥¹¥³¡¼¥É¤Î¥³¥ó¥Ñ¥¤¥ë¤Î¥µ¥Ý¡¼¥È¤òÍ­¸ú¤Ë¤·¤Þ¤¹¡£ +¼¡¤ÎÃͤò +.I release +¤Ç»ØÄꤹ¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +1.5 +¥³¥ó¥Ñ¥¤¥é¤Ï¡¢JDK 1.5 ¤«¤éƳÆþ¤µ¤ì¤¿Áí¾Î·¿ +¤ª¤è¤Ó¾¤Î¸À¸ìµ¡Ç½¤ò´Þ¤à¥³¡¼¥É¤ò¼õ¤±Æþ¤ì¤Þ¤¹¡£ +.B \-source +¥Õ¥é¥°¤¬»ÈÍѤµ¤ì¤Ê¤¤¾ì¹ç¡¢ +1.5 ¤ÎÆ°ºî¤¬¥³¥ó¥Ñ¥¤¥é¤Î +¥Ç¥Õ¥©¥ë¥È¤ËÀßÄꤵ¤ì¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +5 +1.5 ¤ÈƱµÁ¡£ +.if t .TP 20 +.if n .TP 15 +1.4 +¥³¥ó¥Ñ¥¤¥é¤Ï¡¢JDK 1.4 ¤ÇƳÆþ¤µ¤ì¤¿Àë¸À¤ò´Þ¤à +¥³¡¼¥É¤ò¼õ¤±Æþ¤ì¤Þ¤¹¡£ +.if t .TP 20 +.if n .TP 15 +1.3 +¥³¥ó¥Ñ¥¤¥é¤Ï¡¢JDK 1.3 ¤è¤ê¸å¤ËƳÆþ¤µ¤ì¤¿¡¢Àë¸À¡¢Áí¾Î·¿ +¤ª¤è¤Ó¤½¤Î¾¤Î¸À¸ìµ¡Ç½¤ò¥µ¥Ý¡¼¥È¤·¤Þ¤»¤ó¡£ +.RE +.TP +.BI -sourcepath " sourcepath" +¥¯¥é¥¹¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÎÄêµÁ¤ò¸¡º÷¤¹¤ë¥½¡¼¥¹¥³¡¼¥É¥Ñ¥¹¤ò»ØÄê +¤·¤Þ¤¹¡£¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹Æ±ÍÍ¡¢¥½¡¼¥¹¥Ñ¥¹¤ÎÊ£¿ô¤Î¥¨¥ó¥È¥ê¤Ï¥³¥í¥ó (:) +¤Ç¶èÀÚ¤ê¤Þ¤¹¡£¥½¡¼¥¹¥Ñ¥¹¤Î¥¨¥ó¥È¥ê¤Ë¤Ï¡¢¥Ç¥£¥ì¥¯¥È¥ê¡¢JAR ¥¢¡¼¥«¥¤¥Ö¡¢ +¤Þ¤¿¤Ï ZIP ¥¢¡¼¥«¥¤¥Ö¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£¥Ñ¥Ã¥±¡¼¥¸¤ò»È¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ï¡¢ +¥Ç¥£¥ì¥¯¥È¥ê¤Þ¤¿¤Ï¥¢¡¼¥«¥¤¥ÖÆâ¤Î¥í¡¼¥«¥ë¥Ñ¥¹Ì¾¤¬¥Ñ¥Ã¥±¡¼¥¸Ì¾¤òÈ¿±Ç +¤·¤Æ¤¤¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +.RS +.LP +Ãí: ¥½¡¼¥¹¤¬¸«¤Ä¤«¤Ã¤¿¾ì¹ç¡¢¥¯¥é¥¹¥Ñ¥¹¤Ç¸«¤Ä¤«¤Ã¤¿¥¯¥é¥¹¤Ï¡¢¼«Æ°ºÆ +¥³¥ó¥Ñ¥¤¥ë¤ÎÂоݤˤʤê¤Þ¤¹¡£ +.TP +.B -verbose +¾éĹ½ÐÎϤò»ØÄꤷ¤Þ¤¹¡£¥í¡¼¥É¤µ¤ì¤ë¥¯¥é¥¹¤ª¤è¤Ó¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤ë +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤´¤È¤Ë¾ðÊó¤ò½ÐÎϤ·¤Þ¤¹¡£ +.TP +.B \-X +Èóɸ½à¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤Î¾ðÊó¤òɽ¼¨¤·¡¢½ªÎ»¤·¤Þ¤¹¡£ +.SS "¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¥ª¥×¥·¥ç¥ó" +.IX "javac" "Cross-Compilation Options" "\fLjavac\fP \(em Java compiler" +.LP +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥¯¥é¥¹¤Î¥³¥ó¥Ñ¥¤¥ë¤Ï¡¢ +.B javac +¤¬ÅºÉÕ¤µ¤ì¤Æ¤¤¤ë JDK ¤Î¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¤ª¤è¤Ó³ÈÄ¥µ¡Ç½¥¯¥é¥¹¤ËÂÐ +¤·¤Æ¹Ô¤ï¤ì¤Þ¤¹¡£¤·¤«¤·¡¢ +.B javac +¤Ï¡¢°Û¤Ê¤ë Java ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¼ÂÁõ¤Î¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¤ª¤è¤Ó³ÈÄ¥ +µ¡Ç½¥¯¥é¥¹¤ËÂФ·¤Æ¥³¥ó¥Ñ¥¤¥ë¤ò¹Ô¤¦¡Ö +.B ¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë +¡×¤â¥µ¥Ý¡¼¥È¤·¤Æ¤¤¤Þ +¤¹¡£¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¤ò¹Ô¤¦¾ì¹ç¤Ï¡¢ +.B -bootclasspath +¤ª¤è¤Ó +.B -extdirs +¤ò»È¤¦¤³¤È¤¬½ÅÍפǤ¹¡£°Ê²¼¤Î¡Ö¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¤ÎÎã¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.BI -target " version" +»ØÄꤵ¤ì¤¿¥Ð¡¼¥¸¥ç¥ó¤Î VM ¾å¤ÇÆ°ºî¤¹¤ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢1.2 VM ¤È¸ß´¹À­¤Î¤¢¤ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë +¤òÀ¸À®¤·¤Þ¤¹¡£1 ¤Ä¤À¤±Îã³°¤¬¤¢¤ê¡¢ +.BR -source " 1.4" +¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ¹¤ë¤È¡¢¥Ç¥Õ¥©¥ë¥È¤Î¥¿¡¼¥²¥Ã¥È¤Ï 1.4 ¤Ë¤Ê¤ê¤Þ¤¹¡£ +javac ¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤ë¥Ð¡¼¥¸¥ç¥ó¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£ +.RS +.TP +1.1 +À¸À®¤¹¤ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤¬¡¢1.1 VM °Ê¹ß¤Ë¸ß´¹À­¤¬¤¢¤ë¤³¤È¤ò +Êݾڤ·¤Þ¤¹¡£ +.TP +1.2 +1.2 VM °Ê¹ß¤Ç¤ÏÆ°ºî¤¹¤ë¤¬¡¢1.1 VM ¾å¤Ç¤ÏÆ°ºî¤·¤Ê¤¤¥¯¥é¥¹¥Õ¥¡¥¤¥ë +¤òÀ¸À®¤·¤Þ¤¹¡£ +.TP +1.3 +Java 2 SDK, ¥Ð¡¼¥¸¥ç¥ó 1.3 ¤ª¤è¤Ó¤½¤ì°Ê¹ß¤Î VM ¤Ç¤Ï +Æ°ºî¤¹¤ë¤¬¡¢1.1 VM ¤Þ¤¿¤Ï 1.2 VM ¾å¤Ç¤ÏÆ°ºî¤·¤Ê¤¤¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ò +À¸À®¤·¤Þ¤¹¡£ +.TP +1.4 +JDK 1.4 °Ê¹ß¤Î VM ¾å¤ÇÆ°ºî¤¹¤ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ò +À¸À®¤·¤Þ¤¹¡£¤¿¤À¤·¡¢1.1¡¢1.2¡¢¤Þ¤¿¤Ï 1.3 VM ¾å¤Ç¤Ï +Æ°ºî¤·¤Þ¤»¤ó¡£ +.TP +1.5 +JDK 1.5 VM ¾å¤Î¤ß¤Ç¥³¥ó¥Ñ¥¤¥ë²Äǽ¤Ê¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£ +.TP +5 +1.5 ¤ÈƱ¤¸¤Ç¤¹¡£ +.RE +.TP +.BI \-bootclasspath " bootclasspath" +»ØÄꤵ¤ì¤¿°ìÏ¢¤Î¥Ö¡¼¥È¥¯¥é¥¹¤ò¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£ +¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤ÈƱÍͤˡ¢¥Ö¡¼¥È¥¯¥é¥¹¥Ñ¥¹¥¨¥ó¥È¥ê¤Ï +¥³¥í¥ó +.RB ( : ) +¤Ç¶èÀÚ¤é¤ì¤Þ¤¹¡£¤Þ¤¿¡¢¥Ç¥£¥ì¥¯¥È¥ê¡¢ +JAR +¥¢¡¼¥«¥¤¥Ö¤Þ¤¿¤Ï +ZIP +¥¢¡¼¥«¥¤¥Ö¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.TP +.BI \-cldc1.0 +CLDC ¥×¥í¥°¥é¥à¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£¤³¤Î¥³¥ó¥Ñ¥¤¥é¤Ï¥¹¥¿¥Ã¥¯¥Þ¥Ã¥×¤ò +À¸À®¤·¡¢¥×¥ê¥Ù¥ê¥Õ¥¡¥¤¥ä¤Î»ÈÍѤòÉÔÍפˤ·¤Þ¤¹¡£ +.TP +.BI \-extdirs " directories" +»ØÄꤵ¤ì¤¿³ÈÄ¥¥Ç¥£¥ì¥¯¥È¥ê¤ò¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£ +¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢¥³¥í¥ó¤Ç¶èÀÚ¤é¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Î¥ê¥¹¥È¤Ç¤¹¡£ +»ØÄꤵ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê¤Î³Æ +JAR +¥¢¡¼¥«¥¤¥Ö¤Ï¡¢¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ò¸¡º÷¤·¤Þ¤¹¡£ +.RE +.SS Èóɸ½à¥ª¥×¥·¥ç¥ó +.IX "javac" "Non-Standard Options" "\fLjavac\fP \(em Java compiler" +.TP +.B \-Xbootclasspath/p:path +¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¥Ñ¥¹¤ÎÁ°¤ËÉղä·¤Þ¤¹¡£ +.TP +.B \-Xbootclasspath/a:path +¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¥Ñ¥¹¤Î¸å¤ËÄɲä·¤Þ¤¹¡£ +.TP +.B \-Xbootclasspath/:path +¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¥Ñ¥¹¤Î¾ì½ê¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Þ¤¹¡£ +.TP +.B \-Xlint +¤¹¤Ù¤Æ¤Î¿ä¾©¤µ¤ì¤¿·Ù¹ð¤òÍ­¸ú¤Ë¤·¤Þ¤¹¡£¤³¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢ +¤¹¤Ù¤Æ¤Î»ÈÍѲÄǽ¤Ê·Ù¹ð¤¬¿ä¾©¤µ¤ì¤Æ¤¤¤Þ¤¹¡£ +.TP +.B \-Xlint:none +Java ¸À¸ì»ÅÍͤˤè¤Ã¤ÆµÁ̳ÉÕ¤±¤é¤ì¤Æ¤¤¤Ê¤¤¡¢¤¹¤Ù¤Æ¤Î·Ù¹ð¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£ +.TP +.B \-Xlint:-xxx +·Ù¹ð xxx ¤ò̵¸ú¤Ë¤·¤Þ¤¹¡£¤³¤³¤Ç xxx ¤Ï¡¢²¼µ­¤Ë¼¨¤¹ +\-Xlint:xxx ¤Ç¥µ¥Ý¡¼¥È¤µ¤ì¤ë·Ù¹ð¤Î̾Á°¤Ç¤¹¡£ +.TP +.B \-Xlint:unchecked +Java ¸À¸ì»ÅÍͤǵÁ̳ÉÕ¤±¤é¤ì¤Æ¤¤¤ë¥Á¥§¥Ã¥¯¤¬¹Ô¤ï¤ì¤Æ¤¤¤Ê¤¤¡¢ +ÊÑ´¹·Ù¹ð¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤òɽ¼¨¤·¤Þ¤¹¡£ +.TP +.B \-Xlint:path +¸ºß¤·¤Ê¤¤¥Ñ¥¹ (¥¯¥é¥¹¥Ñ¥¹¡¢¥½¡¼¥¹¥Ñ¥¹¤Ê¤É) ¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ä¤¤¤Æ·Ù¹ð¤·¤Þ¤¹¡£ +.TP +.B \-Xlint:serial +ľÎó²½²Äǽ¥¯¥é¥¹¤Î¼º¤ï¤ì¤¿ serialVersionUID ÄêµÁ¤Ë¤Ä¤¤¤Æ·Ù¹ð¤·¤Þ¤¹¡£ +.TP +.B \-Xlint:finally +Àµ¾ï¤Ë´°Î»¤Ç¤­¤Ê¤¤ finally ¶ç¤Ë¤Ä¤¤¤Æ·Ù¹ð¤·¤Þ¤¹¡£ +.TP +.B \-lint:fallthrough +fall-through ʸ¤Î¥¹¥¤¥Ã¥Á¥Ö¥í¥Ã¥¯¤ò¸¡ºº¤· +¸¡½Ð¤µ¤ì¤¿¤¹¤Ù¤Æ¤Î·Ù¹ð¥á¥Ã¥»¡¼¥¸¤òɽ¼¨¤·¤Þ¤¹¡£ +Fall-through case ¤Ï¥¹¥¤¥Ã¥Á¥Ö¥í¥Ã¥¯Æâ¤Î case ¤Ç¡¢ +¥Ö¥í¥Ã¥¯¤ÎºÇ¸å¤Î case ¤ò½ü¤¯¡¢break ʸ¤ò´Þ¤Þ¤Ê¤¤ +¥³¡¼¥É¤ò»ý¤Ä case ¤Ï¡¢¤½¤Î case ¤«¤é¼¡¤Î case ¤Ø +"fall through" ¤Î¥³¡¼¥É¼Â¹Ô¤ò¹Ô¤¦¤³¤È¤ò²Äǽ¤Ë¤·¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð¡¢¤³¤Î¥¹¥¤¥Ã¥Á¥Ö¥í¥Ã¥¯¤Î case 1 ¥ì¥Ù¥ë¤Ë³¤¯ +¥³¡¼¥É¤Ï¡¢break ʸ¤ò´Þ¤ß¤Þ¤»¤ó¡£ +.LP +.RS +.ft 3 +.nf +switch (x) { +case 1: + System.out.println("1"); + // No break; statement here. +case 2: + System.out.println("2"); +} +.fi +.ft 1 +.RE +.LP +¤³¤Î¥³¡¼¥É¤ò¥³¥ó¥Ñ¥¤¥ë¤¹¤ë¤È¤­¤Ë +.B \-Xlint:fallthrough +¥Õ¥é¥°¤¬»ÈÍѤµ¤ì¤ë¤È¡¢¥³¥ó¥Ñ¥¤¥é¤Ï "possible fall-through +into case" ¤Ë¤Ä¤¤¤Æ¤Î·Ù¹ð¤ò¡¢ÌäÂê¤Ë¤Ê¤Ã¤Æ¤¤¤ë case +¤ÎÈÖ¹æ¤È¤È¤â¤Ëɽ¼¨¤·¤Þ¤¹¡£ +.TP +.B \-Xmaxerrors " number" +ɽ¼¨¤¹¤ë¥¨¥é¡¼¤ÎºÇÂç¿ô¤òÀßÄꤷ¤Þ¤¹¡£ +.TP +.B \-Xmaxwarns " number" +ɽ¼¨¤¹¤ë·Ù¹ð¤ÎºÇÂç¿ô¤òÀßÄꤷ¤Þ¤¹¡£ +.B \-Xstdout " filename" +»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¥³¥ó¥Ñ¥¤¥é¥á¥Ã¥»¡¼¥¸¤òÁ÷¿®¤·¤Þ¤¹¡£ +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥³¥ó¥Ñ¥¤¥é¥á¥Ã¥»¡¼¥¸¤Ï +¼¡¤Î¥Õ¥¡¥¤¥ë¤Ë½ÐÎϤµ¤ì¤Þ¤¹¡£ +.BR System.err +.SH \-J ¥ª¥×¥·¥ç¥ó +.TP +.BI \-J option +javac ¤Ë¤è¤Ã¤Æ¸Æ¤Ó½Ð¤µ¤ì¤¿ Java µ¯Æ°¥Ä¡¼¥ë¤Ë¥ª¥×¥·¥ç¥ó¤òÅϤ·¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð¡¢ +.B \-J-Xms48m +¤Ïµ¯Æ°¥á¥â¥ê¤ò +48M ¥Ð¥¤¥È¤ËÀßÄꤷ¤Þ¤¹¡£¤³¤ì¤Ï +.B \-X +¤Ç»Ï¤Þ¤Ã¤Æ¤Ï¤¤¤Þ¤»¤ó¤¬¡¢ +.B javac +¤Î `ɸ½à¥ª¥×¥·¥ç¥ó` ¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£ +.B \-J +¤ÎÊÑ´¹¤Ç¤Ï¡¢¥ª¥×¥·¥ç¥ó¤ò Java ¤Çµ­½Ò¤µ¤ì¤¿ +¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤ò¼Â¹Ô¤¹¤ëÇظå¤Î VM ¤ËÅϤ¹¤³¤È¤Ï +°ìÈÌŪ¤Ë¹Ô¤ï¤ì¤Æ¤¤¤Þ¤¹¡£ +.LP +Ãí: +.B CLASSPATH +¡¢ +.B \-classpath +¡¢ +.B \-bootclasspath +¡¢ +¤ª¤è¤Ó +.B \-extdirs +¤Ï +.B javac +¤Î¼Â¹Ô¤Ë»ÈÍѤ¹¤ë +¥¯¥é¥¹¤ò»ØÄꤷ¤Þ¤»¤ó¡£¤³¤Î¤è¤¦¤Ê¡¢¥³¥ó¥Ñ¥¤¥é¤Î +ÉÔɬÍפʼÂÁõ¤Ï¡¢Ä̾̵°ÕÌ£¤Ç¤¢¤ë¤À¤±¤Ç¤Ê¤¯¡¢ +¾ï¤Ë´í¸±¤¬È¼¤¤¤Þ¤¹¡£¥¯¥é¥¹¤ò»ØÄꤹ¤ëɬÍפ¬¤¢¤ë +¾ì¹ç¤Ï¡¢ +.B \-J +¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¡¢¥ª¥×¥·¥ç¥ó¤ò +´ðËܤȤʤë Java µ¯Æ°¥Ä¡¼¥ë¤ËÅϤ·¤Þ¤¹¡£ +.SH ¥³¥Þ¥ó¥É¹Ô°ú¿ô¥Õ¥¡¥¤¥ë +javac ¥³¥Þ¥ó¥É¹Ô¤òû½Ì¡¢¤¢¤ë¤¤¤Ï´Ê·é¤Ë¤¹¤ë¤¿¤á¡¢ +.BR javac +¥³¥Þ¥ó¥É¤ËÂФ¹¤ë°ú¿ô¤ò´Þ¤à¥Õ¥¡¥¤¥ë¤ò 1 ¤Ä°Ê¾å»ØÄê¤Ç¤­¤Þ¤¹¡£ +¤³¤ì¤Ë¤è¤ê¡¢Ç¤°Õ¤Î¥ª¥Ú¥ì¡¼¥Æ¥£¥ó¥°¥·¥¹¥Æ¥à¾å¤ÇǤ°Õ¤ÎŤµ¤Î +javac ¥³¥Þ¥ó¥É¤òºîÀ®¤Ç¤­¤Þ¤¹¡£ +.LP +°ú¿ô¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢javac ¥ª¥×¥·¥ç¥ó¤È¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤ò +Ǥ°Õ¤ÎÁȤ߹ç¤ï¤»¤ÇÆþ¤ì¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥Õ¥¡¥¤¥ëÃæ¤Î°ú¿ô¤Ï¡¢ +¶õÇòʸ»ú¤Þ¤¿¤Ï²þ¹Ô¤Ç¶èÀÚ¤ê¤Þ¤¹¡£ +°ú¿ô¥Õ¥¡¥¤¥ëÃæ¤Î¥Õ¥¡¥¤¥ë̾¤Ï¡¢°ú¿ô¥Õ¥¡¥¤¥ë¤Î°ÌÃ֤ǤϤʤ¯¡¢ +¸½ºß¤Î¥Ç¥£¥ì¥¯¥È¥ê¤È¤ÎÁêÂаÌÃÖ¤Çɽ¤·¤Þ¤¹¡£ +°ú¿ô¤Î¥ê¥¹¥È¤Ë¡¢¥ï¥¤¥ë¥É¥«¡¼¥É (*) +¤Ï»ÈÍѤǤ­¤Þ¤»¤ó ( +.BR *.java +¤Î¤è¤¦¤Ê»ØÄê)¡£ +¥Õ¥¡¥¤¥ë¤òºÆµ¢Åª¤Ë²ò¼á¤¹¤ë +.BR @ +ʸ»ú¤Î»ÈÍѤϥµ¥Ý¡¼¥È¤µ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ +.LP +javac ¤ò¼Â¹Ô¤¹¤ë¤È¡¢³Æ°ú¿ô¥Õ¥¡¥¤¥ë¤Î¥Ñ¥¹¤ª¤è¤Ó̾Á°¤Ë¡Ö +.BR @ +¡×¤Ç»Ï¤Þ¤ëʸ»úÎó¤¬ÅϤµ¤ì¤Þ¤¹¡£javac ¤¬¡Ö +.BR @ +¡×ʸ»ú¤Ç»Ï¤Þ¤ë°ú¿ô¤ò¸¡½Ð¤¹¤ë¤È¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤ¬Â°À­¥ê¥¹¥È¤Ë +Ÿ³«¤µ¤ì¤Þ¤¹¡£ +.SS "Îã" - "°ú¿ô¥Õ¥¡¥¤¥ë¤ò 1 ¤Ä»ÈÍÑ" +¤¹¤Ù¤Æ¤Î javac °ú¿ô¤ò»ý¤Ä +.BR argfile +¤È¤¤¤¦Ì¾Á°¤Î°ú¿ô¥Õ¥¡¥¤¥ë¤ò 1 ¤Ä»ÈÍѤ·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf + example% javac @argfile +.fi +.ft 1 +.RE +.LP +¤³¤Î°ú¿ô¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢¼¡¤ÎÎã¤Ç¼¨¤¹Î¾Êý¤Î¥Õ¥¡¥¤¥ë¤ÎÆâÍƤòÆþ¤ì¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.SS "Îã" - "°ú¿ô¥Õ¥¡¥¤¥ë¤ò 2 ¤Ä»ÈÍÑ" +2 ¤Ä¤Î°ú¿ô¥Õ¥¡¥¤¥ë¤òºîÀ®¤Ç¤­¤Þ¤¹¡£1 ¤Ä¤Ï javac ¥ª¥×¥·¥ç¥óÍÑ¡¢¤â¤¦ 1 ¤Ä¤Ï +¥½¡¼¥¹¥Õ¥¡¥¤¥ëÍѤǤ¹ (¼¡¤Î¥ê¥¹¥È¤Ë¤Ï¡¢¹Ô¤ò¤Ä¤Ê¤°Ê¸»úÎ󤬻ÈÍѤµ¤ì¤Æ +¤¤¤Ê¤¤¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤)¡£ +.LP +°Ê²¼¤Î¤â¤Î¤ò´Þ¤à +.BR options +¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +\-d classes +\-g +\-sourcepath \\java\\pubs\\ws\\1.3\\src\\share\\classes +.fi +.ft 1 +.RE +.TP +°Ê²¼¤Î¤â¤Î¤ò´Þ¤à +.BR classes +¤È¤¤¤¦Ì¾Á°¤Î¥Õ¥¡¥¤¥ë¤òºîÀ®¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +MyClass1.java +MyClass2.java +MyClass3.java +.fi +.ft 1 +.RE +.TP +¼¡¤Î¥³¥Þ¥ó¥É¤Ç¡¢javac ¤ò¼Â¹Ô¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +% javac @options @classes +.fi +.ft 1 +.RE +.SS "Îã" - "¥Ñ¥¹¤ò»ØÄꤷ¤¿°ú¿ô¥Õ¥¡¥¤¥ë" +°ú¿ô¥Õ¥¡¥¤¥ë¤Ë¤Ï¥Ñ¥¹¤ò»ØÄê¤Ç¤­¤Þ¤¹¤¬¡¢°ú¿ô¥Õ¥¡¥¤¥ëÆâ¤Î +¥Õ¥¡¥¤¥ë̾¤Ï¤¹¤Ù¤Æ¡¢¸½ºß¤Îºî¶ÈÍѥǥ£¥ì¥¯¥È¥ê ( +.BR path1 +¤Ç¤â +.BR path2 +¤Ç¤â¤Ê¤¯) ¤È¤ÎÁêÂаÌÃÖ¤Çɽ¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +% javac @path1/options @path2/classes +.fi +.ft 1 +.RE +.SH "»ÈÍÑÎã" +.SS "´Êñ¤Ê¥×¥í¥°¥é¥à¤Î¥³¥ó¥Ñ¥¤¥ë" +.IX "javac" "Compiling a Simple Program" "\fLjavac\fP \(em Java compiler" +.LP +¼¡¤Ë¼¨¤¹¥½¡¼¥¹¥Õ¥¡¥¤¥ë +.BR Hello.java +¤Ç¤Ï¡¢ +.BR greetings.Hello +¤È¤¤¤¦Ì¾Á°¤Î¥¯¥é¥¹¤òÄêµÁ¤·¤Æ¤¤¤Þ¤¹¡£greetings ¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢¥½¡¼¥¹ +¥Õ¥¡¥¤¥ë¤È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ÎξÊý¤Î¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥ê¤Ç¡¢¸½ºß¤Î¥Ç¥£¥ì +¥¯¥È¥ê¤Î¤¹¤°²¼¤Ë¤¢¤ê¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢¤³¤ÎÎã¤Ç¤Ï¥Ç¥Õ¥©¥ë¥È¥æ¡¼¥¶¥¯¥é¥¹¥Ñ +¥¹¤ò»ÈÍѤǤ­¤Þ¤¹¡£¤Þ¤¿¡¢ +.BR -d +¤ò»È¤Ã¤ÆÊ̤νÐÎÏÀè¥Ç¥£¥ì¥¯¥È¥ê¤ò»ØÄꤹ¤ëɬÍפ⤢¤ê¤Þ¤»¤ó¡£ +.LP +.ft 3 +.nf + % ls + greetings/ + % ls greetings + Hello.java + % cat greetings/Hello.java + package greetings; + + public class Hello { + public static void main(String[] args) { + for (int i=0; i < args.length; i++) { + System.out.println("Hello " + args[i]); + } + } + } + % javac greetings/Hello.java + % ls greetings + Hello.class Hello.java + % java greetings.Hello World Universe Everyone + Hello World + Hello Universe + Hello Everyone +.fi +.ft 1 +.SS "Ê£¿ô¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥³¥ó¥Ñ¥¤¥ë" +.IX "javac" "Compiling Multiple Source Files" "\fLjavac\fP \(em Java compiler" +.LP +¼¡¤ÎÎã¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸ greetings Æâ¤Î¤¹¤Ù¤Æ¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò +¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£ +.LP +.ft 3 +.nf + % ls + greetings/ + % ls greetings + Aloha.java GutenTag.java Hello.java Hi.java + % javac greetings/*.java + % ls greetings + Aloha.class GutenTag.class Hello.class Hi.class + Aloha.java GutenTag.java Hello.java Hi.java +.fi +.ft 1 +.LP +.SS "¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Î»ØÄê" +.IX "javac" "Specifying a User Class Path" "\fLjavac\fP \(em Java compiler" +.LP +¾å¤ÎÎã¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¤¦¤Á¡¢1 ¤Ä¤òÊѹ¹¤·¡¢Êѹ¹¸å¤Î¥Õ¥¡¥¤¥ë¤ò +ºÆ¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£ +.LP +.ft 3 +.nf + % pwd + /examples + % javac greetings/Hi.java +.fi +.ft 1 +.LP +.B greetings.Hi +¤Ï¡¢greetings ¥Ñ¥Ã¥±¡¼¥¸Æâ¤Î¤Û¤«¤Î¥¯¥é¥¹¤ò»²¾È¤·¤Æ¤¤¤ë +¤¿¤á¡¢¥³¥ó¥Ñ¥¤¥é¤Ï¤³¤ì¤é¤Î¤Û¤«¤Î¥¯¥é¥¹¤òõ¤¹É¬Íפ¬¤¢¤ê¤Þ¤¹¡£¾å¤ÎÎã¤Ç +¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤¬¡¢¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥ê¤ò´Þ¤à¥Ç¥£¥ì¥¯¥È +¥ê¤ÈƱ¤¸¤Ê¤Î¤Ç¡¢¥³¥ó¥Ñ¥¤¥ë¤ÏŬÀڤ˹Ԥï¤ì¤Þ¤¹¡£¤¿¤À¤·¡¢¸½ºß¤É¤Î¥Ç¥£¥ì +¥¯¥È¥ê¤Ë¤¤¤ë¤«¤Ë´Ø·¸¤Ê¤¯¥Õ¥¡¥¤¥ë¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢¥æ¡¼¥¶¥¯¥é¥¹ +¥Ñ¥¹¤Ë +.B /examples +¤òÄɲ乤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ë¥¨¥ó¥È¥ê¤òÄɲ乤ë¤Ë¤Ï +.B CLASSPATH +¤òÀßÄꤹ¤ëÊýË¡¤â¤¢¤ê¤Þ¤¹¤¬¡¢¤³¤³¤Ç¤Ï +.B -classpath +¥ª¥×¥·¥ç¥ó¤ò»È¤¤¤Þ¤¹¡£ +.LP +.ft 3 +.nf + % javac \-classpath \\examples /examples/greetings/Hi.java +.fi +.ft 1 +.LP +ºÆÅÙ +.B greetings.Hi +¤òÊѹ¹¤·¡¢¥Ð¥Ê¡¼¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤ò»È¤¦¤è¤¦¤Ë¤·¤¿¾ì¹ç +¤Ï¡¢¤³¤Î¥Ð¥Ê¡¼¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤â¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤òÄ̤¸¤Æ¥¢¥¯¥»¥¹¤Ç¤­¤ë +¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.ft 3 +.nf + % javac \-classpath /examples:/lib/Banners.jar \\ + /examples/greetings/Hi.java +.fi +.ft 1 +.LP +greetings Æâ¤Î¥¯¥é¥¹¤ò¼Â¹Ô¤¹¤ë¤Ë¤Ï¡¢greetings ¤È¡¢greetings ¤¬»È¤¦ +¥¯¥é¥¹¤ÎξÊý¤Ë¥¢¥¯¥»¥¹¤Ç¤­¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.ft 3 +.nf + % java \-classpath /examples:/lib/Banners.jar greetings.Hi +.fi +.ft 1 +.LP +.SS "¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ÎʬΥ" +.IX "javac" "Separating Source Files and Class Files" "\fLjavac\fP \(em Java compiler" +.LP +ÆäËÂ絬ÌÏ¥×¥í¥¸¥§¥¯¥È¤Î¾ì¹ç¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤È¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤òÊ̤Π+¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤¯¤ÈÊØÍø¤Ê¤³¤È¤¬¤¢¤ê¤Þ¤¹¡£¥¯¥é¥¹¥Õ¥¡¥¤¥ë½ÐÎÏÀè¤òÊÌ¸Ä¤Ë +»ØÄꤹ¤ë¤Ë¤Ï¡¢ +.B -d +¤ò»È¤¤¤Þ¤¹¡£¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬¥æ¡¼¥¶¥¯¥é¥¹¥Ñ¥¹¤Ë¤Ï¤Ê¤¤¤Î¤Ç¡¢ +.B -sourcepath +¤ò»È¤Ã¤Æ¡¢¥³¥ó¥Ñ¥¤¥é¤¬¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ò¸«¤Ä¤±¤ë¤³¤È¤¬¤Ç¤­¤ë¤è¤¦¤Ë¤· +¤Þ¤¹¡£ +.LP +.ft 3 +.nf + % ls + classes/ lib/ src/ + % ls src + farewells/ + % ls src/farewells + Base.java GoodBye.java + % ls lib + Banners.jar + % ls classes + % javac \-sourcepath src \-classpath classes:lib/Banners.jar \\ + src/farewells/GoodBye.java \-d classes + % ls classes + farewells/ + % ls classes/farewells + Base.class GoodBye.class +.fi +.ft 1 +.LP +Ãí: ¥³¥Þ¥ó¥É¹Ô¤Ç¤Ï src/farewells/Base.java ¤ò»ØÄꤷ¤Æ¤¤¤Þ¤»¤ó¤¬¡¢¤³¤Î +¥Õ¥¡¥¤¥ë¤â¥³¥ó¥Ñ¥¤¥é¤Ë¤è¤Ã¤Æ¥³¥ó¥Ñ¥¤¥ë¤µ¤ì¤Þ¤¹¡£ +¼«Æ°¥³¥ó¥Ñ¥¤¥ë¤ò¥È¥ì¡¼¥¹¤¹¤ë¤Ë¤Ï¡¢ +.B -verbose ¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.SS "¥¯¥í¥¹¥³¥ó¥Ñ¥¤¥ë¤ÎÎã" +.IX "javac" "Cross-Compilation Example" "\fLjavac\fP \(em Java compiler" +.LP +¤³¤³¤Ç¤Ï¡¢ +.B javac +¤ò»È¤Ã¤Æ 1.4 VM ¾å¤Ç¼Â¹Ô¤¹¤ë¥³¡¼¥É¤ò¥³¥ó¥Ñ¥¤¥ë¤·¤Þ¤¹¡£ +.LP +.ft 3 +.nf + % javac \-target 1.4 \-bootclasspath jdk1.4.2/lib/classes.zip \\ + -extdirs "" OldCode.java +.fi +.ft 1 +.LP +.B \-target 1.4 +¥ª¥×¥·¥ç¥ó¤Ë¤è¤ê¡¢À¸À®¤µ¤ì¤ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤¬ 1.4 VM ¤Ë¸ß´¹À­¤¬¤¢¤ë +¤³¤È¤¬Êݾڤµ¤ì¤Þ¤¹¡£¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢ +.B javac +¤Ï 1.5 ¤Ø¤Î¸ß´¹À­¤ò°Ý»ý¤·¤Æ¥³¥ó¥Ñ¥¤¥ë¤ò¹Ô¤¤¤Þ¤¹¡£ +.LP +JDK ¤Î +.B javac +¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¤ËÂФ·¤Æ¥³¥ó¥Ñ¥¤¥ë¤ò¹Ô¤¦ +¤Î¤Ç¡¢JDK 1.4 ¤Î¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¤ËÂФ·¤Æ¥³¥ó¥Ñ¥¤ +¥ë¤ò¹Ô¤¦¤è¤¦¤Ë»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ï¡¢ +.B -bootclasspath +¤ª¤è¤Ó +.BR -extdirs +¤ò»È¤Ã¤Æ¹Ô¤¤¤Þ¤¹¡£¤³¤Î»ØÄê¤ò¹Ô¤ï¤Ê¤¤¤È¡¢1.4 VM ¤Ë¤Ï¸ºß¤·¤Ê¤¤ Java 2 ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à +API ¤ËÂбþ¤·¤¿¥³¥ó¥Ñ¥¤¥ë¤¬¹Ô¤ï¤ì¤ë¤¿¤á¡¢¼Â¹ÔÃæ¤Ë¾ã³²¤¬È¯À¸¤¹¤ë²Ä +ǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£ +.br +.ne 11 +.sp +.SH "´ØÏ¢¹àÌÜ" +.BR jar (1), +.BR java (1), +.BR javadoc (1), +.BR javah (1), +.BR javap (1), +.BR jdb (1) +.LP +¼¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢Java ¤Î Web ¥µ¥¤¥È¤ò»²¾È¤Þ¤¿¤Ï¸¡º÷¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.TP 10 +.B Java Extensions Mechanism @ +.\" http://java.sun.com/j2se/1.4/ja/docs/ja/guide/extensions/index.html + +http://java.sun.com/j2se/1.5/docs/guide/extensions/index.html ¡§±Ñ¸ìÈÇ diff -ruN jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/javadoc.1 jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/javadoc.1 --- jdk-1_5_0_11/j2se/src/bsd/doc/man/ja/javadoc.1 1970-01-01 01:00:00.000000000 +0100 +++ jdk-1_5_0_11.ahj14/j2se/src/bsd/doc/man/ja/javadoc.1 2007-02-24 09:06:07.000000000 +0100 @@ -0,0 +1,5030 @@ +'\" t +.\" @(#)javadoc.1 1.12 00/06/13 SMI; +.\" Copyright 2003 Sun Microsystems, Inc. All rights reserved. +.\" Copyright 2003 Sun Microsystems, Inc. Tous droits réóervéó. +.\" +.TH javadoc 1 "2004 ǯ 6 ·î 22 Æü" +.hw javadoc +.SH "̾Á°" +javadoc \- Java API ¥É¥­¥å¥á¥ó¥È¥¸¥§¥Í¥ì¡¼¥¿ +.SH "·Á¼°" +.B javadoc +[ +.I options +] [ +.I packagenames +] [ +.I sourcefilenames +] [ +.I \-subpackages pkg1:pkg2:... +] [ +.I @argfiles +] +.SH "¥Ñ¥é¥á¡¼¥¿" +°ú¿ô¤Î½ç½ø¤ÏǤ°Õ¤Ç¤¹¡£ +.TP 15 +.I options +¤³¤Î¥É¥­¥å¥á¥ó¥È¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ë¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤Ç¤¹¡£ +.B javadoc +¤Î¥ª¥×¥·¥ç¥ó¤Î°ìÈÌŪ¤Ê»ÈÍÑË¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢¡Ö»ÈÍÑÎã¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.I packagenames +.BR "java.lang java.lang.reflect java.awt" +¤Ê¤É¤Î¡¢¥¹¥Ú¡¼¥¹¤Ç¶èÀÚ¤é¤ì¤¿ +°ìÏ¢¤Î¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Ç¤¹¡£¥É¥­¥å¥á¥ó¥È²½¤¹¤ë¥Ñ¥Ã¥±¡¼¥¸¤´¤È¤ËÊÌ¸Ä¤Ë +»ØÄꤹ¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¤³¤ì¤é¤Î¥Ñ¥Ã¥±¡¼¥¸Ì¾¤òõ¤¹¤È¤­¡¢ +.B \-sourcepath +¤ò»ÈÍѤ·¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¤òºÆµ¢Åª¤Ë½èÍý¤¹¤ë¤³¤È¤Ï¤¢¤ê¤Þ¤»¤ó¡£ +¥¢¥¹¥¿¥ê¥¹¥¯ (\f3*\f1) ¤Ê¤É¤Î¥ï¥¤¥ë¥É¥«¡¼¥É¤Ï»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£ +¡Ö1 ¤Ä°Ê¾å¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¥É¥­¥å¥á¥ó¥È²½¡×¤Î +Îã¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.I sourcefilenames +¥¹¥Ú¡¼¥¹¤Ç¶èÀÚ¤é¤ì¤¿°ìÏ¢¤Î¥Õ¥¡¥¤¥ë̾¤Ç¤¹¡£¥Ñ¥¹¡¢¤ª¤è¤Ó +¥¢¥¹¥¿¥ê¥¹¥¯ (\f3*\f1) ¤Ê¤É¤Î¥ï¥¤¥ë¥É¥«¡¼¥É¤ò´Þ¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤¬½èÍý¤¹¤ë¤Î¤Ï¡¢¥Õ¥¡¥¤¥ë̾¤¬¡Ö.java¡×¤È¤¤¤¦³ÈÄ¥»Ò¤Ç½ª¤ï¤ê¡¢ +¤½¤Î³ÈÄ¥»Ò¤ò½ü¤¤¤¿Ì¾Á°¤¬¼ÂºÝ¤ËÍ­¸ú¤Ê¥¯¥é¥¹Ì¾¤Ç¤¢¤ë¤¹¤Ù¤Æ¤Î¥Õ¥¡¥¤¥ë¤Ç¤¹¡£ +¤·¤¿¤¬¤Ã¤Æ¡¢¥Ï¥¤¥Õ¥ó¤ò´Þ¤à̾Á° (X-Buffer ¤Ê¤É) ¤ä¡¢ +¤½¤Î¾¤Î̵¸ú¤Êʸ»ú¤ò´Þ¤à̾Á°¤òÉÕ¤±¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢ +¤½¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ò¥É¥­¥å¥á¥ó¥È²½¤ÎÂоݤ«¤é½ü³°¤Ç¤­¤Þ¤¹¡£ +¤³¤ì¤Ï¡¢¥Æ¥¹¥ÈÍѤΥե¡¥¤¥ë¤ä¡¢¥Æ¥ó¥×¥ì¡¼¥È¤«¤éÀ¸À®¤µ¤ì¤¿¥Õ¥¡¥¤¥ë¤Î¾ì¹ç¤ËÊØÍø¤Ç¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤ÎÁ°¤Ë»ØÄꤵ¤ì¤¿¥Ñ¥¹¤ò»ÈÍѤ·¤Æ¡¢ +¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤òõ¤·¤Þ¤¹¡£¤³¤Î¾ì¹ç¡¢ +.B -sourcepath +¤Ï»ÈÍѤ·¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢ +.B Button.java +¤òÅϤ¹¤³¤È¤Ï +.BR ./Button.java +¤È»ØÄꤹ¤ë¤³¤È¤ÈƱ¤¸¤Ç¤¹¡£´°Á´¥Ñ¥¹¤òÉÕ¤±¤¿¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Î +Îã¤Ï¡Ö +.BR /home/src/java/awt/Graphics*.java +¡×¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£¡Ö1 ¤Ä°Ê¾å¤Î¥¯¥é¥¹¤Î¥É¥­¥å¥á¥ó¥È²½¡×¤ÎÎã¤ò +»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£¤Þ¤¿¡¢¡Ö¥Ñ¥Ã¥±¡¼¥¸¤È¥¯¥é¥¹¤Î¥É¥­¥å¥á¥ó¥È²½¡×¤Î +Îã¤Î¤è¤¦¤Ë¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¤È¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤òÁȤ߹ç¤ï¤»¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ +.TP +.I \-subpackages pkg1:pkg2:... +»ØÄꤵ¤ì¤¿¥Ñ¥Ã¥±¡¼¥¸Æâ¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤«¤é¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤·¡¢ +ºÆµ¢Åª¤Ë¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¤ò½èÍý¤·¤Þ¤¹¡£ ¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Þ¤¿¤Ï +¥½¡¼¥ë¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤹ¤ë¤¿¤á¤ÎÂåÂؼêÃʤǤ¹¡£ +.TP +.I @argfiles +Javadoc ¥ª¥×¥·¥ç¥ó¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¡¢¤ª¤è¤Ó¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤ò +Ǥ°Õ¤Î½ç½ø¤Çʤ٤¿¥ê¥¹¥È¤¬´Þ¤Þ¤ì¤ë 1 ¤Ä°Ê¾å¤Î¥Õ¥¡¥¤¥ë¤Ç¤¹¡£ +¤³¤Î¥Õ¥¡¥¤¥ë¤ÎÃæ¤Ç¤Ï¡¢¥ï¥¤¥ë¥É¥«¡¼¥É (*) ¤ª¤è¤Ó +.B \-J +¥ª¥×¥·¥ç¥ó¤Ï»ØÄê¤Ç¤­¤Þ¤»¤ó¡£ +.SH "µ¡Ç½ÀâÌÀ" +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢°ìÏ¢¤Î Java ¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÎÀë¸À¤ª¤è¤Ó¥É¥­¥å¥á¥ó¥È +¥³¥á¥ó¥È¤ò²òÀϤ·¡¢¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï public ¥¯¥é¥¹¤È protected ¥¯¥é¥¹¡¢ +Æþ¤ì»Ò¥¯¥é¥¹¡Êƿ̾¤ÎÆâÉô¥¯¥é¥¹¤ò½ü¤¯¡Ë¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¥á¥½¥Ã¥É¡¢¤ª¤è¤Ó +¥Õ¥£¡¼¥ë¥É¤Ë¤Ä¤¤¤ÆÀâÌÀ¤·¤¿°ìÏ¢¤Î HTML ¥Ú¡¼¥¸¤òÀ¸À®¤·¤Þ¤¹¡£ +.LP +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸Á´ÂΡ¢¸Ä¡¹¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¡¢¤Þ¤¿¤Ï¤½¤ÎξÊý¤ËÂФ·¤Æ +¼Â¹Ô¤Ç¤­¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤ò¥Ñ¥Ã¥±¡¼¥¸Á´ÂΤËÂФ·¤Æ¼Â¹Ô¤¹¤ë¾ì¹ç¤Ï¡¢°ìÏ¢¤Î +¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ò javadoc ¤Ë°ú¿ô¤È¤·¤ÆÅϤ·¤Þ¤¹¡£¸Ä¡¹¤Î +¥¯¥é¥¹¤ËÂФ·¤Æ javadoc ¤ò¼Â¹Ô¤¹¤ë¾ì¹ç¤Ï¡¢°ìÏ¢¤Î +¥½¡¼¥¹ (\f3.java\f1) ¥Õ¥¡¥¤¥ë̾¤òÅϤ·¤Þ¤¹¡£¶ñÂÎŪ¤ÊÎã¤Ï¡¢ +¤³¤Î¥Ú¡¼¥¸¤ÎºÇ¸å¤Ç¼¨¤·¤Þ¤¹¡£ +.LP +.RS +.B Ãí) +javadoc ¥Ä¡¼¥ë¤Ë¥Ñ¥Ã¥±¡¼¥¸Ì¾¤òÅϤ¹¤È¡¢¸½ºß¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï»ØÄꤵ¤ì¤¿ +¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î¤¹¤Ù¤Æ¤Î +.BR .java +¥¯¥é¥¹¤¬½èÍý¤µ¤ì¤Þ¤¹¡£¤³¤ì¤Ï¡¢ +.BR .java +¥Õ¥¡¥¤¥ë¤¬¥³¡¼¥ÉÎã¤Ç¤¢¤ë¾ì¹ç¤ä»ØÄꤵ¤ì¤¿¥Ñ¥Ã¥±¡¼¥¸¤Î¼ÂºÝ¤Î +¥á¥ó¥Ð¤Ç¤Ï¤Ê¤¤¤½¤Î¾¤Î¥¯¥é¥¹¤Ç¤¢¤ë¾ì¹ç¤âƱÍͤǤ¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸Àë¸ÀÍÑ¤Î³Æ +.BR .java +¥Õ¥¡¥¤¥ë¤ò²òÀϤ·¤Þ¤»¤ó¡£¾­Íè¤Î¥ê¥ê¡¼¥¹¤Ç¤Ï¡¢¤³¤Î²òÀϤòÄɲà +¤¹¤ë²ÄǽÀ­¤¬¤¢¤ê¤Þ¤¹¡£ +.RE +.LP +¼Â¹Ô»þ¤Ë¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¤½¤Î¼Â¹Ô¤Î°ìÉô¤È¤·¤Æµ­½Ò¤µ¤ì¤Æ¤¤¤ë¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢ +¤ª¤è¤Ó¥á¥ó¥Ð¤Î̾¾Î¤Ë¥¯¥í¥¹¥ê¥Õ¥¡¥ì¥ó¥¹¥ê¥ó¥¯¤ò¼«Æ°Åª¤Ë +Äɲä·¤Þ¤¹¡£¥ê¥ó¥¯¤Ï¡¢¼¡¤Î²Õ½ê¤Ë¸½¤ï¤ì¤Þ¤¹¡£ +.LP +.TP 2 +\(bu +Àë¸À (Ìá¤êÃͤη¿¡¢°ú¿ô¤Î·¿¡¢¥Õ¥£¡¼¥ë¥É¤Î·¿) +.TP 2 +\(bu +@see ¥¿¥°¤«¤éÀ¸À®¤µ¤ì¤ë [´ØÏ¢¹àÌÜ] ¤Î¥»¥¯¥·¥ç¥ó +.TP 2 +\(bu +{@link} ¥¿¥°¤«¤éÀ¸À®¤µ¤ì¤ë¥¤¥ó¥é¥¤¥ó¥Æ¥­¥¹¥È +.TP 2 +\(bu +@throws ¥¿¥°¤«¤éÀ¸À®¤µ¤ì¤ëÎã³°¤Î̾¾Î +.TP 2 +\(bu +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥á¥ó¥Ð¤ËÂФ¹¤ë [ÄêµÁ] ¥ê¥ó¥¯¤È¡¢¥¯¥é¥¹¤Î¥á¥ó¥Ð¤ËÂФ¹¤ë [¥ª¡¼¥Ð¡¼¥é¥¤¥É] ¥ê¥ó¥¯ +.TP 2 +\(bu +¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢¤ª¤è¤Ó¥á¥ó¥Ð¤òµ­½Ò¤·¤¿°ìÍ÷ɽ +.TP 2 +\(bu +¥Ñ¥Ã¥±¡¼¥¸¤È¥¯¥é¥¹¤Î·Ñ¾µ¥Ä¥ê¡¼ +.TP 2 +\(bu +º÷°ú +.LP +\-link ¤È \-linkoffline ¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Æ¡¢ +¥³¥Þ¥ó¥É¹Ô¤Ë´Þ¤Þ¤ì¤Æ¤¤¤Ê¤¤¡¢¸ÄÊ̤ËÀ¸À®¤µ¤ì¤ë¥¯¥é¥¹¤Î´û¸¤Î¥Æ¥­¥¹¥È¤Ë +¥Ï¥¤¥Ñ¡¼¥ê¥ó¥¯¤òÄɲäǤ­¤Þ¤¹¡£ +.LP +javadoc ¥Ä¡¼¥ë¤Ï¡¢¼Â¹Ô¤Î¤¿¤Ó¤Ë¤Ò¤È¤Ä¤Î´°Á´¤Ê¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤·¤Þ¤¹¡£javadoc ¤Ï¡¢ +ÄɲÃÀ¸À®¤ò¹Ô¤¨¤Þ¤»¤ó¡£¤Ä¤Þ¤ê¡¢°ÊÁ°¤Ë¼Â¹Ô¤·¤¿ javadoc ¤Î·ë²Ì¤òÊѹ¹¤·¤¿¤ê¡¢ +¤½¤ì¤é¤òľÀܼè¤ê¹þ¤à¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£¤·¤«¤·¡¢Á°½Ò¤Î¤è¤¦¤Ë¤Û¤«¤Î +¼Â¹Ô¤Î·ë²Ì¤Ë¥ê¥ó¥¯¤¹¤ë¤³¤È¤Ï²Äǽ¤Ç¤¹¡£ +.LP +¼ÂÁõ¾å¤ÎÍýͳ¤«¤é¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¼Â¹Ô¤Ë java ¥³¥ó¥Ñ¥¤¥é¤òɬÍפȤ·¡¢java ¥³¥ó¥Ñ¥¤¥é¤Ë°Í¸¤·¤Æ¤¤¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï +.B javac +¤Î°ìÉô¤ò¸Æ¤Ó½Ð¤·¤Æ¡¢Àë¸À¤ò¥³¥ó¥Ñ¥¤¥ë¤·¡¢¥á¥ó¥Ð¤Î¼ÂÁõ¤Ï̵»ë¤·¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥¯¥é¥¹³¬Áؤò´Þ¤à¥¯¥é¥¹¤ÎË­ÉÙ¤ÊÆâÉôɽ¸½¡¢¤ª¤è¤Ó¡Ö»ÈÍѡ״ط¸¤ò +¹½ÃÛ¤·¡¢¤½¤³¤«¤é HTML ¤òÀ¸À®¤·¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥½¡¼¥¹¥³¡¼¥É¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤«¤é¡¢¥æ¡¼¥¶¤Î +Ä󶡤¹¤ë¥É¥­¥å¥á¥ó¥È¤â¼èÆÀ¤·¤Þ¤¹¡£ +.LP +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥á¥½¥Ã¥ÉËÜÂΤΤʤ¤½ã¿è¤Ê¥¹¥¿¥Ö¥Õ¥¡¥¤¥ë¤Ç¤¢¤ë +.B .java +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¾å¤Ç¼Â¹Ô¤µ¤ì¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢API ¤ÎºîÀ®»þ¤Ë¤Ï¡¢¥³¡¼¥É¤ò +µ­½Ò¤¹¤ëÁ°¤ÎÀ߷פÎÁᤤÃʳ¬¤Ç¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤òµ­½Ò¤·¡¢ +.B javadoc +¤ò¼Â¹Ô¤Ç¤­¤Þ¤¹¡£ +.LP +¥³¥ó¥Ñ¥¤¥é¤Ë°Í¸¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¡¢HTML ½ÐÎϤ¬¡¢¼ÂºÝ¤Î¼ÂÁõ¤ËÀµ³Î¤ËÂбþ +¤¹¤ë¤³¤È¤¬Êݾڤµ¤ì¤Þ¤¹¡£¼ÂºÝ¤Î¼ÂÁõ¤Ï¡¢ÌÀ¼¨Åª¤Ç¤Ê¤¯°ÅÌÛŪ¤Ë +¥½¡¼¥¹¥³¡¼¥É¤Ë°Í¸¤·¤Æ¤¤¤ë¾ì¹ç¤¬¤¢¤ê¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢ +.B .class +¥Õ¥¡¥¤¥ëÆâ¤Ë¤Ï¸ºß¤¹¤ë¤¬¡¢¥½¡¼¥¹¥³¡¼¥ÉÆâ¤Ë¤Ï¸ºß¤·¤Ê¤¤ +¥Ç¥Õ¥©¥ë¥È¥³¥ó¥¹¥È¥é¥¯¥¿ (¡ÖJava Language Specification¡×¤Î¥»¥¯¥·¥ç¥ó 8.6.7) +¤ò¥É¥­¥å¥á¥ó¥È²½¤·¤Þ¤¹¡£ +.LP +¿¤¯¤Î¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ç¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥³¡¼¥É¤¬ÉÔ´°Á´¤Þ¤¿¤Ï¥¨¥é¡¼¤ò +´Þ¤ó¤Ç¤¤¤ë¾ì¹ç¤Ç¤â¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤Ç¤­¤Þ¤¹¡£ +¤³¤Î¤¿¤á¡¢¥Ç¥Ð¥Ã¥°¤ä¥È¥é¥Ö¥ë¥·¥å¡¼¥Æ¥£¥ó¥°¤¬´°Î»¤¹¤ëÁ°¤Ë +¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤Ç¤­¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢Java ¸À¸ì»ÅÍͤˤè¤ë¤È¡¢ +Ãê¾Ý¥á¥½¥Ã¥É¤ò´Þ¤à¥¯¥é¥¹¤Ï¤½¤ì¼«ÂΤòÃê¾Ý¤ÈÀë¸À¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +¤³¤Î¥¨¥é¡¼¤ò¸¡½Ð¤¹¤ë¤È¡¢javac ¥³¥ó¥Ñ¥¤¥é¤Î¾ì¹ç¤Ï¡¢¤³¤Î¥¨¥é¡¼¤Ç +Ää»ß¤·¤Þ¤¹¤¬¡¢javadoc ¥Ä¡¼¥ë¤Ï·Ù¹ð¤ò½Ð¤µ¤º¤Ë½èÍý¤ò¿Ê¤á¤Þ¤¹¡£ +javadoc ¥Ä¡¼¥ë¤Ï¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Î´ðËÜŪ¤Ê¥Á¥§¥Ã¥¯¤ò¹Ô¤¤¤Þ¤¹¡£ +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò¤è¤ê¾Ü¤·¤¯¥Á¥§¥Ã¥¯¤¹¤ëɬÍפ¬¤¢¤ë¾ì¹ç¤Ï¡¢ +DocCheck ¥É¥Ã¥¯¥ì¥Ã¥È¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.B javadoc +¥Ä¡¼¥ë¤¬¥É¥­¥å¥á¥ó¥ÈÍѤÎÆâÉô¹½Â¤¤ò¹½ÃÛ¤¹¤ë¤È¤­¤Ï¡¢»²¾È¤¹¤ë +¥¯¥é¥¹¤ò¤¹¤Ù¤Æ¥í¡¼¥É¤·¤Þ¤¹¡£¤³¤Î¤¿¤á¡¢¥Ö¡¼¥È¥¹¥È¥é¥Ã¥×¥¯¥é¥¹¡¢ +³ÈÄ¥µ¡Ç½¡¢¤Þ¤¿¤Ï¥æ¡¼¥¶¥¯¥é¥¹¤Ë¤«¤«¤ï¤é¤º¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢»²¾È¤¹¤ë¥¯¥é¥¹¤ò¤¹¤Ù¤Æ¸¡½Ð¤Ç¤­¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +°ìÈÌŪ¤Ë¡¢ºîÀ®¤¹¤ë +¥¯¥é¥¹¤Ï¡¢³ÈÄ¥µ¡Ç½¤È¤·¤Æ¥í¡¼¥É¤µ¤ì¤ë¤«¡¢ +.BR javadoc +¥Ä¡¼¥ë¤Î¥¯¥é¥¹¥Ñ¥¹Æâ¤Ë¤¢¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.SS "Javadoc ¥É¥Ã¥¯¥ì¥Ã¥È" +.B javadoc +¥Ä¡¼¥ë¤Î½ÐÎϤÎÆâÍƤȷÁ¼°¤Ï¡¢¥É¥Ã¥¯¥ì¥Ã¥È¤ò»È¤Ã¤Æ¥«¥¹¥¿¥Þ¥¤¥º¤Ç¤­¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ë¤Ï¡¢É¸½à¥É¥Ã¥¯¥ì¥Ã¥È¤È¸Æ¤Ð¤ì¤ë¥Ç¥Õ¥©¥ë¥È¤Î¡ÖÁȤ߹þ¤ß·¿¡× +¥É¥Ã¥¯¥ì¥Ã¥È¤¬¤¢¤ê¡¢¤³¤ì¤Ë¤è¤Ã¤Æ HTML ·Á¼°¤Î API +¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤·¤Þ¤¹¡£É¸½à¥É¥Ã¥¯¥ì¥Ã¥È +¤Î½¤Àµ¤ä¥µ¥Ö¥¯¥é¥¹²½¤ò¹Ô¤Ê¤Ã¤¿¤ê¡¢HTML¡¢XML¡¢MIF¡¢RTF ¤Ê¤É¤Î¹¥¤ß¤Î +½ÐÎÏ·Á¼°¤òÀ¸À®¤¹¤ëÆȼ«¤Î¥É¥Ã¥¯¥ì¥Ã¥È¤òµ­½Ò¤¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£ +¥É¥Ã¥¯¥ì¥Ã¥È¤È¤½¤Î»ÈÍÑË¡¤Ë¤Ä¤¤¤Æ¤Ï¡¢¼¡¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.TP 2 +\(bu +.B javadoc +¤Ë»Ü¤µ¤ì¤¿µ¡Ç½¶¯²½ +.TP 2 +\(bu +.B -doclet +¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó +.LP +.B -doclet +¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤Ç¥«¥¹¥¿¥à¥É¥Ã¥¯¥ì¥Ã¥È¤¬»ØÄꤵ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥Ç¥Õ¥©¥ë¥È¤Îɸ½à¥É¥Ã¥¯¥ì¥Ã¥È¤ò»ÈÍѤ·¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ë¤Ï¡¢¤É¤Î¥É¥Ã¥¯¥ì¥Ã¥È¤¬»È¤ï¤ì¤Æ¤¤¤ë¤«¤Ë¤Ï´Ø·¸¤Ê¤¯»ÈÍѤǤ­¤ë +¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤¬¤¢¤ê¤Þ¤¹¡£É¸½à¥É¥Ã¥¯¥ì¥Ã¥È¤Ç¤Ï¡¢¤³¤ì¤é¤Î +¤Û¤«¤Ë¡¢¤¤¤¯¤Ä¤«¤Î¥³¥Þ¥ó¥É¹Ô¥ª¥×¥·¥ç¥ó¤¬Äɲ䵤ì¤Þ¤¹¡£¤É¤Á¤é¤Î +¥ª¥×¥·¥ç¥ó¤Ë¤Ä¤¤¤Æ¤â¡¢¸å½Ò¤Î¡Ö¥ª¥×¥·¥ç¥ó¡×¤ÇÀâÌÀ¤·¤Þ¤¹¡£ +.SS ´ØÏ¢¥É¥­¥å¥á¥ó¥È¤ª¤è¤Ó¥É¥Ã¥¯¥ì¥Ã¥È +.TP 2 +\(bu +Javadoc ¤Ë»Ü¤µ¤ì¤¿µ¡Ç½¶¯²½ - Javadoc 1.4 ¤ÇÄɲ䵤줿²þÎÉÅÀ¤Î¾ÜºÙ +.TP 2 +\(bu +Javadoc FAQ - ÉÑÈˤ˴󤻤é¤ì¤ë¼ÁÌä¤ËÂФ¹¤ë²óÅú¡¢Javadoc ´ØÏ¢¤Î¥Ä¡¼¥ë¤Ë¤Ä¤¤¤Æ¤Î¾ðÊ󡢤ª¤è¤Ó¥Ð¥°¤Î²óÈòÊýË¡ +.TP 2 +\(bu +Javadoc ¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¤òºîÀ®¤¹¤ë¤Ë¤Ï - Sun ¤Ç +°ìÈÌŪ¤Ê¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Îµ­½ÒÊýË¡¤Î¾ÜºÙ +.TP 2 +\(bu +API »ÅÍͤòµ­½Ò¤¹¤ë¤¿¤á¤ÎÍ×·ï - Java 2 ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à»ÅÍͤòµ­½Ò¤¹¤ëºÝ¤Ë +»ÈÍѤµ¤ì¤¿É¸½àÍ×·ï¡£ ¤³¤Î¾ðÊó¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È +·Á¼°¤Ç API »ÅÍͤòµ­½Ò¤¹¤ë¾ì¹ç¤Ë¤â¡¢¤½¤Î¾¤Î·Á¼°¤Çµ­½Ò¤¹¤ë¾ì¹ç¤Ë¤â +ÌòΩ¤Á¤Þ¤¹¡£ ¸¡¾Ú²Äǽ¤Ê¥¢¥µ¡¼¥·¥ç¥ó¤òËþ¤¿¤¹¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢ +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¥Õ¥£¡¼¥ë¥É¡¢¤ª¤è¤Ó¥á¥½¥Ã¥É¤Ë¤Ä¤¤¤Æ¤ÎÍ×·ï¤òÄê¤á¤Æ¤¤¤Þ¤¹¡£ +.TP 2 +\(bu +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Î»ÅÍÍ - ¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Î +¥ª¥ê¥¸¥Ê¥ë»ÅÍͤˤĤ¤¤Æ¤Ï¡¢¡ØJava Language Specification¡Ù +(James Gosling¡¢Bill Joy¡¢Guy Steele ¶¦Ãø) ¤Î½éÈǤΠ+Âè 18 ¾Ï¡ÖDocumentation Comments¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +¤³¤Î¾Ï¤Ï¡¢Âè 2 ÈǤǤϺï½ü¤µ¤ì¤Þ¤·¤¿¡£ +.TP 2 +\(bu +DocCheck ¥É¥Ã¥¯¥ì¥Ã¥È - ¥½¡¼¥¹¥Õ¥¡¥¤¥ëÆâ¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò¸¡ºº¤·¡¢ +¸«¤Ä¤«¤Ã¤¿¥¨¥é¡¼¤äÉÔµ¬Â§¤Ê²Õ½ê¤ò°ìÍ÷¤Ë¤·¤¿¥ì¥Ý¡¼¥È¤òÀ¸À®¤·¤Þ¤¹¡£ +¤³¤ì¤Ï Sun Doc ¥Á¥§¥Ã¥¯¥æ¡¼¥Æ¥£¥ê¥Æ¥£¤Î°ìÉô¤Ç¤¹¡£ +.TP 2 +\(bu +MIF ¥É¥Ã¥¯¥ì¥Ã¥È - MIF¡¢FrameMaker¡¢¤ª¤è¤Ó PDF ·Á¼°¤Ç¤Î API ¥É¥­¥å¥á¥ó¥È¤Î +À¸À®¤ò¼«Æ°²½¤·¤Þ¤¹¡£ MIF ¤Ï Adobe FrameMaker ¤Î¸ß´¹·Á¼°¤Ç¤¹¡£ +.SS "ÍѸì" +¤¤¤¯¤Ä¤«¤ÎÍѸì¤Ë¤Ï¡¢ +.BR javadoc +¥Ä¡¼¥ë¤Î¥³¥ó¥Æ¥­¥¹¥È¤ÇÆÃÄê¤Î°ÕÌ£¤¬¤¢¤ê¤Þ¤¹¡£ +.TP 15 +À¸À®¤µ¤ì¤ë¥É¥­¥å¥á¥ó¥È +.B javadoc +¥Ä¡¼¥ë¤¬ Java ¥½¡¼¥¹¥³¡¼¥ÉÆâ¤Î doc ¥³¥á¥ó¥È¤«¤éÀ¸À®¤·¤¿¥É¥­¥å¥á¥ó¥È +¤Î¤³¤È¤Ç¤¹¡£¥Ç¥Õ¥©¥ë¥È¤ÎÀ¸À®¥É¥­¥å¥á¥ó¥È¤Ï HTML ·Á¼°¤Ç¡¢É¸½à +¥É¥Ã¥¯¥ì¥Ã¥È¤Ë¤è¤Ã¤ÆºîÀ®¤µ¤ì¤Þ¤¹¡£ +.TP +̾Á° +Java ¸À¸ì¤Ç¤Î̾Á°¡¢¤Ä¤Þ¤ê¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢ +¥Õ¥£¡¼¥ë¥É¡¢¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¤Þ¤¿¤Ï¥á¥½¥Ã¥É¤Î̾Á°¤Î¤³¤È¤Ç¤¹¡£Ì¾Á°¤Ï¡¢ +.BR java.lang.String.equals(java.lang.Object) +¤Î¤è¤¦¤Ë´°Á´½¤¾þ¤¹¤ë¤³¤È¤â¡¢ +.BR equals(Object) +¤Î¤è¤¦¤ËÉôʬ½¤¾þ¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ +.TP +¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤ë¥¯¥é¥¹ +.B javadoc +¤Î¼Â¹Ô¤Ë¤è¤Ã¤Æ´°Á´¤Ê¥É¥­¥å¥á¥ó¥È¤¬À¸À®¤µ¤ì¤ë¥¯¥é¥¹¤È +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤¹¡£¥É¥­¥å¥á¥ó¥È²½¤¹¤ë¤Ë¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬ +»ÈÍѲÄǽ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Î +¤É¤Á¤é¤«¤ò +.B javadoc +¥³¥Þ¥ó¥É¤ËÅϤµ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤ë¥¯¥é¥¹¤Ï¡¢ +.B javadoc +¤Î¼Â¹Ô¤ÇÁȤ߹þ¤Þ¤ì¤ë¥¯¥é¥¹¡¢¤Ä¤Þ¤ê¡ÖÁȤ߹þ¤ß¥¯¥é¥¹¡×¤È¤â¸Æ¤Ð¤ì¤Þ¤¹¡£ +.TP +´Þ¤Þ¤ì¤ë¥¯¥é¥¹ +Âбþ¤¹¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸Ì¾¤¬ javadoc ¥³¥Þ¥ó¥É¤Ë +ÅϤµ¤ì¤ë¥¯¥é¥¹¤ª¤è¤Ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¤³¤È¤Ç¤¹¡£ +.TP +½ü³°¤µ¤ì¤ë¥¯¥é¥¹ +javadoc ¥³¥Þ¥ó¥É¤Ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸Ì¾¤¬ +ÅϤµ¤ì¤Ê¤¤¥¯¥é¥¹¤È¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤¹¡£ +.TP +»²¾È¥¯¥é¥¹ +¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤ë¥¯¥é¥¹¤È¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ÎÄêµÁ +(¼ÂÁõ) ¤Þ¤¿¤Ï¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥ÈÆâ¤ÇÌÀ¼¨Åª¤Ë»²¾È¤µ¤ì¤ë +¥¯¥é¥¹¤È¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤¹¡£»²¾È¤ÎÎã¤È¤·¤Æ¤Ï¡¢ +Ìá¤êÃͤη¿¡¢¥Ñ¥é¥á¡¼¥¿¤Î·¿¡¢¥­¥ã¥¹¥È¤Î·¿¡¢ +³ÈÄ¥¤µ¤ì¤ë¥¯¥é¥¹¡¢¼ÂÁõ¤µ¤ì¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢ +¥¤¥ó¥Ý¡¼¥È¤µ¤ì¤ë¥¯¥é¥¹¡¢¥á¥½¥Ã¥ÉËÜÂΤǻÈÍѤµ¤ì¤ë +¥¯¥é¥¹¡¢@see¡¢{@link}¡¢{@linkplain}¡¢ +¤ª¤è¤Ó {@inheritDoc} ¥¿¥°¤Ê¤É¤¬¤¢¤ê¤Þ¤¹ (¤³¤ÎÄêµÁ¤Ï 1.3 ¤«¤é +Êѹ¹¤µ¤ì¤Æ¤¤¤ë¤³¤È¤ËÃí°Õ)¡£ +javadoc ¥Ä¡¼¥ë¤ÏÆ°ºîÃæ¡¢ +.B javadoc +¤Î¥Ö¡¼¥È¥¯¥é¥¹¥Ñ¥¹¤È +¥¯¥é¥¹¥Ñ¥¹Æâ¤Ë¤¢¤ë»²¾È¤µ¤ì¤Æ¤¤¤ë¥¯¥é¥¹¤ò +¤¹¤Ù¤Æ¥á¥â¥ê¤Ë¥í¡¼¥É¤¹¤ë¤¿¤á¤Ç¤¹¡£ +»²¾È¤µ¤ì¤Æ¤¤¤ë¥¯¥é¥¹¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿ +¾ì¹ç¤Ï¡¢[¥¯¥é¥¹¤¬¸«¤Ä¤«¤ê¤Þ¤»¤ó] ¤È¤¤¤¦·Ù¹ð¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥¯¥é¥¹¤Î¸ºß¤È¤½¤Î¥á¥ó¥Ð¤Î´°Á´½¤¾þ̾¤ò·èÄꤹ¤ë¤Î¤Ë½½Ê¬¤Ê¾ðÊó¤ò¡¢ +.B .class +¥Õ¥¡¥¤¥ë¤«¤é°ú¤­½Ð¤¹¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.TP +³°Éô»²¾È¥¯¥é¥¹ +»²¾È¤µ¤ì¤ë¥¯¥é¥¹¤Î¤¦¤Á¡¢ +.B javadoc +¤ò¼Â¹Ô¤·¤Æ¤â¥É¥­¥å¥á¥ó¥È¤¬À¸À®¤µ¤ì¤Ê¤¤¥¯¥é¥¹¤Ç¤¹¡£ +¤Ä¤Þ¤ê¡¢¤³¤ì¤é¤Î¥¯¥é¥¹¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ç +.B javadoc +¥Ä¡¼¥ë¤ËÅϤµ¤ì¤Æ¤¤¤Þ¤»¤ó¡£ +À¸À®¥É¥­¥å¥á¥ó¥ÈÆâ¤Ç¤³¤ì¤é¤Î¥¯¥é¥¹¤Ë¥ê¥ó¥¯¤·¤Æ¤¤¤ë²Õ½ê¤Ï¡¢ +¡Ö³°Éô»²¾È¡×¤Þ¤¿¤Ï¡Ö³°Éô¥ê¥ó¥¯¡×¤È¸Æ¤Ð¤ì¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢ +.B java.awt +¥Ñ¥Ã¥±¡¼¥¸¤ËÂФ·¤Æ¤À¤± +.B javadoc +¤ò¼Â¹Ô¤·¤¿¾ì¹ç¡¢Object ¤Ê¤É¤Î +.BR java.lang +Æâ¤Î¤¹¤Ù¤Æ¤Î¥¯¥é¥¹¤Ï¡¢³°Éô»²¾È¥¯¥é¥¹¤Ë¤Ê¤ê¤Þ¤¹¡£³°Éô»²¾È¥¯¥é¥¹¤Ë¤Ï¡¢ +.B \-link +¤ª¤è¤Ó +.B \-linkoffline +¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ¥ê¥ó¥¯¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +³°Éô»²¾È¥¯¥é¥¹¤Ë¤Ï¡¢Ä̾綠¤Î¥½¡¼¥¹¥³¥á¥ó¥È¤ò +.B \javadoc +¥Ä¡¼¥ë¤Î¼Â¹Ô¤ÇÍøÍѤǤ­¤Ê¤¤¤È¤¤¤¦½ÅÍפÊÆÃħ¤¬¤¢¤ê¤Þ¤¹¡£ +¤³¤Î¾ì¹ç¡¢¤½¤ì¤é¤Î¥³¥á¥ó¥È¤ò·Ñ¾µ¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£ +.SS "¥½¡¼¥¹¥Õ¥¡¥¤¥ë" +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢Java ¸À¸ì¥½¡¼¥¹¥Õ¥¡¥¤¥ë (\f3.java\f1)¡¢¥Ñ¥Ã¥±¡¼¥¸¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¡¢ +³µÍ×¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¡¢¤ª¤è¤Ó¤½¤Î¾¤Î½èÍý¤µ¤ì¤Ê¤¤¥Õ¥¡¥¤¥ë¤Î 4 ¼ïÎà¤Î +¡Ö¥½¡¼¥¹¡×¥Õ¥¡¥¤¥ë¤ò´ð¤Ë¤·¤Æ¡¢½ÐÎϤòÀ¸À®¤·¤Þ¤¹¡£ +.SS "¥¯¥é¥¹¥½¡¼¥¹¥³¡¼¥É¥Õ¥¡¥¤¥ë" +³Æ¥¯¥é¥¹¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¤ª¤è¤Ó¤½¤Î¥á¥ó¥Ð¤Ï¡¢ +.B .java +¥Õ¥¡¥¤¥ë¤ÎÃæ¤Ë¤½¤ì¼«¿È¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò +»ý¤Ä¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Î¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï¡¢ +¡Ö¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¡×¤ÎÀá¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.SS "¥Ñ¥Ã¥±¡¼¥¸¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë" +³Æ¥Ñ¥Ã¥±¡¼¥¸¤Ï¡¢Æȼ«¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò +»ý¤Ä¤³¤È¤¬¤Ç¤­¡¢¡Ö¥½¡¼¥¹¡×¥Õ¥¡¥¤¥ë¤ËÊÝ»ý¤·¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢À¸À®¤¹¤ë¥Ñ¥Ã¥±¡¼¥¸¤ÎÍ×Ìó¥Ú¡¼¥¸¤Ë¤³¤Î¥³¥á¥ó¥È¤ò¥Þ¡¼¥¸¤·¤Þ¤¹¡£ +Ä̾¤³¤Î¥³¥á¥ó¥È¤Ë¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸Á´ÂΤËŬÍѤµ¤ì¤ë +¥É¥­¥å¥á¥ó¥È¤ò´Þ¤á¤Þ¤¹¡£ +.LP +¥Ñ¥Ã¥±¡¼¥¸¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤Ë¤Ï¡¢¥Õ¥¡¥¤¥ë̾¤ò +.B package.html +¤Ë¤·¤Æ +.B .java +¥Õ¥¡¥¤¥ë¤È¤È¤â¤Ë¥½¡¼¥¹¥Ä¥ê¡¼Æâ¤Î¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤¯ +ɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¤³¤Î¾ì½ê¤Ç¤³¤Î¥Õ¥¡¥¤¥ë̾¤ò¼«Æ°Åª¤Ë¸¡º÷¤·¤Þ¤¹¡£¥Õ¥¡¥¤¥ë̾¤Ï¡¢ +¤É¤Î¥Ñ¥Ã +¥±¡¼¥¸¤Ç¤âƱ°ì¤Ç¤¹¡£ +.LP +¥Ñ¥Ã¥±¡¼¥¸¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤ÎÆâÍƤϡ¢¤Û¤«¤Î¤¹¤Ù¤Æ¤Î¥³¥á¥ó¥È¤ÈƱÍͤˡ¢ +HTML ¤Çµ­½Ò¤µ¤ì¤¿ 1 ¤Ä¤ÎÂ礭¤Ê¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Ç¤¹¤¬¡¢ +¤Û¤«¤Î¥³¥á¥ó¥È¤È°Û¤Ê¤ëÅÀ¤¬ 1 ¤Ä¤À¤±¤¢¤ê¤Þ¤¹¡£¤½¤ì¤Ï¡¢¤³¤Î +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Ë¤Ï /** ¤È */¡¢¤ª¤è¤Ó¹ÔƬ¤Î +¥¢¥¹¥¿¥ê¥¹¥¯¤Î¥³¥á¥ó¥È¶èÀÚ¤êʸ»ú¤ò´Þ¤á¤Æ¤Ï¤Ê¤é¤Ê¤¤¤³¤È¤Ç¤¹¡£ +¥³¥á¥ó¥È¤ò½ñ¤¯¾ì¹ç¤Ï¡¢ºÇ½é¤Îʸ¤ò¥Ñ¥Ã¥±¡¼¥¸¤ÎÍ×Ìó¤Ë¤·¡¢ +.B +¤ÈºÇ½é¤Îʸ¤Î´Ö¤Ë¥¿¥¤¥È¥ë¤Þ¤¿¤Ï¤½¤Î¾¤Î¥Æ¥­¥¹¥È¤ò´Þ¤á¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£ +¥Ñ¥Ã¥±¡¼¥¸¥¿¥°¤ò´Þ¤á¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤¹¤¬¡¢Â¾¤Î¥É¥­¥å¥á¥ó¥È +¥³¥á¥ó¥È¤ÈƱÍÍ¡¢ +{\f3@link\f1} °Ê³°¤Î¥¿¥°¤Ï¡¢ÀâÌÀ¤Î¤¢¤È¤ËÃÖ¤«¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +.B @see +¥¿¥°¤ò¥Ñ¥Ã¥±¡¼¥¸¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤ËÄɲ乤ë¾ì¹ç¤Ï¡¢´°Á´»ØÄꤵ¤ì¤¿ +̾Á°¤ò»ÈÍѤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¼Â¹Ô»þ¤Ë¤³¤Î¥Õ¥¡¥¤¥ë¤ò¼«Æ°Åª¤Ë¸¡º÷¤·¤Þ¤¹¡£¤³¤Î¥Õ¥¡¥¤¥ë¤ò +¸«¤Ä¤±¤ë¤È¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¼¡¤Î½èÍý¤ò¹Ô¤¤¤Þ¤¹¡£ +.LP +.TP 2 +\(bu +.B +¥¿¥°¤È +.B +¥¿¥°¤Î´Ö¤Ë¤¢¤ë¤¹¤Ù¤Æ¤ÎÆâÍƤò½èÍý¤Î¤¿¤á¤Ë¥³¥Ô¡¼¤¹¤ë +.TP 2 +\(bu +¸ºß¤¹¤ë¥Ñ¥Ã¥±¡¼¥¸¥¿¥°¤ò½èÍý¤¹¤ë +.TP 2 +\(bu +¥Ñ¥Ã¥±¡¼¥¸¤ÎÍ×Ìó¤Ê¤É¤Î Javadoc ¤¬À¸À®¤¹¤ë¥Ñ¥Ã¥±¡¼¥¸Í×Ìó¥Ú¡¼¥¸¤Î +ºÇ¸å¤Ë¡¢½èÍý¤µ¤ì¤¿¥Æ¥­¥¹¥È¤òÁÞÆþ¤¹¤ë +.TP 2 +\(bu +¥Ñ¥Ã¥±¡¼¥¸¤Î¥³¥á¥ó¥È¤Ë¤¢¤ëºÇ½é¤Îʸ¤ò¡¢¥Ñ¥Ã¥±¡¼¥¸¤ÎÍ×Ìó¥Ú¡¼¥¸¤ÎÀèƬ¤Ë +¥³¥Ô¡¼¤¹¤ë¡£¤Þ¤¿¡¢³µÍפÎÍ×Ìó¤Ê¤É¤Î³µÍ×¥Ú¡¼¥¸¤Î¥Ñ¥Ã¥±¡¼¥¸¥ê¥¹¥È¤Ë¤â¡¢ +¤³¤ÎºÇ½é¤Îʸ¤È¥Ñ¥Ã¥±¡¼¥¸Ì¾¤òÄɲ乤롣ʸ¤ÎËöÈø¤Ï¡¢¥¯¥é¥¹¤ä¥á¥ó¥Ð¤Î +µ­½Ò¤ÎºÇ½é¤Îʸ¤ËŬÍѤµ¤ì¤ë¤Î¤ÈƱ¤¸µ¬Â§¤Ë¤è¤Ã¤ÆÆÃÄꤵ¤ì¤ë +.SS "³µÍ×¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë" +¥É¥­¥å¥á¥ó¥È²½¤¹¤ë³Æ¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸¤Î¥»¥Ã¥È¤Ï¡¢ +Æȼ«¤Î³µÍץɥ­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò»ý¤Ä¤³¤È¤¬¤Ç¤­¡¢¤½¤ì¤Ï +¡Ö¥½¡¼¥¹¡×¥Õ¥¡¥¤¥ë¤ËÊÝ»ý¤µ¤ì¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢À¸À®¤¹¤ë³µÍ×¥Ú¡¼¥¸¤Ë¤³¤Î¥³¥á¥ó¥È¤ò¥Þ¡¼¥¸¤·¤Þ¤¹¡£Ä̾¤³¤Î +¥³¥á¥ó¥È¤Ë¤Ï¡¢¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸¤Î¥»¥Ã¥ÈÁ´ÂÎ¤Ë +Åö¤Æ¤Ï¤Þ¤ë¥É¥­¥å¥á¥ó¥È¤ò´Þ¤á¤Þ¤¹¡£ +.LP +³µÍ×¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¾ì¹ç¡¢¥Õ¥¡¥¤¥ë¤Ë¹¥¤­¤Ê̾Á°¤òÉÕ¤±¤Æ¡¢ +¹¥¤­¤Ê¾ì½ê¤ËÃÖ¤¯¤³¤È¤¬¤Ç¤­¤Þ¤¹¤¬¡¢Ä̾ï¤Ï¥Õ¥¡¥¤¥ë̾¤ò +.B overview.html +¤Ë¤·¤Æ¡¢¥½¡¼¥¹¥Ä¥ê¡¼¤Î°ìÈÖ¾å¤Î³¬ÁؤËÃÖ¤­¤Þ¤¹¡£°Û¤Ê¤ë¥Ñ¥Ã¥±¡¼¥¸¤Î +¥»¥Ã¥È¤ËÂФ·¤Æ +.BR javadoc +¤òÊ£¿ô²ó¼Â¹Ô¤·¤¿¤¤¾ì¹ç¤Ë¤Ï¡¢1 ¤Ä¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥»¥Ã¥È¤ËÂФ·¤Æ +Ê£¿ô¤Î³µÍ×¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤òºîÀ®¤Ç¤­¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢ +.B java.applet +¥Ñ¥Ã¥±¡¼¥¸¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬ +.B /home/user/src/java/applet +¥Ç¥£¥ì¥¯¥È¥ê¤Ë´Þ¤Þ¤ì¤Æ¤¤¤ë¤È¤¹¤ë¤È¡¢ +.BR /home/user/src/overview.html +¤Ë³µÍ×¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤òºîÀ®¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +³µÍ×¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤ÎÆâÍƤϡ¢Á°¤Ë½Ò¤Ù¤¿¥Ñ¥Ã¥±¡¼¥¸¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤È +ƱÍÍ¡¢HTML ¤Çµ­½Ò¤µ¤ì¤¿ 1 ¤Ä¤ÎÂ礭¤Ê¥É¥­¥å¥á¥ó¥È +¥³¥á¥ó¥È¤Ç¤¹¡£¾ÜºÙ¤Ï¡¢Á°½Ò¤ÎÀâÌÀ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£·«¤êÊÖ¤·¤Ë +¤Ê¤ê¤Þ¤¹¤¬¡¢¤³¤Î¥³¥á¥ó¥È¤ò½ñ¤¯¾ì¹ç¤Ï¡¢ºÇ½é¤Îʸ¤ò¥¢¥×¥ê¥±¡¼¥·¥ç¥ó +¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸¤Î¥»¥Ã¥È¤ÎÍ×Ìó¤Ë¤·¡¢ +.B +¤ÈºÇ½é¤Îʸ¤Î´Ö¤Ë¥¿¥¤¥È¥ë¤Þ¤¿¤Ï¤½¤Î¾¤Î¥Æ¥­¥¹¥È¤ò´Þ¤á¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£ +³µÍ×¥¿¥°¤ò´Þ¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤É¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Ë +¤Ä¤¤¤Æ¤â¡¢{\f3@link\f1} +°Ê³°¤Î¥¿¥°¤Ï¡¢ÀâÌÀ¤Î¤¢¤È¤ËÃÖ¤¯É¬Íפ¬¤¢¤ê¤Þ¤¹¡£ +.B @see +¥¿¥°¤òÄɲ乤ë¾ì¹ç¤Ï¡¢´°Á´»ØÄê¤Î̾Á°¤ò»ÈÍѤ¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.BR javadoc +¥Ä¡¼¥ë¤Î¼Â¹Ô»þ¤Ë¡¢ +.B \-overview +¥ª¥×¥·¥ç¥ó¤ò»È¤Ã¤Æ³µÍ×¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë̾¤ò»ØÄꤷ¤Þ¤¹¡£¥Õ¥¡¥¤¥ë¤Ï¡¢ +¥Ñ¥Ã¥±¡¼¥¸¥³¥á¥ó¥È¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¤è¤¦¤Ë½èÍý¤µ¤ì¤Þ¤¹¡£ +.TP 2 +\(bu +.B +¥¿¥°¤È +.B +¥¿¥°¤È¤Î´Ö¤Ë¤¢¤ë¤¹¤Ù¤Æ¤ÎÆâÍƤò½èÍý¤Î¤¿¤á¤Ë¥³¥Ô¡¼¤¹¤ë +.TP 2 +\(bu +¸ºß¤¹¤ë³µÍ×¥¿¥°¤ò½èÍý¤¹¤ë +.TP 2 +\(bu +³µÍפÎÍ×Ìó¤Ê¤É¤Î Javadoc ¤¬À¸À®¤¹¤ë³µÍ×¥Ú¡¼¥¸¤ÎºÇ¸å¤Ë¡¢ +½èÍý¤µ¤ì¤¿¥Æ¥­¥¹¥È¤òÁÞÆþ¤¹¤ë +.TP 2 +\(bu +³µÍ×¥Ú¡¼¥¸¤ÎÀèƬ¤Ë¡¢³µÍ×¥³¥á¥ó¥È¤ÎºÇ½é¤Îʸ¤ò¥³¥Ô¡¼¤¹¤ë +.SS "¤½¤Î¾¤Î½èÍý¤µ¤ì¤Ê¤¤¥Õ¥¡¥¤¥ë" +¥½¡¼¥¹¤Ë¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤ÇÀ¸À®Àè¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥³¥Ô¡¼¤¹¤ë¡¢¤½¤Î¾¤ÎǤ°Õ¤Î¥Õ¥¡¥¤¥ë¤ò +´Þ¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£°ìÈ̤ˡ¢¤³¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤Ë¤Ï¡¢ +¥µ¥ó¥×¥ë¤Î¥°¥é¥Õ¥£¥Ã¥¯¥Õ¥¡¥¤¥ë¡¢Java ¥½¡¼¥¹ +(\f3.java\f1) ¤ª¤è¤Ó¥¯¥é¥¹ (\f3.class\f1) ¥Õ¥¡¥¤¥ë¡¢ÆâÍƤ¬ +Ä̾ï¤Î Java ¥½¡¼¥¹ +¥Õ¥¡¥¤¥ë¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Î±Æ¶Á¤ò¼õ¤±¤Ê¤¤ +ÆÈΩ¤·¤¿ HTML ¥Õ¥¡¥¤¥ë¤Ê¤É¤¬¤¢¤ê¤Þ¤¹¡£ +.LP +½èÍý¤µ¤ì¤Ê¤¤¥Õ¥¡¥¤¥ë¤ò´Þ¤á¤ë¤Ë¤Ï¡¢¤½¤ì¤é¤Î¥Õ¥¡¥¤¥ë¤ò +.BR doc-files +¤È¤¤¤¦¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤­¤Þ¤¹¡£¤³¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢Ç¤°Õ¤Î¥Ñ¥Ã¥±¡¼¥¸ +¥Ç¥£¥ì¥¯¥È¥ê¤Î²¼¤ËºîÀ®¤Ç¤­¤Þ¤¹¡£¥Ñ¥Ã¥±¡¼¥¸¤´¤È¤Ë¤³¤Î¤è¤¦¤Ê¥µ¥Ö +¥Ç¥£¥ì¥¯¥È¥ê¤ò 1 ¤Ä»ý¤Ä¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤Ë¤Ï¡¢ +¥¤¥á¡¼¥¸¡¢¥µ¥ó¥×¥ë¥³¡¼¥É¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë¡¢ +.B .class +¥Õ¥¡¥¤¥ë¡¢¥¢¥×¥ì¥Ã¥È¡¢¤ª¤è¤Ó HTML ¥Õ¥¡¥¤¥ë¤òÆþ¤ì¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð¡¢¥Ü¥¿¥ó¤Î²èÁü +.B button.gif +¤ò +.B java.awt.Button +¥¯¥é¥¹¥É¥­¥å¥á¥ó¥È¤Ë´Þ¤á¤¿¤¤¾ì¹ç¤Ï¡¢¤½¤Î¥Õ¥¡¥¤¥ë¤ò +.B /home/user/src/java/awt/doc-files/ +¥Ç¥£¥ì¥¯¥È¥ê¤ËÃÖ¤­¤Þ¤¹¡£ +.BR doc-files +¥Ç¥£¥ì¥¯¥È¥ê¤ò +.B /home/user/src/java/doc-files +¤ËÃÖ¤¯¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£¤³¤ì¤Ï¡¢ +.B java +¤Ï¥Ñ¥Ã¥±¡¼¥¸¤Ç¤Ï¤Ê¤¯¡¢¤½¤Î¥Ç¥£¥ì¥¯¥È¥ê¤½¤Î¤â¤Î¤Ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤¬ +Æþ¤Ã¤Æ¤¤¤Ê¤¤¤«¤é¤Ç¤¹¡£ +.LP +¤³¤ì¤é¤Î½èÍý¤µ¤ì¤Ê¤¤¥Õ¥¡¥¤¥ë¤Ø¤Î¥ê¥ó¥¯¤Ï +¤¹¤Ù¤ÆÌÀ¼¨Åª¤Ëµ­½Ò¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤³¤ì¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤¬¥Õ¥¡¥¤¥ë¤ò¸«¤º¤Ë¡¢Ã±¤Ë¥Ç¥£¥ì¥¯¥È¥ê¤È¤½¤ÎÆâÍÆʪ¤òÀ¸À®Àè¤Ë +¥³¥Ô¡¼¤¹¤ë¤À¤±¤À¤«¤é¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢ +.B Button.java +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥ÈÆâ¤Î¥ê¥ó¥¯¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +.ft 3 +.nf +/** +* This button looks like this: +* +*/ +.fi +.ft 1 +.SH "¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë" +°ìÉô¤Î³«È¯¼Ô¤«¤é¡¢¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤ò +Âбþ¤¹¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¶á¤¯¤Î¥½¡¼¥¹¥Ä¥ê¡¼¤ËÊݸ¤·¤¿¤¤¤È¤¤¤¦Í×˾¤¬¤¢¤ê¤Þ¤·¤¿¡£ +¤Ä¤Þ¤ê¡¢¤³¤ì¤é¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¥Ç¥£¥ì¥¯¥È¥ê¤Þ¤¿¤Ï¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤Ë +Êݸ¤·¤¿¤¤¤È¤¤¤¦¤³¤È¤Ç¤¹¡£ +.LP +¸ÄÊ̤Υ½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤ÇÌÀ¼¨Åª¤ËÅϤ·¤Æ +.B Javadoc +¥Ä¡¼¥ë¤ò¼Â¹Ô¤¹¤ë¾ì¹ç¤Ï¡¢ +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤ò°Õ¿ÞŪ¤Ë½ü³°¤·¤Æ¡¢ +½èÍý¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤¿¤À¤·¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Þ¤¿¤Ï +¥ï¥¤¥ë¥É¥«¡¼¥É¤ÇÅϤ¹¾ì¹ç¤Ï¡¢°Ê²¼¤Î¥ë¡¼¥ë¤Ë½¾¤Ã¤Æ¡¢¤³¤ì¤é¤Î¥Æ¥¹¥È¥Õ¥¡¥¤¥ë +¤ª¤è¤Ó¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤¬ +½èÍý¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤È¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Î°ã¤¤¤Ï¡¢ +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤Ï¡¢ÀµÅö¤Ç¥³¥ó¥Ñ¥¤¥ë²Äǽ¤Ê¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ç¤¢¤ë¤Î¤ËÂФ·¤Æ¡¢ +¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ï¡¢¤½¤¦¤Ç¤Ï¤Ê¤¤¤È¤¤¤¦ÅÀ¤Ç¤¹¡£¤¿¤À¤·¡¢ +¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤â¡Ö.java¡×¤Ç½ª¤ï¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.TP +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë \- +³«È¯¼Ô¤Î¿¤¯¤Ï¡¢¤¢¤ë¥Ñ¥Ã¥±¡¼¥¸¤Î¥³¥ó¥Ñ¥¤¥ë²Äǽ¤Ç¼Â¹Ô²Äǽ¤Ê +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤ò¤½¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤ÈƱ¤¸ +¥Ç¥£¥ì¥¯¥È¥ê¤ËÇÛÃÖ¤·¤¿¤¤¤È¹Í¤¨¤Æ¤¤¤Þ¤¹¡£ +¤·¤«¤·¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤Ï¡¢Ì¾Á°¤Ê¤·¥Ñ¥Ã¥±¡¼¥¸¤Ê¤É¡¢ +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¥Ñ¥Ã¥±¡¼¥¸¤È¤ÏÊ̤Υѥ屡¼¥¸¤Ë°¤µ¤»¤¿¤¤¤È¤â +¹Í¤¨¤Æ¤¤¤Þ¤¹ (¤½¤Î¤¿¤á¡¢¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤Ë¤Ï package ¥¹¥Æ¡¼¥È¥á¥ó¥È¤¬¤Ê¤¤¤«¡¢ +¤Þ¤¿¤Ï¥½¡¼¥¹¤È¤ÏÊ̤Πpackage ¥¹¥Æ¡¼¥È¥á¥ó¥È¤¬¤¢¤ê¤Þ¤¹)¡£ +¤³¤Î¤è¤¦¤Ê¾õ¶·¤Ç¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤Ç»ØÄꤵ¤ì¤Æ¤¤¤ë¥½¡¼¥¹¤Î¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ò»ØÄꤷ¤Æ +¤½¤Î¥½¡¼¥¹¤¬¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤Æ¤¤¤ë¤È¤­¤Ë¡¢ +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤Ï·Ù¹ð¤Þ¤¿¤Ï¥¨¥é¡¼¤ò°ú¤­µ¯¤³¤·¤Þ¤¹¡£ +¤½¤Î¤è¤¦¤Ê¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤Ï¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤ËÇÛÃÖ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤ò +.B com.package1 +¤ËÄɲ乤ë¾ì¹ç¤Ï¡¢¤½¤ì¤é¤Î¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤ò¡¢¥Ï¥¤¥Õ¥ó¤¬´Þ¤Þ¤ì¤ë¤¿¤á +¥Ñ¥Ã¥±¡¼¥¸Ì¾¤È¤·¤Æ¤Ï̵¸ú¤Ë¤Ê¤ë +¥µ¥Ö¥Ç¥£¥ì¥¯¥È¥ê¤ËÇÛÃÖ¤·¤Þ¤¹¡£ +.LP +.RS 5 +com/package1/test-files/ +.RE +.LP +¤³¤¦¤¹¤ë¤È¡¢ +.B Javadoc +¥Ä¡¼¥ë¤Ç¤Ï·Ù¹ð¤Ê¤·¤Ç +test ¥Ç¥£¥ì¥¯¥È¥ê¤ò¥¹¥­¥Ã¥×¤·¤Þ¤¹¡£ +.LP +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤Ë doc ¥³¥á¥ó¥È¤¬´Þ¤Þ¤ì¤ë¾ì¹ç¡¢ +¼¡¤Î¤è¤¦¤Ë¥ï¥¤¥ë¥É¥«¡¼¥É¤ò´Þ¤ó¤À¥Æ¥¹¥È¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤ÇÅϤ·¤Æ +¥Æ¥¹¥È¥Õ¥¡¥¤¥ë¤Î¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤¹¤ë¤è¤¦¤Ë¡¢ +.B Javadoc +¥Ä¡¼¥ë¤òÊ̸Ĥ˼¹ԤǤ­¤ë¤è¤¦¤ËÀßÄê¤Ç¤­¤Þ¤¹¡£ +.B com/package/\test-files\*.java . +.TP +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î¥Æ¥ó¥×¥ì¡¼¥È\- +¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ï¡Ö.java¡×¤Ç½ª¤ï¤ë¤³¤È¤â¤¢¤ê¤Þ¤¹¤¬¡¢ +¥Æ¥ó¥×¥ì¡¼¥È¥Õ¥¡¥¤¥ë¤Ï¥³¥ó¥Ñ¥¤¥ë¤Ç¤­¤Þ¤»¤ó¡£ +¥½¡¼¥¹¥Ç¥£¥ì¥¯¥È¥ê¤ËÊÝ»ý¤·¤¿¤¤¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Î +¥Æ¥ó¥×¥ì¡¼¥È¤¬¤¢¤ë¾ì¹ç¤Ï¡¢ +¤³¤Î¥Õ¥¡¥¤¥ë̾¤Ë¥Ï¥¤¥Õ¥ó (Buffer-Template.java ¤Ê¤É) ¤ä +¤½¤Î¾¤ÎÉÔÀµ¤Ê Java ʸ»ú¤ò»ÈÍѤ·¤Þ¤¹¡£ +¤³¤¦¤¹¤ë¤³¤È¤Ç¡¢½èÍý¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ +¤³¤ì¤Ï¡¢ +.B Javadoc +¥Ä¡¼¥ë¤¬½èÍý¤¹¤ë¤Î¤Ï¡¢¡Ö.java¡×ÀÜÈø¼­¤ò½ü¤¤¤¿Ì¾Á°¤¬ +Àµµ¬¤Î¥¯¥é¥¹Ì¾¤Ç¤¢¤ë¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤À¤±¤Ç¤¢¤ë¤¿¤á¤Ç¤¹ (¡Ö¼±Ê̻ҡ׻²¾È)¡£ +.SS "À¸À®¤µ¤ì¤ë¥Õ¥¡¥¤¥ë" +¥Ç¥Õ¥©¥ë¥È¤Ç¤Ï¡¢ +.B javadoc +¤Ï¡¢HTML ·Á¼°¤Î¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤¹¤ëɸ½à¥É¥Ã¥¯¥ì¥Ã¥È¤ò +»È¤¤¤Þ¤¹¡£ +¤³¤Î¥É¥Ã¥¯¥ì¥Ã¥È¤Ï¡¢°Ê²¼¤Î¼ïÎà¤Î¥Õ¥¡¥¤¥ë¤òÀ¸À®¤·¤Þ¤¹¡£°Ê²¼¤Î +³Æ HTML¡Ö¥Ú¡¼¥¸¡×¤Ï¡¢¤½¤ì¤¾¤ìÊ̤Υե¡¥¤¥ë¤ËÂбþ¤·¤Þ¤¹¡£ +.B javadoc +¤¬À¸À®¤¹¤ë¥Õ¥¡¥¤¥ë¤Î̾Á°¤Ë¤Ï¡¢¥¯¥é¥¹¤ä¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î̾Á°¤Ë +¤Á¤Ê¤ó¤À¤â¤Î¤È¡¢¤½¤¦¤Ç¤Ê¤¤¤â¤Î (\f3package-summary.html\f1 ¤Ê¤É) +¤Î 2 ¼ïÎब¤¢¤ê¤Þ¤¹¡£¸å¼Ô¤Î¥°¥ë¡¼¥×¤Ë¤Ï¡¢Á°¼Ô¤Î¥°¥ë¡¼¥×¤Î̾Á°¤È +¥Õ¥¡¥¤¥ë̾¤¬¶¥¹ç¤·¤Ê¤¤¤è¤¦¤Ë¡¢¥Ï¥¤¥Õ¥ó¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +.SS "´ðËÜÆâÍÆ¥Ú¡¼¥¸" +.TP 2 +\(bu +¥É¥­¥å¥á¥ó¥È²½¤¹¤ë³Æ¥¯¥é¥¹¤Þ¤¿¤Ï³Æ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ËÂФ·¡¢1 ¤Ä¤Î¥¯¥é¥¹ +¥Ú¡¼¥¸¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥Ú¡¼¥¸ (\f3classname.html\f1) +.TP 2 +\(bu +¥É¥­¥å¥á¥ó¥È²½¤¹¤ë³Æ¥Ñ¥Ã¥±¡¼¥¸¤ËÂФ·¡¢1 ¤Ä¤Î¥Ñ¥Ã¥±¡¼¥¸ +¥Ú¡¼¥¸ (\f3package-summary.html\f1)¡£ +.B javadoc +¥Ä¡¼¥ë¤Ë¤è¤Ã¤Æ¡¢¥½¡¼¥¹¥Ä¥ê¡¼¤Î¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥êÆâ¤Î +.B package.html +¤È¤¤¤¦¥Õ¥¡¥¤¥ëÆâ¤Î¤¹¤Ù¤Æ¤Î HTML ¥Æ¥­¥¹¥È¤¬´Þ¤á¤é¤ì¤ë +.TP 2 +\(bu +¥Ñ¥Ã¥±¡¼¥¸¤Î¥»¥Ã¥ÈÁ´ÂΤËÂФ·¤Æ 1 ¤Ä¤Î³µÍ× +¥Ú¡¼¥¸ (\f3overview-summary.html\f1)¡£¤³¤ì¤Ï¡¢À¸À®¤µ¤ì¤ë +¥É¥­¥å¥á¥ó¥È¤ÎÀèƬ¥Ú¡¼¥¸¤Ë¤Ê¤ë¡£ +.B javadoc +¥Ä¡¼¥ë¤Ë¤è¤Ã¤Æ¡¢ +.B -overview +¥ª¥×¥·¥ç¥ó¤Ç»ØÄꤵ¤ì¤¿¥Õ¥¡¥¤¥ëÆâ¤Î¤¹¤Ù¤Æ¤Î HTML ¥Æ¥­¥¹¥È¤¬´Þ¤á¤é¤ì¤ë¡£ +¤³¤Î¥Õ¥¡¥¤¥ë¤¬ºîÀ®¤µ¤ì¤ë¤Î¤Ï¡¢ +.B javadoc +¤Ë 2 ¤Ä°Ê¾å¤Î¥Ñ¥Ã¥±¡¼¥¸Ì¾¤òÅϤ·¤¿ +¾ì¹ç¤À¤±¤Ç¤¢¤ë¤³¤È¤ËÃí°Õ¤¹¤ë¡£¾ÜºÙ¤Ï¡¢°Ê²¼¤Î¡ÖHTML ¥Õ¥ì¡¼¥à¡×Àá¤ò»²¾È +.SS "Áê¸ß»²¾È¥Ú¡¼¥¸" +.TP 2 +\(bu +¥Ñ¥Ã¥±¡¼¥¸¤Î¥»¥Ã¥ÈÁ´ÂΤËÂФ·¤Æ 1 ¤Ä¤Î¥¯¥é¥¹³¬ÁØ¥Ú¡¼¥¸ +(\f3overview-tree.html\f1)¡£¤³¤ì¤òɽ¼¨¤¹¤ë¤Ë¤Ï¡¢¥Ê¥Ó¥²¡¼¥·¥ç¥ó +¥Ð¡¼¤Î [³µÍ×] ¤ò¥¯¥ê¥Ã¥¯¤·¤Æ¤«¤é¡¢[³¬Áإĥ꡼] ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë +.TP 2 +\(bu +³Æ¥Ñ¥Ã¥±¡¼¥¸¤ËÂФ·¤Æ 1 ¤Ä¤Î¥¯¥é¥¹³¬ÁØ +¥Ú¡¼¥¸ (\f3package-tree.html\f1)¡£ +ÆÃÄê¤Î¥Ñ¥Ã¥±¡¼¥¸¥Ú¡¼¥¸¡¢¥¯¥é¥¹¥Ú¡¼¥¸¡¢¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥Ú¡¼¥¸¤ò +ɽ¼¨¤·¡¢[³¬Áإĥ꡼] ¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤È¡¢¤½¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î³¬Áؤ¬ +ɽ¼¨¤µ¤ì¤ë +.TP 2 +\(bu +³Æ¥Ñ¥Ã¥±¡¼¥¸¤ËÂФ·¤Æ 1 ¤Ä¤Î [»ÈÍÑ] +¥Ú¡¼¥¸ (\f3package-use.html\f1)¤È¡¢ +³Æ¥¯¥é¥¹¤ª¤è¤Ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ËÂФ·¤ÆÊÌ¤Ë 1 ¤Ä¤Î [»ÈÍÑ] +¥Ú¡¼¥¸(\f3class-use/classname.html\f1)¡£¤³¤Î¥Ú¡¼¥¸¤Ï¡¢ÆÃÄê¤Î¥¯¥é¥¹¡¢ +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸¤Î¤Ê¤ó¤é¤«¤ÎÉôʬ¤ò»È¤Ã¤Æ¤¤¤ë +¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢¥á¥½¥Ã¥É¡¢¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¤ª¤è¤Ó¥Õ¥£¡¼¥ë¥É¤ò +µ­½Ò¤¹¤ë¡£¥¯¥é¥¹¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹ A ¤Ë¤Ä¤¤¤Æ¹Í¤¨¤ë¤È¡¢ +¤½¤Î[»ÈÍÑ] ¥Ú¡¼¥¸¤Ë¤Ï¡¢A ¤Î¥µ¥Ö¥¯¥é¥¹¡¢A ¤È¤·¤ÆÀë¸À¤µ¤ì¤¿ +¥Õ¥£¡¼¥ë¥É¡¢A ¤òÊÖ¤¹¥á¥½¥Ã¥É¡¢A ·¿¤Î¥Ñ¥é¥á¡¼¥¿¤ò»ý¤Ä¥á¥½¥Ã¥É +¤ª¤è¤Ó¥³¥ó¥¹¥È¥é¥¯¥¿¤¬É½¼¨¤µ¤ì¤ë¡£¤³¤Î¥Ú¡¼¥¸¤Ë¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸¡¢ +¥¯¥é¥¹¡¢¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ë°ÜÆ°¤·¤Æ¤«¤é¡¢¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼ +¤Î [»ÈÍÑ] ¥ê¥ó¥¯¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤³¤È¤Ë¤è¤Ã¤Æ¥¢¥¯¥»¥¹¤Ç¤­¤ë +.TP 2 +\(bu +Èó¿ä¾© API ¥Ú¡¼¥¸ (\f3deprecated-list.html\f1)¡£¿ä¾©¤µ¤ì¤Ê¤¤ +̾Á°¤¹¤Ù¤Æ¤Î°ìÍ÷¤¬´Þ¤Þ¤ì¤Æ¤¤¤ë (Èó¿ä¾©Ì¾¤Ï¡¢Ä̾ï¤Ï²þÎɤµ¤ì¤¿ API ¤¬ +¸ºß¤¹¤ë¤¿¤á¤Ë»ÈÍѤ¬¿ä¾©¤µ¤ì¤Æ¤¤¤Ê¤¤ API ¤Î̾Á°¤Ç¡¢¤¿¤¤¤Æ¤¤¤Ï¤½¤ì¤Ë +ÃÖ¤­´¹¤ï¤ë̾Á°¤¬Ä󼨤µ¤ì¤Æ¤¤¤ë¡£Èó¿ä¾© API ¤Ï¡¢¾­Íè¤Î¼ÂÁõ¤Ç¤Ï +ºï½ü¤µ¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë) +.TP 2 +\(bu +Äê¿ô¥Õ¥£¡¼¥ë¥ÉÃÍ¥Ú¡¼¥¸ (\f3constant-values.html\f1) ¡£ +static ¥Õ¥£¡¼¥ë¥É¤ÎÃͤ¬É½¼¨¤µ¤ì¤ë¡£ +.TP 2 +\(bu +ľÎó²½·Á¼°¥Ú¡¼¥¸ (\f3serialized-form.html\f1)¡£Ä¾Îó²½²Äǽ¥¯¥é¥¹ +¤ª¤è¤Ó³°Éô²½²Äǽ¥¯¥é¥¹¤Î¾ðÊóÍÑ¡£¤³¤ì¤é¤Î³Æ¥¯¥é¥¹¤Ë¤Ï¡¢Ä¾Îó²½ +¥Õ¥£¡¼¥ë¥É¤ª¤è¤Ó¥á¥½¥Ã¥É¤Ë´Ø¤¹¤ëÀâÌÀ¤¬¤¢¤ë¡£¤³¤ì¤é¤Î¾ðÊó¤Ï¡¢API ¤ò +»È¤¦³«È¯¼Ô¤Ç¤Ï¤Ê¤¯¡¢ºÆ¼ÂÁõ¼Ô¤ËɬÍפʾðÊó¤Ç¤¢¤ë¡£¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤Ë +¥ê¥ó¥¯¤¬¤Ê¤¤¾ì¹ç¡¢Ç¤°Õ¤ÎľÎ󲽤µ¤ì¤¿¥¯¥é¥¹¤Ë°ÜÆ°¤·¤Æ¡¢ +¥¯¥é¥¹¤Î [´ØÏ¢¹àÌÜ] ¥»¥¯¥·¥ç¥óÆâ¤Î [ľÎ󲽤µ¤ì¤¿·Á¼°] ¤ò¥¯¥ê¥Ã¥¯ +¤¹¤ë¤È¤³¤Î¾ðÊó¤ò¼èÆÀ¤Ç¤­¤ë +ɸ½à¥É¥Ã¥¯¥ì¥Ã¥È¤Ï¡¢Ä¾Î󲽤µ¤ì¤¿·Á¼°¤Î¥Ú¡¼¥¸¤ò¼«Æ°Åª¤ËÀ¸À®¤¹¤ë¡£ +¤³¤³¤Ë¤Ï¡¢Serializable ¤ò¼ÂÁõ¤¹¤ë public ¤Þ¤¿¤ÏÈó public ¤Î +¥¯¥é¥¹¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤ª¤ê¡¢¤µ¤é¤Ë¡¢ +.B readObject +¥á¥½¥Ã¥É¡¢ +.B writeObject +¥á¥½¥Ã¥É¡¢Ä¾Î󲽤µ¤ì¤¿¥Õ¥£¡¼¥ë¥É¡¢ +¤ª¤è¤Ó @serial ¥¿¥°¡¢@serialField ¥¿¥°¡¢@serialData ¥¿¥°¤«¤é¤Î +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤¬ÁȤ߹þ¤Þ¤ì¤Æ¤¤¤ë¡£ +ľÎ󲽤¬²Äǽ¤Ê public ¥¯¥é¥¹¤ò½ü³°¤¹¤ë¤Ë¤Ï¡¢ +¤½¤Î¥¯¥é¥¹¤Þ¤¿¤Ï¤½¤Î¥¯¥é¥¹¤¬Â°¤¹¤ë¥Ñ¥Ã¥±¡¼¥¸¤ò @serial exclude ¥¿¥°¤Ç +»ØÄꤹ¤ë¡£Ä¾Î󲽤¬²Äǽ¤Ê package private ¥¯¥é¥¹¤ò´Þ¤á¤ë¤Ë¤Ï¡¢ +¤½¤Î¥¯¥é¥¹¤Þ¤¿¤Ï¤½¤Î¥¯¥é¥¹¤¬Â°¤¹¤ë¥Ñ¥Ã¥±¡¼¥¸¤ò @serial include ¥¿¥°¤Ç +»ØÄꤹ¤ë¡£ 1.4 ¤Ç¤Ï¡¢ +\-private +¥ª¥×¥·¥ç¥ó¤ò»ØÄꤻ¤º¤Ë javadoc ¤ò¼Â¹Ô¤¹¤ë¤³¤È¤Ç¡¢public ¥¯¥é¥¹¤ª¤è¤Ó +private ¥¯¥é¥¹¤Ë´°Á´¤ÊľÎó²½·Á¼°¤òÀ¸À®¤¹¤ë¤³¤È¤¬¤Ç¤­¤ë¡£ +.TP 2 +\(bu +º÷°ú (\f3index-*.html\f1)¡£¤¹¤Ù¤Æ¤Î¥¯¥é¥¹Ì¾¡¢ +¥¤¥ó¥¿¥Õ¥§¡¼¥¹Ì¾¡¢¥³¥ó¥¹¥È¥é¥¯¥¿Ì¾¡¢¥Õ¥£¡¼¥ë¥É̾¡¢¤ª¤è¤Ó¥á¥½¥Ã¥É̾¤ò +¥¢¥ë¥Õ¥¡¥Ù¥Ã¥È½ç¤Ëʤ٤Ƥ¢¤ë¡£º÷°ú¤Ï¡¢Unicode ¤ò°·¤¨¤ë¤è¤¦¤Ë +¹ñºÝ²½¤µ¤ì¤Æ¤ª¤ê¡¢1 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤È¤·¤ÆÀ¸À®¤¹¤ë¤«¡¢¤Þ¤¿¤ÏÀèƬ +ʸ»ú (±Ñ¸ì¤Î¾ì¹ç A ¤«¤é Z) ¤´¤È¤ËÊ̤Υե¡¥¤¥ë¤È¤·¤ÆÀ¸À®¤Ç¤­¤ë +.SS "¥µ¥Ý¡¼¥È¥Õ¥¡¥¤¥ë" +.TP 2 +\(bu +¥Ø¥ë¥×¥Ú¡¼¥¸ (\f3help-doc.html\f1)¡£¥Ê¥Ó¥²¡¼¥·¥ç¥ó¥Ð¡¼¤ª¤è¤Ó +¾åµ­¤Î¥Ú¡¼¥¸¤Ë¤Ä¤¤¤ÆÀâÌÀ¤¹¤ë¡£ +.BR \-helpfile +¤ò»È¤Ã¤Æ¡¢¥Ç¥Õ¥©¥ë¥È¤Î +¥Ø¥ë¥×¥Õ¥¡¥¤¥ë¤ËÃÖ¤­´¹¤ï¤ëÆȼ«¤Î¥«¥¹¥¿¥à¥Ø¥ë¥×¥Õ¥¡¥¤¥ë¤òÄ󶡤¹¤ë +¤³¤È¤â¤Ç¤­¤ë +.TP 2 +\(bu +1 ¤Ä¤Î +.B index.html +¥Õ¥¡¥¤¥ë¡£É½¼¨ÍÑ ¤Î HTML ¥Õ¥ì¡¼¥à¤òºîÀ®¤¹¤ë¡£¤³¤Î¥Õ¥¡¥¤¥ë¤Ï¡¢ +¥Õ¥ì¡¼¥àÉÕ¤­¤ÎºÇ½é¤Î¥Ú¡¼¥¸¤òɽ¼¨¤¹¤ë¾ì¹ç¤Ë¥í¡¼¥É¤¹¤ë¡£¤³¤Î¥Õ¥¡¥¤¥ë +¼«ÂΤϡ¢¥Æ¥­¥¹¥ÈÆâÍƤò´Þ¤Þ¤Ê¤¤ +.TP 2 +\(bu +Ê£¿ô¤Î¥Õ¥ì¡¼¥à¥Õ¥¡¥¤¥ë (\f3*-frame.html\f1)¡£¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢ +¤ª¤è¤Ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î°ìÍ÷¤ò´Þ¤à¡£HTML ¥Õ¥ì¡¼¥à¤òɽ¼¨¤¹¤ë¤È¤­¤Ë +»È¤ï¤ì¤ë +.TP 2 +\(bu +¥Ñ¥Ã¥±¡¼¥¸¥ê¥¹¥È¥Õ¥¡¥¤¥ë (\f3package-list\f1)¡£ +.B \-link +¥ª¥×¥·¥ç¥ó¤ª¤è¤Ó +.B \-linkoffline +¥ª¥×¥·¥ç¥ó¤Ç»È¤ï¤ì¤ë¡£¤³¤ì¤Ï¡¢HTML ¥Õ¥¡¥¤¥ë¤Ç¤Ï¤Ê¤¯¥Æ¥­¥¹¥È¥Õ¥¡¥¤¥ë +¤Î¤¿¤á¡¢¥ê¥ó¥¯¤Ç¤Ï¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤ +.TP 2 +\(bu +¥¹¥¿¥¤¥ë¥·¡¼¥È¥Õ¥¡¥¤¥ë (\f3stylesheet.css\f1)¡£À¸À®¤µ¤ì¤ë¥Ú¡¼¥¸¾å¤Ë +ɽ¼¨¤µ¤ì¤ë¸Â¤é¤ì¤¿¿§¿ô¡¢¥Õ¥©¥ó¥È¥Õ¥¡¥ß¥ê¡¢¥Õ¥©¥ó¥È¥µ¥¤¥º¡¢¥Õ¥©¥ó¥È¤Î +¥¹¥¿¥¤¥ë¤ª¤è¤ÓÇÛÃÖ¤òÀ©¸æ¤¹¤ë +.TP 2 +\(bu +¥³¥Ô¡¼Àè¥Ç¥£¥ì¥¯¥È¥ê¤Ë¥³¥Ô¡¼¤·¤¿¤¤¥Õ¥¡¥¤¥ë (¥¤¥á¡¼¥¸¡¢¥µ¥ó¥×¥ë¡¢ +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ê¤É) ¤¬Æþ¤Ã¤Æ¤¤¤ë doc ¥Õ¥¡¥¤¥ë¤Î¥Ç¥£¥ì¥¯¥È¥ê¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¤³¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ë¤ò½èÍý¤·¤Ê¤¤¡£¤Ä¤Þ¤ê¡¢¤³¤Î¤è¤¦¤Ê¥Õ¥¡¥¤¥ëÆâ¤Î +.B javadoc +¥¿¥°¤Ï¤¹¤Ù¤Æ̵»ë¤µ¤ì¤ë¡£¥½¡¼¥¹¥Ä¥ê¡¼¤Ë¸ºß¤·¤Ê¤¤¸Â¤ê¡¢¤³¤Î +¥Ç¥£¥ì¥¯¥È¥ê¤ÏÀ¸À®¤µ¤ì¤Ê¤¤ +.SS "HTML ¥Õ¥ì¡¼¥à" +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢²¼¤Î¿Þ¤Ë¼¨¤¹¤è¤¦¤Ë¡¢2 ¤Ä¤« 3 ¤Ä¤Î HTML ¥Õ¥ì¡¼¥à¤òÀ¸À®¤·¤Þ¤¹¡£ +¥½¡¼¥¹¥Õ¥¡¥¤¥ë (*\f3.java\f1) ¤Þ¤¿¤Ïñ°ì¤Î¥Ñ¥Ã¥±¡¼¥¸Ì¾¤ò°ú¿ô¤È¤·¤Æ +.B javadoc +¥³¥Þ¥ó¥É¤ËÅϤ¹¾ì¹ç¤Ï¡¢º¸Â¦¤ÎÎó¤Ë¥¯¥é¥¹¤Î°ìÍ÷¤òɽ¼¨¤¹¤ë +¥Õ¥ì¡¼¥à (C) 1 ¤Ä¤À¤±¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£ +.B javadoc +¤ËÊ£¿ô¤Î¥Ñ¥Ã¥±¡¼¥¸Ì¾¤òÅϤ¹¾ì¹ç¤Ï¡¢³µÍ×¥Ú¡¼¥¸ (Detail) ¤Ë²Ã¤¨¤Æ¡¢ +¤¹¤Ù¤Æ¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î°ìÍ÷¤òɽ¼¨¤¹¤ëÂè 3 ¤Î¥Õ¥ì¡¼¥à (P) ¤¬ +ºîÀ®¤µ¤ì¤Þ¤¹¡£¤³¤Î³µÍ×¥Ú¡¼¥¸¤Î¥Õ¥¡¥¤¥ë̾¤Ï +.BR overview-summary.html +¤Ç¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢¤³¤Î¥Õ¥¡¥¤¥ë¤¬ºîÀ®¤µ¤ì¤ë¤Î¤Ï¡¢2 ¤Ä°Ê¾å¤Î¥Ñ¥Ã¥±¡¼¥¸ +̾¤òÅϤ·¤¿¾ì¹ç¤À¤±¤Ç¤¹¡£[¥Õ¥ì¡¼¥à¤Ê¤·] ¥ê¥ó¥¯¤ò¥¯¥ê¥Ã¥¯¤¹¤ë¤«¡¢ +.BR overview-summary.html +¤«¤éɽ¼¨¤¹¤ë¤è¤¦¤Ë¤¹¤ë¤È¡¢¥Õ¥ì¡¼¥à¤ò¾Êά¤Ç¤­¤Þ¤¹¡£ +.LP +HTML ¥Õ¥ì¡¼¥à¤Ë´·¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¡¢¥Õ¥ì¡¼¥à¤Ë¤Ï¡¢°õºþ¤ª¤è¤Ó +¥¹¥¯¥í¡¼¥ëÍѤΡ֥ե©¡¼¥«¥¹¡×¤¬É¬ÍפǤ¢¤ë¤³¤È¤ËÃí°Õ¤¹¤ë +ɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥Õ¥ì¡¼¥à¤Ë¥Õ¥©¡¼¥«¥¹¤òÍ¿¤¨¤ë¤Ë¤Ï¡¢¤½¤Î¥Õ¥ì¡¼¥à¤ò +¥¯¥ê¥Ã¥¯¤·¤Þ¤¹¡£¤¹¤ë¤È¡¢Â¿¤¯¤Î¥Ö¥é¥¦¥¶¤Ç¤Ï¡¢Ìð°õ¥­¡¼¤ª¤è¤Ó¥Ú¡¼¥¸¥­¡¼ +¤ò»È¤Ã¤Æ¤½¤Î¥Õ¥ì¡¼¥à¤ò¥¹¥¯¥í¡¼¥ë¤·¤¿¤ê¡¢[°õºþ] ¥á¥Ë¥å¡¼ +¥³¥Þ¥ó¥É¤ò»È¤Ã¤Æ¤½¤Î¥Õ¥ì¡¼¥à¤ò°õºþ¤·¤¿¤ê¤Ç¤­¤ë¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +.ft 3 +.nf + ------------ ------------ + |C| Detail | |P| Detail | + | | | | | | + | | | |-| | + | | | |C| | + | | | | | | + | | | | | | + ------------ ------------ + javadoc *.java javadoc java.lang java.awt +.fi +.ft 1 +.LP +HTML ¥Õ¥ì¡¼¥à¤¬É¬Íפ«¤É¤¦¤«¤Ë¤è¤Ã¤Æ¡¢¼¡¤Î¤É¤Á¤é¤«¤Î¥Õ¥¡¥¤¥ë¤ò +³«»Ï¥Ú¡¼¥¸¤È¤·¤Æ¥í¡¼¥É¤·¤Þ¤¹¡£ +.LP +.TP 2 +\(bu +.B index.html +(¥Õ¥ì¡¼¥à¤¢¤ê) +.TP 2 +\(bu +.B overview-summary.html +(¥Õ¥ì¡¼¥à¤Ê¤·) +.SS "À¸À®¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¹½Â¤" +À¸À®¤µ¤ì¤ë¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥Õ¥¡¥¤¥ë¤Ï¡¢Java ¥½¡¼¥¹ +¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥¯¥é¥¹¥Õ¥¡¥¤¥ë¤ÈƱ¤¸¥Ç¥£¥ì¥¯¥È¥ê³¬ÁؤÇÁÈ¿¥ +¤µ¤ì¤Þ¤¹¡£¤³¤Î¹½Â¤¤Ï¡¢1 ¤Ä¤Î¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¤Ë¤Ä¤­ 1 ¤Ä¤Î¥Ç¥£¥ì¥¯¥È¥ê +¤Ç¹½À®¤µ¤ì¤Þ¤¹¡£ +.LP +¤¿¤È¤¨¤Ð¡¢ +.B java.applet.Applet +¥¯¥é¥¹¤ËÂФ·¤ÆÀ¸À®¤µ¤ì¤ë¥É¥­¥å¥á¥ó¥È¤Ï¡¢ +.BR java/applet/Applet.html +¤Ë³ÊǼ¤µ¤ì¤Þ¤¹¡£À¸À®Àè¤Î¥Ç¥£¥ì¥¯¥È¥ê¤Î̾Á°¤¬ apidocs ¤À¤È +¤¹¤ë¤È¡¢java.applet ¥Ñ¥Ã¥±¡¼¥¸¤Î¥Õ¥¡¥¤¥ë¹½Â¤¤â¤³¤ì¤Ë½¾¤¤¤Þ¤¹¡£ +Á°½Ò¤·¤¿¤è¤¦¤Ë¡¢¡Öframe¡×¤È¤¤¤¦¸ì¤ò̾Á°¤Ë´Þ¤à¥Õ¥¡¥¤¥ë¤Ï¡¢ +¤¹¤Ù¤Æº¸¾å¤Þ¤¿¤Ïº¸²¼¤Î¥Õ¥ì¡¼¥à¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¤½¤ì +°Ê³°¤Î HTML ¥Õ¥¡¥¤¥ë¤Ï¡¢¤¹¤Ù¤Æ±¦Â¦¤Î¥Õ¥ì¡¼¥à¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +Ãí: ¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢ÂÀ»ú (bold) ¤Ç¼¨¤·¤Æ¤¢¤ê¤Þ¤¹¡£ +¥¢¥¹¥¿¥ê¥¹¥¯ (*) ¤Ï¡¢ +.B javadoc +¤Ø¤Î°ú¿ô¤¬¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Ç¤Ê¤¯¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾ (*\f3.java\f1) ¤Î +¤È¤­¤Ë¡¢¾Êά¤µ¤ì¤ë¥Õ¥¡¥¤¥ë¤ª¤è¤Ó¥Ç¥£¥ì¥¯¥È¥ê¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£¤Þ¤¿¡¢ +°ú¿ô¤¬¥½¡¼¥¹¥Õ¥¡¥¤¥ë̾¤Î¤È¤­¤Ë¤Ï¡¢ +.B package-list +¤ÏºîÀ®¤µ¤ì¤Þ¤¹¤¬¡¢¶õ¤Ç¤¹¡£ +.B doc-files +¥Ç¥£¥ì¥¯¥È¥ê¤Ï¡¢¥½¡¼¥¹¥Ä¥ê¡¼Æâ¤Ë¸ºß¤·¤Ê¤¤¸Â¤ê¡¢À¸À®Àè¤Ëɽ¼¨¤µ¤ì¤Þ¤»¤ó¡£ +.LP +.sp 1n +.TS +lb lb. +apidocs ºÇ¾å°Ì¥Ç¥£¥ì¥¯¥È¥ê + index.html HTML ¥Õ¥ì¡¼¥à¤òÀßÄꤹ¤ë½é´ü¥Ú¡¼¥¸ +* overview-summary.html ºÇ½é¤Îʸ¤¬Í×Ìó¤Ë¤Ê¤Ã¤Æ¤¤¤ë¡¢Á´¥Ñ¥Ã¥±¡¼¥¸¤Î¥ê¥¹¥È + overview-tree.html Á´¥Ñ¥Ã¥±¡¼¥¸¤Î¥¯¥é¥¹³¬ÁؤΥꥹ¥È + deprecated-list.html Á´¥Ñ¥Ã¥±¡¼¥¸¤Î¿ä¾©¤µ¤ì¤Ê¤¤ API ¤Î¥ê¥¹¥È +¡¡constant-values.html Á´¥Ñ¥Ã¥±¡¼¥¸¤Î static ¥Õ¥£¡¼¥ë¥ÉÃͤΥꥹ¥È + serialized-form.html Á´¥Ñ¥Ã¥±¡¼¥¸¤ÎľÎó²½·Á¼°¤Î¥ê¥¹¥È +* overview-frame.html Á´¥Ñ¥Ã¥±¡¼¥¸¤Î¥ê¥¹¥È¡£º¸¾å¥Õ¥ì¡¼¥à¤Ëɽ¼¨ + allclasses-frame.html Á´¥Ñ¥Ã¥±¡¼¥¸¤ÎÁ´¥¯¥é¥¹¤Î¥ê¥¹¥È¡£º¸²¼¥Õ¥ì¡¼¥à¤Ëɽ¼¨ + help-doc.html ¤³¤ì¤é¤Î¥Ú¡¼¥¸¤Î¹½À®¤ò¼¨¤¹¥æ¡¼¥¶¥Ø¥ë¥× + index-all.html -splitindex ¤Ê¤·¤ÇºîÀ®¤µ¤ì¤¿¥Ç¥Õ¥©¥ë¥Èº÷°ú + index-files -splitindex ¤ÇºîÀ®¤µ¤ì¤¿¥Ç¥£¥ì¥¯¥È¥ê + index-.html -splitindex ¤ÇºîÀ®¤µ¤ì¤¿º÷°ú¥Õ¥¡¥¤¥ë + package-list ³°Éô»²¾È¤Î²ò¼á½èÍý¡¢¥Ñ¥Ã¥±¡¼¥¸Ì¾¤Î¥ê¥¹¥È + stylesheet.css (¥Õ¥©¥ó¥È¡¢¿§¤Ê¤É) HTML ¥¹¥¿¥¤¥ë¥·¡¼¥È + java ¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥ê + applet ¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥ê + Applet.html Applet ¥¯¥é¥¹¤Î¥Ú¡¼¥¸ + AppletContext.html AppletContext ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥Ú¡¼¥¸ + AppletStub.html AppletStub ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥Ú¡¼¥¸ + AudioClip.html AudioClip ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥Ú¡¼¥¸ + * package-summary.html ºÇ½é¤Îʸ¤¬Í×Ìó¤Ç¤¢¤ë¡¢¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¥¯¥é¥¹ + * package-frame.html ¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¥¯¥é¥¹¤Î¥ê¥¹¥È¡£º¸²¼¤Î¥Õ¥ì¡¼¥à¤Ëɽ¼¨ + * package-tree.html ¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¥¯¥é¥¹³¬ÁؤΥꥹ¥È + package-use ¤³¤Î¥Ñ¥Ã¥±¡¼¥¸¤¬»È¤ï¤ì¤ë¾ì½ê¤Î¥ê¥¹¥È + doc-files ¥¤¥á¡¼¥¸¤È¥µ¥ó¥×¥ë¥Õ¥¡¥¤¥ë¤¬¤¢¤ë¥Ç¥£¥ì¥¯¥È¥ê + class-use API ¤ò»ÈÍѤ¹¤ë¥Ú¡¼¥¸¤¬¤¢¤ë¥Ç¥£¥ì¥¯¥È¥ê + Applet.html Applet ¥¯¥é¥¹¤ò»ÈÍѤ¹¤ë¥Ú¡¼¥¸ + AppletContext.html AppletContext ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»ÈÍѤ¹¤ë¥Ú¡¼¥¸ + AppletStub.html AppletStub ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»ÈÍѤ¹¤ë¥Ú¡¼¥¸ + AudioClip.html AudioClip ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»ÈÍѤ¹¤ë¥Ú¡¼¥¸ + AudioClip.html AudioClip ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò»ÈÍѤ¹¤ë¥Ú¡¼¥¸ + src-html ¥½¡¼¥¹¥³¡¼¥É¥Ç¥£¥ì¥¯¥È¥ê + java ¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥ê + applet ¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¥Ç¥£¥ì¥¯¥È¥ê + Applet.html ¥¢¥×¥ì¥Ã¥È¥½¡¼¥¹¥³¡¼¥É¤Î¥Ú¡¼¥¸ + AppletContext.html AppletContext ¥½¡¼¥¹¥³¡¼¥É¤Î¥Ú¡¼¥¸ + AppletStub.html AppletStub ¥½¡¼¥¹¥³¡¼¥É¤Î¥Ú¡¼¥¸ + AudioClip.html AudioClip ¥½¡¼¥¹¥³¡¼¥É¤Î¥Ú¡¼¥¸ +.TE +.SS "À¸À®¤µ¤ì¤ë API Àë¸À" +javadoc ¥Ä¡¼¥ë¤Ï¡¢³Æ¥¯¥é¥¹¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¥Õ¥£¡¼¥ë¥É¡¢¥³¥ó¥¹¥È¥é¥¯¥¿¡¢ +¤ª¤è¤Ó¥á¥½¥Ã¥É¤ÎÀâÌÀ¤Î½é¤á¤ÇÀë¸À¤òÀ¸À®¤·¤Þ¤¹¡£ +¤³¤ÎÀë¸À¤Ï¡¢¤½¤Î API ¹àÌܤÎÀë¸À¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢ +¥Ö¡¼¥ë·¿¥¯¥é¥¹¤ÎÀë¸À¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +public final class Boolean extends Object implements Serializable +.fi +.ft 1 +.RE +.LP +Boolean.valueOf ¥á¥½¥Ã¥É¤ÎÀë¸À¤Ï¼¡¤Î¤è¤¦¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +public static Boolean valueOf(String s) +.fi +.ft 1 +.RE +.LP +javadoc ¥Ä¡¼¥ë¤Ï½¤¾þ»Ò +.BR public +¡¢ +.BR protected +¡¢ +.BR private +¡¢ +.BR abstract +¡¢ +.BR final +¡¢ +.BR static +¡¢ +.BR transient +¡¢ +¤ª¤è¤Ó +.BR volatile +¤òÁȤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤¹¤¬¡¢ +.BR synchronized +¤È +.BR native +¤ÏÁȤ߹þ¤à¤³¤È¤¬¤Ç¤­¤Þ¤»¤ó¡£ +.BR synchronized +¤È +.BR native ½¤¾þ»Ò +¤Ï¼ÂÁõ¤Î¾ÜºÙ¤È¸«¤Ê¤µ¤ì¡¢API »ÅÍͤΰìÉô¤È¤Ï¸«¤Ê¤µ¤ì¤Þ¤»¤ó¡£ +.LP +¥­¡¼¥ï¡¼¥É +.BR synchronized +¤Ë°Í¸¤¹¤ë¤è¤ê¤â¡¢¡ÖÊ£¿ô¤Î¥¹¥ì¥Ã¥É¤Ë¤è¤Ã¤Æñ°ì¤Î +.BR Enumeration +¤òʹԤ·¤Æ»ÈÍѤ·¤Æ¤Ï¤Ê¤é¤Ê¤¤¡×¤È¤¤¤¦¤è¤¦¤Ë¡¢Ê¹ԽèÍý¤Î¥»¥Þ¥ó¥Æ¥£¥Ã¥¯¥¹¤ò +¥³¥á¥ó¥ÈÀâÌÀ¤ÎÃæ¤Ç¥É¥­¥å¥á¥ó¥È²½¤¹¤ë¤Ù¤­¤Ç¤¹¡£¥É¥­¥å¥á¥ó¥È¤Ç¤Ï¡¢ +¤³¤ì¤é¤Î¥»¥Þ¥ó¥Æ¥£¥Ã¥¯¥¹¤ÎãÀ®ÊýË¡¤òÀâÌÀ¤¹¤Ù¤­¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó¡£Ê̤Π+Îã¤òµó¤²¤ë¤È¡¢ +.BR Hashtable +¤Ï¥¹¥ì¥Ã¥É¤ËÂФ·¤Æ°ÂÁ´¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¤¬¡¢¥¨¥¯¥¹¥Ý¡¼¥È¤µ¤ì¤ë¤½¤Î +¥á¥½¥Ã¥É¤¹¤Ù¤Æ¤òƱ´ü¤µ¤»¤ë¤³¤È¤Ë¤è¤Ã¤Æ¤³¤ì¤ò¼Â¸½¤¹¤ë¤ÈÌÀµ­¤¹¤ëɬÍ× +¤Ï¤Ê¤¤¤È¤¤¤¦¤³¤È¤Ç¤¹¡£¥Ð¥±¥Ã¥È¥ì¥Ù¥ë¤ÇÆâÉôŪ¤ËƱ´ü¤ò¤È¤ë¸¢¸Â¤òαÊݤ·¤Æ¡¢ +¤è¤ê¹âÅÙ¤ÊʹÔÀ­¤òÄ󶡤¹¤Ù¤­¤Ç¤¹¡£ +.LP +.SS "¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È: ¥½¡¼¥¹¥³¡¼¥É¤Ø¤Î¥³¥á¥ó¥È¤ÎÁÞÆþ" +.LP +¥ª¥ê¥¸¥Ê¥ë¤Î¡Ö¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Î»ÅÍ͡פϡ¢¡Ö´ØÏ¢¹àÌܡפò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +¥½¡¼¥¹¥³¡¼¥É¤ÎǤ°Õ¤ÎÀë¸À (¥¯¥é¥¹¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¥á¥½¥Ã¥É¡¢¥³¥ó¥¹¥È¥é¥¯¥¿¡¢ +¤Þ¤¿¤Ï¥Õ¥£¡¼¥ë¥É) ¤ÎÁ°¤Ë¡¢¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È (doc ¥³¥á¥ó¥È) +¤òµ­½Ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ³Æ¥Ñ¥Ã¥±¡¼¥¸¤Ë¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò +ºîÀ®¤Ç¤­¡¢¹½Ê¸¤Ï¼ã´³°Û¤Ê¤ê¤Þ¤¹¤¬¡¢³µÍפˤâ¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò +ºîÀ®¤Ç¤­¤Þ¤¹¡£ ¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Ï¡¢Javadoc ¥³¥á¥ó¥È¤È¤â¸Æ¤Ð¤ì¤Þ¤¹¡£ +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Ï¡¢¥³¥á¥ó¥È¤Î»Ï¤Þ¤ê¤ò¼¨¤¹Ê¸»úÎó +.B /** + ¤È¡¢¥³¥á¥ó¥È¤Î½ª¤ï¤ê¤ò¼¨¤¹Ê¸»úÎó +.B */ +¤Î´Ö¤Ë¤¢¤ëʸ»ú¤Ç¹½À®¤µ¤ì¤Þ¤¹¡£ ¹ÔƬ¤Î¥¢¥¹¥¿¥ê¥¹¥¯¤Ï¡¢³Æ¹Ô¤Ëµ­½Ò¤Ç¤­¤Þ¤¹¡£¾ÜºÙ¤Ï¡¢°Ê²¼¤ÇÀâÌÀ¤·¤Þ¤¹¡£ Linux ¤Ç¤Ï¥Æ¥­¥¹¥È¤Ï¡¢Ê£¿ô¹Ô¤Ë¤ï¤¿¤Ã¤Æµ­½Ò¤Ç¤­¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +/** +* This is the typical format of a simple documentation comment. +* that spans two lines. +*/ +.fi +.ft 1 +.RE +.LP +¼¡¤Î¤è¤¦¤Ë¡¢¥³¥á¥ó¥È¤Ï 1 ¹Ô¤Ë¤Þ¤È¤á¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +/** This comment takes up only one line. */ +.fi +.ft 1 +.RE +.LP +¥³¥á¥ó¥È¤ÎÇÛÃÖ - ¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤¬Ç§¼±¤µ¤ì¤ë¤Î¤Ï¡¢¥¯¥é¥¹¡¢ +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¥á¥½¥Ã¥É¡¢¤Þ¤¿¤Ï¥Õ¥£¡¼¥ë¥É +Àë¸À¤ÎÁ°¤ËÃÖ¤«¤ì¤¿¾ì¹ç¤À¤±¤Ç¤¹ (¥¯¥é¥¹¡¢¥á¥½¥Ã¥É¡¢¤ª¤è¤Ó¥Õ¥£¡¼¥ë¥É¤Î +Îã¤ò»²¾È)¡£¥á¥½¥Ã¥É¤ÎËÜÂΤËÃÖ¤«¤ì¤¿¥É¥­¥å¥á¥ó¥È +¥³¥á¥ó¥È¤Ï̵»ë¤µ¤ì¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢Àë¸Àʸ¤´¤È¤Ë 1 ¤Ä¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤À¤±¤ò +ǧ¼±¤·¤Þ¤¹¡£ +.LP +¤è¤¯È¯À¸¤¹¤ë´Ö°ã¤¤¤Ï¡¢½ÅÍפÊʸ¤ò¥¯¥é¥¹¥³¥á¥ó¥È¤È¥¯¥é¥¹Àë¸À¤Î´Ö¤Ë +Æþ¤ì¤Æ¤·¤Þ¤¦¤³¤È¤Ç¤¹¡£ +.B javadoc +¤Ï¥¯¥é¥¹¥³¥á¥ó¥È¤ò̵»ë¤¹¤ë¤¿¤á¡¢Ãí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.RS +.ft 3 +.nf +/** +* This is the class comment for the class Whatever. +*/ + +import com.sun; // MISTAKE - Important not to put statements here + +public class Whatever { +} +.fi +.ft 1 +.RE +.LP +¥³¥á¥ó¥È¤ÎÀâÌÀ¤Î¤¢¤È¤Ë¥¿¥°¤¬Â³¤¯ - ¥³¥á¥ó¥È¤Î³«»Ï¶èÀÚ¤êʸ»ú¤Ç¤¢¤ë +.B /** +¤Î¤¢¤È¤«¤é¥¿¥°¥»¥¯¥·¥ç¥ó¤Þ¤Ç¤¬ÀâÌÀ¤Ë¤Ê¤ê¤Þ¤¹¡£ ¥¿¥°¥»¥¯¥·¥ç¥ó¤Ï¡¢ +ÀèƬʸ»ú¤¬ +.B @ +¤Ç¤¢¤ë¹Ô¤«¤é»Ï¤Þ¤ê¤Þ¤¹ (¹Ô¤ÎÀèƬ¤Î¥¢¥¹¥¿¥ê¥¹¥¯¤ª¤è¤Ó¶õÇòʸ»ú +¤Ï½ü¤¯)¡£ ÀâÌÀ¤òµ­½Ò¤»¤º¡¢¥³¥á¥ó¥È¤À¤±¤Î¥¿¥°¤òµ­½Ò¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ +ÀâÌÀ¤Ï¡¢¥¿¥°¥»¥¯¥·¥ç¥ó°Ê¹ß¤Ë³¤±¤ë¤³¤È¤Ï¤Ç¤­¤Þ¤»¤ó¡£ +¥¿¥°¤Î°ú¿ô¤ÏÊ£¿ô¤Î¹Ô¤Ë¤Þ¤¿¤¬¤Ã¤Æµ­½Ò¤Ç¤­¤Þ¤¹¡£ ¥¿¥°¤Î¿ô¤Ë +À©¸Â¤Ï¤¢¤ê¤Þ¤»¤ó¡£²¿²ó¤âµ­½Ò¤Ç¤­¤ë¥¿¥°¤È¡¢1 ²ó¤·¤«µ­½Ò¤Ç¤­¤Ê¤¤ +¥¿¥°¤¬¤¢¤ê¤Þ¤¹¡£ ¼¡¤ÎÎã¤Î +.B @see +¤«¤é¥¿¥°¥»¥¯¥·¥ç¥ó¤¬»Ï¤Þ¤ê¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf + /** + * This is a doc comment. + * @see java.lang.Object + */ +.fi +.ft 1 +.RE +.LP +ɸ½à¥¿¥°¤È¥¤¥ó¥é¥¤¥ó¥¿¥°: ¥¿¥°¤Ï¡¢javadoc ¥Ä¡¼¥ë¤¬½èÍý¤Ç¤­¤ë¡¢ +doc ¥³¥á¥ó¥ÈÆâ¤ÎÆÃÊ̤ʥ­¡¼¥ï¡¼¥É¤Ç¤¹¡£javadoc ¥Ä¡¼¥ë¤Ë¤Ï¡¢@tag ¤È¤·¤Æ¸½¤ì¤ë +ɸ½à¥¿¥°¤È¡¢Ãæ³ç¸ÌÆâ¤Ë +.B {\f3@tag\f1} +¤È¤·¤Æ¸½¤ì¤ë¥¤¥ó¥é¥¤¥ó¥¿¥°¤¬¤¢¤ê¤Þ¤¹¡£²ò¼á +¤µ¤»¤ë¤¿¤á¤Ë¤Ï¡¢ÀèƬ¤Î¥¢¥¹¥¿¥ê¥¹¥¯¡¢¶õÇò¡¢¥³¥á¥ó¥È¶èÀÚ¤êʸ»ú (/**) ¤ò +½ü¤¤¤Æ¤Ïɸ½à¥¿¥°¤¬¹Ô¤ÎÀèƬ¤Ç¤¢¤ë¤è¤¦¤ËÇÛÃÖ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤Ä +¤Þ¤ê¡¢¥æ¡¼¥¶¤Ï¥Æ¥­¥¹¥ÈÆâ¤ÎǤ°Õ¤Î°ÌÃÖ¤Ç @ ʸ»ú¤ò»ÈÍѤǤ­¡¢ +¤³¤Îʸ»ú¤Ï¥¿¥°¤Î»Ï¤á¤È¤Ï²ò¼á¤µ¤ì¤Þ¤»¤ó¡£@ ʸ»ú¤Ç¹Ô¤ò³« +»Ï¤·¤Æ¤³¤ì¤¬²ò¼á¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¤·¤¿¤¤¾ì¹ç¤Ï¡¢HTML ¥¨¥ó¥Æ¥£¥Æ¥£¤Î +@ ¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£³Æ¥¹¥¿¥ó¥É¥¢¥í¥ó¥¿¥°¤Ë¤Ï´ØÏ¢¤¹¤ë¥Æ¥­¥¹¥È¤¬¤¢¤ê +¤Þ¤¹¡£¤³¤ì¤Ï¡¢¤½¤Î¥¿¥°¤Î¸å¤«¤é¼¡¤Î¥¿¥°¤ÎľÁ°¤Þ¤Ç¡¢¤Þ¤¿¤Ï doc ¥³¥á¥ó¥È +¤ÎºÇ¸å¤Þ¤Ç¤ÎǤ°Õ¤Î¥Æ¥­¥¹¥È¤Ç¤¹¡£´ØÏ¢ÉÕ¤±¤é¤ì¤¿¥Æ¥­¥¹¥È¤Ï¡¢ +Ê£¿ô¹Ô¤Ë¤Þ¤¿¤¬¤Ã¤Æµ­½Ò¤Ç¤­¤Þ¤¹¡£ +¥¤¥ó¥é¥¤¥ó¥¿¥°¤Ï¡¢¤½¤Î¥Æ¥­¥¹¥È¤¬µö +²Ä¤µ¤ì¤ë°ÌÃ֤ˤϤɤ³¤Ç¤â»ØÄê¤Ç¤­¡¢²ò¼á¤ÎÂоݤȤʤê¤Þ¤¹¡£¼¡¤ÎÎã¤Ï¡¢ +ɸ½à¥¿¥° +.BR @deprecated +¤È¥¤¥ó¥é¥¤¥ó¥¿¥° +.BR {@link} +¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +/** + * @deprecated As of JDk 1.1, replaced by {@link #setBounds(int,int,int,int)} + */ +.fi +.ft 1 +.RE +.LP +¥³¥á¥ó¥È¤Ï HTML ¤Çµ­½Ò¤·¤Þ¤¹¡£¥Æ¥­¥¹¥È¤Ï HTML ¤Ç +µ­½Ò¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +¤³¤ì¤Ï¡¢HTML ¤Î¥¨¥ó¥Æ¥£¥Æ¥£¤ò»È¤¦É¬Íפ¬¤¢¤ë¤³¤È¡¢ +¤ª¤è¤Ó HTML ¥¿¥°¤ò»ÈÍѤǤ­¤ë¤³¤È +¤ò°ÕÌ£¤·¤Þ¤¹¡£HTML ¤Ï¡¢»ÈÍѤ¹¤ë¥Ö¥é¥¦¥¶¤¬¥µ¥Ý¡¼¥È¤¹¤ë +Ǥ°Õ¤Î¥Ð¡¼¥¸¥ç¥ó¤ò»È¤¦¤³¤È¤¬ +¤Ç¤­¤Þ¤¹¡£É¸½à¥É¥Ã¥¯¥ì¥Ã¥È¤Ï¡¢³¬Áؼ°¥¹¥¿¥¤¥ë¥·¡¼¥È¤È +¥Õ¥ì¡¼¥à¤ò´Þ¤à¤Û¤«¤ÎÉôʬ (¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È +°Ê³°) ¤Ï¡¢HTML 3.2 ¤Ë½àµò¤·¤¿¥³¡¼¥É¤òÀ¸À®¤¹¤ë¤è¤¦¤Ëµ­½Ò +¤µ¤ì¤Æ¤¤¤Þ¤¹ +(¥Õ¥ì¡¼¥à¥»¥Ã¥ÈÂбþ¤Î¤¿¤á¡¢À¸À®¤µ¤ì¤ë³Æ +¥Õ¥¡¥¤¥ë¤Ï¡¢¡ÖHTML 4.0¡×¤Ç»Ï¤Þ¤ë)¡£ +.LP +¤¿¤È¤¨¤Ð¡¢¤è¤ê¾®¤µ¤¤ (<) ¤ª¤è¤Ó¤è¤êÂ礭¤¤ (>) ¤È¤¤¤¦ +µ­¹æ¤Ï¡¢ +.B < +¤È +.BR > +¤Èµ­½Ò¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£Æ±Íͤˡ¢¥¢¥ó¥Ñ¥µ¥ó¥É (&) ¤Ï¡¢ +.BR & +¤Èµ­½Ò¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¼¡¤ÎÎã¤Ç +¤Ï¡¢¥Ü¡¼¥ë¥É¤Î HTML ¥¿¥° ¤ò¼¨¤·¤Þ¤¹¡£ +.LP +¼¡¤Ë doc ¥³¥á¥ó¥È¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +/** +* This is a doc comment. +* @see java.lang.Object +*/ +.fi +.ft 1 +.RE +.LP +¹ÔƬ¤Î¥¢¥¹¥¿¥ê¥¹¥¯ - +.B javadoc +¤Ï¡¢doc ¥³¥á¥ó¥È¤ò²òÀϤ¹¤ë¤È¤­¤Ë¡¢³Æ¹Ô¤ÎÀèƬ¤Ë¤¢¤ë +ʸ»ú¥¢¥¹¥¿¥ê¥¹¥¯ (*) ¤ò¤¹¤Ù¤ÆÇË´þ¤· +¤Þ¤¹¡£¤Þ¤¿¡¢ºÇ½é¤Î¥¢¥¹¥¿¥ê¥¹¥¯ (*) ¤è¤êÁ°¤Î¶õÇò¤È +¥¿¥Ö¤âÇË´þ¤·¤Þ¤¹¡£¤·¤¿¤¬¤Ã¤Æ¡¢ +¹ÔƬ¤Î¶õÇò¤ò¤½¤Î¤Þ¤Þ¤Ë¤·¤Æ¤ª¤­¤¿¤¤¾ì¹ç¤Ï¡¢ +ÀèƬ¤Î¥¢¥¹¥¿¥ê¥¹¥¯¤ò¾Êά¤·¤Æ¤Ï¤Ê +¤ê¤Þ¤»¤ó¡£¤¿¤È¤¨¤Ð¡¢ +.B
 
+¥¿¥°¤ò»È¤Ã¤Æ¡¢¥µ¥ó¥×¥ë¥³¡¼¥É¤ò¥¤¥ó¥Ç¥ó¥È¤¹¤ë¾ì¹ç¤Ê¤É¤Ç¤¹¡£
+.LP
+ºÇ½é¤Îʸ - ³Æ doc ¥³¥á¥ó¥È¤ÎºÇ½é¤Îʸ¤Ï¡¢Àë¸À¤µ¤ì¤Æ¤¤¤ë
+¥¨¥ó¥Æ¥£¥Æ¥£¤Ë´Ø¤¹¤ë´Ê·é¤«¤Ä´°Á´
+¤ÊÀâÌÀ¤ò´Þ¤àÍ×Ìóʸ¤Ç¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
+¤³¤Îʸ¤Ï¡¢¶õÇò¡¢¥¿¥Ö¡¢¤Þ¤¿¤Ï¹ÔËöµ­
+¹æ¤¬Â³¤¤¤Æ¤¤¤ëºÇ½é¤Î¥Ô¥ê¥ª¥É¡¢¤¢¤ë¤¤¤ÏºÇ½é¤Î¥¹¥¿¥ó¥É¥¢¥í¥ó¥¿¥°¤Ç½ªÎ»¤·¤Þ¤¹¡£
+.B javadoc
+¥Ä¡¼¥ë¤Ï¡¢HTML ¥Ú¡¼¥¸¤ÎºÇ½é¤Ë¤¢¤ë¥á¥ó¥ÐÍ×Ìó¤Ë¡¢¤³¤ÎºÇ½é¤Îʸ¤ò¥³¥Ô¡¼¤·¤Þ¤¹¡£
+.LP
+Ê£¿ô¥Õ¥£¡¼¥ë¥É¤ÎÀë¸À - 
+.B java 
+¤Ç¤Ï¡¢Ã±°ì¤Îʸ¤ÇÊ£¿ô¤Î¥Õ¥£¡¼¥ë¥É¤òÀë¸À¤Ç¤­¤Þ¤¹¡£
+¤·¤«¤·¡¢¤³¤Îʸ¤Î¥É¥­¥å¥á¥ó¥Æ
+¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Ï 1 ¤Ä¤À¤±¤Ç¡¢¤³¤Î¥³¥á¥ó¥È¤¬
+¤¹¤Ù¤Æ¤Î¥Õ¥£¡¼¥ë¥É¤Ë¥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡£
+¤·¤¿¤¬¤Ã¤Æ¡¢¥Õ¥£¡¼¥ë¥É¤´¤È¤Ë¸Ä¡¹¤Î
+¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤òÉÕ¤±¤¿¤¤¾ì¹ç¤Ï¡¢
+³Æ¥Õ¥£¡¼¥ë¥É¤ò°Û¤Ê¤ëʸ¤ÇÀë¸À¤·¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£
+¤¿¤È¤¨¤Ð¡¢¼¡¤Î¥É¥­¥å¥á¥ó¥Æ¡¼
+¥·¥ç¥ó¥³¥á¥ó¥È¤Ïñ°ì¤ÎÀë¸À¤È¤·¤Æ¤Ï°ÕÌ£¤òÀ®¤µ¤º¡¢
+2 ¤Ä¤ÎÀë¸À¤È¤·¤Æ½èÍý¤¹¤ë¤Ù¤­
+¤Ç¤¹¡£
+.LP
+.RS
+.ft 3
+.nf
+/**
+* The horizontal and vertical distances of point (x,y)
+*/
+public int x, y;      // Avoid this
+.fi
+.ft 1
+.RE
+.LP
+.B javadoc
+¥Ä¡¼¥ë¤Ï¡¢¾åµ­¥³¡¼¥É¤«¤é¼¡¤Î¥É¥­¥å¥á¥ó¥È¤òÀ¸À®¤·¤Þ¤¹¡£
+.LP
+.RS
+.ft 3
+public int x
+.fi
+.ft 1
+The horizontal and vertical distances of point
+(x,y).
+.ft 3
+.nf
+public int y
+.fi
+.ft 1
+The horizontal and vertical distances of point
+(x,y).
+.RE
+.LP
+¥Ø¥Ã¥À¥¿¥°¤ò»ÈÍѤ¹¤ë¤È¤­¤ÏÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£
+¥á¥ó¥ÐÍѤΥɥ­¥å¥á¥ó¥È¥³
+¥á¥ó¥È¤ò½ñ¤¯¤È¤­¤Ï¡¢
+.B 

+¤ä +.BR

+¤Ê¤É¤Î HTML ¥Ø¥Ã¥À¥¿¥°¤ò»ÈÍѤ·¤Ê¤¤¤Ç¤¯¤À¤µ¤¤¡£¤³¤ì¤Ï¡¢ +.B javadoc +¤¬Á´¥É¥­¥å¥á¥ó¥È¤ò¹½Â¤²½¤·¤ÆÀ¸À®¤¹¤ë¤¿¤á¡¢ +¤³¤ì¤é¤Î¹½Â¤²½¥¿¥°¤ò»ÈÍѤ¹¤ë¤È¡¢ +¥É¥­¥å¥á¥ó¥È¤Î½ñ¼°¤¬Íð¤ì¤ë²ÄǽÀ­¤¬¤¢¤ë¤¿¤á¤Ç¤¹¡£ +¤·¤«¤·¡¢¥¯¥é¥¹¤ä¥Ñ¥Ã¥±¡¼¥¸¤Î +¥³¥á¥ó¥È¤Ç¤Ï¡¢¤³¤ì¤é¤Î¥Ø¥Ã¥À¥¿¥°¤ò»ÈÍѤ·¤Æ¹½Â¤²½¤ò»Ø¼¨¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.SS ¥á¥½¥Ã¥É¥³¥Þ¥ó¥É¤Î¼«Æ°ºÆÍøÍÑ +.B javadoc +¥Ä¡¼¥ë¤Ë¤Ï¡¢¥¯¥é¥¹¤ª¤è¤Ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹Æâ¤Î¥á¥½¥Ã¥É¤Î¥³¥á¥ó¥È¤ò +¼«Æ°Åª¤ËºÆÍøÍѤ¹¤ë¡¢¤Ä¤Þ¤ê¡Ö·Ñ¾µ¡×¤¹¤ëµ¡Ç½¤¬¤¢¤ê¤Þ¤¹¡£ +¥á¥½¥Ã¥É¥³¥á¥ó¥È¤Ëµ­½Ò¤ä @return¡¢@param¡¢@see¡¢@throws ¤È +¤¤¤Ã¤¿¥¿¥°¤¬¤Ê¤¤¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¤½¤Î¥á¥½¥Ã¥É¤¬¥ª¡¼¥Ð¡¼¥é¥¤¥É¤Þ¤¿¤Ï¼ÂÁõ¤·¤Æ¤¤¤ë +¥á¥½¥Ã¥É¤Î¥³¥á¥ó¥È¤È¥¿¥° (¸ºß¤¹¤ë¾ì¹ç) ¤òÂå¤ï¤ê¤Ë¥³¥Ô¡¼¤·¤Þ¤¹¡£ +¤½¤ÎºÝ¤Î¥¢¥ë¥´¥ê¥º¥à¤Ï¡¢°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£ +.LP +¤Ä¤Þ¤ê¡¢ÆÃÄê¤Î¥Ñ¥é¥á¡¼¥¿¤Î @param ¥¿¥°¤¬¸«¤Ä¤«¤é¤Ê¤¤¾ì¹ç¡¢ +¤½¤Î¥Ñ¥é¥á¡¼¥¿¤Î¥³¥á¥ó¥È¤¬¥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡£ ÆÃÄê¤ÎÎã³°¤Î @throws ¥¿¥°¤¬ +¸«¤Ä¤«¤é¤Ê¤¤¾ì¹ç¡¢¤½¤ÎÎã³°¤¬Àë¸À¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¸Â¤ê¡¢ +¤½¤Î @throws ¥¿¥°¤¬¥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡£ +.LP +¤³¤ÎÆ°ºî¤Ï¡¢¥Ð¡¼¥¸¥ç¥ó 1.3 °ÊÁ°¤È¤ÏÂоÈŪ¤Ç¤¹¡£ +°ÊÁ°¤Î¥Ð¡¼¥¸¥ç¥ó¤Ç¤Ï¡¢ÀâÌÀ¤ä¥¿¥°¤¬Â¸ºß¤¹¤ì¤Ð¡¢ +¥³¥á¥ó¥È¤Ï°ìÀڷѾµ¤µ¤ì¤Þ¤»¤ó¤Ç¤·¤¿¡£ +.LP +¤Þ¤¿¡¢ÀâÌÀ¤Þ¤¿¤ÏǤ°Õ¤Î¥¿¥°¤Ë¥¤¥ó¥é¥¤¥ó¥¿¥° +{@inheritDoc} ¤¬´Þ¤Þ¤ì¤ë¾ì¹ç¡¢Âбþ¤¹¤ëÀâÌÀ¤Þ¤¿¤Ï¥¿¥°¤¬ +¤½¤Î°ÌÃ֤˥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡£ +.LP +¥ª¡¼¥Ð¡¼¥é¥¤¥É¤µ¤ì¤Æ¤¤¤ë¥á¥½¥Ã¥É¤Ï¡¢¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤ë +¥¯¥é¥¹¤Î¥á¥ó¥Ð¤Ç¤Ê¤±¤ì¤Ð¤Ê¤é¤º¡¢¤«¤Ä¡¢³°Éô»²¾È¥¯¥é¥¹¤Î +¥á¥ó¥Ð¤Ç¤¢¤Ã¤Æ¤Ï¤Ê¤ê¤Þ¤»¤ó¡£¤½¤¦¤Ç¤Ê¤¤¤È¡¢¥³¥Ô¡¼¤¹¤ë +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò¼ÂºÝ¤Ë¤Ï¼èÆÀ¤Ç¤­¤Þ¤»¤ó¡£ +.LP +¥³¥á¥ó¥È¤Î·Ñ¾µ¤Ï¼¡¤Î¾ì¹ç¤Ë¹Ô¤ï¤ì¤Þ¤¹¡£ +.TP 2 +\(bu +¥¯¥é¥¹¤Î¥á¥½¥Ã¥É¤¬¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤Î¥á¥½¥Ã¥É¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤¿ +.PD 0 +.TP 2 +\(bu +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥á¥½¥Ã¥É¤¬¥¹¡¼¥Ñ¡¼¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥á¥½¥Ã¥É¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤¿ +.TP 2 +\(bu +¥¯¥é¥¹¤Î¥á¥½¥Ã¥É¤¬¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥á¥½¥Ã¥É¤ò¼ÂÁõ¤·¤¿ +.PD +.LP +ºÇ½é¤Î 2 ¤Ä¤Î¥±¡¼¥¹ (¥á¥½¥Ã¥É¤¬¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Æ¤¤¤ë¾ì¹ç) ¤Ç¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Æ¤¤¤ë¥á¥½¥Ã¥É¤Î¥É¥­¥å¥á¥ó¥ÈÆâ¤Ë +¡Ö¥ª¡¼¥Ð¡¼¥é¥¤¥É¡×¤È¤¤¤¦¾®¸«½Ð¤·¤òÀ¸À®¤·¡¢¥ª¡¼¥Ð¡¼¥é¥¤¥É¤µ¤ì¤Æ¤¤¤ë +¥á¥½¥Ã¥É¤Ø¤Î¥ê¥ó¥¯¤ò½ñ¤­¹þ¤ß¤Þ¤¹¡£ +.LP +3 ¤ÄÌܤΥ±¡¼¥¹ (ÆÃÄê¤Î¥¯¥é¥¹¤Î¥á¥½¥Ã¥É¤¬¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î +¥á¥½¥Ã¥É¤ò¼ÂÁõ¤·¤Æ¤¤¤ë¾ì¹ç) ¤Ç¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¼ÂÁõ¤·¤Æ¤¤¤ë +¥á¥½¥Ã¥É¤Î¥É¥­¥å¥á¥ó¥ÈÆâ¤Ë¡ÖÄêµÁ¡×¤È¤¤¤¦¾®¸«½Ð¤·¤òÀ¸À®¤·¡¢ +¼ÂÁõ¤µ¤ì¤Æ¤¤¤ë¥á¥½¥Ã¥É¤Ø¤Î¥ê¥ó¥¯¤ò½ñ¤­¹þ¤ß¤Þ¤¹¡£ +.LP +¥á¥½¥Ã¥É¤ÎÀâÌÀ¤¬·Ñ¾µ¤µ¤ì¤ë¥¢¥ë¥´¥ê¥º¥à - ¤¢¤ë¥á¥½¥Ã¥É¤Ë +¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤¬µ­½Ò¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¼¡¤Î¤è¤¦¤Ê¥¢¥ë¥´¥ê¥º¥à¤ò»ÈÍѤ·¤ÆŬÀڤʥ³¥á¥ó¥È¤ò¸¡º÷¤·¤Þ¤¹¡£ +¤³¤Î¥¢¥ë¥´¥ê¥º¥à¤Ï¡¢¤â¤Ã¤È¤âŬÀڤʥɥ­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ò +¸¡º÷¤Ç¤­¤ë¤è¤¦¤ËÀ߷פµ¤ì¤Æ¤ª¤ê¡¢¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤è¤ê¤â +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤¬Í¥À褵¤ì¤ë¤è¤¦¤Ë¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£ +.TP 4 +1. +ľÀܤ˼ÂÁõ¤µ¤ì¤Æ¤¤¤ë (¤Þ¤¿¤Ï¡¢³ÈÄ¥¤µ¤ì¤Æ¤¤¤ë) ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò¡¢ +¥á¥½¥Ã¥É¤ÎÀë¸À¤Ç implements (¤Þ¤¿¤Ï extends) ¥­¡¼¥ï¡¼¥É¤Î¤¢¤È¤Ë +Åо줹¤ë½ç½ø¤Ç¡¢1 ¤Ä¤º¤ÄÄ´¤Ù¤ë¡£ ¤³¤Î¥á¥½¥Ã¥É¤Ë¤Ä¤¤¤Æ +ºÇ½é¤Ë¸«¤Ä¤«¤Ã¤¿¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤òºÎÍѤ¹¤ë +.TP 4 +2. +¼ê½ç 1 ¤Ç¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢ +ľÀܼÂÁõ¤µ¤ì¤Æ¤¤¤ë (¤Þ¤¿¤Ï¡¢³ÈÄ¥¤µ¤ì¤Æ¤¤¤ë) ¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î +¤½¤ì¤¾¤ì¤ËÂФ·¤Æ¡¢¤³¤Î¥¢¥ë¥´¥ê¥º¥àÁ´ÂΤòºÆµ¢Åª¤ËŬÍѤ¹¤ë + (¤½¤ÎºÝ¤Î½ç½ø¤Ï¡¢¼ê½ç 1 ¤Ç¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤òÄ´¤Ù¤¿¤È¤­¤Î½ç½ø¤ÈƱ¤¸) +.TP 4 +3. +¼ê½ç 2 ¤Ç¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ç¡¢ +¤³¤Î¥¯¥é¥¹¤¬ Object °Ê³°¤Î¥¯¥é¥¹¤Ç¤¢¤ë (¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Ç¤Ï¤Ê¤¤) ¾ì¹ç¤Ï¡¢ +¼¡¤Î¤è¤¦¤Ë½èÍý¤¹¤ë +.sp 1n +.nf +.ft 3 +a. ¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤Ë¤³¤Î¥á¥½¥Ã¥É¤Ë¤Ä¤¤¤Æ¤Î¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤¬ +µ­½Ò¤µ¤ì¤Æ¤¤¤ì¤Ð¡¢¤½¤Î¥³¥á¥ó¥È¤òºÎÍѤ¹¤ë +b. ¼ê½ç 3a ¤Ç¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤¬¸«¤Ä¤«¤é¤Ê¤«¤Ã¤¿¾ì¹ç¤Ï¡¢ +¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤ËÂФ·¤Æ¡¢¤³¤Î¥¢¥ë¥´¥ê¥º¥àÁ´ÂΤòŬÍѤ¹¤ë +.ft 1 +.fi +.LP +.SS "javadoc ¤Î¥¿¥°" +.LP +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢ +.B java doc +¥³¥á¥ó¥ÈÆâ¤ËËä¤á¹þ¤Þ¤ì¤¿Æüì¤Ê¥¿¥°¤ò²òÀϤ·¤Þ¤¹¡£¤³¤ì¤é¤Î +Æüì¤Ê doc ¥¿¥°¤ò»È¤¦¤È¡¢ +½ñ¼°¤ÎÀ°¤Ã¤¿´°Á´¤Ê API ¥É¥­¥å¥á¥ó¥È¤ò¥½¡¼¥¹ +¥³¡¼¥É¤«¤é¼«Æ°Åª¤ËÀ¸À®¤Ç¤­¤Þ¤¹¡£ +¥¿¥°¤Ï¡¢Ã±²Áµ­¹æ (\f3@\f1) ¤Ç»Ï¤Þ¤ê¡¢Âçʸ»ú¾®Ê¸»ú¤¬ +¶èÊ̤µ¤ì¤Þ¤¹¡£¤³¤ì¤é¤Î¥¿¥°¤Ï¡¢ +°Ê²¼¤Ë¼¨¤¹¤È¤ª¤ê¤Ë¡¢Âçʸ»ú¤È¾®Ê¸»ú¤ò¶èÊ̤·¤ÆÆþÎϤ¹¤ë +ɬÍפ¬¤¢¤ê¤Þ¤¹¡£¥¿¥°¤Ï¡¢¹Ô +¤ÎÀèƬ (¤¿¤À¤·Àè¹Ô¤¹¤ë¶õÇò¤È¾Êά²Äǽ¤Ê¥¢¥¹¥¿¥ê¥¹¥¯¤Ï½ü¤¯) ¤«¤é +»Ï¤á¤Ê¤±¤ì¤Ð¤Ê¤ê +¤Þ¤»¤ó¡£´·½¬¾å¡¢Æ±¤¸Ì¾Á°¤Î¥¿¥°¤Ï 1 ¸Ä½ê¤Ë¤Þ¤È¤á¤Æµ­½Ò¤·¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð¡¢ +.B @see +¥¿¥°¤¬Ê£¿ô¤¢¤ë¾ì¹ç¤Ï¡¢¤¹¤Ù¤Æ¤ò 1 ¸Ä½ê¤Ë¤Þ¤È¤á¤Æµ­½Ò¤·¤Þ¤¹¡£ +.LP +¥¿¥°¤Ï¼¡¤Î 2 ¼ïÎढ¤ê¤Þ¤¹¡£ +.LP +\(bu +¥¹¥¿¥ó¥É¥¢¥í¥ó¥¿¥° - ÀâÌÀ¤Î¤¢¤È¤Î¥¿¥°¥»¥¯¥·¥ç¥ó¤À¤±¤Ë +ÃÖ¤¯¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¤³¤Î¥¿¥°¤Ï¡¢@tag ¤Î¤è¤¦¤ËÃæ³ç¸Ì¤Ç°Ï¤ß¤Þ¤»¤ó¡£ +.LP +\(bu +¥¤¥ó¥é¥¤¥ó¥¿¥° - ¥³¥á¥ó¥È¤ÎÀâÌÀÆâ¤Þ¤¿¤Ï¥¹¥¿¥ó¥É¥¢¥í¥ó¥¿¥°¤Î +¥³¥á¥ó¥ÈÃæ¤ÎǤ°Õ¤Î¾ì½ê¤ËÃÖ¤¯¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¥¤¥ó¥é¥¤¥ó¥¿¥°¤Ï¡¢{@tag} ¤Î +¤è¤¦¤ËÃæ³ç¸Ì¤Ç°Ï¤ß¤Þ¤¹¡£ +.LP +º£¸å¤Î¥ê¥ê¡¼¥¹¤ÇƳÆþ¤µ¤ì¤ë¥¿¥°¤Ë¤Ä¤¤¤Æ¤Ï¡¢ +¡ÖProposed Javadoc Tags¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +¸½»þÅÀ¤ÇÍ­¸ú¤Ê¥¿¥°¤ò°Ê²¼¤Ë¼¨¤·¤Þ¤¹¡£ +.LP +.sp 1n +.TS +center, box; +cbp-1 | cbp-1 +l | l . +¥¿¥° ƳÆþ¤µ¤ì¤¿ JDK + ¤Î¥Ð¡¼¥¸¥ç¥ó += +@author 1.0 +{@code} 1.5 +{@docRoot} 1.3 +@deprecated 1.0 +@exception 1.0 +{@inheritDoc} 1.4 +{@link} 1.2 +{@linkplain} 1.4 +{@literal} 1.5 +@param 1.0 +@return 1.0 +@see 1.0 +@serial 1.2 +@serialData 1.2 +@serialField 1.2 +@since 1.1 +@throws 1.2 +{@value} 1.4 +@version 1.0 +.TE +.LP +¥«¥¹¥¿¥à¥¿¥°¤Ë¤Ä¤¤¤Æ¤Ï¡¢\-tag ¥ª¥×¥·¥ç¥ó¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.BI @author " name-text" +.B \-author +¥ª¥×¥·¥ç¥ó¤¬»È¤ï¤ì¤Æ¤¤¤ë¾ì¹ç¡¢ +À¸À®¤µ¤ì¤ë¥É¥­¥å¥á¥ó¥È¤Ë¡¢»ØÄꤵ¤ì¤¿ +name-text ¤ò»ý¤Ä Author ¥¨¥ó¥È¥ê¤òÄɲä·¤Þ¤¹¡£ +1 ¤Ä¤Î doc ¥³¥á¥ó¥È¤ËÊ£¿ô¤Î +.B @author +¥¿¥°¤ò´Þ¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.B @author +¥¿¥°¤´¤È¤Ë 1 ¤Ä¡¢¤Þ¤¿¤Ï¥¿¥°¤´¤È¤ËÊ£¿ô¤Î̾Á°¤ò +»ØÄê¤Ç¤­¤Þ¤¹¡£Á°¼Ô¤Î¾ì¹ç¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢Ì¾Á°¤È̾Á°¤Î´Ö¤Ë¥³¥ó¥Þ (\f3,\f1) ¤È¥¹¥Ú¡¼¥¹¤òÁÞÆþ¤·¤Þ¤¹¡£ +¸å¼Ô¤Î¾ì¹ç¡¢¥Æ¥­¥¹¥ÈÁ´ÂΤ¬ +²òÀϤµ¤ì¤ë¤³¤È¤Ê¤¯À¸À®¤µ¤ì¤ë¥É¥­¥å¥á¥ó¥È¤Ë¥³¥Ô¡¼¤µ¤ì¤ë¤À¤±¤Ç¤¹¡£ +¤³¤Î¤¿¤á¡¢¥³¥ó¥Þ°Ê³° +¤Î¸½ÃÏ»ÅÍͤÎ̾Á°¶èÀÚ¤êʸ»ú¤ò»È¤¦¾ì¹ç¤Ï¡¢1 ¹Ô¤ËÊ£¿ô¤Î̾Á°¤ò»ØÄꤷ¤Þ¤¹¡£ +.RE +.TP 7 +.BI @deprecated " deprecated-text" +¤³¤Î API ¤Ï (Æ°ºî¤Ï¤¹¤ë¤¬) »ÈÍѤ¹¤Ù¤­¤Ç¤Ê¤¤¤³¤È¤ò¼¨¤¹ +¥³¥á¥ó¥È¤òÄɲä·¤Þ¤¹¡£ +.B javadoc + ¤Ï¡¢deprecated-text ¤òÀâÌÀ¤ÎÁ°¤Ë°ÜÆ°¤·¤Æ¥¤¥¿¥ê¥Ã¥¯¤Ë¤·¡¢ +¤½¤ÎÁ°¤Ë¥Ü¡¼¥ë¥É¤Î·Ù¹ð +¡Ö¿ä¾©¤µ¤ì¤Þ¤»¤ó¡£¡×¤òÄɲä·¤Þ¤¹¡£ +.LP +.RS +deprecated-text ¤ÎºÇ½é¤Îʸ¤Ç¤Ï¡¢¾¯¤Ê¤¯¤È¤â¥æ¡¼¥¶¤Ë¤É¤Î¤è¤¦¤Ê¤È¤­¤Ë +¤½¤Î API ¤¬¿ä¾©¤µ¤ì¤Ê¤¤¤«¡¢¤ª¤è¤Ó¤½¤ì¤ËÂå¤ï¤ë API ¤òÄ󼨤¹¤ë +ɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.B javadoc +¤Ï¡¢ºÇ½é¤Îʸ¤À¤±¤òÍ×Ì󥻥¯¥·¥ç¥ó¤Èº÷°ú¤Ë¥³¥Ô¡¼¤·¤Þ¤¹¡£ +¤¢¤È¤Ë³¤¯Ê¸¤Ç¡¢¤Ê¤¼¤½¤Î API ¤¬¿ä¾©¤µ¤ì¤Ê¤¤¤«¤ò +ÀâÌÀ¤¹¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£Âå¤ï¤ê¤Î API ¤ò +»Ø¤·¼¨¤¹ {\f3@link\f1} ¥¿¥° ( +.B javadoc +1.2 °Ê¹ß¤Î¾ì¹ç) ¤ò´Þ¤á¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.LP +.TP 2 +\(bu +.B javadoc +1.2 ¤Ç¤Ï¡¢{\f3@link\f1} ¥¿¥°¤ò»ÈÍѤ·¤Æ¤¯¤À¤µ¤¤¡£¤³¤ì¤Ë¤è¤ê¡¢ +ɬÍפʾì½ê¤Ë¥¤¥ó¥é¥¤¥ó¤Ç +¥ê¥ó¥¯¤¬ºîÀ®¤µ¤ì¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë»È¤¤¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf +/** + * @deprecated As of JDK 1.1, replaced by + * {@link #setBounds(int,int,int,int)} + */ +.fi +.ft 1 +.RE +.LP +.TP 2 +\(bu +.B javadoc +1.1 ¤Ç¤Ï¡¢³Æ +.B @deprecated +¥¿¥°¤Ë +.B @see +¥¿¥° (¥¤¥ó¥é¥¤¥ó¤Ë¤Ç¤­¤Ê¤¤) ¤òºîÀ®¤¹¤ë¤Î¤¬É¸½à¤Î·Á¼°¤Ç¤¹¡£ +.LP +¿ä¾©¤µ¤ì¤Ê¤¤¥¿¥°¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤Ï¡¢¡Ö +.B @deprecated +¥¿¥°¡× ¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.RE +.TP +.B {@code text} +{@literal} ¤ÈƱÅù¤Ç¤¹¡£ +.LP +¥Æ¥­¥¹¥È¤ò HTML ¥Þ¡¼¥¯¥¢¥Ã¥×¤Þ¤¿¤Ï +Æþ¤ì»Ò¤Ë¤Ê¤Ã¤¿ javadoc ¥¿¥°¤È¤·¤Æ²ò¼á¤»¤º¤Ë¡¢ +¥Æ¥­¥¹¥È¤ò¥³¡¼¥É¥Õ¥©¥ó¥È¤Çɽ¼¨¤·¤Þ¤¹¡£ +¤³¤ì¤Ë¤è¤ê doc ¥³¥á¥ó¥È¤Ç¤Ï¡¢ +¥Ñ¥é¥á¡¼¥¿¤Î¼ïÎà ( )¡¢ÉÔÅù¹æ ( 3 < 4 )¡¢ +¤Þ¤¿¤ÏÌð°õ ( <- ) ¤Ê¤É¤Ç¡¢HTML ¥¨¥ó¥Æ¥£¥Æ¥£ ( < ¤ª¤è¤Ó > ) ¤Ç¤Ï¤Ê¤¯¡¢ +Ä̾ï¤Î»³³ç¸Ì (< ¤ª¤è¤Ó >) ¤ò»ÈÍѤǤ­¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð doc ¥³¥á¥ó¥È¤Î¥Æ¥­¥¹¥È +.LP +.RS 5 +{@code AC} +.RE +.LP +¤Ï¡¢À¸À®¤µ¤ì¤¿ HTML ¥Ú¡¼¥¸¤Ç¡¢¼¡¤Î¤è¤¦¤Ë¤½¤Î¤Þ¤Þɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.RS 5 +AC +.RE +.LP +ÃíÌܤ¹¤Ù¤­ÅÀ¤È¤·¤Æ¡¢ ¤ÏÂÀ»ú¤Ç¤¢¤ë¤È²ò¼á¤µ¤ì¤Þ¤»¤ó¤¬¡¢ +¥³¡¼¥É¥Õ¥©¥ó¥È¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +¥³¡¼¥É¥Õ¥©¥ó¥È¤Ê¤·¤ÇƱ¤¸µ¡Ç½¤ò¼Â¸½¤¹¤ë¤Ë¤Ï¡¢ +{@literal} ¤ò»ÈÍѤ·¤Þ¤¹¡£ +.RE +.TP +.B {@docRoot} +À¸À®¤µ¤ì¤¿Ç¤°Õ¤Î¥Ú¡¼¥¸¤òµ¯ÅÀ¤È¤·¤¿¡¢¥É¥­¥å¥á¥ó¥È¤Î (½ÐÎÏÀè) +¥ë¡¼¥È¥Ç¥£¥ì¥¯¥È¥ê¤ÎÁêÂХѥ¹¤òɽ¤·¤Þ¤¹¡£¤³¤Î¥¿¥°¤Ï¡¢Ãøºî¸¢¥Ú¡¼¥¸ +¤Þ¤¿¤Ï²ñ¼Ò¤Î¥í¥´¤Ê¤É¡¢À¸À®¤µ¤ì¤ë¤¹¤Ù¤Æ¤Î¥Ú¡¼¥¸¤«¤é»²¾È¤¹¤ë¥Õ¥¡¥¤¥ë +¤ò¼è¤ê¹þ¤à¤È¤­¤Ë»È¤¤¤Þ¤¹¡£Ä̾ï¤Ï¡¢³Æ¥Ú¡¼¥¸¤ÎºÇ²¼Éô¤«¤éÃøºî¸¢ +¥Ú¡¼¥¸¤Ë¥ê¥ó¥¯¤·¤Þ¤¹¡£ +.RS +.LP +¤³¤Î +.B {@docRoot} +¥¿¥°¤Ï¡¢¥³¥Þ¥ó¥É¹Ô¤ª¤è¤Ó doc ¥³¥á¥ó¥È¤Ç»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.TP 4 +1. +¥³¥Þ¥ó¥É¹Ô¤Ç¤Ï¡¢¼¡¤Î¤è¤¦¤Ë¥Ø¥Ã¥À (header)¡¢¥Õ¥Ã¥¿ (footer)¡¢ +¤Þ¤¿¤Ï¥Ú¡¼¥¸¤ÎºÇ²¼Éô (bottom)¤òÄêµÁ¤·¤Þ¤¹¡£ +.sp 1n +.B javadoc \-bottom 'Copyright' +.LP +Ãí - Makefile ¤ÎÃæ¤Ç {\f3@docRoot\f1}¤ò¤³¤Î¤è¤¦¤ËÍøÍѤ¹¤ë¾ì¹ç¡¢ +°ìÉô¤Î Makefile ¥×¥í¥°¥é¥à¤Ç¤Ï¡¢Ãæ³ç¸Ì { } ʸ»ú¤ò¥¨¥¹¥±¡¼¥×¤¹¤ë +ɬÍפ¬¤¢¤ê¤Þ¤¹¡£ ¤¿¤È¤¨¤Ð¡¢Inprise MAKE ¥Ð¡¼¥¸¥ç¥ó 5.2 ¤ò +Windows ¾å¤Ç¼Â¹Ô¤¹¤ë¾ì¹ç¤Ï¡¢{{\f3@docRoot\f1}} ¤Î¤è¤¦¤Ë¡¢ +Ãæ³ç¸Ì¤òÆó½Å¤Ë¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£¤µ¤é¤Ë¡¢\-bottom ¤Ê¤É¤Î +¥ª¥×¥·¥ç¥ó¤ËÂФ¹¤ë°ú¿ô¤ò¡¢Ã±°ì°úÍÑÉä¤Ç¤Ï¤Ê¤¯¡¢ +Æó½Å°úÍÑÉä¤Ç°Ï¤àɬÍפ¬¤¢¤ê¤Þ¤¹¡£href +°ú¿ô¤ÎÃͤò°Ï¤à°úÍÑÉä¤Ï¾Êά¤·¤Þ¤¹¡£ +.TP +2. +doc ¥³¥á¥ó¥È¤Ë¤Ï¼¡¤Î¤è¤¦¤Ëµ­½Ò¤·¤Þ¤¹¡£ +.sp 1n +.nf +.ft 3 +/** +* See the Copyright. +*/ +.ft 1 +.fi +.LP +¤³¤Î¥¿¥°¤¬É¬ÍפÊÍýͳ¤Ï¡¢À¸À®¤µ¤ì¤ë¥É¥­¥å¥á¥ó¥È¤¬¡¢¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¤È +Ʊ¤¸³¬ÁؤΥǥ£¥ì¥¯¥È¥ê¤Ë³ÊǼ¤µ¤ì¤ë¤¿¤á¤Ç¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤è¤¦¤Ë»ØÄꤷ¤Þ¤¹¡£ +.sp 1n +.ti +5n +.B +.sp 1n +¼¡¤Î¤è¤¦¤Ë²ò·è¤µ¤ì¤Þ¤¹¡£ +.sp 1n +.ti +5n +\f3\f1 .\|.\|. java/lang/Object.java ¤Î¾ì¹ç +.sp 1n +¤ª¤è¤Ó +.sp 1n +.ti +5n +\f3\f1 .\|.\|. java/lang/ref/Reference.java ¤Î¾ì¹ç +.RE +.TP +.BI @exception " class-name description" +.B @exception +¥¿¥°¤Ï¡¢ +.BR @throws +¤ÈƱµÁ¤Ç¤¹¡£ +.TP +{\f3@inheritDoc\f1} +ºÇ¤â¶á¤¤¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤«¤é¸½ºß¤Î ¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤Ë¡¢ +¥É¥­¥å¥á¥ó¥È¤ò·Ñ¾µ¤·¤Þ¤¹¡£ ¤³¤Îµ¡Ç½¤Ë¤è¤ê¡¢¥³¥á¥ó¥È¤Ï·Ñ¾µ¥Ä¥ê¡¼¤Î +¾å°Ì¤Ë°ÜÆ°¤·¡¢³«È¯¼Ô¤Ï¥³¥Ô¡¼¤·¤¿¥Æ¥­¥¹¥È¤Ë +µ­½Ò¤òÄɲ乤뤳¤È¤¬¤Ç¤­¤Þ¤¹¡£ ¥³¥á¥ó¥È¤Î·Ñ¾µ¤â¤¢¤ï¤»¤Æ»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +¤³¤Î¥¿¥°¤Ï¼¡¤Î 2 ¤Ä¤Î°ÌÃÖ¤ËÇÛÃ֤Ǥ­¤Þ¤¹¡£ +.TP +\(bu +¥³¥á¥ó¥ÈËÜʸ (ºÇ½é¤Î¥¹¥¿¥ó¥É¥¢¥í¥ó¥¿¥°¤ÎÁ°)¡£¤³¤³¤Ç¡¢ +¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤«¤é¥³¥á¥ó¥ÈÁ´ÂΤò¥³¥Ô¡¼¤·¤Þ¤¹¡£ +.TP +\(bu +¥¹¥¿¥ó¥É¥¢¥í¥ó¥¿¥°¤Î¥Æ¥­¥¹¥È°ú¿ôÆâ¡£¤³¤³¤Ç¡¢¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤«¤é¥¿¥°¤Î +¥Æ¥­¥¹¥È¤ò¥³¥Ô¡¼¤·¤Þ¤¹¡£ +.TP +{\f3@link\f1 " package.class#member label" } +.RS +»²¾È¥¯¥é¥¹¤Î¡¢»ØÄꤵ¤ì¤¿Ì¾Á°¤ò»ý¤Ä¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢ +¤Þ¤¿¤Ï¥á¥ó¥Ð¤Ë¤Ä¤¤¤Æ¤Î¥É¥­¥å¥á¥ó¥È¤ò»Ø¤¹¥¤¥ó¥é¥¤¥ó¥ê¥ó¥¯¤ò¡¢É½¼¨¥Æ¥­¥¹¥È +.BI label +¤È¤È¤â¤ËÁÞÆþ¤·¤Þ¤¹¡£ +.LP +¤³¤Î¥¿¥°¤Ï¡¢ +.B @see +¥¿¥°¤È¤è¤¯»÷¤Æ¤¤¤Þ¤¹¡£¤É¤Á¤é¤Î¥¿¥°¤â¡¢package.class#member ¤ª¤è¤Ó +.BI label +¤Î»²¾È¤Î»ÅÊý¤¬Æ±¤¸¤Ç¡¢Í­¸ú¤Ê¹½Ê¸¤â¤Þ¤Ã¤¿¤¯Æ±¤¸¤Ç¤¹¡£ +Â礭¤Ê°ã¤¤¤Ï¡¢{\f3@link\f1} ¤Ï¡¢¥ê¥ó¥¯¤ò [´ØÏ¢¹àÌÜ] ¥»¥¯¥·¥ç¥ó¤Ë +ÃÖ¤¯¤Î¤Ç¤Ï¤Ê¤¯¡¢¥¤¥ó¥é¥¤¥ó¥ê¥ó¥¯¤òÀ¸À®¤¹¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£ +¤Þ¤¿¡¢¥¤¥ó¥é¥¤¥ó¥Æ¥­¥¹¥È¤Î¤Û¤«¤ÎÉôʬ¤È¶èÊ̤¹¤ë¤¿¤á¤Ë¡¢ +{\f3@link\f1} ¥¿¥°¤ÎºÇ½é¤ÈºÇ¸å¤ËÃæ³ç¸Ì¤òµ­½Ò¤·¤Þ¤¹¡£ +¥é¥Ù¥ë¤ÎÃæ¤Ç¡Ö}¡×¤ò»È¤¦É¬Íפ¬¤¢¤ë¾ì¹ç¤Ï¡¢HTML +¥¨¥ó¥Æ¥£¥Æ¥£¤Î¡Ö}¡×¤ò»È¤¤¤Þ¤¹¡£ +.LP +1 ¤Ä¤Îʸ¤ÎÃæ¤Ç»ÈÍѤǤ­¤ë {@link} ¥¿¥°¤Î¿ô¤ËÀ©¸Â¤Ï¤¢¤ê¤Þ¤»¤ó¡£ +¤³¤Î¥¿¥°¤Ï¡¢¥É¥­¥å¥á¥ó¥Æ¡¼¥·¥ç¥ó¥³¥á¥ó¥È¤ÎÀâÌÀÉôʬ¡¢¤Þ¤¿¤Ï +.BR @deprecated +¡¢ +.BR @return +¡¢ +.BR @param +¤Ê¤É¤ÎǤ°Õ¤Î¥¿¥°¤Î¥Æ¥­¥¹¥ÈÉôʬ¤Ç»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +¤¿¤È¤¨¤Ð¡¢¼¡¤Î¥³¥á¥ó¥È¤Ç¤Ï¡¢ +.B getComponentAt(int, int) +¥á¥½¥Ã¥É¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£ +.LP +.ft 3 +.nf +Use the {\f3@link #getComponentAt(int, int) getComponentAt\f1} method. +.fi +.ft 1 +.LP +ɸ½à¥É¥Ã¥¯¥ì¥Ã¥È¤Ç¤Ï¡¢¾åµ­¤Î¥³¥á¥ó¥È¤«¤é¼¡¤Î HTML ¤¬ +À¸À®¤µ¤ì¤Þ¤¹ (¤³¤Î¥³¥á¥ó¥È¤¬Æ±¤¸¥Ñ¥Ã¥±¡¼¥¸¤ÎÊ̤Υ¯¥é¥¹¤ò»²¾È¤·¤Æ¤¤¤ë¾ì¹ç)¡£ +.LP +.ft 3 +.nf +Use the +\\ + getComponentAtmethod. +.fi +.ft 1 +.LP +¤³¤Î HTML ¤Ï¡¢Web ¥Ú¡¼¥¸¾å¤Ç¤Ï¼¡¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +Use the getComponentAt method. +.fi +.ft 1 +.LP +{\f3@link\f1} ¤ò¡¢¥É¥­¥å¥á¥ó¥È²½¤ÎÂоݤˤ·¤Æ¤¤¤Ê¤¤¥¯¥é¥¹¤Ë¤Þ¤Ç +³ÈÄ¥¤¹¤ë¤Ë¤Ï¡¢ +.BR \-link +¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Þ¤¹¡£ +.RE +.TP +{\f3@linkplain\f1 " package.class#member label"} +¥ê¥ó¥¯¤Î¥é¥Ù¥ë¤¬¥³¡¼¥É¥Õ¥©¥ó¥È¤Ç¤Ï¤Ê¤¯¥×¥ì¡¼¥ó¥Æ¥­¥¹¥È¤Ç +ɽ¼¨¤µ¤ì¤Æ¤¤¤ëÅÀ°Ê³°¤Ï¡¢ +{\f3@link\f1} ¤ÈƱ¤¸¤Ç¤¹¡£ ¥é¥Ù¥ë¤¬¥×¥ì¡¼¥ó¥Æ¥­¥¹¥È¤Ç +µ­½Ò¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤ËÊØÍø¤Ç¤¹¡£¼¡¤ÎÎã¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.LP +.ft 3 +.nf +Refer to {\f3@linkplain\f1 add() the overridden method}. +.fi +.ft 1 +.LP +¤³¤ì¤Ï°Ê²¼¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.ft 3 +.nf +Refer to the overridden method. +.fi +.ft 1 +.LP +.TP +.BI {@literal text} +¥Æ¥­¥¹¥È¤ò HTML ¥Þ¡¼¥¯¥¢¥Ã¥×¤Þ¤¿¤Ï +Æþ¤ì»Ò¤Ë¤Ê¤Ã¤¿ javadoc ¥¿¥°¤È¤·¤Æ²ò¼á¤»¤º¤Ë¡¢ +¥Æ¥­¥¹¥È¤ò¥³¡¼¥É¥Õ¥©¥ó¥È¤Çɽ¼¨¤·¤Þ¤¹¡£ +¤³¤ì¤Ë¤è¤ê doc ¥³¥á¥ó¥È¤Ç¤Ï¡¢ +¥Ñ¥é¥á¡¼¥¿¤Î¼ïÎà ( )¡¢ÉÔÅù¹æ ( 3 < 4 )¡¢ +¤Þ¤¿¤ÏÌð°õ ( <- ) ¤Ê¤É¤Ç¡¢HTML ¥¨¥ó¥Æ¥£¥Æ¥£ ( < ¤ª¤è¤Ó > ) ¤Ç¤Ï¤Ê¤¯¡¢ +Ä̾ï¤Î»³³ç¸Ì (< ¤ª¤è¤Ó >) ¤ò»ÈÍѤǤ­¤Þ¤¹¡£ +¤¿¤È¤¨¤Ð doc ¥³¥á¥ó¥È¤Î¥Æ¥­¥¹¥È +.LP +.RS 5 +{@literal AC} +.RE +.LP +¤Ï¡¢À¸À®¤µ¤ì¤¿ HTML ¥Ú¡¼¥¸¤Ï¥Ö¥é¥¦¥¶¤Ç¼¡¤Î¤è¤¦¤Ë¤½¤Î¤Þ¤Þɽ¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.RS 5 +AC +.RE +.LP +ÃíÌܤ¹¤Ù¤­ÅÀ¤È¤·¤Æ¡¢ ¤ÏÂÀ»ú¤Ç¤¢¤ë¤È²ò¼á¤µ¤ì¡¢ +¥³¡¼¥É¥Õ¥©¥ó¥È¤Ë¤Ê¤ê¤Þ¤»¤ó¡£ +.LP +¥³¡¼¥É¥Õ¥©¥ó¥È¤ÇƱ¤¸µ¡Ç½¤ò¼Â¸½¤¹¤ë¤Ë¤Ï¡¢ +{@code} ¤ò»ÈÍѤ·¤Þ¤¹¡£ +.TP +.BI @param " parameter-name description" +»ØÄꤷ¤¿ parameter-name ¤È»ØÄꤷ¤¿ description ¤ò»ÈÍѤ·¤Æ +¥Ñ¥é¥á¡¼¥¿¤ò¡ÖParameters¡×¥»¥¯¥·¥ç¥ó¤ËÄɲä·¤Þ¤¹¡£ +doc ¥³¥á¥ó¥È¤òµ­½Ò¤¹¤ë¤È¤­¤Ï¡¢description ¤òÊ£¿ô¹Ô¤Ë +³¤±¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£¤³¤Î¥¿¥°¤Ï¡¢ +¥á¥½¥Ã¥É¡¢¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¤Þ¤¿¤Ï¥¯¥é¥¹¤Î +doc ¥³¥á¥ó¥ÈÆâ¤Ç¤Î¤ßÍ­¸ú¤Ç¤¹¡£ +.LP +¥Ñ¥é¥á¡¼¥¿Ì¾¤Ï¡¢¥á¥½¥Ã¥É¤«¥³¥ó¥¹¥È¥é¥¯¥¿¤Î¥Ñ¥é¥á¡¼¥¿Ì¾¡¢ +¤Þ¤¿¤Ï¥¯¥é¥¹¤Î·¿¥Ñ¥é¥á¡¼¥¿¤Î̾Á°¤Ç¤¹¡£ +»³³ç¸Ì¤Ç¥Ñ¥é¥á¡¼¥¿Ì¾¤ò°Ï¤à¤È¡¢·¿¥Ñ¥é¥á¡¼¥¿¤ò»ÈÍѤ¹¤ë¤³¤È¤ò +»ØÄꤷ¤Þ¤¹¡£ +.LP +.RS 5 +,nf +/** +* @param Type of element stored in a list +*/ +public interface List extends Collection { +} +.fi +.RE +.LP +¾ÜºÙ¤Ï¡Ö@param ¥¿¥°¤Îµ­½Ò¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.BI @return " description" +description ¤Ç»ØÄꤵ¤ì¤¿¥Æ¥­¥¹¥È¤ò»ý¤ÄÌá¤êÃÍ +¥»¥¯¥·¥ç¥ó¤òÄɲä·¤Þ¤¹¡£¥Æ¥­¥¹¥È¤Ç¤Ï¡¢ +Ìá¤êÃͤη¿¤È¼è¤êÆÀ¤ëÃͤÎÈϰϤˤĤ¤¤Æµ­½Ò¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +.TP +.BI @see label" +URL#value ¤ÇÄêµÁ¤µ¤ì¤¿¤È¤ª¤ê¤Ë¥ê¥ó¥¯¤òÄɲä·¤Þ¤¹¡£ +URL#value ¤Ï¡¢ÁêÂÐ URL ¤Þ¤¿¤ÏÀäÂÐ URL ¤Ç¤¹¡£ +.B Javadoc +¥Ä¡¼¥ë¤Ï¡¢ +ºÇ½é¤Îʸ»ú¤È¤·¤Æ¡¢¾®¤Ê¤ê³ç¸Ì (<) ¤òõ¤¹¤³¤È¤Ç¡¢ +¤³¤Î¥ê¥ó¥¯¤ò¤½¤Î¾¤Î¾ì¹ç¤È¶èÊ̤·¤Þ¤¹¡£ +.LP +.RS 5 +@see Java Spec +.RE +.LP +¤³¤ì¤Ï¼¡¤Î¤è¤¦¤Ê¥ê¥ó¥¯¤òÀ¸À®¤·¤Þ¤¹¡£ +.LP +.RS 5 +´ØÏ¢¹àÌÜ: "Java Spec" +.RE +.TP +.BI @see " string" +string ¤Î¥Æ¥­¥¹¥È¥¨¥ó¥È¥ê¤òÄɲä·¤Þ¤¹¡£ +¥ê¥ó¥¯¤ÏÀ¸À®¤µ¤ì¤Þ¤»¤ó¡£string ¤Ï¡¢½ñÀÒ¡¢¤Þ¤¿¤Ï +URL ¤Ç¤Ï¥¢¥¯¥»¥¹¤Ç¤­¤Ê¤¤¾ðÊó¤Î»²¾ÈÀè¤Ç¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢ºÇ½é¤Îʸ»ú¤¬Æó½Å°úÍÑÉä (") ¤«¤É¤¦¤«¤òÄ´¤Ù¤Æ¡¢ +¾å¤Î 2 ¤Ä¤Î·Á¼°¤È¤³¤Î·Á¼°¤È¤ò¶è +Ê̤·¤Þ¤¹¡£¼¡¤ËÎã¤ò¼¨¤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf + @see "The Java Programming Language" +.fi +.ft 1 +.LP +¤³¤ì¤Ï¼¡¤Î¤è¤¦¤Ê¥Æ¥­¥¹¥È¤òÀ¸À®¤·¤Þ¤¹¡£ +.LP +.ft 3 +.nf + ´ØÏ¢¹àÌÜ: + "The Java Programming Language" +.fi +.ft 1 +.RE +.TP +\f3@see \f2label\f3\f1 +.IR URL#value +¤ÇÄêµÁ¤µ¤ì¤¿¤È¤ª¤ê¤Ë¥ê¥ó¥¯¤òÄɲä·¤Þ¤¹¡£ + +.I URL#value +¤Ï¡¢ÁêÂÐ URL ¤Þ¤¿¤ÏÀäÂÐ URL ¤Ç¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢ºÇ½é¤Îʸ»ú¤È¤·¤Æ¡¢¾®¤Ê¤ê³ç¸Ì (\f3<\f1) ¤òõ¤¹¤³¤È¤Ç¡¢ +¤³¤Î¥ê¥ó¥¯¤ò¤½¤Î¾¤Î¾ì¹ç¤È¶èÊ̤·¤Þ¤¹¡£ +.LP +.RS +.ft 3 +.nf + @see Java Spec +.fi +.ft 1 +.LP +¤³¤ì¤Ï¼¡¤Î¤è¤¦¤Ê¥ê¥ó¥¯¤òÀ¸À®¤·¤Þ¤¹¡£ +.LP +.ft 3 +.nf + ´ØÏ¢¹àÌÜ: + Java Spec +.fi +.ft 1 +.RE +.TP +.BI @see " package.class#member label" +»²¾È¤µ¤ì¤ë Java ¸À¸ì¤Ç»ØÄꤵ¤ì¤¿Ì¾Á°¤Î¥É¥­¥å¥á¥ó¥È¤ò»Ø¤¹¡¢ +ɽ¼¨¥Æ¥­¥¹¥È label ¤ò»ý¤Ä +¥ê¥ó¥¯¤òÄɲä·¤Þ¤¹¡£label ¤Ï¾Êά²Äǽ¤Ç¤¹¡£label ¤ò¾Êά¤·¤¿¾ì¹ç¤Ï¡¢ +³ºÅö¤¹¤ë̾Á°¤¬ +ŬÀÚ¤Ëû¤¯¤µ¤ì¤Æ (¡Ö̾Á°¤Îɽ¼¨ÊýË¡¡×¤ò»²¾È)¡¢ +ɽ¼¨¥Æ¥­¥¹¥È¤È¤·¤ÆÂå¤ï¤ê¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¥é¥Ù¥ë¤Ï¡¢É½¼¨ +¥Æ¥­¥¹¥È¤òû½Ì¤¹¤ë¾ì¹ç¤ä¡¢³ºÅö¤¹¤ë̾Á°¤È°Û¤Ê¤ë +ɽ¼¨¥Æ¥­¥¹¥È¤ò»ØÄꤹ¤ë¾ì¹ç¤Ë»È +¤¤¤Þ¤¹¡£ +.LP +.RS +¥Ð¡¼¥¸¥ç¥ó 1.2 ¤Ç¤Ï¡¢¥é¥Ù¥ë¤Ç¤Ï¤Ê¤¯¡¢Ì¾Á°¤À¤±¤¬ +HTML ¥¿¥° +.B +¤Ë°Ï¤Þ¤ì¤Æ¼«Æ°Åª¤Ëɽ¼¨¤µ¤ì¤Þ¤¹¡£¥Ð¡¼¥¸¥ç¥ó 1.2.2 °Ê¹ß¤Ï¡¢ +.B +¤Ï¾ï¤Ë¡¢¥é¥Ù¥ë¤¬»ÈÍѤµ¤ì¤Æ¤¤¤ë¤«¤É¤¦¤«¤Ë¤«¤«¤ï¤é¤º¡¢ +ɽ¼¨²Äǽ¤Ê¥Æ¥­¥¹¥È¤ò°Ï¤ß¤Þ¤¹¡£ +.TP 2 +\(bu +.I package.class#member +¤Ë¤Ï¡¢Java ¸À¸ì¤ÇÍ­¸ú¤ÊǤ°Õ¤Î̾Á°¡¢¤Ä¤Þ¤ê¥Ñ¥Ã¥±¡¼¥¸¡¢ +¥¯¥é¥¹¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢ +¥³¥ó¥¹¥È¥é¥¯¥¿¡¢¥á¥½¥Ã¥É¡¢¤Þ¤¿¤Ï¥Õ¥£¡¼¥ë¥É¤Î̾Á°¤ò»ØÄꤷ¤Þ¤¹ +¡£¤¿¤À¤·¡¢¥á¥ó¥Ð̾¤ÎÁ°¤Î +¥É¥Ã¥È¤Ï¡¢¥Ï¥Ã¥·¥åʸ»ú (#) ¤ÇÃÖ¤­´¹¤¨¤Þ¤¹¡£ +»ØÄꤷ¤¿Ì¾Á°¤¬¡¢¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤ë¥¯¥é¥¹ +¤Ë¤¢¤ë¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï³ºÅö¤¹¤ë̾Á°¤Ø¤Î¥ê¥ó¥¯¤ò¼«Æ°Åª¤ËºîÀ®¤·¤Þ¤¹¡£ +³°Éô»²¾È¥¯¥é¥¹¤Ø¤Î¥ê¥ó¥¯¤òºîÀ®¤¹¤ë +¤Ë¤Ï¡¢ +.B \-link +¥ª¥×¥·¥ç¥ó¤ò»È¤¤¤Þ¤¹¡£»²¾È¤µ¤ì¤ë¥¯¥é¥¹¤Ë°¤·¤Æ¤¤¤Ê¤¤Ì¾Á°¤Î +¥É¥­¥å¥á¥ó¥È¤ò»² +¾È¤¹¤ë¤Ë¤Ï¡¢¤Û¤«¤Î 2 ¤Ä¤Î·Á¼°¤Î +.B @see +¥¿¥°¤ò»È¤¤¤Þ¤¹¡£1 ÈÖÌܤΰú¿ô¤Ë¤Ä¤¤¤Æ¤Ï¡¢¡Ö̾Á°¤Î»ØÄê¡× ¤Ç +¾Ü¤·¤¯ÀâÌÀ¤·¤Þ¤¹¡£ +.TP 2 +\(bu +.I label +¤Ï¾Êά²Äǽ¤Ê¥Æ¥­¥¹¥È¤Ç¡¢ +¥ê¥ó¥¯¤Î¥é¥Ù¥ë¤È¤·¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£label ¤Ë¤Ï¶õÇò¤ò´Þ +¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£label ¤ò¾Êά¤·¤¿¾ì¹ç¤Ï¡¢ +.I package.class.member +¤¬¡¢¸½ºß¤Î¥¯¥é¥¹¤ª¤è¤Ó¥Ñ¥Ã¥±¡¼¥¸¤Ë±þ¤¸¤Æ +ŬÀÚ¤Ëû¤¯¤µ¤ì¤Æɽ¼¨¤µ¤ì¤Þ¤¹¡£¡Ö̾Á°¤Îɽ¼¨ÊýË¡¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP 2 +\(bu +¶õÇòʸ»ú¤Ï +.I package.class#member +¤È +.IR label +¤Î´Ö¤Î¶èÀÚ¤êʸ»ú¤Ç¤¹¡£³ç¸ÌÆâ¤Î¶õÇòʸ»ú¤Ï¡¢ +¥é¥Ù¥ë¤Î³«»Ï¤ò°ÕÌ£¤·¤Ê¤¤¤¿¤á¡¢ +¥á¥½¥Ã¥É¤Î¥Ñ¥é¥á¡¼¥¿´Ö¤Î¥Ç¥ê¥ß¥¿¤È¤·¤Æ»È¤¦¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +Îã-¤³¤ÎÎã¤Ç¤Ï¡¢Character ¥¯¥é¥¹¤Î +.B @see +¥¿¥°¤¬ String ¥¯¥é¥¹¤Î equals ¥á¥½¥Ã¥É¤ò»²¾È¤·¤Æ¤¤¤Þ¤¹¡£ +¥¿¥°¤Ë¤Ï¡¢Ì¾Á° \f3String#equals(Object)\f1 ¤È¥é¥Ù¥ë \f3equals\f1 ¤Î +ξÊý¤Î°ú¿ô¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£ +.LP +.ft 3 +.nf + /** + * @see String#equals(Object) equals + */ +.fi +.ft 1 +.LP +ɸ½à¥É¥Ã¥¯¥ì¥Ã¥È¤Ï¡¢¼¡¤Î¤è¤¦¤Ê HTML ¤òÀ¸À®¤·¤Þ¤¹¡£ +.LP +.ft 3 +.nf +
+
´ØÏ¢¹àÌÜ: +
equals +
+.fi +.ft 1 +.LP +¤³¤ì¤Ï¡¢¥Ö¥é¥¦¥¶¤Ç¤Ï¼¡¤Î¤è¤¦¤Ëɽ¼¨¤µ¤ì¡¢ +¥é¥Ù¥ë¤¬¥ê¥ó¥¯¥Æ¥­¥¹¥È¤Ë¤Ê¤ê¤Þ¤¹¡£ +.LP +.ft 3 +.nf + ´ØÏ¢¹àÌÜ: + equals +.fi +.ft 1 +.LP +.B ̾Á°¤Î»ØÄê: +¤³¤Î +.I package.class#member +¤Î̾Á°¤Ï¡¢ +.BR java.lang.String#toUpperCase() +¤Î¤è¤¦¤Ë´°Á´»ØÄꤹ¤ë¤³¤È¤â¡¢ +.B String#toUpperCase() +¤ä +.BR #toUpperCase() +¤Ê¤É¤Î¤è¤¦¤Ë´°Á´»ØÄꤷ¤Ê¤¤¤³¤È¤â²Äǽ¤Ç¤¹¡£ +´°Á´»ØÄꤷ¤Ê¤¤¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢Ä̾ï¤Î Java ¥³¥ó¥Ñ¥¤¥é¤Î¸¡º÷½ç½ø¤Ç¸¡º÷¤ò¹Ô¤¤¤Þ¤¹¡£ +¾ÜºÙ¤Ï¡¢°Ê²¼¤Î¡Ö +.BR @see +¤Î¸¡º÷½ç½ø¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£»ØÄꤹ¤ë̾Á°¤Ç¤Ï¡¢ +¥á¥½¥Ã¥É¤ÎÊ£¿ô¤Î°ú¿ô¤Î·¿¤Î´Ö¤Ê¤É¡¢ +³ç¸ÌÆâ¤Ë¶õÇò¤ò´Þ¤á¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +.LP +û¤¤Éôʬ½¤¾þ̾¤ò»ØÄꤹ¤ë¤³¤È¤ÎÍøÅÀ¤Ï¡¢ÆþÎϤ¹¤ë +ʸ»ú¿ô¤¬¸º¤ë¤³¤È¤È¡¢¥½¡¼¥¹¥³¡¼¥É¤¬ +Æɤߤ䤹¤¯¤Ê¤ë¤³¤È¤Ç¤¹¡£°Ê²¼¤Îɽ¤Ë¼¨¤¹¤Î¤Ï¡¢¤µ¤Þ¤¶¤Þ¤Ê +·Á¼°¤Î̾Á°¤Ç¤¹¡£Class ¤Ë¤Ï +¥¯¥é¥¹¤«¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢Type ¤Ë¤Ï¥¯¥é¥¹¡¢¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡¢ +ÇÛÎ󡢤ޤ¿¤Ï´ðËܥǡ¼¥¿·¿¡¢ +method ¤Ë¤Ï¥á¥½¥Ã¥É¤Þ¤¿¤Ï¥³¥ó¥¹¥È¥é¥¯¥¿¤ò»ØÄê¤Ç¤­¤Þ¤¹¡£ +.LP +.sp +.TS +box; +cbp-1 +l . +T{ +°ìÈÌŪ¤Ê·Á¼° +.BI @see " package.class#member" +T} += +¸½ºß¤Î¥¯¥é¥¹¤Î¥á¥ó¥Ð¤ò»²¾È¤¹¤ë +@see #field +@see #method(Type, Type,...) +@see #method(Type argname, Type argname,...) +.LP +¸½ºß¤Î¡¢¤Þ¤¿¤Ï¥¤¥ó¥Ý¡¼¥È¤µ¤ì¤¿¥Ñ¥Ã¥±¡¼¥¸¤ÎÊ̤Υ¯¥é¥¹¤ò»²¾È¤¹¤ë +@see Class#field +@see Class#method(Type, Type,...) +@see Class#method(Type argname, Type argname,...) +@see Class +.LP +Ê̤Υѥ屡¼¥¸¤ò»²¾È¤¹¤ë (´°Á´½¤¾þ) +@see package.Class#field +@see package.Class#method(Type, Type,...) +@see package.Class#method(Type argname, Type argname,...) +@see package.Class +@see package +.TE +.LP +¾å¤Îɽ¤ËÂФ¹¤ëÃí¤ò°Ê²¼¤Ë¼¨¤·¤Þ¤¹¡£ +.LP +.TP 2 +\(bu +¥¯¥é¥¹¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸¤ò¾Ê¤¤¤¿ºÇ½é¤Î·Á¼°¤Î¥»¥Ã¥È¤Ç¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¸½ºß¤Î¥¯¥é¥¹³¬ÁؤÀ¤±¤Ç¸¡º÷¤ò¹Ô¤¤¤Þ¤¹¡£ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢¸½ºß¤Î¥¯¥é¥¹¤«¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¥á¥ó¥Ð¡¢¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤« +¥¹¡¼¥Ñ¡¼¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î 1 ¤Ä¡¢¤Þ¤¿¤Ï +¿Æ¥¯¥é¥¹¤«¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î 1 ¤Ä (¸¡º÷¼ê½ç 1 ¡Á 3) ¤ò¸¡º÷¤·¤Þ¤¹¡£ +¸½ºß¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î¤Û¤«¤ÎÉôʬ¤ä¤Û¤«¤Î¥Ñ¥Ã¥±¡¼¥¸ (¸¡º÷¼ê½ç 4 ¡Á 5) ¤Ï +¸¡º÷¤·¤Þ¤»¤ó¡£ +.TP 2 +\(bu +¥á¥½¥Ã¥É¤Þ¤¿¤Ï¥³¥ó¥¹¥È¥é¥¯¥¿¤¬¡¢getValue ¤Î¤è¤¦¤Ë +³ç¸Ì¤òÉÕ¤±¤º¤Ë̾Á°¤È¤·¤ÆÆþÎϤµ¤ì¡¢ +¤«¤ÄƱ¤¸Ì¾Á°¤Î¥Õ¥£¡¼¥ë¥É¤¬¤Ê¤¤¾ì¹ç¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤ÏÀµ³Î¤Ë¥ê¥ó¥¯¤òºîÀ®¤·¤Þ¤¹¤¬¡¢³ç¸Ì¤È°ú¿ô¤òÄɲ乤ë¤è¤¦¤Ë +Â¥¤¹·Ù¹ð¥á¥Ã¥»¡¼¥¸¤ò½ÐÎÏ +¤·¤Þ¤¹¡£¤³¤Î¥á¥½¥Ã¥É¤ò¥ª¡¼¥Ð¡¼¥í¡¼¥É¤·¤¿¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢»ØÄꤵ¤ì¤¿¥á¥½¥Ã¥É¤Ç¤Ï¤Ê¤¯¡¢¸¡º÷¤Ç¸«¤Ä¤«¤Ã¤¿ +ºÇ½é¤Î¥á¥½¥Ã¥É¤Ë¥ê¥ó¥¯¤·¤Þ¤¹¡£ +.TP 2 +\(bu +Æþ¤ì»Ò¤ÎÆâÉô¥¯¥é¥¹¤Ï¡¢¤É¤Î·Á¼°¤Î¾ì¹ç¤Ç¤â¡¢Ã±¤Ë +.BR inner +¤È¤¤¤¦·Á¤Ç¤Ï¤Ê¤¯¡¢ +.BR outer.inner +¤È¤¤¤¦·Á¤Ç»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +.TP 2 +\(bu +¤¹¤Ç¤Ë½Ò¤Ù¤¿¤È¤ª¤ê¡¢¥¯¥é¥¹¤È¥á¥ó¥Ð¤ò¶èÀÚ¤ë¤Î¤Ë¡¢¥É¥Ã¥È (\f3.\f1) ¤Ç¤Ï¤Ê¤¯ +¥Ï¥Ã¥·¥åʸ»ú (\f3#\f1) ¤¬ +»È¤ï¤ì¤Æ¤¤¤ë¤³¤È¤ËÃí°Õ¤·¤Æ¤¯¤À¤µ¤¤¡£¥É¥Ã¥È¤Ï¡¢¥¯¥é¥¹¡¢ +Æþ¤ì»Ò¤Î¥¯¥é¥¹¡¢¥Ñ¥Ã¥±¡¼¥¸¡¢¤ª¤è¤Ó +¥µ¥Ö¥Ñ¥Ã¥±¡¼¥¸¤ò¶èÀÚ¤ë¤Î¤Ë¤â»È¤ï¤ì¤Þ¤¹¡£ +¤¿¤À¤·¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ç¤Ï°ìÈ̤˵öÍÆÈϰϤ¬¹­¤¯¡¢ +¤¢¤¤¤Þ¤¤¤µ¤¬¤Ê¤±¤ì¤Ð¡¢¥É¥Ã¥È¤Ç¤âÀµ¤·¤¯²òÀϤµ¤ì¤Þ¤¹¡£ +¤½¤Î¾ì¹ç¤Ç¤â·Ù¹ð¤Ïɽ¼¨¤µ¤ì¤Þ¤¹¡£ + +.LP +.B @see ¤Î¸¡º÷½ç½ø: +.B javadoc +¤Ï¡¢¥½¡¼¥¹¥Õ¥¡¥¤¥ë (\f3.java\f1)¡¢¥Ñ¥Ã¥±¡¼¥¸ +¥Õ¥¡¥¤¥ë (\f3package.html\f1)¡¢¤Þ¤¿¤Ï +³µÍ×¥Õ¥¡¥¤¥ë (\f3overview.html\f1) Æâ¤Ç»È¤ï¤ì¤ë +.B @see +¥¿¥°¤ò½èÍý¤·¤Þ¤¹¡£¤¢¤È¤Î 2 ¤Ä¤Î¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢ +.BR @see +¤ò»È¤Ã¤Æ»ØÄꤹ¤ë̾Á°¤ò´°Á´½¤¾þ¤¹¤ëɬÍפ¬¤¢¤ê¤Þ¤¹¡£ +¥½¡¼¥¹¥Õ¥¡¥¤¥ë¤Ç¤Ï¡¢´°Á´½¤¾þ̾ +¤ÈÉôʬ½¤¾þ̾¤Î¤É¤Á¤é¤ò»ØÄꤹ¤ë¤³¤È¤â¤Ç¤­¤Þ¤¹¡£ +.LP +.B javadoc +¥Ä¡¼¥ë¤¬¡¢´°Á´½¤¾þ¤µ¤ì¤Æ¤¤¤Ê¤¤ +.B .java +¥Õ¥¡¥¤¥ë¤Ç +.B @see +¥¿¥°¤ò¸«¤Ä¤±¤¿¾ì¹ç¡¢»ØÄꤵ¤ì¤¿Ì¾Á°¤ò Java ¥³¥ó¥Ñ¥¤¥é¤È +Ʊ¤¸½ç½ø¤Ç¸¡º÷¤·¤Þ¤¹¡£¤¿¤À¤·¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢°ìÉô¤Î̾Á°¶õ´Ö¤Î¤¢¤¤¤Þ¤¤¤µ¤Ï¸¡½Ð¤·¤Þ¤»¤ó¡£¤³¤ì¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤¬¡¢¥½¡¼¥¹¥³¡¼¥É¤Ë¤³¤ì¤é¤Î¥¨¥é¡¼¤¬Â¸ºß¤·¤Æ¤¤¤Ê¤¤¤³¤È¤ò +Á°Äó¤È¤·¤ÆÆ°ºî¤¹¤ë¤¿¤á¤Ç¤¹¡£ +¸¡º÷½ç½ø¤Ï¡¢¡ÖJava Language Specification¡×Âè 2 ÈǤÎÂè 6 ¾Ï¡ÖNames¡×¤Ç +Àµ¼°¤ËÄêµÁ¤µ¤ì¤Æ¤¤¤Þ¤¹¡£¶ñÂÎŪ¤Ë¤Ï¡¢ +¸¡º÷¤Ï¼¡¤Î½ç½ø¤Ç¹Ô¤ï¤ì¤Þ¤¹¡£ +.LP +.TP 4 +1. +¸½ºß¤Î¥¯¥é¥¹¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹ +.PD 0 +.TP 4 +2. +̾Á°¤ò°Ï¤à¥¯¥é¥¹¤È¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡£¤â¤Ã¤È¤â¶á¤¤¤â¤Î¤òºÇ½é¤Ë¸¡º÷ +.TP 4 +3. +¥¹¡¼¥Ñ¡¼¥¯¥é¥¹¤È¥¹¡¼¥Ñ¡¼¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡£¤â¤Ã¤È¤â¶á¤¤¤â¤Î¤òºÇ½é¤Ë¸¡º÷ +.TP 4 +4. +¸½ºß¤Î¥Ñ¥Ã¥±¡¼¥¸ +.TP 4 +5. +¥¤¥ó¥Ý¡¼¥È¤µ¤ì¤ë¥Ñ¥Ã¥±¡¼¥¸¡¢¥¯¥é¥¹¡¢ +¤ª¤è¤Ó¥¤¥ó¥¿¥Õ¥§¡¼¥¹¡£import ʸ¤Î½ç½ø¤Ë½¾¤Ã¤Æ¸¡º÷ +.PD +.LP +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢°ìÃפ¹¤ë̾Á°¤¬¸«¤Ä¤«¤ë¤Þ¤Ç¡¢³Æ¥¯¥é¥¹¤Ë¤Ä¤¤¤Æ +¼ê½ç 1 ¡Á 3 ¤ò·«¤êÊÖ¤·¤Æ¸¡º÷¤ò³¤± +¤Þ¤¹¡£¤Ä¤Þ¤ê¡¢¸½ºß¤Î¥¯¥é¥¹¤È¤½¤Î¥¯¥é¥¹¤ò°Ï¤à +¥¯¥é¥¹ E ¤ò¸¡º÷¤·¤¿¤¢¤È¡¢E ¤Î¥¹¡¼¥Ñ¥¯¥é¥¹¤ò +¸¡º÷¤·¡¢ºÇ¸å¤Ë E ¤ò°Ï¤à¥¯¥é¥¹¤ò¸¡º÷¤·¤Þ¤¹¡£¼ê½ç 4 ¤È 5 ¤Ç¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢1 ¤Ä¤Î¥Ñ¥Ã¥±¡¼¥¸Æâ¤Ç¤Î¥¯¥é¥¹¤Þ¤¿¤Ï¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤Î¸¡º÷¤ò¡¢ +¤Ê¤ó¤é¤«¤Î·è¤Þ¤Ã¤¿½ç +½ø¤Ç¹Ô¤¦¤ï¤±¤Ç¤Ï¤¢¤ê¤Þ¤»¤ó (¤³¤Î¸¡º÷½ç½ø¤Ï¥³¥ó¥Ñ¥¤¥é¤Ë°Í¸¤·¤Þ¤¹)¡£ +¼ê½ç 5 ¤Ç¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢ +.BR java.lang +¤ò¸¡º÷¤·¤Þ¤¹¡£¤³¤ì¤Ï¡¢ +.BR java.lang +¤¬¤¹¤Ù¤Æ¤Î¥×¥í¥°¥é¥à¤Ë¤è¤Ã¤Æ¼«Æ°Åª¤Ë¥¤¥ó¥Ý¡¼¥È¤µ¤ì¤ë¤¿¤á¤Ç¤¹¡£ +.LP +.B javadoc +¥Ä¡¼¥ë¤Ï¡¢É¬¤º¤·¤â¥µ¥Ö¥¯¥é¥¹¤ò¸¡º÷¤¹¤ë¤ï¤±¤Ç¤Ï¤Ê¤¯¡¢Javadoc ¥Ä¡¼¥ë¤Î +¼Â¹ÔÃæ¤Ë¤Û¤«¤Î¥Ñ¥Ã¥±¡¼¥¸ +¤Î¥É¥­¥å¥á¥ó¥È¤¬À¸À®¤µ¤ì¤ë¾ì¹ç¤Ç¤â¡¢¤Û¤«¤Î¥Ñ¥Ã¥±¡¼¥¸¤Î +¸¡º÷¤Ï¹Ô¤¤¤Þ¤»¤ó¡£ +¤¿¤È¤¨¤Ð¡¢ +.B @see +¥¿¥°¤¬ +.B java.awt.event.KeyEvent +¥¯¥é¥¹¤Ë¤¢¤Ã¤Æ¡¢ +.B java.awt +¥Ñ¥Ã¥±¡¼¥¸¤Ë¤¢¤ë̾Á°¤ò»²¾È¤¹¤ë¾ì¹ç¡¢ +.B javadoc +¤Ï¡¢¤½¤Î¥¯¥é¥¹¤¬¥¤¥ó¥Ý¡¼¥È¤·¤Ê¤¤¸Â¤ê¤½¤Î¥Ñ¥Ã¥±¡¼¥¸¤ò¸¡º÷¤·¤Þ¤»¤ó¡£ +.LP +.B ̾Á°¤Îɽ¼¨ÊýË¡: +.I label +¤¬¾Êά¤µ¤ì¤¿¾ì¹ç¤Ï¡¢ +.I package.class.member +¤¬É½¼¨¤µ¤ì¤Þ¤¹¡£Ä̾package.class.member ¤Ï¡¢¸½ºß¤Î +¥¯¥é¥¹¤ª¤è¤Ó¥Ñ¥Ã¥±¡¼¥¸¤Ë +±þ¤¸¤ÆŬÀÚ¤Ëû¤¯¤µ¤ì¤Þ¤¹¡£¡Öû¤¯¤µ¤ì¤ë¡×¤È¤Ï¡¢ +.B javadoc +¥Ä¡¼¥ë¤¬É¬Í׺Ǿ®¸Â¤Î̾Á°¤òɽ¼¨¤¹¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£ +¤¿¤È¤¨¤Ð¡¢String.toUpperCase() ¥á¥½¥Ã¥É¤¬Æ±¤¸ +¥¯¥é¥¹¤Î¥á¥ó¥Ð¤Ø¤Î»²¾È¤È¡¢Ê̤Υ¯¥é¥¹¤Î¥á¥ó¥Ð¤Ø¤Î +»²¾È¤ò´Þ¤ó¤Ç¤¤¤ë¾ì¹ç¡¢¥¯¥é¥¹Ì¾¤Ï¸å¼Ô¤Î¾ì¹ç¤À¤±É½¼¨¤µ¤ì¤Þ¤¹¡£ + + +.sp 1n +.TS +lb lb lb +l lb l. +T{ +.nf +»²¾È¤Î +¼ïÎà +T} Îã ɽ¼¨ + +T{ +.nf +@see ¥¿¥° +¤¬Æ±¤¸ +¥¯¥é¥¹ +¤Î¥á¥ó¥Ð +¤ò»²¾È +T} T{ +.nf +@see +String#toLowerCase() +T} T{ +.nf +toLowerCase() +(¥¯¥é¥¹Ì¾¤ò¾Êά) +T} + +T{ +.nf +@see +¥¿¥°¤¬ +Ê̤Π+¥¯¥é¥¹¤Î +¥á¥ó¥Ð +¤ò»²¾È +T} T{ +.nf +@see +Character#toLowerCase(char) +T} T{ +.nf +Character.toLowerCase(char) +(¥¯¥é¥¹Ì¾¤ò´Þ¤à) +T} +.TE +.LP +.B @see ¤ÎÎã: +±¦Â¦¤Î¥³¥á¥ó¥È¤Ï¡¢ +.B @see +¥¿¥°¤¬ +.BR java.applet.Applet: +¤Ê¤É¤ÎÊ̤Υѥ屡¼¥¸¤Î¥¯¥é¥¹Æâ¤Ë¤¢¤ë¾ì¹ç¤Ë̾Á°¤¬ +ɽ¼¨¤µ¤ì¤ëÊýË¡¤ò¼¨¤·¤Æ¤¤¤Þ¤¹¡£ +.LP +.sp 1n +.TS +li li +lb l. +Îã ´ØÏ¢¹àÌÜ: +@see java.lang.String // String +@see java.lang.String The String class // The String class +@see String // String +@see String#equals(Object) // String.equals(Object) +@see String#equals T{ +.nf +// String.equals\e + (java.lang.Object) +T} +@see java.lang.Object#wait(long) T{ +.nf +// java.lang.Object.\e + wait(long) +T} +@see Character#MAX_RADIX // Character.MAX_RADIX +@see Java Spec // Java Spec +@see "The Java Programming Language" T{ +.nf +// "The Java Programming \e + Language" +T} +.TE +.RE +.TP +@see ¤ò¡¢¥É¥­¥å¥á¥ó¥È²½¤ÎÂоݤˤ·¤Æ¤¤¤Ê¤¤¥¯¥é¥¹¤Ë¤Þ¤Ç³ÈÄ¥¤¹¤ë¤Ë¤Ï¡¢ +.B \-link +¥ª¥×¥·¥ç¥ó¤ò»ÈÍѤ·¤Þ¤¹¡£ +.TP +.BI @since " since-text" +À¸À®¤µ¤ì¤ë¥É¥­¥å¥á¥ó¥È¤Ë¡¢»ØÄꤵ¤ì¤¿ +.IR since-text +¤ò»ý¤Ä [ƳÆþ¤µ¤ì¤¿¥Ð¡¼¥¸¥ç¥ó] +¸«½Ð¤·¤òÄɲä·¤Þ¤¹¡£¤³¤Î¥Æ¥­¥¹¥È¤Ë¤Ï¡¢ +ÆÃÊ̤ÊÆâÉô¹½Â¤¤Ï¤¢¤ê¤Þ¤»¤ó¡£¤³¤Î¥¿¥°¤Ï¡¢ +ÆÃÄê¤ÎÊѹ¹¤Þ¤¿¤Ïµ¡Ç½¤¬¡¢since-text ¤Ë¤è¤Ã¤Æ +»ØÄꤵ¤ì¤¿¥½¥Õ¥È¥¦¥§¥¢¤Î¥ê¥ê¡¼¥¹°ÊÍè¡¢ +·Ñ³¤·¤Æ¸ºß¤¹¤ë¤³¤È¤ò°ÕÌ£¤·¤Þ¤¹¡£¤¿¤È¤¨¤Ð¡¢¼¡¤Î¤È¤ª¤ê¤Ç¤¹¡£ +.RS +.LP +.ft 3 +.nf +@since 1.4 +.fi +.ft 1 +.RE +.LP +Java ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à¤Î¥½¡¼¥¹¥³¡¼¥É¤Î¾ì¹ç¡¢¤³¤Î¥¿¥°¤Ï¡¢ +Java ¥×¥é¥Ã¥È¥Õ¥©¡¼¥à API »ÅÍͤΥС¼¥¸¥ç¥ó¤ò¼¨¤·¤Þ¤¹¡£ +¤½¤ÎÊѹ¹¤äµ¡Ç½¤¬¥ê¥Õ¥¡¥ì¥ó¥¹¼ÂÁõ¤ËÄɲ䵤줿»þ´ü¤ò +¼¨¤¹¤È¤Ï¸Â¤ê¤Þ¤»¤ó¡£ +.TP +.BI @serial " field-description" | include | exclude +¥Ç¥Õ¥©¥ë¥È¤ÎľÎó²½²Äǽ¥Õ¥£¡¼¥ë¥É¤Î doc ¥³¥á¥ó¥È¤Ç»ÈÍѤ·¤Þ¤¹¡£ +.RS +.LP +¾Êά²Äǽ¤Ê field-description ¤Ï¡¢ +¥Õ¥£¡¼¥ë¥É¤Î doc ¥³¥á¥ó¥È¤ò³ÈÄ¥¤·¤Þ¤¹¡£ +¤³¤ÎÀâÌÀ¤Ç¤Ï¡¢¥Õ¥£¡¼¥ë¥É¤Î°ÕÌ£¤ª¤è¤Ó +¼è¤êÆÀ¤ëÃͤΥꥹ¥È¤ò»ØÄꤷ¤Ê¤±¤ì¤Ð¤Ê¤ê¤Þ¤»¤ó¡£ +ɬÍפʾì¹ç¤Ë¤Ï¡¢Ê£¿ô¤Î¹Ô¤Ë¤Þ¤¿¤¬¤Ã¤ÆÀâÌÀ¤òµ­½Ò¤¹¤ë¤³¤È¤¬¤Ç¤­¤Þ¤¹¡£ +ɸ½à¥É¥Ã¥¯¥ì¥Ã¥È¤Ï¡¢¤³¤Î¾ðÊó¤ò¡¢Ä¾Î󲽤µ¤ì¤¿·Á¼°¤Î¥Ú¡¼¥¸¤ËÄɲä·¤Þ¤¹¡£ +.LP +.BR include +¤È +.BR exclude +°ú¿ô¤Ï¡¢Ä¾Î󲽤µ¤ì¤¿·Á¼°¤Î¥Ú¡¼¥¸¤Ë¥¯¥é¥¹¤Þ¤¿¤Ï¥Ñ¥Ã¥±¡¼¥¸¤ò´Þ¤á¤ë¤Ù¤­¤«¡¢ +¤¢¤ë¤¤¤Ï¤³¤ì¤é¤Î°ú¿ô¤ò½ü¤¯¤Ù¤­¤«¤ò»ØÄꤷ¤Þ¤¹¡£ +¤³¤ì¤é¤Ï¡¢¼¡¤Î¤è¤¦¤ËÆ°ºî¤·¤Þ¤¹¡£ +.LP +.TP 2 +\(bu +.BR Serializable +¤ò¼ÂÁõ¤¹¤ë public ¥¯¥é¥¹¤Þ¤¿¤Ï protected ¥¯¥é¥¹¤Ï¡¢ +¤½¤Î¥¯¥é¥¹ (¤Þ¤¿¤Ï¤½¤Î¥Ñ¥Ã¥±¡¼¥¸) ¤¬ +.BR @serial +.BR exclude +¤È¥Þ¡¼¥¯¤µ¤ì¤Æ¤¤¤Ê¤¤¸Â¤ê´Þ¤á¤é¤ì¤Þ¤¹¡£ +.TP 2 +\(bu +.BR Serializable +¤ò¼ÂÁõ¤¹¤ë private ¥¯¥é¥¹¤Þ¤¿¤Ï package\-private ¥¯¥é¥¹¤Ï¡¢ +¤½¤Î¥¯¥é¥¹ (¤Þ¤¿¤Ï¤½¤Î¥Ñ¥Ã¥±¡¼¥¸) ¤¬ +.BR @serial +.BR include +¤È¥Þ¡¼¥¯¤µ¤ì¤Æ¤¤¤Ê¤¤¸Â¤ê½ü¤«¤ì¤Þ¤¹¡£ +.LP +Îã: +.BR javax.swing +¥Ñ¥Ã¥±¡¼¥¸¤Ï¡¢(package.html Æâ¤Ç) +.BR @serial +.BR exclude +¤È¥Þ¡¼¥¯¤µ¤ì¤Þ¤¹¡£public ¥¯¥é¥¹¤Ç¤¢¤ë +.BR java.sercurity.BasicPermission +¤Ï¡¢ +.BR @serial +.BR exclude +¤È¥Þ¡¼¥¯¤µ¤ì¤Þ¤¹¡£package\-private ¥¯¥é¥¹¤Ç¤¢¤ë +.BR java.util.PropertyPermissionCollection +¤Ï¡¢ +.BR @serial +.BR include +¤È¥Þ¡¼¥¯¤µ¤ì¤Þ¤¹¡£ +.LP +¥¯¥é¥¹¥ì¥Ù¥ë¤Î¥¿¥° +.BR @serial +¤Ï¡¢¥Ñ¥Ã¥±¡¼¥¸¥ì¥Ù¥ë¤Î +.BR @serial +¤ò¥ª¡¼¥Ð¡¼¥é¥¤¥É¤·¤Þ¤¹¡£ +.LP +¤³¤ì¤é¤Î¥¿¥°¤Î»ÈÍÑË¡¤Ë¤Ä¤¤¤Æ¤Î¾ÜºÙ¤È +»ÈÍÑÎã¤Ï¡¢¡ÖJava ¥ª¥Ö¥¸¥§¥¯¥ÈľÎó²½»ÅÍÍ¡× +¤Î 1.6 Àá ¡Ö¥¯¥é¥¹¤ÎľÎó²½²Äǽ¤Ê¥Õ¥£¡¼¥ë¥É¤ª¤è¤Ó¥Ç¡¼¥¿¤Îʸ½ñ²½¡×¤ò +»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +¤Þ¤¿¡¢¡ÖľÎ󲽤ΠFAQ¡×¤â»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£¤³¤³¤Ë¤Ï¡¢¡Ö +.B \-private +¥¹¥¤¥Ã¥Á¤ò»ØÄꤷ¤Ê¤¤¤Ç +.B javadoc +¤ò¼Â¹Ô¤·¤¿¾ì¹ç¡¢private ¥Õ¥£¡¼¥ë¥É¤Ë +.B @serial +¥¿¥°¤¬¤Ê¤¤¤³¤È¤Ë¤Ä¤¤¤Æ·Ù¹ð¤¬É½¼¨¤µ¤ì¤ë¤Î¤Ï¤Ê¤¼¤«¡×¤È¤¤¤¦¼ÁÌä¤È +¤½¤Î²óÅú¤¬¤¢¤ê¤Þ¤¹¡£ +.LP +.RE +.TP +.BI @serialField " field-name field-type field-description" +Serializable ¥¯¥é¥¹¤Î serialPersistentFields ¥á¥ó¥Ð¤Î ObjectStreamField ¥³¥ó¥Ý¡¼¥Í¥ó¥È +¤ò¥É¥­¥å¥á¥ó¥È²½¤·¤Þ¤¹¡£³Æ ObjectStreamField ¥³¥ó¥Ý¡¼¥Í¥ó¥È¤ËÂФ·¤Æ +.B @serialField +¥¿¥°¤ò 1 ¤Ä»È¤¦É¬Íפ¬¤¢¤ê¤Þ¤¹¡£ +.TP +.BI @serialData " data-description" +.I data-description +¤Ï¡¢Ä¾Î󲽤µ¤ì¤¿·Á¼°¤Ç¤Î¥Ç¡¼¥¿¤Î·¿¤È½ç½ø¤ò +ÀâÌÀ¤¹¤ë¥Æ¥­¥¹¥È¤Ç¤¹¡£ ¤³¤Î¥Ç¡¼¥¿¤Ë¤Ï¡¢ +Æäˡ¢writeObject ¥á¥½¥Ã¥É¤Ë¤è¤Ã¤Æ½ñ¤­¹þ¤Þ¤ì¤ë¾Êά²Äǽ¤Ê +¥Ç¡¼¥¿¡¢¤ª¤è¤Ó Externalizable.writeExternal ¥á¥½¥Ã¥É¤Ë¤è¤Ã¤Æ +½ñ¤­¹þ¤Þ¤ì¤ë¤¹¤Ù¤Æ¤Î¥Ç¡¼¥¿ (´ðÄ쥯¥é¥¹¤ò´Þ¤à) ¤¬´Þ¤Þ¤ì¤Þ¤¹¡£ +.LP +.RS +.B @serialData +¥¿¥°¤Ï¡¢writeObject¡¢readObject¡¢writeExternal¡¢¤ª¤è¤Ó readExternal ¤Î³Æ¥á¥½¥Ã¥É¤Î +doc ¥³¥á¥ó¥È¤Ç»ÈÍѤǤ­¤Þ¤¹¡£ +.RE +.TP +.BI @throws " class-name description" +.B @throws +¥¿¥°¤È +.B @exception +¥¿¥°¤ÏƱµÁ¤Ç¤¹¡£À¸À®¤µ¤ì¤ë¥É¥­¥å¥á¥ó +¥Æ¡¼¥·¥ç¥ó¤Ë¡¢ +.I class-name +¤ª¤è¤Ó +.I description +¥Æ¥­¥¹¥È¤ò»ý¤Ä [Îã³°] ¾®¸«½Ð¤·¤òÄɲä·¤Þ¤¹¡£ +.I class-name +¤Ï¡¢³ºÅö¤¹¤ë¥á¥½¥Ã¥É¤Ë¤è¤Ã¤Æ +¥¹¥í¡¼¤µ¤ì¤ë²ÄǽÀ­¤Î¤¢¤ëÎã³°¤Î̾Á°¤Ç¤¹¡£¤³¤Î¥¯¥é¥¹¤¬´°Á´ +½¤¾þ¤µ¤ì¤Æ¤¤¤Ê¤¤¾ì¹ç¡¢ +.B javadoc +¥Ä¡¼¥ë¤Ï¸¡º÷½ç½ø¤Ë½¾¤Ã¤Æ¥¯¥é¥¹¤òõ¤·¤Þ¤¹¡£ +Ʊ¤¸¤Þ¤¿¤Ï°Û¤Ê¤ëÎã³°¤Î doc ¥³¥á¥ó¥È¤Ç¡¢ +Ê£¿ô¤Î @throws ¥¿¥°¤ò»ÈÍѤǤ­¤Þ¤¹¡£ +.LP +¤¹¤Ù¤Æ¤Î¥Á¥§¥Ã¥¯ºÑ¤ßÎã³°¤¬¥É¥­¥å¥á¥ó¥È²½¤µ¤ì¤ë¤è¤¦¤Ë¤¹¤ë¤¿¤á¤Ë¡¢ +@throws ¥¿¥°¤¬ throws ÀáÆâ¤ÎÎã³°ÍѤ˸ºß¤·¤Ê¤¤¾ì¹ç¤Ï¡¢ +@throws ¥¿¥°¤Î¤¢¤ë¥É¥­¥å¥á¥ó¥È¤Ç¤¢¤ë¤«¤Î¤è¤¦¤Ë¡¢ +.B Javadoc +¥Ä¡¼¥ë¤Ë¤è¤Ã¤ÆÎã³°¤¬ HTML ½ÐÎϤËÀâÌÀ¤Ê¤·¤Ç +¼«Æ°Åª¤ËÄɲ䵤ì¤Þ¤¹¡£ +.LP +¾å½ñ¤­¤µ¤ì¤¿¥á¥½¥Ã¥É¤ÇÌÀ¼¨Åª¤ËÎã³°¤¬Àë¸À¤µ¤ì¤Æ¤¤¤ë¾ì¹ç¤Ë¸Â¤Ã¤Æ¡¢ +¾å½ñ¤­¤µ¤ì¤¿¥á¥½¥Ã¥É¤«¤é¥µ¥Ö¥¯¥é¥¹¤Ø +@throws ¥É¥­¥å¥á¥ó¥È¤¬¥³¥Ô¡¼¤µ¤ì¤Þ¤¹¡£ +¥¤¥ó¥¿¥Õ¥§¡¼¥¹¥á¥½¥Ã¥É¤«¤é¼ÂÁõ¥á¥½¥Ã¥É¤Ë¥³¥Ô¡¼¤µ¤ì¤ë¾ì¹ç¤â +ƱÍͤǤ¹¡£{@inheritDoc} ¤ò»ÈÍѤ·¤Æ¡¢·Ñ¾µ¥É¥­¥å¥á¥ó¥È¤ËÂФ·¤Æ +¶¯À©Åª¤Ë @throws ¤òŬÍѤ¹¤ë¤³¤È¤â²Äǽ¤Ç¤¹¡£ +.LP +¾ÜºÙ¤Ï¡Ö@throws ¥¿¥°¤Îµ­½Ò¡×¤ò»²¾È¤·¤Æ¤¯¤À¤µ¤¤¡£ +.TP +.B {@value package.class#field} +{@value} ¤¬ÀÅŪ¥Õ¥£¡¼¥ë¥É¤Î doc ¥³¥á¥ó¥È¤Ç +°ú¿ô¤Ê¤·¤Ç»ÈÍѤµ¤ì¤Æ¤¤¤ë¾ì¹ç¡¢¤½¤ÎÄê¿ô¤ÎÃͤ¬É½¼¨¤µ¤ì¤Þ¤¹¡£ +.LP +.RS 5 +.nf +/** +* The value of this constant is {@value}. +*/ +public static final String SCRIPT_START = "