From 0393ba6656ce6cf679a2c4663275b3ed0f1a34b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 31 Jul 2014 12:09:49 +0200 Subject: Updated ics-openvpn to rev 859 + no 2nd notification. --- .../main/openvpn/m4/ax_emptyarray.m4 | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 ics-openvpn-stripped/main/openvpn/m4/ax_emptyarray.m4 (limited to 'ics-openvpn-stripped/main/openvpn/m4/ax_emptyarray.m4') diff --git a/ics-openvpn-stripped/main/openvpn/m4/ax_emptyarray.m4 b/ics-openvpn-stripped/main/openvpn/m4/ax_emptyarray.m4 new file mode 100644 index 00000000..c6781c17 --- /dev/null +++ b/ics-openvpn-stripped/main/openvpn/m4/ax_emptyarray.m4 @@ -0,0 +1,40 @@ +dnl @synopsis AX_EMPTY_ARRAY +dnl +dnl Define EMPTY_ARRAY_SIZE to be either "0" +dnl or "" depending on which syntax the compiler +dnl prefers for empty arrays in structs. +dnl +dnl @version +dnl @author James Yonan +AC_DEFUN([AX_EMPTY_ARRAY], [ + AS_VAR_PUSHDEF([VAR],[ax_cv_c_empty_array])dnl + AC_CACHE_CHECK( + [for C compiler empty array size], + [VAR], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + , + [[ +struct { int foo; int bar[0]; } mystruct; + ]] + )], + [VAR=0], + [AC_COMPILE_IFELSE( + [AC_LANG_PROGRAM( + , + [[ +struct { int foo; int bar[]; } mystruct; + ]] + )], + [VAR=], + [AC_MSG_ERROR([C compiler is unable to creaty empty arrays])] + )] + )] + )dnl + AC_DEFINE_UNQUOTED( + [EMPTY_ARRAY_SIZE], + [$VAR], + [Dimension to use for empty array declaration] + )dnl + AS_VAR_POPDEF([VAR])dnl +]) -- cgit v1.2.3