Nmap Development mailing list archives
[Patch] 'static inline' and MSVC
From: "Gisle Vanem" <gvanem () yahoo no>
Date: Wed, 12 Feb 2014 10:04:35 +0100
The new 'static inline' functions in nbase.h breaks my MSVC v16 build. E.g. static inline int checked_fd_isset ( ... MSVC v16 has no 'inline' in C, but '__inline'. Not sure if a morerecent MSVC has a native 'inline'. Looking at how libpcap does this, I don't think so. A patch that works for me:
--- svn-latest/nbase/nbase.h 2014-02-10 05:12:34 +0000 +++ nbase/nbase.h 2014-02-12 09:05:12 +0000 @@ -368,6 +368,9 @@ #define DEVNULL "/dev/null" #endif +#if defined(_MSC_VER) && !defined(__cplusplus) && !defined(inline) +#define inline __inline +#endif static inline int checked_fd_isset(int fd, const fd_set *fds) { #ifndef WIN32 --gv _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- [Patch] 'static inline' and MSVC Gisle Vanem (Feb 12)
- Re: [Patch] 'static inline' and MSVC Henri Doreau (Feb 12)
- Re: [Bulk] Re: [Patch] 'static inline' and MSVC Gisle Vanem (Feb 12)
- Re: [Bulk] Re: [Patch] 'static inline' and MSVC Henri Doreau (Feb 24)
- Re: [Bulk] Re: [Patch] 'static inline' and MSVC Gisle Vanem (Feb 12)
- Re: [Patch] 'static inline' and MSVC Henri Doreau (Feb 12)