Wireshark-dev: Re: [Wireshark-dev] Current C-Standard used in wireshark
From: Graham Bloice <[email protected]>
Date: Sat, 2 Jan 2016 12:38:31 +0000


On 2 January 2016 at 11:30, Pascal Quantin <[email protected]> wrote:


Le 2 janv. 2016 12:04 PM, "Thomas Wiens" <[email protected]> a écrit :
>
> Hi,
>
> I just updated my local wireshark sources and wanted to build wireshark
> with Win32 / VC10.0, when compiling failed at extcap/randpktdump.c, line
> 297, due to variable declaration inside code which is not C89 compliant.
>
> The README.developer states still not to use C99 features. Is the readme
> not up to date, or is there an error in the file?
>
> I have to mention that I don't have Qt installed.
>
> Thanks,
>
> Thomas Wiens

Hi Thomas,

For now non C++ code must still comply with C89, so this is an error that needs to be fixed. If you want to contribute, a Gerrit patch is welcome :)

Best regards,
Pascal.



IIRC it was felt that with modern versions of MSVC now supporting more elements of C99 along with other platforms, a small subset of C99 would probably be acceptable.  However, that subset wasn't really defined apart from the mention of variadic macros and C++ comments.

Note that the buildbot slaves use, and the production versions of Wireshark 2.0.x are built with, MSVC2013.  Any plugin development that is meant to be installed along with the production version should also use MSVC2013.

Out of interest, what are the reasons for sticking with MSVC2010?

--
Graham Bloice