Skip to content

Commit 9543a10

Browse files
author
giraffedata
committed
Release 1.21.00 - rebase advanced branch to current trunk
git-svn-id: https://xmlrpc-c.svn.sourceforge.net/svnroot/xmlrpc-c/advanced@1851 adbb7d4b-a73a-0410-a071-c5f57c452bd4
1 parent 7e56c85 commit 9543a10

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+971
-487
lines changed

Windows/win32_config.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,12 @@
2020
#define XMLRPC_SOCKET SOCKET
2121
#define XMLRPC_HAVE_TIMEVAL 0
2222
#define XMLRPC_HAVE_TIMESPEC 0
23+
#define XMLRPC_HAVE_PTHREAD 0
2324
#else
2425
#define XMLRPC_SOCKET int
2526
#define XMLRPC_HAVE_TIMEVAL 1
2627
#define XMLRPC_HAVE_TIMESPEC 1
28+
#define XMLRPC_HAVE_PTHREAD 1
2729
#endif
2830

2931
#if defined(_MSC_VER)

Windows/xmlrpc_win32_config.h

Lines changed: 39 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@
3131
/* From xmlrpc_amconfig.h */
3232

3333
#define HAVE__STRICMP 1
34+
#define HAVE__STRTOUI64 1
35+
3436
/* Name of package */
3537
#define PACKAGE "xmlrpc-c"
3638
/*----------------------------------*/
@@ -72,6 +74,7 @@
7274
#define HAVE_WCHAR_H 1
7375
#define HAVE_SYS_FILIO_H 0
7476
#define HAVE_SYS_IOCTL_H 0
77+
#define HAVE_SYS_SELECT_H 0
7578

7679
#define VA_LIST_IS_ARRAY 0
7780

@@ -126,6 +129,22 @@
126129
#define HAVE_TIMESPEC 1
127130
#endif
128131

132+
#if MSVCRT
133+
#define HAVE_WINDOWS_THREAD 1
134+
#else
135+
#define HAVE_WINDOWS_THREAD 0
136+
#endif
137+
138+
/* Some people have and use pthreads on Windows. See
139+
http://sourceware.org/pthreads-win32 . For that case, we can set
140+
HAVE_PTHREAD to 1. The builder prefers to use pthreads if it has
141+
a choice.
142+
*/
143+
#define HAVE_PTHREAD 0
144+
145+
/* Note that the return value of XMLRPC_VSNPRINTF is int on Windows,
146+
ssize_t on POSIX.
147+
*/
129148
#if MSVCRT
130149
#define XMLRPC_VSNPRINTF _vsnprintf
131150
#else
@@ -162,9 +181,27 @@
162181
#pragma warning(disable:4996)
163182
#endif
164183

184+
#if HAVE_STRTOLL
185+
# define XMLRPC_STRTOLL strtoll
186+
#elif HAVE_STRTOQ
187+
# define XMLRPC_STRTOLL strtoq /* Interix */
188+
#elif HAVE___STRTOLL
189+
# define XMLRPC_STRTOLL __strtoll /* HP-UX <= 11.11 */
190+
#elif HAVE__STRTOUI64
191+
#define XMLRPC_STRTOLL _strtoui64 /* Windows MSVC */
192+
#endif
193+
194+
#if HAVE_STRTOULL
195+
# define XMLRPC_STRTOULL strtoull
196+
#elif HAVE_STRTOUQ
197+
# define XMLRPC_STRTOULL strtouq /* Interix */
198+
#elif HAVE___STRTOULL
199+
# define XMLRPC_STRTOULL __strtoull /* HP-UX <= 11.11 */
200+
#elif HAVE__STRTOUI64
201+
#define XMLRPC_STRTOULL _strtoui64 /* Windows MSVC */
202+
#endif
203+
165204
#define snprintf _snprintf
166205
#define popen _popen
167-
#define strtoll _strtoui64
168-
#define strtoull _strtoui64
169206

170207
#endif

