Nmap Development mailing list archives

Re: MinGW patch, getaddrinfo


From: 'David Fifield' <david () bamsoftware com>
Date: Fri, 5 Sep 2008 10:33:59 -0600

On Fri, Sep 05, 2008 at 11:02:59AM +0100, Rob Nicholls wrote:
I think the recent alterations to support MinGW has accidentally broken
compilation with Visual C++ 2008. The current SVN complains bitterly with:

6>c:\nmap-svn\nbase\nbase_winunix.h(126) : fatal error C1017: invalid
integer constant expression

It's caused by the line:

#if HAVE_WSPIAPI_H

It probably should have said ifdef rather than if, but in the attached patch
I decided to define it in nbase_winconfig.h with values of 0 or 1 and
correct a typo in that file at the same time.

I used the #if form because that's what the Autotools appears to prefer,
but you're right that it has to be defined to some integer.

I applied your patch. Undefined preprocessor symbols evaluate to 0 in
#if expressions, so I left the other branch using an #undef. Then
#if HAVE_WSPIAPI_H and #ifdef HAVE_WSPIAPI_H will have the same meaning.

David Fifield

_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://SecLists.Org


Current thread: