Commit 7f630b23 authored by Pekka Pessi's avatar Pekka Pessi

sofia-sip/su_tagarg.h: if va_copy is missing, fall back to __va_copy or memcpy

darcs-hash:20080724170217-db55f-c23705844927c095eba5b0379428e4e7f3e7c73e.gz
parent 78bb04a1
......@@ -82,6 +82,14 @@ typedef struct {
va_list ap;
} ta_list;
#if defined(va_copy)
#define su_va_copy(dst, src) va_copy((dst), (src))
#elif defined(__va_copy)
#define su_va_copy(dst, src) __va_copy((dst), (src))
#else
#define su_va_copy(dst, src) (memcpy(&(dst), &(src), sizeof (va_list)))
#endif
/**Macro initializing a ta_list object.
*
* The ta_start() macro initializes @a ta for subsequent use by ta_args(),
......@@ -143,7 +151,7 @@ typedef struct {
ta_start__tag != tag_null && \
ta_start__tag != tag_next) { \
va_list ta_start__ap; \
va_copy(ta_start__ap, (ta).ap); \
su_va_copy(ta_start__ap, (ta).ap); \
(ta).tl[1].t_tag = tag_next; \
(ta).tl[1].t_value = (tag_value_t)tl_vlist(ta_start__ap); \
va_end(ta_start__ap); \
......
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