Difference between revisions of "Patch xmlrpc-epi"

From Second Life Wiki
Jump to navigation Jump to search
Line 63: Line 63:
Save this into the file lindenlab/xmlrpc-epi-0.51/excise_expat.patch:
Save this into the file lindenlab/xmlrpc-epi-0.51/excise_expat.patch:
<pre>
<pre>
diff -ur xmlrpc-epi-0.51-old/Makefile xmlrpc-epi-0.51-new/Makefile
--- xmlrpc-epi-0.51/configure.in.orig 2002-06-24 01:48:29.000000000 +0200
--- xmlrpc-epi-0.51-old/Makefile 2006-04-27 14:55:33.000000000 -0700
+++ xmlrpc-epi-0.51/configure.in 2007-02-19 12:33:04.000000000 +0100
+++ xmlrpc-epi-0.51-new/Makefile 2006-04-27 15:16:19.886773976 -0700
@@ -19,8 +19,7 @@
@@ -77,7 +77,7 @@
STRIP = strip
VERSION = 0.51
   
   
dnl Checks for header files.
AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h malloc.h unistd.h)
-
+AC_CHECK_HEADERS(fcntl.h malloc.h unistd.h xmlparse.h)
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -35,8 +34,9 @@
AC_FUNC_STRFTIME
AC_CHECK_FUNCS(mktime strstr)
+AC_CHECK_LIB(expat, XML_Parse, , [AC_MSG_ERROR(libexpat not found)])
-AC_OUTPUT(src/Makefile Makefile sample/Makefile expat/Makefile expat/xmltok/Makefile expat/xmlparse/Makefile)
+AC_OUTPUT(src/Makefile Makefile sample/Makefile)
--- xmlrpc-epi-0.51/Makefile.am.orig 2001-04-10 03:37:40.000000000 +0200
+++ xmlrpc-epi-0.51/Makefile.am 2007-02-19 12:16:17.000000000 +0100
@@ -1,4 +1,4 @@
-SUBDIRS = expat src sample
-SUBDIRS = expat src sample
+SUBDIRS = src
+SUBDIRS = src sample
   
   
  CHANGE_LOG_GEN_BIN = scripts/cvs2cl.pl
  CHANGE_LOG_GEN_BIN = scripts/cvs2cl.pl
  CHANGE_LOG_GEN_FLAGS = -t -r -b --accum -I ChangeLog --gmt --prune
  CHANGE_LOG_GEN_FLAGS = -t -r -b --accum -I ChangeLog --gmt --prune
Only in xmlrpc-epi-0.51-old/expat: .cvsignore
--- xmlrpc-epi-0.51/src/Makefile.am.orig 2001-09-16 22:27:27.000000000 +0200
Only in xmlrpc-epi-0.51-old/expat: Makefile
+++ xmlrpc-epi-0.51/src/Makefile.am 2007-02-19 12:16:35.000000000 +0100
Only in xmlrpc-epi-0.51-old/expat: Makefile.am
@@ -1,9 +1,5 @@
Only in xmlrpc-epi-0.51-old/expat: Makefile.in
-INCLUDES=-I../liblm -I../expat/xmltok -I../expat/xmlparse -I/usr/local/ssl/include  
Only in xmlrpc-epi-0.51-old/expat: bin
-
Only in xmlrpc-epi-0.51-old/expat: expat.dsw
Only in xmlrpc-epi-0.51-new/expat: expat.h
Only in xmlrpc-epi-0.51-old/expat: expat.html
Only in xmlrpc-epi-0.51-old/expat: expat.mak
Only in xmlrpc-epi-0.51-new/expat: expat_external.h
Only in xmlrpc-epi-0.51-old/expat: gennmtab
Only in xmlrpc-epi-0.51-old/expat: lib
Only in xmlrpc-epi-0.51-old/expat: sample
Only in xmlrpc-epi-0.51-old/expat: xmlparse
Only in xmlrpc-epi-0.51-old/expat: xmltok
Only in xmlrpc-epi-0.51-old/expat: xmlwf
diff -ur xmlrpc-epi-0.51-old/src/Makefile xmlrpc-epi-0.51-new/src/Makefile
--- xmlrpc-epi-0.51-old/src/Makefile 2006-04-27 14:55:33.000000000 -0700
+++ xmlrpc-epi-0.51-new/src/Makefile 2006-04-27 15:16:55.809678179 -0700
@@ -75,12 +75,10 @@
STRIP = strip
VERSION = 0.51
-INCLUDES = -I../liblm -I../expat/xmltok -I../expat/xmlparse -I/usr/local/ssl/include  
+INCLUDES = -I../liblm -I../expat -I/usr/local/ssl/include
  lib_LTLIBRARIES = libxmlrpc.la
  lib_LTLIBRARIES = libxmlrpc.la
   
   
