configure: Set gnu99 C language standard by default
commitc8947138364d3ac933d866bc0ec0893cf63cf739
authorDaniel Kiper <daniel.kiper@oracle.com>
Wed, 13 May 2020 12:02:48 +0000 (13 14:02 +0200)
committerDaniel Kiper <daniel.kiper@oracle.com>
Mon, 25 May 2020 12:43:16 +0000 (25 14:43 +0200)
tree938f5ba5da8273114696a0a4c9b78b151ebd06e8
parentc867185b8164dfb868be4df7fa47b65d4888c4ac
configure: Set gnu99 C language standard by default

Commit d5a32255d (misc: Make grub_strtol() "end" pointers have safer
const qualifiers) introduced "restrict" keyword into some functions
definitions. This keyword was introduced in C99 standard. However, some
compilers by default may use C89 or something different. This behavior
leads to the breakage during builds when c89 or gnu89 is in force. So,
let's set gnu99 C language standard for all compilers by default. This
way a bit random build issue will be fixed and the GRUB source will be
build consistently regardless of type and version of the compiler.

It was decided to use gnu99 C language standard because it fixes the
issue mentioned above and also provides some useful extensions which are
used here and there in the GRUB source. Potentially we can use gnu11
too. However, this may reduce pool of older compilers which can be used
to build the GRUB. So, let's live with gnu99 until we discover that we
strongly require a feature from newer C standard.

The user is still able to override C language standard using relevant
*_CFLAGS variables.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Leif Lindholm <leif@nuviainc.com>
configure.ac