aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2012-12-29 16:03:28 +0000
committerCarsten Haitzler <raster@rasterman.com>2012-12-29 16:03:28 +0000
commitb730378d180af2e88bd1624b4f3a7c181697d753 (patch)
treedbfd39524c0f046df7d3eaff92ddf55bf1c5f19f
parent1a3f246c5dcd45ab5dcd7425332520fc34627f4d (diff)
downloadefl-b730378d180af2e88bd1624b4f3a7c181697d753.tar.gz
efl-b730378d180af2e88bd1624b4f3a7c181697d753.tar.xz
efl-b730378d180af2e88bd1624b4f3a7c181697d753.zip
RELEASE THE HOUNDS!... edbus missing m4 macro to detect va args list
type and that b0rxed edbus on 64bit. this fixes it. tnx to k-s for pointing at it. SVN revision: 81878
-rw-r--r--configure.ac2
-rw-r--r--m4/ac_valist.m448
2 files changed, 50 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f8bfbe6b5..1985802c8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -409,6 +409,8 @@ AC_LANG(C)
AC_PROG_CC_C99
AM_PROG_CC_C_O
+AC_C_VA_LIST_AS_ARRAY
+
if test "x${ac_cv_prog_cc_c99}" = "xno" ; then
AC_MSG_ERROR([ecore requires a c99-capable compiler])
fi
diff --git a/m4/ac_valist.m4 b/m4/ac_valist.m4
new file mode 100644
index 000000000..a4d6a2493
--- /dev/null
+++ b/m4/ac_valist.m4
@@ -0,0 +1,48 @@
+dnl That code is public domain and can be freely used or copied.
+dnl Originally snatched from somewhere...
+
+dnl Macro for checking if va_list is an array
+
+dnl Usage: AC_C_VA_LIST_AS_ARRAY
+dnl call AC_DEFINE for HAVE_VA_LIST_AS_ARRAY
+dnl if for this architecture va_list is defined as an array
+
+AC_DEFUN([AC_C_VA_LIST_AS_ARRAY],
+[
+
+AC_MSG_CHECKING([whether va_list is defined as an array])
+
+AC_CACHE_VAL([ac_cv_valistasarray],
+ [AC_TRY_RUN(
+ [
+#include <stdlib.h>
+#include <stdarg.h>
+void foo(int i, ...)
+{
+ va_list ap1, ap2;
+ va_start(ap1, i);
+ ap2 = ap1;
+ if (va_arg(ap2, int) != 123 || va_arg(ap1, int) != 123)
+ exit(1);
+ va_end(ap1);
+}
+int main(void)
+{
+ foo(0, 123);
+ return(0);
+}
+ ],
+ [ac_cv_valistasarray="no"],
+ [ac_cv_valistasarray="yes"],
+ [ac_cv_valistasarray="no"]
+ )])
+
+AC_MSG_RESULT($ac_cv_valistasarray)
+
+if test "x${ac_cv_valistasarray}" = "xyes" ; then
+ AC_DEFINE([HAVE_VA_LIST_AS_ARRAY], [1], [Define to 1 if va_list is an array])
+fi
+
+])
+
+dnl End of ac_valist.m4