Nmap Development mailing list archives

Re: [Bulk] Re: [Patch] 'static inline' and MSVC


From: "Gisle Vanem" <gvanem () yahoo no>
Date: Wed, 12 Feb 2014 11:40:15 +0100

"Henri Doreau" <henri.doreau () gmail com> wrote:

MSVC v16 has no 'inline' in C, but '__inline'. Not sure if a more
recent MSVC has a native 'inline'. Looking at how libpcap does this, I don't
think so.  A patch that works for me:
...

My bad, I wasn't expecting this to break anything. How does MSVC deal
w/ the inline functions that are defined in nsock_internal.h[1] for
instance? We don't compile nsock as C++, do we?

No we don't (and we probably can't?). For nsock/src, I just do 'CFLAGS += -Dinline=__inline'. A hack, but it works.

OTOH, the .c-files under ncat *must* be compiled as C++ (option -TP)
when using MSVC v16. See my update to Jacek's reply.

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


Current thread: