diff options
author | marino <marino@pkgsrc.org> | 2012-11-22 11:02:05 +0000 |
---|---|---|
committer | marino <marino@pkgsrc.org> | 2012-11-22 11:02:05 +0000 |
commit | 16ebc9390ec63f5eec29b720cb4e61dc361ed0d7 (patch) | |
tree | d22f36b77e8118c37f7b154f989eec3fcb42342a /lang/openjdk7/patches | |
parent | b3c0918039374ccc67262aaeef440f0fb2346830 (diff) | |
download | pkgsrc-16ebc9390ec63f5eec29b720cb4e61dc361ed0d7.tar.gz |
lang/openjdk7: return NULL, not bool, for pointers
Patches taken from upstream, source listed in patch comments.
Patch replaces return value "false" with "NULL"
Fixes build on gcc 4.7.x
Diffstat (limited to 'lang/openjdk7/patches')
-rw-r--r-- | lang/openjdk7/patches/patch-hotspot_src_share_vm_oops_constantPoolOop.cpp | 19 | ||||
-rw-r--r-- | lang/openjdk7/patches/patch-hotspot_src_share_vm_opto_loopnode.cpp | 19 |
2 files changed, 38 insertions, 0 deletions
diff --git a/lang/openjdk7/patches/patch-hotspot_src_share_vm_oops_constantPoolOop.cpp b/lang/openjdk7/patches/patch-hotspot_src_share_vm_oops_constantPoolOop.cpp new file mode 100644 index 00000000000..bbaf806dcfa --- /dev/null +++ b/lang/openjdk7/patches/patch-hotspot_src_share_vm_oops_constantPoolOop.cpp @@ -0,0 +1,19 @@ +$NetBSD: patch-hotspot_src_share_vm_oops_constantPoolOop.cpp,v 1.1 2012/11/22 11:02:05 marino Exp $ + +Patch taken from upstream: +SUBJ: Don't return booleans from methods returning pointers +http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f457154eee8b + +Fixes build on gcc 4.7 + +--- hotspot/src/share/vm/oops/constantPoolOop.cpp.orig 2011-06-27 16:14:04.000000000 +0000 ++++ hotspot/src/share/vm/oops/constantPoolOop.cpp +@@ -269,7 +269,7 @@ klassOop constantPoolOopDesc::klass_ref_ + methodOop constantPoolOopDesc::method_at_if_loaded(constantPoolHandle cpool, + int which, Bytecodes::Code invoke_code) { + assert(!constantPoolCacheOopDesc::is_secondary_index(which), "no indy instruction here"); +- if (cpool->cache() == NULL) return false; // nothing to load yet ++ if (cpool->cache() == NULL) return NULL; // nothing to load yet + int cache_index = which - CPCACHE_INDEX_TAG; + if (!(cache_index >= 0 && cache_index < cpool->cache()->length())) { + if (PrintMiscellaneous && (Verbose||WizardMode)) { diff --git a/lang/openjdk7/patches/patch-hotspot_src_share_vm_opto_loopnode.cpp b/lang/openjdk7/patches/patch-hotspot_src_share_vm_opto_loopnode.cpp new file mode 100644 index 00000000000..9c07c661220 --- /dev/null +++ b/lang/openjdk7/patches/patch-hotspot_src_share_vm_opto_loopnode.cpp @@ -0,0 +1,19 @@ +$NetBSD: patch-hotspot_src_share_vm_opto_loopnode.cpp,v 1.1 2012/11/22 11:02:05 marino Exp $ + +Patch taken from upstream: +SUBJ: Don't return booleans from methods returning pointers +http://hg.openjdk.java.net/hsx/hotspot-rt/hotspot/rev/f457154eee8b + +Fixes build on gcc 4.7 + +--- hotspot/src/share/vm/opto/loopnode.cpp.orig 2011-06-27 16:14:21.000000000 +0000 ++++ hotspot/src/share/vm/opto/loopnode.cpp +@@ -893,7 +893,7 @@ Node *LoopLimitNode::Identity( PhaseTran + Node* CountedLoopNode::match_incr_with_optional_truncation( + Node* expr, Node** trunc1, Node** trunc2, const TypeInt** trunc_type) { + // Quick cutouts: +- if (expr == NULL || expr->req() != 3) return false; ++ if (expr == NULL || expr->req() != 3) return NULL; + + Node *t1 = NULL; + Node *t2 = NULL; |