mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 14:52:08 +00:00
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
1 changed files with 7 additions and 2 deletions
|
@ -228,9 +228,14 @@ AC_TRY_COMPILE(
|
|||
AC_MSG_CHECKING(for zero length array syntax)
|
||||
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,) 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 ==================================================================
|
||||
|
|
Loading…
Reference in a new issue