-libxmlrpc_la_LIBADD = ../expat/xmltok/libexpat_tok.la ../expat/xmlparse/libexpat_parse.la
-libxmlrpc_la_LIBADD = ../expat/xmltok/libexpat_tok.la ../expat/xmlparse/libexpat_parse.la
-
-
  libxmlrpc_la_SOURCES =  base64.c encodings.c queue.c simplestring.c xml_element.c xml_to_dandarpc.c xml_to_xmlrpc.c        xml_to_soap.c xmlrpc.c xmlrpc_introspection.c        system_methods.c
  libxmlrpc_la_SOURCES = \
  base64.c \
encodings.c \
@@ -130,8 +128,6 @@
CPPFLAGS =
LDFLAGS =
LIBS = -L/usr/local/lib
-libxmlrpc_la_DEPENDENCIES =  ../expat/xmltok/libexpat_tok.la \
-../expat/xmlparse/libexpat_parse.la
libxmlrpc_la_OBJECTS =  base64.lo encodings.lo queue.lo simplestring.lo \
xml_element.lo xml_to_dandarpc.lo xml_to_xmlrpc.lo xml_to_soap.lo \
xmlrpc.lo xmlrpc_introspection.lo system_methods.lo
diff -ur xmlrpc-epi-0.51-old/src/xml_element.c xmlrpc-epi-0.51-new/src/xml_element.c
--- xmlrpc-epi-0.51-old/src/xml_element.c 2002-05-23 10:46:51.000000000 -0700
+++ xmlrpc-epi-0.51-new/src/xml_element.c 2006-04-27 15:17:10.777888167 -0700
@@ -91,7 +91,7 @@
#include "xml_element.h"
#include "queue.h"
-#include "xmlparse.h"
+#include "expat.h"
#include "encodings.h"
#define my_free(thing)  if(thing) {free(thing); thing = 0;}
diff -ur xmlrpc-epi-0.51-old/src/xmlrpc.c xmlrpc-epi-0.51-new/src/xmlrpc.c
--- xmlrpc-epi-0.51-old/src/xmlrpc.c 2002-03-09 15:15:44.000000000 -0800
+++ xmlrpc-epi-0.51-new/src/xmlrpc.c 2006-04-27 15:17:25.464169532 -0700
@@ -120,7 +120,7 @@
#include "queue.h"
#include "xmlrpc.h"
-#include "xmlparse.h"
+#include "expat.h"
#include "base64.h"
#include "xml_to_xmlrpc.h"
</pre>
</pre>



Revision as of 12:19, 19 February 2007

patch 1

Save this into the file lindenlab/xmlrpc-epi-0.51/remove_iconv.patch (maybe is linden/xmlrpc-epi-0.51/remove_iconv.patch ?):

--- xmlrpc-epi-0.51/src/encodings.c	2002-03-12 10:08:18.000000000 -0800
+++ src/src/encodings.c	2006-05-02 08:16:07.000000000 -0700
@@ -35,12 +35,18 @@
 
 #include <stdlib.h>
 #include <errno.h>
