view patches/raptor-1.4.18-cross.patch @ 6512:ccc20ae889ca default tip guix

mingw::guile-2.0.7 builds.
author Jan Nieuwenhuizen <janneke@gnu.org>
date Thu, 24 Mar 2016 08:03:39 +0100
parents 7642be552b8a
children
line wrap: on
line source

--- raptor-1.4.18/configure.ac.orig	2008-10-22 17:18:15.000000000 +0200
+++ raptor-1.4.18/configure.ac	2008-10-22 17:18:03.000000000 +0200
@@ -59,6 +59,7 @@ dnl Checks for programs.
 AC_CANONICAL_HOST
 AM_SANITY_CHECK
 AM_PROG_CC_STDC
+AM_PROG_CC_C_O
 
 m4_undefine([AC_PROG_CXX])
 m4_defun([AC_PROG_CXX],[])
@@ -295,7 +296,9 @@ int main(int argc, char* argv) {
   return is_c99("1234567");
 }], AC_MSG_RESULT(no),
     AC_DEFINE(HAVE_C99_VSNPRINTF, 1, [vsnprint has C99 compatible return value])
-    AC_MSG_RESULT(yes))
+    AC_MSG_RESULT(yes),
+    AC_DEFINE(HAVE_C99_VSNPRINTF, $ac_cv_vsnprint_result_c99, [vsnprint has C99 compatible return value])
+    AC_MSG_RESULT($ac_cv_vsnprint_result_c99))
 fi
 
 need_libm=no
@@ -387,7 +390,7 @@ if test $xmlp = 1 -a $xmlt = 1 -a  $ac_c
   LIBS="$LIBS -lxmlparse -lxmltok"
   AC_TRY_RUN([#include <stdio.h>
 	     main() {XML_ParserCreate(NULL); return(0);}],
-             worked=yes, worked=no, worked=no)
+             worked=yes, worked=no, worked=$ac_cv_libxmlparse_xml_parsercreate)
   if test $worked = yes; then
     # Old expat
     have_expat_lib=1
@@ -409,7 +412,7 @@ if test $libexpat = 1 -a $ac_cv_header_e
   LIBS="$LIBS -lexpat"
   AC_TRY_RUN([#include <stdio.h>
              main() {XML_ParserCreate(NULL); return(0);}],
-             worked=yes, worked=no, worked=no)
+             worked=yes, worked=no, worked=$ac_cv_expat_xml_parsercreate)
   if test $worked = yes; then
     # New expat - expat-1.95.0 or later
     have_expat_lib=1
@@ -456,7 +459,8 @@ int main(int argc, char **argv) {
             AC_DEFINE(EXPAT_UTF8_BOM_CRASH, 1, [does expat crash when it sees an initial UTF8 BOM?])
             AC_MSG_RESULT(no)
             AC_MSG_WARN(The available expat crashes on XML UTF-8 BOM in documents)
-            AC_MSG_WARN(Fix either by using libxml or expat 1.95.2+))
+            AC_MSG_WARN(Fix either by using libxml or expat 1.95.2+),
+	    AC_MSG_RESULT($ac_cv_expat_initial_utf8_bom))
 
   else
     AC_MSG_RESULT(no)
--- raptor-1.4.18/librdfa/curie.c.orig	2008-10-25 14:20:31.000000000 +0200
+++ raptor-1.4.18/librdfa/curie.c	2008-06-14 07:33:37.000000000 +0200
@@ -122,7 +122,7 @@ char* rdfa_resolve_uri(rdfacontext* cont
       {
          // 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* rdfa_resolve_uri(rdfacontext* cont
             char* end_index2;
 
             tmpstr = rdfa_replace_string(tmpstr, context->base);
-            end_index2= rindex(tmpstr, '/');
+            end_index2= strrchr(tmpstr, '/');
             end_index2++;
             *end_index2 = '\0';
 
--- raptor-1.4.18/librdfa/rdfa.c.orig	2008-10-25 14:21:02.000000000 +0200
+++ raptor-1.4.18/librdfa/rdfa.c	2008-10-25 14:21:57.000000000 +0200
@@ -163,7 +163,7 @@ static size_t rdfa_init_base(
       {
          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 @@ static void XMLCALL
       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))
          {
--- raptor-1.4.18/librdfa/triple.c.orig	2008-10-25 14:22:07.000000000 +0200
+++ raptor-1.4.18/librdfa/triple.c	2008-10-25 14:22:44.000000000 +0200
@@ -437,7 +437,7 @@ void rdfa_complete_object_literal_triple
       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 @@ void rdfa_complete_object_literal_triple
    // [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)))