summaryrefslogtreecommitdiff
path: root/m4
diff options
context:
space:
mode:
authorLucas De Marchi <lucas.demarchi@profusion.mobi>2013-01-02 20:55:57 +0000
committerLucas De Marchi <lucas.demarchi@profusion.mobi>2013-01-02 20:55:57 +0000
commitf1f81ca7c9ada6a135b4efd30fbf5c6292ec6b32 (patch)
tree97b361fcd32454c8e02f7533688174e8688ea8a6 /m4
parent81cf390f1704b354e28980291be971be8e02d832 (diff)
efl: stop depending on va_list type
va_list may be typedef'ed not only to array and pointer but also to a plain struct. It could be made to work this way, but it's a lot simpler a safer to not depend on it. To deal with the array corner case we copy the va_list from the function arguments to the stack and call the "real" function passing it. SVN revision: 82017
Diffstat (limited to 'm4')
-rw-r--r--m4/ac_valist.m439
1 files changed, 0 insertions, 39 deletions
diff --git a/m4/ac_valist.m4 b/m4/ac_valist.m4
deleted file mode 100644
index 8016a060b7..0000000000
--- a/m4/ac_valist.m4
+++ /dev/null
@@ -1,39 +0,0 @@
1dnl Copyright (C) 2013 ProFUSION embedded systems
2dnl This code is public domain and can be freely used or copied.
3
4dnl Macro for checking if va_list is an array
5
6dnl Usage: AC_C_VA_LIST_AS_ARRAY
7dnl call AC_DEFINE for HAVE_VA_LIST_AS_ARRAY if for this architecture
8dnl va_list is defined as an array
9
10AC_DEFUN([AC_C_VA_LIST_AS_ARRAY],
11[
12AC_MSG_CHECKING([whether va_list is defined as an array])
13AC_COMPILE_IFELSE(
14 [AC_LANG_PROGRAM(
15 [[
16#include <stdlib.h>
17#include <stdarg.h>
18
19#define BUILD_ASSERT(cond) \
20 do { (void) sizeof(char [1 - 2*!(cond)]); } while(0)
21 ]],
22 [[
23va_list ap;
24BUILD_ASSERT(__builtin_types_compatible_p(typeof(ap),
25 typeof(&(ap)[0])));
26return 0;
27 ]])],
28 [have_va_list_as_array="no"],
29 [have_va_list_as_array="yes"])
30
31AC_MSG_RESULT([${have_va_list_as_array}])
32
33if test "x${have_va_list_as_array}" = "xyes" ; then
34 AC_DEFINE([HAVE_VA_LIST_AS_ARRAY], [1], [Define to 1 if va_list is an array])
35fi
36
37])
38
39dnl End of ac_valist.m4