Mercurial > dovecot > original-hg > dovecot-1.2
changeset 7997:0d66b44689ee HEAD
Fixed compiling on some older pre-C99 compilers.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 12 Jul 2008 16:24:47 +0300 |
parents | fa90c913eae4 |
children | c69ccedfaf4a |
files | configure.in src/lib-imap/imap-match.c src/lib/str-find.c |
diffstat | 3 files changed, 21 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/configure.in Sat Jul 12 16:16:19 2008 +0300 +++ b/configure.in Sat Jul 12 16:24:47 2008 +0300 @@ -1020,6 +1020,25 @@ AC_DEFINE(TIME_T_SIGNED,, Define if your time_t is signed) fi +dnl Our implementation of AC_C_FLEXIBLE_ARRAY_MEMBER. +dnl Use it until autoconf 2.61+ becomes more widely used +AC_MSG_CHECKING([if we can use C99-like flexible array members]) +AC_TRY_COMPILE([ + struct foo { + int x; + char y[]; + }; +], [ + struct foo foo; +], [ + flexible_value="" + AC_MSG_RESULT(yes) +], [ + flexible_value=1 + AC_MSG_RESULT(no) +]) +AC_DEFINE_UNQUOTED(FLEXIBLE_ARRAY_MEMBER, $flexible_value, How to define flexible array members in structs) + dnl * do we have struct iovec AC_MSG_CHECKING([for struct iovec]) AC_CACHE_VAL(i_cv_struct_iovec,