Wireshark mailing list archives

Re: Fwd: [Wireshark-commits] rev 51173: /trunk/epan/ /trunk/epan/: proto.c -> Use __builtin_ctz for GCC/clang


From: Graham Bloice <graham.bloice () trihedral com>
Date: Wed, 7 Aug 2013 09:32:44 +0100

On 6 August 2013 23:42, Jakub Zawadzki <darkjames-ws () darkjames pl> wrote:

On Tue, Aug 06, 2013 at 11:39:11PM +0200, Anders Broman wrote:
Should we use *_BitScanForward*  on Windows?
http://msdn.microsoft.com/en-us/library/wfd9z0bb%28VS.80%29.aspx

Sure, if you know how to do it, why not.


Slight caution required, it's a Microsoft specific compiler intrinsic, but
as I'm not aware of; a) an intent to support compilation of Wireshark on
Windows with anything other than the MSVC toolchain and b) I don't think MS
will be dropping that intrinsic anytime soon, I think it should be safe.
 Obviously it would need to be wrapped with the appropriate #ifdef to hide
it from non- MS compilers.

Despite the info from MSDN the functions are available from VS 2005 through
to VS2013 although it appears that the 64 bit version is only available if
targetting an x64 build.
___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-request () wireshark org?subject=unsubscribe

Current thread: