test: xmlrpc-epi-php.patch (NEW) - add

glen glen at pld-linux.org
Wed Jun 6 17:23:08 CEST 2007


Author: glen                         Date: Wed Jun  6 15:23:08 2007 GMT
Module: test                          Tag: HEAD
---- Log message:
- add

---- Files affected:
test:
   xmlrpc-epi-php.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: test/xmlrpc-epi-php.patch
diff -u /dev/null test/xmlrpc-epi-php.patch:1.1
--- /dev/null	Wed Jun  6 17:23:08 2007
+++ test/xmlrpc-epi-php.patch	Wed Jun  6 17:23:03 2007
@@ -0,0 +1,4295 @@
+Only in ext/xmlrpc/libxmlrpc/: acinclude.m4
+diff -ur ../xmlrpc-epi-0.51/src/base64.c ext/xmlrpc/libxmlrpc/base64.c
+--- ../xmlrpc-epi-0.51/src/base64.c	2002-02-13 22:58:50.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/base64.c	2007-03-04 21:30:56.000000000 +0200
+@@ -1,4 +1,4 @@
+-static const char rcsid[] = "#(@) $Id$";
++static const char rcsid[] = "#(@) $Id$";
+ 
+ /*
+ 
+@@ -11,9 +11,10 @@
+ 
+ */
+ #include <stdio.h>
+-#include <ctype.h>
++
+ /*  ENCODE  --	Encode binary file into base64.  */
+ #include <stdlib.h>
++#include <ctype.h>
+ 
+ #include "base64.h"
+ 
+@@ -48,12 +49,11 @@
+   b->data = NULL;
+ }
+ 
+-void base64_encode(struct buffer_st *b, const char *source, int length)
++void base64_encode_xmlrpc(struct buffer_st *b, const char *source, int length)
+ {
+   int i, hiteof = 0;
+   int offset = 0;
+   int olen;
+-  char *dest;
+   
+   olen = 0;
+   
+@@ -104,17 +104,17 @@
+       for (i = 0; i < 4; i++) {
+ 	buffer_add(b, ogroup[i]);
+ 	if (!(b->offset % 72)) {
+-	  // buffer_add(b, '\r');
++	  /* buffer_add(b, '\r'); */
+ 	  buffer_add(b, '\n');
+ 	}
+       }
+     }
+   }
+-  // buffer_add(b, '\r');
++  /* buffer_add(b, '\r'); */
+   buffer_add(b, '\n');
+ }
+ 
+-void base64_decode(struct buffer_st *bfr, const char *source, int length)
++void base64_decode_xmlrpc(struct buffer_st *bfr, const char *source, int length)
+ {
+     int i;
+     int offset = 0;
+diff -ur ../xmlrpc-epi-0.51/src/base64.h ext/xmlrpc/libxmlrpc/base64.h
+--- ../xmlrpc-epi-0.51/src/base64.h	2001-03-20 05:28:35.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/base64.h	2007-03-04 21:30:56.000000000 +0200
+@@ -21,8 +21,8 @@
+ void buffer_add(struct buffer_st *b, char c);
+ void buffer_delete(struct buffer_st *b);
+ 
+-void base64_encode(struct buffer_st *b, const char *source, int length);
+-void base64_decode(struct buffer_st *b, const char *source, int length);
++void base64_encode_xmlrpc(struct buffer_st *b, const char *source, int length);
++void base64_decode_xmlrpc(struct buffer_st *b, const char *source, int length);
+ 
+ /*
+ #define DEBUG_MALLOC
+Only in ../xmlrpc-epi-0.51/src/: .cvsignore
+diff -ur ../xmlrpc-epi-0.51/src/encodings.c ext/xmlrpc/libxmlrpc/encodings.c
+--- ../xmlrpc-epi-0.51/src/encodings.c	2002-03-12 20:08:18.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/encodings.c	2004-03-09 01:04:33.000000000 +0200
+@@ -30,23 +30,37 @@
+ 
+ */
+ 
++#ifdef HAVE_CONFIG_H
++#include "config.h"
++#endif
++
++#ifndef PHP_WIN32
++#include <php_config.h>
++#else
++#include <config.w32.h>
++#include <stdlib.h>
++#endif
+ 
+-static const char rcsid[] = "#(@) $Id$";
++static const char rcsid[] = "#(@) $Id$";
+ 
+-#include <stdlib.h>
+ #include <errno.h>
++
++#ifdef HAVE_GICONV_H
++#include <giconv.h>
++#else
+ #include <iconv.h>
++#endif
++
+ #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;
+ 
+    if(src && src_len && from_enc && to_enc) {
+-      int outlenleft = src_len;
++      size_t outlenleft = src_len;
++      size_t inlenleft = src_len;
+       int outlen = src_len;
+-      int inlenleft = src_len;
+       iconv_t ic = iconv_open(to_enc, from_enc);
+-      char* src_ptr = (char*)src;
+       char* out_ptr = 0;
+ 
+       if(ic != (iconv_t)-1) {
+@@ -56,7 +70,7 @@
+          if(outbuf) {
+             out_ptr = (char*)outbuf;
+             while(inlenleft) {
+-               st = iconv(ic, &src_ptr, &inlenleft, &out_ptr, &outlenleft);
++               st = iconv(ic, (char**)&src, &inlenleft, &out_ptr, &outlenleft);
+                if(st == -1) {
+                   if(errno == E2BIG) {
+                      int diff = out_ptr - outbuf;
+Only in ../xmlrpc-epi-0.51/src/: Makefile.am
+Only in ../xmlrpc-epi-0.51/src/: Makefile.in
+diff -ur ../xmlrpc-epi-0.51/src/queue.c ext/xmlrpc/libxmlrpc/queue.c
+--- ../xmlrpc-epi-0.51/src/queue.c	2002-03-12 20:08:18.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/queue.c	2002-07-05 07:43:53.000000000 +0300
+@@ -1,4 +1,4 @@
+-static const char rcsid[] = "#(@) $Id$";
++static const char rcsid[] = "#(@) $Id$";
+ 
+ /* 
+  * Date last modified: Jan 2001
+@@ -97,7 +97,9 @@
+  *
+  ****************************************************************/
+ 
+-
++#ifdef _WIN32
++#include "xmlrpc_win32.h"
++#endif
+ #include <stdlib.h>
+ #include "queue.h"
+ 
+diff -ur ../xmlrpc-epi-0.51/src/queue.h ext/xmlrpc/libxmlrpc/queue.h
+--- ../xmlrpc-epi-0.51/src/queue.h	2001-05-18 19:29:09.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/queue.h	2004-04-27 20:33:59.000000000 +0300
+@@ -76,8 +76,8 @@
+ q_iter Q_Iter_Next(q_iter qi);
+ q_iter Q_Iter_Prev(q_iter qi);
+ void*  Q_Iter_Get(q_iter qi);
+-int    Q_Iter_Put(q_iter qi, void* data); // not read only! here for completeness.
+-void*  Q_Iter_Del(queue *q, q_iter iter); // not read only! here for completeness.
++int    Q_Iter_Put(q_iter qi, void* data); /* not read only! here for completeness. */
++void*  Q_Iter_Del(queue *q, q_iter iter); /* not read only! here for completeness. */
+ 
+ /* Fast (macro'd) versions of above */
+ #define Q_Iter_Head_F(q) (q ? (q_iter)((queue*)q)->head : NULL)
+diff -ur ../xmlrpc-epi-0.51/src/simplestring.c ext/xmlrpc/libxmlrpc/simplestring.c
+--- ../xmlrpc-epi-0.51/src/simplestring.c	2002-02-13 22:58:50.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/simplestring.c	2003-12-16 23:00:21.000000000 +0200
+@@ -31,10 +31,8 @@
+ */
+ 
+ 
+-static const char rcsid[] = "#(@) $Id$";
++static const char rcsid[] = "#(@) $Id$";
+ 
+-#include <string.h>
+-#include <stdlib.h>
+ 
+ #define SIMPLESTRING_INCR 32
+ 
+@@ -47,6 +45,15 @@
+  *   06/2000
+  * HISTORY
+  *   $Log$
+  *   Revision 1.1  2007/06/06 15:23:03  glen
+  *   - add
+  *
++ *   Revision 1.4  2003/12/16 21:00:21  sniper
++ *   Fix some compile warnings (patch by Joe Orton)
++ *
++ *   Revision 1.3  2002/08/22 01:25:50  sniper
++ *   kill some compile warnings
++ *
++ *   Revision 1.2  2002/07/05 04:43:53  danda
++ *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
++ *
+  *   Revision 1.4  2002/02/13 20:58:50  danda
+  *   patch to make source more windows friendly, contributed by Jeff Lawson
+  *
+@@ -74,7 +81,8 @@
+  *   there must be some.
+  ******/
+ 
+-
++#include <stdlib.h>
++#include <string.h>
+ #include "simplestring.h"
+ 
+ #define my_free(thing)  if(thing) {free(thing); thing = 0;}
+Only in ../xmlrpc-epi-0.51/src/: .swp
+diff -ur ../xmlrpc-epi-0.51/src/system_methods.c ext/xmlrpc/libxmlrpc/system_methods.c
+--- ../xmlrpc-epi-0.51/src/system_methods.c	2001-09-29 23:58:05.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/system_methods.c	2002-07-05 07:43:53.000000000 +0300
+@@ -36,6 +36,9 @@
+  *   Dan Libby, aka danda  (dan at libby.com)
+  * HISTORY
+  *   $Log$
+  *   Revision 1.1  2007/06/06 15:23:03  glen
+  *   - add
+  *
++ *   Revision 1.2  2002/07/05 04:43:53  danda
++ *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
++ *
+  *   Revision 1.7  2001/09/29 21:58:05  danda
+  *   adding cvs log to history section
+  *
+diff -ur ../xmlrpc-epi-0.51/src/xml_element.c ext/xmlrpc/libxmlrpc/xml_element.c
+--- ../xmlrpc-epi-0.51/src/xml_element.c	2007-06-06 18:00:06.387783244 +0300
++++ ext/xmlrpc/libxmlrpc/xml_element.c	2006-07-30 15:31:20.000000000 +0300
+@@ -31,7 +31,7 @@
+ */
+ 
+ 
+-static const char rcsid[] = "#(@) $Id$";
++static const char rcsid[] = "#(@) $Id$";
+ 
+ 
+ 
+@@ -44,6 +44,35 @@
+  *   06/2000
+  * HISTORY
+  *   $Log$
+  *   Revision 1.1  2007/06/06 15:23:03  glen
+  *   - add
+  *
++ *   Revision 1.9.4.1  2006/07/30 11:34:02  tony2001
++ *   MFH: fix compile warnings (#38257)
++ *
++ *   Revision 1.9  2005/04/22 11:06:53  jorton
++ *   Fixed bug #32797 (invalid C code in xmlrpc extension).
++ *
++ *   Revision 1.8  2005/03/28 00:07:24  edink
++ *   Reshufle includes to make it compile on windows
++ *
++ *   Revision 1.7  2005/03/26 03:13:58  sniper
++ *   - Made it possible to build ext/xmlrpc with libxml2
++ *
++ *   Revision 1.6  2004/06/01 20:16:06  iliaa
++ *   Fixed bug #28597 (xmlrpc_encode_request() incorrectly encodes chars in
++ *   200-210 range).
++ *   Patch by: fernando dot nemec at folha dot com dot br
++ *
++ *   Revision 1.5  2003/12/16 21:00:21  sniper
++ *   Fix some compile warnings (patch by Joe Orton)
++ *
++ *   Revision 1.4  2002/11/26 23:01:16  fmk
++ *   removing unused variables
++ *
++ *   Revision 1.3  2002/07/05 04:43:53  danda
++ *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
++ *
++ *   Revision 1.9  2002/07/03 20:54:30  danda
++ *   root element should not have a parent. patch from anon SF user
++ *
+  *   Revision 1.8  2002/05/23 17:46:51  danda
+  *   patch from mukund - fix non utf-8 encoding conversions
+  *
+@@ -84,25 +113,19 @@
+  *   there must be some.
+  ******/
+  
+-
++#include "ext/xml/expat_compat.h"
++#ifdef _WIN32
++#include "xmlrpc_win32.h"
++#endif
+ #include <stdlib.h>
+ #include <string.h>
+ #include <ctype.h>
+ 
+ #include "xml_element.h"
+ #include "queue.h"
+-#ifdef HAVE_XMLPARSE_H
+-#include "xmlparse.h"
+-#else
+-#ifdef HAVE_EXPAT_H
+-#include <expat.h>
+-#else
+-#error expat headers not found!!!
+-#endif
+-#endif
+ #include "encodings.h"
+ 
+-#define my_free(thing)  if(thing) {free(thing); thing = 0;}
++#define my_free(thing)  if(thing) {free(thing); thing = NULL;}
+ 
+ #define XML_DECL_START                 "<?xml"
+ #define XML_DECL_START_LEN             sizeof(XML_DECL_START) - 1
+@@ -178,7 +201,10 @@
+ 
+       Q_Destroy(&root->children);
+       Q_Destroy(&root->attrs);
+-      my_free(root->name);
++      if(root->name) {
++          free((char *)root->name);
++          root->name = NULL;
++      }
+       simplestring_free(&root->text);
+       my_free(root);
+    }
+@@ -262,10 +288,9 @@
+     pString[counter++] = c / 100 + '0';
+     c = c % 100;
+   }
+-  if(c >= 10) {
+-    pString[counter++] = c / 10 + '0';
+-    c = c % 10;
+-  }
++  pString[counter++] = c / 10 + '0';
++  c = c % 10;
++
+   pString[counter++] = c + '0';
+   pString[counter++] = ';';
+   return counter; 
+@@ -469,18 +494,20 @@
+ }
+ 
+ /* print buf to file */
+-static file_out_fptr(void *f, const char *text, int size)
++static int file_out_fptr(void *f, const char *text, int size)
+ {
+    fputs(text, (FILE *)f);
++   return 0;
+ }
+ 
+ /* print buf to simplestring */
+-static simplestring_out_fptr(void *f, const char *text, int size)
++static int simplestring_out_fptr(void *f, const char *text, int size)
+ {
+    simplestring* buf = (simplestring*)f;
+    if(buf) {
+       simplestring_addn(buf, text, size);
+    }
++   return 0;
+ }
+ 
+ /****f* xml_element/xml_elem_serialize_to_string
+@@ -560,9 +587,8 @@
+ 
+ 
+ /* expat start of element handler */
+-static void startElement(void *userData, const char *name, const char **attrs)
++static void _xmlrpc_startElement(void *userData, const char *name, const char **attrs)
+ {
+-   int i;
+    xml_element *c;
+    xml_elem_data* mydata = (xml_elem_data*)userData;
+    const char** p = attrs;
+@@ -589,7 +615,7 @@
+ }
+ 
+ /* expat end of element handler */
+-static void endElement(void *userData, const char *name)
++static void _xmlrpc_endElement(void *userData, const char *name)
+ {
+    xml_elem_data* mydata = (xml_elem_data*)userData;
+ 
+@@ -601,7 +627,7 @@
+ }
+ 
+ /* expat char data handler */
+-static void charHandler(void *userData,
++static void _xmlrpc_charHandler(void *userData,
+                         const char *s,
+                         int len)
+ {
+@@ -674,8 +700,8 @@
+       mydata.input_options = options;
+       mydata.needs_enc_conversion = options->encoding && strcmp(options->encoding, encoding_utf_8);
+ 
+-      XML_SetElementHandler(parser, startElement, endElement);
+-      XML_SetCharacterDataHandler(parser, charHandler);
++      XML_SetElementHandler(parser, (XML_StartElementHandler)_xmlrpc_startElement, (XML_EndElementHandler)_xmlrpc_endElement);
++      XML_SetCharacterDataHandler(parser, (XML_CharacterDataHandler)_xmlrpc_charHandler);
+ 
+       /* pass the xml_elem_data struct along */
+       XML_SetUserData(parser, (void*)&mydata);
+@@ -691,17 +717,11 @@
+          int col_num = XML_GetCurrentColumnNumber(parser);
+          long byte_idx = XML_GetCurrentByteIndex(parser);
+          int byte_total = XML_GetCurrentByteCount(parser);
+-#ifdef HAVE_XMLPARSE_H
+-         const XML_LChar * error_str = XML_ErrorString(err_code);
+-#else
+-#ifdef HAVE_EXPAT_H
+-         const XMLPARSEAPI(XML_LChar) * error_str = XML_ErrorString(err_code);
+-#endif
+-#endif
++         const char * error_str = XML_ErrorString(err_code);
+          if(byte_idx >= 0) {
+              snprintf(buf, 
+                       sizeof(buf),
+-                      "\n\tdata beginning %i before byte index: %s\n",
++                      "\n\tdata beginning %ld before byte index: %s\n",
+                       byte_idx > 10  ? 10 : byte_idx,
+                       in_buf + (byte_idx > 10 ? byte_idx - 10 : byte_idx));
+          }
+@@ -710,7 +730,7 @@
+                 "\tdescription: %s\n"
+                 "\tline: %i\n"
+                 "\tcolumn: %i\n"
+-                "\tbyte index: %i\n"
++                "\tbyte index: %ld\n"
+                 "\ttotal bytes: %i\n%s ",
+                 err_code, error_str, line_num, 
+                 col_num, byte_idx, byte_total, buf);
+@@ -727,6 +747,7 @@
+       }
+       else {
+          xReturn = (xml_element*)Q_Head(&mydata.root->children);
++         xReturn->parent = NULL;
+       }
+ 
+       XML_ParserFree(parser);
+Only in ../xmlrpc-epi-0.51/src/: xml_element.c.~1~
+diff -ur ../xmlrpc-epi-0.51/src/xml_element.h ext/xmlrpc/libxmlrpc/xml_element.h
+--- ../xmlrpc-epi-0.51/src/xml_element.h	2001-05-07 07:57:32.000000000 +0200
++++ ext/xmlrpc/libxmlrpc/xml_element.h	2001-10-25 08:51:12.000000000 +0200
+@@ -158,7 +158,7 @@
+ 
+ void xml_elem_free(xml_element* root);
+ void xml_elem_free_non_recurse(xml_element* root);
+-xml_element* xml_elem_new();
++xml_element* xml_elem_new(void);
+ char* xml_elem_serialize_to_string(xml_element *el, XML_ELEM_OUTPUT_OPTIONS options, int *buf_len);
+ void xml_elem_serialize_to_stream(xml_element *el, FILE *output, XML_ELEM_OUTPUT_OPTIONS options);
+ xml_element* xml_elem_parse_buf(const char* in_buf, int len, XML_ELEM_INPUT_OPTIONS options, XML_ELEM_ERROR error);
+diff -ur ../xmlrpc-epi-0.51/src/xmlrpc.c ext/xmlrpc/libxmlrpc/xmlrpc.c
+--- ../xmlrpc-epi-0.51/src/xmlrpc.c	2007-06-06 18:00:06.387783244 +0300
++++ ext/xmlrpc/libxmlrpc/xmlrpc.c	2006-11-30 19:31:00.000000000 +0200
+@@ -31,8 +31,7 @@
+ */
+ 
+ 
+-static const char rcsid[] =
+-"#(@) $Id$";
++static const char rcsid[] = "#(@) $Id$";
+ 
+ 
+ /****h* ABOUT/xmlrpc
+@@ -44,6 +43,24 @@
+  *   9/1999 - 10/2000
+  * HISTORY
+  *   $Log$
+  *   Revision 1.1  2007/06/06 15:23:03  glen
+  *   - add
+  *
++ *   Revision 1.8.4.1  2006/11/30 16:38:37  iliaa
++ *   last set of zts fixes
++ *
++ *   Revision 1.8  2005/03/28 00:07:24  edink
++ *   Reshufle includes to make it compile on windows
++ *
++ *   Revision 1.7  2005/03/26 03:13:58  sniper
++ *   - Made it possible to build ext/xmlrpc with libxml2
++ *
++ *   Revision 1.6  2004/04/27 17:33:59  iliaa
++ *   Removed C++ style comments.
++ *
++ *   Revision 1.5  2003/12/16 21:00:21  sniper
++ *   Fix some compile warnings (patch by Joe Orton)
++ *
++ *   Revision 1.4  2002/07/05 04:43:53  danda
++ *   merged in updates from SF project.  bring php repository up to date with xmlrpc-epi version 0.51
++ *
+  *   Revision 1.22  2002/03/09 23:15:44  danda
+  *   add fault interrogation funcs
+  *
+@@ -111,24 +128,20 @@
+  *     - comprehensive API for manipulation of values
+  *******/
+ 
+-
++#include "ext/xml/expat_compat.h"
++#include "main/php_reentrancy.h"
++#ifdef _WIN32
++#include "xmlrpc_win32.h"
++#endif
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <stdarg.h>
+ #include <time.h>
++#include <ctype.h>
+ 
+ #include "queue.h"
+ #include "xmlrpc.h"
+-#ifdef HAVE_XMLPARSE_H
+-#include "xmlparse.h"
+-#else
+-#ifdef HAVE_EXPAT_H
+-#include <expat.h>
+-#else
+-#error expat headers not found!!!
+-#endif
+-#endif
+ #include "base64.h"
+ 
+ #include "xml_to_xmlrpc.h"
+@@ -146,9 +159,9 @@
+ ***********************/
+ 
+ static int date_from_ISO8601 (const char *text, time_t * value) {
+-	struct tm tm;
+-	int n;
+-	int i;
++   struct tm tm;
++   int n;
++   int i;
+ 	char buf[18];
+ 
+ 	if (strchr (text, '-')) {
+@@ -164,69 +177,69 @@
+ 	}
+ 
+ 
+-	tm.tm_isdst = -1;
++   tm.tm_isdst = -1;
+ 
+-	if (strlen (text) < 17) {
+-		return -1;
+-	}
++   if(strlen(text) < 17) {
++      return -1;
++   }
+ 
+-	n = 1000;
+-	tm.tm_year = 0;
+-	for (i = 0; i < 4; i++) {
+-		tm.tm_year += (text[i] - '0') * n;
+-		n /= 10;
+-	}
+-	n = 10;
+-	tm.tm_mon = 0;
+-	for (i = 0; i < 2; i++) {
+-		tm.tm_mon += (text[i + 4] - '0') * n;
+-		n /= 10;
+-	}
+-	tm.tm_mon--;
++   n = 1000;
++   tm.tm_year = 0;
++   for(i = 0; i < 4; i++) {
++      tm.tm_year += (text[i]-'0')*n;
++      n /= 10;
++   }
++   n = 10;
++   tm.tm_mon = 0;
++   for(i = 0; i < 2; i++) {
++      tm.tm_mon += (text[i+4]-'0')*n;
++      n /= 10;
++   }
++   tm.tm_mon --;
+ 
+-	n = 10;
+-	tm.tm_mday = 0;
+-	for (i = 0; i < 2; i++) {
+-		tm.tm_mday += (text[i + 6] - '0') * n;
+-		n /= 10;
+-	}
++   n = 10;
++   tm.tm_mday = 0;
++   for(i = 0; i < 2; i++) {
++      tm.tm_mday += (text[i+6]-'0')*n;
++      n /= 10;
++   }
+ 
+-	n = 10;
+-	tm.tm_hour = 0;
+-	for (i = 0; i < 2; i++) {
+-		tm.tm_hour += (text[i + 9] - '0') * n;
+-		n /= 10;
+-	}
++   n = 10;
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list