summaryrefslogtreecommitdiff
path: root/source4/build
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2005-01-12 22:06:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:08:47 -0500
commitd9d41b57e95a941f038d2c3a0c9261e1027a6dcc (patch)
tree001fcf981197c29cf2d12df5b83a7013e8d46025 /source4/build
parentef4e85614e038ee3f2c63e111b2bae8f079892b9 (diff)
downloadsamba-d9d41b57e95a941f038d2c3a0c9261e1027a6dcc.tar.gz
samba-d9d41b57e95a941f038d2c3a0c9261e1027a6dcc.tar.bz2
samba-d9d41b57e95a941f038d2c3a0c9261e1027a6dcc.zip
r4717: fixed our usage of VA_COPY to be more standards compliant
(This used to be commit 48b52584ab7db747feaf7ad4382bd3877935ee26)
Diffstat (limited to 'source4/build')
-rw-r--r--source4/build/m4/rewrite.m416
1 files changed, 13 insertions, 3 deletions
diff --git a/source4/build/m4/rewrite.m4 b/source4/build/m4/rewrite.m4
index 6a466801f8..8d68c4cc74 100644
--- a/source4/build/m4/rewrite.m4
+++ b/source4/build/m4/rewrite.m4
@@ -820,12 +820,22 @@ if test x"$samba_cv_HAVE_GETTIMEOFDAY_TZ" = x"yes"; then
AC_DEFINE(HAVE_GETTIMEOFDAY_TZ,1,[Whether gettimeofday() is available])
fi
-AC_CACHE_CHECK([for __va_copy],samba_cv_HAVE_VA_COPY,[
+AC_CACHE_CHECK([for va_copy],samba_cv_HAVE_VA_COPY,[
AC_TRY_LINK([#include <stdarg.h>
-va_list ap1,ap2;], [__va_copy(ap1,ap2);],
+va_list ap1,ap2;], [va_copy(ap1,ap2);],
samba_cv_HAVE_VA_COPY=yes,samba_cv_HAVE_VA_COPY=no)])
if test x"$samba_cv_HAVE_VA_COPY" = x"yes"; then
- AC_DEFINE(HAVE_VA_COPY,1,[Whether __va_copy() is available])
+ AC_DEFINE(HAVE_VA_COPY,1,[Whether va_copy() is available])
+fi
+
+if test x"$samba_cv_HAVE_VA_COPY" != x"yes"; then
+AC_CACHE_CHECK([for __va_copy],samba_cv_HAVE___VA_COPY,[
+AC_TRY_LINK([#include <stdarg.h>
+va_list ap1,ap2;], [__va_copy(ap1,ap2);],
+samba_cv_HAVE___VA_COPY=yes,samba_cv_HAVE___VA_COPY=no)])
+if test x"$samba_cv_HAVE___VA_COPY" = x"yes"; then
+ AC_DEFINE(HAVE___VA_COPY,1,[Whether __va_copy() is available])
+fi
fi
AC_CACHE_CHECK([for C99 vsnprintf],samba_cv_HAVE_C99_VSNPRINTF,[