diff options
author | Greg Lewis <glewis@FreeBSD.org> | 2007-06-09 05:14:56 +0000 |
---|---|---|
committer | Greg Lewis <glewis@FreeBSD.org> | 2007-06-09 05:14:56 +0000 |
commit | 01790521d1f58b3814db40f9bcc340faf54e9c9f (patch) | |
tree | b9d63b3a22d203c194324a9704a910badab47a40 /java/jdk16/files | |
parent | 9d2b846bfd64c30b5214be168b47b1c4938ba9a5 (diff) |
Notes
Diffstat (limited to 'java/jdk16/files')
19 files changed, 322 insertions, 248 deletions
diff --git a/java/jdk16/files/patch-hotspot::amd64::vm::amd64.ad b/java/jdk16/files/patch-hotspot::amd64::vm::amd64.ad deleted file mode 100644 index dbf43fe16d5e..000000000000 --- a/java/jdk16/files/patch-hotspot::amd64::vm::amd64.ad +++ /dev/null @@ -1,13 +0,0 @@ ---- ../../hotspot/src/cpu/amd64/vm/amd64.ad.orig Thu May 24 15:27:42 2007 -+++ ../../hotspot/src/cpu/amd64/vm/amd64.ad Thu May 24 17:15:10 2007 -@@ -662,8 +662,8 @@ - { - #ifdef ASSERT - if (rspec.reloc()->type() == relocInfo::oop_type && -- d32 != 0 && d32 != (int) Universe::non_oop_word()) { -- assert(oop(d32)->is_oop() && oop(d32)->is_perm(), "cannot embed non-perm oops in code"); -+ d32 != 0 && d32 != (intptr_t) Universe::non_oop_word()) { -+ assert(oop((intptr_t)d32)->is_oop() && oop((intptr_t)d32)->is_perm(), "cannot embed non-perm oops in code"); - } - #endif - cbuf.relocate(cbuf.mark(), rspec, format); diff --git a/java/jdk16/files/patch-hotspot::amd64::vm::frame_amd64.hpp b/java/jdk16/files/patch-hotspot::amd64::vm::frame_amd64.hpp deleted file mode 100644 index 77bd14b2ea9e..000000000000 --- a/java/jdk16/files/patch-hotspot::amd64::vm::frame_amd64.hpp +++ /dev/null @@ -1,9 +0,0 @@ ---- ../../hotspot/src/cpu/amd64/vm/frame_amd64.hpp.orig Tue Oct 19 14:41:26 2004 -+++ ../../hotspot/src/cpu/amd64/vm/frame_amd64.hpp Thu May 24 15:55:55 2007 -@@ -125,5 +125,5 @@ - inline address* sender_pc_addr() const; - - // return address of param, zero origin index. -- inline address* frame::native_param_addr(int idx) const; -+ inline address* native_param_addr(int idx) const; - diff --git a/java/jdk16/files/patch-hotspot::amd64::vm::interpreter_amd64.hpp b/java/jdk16/files/patch-hotspot::amd64::vm::interpreter_amd64.hpp deleted file mode 100644 index 0bd8ed438688..000000000000 --- a/java/jdk16/files/patch-hotspot::amd64::vm::interpreter_amd64.hpp +++ /dev/null @@ -1,16 +0,0 @@ ---- ../../hotspot/src/cpu/amd64/vm/interpreter_amd64.hpp.orig Tue Oct 19 14:41:27 2004 -+++ ../../hotspot/src/cpu/amd64/vm/interpreter_amd64.hpp Thu May 24 16:11:07 2007 -@@ -53,11 +53,11 @@ - void generate_stack_overflow_check(void); - - #ifndef CORE -- void InterpreterGenerator::generate_counter_incr( -+ void generate_counter_incr( - Label* overflow, - Label* profile_method, - Label* profile_method_continue); -- void InterpreterGenerator::generate_counter_overflow(address entry_point); -+ void generate_counter_overflow(address entry_point); - void generate_run_compiled_code(void); - void check_for_compiled_code(Label & run_compiled_code); - #endif diff --git a/java/jdk16/files/patch-hotspot::amd64::vm::register_amd64.hpp b/java/jdk16/files/patch-hotspot::amd64::vm::register_amd64.hpp deleted file mode 100644 index f4ebe6b17e62..000000000000 --- a/java/jdk16/files/patch-hotspot::amd64::vm::register_amd64.hpp +++ /dev/null @@ -1,38 +0,0 @@ ---- ../../hotspot/src/cpu/amd64/vm/register_amd64.hpp.orig Tue Oct 19 14:41:27 2004 -+++ ../../hotspot/src/cpu/amd64/vm/register_amd64.hpp Thu May 24 15:50:42 2007 -@@ -28,17 +28,17 @@ - int encoding() const - { - assert(is_valid(), "invalid register"); -- return (int) this; -+ return value(); - } - - bool is_valid() const - { -- return 0 <= (int) this && (int) this < number_of_registers; -+ return 0 <= value() && value() < number_of_registers; - } - - bool has_byte_register() const - { -- return 0 <= (int) this && (int)this < number_of_byte_registers; -+ return 0 <= value() && value() < number_of_byte_registers; - } - - const char* name() const; -@@ -92,12 +92,12 @@ - int encoding() const - { - assert(is_valid(), "invalid fp register"); -- return (int) this; -+ return value(); - } - - bool is_valid() const - { -- return 0 <= (int) this && (int) this < number_of_registers; -+ return 0 <= value() && value() < number_of_registers; - } - - const char* name() const; diff --git a/java/jdk16/files/patch-hotspot::amd64::vm::templateTable_amd64.cpp b/java/jdk16/files/patch-hotspot::amd64::vm::templateTable_amd64.cpp deleted file mode 100644 index 9e975618a271..000000000000 --- a/java/jdk16/files/patch-hotspot::amd64::vm::templateTable_amd64.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ../../hotspot/src/cpu/amd64/vm/templateTable_amd64.cpp.orig Tue Oct 19 14:41:28 2004 -+++ ../../hotspot/src/cpu/amd64/vm/templateTable_amd64.cpp Thu May 24 16:34:33 2007 -@@ -3266,7 +3266,7 @@ - // initialize object header only. - __ bind(initialize_header); - __ movq(Address(rax, oopDesc::mark_offset_in_bytes()), -- (int) markOopDesc::prototype()); // header (address 0x1) -+ (intptr_t) markOopDesc::prototype()); // header (address 0x1) - __ movq(Address(rax, oopDesc::klass_offset_in_bytes()), rarg1); // klass - __ jmp(done); - diff --git a/java/jdk16/files/patch-hotspot::bsd::vm::jvm_bsd.h b/java/jdk16/files/patch-hotspot::bsd::vm::jvm_bsd.h deleted file mode 100644 index b5c3ea0695c6..000000000000 --- a/java/jdk16/files/patch-hotspot::bsd::vm::jvm_bsd.h +++ /dev/null @@ -1,15 +0,0 @@ ---- ../../hotspot/src/os/bsd/vm/jvm_bsd.h.orig Fri May 25 14:04:51 2007 -+++ ../../hotspot/src/os/bsd/vm/jvm_bsd.h Fri May 25 14:04:14 2007 -@@ -78,8 +78,12 @@ - #define ALT_ASYNC_SIGNAL ALT_INTERRUPT_SIGNAL+1 /* alternate async signal */ - - /* XXXBSD: compat? */ -+#ifndef SIGRTMIN - #define SIGRTMIN 33 -+#endif -+#ifndef SIGRTMAX - #define SIGRTMAX 63 -+#endif - - /* With 1.4.1 libjsig added versioning: used in os_bsd.cpp and jsig.c */ - #define JSIG_VERSION_1_4_1 0x30140100 diff --git a/java/jdk16/files/patch-hotspot::bsd::vm::osThread_bsd.hpp b/java/jdk16/files/patch-hotspot::bsd::vm::osThread_bsd.hpp deleted file mode 100644 index ae78d2f6f45b..000000000000 --- a/java/jdk16/files/patch-hotspot::bsd::vm::osThread_bsd.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ../../hotspot/src/os/bsd/vm/osThread_bsd.hpp.orig Thu May 24 16:50:49 2007 -+++ ../../hotspot/src/os/bsd/vm/osThread_bsd.hpp Thu May 24 16:51:16 2007 -@@ -28,7 +28,7 @@ - - #ifndef PRODUCT - // Used for debugging, return a unique integer for each thread. -- int thread_identifier() const { return (int)_thread_id; } -+ int thread_identifier() const { return (int)(intptr_t)_thread_id; } - #endif - #ifdef ASSERT - // On solaris reposition can fail in two ways: diff --git a/java/jdk16/files/patch-hotspot::bsd_amd64::vm::os_bsd_amd64.cpp b/java/jdk16/files/patch-hotspot::bsd_amd64::vm::os_bsd_amd64.cpp deleted file mode 100644 index ec8870613cd0..000000000000 --- a/java/jdk16/files/patch-hotspot::bsd_amd64::vm::os_bsd_amd64.cpp +++ /dev/null @@ -1,22 +0,0 @@ ---- ../../hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp.orig Thu May 24 15:27:42 2007 -+++ ../../hotspot/src/os_cpu/bsd_amd64/vm/os_bsd_amd64.cpp Thu May 24 16:26:52 2007 -@@ -255,15 +255,15 @@ - // success, if not we return failure and the caller can retry. - // - _result = false; -- if (uc->context_rip == (int)_old_addr.pc() ) { -- uc->context_rip = (int)_new_addr.pc(); -+ if (uc->context_rip == (intptr_t)_old_addr.pc() ) { -+ uc->context_rip = (intptr_t)_new_addr.pc(); - _result = true; - #ifndef __OpenBSD__ - } else if (uc->uc_link != NULL) { - // Check (and validate) one level of stacked ucontext - ucontext_t* linked_uc = uc->uc_link; -- if (os::Bsd::valid_ucontext(thread, uc, linked_uc) && linked_uc->context_rip == (int)_old_addr.pc()) { -- linked_uc->context_rip = (int)_new_addr.pc(); -+ if (os::Bsd::valid_ucontext(thread, uc, linked_uc) && linked_uc->context_rip == (intptr_t)_old_addr.pc()) { -+ linked_uc->context_rip = (intptr_t)_new_addr.pc(); - _result = true; - } - #endif diff --git a/java/jdk16/files/patch-hotspot::bsd_amd64::vm::threadLS_bsd_amd64.hpp b/java/jdk16/files/patch-hotspot::bsd_amd64::vm::threadLS_bsd_amd64.hpp deleted file mode 100644 index b0b0338a23cd..000000000000 --- a/java/jdk16/files/patch-hotspot::bsd_amd64::vm::threadLS_bsd_amd64.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ../../hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.hpp.orig Thu May 24 15:27:42 2007 -+++ ../../hotspot/src/os_cpu/bsd_amd64/vm/threadLS_bsd_amd64.hpp Thu May 24 16:01:24 2007 -@@ -33,7 +33,7 @@ - - static uintptr_t pd_raw_thread_id() { - address sp = pd_sp_address(); -- return (unsigned int)sp / _pd_min_page_size; -+ return (uintptr_t) sp / _pd_min_page_size; - } - - static int pd_cache_index(uintptr_t sp_page) { diff --git a/java/jdk16/files/patch-hotspot::bsd_i486::vm::threadLS_bsd_i486.hpp b/java/jdk16/files/patch-hotspot::bsd_i486::vm::threadLS_bsd_i486.hpp deleted file mode 100644 index 318514b0dd80..000000000000 --- a/java/jdk16/files/patch-hotspot::bsd_i486::vm::threadLS_bsd_i486.hpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ../../hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.hpp.orig Thu May 24 15:27:43 2007 -+++ ../../hotspot/src/os_cpu/bsd_i486/vm/threadLS_bsd_i486.hpp Thu May 24 19:43:59 2007 -@@ -33,7 +33,7 @@ - - static uintptr_t pd_raw_thread_id() { - address sp = pd_sp_address(); -- return (unsigned int)sp / _pd_min_page_size; -+ return (uintptr_t) sp / _pd_min_page_size; - } - - static int pd_cache_index(uintptr_t sp_page) { diff --git a/java/jdk16/files/patch-hotspot::i486::vm::templateTable_i486.cpp b/java/jdk16/files/patch-hotspot::i486::vm::templateTable_i486.cpp deleted file mode 100644 index 5dbc0e85eb84..000000000000 --- a/java/jdk16/files/patch-hotspot::i486::vm::templateTable_i486.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- ../../hotspot/src/cpu/i486/vm/templateTable_i486.cpp.orig Tue Oct 19 14:41:33 2004 -+++ ../../hotspot/src/cpu/i486/vm/templateTable_i486.cpp Thu May 24 19:53:09 2007 -@@ -2987,7 +2987,7 @@ - // initialize object header only. - __ bind(initialize_header); - __ movl(Address(eax, oopDesc::mark_offset_in_bytes ()), -- (int)markOopDesc::prototype()); // header -+ (intptr_t) markOopDesc::prototype()); // header - __ popl(ecx); // get saved klass back in the register. - __ movl(Address(eax, oopDesc::klass_offset_in_bytes()), ecx); // klass - __ jmp(done); diff --git a/java/jdk16/files/patch-hotspot::share::vm::bytecodeTracer.cpp b/java/jdk16/files/patch-hotspot::share::vm::bytecodeTracer.cpp deleted file mode 100644 index e98f0b8563ae..000000000000 --- a/java/jdk16/files/patch-hotspot::share::vm::bytecodeTracer.cpp +++ /dev/null @@ -1,26 +0,0 @@ ---- ../../hotspot/src/share/vm/interpreter/bytecodeTracer.cpp.orig Tue Oct 19 14:42:10 2004 -+++ ../../hotspot/src/share/vm/interpreter/bytecodeTracer.cpp Thu May 24 17:28:49 2007 -@@ -51,7 +51,11 @@ - // Note 1: This code will not work as expected with true MT/MP. - // Need an explicit lock or a different solution. - tty->cr(); -+#if defined(_ALLBSD_SOURCE) -+ tty->print("[%ld] ", (intptr_t) Thread::current()->osthread()->thread_id()); -+#else - tty->print("[%d] ", (int) Thread::current()->osthread()->thread_id()); -+#endif - method->print_name(tty); - tty->cr(); - _current_method = method(); -@@ -64,7 +68,11 @@ - code = Bytecodes::cast(*bcp); - } - int bci = bcp - method->code_base(); -+#if defined(_ALLBSD_SOURCE) -+ tty->print("[%ld] ", (intptr_t) Thread::current()->osthread()->thread_id()); -+#else - tty->print("[%d] ", (int) Thread::current()->osthread()->thread_id()); -+#endif - if (Verbose) { - tty->print("%8d %4d " INTPTR_FORMAT " " INTPTR_FORMAT " %s", - BytecodeCounter::counter_value(), bci, tos, tos2, Bytecodes::name(code)); diff --git a/java/jdk16/files/patch-j2se::common::Defs-bsd.gmk b/java/jdk16/files/patch-j2se::common::Defs-bsd.gmk index c7530004bd26..772486e9dbf2 100644 --- a/java/jdk16/files/patch-j2se::common::Defs-bsd.gmk +++ b/java/jdk16/files/patch-j2se::common::Defs-bsd.gmk @@ -20,17 +20,3 @@ $FreeBSD$ override OPENWIN_LIB = $(OPENWIN_HOME)/lib override OTHER_M4FLAGS = -DGNU_ASSEMBLER override SUN_CMM_SUBDIR = -@@ -463,10 +463,10 @@ - # Motif settings - # - # XXX: OpenBSD confirm static motif still causes issues - truk --ifeq ($(TRUE_PLATFORM), OpenBSD) --STATIC_MOTIF=false --else -+ifeq ($(TRUE_PLATFORM), NetBSD) - STATIC_MOTIF=true -+else -+STATIC_MOTIF=false - endif - LIBM=-lm - diff --git a/java/jdk16/files/patch-j2se::jar::main.cpp b/java/jdk16/files/patch-j2se::jar::main.cpp deleted file mode 100644 index 99b0ae464f9e..000000000000 --- a/java/jdk16/files/patch-j2se::jar::main.cpp +++ /dev/null @@ -1,14 +0,0 @@ ---- ../../j2se/src/share/native/com/sun/java/util/jar/pack/main.cpp.orig Tue Oct 19 14:59:48 2004 -+++ ../../j2se/src/share/native/com/sun/java/util/jar/pack/main.cpp Thu May 24 18:46:10 2007 -@@ -17,7 +17,11 @@ - - #if defined(unix) && !defined(PRODUCT) - #include "pthread.h" -+#if defined(_ALLBSD_SOURCE) -+#define THREAD_SELF ((jlong)pthread_self()) -+#else - #define THREAD_SELF ((int)pthread_self()) -+#endif - #endif - - #include "defines.h" diff --git a/java/jdk16/files/patch-j2se::jdbc::Makefile b/java/jdk16/files/patch-j2se::jdbc::Makefile deleted file mode 100644 index 030e39449e8b..000000000000 --- a/java/jdk16/files/patch-j2se::jdbc::Makefile +++ /dev/null @@ -1,15 +0,0 @@ ---- ../../j2se/make/sun/jdbc/Makefile.orig Thu May 24 15:27:43 2007 -+++ ../../j2se/make/sun/jdbc/Makefile Thu May 24 18:28:12 2007 -@@ -89,10 +89,10 @@ - make_libs: $(TMPDIR)/libodbcinst.so $(TMPDIR)/libodbc.so - - $(TMPDIR)/libodbcinst.so: dummyodbc.c $(TMPDIR) -- $(CC) -shared -o $@ $< -+ $(CC) -shared -fPIC -o $@ $< - - $(TMPDIR)/libodbc.so: dummyodbc.c $(TMPDIR) -- $(CC) -shared -o $@ $< -+ $(CC) -shared -fPIC -o $@ $< - - clean:: - $(RM) -f $(TMPDIR)/libodbcinst.so $(TMPDIR)/libodbc.so diff --git a/java/jdk16/files/patch-j2se::nio::genCharsetProvider.sh b/java/jdk16/files/patch-j2se::nio::genCharsetProvider.sh index fd6137cab922..abee9b6194fe 100644 --- a/java/jdk16/files/patch-j2se::nio::genCharsetProvider.sh +++ b/java/jdk16/files/patch-j2se::nio::genCharsetProvider.sh @@ -6,12 +6,12 @@ $FreeBSD$ } ' --$JAVA -cp $TMPDIR Hasher -i Aliases <$TMPDIR/aliases >>$OUT --$JAVA -cp $TMPDIR Hasher -i Classes <$TMPDIR/classes >>$OUT --$JAVA -cp $TMPDIR Hasher -i -e Cache -t Charset <$TMPDIR/classes >>$OUT -+$JAVA -cp $TMPDIR Hasher -i Aliases <$TMPDIR/aliases | egrep -v '^Java Hotspot' >>$OUT -+$JAVA -cp $TMPDIR Hasher -i Classes <$TMPDIR/classes | egrep -v '^Java Hotspot' >>$OUT -+$JAVA -cp $TMPDIR Hasher -i -e Cache -t Charset <$TMPDIR/classes | egrep -v '^Java Hotspot' >>$OUT +-$JAVA -cp $NIO_TMPDIR Hasher -i Aliases <$NIO_TMPDIR/aliases >>$OUT +-$JAVA -cp $NIO_TMPDIR Hasher -i Classes <$NIO_TMPDIR/classes >>$OUT +-$JAVA -cp $NIO_TMPDIR Hasher -i -e Cache -t Charset <$NIO_TMPDIR/classes >>$OUT ++$JAVA -cp $NIO_TMPDIR Hasher -i Aliases <$NIO_TMPDIR/aliases | egrep -v '^Java Hotspot' >>$OUT ++$JAVA -cp $NIO_TMPDIR Hasher -i Classes <$NIO_TMPDIR/classes | egrep -v '^Java Hotspot' >>$OUT ++$JAVA -cp $NIO_TMPDIR Hasher -i -e Cache -t Charset <$NIO_TMPDIR/classes | egrep -v '^Java Hotspot' >>$OUT # Constructor diff --git a/java/jdk16/files/patch-vm::os_bsd.cpp b/java/jdk16/files/patch-vm::os_bsd.cpp index 25bd71db866c..1add61fe9496 100644 --- a/java/jdk16/files/patch-vm::os_bsd.cpp +++ b/java/jdk16/files/patch-vm::os_bsd.cpp @@ -1,13 +1,13 @@ $FreeBSD$ ---- ../../hotspot/src/os/bsd/vm/os_bsd.cpp.orig Tue Jan 27 17:54:28 2004 -+++ ../../hotspot/src/os/bsd/vm/os_bsd.cpp Tue Jan 27 17:55:21 2004 -@@ -333,7 +333,7 @@ - #define malloc(n) (char*)NEW_C_HEAP_ARRAY(char, (n)) +--- ../../hotspot/src/os/bsd/vm/os_bsd.cpp Sun Jun 3 18:46:31 2007 ++++ ../../hotspot/src/os/bsd/vm/os_bsd.cpp.orig Sun Jun 3 18:47:28 2007 +@@ -499,7 +499,7 @@ #define getenv(n) ::getenv(n) + #ifndef DEFAULT_LD_LIBRARY_PATH -#define DEFAULT_LD_LIBRARY_PATH "/usr/lib" /* See ld.so.1(1) */ +#define DEFAULT_LD_LIBRARY_PATH "/usr/lib:%%LOCALBASE%%/lib" /* See ld.so.1(1) */ + #endif #define EXTENSIONS_DIR "/lib/ext" #define ENDORSED_DIR "/lib/endorsed" - diff --git a/java/jdk16/files/pkg-install.in b/java/jdk16/files/pkg-install.in index c5f4a70db1df..919b658cf5e8 100644 --- a/java/jdk16/files/pkg-install.in +++ b/java/jdk16/files/pkg-install.in @@ -55,3 +55,197 @@ if [ "$2" = "POST-INSTALL" ]; then exit 0 fi + +# Pre-install section + +# License agreement +more << EOF_LICENSE +JAVA RESEARCH LICENSE +Version 1.6 + + +I. DEFINITIONS. + +"Licensee" means You and any other party that has entered into and has +in effect a version of this License. + +"Modifications" means any change or addition to the Technology. + +"Sun" means Sun Microsystems, Inc. and its successors and assignees. + +"Research Use" means research, evaluation, or development for the +purpose of advancing knowledge, teaching, learning, or customizing the +Technology or Modifications for personal use. Research Use expressly +excludes use or distribution for direct or indirect commercial +(including strategic) gain or advantage. + +"Technology" means the source code and object code of the technology +made available by Sun pursuant to this License. + +"Technology Site" means the website designated by Sun for accessing +the Technology. + +"You" means the individual executing this License or the legal entity +or entities represented by the individual executing this License. + +II. PURPOSE. + +Sun is licensing the Technology under this Java Research License (the +"License") to promote research, education, innovation, and development +using the Technology. This License is not intended to permit or +enable access to the Technology for active consultation as part of +creating an independent implementation of the Technology. + +COMMERCIAL USE AND DISTRIBUTION OF TECHNOLOGY AND MODIFICATIONS IS +PERMITTED ONLY UNDER A SUN COMMERCIAL LICENSE. + +III. RESEARCH USE RIGHTS. + +A. License Grant. Subject to the conditions contained herein, Sun +grants to You a non-exclusive, non-transferable, worldwide, and +royalty-free license to do the following for Your Research Use only: + +1. Reproduce, create Modifications of, and use the Technology +alone, or with Modifications; + +2. Share source code of the Technology alone, or with +Modifications, with other Licensees; and + +3. Distribute object code of the Technology, alone, or with +Modifications, to any third parties for Research Use only, under a +license of Your choice that is consistent with this License; and +publish papers and books discussing the Technology which may include +relevant excerpts that do not in the aggregate constitute a +significant portion of the Technology. + +B. Residual Rights. If You examine the Technology after accepting +this License and remember anything about it later, You are not +"tainted" in a way that would prevent You from creating or +contributing to an independent implementation, but this License grants +You no rights to Sun's copyrights or patents for use in such an +implementation. + +C. No Implied Licenses. Other than the rights granted herein, Sun +retains all rights, title, and interest in Technology, and You retain +all rights, title, and interest in Your Modifications and associated +specifications, subject to the terms of this License. + +D. Third Party Software. Portions of the Technology may be +provided with licenses or other notices from third parties that govern +the use of those portions. Any licenses granted hereunder do not alter +any rights and obligations You may have under such licenses, however, +the disclaimer of warranty and limitation of liability provisions in +this License will apply to all Technology in this distribution. + +IV. INTELLECTUAL PROPERTY REQUIREMENTS + +As a condition to Your License, You agree to comply with the following +restrictions and responsibilities: + +A. License and Copyright Notices. You must include a copy of this +Java Research License in a Readme file for any Technology or +Modifications you distribute. You must also include the following +statement, "Use and distribution of this technology is subject to the +Java Research License included herein", (a) once prominently in the +source code tree and/or specifications for Your source code +distributions, and (b) once in the same file as Your copyright or +proprietary notices for Your binary code distributions. You must cause +any files containing Your Modification to carry prominent notice +stating that You changed the files. You must not remove or alter any +copyright or other proprietary notices in the Technology. + +B. Licensee Exchanges. Any Technology and Modifications You +receive from any Licensee are governed by this License. + +V. GENERAL TERMS. + +A. Disclaimer Of Warranties. + +THE TECHNOLOGY IS PROVIDED "AS IS", WITHOUT WARRANTIES OF ANY KIND, +EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, WARRANTIES +THAT THE TECHNOLOGY IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A +PARTICULAR PURPOSE, OR NON-INFRINGING OF THIRD PARTY RIGHTS. YOU +AGREE THAT YOU BEAR THE ENTIRE RISK IN CONNECTION WITH YOUR USE AND +DISTRIBUTION OF ANY AND ALL TECHNOLOGY UNDER THIS LICENSE. + +B. Infringement; Limitation Of Liability. + +1. If any portion of, or functionality implemented by, the +Technology becomes the subject of a claim or threatened claim of +infringement ("Affected Materials"), Sun may, in its unrestricted +discretion, suspend Your rights to use and distribute the Affected +Materials under this License. Such suspension of rights will be +effective immediately upon Sun's posting of notice of suspension on +the Technology Site. + +2. IN NO EVENT WILL SUN BE LIABLE FOR ANY DIRECT, INDIRECT, +PUNITIVE, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES IN CONNECTION +WITH OR ARISING OUT OF THIS LICENSE (INCLUDING, WITHOUT LIMITATION, +LOSS OF PROFITS, USE, DATA, OR ECONOMIC ADVANTAGE OF ANY SORT), +HOWEVER IT ARISES AND ON ANY THEORY OF LIABILITY (including +negligence), WHETHER OR NOT SUN HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE. LIABILITY UNDER THIS SECTION V.B.2 SHALL BE SO LIMITED +AND EXCLUDED, NOTWITHSTANDING FAILURE OF THE ESSENTIAL PURPOSE OF ANY +REMEDY. + +C. Termination. + +1. You may terminate this License at any time by notifying Sun in a +writing addressed to Sun Microsystems, Inc., 4150 Network Circle, +Santa Clara, California 95054, Attn.: Legal Department/Products and +Technology Law. + +2. All Your rights will terminate under this License if You fail to +comply with any of its material terms or conditions and do not cure +such failure within thirty (30) days after becoming aware of such +noncompliance. + +3. Upon termination, You must discontinue all uses and distribution +under this agreement, and all provisions of this Section V ("General +Terms") shall survive termination. + +D. Miscellaneous. + + +1. Trademark. You agree to comply with Sun's Trademark & Logo +Usage Requirements, as modified from time to time, available at +http://www.sun.com/policies/trademarks/. Except as expressly provided +in this License, You are granted no rights in or to any Sun trademarks +now or hereafter used or licensed by Sun. + +2. Integration. This License represents the complete agreement of +the parties concerning the subject matter hereof. + +3. Severability. If any provision of this License is held +unenforceable, such provision shall be reformed to the extent +necessary to make it enforceable unless to do so would defeat the +intent of the parties, in which case, this License shall terminate. + +4. Governing Law. This License is governed by the laws of the +United States and the State of California, as applied to contracts +entered into and performed in California between California residents. +In no event shall this License be construed against the drafter. + +5. Export Control. As further described at +http://www.sun.com/its, you agree to comply with the U.S. export +controls and trade laws of other countries that apply to Technology +and Modifications. + +EOF_LICENSE + +agreed= +while [ x$agreed = x ]; do + echo + echo "Do you agree to the above license terms? [yes or no] " + read reply leftover + case $reply in + y* | Y*) + agreed=1 + ;; + n* | n*) + echo + echo "If you don't agree to the license you can't build this software" + exit 1 + ;; + esac +done diff --git a/java/jdk16/files/x_x2zip.c b/java/jdk16/files/x_x2zip.c new file mode 100644 index 000000000000..a57be47fc9bf --- /dev/null +++ b/java/jdk16/files/x_x2zip.c @@ -0,0 +1,117 @@ +/* + * Copyright (C) 2007 Greg Lewis. All rights reserved. + * + * 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. + * + * THIS SOFTWARE IS PROVIDED BY 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 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. + */ + +#include <sys/types.h> +#include <err.h> +#include <errno.h> +#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/stat.h> +#include <unistd.h> + +#ifndef BUFSIZ +#define BUFSIZ 0x10000 +#endif + +int +main(int argc, char* argv[]) { + char *key; + char *oname; + char buf[BUFSIZ]; + size_t keylen, olen; + int ifd, ofd, i, fileoff = 0, bufoff = 0, buflen = 0, eof = 0; + ssize_t bytes; + + if (argc < 3) { + errx(1, "Usage: x_x2zip <key> <file>"); + } + + // Key + key = argv[1]; + keylen = strlen(key); + + // Open input file + if ((ifd = open(argv[2], O_RDONLY)) == -1) { + err(1, "Can't open input file %s", argv[2]); + } + + // Open output file + olen = strlen(argv[2]) + 5; + if ((oname = (char *) malloc(olen)) == NULL) { + err(1, "Can't create output file name"); + } + if (strlcpy(oname, argv[2], olen) >= olen) { + err(1, "Can't create output file name"); + } + if (strlcat(oname, ".zip", olen) >= olen) { + err(1, "Can't create output file name"); + } + if ((ofd = open(oname, + O_CREAT | O_TRUNC | O_WRONLY, S_IRUSR | S_IWUSR)) == -1) { + err(1, "Can't open output file %s", oname); + } + free(oname); + + while (!eof) { + // Read into the buffer + bufoff = 0; + buflen = 0; + while (1) { + if (buflen >= BUFSIZ) { + break; + } + if ((bytes = read(ifd, buf, BUFSIZ - buflen)) == -1) { + err(1, "Error reading input file"); + } + if (!bytes) { + eof = 1; + break; + } + buflen += bytes; + } + + // Decrypt + for (i = 0; i < buflen; i++) { + buf[i] = buf[i] ^ key[(fileoff + i) % keylen]; + } + + // Update file offset + fileoff += buflen; + + // Output the buffer + bufoff = 0; + while (bufoff < buflen) { + if ((bytes = write(ofd, buf + bufoff, buflen - bufoff)) == -1) { + err(1, "Error writing output file"); + } + bufoff += bytes; + } + } + + return 0; +} |