forked from Lainports/freebsd-ports
Various fixes for -CURRENT.
- Build fixes after GCC 4.2 import. - Remove SIGRTMIN and SIGRTMAX redefinitions. - Use posix_memalign(3) instead of valloc(3). Approved by: glewis (maintainer)
This commit is contained in:
parent
9f5e551bf3
commit
7446ea7a70
42 changed files with 770 additions and 0 deletions
13
java/jdk15/files/patch-hotspot::amd64::vm::amd64.ad
Normal file
13
java/jdk15/files/patch-hotspot::amd64::vm::amd64.ad
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- ../../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);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
--- ../../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;
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
--- ../../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
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
--- ../../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;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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);
|
||||
|
||||
15
java/jdk15/files/patch-hotspot::bsd::vm::jvm_bsd.h
Normal file
15
java/jdk15/files/patch-hotspot::bsd::vm::jvm_bsd.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- ../../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
|
||||
11
java/jdk15/files/patch-hotspot::bsd::vm::osThread_bsd.hpp
Normal file
11
java/jdk15/files/patch-hotspot::bsd::vm::osThread_bsd.hpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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:
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- ../../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
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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) {
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- ../../hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp.orig Thu May 24 15:27:43 2007
|
||||
+++ ../../hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp Thu May 24 19:54:47 2007
|
||||
@@ -238,15 +238,15 @@
|
||||
// success, if not we return failure and the caller can retry.
|
||||
//
|
||||
_result = false;
|
||||
- if (uc->context_eip == (int)_old_addr.pc() ) {
|
||||
- uc->context_eip = (int)_new_addr.pc();
|
||||
+ if (uc->context_eip == (intptr_t)_old_addr.pc() ) {
|
||||
+ uc->context_eip = (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_eip == (int)_old_addr.pc()) {
|
||||
- linked_uc->context_eip = (int)_new_addr.pc();
|
||||
+ if (os::Bsd::valid_ucontext(thread, uc, linked_uc) && linked_uc->context_eip == (intptr_t)_old_addr.pc()) {
|
||||
+ linked_uc->context_eip = (intptr_t)_new_addr.pc();
|
||||
_result = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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) {
|
||||
14
java/jdk15/files/patch-hotspot::i486::vm::i486.ad
Normal file
14
java/jdk15/files/patch-hotspot::i486::vm::i486.ad
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
--- ../../hotspot/src/cpu/i486/vm/i486.ad.orig Thu May 24 15:27:42 2007
|
||||
+++ ../../hotspot/src/cpu/i486/vm/i486.ad Thu May 24 19:47:30 2007
|
||||
@@ -383,8 +383,9 @@
|
||||
void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec,
|
||||
int format) {
|
||||
#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");
|
||||
+ if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||
+ 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);
|
||||
26
java/jdk15/files/patch-hotspot::i486::vm::register_i486.hpp
Normal file
26
java/jdk15/files/patch-hotspot::i486::vm::register_i486.hpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
--- ../../hotspot/src/cpu/i486/vm/register_i486.hpp.orig Thu May 24 15:27:42 2007
|
||||
+++ ../../hotspot/src/cpu/i486/vm/register_i486.hpp Thu May 24 19:51:43 2007
|
||||
@@ -24,9 +24,9 @@
|
||||
static Register as_Register(int encoding) { return (Register)encoding; }
|
||||
|
||||
// accessors
|
||||
- int encoding() const { assert(is_valid(), "invalid register"); return (int)this; }
|
||||
- bool is_valid() const { return 0 <= (int)this && (int)this < number_of_registers; }
|
||||
- bool has_byte_register() const { return 0 <= (int)this && (int)this < number_of_byte_registers; }
|
||||
+ int encoding() const { assert(is_valid(), "invalid register"); return value(); }
|
||||
+ bool is_valid() const { return 0 <= value() && value() < number_of_registers; }
|
||||
+ bool has_byte_register() const { return 0 <= value() && value() < number_of_byte_registers; }
|
||||
const char* name() const;
|
||||
};
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
friend XMMRegister as_XMMRegister(int encoding) { return (XMMRegister)encoding; }
|
||||
|
||||
// accessors
|
||||
- int encoding() const { assert(is_valid(), "invalid register"); return (int)this; }
|
||||
- bool is_valid() const { return 0 <= (int)this && (int)this < number_of_registers; }
|
||||
+ int encoding() const { assert(is_valid(), "invalid register"); return value(); }
|
||||
+ bool is_valid() const { return 0 <= value() && value() < number_of_registers; }
|
||||
const char* name() const;
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
--- ../../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));
|
||||
22
java/jdk15/files/patch-j2se::awt::mlib_sys.c
Normal file
22
java/jdk15/files/patch-j2se::awt::mlib_sys.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--- ../../j2se/src/share/native/sun/awt/medialib/mlib_sys.c
|
||||
+++ ../../j2se/src/share/native/sun/awt/medialib/mlib_sys.c
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <mlib_types.h>
|
||||
#include <mlib_sys_proto.h>
|
||||
#include "mlib_SysMath.h"
|
||||
+#if defined(_ALLBSD_SOURCE)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
@@ -72,6 +75,9 @@
|
||||
* alignment. -- from stdlib.h of MS VC++5.0.
|
||||
*/
|
||||
return (void *) malloc(size);
|
||||
+#elif defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
|
||||
+ void *ret;
|
||||
+ return posix_memalign(&ret, 8, size) ? NULL : ret;
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
return valloc(size);
|
||||
#else
|
||||
21
java/jdk15/files/patch-j2se::bin::java_md.c
Normal file
21
java/jdk15/files/patch-j2se::bin::java_md.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--- ../../j2se/src/solaris/bin/java_md.c.orig Thu May 24 19:15:46 2007
|
||||
+++ ../../j2se/src/solaris/bin/java_md.c Thu May 24 19:14:59 2007
|
||||
@@ -1061,7 +1061,8 @@
|
||||
#if defined(_ALLBSD_SOURCE)
|
||||
|
||||
uint64_t result;
|
||||
- int mib[2], rlen;
|
||||
+ int mib[2];
|
||||
+ size_t rlen;
|
||||
|
||||
/* fetch sysctl(hw.physmem) value */
|
||||
mib[0] = CTL_HW;
|
||||
@@ -1635,7 +1636,7 @@
|
||||
while (dp != NULL) {
|
||||
cp = strchr(dp, (int)':');
|
||||
if (cp != NULL)
|
||||
- *cp = (char)NULL;
|
||||
+ *cp = '\0';
|
||||
if ((target = ProcessDir(info, dp)) != NULL)
|
||||
break;
|
||||
dp = cp;
|
||||
30
java/jdk15/files/patch-j2se::hpi::memory_md.c
Normal file
30
java/jdk15/files/patch-j2se::hpi::memory_md.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
--- ../../j2se/src/solaris/hpi/src/memory_md.c
|
||||
+++ ../../j2se/src/solaris/hpi/src/memory_md.c
|
||||
@@ -32,7 +32,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h> /* For perror() */
|
||||
#include <string.h>
|
||||
-#if !defined(_ALLBSD_SOURCE)
|
||||
+#if defined(_ALLBSD_SOURCE)
|
||||
+#include <sys/param.h>
|
||||
+#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
@@ -67,7 +69,16 @@
|
||||
static size_t memGrainSize; /* A page for Linux */
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
static size_t memGrainSize; /* A page for FreeBSD */
|
||||
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
|
||||
+static inline void *
|
||||
+memalign(size_t alignment, size_t size)
|
||||
+{
|
||||
+ void *ret;
|
||||
+ return posix_memalign(&ret, alignment, size) ? NULL : ret;
|
||||
+}
|
||||
+#else
|
||||
#define memalign(a, b) valloc(b)
|
||||
+#endif
|
||||
#else
|
||||
static unsigned int memGrainSize; /* A page for Solaris */
|
||||
#endif
|
||||
14
java/jdk15/files/patch-j2se::jar::main.cpp
Normal file
14
java/jdk15/files/patch-j2se::jar::main.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
--- ../../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"
|
||||
15
java/jdk15/files/patch-j2se::jdbc::Makefile
Normal file
15
java/jdk15/files/patch-j2se::jdbc::Makefile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- ../../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
|
||||
27
java/jdk15/files/patch-j2se::sound::HAE_API_BSDOS.c
Normal file
27
java/jdk15/files/patch-j2se::sound::HAE_API_BSDOS.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
--- ../../j2se/src/solaris/native/com/sun/media/sound/engine/HAE_API_BSDOS.c
|
||||
+++ ../../j2se/src/solaris/native/com/sun/media/sound/engine/HAE_API_BSDOS.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
+#include <sys/param.h>
|
||||
#include <sys/soundcard.h>
|
||||
#endif
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
@@ -67,7 +68,16 @@
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
|
||||
+static inline void *
|
||||
+memalign(size_t alignment, size_t size)
|
||||
+{
|
||||
+ void *ret;
|
||||
+ return posix_memalign(&ret, alignment, size) ? NULL : ret;
|
||||
+}
|
||||
+#else
|
||||
#define memalign(a, b) valloc(b)
|
||||
+#endif
|
||||
|
||||
// How many audio frames to generate at one time
|
||||
#define HAE_BSD_FRAMES_PER_BLOCK 8
|
||||
13
java/jdk16/files/patch-hotspot::amd64::vm::amd64.ad
Normal file
13
java/jdk16/files/patch-hotspot::amd64::vm::amd64.ad
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
--- ../../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);
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
--- ../../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;
|
||||
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
--- ../../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
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
--- ../../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;
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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);
|
||||
|
||||
15
java/jdk16/files/patch-hotspot::bsd::vm::jvm_bsd.h
Normal file
15
java/jdk16/files/patch-hotspot::bsd::vm::jvm_bsd.h
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- ../../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
|
||||
11
java/jdk16/files/patch-hotspot::bsd::vm::osThread_bsd.hpp
Normal file
11
java/jdk16/files/patch-hotspot::bsd::vm::osThread_bsd.hpp
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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:
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- ../../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
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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) {
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
--- ../../hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp.orig Thu May 24 15:27:43 2007
|
||||
+++ ../../hotspot/src/os_cpu/bsd_i486/vm/os_bsd_i486.cpp Thu May 24 19:54:47 2007
|
||||
@@ -238,15 +238,15 @@
|
||||
// success, if not we return failure and the caller can retry.
|
||||
//
|
||||
_result = false;
|
||||
- if (uc->context_eip == (int)_old_addr.pc() ) {
|
||||
- uc->context_eip = (int)_new_addr.pc();
|
||||
+ if (uc->context_eip == (intptr_t)_old_addr.pc() ) {
|
||||
+ uc->context_eip = (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_eip == (int)_old_addr.pc()) {
|
||||
- linked_uc->context_eip = (int)_new_addr.pc();
|
||||
+ if (os::Bsd::valid_ucontext(thread, uc, linked_uc) && linked_uc->context_eip == (intptr_t)_old_addr.pc()) {
|
||||
+ linked_uc->context_eip = (intptr_t)_new_addr.pc();
|
||||
_result = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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) {
|
||||
14
java/jdk16/files/patch-hotspot::i486::vm::i486.ad
Normal file
14
java/jdk16/files/patch-hotspot::i486::vm::i486.ad
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
--- ../../hotspot/src/cpu/i486/vm/i486.ad.orig Thu May 24 15:27:42 2007
|
||||
+++ ../../hotspot/src/cpu/i486/vm/i486.ad Thu May 24 19:47:30 2007
|
||||
@@ -383,8 +383,9 @@
|
||||
void emit_d32_reloc(CodeBuffer &cbuf, int d32, RelocationHolder const& rspec,
|
||||
int format) {
|
||||
#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");
|
||||
+ if (rspec.reloc()->type() == relocInfo::oop_type &&
|
||||
+ 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);
|
||||
26
java/jdk16/files/patch-hotspot::i486::vm::register_i486.hpp
Normal file
26
java/jdk16/files/patch-hotspot::i486::vm::register_i486.hpp
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
--- ../../hotspot/src/cpu/i486/vm/register_i486.hpp.orig Thu May 24 15:27:42 2007
|
||||
+++ ../../hotspot/src/cpu/i486/vm/register_i486.hpp Thu May 24 19:51:43 2007
|
||||
@@ -24,9 +24,9 @@
|
||||
static Register as_Register(int encoding) { return (Register)encoding; }
|
||||
|
||||
// accessors
|
||||
- int encoding() const { assert(is_valid(), "invalid register"); return (int)this; }
|
||||
- bool is_valid() const { return 0 <= (int)this && (int)this < number_of_registers; }
|
||||
- bool has_byte_register() const { return 0 <= (int)this && (int)this < number_of_byte_registers; }
|
||||
+ int encoding() const { assert(is_valid(), "invalid register"); return value(); }
|
||||
+ bool is_valid() const { return 0 <= value() && value() < number_of_registers; }
|
||||
+ bool has_byte_register() const { return 0 <= value() && value() < number_of_byte_registers; }
|
||||
const char* name() const;
|
||||
};
|
||||
|
||||
@@ -74,8 +74,8 @@
|
||||
friend XMMRegister as_XMMRegister(int encoding) { return (XMMRegister)encoding; }
|
||||
|
||||
// accessors
|
||||
- int encoding() const { assert(is_valid(), "invalid register"); return (int)this; }
|
||||
- bool is_valid() const { return 0 <= (int)this && (int)this < number_of_registers; }
|
||||
+ int encoding() const { assert(is_valid(), "invalid register"); return value(); }
|
||||
+ bool is_valid() const { return 0 <= value() && value() < number_of_registers; }
|
||||
const char* name() const;
|
||||
};
|
||||
|
||||
|
|
@ -0,0 +1,11 @@
|
|||
--- ../../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);
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
--- ../../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));
|
||||
22
java/jdk16/files/patch-j2se::awt::mlib_sys.c
Normal file
22
java/jdk16/files/patch-j2se::awt::mlib_sys.c
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
--- ../../j2se/src/share/native/sun/awt/medialib/mlib_sys.c
|
||||
+++ ../../j2se/src/share/native/sun/awt/medialib/mlib_sys.c
|
||||
@@ -15,6 +15,9 @@
|
||||
#include <mlib_types.h>
|
||||
#include <mlib_sys_proto.h>
|
||||
#include "mlib_SysMath.h"
|
||||
+#if defined(_ALLBSD_SOURCE)
|
||||
+#include <sys/param.h>
|
||||
+#endif
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
@@ -72,6 +75,9 @@
|
||||
* alignment. -- from stdlib.h of MS VC++5.0.
|
||||
*/
|
||||
return (void *) malloc(size);
|
||||
+#elif defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
|
||||
+ void *ret;
|
||||
+ return posix_memalign(&ret, 8, size) ? NULL : ret;
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
return valloc(size);
|
||||
#else
|
||||
21
java/jdk16/files/patch-j2se::bin::java_md.c
Normal file
21
java/jdk16/files/patch-j2se::bin::java_md.c
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
--- ../../j2se/src/solaris/bin/java_md.c.orig Thu May 24 19:15:46 2007
|
||||
+++ ../../j2se/src/solaris/bin/java_md.c Thu May 24 19:14:59 2007
|
||||
@@ -1061,7 +1061,8 @@
|
||||
#if defined(_ALLBSD_SOURCE)
|
||||
|
||||
uint64_t result;
|
||||
- int mib[2], rlen;
|
||||
+ int mib[2];
|
||||
+ size_t rlen;
|
||||
|
||||
/* fetch sysctl(hw.physmem) value */
|
||||
mib[0] = CTL_HW;
|
||||
@@ -1635,7 +1636,7 @@
|
||||
while (dp != NULL) {
|
||||
cp = strchr(dp, (int)':');
|
||||
if (cp != NULL)
|
||||
- *cp = (char)NULL;
|
||||
+ *cp = '\0';
|
||||
if ((target = ProcessDir(info, dp)) != NULL)
|
||||
break;
|
||||
dp = cp;
|
||||
30
java/jdk16/files/patch-j2se::hpi::memory_md.c
Normal file
30
java/jdk16/files/patch-j2se::hpi::memory_md.c
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
--- ../../j2se/src/solaris/hpi/src/memory_md.c
|
||||
+++ ../../j2se/src/solaris/hpi/src/memory_md.c
|
||||
@@ -32,7 +32,9 @@
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h> /* For perror() */
|
||||
#include <string.h>
|
||||
-#if !defined(_ALLBSD_SOURCE)
|
||||
+#if defined(_ALLBSD_SOURCE)
|
||||
+#include <sys/param.h>
|
||||
+#else
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
|
||||
@@ -67,7 +69,16 @@
|
||||
static size_t memGrainSize; /* A page for Linux */
|
||||
#elif defined(_ALLBSD_SOURCE)
|
||||
static size_t memGrainSize; /* A page for FreeBSD */
|
||||
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
|
||||
+static inline void *
|
||||
+memalign(size_t alignment, size_t size)
|
||||
+{
|
||||
+ void *ret;
|
||||
+ return posix_memalign(&ret, alignment, size) ? NULL : ret;
|
||||
+}
|
||||
+#else
|
||||
#define memalign(a, b) valloc(b)
|
||||
+#endif
|
||||
#else
|
||||
static unsigned int memGrainSize; /* A page for Solaris */
|
||||
#endif
|
||||
14
java/jdk16/files/patch-j2se::jar::main.cpp
Normal file
14
java/jdk16/files/patch-j2se::jar::main.cpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
--- ../../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"
|
||||
15
java/jdk16/files/patch-j2se::jdbc::Makefile
Normal file
15
java/jdk16/files/patch-j2se::jdbc::Makefile
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- ../../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
|
||||
27
java/jdk16/files/patch-j2se::sound::HAE_API_BSDOS.c
Normal file
27
java/jdk16/files/patch-j2se::sound::HAE_API_BSDOS.c
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
--- ../../j2se/src/solaris/native/com/sun/media/sound/engine/HAE_API_BSDOS.c
|
||||
+++ ../../j2se/src/solaris/native/com/sun/media/sound/engine/HAE_API_BSDOS.c
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <errno.h>
|
||||
|
||||
#ifdef __FreeBSD__
|
||||
+#include <sys/param.h>
|
||||
#include <sys/soundcard.h>
|
||||
#endif
|
||||
#if defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
@@ -67,7 +68,16 @@
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
||||
+#if defined(__FreeBSD__) && (__FreeBSD_version >= 700013)
|
||||
+static inline void *
|
||||
+memalign(size_t alignment, size_t size)
|
||||
+{
|
||||
+ void *ret;
|
||||
+ return posix_memalign(&ret, alignment, size) ? NULL : ret;
|
||||
+}
|
||||
+#else
|
||||
#define memalign(a, b) valloc(b)
|
||||
+#endif
|
||||
|
||||
// How many audio frames to generate at one time
|
||||
#define HAE_BSD_FRAMES_PER_BLOCK 8
|
||||
Loading…
Add table
Reference in a new issue