--- aclocal.m4 2004/04/04 08:07:34 1.10
+++ aclocal.m4 2004/04/04 09:57:10 1.11
@@ -288,7 +288,7 @@
m4_define(__va_copy_check, [
AH_VERBATIM($1,
[/* Predefined possible va_copy() implementation (id: $1) */
-#define __VA_COPY_USE_$1 $2])
+#define __VA_COPY_USE_$1(d, s) $2])
if test ".$ac_cv_va_copy" = .; then
AC_TRY_RUN(__va_copy_test($2), [ac_cv_va_copy="$1"])
fi
@@ -302,17 +302,21 @@
AC_CACHE_VAL(ac_cv_va_copy, [
ac_cv_va_copy=""
dnl # 1. check for standardized C99 macro
- __va_copy_check(STD, [va_copy((d), (s))])
+ __va_copy_check(C99, [va_copy((d), (s))])
dnl # 2. check for alternative/deprecated GCC macro
- __va_copy_check(MAC, [VA_COPY((d), (s))])
- dnl # 3. check for assignment approach (assuming va_list is a struct)
- __va_copy_check(AS1, [do { (d) = (s); } while (0)])
- dnl # 4. check for assignment approach (assuming va_list is a pointer)
- __va_copy_check(AS2, [do { *(d) = *(s); } while (0)])
- dnl # 5. check for memory copying approach (assuming va_list is a struct)
- __va_copy_check(CP1, [memcpy((void *)&(d), (void *)&(s)), sizeof((s))])
- dnl # 6. check for memory copying approach (assuming va_list is a pointer)
- __va_copy_check(CP2, [memcpy((void *)(d), (void *)(s)), sizeof(*(s))])
+ __va_copy_check(GCM, [VA_COPY((d), (s))])
+ dnl # 3. check for internal GCC macro (high-level define)
+ __va_copy_check(GCH, [__va_copy((d), (s))])
+ dnl # 4. check for internal GCC macro (built-in function)
+ __va_copy_check(GCB, [__builtin_va_copy((d), (s))])
+ dnl # 5. check for assignment approach (assuming va_list is a struct)
+ __va_copy_check(ASS, [do { (d) = (s); } while (0)])
+ dnl # 6. check for assignment approach (assuming va_list is a pointer)
+ __va_copy_check(ASP, [do { *(d) = *(s); } while (0)])
+ dnl # 7. check for memory copying approach (assuming va_list is a struct)
+ __va_copy_check(CPS, [memcpy((void *)&(d), (void *)&(s)), sizeof((s))])
+ dnl # 8. check for memory copying approach (assuming va_list is a pointer)
+ __va_copy_check(CPP, [memcpy((void *)(d), (void *)(s)), sizeof(*(s))])
if test ".$ac_cv_va_copy" = .; then
AC_ERROR([no working implementation found])
fi
|