config.mk.in

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,10 @@ ifeq ($(patsubst solaris%,solaris,$(HOST_OS)),solaris)
189189
SHLIB_SUFFIX = so
190190
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
191191
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
192+
# We assume Sun compiler and linker here. It isn't clear what to do
193+
# about a user who uses GNU compiler and Ld instead. For that, the
194+
# options should be the same as "linux-gnu" platform, above.
195+
192196
# Solaris compiler (Sun C 5.5) can't take multiple ld options as
193197
# -Wl,-a,-b . Ld sees -a,-b in that case.
194198
LDFLAGS_SHLIB = -Wl,-Bdynamic -Wl,-G -Wl,-h -Wl,$(SONAME)
@@ -249,6 +253,18 @@ ifeq ($(patsubst freebsd%,freebsd,$(HOST_OS)),freebsd)
249253
NEED_WL_RPATH=yes
250254
endif
251255

256+
ifeq ($(findstring interix,$(HOST_OS)),interix)
257+
SHARED_LIB_TYPE = unix
258+
SHLIB_SUFFIX = so
259+
MUST_BUILD_SHLIB = Y
260+
MUST_BUILD_SHLIBLE = Y
261+
shlibfn = $(1:%=%.$(SHLIB_SUFFIX).$(MAJ).$(MIN))
262+
shliblefn = $(1:%=%.$(SHLIB_SUFFIX))
263+
CFLAGS_SHLIB =
264+
LDFLAGS_SHLIB = -shared -Wl,-soname,$(SONAME) $(SHLIB_CLIB)
265+
NEED_WL_RPATH=yes
266+
endif
267+
252268
ifeq ($(patsubst dragonfly%,dragonfly,$(HOST_OS)),dragonfly)
253269
SHARED_LIB_TYPE = unix
254270
MUST_BUILD_SHLIB = Y

configure.in

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,14 @@ else
306306
fi
307307
AC_SUBST(HAVE_SYS_IOCTL_H_DEFINE)
308308

309+
AC_CHECK_HEADERS(sys/select.h)
310+
if test x"$ac_cv_header_sys_select_h" = xyes; then
311+
HAVE_SYS_SELECT_H_DEFINE=1
312+
else
313+
HAVE_SYS_SELECT_H_DEFINE=0
314+
fi
315+
AC_SUBST(HAVE_SYS_SELECT_H_DEFINE)
316+
309317

