author | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Nov 2007 20:08:06 +0000 (12:08 -0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Tue, 20 Nov 2007 23:03:56 +0000 (15:03 -0800) | ||
commit | 8e9739914972419baad820e76b44d9720ed885c2 | |
tree | d8d49bb78c146467a202f63a8c681fba7fa1884a | tree | snapshot |
parent | 137a0d0ef568f0a2468c8c7f053ef113e295842f | commit | diff |
git-compat-util.h: auto-adjust to compiler support of FLEX_ARRAY a bit better
When declaring a structure with a flexible array member, instead
of defaulting to the c99 syntax for non-gnu compilers (which
burned people with older compilers), default to the traditional
and more portable "member[1]; /* more */" syntax.
At the same time, other c99 compilers should be able to take
advantage of the modern syntax to flexible array members without
being gcc. Check __STDC_VERSION__ for that.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
When declaring a structure with a flexible array member, instead
of defaulting to the c99 syntax for non-gnu compilers (which
burned people with older compilers), default to the traditional
and more portable "member[1]; /* more */" syntax.
At the same time, other c99 compilers should be able to take
advantage of the modern syntax to flexible array members without
being gcc. Check __STDC_VERSION__ for that.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-compat-util.h | diff | blob | history |