Nmap Development mailing list archives
Re: 'class FingerMatch' vs 'struct FingerMatch'
From: Daniel Miller <bonsaiviking () gmail com>
Date: Wed, 8 Jul 2015 09:34:51 -0500
Gisle, On Wed, Jul 8, 2015 at 7:10 AM, Gisle Vanem <gvanem () yahoo no> wrote:
Here are some more VS 2015 (_MSC_VER=1900) warnings: NmapOps.h(135): warning C4099: 'FingerPrintDB': type name first seen using 'struct' now seen using 'class' osscan2.h(137): warning C4099: 'FingerPrint': type name first seen using 'struct' now seen using 'class' osscan.h(184): warning C4099: 'FingerTest': type name first seen using 'class' now seen using 'struct'
Thanks again. I did a more thorough sweep for these and found only the 3 you mentioned. Fixed in r34866.
And BTW, it's nice to see that the clutter with .h-files has been fixed in several places lately. But there are still some places where e.g. <errno.h> gets included *after* Nmap headers. Thus undoing a previous '#define EINVAL WSAEINVAL' etc. in nbase_winunix.h. The hacks in 'nbase\nbase_winunix.h' to suppress including the real <errno.h>, doesn't work with the latest Windows Kit. (i.e. here: "WindowsKits\10\Include\10.0.10056.0\ucrt\errno.h"). I've not checked, but I belive one *can* use this new Universal CRT with '_MSC_VER < 1800' too.
I'll admit I don't completely understand the intent of this code or the interaction with the various versions of Visual Studio and the Windows SDK. As I understand it, though, we are doing the correct thing under VS 2013 by including errno.h then redefining the particular constants below. That should work no matter what order the headers are called in, though it misses the intended benefit of breaking the build if someone introduces an errno constant that we haven't mapped. If you have the time, we would appreciate a more thorough evaluation of how nbase_winunix.h works with the various VS and SDK versions. Based on what you are saying, I think that maybe we should be doing the check based on SDK version, not compiler version. Thanks, Dan
_______________________________________________ Sent through the dev mailing list https://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- 'class FingerMatch' vs 'struct FingerMatch' Gisle Vanem (Jul 06)
- Re: 'class FingerMatch' vs 'struct FingerMatch' Daniel Miller (Jul 07)
- Re: 'class FingerMatch' vs 'struct FingerMatch' Gisle Vanem (Jul 08)
- Re: 'class FingerMatch' vs 'struct FingerMatch' Daniel Miller (Jul 08)
- Re: 'class FingerMatch' vs 'struct FingerMatch' Gisle Vanem (Jul 08)
- Re: 'class FingerMatch' vs 'struct FingerMatch' Daniel Miller (Jul 07)