From b888d17ff062f88d82f5c01c12cb3fc471ddd8e6 Mon Sep 17 00:00:00 2001 From: ensc Date: Sat, 21 Nov 2009 14:02:54 +0000 Subject: [PATCH] updated --- .cvsignore | 2 +- lastver | 2 +- sources | 2 +- xmlrpc-c-cmake.patch | 236 +++++++++++++++++++++++++---------- xmlrpc-c-longlong.patch | 18 +-- xmlrpc-c-printf-size_t.patch | 146 ++++++++++++++++------ xmlrpc-c-uninit-curl.patch | 28 +++++ xmlrpc-c-va_list.patch | 12 +- xmlrpc-c-verbose-curl.patch | 29 +++++ xmlrpc-c.spec | 27 +++- 10 files changed, 374 insertions(+), 128 deletions(-) create mode 100644 xmlrpc-c-uninit-curl.patch create mode 100644 xmlrpc-c-verbose-curl.patch diff --git a/.cvsignore b/.cvsignore index 1dff9cf..9be23b4 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -xmlrpc-c-1.16.6.tar.bz2 +xmlrpc-c-1.20.3.tar.bz2 diff --git a/lastver b/lastver index e4f2bea..5c4d5f2 100644 --- a/lastver +++ b/lastver @@ -1 +1 @@ -1.16.06 +1.20.03 diff --git a/sources b/sources index ab68eb7..e81a939 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -8389b0e11d93a61d9bd130f0cb77eaa4 xmlrpc-c-1.16.6.tar.bz2 +d987c3d989ca1a4774ce12fada437238 xmlrpc-c-1.20.3.tar.bz2 diff --git a/xmlrpc-c-cmake.patch b/xmlrpc-c-cmake.patch index b25037a..86a3718 100644 --- a/xmlrpc-c-cmake.patch +++ b/xmlrpc-c-cmake.patch @@ -1,36 +1,36 @@ -From d446ef878fb5984180ecf15a961af9550ae4f1c8 Mon Sep 17 00:00:00 2001 +From afe99001ee31f4cf827fc6aee0b2088bd4e7b85b Mon Sep 17 00:00:00 2001 From: Enrico Scholz Date: Sat, 5 Apr 2008 10:55:02 +0200 -Subject: [PATCH] make -> cmake transition +Subject: [PATCH 1/6] make -> cmake transition --- - CMakeLists.txt | 254 +++++++++++++++++++++++++++ + CMakeLists.txt | 275 +++++++++++++++++++++++++++ cmake/try-attr.cc | 3 + cmake/va-list-is-array.c | 9 + examples/CMakeLists.txt | 57 ++++++ examples/config.h | 1 + - examples/cpp/CMakeLists.txt | 30 +++ + examples/cpp/CMakeLists.txt | 34 ++++ include/CMakeLists.txt | 3 + - include/xmlrpc-c/CMakeLists.txt | 73 ++++++++ + include/xmlrpc-c/CMakeLists.txt | 73 +++++++ 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/CMakeLists.txt | 66 +++++++ lib/abyss/src/xmlrpc_abyss.pc.cmake | 12 ++ lib/curl_transport/CMakeLists.txt | 20 ++ lib/expat/CMakeLists.txt | 9 + lib/expat/gennmtab/CMakeLists.txt | 3 + lib/expat/xmlparse/CMakeLists.txt | 7 + lib/expat/xmlparse/xmlrpc_xmlparse.pc.cmake | 12 ++ - lib/expat/xmltok/CMakeLists.txt | 20 ++ + lib/expat/xmltok/CMakeLists.txt | 22 ++ lib/expat/xmltok/xmlrpc_xmltok.pc.cmake | 9 + - lib/libutil/CMakeLists.txt | 24 +++ + lib/libutil/CMakeLists.txt | 25 +++ lib/libutil/xmlrpc_util.pc.cmake | 10 + lib/libwww_transport/CMakeLists.txt | 7 + lib/util/CMakeLists.txt | 17 ++ lib/wininet_transport/CMakeLists.txt | 7 + - src/CMakeLists.txt | 121 +++++++++++++ - src/cpp/CMakeLists.txt | 70 ++++++++ + src/CMakeLists.txt | 121 ++++++++++++ + src/cpp/CMakeLists.txt | 70 +++++++ src/cpp/test/CMakeLists.txt | 17 ++ src/cpp/xmlrpc++.pc.cmake | 12 ++ src/cpp/xmlrpc_client++.pc.cmake | 12 ++ @@ -46,22 +46,23 @@ Subject: [PATCH] make -> cmake transition src/xmlrpc_server.pc.cmake | 12 ++ src/xmlrpc_server_abyss.pc.cmake | 12 ++ src/xmlrpc_server_cgi.pc.cmake | 12 ++ - tools/CMakeLists.txt | 12 ++ + tools/CMakeLists.txt | 21 ++ 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/xml-rpc-api2txt/CMakeLists.txt | 7 + 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_pstream/CMakeLists.txt | 16 ++ tools/xmlrpc_transport/CMakeLists.txt | 9 + tools/xmlrpc_transport/config.h | 1 + transport_config.h.cmake | 16 ++ version.h.cmake | 5 + - xmlrpc-c-config | 80 +++++++++ - xmlrpc_config.h.cmake | 99 +++++++++++ - 57 files changed, 1379 insertions(+), 0 deletions(-) + xmlrpc-c-config | 108 +++++++++++ + xmlrpc_config.h.cmake | 105 ++++++++++ + 58 files changed, 1469 insertions(+), 0 deletions(-) create mode 100644 CMakeLists.txt create mode 100644 cmake/try-attr.cc create mode 100644 cmake/va-list-is-array.c @@ -109,10 +110,11 @@ Subject: [PATCH] make -> cmake transition 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/xml-rpc-api2txt/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_pstream/CMakeLists.txt create mode 100644 tools/xmlrpc_transport/CMakeLists.txt create mode 100644 tools/xmlrpc_transport/config.h create mode 100644 transport_config.h.cmake @@ -122,19 +124,22 @@ Subject: [PATCH] make -> cmake transition diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 -index 0000000..800f7fd +index 0000000..f64b143 --- /dev/null +++ b/CMakeLists.txt -@@ -0,0 +1,254 @@ +@@ -0,0 +1,275 @@ +## -*- cmake -*- +project(xmlrpc-c) +include(FindPkgConfig) +include(CheckIncludeFile) +include(CheckFunctionExists) + ++cmake_minimum_required(VERSION 2.6) ++ ++ +set(XMLRPC_C_VERSION_MAJOR "1" CACHE STRING "Version (major) of xmlrpc-c") -+set(XMLRPC_C_VERSION_MINOR "16" CACHE STRING "Version (minor) of xmlrpc-c") -+set(XMLRPC_C_VERSION_POINT "6" CACHE STRING "Version (point) of xmlrpc-c") ++set(XMLRPC_C_VERSION_MINOR "20" CACHE STRING "Version (minor) of xmlrpc-c") ++set(XMLRPC_C_VERSION_POINT "03" CACHE STRING "Version (point) of xmlrpc-c") + +set(XMLRPC_C_VERSION + "${XMLRPC_C_VERSION_MAJOR}.${XMLRPC_C_VERSION_MINOR}.${XMLRPC_C_VERSION_POINT}" @@ -143,8 +148,8 @@ index 0000000..800f7fd +set(XMLRPC_C_LIBVERSION "3.${XMLRPC_C_VERSION_MINOR}") +set(XMLRPC_C_SOVERSION "3") + -+set(XMLRPC_CXX_LIBVERSION "4.${XMLRPC_C_VERSION_MINOR}") -+set(XMLRPC_CXX_SOVERSION "4") ++set(XMLRPC_CXX_LIBVERSION "6.${XMLRPC_C_VERSION_MINOR}") ++set(XMLRPC_CXX_SOVERSION "6") + +string(REGEX REPLACE "^0+" "" XMLRPC_C_VERSION_MAJOR_NUM "${XMLRPC_C_VERSION_MAJOR}") +string(REGEX REPLACE "^0+" "" XMLRPC_C_VERSION_MINOR_NUM "${XMLRPC_C_VERSION_MINOR}") @@ -184,7 +189,6 @@ index 0000000..800f7fd + endif(NOT MUST_BUILD_LIBWWW_CLIENT) +endmacro(ensc_set_link_exe_flags) + -+ +########### +if(WIN32) + find_program(WININET_CONFIG_EXECUTABLE wininet-config) @@ -264,10 +268,26 @@ index 0000000..800f7fd + pkg_check_modules(LIBXML2 libxml-2.0) + + if(LIBXML2_FOUND) -+ set(libxml_pkgconfig libxml-2.0) # TODO: enhance more alternative modules ++ set(libxml_pkgconfig libxml-2.0) # TODO: add more alternative modules + endif(LIBXML2_FOUND) +endif(ENABLE_LIBXML2_BACKEND) + ++########### ++ ++set(ENABLE_TOOLS 0 CACHE BOOL "Build the tools") ++pkg_check_modules(NCURSES ncurses) ++find_library(READLINE readline) ++ ++if (ENABLE_TOOLS) ++ message(STATUS "Building tools") ++ if (MUST_BUILD_LIBWWW_CLIENT OR MUST_BUILD_WININET_CLIENT OR MUST_BUILD_CURL_CLIENT) ++ if (NCURSES_FOUND AND READLINE) ++ set(BUILD_XMLRPC_PSTREAM 1) ++ message(STATUS "Building xmlrpc_pstream tool") ++ endif() ++ set(BUILD_TOOLS 1) ++ endif() ++endif() + +#### tests +check_include_file(wchar.h _have_wchar_h) @@ -317,10 +337,10 @@ index 0000000..800f7fd + +check_include_file(sys/filio.h HAVE_SYS_FILIO_H) +check_include_file(sys/ioctl.h HAVE_SYS_IOCTL_H) -+check_function_exists(setenv HAVE_SETENV) -+check_function_exists(strcasecmp HAVE_STRCASECMP) -+check_function_exists(_stricmp HAVE__STRICMP) -+check_function_exists(stricmp HAVE_STRICMP) ++check_function_exists(setenv HAVE_SETENV) ++check_function_exists(strcasecmp HAVE_STRCASECMP) ++check_function_exists(_stricmp HAVE__STRICMP) ++check_function_exists(stricmp HAVE_STRICMP) +check_function_exists(gettimeofday HAVE_GETTIMEOFDAY) +check_function_exists(setgroups HAVE_SETGROUPS) +check_function_exists(asprintf HAVE_ASPRINTF) @@ -379,7 +399,10 @@ index 0000000..800f7fd +add_subdirectory(examples) +add_subdirectory(include) +add_subdirectory(src) -+add_subdirectory(tools) ++ ++if (BUILD_TOOLS) ++ add_subdirectory(tools) ++endif() diff --git a/cmake/try-attr.cc b/cmake/try-attr.cc new file mode 100644 index 0000000..4668c5b @@ -476,16 +499,19 @@ 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..f27edbb +index 0000000..093a75d --- /dev/null +++ b/examples/cpp/CMakeLists.txt -@@ -0,0 +1,30 @@ +@@ -0,0 +1,34 @@ +# -*- cmake -*- + +if(ENABLE_ABYSS_SERVER) + set(abyss_serverxx_LIBS xmlrpc_server_abyss++) + + ensc_add_example(xmlrpc_inetd_server cpp abyss_serverxx) ++ ensc_add_example(xmlrpc_loop_server cpp abyss_serverxx) ++ ensc_add_example(xmlrpc_sample_add_server cpp abyss_serverxx) ++ ensc_add_example(callinfo_abyss_server cpp abyss_serverxx) +endif(ENABLE_ABYSS_SERVER) + +if (ENABLE_CGI_SERVER) @@ -506,6 +532,7 @@ index 0000000..f27edbb + +set(pstream_serverxx_LIBS xmlrpc_server_pstream++) +ensc_add_example(pstream_inetd_server cpp pstream_serverxx) ++ensc_add_example(pstream_serial_server cpp pstream_serverxx) + + + @@ -663,10 +690,10 @@ index 0000000..2358061 +SUBDIRS(src) diff --git a/lib/abyss/src/CMakeLists.txt b/lib/abyss/src/CMakeLists.txt new file mode 100644 -index 0000000..e0373e6 +index 0000000..e7f89bf --- /dev/null +++ b/lib/abyss/src/CMakeLists.txt -@@ -0,0 +1,64 @@ +@@ -0,0 +1,66 @@ +## -*- cmake -*- + +set(xmlrpc_abyss_SOURCES @@ -704,6 +731,8 @@ index 0000000..e0373e6 + trace.c + trace.h) + ++add_definitions(-D_UNIX) ++ +if(ENABLE_ABYSS_THREADS) + list(APPEND xmlrpc_abyss_SOURCES thread_pthread.c) +else(ENABLE_ABYSS_THREADS) @@ -832,14 +861,16 @@ index 0000000..5b2a7e4 +Cflags: diff --git a/lib/expat/xmltok/CMakeLists.txt b/lib/expat/xmltok/CMakeLists.txt new file mode 100644 -index 0000000..c3247ad +index 0000000..359c4e4 --- /dev/null +++ b/lib/expat/xmltok/CMakeLists.txt -@@ -0,0 +1,20 @@ +@@ -0,0 +1,22 @@ +# -*- cmake -*- + +include_directories(${CMAKE_CURRENT_BINARY_DIR}) + ++add_definitions(-DXML_BYTE_ORDER=0) ++ +add_library(xmlrpc_xmltok STATIC + xmltok.c xmlrole.c ${CMAKE_CURRENT_BINARY_DIR}/nametab.h) + @@ -873,14 +904,15 @@ index 0000000..88e7ad8 +Cflags: diff --git a/lib/libutil/CMakeLists.txt b/lib/libutil/CMakeLists.txt new file mode 100644 -index 0000000..0f9a7f3 +index 0000000..06136db --- /dev/null +++ b/lib/libutil/CMakeLists.txt -@@ -0,0 +1,24 @@ +@@ -0,0 +1,25 @@ +# -*- cmake -*- + +add_library(xmlrpc_util SHARED + asprintf.c ++ base64.c + error.c + make_printable.c + memblock.c @@ -968,7 +1000,7 @@ index 0000000..17535ab +endif(MUST_BUILD_WININET_CLIENT) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt new file mode 100644 -index 0000000..8490f9d +index 0000000..4c03b5b --- /dev/null +++ b/src/CMakeLists.txt @@ -0,0 +1,121 @@ @@ -1027,7 +1059,7 @@ index 0000000..8490f9d + +### libxmlrpc.so +add_library(xmlrpc SHARED -+ double.c parse_value.c resource.c trace.c version.c ++ double.c parse_datetime.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 @@ -1095,7 +1127,7 @@ index 0000000..8490f9d +enable_testing() diff --git a/src/cpp/CMakeLists.txt b/src/cpp/CMakeLists.txt new file mode 100644 -index 0000000..8bfe077 +index 0000000..345c5ac --- /dev/null +++ b/src/cpp/CMakeLists.txt @@ -0,0 +1,70 @@ @@ -1138,7 +1170,7 @@ index 0000000..8bfe077 +endif(ENABLE_CGI_SERVER) + +####### libxmlrpc_server_pstream++.so -+add_library(xmlrpc_server_pstream++ SHARED server_pstream.cpp) ++add_library(xmlrpc_server_pstream++ SHARED server_pstream.cpp server_pstream_conn) +target_link_libraries(xmlrpc_server_pstream++ xmlrpc_server++ xmlrpc_packetsocket) +list(APPEND lib_TARGETS xmlrpc_server_pstream++) +ensc_pkgconfig(xmlrpc_server_pstream++) @@ -1471,22 +1503,31 @@ index 0000000..4d174ef +Cflags: -I${includedir} diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt new file mode 100644 -index 0000000..750fed4 +index 0000000..0bc45a9 --- /dev/null +++ b/tools/CMakeLists.txt -@@ -0,0 +1,12 @@ +@@ -0,0 +1,21 @@ +# -*- cmake -*- + +add_subdirectory(lib) -+ +add_subdirectory(binmode-rpc-kit) +add_subdirectory(turbocharger) + -+add_subdirectory(xmlrpc) -+add_subdirectory(xmlrpc_transport) ++if (MUST_BUILD_CLIENT) ++ add_subdirectory(xmlrpc) ++ add_subdirectory(xmlrpc_transport) + -+add_subdirectory(xmlrpc_cpp_proxy) -+add_subdirectory(xml-rpc-api2cpp ) ++ ++ if (ENABLE_CPLUSPLUS) ++ add_subdirectory(xml-rpc-api2cpp) ++ add_subdirectory(xml-rpc-api2txt) ++ add_subdirectory(xmlrpc_cpp_proxy) ++ ++ if (BUILD_XMLRPC_PSTREAM AND ENABLE_CGI_SERVER) ++ add_subdirectory(xmlrpc_pstream) ++ endif() ++ endif() ++endif() diff --git a/tools/binmode-rpc-kit/CMakeLists.txt b/tools/binmode-rpc-kit/CMakeLists.txt new file mode 100644 index 0000000..a707c75 @@ -1511,7 +1552,7 @@ index 0000000..342423d +# -*- cmake -*- diff --git a/tools/xml-rpc-api2cpp/CMakeLists.txt b/tools/xml-rpc-api2cpp/CMakeLists.txt new file mode 100644 -index 0000000..c759dec +index 0000000..1e9134a --- /dev/null +++ b/tools/xml-rpc-api2cpp/CMakeLists.txt @@ -0,0 +1,15 @@ @@ -1523,13 +1564,26 @@ index 0000000..c759dec + XmlRpcFunction.cpp + XmlRpcClass.cpp + SystemProxy.cpp) -+target_link_libraries(xml-rpc-api2cpp xmlrpc_cpp xmlrpc_client xmlrpc_server) ++target_link_libraries(xml-rpc-api2cpp xmlrpc_cpp xmlrpc_client) + +install(TARGETS xml-rpc-api2cpp + RUNTIME DESTINATION bin) + +install(FILES xml-rpc-api2cpp.1 + DESTINATION ${mandir}/man1) +diff --git a/tools/xml-rpc-api2txt/CMakeLists.txt b/tools/xml-rpc-api2txt/CMakeLists.txt +new file mode 100644 +index 0000000..5b01824 +--- /dev/null ++++ b/tools/xml-rpc-api2txt/CMakeLists.txt +@@ -0,0 +1,7 @@ ++# -*- cmake -*- ++ ++install(PROGRAMS xml-rpc-api2txt ++ DESTINATION ${bindir}) ++ ++install(FILES xml-rpc-api2txt.1 ++ DESTINATION ${mandir}/man1) diff --git a/tools/xmlrpc/CMakeLists.txt b/tools/xmlrpc/CMakeLists.txt new file mode 100644 index 0000000..da01ec3 @@ -1583,18 +1637,28 @@ 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 +diff --git a/tools/xmlrpc_pstream/CMakeLists.txt b/tools/xmlrpc_pstream/CMakeLists.txt new file mode 100644 -index 0000000..67ae8c5 +index 0000000..b277bc8 --- /dev/null -+++ b/tools/xmlrpc_pstream/CMakefiles.txt -@@ -0,0 +1,6 @@ ++++ b/tools/xmlrpc_pstream/CMakeLists.txt +@@ -0,0 +1,16 @@ +# -*- cmake -*- + +add_executable(xmlrpc_pstream + xmlrpc_pstream.cpp -+ ${tools_lib_SOURCES}) -+target_link_libraries(xmlrpc_pstream readline util) ++ ../lib/dumpvalue.c) ++ ++target_link_libraries(xmlrpc_pstream ++ ${READLINE} ++ ${NCURSES_LIBRARIES} ++ xmlrpc_client++ ++ util) ++ ++include_directories(../lib/include) ++ ++install(TARGETS xmlrpc_pstream ++ RUNTIME DESTINATION bin) diff --git a/tools/xmlrpc_transport/CMakeLists.txt b/tools/xmlrpc_transport/CMakeLists.txt new file mode 100644 index 0000000..b73d7c0 @@ -1641,21 +1705,21 @@ index 0000000..1ec3cf6 + ; diff --git a/version.h.cmake b/version.h.cmake new file mode 100644 -index 0000000..12ab86d +index 0000000..0c964a3 --- /dev/null +++ b/version.h.cmake @@ -0,0 +1,5 @@ +/* This file was generated by a make rule */ -+#define XMLRPC_C_VERSION "@XMLRPC_C_VERSION@" ++#define XMLRPC_C_VERSION "@XMLRPC_C_VERSION@" +#define XMLRPC_VERSION_MAJOR @XMLRPC_C_VERSION_MAJOR_NUM@ +#define XMLRPC_VERSION_MINOR @XMLRPC_C_VERSION_MINOR_NUM@ +#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..c32555e +index 0000000..327fad7 --- /dev/null +++ b/xmlrpc-c-config -@@ -0,0 +1,80 @@ +@@ -0,0 +1,108 @@ +#! /bin/sh + +comp= @@ -1668,16 +1732,44 @@ index 0000000..c32555e +need_packetsocket= +need_cgi= + ++show_help() { ++ cat < ...