From 5e80958cdb902abe762215a0f8277b27e6a7f9fe Mon Sep 17 00:00:00 2001 From: kurt Date: Tue, 11 Jan 2011 15:47:49 +0000 Subject: [PATCH] Update to early access build 122. okay jasper@ --- devel/jdk/1.7/Makefile | 33 +- devel/jdk/1.7/distinfo | 30 +- .../patch-corba_make_common_Defs-bsd_gmk | 128 ---- .../patch-corba_make_common_Defs-linux_gmk | 12 - .../patches/patch-corba_make_common_Defs_gmk | 16 +- .../patch-corba_make_common_Mapfile-vers_gmk | 12 - ...-corba_make_common_shared_Compiler-gcc_gmk | 27 - ...atch-corba_make_common_shared_Compiler_gmk | 15 - ...atch-corba_make_common_shared_Defs-bsd_gmk | 8 +- ...ch-corba_make_common_shared_Defs-utils_gmk | 12 +- ...atch-corba_make_common_shared_Platform_gmk | 36 +- .../patch-corba_make_sun_corba_core_Makefile | 22 - ...ative_com_sun_corba_se_internal_io_ioser_c | 180 ----- .../patch-hotspot_agent_src_os_bsd_Makefile | 14 +- ...ch-hotspot_agent_src_os_bsd_libproc_impl_c | 13 +- .../patch-hotspot_agent_src_os_bsd_ps_core_c | 26 +- .../patch-hotspot_agent_src_os_bsd_ps_proc_c | 14 +- .../patch-hotspot_agent_src_os_bsd_symtab_c | 355 +++++++++- .../patch-hotspot_agent_src_os_bsd_symtab_h | 12 + .../1.7/patches/patch-hotspot_make_Makefile | 57 +- .../patches/patch-hotspot_make_bsd_Makefile | 8 +- ...-hotspot_make_bsd_makefiles_buildtree_make | 8 +- ...tch-hotspot_make_bsd_makefiles_cscope_make | 12 + ...patch-hotspot_make_bsd_makefiles_defs_make | 98 +-- .../patch-hotspot_make_bsd_makefiles_gcc_make | 47 +- ...patch-hotspot_make_bsd_makefiles_jsig_make | 30 +- ...h-hotspot_make_bsd_makefiles_launcher_make | 8 +- .../patch-hotspot_make_bsd_makefiles_sa_make | 12 +- ...tch-hotspot_make_bsd_makefiles_saproc_make | 28 +- .../patch-hotspot_make_bsd_makefiles_vm_make | 87 ++- ...-hotspot_make_bsd_makefiles_zeroshark_make | 27 + ...atch-hotspot_make_bsd_platform_amd64_suncc | 9 + ...patch-hotspot_make_bsd_platform_i486_suncc | 9 + .../patch-hotspot_make_bsd_platform_ia64 | 11 + .../patch-hotspot_make_bsd_platform_sparcv9 | 9 + .../patch-hotspot_make_bsd_platform_zero_in | 9 + ...tch-hotspot_make_linux_makefiles_defs_make | 45 ++ ...h-hotspot_make_solaris_makefiles_defs_make | 54 ++ ...h-hotspot_make_windows_makefiles_defs_make | 44 ++ ...hotspot_src_cpu_sparc_vm_globals_sparc_hpp | 12 + ...pot_src_cpu_x86_vm_c1_LIRAssembler_x86_cpp | 14 + ...tch-hotspot_src_cpu_x86_vm_globals_x86_hpp | 12 + ...spot_src_cpu_x86_vm_interp_masm_x86_32_cpp | 44 +- ...h-hotspot_src_cpu_zero_vm_globals_zero_hpp | 12 + ...atch-hotspot_src_os_bsd_launcher_java_md_c | 39 +- ...tspot_src_os_bsd_vm_attachListener_bsd_cpp | 60 +- .../patch-hotspot_src_os_bsd_vm_os_bsd_cpp | 358 +++++++--- .../patch-hotspot_src_os_bsd_vm_vtune_bsd_cpp | 49 ++ ...hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s | 27 +- ...hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s | 8 +- ..._src_os_cpu_bsd_x86_vm_globals_bsd_x86_hpp | 29 + ...tspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp | 74 +- ...cpu_bsd_zero_vm_atomic_bsd_zero_inline_hpp | 660 ++++++++++++++++++ ..._cpu_bsd_zero_vm_bytes_bsd_zero_inline_hpp | 31 + ...sd_zero_vm_orderAccess_bsd_zero_inline_hpp | 16 + ...pot_src_os_cpu_bsd_zero_vm_os_bsd_zero_cpp | 119 ++++ ...pot_src_share_vm_classfile_javaClasses_cpp | 12 + ...rc_share_vm_interpreter_bytecodeTracer_cpp | 14 +- ...patch-hotspot_src_share_vm_prims_forte_cpp | 10 +- ...h-hotspot_src_share_vm_runtime_globals_hpp | 12 - .../patch-hotspot_src_share_vm_runtime_os_cpp | 19 +- ...otspot_src_share_vm_runtime_vm_version_cpp | 12 +- ...are_vm_utilities_globalDefinitions_gcc_hpp | 8 +- ...-hotspot_src_share_vm_utilities_macros_hpp | 8 +- ...hotspot_src_share_vm_utilities_ostream_cpp | 8 +- ...hotspot_src_share_vm_utilities_vmError_cpp | 8 +- .../patch-jdk_make_com_sun_java_pack_Makefile | 12 +- .../patch-jdk_make_com_sun_nio_Makefile | 10 +- .../patch-jdk_make_com_sun_nio_sctp_Makefile | 26 +- ...make_com_sun_security_auth_module_Makefile | 8 +- ...tch-jdk_make_com_sun_tools_attach_Makefile | 8 +- .../patch-jdk_make_common_Defs-bsd_gmk | 142 ++-- .../patch-jdk_make_common_Defs-linux_gmk | 11 +- .../patch-jdk_make_common_Defs-solaris_gmk | 13 + .../patches/patch-jdk_make_common_Defs_gmk | 12 +- .../patches/patch-jdk_make_common_Program_gmk | 16 +- .../patches/patch-jdk_make_common_Release_gmk | 16 +- ...atch-jdk_make_common_shared_Defs-utils_gmk | 8 +- .../patch-jdk_make_common_shared_Defs_gmk | 8 +- .../patch-jdk_make_common_shared_Platform_gmk | 28 +- .../patch-jdk_make_common_shared_Sanity_gmk | 10 +- .../1.7/patches/patch-jdk_make_docs_Makefile | 12 - .../1.7/patches/patch-jdk_make_java_Makefile | 8 +- .../patch-jdk_make_java_hpi_hpi_common_gmk | 15 +- .../patch-jdk_make_java_hpi_native_Makefile | 8 +- .../patch-jdk_make_java_instrument_Makefile | 16 +- .../patches/patch-jdk_make_java_java_Makefile | 19 +- ...tch-jdk_make_java_java_hprof_demo_Makefile | 13 +- .../patches/patch-jdk_make_java_jli_Makefile | 23 +- .../patch-jdk_make_java_management_Makefile | 8 +- .../patch-jdk_make_java_net_FILES_c_gmk | 8 +- .../patches/patch-jdk_make_java_net_Makefile | 12 +- .../patches/patch-jdk_make_java_nio_Makefile | 36 +- .../patch-jdk_make_java_nio_mapfile-bsd | 8 +- .../patches/patch-jdk_make_java_npt_Makefile | 8 +- .../patch-jdk_make_java_redist_FILES_gmk | 18 - .../patch-jdk_make_java_redist_Makefile | 21 - .../patch-jdk_make_java_redist_fonts_Makefile | 30 + .../patch-jdk_make_java_security_Makefile | 8 +- .../patches/patch-jdk_make_java_zip_Makefile | 8 +- .../patch-jdk_make_javax_sound_Makefile | 12 +- .../patches/patch-jdk_make_jpda_back_Makefile | 13 +- ...ch-jdk_make_jpda_transport_socket_Makefile | 12 +- ...patch-jdk_make_mkdemo_jvmti_hprof_Makefile | 20 + .../patches/patch-jdk_make_sun_awt_Makefile | 31 +- .../patch-jdk_make_sun_awt_mapfile-vers-bsd | 20 + .../patches/patch-jdk_make_sun_awt_mawt_gmk | 19 +- .../patches/patch-jdk_make_sun_font_Makefile | 10 +- .../patch-jdk_make_sun_image_generic_Makefile | 21 +- .../patch-jdk_make_sun_image_vis_Makefile | 10 + .../patches/patch-jdk_make_sun_jawt_Makefile | 14 +- .../patches/patch-jdk_make_sun_jdga_Makefile | 12 + .../patch-jdk_make_sun_security_ec_Makefile | 14 +- ...dk_make_sun_security_jgss_wrapper_Makefile | 17 +- .../patch-jdk_make_sun_security_krb5_Makefile | 12 + ...atch-jdk_make_sun_security_pkcs11_Makefile | 16 +- ...jdk_make_sun_security_smartcardio_Makefile | 14 +- .../patch-jdk_make_sun_splashscreen_Makefile | 10 +- ...patch-jdk_make_sun_tracing_dtrace_Makefile | 12 + .../patches/patch-jdk_make_sun_xawt_Makefile | 30 +- .../patch-jdk_make_tools_reorder_Makefile | 17 + .../patch-jdk_src_share_back_commonRef_c | 8 +- .../patches/patch-jdk_src_share_bin_java_c | 26 +- ..._classes_java_awt_GraphicsEnvironment_java | 8 +- ...c_share_classes_java_lang_ClassLoader_java | 8 +- ..._src_share_classes_java_util_TimeZone_java | 8 +- ...are_classes_sun_awt_FontConfiguration_java | 14 +- ..._share_classes_sun_font_FontUtilities_java | 24 + ...share_classes_sun_font_SunFontManager_java | 12 + ...ses_sun_java2d_SunGraphicsEnvironment_java | 40 -- ..._share_classes_sun_print_PSPrinterJob_java | 8 +- ...curity_jgss_wrapper_SunNativeProvider_java | 14 + ...s_sun_security_provider_SeedGenerator_java | 12 + ...sses_sun_security_provider_SunEntries_java | 16 +- ..._src_share_classes_sun_tools_jar_Main_java | 14 +- ...mti_compiledMethodLoad_sample_makefile_txt | 41 ++ ...c_share_lib_security_java_security-openbsd | 17 +- ...native_com_sun_java_util_jar_pack_main_cpp | 10 +- ...are_native_com_sun_media_sound_SoundDefs_h | 10 +- ...h-jdk_src_share_native_common_check_code_c | 14 +- ...e_native_java_lang_fdlibm_include_fdlibm_h | 21 +- ..._src_share_native_java_util_zip_Inflater_c | 10 +- ...re_native_sun_awt_image_DataBufferNative_c | 8 +- ...ive_sun_awt_medialib_mlib_ImageLookUp_64_c | 50 +- ...rc_share_native_sun_font_AccelGlyphCache_c | 8 +- ...rc_share_native_sun_security_ec_ecdecode_c | 12 - ...re_native_sun_security_ec_impl_ecc_impl_h} | 6 +- ...are_native_sun_security_ec_impl_ecdecode_c | 15 + ...rc_share_native_sun_security_ec_impl_oid_c | 15 + ...hare_native_sun_security_ec_impl_secitem_c | 15 + ...jdk_src_share_native_sun_security_ec_oid_c | 12 - ...src_share_native_sun_security_ec_secitem_c | 12 - .../patch-jdk_src_solaris_bin_java_md_c | 41 +- ...olaris_classes_sun_awt_X11FontManager_java | 30 + ...lasses_sun_awt_X11GraphicsEnvironment_java | 30 - ...nio_ch_BsdAsynchronousChannelProvider_java | 103 +++ ...solaris_classes_sun_nio_ch_KQueuePort_java | 326 +++++++++ ...laris_classes_sun_nio_fs_BsdFileStore_java | 8 +- ...lasses_sun_nio_fs_BsdNativeDispatcher_java | 13 +- ...sses_sun_security_provider_NativePRNG_java | 15 +- ...es_sun_tools_attach_BsdVirtualMachine_java | 50 +- ...dk_src_solaris_hpi_include_largefile_bsd_h | 8 +- ...laris_hpi_native_threads_src_threads_bsd_c | 8 +- ...om_sun_management_UnixOperatingSystem_md_c | 8 +- ...solaris_native_java_io_UnixFileSystem_md_c | 11 +- ...c_solaris_native_java_lang_java_props_md_c | 94 +-- ...solaris_native_java_net_Inet4AddressImpl_c | 26 +- ...solaris_native_java_net_Inet6AddressImpl_c | 19 +- ...solaris_native_java_net_NetworkInterface_c | 350 ++++++---- ..._native_java_net_PlainDatagramSocketImpl_c | 28 +- ..._solaris_native_java_net_PlainSocketImpl_c | 10 +- ..._src_solaris_native_java_net_net_util_md_c | 54 +- ...solaris_native_java_nio_MappedByteBuffer_c | 27 - ...c_solaris_native_sun_awt_awt_GraphicsEnv_c | 8 +- ...c_solaris_native_sun_awt_awt_GraphicsEnv_h | 13 - ...c_solaris_native_sun_awt_awt_InputMethod_c | 60 +- ...-jdk_src_solaris_native_sun_awt_fontpath_c | 20 +- ...rc_solaris_native_sun_awt_gtk2_interface_c | 27 +- ...ris_native_sun_java2d_x11_X11SurfaceData_c | 10 +- ..._native_sun_net_spi_DefaultProxySelector_c | 8 +- ...ris_native_sun_nio_ch_DatagramDispatcher_c | 21 + ...olaris_native_sun_nio_ch_FileChannelImpl_c | 119 ++-- ...ch-jdk_src_solaris_native_sun_nio_ch_Net_c | 46 +- ...dk_src_solaris_native_sun_nio_ch_SctpNet_c | 10 +- ...is_native_sun_nio_fs_BsdNativeDispatcher_c | 13 +- ...-jdk_src_solaris_native_sun_xawt_XWindow_c | 8 +- ..._src_solaris_native_sun_xawt_awt_Desktop_c | 16 +- .../patches/patch-langtools_make_build_xml | 16 +- ...hare_classes_com_sun_tools_javah_Util_java | 18 - devel/jdk/1.7/pkg/PLIST-jre | 61 +- devel/jdk/1.7/pkg/PLIST-main | 148 ++-- 191 files changed, 4261 insertions(+), 2303 deletions(-) delete mode 100644 devel/jdk/1.7/patches/patch-corba_make_common_Defs-bsd_gmk delete mode 100644 devel/jdk/1.7/patches/patch-corba_make_common_Defs-linux_gmk delete mode 100644 devel/jdk/1.7/patches/patch-corba_make_common_Mapfile-vers_gmk delete mode 100644 devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler-gcc_gmk delete mode 100644 devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler_gmk delete mode 100644 devel/jdk/1.7/patches/patch-corba_make_sun_corba_core_Makefile delete mode 100644 devel/jdk/1.7/patches/patch-corba_src_share_native_com_sun_corba_se_internal_io_ioser_c create mode 100644 devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_h create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_cscope_make create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_zeroshark_make create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_amd64_suncc create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_i486_suncc create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_ia64 create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_sparcv9 create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_zero_in create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_linux_makefiles_defs_make create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_solaris_makefiles_defs_make create mode 100644 devel/jdk/1.7/patches/patch-hotspot_make_windows_makefiles_defs_make create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_cpu_sparc_vm_globals_sparc_hpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_c1_LIRAssembler_x86_cpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_globals_x86_hpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_cpu_zero_vm_globals_zero_hpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_vtune_bsd_cpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_globals_bsd_x86_hpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_atomic_bsd_zero_inline_hpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_bytes_bsd_zero_inline_hpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_orderAccess_bsd_zero_inline_hpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_os_bsd_zero_cpp create mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_share_vm_classfile_javaClasses_cpp delete mode 100644 devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_globals_hpp create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_common_Defs-solaris_gmk delete mode 100644 devel/jdk/1.7/patches/patch-jdk_make_docs_Makefile delete mode 100644 devel/jdk/1.7/patches/patch-jdk_make_java_redist_FILES_gmk delete mode 100644 devel/jdk/1.7/patches/patch-jdk_make_java_redist_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_java_redist_fonts_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_mkdemo_jvmti_hprof_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_sun_awt_mapfile-vers-bsd create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_sun_image_vis_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_sun_jdga_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_sun_security_krb5_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_sun_tracing_dtrace_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_make_tools_reorder_Makefile create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_FontUtilities_java create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_SunFontManager_java delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_java2d_SunGraphicsEnvironment_java create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_jgss_wrapper_SunNativeProvider_java create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SeedGenerator_java create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_demo_jvmti_compiledMethodLoad_sample_makefile_txt delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_ecdecode_c rename devel/jdk/1.7/patches/{patch-jdk_src_share_native_sun_security_ec_ecc_impl_h => patch-jdk_src_share_native_sun_security_ec_impl_ecc_impl_h} (59%) create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecdecode_c create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_oid_c create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_secitem_c delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_oid_c delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_secitem_c create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11FontManager_java delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11GraphicsEnvironment_java create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_BsdAsynchronousChannelProvider_java create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_KQueuePort_java delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_nio_MappedByteBuffer_c delete mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_h create mode 100644 devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_DatagramDispatcher_c delete mode 100644 devel/jdk/1.7/patches/patch-langtools_src_share_classes_com_sun_tools_javah_Util_java diff --git a/devel/jdk/1.7/Makefile b/devel/jdk/1.7/Makefile index c37319a54c2..73965614e0a 100644 --- a/devel/jdk/1.7/Makefile +++ b/devel/jdk/1.7/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.39 2010/11/27 11:54:53 espie Exp $ +# $OpenBSD: Makefile,v 1.40 2011/01/11 15:47:49 kurt Exp $ SHARED_ONLY= Yes ONLY_FOR_ARCHS= i386 amd64 @@ -6,14 +6,21 @@ ONLY_FOR_ARCHS= i386 amd64 COMMENT-main= Java2(TM) SE Dev Kit v${V} Early Access ${B} COMMENT-jre= Java2(TM) SE Runtime Environment v${V} Early Access ${B} V= 1.7.0.00 -B= b72 -DISTFILES= openjdk-7-ea-src-${B}-17_sep_2009.zip \ - jibx_1_1_5.zip:0 +B= b122 PKGNAME= jdk-${V} PKGNAME-main= jdk-${V}${B} -REVISION-main = 2 PKGNAME-jre= jre-${V}${B} -REVISION-jre = 2 + +# see openjdk/jaxp/jaxp.properties & openjdk/jaxws/jaxws.properties +# in ${WRKDIR} for names and download locations of extra distfiles + +JDK_SRC= openjdk-7-ea-src-${B}-16_dec_2010.zip +JAXP_SRC= jaxp-1_4_4.zip +JAXWS_SRC= jdk7-jaxws2_2-2010_08_19.zip +JAF_SRC= jdk7-jaf-2010_08_19.zip + +DISTFILES= ${JDK_SRC} ${JAXP_SRC}:0 ${JAXWS_SRC}:1 ${JAF_SRC}:1 +EXTRACT_ONLY= ${JDK_SRC} CATEGORIES= devel/jdk java @@ -27,8 +34,13 @@ HOMEPAGE= http://openjdk.java.net/ MASTER_SITES= http://www.java.net/download/openjdk/jdk7/promoted/${B}/ \ http://openbsd.dead-parrot.de/distfiles/ \ - http://www.phil.uu.nl/~lievisse/distfiles/ -MASTER_SITES0= ${MASTER_SITE_SOURCEFORGE:=jibx/} \ + http://distfiles.nl/ +MASTER_SITES0= https://jaxp.dev.java.net/files/documents/913/152561/ \ + http://icedtea.classpath.org/download/drops/ \ + http://openbsd.dead-parrot.de/distfiles/ \ + http://distfiles.nl/ +MASTER_SITES1= http://java.net/downloads/jax-ws/JDK7/ \ + http://icedtea.classpath.org/download/drops/ \ http://openbsd.dead-parrot.de/distfiles/ \ http://distfiles.nl/ @@ -61,14 +73,14 @@ BUILD_DEPENDS+= devel/apache-ant \ archivers/unzip \ print/cups MODULES= converters/libiconv -WANTLIB= X11 Xext Xi Xtst c freetype m pthread sndio stdc++ z +WANTLIB= X11 Xext Xi Xtst Xrender c freetype m pthread sndio stdc++ z USE_GMAKE= Yes MAKE_ENV= ALT_BOOTDIR=${ALT_BOOTDIR} \ ALT_FREETYPE_HEADERS_PATH=${X11BASE}/include \ ALT_FREETYPE_LIB_PATH=${X11BASE}/lib \ - ALT_JIBX_LIBS_PATH=${WRKDIR}/jibx/lib \ + ALT_DROPS_DIR=${DISTDIR} \ ALT_PACKAGE_PATH=${LOCALBASE} \ ALT_X11_PATH=${X11BASE} \ ANT_HOME=${LOCALBASE} \ @@ -112,6 +124,7 @@ COPYDIRS= hotspot/agent/src/os/linux \ hotspot/src/os/linux/launcher \ hotspot/src/os/linux/vm \ hotspot/src/os_cpu/linux_x86/vm \ + hotspot/src/os_cpu/linux_zero/vm \ hotspot/make/linux \ hotspot/make/linux/makefiles \ jdk/src/linux/doc/man \ diff --git a/devel/jdk/1.7/distinfo b/devel/jdk/1.7/distinfo index 75fd6a34828..384d0644477 100644 --- a/devel/jdk/1.7/distinfo +++ b/devel/jdk/1.7/distinfo @@ -1,10 +1,20 @@ -MD5 (jibx_1_1_5.zip) = TPKb03SeWFUXse6cYgiBWA== -MD5 (openjdk-7-ea-src-b72-17_sep_2009.zip) = RicClG7zanoB4RDBjRUHrQ== -RMD160 (jibx_1_1_5.zip) = 3BhilCjejkwjDl8f6+EG0LiES50= -RMD160 (openjdk-7-ea-src-b72-17_sep_2009.zip) = VtsbXMEoynnpP9tTgtNdycLss+8= -SHA1 (jibx_1_1_5.zip) = Brcns4OQOq7pIyh9kK1MEG42L9I= -SHA1 (openjdk-7-ea-src-b72-17_sep_2009.zip) = 8PFrkz7k/rC+9B+ypgc1a7xzZsI= -SHA256 (jibx_1_1_5.zip) = Eh2+W3M4CB/78JzRF1r+XhhipjZz9GfVYOCrTCf7Pxc= -SHA256 (openjdk-7-ea-src-b72-17_sep_2009.zip) = KVyBLnNqC9JorzdlNFaldVABHahKnJyY/vZ6NMGW9B4= -SIZE (jibx_1_1_5.zip) = 6788994 -SIZE (openjdk-7-ea-src-b72-17_sep_2009.zip) = 94044483 +MD5 (jaxp-1_4_4.zip) = LECnWDksSr8tWfNVJA30ag== +MD5 (jdk7-jaf-2010_08_19.zip) = GNFd/XERfarbMyrwA9CCEg== +MD5 (jdk7-jaxws2_2-2010_08_19.zip) = h3XM79O0+i3eUVXsS35M6w== +MD5 (openjdk-7-ea-src-b122-16_dec_2010.zip) = mue188ReSPqHOJdEU3zJBQ== +RMD160 (jaxp-1_4_4.zip) = BeceSONiyaJxmjWaJnV5Lgc5kK8= +RMD160 (jdk7-jaf-2010_08_19.zip) = +637t4HcKqjPo4S41c1hhSLlUSg= +RMD160 (jdk7-jaxws2_2-2010_08_19.zip) = 6Wd/TPncbKOwATI+AhNQnBlkPb0= +RMD160 (openjdk-7-ea-src-b122-16_dec_2010.zip) = 8j9xg/sCj5gGpa8ffBWhCx+kgTA= +SHA1 (jaxp-1_4_4.zip) = IN7vgFtAbmyjzqzzhrcdUFYX3qo= +SHA1 (jdk7-jaf-2010_08_19.zip) = Y+qXDc8Sn7u6OaEy2Pca3Rn78fA= +SHA1 (jdk7-jaxws2_2-2010_08_19.zip) = I7N8JKCufnRshU3TJZE1XyRCG3M= +SHA1 (openjdk-7-ea-src-b122-16_dec_2010.zip) = R2qqIqc+SVA0We5xiUDvpgfI3R4= +SHA256 (jaxp-1_4_4.zip) = ELIDvsW3092PUVqeCY+Aq8MW+vl3vMIgtW7+Pcbp5ek= +SHA256 (jdk7-jaf-2010_08_19.zip) = 5q7+39u0Zz6AGVg9E0T7FiuU4bEDgsNiNk27/ViJwJ4= +SHA256 (jdk7-jaxws2_2-2010_08_19.zip) = uId6r7sVo0i6vK7k7jcvs+LqAoL4/pPTBicv0k14R94= +SHA256 (openjdk-7-ea-src-b122-16_dec_2010.zip) = H2HGuDsLDBUWa/Dkhroj0yAsoOyh+GV4TYgB5nGw+44= +SIZE (jaxp-1_4_4.zip) = 5972577 +SIZE (jdk7-jaf-2010_08_19.zip) = 70613 +SIZE (jdk7-jaxws2_2-2010_08_19.zip) = 5893692 +SIZE (openjdk-7-ea-src-b122-16_dec_2010.zip) = 85656129 diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_Defs-bsd_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_Defs-bsd_gmk deleted file mode 100644 index 6df72493fa8..00000000000 --- a/devel/jdk/1.7/patches/patch-corba_make_common_Defs-bsd_gmk +++ /dev/null @@ -1,128 +0,0 @@ -$OpenBSD: patch-corba_make_common_Defs-bsd_gmk,v 1.3 2009/06/10 19:01:09 kurt Exp $ ---- corba/make/common/Defs-bsd.gmk.orig Sat May 30 11:21:13 2009 -+++ corba/make/common/Defs-bsd.gmk Tue Jun 2 10:41:33 2009 -@@ -40,18 +40,12 @@ - # Get shared JDK settings - include $(BUILDDIR)/common/shared/Defs.gmk - --# Part of INCREMENTAL_BUILD mechanism. --# Compiler emits things like: path/file.o: file.h --# We want something like: relative_path/file.o relative_path/file.d: file.h --CC_DEPEND = -MM --CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' -- - ifndef PLATFORM_SRC - PLATFORM_SRC = $(TOPDIR)/src/solaris - endif # PLATFORM_SRC - - # platform specific include files --PLATFORM_INCLUDE_NAME = $(PLATFORM) -+PLATFORM_INCLUDE_NAME = $(OS_NAME) - PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) - - # suffix used for make dependencies files. -@@ -92,8 +86,14 @@ endif - # We need this frame pointer to make it easy to walk the stacks. - # This should be the default on X86, but ia64 and amd64 may not have this - # as the default. --CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN --CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+LDFLAGS_COMMON_amd64 += -m64 -+CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN -+LDFLAGS_COMMON_i586 += -m32 -+ifeq ($(OS_VENDOR),Apple) -+ # 16-byte stack re-alignment on 32-bit Darwin -+ CFLAGS_REQUIRED_i586 += -mstackrealign -+endif - CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 -@@ -168,7 +168,7 @@ ifeq ($(FASTDEBUG), true) - CXXFLAGS_DBG += $(CC_LOWER_OPT) - endif - --CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \ -+CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -D_ALLBSD_SOURCE $(VERSION_DEFINES) \ - -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT - - ifeq ($(ARCH_DATA_MODEL), 64) -@@ -178,33 +178,15 @@ endif - CPPFLAGS_OPT = - CPPFLAGS_DBG = -DDEBUG - --ifdef LIBRARY -- # Libraries need to locate other libraries at runtime, and you can tell -- # a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) -- # buried inside the .so. The $ORIGIN says to look relative to where -- # the library itself is and it can be followed with relative paths from -- # that. By default we always look in $ORIGIN, optionally we add relative -- # paths if the Makefile sets LD_RUNPATH_EXTRAS to those relative paths. -- # On Bsd we add a flag -z origin, not sure if this is necessary, but -- # doesn't seem to hurt. -- # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. -- # Try: 'readelf -d lib*.so' to see these settings in a library. -- # -- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN -- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) --endif -- --EXTRA_LIBS += -lc -- --LDFLAGS_DEFS_OPTION = -z defs --LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) -- - # - # -L paths for finding and -ljava - # --LDFLAGS_OPT = -Xlinker -O1 - LDFLAGS_COMMON += -L$(LIBDIR)/$(LIBARCH) -+ -+ifneq ($(OS_VENDOR), Apple) -+LDFLAGS_OPT = -Xlinker -O1 - LDFLAGS_COMMON += -Wl,-soname=$(LIB_PREFIX)$(LIBRARY).$(LIBRARY_SUFFIX) -+endif - - # - # -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always -@@ -235,13 +217,9 @@ endif - # - 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) -+# Darwin does not support linker map files. -+ifeq ($(OS_VENDOR), Apple) -+LDNOMAP=true - endif - - # -@@ -270,7 +248,9 @@ override HAVE_ALTZONE = false - override HAVE_FILIOH = false - override HAVE_GETHRTIME = false - override HAVE_GETHRVTIME = false -+ifeq ($(OS_VENDOR),Apple) - override HAVE_SIGIGNORE = true -+endif - override LEX_LIBRARY = -lfl - ifeq ($(STATIC_CXX),true) - override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic -@@ -282,12 +262,8 @@ override LIBSOCKET = - override LIBTHREAD = - override MOOT_PRIORITIES = true - override NO_INTERRUPTIBLE_IO = true --override OPENWIN_HOME = /usr/X11R6 --ifeq ($(ARCH), amd64) --override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 --else -+override OPENWIN_HOME = $(X11_PATH) - override OPENWIN_LIB = $(OPENWIN_HOME)/lib --endif - override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER - override SUN_CMM_SUBDIR = - override THREADS_FLAG = native diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_Defs-linux_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_Defs-linux_gmk deleted file mode 100644 index 98a34844b53..00000000000 --- a/devel/jdk/1.7/patches/patch-corba_make_common_Defs-linux_gmk +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-corba_make_common_Defs-linux_gmk,v 1.1 2009/05/23 03:03:24 kurt Exp $ ---- corba/make/common/Defs-linux.gmk.orig Thu May 14 23:22:22 2009 -+++ corba/make/common/Defs-linux.gmk Thu May 14 23:15:04 2009 -@@ -282,7 +282,7 @@ override LIBSOCKET = - override LIBTHREAD = - override MOOT_PRIORITIES = true - override NO_INTERRUPTIBLE_IO = true --override OPENWIN_HOME = /usr/X11R6 -+override OPENWIN_HOME = $(X11_PATH) - ifeq ($(ARCH), amd64) - override OPENWIN_LIB = $(OPENWIN_HOME)/lib64 - else diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_Defs_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_Defs_gmk index c67db54310e..b9d2ff74612 100644 --- a/devel/jdk/1.7/patches/patch-corba_make_common_Defs_gmk +++ b/devel/jdk/1.7/patches/patch-corba_make_common_Defs_gmk @@ -1,6 +1,6 @@ -$OpenBSD: patch-corba_make_common_Defs_gmk,v 1.3 2009/05/23 03:03:24 kurt Exp $ ---- corba/make/common/Defs.gmk.orig Fri May 8 03:29:39 2009 -+++ corba/make/common/Defs.gmk Thu May 14 23:15:04 2009 +$OpenBSD: patch-corba_make_common_Defs_gmk,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- corba/make/common/Defs.gmk.orig Thu Oct 28 20:16:47 2010 ++++ corba/make/common/Defs.gmk Mon Nov 1 13:15:37 2010 @@ -53,6 +53,28 @@ endif _OUTPUTDIR=$(TOPDIR)/build/$(PLATFORM)-$(ARCH) @@ -30,13 +30,3 @@ $OpenBSD: patch-corba_make_common_Defs_gmk,v 1.3 2009/05/23 03:03:24 kurt Exp $ # # Get platform definitions # -@@ -97,6 +119,9 @@ ifdef PROGRAM - LDLIBS_COMMON = -ldl - endif - -+ ifeq ($(PLATFORM), bsd) -+ LDLIBS_COMMON = -pthread -+ endif - endif # PROGRAM - - LDLIBS_COMMON += $(EXTRA_LIBS) diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_Mapfile-vers_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_Mapfile-vers_gmk deleted file mode 100644 index b9fb4bb83ce..00000000000 --- a/devel/jdk/1.7/patches/patch-corba_make_common_Mapfile-vers_gmk +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-corba_make_common_Mapfile-vers_gmk,v 1.1 2008/03/19 18:05:43 kurt Exp $ ---- corba/make/common/Mapfile-vers.gmk.orig Tue Feb 26 21:48:18 2008 -+++ corba/make/common/Mapfile-vers.gmk Tue Feb 26 21:49:03 2008 -@@ -77,7 +77,7 @@ endif - endif # PLATFORM - - --ifeq ($(PLATFORM), linux) -+ifneq (,$(findstring $(PLATFORM), linux bsd)) - - ifeq ($(VARIANT), OPT) - # OPT build MUST have a mapfile? diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler-gcc_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler-gcc_gmk deleted file mode 100644 index c29b69e3136..00000000000 --- a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler-gcc_gmk +++ /dev/null @@ -1,27 +0,0 @@ -$OpenBSD: patch-corba_make_common_shared_Compiler-gcc_gmk,v 1.3 2009/10/07 01:53:54 kurt Exp $ ---- corba/make/common/shared/Compiler-gcc.gmk.orig Thu Sep 17 03:47:23 2009 -+++ corba/make/common/shared/Compiler-gcc.gmk Sun Sep 27 10:51:12 2009 -@@ -94,6 +94,23 @@ ifeq ($(PLATFORM), linux) - - endif - -+ifeq ($(PLATFORM), bsd) -+ # Settings specific to BSD -+ CC = $(COMPILER_PATH)gcc -+ CPP = $(COMPILER_PATH)gcc -E -+ CXX = $(COMPILER_PATH)g++ -+ REQUIRED_CC_VER = 3.2 -+ -+# Option used to create a shared library -+ifeq ($(OS_VENDOR), Apple) -+ SHARED_LIBRARY_FLAG = -dynamiclib -+else -+ SHARED_LIBRARY_FLAG = -shared -+endif -+ -+ SUN_COMP_VER := $(shell $(CC) --verbose 2>&1 ) -+endif -+ - ifeq ($(PLATFORM), solaris) - - # Settings specific to Solaris diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler_gmk deleted file mode 100644 index 727b2f7909e..00000000000 --- a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Compiler_gmk +++ /dev/null @@ -1,15 +0,0 @@ -$OpenBSD: patch-corba_make_common_shared_Compiler_gmk,v 1.2 2009/05/23 03:03:24 kurt Exp $ ---- corba/make/common/shared/Compiler.gmk.orig Fri May 8 03:29:39 2009 -+++ corba/make/common/shared/Compiler.gmk Thu May 14 23:15:23 2009 -@@ -42,6 +42,11 @@ ifeq ($(PLATFORM), linux) - override CC_VERSION = gcc - endif - -+# BSD uses GNU compilers by default -+ifeq ($(PLATFORM), bsd) -+ override CC_VERSION = gcc -+endif -+ - # Get the compiler specific settings - include $(BUILDDIR)/common/shared/Compiler-$(CC_VERSION).gmk - diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-bsd_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-bsd_gmk index 72f477a25e5..428ffd53bae 100644 --- a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-bsd_gmk +++ b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-bsd_gmk @@ -1,6 +1,6 @@ -$OpenBSD: patch-corba_make_common_shared_Defs-bsd_gmk,v 1.3 2009/01/16 16:49:29 kurt Exp $ ---- corba/make/common/shared/Defs-bsd.gmk.orig Sun Jan 11 21:36:06 2009 -+++ corba/make/common/shared/Defs-bsd.gmk Sun Jan 11 21:41:48 2009 +$OpenBSD: patch-corba_make_common_shared_Defs-bsd_gmk,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- corba/make/common/shared/Defs-bsd.gmk.orig Mon Nov 1 13:15:32 2010 ++++ corba/make/common/shared/Defs-bsd.gmk Mon Nov 1 13:16:09 2010 @@ -54,7 +54,7 @@ $(shell if [ "$1" != "" -a -d "$1" ]; then (cd $1 && p endef @@ -10,7 +10,7 @@ $OpenBSD: patch-corba_make_common_shared_Defs-bsd_gmk,v 1.3 2009/01/16 16:49:29 # UNIXCOMMAND_PATH: path to where the most common Unix commands are. # NOTE: Must end with / so that it could be empty, allowing PATH usage. -@@ -107,7 +107,7 @@ endif +@@ -99,7 +99,7 @@ endif ifneq "$(origin ALT_DEVTOOLS_PATH)" "undefined" DEVTOOLS_PATH :=$(call PrefixPath,$(ALT_DEVTOOLS_PATH)) else diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-utils_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-utils_gmk index fffebff17db..d73b106f889 100644 --- a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-utils_gmk +++ b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Defs-utils_gmk @@ -1,6 +1,6 @@ -$OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.3 2009/01/16 16:49:29 kurt Exp $ ---- corba/make/common/shared/Defs-utils.gmk.orig Fri Dec 19 03:41:17 2008 -+++ corba/make/common/shared/Defs-utils.gmk Wed Jan 14 12:26:56 2009 +$OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- corba/make/common/shared/Defs-utils.gmk.orig Fri Aug 13 03:17:47 2010 ++++ corba/make/common/shared/Defs-utils.gmk Mon Oct 25 18:38:15 2010 @@ -53,6 +53,13 @@ ifeq ($(PLATFORM),linux) UTILS_DEVTOOL_PATH=$(USRBIN_PATH) endif @@ -15,7 +15,7 @@ $OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.3 2009/01/16 16:49:2 ifeq ($(PLATFORM),solaris) UTILS_COMMAND_PATH=$(UNIXCOMMAND_PATH) UTILS_USR_BIN_PATH=$(UNIXCOMMAND_PATH) -@@ -199,3 +206,32 @@ ifeq ($(PLATFORM),solaris) +@@ -198,3 +205,34 @@ ifeq ($(PLATFORM),solaris) ECHO = /usr/bin/echo endif @@ -43,7 +43,9 @@ $OpenBSD: patch-corba_make_common_shared_Defs-utils_gmk,v 1.3 2009/01/16 16:49:2 + else + UNZIP = $(UTILS_DEVTOOL_PATH)unzip + endif -+ ifneq ($(OS_VENDOR), OpenBSD) ++ ifeq ($(OS_VENDOR), OpenBSD) ++ NAWK = $(UTILS_USR_BIN_PATH)awk ++ else + CPIO = $(UTILS_USR_BIN_PATH)cpio + TAR = $(UTILS_USR_BIN_PATH)tar + endif diff --git a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Platform_gmk b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Platform_gmk index 20baff56a26..f3bd519b3c9 100644 --- a/devel/jdk/1.7/patches/patch-corba_make_common_shared_Platform_gmk +++ b/devel/jdk/1.7/patches/patch-corba_make_common_shared_Platform_gmk @@ -1,7 +1,7 @@ -$OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $ ---- corba/make/common/shared/Platform.gmk.orig Thu Sep 17 03:47:23 2009 -+++ corba/make/common/shared/Platform.gmk Mon Oct 5 14:53:53 2009 -@@ -262,6 +262,89 @@ ifeq ($(SYSTEM_UNAME), Linux) +$OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.6 2011/01/11 15:47:49 kurt Exp $ +--- corba/make/common/shared/Platform.gmk.orig Thu Oct 28 20:16:47 2010 ++++ corba/make/common/shared/Platform.gmk Mon Nov 1 13:16:10 2010 +@@ -231,6 +231,101 @@ ifeq ($(SYSTEM_UNAME), Linux) MB_OF_MEMORY := $(shell free -m | fgrep Mem: | sed -e 's@\ \ *@ @g' | cut -d' ' -f2) endif @@ -9,14 +9,14 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54 + PLATFORM = bsd + OS_NAME = freebsd + OS_VENDOR = FreeBSD -+ REQUIRED_OS_VERSION = 6.0 ++ REQUIRED_OS_VERSION = 6.0 +endif + +ifeq ($(SYSTEM_UNAME), Darwin) + PLATFORM = bsd + OS_NAME = darwin + OS_VENDOR = Apple -+ REQUIRED_OS_VERSION = 8.0 ++ REQUIRED_OS_VERSION = 8.0 +endif + +ifeq ($(SYSTEM_UNAME), NetBSD) @@ -42,6 +42,18 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54 + i[3-9]86) \ + echo i586 \ + ;; \ ++ sparc64) \ ++ echo sparcv9 \ ++ ;; \ ++ sparc*) \ ++ echo sparc \ ++ ;; \ ++ x86_64) \ ++ echo amd64 \ ++ ;; \ ++ "Power Macintosh") \ ++ echo ppc \ ++ ;; \ + *) \ + echo $(mach) \ + ;; \ @@ -58,8 +70,8 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54 + endif + endif + -+ # i586 and sparc are 32 bit, amd64 and sparc64 are 64 -+ ifneq (,$(findstring $(ARCH), i586 sparc)) ++ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64 ++ ifneq (,$(findstring $(ARCH), i586 sparc ppc)) + ARCH_DATA_MODEL=32 + else + ARCH_DATA_MODEL=64 @@ -91,10 +103,10 @@ $OpenBSD: patch-corba_make_common_shared_Platform_gmk,v 1.5 2009/10/07 01:53:54 # Windows with and without CYGWIN will be slightly different ifeq ($(SYSTEM_UNAME), Windows_NT) PLATFORM = windows -@@ -411,6 +494,18 @@ else - LOW_MEMORY_MACHINE := true - MAX_VM_MEMORY := 384 - MIN_VM_MEMORY := 128 +@@ -379,6 +474,18 @@ ifndef MAX_VM_MEMORY + export MIN_VM_MEMORY + export LOW_MEMORY_MACHINE + export MAX_VM_MEMORY +endif + +# for OpenBSD/i386 limit to 736 max diff --git a/devel/jdk/1.7/patches/patch-corba_make_sun_corba_core_Makefile b/devel/jdk/1.7/patches/patch-corba_make_sun_corba_core_Makefile deleted file mode 100644 index ab7b5a6975b..00000000000 --- a/devel/jdk/1.7/patches/patch-corba_make_sun_corba_core_Makefile +++ /dev/null @@ -1,22 +0,0 @@ -$OpenBSD: patch-corba_make_sun_corba_core_Makefile,v 1.1 2008/03/19 18:05:43 kurt Exp $ ---- corba/make/sun/corba/core/Makefile.orig Thu Nov 8 12:46:43 2007 -+++ corba/make/sun/corba/core/Makefile Thu Nov 8 12:48:02 2007 -@@ -53,10 +53,18 @@ include $(CORBA_JMK_DIRECTORY)sun_corba.jmk - ifdef STANDALONE_CORBA_WS - # FIXUP: What is this all about? - OTHER_LDFLAGS=-L$(BOOTDIR)/jre/lib/$(ARCH) -L$(BOOTDIR)/jre/lib/$(LIBARCH)/native_threads -ljvm -+ifeq ($(PLATFORM), bsd) -+OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(OS_NAME) -+else - OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM) -+endif - else - OTHER_LDLIBS=$(JVMLIB) -+ifeq ($(PLATFORM), bsd) -+OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(OS_NAME) -+else - OTHER_INCLUDES+=-ICClassHeaders -I$(BOOTDIR)/include -I$(BOOTDIR)/include/$(PLATFORM) -+endif - endif - - diff --git a/devel/jdk/1.7/patches/patch-corba_src_share_native_com_sun_corba_se_internal_io_ioser_c b/devel/jdk/1.7/patches/patch-corba_src_share_native_com_sun_corba_se_internal_io_ioser_c deleted file mode 100644 index 58f4347922b..00000000000 --- a/devel/jdk/1.7/patches/patch-corba_src_share_native_com_sun_corba_se_internal_io_ioser_c +++ /dev/null @@ -1,180 +0,0 @@ -$OpenBSD: patch-corba_src_share_native_com_sun_corba_se_internal_io_ioser_c,v 1.1 2009/05/23 03:03:24 kurt Exp $ ---- corba/src/share/native/com/sun/corba/se/internal/io/ioser.c.orig Thu May 14 23:14:21 2009 -+++ corba/src/share/native/com/sun/corba/se/internal/io/ioser.c Thu May 14 23:13:00 2009 -@@ -24,6 +24,7 @@ - */ - - #include "jni.h" -+#include - - #include "com_sun_corba_se_internal_io_IIOPInputStream.h" - #include "com_sun_corba_se_internal_io_IIOPOutputStream.h" -@@ -643,7 +644,7 @@ JNIEXPORT jclass JNICALL Java_com_sun_corba_se_interna - JNIEXPORT jobject JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getObjectFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetObjectField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetObjectField(env, obj, (jfieldID)(intptr_t)fieldID); - } - - /* -@@ -654,7 +655,7 @@ JNIEXPORT jobject JNICALL Java_com_sun_corba_se_intern - JNIEXPORT jboolean JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getBooleanFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetBooleanField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetBooleanField(env, obj, (jfieldID)(intptr_t)fieldID); - } - - /* -@@ -665,7 +666,7 @@ JNIEXPORT jboolean JNICALL Java_com_sun_corba_se_inter - JNIEXPORT jbyte JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getByteFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetByteField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetByteField(env, obj, (jfieldID)(intptr_t)fieldID); - - } - -@@ -677,7 +678,7 @@ JNIEXPORT jbyte JNICALL Java_com_sun_corba_se_internal - JNIEXPORT jchar JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getCharFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetCharField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetCharField(env, obj, (jfieldID)(intptr_t)fieldID); - - } - -@@ -689,7 +690,7 @@ JNIEXPORT jchar JNICALL Java_com_sun_corba_se_internal - JNIEXPORT jshort JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getShortFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetShortField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetShortField(env, obj, (jfieldID)(intptr_t)fieldID); - } - - /* -@@ -700,7 +701,7 @@ JNIEXPORT jshort JNICALL Java_com_sun_corba_se_interna - JNIEXPORT jint JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getIntFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetIntField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetIntField(env, obj, (jfieldID)(intptr_t)fieldID); - - } - -@@ -713,7 +714,7 @@ JNIEXPORT jint JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT jlong JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getLongFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetLongField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetLongField(env, obj, (jfieldID)(intptr_t)fieldID); - - } - -@@ -725,7 +726,7 @@ JNIEXPORT jlong JNICALL Java_com_sun_corba_se_internal - JNIEXPORT jfloat JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getFloatFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetFloatField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetFloatField(env, obj, (jfieldID)(intptr_t)fieldID); - - } - -@@ -737,7 +738,7 @@ JNIEXPORT jfloat JNICALL Java_com_sun_corba_se_interna - JNIEXPORT jdouble JNICALL Java_com_sun_corba_se_internal_io_IIOPOutputStream_getDoubleFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID) - { -- return (*env)->GetDoubleField(env, obj, (jfieldID)fieldID); -+ return (*env)->GetDoubleField(env, obj, (jfieldID)(intptr_t)fieldID); - - } - -@@ -751,7 +752,7 @@ JNIEXPORT jdouble JNICALL Java_com_sun_corba_se_intern - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setObjectFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jobject v) - { -- (*env)->SetObjectField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetObjectField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -762,7 +763,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setBooleanFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jboolean v) - { -- (*env)->SetBooleanField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetBooleanField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -773,7 +774,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setByteFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jbyte v) - { -- (*env)->SetByteField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetByteField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -784,7 +785,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setCharFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jchar v) - { -- (*env)->SetCharField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetCharField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -795,7 +796,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setShortFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jshort v) - { -- (*env)->SetShortField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetShortField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -806,7 +807,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setIntFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jint v) - { -- (*env)->SetIntField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetIntField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -817,7 +818,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setLongFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jlong v) - { -- (*env)->SetLongField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetLongField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -828,7 +829,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setFloatFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jfloat v) - { -- (*env)->SetFloatField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetFloatField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -839,7 +840,7 @@ JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_ - JNIEXPORT void JNICALL Java_com_sun_corba_se_internal_io_IIOPInputStream_setDoubleFieldOpt - (JNIEnv *env, jobject this, jobject obj, jlong fieldID, jdouble v) - { -- (*env)->SetDoubleField(env, obj, (jfieldID)fieldID, v); -+ (*env)->SetDoubleField(env, obj, (jfieldID)(intptr_t)fieldID, v); - } - - /* -@@ -858,5 +859,5 @@ JNIEXPORT jlong JNICALL Java_com_sun_corba_se_internal - (*env)->ReleaseStringUTFChars(env, fieldName, strFieldName); - (*env)->ReleaseStringUTFChars(env, fieldSig, strFieldSig); - -- return (jlong)fieldID; -+ return (jlong)(intptr_t)fieldID; - } diff --git a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_Makefile b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_Makefile index acef142bf3c..c5ca2c0945b 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_Makefile +++ b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_Makefile @@ -1,12 +1,8 @@ -$OpenBSD: patch-hotspot_agent_src_os_bsd_Makefile,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/agent/src/os/bsd/Makefile.orig Tue Jun 2 13:00:17 2009 -+++ hotspot/agent/src/os/bsd/Makefile Tue Jun 2 13:01:26 2009 -@@ -19,10 +19,10 @@ - # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - # CA 95054 USA or visit www.sun.com if you need additional information or - # have any questions. --# -+# +$OpenBSD: patch-hotspot_agent_src_os_bsd_Makefile,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/agent/src/os/bsd/Makefile.orig Mon Oct 25 18:02:17 2010 ++++ hotspot/agent/src/os/bsd/Makefile Mon Oct 25 18:40:03 2010 +@@ -22,7 +22,7 @@ + # # -ARCH := $(shell if ([ `uname -m` = "ia64" ]) ; then echo ia64 ; elif ([ `uname -m` = "x86_64" ]) ; then echo amd64; elif ([ `uname -m` = "sparc64" ]) ; then echo sparc; else echo i386 ; fi ) diff --git a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_libproc_impl_c b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_libproc_impl_c index 9e7e727e32c..7c3623590ee 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_libproc_impl_c +++ b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_libproc_impl_c @@ -1,7 +1,12 @@ -$OpenBSD: patch-hotspot_agent_src_os_bsd_libproc_impl_c,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/agent/src/os/bsd/libproc_impl.c.orig Tue Jun 2 13:04:27 2009 -+++ hotspot/agent/src/os/bsd/libproc_impl.c Tue Jun 2 13:04:34 2009 -@@ -178,6 +178,9 @@ lib_info* add_lib_info_fd(struct ps_prochandle* ph, co +$OpenBSD: patch-hotspot_agent_src_os_bsd_libproc_impl_c,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/agent/src/os/bsd/libproc_impl.c.orig Mon Oct 25 18:02:17 2010 ++++ hotspot/agent/src/os/bsd/libproc_impl.c Mon Oct 25 18:40:51 2010 +@@ -174,10 +174,13 @@ lib_info* add_lib_info_fd(struct ps_prochandle* ph, co + return NULL; + } + +- newlib->symtab = build_symtab(newlib->fd, libname); ++ newlib->symtab = build_symtab(newlib->fd); if (newlib->symtab == NULL) { print_debug("symbol table build failed for %s\n", newlib->name); } diff --git a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_core_c b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_core_c index 868aa38cd5f..2488062b115 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_core_c +++ b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_core_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/agent/src/os/bsd/ps_core.c.orig Tue Jun 2 13:06:41 2009 -+++ hotspot/agent/src/os/bsd/ps_core.c Tue Jun 2 13:21:01 2009 +$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/agent/src/os/bsd/ps_core.c.orig Mon Oct 25 18:02:17 2010 ++++ hotspot/agent/src/os/bsd/ps_core.c Mon Oct 25 18:42:03 2010 @@ -142,6 +142,7 @@ static map_info* add_class_share_map_info(struct ps_pr map->next = ph->core->class_share_maps; @@ -264,7 +264,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kur if (read_interp_segments(ph) != true) return false; -@@ -870,14 +880,14 @@ static bool read_shared_lib_info(struct ps_prochandle* +@@ -870,26 +880,23 @@ static bool read_shared_lib_info(struct ps_prochandle* // address mentioned in shared object and the actual virtual base where runtime // linker loaded it. We use "base diff" in read_lib_segments call below. @@ -281,7 +281,21 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kur &lib_name_addr, sizeof(uintptr_t)) != PS_OK) { print_debug("can't read address of shared object name\n"); return false; -@@ -921,7 +931,7 @@ static bool read_shared_lib_info(struct ps_prochandle* + } + + // read name of the shared object +- lib_name[0] = '\0'; +- if (lib_name_addr != 0 && +- read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) { ++ if (read_string(ph, (uintptr_t) lib_name_addr, lib_name, sizeof(lib_name)) != true) { + print_debug("can't read shared object name\n"); +- // don't let failure to read the name stop opening the file. If something is really wrong +- // it will fail later. ++ return false; + } + + if (lib_name[0] != '\0') { +@@ -924,7 +931,7 @@ static bool read_shared_lib_info(struct ps_prochandle* } // read next link_map address @@ -290,7 +304,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_core_c,v 1.1 2009/06/10 19:01:09 kur &link_map_addr, sizeof(uintptr_t)) != PS_OK) { print_debug("can't read next link in link_map\n"); return false; -@@ -935,7 +945,6 @@ static bool read_shared_lib_info(struct ps_prochandle* +@@ -938,7 +945,6 @@ static bool read_shared_lib_info(struct ps_prochandle* struct ps_prochandle* Pgrab_core(const char* exec_file, const char* core_file) { ELF_EHDR core_ehdr; ELF_EHDR exec_ehdr; diff --git a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_proc_c b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_proc_c index 778c66b6bd2..d6e43877cf4 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_proc_c +++ b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_ps_proc_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/agent/src/os/bsd/ps_proc.c.orig Tue Jun 2 13:07:59 2009 -+++ hotspot/agent/src/os/bsd/ps_proc.c Tue Jun 2 13:20:36 2009 +$OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/agent/src/os/bsd/ps_proc.c.orig Mon Nov 1 13:14:52 2010 ++++ hotspot/agent/src/os/bsd/ps_proc.c Mon Nov 1 13:31:53 2010 @@ -22,21 +22,23 @@ * */ @@ -33,7 +33,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kur // This file has the libproc implementation specific to live process // For core files, refer to ps_core.c -@@ -50,251 +52,359 @@ static inline uintptr_t align(uintptr_t ptr, size_t si +@@ -50,255 +52,359 @@ static inline uintptr_t align(uintptr_t ptr, size_t si // read "size" bytes of data from "addr" within the target process. // unlike the standard ptrace() function, process_read_data() can handle @@ -408,7 +408,11 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kur - if (nwords > 5 && find_lib(ph, word[5]) == false) { - intptr_t base; - lib_info* lib; +-#ifdef _LP64 - sscanf(word[0], "%lx", &base); +-#else +- sscanf(word[0], "%x", &base); +-#endif - if ((lib = add_lib_info(ph, word[5], (uintptr_t)base)) == NULL) + for (i = 0; i < cnt; i++) { + kve = &freep[i]; @@ -533,7 +537,7 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_ps_proc_c,v 1.1 2009/06/10 19:01:09 kur }; // attach to the process. One and only one exposed stuff -@@ -321,21 +431,14 @@ struct ps_prochandle* Pgrab(pid_t pid) { +@@ -325,21 +431,14 @@ struct ps_prochandle* Pgrab(pid_t pid) { // read library info and symbol tables, must do this before attaching threads, // as the symbols in the pthread library will be used to figure out // the list of threads within the same process. diff --git a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_c b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_c index 6c6ba9335c9..adda8d18a40 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_c +++ b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/agent/src/os/bsd/symtab.c.orig Tue Jun 2 13:08:54 2009 -+++ hotspot/agent/src/os/bsd/symtab.c Tue Jun 2 13:09:00 2009 +$OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/agent/src/os/bsd/symtab.c.orig Mon Oct 25 18:02:17 2010 ++++ hotspot/agent/src/os/bsd/symtab.c Mon Oct 25 18:42:22 2010 @@ -23,10 +23,10 @@ */ @@ -13,30 +13,303 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt #include "symtab.h" #include "salibelf.h" -@@ -56,7 +56,6 @@ typedef struct symtab { - // read symbol table from given fd. - struct symtab* build_symtab(int fd) { +@@ -53,276 +53,9 @@ typedef struct symtab { + struct hsearch_data *hash_table; + } symtab_t; + +- +-// Directory that contains global debuginfo files. In theory it +-// should be possible to change this, but in a Java environment there +-// is no obvious place to put a user interface to do it. Maybe this +-// could be set with an environment variable. +-static const char debug_file_directory[] = "/usr/lib/debug"; +- +-/* The CRC used in gnu_debuglink, retrieved from +- http://sourceware.org/gdb/current/onlinedocs/gdb/Separate-Debug-Files.html#Separate-Debug-Files. */ +-unsigned int gnu_debuglink_crc32 (unsigned int crc, +- unsigned char *buf, size_t len) +-{ +- static const unsigned int crc32_table[256] = +- { +- 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, +- 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, +- 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, +- 0x90bf1d91, 0x1db71064, 0x6ab020f2, 0xf3b97148, 0x84be41de, +- 0x1adad47d, 0x6ddde4eb, 0xf4d4b551, 0x83d385c7, 0x136c9856, +- 0x646ba8c0, 0xfd62f97a, 0x8a65c9ec, 0x14015c4f, 0x63066cd9, +- 0xfa0f3d63, 0x8d080df5, 0x3b6e20c8, 0x4c69105e, 0xd56041e4, +- 0xa2677172, 0x3c03e4d1, 0x4b04d447, 0xd20d85fd, 0xa50ab56b, +- 0x35b5a8fa, 0x42b2986c, 0xdbbbc9d6, 0xacbcf940, 0x32d86ce3, +- 0x45df5c75, 0xdcd60dcf, 0xabd13d59, 0x26d930ac, 0x51de003a, +- 0xc8d75180, 0xbfd06116, 0x21b4f4b5, 0x56b3c423, 0xcfba9599, +- 0xb8bda50f, 0x2802b89e, 0x5f058808, 0xc60cd9b2, 0xb10be924, +- 0x2f6f7c87, 0x58684c11, 0xc1611dab, 0xb6662d3d, 0x76dc4190, +- 0x01db7106, 0x98d220bc, 0xefd5102a, 0x71b18589, 0x06b6b51f, +- 0x9fbfe4a5, 0xe8b8d433, 0x7807c9a2, 0x0f00f934, 0x9609a88e, +- 0xe10e9818, 0x7f6a0dbb, 0x086d3d2d, 0x91646c97, 0xe6635c01, +- 0x6b6b51f4, 0x1c6c6162, 0x856530d8, 0xf262004e, 0x6c0695ed, +- 0x1b01a57b, 0x8208f4c1, 0xf50fc457, 0x65b0d9c6, 0x12b7e950, +- 0x8bbeb8ea, 0xfcb9887c, 0x62dd1ddf, 0x15da2d49, 0x8cd37cf3, +- 0xfbd44c65, 0x4db26158, 0x3ab551ce, 0xa3bc0074, 0xd4bb30e2, +- 0x4adfa541, 0x3dd895d7, 0xa4d1c46d, 0xd3d6f4fb, 0x4369e96a, +- 0x346ed9fc, 0xad678846, 0xda60b8d0, 0x44042d73, 0x33031de5, +- 0xaa0a4c5f, 0xdd0d7cc9, 0x5005713c, 0x270241aa, 0xbe0b1010, +- 0xc90c2086, 0x5768b525, 0x206f85b3, 0xb966d409, 0xce61e49f, +- 0x5edef90e, 0x29d9c998, 0xb0d09822, 0xc7d7a8b4, 0x59b33d17, +- 0x2eb40d81, 0xb7bd5c3b, 0xc0ba6cad, 0xedb88320, 0x9abfb3b6, +- 0x03b6e20c, 0x74b1d29a, 0xead54739, 0x9dd277af, 0x04db2615, +- 0x73dc1683, 0xe3630b12, 0x94643b84, 0x0d6d6a3e, 0x7a6a5aa8, +- 0xe40ecf0b, 0x9309ff9d, 0x0a00ae27, 0x7d079eb1, 0xf00f9344, +- 0x8708a3d2, 0x1e01f268, 0x6906c2fe, 0xf762575d, 0x806567cb, +- 0x196c3671, 0x6e6b06e7, 0xfed41b76, 0x89d32be0, 0x10da7a5a, +- 0x67dd4acc, 0xf9b9df6f, 0x8ebeeff9, 0x17b7be43, 0x60b08ed5, +- 0xd6d6a3e8, 0xa1d1937e, 0x38d8c2c4, 0x4fdff252, 0xd1bb67f1, +- 0xa6bc5767, 0x3fb506dd, 0x48b2364b, 0xd80d2bda, 0xaf0a1b4c, +- 0x36034af6, 0x41047a60, 0xdf60efc3, 0xa867df55, 0x316e8eef, +- 0x4669be79, 0xcb61b38c, 0xbc66831a, 0x256fd2a0, 0x5268e236, +- 0xcc0c7795, 0xbb0b4703, 0x220216b9, 0x5505262f, 0xc5ba3bbe, +- 0xb2bd0b28, 0x2bb45a92, 0x5cb36a04, 0xc2d7ffa7, 0xb5d0cf31, +- 0x2cd99e8b, 0x5bdeae1d, 0x9b64c2b0, 0xec63f226, 0x756aa39c, +- 0x026d930a, 0x9c0906a9, 0xeb0e363f, 0x72076785, 0x05005713, +- 0x95bf4a82, 0xe2b87a14, 0x7bb12bae, 0x0cb61b38, 0x92d28e9b, +- 0xe5d5be0d, 0x7cdcefb7, 0x0bdbdf21, 0x86d3d2d4, 0xf1d4e242, +- 0x68ddb3f8, 0x1fda836e, 0x81be16cd, 0xf6b9265b, 0x6fb077e1, +- 0x18b74777, 0x88085ae6, 0xff0f6a70, 0x66063bca, 0x11010b5c, +- 0x8f659eff, 0xf862ae69, 0x616bffd3, 0x166ccf45, 0xa00ae278, +- 0xd70dd2ee, 0x4e048354, 0x3903b3c2, 0xa7672661, 0xd06016f7, +- 0x4969474d, 0x3e6e77db, 0xaed16a4a, 0xd9d65adc, 0x40df0b66, +- 0x37d83bf0, 0xa9bcae53, 0xdebb9ec5, 0x47b2cf7f, 0x30b5ffe9, +- 0xbdbdf21c, 0xcabac28a, 0x53b39330, 0x24b4a3a6, 0xbad03605, +- 0xcdd70693, 0x54de5729, 0x23d967bf, 0xb3667a2e, 0xc4614ab8, +- 0x5d681b02, 0x2a6f2b94, 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, +- 0x2d02ef8d +- }; +- unsigned char *end; +- +- crc = ~crc & 0xffffffff; +- for (end = buf + len; buf < end; ++buf) +- crc = crc32_table[(crc ^ *buf) & 0xff] ^ (crc >> 8); +- return ~crc & 0xffffffff; +-} +- +-/* Open a debuginfo file and check its CRC. If it exists and the CRC +- matches return its fd. */ +-static int +-open_debug_file (const char *pathname, unsigned int crc) +-{ +- unsigned int file_crc = 0; +- unsigned char buffer[8 * 1024]; +- +- int fd = pathmap_open(pathname); +- +- if (fd < 0) +- return -1; +- +- lseek(fd, 0, SEEK_SET); +- +- for (;;) { +- int len = read(fd, buffer, sizeof buffer); +- if (len <= 0) +- break; +- file_crc = gnu_debuglink_crc32(file_crc, buffer, len); +- } +- +- if (crc == file_crc) +- return fd; +- else { +- close(fd); +- return -1; +- } +-} +- +-/* Find an ELF section. */ +-static struct elf_section *find_section_by_name(char *name, +- int fd, +- ELF_EHDR *ehdr, +- ELF_SHDR *shbuf, +- struct elf_section *scn_cache) +-{ +- ELF_SHDR* cursct = NULL; +- char *strtab; +- int cnt; +- +- if (scn_cache[ehdr->e_shstrndx].c_data == NULL) { +- if ((scn_cache[ehdr->e_shstrndx].c_data +- = read_section_data(fd, ehdr, cursct)) == NULL) { +- return NULL; +- } +- } +- +- strtab = scn_cache[ehdr->e_shstrndx].c_data; +- +- for (cursct = shbuf, cnt = 0; +- cnt < ehdr->e_shnum; +- cnt++, cursct++) { +- if (strcmp(cursct->sh_name + strtab, name) == 0) { +- scn_cache[cnt].c_data = read_section_data(fd, ehdr, cursct); +- return &scn_cache[cnt]; +- } +- } +- +- return NULL; +-} +- +-/* Look for a ".gnu_debuglink" section. If one exists, try to open a +- suitable debuginfo file. */ +-static int open_file_from_debug_link(const char *name, +- int fd, +- ELF_EHDR *ehdr, +- ELF_SHDR *shbuf, +- struct elf_section *scn_cache) +-{ +- int debug_fd; +- struct elf_section *debug_link = find_section_by_name(".gnu_debuglink", fd, ehdr, +- shbuf, scn_cache); +- if (debug_link == NULL) +- return -1; +- char *debug_filename = debug_link->c_data; +- int offset = (strlen(debug_filename) + 4) >> 2; +- static unsigned int crc; +- crc = ((unsigned int*)debug_link->c_data)[offset]; +- char *debug_pathname = malloc(strlen(debug_filename) +- + strlen(name) +- + strlen(".debug/") +- + strlen(debug_file_directory) +- + 2); +- strcpy(debug_pathname, name); +- char *last_slash = strrchr(debug_pathname, '/'); +- if (last_slash == NULL) +- return -1; +- +- /* Look in the same directory as the object. */ +- strcpy(last_slash+1, debug_filename); +- +- debug_fd = open_debug_file(debug_pathname, crc); +- if (debug_fd >= 0) { +- free(debug_pathname); +- return debug_fd; +- } +- +- /* Look in a subdirectory named ".debug". */ +- strcpy(last_slash+1, ".debug/"); +- strcat(last_slash, debug_filename); +- +- debug_fd = open_debug_file(debug_pathname, crc); +- if (debug_fd >= 0) { +- free(debug_pathname); +- return debug_fd; +- } +- +- /* Look in /usr/lib/debug + the full pathname. */ +- strcpy(debug_pathname, debug_file_directory); +- strcat(debug_pathname, name); +- last_slash = strrchr(debug_pathname, '/'); +- strcpy(last_slash+1, debug_filename); +- +- debug_fd = open_debug_file(debug_pathname, crc); +- if (debug_fd >= 0) { +- free(debug_pathname); +- return debug_fd; +- } +- +- free(debug_pathname); +- return -1; +-} +- +-static struct symtab* build_symtab_internal(int fd, const char *filename, bool try_debuginfo); +- +-/* Look for a ".gnu_debuglink" section. If one exists, try to open a +- suitable debuginfo file and read a symbol table from it. */ +-static struct symtab *build_symtab_from_debug_link(const char *name, +- int fd, +- ELF_EHDR *ehdr, +- ELF_SHDR *shbuf, +- struct elf_section *scn_cache) +-{ +- fd = open_file_from_debug_link(name, fd, ehdr, shbuf, scn_cache); +- +- if (fd >= 0) { +- struct symtab *symtab = build_symtab_internal(fd, NULL, /* try_debuginfo */ false); +- close(fd); +- return symtab; +- } +- +- return NULL; +-} +- +-// Given a build_id, find the associated debuginfo file +-static char * +-build_id_to_debug_filename (size_t size, unsigned char *data) +-{ +- char *filename, *s; +- +- filename = malloc(strlen (debug_file_directory) + (sizeof "/.build-id/" - 1) + 1 +- + 2 * size + (sizeof ".debug" - 1) + 1); +- s = filename + sprintf (filename, "%s/.build-id/", debug_file_directory); +- if (size > 0) +- { +- size--; +- s += sprintf (s, "%02x", *data++); +- } +- if (size > 0) +- *s++ = '/'; +- while (size-- > 0) +- s += sprintf (s, "%02x", *data++); +- strcpy (s, ".debug"); +- +- return filename; +-} +- +-// Read a build ID note. Try to open any associated debuginfo file +-// and return its symtab +-static struct symtab* build_symtab_from_build_id(Elf64_Nhdr *note) +-{ +- int fd; +- struct symtab *symtab = NULL; +- +- unsigned char *bytes +- = (unsigned char*)(note+1) + note->n_namesz; +- unsigned char *filename +- = (build_id_to_debug_filename (note->n_descsz, bytes)); +- +- fd = pathmap_open(filename); +- if (fd >= 0) { +- symtab = build_symtab_internal(fd, NULL, /* try_debuginfo */ false); +- close(fd); +- } +- free(filename); +- +- return symtab; +-} +- +-// read symbol table from given fd. If try_debuginfo) is true, also +-// try to open an associated debuginfo file +-static struct symtab* build_symtab_internal(int fd, const char *filename, bool try_debuginfo) { ++// read symbol table from given fd. ++struct symtab* build_symtab(int fd) { ELF_EHDR ehdr; - char *names = NULL; struct symtab* symtab = NULL; // Reading of elf header -@@ -65,7 +64,9 @@ struct symtab* build_symtab(int fd) { +@@ -331,8 +64,9 @@ static struct symtab* build_symtab_internal(int fd, co ELF_SHDR* shbuf = NULL; ELF_SHDR* cursct = NULL; ELF_PHDR* phbuf = NULL; - ELF_PHDR* phdr = NULL; +- int sym_section = SHT_DYNSYM; + int symtab_found = 0; + int dynsym_found = 0; + uint32_t symsection = SHT_SYMTAB; uintptr_t baseaddr = (uintptr_t)-1; -@@ -90,18 +91,30 @@ struct symtab* build_symtab(int fd) { +@@ -357,23 +91,30 @@ static struct symtab* build_symtab_internal(int fd, co for (cursct = shbuf, cnt = 0; cnt < ehdr.e_shnum; cnt++) { scn_cache[cnt].c_shdr = cursct; -- if (cursct->sh_type == SHT_SYMTAB || cursct->sh_type == SHT_STRTAB) { +- if (cursct->sh_type == SHT_SYMTAB || cursct->sh_type == SHT_STRTAB +- || cursct->sh_type == SHT_NOTE || cursct->sh_type == SHT_DYNSYM) { + if (cursct->sh_type == SHT_SYMTAB || + cursct->sh_type == SHT_STRTAB || + cursct->sh_type == SHT_DYNSYM) { @@ -44,6 +317,10 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt goto quit; } } +- if (cursct->sh_type == SHT_SYMTAB) { +- // Full symbol table available so use that +- sym_section = cursct->sh_type; +- } + + if (cursct->sh_type == SHT_SYMTAB) + symtab_found++; @@ -60,8 +337,66 @@ $OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_c,v 1.1 2009/06/10 19:01:09 kurt for (cnt = 1; cnt < ehdr.e_shnum; cnt++) { ELF_SHDR *shdr = scn_cache[cnt].c_shdr; -- if (shdr->sh_type == SHT_SYMTAB) { +- if (shdr->sh_type == sym_section) { + if (shdr->sh_type == symsection) { ELF_SYM *syms; int j, n, rslt; size_t size; +@@ -435,45 +176,6 @@ static struct symtab* build_symtab_internal(int fd, co + } + } + +- // Look for a separate debuginfo file. +- if (try_debuginfo) { +- +- // We prefer a debug symtab to an object's own symtab, so look in +- // the debuginfo file. We stash a copy of the old symtab in case +- // there is no debuginfo. +- struct symtab* prev_symtab = symtab; +- symtab = NULL; +- +-#ifdef NT_GNU_BUILD_ID +- // First we look for a Build ID +- for (cursct = shbuf, cnt = 0; +- symtab == NULL && cnt < ehdr.e_shnum; +- cnt++) { +- if (cursct->sh_type == SHT_NOTE) { +- Elf64_Nhdr *note = (Elf64_Nhdr *)scn_cache[cnt].c_data; +- if (note->n_type == NT_GNU_BUILD_ID) { +- symtab = build_symtab_from_build_id(note); +- } +- } +- cursct++; +- } +-#endif +- +- // Then, if that doesn't work, the debug link +- if (symtab == NULL) { +- symtab = build_symtab_from_debug_link(filename, fd, &ehdr, shbuf, +- scn_cache); +- } +- +- // If we still haven't found a symtab, use the object's own symtab. +- if (symtab != NULL) { +- if (prev_symtab != NULL) +- destroy_symtab(prev_symtab); +- } else { +- symtab = prev_symtab; +- } +- } +- + quit: + if (shbuf) free(shbuf); + if (phbuf) free(phbuf); +@@ -487,11 +189,6 @@ quit: + } + return symtab; + } +- +-struct symtab* build_symtab(int fd, const char *filename) { +- return build_symtab_internal(fd, filename, /* try_debuginfo */ true); +-} +- + + void destroy_symtab(struct symtab* symtab) { + if (!symtab) return; diff --git a/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_h b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_h new file mode 100644 index 00000000000..dfb5988b76c --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_agent_src_os_bsd_symtab_h @@ -0,0 +1,12 @@ +$OpenBSD: patch-hotspot_agent_src_os_bsd_symtab_h,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/agent/src/os/bsd/symtab.h.orig Mon Oct 25 18:43:18 2010 ++++ hotspot/agent/src/os/bsd/symtab.h Mon Oct 25 18:43:25 2010 +@@ -32,7 +32,7 @@ + struct symtab; + + // build symbol table for a given ELF file descriptor +-struct symtab* build_symtab(int fd, const char *filename); ++struct symtab* build_symtab(int fd); + + // destroy the symbol table + void destroy_symtab(struct symtab* symtab); diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_Makefile b/devel/jdk/1.7/patches/patch-hotspot_make_Makefile index 07286bc1988..1830a9637e4 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_Makefile +++ b/devel/jdk/1.7/patches/patch-hotspot_make_Makefile @@ -1,31 +1,42 @@ -$OpenBSD: patch-hotspot_make_Makefile,v 1.1 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/make/Makefile.orig Fri May 15 16:44:15 2009 -+++ hotspot/make/Makefile Fri May 15 16:45:03 2009 -@@ -265,6 +265,19 @@ endif - - # Shared Library +$OpenBSD: patch-hotspot_make_Makefile,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/Makefile.orig Thu Oct 28 20:17:00 2010 ++++ hotspot/make/Makefile Mon Nov 1 13:32:18 2010 +@@ -321,28 +321,28 @@ endif ifneq ($(OSNAME),windows) -+ifeq ($(OSNAME),bsd) -+# BSD-specific LIBRARY_SUFFIX build option + ifeq ($(ZERO_BUILD), true) + ifeq ($(SHARK_BUILD), true) +-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(SHARK_DIR)/%.so ++$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) +-$(EXPORT_SERVER_DIR)/%.so: $(SHARK_DIR)/%.so ++$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(SHARK_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) + else +-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(ZERO_DIR)/%.so ++$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) +-$(EXPORT_SERVER_DIR)/%.so: $(ZERO_DIR)/%.so ++$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(ZERO_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) + endif + else +-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C1_DIR)/%.so ++$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) + $(install-file) +-$(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so +$(EXPORT_JRE_LIB_ARCH_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) -+ $(install-file) + $(install-file) +-$(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so +$(EXPORT_CLIENT_DIR)/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) -+ $(install-file) + $(install-file) +-$(EXPORT_CLIENT_DIR)/64/%.so: $(C1_DIR)/%.so +$(EXPORT_CLIENT_DIR)/64/%.$(LIBRARY_SUFFIX): $(C1_DIR)/%.$(LIBRARY_SUFFIX) -+ $(install-file) + $(install-file) +-$(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so +$(EXPORT_SERVER_DIR)/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) -+ $(install-file) + $(install-file) +-$(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so +$(EXPORT_SERVER_DIR)/64/%.$(LIBRARY_SUFFIX): $(C2_DIR)/%.$(LIBRARY_SUFFIX) -+ $(install-file) -+else - $(EXPORT_JRE_LIB_ARCH_DIR)/%.so: $(C2_DIR)/%.so $(install-file) - $(EXPORT_CLIENT_DIR)/%.so: $(C1_DIR)/%.so -@@ -275,6 +288,7 @@ $(EXPORT_SERVER_DIR)/%.so: $(C2_DIR)/%.so - $(install-file) - $(EXPORT_SERVER_DIR)/64/%.so: $(C2_DIR)/%.so - $(install-file) -+endif + endif endif - - # Jar file (sa-jdi.jar) diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_Makefile b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_Makefile index 7e72a4c2ec2..c782de95486 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_Makefile +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_Makefile @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_make_bsd_Makefile,v 1.2 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/make/bsd/Makefile.orig Fri May 15 16:25:28 2009 -+++ hotspot/make/bsd/Makefile Fri May 15 16:56:20 2009 -@@ -203,7 +203,8 @@ checks: check_os_version check_j2se_version +$OpenBSD: patch-hotspot_make_bsd_Makefile,v 1.3 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/Makefile.orig Tue Jan 4 18:25:17 2011 ++++ hotspot/make/bsd/Makefile Tue Jan 4 18:25:19 2011 +@@ -230,7 +230,8 @@ checks: check_os_version check_j2se_version # Solaris 2.5.1, 2.6). # Disable this check by setting DISABLE_HOTSPOT_OS_VERSION_CHECK=ok. diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_buildtree_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_buildtree_make index 3c05f3ff16d..933d2bc0218 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_buildtree_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_buildtree_make @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_buildtree_make,v 1.1 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/make/bsd/makefiles/buildtree.make.orig Fri May 15 16:59:31 2009 -+++ hotspot/make/bsd/makefiles/buildtree.make Fri May 15 16:59:59 2009 -@@ -277,10 +277,11 @@ env.sh: $(BUILDTREE_MAKE) +$OpenBSD: patch-hotspot_make_bsd_makefiles_buildtree_make,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/buildtree.make.orig Mon Oct 25 18:02:18 2010 ++++ hotspot/make/bsd/makefiles/buildtree.make Mon Oct 25 18:15:44 2010 +@@ -287,10 +287,11 @@ env.sh: $(BUILDTREE_MAKE) [ -n "$$JAVA_HOME" ] && { echo ": \$${JAVA_HOME:=$${JAVA_HOME}}"; }; \ { \ echo "LD_LIBRARY_PATH=.:$${LD_LIBRARY_PATH:+$$LD_LIBRARY_PATH:}\$${JAVA_HOME}/jre/lib/${LIBARCH}/native_threads:\$${JAVA_HOME}/jre/lib/${LIBARCH}:${GCC_LIB}"; \ diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_cscope_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_cscope_make new file mode 100644 index 00000000000..f2ab207c71f --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_cscope_make @@ -0,0 +1,12 @@ +$OpenBSD: patch-hotspot_make_bsd_makefiles_cscope_make,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/cscope.make.orig Mon Oct 25 18:45:11 2010 ++++ hotspot/make/bsd/makefiles/cscope.make Mon Oct 25 18:45:18 2010 +@@ -71,7 +71,7 @@ endif + # OS-specific files for other systems are excluded by default. Use CS_OS=yes + # to include platform-specific files for other platforms. + ifndef CS_OS +-CS_OS = bsd macos solaris win32 ++CS_OS = linux macos solaris win32 bsd + CS_PRUNE_OS = $(patsubst %,-o -name '*%*',$(filter-out ${OS},${CS_OS})) + endif + diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_defs_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_defs_make index 85c6a5fb55e..6f174de051d 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_defs_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_defs_make @@ -1,22 +1,7 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.3 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/make/bsd/makefiles/defs.make.orig Sat May 30 11:21:10 2009 -+++ hotspot/make/bsd/makefiles/defs.make Tue Jun 2 12:37:10 2009 -@@ -28,6 +28,14 @@ - - SLASH_JAVA ?= /java - -+# Library suffix -+OS_VENDOR:=$(shell uname -s) -+ifeq ($(OS_VENDOR),Darwin) -+ LIBRARY_SUFFIX=dylib -+else -+ LIBRARY_SUFFIX=so -+endif -+ - # Need PLATFORM (os-arch combo names) for jdk and hotspot, plus libarch name - ARCH:=$(shell uname -m) - PATH_SEP = : -@@ -61,8 +69,8 @@ ifeq ($(ARCH), sparc64) +$OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/defs.make.orig Mon Nov 1 13:15:17 2010 ++++ hotspot/make/bsd/makefiles/defs.make Mon Nov 1 13:32:58 2010 +@@ -72,8 +72,8 @@ ifeq ($(ARCH), sparc64) HS_ARCH = sparc endif @@ -27,7 +12,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.3 2009/06/10 19:01:09 k ifeq ($(ARCH_DATA_MODEL), 64) ARCH_DATA_MODEL = 64 MAKE_ARGS += LP64=1 -@@ -74,17 +82,27 @@ ifeq ($(ARCH), x86_64) +@@ -85,17 +85,27 @@ ifeq ($(ARCH), x86_64) PLATFORM = bsd-i586 VM_PLATFORM = bsd_i486 HS_ARCH = x86 @@ -62,30 +47,63 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_defs_make,v 1.3 2009/06/10 19:01:09 k + endif endif + # ARM +@@ -116,39 +126,45 @@ endif + JDK_INCLUDE_SUBDIR=bsd -@@ -95,19 +113,13 @@ VM_DEBUG=jvmg + ++# Library suffix ++OS_VENDOR:=$(shell uname -s) ++ifeq ($(OS_VENDOR),Darwin) ++ LIBRARY_SUFFIX=dylib ++else ++ LIBRARY_SUFFIX=so ++endif ++ + # FIXUP: The subdirectory for a debug build is NOT the same on all platforms + VM_DEBUG=jvmg + EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html + + # client and server subdirectories have symbolic links to ../libjsig.so +-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so ++EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server + + ifndef BUILD_CLIENT_ONLY EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt --EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.so -EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so -+EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjsig.$(LIBRARY_SUFFIX) +EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) - ifeq ($(ARCH_DATA_MODEL), 32) - EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client - EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt -- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjsig.so -- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so -- EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so -- EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar --else -- ifeq ($(ARCH),ia64) -- else -- EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so -- EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar -- endif -+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjsig.$(LIBRARY_SUFFIX) -+ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) endif -+EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) -+EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar + + ifneq ($(ZERO_BUILD), true) + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) + endif + endif + + # Serviceability Binaries + # No SA Support for PPC, IA64, ARM or zero +-ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \ +- $(EXPORT_LIB_DIR)/sa-jdi.jar +-ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \ +- $(EXPORT_LIB_DIR)/sa-jdi.jar +-ADD_SA_BINARIES/ppc = +-ADD_SA_BINARIES/ia64 = +-ADD_SA_BINARIES/arm = +-ADD_SA_BINARIES/zero = ++ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ ++ $(EXPORT_LIB_DIR)/sa-jdi.jar ++ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ ++ $(EXPORT_LIB_DIR)/sa-jdi.jar ++ADD_SA_BINARIES/ppc = ++ADD_SA_BINARIES/ia64 = ++ADD_SA_BINARIES/arm = ++ADD_SA_BINARIES/zero = + + EXPORT_LIST += $(ADD_SA_BINARIES/$(HS_ARCH)) +- +- diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_gcc_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_gcc_make index 46234a8464b..b047fb0b077 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_gcc_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_gcc_make @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/make/bsd/makefiles/gcc.make.orig Wed May 20 17:32:15 2009 -+++ hotspot/make/bsd/makefiles/gcc.make Wed May 20 17:32:19 2009 -@@ -22,12 +22,15 @@ +$OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.3 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/gcc.make.orig Mon Nov 1 13:15:17 2010 ++++ hotspot/make/bsd/makefiles/gcc.make Mon Nov 1 13:33:24 2010 +@@ -22,18 +22,22 @@ # # @@ -10,17 +10,24 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 ku #------------------------------------------------------------------------ # CC, CPP & AS + ifdef ALT_COMPILER_PATH ++CXX = $(ALT_COMPILER_PATH)/g++ + CPP = $(ALT_COMPILER_PATH)/g++ + CC = $(ALT_COMPILER_PATH)/gcc + else -CPP = g++ -CC = gcc --AS = $(CC) -c +CXX ?= g++ -+CPP = $(CXX) ++CPP = $(CXX) +CC ?= gcc + endif + +-AS = $(CC) -c +AS = $(CC) -c -x assembler-with-cpp # -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") -@@ -55,7 +58,7 @@ VM_PICFLAG = $(VM_PICFLAG/$(LINK_INTO)) +@@ -67,7 +71,7 @@ endif CFLAGS += $(VM_PICFLAG) CFLAGS += -fno-rtti CFLAGS += -fno-exceptions @@ -29,29 +36,23 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 ku CFLAGS += -fcheck-new ARCHFLAG = $(ARCHFLAG/$(BUILDARCH)) -@@ -65,6 +68,12 @@ ARCHFLAG/ia64 = +@@ -76,10 +80,12 @@ ARCHFLAG/amd64 = -m64 + ARCHFLAG/ia64 = ARCHFLAG/sparc = -m32 -mcpu=v9 ARCHFLAG/sparcv9 = -m64 -mcpu=v9 - +-ARCHFLAG/arm = -fsigned-char + ARCHFLAG/zero = $(ZERO_ARCHFLAG) +-ifndef E500V2 +-ARCHFLAG/ppc = -mcpu=powerpc ++ +# Darwin-specific build flags +ifeq ($(OS_VENDOR), Darwin) + # Ineffecient 16-byte stack re-alignment on Darwin/IA32 + ARCHFLAG/i486 += -mstackrealign -+endif -+ - CFLAGS += $(ARCHFLAG) - AOUT_FLAGS += $(ARCHFLAG) - LFLAGS += $(ARCHFLAG) -@@ -83,7 +92,7 @@ else endif - # Compiler warnings are treated as errors --WARNINGS_ARE_ERRORS = -Werror -+#WARNINGS_ARE_ERRORS = -Werror - - # Except for a few acceptable ones - # Since GCC 4.3, -Wconversion has changed its meanings to warn these implicit -@@ -98,7 +107,12 @@ endif + CFLAGS += $(ARCHFLAG) +@@ -124,7 +130,12 @@ endif CFLAGS_WARN/DEFAULT = $(WARNINGS_ARE_ERRORS) $(ACCEPTABLE_WARNINGS) # Special cases CFLAGS_WARN/BYFILE = $(CFLAGS_WARN/$@)$(CFLAGS_WARN/DEFAULT$(CFLAGS_WARN/$@)) @@ -64,7 +65,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_gcc_make,v 1.2 2009/05/23 03:03:24 ku # The flags to use for an Optimized g++ build OPT_CFLAGS += -O3 -@@ -133,28 +147,40 @@ ifeq ($(BUILDARCH), ia64) +@@ -159,28 +170,40 @@ ifeq ($(BUILDARCH), ia64) LFLAGS += -Wl,-relax endif diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_jsig_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_jsig_make index 6ee1180e0b1..cbab2568e1e 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_jsig_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_jsig_make @@ -1,22 +1,28 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_jsig_make,v 1.3 2009/10/07 01:53:54 kurt Exp $ ---- hotspot/make/bsd/makefiles/jsig.make.orig Sat Sep 26 10:00:44 2009 -+++ hotspot/make/bsd/makefiles/jsig.make Sat Sep 26 10:21:25 2009 -@@ -26,8 +26,13 @@ +$OpenBSD: patch-hotspot_make_bsd_makefiles_jsig_make,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/jsig.make.orig Mon Oct 25 18:02:18 2010 ++++ hotspot/make/bsd/makefiles/jsig.make Mon Oct 25 18:46:39 2010 +@@ -25,11 +25,16 @@ + # Rules to build signal interposition library, used by vm.make # libjsig[_g].so: signal interposition library - JSIG = jsig$(G_SUFFIX) +-JSIG = jsig -LIBJSIG = lib$(JSIG).so ++JSIG = jsig ++JSIG_G = $(JSIG)$(G_SUFFIX) +-JSIG_G = $(JSIG)$(G_SUFFIX) +-LIBJSIG_G = lib$(JSIG_G).so +ifeq ($(OS_VENDOR), Darwin) -+ LIBJSIG = lib$(JSIG).dylib ++ LIBJSIG = lib$(JSIG).dylib ++ LIBJSIG_G = lib$(JSIG_G).dylib +else -+ LIBJSIG = lib$(JSIG).so ++ LIBJSIG = lib$(JSIG).so ++ LIBJSIG_G = lib$(JSIG_G).so +endif -+ + JSIGSRCDIR = $(GAMMADIR)/src/os/$(Platform_os_family)/vm - DEST_JSIG = $(JDK_LIBDIR)/$(LIBJSIG) -@@ -39,7 +44,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig +@@ -42,7 +47,7 @@ LIBJSIG_MAPFILE = $(MAKEFILES_DIR)/mapfile-vers-jsig # cause problems with interposing. See CR: 6466665 # LFLAGS_JSIG += $(MAPFLAG:FILENAME=$(LIBJSIG_MAPFILE)) @@ -25,12 +31,12 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_jsig_make,v 1.3 2009/10/07 01:53:54 k # DEBUG_BINARIES overrides everything, use full -g debug information ifeq ($(DEBUG_BINARIES), true) -@@ -49,7 +54,7 @@ endif +@@ -52,7 +57,7 @@ endif $(LIBJSIG): $(JSIGSRCDIR)/jsig.c $(LIBJSIG_MAPFILE) @echo Making signal interposition lib... $(QUIETLY) $(CC) $(SYMFLAG) $(ARCHFLAG) $(SHARED_FLAG) $(PICFLAG) \ - $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< -ldl + $(LFLAGS_JSIG) $(JSIG_DEBUG_CFLAGS) -o $@ $< + $(QUIETLY) [ -f $(LIBJSIG_G) ] || { ln -s $@ $(LIBJSIG_G); } install_jsig: $(LIBJSIG) - @echo "Copying $(LIBJSIG) to $(DEST_JSIG)" diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_launcher_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_launcher_make index 1fb35a8efe7..506486fe50b 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_launcher_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_launcher_make @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_launcher_make,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/make/bsd/makefiles/launcher.make.orig Tue Jun 2 12:37:33 2009 -+++ hotspot/make/bsd/makefiles/launcher.make Tue Jun 2 12:37:40 2009 -@@ -44,7 +44,7 @@ ifeq ($(LINK_INTO),AOUT) +$OpenBSD: patch-hotspot_make_bsd_makefiles_launcher_make,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/launcher.make.orig Mon Oct 25 18:02:18 2010 ++++ hotspot/make/bsd/makefiles/launcher.make Mon Oct 25 18:15:44 2010 +@@ -46,7 +46,7 @@ ifeq ($(LINK_INTO),AOUT) LIBS_LAUNCHER += $(STATIC_STDCXX) $(LIBS) else LAUNCHER.o = launcher.o diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_sa_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_sa_make index 67fc58a3627..9d9dcf21f07 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_sa_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_sa_make @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_sa_make,v 1.3 2009/05/23 03:27:41 kurt Exp $ ---- hotspot/make/bsd/makefiles/sa.make.orig Sat May 16 22:21:37 2009 -+++ hotspot/make/bsd/makefiles/sa.make Sat May 16 22:22:26 2009 -@@ -42,8 +42,8 @@ SA_CLASSPATH = $(BOOT_JAVA_HOME)/lib/tools.jar +$OpenBSD: patch-hotspot_make_bsd_makefiles_sa_make,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/sa.make.orig Mon Nov 1 13:15:18 2010 ++++ hotspot/make/bsd/makefiles/sa.make Mon Nov 1 13:16:13 2010 +@@ -45,8 +45,8 @@ MODULELIB_PATH= $(BOOT_JAVA_HOME)/lib/modules # gnumake 3.78.1 does not accept the *s that # are in AGENT_FILES1 and AGENT_FILES2, so use the shell to expand them @@ -10,5 +10,5 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_sa_make,v 1.3 2009/05/23 03:27:41 kur +AGENT_FILES1 := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES1)) +AGENT_FILES2 := $(shell /bin/test -d $(AGENT_DIR) && /bin/ls $(AGENT_FILES2)) - SA_CLASSDIR = $(GENERATED)/saclasses - + AGENT_FILES1_LIST := $(GENERATED)/agent1.classes.list + AGENT_FILES2_LIST := $(GENERATED)/agent2.classes.list diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_saproc_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_saproc_make index af9f99d2f37..1cd55ac2a69 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_saproc_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_saproc_make @@ -1,16 +1,24 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54 kurt Exp $ ---- hotspot/make/bsd/makefiles/saproc.make.orig Sat Sep 26 10:00:44 2009 -+++ hotspot/make/bsd/makefiles/saproc.make Sat Sep 26 10:22:44 2009 -@@ -26,18 +26,30 @@ +$OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.5 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/saproc.make.orig Mon Oct 25 18:02:18 2010 ++++ hotspot/make/bsd/makefiles/saproc.make Mon Oct 25 18:47:00 2010 +@@ -25,23 +25,34 @@ + # Rules to build serviceability agent library, used by vm.make # libsaproc[_g].so: serviceability agent - SAPROC = saproc$(G_SUFFIX) +- +-SAPROC = saproc -LIBSAPROC = lib$(SAPROC).so +- ++SAPROC = saproc + SAPROC_G = $(SAPROC)$(G_SUFFIX) +-LIBSAPROC_G = lib$(SAPROC_G).so +ifeq ($(OS_VENDOR), Darwin) -+ LIBSAPROC = lib$(SAPROC).dylib ++ LIBSAPROC = lib$(SAPROC).dylib ++ LIBSAPROC_G = lib$(SAPROC_G).dylib +else -+ LIBSAPROC = lib$(SAPROC).so ++ LIBSAPROC = lib$(SAPROC).so ++ LIBSAPROC_G = lib$(SAPROC_G).so +endif + AGENT_DIR = $(GAMMADIR)/agent @@ -33,7 +41,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54 SAMAPFILE = $(SASRCDIR)/mapfile -@@ -56,7 +68,10 @@ checkAndBuildSA: +@@ -60,7 +71,10 @@ checkAndBuildSA: $(MAKE) -f vm.make $(LIBSAPROC); \ fi @@ -45,7 +53,7 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54 $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) $(QUIETLY) if [ "$(BOOT_JAVA_HOME)" = "" ]; then \ -@@ -69,12 +84,12 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) +@@ -73,12 +87,12 @@ $(LIBSAPROC): $(SASRCFILES) $(SAMAPFILE) -I$(SASRCDIR) \ -I$(GENERATED) \ -I$(BOOT_JAVA_HOME)/include \ @@ -57,6 +65,6 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_saproc_make,v 1.4 2009/10/07 01:53:54 -o $@ \ - -lthread_db + $(SALIBS) + $(QUIETLY) [ -f $(LIBSAPROC_G) ] || { ln -s $@ $(LIBSAPROC_G); } install_saproc: checkAndBuildSA - $(QUIETLY) if [ -e $(LIBSAPROC) ] ; then \ diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_vm_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_vm_make index c7f0b578a42..938f450cb46 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_vm_make +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_vm_make @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kurt Exp $ ---- hotspot/make/bsd/makefiles/vm.make.orig Sun Sep 27 09:39:51 2009 -+++ hotspot/make/bsd/makefiles/vm.make Sun Sep 27 10:41:35 2009 -@@ -86,6 +86,10 @@ CPPFLAGS = \ +$OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/vm.make.orig Mon Nov 1 13:15:19 2010 ++++ hotspot/make/bsd/makefiles/vm.make Mon Nov 1 13:33:41 2010 +@@ -90,6 +90,10 @@ CPPFLAGS = \ ${JRE_VERSION} \ ${VM_DISTRO} @@ -12,39 +12,64 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kur # CFLAGS_WARN holds compiler options to suppress/enable warnings. CFLAGS += $(CFLAGS_WARN/BYFILE) -@@ -95,7 +99,7 @@ CFLAGS += $(CFLAGS/NOEX) - # Extra flags from gnumake's invocation or environment +@@ -100,7 +104,7 @@ CFLAGS += $(CFLAGS/NOEX) CFLAGS += $(EXTRA_CFLAGS) + LFLAGS += $(EXTRA_CFLAGS) -LIBS += -lm -ldl -lpthread +LIBS += -lm -pthread # By default, link the *.o into the library, not the executable. LINK_INTO$(LINK_INTO) = LIBJVM -@@ -110,7 +114,12 @@ include $(MAKEFILES_DIR)/dtrace.make +@@ -114,9 +118,15 @@ include $(MAKEFILES_DIR)/dtrace.make + #---------------------------------------------------------------------- # JVM - JVM = jvm$(G_SUFFIX) --LIBJVM = lib$(JVM).so +-JVM = jvm +-LIBJVM = lib$(JVM).so +-LIBJVM_G = lib$(JVM)$(G_SUFFIX).so ++JVM = jvm +ifeq ($(OS_VENDOR), Darwin) -+ LIBJVM = lib$(JVM).dylib -+ CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE ++ LIBJVM = lib$(JVM).dylib ++ LIBJVM_G = lib$(JVM)$(G_SUFFIX).dylib ++ CFLAGS += -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE +else -+ LIBJVM = lib$(JVM).so ++ LIBJVM = lib$(JVM).so ++ LIBJVM_G = lib$(JVM)$(G_SUFFIX).so +endif JVM_OBJ_FILES = $(Obj_Files) -@@ -124,7 +133,7 @@ mapfile_reorder : mapfile $(REORDERFILE) - rm -f $@ - cat $^ > $@ +@@ -137,15 +147,7 @@ mapfile_reorder : mapfile $(REORDERFILE) + vm.def: $(Res_Files) $(Obj_Files) + sh $(GAMMADIR)/make/bsd/makefiles/build_vm_def.sh *.o > $@ --STATIC_CXX = true +-ifeq ($(SHARK_BUILD), true) +- STATIC_CXX = false +-else +- ifeq ($(ZERO_LIBARCH), ppc64) +- STATIC_CXX = false +- else +- STATIC_CXX = true +- endif +-endif +STATIC_CXX = false ifeq ($(LINK_INTO),AOUT) LIBJVM.o = -@@ -142,14 +151,14 @@ else +@@ -157,14 +159,21 @@ else + LFLAGS_VM$(LDNOMAP) += $(MAPFLAG:FILENAME=$(LIBJVM_MAPFILE)) + LFLAGS_VM += $(SONAMEFLAG:SONAME=$(LIBJVM)) + ++ ifeq ($(OS_VENDOR), Darwin) ++ LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/. ++ LFLAGS_VM += -Xlinker -rpath -Xlinker @loader_path/.. ++ LFLAGS_VM += -Xlinker -install_name -Xlinker @rpath/$(@F) ++ endif ++ + # JVM is statically linked with libgcc[_s] and libstdc++; this is needed to + # get around library dependency and compatibility issues. Must use gcc not + # g++ to link. ifeq ($(STATIC_CXX), true) LFLAGS_VM += $(STATIC_LIBGCC) LIBS_VM += $(STATIC_STDCXX) @@ -55,13 +80,15 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kur endif LIBS_VM += $(LIBS) +@@ -177,7 +186,6 @@ ifeq ($(SHARK_BUILD), true) + LIBS_VM += $(LLVM_LIBS) endif -LINK_VM = $(LINK_LIB.c) # rule for building precompiled header $(PRECOMPILED_HEADER): $(Precompiled_Files) -@@ -177,11 +186,6 @@ $(LD_SCRIPT): $(LIBJVM_MAPFILE) +@@ -205,11 +213,6 @@ $(LD_SCRIPT): $(LIBJVM_MAPFILE) LD_SCRIPT_FLAG = -Wl,-T,$(LD_SCRIPT) endif @@ -73,19 +100,21 @@ $OpenBSD: patch-hotspot_make_bsd_makefiles_vm_make,v 1.3 2009/10/07 01:53:54 kur $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) $(QUIETLY) { \ echo Linking vm...; \ -@@ -190,15 +194,6 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) - $(LFLAGS_VM) -o $@ $(LIBJVM.o) $(LIBS_VM); \ +@@ -219,17 +222,6 @@ $(LIBJVM): $(LIBJVM.o) $(LIBJVM_MAPFILE) $(LD_SCRIPT) $(LINK_LIB.CC/POST_HOOK) \ rm -f $@.1; ln -s $@ $@.1; \ -- if [ -x /usr/sbin/sebsdenabled ] ; then \ -- /usr/sbin/sebsdenabled; \ -- if [ $$? = 0 ] ; then \ -- /usr/bin/chcon -t textrel_shlib_t $@; \ -- if [ $$? != 0 ]; then \ -- echo "ERROR: Cannot chcon $@"; \ -- fi \ -- fi \ -- fi \ + [ -f $(LIBJVM_G) ] || { ln -s $@ $(LIBJVM_G); ln -s $@.1 $(LIBJVM_G).1; }; \ +- if [ \"$(CROSS_COMPILE_ARCH)\" = \"\" ] ; then \ +- if [ -x /usr/sbin/sebsdenabled ] ; then \ +- /usr/sbin/sebsdenabled; \ +- if [ $$? = 0 ] ; then \ +- /usr/bin/chcon -t textrel_shlib_t $@; \ +- if [ $$? != 0 ]; then \ +- echo "ERROR: Cannot chcon $@"; \ +- fi \ +- fi \ +- fi \ +- fi \ } DEST_JVM = $(JDK_LIBDIR)/$(VM_SUBDIR)/$(LIBJVM) diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_zeroshark_make b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_zeroshark_make new file mode 100644 index 00000000000..17809a3570e --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_makefiles_zeroshark_make @@ -0,0 +1,27 @@ +$OpenBSD: patch-hotspot_make_bsd_makefiles_zeroshark_make,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/makefiles/zeroshark.make.orig Mon Oct 25 18:52:01 2010 ++++ hotspot/make/bsd/makefiles/zeroshark.make Mon Oct 25 18:52:08 2010 +@@ -40,4 +40,23 @@ ifeq ($(ARCH_DATA_MODEL), 64) + CFLAGS += -D_LP64=1 + endif + ++# Specify the path to the FFI headers ++ifdef ALT_PACKAGE_PATH ++ PACKAGE_PATH = $(ALT_PACKAGE_PATH) ++else ++ ifeq ($(OS_VENDOR),Apple) ++ PACKAGE_PATH = /opt/local ++ else ++ ifeq ($(OS_VENDOR),NetBSD) ++ PACKAGE_PATH = /usr/pkg ++ LIBS += -Wl,-R${PACKAGE_PATH}/lib ++ else ++ PACKAGE_PATH = /usr/local ++ endif ++ endif ++endif ++ ++CFLAGS += -I$(PACKAGE_PATH)/include ++LIBS += -L$(PACKAGE_PATH)/lib -lffi ++ + OPT_CFLAGS/compactingPermGenGen.o = -O1 diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_amd64_suncc b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_amd64_suncc new file mode 100644 index 00000000000..6eaf9b2011f --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_amd64_suncc @@ -0,0 +1,9 @@ +$OpenBSD: patch-hotspot_make_bsd_platform_amd64_suncc,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/platform_amd64.suncc.orig Mon Oct 25 18:53:09 2010 ++++ hotspot/make/bsd/platform_amd64.suncc Mon Oct 25 18:53:15 2010 +@@ -14,4 +14,4 @@ compiler = sparcWorks + + gnu_dis_arch = amd64 + +-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DAMD64 ++sysdefs = -D_ALLBSD_SOURCE -DSPARC_WORKS -D_GNU_SOURCE -DAMD64 diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_i486_suncc b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_i486_suncc new file mode 100644 index 00000000000..49ec475f570 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_i486_suncc @@ -0,0 +1,9 @@ +$OpenBSD: patch-hotspot_make_bsd_platform_i486_suncc,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/platform_i486.suncc.orig Mon Oct 25 18:53:32 2010 ++++ hotspot/make/bsd/platform_i486.suncc Mon Oct 25 18:53:39 2010 +@@ -14,4 +14,4 @@ compiler = sparcWorks + + gnu_dis_arch = i386 + +-sysdefs = -DLINUX -DSPARC_WORKS -D_GNU_SOURCE -DIA32 ++sysdefs = -D_ALLBSD_SOURCE -DSPARC_WORKS -D_GNU_SOURCE -DIA32 diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_ia64 b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_ia64 new file mode 100644 index 00000000000..19da3c95504 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_ia64 @@ -0,0 +1,11 @@ +$OpenBSD: patch-hotspot_make_bsd_platform_ia64,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/platform_ia64.orig Mon Oct 25 18:53:53 2010 ++++ hotspot/make/bsd/platform_ia64 Mon Oct 25 18:54:00 2010 +@@ -10,6 +10,6 @@ compiler = gcc + + gnu_dis_arch = ia64 + +-sysdefs = -DLINUX -D_GNU_SOURCE -DIA64 -DCC_INTERP ++sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DIA64 -DCC_INTERP + + mark_style = alignment diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_sparcv9 b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_sparcv9 new file mode 100644 index 00000000000..db2394182a3 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_sparcv9 @@ -0,0 +1,9 @@ +$OpenBSD: patch-hotspot_make_bsd_platform_sparcv9,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/platform_sparcv9.orig Mon Oct 25 18:54:12 2010 ++++ hotspot/make/bsd/platform_sparcv9 Mon Oct 25 18:54:20 2010 +@@ -12,4 +12,4 @@ lib_arch = sparcv9 + + compiler = gcc + +-sysdefs = -DLINUX -D_GNU_SOURCE -DSPARC ++sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DSPARC diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_zero_in b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_zero_in new file mode 100644 index 00000000000..9a344559547 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_bsd_platform_zero_in @@ -0,0 +1,9 @@ +$OpenBSD: patch-hotspot_make_bsd_platform_zero_in,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/bsd/platform_zero.in.orig Mon Oct 25 18:54:32 2010 ++++ hotspot/make/bsd/platform_zero.in Mon Oct 25 18:54:40 2010 +@@ -14,4 +14,4 @@ compiler = gcc + + gnu_dis_arch = zero + +-sysdefs = -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\" ++sysdefs = -D_ALLBSD_SOURCE -D_GNU_SOURCE -DCC_INTERP -DZERO -D@ZERO_ARCHDEF@ -DZERO_LIBARCH=\"@ZERO_LIBARCH@\" diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_linux_makefiles_defs_make b/devel/jdk/1.7/patches/patch-hotspot_make_linux_makefiles_defs_make new file mode 100644 index 00000000000..1c1dab25ca8 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_linux_makefiles_defs_make @@ -0,0 +1,45 @@ +$OpenBSD: patch-hotspot_make_linux_makefiles_defs_make,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/linux/makefiles/defs.make.orig Thu Oct 28 20:17:00 2010 ++++ hotspot/make/linux/makefiles/defs.make Mon Nov 1 13:33:56 2010 +@@ -116,33 +116,36 @@ endif + + JDK_INCLUDE_SUBDIR=linux + ++# Library suffix ++LIBRARY_SUFFIX=so ++ + # FIXUP: The subdirectory for a debug build is NOT the same on all platforms + VM_DEBUG=jvmg + + EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html + + # client and server subdirectories have symbolic links to ../libjsig.so +-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so ++EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) + EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server + + ifndef BUILD_CLIENT_ONLY + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt +-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so ++EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) + endif + + ifneq ($(ZERO_BUILD), true) + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) + endif + endif + + # Serviceability Binaries + # No SA Support for PPC, IA64, ARM or zero +-ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \ ++ADD_SA_BINARIES/x86 = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ + $(EXPORT_LIB_DIR)/sa-jdi.jar +-ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so \ ++ADD_SA_BINARIES/sparc = $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) \ + $(EXPORT_LIB_DIR)/sa-jdi.jar + ADD_SA_BINARIES/ppc = + ADD_SA_BINARIES/ia64 = diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_solaris_makefiles_defs_make b/devel/jdk/1.7/patches/patch-hotspot_make_solaris_makefiles_defs_make new file mode 100644 index 00000000000..15e49dc094f --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_solaris_makefiles_defs_make @@ -0,0 +1,54 @@ +$OpenBSD: patch-hotspot_make_solaris_makefiles_defs_make,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/solaris/makefiles/defs.make.orig Thu Oct 28 20:17:00 2010 ++++ hotspot/make/solaris/makefiles/defs.make Mon Nov 1 13:34:05 2010 +@@ -61,34 +61,37 @@ endif + + JDK_INCLUDE_SUBDIR=solaris + ++# Library suffix ++LIBRARY_SUFFIX=so ++ + # FIXUP: The subdirectory for a debug build is NOT the same on all platforms + VM_DEBUG=jvmg + + EXPORT_LIST += $(EXPORT_DOCS_DIR)/platform/jvmti/jvmti.html + +-# client and server subdirectories have symbolic links to ../libjsig.so +-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.so ++# client and server subdirectories have symbolic links to ../libjsig.$(LIBRARY_SUFFIX) ++EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libjsig.$(LIBRARY_SUFFIX) + + EXPORT_SERVER_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/server + ifneq ($(BUILD_CLIENT_ONLY),true) + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt +-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.so +-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.so +-EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.so ++EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm.$(LIBRARY_SUFFIX) ++EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_db.$(LIBRARY_SUFFIX) ++EXPORT_LIST += $(EXPORT_SERVER_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX) + endif + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_LIB_ARCH_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.so +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.so +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.so +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.so +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.so ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_db.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/libjvm_dtrace.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) + ifneq ($(BUILD_CLIENT_ONLY), true) +- EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.so +- EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.so ++ EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_db.$(LIBRARY_SUFFIX) ++ EXPORT_LIST += $(EXPORT_SERVER_DIR)/64/libjvm_dtrace.$(LIBRARY_SUFFIX) + endif + endif + +-EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.so ++EXPORT_LIST += $(EXPORT_JRE_LIB_ARCH_DIR)/libsaproc.$(LIBRARY_SUFFIX) + EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar diff --git a/devel/jdk/1.7/patches/patch-hotspot_make_windows_makefiles_defs_make b/devel/jdk/1.7/patches/patch-hotspot_make_windows_makefiles_defs_make new file mode 100644 index 00000000000..f3e8e62f7c0 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_make_windows_makefiles_defs_make @@ -0,0 +1,44 @@ +$OpenBSD: patch-hotspot_make_windows_makefiles_defs_make,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/make/windows/makefiles/defs.make.orig Mon Oct 25 19:04:10 2010 ++++ hotspot/make/windows/makefiles/defs.make Mon Oct 25 19:04:16 2010 +@@ -109,6 +109,9 @@ endif + + JDK_INCLUDE_SUBDIR=win32 + ++# Library suffix ++LIBRARY_SUFFIX=dll ++ + # HOTSPOT_RELEASE_VERSION and HOTSPOT_BUILD_VERSION are defined + # and added to MAKE_ARGS list in $(GAMMADIR)/make/defs.make. + +@@ -172,26 +175,26 @@ endif + + EXPORT_SERVER_DIR = $(EXPORT_JRE_BIN_DIR)/server + EXPORT_LIST += $(EXPORT_SERVER_DIR)/Xusage.txt +-EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.dll ++EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.$(LIBRARY_SUFFIX) + EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.pdb + EXPORT_LIST += $(EXPORT_SERVER_DIR)/jvm.map + EXPORT_LIST += $(EXPORT_LIB_DIR)/jvm.lib + ifeq ($(ARCH_DATA_MODEL), 32) + EXPORT_CLIENT_DIR = $(EXPORT_JRE_BIN_DIR)/client + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.dll ++ EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.$(LIBRARY_SUFFIX) + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.pdb + EXPORT_LIST += $(EXPORT_CLIENT_DIR)/jvm.map + # kernel vm + EXPORT_KERNEL_DIR = $(EXPORT_JRE_BIN_DIR)/kernel + EXPORT_LIST += $(EXPORT_KERNEL_DIR)/Xusage.txt +- EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.dll ++ EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.$(LIBRARY_SUFFIX) + EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.pdb + EXPORT_LIST += $(EXPORT_KERNEL_DIR)/jvm.map + endif + + ifeq ($(BUILD_WIN_SA), 1) +- EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.dll ++ EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.$(LIBRARY_SUFFIX) + EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.pdb + EXPORT_LIST += $(EXPORT_JRE_BIN_DIR)/sawindbg.map + EXPORT_LIST += $(EXPORT_LIB_DIR)/sa-jdi.jar diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_cpu_sparc_vm_globals_sparc_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_sparc_vm_globals_sparc_hpp new file mode 100644 index 00000000000..5dd50c53ee1 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_sparc_vm_globals_sparc_hpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-hotspot_src_cpu_sparc_vm_globals_sparc_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/cpu/sparc/vm/globals_sparc.hpp.orig Tue Jan 4 18:51:43 2011 ++++ hotspot/src/cpu/sparc/vm/globals_sparc.hpp Tue Jan 4 18:52:04 2011 +@@ -63,4 +63,8 @@ define_pd_global(intx, PreInflateSpin, 40); // + define_pd_global(bool, RewriteBytecodes, true); + define_pd_global(bool, RewriteFrequentPairs, true); + ++#ifdef _ALLBSD_SOURCE ++define_pd_global(bool, UseMembar, true); ++#else + define_pd_global(bool, UseMembar, false); ++#endif diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_c1_LIRAssembler_x86_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_c1_LIRAssembler_x86_cpp new file mode 100644 index 00000000000..9c22bef7a97 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_c1_LIRAssembler_x86_cpp @@ -0,0 +1,14 @@ +$OpenBSD: patch-hotspot_src_cpu_x86_vm_c1_LIRAssembler_x86_cpp,v 1.3 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp.orig Fri Oct 29 14:46:06 2010 ++++ hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp Fri Oct 29 14:46:13 2010 +@@ -469,8 +469,8 @@ int LIR_Assembler::emit_unwind_handler() { + // Fetch the exception from TLS and clear out exception related thread state + __ get_thread(rsi); + __ movptr(rax, Address(rsi, JavaThread::exception_oop_offset())); +- __ movptr(Address(rsi, JavaThread::exception_oop_offset()), (int32_t)NULL_WORD); +- __ movptr(Address(rsi, JavaThread::exception_pc_offset()), (int32_t)NULL_WORD); ++ __ movptr(Address(rsi, JavaThread::exception_oop_offset()), (intptr_t)NULL_WORD); ++ __ movptr(Address(rsi, JavaThread::exception_pc_offset()), (intptr_t)NULL_WORD); + + __ bind(_unwind_handler_entry); + __ verify_not_null_oop(rax); diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_globals_x86_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_globals_x86_hpp new file mode 100644 index 00000000000..080bba29e03 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_globals_x86_hpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-hotspot_src_cpu_x86_vm_globals_x86_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/cpu/x86/vm/globals_x86.hpp.orig Tue Jan 4 18:52:24 2011 ++++ hotspot/src/cpu/x86/vm/globals_x86.hpp Tue Jan 4 18:52:45 2011 +@@ -64,4 +64,8 @@ define_pd_global(intx, PreInflateSpin, 10); + define_pd_global(bool, RewriteBytecodes, true); + define_pd_global(bool, RewriteFrequentPairs, true); + ++#ifdef _ALLBSD_SOURCE ++define_pd_global(bool, UseMembar, true); ++#else + define_pd_global(bool, UseMembar, false); ++#endif diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp index 116535d669d..f00e0087a72 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp @@ -1,46 +1,16 @@ -$OpenBSD: patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp,v 1.4 2009/10/07 01:53:54 kurt Exp $ ---- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp.orig Thu Sep 17 03:48:09 2009 -+++ hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Sat Sep 26 10:00:47 2009 -@@ -452,10 +452,10 @@ void InterpreterMacroAssembler::store_ptr_and_tag(int - void InterpreterMacroAssembler::tag_local(frame::Tag tag, int n) { - if (TaggedStackInterpreter) { - if (tag == frame::TagCategory2) { -- movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n+1)), (int32_t)frame::TagValue); -- movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (int32_t)frame::TagValue); -+ movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n+1)), (intptr_t)frame::TagValue); -+ movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (intptr_t)frame::TagValue); - } else { -- movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (int32_t)tag); -+ movptr(Address(rdi, Interpreter::local_tag_offset_in_bytes(n)), (intptr_t)tag); - } - } - } -@@ -464,12 +464,12 @@ void InterpreterMacroAssembler::tag_local(frame::Tag t - if (TaggedStackInterpreter) { - if (tag == frame::TagCategory2) { - movptr(Address(rdi, idx, Interpreter::stackElementScale(), -- Interpreter::local_tag_offset_in_bytes(1)), (int32_t)frame::TagValue); -+ Interpreter::local_tag_offset_in_bytes(1)), (intptr_t)frame::TagValue); - movptr(Address(rdi, idx, Interpreter::stackElementScale(), -- Interpreter::local_tag_offset_in_bytes(0)), (int32_t)frame::TagValue); -+ Interpreter::local_tag_offset_in_bytes(0)), (intptr_t)frame::TagValue); - } else { - movptr(Address(rdi, idx, Interpreter::stackElementScale(), -- Interpreter::local_tag_offset_in_bytes(0)), (int32_t)tag); -+ Interpreter::local_tag_offset_in_bytes(0)), (intptr_t)tag); - } - } - } -@@ -1315,7 +1315,7 @@ void InterpreterMacroAssembler::record_klass_in_profil +$OpenBSD: patch-hotspot_src_cpu_x86_vm_interp_masm_x86_32_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp.orig Fri Aug 13 03:28:18 2010 ++++ hotspot/src/cpu/x86/vm/interp_masm_x86_32.cpp Mon Oct 25 18:15:45 2010 +@@ -1153,7 +1153,7 @@ void InterpreterMacroAssembler::record_klass_in_profil int recvr_offset = in_bytes(VirtualCallData::receiver_offset(start_row)); set_mdp_data_at(mdp, recvr_offset, receiver); int count_offset = in_bytes(VirtualCallData::receiver_count_offset(start_row)); - movptr(reg2, (int32_t)DataLayout::counter_increment); + movptr(reg2, (intptr_t)DataLayout::counter_increment); set_mdp_data_at(mdp, count_offset, reg2); - jmp(done); - } -@@ -1456,7 +1456,7 @@ void InterpreterMacroAssembler::profile_switch_case(Re + if (start_row > 0) { + jmp(done); +@@ -1296,7 +1296,7 @@ void InterpreterMacroAssembler::profile_switch_case(Re test_method_data_pointer(mdp, profile_continue); // Build the base (index * per_case_size_in_bytes()) + case_array_offset_in_bytes() diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_cpu_zero_vm_globals_zero_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_zero_vm_globals_zero_hpp new file mode 100644 index 00000000000..69bb6265521 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_cpu_zero_vm_globals_zero_hpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-hotspot_src_cpu_zero_vm_globals_zero_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/cpu/zero/vm/globals_zero.hpp.orig Tue Jan 4 18:53:00 2011 ++++ hotspot/src/cpu/zero/vm/globals_zero.hpp Tue Jan 4 18:53:18 2011 +@@ -46,4 +46,8 @@ define_pd_global(intx, StackShadowPages, 5 LP64_O + define_pd_global(bool, RewriteBytecodes, true); + define_pd_global(bool, RewriteFrequentPairs, true); + ++#ifdef _ALLBSD_SOURCE ++define_pd_global(bool, UseMembar, true); ++#else + define_pd_global(bool, UseMembar, false); ++#endif diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_launcher_java_md_c b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_launcher_java_md_c index 9115ffe89e9..a61dc60e04a 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_launcher_java_md_c +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_launcher_java_md_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/src/os/bsd/launcher/java_md.c.orig Fri May 15 17:19:44 2009 -+++ hotspot/src/os/bsd/launcher/java_md.c Fri May 15 17:58:17 2009 +$OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os/bsd/launcher/java_md.c.orig Mon Nov 1 13:14:58 2010 ++++ hotspot/src/os/bsd/launcher/java_md.c Mon Nov 1 13:16:15 2010 @@ -45,8 +45,15 @@ #include "version_comp.h" #endif @@ -17,7 +17,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 #ifndef GAMMA /* launcher.make defines ARCH */ -@@ -112,7 +119,7 @@ extern char **environ; +@@ -116,7 +123,7 @@ extern char **environ; * A collection of useful strings. One should think of these as #define * entries, but actual strings can be more efficient (with many compilers). */ @@ -26,7 +26,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 static const char *system_dir = "/usr/java"; static const char *user_dir = "/java"; #else /* Solaris */ -@@ -456,10 +463,10 @@ CreateExecutionEnvironment(int *_argcp, +@@ -460,10 +467,10 @@ CreateExecutionEnvironment(int *_argcp, * If not on Solaris, assume only a single LD_LIBRARY_PATH * variable. */ @@ -39,7 +39,16 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 /* * On bsd, if a binary is running as sgid or suid, glibc sets * LD_LIBRARY_PATH to the empty string for security purposes. (In -@@ -483,7 +490,7 @@ CreateExecutionEnvironment(int *_argcp, +@@ -476,7 +483,7 @@ CreateExecutionEnvironment(int *_argcp, + * return from the function now. Getting the right libraries to + * be found must be handled through other mechanisms. + */ +- if((getgid() != getegid()) || (getuid() != geteuid()) ) { ++ if(issetugid()) { + return; + } + #endif +@@ -487,7 +494,7 @@ CreateExecutionEnvironment(int *_argcp, new_runpath = MemAlloc( ((runpath!=NULL)?strlen(runpath):0) + 2*strlen(jrepath) + 2*strlen(arch) + strlen(jvmpath) + 52); @@ -48,7 +57,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 /* -@@ -498,7 +505,7 @@ CreateExecutionEnvironment(int *_argcp, +@@ -502,7 +509,7 @@ CreateExecutionEnvironment(int *_argcp, /* jvmpath, ((running != wanted)?((wanted==64)?"/"BIG_ARCH:"/.."):""), */ @@ -57,7 +66,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 "%s:" "%s/lib/%s:" "%s/../lib/%s", -@@ -836,7 +843,7 @@ GetXUsagePath(char *buf, jint bufsize) +@@ -840,7 +847,7 @@ GetXUsagePath(char *buf, jint bufsize) jboolean GetApplicationHome(char *buf, jint bufsize) { @@ -66,7 +75,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 char *execname = GetExecname(); if (execname) { strncpy(buf, execname, bufsize-1); -@@ -1005,7 +1012,7 @@ SetExecname(char **argv) +@@ -1009,7 +1016,7 @@ SetExecname(char **argv) } } } @@ -75,7 +84,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 { const char* self = "/proc/self/exe"; char buf[PATH_MAX+1]; -@@ -1015,7 +1022,7 @@ SetExecname(char **argv) +@@ -1019,7 +1026,7 @@ SetExecname(char **argv) exec_path = strdup(buf); } } @@ -84,7 +93,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 { /* Not implemented */ } -@@ -1220,7 +1227,7 @@ get_cpuid(uint32_t arg, +@@ -1224,7 +1231,7 @@ get_cpuid(uint32_t arg, #endif /* __sun && i586 */ @@ -93,7 +102,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 /* * A utility method for asking the CPU about itself. -@@ -1286,7 +1293,7 @@ get_cpuid(uint32_t arg, +@@ -1290,7 +1297,7 @@ get_cpuid(uint32_t arg, #endif } @@ -102,7 +111,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 #ifdef i586 /* -@@ -1465,7 +1472,7 @@ solaris_i586_ServerClassMachine(void) { +@@ -1469,7 +1476,7 @@ solaris_i586_ServerClassMachine(void) { #endif /* __sun && i586 */ @@ -111,7 +120,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 /* The definition of a server-class machine for bsd-i586 */ jboolean -@@ -1496,7 +1503,7 @@ bsd_i586_ServerClassMachine(void) { +@@ -1500,7 +1507,7 @@ bsd_i586_ServerClassMachine(void) { return result; } @@ -120,7 +129,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_launcher_java_md_c,v 1.1 2009/05/23 03:03:24 /* Dispatch to the platform-specific definition of "server-class" */ jboolean -@@ -1506,7 +1513,7 @@ ServerClassMachine(void) { +@@ -1510,7 +1517,7 @@ ServerClassMachine(void) { result = solaris_sparc_ServerClassMachine(); #elif defined(__sun) && defined(i586) result = solaris_i586_ServerClassMachine(); diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp index 0fa8ba273d4..0362cc8699c 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp @@ -1,47 +1,7 @@ -$OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.3 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/src/os/bsd/vm/attachListener_bsd.cpp.orig Fri May 15 16:25:27 2009 -+++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp Fri May 15 17:25:06 2009 -@@ -179,32 +179,19 @@ int BsdAttachListener::init() { - struct sockaddr_un addr; - addr.sun_family = AF_UNIX; - -- // FIXME: Prior to b39 the tool-side API expected to find the well -- // known file in the working directory. To allow this libjvm.so work with -- // a pre-b39 SDK we create it in the working directory if -- // +StartAttachListener is used is used. All unit tests for this feature -- // currently used this flag. Once b39 SDK has been promoted we can remove -- // this code. -- if (StartAttachListener) { -- sprintf(path, ".java_pid%d", os::current_process_id()); -- strcpy(addr.sun_path, path); -- ::unlink(path); -- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); -- } -+ sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id()); -+ strcpy(addr.sun_path, path); -+ ::unlink(path); -+ res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); - if (res == -1) { -- sprintf(path, "%s/.java_pid%d", os::get_temp_directory(), os::current_process_id()); -- strcpy(addr.sun_path, path); -- ::unlink(path); -- res = ::bind(listener, (struct sockaddr*)&addr, sizeof(addr)); -- } -- if (res == -1) { - RESTARTABLE(::close(listener), res); - return -1; - } - set_path(path); - -- // put in listen mode and set permission -- if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1)) { -+ // put in listen mode and set permission and ownership -+ if ((::listen(listener, 5) == -1) || (::chmod(path, S_IREAD|S_IWRITE) == -1) || -+ (::chown(path, geteuid(), getegid()) == -1)) { - RESTARTABLE(::close(listener), res); - ::unlink(path); - set_path(NULL); -@@ -330,6 +317,15 @@ BsdAttachOperation* BsdAttachListener::dequeue() { +$OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.4 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os/bsd/vm/attachListener_bsd.cpp.orig Mon Nov 1 13:14:58 2010 ++++ hotspot/src/os/bsd/vm/attachListener_bsd.cpp Mon Nov 1 13:16:15 2010 +@@ -334,6 +334,15 @@ BsdAttachOperation* BsdAttachListener::dequeue() { // get the credentials of the peer and check the effective uid/guid // - check with jeff on this. @@ -57,7 +17,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.3 2009/05/23 03 struct ucred cred_info; socklen_t optlen = sizeof(cred_info); if (::getsockopt(s, SOL_SOCKET, SO_PEERCRED, (void*)&cred_info, &optlen) == -1) { -@@ -337,10 +333,13 @@ BsdAttachOperation* BsdAttachListener::dequeue() { +@@ -341,10 +350,13 @@ BsdAttachOperation* BsdAttachListener::dequeue() { RESTARTABLE(::close(s), res); continue; } @@ -72,23 +32,25 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_attachListener_bsd_cpp,v 1.3 2009/05/23 03 int res; RESTARTABLE(::close(s), res); continue; -@@ -460,15 +459,12 @@ bool AttachListener::is_init_trigger() { +@@ -464,16 +476,13 @@ bool AttachListener::is_init_trigger() { if (init_at_startup() || is_initialized()) { return false; // initialized at startup or already initialized } -- char fn[32]; +- char fn[PATH_MAX+1]; - sprintf(fn, ".attach_pid%d", os::current_process_id()); + char path[PATH_MAX + 1]; int ret; - struct stat64 st; - RESTARTABLE(::stat64(fn, &st), ret); - if (ret == -1) { -- sprintf(fn, "/tmp/.attach_pid%d", os::current_process_id()); +- snprintf(fn, sizeof(fn), "%s/.attach_pid%d", +- os::get_temp_directory(), os::current_process_id()); - RESTARTABLE(::stat64(fn, &st), ret); - } + struct stat st; + -+ sprintf(path, "%s/.attach_pid%d", os::get_temp_directory(), os::current_process_id()); ++ snprintf(path, PATH_MAX + 1, "%s/.attach_pid%d", ++ os::get_temp_directory(), os::current_process_id()); + RESTARTABLE(::stat(path, &st), ret); if (ret == 0) { // simple check to avoid starting the attach mechanism when diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_os_bsd_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_os_bsd_cpp index 06b0894a301..074562f5042 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_os_bsd_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_os_bsd_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt Exp $ ---- hotspot/src/os/bsd/vm/os_bsd.cpp.orig Sat May 30 10:11:57 2009 -+++ hotspot/src/os/bsd/vm/os_bsd.cpp Sat May 30 10:15:08 2009 -@@ -42,18 +42,40 @@ +$OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.12 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os/bsd/vm/os_bsd.cpp.orig Tue Jan 4 18:25:16 2011 ++++ hotspot/src/os/bsd/vm/os_bsd.cpp Tue Jan 4 18:34:25 2011 +@@ -46,20 +46,42 @@ # include # include # include @@ -21,11 +21,14 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt +#endif # include # include -+ -+#ifndef __APPLE__ - # include -+#endif +-# include + # include + # include ++#ifndef __APPLE__ ++# include ++#endif ++ +#if defined(__FreeBSD__) || defined(__NetBSD__) +# include +#endif @@ -42,7 +45,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt #define MAX_PATH (2 * K) // for timer info max values which include all bits -@@ -64,19 +86,25 @@ +@@ -70,19 +92,25 @@ // global variables julong os::Bsd::_physical_memory = 0; @@ -68,7 +71,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt static jlong initial_time_count=0; -@@ -94,8 +122,6 @@ static pid_t _initial_pid = 0; +@@ -100,8 +128,6 @@ static pid_t _initial_pid = 0; static int SR_signum = SIGUSR2; sigset_t SR_sigset; @@ -77,7 +80,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt //////////////////////////////////////////////////////////////////////////////// // utility functions -@@ -108,11 +134,16 @@ julong os::available_memory() { +@@ -114,11 +140,16 @@ julong os::available_memory() { } julong os::Bsd::available_memory() { @@ -94,7 +97,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } julong os::physical_memory() { -@@ -160,6 +191,7 @@ bool os::have_special_privileges() { +@@ -166,6 +197,7 @@ bool os::have_special_privileges() { } @@ -102,15 +105,15 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt #ifndef SYS_gettid // i386: 224, ia64: 1105, amd64: 186, sparc 143 #ifdef __ia64__ -@@ -174,6 +206,7 @@ bool os::have_special_privileges() { +@@ -180,6 +212,7 @@ bool os::have_special_privileges() { #error define gettid for the arch #endif #endif +#endif // Cpu architecture string - #if defined(IA64) -@@ -193,6 +226,7 @@ static char cpu_arch[] = "sparc"; + #if defined(ZERO) +@@ -205,6 +238,7 @@ static char cpu_arch[] = "sparc"; #endif @@ -118,7 +121,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // pid_t gettid() // // Returns the kernel thread id of the currently running thread. Kernel -@@ -219,8 +253,48 @@ static bool unsafe_chroot_detected = false; +@@ -231,8 +265,49 @@ static bool unsafe_chroot_detected = false; static const char *unstable_chroot_error = "/proc file system not found.\n" "Java may be unstable running multithreaded in a chroot " "environment on Bsd when /proc filesystem is not mounted."; @@ -135,11 +138,12 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt + 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; -+ -+ if (_processor_count < 1) -+ _processor_count = 1; // fallback ++ if (sysctl(mib, 2, &cpu_val, &len, NULL, 0) != -1 && cpu_val >= 1) { ++ set_processor_count(cpu_val); ++ } ++ else { ++ set_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 @@ -164,18 +168,18 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt +} +#else +void os::Bsd::initialize_system_info() { - _processor_count = sysconf(_SC_NPROCESSORS_CONF); - if (_processor_count == 1) { + set_processor_count(sysconf(_SC_NPROCESSORS_CONF)); + if (processor_count() == 1) { pid_t pid = os::Bsd::gettid(); -@@ -236,6 +310,7 @@ void os::Bsd::initialize_system_info() { +@@ -248,6 +323,7 @@ void os::Bsd::initialize_system_info() { _physical_memory = (julong)sysconf(_SC_PHYS_PAGES) * (julong)sysconf(_SC_PAGESIZE); - assert(_processor_count > 0, "bsd error"); + assert(processor_count() > 0, "bsd error"); } +#endif void os::init_system_properties_values() { // char arch[12]; -@@ -279,9 +354,7 @@ void os::init_system_properties_values() { +@@ -291,9 +367,7 @@ void os::init_system_properties_values() { * ... * 7: The default directories, normally /lib and /usr/lib. */ @@ -186,7 +190,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt #define DEFAULT_LIBPATH "/lib:/usr/lib" #endif -@@ -360,7 +433,11 @@ void os::init_system_properties_values() { +@@ -372,7 +446,11 @@ void os::init_system_properties_values() { * should always exist (until the legacy problem cited above is * addressed). */ @@ -198,7 +202,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (v != NULL) { char *t = ld_library_path; /* That's +1 for the colon and +1 for the trailing '\0' */ -@@ -519,6 +596,7 @@ void os::Bsd::hotspot_sigmask(Thread* thread) { +@@ -531,6 +609,7 @@ void os::Bsd::hotspot_sigmask(Thread* thread) { } } @@ -206,7 +210,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt ////////////////////////////////////////////////////////////////////////////// // detecting pthread library -@@ -682,6 +760,7 @@ bool os::Bsd::manually_expand_stack(JavaThread * t, ad +@@ -694,6 +773,7 @@ bool os::Bsd::manually_expand_stack(JavaThread * t, ad } return false; } @@ -214,7 +218,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt ////////////////////////////////////////////////////////////////////////////// // create new thread -@@ -690,6 +769,9 @@ static address highest_vm_reserved_address(); +@@ -702,6 +782,9 @@ static address highest_vm_reserved_address(); // check if it's safe to start a new thread static bool _thread_safety_check(Thread* thread) { @@ -224,7 +228,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (os::Bsd::is_BsdThreads() && !os::Bsd::is_floating_stack()) { // Fixed stack BsdThreads (SuSE Bsd/x86, and some versions of Redhat) // Heap is mmap'ed at lower end of memory space. Thread stacks are -@@ -723,6 +805,7 @@ static bool _thread_safety_check(Thread* thread) { +@@ -735,6 +818,7 @@ static bool _thread_safety_check(Thread* thread) { // here, that means enough space has been reserved for stack. return true; } @@ -232,7 +236,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } // Thread start routine for all newly created threads -@@ -750,6 +833,10 @@ static void *java_start(Thread *thread) { +@@ -762,6 +846,10 @@ static void *java_start(Thread *thread) { return NULL; } @@ -243,7 +247,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // thread_id is kernel thread id (similar to Solaris LWP id) osthread->set_thread_id(os::Bsd::gettid()); -@@ -759,6 +846,7 @@ static void *java_start(Thread *thread) { +@@ -771,6 +859,7 @@ static void *java_start(Thread *thread) { thread->set_lgrp_id(lgrp_id); } } @@ -251,7 +255,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // initialize signal mask for this thread os::Bsd::hotspot_sigmask(thread); -@@ -839,17 +927,22 @@ bool os::create_thread(Thread* thread, ThreadType thr_ +@@ -853,17 +942,22 @@ bool os::create_thread(Thread* thread, ThreadType thr_ // let pthread_create() pick the default value. } @@ -274,7 +278,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt pthread_t tid; int ret = pthread_create(&tid, &attr, (void* (*)(void*)) java_start, thread); -@@ -863,7 +956,9 @@ bool os::create_thread(Thread* thread, ThreadType thr_ +@@ -877,7 +971,9 @@ bool os::create_thread(Thread* thread, ThreadType thr_ // Need to clean up stuff we've allocated so far thread->set_osthread(NULL); delete osthread; @@ -284,7 +288,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt return false; } -@@ -879,9 +974,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_ +@@ -893,9 +989,11 @@ bool os::create_thread(Thread* thread, ThreadType thr_ } } @@ -296,7 +300,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } // Aborted due to thread limit being reached -@@ -919,7 +1016,11 @@ bool os::create_attached_thread(JavaThread* thread) { +@@ -933,7 +1031,11 @@ bool os::create_attached_thread(JavaThread* thread) { } // Store pthread info into the OSThread @@ -308,7 +312,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt osthread->set_pthread_id(::pthread_self()); // initialize floating point control register -@@ -930,6 +1031,7 @@ bool os::create_attached_thread(JavaThread* thread) { +@@ -944,6 +1046,7 @@ bool os::create_attached_thread(JavaThread* thread) { thread->set_osthread(osthread); @@ -316,7 +320,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (UseNUMA) { int lgrp_id = os::numa_get_group_id(); if (lgrp_id != -1) { -@@ -956,6 +1058,7 @@ bool os::create_attached_thread(JavaThread* thread) { +@@ -970,6 +1073,7 @@ bool os::create_attached_thread(JavaThread* thread) { os::Bsd::manually_expand_stack(jt, addr); osthread->clear_expanding_stack(); } @@ -324,7 +328,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // initialize signal mask for this thread // and save the caller's signal mask -@@ -1014,6 +1117,7 @@ extern "C" Thread* get_thread() { +@@ -1028,6 +1132,7 @@ extern "C" Thread* get_thread() { ////////////////////////////////////////////////////////////////////////////// // initial thread @@ -332,7 +336,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // Check if current thread is the initial thread, similar to Solaris thr_main. bool os::Bsd::is_initial_thread(void) { char dummy; -@@ -1247,6 +1351,7 @@ void os::Bsd::capture_initial_stack(size_t max_size) { +@@ -1264,6 +1369,7 @@ void os::Bsd::capture_initial_stack(size_t max_size) { _initial_thread_stack_size = align_size_down(_initial_thread_stack_size, page_size()); _initial_thread_stack_bottom = (address)stack_top - _initial_thread_stack_size; } @@ -340,7 +344,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt //////////////////////////////////////////////////////////////////////////////// // time support -@@ -1268,9 +1373,7 @@ jlong os::elapsed_frequency() { +@@ -1285,9 +1391,7 @@ jlong os::elapsed_frequency() { return (1000 * 1000); } @@ -351,7 +355,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt bool os::supports_vtime() { return false; } bool os::enable_vtime() { return false; } bool os::vtime_enabled() { return false; } -@@ -1290,7 +1393,22 @@ jlong os::javaTimeMillis() { +@@ -1307,7 +1411,22 @@ jlong os::javaTimeMillis() { #define CLOCK_MONOTONIC (1) #endif @@ -374,7 +378,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // we do dlopen's in this particular order due to bug in bsd // dynamical loader (see 6348968) leading to crash on exit void* handle = dlopen("librt.so.1", RTLD_LAZY); -@@ -1325,7 +1443,9 @@ void os::Bsd::clock_init() { +@@ -1342,7 +1461,9 @@ void os::Bsd::clock_init() { } } } @@ -384,7 +388,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt #ifndef SYS_clock_getres #if defined(IA32) || defined(AMD64) -@@ -1364,6 +1484,7 @@ void os::Bsd::fast_thread_clock_init() { +@@ -1383,6 +1504,7 @@ void os::Bsd::fast_thread_clock_init() { _pthread_getcpuclockid = pthread_getcpuclockid_func; } } @@ -392,7 +396,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt jlong os::javaTimeNanos() { if (Bsd::supports_monotonic_clock()) { -@@ -1514,8 +1635,15 @@ int os::current_process_id() { +@@ -1533,8 +1655,15 @@ int os::current_process_id() { // DLL functions @@ -406,10 +410,10 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt +const char* os::dll_file_extension() { return JNI_LIB_SUFFIX; } + - const char* os::get_temp_directory() { return "/tmp/"; } - - static bool file_exists(const char* filename) { -@@ -1532,13 +1660,13 @@ void os::dll_build_name(char* buffer, size_t buflen, + const char* os::get_temp_directory() { + const char *prop = Arguments::get_property("java.io.tmpdir"); + return prop == NULL ? "/tmp" : prop; +@@ -1554,13 +1683,13 @@ void os::dll_build_name(char* buffer, size_t buflen, const size_t pnamelen = pname ? strlen(pname) : 0; // Quietly truncate on buffer overflow. Should be an error. @@ -425,7 +429,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } else if (strchr(pname, *os::path_separator()) != NULL) { int n; char** pelements = split_path(pname, &n); -@@ -1547,7 +1675,8 @@ void os::dll_build_name(char* buffer, size_t buflen, +@@ -1569,7 +1698,8 @@ void os::dll_build_name(char* buffer, size_t buflen, if (pelements[i] == NULL || strlen(pelements[i]) == 0) { continue; // skip the empty path values } @@ -435,7 +439,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (file_exists(buffer)) { break; } -@@ -1562,7 +1691,7 @@ void os::dll_build_name(char* buffer, size_t buflen, +@@ -1584,7 +1714,7 @@ void os::dll_build_name(char* buffer, size_t buflen, FREE_C_HEAP_ARRAY(char*, pelements); } } else { @@ -444,7 +448,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } } -@@ -1603,6 +1732,23 @@ bool os::dll_address_to_function_name(address addr, ch +@@ -1625,6 +1755,23 @@ bool os::dll_address_to_function_name(address addr, ch } } @@ -468,7 +472,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt struct _address_to_library_name { address addr; // input : memory address size_t buflen; // size of fname -@@ -1677,11 +1823,27 @@ bool os::dll_address_to_library_name(address addr, cha +@@ -1699,11 +1846,27 @@ bool os::dll_address_to_library_name(address addr, cha return false; } } @@ -496,14 +500,22 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt void * os::dll_load(const char *filename, char *ebuf, int ebuflen) { void * result= ::dlopen(filename, RTLD_LAZY); -@@ -1734,6 +1896,18 @@ void * os::dll_load(const char *filename, char *ebuf, +@@ -1756,6 +1919,26 @@ void * os::dll_load(const char *filename, char *ebuf, #define EM_486 6 /* Intel 80486 */ #endif ++ #ifndef EM_MIPS_RS3_LE ++ #define EM_MIPS_RS3_LE 10 /* MIPS */ ++ #endif ++ + #ifndef EM_PPC64 + #define EM_PPC64 21 /* PowerPC64 */ + #endif + ++ #ifndef EM_S390 ++ #define EM_S390 22 /* IBM System/390 */ ++ #endif ++ + #ifndef EM_IA_64 + #define EM_IA_64 50 /* HP/Intel IA-64 */ + #endif @@ -515,7 +527,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt static const arch_t arch_array[]={ {EM_386, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"}, {EM_486, EM_386, ELFCLASS32, ELFDATA2LSB, (char*)"IA 32"}, -@@ -1814,17 +1988,11 @@ void * os::dll_load(const char *filename, char *ebuf, +@@ -1859,17 +2042,11 @@ void * os::dll_load(const char *filename, char *ebuf, return NULL; } @@ -536,7 +548,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } -@@ -1847,7 +2015,51 @@ bool _print_ascii_file(const char* filename, outputStr +@@ -1892,7 +2069,51 @@ bool _print_ascii_file(const char* filename, outputStr void os::print_dll_info(outputStream *st) { st->print_cr("Dynamic libraries:"); @@ -588,7 +600,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt char fname[32]; pid_t pid = os::Bsd::gettid(); -@@ -1856,6 +2068,7 @@ void os::print_dll_info(outputStream *st) { +@@ -1901,6 +2122,7 @@ void os::print_dll_info(outputStream *st) { if (!_print_ascii_file(fname, st)) { st->print("Can not get library information for pid = %d\n", pid); } @@ -596,7 +608,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } -@@ -1888,6 +2101,7 @@ void os::print_os_info(outputStream* st) { +@@ -1935,6 +2157,7 @@ void os::print_os_info(outputStream* st) { st->print(name.machine); st->cr(); @@ -604,7 +616,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // Print warning if unsafe chroot environment detected if (unsafe_chroot_detected) { st->print("WARNING!! "); -@@ -1902,6 +2116,7 @@ void os::print_os_info(outputStream* st) { +@@ -1949,6 +2172,7 @@ void os::print_os_info(outputStream* st) { st->print("(%s stack)", os::Bsd::is_floating_stack() ? "floating" : "fixed"); } st->cr(); @@ -612,7 +624,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // rlimit st->print("rlimit:"); -@@ -1927,6 +2142,7 @@ void os::print_os_info(outputStream* st) { +@@ -1974,6 +2198,7 @@ void os::print_os_info(outputStream* st) { if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); else st->print("%d", rlim.rlim_cur); @@ -620,15 +632,20 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt st->print(", AS "); getrlimit(RLIMIT_AS, &rlim); if (rlim.rlim_cur == RLIM_INFINITY) st->print("infinity"); -@@ -1939,6 +2155,7 @@ void os::print_os_info(outputStream* st) { +@@ -1986,11 +2211,7 @@ void os::print_os_info(outputStream* st) { os::loadavg(loadavg, 3); st->print("%0.02f %0.02f %0.02f", loadavg[0], loadavg[1], loadavg[2]); st->cr(); +- +- // meminfo +- st->print("\n/proc/meminfo:\n"); +- _print_ascii_file("/proc/meminfo", st); +- st->cr(); +#endif } void os::print_memory_info(outputStream* st) { -@@ -1946,18 +2163,22 @@ void os::print_memory_info(outputStream* st) { +@@ -1998,19 +2219,28 @@ void os::print_memory_info(outputStream* st) { st->print("Memory:"); st->print(" %dk page", os::vm_page_size()>>10); @@ -649,9 +666,15 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt ((jlong)si.freeswap * si.mem_unit) >> 10); +#endif st->cr(); ++ ++ // meminfo ++ st->print("\n/proc/meminfo:\n"); ++ _print_ascii_file("/proc/meminfo", st); ++ st->cr(); } -@@ -2184,19 +2405,29 @@ int os::sigexitnum_pd() { + // Taken from /usr/include/bits/siginfo.h Supposed to be architecture specific +@@ -2252,19 +2482,29 @@ int os::sigexitnum_pd() { static volatile jint pending_signals[NSIG+1] = { 0 }; // Bsd(POSIX) specific hand shaking semaphore. @@ -683,7 +706,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } static int check_pending_signals(bool wait) { -@@ -2218,7 +2449,7 @@ static int check_pending_signals(bool wait) { +@@ -2286,7 +2526,7 @@ static int check_pending_signals(bool wait) { do { thread->set_suspend_equivalent(); // cleared by handle_special_suspend_equivalent_condition() or java_suspend_self() @@ -692,7 +715,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // were we externally suspended while we were waiting? threadIsSuspended = thread->handle_special_suspend_equivalent_condition(); -@@ -2229,7 +2460,7 @@ static int check_pending_signals(bool wait) { +@@ -2297,7 +2537,7 @@ static int check_pending_signals(bool wait) { // while suspended because that would surprise the thread that // suspended us. // @@ -701,7 +724,20 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt thread->java_suspend_self(); } -@@ -2301,9 +2532,14 @@ void bsd_wrap_code(char* base, size_t size) { +@@ -2341,10 +2581,10 @@ void bsd_wrap_code(char* base, size_t size) { + return; + } + +- char buf[PATH_MAX+1]; ++ char buf[PATH_MAX + 1]; + int num = Atomic::add(1, &cnt); + +- snprintf(buf, sizeof(buf), "%s/hs-vm-%d-%d", ++ snprintf(buf, PATH_MAX + 1, "%s/hs-vm-%d-%d", + os::get_temp_directory(), os::current_process_id(), num); + unlink(buf); + +@@ -2370,9 +2610,14 @@ void bsd_wrap_code(char* base, size_t size) { // problem. bool os::commit_memory(char* addr, size_t size, bool exec) { int prot = exec ? PROT_READ|PROT_WRITE|PROT_EXEC : PROT_READ|PROT_WRITE; @@ -716,7 +752,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } bool os::commit_memory(char* addr, size_t size, size_t alignment_hint, -@@ -2319,36 +2555,27 @@ void os::free_memory(char *addr, size_t bytes) { +@@ -2388,36 +2633,27 @@ void os::free_memory(char *addr, size_t bytes) { } void os::numa_make_global(char *addr, size_t bytes) { @@ -758,7 +794,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } bool os::get_page_info(char *start, page_info* info) { -@@ -2359,6 +2586,7 @@ char *os::scan_pages(char *start, char* end, page_info +@@ -2428,6 +2664,7 @@ char *os::scan_pages(char *start, char* end, page_info return end; } @@ -766,27 +802,119 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt extern "C" void numa_warn(int number, char *where, ...) { } extern "C" void numa_error(char *where) { } -@@ -2460,11 +2688,18 @@ os::Bsd::numa_available_func_t os::Bsd::_numa_availabl +@@ -2529,104 +2766,26 @@ os::Bsd::numa_available_func_t os::Bsd::_numa_availabl os::Bsd::numa_tonode_memory_func_t os::Bsd::_numa_tonode_memory; os::Bsd::numa_interleave_memory_func_t os::Bsd::_numa_interleave_memory; unsigned long* os::Bsd::_numa_all_nodes; +#endif bool os::uncommit_memory(char* addr, size_t size) { -- return ::mmap(addr, size, PROT_NONE, +#ifdef __OpenBSD__ + // XXX: Work-around mmap/MAP_FIXED bug temporarily on OpenBSD + return ::mprotect(addr, size, PROT_NONE) == 0; +#else -+ return ::mmap(addr, size, -+ PROT_READ|PROT_WRITE|PROT_EXEC, - MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0) - != MAP_FAILED; + uintptr_t res = (uintptr_t) ::mmap(addr, size, PROT_NONE, + MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE|MAP_ANONYMOUS, -1, 0); + return res != (uintptr_t) MAP_FAILED; +#endif } - static address _highest_vm_reserved_address = NULL; -@@ -2568,6 +2803,9 @@ bool os::unguard_memory(char* addr, size_t size) { +-// Bsd uses a growable mapping for the stack, and if the mapping for +-// the stack guard pages is not removed when we detach a thread the +-// stack cannot grow beyond the pages where the stack guard was +-// mapped. If at some point later in the process the stack expands to +-// that point, the Bsd kernel cannot expand the stack any further +-// because the guard pages are in the way, and a segfault occurs. +-// +-// However, it's essential not to split the stack region by unmapping +-// a region (leaving a hole) that's already part of the stack mapping, +-// so if the stack mapping has already grown beyond the guard pages at +-// the time we create them, we have to truncate the stack mapping. +-// So, we need to know the extent of the stack mapping when +-// create_stack_guard_pages() is called. +- +-// Find the bounds of the stack mapping. Return true for success. +-// +-// We only need this for stacks that are growable: at the time of +-// writing thread stacks don't use growable mappings (i.e. those +-// creeated with MAP_GROWSDOWN), and aren't marked "[stack]", so this +-// only applies to the main thread. +-static bool +-get_stack_bounds(uintptr_t *bottom, uintptr_t *top) +-{ +- FILE *f = fopen("/proc/self/maps", "r"); +- if (f == NULL) +- return false; +- +- while (!feof(f)) { +- size_t dummy; +- char *str = NULL; +- ssize_t len = getline(&str, &dummy, f); +- if (len == -1) { +- fclose(f); +- return false; +- } +- +- if (len > 0 && str[len-1] == '\n') { +- str[len-1] = 0; +- len--; +- } +- +- static const char *stack_str = "[stack]"; +- if (len > (ssize_t)strlen(stack_str) +- && (strcmp(str + len - strlen(stack_str), stack_str) == 0)) { +- if (sscanf(str, "%" SCNxPTR "-%" SCNxPTR, bottom, top) == 2) { +- uintptr_t sp = (uintptr_t)__builtin_frame_address(0); +- if (sp >= *bottom && sp <= *top) { +- free(str); +- fclose(f); +- return true; +- } +- } +- } +- free(str); +- } +- fclose(f); +- return false; +-} +- +-// If the (growable) stack mapping already extends beyond the point +-// where we're going to put our guard pages, truncate the mapping at +-// that point by munmap()ping it. This ensures that when we later +-// munmap() the guard pages we don't leave a hole in the stack +-// mapping. This only affects the main/initial thread, but guard +-// against future OS changes + bool os::create_stack_guard_pages(char* addr, size_t size) { +- uintptr_t stack_extent, stack_base; +- bool chk_bounds = NOT_DEBUG(os::Bsd::is_initial_thread()) DEBUG_ONLY(true); +- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) { +- assert(os::Bsd::is_initial_thread(), +- "growable stack in non-initial thread"); +- if (stack_extent < (uintptr_t)addr) +- ::munmap((void*)stack_extent, (uintptr_t)addr - stack_extent); +- } +- + return os::commit_memory(addr, size); + } + + // If this is a growable mapping, remove the guard pages entirely by +-// munmap()ping them. If not, just call uncommit_memory(). This only +-// affects the main/initial thread, but guard against future OS changes ++// munmap()ping them. If not, just call uncommit_memory(). + bool os::remove_stack_guard_pages(char* addr, size_t size) { +- uintptr_t stack_extent, stack_base; +- bool chk_bounds = NOT_DEBUG(os::Bsd::is_initial_thread()) DEBUG_ONLY(true); +- if (chk_bounds && get_stack_bounds(&stack_extent, &stack_base)) { +- assert(os::Bsd::is_initial_thread(), +- "growable stack in non-initial thread"); +- +- return ::munmap(addr, size) == 0; +- } +- + return os::uncommit_memory(addr, size); + } + +@@ -2731,6 +2890,9 @@ bool os::unguard_memory(char* addr, size_t size) { static size_t _large_page_size = 0; bool os::large_page_init() { @@ -796,7 +924,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (!UseLargePages) return false; if (LargePageSizeInBytes) { -@@ -2622,6 +2860,7 @@ bool os::large_page_init() { +@@ -2788,6 +2950,7 @@ bool os::large_page_init() { // We optimistically assume the support is available. If later it turns out // not true, VM will automatically switch to use regular page size. return true; @@ -804,7 +932,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } #ifndef SHM_HUGETLB -@@ -2798,7 +3037,7 @@ char* os::attempt_reserve_memory_at(size_t bytes, char +@@ -2964,7 +3127,7 @@ char* os::attempt_reserve_memory_at(size_t bytes, char } size_t os::read(int fd, void *buf, unsigned int nBytes) { @@ -813,7 +941,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } // TODO-FIXME: reconcile Solaris' os::sleep with the bsd variation. -@@ -2934,9 +3173,47 @@ void os::loop_breaker(int attempts) { +@@ -3100,9 +3263,47 @@ void os::loop_breaker(int attempts) { // this reason, the code should not be used as default (ThreadPriorityPolicy=0). // It is only used when ThreadPriorityPolicy=1 and requires root privilege. @@ -861,7 +989,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt 4, // 1 MinPriority 3, // 2 2, // 3 -@@ -2951,6 +3228,7 @@ int os::java_to_os_priority[MaxPriority + 1] = { +@@ -3117,6 +3318,7 @@ int os::java_to_os_priority[MaxPriority + 1] = { -5 // 10 MaxPriority }; @@ -869,7 +997,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt static int prio_init() { if (ThreadPriorityPolicy == 1) { -@@ -2970,8 +3248,28 @@ static int prio_init() { +@@ -3136,8 +3338,28 @@ static int prio_init() { OSReturn os::set_native_priority(Thread* thread, int newpri) { if ( !UseThreadPriorities || ThreadPriorityPolicy == 0 ) return OS_OK; @@ -898,7 +1026,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } OSReturn os::get_native_priority(const Thread* const thread, int *priority_ptr) { -@@ -2981,7 +3279,17 @@ OSReturn os::get_native_priority(const Thread* const t +@@ -3147,7 +3369,17 @@ OSReturn os::get_native_priority(const Thread* const t } errno = 0; @@ -916,7 +1044,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt return (*priority_ptr != -1 || errno == 0 ? OS_OK : OS_ERR); } -@@ -3091,7 +3399,7 @@ static int SR_initialize() { +@@ -3257,7 +3489,7 @@ static int SR_initialize() { /* Get signal number to use for suspend/resume */ if ((s = ::getenv("_JAVA_SR_SIGNUM")) != 0) { int sig = ::strtol(s, 0, 10); @@ -925,7 +1053,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt SR_signum = sig; } } -@@ -3434,6 +3742,28 @@ void os::Bsd::install_signal_handlers() { +@@ -3601,6 +3833,28 @@ void os::Bsd::install_signal_handlers() { set_signal_handler(SIGFPE, true); set_signal_handler(SIGXFSZ, true); @@ -954,7 +1082,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (libjsig_is_loaded) { // Tell libjsig jvm finishes setting signal handlers (*end_signal_setting)(); -@@ -3454,6 +3784,7 @@ void os::Bsd::install_signal_handlers() { +@@ -3621,6 +3875,7 @@ void os::Bsd::install_signal_handlers() { } } @@ -962,7 +1090,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // This is the fastest way to get thread cpu time on Bsd. // Returns cpu time (user+sys) for any thread, not only for current. // POSIX compliant clocks are implemented in the kernels 2.6.16+. -@@ -3468,6 +3799,7 @@ jlong os::Bsd::fast_thread_cpu_time(clockid_t clockid) +@@ -3635,6 +3890,7 @@ jlong os::Bsd::fast_thread_cpu_time(clockid_t clockid) return (tp.tv_sec * SEC_IN_NANOSECS) + tp.tv_nsec; } @@ -970,7 +1098,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt ///// // glibc on Bsd platform uses non-documented flag -@@ -3689,13 +4021,13 @@ void os::init(void) { +@@ -3856,13 +4112,13 @@ void os::init(void) { _initial_pid = (java_launcher_pid > 0) ? java_launcher_pid : getpid(); @@ -984,9 +1112,9 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt - Bsd::set_page_size(sysconf(_SC_PAGESIZE)); + Bsd::set_page_size(getpagesize()); if (Bsd::page_size() == -1) { - fatal1("os_bsd.cpp: os::init: sysconf failed (%s)", strerror(errno)); - } -@@ -3708,7 +4040,16 @@ void os::init(void) { + fatal(err_msg("os_bsd.cpp: os::init: sysconf failed (%s)", + strerror(errno))); +@@ -3876,7 +4132,16 @@ void os::init(void) { Bsd::clock_init(); initial_time_count = os::elapsed_counter(); @@ -1004,7 +1132,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } // To install functions for atexit system call -@@ -3721,7 +4062,9 @@ extern "C" { +@@ -3889,7 +4154,9 @@ extern "C" { // this is called _after_ the global arguments have been parsed jint os::init_2(void) { @@ -1014,7 +1142,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // Allocate a single page and mark it as readable for safepoint polling address polling_page = (address) ::mmap(NULL, Bsd::page_size(), PROT_READ, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0); -@@ -3770,6 +4113,7 @@ jint os::init_2(void) +@@ -3947,6 +4214,7 @@ jint os::init_2(void) JavaThread::set_stack_size_at_create(round_to(threadStackSizeInBytes, vm_page_size())); @@ -1022,7 +1150,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt Bsd::capture_initial_stack(JavaThread::stack_size_at_create()); Bsd::libpthread_init(); -@@ -3792,6 +4136,7 @@ jint os::init_2(void) +@@ -3969,6 +4237,7 @@ jint os::init_2(void) UseNUMA = true; } } @@ -1030,7 +1158,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (MaxFDLimit) { // set the number of file descriptors to max. print out error -@@ -3803,6 +4148,14 @@ jint os::init_2(void) +@@ -3980,6 +4249,14 @@ jint os::init_2(void) perror("os::init_2 getrlimit failed"); } else { nbr_files.rlim_cur = nbr_files.rlim_max; @@ -1045,7 +1173,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt status = setrlimit(RLIMIT_NOFILE, &nbr_files); if (status != 0) { if (PrintMiscellaneous && (Verbose || WizardMode)) -@@ -3811,8 +4164,10 @@ jint os::init_2(void) +@@ -3988,8 +4265,10 @@ jint os::init_2(void) } } @@ -1056,7 +1184,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // Initialize HPI. jint hpi_result = hpi::initialize(); -@@ -3860,11 +4215,15 @@ void os::make_polling_page_readable(void) { +@@ -4040,11 +4319,15 @@ void os::make_polling_page_readable(void) { }; int os::active_processor_count() { @@ -1072,7 +1200,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } bool os::distribute_processes(uint length, uint* distribution) { -@@ -3906,6 +4265,9 @@ ExtendedPC os::get_thread_pc(Thread* thread) { +@@ -4086,6 +4369,9 @@ ExtendedPC os::get_thread_pc(Thread* thread) { int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond, pthread_mutex_t *_mutex, const struct timespec *_abstime) { @@ -1082,7 +1210,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (is_NPTL()) { return pthread_cond_timedwait(_cond, _mutex, _abstime); } else { -@@ -3921,6 +4283,7 @@ int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond +@@ -4101,6 +4387,7 @@ int os::Bsd::safe_cond_timedwait(pthread_cond_t *_cond #endif // IA64 return status; } @@ -1090,7 +1218,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } //////////////////////////////////////////////////////////////////////////////// -@@ -4056,17 +4419,17 @@ int os::create_binary_file(const char* path, bool rewr +@@ -4233,17 +4520,17 @@ int os::create_binary_file(const char* path, bool rewr if (!rewrite_existing) { oflags |= O_EXCL; } @@ -1111,7 +1239,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } // Map a block of memory. -@@ -4116,6 +4479,7 @@ bool os::unmap_memory(char* addr, size_t bytes) { +@@ -4293,6 +4580,7 @@ bool os::unmap_memory(char* addr, size_t bytes) { return munmap(addr, bytes) == 0; } @@ -1119,7 +1247,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt static jlong slow_thread_cpu_time(Thread *thread, bool user_sys_cpu_time); static clockid_t thread_cpu_clockid(Thread* thread) { -@@ -4127,6 +4491,7 @@ static clockid_t thread_cpu_clockid(Thread* thread) { +@@ -4304,6 +4592,7 @@ static clockid_t thread_cpu_clockid(Thread* thread) { assert(rc == 0, "pthread_getcpuclockid is expected to return 0 code"); return clockid; } @@ -1127,7 +1255,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // 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 -@@ -4136,39 +4501,71 @@ static clockid_t thread_cpu_clockid(Thread* thread) { +@@ -4313,39 +4602,71 @@ static clockid_t thread_cpu_clockid(Thread* thread) { // the fast estimate available on the platform. jlong os::current_thread_cpu_time() { @@ -1199,7 +1327,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // // -1 on error. // -@@ -4257,6 +4654,7 @@ static jlong slow_thread_cpu_time(Thread *thread, bool +@@ -4435,6 +4756,7 @@ static jlong slow_thread_cpu_time(Thread *thread, bool return (jlong)user_time * (1000000000 / clock_tics_per_sec); } } @@ -1207,7 +1335,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt 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 -@@ -4273,7 +4671,13 @@ void os::thread_cpu_time_info(jvmtiTimerInfo *info_ptr +@@ -4451,7 +4773,13 @@ void os::thread_cpu_time_info(jvmtiTimerInfo *info_ptr } bool os::is_thread_cpu_time_supported() { @@ -1221,7 +1349,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt } // System loadavg support. Returns -1 if load average cannot be obtained. -@@ -4406,7 +4810,7 @@ jdk_pthread_sigmask(int how , const sigset_t* newmask, +@@ -4584,7 +4912,7 @@ jdk_pthread_sigmask(int how , const sigset_t* newmask, // abstime will be the absolute timeout time // TODO: replace compute_abstime() with unpackTime() @@ -1230,7 +1358,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (millis < 0) millis = 0; struct timeval now; int status = gettimeofday(&now, NULL); -@@ -4458,7 +4862,7 @@ void os::PlatformEvent::park() { // AKA "down()" +@@ -4636,7 +4964,7 @@ void os::PlatformEvent::park() { // AKA "down()" status = pthread_cond_wait(_cond, _mutex); // for some reason, under 2.7 lwp_cond_wait() may return ETIME ... // Treat this the same as if the wait was interrupted @@ -1239,7 +1367,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt assert_status(status == 0 || status == EINTR, status, "cond_wait"); } -- _nParked ; -@@ -4516,10 +4920,10 @@ int os::PlatformEvent::park(jlong millis) { +@@ -4694,10 +5022,10 @@ int os::PlatformEvent::park(jlong millis) { pthread_cond_init (_cond, NULL) ; } assert_status(status == 0 || status == EINTR || @@ -1252,7 +1380,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // We consume and ignore EINTR and spurious wakeups. } --_nParked ; -@@ -4611,7 +5015,7 @@ void os::PlatformEvent::unpark() { +@@ -4789,7 +5117,7 @@ void os::PlatformEvent::unpark() { * years from "now". */ @@ -1261,16 +1389,16 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt assert (time > 0, "convertTime"); struct timeval now; -@@ -4670,7 +5074,7 @@ void Parker::park(bool isAbsolute, jlong time) { +@@ -4849,7 +5177,7 @@ void Parker::park(bool isAbsolute, jlong time) { } // Next, demultiplex/decode time arguments - timespec absTime; + struct timespec absTime; - if (time < 0) { // don't wait at all + if (time < 0 || (isAbsolute && time == 0) ) { // don't wait at all return; } -@@ -4723,7 +5127,7 @@ void Parker::park(bool isAbsolute, jlong time) { +@@ -4903,7 +5231,7 @@ void Parker::park(bool isAbsolute, jlong time) { } } assert_status(status == 0 || status == EINTR || @@ -1279,7 +1407,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt status, "cond_timedwait"); #ifdef ASSERT -@@ -4765,16 +5169,14 @@ void Parker::unpark() { +@@ -4946,16 +5274,14 @@ void Parker::unpark() { } @@ -1301,7 +1429,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt // 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 -@@ -4787,8 +5189,7 @@ int os::fork_and_exec(char* cmd) { +@@ -4968,8 +5294,7 @@ int os::fork_and_exec(char* cmd) { // separate process to execve. Make a direct syscall to fork process. // On IA64 there's no fork syscall, we have to use fork() and hope for // the best... @@ -1311,7 +1439,7 @@ $OpenBSD: patch-hotspot_src_os_bsd_vm_os_bsd_cpp,v 1.11 2009/06/10 19:01:09 kurt if (pid < 0) { // fork failed -@@ -4804,8 +5205,7 @@ int os::fork_and_exec(char* cmd) { +@@ -4985,8 +5310,7 @@ int os::fork_and_exec(char* cmd) { // in the new process, so make a system call directly. // IA64 should use normal execve() from glibc to match the glibc fork() // above. diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_vtune_bsd_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_vtune_bsd_cpp new file mode 100644 index 00000000000..5056fd92c9f --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_bsd_vm_vtune_bsd_cpp @@ -0,0 +1,49 @@ +$OpenBSD: patch-hotspot_src_os_bsd_vm_vtune_bsd_cpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os/bsd/vm/vtune_bsd.cpp.orig Mon Oct 25 19:20:23 2010 ++++ hotspot/src/os/bsd/vm/vtune_bsd.cpp Mon Oct 25 19:20:29 2010 +@@ -0,0 +1,45 @@ ++/* ++ * Copyright (c) 1999, 2007, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ * ++ */ ++ ++#include "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) {} ++ ++void VTune::create_nmethod(nmethod* nm) {} ++void VTune::delete_nmethod(nmethod* nm) {} ++ ++void vtune_init() {} ++ ++ ++// Reconciliation History ++// vtune_solaris.cpp 1.8 99/07/12 23:54:21 ++// End diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s index 47a524c6559..e9b1b9feca0 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s @@ -1,12 +1,9 @@ -$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s.orig Fri May 15 16:25:28 2009 -+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s Fri May 15 17:42:58 2009 -@@ -19,8 +19,19 @@ - # Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - # CA 95054 USA or visit www.sun.com if you need additional information or - # have any questions. --# -+# +$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.3 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s.orig Mon Oct 25 18:02:18 2010 ++++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_32.s Mon Oct 25 19:20:46 2010 +@@ -21,6 +21,17 @@ + # questions. + # + +#ifdef __APPLE__ @@ -136,7 +133,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0 pushl %esi movl 4+12(%esp),%ecx # count pushl %edi -@@ -354,8 +385,8 @@ cs_CopyLeft: +@@ -355,8 +386,8 @@ cs_CopyLeft: # void* to, # size_t count) .p2align 4,,15 @@ -147,7 +144,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0 pushl %esi movl 4+12(%esp),%ecx # count pushl %edi -@@ -431,10 +462,10 @@ acs_CopyLeft: +@@ -432,10 +463,10 @@ acs_CopyLeft: # Equivalent to # arrayof_conjoint_jints .p2align 4,,15 @@ -162,7 +159,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0 pushl %esi movl 4+12(%esp),%ecx # count pushl %edi -@@ -494,7 +525,7 @@ ci_CopyLeft: +@@ -497,7 +528,7 @@ ci_CopyLeft: # # count treated as signed # @@ -171,7 +168,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0 # while (--count >= 0) { # *to++ = *from++; # } -@@ -504,8 +535,8 @@ ci_CopyLeft: +@@ -507,8 +538,8 @@ ci_CopyLeft: # } # } .p2align 4,,15 @@ -182,7 +179,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0 movl 4+8(%esp),%ecx # count movl 4+0(%esp),%eax # from movl 4+4(%esp),%edx # to -@@ -533,8 +564,8 @@ cla_CopyLeft: +@@ -536,8 +567,8 @@ cla_CopyLeft: # void* to, # size_t count) .p2align 4,,15 @@ -193,7 +190,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_32_s,v 1.2 2009/05/23 03:0 pushl %esi movl 4+12(%esp),%ecx pushl %edi -@@ -632,8 +663,8 @@ mmx_acs_CopyLeft: +@@ -635,8 +666,8 @@ mmx_acs_CopyLeft: # bool is_MP) # .p2align 4,,15 diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s index 7da44047aaf..9045e9b69f1 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s @@ -1,8 +1,8 @@ -$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s,v 1.1 2009/05/23 03:03:24 kurt Exp $ ---- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s.orig Fri May 15 17:43:50 2009 -+++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s Fri May 15 17:44:04 2009 +$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_bsd_x86_64_s,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s.orig Mon Oct 25 18:02:18 2010 ++++ hotspot/src/os_cpu/bsd_x86/vm/bsd_x86_64.s Mon Oct 25 18:15:45 2010 @@ -21,6 +21,14 @@ - # have any questions. + # questions. # +#ifdef __APPLE__ diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_globals_bsd_x86_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_globals_bsd_x86_hpp new file mode 100644 index 00000000000..cb29b24ab41 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_globals_bsd_x86_hpp @@ -0,0 +1,29 @@ +$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_globals_bsd_x86_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp.orig Mon Oct 25 19:21:21 2010 ++++ hotspot/src/os_cpu/bsd_x86/vm/globals_bsd_x86.hpp Mon Oct 25 19:21:36 2010 +@@ -22,9 +22,10 @@ + * + */ + ++// + // Sets the default values for platform dependent flags used by the runtime system. + // (see globals.hpp) +- ++// + define_pd_global(bool, DontYieldALot, false); + #ifdef AMD64 + define_pd_global(intx, ThreadStackSize, 1024); // 0 => use system default +@@ -38,10 +39,11 @@ define_pd_global(intx, VMThreadStackSize, 512); + #endif // AMD64 + + define_pd_global(intx, CompilerThreadStackSize, 0); ++define_pd_global(intx, SurvivorRatio, 8); + +-define_pd_global(uintx,JVMInvokeMethodSlack, 8192); ++define_pd_global(uintx, JVMInvokeMethodSlack, 8192); + + // Only used on 64 bit platforms +-define_pd_global(uintx,HeapBaseMinAddress, 2*G); ++define_pd_global(uintx, HeapBaseMinAddress, 2*G); + // Only used on 64 bit Windows platforms + define_pd_global(bool, UseVectoredExceptions, false); diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp index 033826f13a8..a683c8dc107 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp.orig Fri May 15 16:25:28 2009 -+++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Sat May 16 16:49:25 2009 +$OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp.orig Tue Jan 4 18:25:16 2011 ++++ hotspot/src/os_cpu/bsd_x86/vm/os_bsd_x86.cpp Tue Jan 4 19:03:34 2011 @@ -44,23 +44,202 @@ # include # include @@ -422,7 +422,7 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03 + int rslt = pthread_stackseg_np(pthread_self(), &ss); + + if (rslt != 0) -+ fatal1("pthread_stackseg_np failed with err = %d", rslt); ++ fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt)); + + *bottom = (address)((char *)ss.ss_sp - ss.ss_size); + *size = ss.ss_size; @@ -433,12 +433,12 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03 + + // JVM needs to know exact stack location, abort if it fails + if (rslt != 0) -+ fatal1("pthread_attr_init failed with err = %d", rslt); ++ fatal(err_msg("pthread_attr_init failed with err = %d", rslt)); + + rslt = pthread_attr_get_np(pthread_self(), &attr); + + if (rslt != 0) -+ fatal1("pthread_attr_get_np failed with err = %d", rslt); ++ fatal(err_msg("pthread_attr_get_np failed with err = %d", rslt)); + + if (pthread_attr_getstackaddr(&attr, (void **)bottom) != 0 || + pthread_attr_getstacksize(&attr, size) != 0) { @@ -499,11 +499,11 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03 + st->print(", R15=" INTPTR_FORMAT, uc->context_r15); st->cr(); - st->print( "RIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_RIP]); -- st->print(", EFL=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); +- st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); - st->print(", CSGSFS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_CSGSFS]); - st->print(", ERR=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_ERR]); + st->print( "RIP=" INTPTR_FORMAT, uc->context_rip); -+ st->print(", EFL=" INTPTR_FORMAT, uc->context_flags); ++ st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_flags); + st->print(", ERR=" INTPTR_FORMAT, uc->context_err); st->cr(); - st->print(" TRAPNO=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_TRAPNO]); @@ -528,10 +528,66 @@ $OpenBSD: patch-hotspot_src_os_cpu_bsd_x86_vm_os_bsd_x86_cpp,v 1.4 2009/05/23 03 + st->print(", EDI=" INTPTR_FORMAT, uc->context_edi); st->cr(); - st->print( "EIP=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EIP]); -- st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2); - st->print(", EFLAGS=" INTPTR_FORMAT, uc->uc_mcontext.gregs[REG_EFL]); +- st->print(", CR2=" INTPTR_FORMAT, uc->uc_mcontext.cr2); + st->print( "EIP=" INTPTR_FORMAT, uc->context_eip); + st->print(", EFLAGS=" INTPTR_FORMAT, uc->context_eflags); #endif // AMD64 st->cr(); st->cr(); +@@ -791,31 +1051,31 @@ void os::print_register_info(outputStream *st, void *c + // this is only for the "general purpose" registers + + #ifdef AMD64 +- st->print("RAX="); print_location(st, uc->uc_mcontext.gregs[REG_RAX]); +- st->print("RBX="); print_location(st, uc->uc_mcontext.gregs[REG_RBX]); +- st->print("RCX="); print_location(st, uc->uc_mcontext.gregs[REG_RCX]); +- st->print("RDX="); print_location(st, uc->uc_mcontext.gregs[REG_RDX]); +- st->print("RSP="); print_location(st, uc->uc_mcontext.gregs[REG_RSP]); +- st->print("RBP="); print_location(st, uc->uc_mcontext.gregs[REG_RBP]); +- st->print("RSI="); print_location(st, uc->uc_mcontext.gregs[REG_RSI]); +- st->print("RDI="); print_location(st, uc->uc_mcontext.gregs[REG_RDI]); +- st->print("R8 ="); print_location(st, uc->uc_mcontext.gregs[REG_R8]); +- st->print("R9 ="); print_location(st, uc->uc_mcontext.gregs[REG_R9]); +- st->print("R10="); print_location(st, uc->uc_mcontext.gregs[REG_R10]); +- st->print("R11="); print_location(st, uc->uc_mcontext.gregs[REG_R11]); +- st->print("R12="); print_location(st, uc->uc_mcontext.gregs[REG_R12]); +- st->print("R13="); print_location(st, uc->uc_mcontext.gregs[REG_R13]); +- st->print("R14="); print_location(st, uc->uc_mcontext.gregs[REG_R14]); +- st->print("R15="); print_location(st, uc->uc_mcontext.gregs[REG_R15]); ++ st->print("RAX="); print_location(st, uc->context_rax); ++ st->print("RBX="); print_location(st, uc->context_rbx); ++ st->print("RCX="); print_location(st, uc->context_rcx); ++ st->print("RDX="); print_location(st, uc->context_rdx); ++ st->print("RSP="); print_location(st, uc->context_rsp); ++ st->print("RBP="); print_location(st, uc->context_rbp); ++ st->print("RSI="); print_location(st, uc->context_rsi); ++ st->print("RDI="); print_location(st, uc->context_rdi); ++ st->print("R8 ="); print_location(st, uc->context_r8); ++ st->print("R9 ="); print_location(st, uc->context_r9); ++ st->print("R10="); print_location(st, uc->context_r10); ++ st->print("R11="); print_location(st, uc->context_r11); ++ st->print("R12="); print_location(st, uc->context_r12); ++ st->print("R13="); print_location(st, uc->context_r13); ++ st->print("R14="); print_location(st, uc->context_r14); ++ st->print("R15="); print_location(st, uc->context_r15); + #else +- st->print("EAX="); print_location(st, uc->uc_mcontext.gregs[REG_EAX]); +- st->print("EBX="); print_location(st, uc->uc_mcontext.gregs[REG_EBX]); +- st->print("ECX="); print_location(st, uc->uc_mcontext.gregs[REG_ECX]); +- st->print("EDX="); print_location(st, uc->uc_mcontext.gregs[REG_EDX]); +- st->print("ESP="); print_location(st, uc->uc_mcontext.gregs[REG_ESP]); +- st->print("EBP="); print_location(st, uc->uc_mcontext.gregs[REG_EBP]); +- st->print("ESI="); print_location(st, uc->uc_mcontext.gregs[REG_ESI]); +- st->print("EDI="); print_location(st, uc->uc_mcontext.gregs[REG_EDI]); ++ st->print("EAX="); print_location(st, uc->context_eax); ++ st->print("EBX="); print_location(st, uc->context_ebx); ++ st->print("ECX="); print_location(st, uc->context_ecx); ++ st->print("EDX="); print_location(st, uc->context_edx); ++ st->print("ESP="); print_location(st, uc->context_esp); ++ st->print("EBP="); print_location(st, uc->context_ebp); ++ st->print("ESI="); print_location(st, uc->context_esi); ++ st->print("EDI="); print_location(st, uc->context_edi); + #endif // AMD64 + + st->cr(); diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_atomic_bsd_zero_inline_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_atomic_bsd_zero_inline_hpp new file mode 100644 index 00000000000..bc94c98179d --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_atomic_bsd_zero_inline_hpp @@ -0,0 +1,660 @@ +$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_atomic_bsd_zero_inline_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp.orig Fri Oct 29 11:43:00 2010 ++++ hotspot/src/os_cpu/bsd_zero/vm/atomic_bsd_zero.inline.hpp Fri Oct 29 12:02:31 2010 +@@ -23,137 +23,442 @@ + * + */ + +-// Implementation of class atomic ++#include ++#ifdef __NetBSD__ ++#include ++#elif __FreeBSD__ + +-#ifdef M68K ++#include ++#ifndef SPARC ++#include ++#else + + /* +- * __m68k_cmpxchg ++ * On FreeBSD/sparc64, pulls in ++ * which includes definitions which cause conflicts with various ++ * definitions within HotSpot source. To avoid that, pull in those ++ * definitions verbatim instead of including the header. Yuck. ++ */ ++ ++/*- ++ * Copyright (c) 1998 Doug Rabson. ++ * Copyright (c) 2001 Jake Burkholder. ++ * All rights reserved. + * +- * Atomically store newval in *ptr if *ptr is equal to oldval for user space. +- * Returns newval on success and oldval if no exchange happened. +- * This implementation is processor specific and works on +- * 68020 68030 68040 and 68060. ++ * Redistribution and use in source and binary forms, with or without ++ * modification, are permitted provided that the following conditions ++ * are met: ++ * 1. Redistributions of source code must retain the above copyright ++ * notice, this list of conditions and the following disclaimer. ++ * 2. Redistributions in binary form must reproduce the above copyright ++ * notice, this list of conditions and the following disclaimer in the ++ * documentation and/or other materials provided with the distribution. + * +- * It will not work on ColdFire, 68000 and 68010 since they lack the CAS +- * instruction. +- * Using a kernelhelper would be better for arch complete implementation. ++ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND ++ * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE ++ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ++ * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE ++ * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL ++ * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ++ * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ++ * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT ++ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY ++ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF ++ * SUCH DAMAGE. + * + */ + +-static inline int __m68k_cmpxchg(int oldval, int newval, volatile int *ptr) { +- int ret; +- __asm __volatile ("cas%.l %0,%2,%1" +- : "=d" (ret), "+m" (*(ptr)) +- : "d" (newval), "0" (oldval)); +- return ret; +-} ++#include + +-/* Perform an atomic compare and swap: if the current value of `*PTR' +- is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of +- `*PTR' before the operation.*/ +-static inline int m68k_compare_and_swap(volatile int *ptr, +- int oldval, +- int newval) { +- for (;;) { +- int prev = *ptr; +- if (prev != oldval) +- return prev; ++/* ++ * Membar operand macros for use in other macros when # is a special ++ * character. Keep these in sync with what the hardware expects. ++ */ ++#define M_LoadLoad (0) ++#define M_StoreLoad (1) ++#define M_LoadStore (2) ++#define M_StoreStore (3) + +- if (__m68k_cmpxchg (prev, newval, ptr) == newval) +- // Success. +- return prev; ++#define CMASK_SHIFT (4) ++#define MMASK_SHIFT (0) + +- // We failed even though prev == oldval. Try again. +- } +-} ++#define CMASK_GEN(bit) ((1 << (bit)) << CMASK_SHIFT) ++#define MMASK_GEN(bit) ((1 << (bit)) << MMASK_SHIFT) + +-/* Atomically add an int to memory. */ +-static inline int m68k_add_and_fetch(volatile int *ptr, int add_value) { +- for (;;) { +- // Loop until success. ++#define LoadLoad MMASK_GEN(M_LoadLoad) ++#define StoreLoad MMASK_GEN(M_StoreLoad) ++#define LoadStore MMASK_GEN(M_LoadStore) ++#define StoreStore MMASK_GEN(M_StoreStore) + +- int prev = *ptr; ++#define casa(rs1, rs2, rd, asi) ({ \ ++ u_int __rd = (uint32_t)(rd); \ ++ __asm __volatile("casa [%2] %3, %4, %0" \ ++ : "+r" (__rd), "=m" (*rs1) \ ++ : "r" (rs1), "n" (asi), "r" (rs2), "m" (*rs1)); \ ++ __rd; \ ++}) + +- if (__m68k_cmpxchg (prev, prev + add_value, ptr) == prev + add_value) +- return prev + add_value; +- } +-} ++#define casxa(rs1, rs2, rd, asi) ({ \ ++ u_long __rd = (uint64_t)(rd); \ ++ __asm __volatile("casxa [%2] %3, %4, %0" \ ++ : "+r" (__rd), "=m" (*rs1) \ ++ : "r" (rs1), "n" (asi), "r" (rs2), "m" (*rs1)); \ ++ __rd; \ ++}) + +-/* Atomically write VALUE into `*PTR' and returns the previous +- contents of `*PTR'. */ +-static inline int m68k_lock_test_and_set(volatile int *ptr, int newval) { +- for (;;) { +- // Loop until success. +- int prev = *ptr; ++#define membar(mask) do { \ ++ __asm __volatile("membar %0" : : "n" (mask) : "memory"); \ ++} while (0) + +- if (__m68k_cmpxchg (prev, newval, ptr) == prev) +- return prev; +- } +-} +-#endif // M68K ++#ifdef _KERNEL ++#define __ASI_ATOMIC ASI_N ++#else ++#define __ASI_ATOMIC ASI_P ++#endif + +-#ifdef ARM ++#define mb() __asm__ __volatile__ ("membar #MemIssue": : :"memory") ++#define wmb() mb() ++#define rmb() mb() + + /* +- * __kernel_cmpxchg ++ * Various simple arithmetic on memory which is atomic in the presence ++ * of interrupts and multiple processors. See atomic(9) for details. ++ * Note that efficient hardware support exists only for the 32 and 64 ++ * bit variants; the 8 and 16 bit versions are not provided and should ++ * not be used in MI code. + * +- * Atomically store newval in *ptr if *ptr is equal to oldval for user space. +- * Return zero if *ptr was changed or non-zero if no exchange happened. +- * The C flag is also set if *ptr was changed to allow for assembly +- * optimization in the calling code. ++ * This implementation takes advantage of the fact that the sparc64 ++ * cas instruction is both a load and a store. The loop is often coded ++ * as follows: + * ++ * do { ++ * expect = *p; ++ * new = expect + 1; ++ * } while (cas(p, expect, new) != expect); ++ * ++ * which performs an unnnecessary load on each iteration that the cas ++ * operation fails. Modified as follows: ++ * ++ * expect = *p; ++ * for (;;) { ++ * new = expect + 1; ++ * result = cas(p, expect, new); ++ * if (result == expect) ++ * break; ++ * expect = result; ++ * } ++ * ++ * the return value of cas is used to avoid the extra reload. ++ * ++ * The memory barriers provided by the acq and rel variants are intended ++ * to be sufficient for use of relaxed memory ordering. Due to the ++ * suggested assembly syntax of the membar operands containing a # ++ * character, they cannot be used in macros. The cmask and mmask bits ++ * are hard coded in machine/cpufunc.h and used here through macros. ++ * Hopefully sun will choose not to change the bit numbers. + */ + +-typedef int (__kernel_cmpxchg_t)(int oldval, int newval, volatile int *ptr); +-#define __kernel_cmpxchg (*(__kernel_cmpxchg_t *) 0xffff0fc0) ++#define itype(sz) uint ## sz ## _t + ++#define atomic_cas_32(p, e, s) casa(p, e, s, __ASI_ATOMIC) ++#define atomic_cas_64(p, e, s) casxa(p, e, s, __ASI_ATOMIC) + ++#define atomic_cas(p, e, s, sz) \ ++ atomic_cas_ ## sz(p, e, s) + +-/* Perform an atomic compare and swap: if the current value of `*PTR' +- is OLDVAL, then write NEWVAL into `*PTR'. Return the contents of +- `*PTR' before the operation.*/ +-static inline int arm_compare_and_swap(volatile int *ptr, +- int oldval, +- int newval) { +- for (;;) { +- int prev = *ptr; +- if (prev != oldval) +- return prev; ++#define atomic_cas_acq(p, e, s, sz) ({ \ ++ itype(sz) v; \ ++ v = atomic_cas(p, e, s, sz); \ ++ membar(LoadLoad | LoadStore); \ ++ v; \ ++}) + +- if (__kernel_cmpxchg (prev, newval, ptr) == 0) +- // Success. +- return prev; ++#define atomic_cas_rel(p, e, s, sz) ({ \ ++ itype(sz) v; \ ++ membar(LoadStore | StoreStore); \ ++ v = atomic_cas(p, e, s, sz); \ ++ v; \ ++}) + +- // We failed even though prev == oldval. Try again. +- } ++#define atomic_op(p, op, v, sz) ({ \ ++ itype(sz) e, r, s; \ ++ for (e = *(volatile itype(sz) *)p;; e = r) { \ ++ s = e op v; \ ++ r = atomic_cas_ ## sz(p, e, s); \ ++ if (r == e) \ ++ break; \ ++ } \ ++ e; \ ++}) ++ ++#define atomic_op_acq(p, op, v, sz) ({ \ ++ itype(sz) t; \ ++ t = atomic_op(p, op, v, sz); \ ++ membar(LoadLoad | LoadStore); \ ++ t; \ ++}) ++ ++#define atomic_op_rel(p, op, v, sz) ({ \ ++ itype(sz) t; \ ++ membar(LoadStore | StoreStore); \ ++ t = atomic_op(p, op, v, sz); \ ++ t; \ ++}) ++ ++#define atomic_load(p, sz) \ ++ atomic_cas(p, 0, 0, sz) ++ ++#define atomic_load_acq(p, sz) ({ \ ++ itype(sz) v; \ ++ v = atomic_load(p, sz); \ ++ membar(LoadLoad | LoadStore); \ ++ v; \ ++}) ++ ++#define atomic_load_clear(p, sz) ({ \ ++ itype(sz) e, r; \ ++ for (e = *(volatile itype(sz) *)p;; e = r) { \ ++ r = atomic_cas(p, e, 0, sz); \ ++ if (r == e) \ ++ break; \ ++ } \ ++ e; \ ++}) ++ ++#define atomic_store(p, v, sz) do { \ ++ itype(sz) e, r; \ ++ for (e = *(volatile itype(sz) *)p;; e = r) { \ ++ r = atomic_cas(p, e, v, sz); \ ++ if (r == e) \ ++ break; \ ++ } \ ++} while (0) ++ ++#define atomic_store_rel(p, v, sz) do { \ ++ membar(LoadStore | StoreStore); \ ++ atomic_store(p, v, sz); \ ++} while (0) ++ ++#define ATOMIC_GEN(name, ptype, vtype, atype, sz) \ ++ \ ++static __inline vtype \ ++atomic_add_ ## name(volatile ptype p, atype v) \ ++{ \ ++ return ((vtype)atomic_op(p, +, v, sz)); \ ++} \ ++static __inline vtype \ ++atomic_add_acq_ ## name(volatile ptype p, atype v) \ ++{ \ ++ return ((vtype)atomic_op_acq(p, +, v, sz)); \ ++} \ ++static __inline vtype \ ++atomic_add_rel_ ## name(volatile ptype p, atype v) \ ++{ \ ++ return ((vtype)atomic_op_rel(p, +, v, sz)); \ ++} \ ++ \ ++static __inline int \ ++atomic_cmpset_ ## name(volatile ptype p, vtype e, vtype s) \ ++{ \ ++ return (((vtype)atomic_cas(p, e, s, sz)) == e); \ ++} \ ++static __inline int \ ++atomic_cmpset_acq_ ## name(volatile ptype p, vtype e, vtype s) \ ++{ \ ++ return (((vtype)atomic_cas_acq(p, e, s, sz)) == e); \ ++} \ ++static __inline int \ ++atomic_cmpset_rel_ ## name(volatile ptype p, vtype e, vtype s) \ ++{ \ ++ return (((vtype)atomic_cas_rel(p, e, s, sz)) == e); \ ++} \ ++ \ ++static __inline vtype \ ++atomic_load_ ## name(volatile ptype p) \ ++{ \ ++ return ((vtype)atomic_cas(p, 0, 0, sz)); \ ++} \ ++static __inline vtype \ ++atomic_load_acq_ ## name(volatile ptype p) \ ++{ \ ++ return ((vtype)atomic_cas_acq(p, 0, 0, sz)); \ ++} \ ++ \ ++static __inline void \ ++atomic_store_ ## name(volatile ptype p, vtype v) \ ++{ \ ++ atomic_store(p, v, sz); \ ++} \ ++static __inline void \ ++atomic_store_rel_ ## name(volatile ptype p, vtype v) \ ++{ \ ++ atomic_store_rel(p, v, sz); \ + } + +-/* Atomically add an int to memory. */ +-static inline int arm_add_and_fetch(volatile int *ptr, int add_value) { +- for (;;) { +- // Loop until a __kernel_cmpxchg succeeds. ++ATOMIC_GEN(int, u_int *, u_int, u_int, 32); ++ATOMIC_GEN(32, uint32_t *, uint32_t, uint32_t, 32); + +- int prev = *ptr; ++ATOMIC_GEN(long, u_long *, u_long, u_long, 64); ++ATOMIC_GEN(64, uint64_t *, uint64_t, uint64_t, 64); + +- if (__kernel_cmpxchg (prev, prev + add_value, ptr) == 0) +- return prev + add_value; +- } ++ATOMIC_GEN(ptr, uintptr_t *, uintptr_t, uintptr_t, 64); ++ ++#define atomic_fetchadd_int atomic_add_int ++#define atomic_fetchadd_32 atomic_add_32 ++#define atomic_fetchadd_long atomic_add_long ++ ++#undef ATOMIC_GEN ++#undef atomic_cas ++#undef atomic_cas_acq ++#undef atomic_cas_rel ++#undef atomic_op ++#undef atomic_op_acq ++#undef atomic_op_rel ++#undef atomic_load_acq ++#undef atomic_store_rel ++#undef atomic_load_clear ++#endif ++ ++static __inline __attribute__((__always_inline__)) ++unsigned int atomic_add_int_nv(volatile unsigned int* dest, unsigned int add_value) ++{ ++ atomic_add_acq_int(dest, add_value); ++ return *dest; + } + +-/* Atomically write VALUE into `*PTR' and returns the previous +- contents of `*PTR'. */ +-static inline int arm_lock_test_and_set(volatile int *ptr, int newval) { +- for (;;) { +- // Loop until a __kernel_cmpxchg succeeds. +- int prev = *ptr; ++static __inline __attribute__((__always_inline__)) ++uintptr_t atomic_add_ptr_nv(volatile intptr_t* dest, intptr_t add_value) ++{ ++ atomic_add_acq_ptr((volatile uintptr_t*) dest, (uintptr_t) add_value); ++ return *((volatile uintptr_t*) dest); ++} + +- if (__kernel_cmpxchg (prev, newval, ptr) == 0) +- return prev; +- } ++static __inline __attribute__((__always_inline__)) ++unsigned int ++atomic_swap_uint(volatile unsigned int *dest, unsigned int exchange_value) ++{ ++ jint prev = *dest; ++ atomic_store_rel_int(dest, exchange_value); ++ return prev; + } +-#endif // ARM + ++static __inline __attribute__((__always_inline__)) ++void * ++atomic_swap_ptr(volatile void *dest, void *exchange_value) ++{ ++ void *prev = *(void **)dest; ++ atomic_store_rel_ptr((volatile uintptr_t*) dest, (uintptr_t) exchange_value); ++ return prev; ++} ++ ++static __inline __attribute__((__always_inline__)) ++unsigned int ++atomic_cas_uint(volatile unsigned int *dest, unsigned int compare_value, ++ unsigned int exchange_value) ++{ ++ unsigned int prev = *dest; ++ atomic_cmpset_acq_int(dest, compare_value, exchange_value); ++ return prev; ++} ++ ++static __inline __attribute__((__always_inline__)) ++unsigned long ++atomic_cas_ulong(volatile unsigned long *dest, unsigned long compare_value, ++ unsigned long exchange_value) ++{ ++ unsigned long prev = *dest; ++ atomic_cmpset_acq_long(dest, compare_value, exchange_value); ++ return prev; ++} ++ ++static __inline __attribute__((__always_inline__)) ++void * ++atomic_cas_ptr(volatile void *dest, void *compare_value, void *exchange_value) ++{ ++ void *prev = *(void **)dest; ++ atomic_cmpset_acq_ptr((volatile uintptr_t*) dest, (uintptr_t) compare_value, (uintptr_t) exchange_value); ++ return prev; ++} ++ ++#elif defined(__APPLE__) ++ ++#include ++ ++static __inline __attribute__((__always_inline__)) ++unsigned int ++atomic_add_int_nv(volatile unsigned int *target, int delta) { ++ return (unsigned int) OSAtomicAdd32Barrier(delta, (volatile int32_t *) target); ++} ++ ++static __inline __attribute__((__always_inline__)) ++void * ++atomic_add_ptr_nv(volatile void *target, ssize_t delta) { ++#ifdef __LP64__ ++ return (void *) OSAtomicAdd64Barrier(delta, (volatile int64_t *) target); ++#else ++ return (void *) OSAtomicAdd32Barrier(delta, (volatile int32_t *) target); ++#endif ++} ++ ++ ++static __inline __attribute__((__always_inline__)) ++unsigned int ++atomic_swap_uint(volatile unsigned int *dest, unsigned int exchange_value) ++{ ++ /* No xchg support in OSAtomic */ ++ unsigned int prev; ++ do { ++ prev = *dest; ++ } while (!OSAtomicCompareAndSwapIntBarrier((int) prev, (int) exchange_value, (volatile int *) dest)); ++ ++ return prev; ++} ++ ++static __inline __attribute__((__always_inline__)) ++void * ++atomic_swap_ptr(volatile void *dest, void *exchange_value) ++{ ++ /* No xchg support in OSAtomic */ ++ void *prev; ++ do { ++ prev = *((void * volatile *) dest); ++ } while (!OSAtomicCompareAndSwapPtrBarrier(prev, exchange_value, (void * volatile *) dest)); ++ ++ return prev; ++} ++ ++static __inline __attribute__((__always_inline__)) ++unsigned int ++atomic_cas_uint(volatile unsigned int *dest, unsigned int compare_value, ++ unsigned int exchange_value) ++{ ++ unsigned int prev = *dest; ++ OSAtomicCompareAndSwapIntBarrier(compare_value, exchange_value, (volatile int *) dest); ++ return prev; ++} ++ ++static __inline __attribute__((__always_inline__)) ++unsigned long ++atomic_cas_ulong(volatile unsigned long *dest, unsigned long compare_value, ++ unsigned long exchange_value) ++{ ++ unsigned long prev = *dest; ++ OSAtomicCompareAndSwapLongBarrier(compare_value, exchange_value, (volatile long *) dest); ++ return prev; ++} ++ ++static __inline __attribute__((__always_inline__)) ++void * ++atomic_cas_ptr(volatile void *dest, void *compare_value, void *exchange_value) ++{ ++ void *prev = *(void **)dest; ++ OSAtomicCompareAndSwapPtrBarrier(compare_value, exchange_value, (void * volatile *) dest); ++ return prev; ++} ++ ++ ++#endif ++ + inline void Atomic::store(jint store_value, volatile jint* dest) { + *dest = store_value; + } +@@ -163,27 +468,11 @@ inline void Atomic::store_ptr(intptr_t store_value, in + } + + inline jint Atomic::add(jint add_value, volatile jint* dest) { +-#ifdef ARM +- return arm_add_and_fetch(dest, add_value); +-#else +-#ifdef M68K +- return m68k_add_and_fetch(dest, add_value); +-#else +- return __sync_add_and_fetch(dest, add_value); +-#endif // M68K +-#endif // ARM ++ return (jint)atomic_add_int_nv((volatile unsigned int*) dest, add_value); + } + + inline intptr_t Atomic::add_ptr(intptr_t add_value, volatile intptr_t* dest) { +-#ifdef ARM +- return arm_add_and_fetch(dest, add_value); +-#else +-#ifdef M68K +- return m68k_add_and_fetch(dest, add_value); +-#else +- return __sync_add_and_fetch(dest, add_value); +-#endif // M68K +-#endif // ARM ++ return (intptr_t)atomic_add_ptr_nv(dest, add_value); + } + + inline void* Atomic::add_ptr(intptr_t add_value, volatile void* dest) { +@@ -215,79 +504,41 @@ inline void Atomic::dec_ptr(volatile void* dest) { + } + + inline jint Atomic::xchg(jint exchange_value, volatile jint* dest) { +-#ifdef ARM +- return arm_lock_test_and_set(dest, exchange_value); +-#else +-#ifdef M68K +- return m68k_lock_test_and_set(dest, exchange_value); +-#else +- // __sync_lock_test_and_set is a bizarrely named atomic exchange +- // operation. Note that some platforms only support this with the +- // limitation that the only valid value to store is the immediate +- // constant 1. There is a test for this in JNI_CreateJavaVM(). +- return __sync_lock_test_and_set (dest, exchange_value); +-#endif // M68K +-#endif // ARM ++ return (jint)atomic_swap_uint((volatile u_int *)dest, (u_int)exchange_value); + } + + inline intptr_t Atomic::xchg_ptr(intptr_t exchange_value, + volatile intptr_t* dest) { +-#ifdef ARM +- return arm_lock_test_and_set(dest, exchange_value); +-#else +-#ifdef M68K +- return m68k_lock_test_and_set(dest, exchange_value); +-#else +- return __sync_lock_test_and_set (dest, exchange_value); +-#endif // M68K +-#endif // ARM ++ return (intptr_t)atomic_swap_ptr((volatile void *)dest, ++ (void *)exchange_value); + } + + inline void* Atomic::xchg_ptr(void* exchange_value, volatile void* dest) { +- return (void *) xchg_ptr((intptr_t) exchange_value, +- (volatile intptr_t*) dest); ++ return atomic_swap_ptr(dest, exchange_value); + } + + inline jint Atomic::cmpxchg(jint exchange_value, + volatile jint* dest, + jint compare_value) { +-#ifdef ARM +- return arm_compare_and_swap(dest, compare_value, exchange_value); +-#else +-#ifdef M68K +- return m68k_compare_and_swap(dest, compare_value, exchange_value); +-#else +- return __sync_val_compare_and_swap(dest, compare_value, exchange_value); +-#endif // M68K +-#endif // ARM ++ return atomic_cas_uint((volatile u_int *)dest, compare_value, exchange_value); + } + + inline jlong Atomic::cmpxchg(jlong exchange_value, + volatile jlong* dest, + jlong compare_value) { +- +- return __sync_val_compare_and_swap(dest, compare_value, exchange_value); ++ return atomic_cas_ulong((volatile u_long *)dest, compare_value, ++ exchange_value); + } + + inline intptr_t Atomic::cmpxchg_ptr(intptr_t exchange_value, + volatile intptr_t* dest, + intptr_t compare_value) { +-#ifdef ARM +- return arm_compare_and_swap(dest, compare_value, exchange_value); +-#else +-#ifdef M68K +- return m68k_compare_and_swap(dest, compare_value, exchange_value); +-#else +- return __sync_val_compare_and_swap(dest, compare_value, exchange_value); +-#endif // M68K +-#endif // ARM ++ return (intptr_t)atomic_cas_ptr((volatile void *)dest, (void *)compare_value, ++ (void *)exchange_value); + } + + inline void* Atomic::cmpxchg_ptr(void* exchange_value, + volatile void* dest, + void* compare_value) { +- +- return (void *) cmpxchg_ptr((intptr_t) exchange_value, +- (volatile intptr_t*) dest, +- (intptr_t) compare_value); ++ return atomic_cas_ptr((volatile void *)dest, compare_value, exchange_value); + } diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_bytes_bsd_zero_inline_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_bytes_bsd_zero_inline_hpp new file mode 100644 index 00000000000..21a9be7107f --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_bytes_bsd_zero_inline_hpp @@ -0,0 +1,31 @@ +$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_bytes_bsd_zero_inline_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_zero/vm/bytes_bsd_zero.inline.hpp.orig Fri Oct 29 12:02:41 2010 ++++ hotspot/src/os_cpu/bsd_zero/vm/bytes_bsd_zero.inline.hpp Fri Oct 29 12:02:50 2010 +@@ -25,16 +25,23 @@ + // Efficient swapping of data bytes from Java byte + // ordering to native byte ordering and vice versa. + +-#include ++#ifdef __APPLE__ ++#include ++#define bswap16(x) OSSwapInt16(x) ++#define bswap32(x) OSSwapInt32(x) ++#define bswap64(x) OSSwapInt64(x) ++#else ++# include ++#endif + + inline u2 Bytes::swap_u2(u2 x) { +- return bswap_16(x); ++ return bswap16(x); + } + + inline u4 Bytes::swap_u4(u4 x) { +- return bswap_32(x); ++ return bswap32(x); + } + + inline u8 Bytes::swap_u8(u8 x) { +- return bswap_64(x); ++ return bswap64(x); + } diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_orderAccess_bsd_zero_inline_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_orderAccess_bsd_zero_inline_hpp new file mode 100644 index 00000000000..e9c7f1b35ed --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_orderAccess_bsd_zero_inline_hpp @@ -0,0 +1,16 @@ +$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_orderAccess_bsd_zero_inline_hpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp.orig Fri Oct 29 12:03:21 2010 ++++ hotspot/src/os_cpu/bsd_zero/vm/orderAccess_bsd_zero.inline.hpp Fri Oct 29 12:03:27 2010 +@@ -40,7 +40,12 @@ typedef void (__kernel_dmb_t) (void); + + #else // ARM + ++#ifdef __APPLE__ ++#include ++#define FULL_MEM_BARRIER OSMemoryBarrier() ++#else + #define FULL_MEM_BARRIER __sync_synchronize() ++#endif // __APPLE__ + + #ifdef PPC + diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_os_bsd_zero_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_os_bsd_zero_cpp new file mode 100644 index 00000000000..f43805165c7 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_os_cpu_bsd_zero_vm_os_bsd_zero_cpp @@ -0,0 +1,119 @@ +$OpenBSD: patch-hotspot_src_os_cpu_bsd_zero_vm_os_bsd_zero_cpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp.orig Fri Oct 29 12:03:50 2010 ++++ hotspot/src/os_cpu/bsd_zero/vm/os_bsd_zero.cpp Fri Oct 29 12:03:57 2010 +@@ -23,6 +23,10 @@ + * + */ + ++#if defined(_ALLBSD_SOURCE) && !defined(__APPLE__) && !defined(__NetBSD__) ++# include /* For pthread_attr_get_np */ ++#endif ++ + // do not include precompiled header file + #include "incls/_os_bsd_zero.cpp.incl" + +@@ -145,6 +149,7 @@ JVM_handle_bsd_signal(int sig, + thread->disable_stack_red_zone(); + ShouldNotCallThis(); + } ++#ifndef _ALLBSD_SOURCE + else { + // Accessing stack address below sp may cause SEGV if + // current thread has MAP_GROWSDOWN stack. This should +@@ -163,6 +168,7 @@ JVM_handle_bsd_signal(int sig, + fatal("recursive segv. expanding stack."); + } + } ++#endif + } + } + +@@ -230,6 +236,7 @@ void os::Bsd::init_thread_fpu_state(void) { + // Nothing to do + } + ++#ifndef _ALLBSD_SOURCE + int os::Bsd::get_fpu_control_word() { + ShouldNotCallThis(); + } +@@ -237,6 +244,7 @@ int os::Bsd::get_fpu_control_word() { + void os::Bsd::set_fpu_control_word(int fpu) { + ShouldNotCallThis(); + } ++#endif + + bool os::is_allocatable(size_t bytes) { + #ifdef _LP64 +@@ -281,7 +289,49 @@ size_t os::Bsd::default_guard_size(os::ThreadType thr_ + } + + static void current_stack_region(address *bottom, size_t *size) { ++ address stack_bottom; ++ address stack_top; ++ size_t stack_bytes; ++ ++#ifdef __APPLE__ ++ pthread_t self = pthread_self(); ++ stack_top = (address) pthread_get_stackaddr_np(self); ++ stack_bytes = pthread_get_stacksize_np(self); ++ stack_bottom = stack_top - stack_bytes; ++#elif defined(__OpenBSD__) ++ stack_t ss; ++ int rslt = pthread_stackseg_np(pthread_self(), &ss); ++ ++ if (rslt != 0) ++ fatal(err_msg("pthread_stackseg_np failed with err = %d", rslt)); ++ ++ stack_top = (address) ss.ss_sp; ++ stack_bytes = ss.ss_size; ++ stack_bottom = stacktop - stack_bytes; ++#elif defined(_ALLBSD_SOURCE) + pthread_attr_t attr; ++ ++ int rslt = pthread_attr_init(&attr); ++ ++ // JVM needs to know exact stack location, abort if it fails ++ if (rslt != 0) ++ fatal(err_msg("pthread_attr_init failed with err = %d", rslt)); ++ ++ rslt = pthread_attr_get_np(pthread_self(), &attr); ++ ++ if (rslt != 0) ++ fatal(err_msg("pthread_attr_get_np failed with err = %d", rslt)); ++ ++ if (pthread_attr_getstackaddr(&attr, (void **) &stack_bottom) != 0 || ++ pthread_attr_getstacksize(&attr, &stack_bytes) != 0) { ++ fatal("Can not locate current stack attributes!"); ++ } ++ ++ pthread_attr_destroy(&attr); ++ ++ stack_top = stack_bottom + stack_bytes; ++#else /* Linux */ ++ pthread_attr_t attr; + int res = pthread_getattr_np(pthread_self(), &attr); + if (res != 0) { + if (res == ENOMEM) { +@@ -292,13 +342,11 @@ static void current_stack_region(address *bottom, size + } + } + +- address stack_bottom; +- size_t stack_bytes; + res = pthread_attr_getstack(&attr, (void **) &stack_bottom, &stack_bytes); + if (res != 0) { + fatal(err_msg("pthread_attr_getstack failed with errno = %d", res)); + } +- address stack_top = stack_bottom + stack_bytes; ++ stack_top = stack_bottom + stack_bytes; + + // The block of memory returned by pthread_attr_getstack() includes + // guard pages where present. We need to trim these off. +@@ -340,6 +388,7 @@ static void current_stack_region(address *bottom, size + + stack_bottom = stack_top - stack_bytes; + } ++#endif + + assert(os::current_stack_pointer() >= stack_bottom, "should do"); + assert(os::current_stack_pointer() < stack_top, "should do"); diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_classfile_javaClasses_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_classfile_javaClasses_cpp new file mode 100644 index 00000000000..4ab60dd3449 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_classfile_javaClasses_cpp @@ -0,0 +1,12 @@ +$OpenBSD: patch-hotspot_src_share_vm_classfile_javaClasses_cpp,v 1.1 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/share/vm/classfile/javaClasses.cpp.orig Fri Oct 29 14:47:34 2010 ++++ hotspot/src/share/vm/classfile/javaClasses.cpp Fri Oct 29 14:47:42 2010 +@@ -952,7 +952,7 @@ char* java_lang_Throwable::print_stack_element_to_buff + } + nmethod* nm = method->code(); + if (WizardMode && nm != NULL) { +- sprintf(buf + (int)strlen(buf), "(nmethod " PTR_FORMAT ")", (intptr_t)nm); ++ sprintf(buf + (int)strlen(buf), "(nmethod " INTPTR_FORMAT ")", (intptr_t)nm); + } + } + diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp index a8ad3c39e70..7bd54e793f5 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp,v 1.4 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp.orig Fri May 8 03:30:34 2009 -+++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp Sat May 9 10:15:54 2009 -@@ -77,7 +77,7 @@ class BytecodePrinter: public BytecodeClosure { +$OpenBSD: patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/share/vm/interpreter/bytecodeTracer.cpp.orig Fri Aug 13 03:28:22 2010 ++++ hotspot/src/share/vm/interpreter/bytecodeTracer.cpp Mon Oct 25 19:45:44 2010 +@@ -83,7 +83,7 @@ class BytecodePrinter: public BytecodeClosure { // the incoming method. We could lose a line of trace output. // This is acceptable in a debug-only feature. st->cr(); @@ -10,10 +10,10 @@ $OpenBSD: patch-hotspot_src_share_vm_interpreter_bytecodeTracer_cpp,v 1.4 2009/0 method->print_name(st); st->cr(); _current_method = method(); -@@ -90,7 +90,7 @@ class BytecodePrinter: public BytecodeClosure { - code = Bytecodes::code_at(bcp); +@@ -97,7 +97,7 @@ class BytecodePrinter: public BytecodeClosure { } - int bci = bcp - method->code_base(); + _code = code; + int bci = bcp - method->code_base(); - st->print("[%d] ", (int) Thread::current()->osthread()->thread_id()); + st->print("[%ld] ", (long) Thread::current()->osthread()->thread_id()); if (Verbose) { diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_prims_forte_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_prims_forte_cpp index c64c4027f5e..7a639c96b1f 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_prims_forte_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_prims_forte_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_src_share_vm_prims_forte_cpp,v 1.1 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/prims/forte.cpp.orig Sat May 16 17:05:01 2009 -+++ hotspot/src/share/vm/prims/forte.cpp Sat May 16 17:05:10 2009 -@@ -626,6 +626,11 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint de +$OpenBSD: patch-hotspot_src_share_vm_prims_forte_cpp,v 1.2 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/share/vm/prims/forte.cpp.orig Fri Aug 13 03:28:24 2010 ++++ hotspot/src/share/vm/prims/forte.cpp Mon Oct 25 18:15:45 2010 +@@ -629,6 +629,11 @@ void AsyncGetCallTrace(ASGCT_CallTrace *trace, jint de // Method to let libcollector know about a dynamically loaded function. // Because it is weakly bound, the calls become NOP's when the library // isn't present. @@ -13,7 +13,7 @@ $OpenBSD: patch-hotspot_src_share_vm_prims_forte_cpp,v 1.1 2009/05/23 03:03:25 k void collector_func_load(char* name, void* null_argument_1, void* null_argument_2, -@@ -636,6 +641,7 @@ void collector_func_load(char* name, +@@ -639,6 +644,7 @@ void collector_func_load(char* name, #pragma weak collector_func_load #define collector_func_load(x0,x1,x2,x3,x4,x5,x6) \ ( collector_func_load ? collector_func_load(x0,x1,x2,x3,x4,x5,x6),0 : 0 ) diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_globals_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_globals_hpp deleted file mode 100644 index b899d32fa30..00000000000 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_globals_hpp +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-hotspot_src_share_vm_runtime_globals_hpp,v 1.5 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/runtime/globals.hpp.orig Fri May 8 03:30:37 2009 -+++ hotspot/src/share/vm/runtime/globals.hpp Sat May 9 10:15:54 2009 -@@ -316,7 +316,7 @@ class CommandLineFlags { - /* UseMembar is theoretically a temp flag used for memory barrier \ - * removal testing. It was supposed to be removed before FCS but has \ - * been re-added (see 6401008) */ \ -- product(bool, UseMembar, false, \ -+ product(bool, UseMembar, true, \ - "(Unstable) Issues membars on thread state transitions") \ - \ - product(bool, PrintCommandLineFlags, false, \ diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_os_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_os_cpp index cf6cc3aff32..4c72437ceac 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_os_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_os_cpp @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_src_share_vm_runtime_os_cpp,v 1.4 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/runtime/os.cpp.orig Fri May 8 03:30:37 2009 -+++ hotspot/src/share/vm/runtime/os.cpp Sun May 10 19:23:00 2009 +$OpenBSD: patch-hotspot_src_share_vm_runtime_os_cpp,v 1.5 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/share/vm/runtime/os.cpp.orig Thu Dec 16 16:53:09 2010 ++++ hotspot/src/share/vm/runtime/os.cpp Wed Jan 5 22:30:08 2011 @@ -79,7 +79,11 @@ char* os::iso8601_time(char* buffer, size_t buffer_len assert(false, "Failed localtime_pd"); return NULL; @@ -13,3 +13,16 @@ $OpenBSD: patch-hotspot_src_share_vm_runtime_os_cpp,v 1.4 2009/05/23 03:03:25 ku // If daylight savings time is in effect, // we are 1 hour East of our time zone +@@ -347,6 +351,12 @@ void* os::native_java_library() { + if (_native_java_library == NULL) { + vm_exit_during_initialization("Unable to load native library", ebuf); + } ++#if defined(__OpenBSD__) ++ // Work-around OpenBSD's lack of $ORIGIN support by pre-loading libnet.so ++ // ignore errors ++ dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), "net"); ++ dll_load(buffer, ebuf, sizeof(ebuf)); ++#endif + } + static jboolean onLoaded = JNI_FALSE; + if (onLoaded) { diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_vm_version_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_vm_version_cpp index c7f9fe60f9b..46887123ec6 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_vm_version_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_runtime_vm_version_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_src_share_vm_runtime_vm_version_cpp,v 1.6 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/runtime/vm_version.cpp.orig Fri May 8 03:30:37 2009 -+++ hotspot/src/share/vm/runtime/vm_version.cpp Fri May 15 17:50:17 2009 -@@ -140,7 +140,8 @@ const char* Abstract_VM_Version::vm_release() { +$OpenBSD: patch-hotspot_src_share_vm_runtime_vm_version_cpp,v 1.7 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/share/vm/runtime/vm_version.cpp.orig Thu Oct 28 20:17:02 2010 ++++ hotspot/src/share/vm/runtime/vm_version.cpp Mon Nov 1 13:16:17 2010 +@@ -149,7 +149,8 @@ const char* Abstract_VM_Version::vm_release() { #define OS LINUX_ONLY("linux") \ WINDOWS_ONLY("windows") \ @@ -9,5 +9,5 @@ $OpenBSD: patch-hotspot_src_share_vm_runtime_vm_version_cpp,v 1.6 2009/05/23 03: + SOLARIS_ONLY("solaris") \ + BSD_ONLY("bsd") - #define CPU IA32_ONLY("x86") \ - IA64_ONLY("ia64") \ + #ifdef ZERO + #define CPU ZERO_LIBARCH diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp index 23b0b4ed042..ee3abc5d14c 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp,v 1.4 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig Fri May 8 03:30:37 2009 -+++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Fri May 15 17:50:50 2009 +$OpenBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp,v 1.5 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp.orig Thu Oct 28 20:17:03 2010 ++++ hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp Mon Nov 1 13:16:17 2010 @@ -71,12 +71,25 @@ # include # endif @@ -56,7 +56,7 @@ $OpenBSD: patch-hotspot_src_share_vm_utilities_globalDefinitions_gcc_hpp,v 1.4 2 // Additional Java basic types -@@ -228,7 +241,9 @@ inline int g_isnan(float f) { return isnanf(f); } +@@ -236,7 +249,9 @@ inline int g_isnan(float f) { return isnanf(f); } inline int g_isnan(float f) { return isnand(f); } #endif inline int g_isnan(double f) { return isnand(f); } diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_macros_hpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_macros_hpp index 5083108ac60..66e20e1c0f8 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_macros_hpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_macros_hpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_src_share_vm_utilities_macros_hpp,v 1.8 2009/10/07 01:53:54 kurt Exp $ ---- hotspot/src/share/vm/utilities/macros.hpp.orig Thu Sep 17 03:48:17 2009 -+++ hotspot/src/share/vm/utilities/macros.hpp Sat Sep 26 10:00:47 2009 -@@ -148,6 +148,14 @@ +$OpenBSD: patch-hotspot_src_share_vm_utilities_macros_hpp,v 1.9 2011/01/11 15:47:49 kurt Exp $ +--- hotspot/src/share/vm/utilities/macros.hpp.orig Thu Oct 28 20:17:03 2010 ++++ hotspot/src/share/vm/utilities/macros.hpp Mon Nov 1 13:16:17 2010 +@@ -158,6 +158,14 @@ #define NOT_WINDOWS(code) code #endif diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_ostream_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_ostream_cpp index d533a548010..6da0fcfcab7 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_ostream_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_ostream_cpp @@ -1,7 +1,7 @@ -$OpenBSD: patch-hotspot_src_share_vm_utilities_ostream_cpp,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/utilities/ostream.cpp.orig Fri May 8 03:30:37 2009 -+++ hotspot/src/share/vm/utilities/ostream.cpp Sat May 9 10:15:54 2009 -@@ -827,7 +827,7 @@ bufferedStream::~bufferedStream() { +$OpenBSD: patch-hotspot_src_share_vm_utilities_ostream_cpp,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- hotspot/src/share/vm/utilities/ostream.cpp.orig Fri Aug 13 03:28:25 2010 ++++ hotspot/src/share/vm/utilities/ostream.cpp Mon Oct 25 18:15:45 2010 +@@ -848,7 +848,7 @@ bufferedStream::~bufferedStream() { #ifndef PRODUCT diff --git a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_vmError_cpp b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_vmError_cpp index 5d7bfddfc63..2b5c825ac1d 100644 --- a/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_vmError_cpp +++ b/devel/jdk/1.7/patches/patch-hotspot_src_share_vm_utilities_vmError_cpp @@ -1,6 +1,6 @@ -$OpenBSD: patch-hotspot_src_share_vm_utilities_vmError_cpp,v 1.6 2009/05/23 03:03:25 kurt Exp $ ---- hotspot/src/share/vm/utilities/vmError.cpp.orig Fri May 8 03:30:37 2009 -+++ hotspot/src/share/vm/utilities/vmError.cpp Fri May 15 17:51:40 2009 +$OpenBSD: patch-hotspot_src_share_vm_utilities_vmError_cpp,v 1.7 2011/01/11 15:47:50 kurt Exp $ +--- hotspot/src/share/vm/utilities/vmError.cpp.orig Thu Dec 16 16:53:14 2010 ++++ hotspot/src/share/vm/utilities/vmError.cpp Tue Jan 4 18:25:20 2011 @@ -31,13 +31,18 @@ const char *env_list[] = { "JAVA_HOME", "JRE_HOME", "JAVA_TOOL_OPTIONS", "_JAVA_OPTIONS", "CLASSPATH", "JAVA_COMPILER", "PATH", "USERNAME", @@ -21,7 +21,7 @@ $OpenBSD: patch-hotspot_src_share_vm_utilities_vmError_cpp,v 1.6 2009/05/23 03:0 // defined on Windows "OS", "PROCESSOR_IDENTIFIER", "_ALT_JAVA_HOME_DIR", -@@ -799,7 +804,7 @@ void VMError::report_and_die() { +@@ -875,7 +880,7 @@ void VMError::report_and_die() { const char* ptr = OnError; while ((cmd = next_OnError_command(buffer, sizeof(buffer), &ptr)) != NULL){ out.print_raw ("# Executing "); diff --git a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_java_pack_Makefile b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_java_pack_Makefile index 47ca85ba689..6f7b759d51b 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_java_pack_Makefile +++ b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_java_pack_Makefile @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.3 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/com/sun/java/pack/Makefile.orig Thu Sep 17 03:51:40 2009 -+++ jdk/make/com/sun/java/pack/Makefile Sat Sep 26 10:00:47 2009 -@@ -61,6 +61,7 @@ vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR) +$OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/com/sun/java/pack/Makefile.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/com/sun/java/pack/Makefile Mon Oct 25 18:15:45 2010 +@@ -62,6 +62,7 @@ vpath %.cpp $(SHARE_SRC)/native/$(PKGDIR) ifeq ($(STANDALONE),true) @@ -9,7 +9,7 @@ $OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.3 2009/10/07 01:53:54 ku ZIPOBJDIR = $(OUTPUTDIR)/tmp/sun/java.util.zip/zip/$(OBJDIRNAME) ZIPOBJS = $(ZIPOBJDIR)/zcrc32.$(OBJECT_SUFFIX) \ -@@ -77,6 +78,10 @@ ifeq ($(STANDALONE),true) +@@ -78,6 +79,10 @@ ifeq ($(STANDALONE),true) ZINCLUDE=-I$(SHARE_SRC)/native/java/util/zip/zlib-$(ZLIB_VERSION) OTHER_CXXFLAGS += $(ZINCLUDE) LDDFLAGS += $(ZIPOBJS) @@ -20,7 +20,7 @@ $OpenBSD: patch-jdk_make_com_sun_java_pack_Makefile,v 1.3 2009/10/07 01:53:54 ku else OTHER_CXXFLAGS += -DNO_ZLIB -DUNPACK_JNI OTHER_LDLIBS += $(JVMLIB) -@@ -98,7 +103,11 @@ ifeq ($(PLATFORM), windows) +@@ -99,7 +104,11 @@ ifeq ($(PLATFORM), windows) RES = $(OBJDIR)/$(PGRM).res else LDOUTPUT = -o #Have a space diff --git a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_Makefile b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_Makefile index 054e9897c2c..e8a02e325ca 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_Makefile +++ b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_Makefile @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_make_com_sun_nio_Makefile,v 1.1 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/com/sun/nio/Makefile.orig Sun Sep 27 09:46:26 2009 -+++ jdk/make/com/sun/nio/Makefile Sun Sep 27 09:46:34 2009 +$OpenBSD: patch-jdk_make_com_sun_nio_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/com/sun/nio/Makefile.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/com/sun/nio/Makefile Tue Oct 26 10:30:03 2010 @@ -30,7 +30,16 @@ BUILDDIR = ../../.. include $(BUILDDIR)/common/Defs.gmk @@ -15,6 +15,6 @@ $OpenBSD: patch-jdk_make_com_sun_nio_Makefile,v 1.1 2009/10/07 01:53:54 kurt Exp +endif +endif +endif - all build clean clobber:: - $(SUBDIRS-loop) + include $(BUILDDIR)/common/Subdirs.gmk + all build clean clobber:: diff --git a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_sctp_Makefile b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_sctp_Makefile index 08e0e59d5e3..036ff1dd715 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_sctp_Makefile +++ b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_nio_sctp_Makefile @@ -1,13 +1,21 @@ -$OpenBSD: patch-jdk_make_com_sun_nio_sctp_Makefile,v 1.1 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/com/sun/nio/sctp/Makefile.orig Sun Sep 27 09:46:49 2009 -+++ jdk/make/com/sun/nio/sctp/Makefile Sun Sep 27 09:47:02 2009 -@@ -68,6 +68,9 @@ ifeq ($(PLATFORM), solaris) - #LIBSCTP = -lsctp - OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio - endif # PLATFORM -+ifeq ($(PLATFORM), bsd) +$OpenBSD: patch-jdk_make_com_sun_nio_sctp_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/com/sun/nio/sctp/Makefile.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/com/sun/nio/sctp/Makefile Tue Oct 26 10:30:35 2010 +@@ -60,15 +60,11 @@ OTHER_INCLUDES += \ + -I$(PLATFORM_SRC)/native/java/net \ + -I$(CLASSHDRDIR)/../../../../java/java.nio/nio/CClassHeaders + +OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio -+endif + ifeq ($(PLATFORM), linux) + COMPILER_WARNINGS_FATAL=true +-#OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -ljava -lnet -lpthread -ldl +-OTHER_LDLIBS += -L$(LIBDIR)/$(LIBARCH) -lnio -lnet -lpthread -ldl ++OTHER_LDLIBS += -lpthread $(LIBDL) + endif +-ifeq ($(PLATFORM), solaris) +-#LIBSCTP = -lsctp +-OTHER_LDLIBS += $(LIBSOCKET) -L$(LIBDIR)/$(LIBARCH) -lnet -lnio +-endif # PLATFORM else # windows include $(BUILDDIR)/common/Classes.gmk diff --git a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_security_auth_module_Makefile b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_security_auth_module_Makefile index b5285eabf99..181fa52e7ff 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_security_auth_module_Makefile +++ b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_security_auth_module_Makefile @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_make_com_sun_security_auth_module_Makefile,v 1.2 2009/01/04 23:25:16 kurt Exp $ ---- jdk/make/com/sun/security/auth/module/Makefile.orig Mon Aug 4 03:43:01 2008 -+++ jdk/make/com/sun/security/auth/module/Makefile Wed Aug 13 13:39:36 2008 -@@ -67,7 +67,7 @@ ifeq ($(PLATFORM), solaris) +$OpenBSD: patch-jdk_make_com_sun_security_auth_module_Makefile,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/com/sun/security/auth/module/Makefile.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/com/sun/security/auth/module/Makefile Mon Oct 25 18:15:45 2010 +@@ -68,7 +68,7 @@ ifeq ($(PLATFORM), solaris) include FILES_c_solaris.gmk endif # solaris diff --git a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_tools_attach_Makefile b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_tools_attach_Makefile index 1fb47225ac7..2aee32b4376 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_com_sun_tools_attach_Makefile +++ b/devel/jdk/1.7/patches/patch-jdk_make_com_sun_tools_attach_Makefile @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_make_com_sun_tools_attach_Makefile,v 1.1 2009/05/23 03:03:25 kurt Exp $ ---- jdk/make/com/sun/tools/attach/Makefile.orig Mon May 18 10:39:47 2009 -+++ jdk/make/com/sun/tools/attach/Makefile Mon May 18 10:39:55 2009 -@@ -36,6 +36,9 @@ endif +$OpenBSD: patch-jdk_make_com_sun_tools_attach_Makefile,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/com/sun/tools/attach/Makefile.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/com/sun/tools/attach/Makefile Mon Oct 25 18:15:45 2010 +@@ -37,6 +37,9 @@ endif ifeq ($(PLATFORM), linux) FILES_m = mapfile-linux endif diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-bsd_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-bsd_gmk index 9005ffd63bc..c57aa3d7f2e 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-bsd_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-bsd_gmk @@ -1,20 +1,16 @@ -$OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/common/Defs-bsd.gmk.orig Sun Sep 27 09:39:53 2009 -+++ jdk/make/common/Defs-bsd.gmk Sun Sep 27 09:48:31 2009 -@@ -43,12 +43,6 @@ - # Get shared JDK settings - include $(JDK_MAKE_SHARED_DIR)/Defs.gmk +$OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.7 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/Defs-bsd.gmk.orig Tue Oct 26 09:56:36 2010 ++++ jdk/make/common/Defs-bsd.gmk Tue Oct 26 10:31:46 2010 +@@ -25,7 +25,7 @@ --# Part of INCREMENTAL_BUILD mechanism. --# Compiler emits things like: path/file.o: file.h --# We want something like: relative_path/file.o relative_path/file.d: file.h --CC_DEPEND = -MM --CC_DEPEND_FILTER = $(SED) -e 's!$*\.$(OBJECT_SUFFIX)!$(dir $@)& $(dir $@)$*.$(DEPEND_SUFFIX)!g' -- - ifndef PLATFORM_SRC - PLATFORM_SRC = $(BUILDDIR)/../src/solaris - endif # PLATFORM_SRC -@@ -61,7 +55,7 @@ ifndef OPENJDK + # + # Makefile to specify compiler flags for programs and libraries +-# targeted to Bsd. Should not contain any rules. ++# targeted to BSD. Should not contain any rules. + # + # WARNING: This file is shared with other workspaces. + # So when it includes other files, it must use JDK_TOPDIR. +@@ -61,7 +61,7 @@ ifndef OPENJDK endif # platform specific include files @@ -23,33 +19,56 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp PLATFORM_INCLUDE = $(INCLUDEDIR)/$(PLATFORM_INCLUDE_NAME) # suffix used for make dependencies files. -@@ -109,8 +103,14 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) +@@ -109,9 +109,11 @@ CC_OPT = $(CC_OPT/$(OPTIMIZATION_LEVEL)) # We need this frame pointer to make it easy to walk the stacks. # This should be the default on X86, but ia64 and amd64 may not have this # as the default. -CFLAGS_REQUIRED_amd64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN -CFLAGS_REQUIRED_i586 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN +-CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN +CFLAGS_REQUIRED_amd64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN +LDFLAGS_COMMON_amd64 += -m64 +CFLAGS_REQUIRED_i586 += -m32 -fno-omit-frame-pointer -D_LITTLE_ENDIAN +LDFLAGS_COMMON_i586 += -m32 ++CFLAGS_REQUIRED_ia64 += -m64 -fno-omit-frame-pointer -D_LITTLE_ENDIAN + CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 + LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 + CFLAGS_REQUIRED_sparc += -m32 -mcpu=v9 +@@ -126,9 +128,13 @@ else + CFLAGS_REQUIRED = $(CFLAGS_REQUIRED_$(ARCH)) + LDFLAGS_COMMON += $(LDFLAGS_COMMON_$(ARCH)) + endif +ifeq ($(OS_VENDOR),Apple) + # 16-byte stack re-alignment on 32-bit Darwin + CFLAGS_REQUIRED_i586 += -mstackrealign +endif - CFLAGS_REQUIRED_ia64 += -fno-omit-frame-pointer -D_LITTLE_ENDIAN - CFLAGS_REQUIRED_sparcv9 += -m64 -mcpu=v9 - LDFLAGS_COMMON_sparcv9 += -m64 -mcpu=v9 -@@ -186,7 +186,7 @@ ifeq ($(FASTDEBUG), true) - CXXFLAGS_DBG += $(CC_OPT/$(FASTDEBUG_OPTIMIZATION_LEVEL)) + + # If this is a --hash-style=gnu system, use --hash-style=both +-# The gnu .hash section won't work on some Bsd systems like SuSE 10. ++# The gnu .hash section won't work on some Linux systems like SuSE 10. + _HAS_HASH_STYLE_GNU:=$(shell $(CC) -dumpspecs | $(GREP) -- '--hash-style=gnu') + ifneq ($(_HAS_HASH_STYLE_GNU),) + LDFLAGS_HASH_STYLE = -Wl,--hash-style=both +@@ -165,7 +171,7 @@ ifeq ($(ARCH), amd64) + CFLAGS_COMMON += -pipe endif --CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -DLINUX $(VERSION_DEFINES) \ -+CPPFLAGS_COMMON = -D$(ARCH) -DARCH='"$(ARCH)"' -D_ALLBSD_SOURCE $(VERSION_DEFINES) \ +-# Bsd 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1 ++# BSD 64bit machines use Dwarf2, which can be HUGE, have fastdebug use -g1 + DEBUG_FLAG = -g + ifeq ($(FASTDEBUG), true) + ifeq ($(ARCH_DATA_MODEL), 64) +@@ -202,8 +208,7 @@ ifneq ($(ARCH),alpha) + else + CPP_ARCH_FLAGS += -D_$(ARCH)_ + endif +- +-CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -DLINUX $(VERSION_DEFINES) \ ++CPPFLAGS_COMMON = $(CPP_ARCH_FLAGS) -D_ALLBSD_SOURCE $(VERSION_DEFINES) \ -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT ifeq ($(ARCH_DATA_MODEL), 64) -@@ -199,33 +199,15 @@ ifneq ($(PRODUCT), java) +@@ -216,33 +221,37 @@ ifneq ($(PRODUCT), java) CPPFLAGS_DBG += -DLOGGING endif @@ -65,13 +84,31 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp - # The environment variable LD_LIBRARY_PATH will over-ride these runpaths. - # Try: 'readelf -d lib*.so' to see these settings in a library. - # -- LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN -- LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) --endif -- ++# Libraries need to locate other libraries at runtime, and you can tell ++# a library where to look by way of the dynamic runpaths (RPATH or RUNPATH) ++# buried inside the .{so,dylib}. The {$ORIGIN,@loader_path/} says to look ++# relative to where the library itself is and it can be followed ++# with relative paths from that. By default we always look in ++# {$ORIGIN,@loader_path/}, optionally we add relative paths if the Makefile ++# sets LD_RUNPATH_EXTRAS to those relative paths. ++# Except on MacOS X we add a flag -z origin, not sure if this is necessary, ++# but doesn't seem to hurt. ++# The environment variable LD_LIBRARY_PATH will over-ride these runpaths. ++# See 'man {dyld,rtld}' for more information. ++# Try: 'readelf -d lib*.so' to see these settings in a library. ++# ++ifeq ($(OS_VENDOR), Apple) ++ LDFLAGS_COMMON += -Xlinker -rpath -Xlinker @loader_path/. ++ LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -rpath -Xlinker @loader_path/%) ++ LDFLAGS_COMMON += -Xlinker -install_name -Xlinker @rpath/$(@F) ++else + LDFLAGS_COMMON += -Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN + LDFLAGS_COMMON += $(LD_RUNPATH_EXTRAS:%=-Xlinker -z -Xlinker origin -Xlinker -rpath -Xlinker \$$ORIGIN/%) + endif + -EXTRA_LIBS += -lc - --LDFLAGS_DEFS_OPTION = -z defs +-LDFLAGS_DEFS_OPTION = -Xlinker -z -Xlinker defs -LDFLAGS_COMMON += $(LDFLAGS_DEFS_OPTION) - # @@ -87,7 +124,7 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp # # -static-libgcc is a gcc-3 flag to statically link libgcc, gcc-2.9x always -@@ -247,9 +229,9 @@ AUTOMATIC_PCH_OPTION = +@@ -264,9 +273,9 @@ AUTOMATIC_PCH_OPTION = ifeq ($(VARIANT), OPT) ifneq ($(NO_STRIP), true) ifneq ($(DEBUG_BINARIES), true) @@ -99,24 +136,19 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp endif endif endif -@@ -259,13 +241,9 @@ endif - # - LD_MAPFILE_FLAG = -Xlinker --version-script -Xlinker +@@ -285,6 +294,11 @@ QUANTIFY_OPTIONS = -cache-dir=/tmp/quantify -always-us + LINK_PRE_CMD = $(QUANTIFY_CMD) $(QUANTIFY_OPTIONS) + endif --# --# 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) +# Darwin does not support linker map files. +ifeq ($(OS_VENDOR), Apple) +LDNOMAP=true - endif - ++endif ++ # -@@ -294,7 +272,9 @@ override HAVE_ALTZONE = false + # 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 +@@ -311,7 +325,9 @@ override HAVE_ALTZONE = false override HAVE_FILIOH = false override HAVE_GETHRTIME = false override HAVE_GETHRVTIME = false @@ -126,8 +158,11 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp override LEX_LIBRARY = -lfl ifeq ($(STATIC_CXX),true) override LIBCXX = -Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic -@@ -306,12 +286,8 @@ override LIBSOCKET = +@@ -322,14 +338,11 @@ override LIBPOSIX4 = + override LIBSOCKET = + override LIBNSL = override LIBTHREAD = ++override LIBDL = override MOOT_PRIORITIES = true override NO_INTERRUPTIBLE_IO = true -override OPENWIN_HOME = /usr/X11R6 @@ -140,11 +175,10 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp override OTHER_M4FLAGS = -D__GLIBC__ -DGNU_ASSEMBLER override SUN_CMM_SUBDIR = override THREADS_FLAG = native -@@ -331,6 +307,14 @@ override USE_EXECNAME = true - # HAVE_DPS should only be "no" if the platform has no DPS headers or libs +@@ -350,6 +363,14 @@ override USE_EXECNAME = true # DPS (Displayable PostScript) is available on Solaris machines HAVE_DPS = no -+ + +ifeq ($(OS_VENDOR), FreeBSD) + SYSTEM_ZLIB = true +endif @@ -152,6 +186,16 @@ $OpenBSD: patch-jdk_make_common_Defs-bsd_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp +ifeq ($(OS_VENDOR), OpenBSD) + SYSTEM_ZLIB = true +endif - ++ # # Japanese manpages + # +@@ -361,7 +382,7 @@ HOTSPOT_SALIB_PATH = $(HOTSPOT_IMPORT_PATH)/jre/lib/ + SALIB_NAME = $(LIB_PREFIX)saproc.$(LIBRARY_SUFFIX) + + # The JDI - Serviceability Agent binding is not currently supported +-# on Bsd-ia64. ++# on ia64. + ifeq ($(ARCH), ia64) + INCLUDE_SA = false + else diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-linux_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-linux_gmk index d6595a560e0..743609c6ada 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-linux_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-linux_gmk @@ -1,8 +1,11 @@ -$OpenBSD: patch-jdk_make_common_Defs-linux_gmk,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/common/Defs-linux.gmk.orig Thu Sep 17 03:51:40 2009 -+++ jdk/make/common/Defs-linux.gmk Sat Sep 26 10:00:47 2009 -@@ -306,7 +306,7 @@ override LIBSOCKET = +$OpenBSD: patch-jdk_make_common_Defs-linux_gmk,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/Defs-linux.gmk.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/common/Defs-linux.gmk Tue Oct 26 10:31:57 2010 +@@ -322,9 +322,10 @@ override LIBPOSIX4 = + override LIBSOCKET = + override LIBNSL = override LIBTHREAD = ++override LIBDL = -ldl override MOOT_PRIORITIES = true override NO_INTERRUPTIBLE_IO = true -override OPENWIN_HOME = /usr/X11R6 diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-solaris_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-solaris_gmk new file mode 100644 index 00000000000..c73626aad8b --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs-solaris_gmk @@ -0,0 +1,13 @@ +$OpenBSD: patch-jdk_make_common_Defs-solaris_gmk,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/Defs-solaris.gmk.orig Tue Oct 26 10:32:20 2010 ++++ jdk/make/common/Defs-solaris.gmk Tue Oct 26 10:32:27 2010 +@@ -648,6 +648,9 @@ LIBSOCKET = -lsocket + # Network Services library + LIBNSL = -lnsl + ++# Dynamic Loading library ++LIBDL = -ldl ++ + # GLOBAL_KPIC: If set means all libraries are PIC, position independent code + # EXCEPT for select compiles + # If a .o file is compiled non-PIC then it should be forced diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_Defs_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs_gmk index b207796ad0e..6c233b283d6 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_Defs_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_Defs_gmk @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/common/Defs.gmk.orig Thu Sep 17 03:51:40 2009 -+++ jdk/make/common/Defs.gmk Sat Sep 26 10:00:47 2009 -@@ -181,6 +181,36 @@ ifdef OPENJDK +$OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.6 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/Defs.gmk.orig Thu Dec 16 17:09:55 2010 ++++ jdk/make/common/Defs.gmk Tue Jan 4 18:25:20 2011 +@@ -186,6 +186,36 @@ ifdef OPENJDK endif endif # OPENJDK @@ -38,7 +38,7 @@ $OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $ # # Get platform definitions # -@@ -216,6 +246,7 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \ +@@ -221,6 +251,7 @@ DEVTOOLS_FT_DIR_EXISTS = $(shell \ ifdef ALT_FREETYPE_LIB_PATH FREETYPE_LIB_PATH = $(ALT_FREETYPE_LIB_PATH) @@ -46,7 +46,7 @@ $OpenBSD: patch-jdk_make_common_Defs_gmk,v 1.5 2009/10/07 01:53:54 kurt Exp $ else ifeq ($(DEVTOOLS_FT_DIR_EXISTS), true) FREETYPE_LIB_PATH = $(DEVTOOLS_FT_DIR)/lib -@@ -284,6 +315,10 @@ ifdef PROGRAM +@@ -283,6 +314,10 @@ ifdef PROGRAM ifeq ($(PLATFORM), linux) LDLIBS_COMMON = -ldl diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_Program_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_Program_gmk index 5c0a3465f94..539ffb349a5 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_Program_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_Program_gmk @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/make/common/Program.gmk.orig Fri May 8 03:34:14 2009 -+++ jdk/make/common/Program.gmk Mon May 18 11:13:27 2009 -@@ -67,11 +67,27 @@ endif +$OpenBSD: patch-jdk_make_common_Program_gmk,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/Program.gmk.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/common/Program.gmk Mon Oct 25 18:15:45 2010 +@@ -65,11 +65,27 @@ endif # Create a dependency on libjli (Java Launcher Infrastructure) # # On UNIX, this is a relative dependency using $ORIGIN. Unfortunately, to @@ -30,7 +30,7 @@ $OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $ ifneq (,$(findstring $(PLATFORM), linux solaris)) # UNIX systems LDFLAGS += -L $(LIBDIR)/$(LIBARCH)/jli OTHER_LDLIBS += -ljli -@@ -180,6 +196,10 @@ else # USE_PTHREADS +@@ -178,6 +194,10 @@ else # USE_PTHREADS THREADLIBS = $(LIBTHREAD) endif # USE_PTHREADS @@ -41,7 +41,7 @@ $OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $ # # This rule only applies on unix. It supports quantify and its ilk. # -@@ -248,15 +268,19 @@ endif +@@ -247,15 +267,19 @@ endif ifneq ($(PLATFORM), windows) @@ -59,5 +59,5 @@ $OpenBSD: patch-jdk_make_common_Program_gmk,v 1.3 2009/05/23 03:03:25 kurt Exp $ OTHER_INCLUDES += -I$(SHARE_SRC)/native/java/util/zip/zlib-1.1.3 +endif - # this may not be necessary... - ifeq ($(PLATFORM), windows) + OTHER_CPPFLAGS += -DPROGNAME='"$(PROGRAM)"' + VERSION_DEFINES += -DFULL_VERSION='"$(FULL_VERSION)"' diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_Release_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_Release_gmk index b5a571f303f..7a77d80edf3 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_Release_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_Release_gmk @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/common/Release.gmk.orig Thu Sep 17 03:51:40 2009 -+++ jdk/make/common/Release.gmk Sat Sep 26 10:00:47 2009 -@@ -148,14 +148,13 @@ JRE_MAN_PAGES = \ +$OpenBSD: patch-jdk_make_common_Release_gmk,v 1.5 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/Release.gmk.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/common/Release.gmk Mon Oct 25 18:15:45 2010 +@@ -154,14 +154,13 @@ JRE_MAN_PAGES = \ tnameserv.1 \ unpack200.1 @@ -17,7 +17,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $ extcheck.1 \ idlj.1 \ jar.1 \ -@@ -194,6 +193,11 @@ ifeq ($(PLATFORM), linux) +@@ -200,6 +199,11 @@ ifeq ($(PLATFORM), linux) JA_DIRNAME=ja_JP.$(JA_SOURCE_ENCODING) endif # linux @@ -29,7 +29,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $ define copy-man-pages $(MKDIR) -p $1/man/man1 for manbase in $(MANBASEDIRS:%=%/$(MAN1SUBDIR)) ; do \ -@@ -326,7 +330,13 @@ ifndef OPENJDK +@@ -332,7 +336,13 @@ ifndef OPENJDK SOURCE_DIRS += $(CLOSED_SRC)/share/classes endif @@ -43,7 +43,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $ # # Specific files and directories that will be filtered out from above areas. # -@@ -984,7 +994,7 @@ initial-image-jdk:: initial-image-jdk-setup \ +@@ -1027,7 +1037,7 @@ initial-image-jdk:: initial-image-jdk-setup \ @# 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. @@ -52,7 +52,7 @@ $OpenBSD: patch-jdk_make_common_Release_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $ for d in $(SOURCE_DIRS); do \ $(RM) $(ABS_TEMPDIR)/src-files.list; \ ($(CD) $$d && \ -@@ -997,7 +1007,7 @@ initial-image-jdk:: initial-image-jdk-setup \ +@@ -1040,7 +1050,7 @@ initial-image-jdk:: initial-image-jdk-setup \ done ; \ ) ; \ if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs-utils_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs-utils_gmk index c588fa97c8f..8f07b4a69ec 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs-utils_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs-utils_gmk @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_make_common_shared_Defs-utils_gmk,v 1.5 2010/09/03 21:54:39 naddy Exp $ ---- jdk/make/common/shared/Defs-utils.gmk.orig Thu Sep 17 01:51:40 2009 -+++ jdk/make/common/shared/Defs-utils.gmk Fri Sep 3 14:34:43 2010 +$OpenBSD: patch-jdk_make_common_shared_Defs-utils_gmk,v 1.6 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/shared/Defs-utils.gmk.orig Thu Oct 28 20:18:01 2010 ++++ jdk/make/common/shared/Defs-utils.gmk Mon Nov 1 13:16:18 2010 @@ -67,6 +67,13 @@ ifeq ($(PLATFORM),windows) UTILS_DEVTOOL_PATH=$(DEVTOOLS_PATH) endif @@ -15,7 +15,7 @@ $OpenBSD: patch-jdk_make_common_shared_Defs-utils_gmk,v 1.5 2010/09/03 21:54:39 # Utilities ADB = $(UTILS_COMMAND_PATH)adb AR = $(UTILS_CCS_BIN_PATH)ar -@@ -203,3 +210,39 @@ ifeq ($(PLATFORM),solaris) +@@ -202,3 +209,39 @@ ifeq ($(PLATFORM),solaris) ECHO = /usr/bin/echo endif diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs_gmk index e85a20c9cb0..b19e31a8572 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Defs_gmk @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_make_common_shared_Defs_gmk,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/common/shared/Defs.gmk.orig Thu Sep 17 03:51:40 2009 -+++ jdk/make/common/shared/Defs.gmk Sat Sep 26 10:00:47 2009 -@@ -589,8 +589,8 @@ ifeq ($(PLATFORM), solaris) +$OpenBSD: patch-jdk_make_common_shared_Defs_gmk,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/shared/Defs.gmk.orig Thu Oct 28 20:18:01 2010 ++++ jdk/make/common/shared/Defs.gmk Mon Nov 1 13:16:18 2010 +@@ -613,8 +613,8 @@ ifeq ($(PLATFORM), solaris) override CC_VERSION = sun endif diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Platform_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Platform_gmk index 99e1c252533..a801df73c54 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Platform_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Platform_gmk @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/common/shared/Platform.gmk.orig Thu Sep 17 03:51:40 2009 -+++ jdk/make/common/shared/Platform.gmk Mon Oct 5 14:54:16 2009 +$OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.7 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/shared/Platform.gmk.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/common/shared/Platform.gmk Tue Oct 26 10:32:41 2010 @@ -82,7 +82,7 @@ SYSTEM_UNAME := $(shell uname) SCM_DIRs = .hg .svn CVS RCS SCCS Codemgr_wsdata deleted_files .hgignore .hgtags # When changing SCM_DIRs also change SCM_DIRS_rexp and SCM_DIRS_prune: @@ -10,7 +10,7 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku # Don't define this unless it's not defined ifndef VARIANT -@@ -211,6 +211,89 @@ ifeq ($(SYSTEM_UNAME), Linux) +@@ -214,6 +214,101 @@ ifeq ($(SYSTEM_UNAME), Linux) MB_OF_MEMORY := $(shell free -m | fgrep Mem: | awk '{print $$2;}' ) endif @@ -51,6 +51,18 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku + i[3-9]86) \ + echo i586 \ + ;; \ ++ sparc64) \ ++ echo sparcv9 \ ++ ;; \ ++ sparc*) \ ++ echo sparc \ ++ ;; \ ++ x86_64) \ ++ echo amd64 \ ++ ;; \ ++ "Power Macintosh") \ ++ echo ppc \ ++ ;; \ + *) \ + echo $(mach) \ + ;; \ @@ -67,8 +79,8 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku + endif + endif + -+ # i586 and sparc are 32 bit, amd64 and sparc64 are 64 -+ ifneq (,$(findstring $(ARCH), i586 sparc)) ++ # i586, sparc, and ppc are 32 bit, amd64 and sparc64 are 64 ++ ifneq (,$(findstring $(ARCH), i586 sparc ppc)) + ARCH_DATA_MODEL=32 + else + ARCH_DATA_MODEL=64 @@ -100,7 +112,7 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku # Windows with and without CYGWIN will be slightly different ifeq ($(SYSTEM_UNAME), Windows_NT) PLATFORM = windows -@@ -376,6 +459,14 @@ ifneq ($(PLATFORM), windows) +@@ -404,6 +499,14 @@ ifneq ($(PLATFORM), windows) ARCH_VM_SUBDIR=jre/lib/$(LIBARCH) endif @@ -115,7 +127,7 @@ $OpenBSD: patch-jdk_make_common_shared_Platform_gmk,v 1.6 2009/10/07 01:53:54 ku # Machines with 512Mb or less of real memory are considered low memory # build machines and adjustments will be made to prevent excessing # system swapping during the build. -@@ -413,6 +504,18 @@ ifeq ($(JDK_HAS_MEM_INFO),) +@@ -441,6 +544,18 @@ ifeq ($(JDK_HAS_MEM_INFO),) export LOW_MEMORY_MACHINE export MAX_VM_MEMORY export MIN_VM_MEMORY diff --git a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Sanity_gmk b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Sanity_gmk index a94dbd0949a..c3db598f68b 100644 --- a/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Sanity_gmk +++ b/devel/jdk/1.7/patches/patch-jdk_make_common_shared_Sanity_gmk @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.4 2009/10/07 01:53:54 kurt Exp $ ---- jdk/make/common/shared/Sanity.gmk.orig Thu Sep 17 03:51:40 2009 -+++ jdk/make/common/shared/Sanity.gmk Sat Sep 26 10:00:47 2009 +$OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.5 2011/01/11 15:47:50 kurt Exp $ +--- jdk/make/common/shared/Sanity.gmk.orig Fri Aug 13 03:21:36 2010 ++++ jdk/make/common/shared/Sanity.gmk Mon Oct 25 18:15:45 2010 @@ -142,6 +142,11 @@ ifeq ($(PLATFORM), windows) $(EGREP) "\#define" | $(NAWK) '{print $$3}') endif @@ -13,7 +13,7 @@ $OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.4 2009/10/07 01:53:54 kurt # Get the version numbers of what we are using _MAKE_VER :=$(shell $(MAKE) --version 2>&1 | $(HEAD) -n 1) _ZIP_VER :=$(shell $(ZIPEXE) -help 2>&1 | $(HEAD) -n 4 | $(EGREP) '^Zip') -@@ -862,8 +867,10 @@ endif +@@ -878,8 +883,10 @@ endif ###################################################### # Check for existence of DEVTOOLS_PATH @@ -24,7 +24,7 @@ $OpenBSD: patch-jdk_make_common_shared_Sanity_gmk,v 1.4 2009/10/07 01:53:54 kurt @if [ "$(DEVTOOLS_PATH)" != "" -a ! -r "$(DEVTOOLS_PATH)" ]; then \ $(ECHO) "ERROR: You do not have a valid DEVTOOLS_PATH setting. \n" \ " Please check your access to \n" \ -@@ -871,6 +878,7 @@ sane-devtools_path: +@@ -887,6 +894,7 @@ sane-devtools_path: " and/or check your value of ALT_DEVTOOLS_PATH. \n" \ "" >> $(ERROR_FILE) ; \ fi diff --git a/devel/jdk/1.7/patches/patch-jdk_make_docs_Makefile b/devel/jdk/1.7/patches/patch-jdk_make_docs_Makefile deleted file mode 100644 index 18750835f54..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_make_docs_Makefile +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-jdk_make_docs_Makefile,v 1.2 2009/05/23 03:03:25 kurt Exp $ ---- jdk/make/docs/Makefile.orig Fri May 8 03:34:14 2009 -+++ jdk/make/docs/Makefile Mon May 18 11:26:14 2009 -@@ -214,7 +214,7 @@ SECURITYAPI_JAVADOCBOTTOM = ' existsMap; public boolean needToSearchForFile(String fileName) { -- if (!environment.isLinux) { -+ if (!environment.isLinuxOrBSD) { +- if (!FontUtilities.isLinux) { ++ if (!FontUtilities.isLinux || FontUtilities.isBSD) { return false; } else if (existsMap == null) { existsMap = new HashMap(); -@@ -1361,7 +1361,7 @@ public abstract class FontConfiguration { +@@ -1362,7 +1362,7 @@ public abstract class FontConfiguration { + " entry is missing!!!"); diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_FontUtilities_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_FontUtilities_java new file mode 100644 index 00000000000..832ee71b7e4 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_FontUtilities_java @@ -0,0 +1,24 @@ +$OpenBSD: patch-jdk_src_share_classes_sun_font_FontUtilities_java,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/classes/sun/font/FontUtilities.java.orig Tue Oct 26 10:44:42 2010 ++++ jdk/src/share/classes/sun/font/FontUtilities.java Tue Oct 26 10:44:49 2010 +@@ -46,6 +46,8 @@ public final class FontUtilities { + + public static boolean isLinux; + ++ public static boolean isBSD; ++ + public static boolean isSolaris8; + + public static boolean isSolaris9; +@@ -73,6 +75,11 @@ public final class FontUtilities { + isSolaris = osName.startsWith("SunOS"); + + isLinux = osName.startsWith("Linux"); ++ ++ isBSD = (osName.startsWith("FreeBSD") || ++ osName.startsWith("NetBSD") || ++ osName.startsWith("OpenBSD") || ++ osName.startsWith("Darwin")); + + String t2kStr = System.getProperty("sun.java2d.font.scaler"); + if (t2kStr != null) { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_SunFontManager_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_SunFontManager_java new file mode 100644 index 00000000000..eb4abeccf43 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_font_SunFontManager_java @@ -0,0 +1,12 @@ +$OpenBSD: patch-jdk_src_share_classes_sun_font_SunFontManager_java,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/classes/sun/font/SunFontManager.java.orig Tue Oct 26 10:45:03 2010 ++++ jdk/src/share/classes/sun/font/SunFontManager.java Tue Oct 26 10:45:10 2010 +@@ -413,7 +413,7 @@ public abstract class SunFontManager implements FontSu + * registerFonts method as on-screen these JRE fonts + * always go through the T2K rasteriser. + */ +- if (FontUtilities.isLinux) { ++ if (FontUtilities.isLinux || FontUtilities.isBSD) { + /* Linux font configuration uses these fonts */ + registerFontDir(jreFontDirName); + } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_java2d_SunGraphicsEnvironment_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_java2d_SunGraphicsEnvironment_java deleted file mode 100644 index cc3de8dfc54..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_java2d_SunGraphicsEnvironment_java +++ /dev/null @@ -1,40 +0,0 @@ -$OpenBSD: patch-jdk_src_share_classes_sun_java2d_SunGraphicsEnvironment_java,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java.orig Fri May 8 03:34:47 2009 -+++ jdk/src/share/classes/sun/java2d/SunGraphicsEnvironment.java Mon May 18 13:46:39 2009 -@@ -77,7 +77,7 @@ import sun.font.NativeFont; - public abstract class SunGraphicsEnvironment extends GraphicsEnvironment - implements FontSupport, DisplayChangedListener { - -- public static boolean isLinux; -+ public static boolean isLinuxOrBSD; - public static boolean isSolaris; - public static boolean isOpenSolaris; - public static boolean isWindows; -@@ -166,7 +166,15 @@ public abstract class SunGraphicsEnvironment extends G - public Object run() { - String osName = System.getProperty("os.name"); - if ("Linux".equals(osName)) { -- isLinux = true; -+ isLinuxOrBSD = true; -+ } else if ("FreeBSD".equals(osName)) { -+ isLinuxOrBSD = true; -+ } else if ("Darwin".equals(osName)) { -+ isLinuxOrBSD = true; -+ } else if ("NetBSD".equals(osName)) { -+ isLinuxOrBSD = true; -+ } else if ("OpenBSD".equals(osName)) { -+ isLinuxOrBSD = true; - } else if ("SunOS".equals(osName)) { - isSolaris = true; - String version = System.getProperty("os.version", "0.0"); -@@ -242,8 +250,8 @@ public abstract class SunGraphicsEnvironment extends G - * Pass "true" to registerFonts method as on-screen these - * JRE fonts always go through the T2K rasteriser. - */ -- if (isLinux) { -- /* Linux font configuration uses these fonts */ -+ if (isLinuxOrBSD) { -+ /* Linux/BSD font configuration uses these fonts */ - registerFontDir(jreFontDirName); - } - registerFontsInDir(jreFontDirName, true, Font2D.JRE_RANK, diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_print_PSPrinterJob_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_print_PSPrinterJob_java index d3637644ced..ecd89b33b78 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_print_PSPrinterJob_java +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_print_PSPrinterJob_java @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_src_share_classes_sun_print_PSPrinterJob_java,v 1.2 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/share/classes/sun/print/PSPrinterJob.java.orig Fri May 8 03:34:51 2009 -+++ jdk/src/share/classes/sun/print/PSPrinterJob.java Mon May 18 13:47:15 2009 -@@ -1532,7 +1532,9 @@ public class PSPrinterJob extends RasterPrinterJob { +$OpenBSD: patch-jdk_src_share_classes_sun_print_PSPrinterJob_java,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/classes/sun/print/PSPrinterJob.java.orig Fri Aug 13 03:22:01 2010 ++++ jdk/src/share/classes/sun/print/PSPrinterJob.java Mon Oct 25 18:15:47 2010 +@@ -1534,7 +1534,9 @@ public class PSPrinterJob extends RasterPrinterJob { pFlags |= NOSHEET; ncomps+=1; } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_jgss_wrapper_SunNativeProvider_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_jgss_wrapper_SunNativeProvider_java new file mode 100644 index 00000000000..baeeb189868 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_jgss_wrapper_SunNativeProvider_java @@ -0,0 +1,14 @@ +$OpenBSD: patch-jdk_src_share_classes_sun_security_jgss_wrapper_SunNativeProvider_java,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java.orig Tue Oct 26 10:45:52 2010 ++++ jdk/src/share/classes/sun/security/jgss/wrapper/SunNativeProvider.java Tue Oct 26 10:46:00 2010 +@@ -83,7 +83,9 @@ public final class SunNativeProvider extends Provider + String osname = System.getProperty("os.name"); + if (osname.startsWith("SunOS")) { + gssLibs = new String[]{ "libgss.so" }; +- } else if (osname.startsWith("Linux")) { ++ } else if (osname.startsWith("Linux") || ++ osname.startsWith("Darwin") || ++ osname.endsWith("BSD")) { + gssLibs = new String[]{ + "libgssapi.so", + "libgssapi_krb5.so", diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SeedGenerator_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SeedGenerator_java new file mode 100644 index 00000000000..01578125eee --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SeedGenerator_java @@ -0,0 +1,12 @@ +$OpenBSD: patch-jdk_src_share_classes_sun_security_provider_SeedGenerator_java,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/classes/sun/security/provider/SeedGenerator.java.orig Tue Jan 4 19:12:55 2011 ++++ jdk/src/share/classes/sun/security/provider/SeedGenerator.java Tue Jan 4 19:13:29 2011 +@@ -473,7 +473,7 @@ abstract class SeedGenerator { + } + + URLSeedGenerator() throws IOException { +- this(SeedGenerator.URL_DEV_RANDOM); ++ this(SeedGenerator.URL_DEV_URANDOM); + } + + private void init() throws IOException { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SunEntries_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SunEntries_java index 6ce745c839c..4a70893f2c8 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SunEntries_java +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_security_provider_SunEntries_java @@ -1,12 +1,12 @@ -$OpenBSD: patch-jdk_src_share_classes_sun_security_provider_SunEntries_java,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/share/classes/sun/security/provider/SunEntries.java.orig Tue Oct 30 05:03:18 2007 -+++ jdk/src/share/classes/sun/security/provider/SunEntries.java Wed Nov 7 18:57:09 2007 -@@ -252,7 +252,7 @@ final class SunEntries { - // name of the *Security* property +$OpenBSD: patch-jdk_src_share_classes_sun_security_provider_SunEntries_java,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/classes/sun/security/provider/SunEntries.java.orig Thu Dec 16 17:13:52 2010 ++++ jdk/src/share/classes/sun/security/provider/SunEntries.java Tue Jan 4 19:12:17 2011 +@@ -253,7 +253,7 @@ final class SunEntries { private final static String PROP_RNDSOURCE = "securerandom.source"; -- final static String URL_DEV_RANDOM = "file:/dev/random"; -+ final static String URL_DEV_RANDOM = "file:/dev/srandom"; - final static String URL_DEV_URANDOM = "file:/dev/urandom"; + final static String URL_DEV_RANDOM = "file:/dev/random"; +- final static String URL_DEV_URANDOM = "file:/dev/urandom"; ++ final static String URL_DEV_URANDOM = "file:/dev/arandom"; private static final String seedSource; + diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_tools_jar_Main_java b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_tools_jar_Main_java index f645ac86011..8db013dab99 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_tools_jar_Main_java +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_classes_sun_tools_jar_Main_java @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_share_classes_sun_tools_jar_Main_java,v 1.3 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/classes/sun/tools/jar/Main.java.orig Thu Sep 17 03:52:21 2009 -+++ jdk/src/share/classes/sun/tools/jar/Main.java Sat Sep 26 10:00:48 2009 +$OpenBSD: patch-jdk_src_share_classes_sun_tools_jar_Main_java,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/classes/sun/tools/jar/Main.java.orig Fri Aug 13 03:22:05 2010 ++++ jdk/src/share/classes/sun/tools/jar/Main.java Mon Oct 25 18:15:47 2010 @@ -50,6 +50,7 @@ class Main { String zname = ""; String[] files; @@ -9,7 +9,7 @@ $OpenBSD: patch-jdk_src_share_classes_sun_tools_jar_Main_java,v 1.3 2009/10/07 0 // An entryName(path)->File map generated during "expand", it helps to // decide whether or not an existing entry in a jar file needs to be -@@ -862,6 +863,19 @@ class Main { +@@ -866,6 +867,19 @@ class Main { * Extracts specified entries from JAR file. */ void extract(InputStream in, String files[]) throws IOException { @@ -29,7 +29,7 @@ $OpenBSD: patch-jdk_src_share_classes_sun_tools_jar_Main_java,v 1.3 2009/10/07 0 ZipInputStream zis = new ZipInputStream(in); ZipEntry e; // Set of all directory entries specified in archive. Disallows -@@ -892,6 +906,19 @@ class Main { +@@ -896,6 +910,19 @@ class Main { * Extracts specified entries from JAR file, via ZipFile. */ void extract(String fname, String files[]) throws IOException { @@ -49,7 +49,7 @@ $OpenBSD: patch-jdk_src_share_classes_sun_tools_jar_Main_java,v 1.3 2009/10/07 0 ZipFile zf = new ZipFile(fname); Set dirs = newDirSet(); Enumeration zes = zf.entries(); -@@ -923,6 +950,10 @@ class Main { +@@ -927,6 +954,10 @@ class Main { ZipEntry rc = null; String name = e.getName(); File f = new File(e.getName().replace('/', File.separatorChar)); @@ -60,7 +60,7 @@ $OpenBSD: patch-jdk_src_share_classes_sun_tools_jar_Main_java,v 1.3 2009/10/07 0 if (e.isDirectory()) { if (f.exists()) { if (!f.isDirectory()) { -@@ -944,6 +975,10 @@ class Main { +@@ -948,6 +979,10 @@ class Main { } else { if (f.getParent() != null) { File d = new File(f.getParent()); diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_demo_jvmti_compiledMethodLoad_sample_makefile_txt b/devel/jdk/1.7/patches/patch-jdk_src_share_demo_jvmti_compiledMethodLoad_sample_makefile_txt new file mode 100644 index 00000000000..6e9fd7f3e1e --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_demo_jvmti_compiledMethodLoad_sample_makefile_txt @@ -0,0 +1,41 @@ +$OpenBSD: patch-jdk_src_share_demo_jvmti_compiledMethodLoad_sample_makefile_txt,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt.orig Tue Oct 26 10:46:44 2010 ++++ jdk/src/share/demo/jvmti/compiledMethodLoad/sample.makefile.txt Tue Oct 26 10:46:50 2010 +@@ -38,6 +38,7 @@ + # gnumake JDK= OSNAME=solaris [OPT=true] [LIBARCH=sparcv9] + # gnumake JDK= OSNAME=linux [OPT=true] + # gnumake JDK= OSNAME=win32 [OPT=true] ++# gnumake JDK= OSNAME=bsd [OPT=true] + # + ######################################################################## + +@@ -118,6 +119,29 @@ ifeq ($(OSNAME), win32) + LIBRARIES= + # Building a shared library + LINK_SHARED=link -dll -out:$@ ++endif ++ ++# BSD GNU C Compiler ++ifeq ($(OSNAME), bsd) ++ # GNU Compiler options needed to build it ++ COMMON_FLAGS=-fno-strict-aliasing -fPIC -fno-omit-frame-pointer ++ # Options that help find errors ++ COMMON_FLAGS+= -W -Wall -Wno-unused -Wno-parentheses ++ ifeq ($(OPT), true) ++ CFLAGS=-O2 $(COMMON_FLAGS) ++ else ++ CFLAGS=-g $(COMMON_FLAGS) ++ endif ++ # Object files needed to create library ++ OBJECTS=$(SOURCES:%.c=%.o) ++ # Library name and options needed to build it ++ # XXX: Needs to be fixed for MacOS X ++ LIBRARY=lib$(LIBNAME).so ++ LDFLAGS=-Wl,-soname=$(LIBRARY) -static-libgcc -mimpure-text ++ # Libraries we are dependent on ++ LIBRARIES=-lc ++ # Building a shared library ++ LINK_SHARED=$(LINK.c) -shared -o $@ + endif + + # Common -I options diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_lib_security_java_security-openbsd b/devel/jdk/1.7/patches/patch-jdk_src_share_lib_security_java_security-openbsd index 33e29f22fea..108cb10555a 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_lib_security_java_security-openbsd +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_lib_security_java_security-openbsd @@ -1,19 +1,16 @@ -$OpenBSD: patch-jdk_src_share_lib_security_java_security-openbsd,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/lib/security/java.security-openbsd.orig Sat Sep 26 10:00:46 2009 -+++ jdk/src/share/lib/security/java.security-openbsd Sat Sep 26 10:00:48 2009 -@@ -67,7 +67,14 @@ security.provider.9=sun.security.smartcardio.SunPCSC +$OpenBSD: patch-jdk_src_share_lib_security_java_security-openbsd,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/lib/security/java.security-openbsd.orig Tue Jan 4 18:25:18 2011 ++++ jdk/src/share/lib/security/java.security-openbsd Tue Jan 4 19:32:43 2011 +@@ -67,7 +67,11 @@ security.provider.9=sun.security.smartcardio.SunPCSC # On Windows systems, the URLs file:/dev/random and file:/dev/urandom # enables use of the Microsoft CryptoAPI seed functionality. # -securerandom.source=file:/dev/urandom -+# On OpenBSD use file:///dev/srandom for strong but blocking random -+# generator, file:/dev/random for hardware random generators, ++# On OpenBSD use file:/dev/random for hardware random generators or +# file:///dev/arandom for non-blocking high-quality pseudo-random -+# data and file:///dev/urandom for non-blocking random data that -+# does not guarantee the data to be strong. See random(4) for more -+# info. ++# data. file:/dev/urandom is deprecated on OpenBSD. +# -+securerandom.source=file:///dev/arandom ++securerandom.source=file:/dev/arandom # # The entropy gathering device is described as a URL and can also # be specified with the system property "java.security.egd". For example, diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_java_util_jar_pack_main_cpp b/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_java_util_jar_pack_main_cpp index febda4bcb5d..79a3221cd48 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_java_util_jar_pack_main_cpp +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_java_util_jar_pack_main_cpp @@ -1,9 +1,9 @@ -$OpenBSD: patch-jdk_src_share_native_com_sun_java_util_jar_pack_main_cpp,v 1.4 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp.orig Thu Sep 17 03:52:25 2009 -+++ jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp Sun Sep 27 09:58:28 2009 +$OpenBSD: patch-jdk_src_share_native_com_sun_java_util_jar_pack_main_cpp,v 1.5 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp.orig Fri Aug 13 03:22:08 2010 ++++ jdk/src/share/native/com/sun/java/util/jar/pack/main.cpp Mon Oct 25 18:15:47 2010 @@ -22,6 +22,9 @@ - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. + * or visit www.oracle.com if you need additional information or have any + * questions. */ +#ifdef _ALLBSD_SOURCE +#include diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h b/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h index 7be01fc2363..99eecad05f2 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/share/native/com/sun/media/sound/SoundDefs.h.orig Tue Feb 26 22:26:01 2008 -+++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h Tue Feb 26 22:27:13 2008 +$OpenBSD: patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/com/sun/media/sound/SoundDefs.h.orig Fri Aug 13 03:22:08 2010 ++++ jdk/src/share/native/com/sun/media/sound/SoundDefs.h Mon Oct 25 18:15:47 2010 @@ -31,6 +31,7 @@ #define X_WINDOWS 1 #define X_SOLARIS 2 @@ -9,7 +9,7 @@ $OpenBSD: patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h,v 1.1 2008/ // types for X_ARCH #define X_I586 1 -@@ -49,7 +50,7 @@ +@@ -50,7 +51,7 @@ // following is needed for _LP64 @@ -18,7 +18,7 @@ $OpenBSD: patch-jdk_src_share_native_com_sun_media_sound_SoundDefs_h,v 1.1 2008/ #include #endif -@@ -125,6 +126,11 @@ typedef char SBYTE; +@@ -126,6 +127,11 @@ typedef char SBYTE; #if X_PLATFORM == X_LINUX diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_common_check_code_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_common_check_code_c index 1d09ee772e4..468ecb1565b 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_common_check_code_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_common_check_code_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_src_share_native_common_check_code_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/share/native/common/check_code.c.orig Fri May 8 03:35:00 2009 -+++ jdk/src/share/native/common/check_code.c Sat May 9 11:04:59 2009 -@@ -1066,7 +1066,7 @@ verify_method(context_type *context, jclass cb, int me +$OpenBSD: patch-jdk_src_share_native_common_check_code_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/common/check_code.c.orig Fri Aug 13 03:22:08 2010 ++++ jdk/src/share/native/common/check_code.c Mon Oct 25 18:15:47 2010 +@@ -1067,7 +1067,7 @@ verify_method(context_type *context, jclass cb, int me * Make sure that branches don't go into the middle of nowhere. */ @@ -10,7 +10,7 @@ $OpenBSD: patch-jdk_src_share_native_common_check_code_c,v 1.3 2009/05/23 03:03: { unsigned char *p = (unsigned char *)&n; return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3]; -@@ -1145,26 +1145,26 @@ verify_opcode_operands(context_type *context, unsigned +@@ -1146,26 +1146,26 @@ verify_opcode_operands(context_type *context, unsigned } } if (opcode == JVM_OPC_tableswitch) { @@ -44,7 +44,7 @@ $OpenBSD: patch-jdk_src_share_native_common_check_code_c,v 1.3 2009/05/23 03:03: if (!isLegalTarget(context, target)) CCerror(context, "Illegal branch in tableswitch"); saved_operand[k + 1] = code_data[target]; -@@ -1625,7 +1625,7 @@ static int instruction_length(unsigned char *iptr, uns +@@ -1634,7 +1634,7 @@ static int instruction_length(unsigned char *iptr, uns if (lpc + 2 >= (int *)end) { return -1; /* do not read pass the end */ } @@ -53,7 +53,7 @@ $OpenBSD: patch-jdk_src_share_native_common_check_code_c,v 1.3 2009/05/23 03:03: if ((index < 0) || (index > 65535)) { return -1; /* illegal */ } else { -@@ -1638,7 +1638,7 @@ static int instruction_length(unsigned char *iptr, uns +@@ -1647,7 +1647,7 @@ static int instruction_length(unsigned char *iptr, uns int npairs; if (lpc + 1 >= (int *)end) return -1; /* do not read pass the end */ diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_lang_fdlibm_include_fdlibm_h b/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_lang_fdlibm_include_fdlibm_h index ca2a1c86639..d601b18782d 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_lang_fdlibm_include_fdlibm_h +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_lang_fdlibm_include_fdlibm_h @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_share_native_java_lang_fdlibm_include_fdlibm_h,v 1.3 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h.orig Thu Sep 17 03:52:26 2009 -+++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h Sun Sep 27 09:59:27 2009 +$OpenBSD: patch-jdk_src_share_native_java_lang_fdlibm_include_fdlibm_h,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h.orig Thu Oct 28 20:18:10 2010 ++++ jdk/src/share/native/java/lang/fdlibm/include/fdlibm.h Mon Nov 1 13:16:25 2010 @@ -24,6 +24,15 @@ - * have any questions. + * questions. */ +#ifdef __OpenBSD__ @@ -27,16 +27,3 @@ $OpenBSD: patch-jdk_src_share_native_java_lang_fdlibm_include_fdlibm_h,v 1.3 200 #define __HI(x) *(1+(int*)&x) #define __LO(x) *(int*)&x #define __HIp(x) *(1+(int*)x) -@@ -46,10 +56,12 @@ - #define __LOp(x) *(1+(int*)x) - #endif - -+#ifndef __P - #ifdef __STDC__ - #define __P(p) p - #else - #define __P(p) () -+#endif - #endif - - /* diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_util_zip_Inflater_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_util_zip_Inflater_c index b698297f976..b151be5a5b4 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_util_zip_Inflater_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_java_util_zip_Inflater_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_share_native_java_util_zip_Inflater_c,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/native/java/util/zip/Inflater.c.orig Thu Sep 17 03:52:26 2009 -+++ jdk/src/share/native/java/util/zip/Inflater.c Sat Sep 26 10:00:48 2009 +$OpenBSD: patch-jdk_src_share_native_java_util_zip_Inflater_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/java/util/zip/Inflater.c.orig Thu Dec 16 17:14:38 2010 ++++ jdk/src/share/native/java/util/zip/Inflater.c Tue Jan 4 18:25:21 2011 @@ -67,6 +67,10 @@ Java_java_util_zip_Inflater_init(JNIEnv *env, jclass c return jlong_zero; } else { @@ -12,8 +12,8 @@ $OpenBSD: patch-jdk_src_share_native_java_util_zip_Inflater_c,v 1.2 2009/10/07 0 switch (inflateInit2(strm, nowrap ? -MAX_WBITS : MAX_WBITS)) { case Z_OK: return ptr_to_jlong(strm); -@@ -204,6 +208,10 @@ Java_java_util_zip_Inflater_reset(JNIEnv *env, jclass - if (inflateReset(jlong_to_ptr(strm)) != Z_OK) { +@@ -215,6 +219,10 @@ Java_java_util_zip_Inflater_reset(JNIEnv *env, jclass + if (inflateReset(jlong_to_ptr(addr)) != Z_OK) { JNU_ThrowInternalError(env, 0); } +// BSDXXX needed for FreeBSD 5.4 and below with system zlib diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_image_DataBufferNative_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_image_DataBufferNative_c index 52a7274b3f0..3dfe2fcda83 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_image_DataBufferNative_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_image_DataBufferNative_c @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_share_native_sun_awt_image_DataBufferNative_c,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/share/native/sun/awt/image/DataBufferNative.c.orig Sat Dec 1 00:00:00 2007 -+++ jdk/src/share/native/sun/awt/image/DataBufferNative.c Tue Feb 26 18:50:57 2008 +$OpenBSD: patch-jdk_src_share_native_sun_awt_image_DataBufferNative_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/sun/awt/image/DataBufferNative.c.orig Fri Aug 13 03:22:08 2010 ++++ jdk/src/share/native/sun/awt/image/DataBufferNative.c Mon Oct 25 18:15:47 2010 @@ -23,7 +23,11 @@ - * have any questions. + * questions. */ +#ifdef _ALLBSD_SOURCE diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c index 81199f0957e..54a81dc0510 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c.orig Tue Oct 30 05:03:47 2007 -+++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Wed Nov 7 18:16:18 2007 +$OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c.orig Thu Oct 28 20:18:10 2010 ++++ jdk/src/share/native/sun/awt/medialib/mlib_ImageLookUp_64.c Mon Nov 1 13:16:26 2010 @@ -168,7 +168,7 @@ } @@ -19,7 +19,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. /***************************************************************/ void mlib_ImageLookUp_U8_D64(const mlib_u8 *src, -@@ -612,7 +612,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -613,7 +613,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, #pragma pipeloop(0) #endif /* __SUNPRO_C */ for (i = 0; i < size - 7; i += 4, dp += 8, sa++) { @@ -28,7 +28,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); -@@ -622,12 +622,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -623,12 +623,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); @@ -43,7 +43,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); -@@ -637,7 +637,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -638,7 +638,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); @@ -52,7 +52,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. s0 = sa[0]; dp[4] = t0; dp[5] = t1; -@@ -645,7 +645,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -646,7 +646,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, dp[7] = t3; } @@ -61,7 +61,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); -@@ -655,12 +655,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -656,12 +656,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); @@ -76,7 +76,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); -@@ -670,7 +670,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -671,7 +671,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); @@ -85,7 +85,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. dp[4] = t0; dp[5] = t1; dp[6] = t2; -@@ -718,7 +718,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -719,7 +719,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, #pragma pipeloop(0) #endif /* __SUNPRO_C */ for (i = 0; i < size - 7; i += 4, dp += 12, sa++) { @@ -94,7 +94,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -732,14 +732,14 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -733,14 +733,14 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); @@ -111,7 +111,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -753,7 +753,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -754,7 +754,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); @@ -120,7 +120,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. s0 = sa[0]; dp[6] = t0; dp[7] = t1; -@@ -763,7 +763,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -764,7 +764,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, dp[11] = t5; } @@ -129,7 +129,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -777,14 +777,14 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -778,14 +778,14 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); @@ -146,7 +146,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -798,7 +798,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -799,7 +799,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t3 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t4 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t5 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); @@ -155,7 +155,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. dp[6] = t0; dp[7] = t1; dp[8] = t2; -@@ -851,7 +851,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -852,7 +852,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, #pragma pipeloop(0) #endif /* __SUNPRO_C */ for (i = 0; i < size - 7; i += 4, dp += 16, sa++) { @@ -164,7 +164,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -861,12 +861,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -862,12 +862,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); @@ -179,7 +179,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); -@@ -876,12 +876,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -877,12 +877,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); @@ -194,7 +194,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -891,12 +891,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -892,12 +892,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); @@ -209,7 +209,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); -@@ -906,7 +906,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -907,7 +907,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); @@ -218,7 +218,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. s0 = sa[0]; dp[12] = t0; dp[13] = t1; -@@ -914,7 +914,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -915,7 +915,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, dp[15] = t3; } @@ -227,7 +227,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 << 3) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); -@@ -924,12 +924,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -925,12 +925,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 21) & 0x7F8)); @@ -242,7 +242,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 5) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); -@@ -939,12 +939,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -940,12 +940,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 13) & 0x7F8)); @@ -257,7 +257,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 13) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 13) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 13) & 0x7F8)); -@@ -954,12 +954,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -955,12 +955,12 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 5) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 5) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 >> 5) & 0x7F8)); @@ -272,7 +272,7 @@ $OpenBSD: patch-jdk_src_share_native_sun_awt_medialib_mlib_ImageLookUp_64_c,v 1. t0 = *(mlib_d64 *) ((mlib_u8 *) tab0 + ((s0 >> 21) & 0x7F8)); t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 >> 21) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 >> 21) & 0x7F8)); -@@ -969,7 +969,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, +@@ -970,7 +970,7 @@ void mlib_ImageLookUpSI_U8_D64(const mlib_u8 *src, t1 = *(mlib_d64 *) ((mlib_u8 *) tab1 + ((s0 << 3) & 0x7F8)); t2 = *(mlib_d64 *) ((mlib_u8 *) tab2 + ((s0 << 3) & 0x7F8)); t3 = *(mlib_d64 *) ((mlib_u8 *) tab3 + ((s0 << 3) & 0x7F8)); diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_font_AccelGlyphCache_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_font_AccelGlyphCache_c index 0b8b4dd3e68..e96d84783f7 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_font_AccelGlyphCache_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_font_AccelGlyphCache_c @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_share_native_sun_font_AccelGlyphCache_c,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/share/native/sun/font/AccelGlyphCache.c.orig Sat Dec 1 00:00:00 2007 -+++ jdk/src/share/native/sun/font/AccelGlyphCache.c Tue Feb 26 18:50:57 2008 +$OpenBSD: patch-jdk_src_share_native_sun_font_AccelGlyphCache_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/sun/font/AccelGlyphCache.c.orig Fri Aug 13 03:22:09 2010 ++++ jdk/src/share/native/sun/font/AccelGlyphCache.c Mon Oct 25 18:15:47 2010 @@ -23,7 +23,11 @@ - * have any questions. + * questions. */ +#ifdef _ALLBSD_SOURCE diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_ecdecode_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_ecdecode_c deleted file mode 100644 index 20e5c83bd5b..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_ecdecode_c +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-jdk_src_share_native_sun_security_ec_ecdecode_c,v 1.1 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/native/sun/security/ec/ecdecode.c.orig Sun Sep 27 10:02:44 2009 -+++ jdk/src/share/native/sun/security/ec/ecdecode.c Sun Sep 27 10:03:33 2009 -@@ -60,7 +60,7 @@ - #include - - #ifndef _WIN32 --#ifndef __linux__ -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) - #include - #endif /* __linux__ */ - #include diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_ecc_impl_h b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecc_impl_h similarity index 59% rename from devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_ecc_impl_h rename to devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecc_impl_h index 5e9e8d0677a..a8ea1b9e32c 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_ecc_impl_h +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecc_impl_h @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_share_native_sun_security_ec_ecc_impl_h,v 1.1 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/native/sun/security/ec/ecc_impl.h.orig Sun Sep 27 10:02:04 2009 -+++ jdk/src/share/native/sun/security/ec/ecc_impl.h Sun Sep 27 10:02:19 2009 +$OpenBSD: patch-jdk_src_share_native_sun_security_ec_impl_ecc_impl_h,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/sun/security/ec/impl/ecc_impl.h.orig Tue Oct 26 10:51:24 2010 ++++ jdk/src/share/native/sun/security/ec/impl/ecc_impl.h Tue Oct 26 10:51:31 2010 @@ -78,6 +78,14 @@ typedef unsigned long ulong_t; typedef enum { B_FALSE, B_TRUE } boolean_t; #endif /* __linux__ */ diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecdecode_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecdecode_c new file mode 100644 index 00000000000..1668a1ac531 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_ecdecode_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-jdk_src_share_native_sun_security_ec_impl_ecdecode_c,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/sun/security/ec/impl/ecdecode.c.orig Tue Oct 26 10:51:55 2010 ++++ jdk/src/share/native/sun/security/ec/impl/ecdecode.c Tue Oct 26 10:52:01 2010 +@@ -60,9 +60,9 @@ + #include + + #ifndef _WIN32 +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + #include +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + #include + #endif /* _WIN32 */ + diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_oid_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_oid_c new file mode 100644 index 00000000000..80108720c34 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_oid_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-jdk_src_share_native_sun_security_ec_impl_oid_c,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/sun/security/ec/impl/oid.c.orig Tue Oct 26 10:52:13 2010 ++++ jdk/src/share/native/sun/security/ec/impl/oid.c Tue Oct 26 10:52:17 2010 +@@ -59,9 +59,9 @@ + #include + + #ifndef _WIN32 +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + #include +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + #include + #endif /* _WIN32 */ + diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_secitem_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_secitem_c new file mode 100644 index 00000000000..64d51232ee3 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_impl_secitem_c @@ -0,0 +1,15 @@ +$OpenBSD: patch-jdk_src_share_native_sun_security_ec_impl_secitem_c,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/share/native/sun/security/ec/impl/secitem.c.orig Tue Oct 26 10:52:30 2010 ++++ jdk/src/share/native/sun/security/ec/impl/secitem.c Tue Oct 26 10:57:14 2010 +@@ -64,9 +64,9 @@ + #include + + #ifndef _WIN32 +-#ifndef __linux__ ++#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) + #include +-#endif /* __linux__ */ ++#endif /* __linux__ || _ALLBSD_SOURCE */ + #include + #endif /* _WIN32 */ + diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_oid_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_oid_c deleted file mode 100644 index cbf0faa0ea1..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_oid_c +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-jdk_src_share_native_sun_security_ec_oid_c,v 1.1 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/native/sun/security/ec/oid.c.orig Sun Sep 27 10:03:43 2009 -+++ jdk/src/share/native/sun/security/ec/oid.c Sun Sep 27 10:03:51 2009 -@@ -59,7 +59,7 @@ - #include - - #ifndef _WIN32 --#ifndef __linux__ -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) - #include - #endif /* __linux__ */ - #include diff --git a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_secitem_c b/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_secitem_c deleted file mode 100644 index 85c513b0a94..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_share_native_sun_security_ec_secitem_c +++ /dev/null @@ -1,12 +0,0 @@ -$OpenBSD: patch-jdk_src_share_native_sun_security_ec_secitem_c,v 1.1 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/share/native/sun/security/ec/secitem.c.orig Sun Sep 27 10:04:07 2009 -+++ jdk/src/share/native/sun/security/ec/secitem.c Sun Sep 27 10:04:19 2009 -@@ -64,7 +64,7 @@ - #include - - #ifndef _WIN32 --#ifndef __linux__ -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) - #include - #endif /* __linux__ */ - #include diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_bin_java_md_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_bin_java_md_c index ae940b7f65a..4637a934dd3 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_bin_java_md_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_bin_java_md_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_bin_java_md_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/bin/java_md.c.orig Fri May 8 03:35:05 2009 -+++ jdk/src/solaris/bin/java_md.c Mon May 18 16:44:36 2009 +$OpenBSD: patch-jdk_src_solaris_bin_java_md_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/bin/java_md.c.orig Fri Aug 13 03:22:11 2010 ++++ jdk/src/solaris/bin/java_md.c Mon Oct 25 18:15:58 2010 @@ -24,6 +24,7 @@ */ @@ -75,38 +75,7 @@ $OpenBSD: patch-jdk_src_solaris_bin_java_md_c,v 1.3 2009/05/23 03:03:25 kurt Exp static const char *user_dir = "/java"; #else /* Solaris */ static const char *system_dir = "/usr/jdk"; -@@ -411,10 +442,10 @@ CreateExecutionEnvironment(int *_argcp, - * If not on Solaris, assume only a single LD_LIBRARY_PATH - * variable. - */ -- runpath = getenv("LD_LIBRARY_PATH"); -+ runpath = getenv(LD_LIBRARY_PATH); - #endif /* __solaris__ */ - --#ifdef __linux -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - /* - * On linux, if a binary is running as sgid or suid, glibc sets - * LD_LIBRARY_PATH to the empty string for security purposes. (In -@@ -438,7 +469,7 @@ CreateExecutionEnvironment(int *_argcp, - new_runpath = JLI_MemAlloc( ((runpath!=NULL)?JLI_StrLen(runpath):0) + - 2*JLI_StrLen(jrepath) + 2*JLI_StrLen(arch) + - JLI_StrLen(jvmpath) + 52); -- newpath = new_runpath + JLI_StrLen("LD_LIBRARY_PATH="); -+ newpath = new_runpath + JLI_StrLen(LD_LIBRARY_PATH "="); - - - /* -@@ -453,7 +484,7 @@ CreateExecutionEnvironment(int *_argcp, - - /* jvmpath, ((running != wanted)?((wanted==64)?"/"LIBARCH64NAME:"/.."):""), */ - -- sprintf(new_runpath, "LD_LIBRARY_PATH=" -+ sprintf(new_runpath, LD_LIBRARY_PATH "=" - "%s:" - "%s/lib/%s:" - "%s/../lib/%s", -@@ -1209,9 +1240,23 @@ UnsetEnv(char *name) +@@ -1030,9 +1061,23 @@ UnsetEnv(char *name) return(borrowed_unsetenv(name)); } @@ -131,7 +100,7 @@ $OpenBSD: patch-jdk_src_solaris_bin_java_md_c,v 1.3 2009/05/23 03:03:25 kurt Exp static void* hSplashLib = NULL; -@@ -1247,7 +1292,7 @@ jlong_format_specifier() { +@@ -1068,7 +1113,7 @@ jlong_format_specifier() { int ContinueInNewThread0(int (JNICALL *continuation)(void *), jlong stack_size, void * args) { int rslt; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11FontManager_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11FontManager_java new file mode 100644 index 00000000000..0ea26023507 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11FontManager_java @@ -0,0 +1,30 @@ +$OpenBSD: patch-jdk_src_solaris_classes_sun_awt_X11FontManager_java,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/classes/sun/awt/X11FontManager.java.orig Tue Oct 26 10:57:26 2010 ++++ jdk/src/solaris/classes/sun/awt/X11FontManager.java Tue Oct 26 10:57:32 2010 +@@ -213,7 +213,7 @@ public class X11FontManager extends SunFontManager { + if (fontID != null) { + fileName = (String)fontNameMap.get(fontID); + /* On Linux check for the Lucida Oblique fonts */ +- if (fileName == null && FontUtilities.isLinux && !isOpenJDK()) { ++ if (fileName == null && (FontUtilities.isLinux || FontUtilities.isBSD) && !isOpenJDK()) { + if (oblmap == null) { + initObliqueLucidaFontMap(); + } +@@ -712,7 +712,7 @@ public class X11FontManager extends SunFontManager { + if (fontConfigDirs == null) { + return; + } +- if (FontUtilities.isLinux) { ++ if (FontUtilities.isLinux || FontUtilities.isBSD) { + fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts"); + } + fontdirs = (String[])fontConfigDirs.toArray(new String[0]); +@@ -759,7 +759,7 @@ public class X11FontManager extends SunFontManager { + */ + FontConfiguration mFontConfig = new MFontConfiguration(this); + if (FontUtilities.isOpenSolaris || +- (FontUtilities.isLinux && ++ ((FontUtilities.isLinux || FontUtilities.isBSD) && + (!mFontConfig.foundOsSpecificFile() || + !mFontConfig.fontFilesArePresent()) || + (FontUtilities.isSolaris && !mFontConfig.fontFilesArePresent()))) { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11GraphicsEnvironment_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11GraphicsEnvironment_java deleted file mode 100644 index 3a72ea55168..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_awt_X11GraphicsEnvironment_java +++ /dev/null @@ -1,30 +0,0 @@ -$OpenBSD: patch-jdk_src_solaris_classes_sun_awt_X11GraphicsEnvironment_java,v 1.3 2009/01/17 11:37:42 kurt Exp $ ---- jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java.orig Thu Jan 15 03:44:44 2009 -+++ jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java Fri Jan 16 12:16:51 2009 -@@ -419,7 +419,7 @@ public class X11GraphicsEnvironment - if (fontID != null) { - fileName = (String)fontNameMap.get(fontID); - /* On Linux check for the Lucida Oblique fonts */ -- if (fileName == null && isLinux && !isOpenJDK()) { -+ if (fileName == null && isLinuxOrBSD && !isOpenJDK()) { - if (oblmap == null) { - initObliqueLucidaFontMap(); - } -@@ -655,7 +655,7 @@ public class X11GraphicsEnvironment - if (fontConfigDirs == null) { - return; - } -- if (isLinux) { -+ if (isLinuxOrBSD) { - fontConfigDirs.add(jreLibDirName+File.separator+"oblique-fonts"); - } - fontdirs = (String[])fontConfigDirs.toArray(new String[0]); -@@ -936,7 +936,7 @@ public class X11GraphicsEnvironment - */ - FontConfiguration mFontConfig = new MFontConfiguration(this); - if (isOpenSolaris || -- (isLinux && -+ (isLinuxOrBSD && - (!mFontConfig.foundOsSpecificFile() || - !mFontConfig.fontFilesArePresent()) || - (isSolaris && !mFontConfig.fontFilesArePresent()))) { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_BsdAsynchronousChannelProvider_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_BsdAsynchronousChannelProvider_java new file mode 100644 index 00000000000..c044b98f310 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_BsdAsynchronousChannelProvider_java @@ -0,0 +1,103 @@ +$OpenBSD: patch-jdk_src_solaris_classes_sun_nio_ch_BsdAsynchronousChannelProvider_java,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/classes/sun/nio/ch/BsdAsynchronousChannelProvider.java.orig Tue Oct 26 10:58:03 2010 ++++ jdk/src/solaris/classes/sun/nio/ch/BsdAsynchronousChannelProvider.java Tue Oct 26 10:58:10 2010 +@@ -0,0 +1,99 @@ ++/* ++ * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. Sun designates this ++ * particular file as subject to the "Classpath" exception as provided ++ * by Sun in the LICENSE file that accompanied this code. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, ++ * CA 95054 USA or visit www.sun.com if you need additional information or ++ * have any questions. ++ */ ++ ++package sun.nio.ch; ++ ++import java.nio.channels.*; ++import java.nio.channels.spi.AsynchronousChannelProvider; ++import java.util.concurrent.ExecutorService; ++import java.util.concurrent.ThreadFactory; ++import java.net.ProtocolFamily; ++import java.io.IOException; ++ ++public class BsdAsynchronousChannelProvider ++ extends AsynchronousChannelProvider ++{ ++ private static volatile KQueuePort defaultPort; ++ ++ private KQueuePort defaultEventPort() throws IOException { ++ if (defaultPort == null) { ++ synchronized (BsdAsynchronousChannelProvider.class) { ++ if (defaultPort == null) { ++ defaultPort = new KQueuePort(this, ThreadPool.getDefault()).start(); ++ } ++ } ++ } ++ return defaultPort; ++ } ++ ++ public BsdAsynchronousChannelProvider() { ++ } ++ ++ @Override ++ public AsynchronousChannelGroup openAsynchronousChannelGroup(int nThreads, ThreadFactory factory) ++ throws IOException ++ { ++ return new KQueuePort(this, ThreadPool.create(nThreads, factory)).start(); ++ } ++ ++ @Override ++ public AsynchronousChannelGroup openAsynchronousChannelGroup(ExecutorService executor, int initialSize) ++ throws IOException ++ { ++ return new KQueuePort(this, ThreadPool.wrap(executor, initialSize)).start(); ++ } ++ ++ private Port toPort(AsynchronousChannelGroup group) throws IOException { ++ if (group == null) { ++ return defaultEventPort(); ++ } else { ++ if (!(group instanceof KQueuePort)) ++ throw new IllegalChannelGroupException(); ++ return (Port)group; ++ } ++ } ++ ++ @Override ++ public AsynchronousServerSocketChannel openAsynchronousServerSocketChannel(AsynchronousChannelGroup group) ++ throws IOException ++ { ++ return new UnixAsynchronousServerSocketChannelImpl(toPort(group)); ++ } ++ ++ @Override ++ public AsynchronousSocketChannel openAsynchronousSocketChannel(AsynchronousChannelGroup group) ++ throws IOException ++ { ++ return new UnixAsynchronousSocketChannelImpl(toPort(group)); ++ } ++ ++ @Override ++ public AsynchronousDatagramChannel openAsynchronousDatagramChannel(ProtocolFamily family, ++ AsynchronousChannelGroup group) ++ throws IOException ++ { ++ return new SimpleAsynchronousDatagramChannelImpl(family, toPort(group)); ++ } ++} diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_KQueuePort_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_KQueuePort_java new file mode 100644 index 00000000000..79037a1664e --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_ch_KQueuePort_java @@ -0,0 +1,326 @@ +$OpenBSD: patch-jdk_src_solaris_classes_sun_nio_ch_KQueuePort_java,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/classes/sun/nio/ch/KQueuePort.java.orig Tue Oct 26 10:58:24 2010 ++++ jdk/src/solaris/classes/sun/nio/ch/KQueuePort.java Tue Oct 26 10:58:29 2010 +@@ -0,0 +1,322 @@ ++/* ++ * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. Sun designates this ++ * particular file as subject to the "Classpath" exception as provided ++ * by Sun in the LICENSE file that accompanied this code. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, ++ * CA 95054 USA or visit www.sun.com if you need additional information or ++ * have any questions. ++ */ ++ ++package sun.nio.ch; ++ ++import java.nio.channels.spi.AsynchronousChannelProvider; ++import java.io.IOException; ++import java.util.concurrent.ArrayBlockingQueue; ++import java.util.concurrent.RejectedExecutionException; ++import java.util.concurrent.atomic.AtomicInteger; ++import static sun.nio.ch.KQueue.*; ++ ++/** ++ * AsynchronousChannelGroup implementation based on the Bsd kqueue facility. ++ */ ++ ++final class KQueuePort ++ extends Port ++{ ++ // maximum number of events to poll at a time ++ private static final int MAX_EPOLL_EVENTS = 512; ++ ++ // errors ++ private static final int ENOENT = 2; ++ ++ // kqueue descriptor ++ private final int kqfd; ++ ++ // true if kqueue closed ++ private boolean closed; ++ ++ // socket pair used for wakeup ++ private final int sp[]; ++ ++ // number of wakeups pending ++ private final AtomicInteger wakeupCount = new AtomicInteger(); ++ ++ // address of the poll array passed to kqueue_wait ++ private final long address; ++ ++ // encapsulates an event for a channel ++ static class Event { ++ final PollableChannel channel; ++ final int events; ++ ++ Event(PollableChannel channel, int events) { ++ this.channel = channel; ++ this.events = events; ++ } ++ ++ PollableChannel channel() { return channel; } ++ int events() { return events; } ++ } ++ ++ // queue of events for cases that a polling thread dequeues more than one ++ // event ++ private final ArrayBlockingQueue queue; ++ private final Event NEED_TO_POLL = new Event(null, 0); ++ private final Event EXECUTE_TASK_OR_SHUTDOWN = new Event(null, 0); ++ ++ KQueuePort(AsynchronousChannelProvider provider, ThreadPool pool) ++ throws IOException ++ { ++ super(provider, pool); ++ ++ // open kqueue ++ this.kqfd = kqueueCreate(); ++ ++ // create socket pair for wakeup mechanism ++ int[] sv = new int[2]; ++ try { ++ socketpair(sv); ++ // register one end with kqueue ++ kqueueCtl(kqfd, EPOLL_CTL_ADD, sv[0], POLLIN); ++ } catch (IOException x) { ++ close0(kqfd); ++ throw x; ++ } ++ this.sp = sv; ++ ++ // allocate the poll array ++ this.address = allocatePollArray(MAX_EPOLL_EVENTS); ++ ++ // create the queue and offer the special event to ensure that the first ++ // threads polls ++ this.queue = new ArrayBlockingQueue(MAX_EPOLL_EVENTS); ++ this.queue.offer(NEED_TO_POLL); ++ } ++ ++ KQueuePort start() { ++ startThreads(new EventHandlerTask()); ++ return this; ++ } ++ ++ /** ++ * Release all resources ++ */ ++ private void implClose() { ++ synchronized (this) { ++ if (closed) ++ return; ++ closed = true; ++ } ++ freePollArray(address); ++ close0(sp[0]); ++ close0(sp[1]); ++ close0(kqfd); ++ } ++ ++ private void wakeup() { ++ if (wakeupCount.incrementAndGet() == 1) { ++ // write byte to socketpair to force wakeup ++ try { ++ interrupt(sp[1]); ++ } catch (IOException x) { ++ throw new AssertionError(x); ++ } ++ } ++ } ++ ++ @Override ++ void executeOnHandlerTask(Runnable task) { ++ synchronized (this) { ++ if (closed) ++ throw new RejectedExecutionException(); ++ offerTask(task); ++ wakeup(); ++ } ++ } ++ ++ @Override ++ void shutdownHandlerTasks() { ++ /* ++ * If no tasks are running then just release resources; otherwise ++ * write to the one end of the socketpair to wakeup any polling threads. ++ */ ++ int nThreads = threadCount(); ++ if (nThreads == 0) { ++ implClose(); ++ } else { ++ // send interrupt to each thread ++ while (nThreads-- > 0) { ++ wakeup(); ++ } ++ } ++ } ++ ++ // invoke by clients to register a file descriptor ++ @Override ++ void startPoll(int fd, int events) { ++ // update events (or add to kqueue on first usage) ++ int err = kqueueCtl(kqfd, EPOLL_CTL_MOD, fd, (events | EPOLLONESHOT)); ++ if (err == ENOENT) ++ err = kqueueCtl(kqfd, EPOLL_CTL_ADD, fd, (events | EPOLLONESHOT)); ++ if (err != 0) ++ throw new AssertionError(); // should not happen ++ } ++ ++ /* ++ * Task to process events from kqueue and dispatch to the channel's ++ * onEvent handler. ++ * ++ * Events are retreived from kqueue in batch and offered to a BlockingQueue ++ * where they are consumed by handler threads. A special "NEED_TO_POLL" ++ * event is used to signal one consumer to re-poll when all events have ++ * been consumed. ++ */ ++ private class EventHandlerTask implements Runnable { ++ private Event poll() throws IOException { ++ try { ++ for (;;) { ++ int n = kqueueWait(kqfd, address, MAX_EPOLL_EVENTS); ++ /* ++ * 'n' events have been read. Here we map them to their ++ * corresponding channel in batch and queue n-1 so that ++ * they can be handled by other handler threads. The last ++ * event is handled by this thread (and so is not queued). ++ */ ++ fdToChannelLock.readLock().lock(); ++ try { ++ while (n-- > 0) { ++ long eventAddress = getEvent(address, n); ++ int fd = getDescriptor(eventAddress); ++ ++ // wakeup ++ if (fd == sp[0]) { ++ if (wakeupCount.decrementAndGet() == 0) { ++ // no more wakeups so drain pipe ++ drain1(sp[0]); ++ } ++ ++ // queue special event if there are more events ++ // to handle. ++ if (n > 0) { ++ queue.offer(EXECUTE_TASK_OR_SHUTDOWN); ++ continue; ++ } ++ return EXECUTE_TASK_OR_SHUTDOWN; ++ } ++ ++ PollableChannel channel = fdToChannel.get(fd); ++ if (channel != null) { ++ int events = getEvents(eventAddress); ++ Event ev = new Event(channel, events); ++ ++ // n-1 events are queued; This thread handles ++ // the last one except for the wakeup ++ if (n > 0) { ++ queue.offer(ev); ++ } else { ++ return ev; ++ } ++ } ++ } ++ } finally { ++ fdToChannelLock.readLock().unlock(); ++ } ++ } ++ } finally { ++ // to ensure that some thread will poll when all events have ++ // been consumed ++ queue.offer(NEED_TO_POLL); ++ } ++ } ++ ++ public void run() { ++ Invoker.GroupAndInvokeCount myGroupAndInvokeCount = ++ Invoker.getGroupAndInvokeCount(); ++ boolean replaceMe = false; ++ Event ev; ++ try { ++ for (;;) { ++ // reset invoke count ++ if (myGroupAndInvokeCount != null) ++ myGroupAndInvokeCount.resetInvokeCount(); ++ ++ try { ++ replaceMe = false; ++ ev = queue.take(); ++ ++ // no events and this thread has been "selected" to ++ // poll for more. ++ if (ev == NEED_TO_POLL) { ++ try { ++ ev = poll(); ++ } catch (IOException x) { ++ x.printStackTrace(); ++ return; ++ } ++ } ++ } catch (InterruptedException x) { ++ continue; ++ } ++ ++ // handle wakeup to execute task or shutdown ++ if (ev == EXECUTE_TASK_OR_SHUTDOWN) { ++ Runnable task = pollTask(); ++ if (task == null) { ++ // shutdown request ++ return; ++ } ++ // run task (may throw error/exception) ++ replaceMe = true; ++ task.run(); ++ continue; ++ } ++ ++ // process event ++ try { ++ ev.channel().onEvent(ev.events()); ++ } catch (Error x) { ++ replaceMe = true; throw x; ++ } catch (RuntimeException x) { ++ replaceMe = true; throw x; ++ } ++ } ++ } finally { ++ // last handler to exit when shutdown releases resources ++ int remaining = threadExit(this, replaceMe); ++ if (remaining == 0 && isShutdown()) { ++ implClose(); ++ } ++ } ++ } ++ } ++ ++ // -- Native methods -- ++ ++ private static native void socketpair(int[] sv) throws IOException; ++ ++ private static native void interrupt(int fd) throws IOException; ++ ++ private static native void drain1(int fd) throws IOException; ++ ++ private static native void close0(int fd); ++ ++ static { ++ Util.load(); ++ } ++} diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdFileStore_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdFileStore_java index f091c7af099..67be4b2c0ef 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdFileStore_java +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdFileStore_java @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_classes_sun_nio_fs_BsdFileStore_java,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/classes/sun/nio/fs/BsdFileStore.java.orig Sun Sep 27 11:02:06 2009 -+++ jdk/src/solaris/classes/sun/nio/fs/BsdFileStore.java Sun Sep 27 15:26:14 2009 +$OpenBSD: patch-jdk_src_solaris_classes_sun_nio_fs_BsdFileStore_java,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/classes/sun/nio/fs/BsdFileStore.java.orig Mon Nov 1 13:15:34 2010 ++++ jdk/src/solaris/classes/sun/nio/fs/BsdFileStore.java Mon Nov 1 13:16:30 2010 @@ -36,10 +36,6 @@ import java.io.IOException; class BsdFileStore extends UnixFileStore @@ -78,4 +78,4 @@ $OpenBSD: patch-jdk_src_solaris_classes_sun_nio_fs_BsdFileStore_java,v 1.2 2009/ +*/ return super.supportsFileAttributeView(name); } - + } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdNativeDispatcher_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdNativeDispatcher_java index 31a5ec9d0a6..3a0f989566f 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdNativeDispatcher_java +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_nio_fs_BsdNativeDispatcher_java @@ -1,13 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_classes_sun_nio_fs_BsdNativeDispatcher_java,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- jdk/src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java.orig Tue Jun 2 13:13:56 2009 -+++ jdk/src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java Tue Jun 2 13:14:02 2009 -@@ -1,5 +1,5 @@ - /* -- * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. -+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it +$OpenBSD: patch-jdk_src_solaris_classes_sun_nio_fs_BsdNativeDispatcher_java,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java.orig Mon Oct 25 18:02:19 2010 ++++ jdk/src/solaris/classes/sun/nio/fs/BsdNativeDispatcher.java Mon Oct 25 18:15:58 2010 @@ -36,84 +36,23 @@ class BsdNativeDispatcher extends UnixNativeDispatcher private BsdNativeDispatcher() { } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_security_provider_NativePRNG_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_security_provider_NativePRNG_java index ce2f991dc5e..fedd84a06b2 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_security_provider_NativePRNG_java +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_security_provider_NativePRNG_java @@ -1,12 +1,15 @@ -$OpenBSD: patch-jdk_src_solaris_classes_sun_security_provider_NativePRNG_java,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/solaris/classes/sun/security/provider/NativePRNG.java.orig Tue Oct 30 05:04:01 2007 -+++ jdk/src/solaris/classes/sun/security/provider/NativePRNG.java Wed Nov 7 18:16:19 2007 -@@ -63,7 +63,7 @@ public final class NativePRNG extends SecureRandomSpi +$OpenBSD: patch-jdk_src_solaris_classes_sun_security_provider_NativePRNG_java,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/classes/sun/security/provider/NativePRNG.java.orig Thu Dec 16 17:15:12 2010 ++++ jdk/src/solaris/classes/sun/security/provider/NativePRNG.java Tue Jan 4 19:16:54 2011 +@@ -63,9 +63,9 @@ public final class NativePRNG extends SecureRandomSpi private static final long serialVersionUID = -6599091113397072932L; // name of the pure random file (also used for setSeed()) - private static final String NAME_RANDOM = "/dev/random"; -+ private static final String NAME_RANDOM = "/dev/srandom"; ++ private static final String NAME_RANDOM = "/dev/arandom"; // name of the pseudo random file - private static final String NAME_URANDOM = "/dev/urandom"; +- private static final String NAME_URANDOM = "/dev/urandom"; ++ private static final String NAME_URANDOM = "/dev/arandom"; + // singleton instance or null if not available + private static final RandomIO INSTANCE = initIO(); diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java index 065c6abb554..6f814d14b20 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java @@ -1,9 +1,9 @@ -$OpenBSD: patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java,v 1.1 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java.orig Mon May 18 16:56:42 2009 -+++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java Mon May 18 16:57:00 2009 -@@ -38,9 +38,6 @@ import java.util.Properties; - */ - public class BsdVirtualMachine extends HotSpotVirtualMachine { +$OpenBSD: patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java.orig Tue Oct 26 09:56:36 2010 ++++ jdk/src/solaris/classes/sun/tools/attach/BsdVirtualMachine.java Tue Oct 26 10:58:55 2010 +@@ -40,9 +40,6 @@ public class BsdVirtualMachine extends HotSpotVirtualM + // temp directory for socket file + private static final String tmpdir = System.getProperty("java.io.tmpdir"); - // Indicates if this machine uses the old BsdThreads - static boolean isBsdThreads; @@ -11,12 +11,12 @@ $OpenBSD: patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java, // The patch to the socket file created by the target VM String path; -@@ -65,25 +62,10 @@ public class BsdVirtualMachine extends HotSpotVirtualM +@@ -67,25 +64,10 @@ public class BsdVirtualMachine extends HotSpotVirtualM // Then we attempt to find the socket file again. path = findSocketFile(pid); if (path == null) { - File f = createAttachFile(pid); -+ File f = new File("/tmp/.attach_pid" + pid); ++ File f = new File(tmpdir, ".attach_pid" + pid); + createAttachFile(f.getPath()); try { - // On BsdThreads each thread is a process and we don't have the @@ -40,29 +40,26 @@ $OpenBSD: patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java, // give the target VM time to start the attach mechanism int i = 0; -@@ -265,37 +247,14 @@ public class BsdVirtualMachine extends HotSpotVirtualM +@@ -267,33 +249,10 @@ public class BsdVirtualMachine extends HotSpotVirtualM // First check for a .java_pid file in the working directory // of the target process String fn = ".java_pid" + pid; - String path = "/proc/" + pid + "/cwd/" + fn; -+ String path = "/tmp/" + fn; - File f = new File(path); - if (!f.exists()) { -- // Not found, so try /tmp -- path = "/tmp/" + fn; -- f = new File(path); -- if (!f.exists()) { -- return null; // not found -- } -+ return null; // not found - } - return path; +- File f = new File(path); +- if (!f.exists()) { +- // Not found, so try temp directory +- f = new File(tmpdir, fn); +- path = f.exists() ? f.getPath() : null; +- } +- return path; ++ File f = new File(tmpdir, path); ++ return f.exists() ? f.getPath() : null; } - // On Solaris/Bsd a simple handshake is used to start the attach mechanism - // if not already started. The client creates a .attach_pid file in the -- // target VM's working directory (or /tmp), and the SIGQUIT handler checks -- // for the file. +- // target VM's working directory (or temp directory), and the SIGQUIT handler +- // checks for the file. - private File createAttachFile(int pid) throws IOException { - String fn = ".attach_pid" + pid; - String path = "/proc/" + pid + "/cwd/" + fn; @@ -70,8 +67,7 @@ $OpenBSD: patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java, - try { - f.createNewFile(); - } catch (IOException x) { -- path = "/tmp/" + fn; -- f = new File(path); +- f = new File(tmpdir, fn); - f.createNewFile(); - } - return f; @@ -80,7 +76,7 @@ $OpenBSD: patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java, /* * Write/sends the given to the target VM. String is transmitted in * UTF-8 encoding. -@@ -318,12 +277,6 @@ public class BsdVirtualMachine extends HotSpotVirtualM +@@ -316,12 +275,6 @@ public class BsdVirtualMachine extends HotSpotVirtualM //-- native methods @@ -93,7 +89,7 @@ $OpenBSD: patch-jdk_src_solaris_classes_sun_tools_attach_BsdVirtualMachine_java, static native void sendQuitTo(int pid) throws IOException; static native void checkPermissions(String path) throws IOException; -@@ -338,8 +291,9 @@ public class BsdVirtualMachine extends HotSpotVirtualM +@@ -336,8 +289,9 @@ public class BsdVirtualMachine extends HotSpotVirtualM static native void write(int fd, byte buf[], int off, int bufLen) throws IOException; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_include_largefile_bsd_h b/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_include_largefile_bsd_h index f00b0a9cdde..d28a11f73bb 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_include_largefile_bsd_h +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_include_largefile_bsd_h @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_solaris_hpi_include_largefile_bsd_h,v 1.2 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/hpi/include/largefile_bsd.h.orig Mon May 11 10:48:21 2009 -+++ jdk/src/solaris/hpi/include/largefile_bsd.h Mon May 11 13:02:43 2009 +$OpenBSD: patch-jdk_src_solaris_hpi_include_largefile_bsd_h,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/hpi/include/largefile_bsd.h.orig Mon Oct 25 18:02:19 2010 ++++ jdk/src/solaris/hpi/include/largefile_bsd.h Mon Oct 25 18:15:58 2010 @@ -23,14 +23,32 @@ - * have any questions. + * questions. */ -#ifndef _JAVASOFT_LINUX_LARGEFILE_SUPPORT_H_ diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_native_threads_src_threads_bsd_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_native_threads_src_threads_bsd_c index ecba71bf76d..29c18009ecf 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_native_threads_src_threads_bsd_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_hpi_native_threads_src_threads_bsd_c @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_solaris_hpi_native_threads_src_threads_bsd_c,v 1.2 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/hpi/native_threads/src/threads_bsd.c.orig Mon May 18 14:28:18 2009 -+++ jdk/src/solaris/hpi/native_threads/src/threads_bsd.c Mon May 18 16:59:47 2009 +$OpenBSD: patch-jdk_src_solaris_hpi_native_threads_src_threads_bsd_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/hpi/native_threads/src/threads_bsd.c.orig Mon Oct 25 18:02:19 2010 ++++ jdk/src/solaris/hpi/native_threads/src/threads_bsd.c Mon Oct 25 18:15:58 2010 @@ -23,90 +23,61 @@ - * have any questions. + * questions. */ -/* diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_com_sun_management_UnixOperatingSystem_md_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_com_sun_management_UnixOperatingSystem_md_c index 89c0ea7d7c9..83b4ac56dbe 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_com_sun_management_UnixOperatingSystem_md_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_com_sun_management_UnixOperatingSystem_md_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_com_sun_management_UnixOperatingSystem_md_c,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c.orig Tue Oct 30 05:04:03 2007 -+++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c Thu Nov 8 09:34:11 2007 +$OpenBSD: patch-jdk_src_solaris_native_com_sun_management_UnixOperatingSystem_md_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c.orig Thu Dec 16 17:15:15 2010 ++++ jdk/src/solaris/native/com/sun/management/UnixOperatingSystem_md.c Tue Jan 4 19:17:49 2011 @@ -32,10 +32,16 @@ #include @@ -126,7 +126,7 @@ $OpenBSD: patch-jdk_src_solaris_native_com_sun_management_UnixOperatingSystem_md +#ifdef _ALLBSD_SOURCE + jlong result; + int mib[2]; -+ int rlen; ++ size_t rlen; + + mib[0] = CTL_HW; + mib[1] = HW_PHYSMEM; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_io_UnixFileSystem_md_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_io_UnixFileSystem_md_c index 0962ecc2c2c..34e5892e736 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_io_UnixFileSystem_md_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_io_UnixFileSystem_md_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_io_UnixFileSystem_md_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/java/io/UnixFileSystem_md.c.orig Fri May 8 03:35:07 2009 -+++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c Mon May 18 17:03:13 2009 -@@ -41,6 +41,11 @@ +$OpenBSD: patch-jdk_src_solaris_native_java_io_UnixFileSystem_md_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/io/UnixFileSystem_md.c.orig Fri Aug 13 03:22:13 2010 ++++ jdk/src/solaris/native/java/io/UnixFileSystem_md.c Tue Oct 26 11:01:50 2010 +@@ -41,6 +41,12 @@ #include "java_io_FileSystem.h" #include "java_io_UnixFileSystem.h" @@ -9,11 +9,12 @@ $OpenBSD: patch-jdk_src_solaris_native_java_io_UnixFileSystem_md_c,v 1.3 2009/05 +#define dirent64 dirent +#define readdir64_r readdir_r +#define stat64 stat ++#define statvfs64 statvfs +#endif /* -- Field IDs -- */ -@@ -139,7 +144,6 @@ Java_java_io_UnixFileSystem_checkAccess(JNIEnv *env, j +@@ -139,7 +145,6 @@ Java_java_io_UnixFileSystem_checkAccess(JNIEnv *env, j } END_PLATFORM_STRING(env, path); return rv; } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_lang_java_props_md_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_lang_java_props_md_c index e2fdd58f9ba..1f7df913d3c 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_lang_java_props_md_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_lang_java_props_md_c @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_lang_java_props_md_c,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/solaris/native/java/lang/java_props_md.c.orig Sat Dec 1 00:00:00 2007 -+++ jdk/src/solaris/native/java/lang/java_props_md.c Tue Feb 26 18:50:58 2008 +$OpenBSD: patch-jdk_src_solaris_native_java_lang_java_props_md_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/lang/java_props_md.c.orig Thu Dec 16 17:15:16 2010 ++++ jdk/src/solaris/native/java/lang/java_props_md.c Tue Jan 4 18:25:21 2011 @@ -23,7 +23,7 @@ - * have any questions. + * questions. */ -#ifdef __linux__ @@ -26,9 +26,9 @@ $OpenBSD: patch-jdk_src_solaris_native_java_lang_java_props_md_c,v 1.1 2008/03/1 +#if !defined(_ALLBSD_SOURCE) #ifdef __linux__ - #define CODESET _NL_CTYPE_CODESET_NAME - #else -@@ -52,6 +60,7 @@ + #ifndef CODESET + #define CODESET _NL_CTYPE_CODESET_NAME +@@ -54,6 +62,7 @@ #define CODESET ALT_CODESET_KEY #endif #endif @@ -36,79 +36,9 @@ $OpenBSD: patch-jdk_src_solaris_native_java_lang_java_props_md_c,v 1.1 2008/03/1 /* Take an array of string pairs (map of key->value) and a string (key). * Examine each pair in the map to see if the first string (key) matches the -@@ -121,7 +130,7 @@ setPathEnvironment(char *envstring) - java_props_t * - GetJavaProperties(JNIEnv *env) - { -- static java_props_t sprops = {0}; -+ static java_props_t sprops = { 0 }; - char *v; /* tmp var */ - - if (sprops.user_dir) { -@@ -188,7 +197,12 @@ GetJavaProperties(JNIEnv *env) - { - char *lc; - lc = setlocale(LC_CTYPE, ""); --#ifndef __linux__ -+#if defined(_ALLBSD_SOURCE) -+ if (lc == NULL) { -+ lc = "C"; -+ } -+ { -+#elif !defined(__linux__) - if (lc == NULL) { - /* - * 'lc == null' means system doesn't support user's environment -@@ -219,7 +233,7 @@ GetJavaProperties(JNIEnv *env) - char *p, encoding_variant[64]; - int i, found; - --#ifndef __linux__ -+#if !defined(__linux__) && !defined(_ALLBSD_SOURCE) - /* - * Workaround for Solaris bug 4201684: Xlib doesn't like @euro - * locales. Since we don't depend on the libc @euro behavior, -@@ -236,6 +250,13 @@ GetJavaProperties(JNIEnv *env) - *p = '\0'; - setlocale(LC_ALL, temp); - #endif -+ if (lc == NULL) { -+ strncpy(temp, "C", sizeof(temp)-1); -+ temp[sizeof(temp)-1] = '\0'; -+ } else { -+ strncpy(temp, lc, sizeof(temp)-1); -+ temp[sizeof(temp)-1] = '\0'; -+ } - - strcpy(temp, lc); - -@@ -316,6 +337,9 @@ GetJavaProperties(JNIEnv *env) - else - p = nl_langinfo(CODESET); - -+ if (p == NULL || !strcmp(p, "C") || !strcmp(p, "US-ASCII")) -+ p = ""; // use default -+ - /* Convert the bare "646" used on Solaris to a proper IANA name */ - if (strcmp(p, "646") == 0) - p = "ISO646-US"; -@@ -325,6 +349,7 @@ GetJavaProperties(JNIEnv *env) - std_encoding = (*p != '\0') ? p : "ISO8859-1"; - - -+#if !defined(_ALLBSD_SOURCE) - #ifdef __linux__ - /* - * Remap the encoding string to a different value for japanese -@@ -355,11 +380,19 @@ GetJavaProperties(JNIEnv *env) - std_encoding = "Big5_Solaris"; - } - #endif -+#endif /* !_ALLBSD_SOURCE */ - sprops.encoding = std_encoding; - sprops.sun_jnu_encoding = sprops.encoding; - } - } +@@ -397,6 +406,13 @@ GetJavaProperties(JNIEnv *env) + sprops.display_variant = sprops.variant; + sprops.sun_jnu_encoding = sprops.encoding; +#ifdef _ALLBSD_SOURCE +#if BYTE_ORDER == _LITTLE_ENDIAN @@ -120,7 +50,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_lang_java_props_md_c,v 1.1 2008/03/1 #ifdef __linux__ #if __BYTE_ORDER == __LITTLE_ENDIAN sprops.unicode_encoding = "UnicodeLittle"; -@@ -369,6 +402,7 @@ GetJavaProperties(JNIEnv *env) +@@ -406,6 +422,7 @@ GetJavaProperties(JNIEnv *env) #else sprops.unicode_encoding = "UnicodeBig"; #endif @@ -128,7 +58,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_lang_java_props_md_c,v 1.1 2008/03/1 /* user properties */ { -@@ -405,12 +439,14 @@ GetJavaProperties(JNIEnv *env) +@@ -442,12 +459,14 @@ GetJavaProperties(JNIEnv *env) sprops.path_separator = ":"; sprops.line_separator = "\n"; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c index e7eaa4404cd..62432f47a5d 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.4 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/native/java/net/Inet4AddressImpl.c.orig Thu Sep 17 03:52:32 2009 -+++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c Sat Sep 26 10:12:03 2009 -@@ -36,17 +36,293 @@ +$OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.5 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/net/Inet4AddressImpl.c.orig Fri Aug 13 03:22:13 2010 ++++ jdk/src/solaris/native/java/net/Inet4AddressImpl.c Tue Oct 26 11:02:17 2010 +@@ -36,12 +36,288 @@ #include #include @@ -290,13 +290,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.4 2009/10 /* the initial size of our hostent buffers */ #define HENT_BUF_SIZE 1024 #define BIG_HENT_BUF_SIZE 10240 /* a jumbo-sized one */ - --#ifndef __GLIBC__ -+#if !defined(__GLIBC__) && !defined(_ALLBSD_SOURCE) - /* gethostname() is in libc.so but I can't find a header file for it */ - extern int gethostname(char *buf, int buf_len); - #endif -@@ -86,13 +362,13 @@ Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv +@@ -81,13 +357,13 @@ Java_java_net_Inet4AddressImpl_getLocalHostName(JNIEnv char buf2[HENT_BUF_SIZE]; int h_error=0; @@ -312,7 +306,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.4 2009/10 gethostbyaddr_r(hp->h_addr, hp->h_length, AF_INET, &res2, buf2, sizeof(buf2), &hp, &h_error); #else -@@ -180,7 +456,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEn +@@ -175,7 +451,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEn #endif /* Try once, with our static buffer. */ @@ -321,7 +315,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.4 2009/10 gethostbyname_r(hostname, &res, buf, sizeof(buf), &hp, &h_error); #else hp = gethostbyname_r(hostname, &res, buf, sizeof(buf), &h_error); -@@ -193,7 +469,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEn +@@ -188,7 +464,7 @@ Java_java_net_Inet4AddressImpl_lookupAllHostAddr(JNIEn */ if (hp == NULL && errno == ERANGE) { if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) { @@ -330,7 +324,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.4 2009/10 gethostbyname_r(hostname, &res, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error); #else -@@ -276,7 +552,7 @@ Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *e +@@ -271,7 +547,7 @@ Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *e addr |= ((caddr[2] <<8) & 0xff00); addr |= (caddr[3] & 0xff); addr = htonl(addr); @@ -339,7 +333,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.4 2009/10 gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent, buf, sizeof(buf), &hp, &h_error); #else -@@ -290,7 +566,7 @@ Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *e +@@ -285,7 +561,7 @@ Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *e */ if (hp == NULL && errno == ERANGE) { if ((tmp = (char*)malloc(BIG_HENT_BUF_SIZE))) { @@ -348,7 +342,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet4AddressImpl_c,v 1.4 2009/10 gethostbyaddr_r((char *)&addr, sizeof(addr), AF_INET, &hent, tmp, BIG_HENT_BUF_SIZE, &hp, &h_error); #else -@@ -311,6 +587,8 @@ Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *e +@@ -306,6 +582,8 @@ Java_java_net_Inet4AddressImpl_getHostByAddr(JNIEnv *e } return ret; } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c index 95b6224caff..25850f43626 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/native/java/net/Inet6AddressImpl.c.orig Thu Sep 17 03:52:32 2009 -+++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c Sat Sep 26 10:12:03 2009 +$OpenBSD: patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/net/Inet6AddressImpl.c.orig Fri Aug 13 03:22:13 2010 ++++ jdk/src/solaris/native/java/net/Inet6AddressImpl.c Mon Oct 25 18:15:59 2010 @@ -33,6 +33,9 @@ #include #include @@ -11,16 +11,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c,v 1.2 2009/10 #include "jvm.h" #include "jni_util.h" -@@ -49,7 +52,7 @@ - #define NI_MAXHOST 1025 - #endif - --#ifndef __GLIBC__ -+#if !defined(__GLIBC__) && !defined(_ALLBSD_SOURCE) - /* gethostname() is in libc.so but I can't find a header file for it */ - extern int gethostname(char *buf, int buf_len); - #endif -@@ -72,10 +75,18 @@ Java_java_net_Inet6AddressImpl_getLocalHostName(JNIEnv +@@ -68,10 +71,18 @@ Java_java_net_Inet6AddressImpl_getLocalHostName(JNIEnv /* Something went wrong, maybe networking is not setup? */ strcpy(hostname, "localhost"); } else { @@ -41,7 +32,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_Inet6AddressImpl_c,v 1.2 2009/10 #else /* Solaris doesn't want to give us a fully qualified domain name. * We do a reverse lookup to try and get one. This works -@@ -111,7 +122,7 @@ Java_java_net_Inet6AddressImpl_getLocalHostName(JNIEnv +@@ -107,7 +118,7 @@ Java_java_net_Inet6AddressImpl_getLocalHostName(JNIEnv } } #endif /* AF_INET6 */ diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_NetworkInterface_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_NetworkInterface_c index d19b8f4dd5b..2e3f2487500 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_NetworkInterface_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_NetworkInterface_c @@ -1,29 +1,24 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/java/net/NetworkInterface.c.orig Fri May 8 03:35:07 2009 -+++ jdk/src/solaris/native/java/net/NetworkInterface.c Mon May 18 19:36:07 2009 -@@ -23,13 +23,13 @@ - * have any questions. - */ +$OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/net/NetworkInterface.c.orig Fri Aug 13 03:22:13 2010 ++++ jdk/src/solaris/native/java/net/NetworkInterface.c Tue Oct 26 11:04:25 2010 +@@ -26,6 +26,9 @@ -+#include -+#include #include #include ++#if defined(_ALLBSD_SOURCE) && defined(__OpenBSD__) ++#include ++#endif #include #include #include --#include --#include - #include - #include - #include -@@ -47,6 +47,21 @@ - #else - #include +@@ -54,6 +57,23 @@ + #define _PATH_PROCNET_IFINET6 "/proc/net/if_inet6" #endif + +#if defined(_ALLBSD_SOURCE) +#include +#include ++#include +#if defined(__FreeBSD__) || defined(__APPLE__) +#include +#include @@ -36,51 +31,71 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05 +#include +#include +#endif ++ + #include "jvm.h" + #include "jni_util.h" + #include "net_util.h" +@@ -821,11 +841,11 @@ netif *addif(JNIEnv *env, int sock, const char * if_na + netif *currif = ifs, *parent; + netaddr *addrP; - #ifdef __linux__ - #define ifr_index ifr_ifindex -@@ -583,6 +598,7 @@ static netif *enumInterfaces(JNIEnv *env) { - } +- #ifdef __solaris__ ++#ifdef LIFNAMSIZ + char name[LIFNAMSIZ], vname[LIFNAMSIZ]; +- #else ++#else + char name[IFNAMSIZ], vname[IFNAMSIZ]; +- #endif ++#endif + + char *name_colonP; + int mask; +@@ -1649,3 +1669,307 @@ static int getFlags(int sock, const char *ifname) { + #endif -+#if !defined(_ALLBSD_SOURCE) - /* - * Enumerates and returns all IPv4 interfaces - */ -@@ -693,7 +709,177 @@ static netif *enumIPv4Interfaces(JNIEnv *env, netif *i - return ifs; - } - -+#else /* _ALLBSD_SOURCE */ -+ ++/** BSD **/ ++#ifdef _ALLBSD_SOURCE ++/* Open socket for further ioct calls, try v4 socket first and ++ * if it falls return v6 socket ++ */ ++ ++#ifdef AF_INET6 ++static int openSocketWithFallback(JNIEnv *env, const char *ifname){ ++ int sock; ++ struct ifreq if2; ++ ++ if ((sock = JVM_Socket(AF_INET, SOCK_DGRAM, 0)) < 0) { ++ if (errno == EPROTONOSUPPORT){ ++ if ( (sock = JVM_Socket(AF_INET6, SOCK_DGRAM, 0)) < 0 ){ ++ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", "IPV6 Socket creation failed"); ++ return -1; ++ } ++ } ++ else{ // errno is not NOSUPPORT ++ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", "IPV4 Socket creation failed"); ++ return -1; ++ } ++ } ++ ++ return sock; ++} ++ ++#else ++static int openSocketWithFallback(JNIEnv *env, const char *ifname){ ++ return openSocket(env,AF_INET); ++} ++#endif ++ +/* + * Enumerates and returns all IPv4 interfaces -+ * -+ * WARNING! Make sure that it's correctly synchronized on future JDK -+ * versions imports! + */ -+static netif *enumIPv4Interfaces(JNIEnv *env, netif *ifs) -+{ -+ int sock; ++static netif *enumIPv4Interfaces(JNIEnv *env, int sock, netif *ifs) { + struct ifaddrs *ifa, *origifa; - -+ sock = JVM_Socket(AF_INET, SOCK_DGRAM, 0); -+ if (sock < 0) { -+ /* -+ * If EPROTONOSUPPORT is returned it means we don't have -+ * IPv4 support so don't throw an exception. -+ */ -+ if (errno != EPROTONOSUPPORT) { -+ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", -+ "Socket creation failed"); -+ } -+ return ifs; -+ } + + if (getifaddrs(&origifa) != 0) { + NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", + "getifaddrs() function failed"); -+ close(sock); + return ifs; + } + @@ -94,18 +109,13 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05 + + /* + * Add to the list. -+ * -+ * BSDNOTE: in order to optimize code, interface index detection -+ * logic was added directly to addif(). + */ -+ ifs = addif(env, ifs, ifa->ifa_name, (-1), AF_INET, -+ ifa->ifa_addr, sizeof(struct sockaddr_in), 0); ++ ifs = addif(env, sock, ifa->ifa_name, ifs, ifa->ifa_addr, AF_INET, 0); + + /* + * If an exception occurred then free the list. + */ + if ((*env)->ExceptionOccurred(env)) { -+ close(sock); + freeifaddrs(origifa); + freeif(ifs); + return NULL; @@ -115,12 +125,16 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05 + /* + * Free socket and buffer + */ -+ close(sock); + freeifaddrs(origifa); + return ifs; +} + -+#if defined(AF_INET6) ++ ++/* ++ * Enumerates and returns all IPv6 interfaces on Linux ++ */ ++ ++#ifdef AF_INET6 +/* + * Determines the prefix on BSD for IPv6 interfaces. + */ @@ -148,30 +162,16 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05 +} + +/* -+ * Enumerates and returns all IPv6 interfaces on FreeBSD -+ * -+ * BSDNOTE: it's done in same as IPv4 enumeration and should be carefully -+ * reviewed with each JDK update (according to Solaris/Linux version) ++ * Enumerates and returns all IPv6 interfaces on BSD + */ -+static netif *enumIPv6Interfaces(JNIEnv *env, netif *ifs) { -+ -+ int sock; ++static netif *enumIPv6Interfaces(JNIEnv *env, int sock, netif *ifs) { + struct ifaddrs *ifa, *origifa; + struct sockaddr_in6 *sin6; + struct in6_ifreq ifr6; + -+ // Open IPv6 UDP socket. -+ sock = JVM_Socket(AF_INET6, SOCK_DGRAM, 0); -+ if (sock < 0) { -+ NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", -+ "Failed to create IPv6 socket"); -+ return ifs; -+ } -+ + if (getifaddrs(&origifa) != 0) { + NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", + "getifaddrs() function failed"); -+ close(sock); + return ifs; + } + @@ -190,7 +190,6 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05 + if (ioctl(sock, SIOCGIFNETMASK_IN6, (caddr_t)&ifr6) < 0) { + NET_ThrowByNameWithLastError(env , JNU_JAVANETPKG "SocketException", + "ioctl SIOCGIFNETMASK_IN6 failed"); -+ close(sock); + freeifaddrs(origifa); + freeif(ifs); + return NULL; @@ -198,13 +197,11 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05 + + /* Add to the list. */ + sin6 = (struct sockaddr_in6 *)&ifr6.ifr_addr; -+ ifs = addif(env, ifs, ifa->ifa_name, (-1), AF_INET6, -+ ifa->ifa_addr, sizeof(struct sockaddr_in6), ++ ifs = addif(env, sock, ifa->ifa_name, ifs, ifa->ifa_addr, AF_INET6, + prefix(&sin6->sin6_addr, sizeof(struct in6_addr))); + + /* If an exception occurred then free the list. */ + if ((*env)->ExceptionOccurred(env)) { -+ close(sock); + freeifaddrs(origifa); + freeif(ifs); + return NULL; @@ -214,69 +211,150 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_NetworkInterface_c,v 1.3 2009/05 + /* + * Free socket and ifaddrs buffer + */ -+ close(sock); + freeifaddrs(origifa); + return ifs; +} -+#endif /* AF_INET6 */ -+ -+#endif /* !_ALLBSD_SOURCE */ -+ - #if defined(__solaris__) && defined(AF_INET6) - /* - * Enumerates and returns all IPv6 interfaces on Solaris -@@ -1036,7 +1222,13 @@ netif *addif(JNIEnv *env, netif *ifs, char *if_name, i - JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); - return ifs; - } -+#if defined(_ALLBSD_SOURCE) -+ currif->index = if_nametoindex(name); -+ if (currif->index == 0) -+ currif->index = -1; -+#else - currif->index = index; +#endif - currif->addr = NULL; - currif->childs = NULL; - currif->virtual = isVirtual; -@@ -1347,6 +1539,31 @@ int getMacAddress(JNIEnv *env, const struct in_addr* a - * All bytes to 0 means no hardware address. - */ - return -1; -+#elif defined(_ALLBSD_SOURCE) -+ struct ifaddrs *ifa0, *ifa; -+ struct sockaddr *saddr; -+ int i; + -+ /* Grab the interface list */ -+ if (!getifaddrs(&ifa0)) { -+ /* Cycle through the interfaces */ -+ for (i = 0, ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next, i++) { -+ saddr = ifa->ifa_addr; -+ /* Link layer contains the MAC address */ -+ if (saddr->sa_family == AF_LINK && !strcmp(ifname, ifa->ifa_name)) { -+ struct sockaddr_dl *sadl = (struct sockaddr_dl *) saddr; -+ /* Check the address is the correct length */ -+ if (sadl->sdl_alen == ETHER_ADDR_LEN) { -+ memcpy(buf, (sadl->sdl_data + sadl->sdl_nlen), ETHER_ADDR_LEN); -+ freeifaddrs(ifa0); -+ return ETHER_ADDR_LEN; -+ } -+ } ++static int getIndex(int sock, const char *name){ ++#ifdef __FreeBSD__ ++ /* ++ * Try to get the interface index ++ * (Not supported on Solaris 2.6 or 7) ++ */ ++ struct ifreq if2; ++ strcpy(if2.ifr_name, name); ++ ++ if (ioctl(sock, SIOCGIFINDEX, (char *)&if2) < 0) { ++ return -1; + } -+ freeifaddrs(ifa0); ++ ++ return if2.ifr_index; ++#else ++ /* ++ * Try to get the interface index using BSD specific if_nametoindex ++ */ ++ int index = if_nametoindex(name); ++ return (index == 0) ? -1 : index; ++#endif ++} ++ ++/** ++ * Returns the IPv4 broadcast address of a named interface, if it exists. ++ * Returns 0 if it doesn't have one. ++ */ ++static struct sockaddr *getBroadcast(JNIEnv *env, int sock, const char *ifname, struct sockaddr *brdcast_store) { ++ struct sockaddr *ret = NULL; ++ struct ifreq if2; ++ ++ memset((char *) &if2, 0, sizeof(if2)); ++ strcpy(if2.ifr_name, ifname); ++ ++ /* Let's make sure the interface does have a broadcast address */ ++ if (ioctl(sock, SIOCGIFFLAGS, (char *)&if2) < 0) { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "IOCTL SIOCGIFFLAGS failed"); ++ return ret; + } + -+ return -1; - #else - struct arpreq arpreq; - struct sockaddr_in* sin; -@@ -1512,7 +1729,7 @@ JNIEXPORT jint JNICALL Java_java_net_NetworkInterface_ - "Socket creation failed"); - } else { - --#ifdef __linux__ -+#if defined(__linux__) || defined(_ALLBSD_SOURCE) - memset((char *) &if2, 0, sizeof(if2)); - strcpy(if2.ifr_name, name_utf); - ++ if (if2.ifr_flags & IFF_BROADCAST) { ++ /* It does, let's retrieve it*/ ++ if (ioctl(sock, SIOCGIFBRDADDR, (char *)&if2) < 0) { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "IOCTL SIOCGIFBRDADDR failed"); ++ return ret; ++ } ++ ++ ret = brdcast_store; ++ memcpy(ret, &if2.ifr_broadaddr, sizeof(struct sockaddr)); ++ } ++ ++ return ret; ++} ++ ++/** ++ * Returns the IPv4 subnet prefix length (aka subnet mask) for the named ++ * interface, if it has one, otherwise return -1. ++ */ ++static short getSubnet(JNIEnv *env, int sock, const char *ifname) { ++ unsigned int mask; ++ short ret; ++ struct ifreq if2; ++ ++ memset((char *) &if2, 0, sizeof(if2)); ++ strcpy(if2.ifr_name, ifname); ++ ++ if (ioctl(sock, SIOCGIFNETMASK, (char *)&if2) < 0) { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "IOCTL SIOCGIFNETMASK failed"); ++ return -1; ++ } ++ ++ mask = ntohl(((struct sockaddr_in*)&(if2.ifr_addr))->sin_addr.s_addr); ++ ret = 0; ++ while (mask) { ++ mask <<= 1; ++ ret++; ++ } ++ ++ return ret; ++} ++ ++/** ++ * Get the Hardware address (usually MAC address) for the named interface. ++ * return puts the data in buf, and returns the length, in byte, of the ++ * MAC address. Returns -1 if there is no hardware address on that interface. ++ */ ++static int getMacAddress(JNIEnv *env, int sock, const char* ifname, const struct in_addr* addr, unsigned char *buf) { ++ struct ifaddrs *ifa0, *ifa; ++ struct sockaddr *saddr; ++ int i; ++ ++ /* Grab the interface list */ ++ if (!getifaddrs(&ifa0)) { ++ /* Cycle through the interfaces */ ++ for (i = 0, ifa = ifa0; ifa != NULL; ifa = ifa->ifa_next, i++) { ++ saddr = ifa->ifa_addr; ++ /* Link layer contains the MAC address */ ++ if (saddr->sa_family == AF_LINK && !strcmp(ifname, ifa->ifa_name)) { ++ struct sockaddr_dl *sadl = (struct sockaddr_dl *) saddr; ++ /* Check the address is the correct length */ ++ if (sadl->sdl_alen == ETHER_ADDR_LEN) { ++ memcpy(buf, (sadl->sdl_data + sadl->sdl_nlen), ETHER_ADDR_LEN); ++ freeifaddrs(ifa0); ++ return ETHER_ADDR_LEN; ++ } ++ } ++ } ++ freeifaddrs(ifa0); ++ } ++ ++ return -1; ++} ++ ++static int getMTU(JNIEnv *env, int sock, const char *ifname) { ++ struct ifreq if2; ++ ++ memset((char *) &if2, 0, sizeof(if2)); ++ strcpy(if2.ifr_name, ifname); ++ ++ if (ioctl(sock, SIOCGIFMTU, (char *)&if2) < 0) { ++ NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "SocketException", "IOCTL SIOCGIFMTU failed"); ++ return -1; ++ } ++ ++ return if2.ifr_mtu; ++} ++ ++static int getFlags(int sock, const char *ifname) { ++ struct ifreq if2; ++ int ret = -1; ++ ++ memset((char *) &if2, 0, sizeof(if2)); ++ strcpy(if2.ifr_name, ifname); ++ ++ if (ioctl(sock, SIOCGIFFLAGS, (char *)&if2) < 0){ ++ return -1; ++ } ++ ++ return if2.ifr_flags; ++} ++ ++#endif diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c index 294ed50071d..d24588afcce 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c.orig Fri May 8 03:35:07 2009 -+++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Mon May 18 19:36:28 2009 +$OpenBSD: patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c.orig Thu Oct 28 20:18:11 2010 ++++ jdk/src/solaris/native/java/net/PlainDatagramSocketImpl.c Mon Nov 1 13:16:32 2010 @@ -23,12 +23,12 @@ - * have any questions. + * questions. */ +#include @@ -73,25 +73,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_PlainDatagramSocketImpl_c,v 1.3 #else JVM_Connect(fd, 0, 0); #endif -@@ -1838,7 +1852,7 @@ Java_java_net_PlainDatagramSocketImpl_socketGetOption( - if (opt == java_net_SocketOptions_SO_BINDADDR) { - /* find out local IP address */ - SOCKADDR him; -- int len = 0; -+ socklen_t len; - int port; - jobject iaObj; - -@@ -2219,7 +2233,7 @@ static void mcast_join_leave(JNIEnv *env, jobject this - { - struct in_addr in; - struct in_addr *inP = ∈ -- int len = sizeof(struct in_addr); -+ socklen_t len = sizeof(struct in_addr); - - #ifdef __linux__ - struct ip_mreqn mreqn; -@@ -2364,18 +2378,30 @@ static void mcast_join_leave(JNIEnv *env, jobject this +@@ -2400,18 +2414,30 @@ static void mcast_join_leave(JNIEnv *env, jobject this mname6.ipv6mr_interface = idx; } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainSocketImpl_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainSocketImpl_c index 086966b46ab..386b980ecd2 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainSocketImpl_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_PlainSocketImpl_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_PlainSocketImpl_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/java/net/PlainSocketImpl.c.orig Fri May 8 03:35:07 2009 -+++ jdk/src/solaris/native/java/net/PlainSocketImpl.c Mon May 18 19:36:43 2009 -@@ -467,9 +467,11 @@ Java_java_net_PlainSocketImpl_socketConnect(JNIEnv *en +$OpenBSD: patch-jdk_src_solaris_native_java_net_PlainSocketImpl_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/net/PlainSocketImpl.c.orig Thu Oct 28 20:18:11 2010 ++++ jdk/src/solaris/native/java/net/PlainSocketImpl.c Mon Nov 1 13:16:32 2010 +@@ -483,9 +483,11 @@ Java_java_net_PlainSocketImpl_socketConnect(JNIEnv *en if (connect_rv == JVM_IO_INTR) { JNU_ThrowByName(env, JNU_JAVAIOPKG "InterruptedIOException", "operation interrupted"); @@ -13,7 +13,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_PlainSocketImpl_c,v 1.3 2009/05/ } else if (errno == ECONNREFUSED) { NET_ThrowByNameWithLastError(env, JNU_JAVANETPKG "ConnectException", "Connection refused"); -@@ -985,7 +987,7 @@ Java_java_net_PlainSocketImpl_socketGetOption(JNIEnv * +@@ -1001,7 +1003,7 @@ Java_java_net_PlainSocketImpl_socketGetOption(JNIEnv * */ if (cmd == java_net_SocketOptions_SO_BINDADDR) { SOCKADDR him; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_net_util_md_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_net_util_md_c index 9fea768bfc6..5e166af6a8a 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_net_util_md_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_net_net_util_md_c @@ -1,9 +1,12 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/java/net/net_util_md.c.orig Fri May 8 03:35:07 2009 -+++ jdk/src/solaris/native/java/net/net_util_md.c Mon May 18 19:41:43 2009 -@@ -34,6 +34,15 @@ +$OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/java/net/net_util_md.c.orig Thu Dec 16 17:15:16 2010 ++++ jdk/src/solaris/native/java/net/net_util_md.c Tue Jan 4 19:20:11 2011 +@@ -33,8 +33,17 @@ + #include #include #include +-#include ++#include +#ifdef _ALLBSD_SOURCE +#include @@ -17,7 +20,16 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 0 #ifdef __solaris__ #include #include -@@ -219,8 +228,16 @@ NET_GetFileDescriptorID(JNIEnv *env) +@@ -127,7 +136,7 @@ getParam(char *driver, char *param) + + static int findMaxBuf(int fd, int opt, int sotype) { + int a = 0; +- int b = MAXINT; ++ int b = INT_MAX; + int initial_guess; + int limit = -1; + +@@ -272,8 +281,16 @@ NET_GetFileDescriptorID(JNIEnv *env) return (*env)->GetFieldID(env, cls, "fd", "I"); } @@ -34,15 +46,15 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 0 #ifndef AF_INET6 return JNI_FALSE; #endif -@@ -355,6 +372,7 @@ jint IPv6_supported() - close(fd); +@@ -410,6 +427,7 @@ jint IPv6_supported() return JNI_TRUE; + #endif /* AF_INET6 */ } +#endif /* DONT_ENABLE_IPV6 */ - void - NET_AllocSockaddr(struct sockaddr **him, int *len) { -@@ -688,6 +706,10 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, + void ThrowUnknownHostExceptionWithGaiError(JNIEnv *env, + const char* hostname, +@@ -772,6 +790,10 @@ NET_InetAddressToSockaddr(JNIEnv *env, jobject iaObj, him6->sin6_family = AF_INET6; *len = sizeof(struct sockaddr_in6) ; @@ -53,7 +65,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 0 /* * On Linux if we are connecting to a link-local address * we need to specify the interface in the scope_id (2.4 kernel only) -@@ -1094,7 +1116,6 @@ NET_GetSockOpt(int fd, int level, int opt, void *resul +@@ -1178,7 +1200,6 @@ NET_GetSockOpt(int fd, int level, int opt, void *resul *len = socklen; } #endif @@ -61,7 +73,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 0 if (rv < 0) { return rv; } -@@ -1141,6 +1162,24 @@ NET_SetSockOpt(int fd, int level, int opt, const void +@@ -1224,6 +1245,24 @@ NET_SetSockOpt(int fd, int level, int opt, const void #define IPTOS_PREC_MASK 0xe0 #endif @@ -86,7 +98,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 0 /* * IPPROTO/IP_TOS :- * 1. IPv6 on Solaris: no-op and will be set in flowinfo -@@ -1173,6 +1212,10 @@ NET_SetSockOpt(int fd, int level, int opt, const void +@@ -1256,6 +1295,10 @@ NET_SetSockOpt(int fd, int level, int opt, const void *iptos &= (IPTOS_TOS_MASK | IPTOS_PREC_MASK); } @@ -95,19 +107,19 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 0 +#endif + /* - * SOL_SOCKET/{SO_SNDBUF,SO_RCVBUF} - On Solaris need to - * ensure that value is <= max_buf as otherwise we get -@@ -1181,7 +1224,8 @@ NET_SetSockOpt(int fd, int level, int opt, const void + * SOL_SOCKET/{SO_SNDBUF,SO_RCVBUF} - On Solaris we may need to clamp + * the value when it exceeds the system limit. +@@ -1263,7 +1306,8 @@ NET_SetSockOpt(int fd, int level, int opt, const void #ifdef __solaris__ if (level == SOL_SOCKET) { if (opt == SO_SNDBUF || opt == SO_RCVBUF) { -- int sotype, arglen; -+ int sotype; +- int sotype=0, arglen; ++ int sotype = 0; + socklen_t arglen; int *bufsize, maxbuf; + int ret; - if (!init_max_buf) { -@@ -1220,6 +1264,84 @@ NET_SetSockOpt(int fd, int level, int opt, const void +@@ -1329,6 +1373,84 @@ NET_SetSockOpt(int fd, int level, int opt, const void } #endif @@ -192,7 +204,7 @@ $OpenBSD: patch-jdk_src_solaris_native_java_net_net_util_md_c,v 1.3 2009/05/23 0 return setsockopt(fd, level, opt, arg, len); } -@@ -1270,7 +1392,8 @@ NET_Bind(int fd, struct sockaddr *him, int len) +@@ -1379,7 +1501,8 @@ NET_Bind(int fd, struct sockaddr *him, int len) * corresponding IPv4 port is in use. */ if (ipv6_available()) { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_nio_MappedByteBuffer_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_nio_MappedByteBuffer_c deleted file mode 100644 index d0c99c59d76..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_java_nio_MappedByteBuffer_c +++ /dev/null @@ -1,27 +0,0 @@ -$OpenBSD: patch-jdk_src_solaris_native_java_nio_MappedByteBuffer_c,v 1.2 2009/01/04 23:25:16 kurt Exp $ ---- jdk/src/solaris/native/java/nio/MappedByteBuffer.c.orig Thu Sep 11 03:44:53 2008 -+++ jdk/src/solaris/native/java/nio/MappedByteBuffer.c Fri Sep 12 17:45:12 2008 -@@ -38,7 +38,11 @@ Java_java_nio_MappedByteBuffer_isLoaded0(JNIEnv *env, - jlong address, jlong len) - { - jboolean loaded = JNI_TRUE; -+#if defined(_ALLBSD_SOURCE) -+ jint pageSize = getpagesize(); -+#else - jint pageSize = sysconf(_SC_PAGESIZE); -+#endif - jint numPages = (len + pageSize - 1) / pageSize; - int result = 0; - int i = 0; -@@ -96,7 +100,11 @@ JNIEXPORT void JNICALL - Java_java_nio_MappedByteBuffer_force0(JNIEnv *env, jobject obj, jlong address, - jlong len) - { -+#if defined(_ALLBSD_SOURCE) -+ jlong pageSize = getpagesize(); -+#else - jlong pageSize = sysconf(_SC_PAGESIZE); -+#endif - unsigned long lAddress = address; - - jlong offset = lAddress % pageSize; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_c index 2e9b7d0b79d..470f1fda176 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_c,v 1.4 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c.orig Thu Sep 17 03:52:32 2009 -+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Fri Oct 2 08:42:10 2009 +$OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_c,v 1.5 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c.orig Fri Aug 13 03:22:13 2010 ++++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.c Mon Oct 25 18:15:59 2010 @@ -40,6 +40,7 @@ #include #include @@ -115,7 +115,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_c,v 1.4 2009/10/0 #endif /* HEADLESS */ return point; } -@@ -1706,7 +1714,11 @@ X11GD_InitXrandrFuncs(JNIEnv *env) +@@ -1711,7 +1719,11 @@ X11GD_InitXrandrFuncs(JNIEnv *env) { int rr_maj_ver = 0, rr_min_ver = 0; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_h b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_h deleted file mode 100644 index 045b102b6ff..00000000000 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_h +++ /dev/null @@ -1,13 +0,0 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_GraphicsEnv_h,v 1.1 2010/05/11 10:33:57 naddy Exp $ ---- jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.h.orig Tue May 11 00:21:54 2010 -+++ jdk/src/solaris/native/sun/awt/awt_GraphicsEnv.h Tue May 11 00:22:18 2010 -@@ -41,7 +41,9 @@ - - #include - #include -+#include - #include -+#include - - extern int XShmQueryExtension(); - diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c index 9301a580b0a..5ecee2be225 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/native/sun/awt/awt_InputMethod.c.orig Thu Sep 17 03:52:32 2009 -+++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c Sat Sep 26 10:12:03 2009 -@@ -69,7 +69,7 @@ static void PreeditDrawCallback(XIC, XPointer, +$OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/awt/awt_InputMethod.c.orig Thu Oct 28 20:18:11 2010 ++++ jdk/src/solaris/native/sun/awt/awt_InputMethod.c Mon Nov 1 13:42:20 2010 +@@ -67,7 +67,7 @@ static void PreeditDrawCallback(XIC, XPointer, XIMPreeditDrawCallbackStruct *); static void PreeditCaretCallback(XIC, XPointer, XIMPreeditCaretCallbackStruct *); @@ -10,7 +10,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 static void StatusStartCallback(XIC, XPointer, XPointer); static void StatusDoneCallback(XIC, XPointer, XPointer); static void StatusDrawCallback(XIC, XPointer, -@@ -83,7 +83,7 @@ static void StatusDrawCallback(XIC, XPointer, +@@ -81,7 +81,7 @@ static void StatusDrawCallback(XIC, XPointer, #define PreeditDoneIndex 1 #define PreeditDrawIndex 2 #define PreeditCaretIndex 3 @@ -19,7 +19,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 #define StatusStartIndex 4 #define StatusDoneIndex 5 #define StatusDrawIndex 6 -@@ -101,14 +101,14 @@ static XIMProc callback_funcs[NCALLBACKS] = { +@@ -99,14 +99,14 @@ static XIMProc callback_funcs[NCALLBACKS] = { (XIMProc)PreeditDoneCallback, (XIMProc)PreeditDrawCallback, (XIMProc)PreeditCaretCallback, @@ -36,7 +36,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 #define MAX_STATUS_LEN 100 typedef struct { Window w; /*status window id */ -@@ -148,7 +148,7 @@ typedef struct _X11InputMethodData { +@@ -146,7 +146,7 @@ typedef struct _X11InputMethodData { #endif /* XAWT */ jobject x11inputmethod; /* global ref to X11InputMethod instance */ /* associated with the XIC */ @@ -45,7 +45,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 StatusWindow *statusWindow; /* our own status window */ #else #ifndef XAWT -@@ -427,7 +427,7 @@ destroyX11InputMethodData(JNIEnv *env, X11InputMethodD +@@ -425,7 +425,7 @@ destroyX11InputMethodData(JNIEnv *env, X11InputMethodD static void freeX11InputMethodData(JNIEnv *env, X11InputMethodData *pX11IMData) { @@ -54,7 +54,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 if (pX11IMData->statusWindow != NULL){ StatusWindow *sw = pX11IMData->statusWindow; XFreeGC(awt_display, sw->lightGC); -@@ -533,7 +533,7 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *even +@@ -531,7 +531,7 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *even pX11IMData = getX11InputMethodData(env, currentX11InputMethodInstance); if (pX11IMData == NULL) { @@ -63,7 +63,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 return False; #else return result; -@@ -541,7 +541,7 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *even +@@ -539,7 +539,7 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *even } if ((ic = pX11IMData->current_ic) == (XIC)0){ @@ -72,7 +72,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 return False; #else return result; -@@ -650,7 +650,7 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *even +@@ -648,7 +648,7 @@ awt_x11inputmethod_lookupString(XKeyPressedEvent *even return result; } @@ -81,7 +81,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 static StatusWindow *createStatusWindow( #ifdef XAWT Window parent) { -@@ -994,7 +994,7 @@ void adjustStatusWindow(Widget shell){ +@@ -993,7 +993,7 @@ void adjustStatusWindow(Widget shell){ } } } @@ -90,7 +90,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 /* * Creates two XICs, one for active clients and the other for passive * clients. All information on those XICs are stored in the -@@ -1051,7 +1051,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, +@@ -1050,7 +1050,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, return FALSE ; } @@ -99,7 +99,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 on_the_spot_styles |= XIMStatusNothing; /*kinput does not support XIMPreeditCallbacks and XIMStatusArea -@@ -1064,7 +1064,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, +@@ -1063,7 +1063,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, break; } } @@ -108,7 +108,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 #ifdef XAWT on_the_spot_styles |= XIMStatusNothing; #else /* !XAWT */ -@@ -1087,7 +1087,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, +@@ -1086,7 +1086,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, on_the_spot_styles |= XIMStatusNothing; #endif /* XAWT */ @@ -117,7 +117,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 for (i = 0; i < im_styles->count_styles; i++) { active_styles |= im_styles->supported_styles[i] & on_the_spot_styles; -@@ -1135,7 +1135,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, +@@ -1134,7 +1134,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, NULL); if (preedit == (XVaNestedList)NULL) goto err; @@ -126,7 +126,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 /*always try XIMStatusCallbacks for active client...*/ { status = (XVaNestedList)XVaCreateNestedList(0, -@@ -1157,7 +1157,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, +@@ -1156,7 +1156,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, XFree((void *)status); XFree((void *)preedit); } @@ -135,16 +135,16 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 #ifndef XAWT if (on_the_spot_styles & XIMStatusArea) { Widget parent; -@@ -1185,7 +1185,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, +@@ -1184,7 +1184,7 @@ createXIC(Widget w, X11InputMethodData *pX11IMData, } #endif /* XAWT */ XFree((void *)preedit); -#endif /* __linux__ */ +#endif /* __linux__ || _ALLBSD_SOURCE */ pX11IMData->ic_passive = XCreateIC(X11im, - XNClientWindow, XtWindow(w), - XNFocusWindow, XtWindow(w), -@@ -1344,7 +1344,7 @@ PreeditCaretCallback(XIC ic, XPointer client_data, + XNClientWindow, w, + XNFocusWindow, w, +@@ -1343,7 +1343,7 @@ PreeditCaretCallback(XIC ic, XPointer client_data, } @@ -153,7 +153,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 static void StatusStartCallback(XIC ic, XPointer client_data, XPointer call_data) { -@@ -1412,7 +1412,7 @@ StatusDrawCallback(XIC ic, XPointer client_data, +@@ -1411,7 +1411,7 @@ StatusDrawCallback(XIC ic, XPointer client_data, finally: AWT_UNLOCK(); } @@ -162,14 +162,14 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 static void CommitStringCallback(XIC ic, XPointer client_data, XPointer call_data) { JNIEnv *env = GetJNIEnv(); -@@ -1514,14 +1514,14 @@ Java_sun_awt_motif_MInputMethod_openXIMNative(JNIEnv * +@@ -1517,14 +1517,14 @@ Java_sun_awt_motif_MInputMethod_openXIMNative(JNIEnv * /* Use IMInstantiate call back only on Linux, as there is a bug in Solaris (4768335) */ -#ifdef __linux__ +#if defined(__linux__) || defined(_ALLBSD_SOURCE) registered = XRegisterIMInstantiateCallback(dpy, NULL, NULL, - NULL, (XIMProc)OpenXIMCallback, NULL); + NULL, (XIDProc)OpenXIMCallback, NULL); if (!registered) { /* directly call openXIM callback */ #endif @@ -179,7 +179,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 } #endif -@@ -1585,13 +1585,13 @@ Java_sun_awt_motif_MInputMethod_createXICNative(JNIEnv +@@ -1588,13 +1588,13 @@ Java_sun_awt_motif_MInputMethod_createXICNative(JNIEnv #endif /* XAWT */ globalRef = (*env)->NewGlobalRef(env, this); pX11IMData->x11inputmethod = globalRef; @@ -196,10 +196,10 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 pX11IMData->lookup_buf = 0; pX11IMData->lookup_buf_len = 0; -@@ -1738,14 +1738,14 @@ Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv +@@ -1741,14 +1741,14 @@ Java_sun_awt_X11_XInputMethod_setXICFocusNative(JNIEnv setXICFocus(pX11IMData->current_ic, req); currentX11InputMethodInstance = pX11IMData->x11inputmethod; - currentFocusWindow = XtWindow(w); + currentFocusWindow = w; -#ifdef __linux__ +#if defined(__linux__) || defined(_ALLBSD_SOURCE) if (active && pX11IMData->statusWindow && pX11IMData->statusWindow->on) @@ -213,7 +213,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 onoffStatusWindow(pX11IMData, 0, False); if (pX11IMData->current_ic != NULL) #endif -@@ -1762,7 +1762,7 @@ JNIEXPORT void JNICALL +@@ -1765,7 +1765,7 @@ JNIEXPORT void JNICALL Java_sun_awt_X11InputMethod_turnoffStatusWindow(JNIEnv *env, jobject this) { @@ -222,7 +222,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 X11InputMethodData *pX11IMData; StatusWindow *statusWindow; -@@ -1859,7 +1859,7 @@ Java_sun_awt_motif_MInputMethod_configureStatusAreaNat +@@ -1862,7 +1862,7 @@ Java_sun_awt_motif_MInputMethod_configureStatusAreaNat X11InputMethodData *pX11IMData; XVaNestedList status; @@ -231,7 +231,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_awt_InputMethod_c,v 1.2 2009/10/0 /*do nothing for linux? */ #else AWT_LOCK(); -@@ -1965,7 +1965,7 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11InputMethod +@@ -1968,7 +1968,7 @@ JNIEXPORT jboolean JNICALL Java_sun_awt_X11InputMethod JNIEXPORT void JNICALL Java_sun_awt_X11_XInputMethod_adjustStatusWindow (JNIEnv *env, jobject this, jlong window) { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_fontpath_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_fontpath_c index 3256fd859a4..e2ec021c71c 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_fontpath_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_fontpath_c @@ -1,8 +1,8 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.2 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/sun/awt/fontpath.c.orig Fri May 8 03:35:07 2009 -+++ jdk/src/solaris/native/sun/awt/fontpath.c Mon May 18 20:19:13 2009 +$OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/awt/fontpath.c.orig Thu Dec 16 17:15:17 2010 ++++ jdk/src/solaris/native/sun/awt/fontpath.c Tue Jan 4 18:25:21 2011 @@ -23,7 +23,7 @@ - * have any questions. + * questions. */ -#ifdef __linux__ @@ -97,7 +97,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.2 2009/05/23 03:03 NULL, /* terminates the list */ }; #endif -@@ -351,7 +382,7 @@ static char **getX11FontPath () +@@ -362,7 +393,7 @@ static char **getX11FontPath () #endif /* !HEADLESS */ @@ -106,7 +106,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.2 2009/05/23 03:03 /* from awt_LoadLibrary.c */ JNIEXPORT jboolean JNICALL AWTIsHeadless(); #endif -@@ -476,8 +507,10 @@ static char *getPlatformFontPathChars(JNIEnv *env, jbo +@@ -487,8 +518,10 @@ static char *getPlatformFontPathChars(JNIEnv *env, jbo */ fcdirs = getFontConfigLocations(); @@ -118,7 +118,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.2 2009/05/23 03:03 #else /* IF SOLARIS */ knowndirs = fullSolarisFontPath; #endif -@@ -488,7 +521,8 @@ static char *getPlatformFontPathChars(JNIEnv *env, jbo +@@ -499,7 +532,8 @@ static char *getPlatformFontPathChars(JNIEnv *env, jbo * be initialised. */ #ifndef HEADLESS @@ -128,7 +128,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.2 2009/05/23 03:03 if (!AWTIsHeadless()) { /* .. so need to call a function to check */ #endif AWT_LOCK(); -@@ -496,7 +530,7 @@ static char *getPlatformFontPathChars(JNIEnv *env, jbo +@@ -507,7 +541,7 @@ static char *getPlatformFontPathChars(JNIEnv *env, jbo x11dirs = getX11FontPath(); } AWT_UNLOCK(); @@ -137,7 +137,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.2 2009/05/23 03:03 } #endif #endif /* !HEADLESS */ -@@ -608,7 +642,7 @@ Java_sun_font_FontManager_populateFontFileNameMap +@@ -605,7 +639,7 @@ JNIEXPORT void JNICALL Java_sun_font_X11FontManager_se } #include @@ -146,7 +146,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_fontpath_c,v 1.2 2009/05/23 03:03 #include #endif -@@ -654,9 +688,9 @@ static void* openFontConfig() { +@@ -651,9 +685,9 @@ static void* openFontConfig() { * certain symbols - and functionality - to be available. * Also add explicit search for .so.1 in case .so symlink doesn't exist. */ diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_gtk2_interface_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_gtk2_interface_c index b81b9593063..4b02256ab7c 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_gtk2_interface_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_awt_gtk2_interface_c @@ -1,19 +1,22 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_awt_gtk2_interface_c,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/native/sun/awt/gtk2_interface.c.orig Thu Sep 17 03:52:32 2009 -+++ jdk/src/solaris/native/sun/awt/gtk2_interface.c Fri Oct 2 08:45:07 2009 -@@ -30,8 +30,10 @@ +$OpenBSD: patch-jdk_src_solaris_native_sun_awt_gtk2_interface_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/awt/gtk2_interface.c.orig Thu Oct 28 20:18:11 2010 ++++ jdk/src/solaris/native/sun/awt/gtk2_interface.c Mon Nov 1 13:16:35 2010 +@@ -30,9 +30,12 @@ #include #include "gtk2_interface.h" #include "java_awt_Transparency.h" +#include "jvm_md.h" -#define GTK2_LIB "libgtk-x11-2.0.so.0" +-#define GTHREAD_LIB "libgthread-2.0.so.0" +#define GTK2_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gtk-x11-2.0", "0") +#define GTK2_LIB JNI_LIB_NAME("gtk-x11-2.0") ++#define GTHREAD_LIB_VERSIONED VERSIONED_JNI_LIB_NAME("gthread-2.0", "0") ++#define GTHREAD_LIB JNI_LIB_NAME("gthread-2.0") #define G_TYPE_INVALID G_TYPE_MAKE_FUNDAMENTAL (0) #define G_TYPE_NONE G_TYPE_MAKE_FUNDAMENTAL (1) -@@ -397,9 +399,12 @@ gboolean gtk2_check_version() +@@ -414,9 +417,12 @@ gboolean gtk2_check_version() void *lib = NULL; gboolean result = FALSE; @@ -28,18 +31,26 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_awt_gtk2_interface_c,v 1.2 2009/10/07 } fp_gtk_check_version = dlsym(lib, "gtk_check_version"); -@@ -422,9 +427,12 @@ gboolean gtk2_load() +@@ -468,11 +474,19 @@ gboolean gtk2_load() int (*io_handler)(); char *gtk_modules_env; - gtk2_libhandle = dlopen(GTK2_LIB, RTLD_LAZY | RTLD_LOCAL); -- if (gtk2_libhandle == NULL) -- return FALSE; +- gthread_libhandle = dlopen(GTHREAD_LIB, RTLD_LAZY | RTLD_LOCAL); + gtk2_libhandle = dlopen(GTK2_LIB_VERSIONED, RTLD_LAZY | RTLD_LOCAL); + if (gtk2_libhandle == NULL) { + gtk2_libhandle = dlopen(GTK2_LIB, RTLD_LAZY | RTLD_LOCAL); + if (gtk2_libhandle == NULL) + return FALSE; ++ } + +- if (gtk2_libhandle == NULL || gthread_libhandle == NULL) +- return FALSE; ++ gthread_libhandle = dlopen(GTHREAD_LIB_VERSIONED, RTLD_LAZY | RTLD_LOCAL); ++ if (gthread_libhandle == NULL) { ++ gthread_libhandle = dlopen(GTHREAD_LIB, RTLD_LAZY | RTLD_LOCAL); ++ if (gthread_libhandle == NULL) ++ return FALSE; + } if (setjmp(j) == 0) diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c index 4a837895218..cd4da7c5d19 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c,v 1.1 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c.orig Mon May 18 20:24:57 2009 -+++ jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c Mon May 18 20:25:10 2009 +$OpenBSD: patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c.orig Fri Aug 13 03:22:14 2010 ++++ jdk/src/solaris/native/sun/java2d/x11/X11SurfaceData.c Mon Oct 25 18:15:59 2010 @@ -32,6 +32,7 @@ #include "gdefs.h" @@ -9,12 +9,12 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_java2d_x11_X11SurfaceData_c,v 1.1 200 #include "awt_Component.h" #include "awt_GraphicsEnv.h" -@@ -128,7 +129,7 @@ Java_sun_java2d_x11_X11SurfaceData_initIDs(JNIEnv *env +@@ -163,7 +164,7 @@ Java_sun_java2d_x11_X11SurfaceData_initIDs(JNIEnv *env if (tryDGA && (getenv("NO_J2D_DGA") == NULL)) { /* we use RTLD_NOW because of bug 4032715 */ - lib = dlopen("libsunwjdga.so", RTLD_NOW); + lib = dlopen(JNI_LIB_NAME("sunwjdga"), RTLD_NOW); } - dgaAvailable = JNI_FALSE; + if (lib != NULL) { diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_net_spi_DefaultProxySelector_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_net_spi_DefaultProxySelector_c index cfcda5c61d9..0aef20e942c 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_net_spi_DefaultProxySelector_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_net_spi_DefaultProxySelector_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_net_spi_DefaultProxySelector_c,v 1.2 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c.orig Fri May 8 03:35:08 2009 -+++ jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c Mon May 18 20:26:12 2009 +$OpenBSD: patch-jdk_src_solaris_native_sun_net_spi_DefaultProxySelector_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c.orig Fri Aug 13 03:22:14 2010 ++++ jdk/src/solaris/native/sun/net/spi/DefaultProxySelector.c Mon Oct 25 18:15:59 2010 @@ -26,11 +26,12 @@ #include "jni.h" #include "jni_util.h" @@ -15,7 +15,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_net_spi_DefaultProxySelector_c,v 1.2 #include #else #include -@@ -109,8 +110,9 @@ Java_sun_net_spi_DefaultProxySelector_init(JNIEnv *env +@@ -110,8 +111,9 @@ Java_sun_net_spi_DefaultProxySelector_init(JNIEnv *env /** * Let's try to load le GConf-2 library */ diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_DatagramDispatcher_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_DatagramDispatcher_c new file mode 100644 index 00000000000..c59d2ffa983 --- /dev/null +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_DatagramDispatcher_c @@ -0,0 +1,21 @@ +$OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_DatagramDispatcher_c,v 1.1 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c.orig Tue Oct 26 11:06:11 2010 ++++ jdk/src/solaris/native/sun/nio/ch/DatagramDispatcher.c Tue Oct 26 11:06:17 2010 +@@ -73,7 +73,7 @@ Java_sun_nio_ch_DatagramDispatcher_readv0(JNIEnv *env, + m.msg_accrightslen = 0; + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + m.msg_control = NULL; + m.msg_controllen = 0; + #endif +@@ -121,7 +121,7 @@ Java_sun_nio_ch_DatagramDispatcher_writev0(JNIEnv *env + m.msg_accrightslen = 0; + #endif + +-#ifdef __linux__ ++#if defined(__linux__) || defined(_ALLBSD_SOURCE) + m.msg_control = NULL; + m.msg_controllen = 0; + #endif diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c index 9f3cde3585b..84ab55b88b2 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c,v 1.3 2009/05/23 03:03:25 kurt Exp $ ---- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c.orig Fri May 8 03:35:08 2009 -+++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c Mon May 18 20:26:57 2009 +$OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c,v 1.4 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c.orig Fri Aug 13 03:22:14 2010 ++++ jdk/src/solaris/native/sun/nio/ch/FileChannelImpl.c Tue Oct 26 11:06:42 2010 @@ -26,15 +26,21 @@ #include "jni.h" #include "jni_util.h" @@ -23,18 +23,34 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c,v 1.3 2009/0 static jfieldID chan_fd; /* jobject 'fd' in sun.io.FileChannelImpl */ #ifdef __solaris__ -@@ -59,6 +65,10 @@ sendfile_func* my_sendfile_func = NULL; +@@ -59,8 +65,26 @@ sendfile_func* my_sendfile_func = NULL; typedef ssize_t sendfile64_func(int out_fd, int in_fd, off64_t *offset, size_t count); sendfile64_func* my_sendfile64_func = NULL; +#elif defined(_ALLBSD_SOURCE) ++#include +#include ++#include +#include +#include ++ ++#ifdef __APPLE__ ++typedef int sendfile_func(int fd, int s, off_t offset, off_t *len, ++ struct sf_hdtr *hdtr, int flags); ++#elif defined(__FreeBSD__) ++typedef int sendfile_func(int fd, int s, off_t offset, size_t nbytes, ++ struct sf_hdtr *hdtr, off_t *sbytes, int flags); #endif ++#if defined(__APPLE__) || defined(__FreeBSD__) ++sendfile_func* my_sendfile_func = NULL; ++#endif ++#endif ++ JNIEXPORT jlong JNICALL -@@ -68,7 +78,8 @@ Java_sun_nio_ch_FileChannelImpl_initIDs(JNIEnv *env, j + Java_sun_nio_ch_FileChannelImpl_initIDs(JNIEnv *env, jclass clazz) + { +@@ -68,7 +92,8 @@ Java_sun_nio_ch_FileChannelImpl_initIDs(JNIEnv *env, j chan_fd = (*env)->GetFieldID(env, clazz, "fd", "Ljava/io/FileDescriptor;"); #ifdef __solaris__ @@ -44,61 +60,62 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_FileChannelImpl_c,v 1.3 2009/0 my_sendfile_func = (sendfile_func*) dlsym(RTLD_DEFAULT, "sendfilev64"); } #endif -@@ -242,5 +253,57 @@ Java_sun_nio_ch_FileChannelImpl_transferTo0(JNIEnv *en +@@ -77,6 +102,10 @@ Java_sun_nio_ch_FileChannelImpl_initIDs(JNIEnv *env, j + my_sendfile64_func = (sendfile64_func*) dlsym(RTLD_DEFAULT, "sendfile64"); + #endif + ++#if defined(__APPLE__) || defined(__FreeBSD__) ++ my_sendfile_func = (sendfile_func*) dlsym(RTLD_DEFAULT, "sendfile"); ++#endif ++ + return pageSize; + } + +@@ -242,5 +271,47 @@ Java_sun_nio_ch_FileChannelImpl_transferTo0(JNIEnv *en } return result; } +#endif + +#ifdef _ALLBSD_SOURCE -+ /* -+ * XXXBSD: make sure that we're returning what java class may understand -+ * -+ * XXXBSD: I'd prefer to have it implemented with sendfile(), but since -+ * FreeBSD's sendfile() is only supposed to be used in file->socket -+ * schema we need to provide some kind of fall-back operation, if -+ * sendfile() failed with ENOTSOCK error only. -+ */ -+ void *buf; -+ off_t offset = (off_t)position; -+ int r, w = 0; ++#if defined(__APPLE__) || defined(__FreeBSD__) ++ if (my_sendfile_func == NULL) ++ return IOS_UNSUPPORTED; + -+ buf = malloc(4096); -+ if (buf == NULL) { -+ JNU_ThrowOutOfMemoryError(env, "heap allocation failed"); ++ off_t numBytes; ++ int result; ++ ++ numBytes = count; ++ ++#ifdef __APPLE__ ++ result = (*my_sendfile_func)(srcFD, dstFD, position, ++ &numBytes, NULL, 0); ++#elif defined(__FreeBSD__) ++ result = (*my_sendfile_func)(srcFD, dstFD, position, ++ count, NULL, &numBytes, 0); ++#else ++ Add an #elif for your BSD flavor ++#endif ++ ++ if (numBytes > 0) ++ return numBytes; ++ ++ if (result == -1) { ++ if (errno == EAGAIN) ++ return IOS_UNAVAILABLE; ++ if (errno == EOPNOTSUPP || errno == ENOTSOCK || errno == ENOTCONN) ++ return IOS_UNSUPPORTED_CASE; ++ if ((errno == EINVAL) && ((ssize_t)count >= 0)) ++ return IOS_UNSUPPORTED_CASE; ++ if (errno == EINTR) ++ return IOS_INTERRUPTED; ++ JNU_ThrowIOExceptionWithLastError(env, "Transfer failed"); + return IOS_THROWN; + } + -+ while ((r = pread(srcFD, buf, 4096, offset)) > 0) { -+ w = write(dstFD, buf, r); -+ if (w == -1) -+ break; -+ offset += w; -+ } -+ free(buf); -+ -+ /* -+ * Similar to solaris if we've transferred any data return -+ * the number of bytes and ignore any error -+ */ -+ if (offset - (off_t)position > 0) -+ return (offset - (off_t)position); -+ -+ /* -+ * Deal with NBIO EAGAIN & EINTR the same as solaris. -+ */ -+ if (r == -1 || w == -1) { -+ switch (errno) { -+ case EAGAIN: -+ return IOS_UNAVAILABLE; -+ case EINTR: -+ return IOS_INTERRUPTED; -+ default: -+ JNU_ThrowIOExceptionWithLastError(env, "Transfer failed"); -+ return IOS_THROWN; -+ } -+ } -+ -+ return (0); ++ return result; ++#else ++ return IOS_UNSUPPORTED; ++#endif #endif } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_Net_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_Net_c index daa451e5ba2..40e2078a492 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_Net_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_Net_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.2 2009/01/04 23:25:16 kurt Exp $ ---- jdk/src/solaris/native/sun/nio/ch/Net.c.orig Thu Oct 23 03:44:46 2008 -+++ jdk/src/solaris/native/sun/nio/ch/Net.c Tue Dec 23 01:01:02 2008 +$OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/nio/ch/Net.c.orig Thu Oct 28 20:18:11 2010 ++++ jdk/src/solaris/native/sun/nio/ch/Net.c Mon Nov 1 13:16:36 2010 @@ -116,7 +116,48 @@ struct my_group_source_req { #endif /* __linux__ */ @@ -50,7 +50,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.2 2009/01/04 23:25:1 #define COPY_INET6_ADDRESS(env, source, target) \ (*env)->GetByteArrayRegion(env, source, 0, 16, target) -@@ -250,8 +291,30 @@ Java_sun_nio_ch_Net_localPort(JNIEnv *env, jclass claz +@@ -271,8 +312,30 @@ Java_sun_nio_ch_Net_localPort(JNIEnv *env, jclass claz SOCKADDR sa; socklen_t sa_len = SOCKADDR_LEN; if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) { @@ -81,7 +81,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.2 2009/01/04 23:25:1 } return NET_GetPortFromSockaddr((struct sockaddr *)&sa); } -@@ -263,8 +326,30 @@ Java_sun_nio_ch_Net_localInetAddress(JNIEnv *env, jcla +@@ -284,8 +347,30 @@ Java_sun_nio_ch_Net_localInetAddress(JNIEnv *env, jcla socklen_t sa_len = SOCKADDR_LEN; int port; if (getsockname(fdval(env, fdo), (struct sockaddr *)&sa, &sa_len) < 0) { @@ -112,17 +112,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.2 2009/01/04 23:25:1 } return NET_SockaddrToInetAddress(env, (struct sockaddr *)&sa, &port); } -@@ -277,7 +362,8 @@ Java_sun_nio_ch_Net_getIntOption0(JNIEnv *env, jclass - struct linger linger; - u_char carg; - void *arg; -- int arglen, n; -+ socklen_t arglen; -+ int n; - - /* Option value is an int except for a few specific cases */ - -@@ -327,7 +413,8 @@ Java_sun_nio_ch_Net_setIntOption0(JNIEnv *env, jclass +@@ -349,7 +434,8 @@ Java_sun_nio_ch_Net_setIntOption0(JNIEnv *env, jclass struct linger linger; u_char carg; void *parg; @@ -132,7 +122,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.2 2009/01/04 23:25:1 /* Option value is an int except for a few specific cases */ -@@ -480,7 +567,7 @@ JNIEXPORT void JNICALL +@@ -512,7 +598,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_Net_setInterface4(JNIEnv* env, jobject this, jobject fdo, jint interf) { struct in_addr in; @@ -141,16 +131,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.2 2009/01/04 23:25:1 int n; in.s_addr = htonl(interf); -@@ -496,7 +583,7 @@ JNIEXPORT jint JNICALL - Java_sun_nio_ch_Net_getInterface4(JNIEnv* env, jobject this, jobject fdo) - { - struct in_addr in; -- int arglen = sizeof(struct in_addr); -+ socklen_t arglen = sizeof(struct in_addr); - int n; - - n = getsockopt(fdval(env, fdo), IPPROTO_IP, IP_MULTICAST_IF, (void*)&in, &arglen); -@@ -511,7 +598,7 @@ JNIEXPORT void JNICALL +@@ -543,7 +629,7 @@ JNIEXPORT void JNICALL Java_sun_nio_ch_Net_setInterface6(JNIEnv* env, jobject this, jobject fdo, jint index) { int value = (jint)index; @@ -159,16 +140,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_Net_c,v 1.2 2009/01/04 23:25:1 int n; n = setsockopt(fdval(env, fdo), IPPROTO_IPV6, IPV6_MULTICAST_IF, -@@ -525,7 +612,7 @@ JNIEXPORT jint JNICALL - Java_sun_nio_ch_Net_getInterface6(JNIEnv* env, jobject this, jobject fdo) - { - int index; -- int arglen = sizeof(index); -+ socklen_t arglen = sizeof(index); - int n; - - n = getsockopt(fdval(env, fdo), IPPROTO_IPV6, IPV6_MULTICAST_IF, (void*)&index, &arglen); -@@ -554,9 +641,11 @@ handleSocketError(JNIEnv *env, jint errorValue) +@@ -586,9 +672,11 @@ handleSocketError(JNIEnv *env, jint errorValue) switch (errorValue) { case EINPROGRESS: /* Non-blocking connect */ return 0; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_SctpNet_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_SctpNet_c index 34a8e4babf7..f77087b7a83 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_SctpNet_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_ch_SctpNet_c @@ -1,7 +1,7 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_SctpNet_c,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/native/sun/nio/ch/SctpNet.c.orig Thu Sep 17 03:52:33 2009 -+++ jdk/src/solaris/native/sun/nio/ch/SctpNet.c Sat Sep 26 10:12:04 2009 -@@ -55,6 +55,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad +$OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_SctpNet_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/nio/ch/SctpNet.c.orig Fri Aug 13 03:22:14 2010 ++++ jdk/src/solaris/native/sun/nio/ch/SctpNet.c Mon Oct 25 18:15:59 2010 +@@ -58,6 +58,7 @@ static int preCloseFD = -1; /* File descriptor to */ jboolean loadSocketExtensionFuncs (JNIEnv* env) { @@ -9,7 +9,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_nio_ch_SctpNet_c,v 1.2 2009/10/07 01: if (dlopen(nativeSctpLib, RTLD_GLOBAL | RTLD_LAZY) == NULL) { JNU_ThrowByName(env, "java/lang/UnsupportedOperationException", dlerror()); -@@ -102,6 +103,7 @@ jboolean loadSocketExtensionFuncs +@@ -105,6 +106,7 @@ jboolean loadSocketExtensionFuncs dlerror()); return JNI_FALSE; } diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_fs_BsdNativeDispatcher_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_fs_BsdNativeDispatcher_c index 9a3bf509663..5ea01eeeee4 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_fs_BsdNativeDispatcher_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_nio_fs_BsdNativeDispatcher_c @@ -1,13 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_nio_fs_BsdNativeDispatcher_c,v 1.1 2009/06/10 19:01:09 kurt Exp $ ---- jdk/src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c.orig Tue Jun 2 13:44:48 2009 -+++ jdk/src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c Wed Jun 3 16:14:03 2009 -@@ -1,5 +1,5 @@ - /* -- * Copyright 2008-2009 Sun Microsystems, Inc. All Rights Reserved. -+ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This code is free software; you can redistribute it and/or modify it +$OpenBSD: patch-jdk_src_solaris_native_sun_nio_fs_BsdNativeDispatcher_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c.orig Mon Oct 25 18:02:19 2010 ++++ jdk/src/solaris/native/sun/nio/fs/BsdNativeDispatcher.c Mon Oct 25 18:15:59 2010 @@ -28,23 +28,35 @@ #include "jvm.h" #include "jlong.h" diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_XWindow_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_XWindow_c index 3d057e858ff..47e3113570c 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_XWindow_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_XWindow_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_xawt_XWindow_c,v 1.1 2008/03/19 18:05:46 kurt Exp $ ---- jdk/src/solaris/native/sun/xawt/XWindow.c.orig Tue Dec 4 04:05:49 2007 -+++ jdk/src/solaris/native/sun/xawt/XWindow.c Thu Feb 14 18:04:39 2008 +$OpenBSD: patch-jdk_src_solaris_native_sun_xawt_XWindow_c,v 1.2 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/xawt/XWindow.c.orig Thu Dec 16 17:15:26 2010 ++++ jdk/src/solaris/native/sun/xawt/XWindow.c Tue Jan 4 18:25:22 2011 @@ -228,10 +228,10 @@ KeymapEntry keymapTable[] = {java_awt_event_KeyEvent_VK_DOWN, XK_Down, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, @@ -16,7 +16,7 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_xawt_XWindow_c,v 1.1 2008/03/19 18:05 /* Other vendor-specific Triangular Navigation Block */ {java_awt_event_KeyEvent_VK_LEFT, osfXK_Left, FALSE, java_awt_event_KeyEvent_KEY_LOCATION_STANDARD}, -@@ -865,7 +865,7 @@ handleKeyEventWithNumLockMask(XEvent *event, KeySym *k +@@ -867,7 +867,7 @@ handleKeyEventWithNumLockMask(XEvent *event, KeySym *k { KeySym originalKeysym = *keysym; diff --git a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c index 1559e7bca46..0279d45dfc4 100644 --- a/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c +++ b/devel/jdk/1.7/patches/patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c @@ -1,6 +1,6 @@ -$OpenBSD: patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- jdk/src/solaris/native/sun/xawt/awt_Desktop.c.orig Thu Sep 17 03:52:33 2009 -+++ jdk/src/solaris/native/sun/xawt/awt_Desktop.c Fri Oct 2 08:47:21 2009 +$OpenBSD: patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- jdk/src/solaris/native/sun/xawt/awt_Desktop.c.orig Thu Oct 28 20:18:11 2010 ++++ jdk/src/solaris/native/sun/xawt/awt_Desktop.c Mon Nov 1 13:16:37 2010 @@ -24,6 +24,7 @@ */ @@ -9,8 +9,8 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c,v 1.2 2009/10/07 0 #include typedef int gboolean; -@@ -36,12 +37,15 @@ int init(){ - gboolean (*gnome_vfs_init) (void); +@@ -39,12 +40,15 @@ int init(){ + void *gnome_handle; const char *errmsg; - vfs_handle = dlopen("libgnomevfs-2.so.0", RTLD_LAZY); @@ -27,8 +27,8 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c,v 1.2 2009/10/07 0 + } } dlerror(); /* Clear errors */ - gnome_vfs_init = dlsym(vfs_handle, "gnome_vfs_init"); -@@ -54,12 +58,15 @@ int init(){ + gnome_vfs_init = (GNOME_VFS_INIT_TYPE*)dlsym(vfs_handle, "gnome_vfs_init"); +@@ -57,12 +61,15 @@ int init(){ // call gonme_vfs_init() (*gnome_vfs_init)(); @@ -46,4 +46,4 @@ $OpenBSD: patch-jdk_src_solaris_native_sun_xawt_awt_Desktop_c,v 1.2 2009/10/07 0 + } } dlerror(); /* Clear errors */ - gnome_url_show = dlsym(gnome_handle, "gnome_url_show"); + gnome_url_show = (GNOME_URL_SHOW_TYPE*)dlsym(gnome_handle, "gnome_url_show"); diff --git a/devel/jdk/1.7/patches/patch-langtools_make_build_xml b/devel/jdk/1.7/patches/patch-langtools_make_build_xml index 53decd5964c..955effddbac 100644 --- a/devel/jdk/1.7/patches/patch-langtools_make_build_xml +++ b/devel/jdk/1.7/patches/patch-langtools_make_build_xml @@ -1,7 +1,7 @@ -$OpenBSD: patch-langtools_make_build_xml,v 1.2 2009/10/07 01:53:54 kurt Exp $ ---- langtools/make/build.xml.orig Thu Sep 17 03:53:28 2009 -+++ langtools/make/build.xml Sat Sep 26 10:12:04 2009 -@@ -105,7 +105,8 @@ +$OpenBSD: patch-langtools_make_build_xml,v 1.3 2011/01/11 15:47:50 kurt Exp $ +--- langtools/make/build.xml.orig Thu Oct 28 20:18:24 2010 ++++ langtools/make/build.xml Mon Nov 1 13:16:37 2010 +@@ -235,7 +235,8 @@ @@ -10,10 +10,10 @@ $OpenBSD: patch-langtools_make_build_xml,v 1.2 2009/10/07 01:53:54 kurt Exp $ + excludes="**/*.orig"/> - -@@ -550,6 +551,7 @@ - - + + + diff --git a/devel/jdk/1.7/patches/patch-langtools_src_share_classes_com_sun_tools_javah_Util_java b/devel/jdk/1.7/patches/patch-langtools_src_share_classes_com_sun_tools_javah_Util_java deleted file mode 100644 index 17240993703..00000000000 --- a/devel/jdk/1.7/patches/patch-langtools_src_share_classes_com_sun_tools_javah_Util_java +++ /dev/null @@ -1,18 +0,0 @@ -$OpenBSD: patch-langtools_src_share_classes_com_sun_tools_javah_Util_java,v 1.2 2009/05/23 03:03:25 kurt Exp $ ---- langtools/src/share/classes/com/sun/tools/javah/Util.java.orig Fri May 8 03:36:01 2009 -+++ langtools/src/share/classes/com/sun/tools/javah/Util.java Fri May 15 16:25:49 2009 -@@ -180,6 +180,14 @@ public class Util { - os = "win32"; - } else if (os.indexOf("Linux") >= 0) { - os = "Linux"; -+ } else if (os.indexOf("FreeBSD") >= 0) { -+ os = "FreeBSD"; -+ } else if (os.indexOf("Darwin") >= 0) { -+ os = "Darwin"; -+ } else if (os.indexOf("NetBSD") >= 0) { -+ os = "NetBSD"; -+ } else if (os.indexOf("OpenBSD") >= 0) { -+ os = "OpenBSD"; - } - String arch = System.getProperty("os.arch"); - String resname = "com.sun.tools.javah.resources." + os + "_" + arch; diff --git a/devel/jdk/1.7/pkg/PLIST-jre b/devel/jdk/1.7/pkg/PLIST-jre index 17be7cb6ede..a4717ed91d2 100644 --- a/devel/jdk/1.7/pkg/PLIST-jre +++ b/devel/jdk/1.7/pkg/PLIST-jre @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST-jre,v 1.6 2009/10/07 01:53:54 kurt Exp $ +@comment $OpenBSD: PLIST-jre,v 1.7 2011/01/11 15:47:50 kurt Exp $ @option no-default-conflict @conflict jre->=1.7,<1.8 ${JREHOME}/ @@ -17,6 +17,28 @@ ${JREHOME}/bin/ @bin ${JREHOME}/bin/tnameserv @bin ${JREHOME}/bin/unpack200 ${JREHOME}/lib/ +${JREHOME}/lib/applet/ +${JREHOME}/lib/calendars.properties +${JREHOME}/lib/charsets.jar +${JREHOME}/lib/classlist +${JREHOME}/lib/cmm/ +${JREHOME}/lib/cmm/CIEXYZ.pf +${JREHOME}/lib/cmm/GRAY.pf +${JREHOME}/lib/cmm/LINEAR_RGB.pf +${JREHOME}/lib/cmm/PYCC.pf +${JREHOME}/lib/cmm/sRGB.pf +${JREHOME}/lib/content-types.properties +${JREHOME}/lib/currency.data +${JREHOME}/lib/ext/ +${JREHOME}/lib/ext/dnsns.jar +${JREHOME}/lib/ext/localedata.jar +${JREHOME}/lib/ext/meta-index +${JREHOME}/lib/ext/sunec.jar +${JREHOME}/lib/ext/sunjce_provider.jar +${JREHOME}/lib/ext/sunpkcs11.jar +${JREHOME}/lib/flavormap.properties +${JREHOME}/lib/fontconfig.bfc +${JREHOME}/lib/fontconfig.properties.src ${JREHOME}/lib/${MACHINE_ARCH}/ ${JREHOME}/lib/${MACHINE_ARCH}/headless/ ${JREHOME}/lib/${MACHINE_ARCH}/headless/libmawt.so @@ -49,7 +71,7 @@ ${JREHOME}/lib/${MACHINE_ARCH}/libnio.so ${JREHOME}/lib/${MACHINE_ARCH}/libnpt.so ${JREHOME}/lib/${MACHINE_ARCH}/librmi.so ${JREHOME}/lib/${MACHINE_ARCH}/libsplashscreen.so -${JREHOME}/lib/${MACHINE_ARCH}/libsunecc.so +${JREHOME}/lib/${MACHINE_ARCH}/libsunec.so ${JREHOME}/lib/${MACHINE_ARCH}/libunpack.so ${JREHOME}/lib/${MACHINE_ARCH}/libverify.so ${JREHOME}/lib/${MACHINE_ARCH}/libzip.so @@ -61,31 +83,6 @@ ${JREHOME}/lib/${MACHINE_ARCH}/server/libjsig.so ${JREHOME}/lib/${MACHINE_ARCH}/server/libjvm.so ${JREHOME}/lib/${MACHINE_ARCH}/xawt/ ${JREHOME}/lib/${MACHINE_ARCH}/xawt/libmawt.so -${JREHOME}/lib/applet/ -${JREHOME}/lib/calendars.properties -${JREHOME}/lib/charsets.jar -${JREHOME}/lib/classlist -${JREHOME}/lib/cmm/ -${JREHOME}/lib/cmm/CIEXYZ.pf -${JREHOME}/lib/cmm/GRAY.pf -${JREHOME}/lib/cmm/LINEAR_RGB.pf -${JREHOME}/lib/cmm/PYCC.pf -${JREHOME}/lib/cmm/sRGB.pf -${JREHOME}/lib/content-types.properties -${JREHOME}/lib/currency.data -${JREHOME}/lib/ext/ -${JREHOME}/lib/ext/dnsns.jar -${JREHOME}/lib/ext/localedata.jar -${JREHOME}/lib/ext/meta-index -${JREHOME}/lib/ext/sunec.jar -${JREHOME}/lib/ext/sunjce_provider.jar -${JREHOME}/lib/ext/sunpkcs11.jar -${JREHOME}/lib/flavormap.properties -${JREHOME}/lib/fontconfig.bfc -${JREHOME}/lib/fontconfig.properties.src -${JREHOME}/lib/im/ -${JREHOME}/lib/im/indicim.jar -${JREHOME}/lib/im/thaiim.jar ${JREHOME}/lib/images/ ${JREHOME}/lib/images/cursors/ ${JREHOME}/lib/images/cursors/cursors.properties @@ -197,6 +194,7 @@ ${JREHOME}/lib/zi/America/Aruba ${JREHOME}/lib/zi/America/Asuncion ${JREHOME}/lib/zi/America/Atikokan ${JREHOME}/lib/zi/America/Bahia +${JREHOME}/lib/zi/America/Bahia_Banderas ${JREHOME}/lib/zi/America/Barbados ${JREHOME}/lib/zi/America/Belem ${JREHOME}/lib/zi/America/Belize @@ -260,6 +258,7 @@ ${JREHOME}/lib/zi/America/Maceio ${JREHOME}/lib/zi/America/Managua ${JREHOME}/lib/zi/America/Manaus ${JREHOME}/lib/zi/America/Martinique +${JREHOME}/lib/zi/America/Matamoros ${JREHOME}/lib/zi/America/Mazatlan ${JREHOME}/lib/zi/America/Menominee ${JREHOME}/lib/zi/America/Merida @@ -278,6 +277,7 @@ ${JREHOME}/lib/zi/America/Noronha ${JREHOME}/lib/zi/America/North_Dakota/ ${JREHOME}/lib/zi/America/North_Dakota/Center ${JREHOME}/lib/zi/America/North_Dakota/New_Salem +${JREHOME}/lib/zi/America/Ojinaga ${JREHOME}/lib/zi/America/Panama ${JREHOME}/lib/zi/America/Pangnirtung ${JREHOME}/lib/zi/America/Paramaribo @@ -292,6 +292,7 @@ ${JREHOME}/lib/zi/America/Recife ${JREHOME}/lib/zi/America/Regina ${JREHOME}/lib/zi/America/Resolute ${JREHOME}/lib/zi/America/Rio_Branco +${JREHOME}/lib/zi/America/Santa_Isabel ${JREHOME}/lib/zi/America/Santarem ${JREHOME}/lib/zi/America/Santiago ${JREHOME}/lib/zi/America/Santo_Domingo @@ -318,6 +319,7 @@ ${JREHOME}/lib/zi/Antarctica/ ${JREHOME}/lib/zi/Antarctica/Casey ${JREHOME}/lib/zi/Antarctica/Davis ${JREHOME}/lib/zi/Antarctica/DumontDUrville +${JREHOME}/lib/zi/Antarctica/Macquarie ${JREHOME}/lib/zi/Antarctica/Mawson ${JREHOME}/lib/zi/Antarctica/McMurdo ${JREHOME}/lib/zi/Antarctica/Palmer @@ -372,6 +374,7 @@ ${JREHOME}/lib/zi/Asia/Makassar ${JREHOME}/lib/zi/Asia/Manila ${JREHOME}/lib/zi/Asia/Muscat ${JREHOME}/lib/zi/Asia/Nicosia +${JREHOME}/lib/zi/Asia/Novokuznetsk ${JREHOME}/lib/zi/Asia/Novosibirsk ${JREHOME}/lib/zi/Asia/Omsk ${JREHOME}/lib/zi/Asia/Oral @@ -528,6 +531,7 @@ ${JREHOME}/lib/zi/Pacific/ ${JREHOME}/lib/zi/Pacific/Apia ${JREHOME}/lib/zi/Pacific/Auckland ${JREHOME}/lib/zi/Pacific/Chatham +${JREHOME}/lib/zi/Pacific/Chuuk ${JREHOME}/lib/zi/Pacific/Easter ${JREHOME}/lib/zi/Pacific/Efate ${JREHOME}/lib/zi/Pacific/Enderbury @@ -553,14 +557,13 @@ ${JREHOME}/lib/zi/Pacific/Noumea ${JREHOME}/lib/zi/Pacific/Pago_Pago ${JREHOME}/lib/zi/Pacific/Palau ${JREHOME}/lib/zi/Pacific/Pitcairn -${JREHOME}/lib/zi/Pacific/Ponape +${JREHOME}/lib/zi/Pacific/Pohnpei ${JREHOME}/lib/zi/Pacific/Port_Moresby ${JREHOME}/lib/zi/Pacific/Rarotonga ${JREHOME}/lib/zi/Pacific/Saipan ${JREHOME}/lib/zi/Pacific/Tahiti ${JREHOME}/lib/zi/Pacific/Tarawa ${JREHOME}/lib/zi/Pacific/Tongatapu -${JREHOME}/lib/zi/Pacific/Truk ${JREHOME}/lib/zi/Pacific/Wake ${JREHOME}/lib/zi/Pacific/Wallis ${JREHOME}/lib/zi/SystemV/ diff --git a/devel/jdk/1.7/pkg/PLIST-main b/devel/jdk/1.7/pkg/PLIST-main index 7b200bb0d8a..caefabb385b 100644 --- a/devel/jdk/1.7/pkg/PLIST-main +++ b/devel/jdk/1.7/pkg/PLIST-main @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST-main,v 1.7 2009/10/07 01:53:54 kurt Exp $ +@comment $OpenBSD: PLIST-main,v 1.8 2011/01/11 15:47:50 kurt Exp $ @option no-default-conflict @conflict jdk->=1.7,<1.8 ${JDKHOME}/ @@ -216,6 +216,11 @@ ${JDKHOME}/demo/jpda/com/sun/tools/example/README ${JDKHOME}/demo/jpda/jpda.jar ${JDKHOME}/demo/jpda/src.zip ${JDKHOME}/demo/jvmti/ +${JDKHOME}/demo/jvmti/compiledMethodLoad/ +${JDKHOME}/demo/jvmti/compiledMethodLoad/README.txt +${JDKHOME}/demo/jvmti/compiledMethodLoad/lib/ +${JDKHOME}/demo/jvmti/compiledMethodLoad/lib/libcompiledMethodLoad.so +${JDKHOME}/demo/jvmti/compiledMethodLoad/src.zip ${JDKHOME}/demo/jvmti/gctest/ ${JDKHOME}/demo/jvmti/gctest/README.txt ${JDKHOME}/demo/jvmti/gctest/lib/ @@ -380,6 +385,11 @@ ${JDKHOME}/demo/nbproject/scripting/jconsole-plugin/nbproject/file-targets.xml ${JDKHOME}/demo/nbproject/scripting/jconsole-plugin/nbproject/jdk.xml ${JDKHOME}/demo/nbproject/scripting/jconsole-plugin/nbproject/netbeans-targets.xml ${JDKHOME}/demo/nbproject/scripting/jconsole-plugin/nbproject/project.xml +${JDKHOME}/demo/nio/ +${JDKHOME}/demo/nio/zipfs/ +${JDKHOME}/demo/nio/zipfs/README.txt +${JDKHOME}/demo/nio/zipfs/src.zip +${JDKHOME}/demo/nio/zipfs/zipfs.jar ${JDKHOME}/demo/scripting/ ${JDKHOME}/demo/scripting/jconsole-plugin/ ${JDKHOME}/demo/scripting/jconsole-plugin/README.txt @@ -392,6 +402,7 @@ ${JDKHOME}/include/jawt.h ${JDKHOME}/include/jdwpTransport.h ${JDKHOME}/include/jni.h ${JDKHOME}/include/jvmti.h +${JDKHOME}/include/jvmticmlr.h ${JDKHOME}/include/openbsd/ ${JDKHOME}/include/openbsd/jawt_md.h ${JDKHOME}/include/openbsd/jni_md.h @@ -411,6 +422,28 @@ ${JDKHOME}/jre/bin/ @bin ${JDKHOME}/jre/bin/tnameserv @bin ${JDKHOME}/jre/bin/unpack200 ${JDKHOME}/jre/lib/ +${JDKHOME}/jre/lib/applet/ +${JDKHOME}/jre/lib/calendars.properties +${JDKHOME}/jre/lib/charsets.jar +${JDKHOME}/jre/lib/classlist +${JDKHOME}/jre/lib/cmm/ +${JDKHOME}/jre/lib/cmm/CIEXYZ.pf +${JDKHOME}/jre/lib/cmm/GRAY.pf +${JDKHOME}/jre/lib/cmm/LINEAR_RGB.pf +${JDKHOME}/jre/lib/cmm/PYCC.pf +${JDKHOME}/jre/lib/cmm/sRGB.pf +${JDKHOME}/jre/lib/content-types.properties +${JDKHOME}/jre/lib/currency.data +${JDKHOME}/jre/lib/ext/ +${JDKHOME}/jre/lib/ext/dnsns.jar +${JDKHOME}/jre/lib/ext/localedata.jar +${JDKHOME}/jre/lib/ext/meta-index +${JDKHOME}/jre/lib/ext/sunec.jar +${JDKHOME}/jre/lib/ext/sunjce_provider.jar +${JDKHOME}/jre/lib/ext/sunpkcs11.jar +${JDKHOME}/jre/lib/flavormap.properties +${JDKHOME}/jre/lib/fontconfig.bfc +${JDKHOME}/jre/lib/fontconfig.properties.src ${JDKHOME}/jre/lib/${MACHINE_ARCH}/ ${JDKHOME}/jre/lib/${MACHINE_ARCH}/headless/ ${JDKHOME}/jre/lib/${MACHINE_ARCH}/headless/libmawt.so @@ -445,7 +478,7 @@ ${JDKHOME}/jre/lib/${MACHINE_ARCH}/libnpt.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/librmi.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/libsaproc.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/libsplashscreen.so -${JDKHOME}/jre/lib/${MACHINE_ARCH}/libsunecc.so +${JDKHOME}/jre/lib/${MACHINE_ARCH}/libsunec.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/libunpack.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/libverify.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/libzip.so @@ -457,31 +490,6 @@ ${JDKHOME}/jre/lib/${MACHINE_ARCH}/server/libjsig.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/server/libjvm.so ${JDKHOME}/jre/lib/${MACHINE_ARCH}/xawt/ ${JDKHOME}/jre/lib/${MACHINE_ARCH}/xawt/libmawt.so -${JDKHOME}/jre/lib/applet/ -${JDKHOME}/jre/lib/calendars.properties -${JDKHOME}/jre/lib/charsets.jar -${JDKHOME}/jre/lib/classlist -${JDKHOME}/jre/lib/cmm/ -${JDKHOME}/jre/lib/cmm/CIEXYZ.pf -${JDKHOME}/jre/lib/cmm/GRAY.pf -${JDKHOME}/jre/lib/cmm/LINEAR_RGB.pf -${JDKHOME}/jre/lib/cmm/PYCC.pf -${JDKHOME}/jre/lib/cmm/sRGB.pf -${JDKHOME}/jre/lib/content-types.properties -${JDKHOME}/jre/lib/currency.data -${JDKHOME}/jre/lib/ext/ -${JDKHOME}/jre/lib/ext/dnsns.jar -${JDKHOME}/jre/lib/ext/localedata.jar -${JDKHOME}/jre/lib/ext/meta-index -${JDKHOME}/jre/lib/ext/sunec.jar -${JDKHOME}/jre/lib/ext/sunjce_provider.jar -${JDKHOME}/jre/lib/ext/sunpkcs11.jar -${JDKHOME}/jre/lib/flavormap.properties -${JDKHOME}/jre/lib/fontconfig.bfc -${JDKHOME}/jre/lib/fontconfig.properties.src -${JDKHOME}/jre/lib/im/ -${JDKHOME}/jre/lib/im/indicim.jar -${JDKHOME}/jre/lib/im/thaiim.jar ${JDKHOME}/jre/lib/images/ ${JDKHOME}/jre/lib/images/cursors/ ${JDKHOME}/jre/lib/images/cursors/cursors.properties @@ -593,6 +601,7 @@ ${JDKHOME}/jre/lib/zi/America/Aruba ${JDKHOME}/jre/lib/zi/America/Asuncion ${JDKHOME}/jre/lib/zi/America/Atikokan ${JDKHOME}/jre/lib/zi/America/Bahia +${JDKHOME}/jre/lib/zi/America/Bahia_Banderas ${JDKHOME}/jre/lib/zi/America/Barbados ${JDKHOME}/jre/lib/zi/America/Belem ${JDKHOME}/jre/lib/zi/America/Belize @@ -656,6 +665,7 @@ ${JDKHOME}/jre/lib/zi/America/Maceio ${JDKHOME}/jre/lib/zi/America/Managua ${JDKHOME}/jre/lib/zi/America/Manaus ${JDKHOME}/jre/lib/zi/America/Martinique +${JDKHOME}/jre/lib/zi/America/Matamoros ${JDKHOME}/jre/lib/zi/America/Mazatlan ${JDKHOME}/jre/lib/zi/America/Menominee ${JDKHOME}/jre/lib/zi/America/Merida @@ -674,6 +684,7 @@ ${JDKHOME}/jre/lib/zi/America/Noronha ${JDKHOME}/jre/lib/zi/America/North_Dakota/ ${JDKHOME}/jre/lib/zi/America/North_Dakota/Center ${JDKHOME}/jre/lib/zi/America/North_Dakota/New_Salem +${JDKHOME}/jre/lib/zi/America/Ojinaga ${JDKHOME}/jre/lib/zi/America/Panama ${JDKHOME}/jre/lib/zi/America/Pangnirtung ${JDKHOME}/jre/lib/zi/America/Paramaribo @@ -688,6 +699,7 @@ ${JDKHOME}/jre/lib/zi/America/Recife ${JDKHOME}/jre/lib/zi/America/Regina ${JDKHOME}/jre/lib/zi/America/Resolute ${JDKHOME}/jre/lib/zi/America/Rio_Branco +${JDKHOME}/jre/lib/zi/America/Santa_Isabel ${JDKHOME}/jre/lib/zi/America/Santarem ${JDKHOME}/jre/lib/zi/America/Santiago ${JDKHOME}/jre/lib/zi/America/Santo_Domingo @@ -714,6 +726,7 @@ ${JDKHOME}/jre/lib/zi/Antarctica/ ${JDKHOME}/jre/lib/zi/Antarctica/Casey ${JDKHOME}/jre/lib/zi/Antarctica/Davis ${JDKHOME}/jre/lib/zi/Antarctica/DumontDUrville +${JDKHOME}/jre/lib/zi/Antarctica/Macquarie ${JDKHOME}/jre/lib/zi/Antarctica/Mawson ${JDKHOME}/jre/lib/zi/Antarctica/McMurdo ${JDKHOME}/jre/lib/zi/Antarctica/Palmer @@ -768,6 +781,7 @@ ${JDKHOME}/jre/lib/zi/Asia/Makassar ${JDKHOME}/jre/lib/zi/Asia/Manila ${JDKHOME}/jre/lib/zi/Asia/Muscat ${JDKHOME}/jre/lib/zi/Asia/Nicosia +${JDKHOME}/jre/lib/zi/Asia/Novokuznetsk ${JDKHOME}/jre/lib/zi/Asia/Novosibirsk ${JDKHOME}/jre/lib/zi/Asia/Omsk ${JDKHOME}/jre/lib/zi/Asia/Oral @@ -924,6 +938,7 @@ ${JDKHOME}/jre/lib/zi/Pacific/ ${JDKHOME}/jre/lib/zi/Pacific/Apia ${JDKHOME}/jre/lib/zi/Pacific/Auckland ${JDKHOME}/jre/lib/zi/Pacific/Chatham +${JDKHOME}/jre/lib/zi/Pacific/Chuuk ${JDKHOME}/jre/lib/zi/Pacific/Easter ${JDKHOME}/jre/lib/zi/Pacific/Efate ${JDKHOME}/jre/lib/zi/Pacific/Enderbury @@ -949,14 +964,13 @@ ${JDKHOME}/jre/lib/zi/Pacific/Noumea ${JDKHOME}/jre/lib/zi/Pacific/Pago_Pago ${JDKHOME}/jre/lib/zi/Pacific/Palau ${JDKHOME}/jre/lib/zi/Pacific/Pitcairn -${JDKHOME}/jre/lib/zi/Pacific/Ponape +${JDKHOME}/jre/lib/zi/Pacific/Pohnpei ${JDKHOME}/jre/lib/zi/Pacific/Port_Moresby ${JDKHOME}/jre/lib/zi/Pacific/Rarotonga ${JDKHOME}/jre/lib/zi/Pacific/Saipan ${JDKHOME}/jre/lib/zi/Pacific/Tahiti ${JDKHOME}/jre/lib/zi/Pacific/Tarawa ${JDKHOME}/jre/lib/zi/Pacific/Tongatapu -${JDKHOME}/jre/lib/zi/Pacific/Truk ${JDKHOME}/jre/lib/zi/Pacific/Wake ${JDKHOME}/jre/lib/zi/Pacific/Wallis ${JDKHOME}/jre/lib/zi/SystemV/ @@ -984,44 +998,44 @@ ${JDKHOME}/lib/orb.idl ${JDKHOME}/lib/sa-jdi.jar ${JDKHOME}/lib/tools.jar @mandir ${JDKHOME}/man/ -${JDKHOME}/man/man1/ -@man ${JDKHOME}/man/man1/appletviewer.1 -@man ${JDKHOME}/man/man1/extcheck.1 -@man ${JDKHOME}/man/man1/idlj.1 -@man ${JDKHOME}/man/man1/jar.1 -@man ${JDKHOME}/man/man1/jarsigner.1 -@man ${JDKHOME}/man/man1/java.1 -@man ${JDKHOME}/man/man1/javac.1 -@man ${JDKHOME}/man/man1/javadoc.1 -@man ${JDKHOME}/man/man1/javah.1 -@man ${JDKHOME}/man/man1/javap.1 -@man ${JDKHOME}/man/man1/jconsole.1 -@man ${JDKHOME}/man/man1/jdb.1 -@man ${JDKHOME}/man/man1/jhat.1 -@man ${JDKHOME}/man/man1/jinfo.1 -@man ${JDKHOME}/man/man1/jmap.1 -@man ${JDKHOME}/man/man1/jps.1 -@man ${JDKHOME}/man/man1/jrunscript.1 -@man ${JDKHOME}/man/man1/jsadebugd.1 -@man ${JDKHOME}/man/man1/jstack.1 -@man ${JDKHOME}/man/man1/jstat.1 -@man ${JDKHOME}/man/man1/jstatd.1 -@man ${JDKHOME}/man/man1/keytool.1 -@man ${JDKHOME}/man/man1/native2ascii.1 -@man ${JDKHOME}/man/man1/orbd.1 -@man ${JDKHOME}/man/man1/pack200.1 -@man ${JDKHOME}/man/man1/policytool.1 -@man ${JDKHOME}/man/man1/rmic.1 -@man ${JDKHOME}/man/man1/rmid.1 -@man ${JDKHOME}/man/man1/rmiregistry.1 -@man ${JDKHOME}/man/man1/schemagen.1 -@man ${JDKHOME}/man/man1/serialver.1 -@man ${JDKHOME}/man/man1/servertool.1 -@man ${JDKHOME}/man/man1/tnameserv.1 -@man ${JDKHOME}/man/man1/unpack200.1 -@man ${JDKHOME}/man/man1/wsgen.1 -@man ${JDKHOME}/man/man1/wsimport.1 -@man ${JDKHOME}/man/man1/xjc.1 +@comment ${JDKHOME}/man/man1/ +@comment @man ${JDKHOME}/man/man1/appletviewer.1 +@comment @man ${JDKHOME}/man/man1/extcheck.1 +@comment @man ${JDKHOME}/man/man1/idlj.1 +@comment @man ${JDKHOME}/man/man1/jar.1 +@comment @man ${JDKHOME}/man/man1/jarsigner.1 +@comment @man ${JDKHOME}/man/man1/java.1 +@comment @man ${JDKHOME}/man/man1/javac.1 +@comment @man ${JDKHOME}/man/man1/javadoc.1 +@comment @man ${JDKHOME}/man/man1/javah.1 +@comment @man ${JDKHOME}/man/man1/javap.1 +@comment @man ${JDKHOME}/man/man1/jconsole.1 +@comment @man ${JDKHOME}/man/man1/jdb.1 +@comment @man ${JDKHOME}/man/man1/jhat.1 +@comment @man ${JDKHOME}/man/man1/jinfo.1 +@comment @man ${JDKHOME}/man/man1/jmap.1 +@comment @man ${JDKHOME}/man/man1/jps.1 +@comment @man ${JDKHOME}/man/man1/jrunscript.1 +@comment @man ${JDKHOME}/man/man1/jsadebugd.1 +@comment @man ${JDKHOME}/man/man1/jstack.1 +@comment @man ${JDKHOME}/man/man1/jstat.1 +@comment @man ${JDKHOME}/man/man1/jstatd.1 +@comment @man ${JDKHOME}/man/man1/keytool.1 +@comment @man ${JDKHOME}/man/man1/native2ascii.1 +@comment @man ${JDKHOME}/man/man1/orbd.1 +@comment @man ${JDKHOME}/man/man1/pack200.1 +@comment @man ${JDKHOME}/man/man1/policytool.1 +@comment @man ${JDKHOME}/man/man1/rmic.1 +@comment @man ${JDKHOME}/man/man1/rmid.1 +@comment @man ${JDKHOME}/man/man1/rmiregistry.1 +@comment @man ${JDKHOME}/man/man1/schemagen.1 +@comment @man ${JDKHOME}/man/man1/serialver.1 +@comment @man ${JDKHOME}/man/man1/servertool.1 +@comment @man ${JDKHOME}/man/man1/tnameserv.1 +@comment @man ${JDKHOME}/man/man1/unpack200.1 +@comment @man ${JDKHOME}/man/man1/wsgen.1 +@comment @man ${JDKHOME}/man/man1/wsimport.1 +@comment @man ${JDKHOME}/man/man1/xjc.1 ${JDKHOME}/sample/ ${JDKHOME}/sample/jmx/ ${JDKHOME}/sample/jmx/jmx-scandir/