Provide fallback implementation of va_copy for VC++ and others (STR #115)

pull/193/head
Michael R Sweet 14 years ago
parent 159e54f5d2
commit 4b0511f8ac
  1. 16
      mxml-string.c

@ -29,6 +29,20 @@
#include "config.h"
/*
* The va_copy macro is part of C99, but many compilers don't implement it.
* Provide a "direct assignment" implmentation when va_copy isn't defined...
*/
#ifndef va_copy
# ifdef __va_copy
# define va_copy(dst,src) __va_copy(dst,src)
# else
# define va_copy(dst,src) memcpy(&dst, &src, sizeof(va_list))
# endif /* __va_copy */
#endif /* va_copy */
#ifndef HAVE_SNPRINTF
/*
* '_mxml_snprintf()' - Format a string.
@ -58,7 +72,7 @@ _mxml_snprintf(char *buffer, /* I - Output buffer */
*/
#ifndef HAVE_STRDUP
char * /* O - New string pointer */
char * /* O - New string pointer */
_mxml_strdup(const char *s) /* I - String to duplicate */
{
char *t; /* New string pointer */

Loading…
Cancel
Save