diff options
| -rw-r--r-- | acconfig.h | 2 | ||||
| -rw-r--r-- | configure.in | 9 | ||||
| -rw-r--r-- | include/snprintf.c | 6 |
3 files changed, 7 insertions, 10 deletions
@@ -20,7 +20,7 @@ #undef HAVE_UNISTD_SYSCONF /* Define if function va_copy is in stdarg.h */ -#undef HAVE_VA_COPY +#undef HAVE___VA_COPY /* Define if function sysctl accepts KERN_BOOTTIME */ #undef HAVE_FUNCTION_SYSCTL_KERN_BOOTTIME diff --git a/configure.in b/configure.in index 356c33d7..008a277f 100644 --- a/configure.in +++ b/configure.in @@ -162,8 +162,8 @@ AC_DEFINE(HAVE_UNISTD_SYSCONF) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) -dnl Check for function va_copy in stdarg.h -AC_MSG_CHECKING(for function va_copy() in stdarg.h) +dnl Check for macro __va_copy in stdarg.h +AC_MSG_CHECKING(for macro __va_copy() in stdarg.h) AC_TRY_COMPILE( [ #include <stdarg.h> @@ -172,13 +172,12 @@ AC_TRY_COMPILE( va_list src,dst; - va_copy(dst,src); + __va_copy(dst,src); ], -AC_DEFINE(HAVE_VA_COPY) +AC_DEFINE(HAVE___VA_COPY) AC_MSG_RESULT(yes), AC_MSG_RESULT(no)) - dnl Check for vmtotal in sys/vmmeter.h AC_MSG_CHECKING(for vmtotal in struct sys/vmmeter.h) AC_TRY_COMPILE( diff --git a/include/snprintf.c b/include/snprintf.c index e4250ca9..773b6cd8 100644 --- a/include/snprintf.c +++ b/include/snprintf.c @@ -115,10 +115,8 @@ #endif */ - -#ifdef HAVE_VA_COPY - #define VA_COPY(dest, src) va_copy(dest, src) -/* #define VA_COPY(dest, src) __va_copy(dest, src)*/ +#ifdef HAVE___VA_COPY + #define VA_COPY(dest, src) __va_copy(dest, src) #else #define VA_COPY(dest, src) (dest) = (src) #endif |
