mailing list archives
Re: [nping] WINAPI becoming undefined
From: David Fifield <david () bamsoftware com>
Date: Wed, 6 Apr 2011 18:25:11 -0700
On Tue, Apr 05, 2011 at 10:20:03PM +0200, Gisle Vanem wrote:
I'm struggling with building nping using MingW. All programs in the
nmap package builds fine except for nping. Somewhere in the headers the
'WINAPI' definition becomes undefined! So nping's use of ShellExecute()
becomes unlinkable (the __attribute__((__stdcall__)) gets lost). I need
help finding out where.
My theory is that there could be a local header in nmap that shadows for
one of the system headers. Is there a tool to detect that? But I'm not
sure since the dependencies (generated using gcc -MM $(CFLAGS)) for
winfix.cc seems correct.
Running "gcc -E -v $(CFLAGS) winfix.cc" gives me this. First the search list output:
#include "..." search starts here:
#include <...> search starts here:
End of search list.
Seems okay to me; it reflects my CFLAGS (except the "g:\mingw32\bin\.."
part off-course). But the preprocessed output contains this:
# 290 "g:/MingW32/include/shellapi.h" 2 3
I.e. the WINAPI decoration gets dropped!
This is getting outside of my offhand Windows header knowledge. Could
you perhaps trace the problem backwards with
#error WINAPI undefined
Sent through the nmap-dev mailing list
Archived at http://seclists.org/nmap-dev/