Patch xmlrpc-epi

From Second Life Wiki
Jump to navigation Jump to search

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:

diff -ur xmlrpc-epi-0.51-old/Makefile xmlrpc-epi-0.51-new/Makefile
--- xmlrpc-epi-0.51-old/Makefile	2006-04-27 14:55:33.000000000 -0700
+++ xmlrpc-epi-0.51-new/Makefile	2006-04-27 15:16:19.886773976 -0700
@@ -77,7 +77,7 @@
 STRIP = strip
 VERSION = 0.51
 
-SUBDIRS = expat src sample
+SUBDIRS = src
 
 CHANGE_LOG_GEN_BIN = scripts/cvs2cl.pl
 CHANGE_LOG_GEN_FLAGS = -t -r -b --accum -I ChangeLog --gmt --prune
Only in xmlrpc-epi-0.51-old/expat: .cvsignore
Only in xmlrpc-epi-0.51-old/expat: Makefile
Only in xmlrpc-epi-0.51-old/expat: Makefile.am
Only in xmlrpc-epi-0.51-old/expat: Makefile.in
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
 
-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
 
 
@@ -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"

Apply the patch:

patch -p1 < excise_expat.patch