X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=m4%2Fstdarg.m4;h=8a62f2e844a3799e3058a57809daacb7aa6c74cd;hb=HEAD;hp=21910e4becd9fc84edc7be592bc9e25e70fb13c3;hpb=138fc7e67e3d9845cd7d81aad0e9c7724784f9b9;p=tar diff --git a/m4/stdarg.m4 b/m4/stdarg.m4 index 21910e4..8a62f2e 100644 --- a/m4/stdarg.m4 +++ b/m4/stdarg.m4 @@ -1,5 +1,5 @@ -# stdarg.m4 serial 2 -dnl Copyright (C) 2006, 2008 Free Software Foundation, Inc. +# stdarg.m4 serial 4 +dnl Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -13,12 +13,16 @@ AC_DEFUN([gl_STDARG_H], NEXT_STDARG_H=''; AC_SUBST([NEXT_STDARG_H]) AC_MSG_CHECKING([for va_copy]) AC_CACHE_VAL([gl_cv_func_va_copy], [ - AC_TRY_COMPILE([#include ], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[ #ifndef va_copy void (*func) (va_list, va_list) = va_copy; #endif -], - [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])]) + ]])], + [gl_cv_func_va_copy=yes], + [gl_cv_func_va_copy=no])]) AC_MSG_RESULT([$gl_cv_func_va_copy]) if test $gl_cv_func_va_copy = no; then dnl Provide a substitute. @@ -46,13 +50,17 @@ void (*func) (va_list, va_list) = va_copy; else dnl Provide a substitute in , either __va_copy or as a simple dnl assignment. - AC_CACHE_VAL([gl_cv_func___va_copy], [ - AC_TRY_COMPILE([#include ], [ + gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [ + AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + [[#include ]], + [[ #ifndef __va_copy error, bail out #endif -], - [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])]) + ]])], + [gl_cv_func___va_copy=yes], + [gl_cv_func___va_copy=no])]) if test $gl_cv_func___va_copy = yes; then AC_DEFINE([va_copy], [__va_copy], [Define as a macro for copying va_list variables.])