310318
AC_CHECK_HEADERS(stdarg.h, , [
311319
AC_MSG_ERROR(stdarg.h is required to build this library)
@@ -363,7 +371,7 @@ AC_CHECK_FUNCS(setgroups)
363371

364372
AC_CHECK_FUNCS(asprintf)
365373

366-
AC_CHECK_FUNCS(setenv)
374+
AC_CHECK_FUNCS(setenv strtoll strtoull strtoq strtouq __strtoll __strtoull)
367375

368376
dnl uclib doesn't have pselect
369377
AC_CHECK_FUNCS(pselect)

include/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ xmlrpc-c/config.h: $(BLDDIR)/$(SUBDIR)/xmlrpc-c
3636
@echo ' #define XMLRPC_SOCKET SOCKET' >>$@
3737
@echo ' #define XMLRPC_HAVE_TIMEVAL 0' >>$@
3838
@echo ' #define XMLRPC_HAVE_TIMESPEC 0' >>$@
39+
@echo ' #define XMLRPC_HAVE_PTHREAD 0' >>$@
3940
@echo '#else' >>$@
4041
@echo ' #define XMLRPC_SOCKET int' >>$@
4142
@echo ' #define XMLRPC_HAVE_TIMEVAL 1' >>$@
4243
@echo ' #define XMLRPC_HAVE_TIMESPEC 1' >>$@
44+
@echo ' #define XMLRPC_HAVE_PTHREAD 1' >>$@
4345
@echo '#endif' >>$@
4446
@echo '' >>$@
4547
@echo '#if defined(_MSC_VER)' >>$@

include/xmlrpc-c/base.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -379,8 +379,8 @@ xmlrpc_struct_new(xmlrpc_env * const env);
379379
/* Return the number of key/value pairs in a struct.
380380
** Sets XMLRPC_TYPE_ERROR if 'strct' is not a struct. */
381381
int
382-
xmlrpc_struct_size (xmlrpc_env * env,
383-
xmlrpc_value * strct);
382+
xmlrpc_struct_size (xmlrpc_env * const env,
383+
xmlrpc_value * const strct);
384384

385385
/* Returns true iff 'strct' contains 'key'.
386386
** Sets XMLRPC_TYPE_ERROR if 'strct' is not a struct. */

include/xmlrpc-c/base_int.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ xmlrpc_typeName(xmlrpc_type const type);
117117
void
118118
xmlrpc_traceXml(const char * const label,
119119
const char * const xml,
120-
unsigned int const xmlLength);
120+
size_t const xmlLength);
121121

122122
void
123123
xmlrpc_destroyString(xmlrpc_value * const stringP);

include/xmlrpc-c/client.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ struct xmlrpc_curl_xportparms {
7171
const char * egdsocket;
7272
const char * ssl_cipher_list;
7373
unsigned int timeout;
74+
xmlrpc_bool dont_advertise;
7475
};
7576

7677

include/xmlrpc-c/client_transport.hpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,7 @@ class clientXmlTransport_curl : public xmlrpc_c::clientXmlTransport_http {
256256
constrOpt & network_interface (std::string const& arg);
257257
constrOpt & no_ssl_verifypeer (bool const& arg);
258258
constrOpt & no_ssl_verifyhost (bool const& arg);
259+
constrOpt & dont_advertise (bool const& arg);
259260
constrOpt & user_agent (std::string const& arg);
260261
constrOpt & ssl_cert (std::string const& arg);
261262
constrOpt & sslcerttype (std::string const& arg);
@@ -277,6 +278,7 @@ class clientXmlTransport_curl : public xmlrpc_c::clientXmlTransport_http {
277278
std::string network_interface;
278279
bool no_ssl_verifypeer;
279280
bool no_ssl_verifyhost;
281+
bool dont_advertise;
280282
std::string user_agent;
281283
std::string ssl_cert;
282284
std::string sslcerttype;
@@ -298,6 +300,7 @@ class clientXmlTransport_curl : public xmlrpc_c::clientXmlTransport_http {
298300
bool network_interface;
299301
bool no_ssl_verifypeer;
300302
bool no_ssl_verifyhost;
303+
bool dont_advertise;
301304
bool user_agent;
302305
bool ssl_cert;
303306
bool sslcerttype;

include/xmlrpc-c/girmem.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#ifndef GIRMEM_HPP_INCLUDED
22
#define GIRMEM_HPP_INCLUDED
33

4+
#include <xmlrpc-c/config.h>
45

56
/* The following pthread crap mirrors what is in pthreadx.h, which is
67
what girmem.cpp uses to declare the lock interface. We can't simply
@@ -15,7 +16,7 @@
1516
a pthread_mutex_t member, and on Windows, there's no such type.
1617
*/
1718

18-
#ifndef WIN32
19+
#if XMLRPC_HAVE_PTHREAD
1920
# include <pthread.h>
2021
typedef pthread_mutex_t girmem_lock;
2122
#else

include/xmlrpc-c/inttypes.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ typedef unsigned __int64 xmlrpc_uint64_t;
99

1010
#else
1111
#include <inttypes.h>
12+
#ifdef __INTERIX
13+
# include <stdint.h>
14+
#endif
1215

1316
typedef uint16_t xmlrpc_uint16_t;
1417
typedef uint32_t xmlrpc_uint32_t;

include/xmlrpc-c/select_int.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#ifndef SELECT_INT_H_INCLUDED
22
#define SELECT_INT_H_INCLUDED
33

4-
#ifndef WIN32
4+
#if HAVE_SYS_SELECT_H
55
#include <sys/select.h>
66
#endif
77
#include <signal.h>

include/xmlrpc-c/server_abyss.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,10 @@ class serverAbyss {
6767
void
6868
runConn(int const socketFd);
6969

70+
#ifndef WIN32
7071
void
7172
sigchld(pid_t pid);
73+
#endif
7274

7375
void
7476
terminate();

lib/abyss/src/socket_unix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ channelWait(TChannel * const channelP,
262262
one.
263263
264264
We return before the requested condition holds if 'timeoutMs'
265-
milliseconds pass. timoutMs == TIME_INFINITE means infinity.
265+
milliseconds pass. timeoutMs == TIME_INFINITE means infinity.
266266
267267
We return before the requested condition holds if the process receives
268268
(and catches) a signal, but only if it receives that signal a certain

lib/curl_transport/curlmulti.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "xmlrpc_config.h"
1515

1616
#include <stdlib.h>
17-
#if !MSVCRT
17+
#if HAVE_SYS_SELECT_H
1818
#include <sys/select.h>
1919
#endif
2020

0 commit comments

Comments
 (0)