mirror of
https://github.com/michaelrsweet/mxml.git
synced 2025-05-10 23:12:09 +00:00
Provide fallback implementation of va_copy for VC++ and others (STR #115)
This commit is contained in:
parent
159e54f5d2
commit
4b0511f8ac
@ -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…
Reference in New Issue
Block a user