mirror of https://git.code.sf.net/p/quake/newtree
improve the ZERO_LENGTH_ARRAY test and fall back to using [1] if neither [0]
nor [] work.
This commit is contained in:
parent
5f5456d2c0
commit
5b2561720e
|
@ -228,9 +228,14 @@ AC_TRY_COMPILE(
|
||||||
AC_MSG_CHECKING(for zero length array syntax)
|
AC_MSG_CHECKING(for zero length array syntax)
|
||||||
AC_TRY_COMPILE(
|
AC_TRY_COMPILE(
|
||||||
[],
|
[],
|
||||||
[int foo[0];],
|
[struct { int foo; int bar[0]; } foo;],
|
||||||
AC_DEFINE(ZERO_LENGTH_ARRAY,0) AC_MSG_RESULT([0]),
|
AC_DEFINE(ZERO_LENGTH_ARRAY,0) AC_MSG_RESULT([0]),
|
||||||
AC_DEFINE(ZERO_LENGTH_ARRAY,) AC_MSG_RESULT([])
|
AC_TRY_COMPILE(
|
||||||
|
[],
|
||||||
|
[struct { int foo; int bar[]; } foo;],
|
||||||
|
AC_DEFINE(ZERO_LENGTH_ARRAY,) AC_MSG_RESULT([]),
|
||||||
|
AC_DEFINE(ZERO_LENGTH_ARRAY,1) AC_MSG_RESULT([1] sorry about the waste)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
dnl ==================================================================
|
dnl ==================================================================
|
||||||
|
|
Loading…
Reference in New Issue