Commit b807297d authored by Pekka Pessi's avatar Pekka Pessi

Updates for win32.

Added SOFIAPUBFUN to few functions in msg_parser().
Added new C++ wrappers for C files that need C++ linkage in tport_test.
Fixed setlocal braino in build_sources.cmd.

darcs-hash:20060512163530-65a35-cfa423f98badd064d27545b3b0997871f9468be0.gz
parent 1ffc31b9
......@@ -91,7 +91,8 @@ struct msg_href_s
*/
struct msg_mclass_s
{
msg_hclass_t mc_hclass[1]; /**< Recursive header class */
struct msg_hclass_s
mc_hclass[1]; /**< Recursive header class */
char const *mc_name; /**< Protocol name, e.g., "SIP/2.0" */
void *mc_tag; /**< Protocol-specific tag */
unsigned mc_flags; /**< Default flags */
......
......@@ -151,14 +151,14 @@ SOFIAPUBFUN char *msg_payload_dup_one(msg_header_t *dst,
msg_header_t const *src,
char *b, int xtra);
int msg_separator_d(su_home_t *, msg_header_t *h, char *s, int slen);
int msg_separator_e(char b[], int bsiz, msg_header_t const *h, int flags);
SOFIAPUBFUN int msg_separator_d(su_home_t *, msg_header_t *, char *, int);
SOFIAPUBFUN int msg_separator_e(char [], int, msg_header_t const *, int);
int msg_auth_d(su_home_t *, msg_header_t *h, char *s, int slen);
int msg_auth_e(char b[], int bsiz, msg_header_t const *h, int f);
int msg_auth_dup_xtra(msg_header_t const *h, int offset);
char *msg_auth_dup_one(msg_header_t *dst, msg_header_t const *src,
char *b, int xtra);
SOFIAPUBFUN int msg_auth_d(su_home_t *, msg_header_t *h, char *s, int slen);
SOFIAPUBFUN int msg_auth_e(char b[], int bsiz, msg_header_t const *h, int f);
SOFIAPUBFUN int msg_auth_dup_xtra(msg_header_t const *h, int offset);
SOFIAPUBFUN char *msg_auth_dup_one(msg_header_t *dst, msg_header_t const *src,
char *b, int xtra);
/* ---------------------------------------------------------------------------
* 2) Macros and prototypes for building header decoding/encoding functions.
......@@ -195,7 +195,8 @@ SOFIAPUBFUN int msg_unquoted_e(char *b, int bsiz, char const *s);
/** Duplicate string. @HI */
#define MSG_STRING_DUP(p, d, s) \
(void)((s)?((p)=memccpy((void *)((d)=(char*)p),(s),0,0x7fffffff)):((d)=NULL))
(void)((s)?((p)=(char*)memccpy((void *)((d)=(char*)p),(s),0,0x7fffffff))\
:((d)=NULL))
/** Calculate string size. @HI */
#define MSG_STRING_SIZE(s) ((s) ? (strlen(s) + 1) : 0)
......
......@@ -75,11 +75,11 @@ SOFIA_BEGIN_DECLS
#define TSTTAGI_TST_P(t) (TSTTAG_TST_P((t)->t_tag))
/** Tag class for TST headers */
MSG_DLL extern tag_class_t tsthdrtag_class[1];
extern tag_class_t tsthdrtag_class[1];
/** Tag class for string values of TST headers */
MSG_DLL extern tag_class_t tststrtag_class[1];
extern tag_class_t tststrtag_class[1];
/** Tag class for TST message */
MSG_DLL extern tag_class_t tstmsgtag_class[1];
extern tag_class_t tstmsgtag_class[1];
/**Tag list item for header string.
*
......@@ -96,10 +96,10 @@ MSG_DLL extern tag_class_t tstmsgtag_class[1];
#define TSTTAG_HEADER(x) tsttag_header, tsttag_header_v((x))
/** Tag for header string */
MSG_DLL extern tag_typedef_t tsttag_header;
extern tag_typedef_t tsttag_header;
#define TSTTAG_HEADER_REF(x) tsttag_header_ref, tsttag_header_vr(&(x))
MSG_DLL extern tag_typedef_t tsttag_header_ref;
extern tag_typedef_t tsttag_header_ref;
#if HAVE_INLINE
static inline tag_value_t
......@@ -125,10 +125,10 @@ tsttag_header_vr(msg_header_t const **vp)
#define TSTTAG_HEADER_STR(x) tsttag_header_str, tag_str_v((x))
/** Tag for header string */
MSG_DLL extern tag_typedef_t tsttag_header_str;
extern tag_typedef_t tsttag_header_str;
#define TSTTAG_HEADER_STR_REF(x) tsttag_header_str_ref, tag_str_vr(&(x))
MSG_DLL extern tag_typedef_t tsttag_header_str_ref;
extern tag_typedef_t tsttag_header_str_ref;
#if HAVE_INLINE
static inline
......
......@@ -74,22 +74,22 @@
#if defined(_WIN32) && \
(defined(_MSC_VER) || defined(__BORLANDC__) || \
defined(__CYGWIN__) || defined(__MINGW32__))
#undef SOFIAPUBFUN
#undef SOFIAPUBVAR
#undef SOFIACALL
#if defined(IN_LIBSOFIA_SIP_UA) && !defined(LIBSOFIA_SIP_UA_STATIC)
#define SOFIAPUBFUN __declspec(dllexport)
#define SOFIAPUBVAR __declspec(dllexport)
#define SOFIACALL __cdecl
#if defined(LIBSOFIA_SIP_UA_STATIC)
#else
#if !defined(LIBSOFIA_SIP_UA_STATIC)
#undef SOFIAPUBFUN
#undef SOFIAPUBVAR
#if defined(IN_LIBSOFIA_SIP_UA)
#define SOFIAPUBFUN __declspec(dllexport)
#define SOFIAPUBVAR __declspec(dllexport)
#else
#define SOFIAPUBFUN __declspec(dllimport)
#define SOFIAPUBVAR __declspec(dllimport) extern
#else
#define SOFIAPUBFUN
#define SOFIAPUBVAR extern
#endif
#endif
#define SOFIACALL __cdecl
#if !defined _REENTRANT
#define _REENTRANT
#endif
......
......@@ -110,7 +110,7 @@ int tstflags;
char const name[] = "tport_test";
extern su_log_t tport_log[];
SOFIAPUBVAR su_log_t tport_log[];
void usage(void)
{
......
......@@ -21,6 +21,8 @@ EXTRA_DIST = SofiaSIP.dsw \
tests/test_nua/test_nat_tags.cpp \
tests/test_nta/test_nta.dsp \
tests/test_tport/test_tport.dsp \
tests/test_tport/test_class.cpp \
tests/test_tport/test_table.cpp \
tests/su_alloc_test/su_alloc_test.dsp \
tests/su_root_test/su_root_test.dsp \
tests/su_tag_test/su_tag_test.dsp \
......
......@@ -3,7 +3,7 @@
::
@setlocal
@if x%AWK%==x setlocal AWK=gawk
@if x%AWK%==x set AWK=gawk
@set CHECK=@IF errorlevel 1 GOTO failed
:: Check that we really have awk
......
......@@ -45,6 +45,9 @@ tests\su_torture\Debug\su_torture.exe
tests\test_memmem\Debug\test_memmem.exe
@if errorlevel 1 ( echo test_memmem: FAIL ) else echo test_memmem: PASS
tests\test_tport\Debug\test_tport.exe
@if errorlevel 1 ( echo test_tport: FAIL ) else echo test_tport: PASS
tests\test_nta\Debug\test_nta.exe
@if errorlevel 1 ( echo test_nta: FAIL ) else echo test_nta: PASS
......
......@@ -84,7 +84,7 @@ LINK32=link.exe
# Name "test_tport - Win32 Debug"
# Begin Source File
SOURCE="..\..\..\libsofia-sip-ua\msg\test_class.c"
SOURCE=.\test_class.cpp
# End Source File
# Begin Source File
......@@ -96,7 +96,7 @@ SOURCE="..\..\..\libsofia-sip-ua\msg\test_protos.h"
# End Source File
# Begin Source File
SOURCE="..\..\..\libsofia-sip-ua\msg\test_table.c"
SOURCE=.\test_table.cpp
# End Source File
# Begin Source File
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment