[mapserver-dev] Mixed code and variable definition breaks MSVC builds

Tamas Szekeres szekerest at gmail.com
Sat Jul 21 14:41:20 PDT 2012

Dear Committers,

I usually find issues in the mapserver codebase due to the mixed code and
variable definitions committed into the code according to the C++/C99 style
coding convention. This makes the code uncompilable with MSVC which is
still pretty much C89 with a few minor extensions, and it doesn't support
this practice by default. We could definitely rename the corresponding c
files to cpp or force the c++ compilation or we can use a commandine option
to provide the same effect if we would like to follow this convention.

In the past I continouosly fixed this issue by modifying the corresponding
code to use C89 forward definitions, but I'm not sure I'd like to take the
responsibility do such things in a daily practice. At the moment we also
have such issues in mapserver/master breaking the Windows builds for
several days.

What would be the reasonable solution to prevent this issue happening so
frequently? We should probably make a decision whether we should compile
MapServer with MSVC for C++  or declare we might want to use forward
definitions everywhere in the code (Probably MS RFC 7.1 should be modified
with this).

BTW: gcc users may sometimes take a look at the daily builds at
http://www.gisinternals.com/sdk/ to make sure thinks are working correctly
with MSVC or not.

Best regards,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20120721/12128728/attachment.html>

More information about the mapserver-dev mailing list