Apply minor fixes from patches@, SF tracker, and others.
[ircu2.10.12-pk.git] / include / ircd_snprintf.h
index ba7277c45a50e34871709bcbe06b844ee318f32e..520c0cc15bc38c1a0e192023e1a37ce8af58267d 100644 (file)
@@ -39,6 +39,14 @@ struct VarData {
   va_list      vd_args;        /* arguments for %v */
 };
 
+#ifndef HAVE_VA_COPY
+#if HAVE___VA_COPY
+#define va_copy(DEST, SRC) __va_copy(DEST, SRC)
+#else
+#define va_copy(DEST, SRC) memcpy(&(DEST), &(SRC), sizeof(DEST))
+#endif
+#endif
+
 extern int ircd_snprintf(struct Client *dest, char *buf, size_t buf_len,
                         const char *format, ...);
 extern int ircd_vsnprintf(struct Client *dest, char *buf, size_t buf_len,