summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-01-25 20:44:50 +0000
committerrob rob@31f1291d-b8d6-0310-a050-a5561fc1590b <rob rob@31f1291d-b8d6-0310-a050-a5561fc1590b@5417fbe8-f217-4b02-8779-1006273d7864>2006-01-25 20:44:50 +0000
commit033ce652559ac342a94bdf9edbabe77ed1e81369 (patch)
treec8c662808401929e4fafcefe24b835b558cf3edf /include
parent9435ddae0c408d39c623f6bdc7650c2bf0981c0c (diff)
Added va_copy macro, along with a autoconf test.
git-svn-id: svn://svn.anope.org/anope/trunk@959 31f1291d-b8d6-0310-a050-a5561fc1590b git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@686 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'include')
-rw-r--r--include/services.h14
-rw-r--r--include/sysconf.h.in5
2 files changed, 18 insertions, 1 deletions
diff --git a/include/services.h b/include/services.h
index b155c9f47..e2bd9b697 100644
--- a/include/services.h
+++ b/include/services.h
@@ -146,6 +146,20 @@
#include "sockets.h"
+#ifndef va_copy
+# ifdef __va_copy
+# define VA_COPY(DEST,SRC) __va_copy((DEST),(SRC))
+# else
+# define VA_COPY(DEST, SRC) memcpy ((&DEST), (&SRC), sizeof(va_list))
+# endif
+#else
+# ifdef HAVE_VA_LIST_AS_ARRAY
+# define VA_COPY(DEST,SRC) (*(DEST) = *(SRC))
+# else
+# define VA_COPY(DEST, SRC) va_copy(DEST, SRC)
+# endif
+#endif
+
#ifdef _AIX
/* Some AIX boxes seem to have bogus includes that don't have these
* prototypes. */
diff --git a/include/sysconf.h.in b/include/sysconf.h.in
index 370330ead..86a2715a4 100644
--- a/include/sysconf.h.in
+++ b/include/sysconf.h.in
@@ -90,6 +90,9 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
+/* va_list as array */
+#undef HAVE_VA_LIST_AS_ARRAY
+
/* "Module dir" */
#undef MODULE_PATH
@@ -177,7 +180,7 @@
#include <stdio.h>
/* We KNOW these are not ansi, we are defining them here to suppress the warning
- * s messages on a "make strict" compile */
+ * * s messages on a "make strict" compile */
int snprintf(char *str, size_t size, const char *format, ...);
int vprintf(const char *format, va_list ap);
int vfprintf(FILE *stream, const char *format, va_list ap);