summaryrefslogtreecommitdiffstats
path: root/contrib/file/src/vasprintf.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2014-12-11 06:52:10 +0000
committerdelphij <delphij@FreeBSD.org>2014-12-11 06:52:10 +0000
commit504cc95e05d4edf7e1615ae450c370f6cc7a96ae (patch)
treeaa6fb81cc2801f9f2db10c5217ec3c495278f249 /contrib/file/src/vasprintf.c
parent6eef5a7d4dabee1d90f7bb9993b3f7f438e5aba5 (diff)
parent2e5be0fdd11aef0d2cb0d88c71946b953019f313 (diff)
downloadFreeBSD-src-504cc95e05d4edf7e1615ae450c370f6cc7a96ae.zip
FreeBSD-src-504cc95e05d4edf7e1615ae450c370f6cc7a96ae.tar.gz
MFV r275696: file 5.21.
MFC after: 2 weeks
Diffstat (limited to 'contrib/file/src/vasprintf.c')
-rw-r--r--contrib/file/src/vasprintf.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/file/src/vasprintf.c b/contrib/file/src/vasprintf.c
index cc43ae3..7a18bed 100644
--- a/contrib/file/src/vasprintf.c
+++ b/contrib/file/src/vasprintf.c
@@ -108,7 +108,7 @@ you use strange formats.
#include "file.h"
#ifndef lint
-FILE_RCSID("@(#)$File: vasprintf.c,v 1.12 2014/05/14 23:09:21 christos Exp $")
+FILE_RCSID("@(#)$File: vasprintf.c,v 1.13 2014/12/04 15:56:46 christos Exp $")
#endif /* lint */
#include <assert.h>
@@ -633,11 +633,15 @@ int vasprintf(char **ptr, const char *format_string, va_list vargs)
#ifdef va_copy
va_copy (s.vargs, vargs);
#else
-#ifdef __va_copy
+# ifdef __va_copy
__va_copy (s.vargs, vargs);
-#else
+# else
+# ifdef WIN32
+ s.vargs = vargs;
+# else
memcpy (&s.vargs, &vargs, sizeof (s.va_args));
-#endif /* __va_copy */
+# endif /* WIN32 */
+# endif /* __va_copy */
#endif /* va_copy */
s.maxlen = (size_t)INT_MAX;
OpenPOWER on IntegriCloud