diff options
author | Thorsten Behrens <tbehrens@novell.com> | 2011-09-27 17:42:51 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@novell.com> | 2011-09-27 17:44:17 +0200 |
commit | 201344f80572d839f9c5ff7ff6359f6555f93932 (patch) | |
tree | 33422b11950a309d17149954356394079f7e1c61 /redland | |
parent | e4486fe169054dde895e69a452aad94d3f3ca74a (diff) |
Replace raptor rindex calls with strrchr
Seems android libc is missing that - replaced by non-deprecated
posix func.
Diffstat (limited to 'redland')
-rw-r--r-- | redland/raptor/makefile.mk | 1 | ||||
-rw-r--r-- | redland/raptor/raptor-1.4.18.patch.rindex | 62 |
2 files changed, 63 insertions, 0 deletions
diff --git a/redland/raptor/makefile.mk b/redland/raptor/makefile.mk index 3b6f696cee45..d437a4d2d083 100644 --- a/redland/raptor/makefile.mk +++ b/redland/raptor/makefile.mk @@ -57,6 +57,7 @@ OOO_PATCH_FILES= \ $(TARFILE_NAME).patch.ooo_build \ $(TARFILE_NAME).patch.dmake \ $(TARFILE_NAME).patch.win32 \ + $(TARFILE_NAME).patch.rindex \ raptor-aix.patch .IF "$(CROSS_COMPILING)"=="YES" diff --git a/redland/raptor/raptor-1.4.18.patch.rindex b/redland/raptor/raptor-1.4.18.patch.rindex new file mode 100644 index 000000000000..d0c06520b2b6 --- /dev/null +++ b/redland/raptor/raptor-1.4.18.patch.rindex @@ -0,0 +1,62 @@ +--- misc/raptor-1.4.18/librdfa/curie.c 2008-06-14 07:33:37.000000000 +0200 ++++ misc/build/raptor-1.4.18/librdfa/curie.c 2011-09-27 14:48:34.000000000 +0200 +@@ -122,7 +122,7 @@ + { + // if we have a relative URI, chop off the name of the file + // and replace it with the relative pathname +- char* end_index = rindex(context->base, '/'); ++ char* end_index = strrchr(context->base, '/'); + + if(end_index != NULL) + { +@@ -130,7 +130,7 @@ + char* end_index2; + + tmpstr = rdfa_replace_string(tmpstr, context->base); +- end_index2= rindex(tmpstr, '/'); ++ end_index2= strrchr(tmpstr, '/'); + end_index2++; + *end_index2 = '\0'; + +--- misc/raptor-1.4.18/librdfa/rdfa.c 2008-06-16 04:02:58.000000000 +0200 ++++ misc/build/raptor-1.4.18/librdfa/rdfa.c 2011-09-27 15:03:12.000000000 +0200 +@@ -163,7 +163,7 @@ + { + char* href_start = strstr(base_start, "href="); + char* uri_start = href_start + 6; +- char* uri_end = index(uri_start, '"'); ++ char* uri_end = strchr(uri_start, '"'); + + if((uri_start != NULL) && (uri_end != NULL)) + { +@@ -898,8 +898,8 @@ + if(context->xml_literal != NULL) + { + // get the data between the first tag and the last tag +- content_start = index(context->xml_literal, '>'); +- content_end = rindex(context->xml_literal, '<'); ++ content_start = strchr(context->xml_literal, '>'); ++ content_end = strrchr(context->xml_literal, '<'); + + if((content_start != NULL) && (content_end != NULL)) + { +--- misc/raptor-1.4.18/librdfa/triple.c 2008-06-14 07:33:37.000000000 +0200 ++++ misc/build/raptor-1.4.18/librdfa/triple.c 2011-09-27 15:02:59.000000000 +0200 +@@ -437,7 +437,7 @@ + current_object_literal = context->content; + type = RDF_TYPE_PLAIN_LITERAL; + } +- else if(index(context->xml_literal, '<') == NULL) ++ else if(strchr(context->xml_literal, '<') == NULL) + { + current_object_literal = context->plain_literal; + type = RDF_TYPE_PLAIN_LITERAL; +@@ -467,7 +467,7 @@ + // [current element], i.e., not including the element itself, and + // giving it a datatype of rdf:XMLLiteral. + if((current_object_literal == NULL) && +- (index(context->xml_literal, '<') != NULL) && ++ (strchr(context->xml_literal, '<') != NULL) && + ((context->datatype == NULL) || + (strcmp(context->datatype, + "http://www.w3.org/1999/02/22-rdf-syntax-ns#XMLLiteral") == 0))) |