Wireshark mailing list archives

Re: Building Wireshark with VS 2012 {Was: [Wireshark-commits] rev 44982: /trunk/ /trunk/: config.nmake]


From: Bill Meier <wmeier () newsguy com>
Date: Tue, 18 Sep 2012 19:51:29 -0400

On 9/18/2012 4:18 PM, Maynard, Chris wrote:
 From http://ask.wireshark.org/questions/14343/setting-development-project-under-visual-studio-2012, you indicated the 
error was:

"ws2tcpip.h(531) : error C2373: 'ws_inet_pton' : redefinition; different type modifiers".

Could this be because of the const modifier?  What happens if you remove "const"?

Compare http://linux.die.net/man/3/inet_pton to 
http://msdn.microsoft.com/en-us/library/windows/desktop/cc805844%28v=vs.85%29.aspx


The const modifiers don't seem to be the issue.

Something funny going on.

I'm building epan\addr_resolv.c

Comparing .c files generated after pre-processing for VS2010 and VS2012 (using /E option) I see:

1. the file generated with the VS2010 compiler (using V7.0A SDK)
[...\WS2tcpip.h]
has only the inet_pton() declaration from inet_v6defs.h (extern ...)
(Even though ws2tcpip.h is included).

2. the file generated with VS2012 (using the V8 SDK)
[C:\Program Files\Windows Kits\8.0\include\um\ws2tcpip.h]
has the inet_pton() declaration from *both* inet_v6defs.h *and* ws2tcpip.h.

// from inet_v6defs.h
extern int ws_inet_pton(int af, const char *src, void *dst);

// from ws2tcpip.h
__declspec(dllimport)
INT
 __stdcall
ws_inet_pton(
                                     INT             Family,
                                     PCSTR           pszAddrString,
           PVOID           pAddrBuf
    );


The existance of the 2nd declaration causes the 'different type modifiers' error.


===============

I'm out of time to dig further.

If no one else finds out what's happening (feel free), I should be able to do further difgging in a day or so.


Bill

___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
            mailto:wireshark-dev-request () wireshark org?subject=unsubscribe


Current thread: