summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cppunit/ldflags.patch10
-rw-r--r--cppunit/makefile.mk4
-rw-r--r--fondu/makefile.mk69
-rw-r--r--fondu/prj/build.lst2
-rw-r--r--fondu/prj/d.lst2
-rw-r--r--lpsolve/lp_solve_5.5.patch5
-rw-r--r--np_sdk/mozsrc/npunix.c48
-rw-r--r--redland/README6
-rw-r--r--redland/redland/makefile.mk4
-rw-r--r--redland/redland/redland-1.0.8.patch.free_null174
-rw-r--r--redland/redland/redland-1.0.8.patch.storage_hashes_context_serialize_get_statement35
-rw-r--r--redland/redland/redland-1.0.8.patch.storage_hashes_list_duplicates170
12 files changed, 53 insertions, 476 deletions
diff --git a/cppunit/ldflags.patch b/cppunit/ldflags.patch
new file mode 100644
index 000000000000..cecd69a4b5ee
--- /dev/null
+++ b/cppunit/ldflags.patch
@@ -0,0 +1,10 @@
+--- misc/cppunit-1.12.1/src/cppunit/Makefile.am Wed Feb 20 06:36:38 2008
++++ misc/build/cppunit-1.12.1/src/cppunit/Makefile.am Mon May 3 17:00:41 2010
+@@ -63,5 +63,6 @@
+
+ libcppunit_la_LDFLAGS= \
+ -no-undefined -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
+- -release $(LT_RELEASE)
++ -release $(LT_RELEASE) \
++ @LIBADD_DL@
+
diff --git a/cppunit/makefile.mk b/cppunit/makefile.mk
index b57c341e2a23..4b1a7deac533 100644
--- a/cppunit/makefile.mk
+++ b/cppunit/makefile.mk
@@ -34,7 +34,7 @@ TARFILE_MD5=bd30e9cf5523cdfc019b94f5e1d7fd19
# from <https://sourceforge.net/projects/cppunit/files/cppunit/1.12.1/
# cppunit-1.12.1.tar.gz/download>
-PATCH_FILES = solarisfinite.patch warnings.patch windows.patch
+PATCH_FILES = solarisfinite.patch warnings.patch windows.patch ldflags.patch
# solarisfinite.patch: see <https://sourceforge.net/tracker/?func=detail&
# aid=2912590&group_id=11795&atid=311795>
# warnings.patch: see <https://sourceforge.net/tracker/?func=detail&
@@ -97,7 +97,7 @@ OOO_STLPORT_LIBS += -lm
# execute that program; however, the program would fail to locate the STLport
# library (another work-around might be to add something like --as-needed around
# $(LIBSTLPORT)):
-.IF "$(OS)" == "LINUX" || "$(OS)" == "SOLARIS"
+.IF "$(OS)" == "FREEBSD" || "$(OS)" == "LINUX" || "$(OS)" == "SOLARIS"
.IF "$(LD_LIBRARY_PATH)" == ""
LD_LIBRARY_PATH := $(SOLARLIBDIR)
# strictly speaking, this is incorrect if the LD_LIBRARY_PATH environment
diff --git a/fondu/makefile.mk b/fondu/makefile.mk
deleted file mode 100644
index b684461e0e34..000000000000
--- a/fondu/makefile.mk
+++ /dev/null
@@ -1,69 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org 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 Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=.
-
-PRJNAME=fondu
-TARGET=fondu
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-TARFILE_NAME=fondu_src-051010
-
-.IF "$(OS)"!="MACOSX" || "$(GUIBASE)"=="aqua"
-dummy:
- @echo "Nothing to build for OS $(OS)"
-.ENDIF # "$(OS)"!="MACOSX" || "$(GUIBASE)"=="aqua"
-
-CONFIGURE_DIR=.
-
-#relative to CONFIGURE_DIR
-CONFIGURE_ACTION=configure
-
-CONFIGURE_FLAGS=
-
-BUILD_DIR=$(CONFIGURE_DIR)
-
-BUILD_ACTION=$(GNUMAKE) fondu
-
-OUT2BIN=$(BUILD_DIR)$/fondu
-
-# --- Targets ------------------------------------------------------
-
-# contains some necessary variables.
-
-.INCLUDE : set_ext.mk
-
-.INCLUDE : target.mk
-
-# contains the "magic" to create targets out of the set variables.
-
-.INCLUDE : tg_ext.mk
diff --git a/fondu/prj/build.lst b/fondu/prj/build.lst
deleted file mode 100644
index d99a2c230c02..000000000000
--- a/fondu/prj/build.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-fd fondu : solenv NULL
-fd fondu nmake - u fd_fondu NULL
diff --git a/fondu/prj/d.lst b/fondu/prj/d.lst
deleted file mode 100644
index d68d83e80b74..000000000000
--- a/fondu/prj/d.lst
+++ /dev/null
@@ -1,2 +0,0 @@
-mkdir: %_DEST%\inc%_EXT%\fondu
-..\%__SRC%\bin\fondu %_DEST%\bin%_EXT%\fondu
diff --git a/lpsolve/lp_solve_5.5.patch b/lpsolve/lp_solve_5.5.patch
index fc446a4e5727..c6c780668554 100644
--- a/lpsolve/lp_solve_5.5.patch
+++ b/lpsolve/lp_solve_5.5.patch
@@ -26,7 +26,10 @@
+rm *.o 2>/dev/null
--- misc/lp_solve_5.5/lpsolve55/ccc.osx Thu Jun 23 22:53:08 2005
+++ misc/build/lp_solve_5.5/lpsolve55/ccc.osx Wed May 21 17:19:56 2008
-@@ -3,6 +3,10 @@
+@@ -1,8 +1,12 @@
+ src='../lp_MDO.c ../shared/commonlib.c ../shared/mmio.c ../shared/myblas.c ../ini.c ../fortify.c ../colamd/colamd.c ../lp_rlp.c ../lp_crash.c ../bfp/bfp_LUSOL/lp_LUSOL.c ../bfp/bfp_LUSOL/LUSOL/lusol.c ../lp_Hash.c ../lp_lib.c ../lp_wlp.c ../lp_matrix.c ../lp_mipbb.c ../lp_MPS.c ../lp_params.c ../lp_presolve.c ../lp_price.c ../lp_pricePSE.c ../lp_report.c ../lp_scale.c ../lp_simplex.c ../lp_SOS.c ../lp_utils.c ../yacc_read.c'
+-c=cc
++c=$CC
def=
so=
diff --git a/np_sdk/mozsrc/npunix.c b/np_sdk/mozsrc/npunix.c
index bac0a38f10d4..55d0fa5316d2 100644
--- a/np_sdk/mozsrc/npunix.c
+++ b/np_sdk/mozsrc/npunix.c
@@ -1,25 +1,41 @@
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*
- * The contents of this file are subject to the Mozilla Public
- * License Version 1.1 (the "License"); you may not use this file
- * except in compliance with the License. You may obtain a copy of
- * the License at http://www.mozilla.org/MPL/
+ * ***** BEGIN LICENSE BLOCK *****
+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
- * Software distributed under the License is distributed on an "AS
- * IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
- * implied. See the License for the specific language governing
- * rights and limitations under the License.
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
*
* The Original Code is mozilla.org code.
*
- * The Initial Developer of the Original Code is Netscape
- * Communications Corporation. Portions created by Netscape are
- * Copyright (C) 1998 Netscape Communications Corporation. All
- * Rights Reserved.
+ * The Initial Developer of the Original Code is
+ * Netscape Communications Corporation.
+ * Portions created by the Initial Developer are Copyright (C) 1998
+ * the Initial Developer. All Rights Reserved.
*
* Contributor(s):
- * Stephen Mak <smak@sun.com>
- */
+ * Stephen Mak <smak@sun.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either of the GNU General Public License Version 2 or later (the "GPL"),
+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+ * in which case the provisions of the GPL or the LGPL are applicable instead
+ * of those above. If you wish to allow use of your version of this file only
+ * under the terms of either the GPL or the LGPL, and not to allow others to
+ * use your version of this file under the terms of the MPL, indicate your
+ * decision by deleting the provisions above and replace them with the notice
+ * and other provisions required by the GPL or the LGPL. If you do not delete
+ * the provisions above, a recipient may use your version of this file under
+ * the terms of any one of the MPL, the GPL or the LGPL.
+ *
+ * ***** END LICENSE BLOCK ***** */
/*
* npunix.c
@@ -223,8 +239,6 @@ NPN_ForceRedraw(NPP instance)
CallNPN_ForceRedrawProc(gNetscapeFuncs.forceredraw, instance);
}
-
-
/***********************************************************************
*
* Wrapper functions : Netscape Navigator -> plugin
@@ -364,7 +378,7 @@ NP_GetMIMEDescription(void)
* that the navigator needs.
*/
NPError
-NP_GetValue(NPP future, NPPVariable variable, void *value)
+NP_GetValue(void* future, NPPVariable variable, void *value)
{
return NPP_GetValue(future, variable, value);
}
diff --git a/redland/README b/redland/README
index d01ae085cc66..87299ebf1fd4 100644
--- a/redland/README
+++ b/redland/README
@@ -22,7 +22,8 @@ Libraries: libraptor, librasqal, librdf
Patches:
There are several patches, most of which contain only hacks to get it to
build with OOo build system.
-There are also 3 patches that fix bugs in redland and are of general interest:
+There used to be also 3 patches here that fix bugs in redland and ought to be
+of general interest:
- redland-1.0.8.patch.free_null:
redland destructor functions don't check if argument is NULL
- redland-1.0.8.patch.storage_hashes_context_serialize_get_statement:
@@ -31,4 +32,7 @@ There are also 3 patches that fix bugs in redland and are of general interest:
- redland-1.0.8.patch.storage_hashes_list_duplicates:
hashes, list storage: if contexts are enabled, then it is possible to add
duplicate statements
+Attempts to upstream these patches failed for reasons upstream kept to
+themselves. Now these patches are replaced with workarounds in unoxml.
+Note to future maintainers: work around redland bugs in client code.
diff --git a/redland/redland/makefile.mk b/redland/redland/makefile.mk
index 9d516aa5e88b..d6acd4d8ea4d 100644
--- a/redland/redland/makefile.mk
+++ b/redland/redland/makefile.mk
@@ -59,9 +59,7 @@ OOO_PATCH_FILES= \
$(TARFILE_NAME).patch.win32
PATCH_FILES=$(OOO_PATCH_FILES) \
- $(TARFILE_NAME).patch.free_null \
- $(TARFILE_NAME).patch.storage_hashes_context_serialize_get_statement \
- $(TARFILE_NAME).patch.storage_hashes_list_duplicates
+
.IF "$(OS)"=="OS2"
BUILD_ACTION=dmake
diff --git a/redland/redland/redland-1.0.8.patch.free_null b/redland/redland/redland-1.0.8.patch.free_null
deleted file mode 100644
index 0524bb636b5e..000000000000
--- a/redland/redland/redland-1.0.8.patch.free_null
+++ /dev/null
@@ -1,174 +0,0 @@
---- misc/redland-1.0.8/librdf/rdf_digest.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_digest.c Thu Nov 6 12:44:39 2008
-@@ -248,6 +248,8 @@
- void
- librdf_free_digest(librdf_digest *digest)
- {
-+ if(!digest)
-+ return;
- if(digest->context)
- LIBRDF_FREE(digest_context, digest->context);
- if(digest->digest)
---- misc/redland-1.0.8/librdf/rdf_hash.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_hash.c Thu Nov 6 12:44:39 2008
-@@ -488,6 +488,8 @@
- void
- librdf_free_hash(librdf_hash* hash)
- {
-+ if(!hash)
-+ return;
- if(hash->context) {
- if(hash->is_open)
- librdf_hash_close(hash);
---- misc/redland-1.0.8/librdf/rdf_init.c Tue Nov 6 16:26:18 2007
-+++ misc/build/redland-1.0.8/librdf/rdf_init.c Mon Jun 16 15:55:51 2008
-@@ -178,6 +178,9 @@
- void
- librdf_free_world(librdf_world *world)
- {
-+ if(!world)
-+ return;
-+
- /* NOTE: raptor is always initialised as a parser and may
- * be also used as a serializer, but it is NOT finished
- * in the serializer_raptor registration. Therefore, always
---- misc/redland-1.0.8/librdf/rdf_list.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_list.c Thu Nov 6 12:44:39 2008
-@@ -106,6 +106,8 @@
- void
- librdf_free_list(librdf_list* list)
- {
-+ if(!list)
-+ return;
- LIBRDF_ASSERT_RETURN(list->iterator_count,
- "Iterators were active on freeing list", );
-
---- misc/redland-1.0.8/librdf/rdf_model.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_model.c Thu Nov 6 12:44:39 2008
-@@ -391,7 +391,8 @@
- librdf_iterator* iterator;
- librdf_model* m;
-
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(model, librdf_model);
-+ if(!model)
-+ return;
-
- if(--model->usage)
- return;
---- misc/redland-1.0.8/librdf/rdf_node.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_node.c Thu Nov 6 12:44:39 2008
-@@ -724,7 +724,8 @@
- librdf_world *world;
- #endif
-
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(node, librdf_node);
-+ if(!node)
-+ return;
-
- #ifdef WITH_THREADS
- world = node->world;
---- misc/redland-1.0.8/librdf/rdf_parser.c Tue Jul 1 08:09:58 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_parser.c Thu Nov 6 12:44:39 2008
-@@ -369,7 +369,8 @@
- void
- librdf_free_parser(librdf_parser *parser)
- {
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(parser, librdf_parser);
-+ if(!parser)
-+ return;
-
- if(parser->context) {
- if(parser->factory->terminate)
---- misc/redland-1.0.8/librdf/rdf_query.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_query.c Thu Nov 6 12:44:39 2008
-@@ -386,7 +386,8 @@
- void
- librdf_free_query(librdf_query* query)
- {
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(query, librdf_query);
-+ if(!query)
-+ return;
-
- if(--query->usage)
- return;
---- misc/redland-1.0.8/librdf/rdf_query_results.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_query_results.c Thu Nov 6 12:44:39 2008
-@@ -242,7 +242,8 @@
- void
- librdf_free_query_results(librdf_query_results* query_results)
- {
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(query_results, librdf_query_results);
-+ if(!query_results)
-+ return;
-
- if(query_results->query->factory->free_results)
- query_results->query->factory->free_results(query_results);
-@@ -634,6 +635,8 @@
- void
- librdf_free_query_results_formatter(librdf_query_results_formatter* formatter)
- {
-+ if(!formatter)
-+ return;
- if(formatter->query_results->query->factory->free_results_formatter)
- formatter->query_results->query->factory->free_results_formatter(formatter);
- }
---- misc/redland-1.0.8/librdf/rdf_serializer.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_serializer.c Thu Nov 6 12:44:39 2008
-@@ -371,7 +371,8 @@
- void
- librdf_free_serializer(librdf_serializer *serializer)
- {
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(serializer, librdf_serializer);
-+ if(!serializer)
-+ return;
-
- if(serializer->context) {
- if(serializer->factory->terminate)
---- misc/redland-1.0.8/librdf/rdf_statement.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_statement.c Thu Nov 6 12:44:39 2008
-@@ -253,7 +253,8 @@
- librdf_world *world;
- #endif
-
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(statement, librdf_statement);
-+ if(!statement)
-+ return;
-
- #ifdef WITH_THREADS
- world = statement->world;
---- misc/redland-1.0.8/librdf/rdf_storage.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_storage.c Thu Nov 6 12:44:39 2008
-@@ -610,7 +610,8 @@
- void
- librdf_free_storage(librdf_storage* storage)
- {
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(storage, librdf_storage);
-+ if(!storage)
-+ return;
-
- if(--storage->usage)
- return;
---- misc/redland-1.0.8/librdf/rdf_stream.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_stream.c Thu Nov 6 12:44:39 2008
-@@ -124,6 +124,9 @@
- void
- librdf_free_stream(librdf_stream* stream)
- {
-+ if(!stream)
-+ return;
-+
- if(stream->finished_method)
- stream->finished_method(stream->context);
-
---- misc/redland-1.0.8/librdf/rdf_uri.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_uri.c Thu Nov 6 12:44:39 2008
-@@ -407,7 +407,8 @@
- librdf_world *world;
- #endif
-
-- LIBRDF_ASSERT_OBJECT_POINTER_RETURN(uri, librdf_uri);
-+ if(!uri)
-+ return;
-
- #ifdef WITH_THREADS
- world = uri->world;
diff --git a/redland/redland/redland-1.0.8.patch.storage_hashes_context_serialize_get_statement b/redland/redland/redland-1.0.8.patch.storage_hashes_context_serialize_get_statement
deleted file mode 100644
index 8c72946d199f..000000000000
--- a/redland/redland/redland-1.0.8.patch.storage_hashes_context_serialize_get_statement
+++ /dev/null
@@ -1,35 +0,0 @@
---- misc/redland-1.0.8/librdf/rdf_storage_hashes.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_storage_hashes.c Thu Nov 6 12:44:39 2008
-@@ -1593,7 +1661,6 @@
- {
- librdf_storage_hashes_context_serialise_stream_context* scontext=(librdf_storage_hashes_context_serialise_stream_context*)context;
- librdf_hash_datum* v;
-- librdf_node** cnp=NULL;
-
- switch(flags) {
- case LIBRDF_ITERATOR_GET_METHOD_GET_OBJECT:
-@@ -1606,20 +1673,14 @@
- return scontext->context_node;
- }
-
-- /* current stuff is out of date - get new cached answers */
-- if(scontext->index_contexts) {
-- if(scontext->context_node)
-- librdf_free_node(scontext->context_node);
-- scontext->context_node=NULL;
-- cnp=&scontext->context_node;
-- }
--
-+ /* note: scontext->context_node is still valid */
-+
- librdf_statement_clear(&scontext->current);
-
- v=(librdf_hash_datum*)librdf_iterator_get_value(scontext->iterator);
--
-+
- /* decode value content and optional context */
-- if(!librdf_statement_decode_parts(&scontext->current, cnp,
-+ if(!librdf_statement_decode_parts(&scontext->current, NULL,
- (unsigned char*)v->data, v->size)) {
- return NULL;
- }
diff --git a/redland/redland/redland-1.0.8.patch.storage_hashes_list_duplicates b/redland/redland/redland-1.0.8.patch.storage_hashes_list_duplicates
deleted file mode 100644
index d2ef7e772230..000000000000
--- a/redland/redland/redland-1.0.8.patch.storage_hashes_list_duplicates
+++ /dev/null
@@ -1,170 +0,0 @@
---- misc/redland-1.0.8/librdf/rdf_storage_hashes.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_storage_hashes.c Thu Nov 6 12:44:39 2008
-@@ -1387,6 +1387,66 @@
- LIBRDF_STATEMENT_OBJECT);
- }
-
-+
-+/* return -1 on failure, 1 if context contains stmt, 0 if not */
-+static int
-+librdf_storage_hashes_context_contains_statement(librdf_storage* storage,
-+ librdf_node* context_node,
-+ librdf_statement* statement)
-+{
-+ librdf_storage_hashes_context* context=(librdf_storage_hashes_context*)storage->context;
-+ librdf_hash_datum key, value; /* on stack - not allocated */
-+ size_t size;
-+ int status;
-+
-+ if(context->contexts_index < 0) {
-+ librdf_log(storage->world, 0, LIBRDF_LOG_WARN, LIBRDF_FROM_STORAGE, NULL,
-+ "Storage was created without context support");
-+ return -1;
-+ }
-+
-+ /* ENCODE KEY */
-+ size=librdf_node_encode(context_node, NULL, 0);
-+ if (!size)
-+ return -1;
-+ key.data=(char*)LIBRDF_MALLOC(cstring, size);
-+ if (!key.data)
-+ return -1;
-+ key.size=librdf_node_encode(context_node,
-+ (unsigned char*)key.data, size);
-+ if (!key.size) {
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+
-+ /* ENCODE VALUE */
-+ size=librdf_statement_encode(statement, NULL, 0);
-+ if (!size) {
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+ value.data=(char*)LIBRDF_MALLOC(cstring, size);
-+ if (!value.data) {
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+ value.size=librdf_statement_encode(statement, (unsigned char*)value.data, size);
-+ if (!value.size) {
-+ LIBRDF_FREE(data, value.data);
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+
-+ status=librdf_hash_exists(context->hashes[context->contexts_index], &key, &value);
-+ LIBRDF_FREE(data, value.data);
-+ LIBRDF_FREE(data, key.data);
-+
-+ /* DO NOT free statement, ownership was not passed in */
-+ return status;
-+}
-+
-+
-+
- /**
- * librdf_storage_hashes_context_add_statement:
- * @storage: #librdf_storage object
-@@ -1412,7 +1472,15 @@
- "Storage was created without context support");
- return 1;
- }
--
-+
-+ /* Do not add duplicate statements */
-+ status=librdf_storage_hashes_context_contains_statement(storage, context_node, statement);
-+ if(status)
-+ if(status < 0)
-+ return 1;
-+ else
-+ return 0;
-+
- if(librdf_storage_hashes_add_remove_statement(storage,
- statement, context_node, 1))
- return 1;
---- misc/redland-1.0.8/librdf/rdf_storage_list.c Tue Jul 1 05:10:26 2008
-+++ misc/build/redland-1.0.8/librdf/rdf_storage_list.c Thu Nov 6 12:44:39 2008
-@@ -457,6 +457,64 @@
- }
-
-
-+/* return -1 on failure, 1 if context contains stmt, 0 if not */
-+static int
-+librdf_storage_list_context_contains_statement(librdf_storage* storage,
-+ librdf_node* context_node,
-+ librdf_statement* statement)
-+{
-+ librdf_storage_list_context* context=(librdf_storage_list_context*)storage->context;
-+ librdf_hash_datum key, value; /* on stack - not allocated */
-+ size_t size;
-+ int status;
-+
-+ if(!context->index_contexts) {
-+ librdf_log(storage->world, 0, LIBRDF_LOG_WARN, LIBRDF_FROM_STORAGE, NULL,
-+ "Storage was created without context support");
-+ return -1;
-+ }
-+
-+ /* ENCODE KEY */
-+ size=librdf_node_encode(context_node, NULL, 0);
-+ if (!size)
-+ return -1;
-+ key.data=(char*)LIBRDF_MALLOC(cstring, size);
-+ if (!key.data)
-+ return -1;
-+ key.size=librdf_node_encode(context_node,
-+ (unsigned char*)key.data, size);
-+ if (!key.size) {
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+
-+ /* ENCODE VALUE */
-+ size=librdf_statement_encode(statement, NULL, 0);
-+ if (!size) {
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+ value.data=(char*)LIBRDF_MALLOC(cstring, size);
-+ if (!value.data) {
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+ value.size=librdf_statement_encode(statement, (unsigned char*)value.data, size);
-+ if (!value.size) {
-+ LIBRDF_FREE(data, value.data);
-+ LIBRDF_FREE(data, key.data);
-+ return -1;
-+ }
-+
-+ status=librdf_hash_exists(context->contexts, &key, &value);
-+ LIBRDF_FREE(data, value.data);
-+ LIBRDF_FREE(data, key.data);
-+
-+ /* DO NOT free statement, ownership was not passed in */
-+ return status;
-+}
-+
-+
- /**
- * librdf_storage_list_context_add_statement:
- * @storage: #librdf_storage object
-@@ -483,7 +541,15 @@
- "Storage was created without context support");
- return 1;
- }
--
-+
-+ /* Do not add duplicate statements */
-+ status=librdf_storage_list_context_contains_statement(storage, context_node, statement);
-+ if(status)
-+ if(status < 0)
-+ return 1;
-+ else
-+ return 0;
-+
- /* Store statement + node in the storage_list */
- sln=(librdf_storage_list_node*)LIBRDF_MALLOC(librdf_storage_list_node, sizeof(librdf_storage_list_node));
- if(!sln)