-#include <iconv.h>
+//#include <iconv.h>
 #include "encodings.h"
 
 static char* convert(const char* src, int src_len, int *new_len, const char* from_enc, const char* to_enc) {
    char* outbuf = 0;
 
+   /*
+	*
+	*NOTE: Removed becuase windows does not have iconv, and mac
+	*      has link problems with it. For now, always use UTF8.
+	*
+
    if(src && src_len && from_enc && to_enc) {
       int outlenleft = src_len;
       int outlen = src_len;
@@ -87,6 +93,7 @@
          outbuf[outlen] = 0;
       }
    }
+   */
    return outbuf;
 }

Apply the patch:

patch -p1 < remove_iconv.patch

patch 2

Save this into the file lindenlab/xmlrpc-epi-0.51/rename_queue.patch:

--- xmlrpc-epi-0.51-old/src/queue.h	2001-05-18 10:29:09.000000000 -0700
+++ xmlrpc-epi-0.51-new/src/queue.h	2006-05-02 14:25:30.573246791 -0700
@@ -24,6 +24,9 @@
    #define True_ 1
 #endif
 
+/* 2006-05-02 Inserted to enable compilation of rpcserver on linux. Phoenix */
+#define queue xmlrpc_queue
+
 typedef struct nodeptr datanode;
 
 typedef struct nodeptr {

Apply the patch:

patch -p1 < rename_queue.patch

patch 3

Save this into the file lindenlab/xmlrpc-epi-0.51/excise_expat.patch:

--- xmlrpc-epi-0.51/configure.in.orig	2002-06-24 01:48:29.000000000 +0200
+++ xmlrpc-epi-0.51/configure.in	2007-02-19 12:33:04.000000000 +0100
@@ -19,8 +19,7 @@
 
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h malloc.h unistd.h)
-
+AC_CHECK_HEADERS(fcntl.h malloc.h unistd.h xmlparse.h)
 
 dnl Checks for typedefs, structures, and compiler characteristics.
 AC_C_CONST
@@ -35,8 +34,9 @@
 AC_FUNC_STRFTIME
 
 AC_CHECK_FUNCS(mktime strstr)
+AC_CHECK_LIB(expat, XML_Parse, , [AC_MSG_ERROR(libexpat not found)])
 
-AC_OUTPUT(src/Makefile Makefile sample/Makefile expat/Makefile expat/xmltok/Makefile expat/xmlparse/Makefile)
+AC_OUTPUT(src/Makefile Makefile sample/Makefile)
 
 
 
--- xmlrpc-epi-0.51/Makefile.am.orig	2001-04-10 03:37:40.000000000 +0200
+++ xmlrpc-epi-0.51/Makefile.am	2007-02-19 12:16:17.000000000 +0100
@@ -1,4 +1,4 @@
-SUBDIRS = expat src sample
+SUBDIRS = src sample
 
 CHANGE_LOG_GEN_BIN = scripts/cvs2cl.pl
 CHANGE_LOG_GEN_FLAGS = -t -r -b --accum -I ChangeLog --gmt --prune
--- xmlrpc-epi-0.51/src/Makefile.am.orig	2001-09-16 22:27:27.000000000 +0200
+++ xmlrpc-epi-0.51/src/Makefile.am	2007-02-19 12:16:35.000000000 +0100
@@ -1,9 +1,5 @@
-INCLUDES=-I../liblm -I../expat/xmltok -I../expat/xmlparse -I/usr/local/ssl/include 
-
 lib_LTLIBRARIES = libxmlrpc.la
 
-libxmlrpc_la_LIBADD = ../expat/xmltok/libexpat_tok.la ../expat/xmlparse/libexpat_parse.la
-
 libxmlrpc_la_SOURCES = \
 	base64.c \
 	encodings.c \

Apply the patch:

patch -p1 < excise_expat.patch