You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Fabien <fa...@apache.org> on 2012/12/08 17:47:10 UTC
apache style
Hello devs,
I'm having a look at : http://httpd.apache.org/dev/styleguide.html which
seems to date back 15 years. However when I compile Apache trunk on my
laptop, the configuration selects "gcc -std=gnu99".
Thus I'm wondering whether I could use C99 bold "// comments" or
declarations that can appear where their really needed, or whether I'm
implicitely expected to use conservative C89 anyway.
If the later is the right option, should not it be enforced explicitly
through configure?
--
Fabien
Re: apache style
Posted by Stefan Fritsch <sf...@sfritsch.de>.
On Saturday 08 December 2012, Fabien wrote:
> I'm having a look at : http://httpd.apache.org/dev/styleguide.html
> which seems to date back 15 years. However when I compile Apache
> trunk on my laptop, the configuration selects "gcc -std=gnu99".
>
> Thus I'm wondering whether I could use C99 bold "// comments" or
> declarations that can appear where their really needed, or whether
> I'm implicitely expected to use conservative C89 anyway.
No. Everything that should work under Windows and Netware needs to
work with C89.
> If the later is the right option, should not it be enforced
> explicitly through configure?
The logging macros use some C99 specific constructs if available, but
fall back to C89 compatibility (which is slightly less efficient in
that case). Therefore, -std=c89 is not really an option. We use some
"-Werror=..." options when compiling with --enable-maintainer-mode,
though.