Nmap Development mailing list archives

Re: Enhanced nsock logging


From: Henri Doreau <henri.doreau () gmail com>
Date: Sat, 15 Dec 2012 09:54:39 +0100

2012/12/15 David Fifield <david () bamsoftware com>:
On Sat, Dec 15, 2012 at 01:53:37AM +0100, Henri Doreau wrote:
My understanding of msdn[1][2] makes me think that the patch attached
should fix that, could you give it a try?

Including <winsock2.h> works.

Ok, good.

You need to use just "..." and not "arg...". With that change, it errors
on a tricky construction in nsock_pcap.c:

nsock_pcap.c(238): error C2121: '#' : invalid character : possibly the result of a macro expansion
nsock_pcap.c(238): error C2059: syntax error : 'if'
nsock_pcap.c(238): error C2121: '#' : invalid character : possibly the result of a macro expansion
nsock_pcap.c(238): error C2121: '#' : invalid character : possibly the result of a macro expansion
nsock_pcap.c(238): error C2121: '#' : invalid character : possibly the result of a macro expansion
nsock_pcap.c(238): error C2121: '#' : invalid character : possibly the result of a macro expansion
nsock_pcap.c(238): error C2121: '#' : invalid character : possibly the result of a macro expansion

You might want to check that GCC is doing the right thing with this
construction as well.

David Fifield
I've assigned variables explicitly, to remove the preprocessor checks.
I've also changed the macros to make them use __VA_ARGS__ on linux
too. That should hopefully do the trick!

Regards

-- 
Henri
_______________________________________________
Sent through the dev mailing list
http://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/


Current thread: