comparison configure.ac @ 29410:6288bbd53f44

Pass around a va_list instead of a pointer to a va_list. Refs #7404 This gets rid of a compile warning for me on x86_64. I don't have an i386 box to test on, but every bit of evidence I can find tells me that it's totally fine to pass around a va_list. We do it in status.c If this breaks compilation for you or you get a warning from perl-handlers.c then pleaes let me know! Or just disapprove this
author Mark Doliner <mark@kingant.net>
date Wed, 10 Feb 2010 09:04:15 +0000
parents 1b040b79da38
children d77ecfe2b2c9 1eeeb20f0b9f 5dec9d90fb51 1e4781fb144b
comparison
equal deleted inserted replaced
29409:f521dd7c75b5 29410:6288bbd53f44
2389 struct tm tm; 2389 struct tm tm;
2390 tm.tm_gmtoff = 1; 2390 tm.tm_gmtoff = 1;
2391 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no)) 2391 ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
2392 if test $ac_cv_struct_tm_gmtoff = yes; then 2392 if test $ac_cv_struct_tm_gmtoff = yes; then
2393 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm]) 2393 AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
2394 fi
2395
2396 AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
2397 AC_TRY_RUN([#include <stdarg.h>
2398 #include <stdlib.h>
2399 void f (int i, ...) {
2400 va_list args1, args2;
2401 va_start (args1, i);
2402 args2 = args1;
2403 if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
2404 exit (1);
2405 va_end (args1); va_end (args2);
2406 }
2407 int main() {
2408 f (0, 42);
2409 return 0;
2410 }],
2411 [ac_cv_va_val_copy=yes],
2412 [ac_cv_va_val_copy=no],
2413 [ac_cv_va_val_copy=yes])
2414 ])
2415
2416 if test "x$ac_cv_va_val_copy" = "xno"; then
2417 AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
2418 fi 2394 fi
2419 2395
2420 dnl ####################################################################### 2396 dnl #######################################################################
2421 dnl # Check for check 2397 dnl # Check for check
2422 dnl ####################################################################### 2398 dnl #######################################################################