rediffed/added/removed for 1.14.2

This commit is contained in:
ensc 2008-04-12 08:40:03 +00:00
parent 9b9905af7c
commit 9ba4c19f87
4 changed files with 246 additions and 58 deletions

View File

@ -1,4 +1,4 @@
From e75a9a92c3a5a7bdb47369b24705c3cfa2d453fb Mon Sep 17 00:00:00 2001
From b4884128c52b27015020148b698ef2e9907ff2fa 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
@ -16,10 +16,10 @@ Subject: [PATCH] fixed broken format string modifiers for size_t typed arguments
9 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/lib/abyss/src/socket_unix.c b/lib/abyss/src/socket_unix.c
index 7955166..080b0ee 100644
index fd39276..afe2be7 100644
--- a/lib/abyss/src/socket_unix.c
+++ b/lib/abyss/src/socket_unix.c
@@ -149,8 +149,8 @@ channelWrite(TChannel * const channelP,
@@ -193,8 +193,8 @@ channelWrite(TChannel * const channelP,
fprintf(stderr, "Abyss channel: send() failed. "
"Socket closed.\n");
else
@ -57,10 +57,10 @@ index 28827fe..415dd6d 100644
else {
memcpy(byteStringValue, contents, size);
diff --git a/src/xmlrpc_datetime.c b/src/xmlrpc_datetime.c
index 2724586..0cc68a5 100644
index c4cc938..17fa328 100644
--- a/src/xmlrpc_datetime.c
+++ b/src/xmlrpc_datetime.c
@@ -204,7 +204,7 @@ validateFormat(xmlrpc_env * const envP,
@@ -208,7 +208,7 @@ validateFormat(xmlrpc_env * const envP,
const char * const t) {
if (strlen(t) != 17)
@ -161,10 +161,10 @@ index 77b649d..dfcc29b 100644
else {
xmlrpc_env env;
diff --git a/src/xmlrpc_server_abyss.c b/src/xmlrpc_server_abyss.c
index 41c319c..e9f0852 100644
index 15c37d6..1a6ea47 100644
--- a/src/xmlrpc_server_abyss.c
+++ b/src/xmlrpc_server_abyss.c
@@ -388,7 +388,7 @@ processCall(TSession * const abyssSessionP,
@@ -459,7 +459,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,
@ -214,10 +214,10 @@ index 8bf299d..a2a4bf4 100644
const wchar_t * p; /* source pointer */
wchar_t * q; /* destination pointer */
diff --git a/tools/xmlrpc/xmlrpc.c b/tools/xmlrpc/xmlrpc.c
index 0e49b06..c2c117f 100644
index 1bdc44c..c4e0618 100644
--- a/tools/xmlrpc/xmlrpc.c
+++ b/tools/xmlrpc/xmlrpc.c
@@ -266,7 +266,7 @@ buildBytestring(xmlrpc_env * const envP,
@@ -268,7 +268,7 @@ buildBytestring(xmlrpc_env * const envP,
if (valueStringSize / 2 * 2 != valueStringSize)
xmlrpc_faultf(envP, "Hexadecimal text is not an even "

View File

@ -1,25 +0,0 @@
From 46e9cd41928144bf87534e8ca5902b3178e5486a Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Mon, 25 Feb 2008 17:53:27 +0100
Subject: [PATCH] fixed uninitialised usage of buffer attribute
---
src/cpp/base64.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/cpp/base64.cpp b/src/cpp/base64.cpp
index f9c0dac..1b34618 100644
--- a/src/cpp/base64.cpp
+++ b/src/cpp/base64.cpp
@@ -39,7 +39,7 @@ unsigned char const table_b2a_base64[] =
class bitBuffer {
public:
- bitBuffer() : bitsInBuffer(0) {};
+ bitBuffer() : buffer(0), bitsInBuffer(0) {};
void
shiftIn8Bits(unsigned char const newBits) {
--
1.5.4.1

View File

@ -1,18 +1,18 @@
From 91b0e8786c1231172fc43848cab83773ad603c59 Mon Sep 17 00:00:00 2001
From fe143f77b741d6518d26bafa56adc030dc1d3bb1 Mon Sep 17 00:00:00 2001
From: Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
Date: Mon, 25 Feb 2008 17:19:20 +0100
Date: Sat, 5 Apr 2008 10:55:02 +0200
Subject: [PATCH] make -> cmake transition
---
CMakeLists.txt | 261 +++++++++++++++++++++++++++
CMakeLists.txt | 260 +++++++++++++++++++++++++++
cmake/try-attr.cc | 3 +
cmake/va-list-is-array.c | 9 +
examples/CMakeLists.txt | 56 ++++++
examples/CMakeLists.txt | 57 ++++++
examples/config.h | 1 +
examples/cpp/CMakeLists.txt | 24 +++
include/CMakeLists.txt | 3 +
include/xmlrpc-c/CMakeLists.txt | 73 ++++++++
include/xmlrpc-c/config.h.cmake | 30 +++
include/xmlrpc-c/config.h.cmake | 41 +++++
lib/CMakeLists.txt | 12 ++
lib/abyss/CMakeLists.txt | 3 +
lib/abyss/src/CMakeLists.txt | 64 +++++++
@ -27,7 +27,7 @@ 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 | 13 ++
lib/util/CMakeLists.txt | 16 ++
lib/wininet_transport/CMakeLists.txt | 7 +
src/CMakeLists.txt | 107 +++++++++++
src/cpp/CMakeLists.txt | 60 ++++++
@ -58,7 +58,7 @@ Subject: [PATCH] make -> cmake transition
version.h.cmake | 5 +
xmlrpc-c-config | 77 ++++++++
xmlrpc_config.h.cmake | 87 +++++++++
54 files changed, 1291 insertions(+), 0 deletions(-)
54 files changed, 1305 insertions(+), 0 deletions(-)
create mode 100644 CMakeLists.txt
create mode 100644 cmake/try-attr.cc
create mode 100644 cmake/va-list-is-array.c
@ -116,10 +116,10 @@ Subject: [PATCH] make -> cmake transition
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..aa21f44
index 0000000..2cba7d1
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,261 @@
@@ -0,0 +1,260 @@
+## -*- cmake -*-
+project(xmlrpc-c)
+include(UsePkgConfig)
@ -127,17 +127,17 @@ index 0000000..aa21f44
+include(CheckFunctionExists)
+
+set(XMLRPC_C_VERSION_MAJOR "1" CACHE STRING "Version (major) of xmlrpc-c")
+set(XMLRPC_C_VERSION_MINOR "13" 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 "14" CACHE STRING "Version (minor) of xmlrpc-c")
+set(XMLRPC_C_VERSION_POINT "2" 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.13")
+set(XMLRPC_C_LIBVERSION "3.14")
+set(XMLRPC_C_SOVERSION "3")
+
+set(XMLRPC_CXX_LIBVERSION "4.13")
+set(XMLRPC_CXX_LIBVERSION "4.14")
+set(XMLRPC_CXX_SOVERSION "4")
+
+string(REGEX REPLACE "^0+" "" XMLRPC_C_VERSION_MAJOR_NUM "${XMLRPC_C_VERSION_MAJOR}")
@ -375,7 +375,6 @@ index 0000000..aa21f44
+
+add_subdirectory(lib)
+add_subdirectory(Windows)
+add_subdirectory(conf)
+add_subdirectory(doc)
+add_subdirectory(examples)
+add_subdirectory(include)
@ -407,10 +406,10 @@ index 0000000..1ad0bab
+int main() {}
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt
new file mode 100644
index 0000000..247b731
index 0000000..6e18556
--- /dev/null
+++ b/examples/CMakeLists.txt
@@ -0,0 +1,56 @@
@@ -0,0 +1,57 @@
+# -*- cmake -*-
+
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
@ -459,6 +458,7 @@ index 0000000..247b731
+if(ENABLE_ABYSS_SERVER)
+ set(abyss_server_LIBS xmlrpc_server_abyss)
+
+ ensc_add_example(interrupted_server c abyss_server)
+ ensc_add_example(xmlrpc_inetd_server c abyss_server)
+ ensc_add_example(xmlrpc_socket_server c abyss_server)
+ ensc_add_example(xmlrpc_loop_server c abyss_server)
@ -594,17 +594,17 @@ 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..ee3c015
index 0000000..c3d46ab
--- /dev/null
+++ b/include/xmlrpc-c/config.h.cmake
@@ -0,0 +1,30 @@
@@ -0,0 +1,41 @@
+/* --*- c -*-- */
+#ifndef XMLRPC_C_CONFIG_H_INCLUDED
+#define XMLRPC_C_CONFIG_H_INCLUDED
+
+/* This file, part of XML-RPC For C/C++, is meant to
+ define characteristics of this particular installation
+ that the other <xmlrpc-c/...> header files need in
+/* This file, part of XML-RPC For C/C++, is meant to
+ define characteristics of this particular installation
+ that the other <xmlrpc-c/...> header files need in
+ order to compile correctly when #included in Xmlrpc-c
+ user code.
+
@ -627,6 +627,17 @@ index 0000000..ee3c015
+ #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
@ -913,17 +924,20 @@ index 0000000..a494605
+endif(MUST_BUILD_LIBWWW_CLIENT)
diff --git a/lib/util/CMakeLists.txt b/lib/util/CMakeLists.txt
new file mode 100644
index 0000000..be6ded2
index 0000000..f223bed
--- /dev/null
+++ b/lib/util/CMakeLists.txt
@@ -0,0 +1,13 @@
@@ -0,0 +1,16 @@
+## -*- cmake -*-
+
+set(util_SOURCES
+ casprintf.c
+ cmdline_parser.c
+ getoptx.c
+ getoptx.h)
+ getoptx.h
+ stripcaseeq.c
+ string_parser.c
+)
+
+if(WIN32)
+ list(APPEND util_SOURCES pthreadx_win32.c)

199
use-proper-datatypes.patch Normal file
View File

@ -0,0 +1,199 @@
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