Author: tkreuzer
Date: Mon Jun 20 13:15:58 2011
New Revision: 52382
URL:
http://svn.reactos.org/svn/reactos?rev=52382&view=rev
Log:
[WINE]
add inline version of ffs
Modified:
trunk/reactos/include/reactos/wine/port.h
Modified: trunk/reactos/include/reactos/wine/port.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/port.…
==============================================================================
--- trunk/reactos/include/reactos/wine/port.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/wine/port.h [iso-8859-1] Mon Jun 20 13:15:58 2011
@@ -315,6 +315,17 @@
#endif /* __i386___ && __GNUC__ */
+#if defined(_MSC_VER)
+__forceinline
+int
+ffs(int mask)
+{
+ long index;
+ if (_BitScanForward(&index, mask) == 0) return 0;
+ return index;
+}
+#endif
+
#else /* NO_LIBWINE_PORT */
#define __WINE_NOT_PORTABLE(func) func##_is_not_portable func##_is_not_portable