renamed/updated patches

This commit is contained in:
ensc 2008-11-15 13:43:43 +00:00
parent 6ab53f93eb
commit 2961ea7c01
7 changed files with 422 additions and 357 deletions

View File

@ -1,199 +0,0 @@
From 1823bda8047c3d7113e86f7550cbf3df8d105e67 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 5 Apr 2008 11:41:34 +0200
Subject: [PATCH] Use proper datatypes for 'long long'
xmlrpc-c uses 'long long' at some places (e.g. in printf
statements with PRId64) under the assumption that it has a
width of exactly 64 bits.
On 64 bit machines 'long long' has a width of 128 bit and
will cause overhead both in memory and cpu usage there. As
'long long' is used only to handle <i8> datatypes, the patch
uses a plain 64 integer type there.
It is arguable whether 'int_least64_t' (and 'int_least32_t')
would be a better choice for 'int64_t' (and 'int32_t'), but
for now, the patch uses datatypes with exact widths.
---
include/xmlrpc-c/base.h | 5 +++--
include/xmlrpc-c/base.hpp | 10 +++++-----
src/cpp/param_list.cpp | 8 ++++----
src/cpp/test/test.cpp | 12 ++++++------
src/cpp/test/testclient.cpp | 2 +-
src/cpp/value.cpp | 8 ++++----
6 files changed, 23 insertions(+), 22 deletions(-)
diff --git a/include/xmlrpc-c/base.h b/include/xmlrpc-c/base.h
index 712691c..9ce0cd2 100644
--- a/include/xmlrpc-c/base.h
+++ b/include/xmlrpc-c/base.h
@@ -6,6 +6,7 @@
#include <stddef.h>
#include <stdarg.h>
#include <time.h>
+#include <stdint.h>
#include <xmlrpc-c/util.h>
#include <xmlrpc-c/config.h>
/* Defines XMLRPC_HAVE_WCHAR, XMLRPC_LONG_LONG */
@@ -36,9 +37,9 @@ extern unsigned int const xmlrpc_version_point;
typedef signed int xmlrpc_int;
/* An integer of the type defined by XML-RPC <int>; i.e. 32 bit */
-typedef signed int xmlrpc_int32;
+typedef int32_t xmlrpc_int32;
/* An integer of the type defined by XML-RPC <i4>; i.e. 32 bit */
-typedef XMLRPC_LONG_LONG xmlrpc_int64;
+typedef int64_t xmlrpc_int64;
/* An integer of the type defined by "XML-RPC" <i8>; i.e. 64 bit */
typedef int xmlrpc_bool;
/* A boolean (of the type defined by XML-RPC <boolean>, but there's
diff --git a/include/xmlrpc-c/base.hpp b/include/xmlrpc-c/base.hpp
index 5634b34..ab6fe3e 100644
--- a/include/xmlrpc-c/base.hpp
+++ b/include/xmlrpc-c/base.hpp
@@ -200,11 +200,11 @@ public:
class value_i8 : public value {
public:
- value_i8(long long const cvalue);
+ value_i8(xmlrpc_int64 const cvalue);
value_i8(xmlrpc_c::value const baseValue);
- operator long long() const;
+ operator xmlrpc_int64() const;
};
@@ -330,10 +330,10 @@ public:
void
getNil(unsigned int const paramNumber) const;
- long long
+ xmlrpc_int64
getI8(unsigned int const paramNumber,
- long long const minimum = XMLRPC_INT64_MIN,
- long long const maximum = XMLRPC_INT64_MAX) const;
+ xmlrpc_int64 const minimum = XMLRPC_INT64_MIN,
+ xmlrpc_int64 const maximum = XMLRPC_INT64_MAX) const;
void
verifyEnd(unsigned int const paramNumber) const;
diff --git a/src/cpp/param_list.cpp b/src/cpp/param_list.cpp
index 67c636b..60f7df9 100644
--- a/src/cpp/param_list.cpp
+++ b/src/cpp/param_list.cpp
@@ -265,10 +265,10 @@ paramList::getNil(unsigned int const paramNumber) const {
-long long
+xmlrpc_int64
paramList::getI8(unsigned int const paramNumber,
- long long const minimum,
- long long const maximum) const {
+ xmlrpc_int64 const minimum,
+ xmlrpc_int64 const maximum) const {
if (paramNumber >= this->paramVector.size())
throw(fault("Not enough parameters", fault::CODE_TYPE));
@@ -277,7 +277,7 @@ paramList::getI8(unsigned int const paramNumber,
throw(fault("Parameter that is supposed to be 64-bit integer is not",
fault::CODE_TYPE));
- long long const longlongvalue(static_cast<long long>(
+ xmlrpc_int64 const longlongvalue(static_cast<xmlrpc_int64>(
value_i8(this->paramVector[paramNumber])));
if (longlongvalue < minimum)
diff --git a/src/cpp/test/test.cpp b/src/cpp/test/test.cpp
index b3c2caf..c92653f 100644
--- a/src/cpp/test/test.cpp
+++ b/src/cpp/test/test.cpp
@@ -418,15 +418,15 @@ public:
}
virtual void runtests(unsigned int const) {
value_i8 int1(7);
- TEST(static_cast<long long>(int1) == 7);
+ TEST(static_cast<xmlrpc_int64>(int1) == 7);
value_i8 int2(-7);
- TEST(static_cast<long long>(int2) == -7);
+ TEST(static_cast<xmlrpc_int64>(int2) == -7);
value_i8 int5(1ull << 40);
- TEST(static_cast<long long>(int5) == (1ull << 40));
+ TEST(static_cast<xmlrpc_int64>(int5) == (1ull << 40));
value val1(int1);
TEST(val1.type() == value::TYPE_I8);
value_i8 int3(val1);
- TEST(static_cast<long long>(int3) == 7);
+ TEST(static_cast<xmlrpc_int64>(int3) == 7);
try {
value_i8 int4(value_double(3.7));
TEST_FAILED("invalid cast double-i8 suceeded");
@@ -554,7 +554,7 @@ public:
structData.insert(member);
paramList1.add(value_struct(structData));
paramList1.add(value_nil());
- paramList1.add(value_i8((long long)UINT_MAX + 1));
+ paramList1.add(value_i8((xmlrpc_int64)UINT_MAX + 1));
TEST(paramList1.size() == 11);
@@ -578,7 +578,7 @@ public:
TEST(paramList1.getArray(7, 1, 3).size() == 3);
paramList1.getStruct(8)["the_integer"];
paramList1.getNil(9);
- TEST(paramList1.getI8(10) == (long long)UINT_MAX + 1);
+ TEST(paramList1.getI8(10) == (xmlrpc_int64)UINT_MAX + 1);
paramList1.verifyEnd(11);
paramList paramList2(5);
diff --git a/src/cpp/test/testclient.cpp b/src/cpp/test/testclient.cpp
index cb7f86a..e3c23a8 100644
--- a/src/cpp/test/testclient.cpp
+++ b/src/cpp/test/testclient.cpp
@@ -783,7 +783,7 @@ public:
TEST(rpcApacheP->isFinished());
TEST(rpcApacheP->isSuccessful());
value_i8 const result(rpcApacheP->getResult());
- TEST(static_cast<long long>(result) == 7ll);
+ TEST(static_cast<xmlrpc_int64>(result) == 7ll);
}
}
};
diff --git a/src/cpp/value.cpp b/src/cpp/value.cpp
index 588b91f..6dcba93 100644
--- a/src/cpp/value.cpp
+++ b/src/cpp/value.cpp
@@ -831,13 +831,13 @@ value_nil::value_nil(xmlrpc_c::value const baseValue) {
-value_i8::value_i8(long long const cppvalue) {
+value_i8::value_i8(xmlrpc_int64 const cppvalue) {
class cWrapper {
public:
xmlrpc_value * valueP;
- cWrapper(long long const cppvalue) {
+ cWrapper(xmlrpc_int64 const cppvalue) {
env_wrap env;
this->valueP = xmlrpc_i8_new(&env.env_c, cppvalue);
@@ -866,9 +866,9 @@ value_i8::value_i8(xmlrpc_c::value const baseValue) {
-value_i8::operator long long() const {
+value_i8::operator xmlrpc_int64() const {
- long long retval;
+ xmlrpc_int64 retval;
env_wrap env;
xmlrpc_read_i8(&env.env_c, this->cValueP, &retval);
--
1.5.4.1

25
xmlrpc-c-c++.patch Normal file
View File

@ -0,0 +1,25 @@
From 23e1abe53511c61f297a226c03ea9f09ff58c86a Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 15 Nov 2008 11:35:26 +0100
Subject: [PATCH] fixed c++ syntax
---
src/cpp/server_cgi.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cpp/server_cgi.cpp b/src/cpp/server_cgi.cpp
index da4152d..7b5baa2 100644
--- a/src/cpp/server_cgi.cpp
+++ b/src/cpp/server_cgi.cpp
@@ -37,7 +37,7 @@ public:
bool authCookiePresent;
string authCookie;
- httpInfo::httpInfo() {
+ httpInfo() {
const char * const requestMethodC = getenv("REQUEST_METHOD");
const char * const contentTypeC = getenv("CONTENT_TYPE");
--
1.5.6.5

View File

@ -1,23 +1,23 @@
From 534f3014fc72d42869e5f54a1c4487e9331c5aaf Mon Sep 17 00:00:00 2001
From 01430cca6884e144cc196fc2120a3d3c11e6189b Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 5 Apr 2008 10:55:02 +0200
Subject: [PATCH] make -> cmake transition
---
CMakeLists.txt | 260 +++++++++++++++++++++++++++
CMakeLists.txt | 249 +++++++++++++++++++++++++++
cmake/try-attr.cc | 3 +
cmake/va-list-is-array.c | 9 +
examples/CMakeLists.txt | 57 ++++++
examples/config.h | 1 +
examples/cpp/CMakeLists.txt | 24 +++
examples/cpp/CMakeLists.txt | 30 ++++
include/CMakeLists.txt | 3 +
include/xmlrpc-c/CMakeLists.txt | 73 ++++++++
include/xmlrpc-c/config.h.cmake | 41 +++++
include/xmlrpc-c/config.h.cmake | 30 ++++
lib/CMakeLists.txt | 12 ++
lib/abyss/CMakeLists.txt | 3 +
lib/abyss/src/CMakeLists.txt | 64 +++++++
lib/abyss/src/xmlrpc_abyss.pc.cmake | 12 ++
lib/curl_transport/CMakeLists.txt | 7 +
lib/curl_transport/CMakeLists.txt | 20 ++
lib/expat/CMakeLists.txt | 9 +
lib/expat/gennmtab/CMakeLists.txt | 3 +
lib/expat/xmlparse/CMakeLists.txt | 7 +
@ -27,10 +27,10 @@ Subject: [PATCH] make -> cmake transition
lib/libutil/CMakeLists.txt | 24 +++
lib/libutil/xmlrpc_util.pc.cmake | 10 +
lib/libwww_transport/CMakeLists.txt | 7 +
lib/util/CMakeLists.txt | 16 ++
lib/util/CMakeLists.txt | 17 ++
lib/wininet_transport/CMakeLists.txt | 7 +
src/CMakeLists.txt | 107 +++++++++++
src/cpp/CMakeLists.txt | 60 ++++++
src/CMakeLists.txt | 118 +++++++++++++
src/cpp/CMakeLists.txt | 66 +++++++
src/cpp/test/CMakeLists.txt | 17 ++
src/cpp/xmlrpc++.pc.cmake | 12 ++
src/cpp/xmlrpc_client++.pc.cmake | 12 ++
@ -38,27 +38,30 @@ Subject: [PATCH] make -> cmake transition
src/cpp/xmlrpc_packetsocket.pc.cmake | 12 ++
src/cpp/xmlrpc_server++.pc.cmake | 12 ++
src/cpp/xmlrpc_server_abyss++.pc.cmake | 12 ++
src/cpp/xmlrpc_server_cgi++.pc.cmake | 12 ++
src/cpp/xmlrpc_server_pstream++.pc.cmake | 12 ++
src/test/CMakeLists.txt | 28 +++
src/test/CMakeLists.txt | 37 ++++
src/xmlrpc.pc.cmake | 12 ++
src/xmlrpc_client.pc.cmake | 12 ++
src/xmlrpc_server.pc.cmake | 12 ++
src/xmlrpc_server_abyss.pc.cmake | 12 ++
src/xmlrpc_server_cgi.pc.cmake | 12 ++
tools/CMakeLists.txt | 10 +
tools/CMakeLists.txt | 12 ++
tools/binmode-rpc-kit/CMakeLists.txt | 2 +
tools/lib/CMakefiles.txt | 1 +
tools/turbocharger/CMakeLists.txt | 1 +
tools/xml-rpc-api2cpp/CMakeLists.txt | 15 ++
tools/xmlrpc/CMakeLists.txt | 15 ++
tools/xmlrpc/CMakeLists.txt | 17 ++
tools/xmlrpc/config.h | 1 +
tools/xmlrpc_cpp_proxy/CMakeLists.txt | 17 ++
tools/xmlrpc_pstream/CMakefiles.txt | 6 +
tools/xmlrpc_transport/CMakeLists.txt | 9 +
tools/xmlrpc_transport/config.h | 1 +
transport_config.h.cmake | 16 ++
version.h.cmake | 5 +
xmlrpc-c-config | 77 ++++++++
xmlrpc_config.h.cmake | 87 +++++++++
54 files changed, 1305 insertions(+), 0 deletions(-)
xmlrpc-c-config | 80 +++++++++
xmlrpc_config.h.cmake | 99 +++++++++++
57 files changed, 1367 insertions(+), 0 deletions(-)
create mode 100644 CMakeLists.txt
create mode 100644 cmake/try-attr.cc
create mode 100644 cmake/va-list-is-array.c
@ -93,6 +96,7 @@ Subject: [PATCH] make -> cmake transition
create mode 100644 src/cpp/xmlrpc_packetsocket.pc.cmake
create mode 100644 src/cpp/xmlrpc_server++.pc.cmake
create mode 100644 src/cpp/xmlrpc_server_abyss++.pc.cmake
create mode 100644 src/cpp/xmlrpc_server_cgi++.pc.cmake
create mode 100644 src/cpp/xmlrpc_server_pstream++.pc.cmake
create mode 100644 src/test/CMakeLists.txt
create mode 100644 src/xmlrpc.pc.cmake
@ -102,11 +106,13 @@ Subject: [PATCH] make -> cmake transition
create mode 100644 src/xmlrpc_server_cgi.pc.cmake
create mode 100644 tools/CMakeLists.txt
create mode 100644 tools/binmode-rpc-kit/CMakeLists.txt
create mode 100644 tools/lib/CMakefiles.txt
create mode 100644 tools/turbocharger/CMakeLists.txt
create mode 100644 tools/xml-rpc-api2cpp/CMakeLists.txt
create mode 100644 tools/xmlrpc/CMakeLists.txt
create mode 100644 tools/xmlrpc/config.h
create mode 100644 tools/xmlrpc_cpp_proxy/CMakeLists.txt
create mode 100644 tools/xmlrpc_pstream/CMakefiles.txt
create mode 100644 tools/xmlrpc_transport/CMakeLists.txt
create mode 100644 tools/xmlrpc_transport/config.h
create mode 100644 transport_config.h.cmake
@ -116,28 +122,28 @@ Subject: [PATCH] make -> cmake transition
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..d239456
index 0000000..25474f4
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,260 @@
@@ -0,0 +1,249 @@
+## -*- cmake -*-
+project(xmlrpc-c)
+include(UsePkgConfig)
+include(FindPkgConfig)
+include(CheckIncludeFile)
+include(CheckFunctionExists)
+
+set(XMLRPC_C_VERSION_MAJOR "1" CACHE STRING "Version (major) of xmlrpc-c")
+set(XMLRPC_C_VERSION_MINOR "14" CACHE STRING "Version (minor) of xmlrpc-c")
+set(XMLRPC_C_VERSION_POINT "8" CACHE STRING "Version (point) of xmlrpc-c")
+set(XMLRPC_C_VERSION_MINOR "16" CACHE STRING "Version (minor) of xmlrpc-c")
+set(XMLRPC_C_VERSION_POINT "4" CACHE STRING "Version (point) of xmlrpc-c")
+
+set(XMLRPC_C_VERSION
+ "${XMLRPC_C_VERSION_MAJOR}.${XMLRPC_C_VERSION_MINOR}.${XMLRPC_C_VERSION_POINT}"
+ CACHE STRING "Version of xmlrpc-c")
+
+set(XMLRPC_C_LIBVERSION "3.14")
+set(XMLRPC_C_LIBVERSION "3.${XMLRPC_C_VERSION_MINOR}")
+set(XMLRPC_C_SOVERSION "3")
+
+set(XMLRPC_CXX_LIBVERSION "4.14")
+set(XMLRPC_CXX_LIBVERSION "4.${XMLRPC_C_VERSION_MINOR}")
+set(XMLRPC_CXX_SOVERSION "4")
+
+string(REGEX REPLACE "^0+" "" XMLRPC_C_VERSION_MAJOR_NUM "${XMLRPC_C_VERSION_MAJOR}")
@ -208,23 +214,15 @@ index 0000000..d239456
+set(wininet_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/wininet_transport)
+
+###########
+pkgconfig(libcurl CURL_INCLUDE_DIR CURL_LINK_DIR CURL_LINK_FLAGS CURL_CFLAGS)
+if(DEFINED MUST_BUILD_CURL_CLIENT)
+ set(tmp ${MUST_BUILD_CURL_CLIENT})
+ set(tmp REQUIRED)
+else(DEFINED MUST_BUILD_CURL_CLIENT)
+ if(CURL_LINK_FLAGS)
+ set(tmp 1)
+ else(CURL_LINK_FLAGS)
+ set(tmp 0)
+ endif(CURL_LINK_FLAGS)
+ set(tmp)
+endif(DEFINED MUST_BUILD_CURL_CLIENT)
+
+if(tmp)
+ set(MUST_BUILD_CLIENT 1)
+ STRING(REGEX REPLACE "\n" "" CURL_CFLAGS ${CURL_CFLAGS}) # HACK!!
+ message(STATUS "Using libcurl transport ${CURL_CFLAGS}")
+endif(tmp)
+ensc_set_bool(MUST_BUILD_CURL_CLIENT ${tmp} "Set iff Curl client transport shall be built")
+pkg_check_modules(CURL ${tmp} libcurl)
+
+ensc_set_bool(MUST_BUILD_CURL_CLIENT ${CURL_FOUND} "Set iff Curl client transport shall be built")
+set(curl_srcdir ${xmlrpc-c_SOURCE_DIR}/lib/curl_transport)
+
+###########
@ -258,14 +256,11 @@ index 0000000..d239456
+set(ENABLE_ABYSS_THREADS 1 CACHE BOOL "Use pthread")
+
+if(ENABLE_LIBXML2_BACKEND)
+ foreach(tmp libxml-2.0 libxml2 libxml)
+ if (NOT DEFINED libxml_pkgconfig)
+ pkgconfig(${tmp} LIBXML2_INCLUDE_DIR LIBXML2_LINK_DIR LIBXML2_LINK_FLAGS LIBXML2_CFLAGS)
+ if(LIBXML2_LINK_FLAGS)
+ set(libxml_pkgconfig ${tmp})
+ endif(LIBXML2_LINK_FLAGS)
+ endif(NOT DEFINED libxml_pkgconfig)
+ endforeach(tmp)
+ pkg_check_modules(LIBXML2 libxml-2.0)
+
+ if(LIBXML2_FOUND)
+ set(libxml_pkgconfig libxml-2.0) # TODO: enhance more alternative modules
+ endif(LIBXML2_FOUND)
+endif(ENABLE_LIBXML2_BACKEND)
+
+
@ -332,19 +327,19 @@ index 0000000..d239456
+
+configure_file(${xmlrpc-c_SOURCE_DIR}/xmlrpc_config.h.cmake
+ ${xmlrpc-c_BINARY_DIR}/xmlrpc_config.h
+ ESCAPE_QUOTES @ONLY)
+ ESCAPE_QUOTES @ONLY)
+
+configure_file(${xmlrpc-c_SOURCE_DIR}/version.h.cmake
+ ${xmlrpc-c_BINARY_DIR}/version.h
+ ESCAPE_QUOTES @ONLY)
+ ESCAPE_QUOTES @ONLY)
+
+configure_file(${xmlrpc-c_SOURCE_DIR}/transport_config.h.cmake
+ ${xmlrpc-c_BINARY_DIR}/transport_config.h
+ ESCAPE_QUOTES @ONLY)
+ ESCAPE_QUOTES @ONLY)
+
+configure_file(${xmlrpc-c_SOURCE_DIR}/include/xmlrpc-c/config.h.cmake
+ ${xmlrpc-c_BINARY_DIR}/include/xmlrpc-c/config.h
+ ESCAPE_QUOTES @ONLY)
+ ESCAPE_QUOTES @ONLY)
+
+
+include_directories(${xmlrpc-c_SOURCE_DIR}/include)
@ -476,10 +471,10 @@ index 0000000..31d5f9b
+#include "../xmlrpc_config.h"
diff --git a/examples/cpp/CMakeLists.txt b/examples/cpp/CMakeLists.txt
new file mode 100644
index 0000000..254782b
index 0000000..f27edbb
--- /dev/null
+++ b/examples/cpp/CMakeLists.txt
@@ -0,0 +1,24 @@
@@ -0,0 +1,30 @@
+# -*- cmake -*-
+
+if(ENABLE_ABYSS_SERVER)
@ -488,6 +483,12 @@ index 0000000..254782b
+ ensc_add_example(xmlrpc_inetd_server cpp abyss_serverxx)
+endif(ENABLE_ABYSS_SERVER)
+
+if (ENABLE_CGI_SERVER)
+ set(cgi_serverxx_LIBS xmlrpc_server_cgi++)
+
+ ensc_add_example(xmlrpc_sample_add_server_cgi cpp cgi_serverxx)
+endif(ENABLE_CGI_SERVER)
+
+if(MUST_BUILD_CLIENT)
+ set(abyss_clientxx_LIBS xmlrpc_client++)
+
@ -515,7 +516,7 @@ index 0000000..ebfdba5
+add_subdirectory(xmlrpc-c)
diff --git a/include/xmlrpc-c/CMakeLists.txt b/include/xmlrpc-c/CMakeLists.txt
new file mode 100644
index 0000000..e4f8073
index 0000000..2b305b7
--- /dev/null
+++ b/include/xmlrpc-c/CMakeLists.txt
@@ -0,0 +1,73 @@
@ -541,7 +542,7 @@ index 0000000..e4f8073
+
+list(APPEND compat_links "oldxmlrpc.h xmlrpc.h")
+list(APPEND compat_links "server.h xmlrpc_server.h")
+list(APPEND compat_links "server_abyss.h xmlrpc_server_abyss.h")
+list(APPEND compat_links "server_abyss.h xmlrpc_abyss.h")
+list(APPEND compat_links "server_w32httpsys.h xmlrpc_server_w32httpsys.h")
+
+
@ -568,7 +569,7 @@ index 0000000..e4f8073
+ client_global.h)
+
+ list(APPEND compat_links "client.h xmlrpc_client.h")
+
+
+ if(ENABLE_CPLUSPLUS)
+ list(APPEND headers
+ client.hpp
@ -594,10 +595,10 @@ index 0000000..e4f8073
+endforeach(ln)
diff --git a/include/xmlrpc-c/config.h.cmake b/include/xmlrpc-c/config.h.cmake
new file mode 100644
index 0000000..c3d46ab
index 0000000..b2d7373
--- /dev/null
+++ b/include/xmlrpc-c/config.h.cmake
@@ -0,0 +1,41 @@
@@ -0,0 +1,30 @@
+/* --*- c -*-- */
+#ifndef XMLRPC_C_CONFIG_H_INCLUDED
+#define XMLRPC_C_CONFIG_H_INCLUDED
@ -627,17 +628,6 @@ index 0000000..c3d46ab
+ #define XMLRPC_HAVE_TIMESPEC 1
+#endif
+
+#if defined(_MSC_VER)
+#if _MSC_VER < 1300
+ /* This is MSVC 6. */
+ #define XMLRPC_LONG_LONG __int64
+#else
+ #define XMLRPC_LONG_LONG long long
+#endif
+#else
+ #define XMLRPC_LONG_LONG long long
+#endif
+
+#endif
diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt
new file mode 100644
@ -756,16 +746,29 @@ index 0000000..fae7af3
+Cflags:
diff --git a/lib/curl_transport/CMakeLists.txt b/lib/curl_transport/CMakeLists.txt
new file mode 100644
index 0000000..3814f08
index 0000000..4224a13
--- /dev/null
+++ b/lib/curl_transport/CMakeLists.txt
@@ -0,0 +1,7 @@
@@ -0,0 +1,20 @@
+# -*- cmake -*-
+
+if(MUST_BUILD_CURL_CLIENT)
+ list(APPEND transport_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_curl_transport.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_curl_transport.h)
+
+ ${CMAKE_CURRENT_SOURCE_DIR}/curltransaction.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/curltransaction.h
+
+ ${CMAKE_CURRENT_SOURCE_DIR}/curlmulti.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/curlmulti.h
+
+ ${CMAKE_CURRENT_SOURCE_DIR}/lock.h
+
+ ${CMAKE_CURRENT_SOURCE_DIR}/lock_pthread.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/lock_pthread.h
+
+ ${CMAKE_CURRENT_SOURCE_DIR}/curlversion.h
+ )
+endif(MUST_BUILD_CURL_CLIENT)
diff --git a/lib/expat/CMakeLists.txt b/lib/expat/CMakeLists.txt
new file mode 100644
@ -911,7 +914,7 @@ index 0000000..3d2968e
+Cflags: -I${includedir}
diff --git a/lib/libwww_transport/CMakeLists.txt b/lib/libwww_transport/CMakeLists.txt
new file mode 100644
index 0000000..a494605
index 0000000..aa52d9e
--- /dev/null
+++ b/lib/libwww_transport/CMakeLists.txt
@@ -0,0 +1,7 @@
@ -920,19 +923,20 @@ index 0000000..a494605
+if(MUST_BUILD_LIBWWW_CLIENT)
+ list(APPEND transport_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_libwww_transport.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_libwww_transport.h)
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_libwww_transport.h)
+endif(MUST_BUILD_LIBWWW_CLIENT)
diff --git a/lib/util/CMakeLists.txt b/lib/util/CMakeLists.txt
new file mode 100644
index 0000000..f223bed
index 0000000..80696d9
--- /dev/null
+++ b/lib/util/CMakeLists.txt
@@ -0,0 +1,16 @@
@@ -0,0 +1,17 @@
+## -*- cmake -*-
+
+set(util_SOURCES
+ casprintf.c
+ cmdline_parser.c
+ cmdline_parser_cpp.cpp
+ getoptx.c
+ getoptx.h
+ stripcaseeq.c
@ -946,7 +950,7 @@ index 0000000..f223bed
+add_library(util STATIC ${util_SOURCES})
diff --git a/lib/wininet_transport/CMakeLists.txt b/lib/wininet_transport/CMakeLists.txt
new file mode 100644
index 0000000..de3501c
index 0000000..17535ab
--- /dev/null
+++ b/lib/wininet_transport/CMakeLists.txt
@@ -0,0 +1,7 @@
@ -955,20 +959,20 @@ index 0000000..de3501c
+if(MUST_BUILD_WININET_CLIENT)
+ list(APPEND transport_SOURCES
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_wininet_transport.c
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_wininet_transport.h)
+ ${CMAKE_CURRENT_SOURCE_DIR}/xmlrpc_wininet_transport.h)
+endif(MUST_BUILD_WININET_CLIENT)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
new file mode 100644
index 0000000..f0981e3
index 0000000..80af5a6
--- /dev/null
+++ b/src/CMakeLists.txt
@@ -0,0 +1,107 @@
@@ -0,0 +1,118 @@
+# -*- cmake -*-
+
+if(ENABLE_LIBXML2_BACKEND)
+ set(xmlrpc_xml_parser xmlrpc_libxml2.c)
+ set(libxml_INCLUDES ${LIBXML2_CFLAGS})
+ set(libxml_LIBS ${LIBXML2_LINK_FLAGS})
+ set(libxml_LIBS ${LIBXML2_LDFLAGS})
+ set(xmlrpc_pkgconfig_req ${libxml_pkgconfig})
+else(ENABLE_LIBXML2_BACKEND)
+ set(xmlrpc_xml_parser xmlrpc_expat.c)
@ -992,13 +996,23 @@ index 0000000..f0981e3
+
+if(MUST_BUILD_CURL_CLIENT)
+ set(client_curl_CFLAGS ${CURL_CFLAGS})
+ set(client_curl_LIBS ${CURL_LINK_FLAGS})
+ set(client_curl_LIBS ${CURL_LDFLAGS})
+ set(xmlrpc_client_pkgconfig_req libcurl)
+ list(APPEND transport_SOURCES ${curl_srcdir}/xmlrpc_curl_transport.c)
+ list(APPEND transport_SOURCES
+ ${curl_srcdir}/xmlrpc_curl_transport.c
+ ${curl_srcdir}/curltransaction.c
+ ${curl_srcdir}/curltransaction.h
+ ${curl_srcdir}/curlmulti.c
+ ${curl_srcdir}/curlmulti.h
+ ${curl_srcdir}/lock.h
+ ${curl_srcdir}/lock_pthread.c
+ ${curl_srcdir}/lock_pthread.h
+ ${curl_srcdir}/curlversion.h
+ )
+endif(MUST_BUILD_CURL_CLIENT)
+
+set(client_CFLAGS "-I${wininet_srcdir} -I${libwww_srcdir} -I${curl_srcdir} ${client_wininet_CFLAGS} ${client_libwww_CFLAGS} ${client_curl_CFLAGS}")
+set(client_LIBS "${client_wininet_LIBS} ${client_libwww_LIBS} ${client_curl_LIBS}")
+set(client_LIBS ${client_wininet_LIBS} ${client_libwww_LIBS} ${client_curl_LIBS})
+
+
+add_subdirectory(cpp)
@ -1008,7 +1022,8 @@ index 0000000..f0981e3
+
+### libxmlrpc.so
+add_library(xmlrpc SHARED
+ double.c resource.c trace.c version.c ${xmlrpc_xml_parser}
+ double.c parse_value.c resource.c trace.c version.c
+ ${xmlrpc_xml_parser}
+ xmlrpc_data.c xmlrpc_datetime.c xmlrpc_string.c
+ xmlrpc_array.c xmlrpc_struct.c
+ xmlrpc_build.c xmlrpc_decompose.c xmlrpc_parse.c xmlrpc_serialize.c
@ -1072,10 +1087,10 @@ index 0000000..f0981e3
+enable_testing()
diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt
new file mode 100644
index 0000000..5f5d409
index 0000000..6091e2b
--- /dev/null
+++ b/src/cpp/CMakeLists.txt
@@ -0,0 +1,60 @@
@@ -0,0 +1,66 @@
+# -*- cmake -*-
+
+####### libxmlrpc++.so
@ -1104,6 +1119,12 @@ index 0000000..5f5d409
+list(APPEND lib_TARGETS xmlrpc_server_abyss++)
+ensc_pkgconfig(xmlrpc_server_abyss++)
+
+####### libxmlrpc_server_cgi++.so
+add_library(xmlrpc_server_cgi++ SHARED server_cgi.cpp)
+target_link_libraries(xmlrpc_server_cgi++ xmlrpc_server++)
+list(APPEND lib_TARGETS xmlrpc_server_cgi++)
+ensc_pkgconfig(xmlrpc_server_cgi++)
+
+####### libxmlrpc_server_pstream++.so
+add_library(xmlrpc_server_pstream++ SHARED server_pstream.cpp)
+target_link_libraries(xmlrpc_server_pstream++ xmlrpc_server++ xmlrpc_packetsocket)
@ -1267,6 +1288,24 @@ index 0000000..b325eff
+Requires.private: xmlrpc_server++ xmlrpc_server_abyss xmlrpc++ xmlrpc_abyss xmlrpc_util
+Libs: -L${libdir} -lxmlrpc_server_abyss++
+Cflags: -I${includedir}
diff --git a/src/cpp/xmlrpc_server_cgi++.pc.cmake b/src/cpp/xmlrpc_server_cgi++.pc.cmake
new file mode 100644
index 0000000..72a3726
--- /dev/null
+++ b/src/cpp/xmlrpc_server_cgi++.pc.cmake
@@ -0,0 +1,12 @@
+bindir=@bindir@
+prefix=@prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: xmlrpc_server_cgi++
+Description: XMLRPC C++ CGI-Server library
+Version: @XMLRPC_C_VERSION@
+
+Requires.private: xmlrpc_server++ xmlrpc++ xmlrpc
+Libs: -L${libdir} -lxmlrpc_server_cgi++
+Cflags: -I${includedir}
diff --git a/src/cpp/xmlrpc_server_pstream++.pc.cmake b/src/cpp/xmlrpc_server_pstream++.pc.cmake
new file mode 100644
index 0000000..da5639d
@ -1287,16 +1326,25 @@ index 0000000..da5639d
+Cflags: -I${includedir}
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
new file mode 100644
index 0000000..28d5dae
index 0000000..0859ccc
--- /dev/null
+++ b/src/test/CMakeLists.txt
@@ -0,0 +1,28 @@
@@ -0,0 +1,37 @@
+# -*- cmake -*-
+
+set(test_SOURCES
+ abyss.c abyss.h
+ test.c cgi.c method_registry.c parse_xml.c serialize.c server_abyss.c
+ value.c xml_data.c)
+ abyss.c
+ abyss.h
+ test.c
+ cgi.c
+ method_registry.c
+ parse_xml.c
+ serialize.c
+ serialize_value.c
+ server_abyss.c
+ value.c
+ value_datetime.c
+ xml_data.c)
+
+if(MUST_BUILD_CLIENT)
+ list(APPEND test_SOURCES client.c)
@ -1411,12 +1459,14 @@ index 0000000..4d174ef
+Cflags: -I${includedir}
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
new file mode 100644
index 0000000..6187433
index 0000000..750fed4
--- /dev/null
+++ b/tools/CMakeLists.txt
@@ -0,0 +1,10 @@
@@ -0,0 +1,12 @@
+# -*- cmake -*-
+
+add_subdirectory(lib)
+
+add_subdirectory(binmode-rpc-kit)
+add_subdirectory(turbocharger)
+
@ -1433,6 +1483,13 @@ index 0000000..a707c75
@@ -0,0 +1,2 @@
+# -*- cmake -*-
+
diff --git a/tools/lib/CMakefiles.txt b/tools/lib/CMakefiles.txt
new file mode 100644
index 0000000..342423d
--- /dev/null
+++ b/tools/lib/CMakefiles.txt
@@ -0,0 +1 @@
+# -*- cmake -*-
diff --git a/tools/turbocharger/CMakeLists.txt b/tools/turbocharger/CMakeLists.txt
new file mode 100644
index 0000000..342423d
@ -1463,16 +1520,18 @@ index 0000000..c759dec
+ DESTINATION ${mandir}/man1)
diff --git a/tools/xmlrpc/CMakeLists.txt b/tools/xmlrpc/CMakeLists.txt
new file mode 100644
index 0000000..976df30
index 0000000..da01ec3
--- /dev/null
+++ b/tools/xmlrpc/CMakeLists.txt
@@ -0,0 +1,15 @@
@@ -0,0 +1,17 @@
+# -*- cmake -*-
+
+#set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES ../lib/include)
+
+include_directories(../lib/include)
+add_executable(tool-xmlrpc
+ xmlrpc.c
+ dumpvalue.c
+ dumpvalue.h)
+ ../lib/dumpvalue.c)
+target_link_libraries(tool-xmlrpc xmlrpc_client util)
+
+set_target_properties(tool-xmlrpc
@ -1512,6 +1571,18 @@ index 0000000..4166023
+
+install(TARGETS xmlrpc_cpp_proxy
+ RUNTIME DESTINATION bin)
diff --git a/tools/xmlrpc_pstream/CMakefiles.txt b/tools/xmlrpc_pstream/CMakefiles.txt
new file mode 100644
index 0000000..67ae8c5
--- /dev/null
+++ b/tools/xmlrpc_pstream/CMakefiles.txt
@@ -0,0 +1,6 @@
+# -*- cmake -*-
+
+add_executable(xmlrpc_pstream
+ xmlrpc_pstream.cpp
+ ${tools_lib_SOURCES})
+target_link_libraries(xmlrpc_pstream readline util)
diff --git a/tools/xmlrpc_transport/CMakeLists.txt b/tools/xmlrpc_transport/CMakeLists.txt
new file mode 100644
index 0000000..b73d7c0
@ -1569,10 +1640,10 @@ index 0000000..12ab86d
+#define XMLRPC_VERSION_POINT @XMLRPC_C_VERSION_POINT_NUM@
diff --git a/xmlrpc-c-config b/xmlrpc-c-config
new file mode 100755
index 0000000..8915017
index 0000000..c32555e
--- /dev/null
+++ b/xmlrpc-c-config
@@ -0,0 +1,77 @@
@@ -0,0 +1,80 @@
+#! /bin/sh
+
+comp=
@ -1583,12 +1654,13 @@ index 0000000..8915017
+need_abyss=
+need_pstream=
+need_packetsocket=
+need_cgi=
+
+while test $# -gt 0; do
+ case $1 in
+ (c++) comp="$comp xmlrpc_cpp";;
+ (server-util) comp="$comp xmlrpc_server";;
+ (cgi-server) comp="$comp xmlrpc_server_cgi";;
+ (server-util) need_server=1;;
+ (cgi-server) need_cgi=1;;
+ (c++2) need_cxx=1;;
+ (abyss-server) need_abyss=1;;
+ (pstream-server) need_pstream=1;;
@ -1608,10 +1680,12 @@ index 0000000..8915017
+ test -z "$need_client" || comp="$comp xmlrpc_client"
+ test -z "$need_abyss" || comp="$comp xmlrpc_server_abyss"
+ test -z "$need_server" || comp="$comp xmlrpc_server"
+ test -z "$need_cgi" || comp="$comp xmlrpc_server_cgi"
+else
+ test -z "$need_client" || comp="$comp xmlrpc_client++"
+ test -z "$need_abyss" || comp="$comp xmlrpc_server_abyss++"
+ test -z "$need_server" || comp="$comp xmlrpc_server++"
+ test -z "$need_cgi" || comp="$comp xmlrpc_server_cgi++"
+fi
+
+test -z "$need_pstream" || comp="$comp xmlrpc_server_pstream++"
@ -1652,10 +1726,10 @@ index 0000000..8915017
+exec pkg-config "$@" $comp
diff --git a/xmlrpc_config.h.cmake b/xmlrpc_config.h.cmake
new file mode 100644
index 0000000..3ba3202
index 0000000..1c9ece8
--- /dev/null
+++ b/xmlrpc_config.h.cmake
@@ -0,0 +1,87 @@
@@ -0,0 +1,99 @@
+/* -*- c -*- */
+
+#ifndef H_XMLRPC_C_CONFIG_H
@ -1694,7 +1768,7 @@ index 0000000..3ba3202
+ #if (!defined(__inline__))
+ #if (defined(__sgi) || defined(_AIX) || defined(_MSC_VER))
+ #define __inline__ __inline
+ #else
+ #else
+ #define __inline__
+ #endif
+ #endif
@ -1724,6 +1798,18 @@ index 0000000..3ba3202
+ #define HAVE_TIMESPEC 1
+#endif
+
+#if MSVCRT
+ #define XMLRPC_VSNPRINTF _vsnprintf
+#else
+ #define XMLRPC_VSNPRINTF vsnprintf
+#endif
+
+#if MSVCRT
+ #define HAVE_REGEX 0
+#else
+ #define HAVE_REGEX 1
+#endif
+
+#if defined(_MSC_VER)
+/* Starting with MSVC 8, the runtime library defines various POSIX functions
+ such as strdup() whose names violate the ISO C standard (the standard
@ -1744,5 +1830,5 @@ index 0000000..3ba3202
+
+#endif
--
1.5.5.1
1.5.6.5

110
xmlrpc-c-longlong.patch Normal file
View File

@ -0,0 +1,110 @@
From 57ba0a3556f5180f5c7b9d793672c055ec373eb5 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 5 Apr 2008 11:41:34 +0200
Subject: [PATCH] Use proper datatypes for 'long long'
xmlrpc-c uses 'long long' at some places (e.g. in printf
statements with PRId64) under the assumption that it has a
width of exactly 64 bits.
On 64 bit machines 'long long' has a width of 128 bit and
will cause overhead both in memory and cpu usage there. As
'long long' is used only to handle <i8> datatypes, the patch
uses a plain 64 integer type there.
It is arguable whether 'int_least64_t' (and 'int_least32_t')
would be a better choice for 'int64_t' (and 'int32_t'), but
for now, the patch uses datatypes with exact widths.
---
include/xmlrpc-c/base.h | 10 ++++++----
src/cpp/param_list.cpp | 8 ++++----
src/cpp/value.cpp | 2 +-
3 files changed, 11 insertions(+), 9 deletions(-)
diff --git a/include/xmlrpc-c/base.h b/include/xmlrpc-c/base.h
index 6cf1fc8..886d39b 100644
--- a/include/xmlrpc-c/base.h
+++ b/include/xmlrpc-c/base.h
@@ -5,7 +5,9 @@
#include <stddef.h>
#include <stdarg.h>
+#include <stdint.h>
#include <time.h>
+#include <stdint.h>
#include <xmlrpc-c/util.h>
#include <xmlrpc-c/config.h>
/* Defines XMLRPC_HAVE_WCHAR, XMLRPC_INT64 */
@@ -36,9 +38,9 @@ extern unsigned int const xmlrpc_version_point;
typedef signed int xmlrpc_int;
/* An integer of the type defined by XML-RPC <int>; i.e. 32 bit */
-typedef XMLRPC_INT32 xmlrpc_int32;
+typedef int32_t xmlrpc_int32;
/* An integer of the type defined by XML-RPC <i4>; i.e. 32 bit */
-typedef XMLRPC_INT64 xmlrpc_int64;
+typedef int64_t xmlrpc_int64;
/* An integer of the type defined by "XML-RPC" <i8>; i.e. 64 bit */
typedef int xmlrpc_bool;
/* A boolean (of the type defined by XML-RPC <boolean>, but there's
@@ -113,7 +115,7 @@ extern xmlrpc_type xmlrpc_value_type (xmlrpc_value* const value);
xmlrpc_value *
xmlrpc_int_new(xmlrpc_env * const envP,
- int const intValue);
+ xmlrpc_int32 const intValue);
xmlrpc_value *
xmlrpc_i8_new(xmlrpc_env * const envP,
@@ -122,7 +124,7 @@ xmlrpc_i8_new(xmlrpc_env * const envP,
void
xmlrpc_read_int(xmlrpc_env * const envP,
const xmlrpc_value * const valueP,
- int * const intValueP);
+ xmlrpc_int32 * const intValueP);
xmlrpc_value *
xmlrpc_bool_new(xmlrpc_env * const envP,
diff --git a/src/cpp/param_list.cpp b/src/cpp/param_list.cpp
index 67c636b..60f7df9 100644
--- a/src/cpp/param_list.cpp
+++ b/src/cpp/param_list.cpp
@@ -265,10 +265,10 @@ paramList::getNil(unsigned int const paramNumber) const {
-long long
+xmlrpc_int64
paramList::getI8(unsigned int const paramNumber,
- long long const minimum,
- long long const maximum) const {
+ xmlrpc_int64 const minimum,
+ xmlrpc_int64 const maximum) const {
if (paramNumber >= this->paramVector.size())
throw(fault("Not enough parameters", fault::CODE_TYPE));
@@ -277,7 +277,7 @@ paramList::getI8(unsigned int const paramNumber,
throw(fault("Parameter that is supposed to be 64-bit integer is not",
fault::CODE_TYPE));
- long long const longlongvalue(static_cast<long long>(
+ xmlrpc_int64 const longlongvalue(static_cast<xmlrpc_int64>(
value_i8(this->paramVector[paramNumber])));
if (longlongvalue < minimum)
diff --git a/src/cpp/value.cpp b/src/cpp/value.cpp
index ff3a011..9f2f88e 100644
--- a/src/cpp/value.cpp
+++ b/src/cpp/value.cpp
@@ -265,7 +265,7 @@ value_int::value_int(xmlrpc_c::value const baseValue) {
value_int::operator int() const {
- int retval;
+ xmlrpc_int32 retval;
env_wrap env;
xmlrpc_read_int(&env.env_c, this->cValueP, &retval);
--
1.5.6.5

View File

@ -1,4 +1,4 @@
From 3e749ef00fe69f76587620d2c326aee363e46253 Mon Sep 17 00:00:00 2001
From 29df0db1c131eb08cfd745003116dc4b63c81ff4 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Mon, 25 Feb 2008 17:48:25 +0100
Subject: [PATCH] fixed broken format string modifiers for size_t typed arguments
@ -6,17 +6,18 @@ Subject: [PATCH] fixed broken format string modifiers for size_t typed arguments
---
lib/abyss/src/socket_unix.c | 4 ++--
lib/libutil/memblock.c | 2 +-
src/cpp/server_cgi.cpp | 2 +-
src/xmlrpc_data.c | 2 +-
src/xmlrpc_datetime.c | 2 +-
src/xmlrpc_decompose.c | 4 ++--
src/xmlrpc_parse.c | 16 ++++++++--------
src/xmlrpc_parse.c | 8 ++++----
src/xmlrpc_server_abyss.c | 2 +-
src/xmlrpc_string.c | 8 ++++----
tools/xmlrpc/xmlrpc.c | 2 +-
9 files changed, 21 insertions(+), 21 deletions(-)
10 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/lib/abyss/src/socket_unix.c b/lib/abyss/src/socket_unix.c
index 0059a1e..5ec8f78 100644
index 3da48cc..51a32a7 100644
--- a/lib/abyss/src/socket_unix.c
+++ b/lib/abyss/src/socket_unix.c
@@ -193,8 +193,8 @@ channelWrite(TChannel * const channelP,
@ -43,6 +44,19 @@ index d79d4ca..25992e8 100644
blockP->_allocated);
}
diff --git a/src/cpp/server_cgi.cpp b/src/cpp/server_cgi.cpp
index 15d3df3..c8bb41d 100644
--- a/src/cpp/server_cgi.cpp
+++ b/src/cpp/server_cgi.cpp
@@ -240,7 +240,7 @@ writeNormalHttpResp(FILE * const fileP,
fprintf(fileP, "Set-Cookie: auth=%s\n", authCookie.c_str());
fprintf(fileP, "Content-type: text/xml; charset=\"utf-8\"\n");
- fprintf(fileP, "Content-length: %u\n", httpBody.size());
+ fprintf(fileP, "Content-length: %zu\n", httpBody.size());
fprintf(fileP, "\n");
// HTTP body
diff --git a/src/xmlrpc_data.c b/src/xmlrpc_data.c
index 28827fe..415dd6d 100644
--- a/src/xmlrpc_data.c
@ -57,17 +71,17 @@ index 28827fe..415dd6d 100644
else {
memcpy(byteStringValue, contents, size);
diff --git a/src/xmlrpc_datetime.c b/src/xmlrpc_datetime.c
index 832f4fb..a02ca21 100644
index a4b6454..b7a08e2 100644
--- a/src/xmlrpc_datetime.c
+++ b/src/xmlrpc_datetime.c
@@ -208,7 +208,7 @@ validateFormat(xmlrpc_env * const envP,
const char * const t) {
if (strlen(t) != 17)
- xmlrpc_faultf(envP, "%u characters instead of 15.", strlen(t));
+ xmlrpc_faultf(envP, "%zu characters instead of 15.", strlen(t));
else if (t[8] != 'T')
xmlrpc_faultf(envP, "9th character is '%c', not 'T'", t[8]);
@@ -428,7 +428,7 @@ validateFormat(xmlrpc_env * const envP,
if (strlen(dt) < 17)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_PARSE_ERROR,
- "Invalid length of %u of datetime. "
+ "Invalid length of %zu of datetime. "
"Must be at least 17 characters",
strlen(dt));
else {
diff --git a/src/xmlrpc_decompose.c b/src/xmlrpc_decompose.c
index eeb3414..36e62f6 100644
@ -92,7 +106,7 @@ index eeb3414..36e62f6 100644
else {
struct mbrDecomp * const mbrP =
diff --git a/src/xmlrpc_parse.c b/src/xmlrpc_parse.c
index b62406e..29aec20 100644
index 43d9d54..6638654 100644
--- a/src/xmlrpc_parse.c
+++ b/src/xmlrpc_parse.c
@@ -44,7 +44,7 @@
@ -104,25 +118,7 @@ index b62406e..29aec20 100644
xml_element_name(elem), (count), \
xml_element_children_size(elem)); \
while (0)
@@ -830,7 +830,7 @@ parseMethodNameElement(xmlrpc_env * const envP,
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_PARSE_ERROR,
"A <methodName> element should not have children. "
- "This one has %u of them.", xml_element_children_size(nameElemP));
+ "This one has %zu of them.", xml_element_children_size(nameElemP));
else {
const char * const cdata = xml_element_cdata(nameElemP);
@@ -889,7 +889,7 @@ parseCallChildren(xmlrpc_env * const envP,
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_PARSE_ERROR,
"<methodCall> has extraneous children, other than "
- "<methodName> and <params>. Total child count = %u",
+ "<methodName> and <params>. Total child count = %zu",
callChildCount);
if (envP->fault_occurred)
@@ -927,7 +927,7 @@ xmlrpc_parse_call(xmlrpc_env * const envP,
@@ -293,7 +293,7 @@ xmlrpc_parse_call(xmlrpc_env * const envP,
if (xmlLen > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID))
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_LIMIT_EXCEEDED_ERROR,
@ -131,25 +127,7 @@ index b62406e..29aec20 100644
xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID));
else {
xml_element * callElemP;
@@ -1004,7 +1004,7 @@ parseFaultElement(xmlrpc_env * const envP,
if (xml_element_children_size(faultElement) != 1)
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_PARSE_ERROR,
- "<fault> element should have 1 child, but it has %u.",
+ "<fault> element should have 1 child, but it has %zu.",
xml_element_children_size(faultElement));
else {
xml_element * const faultValueP =
@@ -1100,7 +1100,7 @@ parseMethodResponseElt(xmlrpc_env * const envP,
} else
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_PARSE_ERROR,
- "<methodResponse> has %u children, should have 1.",
+ "<methodResponse> has %zu children, should have 1.",
xml_element_children_size(methodResponseEltP));
}
@@ -1139,8 +1139,8 @@ xmlrpc_parse_response2(xmlrpc_env * const envP,
@@ -545,8 +545,8 @@ xmlrpc_parse_response2(xmlrpc_env * const envP,
if (xmlDataLen > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID))
xmlrpc_env_set_fault_formatted(
envP, XMLRPC_LIMIT_EXCEEDED_ERROR,
@ -161,10 +139,10 @@ index b62406e..29aec20 100644
else {
xmlrpc_env env;
diff --git a/src/xmlrpc_server_abyss.c b/src/xmlrpc_server_abyss.c
index 15c37d6..1a6ea47 100644
index 64cd133..551298a 100644
--- a/src/xmlrpc_server_abyss.c
+++ b/src/xmlrpc_server_abyss.c
@@ -459,7 +459,7 @@ processCall(TSession * const abyssSessionP,
@@ -464,7 +464,7 @@ processCall(TSession * const abyssSessionP,
if (contentSize > xmlrpc_limit_get(XMLRPC_XML_SIZE_LIMIT_ID))
xmlrpc_env_set_fault_formatted(
&env, XMLRPC_LIMIT_EXCEEDED_ERROR,
@ -174,7 +152,7 @@ index 15c37d6..1a6ea47 100644
xmlrpc_mem_block * body;
/* Read XML data off the wire. */
diff --git a/src/xmlrpc_string.c b/src/xmlrpc_string.c
index 8bf299d..a2a4bf4 100644
index 8bf299d..8354b42 100644
--- a/src/xmlrpc_string.c
+++ b/src/xmlrpc_string.c
@@ -141,7 +141,7 @@ xmlrpc_read_string(xmlrpc_env * const envP,
@ -200,7 +178,7 @@ index 8bf299d..a2a4bf4 100644
MALLOCARRAY(stringValue, length + 1);
if (stringValue == NULL)
- xmlrpc_faultf(envP, "Unable to allocate space for %u-byte string",
+ xmlrpc_faultf(envP, "Unable to allocate space for %zu-byte string",
+ xmlrpc_faultf(envP, "Unable to allocate space for %zu-byte string",
length);
else {
memcpy(stringValue, wcontents, length * sizeof(wchar_t));
@ -227,5 +205,5 @@ index 1bdc44c..c4e0618 100644
else {
size_t const byteStringSize = strlen(valueString)/2;
--
1.5.4.5
1.5.6.5

24
xmlrpc-c-stdlib.patch Normal file
View File

@ -0,0 +1,24 @@
From fbab59e1bc20b9ae885c5cfe2f5c4e9b083ae5bc Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 15 Nov 2008 11:34:53 +0100
Subject: [PATCH] include missing <stdlib.h>
---
src/cpp/server_cgi.cpp | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/src/cpp/server_cgi.cpp b/src/cpp/server_cgi.cpp
index c8bb41d..da4152d 100644
--- a/src/cpp/server_cgi.cpp
+++ b/src/cpp/server_cgi.cpp
@@ -14,6 +14,7 @@
#include <memory>
#include <stdio.h>
+#include <stdlib.h>
#include "xmlrpc-c/girerr.hpp"
using girerr::throwf;
--
1.5.6.5

41
xmlrpc-c-va_list.patch Normal file
View File

@ -0,0 +1,41 @@
From 4a8a7e8161d0e0b362508a6e51abf18d50712968 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Sat, 15 Nov 2008 12:07:25 +0100
Subject: [PATCH] 'va_list' param must be non-const
vasprintf(3) uses a non-const 'va_list ap' parameter.
Hence, do not accept a 'const' on in the wrapper function.
---
include/xmlrpc-c/util.h | 2 +-
lib/libutil/error.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/xmlrpc-c/util.h b/include/xmlrpc-c/util.h
index 5b6e4f5..9387ef7 100644
--- a/include/xmlrpc-c/util.h
+++ b/include/xmlrpc-c/util.h
@@ -140,7 +140,7 @@ void
xmlrpc_set_fault_formatted_v(xmlrpc_env * const envP,
int const code,
const char * const format,
- va_list const args);
+ va_list args);
/* The same as the above, but using a printf-style format string. */
void
diff --git a/lib/libutil/error.c b/lib/libutil/error.c
index fd964d0..b182308 100644
--- a/lib/libutil/error.c
+++ b/lib/libutil/error.c
@@ -86,7 +86,7 @@ void
xmlrpc_set_fault_formatted_v(xmlrpc_env * const envP,
int const code,
const char * const format,
- va_list const args) {
+ va_list args) {
const char * faultDescription;
--
1.5.6.5