提交 98168fad authored 作者: Travis Cross's avatar Travis Cross

Fix line endings per .gitattributes

上级 ac405bb1
/* This is a build of CELT */ /* This is a build of CELT */
#define CELT_BUILD #define CELT_BUILD
/* Version extra */ /* Version extra */
#define CELT_EXTRA_VERSION "-1" #define CELT_EXTRA_VERSION "-1"
/* Version major */ /* Version major */
#define CELT_MAJOR_VERSION 0 #define CELT_MAJOR_VERSION 0
/* Version micro */ /* Version micro */
#define CELT_MICRO_VERSION 0 #define CELT_MICRO_VERSION 0
/* Version minor */ /* Version minor */
#define CELT_MINOR_VERSION 7 #define CELT_MINOR_VERSION 7
/* Complete version string */ /* Complete version string */
#define CELT_VERSION "0.7.0-1" #define CELT_VERSION "0.7.0-1"
/* Compile as fixed-point */ /* Compile as fixed-point */
/* #undef FIXED_POINT */ /* #undef FIXED_POINT */
/* Compile as floating-point */ /* Compile as floating-point */
#define FLOATING_POINT #define FLOATING_POINT
/* Make use of alloca */ /* Make use of alloca */
/* #undef USE_ALLOCA */ /* #undef USE_ALLOCA */
#define USE_ALLOCA 1 /* disable this when using SSE */ #define USE_ALLOCA 1 /* disable this when using SSE */
/* Define to equivalent of C99 restrict keyword, or to nothing if this is not /* Define to equivalent of C99 restrict keyword, or to nothing if this is not
supported. Do not define if restrict is supported directly. */ supported. Do not define if restrict is supported directly. */
#define restrict /* __restrict */ #define restrict /* __restrict */
// Microsoft version of 'inline' // Microsoft version of 'inline'
#define inline __inline #define inline __inline
...@@ -92,9 +92,9 @@ ...@@ -92,9 +92,9 @@
return intgr ; return intgr ;
} }
#else #else
#define float2int #define float2int
#endif #endif
#else #else
......
/* shout.h /* shout.h
* *
* API for libshout, the streaming library for icecast * API for libshout, the streaming library for icecast
* *
* Copyright (C) 2002-2003 the Icecast team <team@icecast.org> * Copyright (C) 2002-2003 the Icecast team <team@icecast.org>
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public * modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either * License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version. * version 2 of the License, or (at your option) any later version.
* *
* This library is distributed in the hope that it will be useful, * This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details. * Library General Public License for more details.
* *
* You should have received a copy of the GNU Library General Public * You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free * License along with this library; if not, write to the Free
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/ */
#ifndef __LIBSHOUT_SHOUT_H__ #ifndef __LIBSHOUT_SHOUT_H__
#define __LIBSHOUT_SHOUT_H__ #define __LIBSHOUT_SHOUT_H__
#include <sys/types.h> #include <sys/types.h>
#ifdef WIN32 #ifdef WIN32
#include <os.h> #include <os.h>
# ifdef _MSC_VER # ifdef _MSC_VER
# undef inline # undef inline
# define inline __inline # define inline __inline
#if (_MSC_VER >= 1400) // VC8+ #if (_MSC_VER >= 1400) // VC8+
#ifndef _CRT_SECURE_NO_DEPRECATE #ifndef _CRT_SECURE_NO_DEPRECATE
#define _CRT_SECURE_NO_DEPRECATE #define _CRT_SECURE_NO_DEPRECATE
#endif #endif
#ifndef _CRT_NONSTDC_NO_DEPRECATE #ifndef _CRT_NONSTDC_NO_DEPRECATE
#define _CRT_NONSTDC_NO_DEPRECATE #define _CRT_NONSTDC_NO_DEPRECATE
#endif #endif
#endif // VC8+ #endif // VC8+
# endif # endif
#ifndef __MINGW32__ #ifndef __MINGW32__
#define va_copy(ap1, ap2) memcpy(&ap1, &ap2, sizeof(va_list)) #define va_copy(ap1, ap2) memcpy(&ap1, &ap2, sizeof(va_list))
#endif #endif
#endif #endif
#define SHOUTERR_SUCCESS (0) #define SHOUTERR_SUCCESS (0)
#define SHOUTERR_INSANE (-1) #define SHOUTERR_INSANE (-1)
#define SHOUTERR_NOCONNECT (-2) #define SHOUTERR_NOCONNECT (-2)
#define SHOUTERR_NOLOGIN (-3) #define SHOUTERR_NOLOGIN (-3)
#define SHOUTERR_SOCKET (-4) #define SHOUTERR_SOCKET (-4)
#define SHOUTERR_MALLOC (-5) #define SHOUTERR_MALLOC (-5)
#define SHOUTERR_METADATA (-6) #define SHOUTERR_METADATA (-6)
#define SHOUTERR_CONNECTED (-7) #define SHOUTERR_CONNECTED (-7)
#define SHOUTERR_UNCONNECTED (-8) #define SHOUTERR_UNCONNECTED (-8)
#define SHOUTERR_UNSUPPORTED (-9) #define SHOUTERR_UNSUPPORTED (-9)
#define SHOUTERR_BUSY (-10) #define SHOUTERR_BUSY (-10)
#define SHOUT_FORMAT_OGG (0) #define SHOUT_FORMAT_OGG (0)
#define SHOUT_FORMAT_MP3 (1) #define SHOUT_FORMAT_MP3 (1)
/* backward-compatibility alias */ /* backward-compatibility alias */
#define SHOUT_FORMAT_VORBIS SHOUT_FORMAT_OGG #define SHOUT_FORMAT_VORBIS SHOUT_FORMAT_OGG
#define SHOUT_PROTOCOL_HTTP (0) #define SHOUT_PROTOCOL_HTTP (0)
#define SHOUT_PROTOCOL_XAUDIOCAST (1) #define SHOUT_PROTOCOL_XAUDIOCAST (1)
#define SHOUT_PROTOCOL_ICY (2) #define SHOUT_PROTOCOL_ICY (2)
#define SHOUT_AI_BITRATE "bitrate" #define SHOUT_AI_BITRATE "bitrate"
#define SHOUT_AI_SAMPLERATE "samplerate" #define SHOUT_AI_SAMPLERATE "samplerate"
#define SHOUT_AI_CHANNELS "channels" #define SHOUT_AI_CHANNELS "channels"
#define SHOUT_AI_QUALITY "quality" #define SHOUT_AI_QUALITY "quality"
typedef struct shout shout_t; typedef struct shout shout_t;
typedef struct _util_dict shout_metadata_t; typedef struct _util_dict shout_metadata_t;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
/* initializes the shout library. Must be called before anything else */ /* initializes the shout library. Must be called before anything else */
void shout_init(void); void shout_init(void);
/* shuts down the shout library, deallocating any global storage. Don't call /* shuts down the shout library, deallocating any global storage. Don't call
* anything afterwards */ * anything afterwards */
void shout_shutdown(void); void shout_shutdown(void);
/* returns a static version string. Non-null parameters will be set to the /* returns a static version string. Non-null parameters will be set to the
* value of the library major, minor, and patch levels, respectively */ * value of the library major, minor, and patch levels, respectively */
const char *shout_version(int *major, int *minor, int *patch); const char *shout_version(int *major, int *minor, int *patch);
/* Allocates and sets up a new shout_t. Returns NULL if it can't get enough /* Allocates and sets up a new shout_t. Returns NULL if it can't get enough
* memory. The returns shout_t must be disposed of with shout_free. */ * memory. The returns shout_t must be disposed of with shout_free. */
shout_t *shout_new(void); shout_t *shout_new(void);
/* Free all memory allocated by a shout_t */ /* Free all memory allocated by a shout_t */
void shout_free(shout_t *self); void shout_free(shout_t *self);
/* Returns a statically allocated string describing the last shout error /* Returns a statically allocated string describing the last shout error
* to occur. Only valid until the next libshout call on this shout_t */ * to occur. Only valid until the next libshout call on this shout_t */
const char *shout_get_error(shout_t *self); const char *shout_get_error(shout_t *self);
/* Return the error code (e.g. SHOUTERR_SOCKET) for this shout instance */ /* Return the error code (e.g. SHOUTERR_SOCKET) for this shout instance */
int shout_get_errno(shout_t *self); int shout_get_errno(shout_t *self);
/* returns SHOUTERR_CONNECTED or SHOUTERR_UNCONNECTED */ /* returns SHOUTERR_CONNECTED or SHOUTERR_UNCONNECTED */
int shout_get_connected(shout_t *self); int shout_get_connected(shout_t *self);
/* Parameter manipulation functions. libshout makes copies of all parameters, /* Parameter manipulation functions. libshout makes copies of all parameters,
* the caller may free its copies after giving them to libshout. May return * the caller may free its copies after giving them to libshout. May return
* SHOUTERR_MALLOC */ * SHOUTERR_MALLOC */
int shout_set_host(shout_t *self, const char *host); int shout_set_host(shout_t *self, const char *host);
const char *shout_get_host(shout_t *self); const char *shout_get_host(shout_t *self);
int shout_set_port(shout_t *self, unsigned short port); int shout_set_port(shout_t *self, unsigned short port);
unsigned short shout_get_port(shout_t *self); unsigned short shout_get_port(shout_t *self);
int shout_set_password(shout_t *, const char *password); int shout_set_password(shout_t *, const char *password);
const char *shout_get_password(shout_t *self); const char *shout_get_password(shout_t *self);
int shout_set_mount(shout_t *self, const char *mount); int shout_set_mount(shout_t *self, const char *mount);
const char *shout_get_mount(shout_t *self); const char *shout_get_mount(shout_t *self);
int shout_set_name(shout_t *self, const char *name); int shout_set_name(shout_t *self, const char *name);
const char *shout_get_name(shout_t *self); const char *shout_get_name(shout_t *self);
int shout_set_url(shout_t *self, const char *url); int shout_set_url(shout_t *self, const char *url);
const char *shout_get_url(shout_t *self); const char *shout_get_url(shout_t *self);
int shout_set_genre(shout_t *self, const char *genre); int shout_set_genre(shout_t *self, const char *genre);
const char *shout_get_genre(shout_t *self); const char *shout_get_genre(shout_t *self);
int shout_set_user(shout_t *self, const char *username); int shout_set_user(shout_t *self, const char *username);
const char *shout_get_user(shout_t *self); const char *shout_get_user(shout_t *self);
int shout_set_agent(shout_t *self, const char *username); int shout_set_agent(shout_t *self, const char *username);
const char *shout_get_agent(shout_t *self); const char *shout_get_agent(shout_t *self);
int shout_set_description(shout_t *self, const char *description); int shout_set_description(shout_t *self, const char *description);
const char *shout_get_description(shout_t *self); const char *shout_get_description(shout_t *self);
int shout_set_dumpfile(shout_t *self, const char *dumpfile); int shout_set_dumpfile(shout_t *self, const char *dumpfile);
const char *shout_get_dumpfile(shout_t *self); const char *shout_get_dumpfile(shout_t *self);
int shout_set_audio_info(shout_t *self, const char *name, const char *value); int shout_set_audio_info(shout_t *self, const char *name, const char *value);
const char *shout_get_audio_info(shout_t *self, const char *name); const char *shout_get_audio_info(shout_t *self, const char *name);
int shout_set_public(shout_t *self, unsigned int make_public); int shout_set_public(shout_t *self, unsigned int make_public);
unsigned int shout_get_public(shout_t *self); unsigned int shout_get_public(shout_t *self);
/* takes a SHOUT_FORMAT_xxxx argument */ /* takes a SHOUT_FORMAT_xxxx argument */
int shout_set_format(shout_t *self, unsigned int format); int shout_set_format(shout_t *self, unsigned int format);
unsigned int shout_get_format(shout_t *self); unsigned int shout_get_format(shout_t *self);
/* takes a SHOUT_PROTOCOL_xxxxx argument */ /* takes a SHOUT_PROTOCOL_xxxxx argument */
int shout_set_protocol(shout_t *self, unsigned int protocol); int shout_set_protocol(shout_t *self, unsigned int protocol);
unsigned int shout_get_protocol(shout_t *self); unsigned int shout_get_protocol(shout_t *self);
/* Instructs libshout to use nonblocking I/O. Must be called before /* Instructs libshout to use nonblocking I/O. Must be called before
* shout_open (no switching back and forth midstream at the moment). */ * shout_open (no switching back and forth midstream at the moment). */
int shout_set_nonblocking(shout_t* self, unsigned int nonblocking); int shout_set_nonblocking(shout_t* self, unsigned int nonblocking);
unsigned int shout_get_nonblocking(shout_t *self); unsigned int shout_get_nonblocking(shout_t *self);
/* Opens a connection to the server. All parameters must already be set */ /* Opens a connection to the server. All parameters must already be set */
int shout_open(shout_t *self); int shout_open(shout_t *self);
/* Closes a connection to the server */ /* Closes a connection to the server */
int shout_close(shout_t *self); int shout_close(shout_t *self);
/* Send data to the server, parsing it for format specific timing info */ /* Send data to the server, parsing it for format specific timing info */
int shout_send(shout_t *self, const unsigned char *data, size_t len); int shout_send(shout_t *self, const unsigned char *data, size_t len);
/* Send unparsed data to the server. Do not use this unless you know /* Send unparsed data to the server. Do not use this unless you know
* what you are doing. * what you are doing.
* Returns the number of bytes written, or < 0 on error. * Returns the number of bytes written, or < 0 on error.
*/ */
ssize_t shout_send_raw(shout_t *self, const unsigned char *data, size_t len); ssize_t shout_send_raw(shout_t *self, const unsigned char *data, size_t len);
/* return the number of bytes currently on the write queue (only makes sense in /* return the number of bytes currently on the write queue (only makes sense in
* nonblocking mode). */ * nonblocking mode). */
ssize_t shout_queuelen(shout_t *self); ssize_t shout_queuelen(shout_t *self);
/* Puts caller to sleep until it is time to send more data to the server */ /* Puts caller to sleep until it is time to send more data to the server */
void shout_sync(shout_t *self); void shout_sync(shout_t *self);
/* Amount of time in ms caller should wait before sending again */ /* Amount of time in ms caller should wait before sending again */
int shout_delay(shout_t *self); int shout_delay(shout_t *self);
/* Sets MP3 metadata. /* Sets MP3 metadata.
* Returns: * Returns:
* SHOUTERR_SUCCESS * SHOUTERR_SUCCESS
* SHOUTERR_UNSUPPORTED if format isn't MP3 * SHOUTERR_UNSUPPORTED if format isn't MP3
* SHOUTERR_MALLOC * SHOUTERR_MALLOC
* SHOUTERR_INSANE * SHOUTERR_INSANE
* SHOUTERR_NOCONNECT * SHOUTERR_NOCONNECT
* SHOUTERR_SOCKET * SHOUTERR_SOCKET
*/ */
int shout_set_metadata(shout_t *self, shout_metadata_t *metadata); int shout_set_metadata(shout_t *self, shout_metadata_t *metadata);
/* Allocates a new metadata structure. Must be freed by shout_metadata_free. */ /* Allocates a new metadata structure. Must be freed by shout_metadata_free. */
shout_metadata_t *shout_metadata_new(void); shout_metadata_t *shout_metadata_new(void);
/* Free resources allocated by shout_metadata_t */ /* Free resources allocated by shout_metadata_t */
void shout_metadata_free(shout_metadata_t *self); void shout_metadata_free(shout_metadata_t *self);
/* Add a parameter to the metadata structure. /* Add a parameter to the metadata structure.
* Returns: * Returns:
* SHOUTERR_SUCCESS on success * SHOUTERR_SUCCESS on success
* SHOUTERR_INSANE if self isn't a valid shout_metadata_t* or name is null * SHOUTERR_INSANE if self isn't a valid shout_metadata_t* or name is null
* SHOUTERR_MALLOC if memory can't be allocated */ * SHOUTERR_MALLOC if memory can't be allocated */
int shout_metadata_add(shout_metadata_t *self, const char *name, const char *value); int shout_metadata_add(shout_metadata_t *self, const char *name, const char *value);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif
/* --- Compiled features --- */ /* --- Compiled features --- */
#define SHOUT_THREADSAFE @SHOUT_THREADSAFE@ #define SHOUT_THREADSAFE @SHOUT_THREADSAFE@
#endif /* __LIBSHOUT_SHOUT_H__ */ #endif /* __LIBSHOUT_SHOUT_H__ */
#ifndef MK1MF_BUILD #ifndef MK1MF_BUILD
/* auto-generated by Configure for crypto/cversion.c: /* auto-generated by Configure for crypto/cversion.c:
* for Unix builds, crypto/Makefile.ssl generates functional definitions; * for Unix builds, crypto/Makefile.ssl generates functional definitions;
* Windows builds (and other mk1mf builds) compile cversion.c with * Windows builds (and other mk1mf builds) compile cversion.c with
* -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */ * -DMK1MF_BUILD and use definitions added to this file by util/mk1mf.pl. */
#error "Windows builds (PLATFORM=VC-WIN32) use mk1mf.pl-created Makefiles" #error "Windows builds (PLATFORM=VC-WIN32) use mk1mf.pl-created Makefiles"
#endif #endif
#ifdef MK1MF_PLATFORM_VC_WIN32 #ifdef MK1MF_PLATFORM_VC_WIN32
/* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */ /* auto-generated/updated by util/mk1mf.pl for crypto/cversion.c */
#define CFLAGS "cl /MD /Ox /O2 /Ob2 -DOPENSSL_THREADS -DDSO_WIN32 -W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_USE_APPLINK -I. /Fdout32dll -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_STATIC_ENGINE " #define CFLAGS "cl /MD /Ox /O2 /Ob2 -DOPENSSL_THREADS -DDSO_WIN32 -W3 -WX -Gs0 -GF -Gy -nologo -DOPENSSL_SYSNAME_WIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -D_CRT_SECURE_NO_DEPRECATE -DOPENSSL_USE_APPLINK -I. /Fdout32dll -DOPENSSL_NO_RC5 -DOPENSSL_NO_MD2 -DOPENSSL_NO_KRB5 -DOPENSSL_NO_JPAKE -DOPENSSL_NO_STATIC_ENGINE "
#define PLATFORM "VC-WIN32" #define PLATFORM "VC-WIN32"
#define DATE "Sun Jun 6 23:40:23 2010" #define DATE "Sun Jun 6 23:40:23 2010"
#endif #endif
/* opensslconf.h */ /* opensslconf.h */
/* WARNING: Generated automatically from opensslconf.h.in by Configure. */ /* WARNING: Generated automatically from opensslconf.h.in by Configure. */
/* OpenSSL was configured with the following options: */ /* OpenSSL was configured with the following options: */
#ifndef OPENSSL_SYSNAME_WIN32 #ifndef OPENSSL_SYSNAME_WIN32
# define OPENSSL_SYSNAME_WIN32 # define OPENSSL_SYSNAME_WIN32
#endif #endif
#ifndef OPENSSL_DOING_MAKEDEPEND #ifndef OPENSSL_DOING_MAKEDEPEND
#ifndef OPENSSL_NO_GMP #ifndef OPENSSL_NO_GMP
# define OPENSSL_NO_GMP # define OPENSSL_NO_GMP
#endif #endif
#ifndef OPENSSL_NO_JPAKE #ifndef OPENSSL_NO_JPAKE
# define OPENSSL_NO_JPAKE # define OPENSSL_NO_JPAKE
#endif #endif
#ifndef OPENSSL_NO_KRB5 #ifndef OPENSSL_NO_KRB5
# define OPENSSL_NO_KRB5 # define OPENSSL_NO_KRB5
#endif #endif
#ifndef OPENSSL_NO_MD2 #ifndef OPENSSL_NO_MD2
# define OPENSSL_NO_MD2 # define OPENSSL_NO_MD2
#endif #endif
#ifndef OPENSSL_NO_RC5 #ifndef OPENSSL_NO_RC5
# define OPENSSL_NO_RC5 # define OPENSSL_NO_RC5
#endif #endif
#ifndef OPENSSL_NO_RFC3779 #ifndef OPENSSL_NO_RFC3779
# define OPENSSL_NO_RFC3779 # define OPENSSL_NO_RFC3779
#endif #endif
#ifndef OPENSSL_NO_STORE #ifndef OPENSSL_NO_STORE
# define OPENSSL_NO_STORE # define OPENSSL_NO_STORE
#endif #endif
#endif /* OPENSSL_DOING_MAKEDEPEND */ #endif /* OPENSSL_DOING_MAKEDEPEND */
#ifndef OPENSSL_THREADS #ifndef OPENSSL_THREADS
# define OPENSSL_THREADS # define OPENSSL_THREADS
#endif #endif
#ifndef OPENSSL_NO_ASM #ifndef OPENSSL_NO_ASM
# define OPENSSL_NO_ASM # define OPENSSL_NO_ASM
#endif #endif
/* The OPENSSL_NO_* macros are also defined as NO_* if the application /* The OPENSSL_NO_* macros are also defined as NO_* if the application
asks for it. This is a transient feature that is provided for those asks for it. This is a transient feature that is provided for those
who haven't had the time to do the appropriate changes in their who haven't had the time to do the appropriate changes in their
applications. */ applications. */
#ifdef OPENSSL_ALGORITHM_DEFINES #ifdef OPENSSL_ALGORITHM_DEFINES
# if defined(OPENSSL_NO_GMP) && !defined(NO_GMP) # if defined(OPENSSL_NO_GMP) && !defined(NO_GMP)
# define NO_GMP # define NO_GMP
# endif # endif
# if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE) # if defined(OPENSSL_NO_JPAKE) && !defined(NO_JPAKE)
# define NO_JPAKE # define NO_JPAKE
# endif # endif
# if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5) # if defined(OPENSSL_NO_KRB5) && !defined(NO_KRB5)
# define NO_KRB5 # define NO_KRB5
# endif # endif
# if defined(OPENSSL_NO_MD2) && !defined(NO_MD2) # if defined(OPENSSL_NO_MD2) && !defined(NO_MD2)
# define NO_MD2 # define NO_MD2
# endif # endif
# if defined(OPENSSL_NO_RC5) && !defined(NO_RC5) # if defined(OPENSSL_NO_RC5) && !defined(NO_RC5)
# define NO_RC5 # define NO_RC5
# endif # endif
# if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779) # if defined(OPENSSL_NO_RFC3779) && !defined(NO_RFC3779)
# define NO_RFC3779 # define NO_RFC3779
# endif # endif
# if defined(OPENSSL_NO_STORE) && !defined(NO_STORE) # if defined(OPENSSL_NO_STORE) && !defined(NO_STORE)
# define NO_STORE # define NO_STORE
# endif # endif
#endif #endif
/* crypto/opensslconf.h.in */ /* crypto/opensslconf.h.in */
/* Generate 80386 code? */ /* Generate 80386 code? */
#undef I386_ONLY #undef I386_ONLY
#if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */ #if !(defined(VMS) || defined(__VMS)) /* VMS uses logical names instead */
#if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR) #if defined(HEADER_CRYPTLIB_H) && !defined(OPENSSLDIR)
#define ENGINESDIR "/usr/local/ssl/lib/engines" #define ENGINESDIR "/usr/local/ssl/lib/engines"
#define OPENSSLDIR "/usr/local/ssl" #define OPENSSLDIR "/usr/local/ssl"
#endif #endif
#endif #endif
#undef OPENSSL_UNISTD #undef OPENSSL_UNISTD
#define OPENSSL_UNISTD <unistd.h> #define OPENSSL_UNISTD <unistd.h>
#undef OPENSSL_EXPORT_VAR_AS_FUNCTION #undef OPENSSL_EXPORT_VAR_AS_FUNCTION
#define OPENSSL_EXPORT_VAR_AS_FUNCTION #define OPENSSL_EXPORT_VAR_AS_FUNCTION
#if defined(HEADER_IDEA_H) && !defined(IDEA_INT) #if defined(HEADER_IDEA_H) && !defined(IDEA_INT)
#define IDEA_INT unsigned int #define IDEA_INT unsigned int
#endif #endif
#if defined(HEADER_MD2_H) && !defined(MD2_INT) #if defined(HEADER_MD2_H) && !defined(MD2_INT)
#define MD2_INT unsigned int #define MD2_INT unsigned int
#endif #endif
#if defined(HEADER_RC2_H) && !defined(RC2_INT) #if defined(HEADER_RC2_H) && !defined(RC2_INT)
/* I need to put in a mod for the alpha - eay */ /* I need to put in a mod for the alpha - eay */
#define RC2_INT unsigned int #define RC2_INT unsigned int
#endif #endif
#if defined(HEADER_RC4_H) #if defined(HEADER_RC4_H)
#if !defined(RC4_INT) #if !defined(RC4_INT)
/* using int types make the structure larger but make the code faster /* using int types make the structure larger but make the code faster
* on most boxes I have tested - up to %20 faster. */ * on most boxes I have tested - up to %20 faster. */
/* /*
* I don't know what does "most" mean, but declaring "int" is a must on: * I don't know what does "most" mean, but declaring "int" is a must on:
* - Intel P6 because partial register stalls are very expensive; * - Intel P6 because partial register stalls are very expensive;
* - elder Alpha because it lacks byte load/store instructions; * - elder Alpha because it lacks byte load/store instructions;
*/ */
#define RC4_INT unsigned int #define RC4_INT unsigned int
#endif #endif
#if !defined(RC4_CHUNK) #if !defined(RC4_CHUNK)
/* /*
* This enables code handling data aligned at natural CPU word * This enables code handling data aligned at natural CPU word
* boundary. See crypto/rc4/rc4_enc.c for further details. * boundary. See crypto/rc4/rc4_enc.c for further details.
*/ */
#undef RC4_CHUNK #undef RC4_CHUNK
#endif #endif
#endif #endif
#if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG) #if (defined(HEADER_NEW_DES_H) || defined(HEADER_DES_H)) && !defined(DES_LONG)
/* If this is set to 'unsigned int' on a DEC Alpha, this gives about a /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a
* %20 speed up (longs are 8 bytes, int's are 4). */ * %20 speed up (longs are 8 bytes, int's are 4). */
#ifndef DES_LONG #ifndef DES_LONG
#define DES_LONG unsigned long #define DES_LONG unsigned long
#endif #endif
#endif #endif
#if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H) #if defined(HEADER_BN_H) && !defined(CONFIG_HEADER_BN_H)
#define CONFIG_HEADER_BN_H #define CONFIG_HEADER_BN_H
#define BN_LLONG #define BN_LLONG
/* Should we define BN_DIV2W here? */ /* Should we define BN_DIV2W here? */
/* Only one for the following should be defined */ /* Only one for the following should be defined */
#undef SIXTY_FOUR_BIT_LONG #undef SIXTY_FOUR_BIT_LONG
#undef SIXTY_FOUR_BIT #undef SIXTY_FOUR_BIT
#define THIRTY_TWO_BIT #define THIRTY_TWO_BIT
#endif #endif
#if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H) #if defined(HEADER_RC4_LOCL_H) && !defined(CONFIG_HEADER_RC4_LOCL_H)
#define CONFIG_HEADER_RC4_LOCL_H #define CONFIG_HEADER_RC4_LOCL_H
/* if this is defined data[i] is used instead of *data, this is a %20 /* if this is defined data[i] is used instead of *data, this is a %20
* speedup on x86 */ * speedup on x86 */
#define RC4_INDEX #define RC4_INDEX
#endif #endif
#if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H) #if defined(HEADER_BF_LOCL_H) && !defined(CONFIG_HEADER_BF_LOCL_H)
#define CONFIG_HEADER_BF_LOCL_H #define CONFIG_HEADER_BF_LOCL_H
#undef BF_PTR #undef BF_PTR
#endif /* HEADER_BF_LOCL_H */ #endif /* HEADER_BF_LOCL_H */
#if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H) #if defined(HEADER_DES_LOCL_H) && !defined(CONFIG_HEADER_DES_LOCL_H)
#define CONFIG_HEADER_DES_LOCL_H #define CONFIG_HEADER_DES_LOCL_H
#ifndef DES_DEFAULT_OPTIONS #ifndef DES_DEFAULT_OPTIONS
/* the following is tweaked from a config script, that is why it is a /* the following is tweaked from a config script, that is why it is a
* protected undef/define */ * protected undef/define */
#ifndef DES_PTR #ifndef DES_PTR
#undef DES_PTR #undef DES_PTR
#endif #endif
/* This helps C compiler generate the correct code for multiple functional /* This helps C compiler generate the correct code for multiple functional
* units. It reduces register dependancies at the expense of 2 more * units. It reduces register dependancies at the expense of 2 more
* registers */ * registers */
#ifndef DES_RISC1 #ifndef DES_RISC1
#undef DES_RISC1 #undef DES_RISC1
#endif #endif
#ifndef DES_RISC2 #ifndef DES_RISC2
#undef DES_RISC2 #undef DES_RISC2
#endif #endif
#if defined(DES_RISC1) && defined(DES_RISC2) #if defined(DES_RISC1) && defined(DES_RISC2)
YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!!
#endif #endif
/* Unroll the inner loop, this sometimes helps, sometimes hinders. /* Unroll the inner loop, this sometimes helps, sometimes hinders.
* Very mucy CPU dependant */ * Very mucy CPU dependant */
#ifndef DES_UNROLL #ifndef DES_UNROLL
#undef DES_UNROLL #undef DES_UNROLL
#endif #endif
/* These default values were supplied by /* These default values were supplied by
* Peter Gutman <pgut001@cs.auckland.ac.nz> * Peter Gutman <pgut001@cs.auckland.ac.nz>
* They are only used if nothing else has been defined */ * They are only used if nothing else has been defined */
#if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL)
/* Special defines which change the way the code is built depending on the /* Special defines which change the way the code is built depending on the
CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find
even newer MIPS CPU's, but at the moment one size fits all for even newer MIPS CPU's, but at the moment one size fits all for
optimization options. Older Sparc's work better with only UNROLL, but optimization options. Older Sparc's work better with only UNROLL, but
there's no way to tell at compile time what it is you're running on */ there's no way to tell at compile time what it is you're running on */
#if defined( sun ) /* Newer Sparc's */ #if defined( sun ) /* Newer Sparc's */
# define DES_PTR # define DES_PTR
# define DES_RISC1 # define DES_RISC1
# define DES_UNROLL # define DES_UNROLL
#elif defined( __ultrix ) /* Older MIPS */ #elif defined( __ultrix ) /* Older MIPS */
# define DES_PTR # define DES_PTR
# define DES_RISC2 # define DES_RISC2
# define DES_UNROLL # define DES_UNROLL
#elif defined( __osf1__ ) /* Alpha */ #elif defined( __osf1__ ) /* Alpha */
# define DES_PTR # define DES_PTR
# define DES_RISC2 # define DES_RISC2
#elif defined ( _AIX ) /* RS6000 */ #elif defined ( _AIX ) /* RS6000 */
/* Unknown */ /* Unknown */
#elif defined( __hpux ) /* HP-PA */ #elif defined( __hpux ) /* HP-PA */
/* Unknown */ /* Unknown */
#elif defined( __aux ) /* 68K */ #elif defined( __aux ) /* 68K */
/* Unknown */ /* Unknown */
#elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */
# define DES_UNROLL # define DES_UNROLL
#elif defined( __sgi ) /* Newer MIPS */ #elif defined( __sgi ) /* Newer MIPS */
# define DES_PTR # define DES_PTR
# define DES_RISC2 # define DES_RISC2
# define DES_UNROLL # define DES_UNROLL
#elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */ #elif defined(i386) || defined(__i386__) /* x86 boxes, should be gcc */
# define DES_PTR # define DES_PTR
# define DES_RISC1 # define DES_RISC1
# define DES_UNROLL # define DES_UNROLL
#endif /* Systems-specific speed defines */ #endif /* Systems-specific speed defines */
#endif #endif
#endif /* DES_DEFAULT_OPTIONS */ #endif /* DES_DEFAULT_OPTIONS */
#endif /* HEADER_DES_LOCL_H */ #endif /* HEADER_DES_LOCL_H */
Current information is in ReadMeWin32.txt. Current information is in ReadMeWin32.txt.
What follows is previous contents of that file. What follows is previous contents of that file.
Markus Hoffrogge: Markus Hoffrogge:
Compilation for WIN32 is possible now again for version 1.6.10 - non Compilation for WIN32 is possible now again for version 1.6.10 - non
CPP parts only. Project files have been tested under VicualStudio CPP parts only. Project files have been tested under VicualStudio
6.0. Build project all - this will build all other projects. CPP 6.0. Build project all - this will build all other projects. CPP
code is not compiled and adopted right now. code is not compiled and adopted right now.
This release excludes the option to compile an "http.sys" version of This release excludes the option to compile an "http.sys" version of
an XML-RPC server. If you do wish to build in the http.sys server, set an XML-RPC server. If you do wish to build in the http.sys server, set
the MUST_BUILD_HTTP_SYS_SERVER to 1 in the transport_config_win32.h the MUST_BUILD_HTTP_SYS_SERVER to 1 in the transport_config_win32.h
and/or the transport_config.h file. Successful conpilation requires and/or the transport_config.h file. Successful conpilation requires
installation of the Microsoft Platform SDK for Windows XP SP2 (or installation of the Microsoft Platform SDK for Windows XP SP2 (or
later) to get the latest header and link libraries required to support later) to get the latest header and link libraries required to support
this functionality. After installation, be sure to properly register this functionality. After installation, be sure to properly register
the directories as documented in the Platform SDK help file topic the directories as documented in the Platform SDK help file topic
"Installing the Platform SDK with Visual Studio". Download the "Installing the Platform SDK with Visual Studio". Download the
Platform SDK from: Platform SDK from:
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
To create the three headers required for Win32 WinInet compilation, To create the three headers required for Win32 WinInet compilation,
run the ConfigureWin32.bat found in the Windows directory. If you run the ConfigureWin32.bat found in the Windows directory. If you
wish to alter the transports that are built to include curl or libwww, wish to alter the transports that are built to include curl or libwww,
adjust the preprocessor definitions at the top of the adjust the preprocessor definitions at the top of the
transport_config_win32.h and/or the transport_config.h files. See the transport_config_win32.h and/or the transport_config.h files. See the
file UsingCURLinWin32.txt for more information on using the curl file UsingCURLinWin32.txt for more information on using the curl
transport. transport.
To compile, open the xmlrpc.dsw file in Visual Studio 6 or greater. To compile, open the xmlrpc.dsw file in Visual Studio 6 or greater.
The project will convert and work fine in Visual Studio 2003 as well - The project will convert and work fine in Visual Studio 2003 as well -
other versions of Visual Studio were not tested. other versions of Visual Studio were not tested.
NOTE: If you get an error while opening or converting the project NOTE: If you get an error while opening or converting the project
files, it is likely due to using WinRar or similar to decompress the files, it is likely due to using WinRar or similar to decompress the
distribution tarball. You can use WinZip or another utility to distribution tarball. You can use WinZip or another utility to
correctly decompress the .tgz file. correctly decompress the .tgz file.
Suggested testing for evaluation of the library involves a few Suggested testing for evaluation of the library involves a few
projects. Here is a quick getting started guide: projects. Here is a quick getting started guide:
1) Set the Active Project to query_meerkat and build it in release or 1) Set the Active Project to query_meerkat and build it in release or
debug modes. The dependent projects will be built automatically. debug modes. The dependent projects will be built automatically.
In the project settings dialog, add the argument for what you wish In the project settings dialog, add the argument for what you wish
to query meerkat for - "Windows" is a good query. Run the project. to query meerkat for - "Windows" is a good query. Run the project.
This will query the meerkat server for articles related to windows This will query the meerkat server for articles related to windows
and output the results to the console. and output the results to the console.
2) Set the Active Project to xmlrpc_sample_add_server and build it in 2) Set the Active Project to xmlrpc_sample_add_server and build it in
release or debug modes. The dependent projects will be built release or debug modes. The dependent projects will be built
automatically. In the project settings dialog, add the argument automatically. In the project settings dialog, add the argument
for the port to 8080. This will run the server sample which adds for the port to 8080. This will run the server sample which adds
two numbers and returns a result. You should run this from a two numbers and returns a result. You should run this from a
command prompt instead of through Visual Studio so you may run the command prompt instead of through Visual Studio so you may run the
sample client as well. sample client as well.
3) Set the Active Project to xmlrpc_sample_add_sync_client or 3) Set the Active Project to xmlrpc_sample_add_sync_client or
xmlrpc_sample_add_async_client and build it in release or debug xmlrpc_sample_add_async_client and build it in release or debug
modes. The dependent projects will be built automatically. This modes. The dependent projects will be built automatically. This
will run the client sample which submits two numbers to be added to will run the client sample which submits two numbers to be added to
the server application as described above and displays the result. the server application as described above and displays the result.
Note that the client example comes in the sync and async varieties. Note that the client example comes in the sync and async varieties.
Steven Bone Steven Bone
July 27, 2005 July 27, 2005
sbone@pobox.com sbone@pobox.com
WIN32 CHANGES WIN32 CHANGES
Changes from the 1.02 release for Win32: Changes from the 1.02 release for Win32:
1) Option to easily disable the http.sys server for those who do not 1) Option to easily disable the http.sys server for those who do not
need it or wish to download the Platform SDK. need it or wish to download the Platform SDK.
Changes from the 1.01 -> 1.02 release for Win32: Changes from the 1.01 -> 1.02 release for Win32:
1) Project files for gennmtab, xmlparse, and xmltok updated to include the 1) Project files for gennmtab, xmlparse, and xmltok updated to include the
path to the xmlrpc_config.h file. path to the xmlrpc_config.h file.
2) Bugfix for WinInet authentication. 2) Bugfix for WinInet authentication.
3) Supports xmlrpc_xportparms, xmlrpc_wininet_xportparms added 3) Supports xmlrpc_xportparms, xmlrpc_wininet_xportparms added
*potential breaking change* - now by default we fail on invalid *potential breaking change* - now by default we fail on invalid
SSL certs, use the xmlrpc_wininet_xportparms option to enable old SSL certs, use the xmlrpc_wininet_xportparms option to enable old
behavior. behavior.
4) Added project file for xmlrpc_sample_auth_client 4) Added project file for xmlrpc_sample_auth_client
5) Added project and src for a http.sys based xmlrpc-c server. See comments 5) Added project and src for a http.sys based xmlrpc-c server. See comments
in the source files. This supports Windows XP SP2 and Windows Server in the source files. This supports Windows XP SP2 and Windows Server
2003 and allows other http.sys based applications to bind to the same 2003 and allows other http.sys based applications to bind to the same
port. In Server 2003, IIS uses http.sys and thus the XML-RPC server port. In Server 2003, IIS uses http.sys and thus the XML-RPC server
can be run on the standard port 80 along with IIS. The sample also can be run on the standard port 80 along with IIS. The sample also
supports https and basic authentication. It tested OK with supports https and basic authentication. It tested OK with
http://validator.xmlrpc.com/ Note that the Platform SDK headers and http://validator.xmlrpc.com/ Note that the Platform SDK headers and
link libraries for Windows XP SP2 or newer are required to compile link libraries for Windows XP SP2 or newer are required to compile
xmlrpc-c for this module. If you are not using this server, it is xmlrpc-c for this module. If you are not using this server, it is
safe to exclude the xmlrpc_server_w32httpsys.c file from the xmlrpc safe to exclude the xmlrpc_server_w32httpsys.c file from the xmlrpc
project and these dependencies will not be required. You can get the project and these dependencies will not be required. You can get the
latest platform SDK at latest platform SDK at
http://www.microsoft.com/msdownload/platformsdk/sdkupdate/ http://www.microsoft.com/msdownload/platformsdk/sdkupdate/
Be sure after installation to choose the program to "register the PSDK Be sure after installation to choose the program to "register the PSDK
directories with Visual Studio" so the newer headers are found. directories with Visual Studio" so the newer headers are found.
6) Better support for libcurl. Updated project files, 6) Better support for libcurl. Updated project files,
transport_config_win32.h, added documentation UsingCURLinWin32.txt. transport_config_win32.h, added documentation UsingCURLinWin32.txt.
Changes from the 1.00 -> 1.01 release for Win32: Changes from the 1.00 -> 1.01 release for Win32:
1) Project files now reflect static linking for the expat XML library. 1) Project files now reflect static linking for the expat XML library.
2) Example projects were created/updated to keep them in sync with the 2) Example projects were created/updated to keep them in sync with the
distribution. The project files were moved into the Windows distribution. The project files were moved into the Windows
directory directory
3) Projects for the rpc and cpp tests were created. The 3) Projects for the rpc and cpp tests were created. The
xmlrpc_win32_config.h defines the directory for the test files relative xmlrpc_win32_config.h defines the directory for the test files relative
to the output directory to the output directory
4) Major refactoring of the Wininet Transport. 4) Major refactoring of the Wininet Transport.
Background: Background:
Let’s say you need to have a Xmlrpc-c client running as a service. Let’s say you need to have a Xmlrpc-c client running as a service.
In this situation you cannot use WinInet. Details of the restriction In this situation you cannot use WinInet. Details of the restriction
can be found on the libcurl website or various Microsoft KB articles. can be found on the libcurl website or various Microsoft KB articles.
The alternative is to use libcurl. This document describes the steps The alternative is to use libcurl. This document describes the steps
required to use libcurl as your client XML transport mechanism. required to use libcurl as your client XML transport mechanism.
Overview: Overview:
The default projects in Xmlrpc-c create standalone executables that do The default projects in Xmlrpc-c create standalone executables that do
not require other DLL’s (release mode). While the case can be made not require other DLL’s (release mode). While the case can be made
for this behavior pro and con, it is beyond this document to justify for this behavior pro and con, it is beyond this document to justify
it. Therefore, we need to create static link libraries for libcurl it. Therefore, we need to create static link libraries for libcurl
that mimics this behavior. Once the link libraries are created, we that mimics this behavior. Once the link libraries are created, we
can then add them (plus the requisite curl headers) into the Xmlrpc-c can then add them (plus the requisite curl headers) into the Xmlrpc-c
project. Finally, we enable the compilation of the curl transport project. Finally, we enable the compilation of the curl transport
file and tell Xmlrpc-c that we will be using curl. Lastly, we build file and tell Xmlrpc-c that we will be using curl. Lastly, we build
and test the project. and test the project.
Steps to use CURL with Win32 Xmlrpc-c: Steps to use CURL with Win32 Xmlrpc-c:
1. Download the CURL source. In the “include” folder of the 1. Download the CURL source. In the “include” folder of the
CURL distribution, copy the curl directory to the “lib” CURL distribution, copy the curl directory to the “lib”
directory of xmlrpc-c. When you are done with this step, you should directory of xmlrpc-c. When you are done with this step, you should
have a curl.h file located in the directory xmlrpc-c\lib\curl\. The have a curl.h file located in the directory xmlrpc-c\lib\curl\. The
xmlrpc project looks in this relative path for the necessary headers. xmlrpc project looks in this relative path for the necessary headers.
2. In the CURL distribution, lib directory, is a file called 2. In the CURL distribution, lib directory, is a file called
Makefile.vc6. Edit this file. The line starting with CCNODBG should Makefile.vc6. Edit this file. The line starting with CCNODBG should
be changed to: be changed to:
CCNODBG = cl.exe /MT /O2 /DNDEBUG CCNODBG = cl.exe /MT /O2 /DNDEBUG
The /MT option links with the Multithreaded non-dll version of the c The /MT option links with the Multithreaded non-dll version of the c
runtime. If this change is not made, the project will not link, as runtime. If this change is not made, the project will not link, as
this is the default setting for the Xmlrpc-c projects. this is the default setting for the Xmlrpc-c projects.
3. Open a command prompt window and run the vcvars32.bat file in your 3. Open a command prompt window and run the vcvars32.bat file in your
Visual C++ distribution. If you are using Studio 2002 or 2003, use Visual C++ distribution. If you are using Studio 2002 or 2003, use
the “Visual Studio Command Prompt” from the Start menu to open the “Visual Studio Command Prompt” from the Start menu to open
the console. the console.
4. Compile release and debug mode libraries. For the purposes of this 4. Compile release and debug mode libraries. For the purposes of this
tutorial, we are going to build only the curl library without ssl or tutorial, we are going to build only the curl library without ssl or
zlib compression capability. In the command prompt, navigate to the zlib compression capability. In the command prompt, navigate to the
curl\lib directory and execute the following commands: curl\lib directory and execute the following commands:
nmake -f Makefile.vc6 CFG=debug RTLIBCFG=static nmake -f Makefile.vc6 CFG=debug RTLIBCFG=static
nmake -f Makefile.vc6 CFG=release RTLIBCFG=static nmake -f Makefile.vc6 CFG=release RTLIBCFG=static
5. The above step should have generated two static link libraries in 5. The above step should have generated two static link libraries in
the curl\lib directory: libcurl.lib and libcurld.lib. Copy these the curl\lib directory: libcurl.lib and libcurld.lib. Copy these
files into the root of the xmlrpc-c\lib\ directory. This step ends files into the root of the xmlrpc-c\lib\ directory. This step ends
our involvement with the actual CURL distribution. The remainder of our involvement with the actual CURL distribution. The remainder of
the steps are for Xmlrpc-c. the steps are for Xmlrpc-c.
6. Open the Xmlrpc-c Visual Studio workspace (Instructions for VC++ 6, 6. Open the Xmlrpc-c Visual Studio workspace (Instructions for VC++ 6,
other versions are slightly different). In File View, expand the other versions are slightly different). In File View, expand the
xmlrpc project. Under "Source Files" there is an entry for xmlrpc project. Under "Source Files" there is an entry for
xmlrpc_curl_transport.c This is not included in any build paths by xmlrpc_curl_transport.c This is not included in any build paths by
default. To enable it for compilation, right click the file to change default. To enable it for compilation, right click the file to change
the settings. In the dropdown, select "All Configurations." Pick the the settings. In the dropdown, select "All Configurations." Pick the
General tab and uncheck the "Exclude File From Build" setting. Press General tab and uncheck the "Exclude File From Build" setting. Press
OK to save your changes to the project. OK to save your changes to the project.
7. In the "Header Files" section of the xmlrpc project is a file 7. In the "Header Files" section of the xmlrpc project is a file
called "transport_config.h". Edit this file to set the called "transport_config.h". Edit this file to set the
MUST_BUILD_CURL_CLIENT to 1, and if you wish to change the default MUST_BUILD_CURL_CLIENT to 1, and if you wish to change the default
transport to curl, change the XMLRPC_DEFAULT_TRANSPORT to "curl". transport to curl, change the XMLRPC_DEFAULT_TRANSPORT to "curl".
8. Compile and test one or more of the sample client projects. 8. Compile and test one or more of the sample client projects.
USING MSVC8 - 2007/11/25 USING MSVC8 - 2007/11/25
======================== ========================
This is for MSVC8, but most will apply to all version of Microsoft This is for MSVC8, but most will apply to all version of Microsoft
Visual Studio. Visual Studio.
Download the CURL source. Run the buildconf.bat to generate some Download the CURL source. Run the buildconf.bat to generate some
additional files. This builds a 'dummy' hugehelp.c, but it can also additional files. This builds a 'dummy' hugehelp.c, but it can also
be built using the src\mkhelp.pl Perl script. You may have to build be built using the src\mkhelp.pl Perl script. You may have to build
you own VCPROJ file for CURL, if you want to use MSVC. It does you own VCPROJ file for CURL, if you want to use MSVC. It does
provide a Makefile.vc6 as mentioned above. provide a Makefile.vc6 as mentioned above.
To build all the CURL library variations, use To build all the CURL library variations, use
> nmake /nologo vc-all > nmake /nologo vc-all
but note this will use the /MD[d] DLL runtime. Only by adding but note this will use the /MD[d] DLL runtime. Only by adding
RTCFGLIB=static to each of the makefile commands will /MT[d] be RTCFGLIB=static to each of the makefile commands will /MT[d] be
used. used.
Essentially, for building the static Debug or Release CURL libraries, Essentially, for building the static Debug or Release CURL libraries,
it is all the sources in the curl\lib folder. Make sure you choose /MT it is all the sources in the curl\lib folder. Make sure you choose /MT
and /MTd for the runtime, and build both using say the name libcurl.lib. and /MTd for the runtime, and build both using say the name libcurl.lib.
When you have Debug\libcurl.lib and Release\libcurl.lib built, you When you have Debug\libcurl.lib and Release\libcurl.lib built, you
are ready to build and link them with Xmlrpc-c. are ready to build and link them with Xmlrpc-c.
After running xmlrpc-c\Windows\configurewin32.bat, loading xmlrpc.dsw After running xmlrpc-c\Windows\configurewin32.bat, loading xmlrpc.dsw
will convert all the projects to VCPROJ files. In the File View, in will convert all the projects to VCPROJ files. In the File View, in
the xmlrpc project, in the properties of xmlrpc_curl_transport.c, the xmlrpc project, in the properties of xmlrpc_curl_transport.c,
change 'Exclude file from build' from 'yes' to 'no', for Debug change 'Exclude file from build' from 'yes' to 'no', for Debug
and Release. and Release.
In the 'Header Files' section, open the "transport_config.h" file, In the 'Header Files' section, open the "transport_config.h" file,
and change MUST_BUILD_CURL_CLIENT to 1, and the XMLRPC_DEFAULT_TRANSPORT and change MUST_BUILD_CURL_CLIENT to 1, and the XMLRPC_DEFAULT_TRANSPORT
to "curl", if desired. to "curl", if desired.
As usual, for each of the 'client' projects, and rpctest, in the properties, As usual, for each of the 'client' projects, and rpctest, in the properties,
Linker section, you can add the library libcurl.lib on the Input tab, and Linker section, you can add the library libcurl.lib on the Input tab, and
the relative path to the library in the General tab to something like - the relative path to the library in the General tab to something like -
..\..\curl\Debug and ..\..\curl\Release, or where ever you built or ..\..\curl\Debug and ..\..\curl\Release, or where ever you built or
copied these static libraries too. copied these static libraries too.
Or you can adjust the Windows/curlink.h, to directly point to your Or you can adjust the Windows/curlink.h, to directly point to your
respective Debug and Release static CURL libraries, either where you respective Debug and Release static CURL libraries, either where you
built them, or where you copied them too. built them, or where you copied them too.
Now, Xmlrpc-c should build using the CURL transport. Now, Xmlrpc-c should build using the CURL transport.
Note, for the final linking, all RUNTIME libraries MUST be the SAME. Note, for the final linking, all RUNTIME libraries MUST be the SAME.
A mixture of /MD and /MT will give big linkage problems. Any one project A mixture of /MD and /MT will give big linkage problems. Any one project
built with the alterate RUNTIME will show many items defined more than built with the alterate RUNTIME will show many items defined more than
once. And of course, you can also NOT mix Debug with Release. That is once. And of course, you can also NOT mix Debug with Release. That is
/MDd with /MD, nor /MTd with /MT, or else there will be unresolved /MDd with /MD, nor /MTd with /MT, or else there will be unresolved
debug items. debug items.
EOF EOF
Using xmlrpc_cpp_proxy.dsp Using xmlrpc_cpp_proxy.dsp
While not included in the main xmlrpc.dsw file, this While not included in the main xmlrpc.dsw file, this
xmlrpc_cpp_proxy.dsp, if added as a project to the xmlrpc solution, xmlrpc_cpp_proxy.dsp, if added as a project to the xmlrpc solution,
will build bin\xmlrpc_cpp_proxy.exe and xmlrpc_cpp_proxyD.exe, for will build bin\xmlrpc_cpp_proxy.exe and xmlrpc_cpp_proxyD.exe, for
testing using the default WinINET transport. testing using the default WinINET transport.
After you have loaded the xmlrpc_cpp_proxy.dsp, which adds an After you have loaded the xmlrpc_cpp_proxy.dsp, which adds an
xmlrpc_cpp_proxy project, it is necessary to ADD a dependance on xmlrpc_cpp_proxy project, it is necessary to ADD a dependance on
the xmlrpc library, to complete the link. the xmlrpc library, to complete the link.
To do this in say MSVC8, select the xmlrpc_cpp_proxy project, and right To do this in say MSVC8, select the xmlrpc_cpp_proxy project, and right
mouse click, and in the context menu, select 'Project Dependancies...'. mouse click, and in the context menu, select 'Project Dependancies...'.
And in the Project Dependancies dialog, check the xmlrpc proejct, And in the Project Dependancies dialog, check the xmlrpc proejct,
then [Ok] ... then [Ok] ...
To test your xmlrpc_cpp_proxy[D].exe - To test your xmlrpc_cpp_proxy[D].exe -
1. In a console start the server, like - 1. In a console start the server, like -
bin/xmlrpc_sample_add_serverD 8080 bin/xmlrpc_sample_add_serverD 8080
Note, since this server opens a socket, you may have to enable it on some Note, since this server opens a socket, you may have to enable it on some
anti-virus software that detects the socket being established, and anti-virus software that detects the socket being established, and
'Unblock' it in the Windows Security Alert system dialog that appears. 'Unblock' it in the Windows Security Alert system dialog that appears.
You can later remove this program from the Firewall exceptions, through You can later remove this program from the Firewall exceptions, through
Control Panel -> Windows Firewall, selecting the 'Exceptions' tab, where Control Panel -> Windows Firewall, selecting the 'Exceptions' tab, where
you can also disable this 'blocking' notification, but not recommended. you can also disable this 'blocking' notification, but not recommended.
The server should start, and report - The server should start, and report -
Running XML-RPC server... Running XML-RPC server...
2. In another console run the cpp proxy client, with say - 2. In another console run the cpp proxy client, with say -
bin>xmlrpc_cpp_proxyD http://localhost:8080/RPC2 null null bin>xmlrpc_cpp_proxyD http://localhost:8080/RPC2 null null
The client should connect to the server, and output a 'null' header, The client should connect to the server, and output a 'null' header,
and implementation file. If this functions, for a bigger example, try - and implementation file. If this functions, for a bigger example, try -
bin>xmlrpc_cpp_proxyD http://localhost:8080/RPC2 system systemProxy bin>xmlrpc_cpp_proxyD http://localhost:8080/RPC2 system systemProxy
and you should see a better example of a class header, and the and you should see a better example of a class header, and the
implementation code ... implementation code ...
20 December, 2007 20 December, 2007
EOF EOF
POST /cgi-bin/sample-cgi.cgi 1.0 POST /cgi-bin/sample-cgi.cgi 1.0
Host: localhost Host: localhost
Content-Type: text/xml Content-Type: text/xml
Content-Length: 141 Content-Length: 141
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<methodCall> <methodCall>
<methodName>system.listMethods</methodName> <methodName>system.listMethods</methodName>
<params> <params>
</params> </params>
</methodCall> </methodCall>
ExprEval - Expression Evaluation Library ExprEval - Expression Evaluation Library
Version 2.0 Version 2.0
Copyright (C) 2004 Brian Allen Vanderburg II Copyright (C) 2004 Brian Allen Vanderburg II
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
arising from the use of this software. arising from the use of this software.
Permission is granted to anyone to use this software for any purpose, Permission is granted to anyone to use this software for any purpose,
including commercial applications, and to alter it and redistribute it including commercial applications, and to alter it and redistribute it
freely, subject to the following restrictions: freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must not 1. The origin of this software must not be misrepresented; you must not
claim that you wrote the original software. If you use this software claim that you wrote the original software. If you use this software
in a product, an acknowledgment in the product documentation would be in a product, an acknowledgment in the product documentation would be
appreciated but is not required. appreciated but is not required.
2. Altered source versions must be plainly marked as such, and must not be 2. Altered source versions must be plainly marked as such, and must not be
misrepresented as being the original software. misrepresented as being the original software.
3. This notice may not be removed or altered from any source distribution. 3. This notice may not be removed or altered from any source distribution.
ExprEval - A C/C++ based expression evaluation library ExprEval - A C/C++ based expression evaluation library
Written by: Brian Allen Vanderburg II Written by: Brian Allen Vanderburg II
Licensed under the ExprEval License Licensed under the ExprEval License
------------------------------------------------------ ------------------------------------------------------
ExprEval is a mostly a C based expression evaluation ExprEval is a mostly a C based expression evaluation
library. The only C++ part is the C++ Wrapper which library. The only C++ part is the C++ Wrapper which
encapsulates the complexity of the library usage. encapsulates the complexity of the library usage.
ExprEval supports the parsing of multiple expressions ExprEval supports the parsing of multiple expressions
in a single expression string. Each sub-expression in a single expression string. Each sub-expression
must end with a semicolon. It also supports the use must end with a semicolon. It also supports the use
of variables, constants, and functions. Functions of variables, constants, and functions. Functions
can take multiple arguments. These arguments can can take multiple arguments. These arguments can
also be expressions. also be expressions.
ExprEval is very fast. It first parses the expression ExprEval is very fast. It first parses the expression
string into a tree of actions to take. After it has string into a tree of actions to take. After it has
been parsed, an expression can be evaluated many times been parsed, an expression can be evaluated many times
over an over. over an over.
Functions, variables, and constants are stored in Functions, variables, and constants are stored in
their own seperate lists. This makes is where the their own seperate lists. This makes is where the
lists can be shared among multiple expression objects. lists can be shared among multiple expression objects.
A function list can add all the functions needed, and A function list can add all the functions needed, and
then be added to each expression object, instead of then be added to each expression object, instead of
added each needed function to each object. The same added each needed function to each object. The same
goes for constant lists. Variable lists make it where goes for constant lists. Variable lists make it where
one expression can depend on a variable set in another. one expression can depend on a variable set in another.
Saturday, July 1, 2006 Saturday, July 1, 2006
---------------------- ----------------------
Version 2.6 Version 2.6
* Added a new value list function 'exprValListGetNext' that can be used to * Added a new value list function 'exprValListGetNext' that can be used to
enumerate the items in a value list. Any of the items not needed (name, enumerate the items in a value list. Any of the items not needed (name,
value, or address) can be NULL. For example: value, or address) can be NULL. For example:
char *name; char *name;
EXPRTYPE val; EXPRTYPE val;
void *cookie; void *cookie;
cookie = exprValListGetNext(vlist, &name, &value, NULL, NULL); cookie = exprValListGetNext(vlist, &name, &value, NULL, NULL);
while(cookie) while(cookie)
{ {
/* Do something with name and value */ /* Do something with name and value */
cookie = exprValListGetNext(vlist, &name, &value, NULL, cookie); cookie = exprValListGetNext(vlist, &name, &value, NULL, cookie);
} }
You must make sure not to actually edit the returned name, because it is a You must make sure not to actually edit the returned name, because it is a
pointer into the value list to the name. This can also be used to have one pointer into the value list to the name. This can also be used to have one
value list store globals. Global variables can be added to a value list, then value list store globals. Global variables can be added to a value list, then
additional lists can be created, and before any variables are added additional lists can be created, and before any variables are added
or the expression is parsed, the global list can be enumerated for name and or the expression is parsed, the global list can be enumerated for name and
address and the exprValListAddAddress can be used to add them. This way, address and the exprValListAddAddress can be used to add them. This way,
expressions can have their own private list, but some variables may be shared expressions can have their own private list, but some variables may be shared
on each expression through the global list. This is useful especially if the on each expression through the global list. This is useful especially if the
globals are not known at compile time, but can be adjusted by the user. globals are not known at compile time, but can be adjusted by the user.
For example: For example:
exprValList *globals; exprValList *globals;
exprValList *v1; exprValList *v1;
exprValList *v2; exprValList *v2;
char *name; char *name;
EXPRTYPE *addr; EXPRTYPE *addr;
void *cookie; void *cookie;
exprValListCreate(&globals); exprValListCreate(&globals);
/* Add variables to the list, perhaps read from a user file or something */ /* Add variables to the list, perhaps read from a user file or something */
exprValListCreate(&v1); exprValListCreate(&v1);
cookie = exprValListGetNext(globals, &name, NULL, &addr, NULL); cookie = exprValListGetNext(globals, &name, NULL, &addr, NULL);
while(cookie) while(cookie)
{ {
exprValListAddAddress(v1, name, addr); exprValListAddAddress(v1, name, addr);
cookie = exprValListGetNext(globals, &name, NULL, &addr, cookie); cookie = exprValListGetNext(globals, &name, NULL, &addr, cookie);
} }
Friday, June 30, 2006 Friday, June 30, 2006
--------------------- ---------------------
Version 2.5 Version 2.5
* Added a new value list function 'exprValListAddAddress'. This function adds * Added a new value list function 'exprValListAddAddress'. This function adds
a named value to the list, but uses the addresss of a stack variable. The a named value to the list, but uses the addresss of a stack variable. The
stack variable is then used to set/get the value instead of the internal list stack variable is then used to set/get the value instead of the internal list
value. You must ensure that the stack variable exists as long as it is used value. You must ensure that the stack variable exists as long as it is used
by the expression. This can permit, for example, a value name to be shared by the expression. This can permit, for example, a value name to be shared
with two different value lists like such: with two different value lists like such:
EXPRTYPE global_value; EXPRTYPE global_value;
exprValListAddAddress(vlist, "global", &global_value); exprValListAddAddress(vlist, "global", &global_value);
exprValListAddAddress(vlist2, "global", &global_value); exprValListAddAddress(vlist2, "global", &global_value);
Like this, the value can be directly accessed by the application, and each Like this, the value can be directly accessed by the application, and each
value list will share it. This can also be used to replace code from this: value list will share it. This can also be used to replace code from this:
EXPRTYPE *a; EXPRTYPE *a;
exprValListAdd(vlist, "var", 0.0); exprValListAdd(vlist, "var", 0.0);
exprValListGetAddress(vlist, "var", &a); exprValListGetAddress(vlist, "var", &a);
To look like this: To look like this:
EXPRTYPE a; EXPRTYPE a;
exprValListAddAddress(vlist, "var", &a); exprValListAddAddress(vlist, "var", &a);
* Added a value list function exprValListSet to set the value of a variable * Added a value list function exprValListSet to set the value of a variable
(using the slow search method). This is because the add functions now return (using the slow search method). This is because the add functions now return
and error if the item (function/value) already exists instead of setting the and error if the item (function/value) already exists instead of setting the
value of the item. You can still use the fast direct access method. value of the item. You can still use the fast direct access method.
* Changed internal lists for function and value lists from binary trees to * Changed internal lists for function and value lists from binary trees to
linked lists. linked lists.
Thursday, May 4, 2006 Thursday, May 4, 2006
--------------------- ---------------------
Version 2.0 Version 2.0
* All internal functions are evaluated directly in the exprEvalNode call. * All internal functions are evaluated directly in the exprEvalNode call.
This gives some speed increase. This gives some speed increase.
* Removed parameter and reference count macros as well as functin creation * Removed parameter and reference count macros as well as functin creation
macro. Parameter and reference count information can be set when adding macro. Parameter and reference count information can be set when adding
a function solver. a function solver.
* Removed exprMsgFuncType, since it is unused by the library. * Removed exprMsgFuncType, since it is unused by the library.
* Changed much of the internal names from one-letter variable names to * Changed much of the internal names from one-letter variable names to
more meaningful names. more meaningful names.
Thursday, December 1, 2005 Thursday, December 1, 2005
-------------------------- --------------------------
Version 1.8 Version 1.8
* Added support for the ^ operator to raise to a power. * Added support for the ^ operator to raise to a power.
The pow function can still be used. The pow function can still be used.
* Moved basic math code (add,subtract,multiply,divide,negate,exponent) * Moved basic math code (add,subtract,multiply,divide,negate,exponent)
and multiple expression support from function solvers to the exprEvalNode and multiple expression support from function solvers to the exprEvalNode
function. function.
Tuesday, November 22, 2005 Tuesday, November 22, 2005
-------------------------- --------------------------
I still haven't been keeping up with history much. I still haven't been keeping up with history much.
* Removed < and > as comments. Instead use # as a * Removed < and > as comments. Instead use # as a
comment to the end of the line comment to the end of the line
* Added function exprGetErrorPosition to get start and * Added function exprGetErrorPosition to get start and
end position of parse error. end position of parse error.
Monday, May 3, 2004: Version 1.0 Monday, May 3, 2004: Version 1.0
--------------------------------- ---------------------------------
This is a pretty bad time to start the history part since This is a pretty bad time to start the history part since
ExprEval is pretty much up and running and very operational. ExprEval is pretty much up and running and very operational.
* Added macro EXPR_MAJORVERSION * Added macro EXPR_MAJORVERSION
* Added macro EXPR_MINORVERSION * Added macro EXPR_MINORVERSION
* Added function exprGetVersion * Added function exprGetVersion
* Added macro to make declaring functions easy: * Added macro to make declaring functions easy:
EXPR_FUNCTIONSOLVER(func_name) EXPR_FUNCTIONSOLVER(func_name)
* Added support for passing variable references to functions * Added support for passing variable references to functions
with the ampersand. Example: minmax(1,2,3,&min,&max) with the ampersand. Example: minmax(1,2,3,&min,&max)
* Added macros for reference support: * Added macros for reference support:
EXPR_REQUIREREFCOUNT EXPR_REQUIREREFCOUNT
EXPR_REQUIREREFCOUNTMIN EXPR_REQUIREREFCOUNTMIN
EXPR_REQUIREREFCOUNTMAX EXPR_REQUIREREFCOUNTMAX
EXPR_REQUIREREFCOUNTRANGE EXPR_REQUIREREFCOUNTRANGE
* Added feature to disable assigning to a variable with the * Added feature to disable assigning to a variable with the
same name as a constant. same name as a constant.
* Added feature to enable applications to change the value of * Added feature to enable applications to change the value of
a constant while the expression can not. You must add a constant while the expression can not. You must add
any constants to the constant list BEFORE you parse the any constants to the constant list BEFORE you parse the
expression. expression.
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论