summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeri Harris <keri@gentoo.org>2007-02-03 00:58:27 +0000
committerKeri Harris <keri@gentoo.org>2007-02-03 00:58:27 +0000
commit9d628bd2d3ce05cb94dc50530cd89c216f5f7eab (patch)
tree65ac6a87d161a95b9e0991bbb20fbbb10e320349 /dev-lang/xsb
parentRemoving old version. (diff)
downloadgentoo-2-9d628bd2d3ce05cb94dc50530cd89c216f5f7eab.tar.gz
gentoo-2-9d628bd2d3ce05cb94dc50530cd89c216f5f7eab.tar.bz2
gentoo-2-9d628bd2d3ce05cb94dc50530cd89c216f5f7eab.zip
Fix clause_reference hashing in debug mode.
(Portage version: 2.1.2-r6)
Diffstat (limited to 'dev-lang/xsb')
-rw-r--r--dev-lang/xsb/ChangeLog6
-rw-r--r--dev-lang/xsb/files/xsb-3.0.1-debug.patch123
-rw-r--r--dev-lang/xsb/xsb-3.0.1.ebuild8
3 files changed, 134 insertions, 3 deletions
diff --git a/dev-lang/xsb/ChangeLog b/dev-lang/xsb/ChangeLog
index f9c3f54c19ba..bd922566f02d 100644
--- a/dev-lang/xsb/ChangeLog
+++ b/dev-lang/xsb/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for dev-lang/xsb
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/ChangeLog,v 1.5 2007/02/02 21:27:25 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/ChangeLog,v 1.6 2007/02/03 00:58:27 keri Exp $
+
+ 03 Feb 2007; keri <keri@gentoo.org> +files/xsb-3.0.1-debug.patch,
+ xsb-3.0.1.ebuild:
+ Fix clause_reference hashing in debug mode.
02 Feb 2007; keri <keri@gentoo.org> files/xsb-3.0.1-portage.patch:
Parallelize compile of Prolog engine.
diff --git a/dev-lang/xsb/files/xsb-3.0.1-debug.patch b/dev-lang/xsb/files/xsb-3.0.1-debug.patch
new file mode 100644
index 000000000000..c0c38ffc9a60
--- /dev/null
+++ b/dev-lang/xsb/files/xsb-3.0.1-debug.patch
@@ -0,0 +1,123 @@
+--- XSB.orig/emu/biassert.c 2006-07-26 02:18:41.000000000 +1200
++++ XSB/emu/biassert.c 2007-02-03 13:42:01.000000000 +1300
+@@ -2783,16 +2783,16 @@
+ /* remove it from index chains */
+ for( i = NI; i >= 1; i-- ) {
+ IP = ClRefIndPtr(Clause, i);
+- if (cell_opcode(IP) == dynnoop) /* deleting last in bucket */
++ if (cell_opcode(IP) == dynnoop) { /* deleting last in bucket */
+ sob = (SOBRef)IndRefNext(IP); /* so get SOB addr */
++ xsb_dbgmsg((LOG_RETRACT,
++ "SOB(%d) - hash size %d - %d clauses",
++ i, ClRefHashSize(sob), ClRefNumNonemptyBuckets(sob) ));
++ xsb_dbgmsg((LOG_RETRACT,
++ "Addr %p : prev %p : next %p",
++ sob, ClRefNext(sob), ClRefPrev(sob) ));
++ }
+ else sob = NULL;
+-
+- xsb_dbgmsg((LOG_RETRACT,
+- "SOB(%d) - hash size %d - %d clauses",
+- i, ClRefHashSize(sob), ClRefNumNonemptyBuckets(sob) ));
+- xsb_dbgmsg((LOG_RETRACT,
+- "Addr %p : prev %p : next %p",
+- sob, ClRefNext(sob), ClRefPrev(sob) ));
+ delete_from_hashchain(Clause,i,NI) ;
+ if (sob && --ClRefNumNonemptyBuckets(sob) == 0)
+ { /* if emptied bucket, decrement count; if all empty, reclaim SOB */
+--- XSB.orig/emu/complete_local.h 2005-11-18 12:24:24.000000000 +1300
++++ XSB/emu/complete_local.h 2007-01-30 21:24:09.000000000 +1300
+@@ -144,7 +144,7 @@
+
+ if (tcp_ptcp(subg_cp_ptr(prof_compl_subg)) != NULL ) {
+ print_sdg_edge(sdg_check_num,2,
+- tcp_ptcp(subg_cp_ptr(prof_compl_subg)),
++ (VariantSF)tcp_ptcp(subg_cp_ptr(prof_compl_subg)),
+ prof_compl_subg);
+ } else {
+ }
+@@ -152,7 +152,7 @@
+ nsf = subg_asf_list_ptr(prof_compl_subg);
+ while (nsf != NULL) {
+
+- print_sdg_edge(sdg_check_num,1,nlcp_ptcp(nsf),prof_compl_subg);
++ print_sdg_edge(sdg_check_num,1,(VariantSF)nlcp_ptcp(nsf),prof_compl_subg);
+
+ nsf = nlcp_prevlookup(nsf);
+ }
+@@ -160,7 +160,7 @@
+ nsf = subg_compl_susp_ptr(prof_compl_subg);
+ while (nsf != NULL) {
+
+- print_sdg_edge(sdg_check_num,-1,csf_ptcp(nsf),prof_compl_subg);
++ print_sdg_edge(sdg_check_num,-1,(VariantSF)csf_ptcp(nsf),prof_compl_subg);
+
+ nsf = csf_prevcsf(nsf);
+ }
+--- XSB.orig/emu/debug_xsb.c 2006-07-15 04:49:36.000000000 +1200
++++ XSB/emu/debug_xsb.c 2007-01-30 21:20:41.000000000 +1300
+@@ -283,7 +283,7 @@
+ fprintf(where,"choicepoint(address(%p),unknown_psc).\n", cpf);
+ }
+
+-#endif CP_DEBUG
++#endif /* CP_DEBUG */
+
+ /*-------------------------------------------*/
+
+@@ -423,7 +423,7 @@
+ alt_printnum++ ;
+ where = fopen(buf,"w") ;
+ if (! where)
+- { xsb_dbgmsg((LOG_GC, "could not open CP%d", printnum));
++ { xsb_dbgmsg((LOG_GC, "could not open CP%d", alt_printnum));
+ return;
+ }
+
+@@ -741,6 +741,22 @@
+ }
+ }
+
++/*
++ * Tries to make the interface more robust by cleaning-up any extra user
++ * input supplied to a prompt. Place a call to this function after any
++ * input scan which doesn't take the whole input line (ie. which isn't a
++ * `scanf("%s", &array);').
++ */
++static void skip_to_nl(void)
++{
++ char c;
++
++ do {
++ c = getchar();
++ } while (c != '\n');
++}
++
++
+ void print_tables(void)
+ {
+ int i = 0;
+@@ -886,23 +902,6 @@
+ fprintf(stddbg, "\n");
+ }
+
+-/*--------------------------------------------------------------------------*/
+-
+-/*
+- * Tries to make the interface more robust by cleaning-up any extra user
+- * input supplied to a prompt. Place a call to this function after any
+- * input scan which doesn't take the whole input line (ie. which isn't a
+- * `scanf("%s", &array);').
+- */
+-static void skip_to_nl(void)
+-{
+- char c;
+-
+- do {
+- c = getchar();
+- } while (c != '\n');
+-}
+-
+ /*----- For table debugging --------------------------------------------*/
+
+ static char *compl_stk_frame_field[] = {
diff --git a/dev-lang/xsb/xsb-3.0.1.ebuild b/dev-lang/xsb/xsb-3.0.1.ebuild
index 5bec325a9f13..de625a86659d 100644
--- a/dev-lang/xsb/xsb-3.0.1.ebuild
+++ b/dev-lang/xsb/xsb-3.0.1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/xsb-3.0.1.ebuild,v 1.2 2007/01/29 17:46:06 keri Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-lang/xsb/xsb-3.0.1.ebuild,v 1.3 2007/02/03 00:58:27 keri Exp $
MY_PN="XSB"
MY_P="${MY_PN}-${PV}"
@@ -14,7 +14,7 @@ SRC_URI="mirror://sourceforge/xsb/xsb-3.0.1-src.tar.gz"
LICENSE="GPL-2 LGPL-2"
SLOT="0"
KEYWORDS="~x86"
-IUSE="iodbc java libwww mysql odbc perl threads xml"
+IUSE="debug iodbc java libwww mysql odbc perl threads xml"
DEPEND="iodbc? ( dev-db/libiodbc )
java? ( virtual/jdk )
@@ -45,6 +45,7 @@ src_unpack() {
epatch "${FILESDIR}"/${P}-xpath.patch
epatch "${FILESDIR}"/${P}-xsb-script.patch
epatch "${FILESDIR}"/${P}-nostrip.patch
+ epatch "${FILESDIR}"/${P}-debug.patch
}
src_compile() {
@@ -60,6 +61,9 @@ src_compile() {
$(use_with odbc) \
$(use_with iodbc) \
$(use_enable java interprolog) \
+ $(use_enable debug) \
+ $(use_enable debug debug-verbose) \
+ $(use_enable debug profile) \
|| die "econf failed"
emake -j1 || die "emake failed"