Rewrite dynamic structure initializations to runtime assignment
authorGary V. Vaughan <git@mlists.thewrittenword.com>
Fri, 14 May 2010 09:31:33 +0000 (09:31 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 31 May 2010 23:59:26 +0000 (16:59 -0700)
commit66dbfd55e38128db02eb340fcd89f54b734d4c6e
tree115937b86083814adcc97bc55424720e96da5f72
parentebef82776512f56eec4b6ac98b076369eb5a93fa
Rewrite dynamic structure initializations to runtime assignment

Unfortunately, there are still plenty of production systems with
vendor compilers that choke unless all compound declarations can be
determined statically at compile time, for example hpux10.20 (I can
provide a comprehensive list of our supported platforms that exhibit
this problem if necessary).

This patch simply breaks apart any compound declarations with dynamic
initialisation expressions, and moves the initialisation until after
the last declaration in the same block, in all the places necessary to
have the offending compilers accept the code.

Signed-off-by: Gary V. Vaughan <gary@thewrittenword.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
14 files changed:
builtin/add.c
builtin/blame.c
builtin/cat-file.c
builtin/checkout.c
builtin/commit.c
builtin/fetch.c
builtin/remote.c
convert.c
daemon.c
ll-merge.c
refs.c
remote.c
unpack-trees.c
wt-status.c