Author: fireball
Date: Tue Apr 1 12:49:03 2008
New Revision: 32808
URL:
http://svn.reactos.org/svn/reactos?rev=32808&view=rev
Log:
- Implement inline version of _rotl. The Win32 version of the CRT has this function in the
standard library, but the NT one doesn't, so we need to rely on the inline version
(which MSVC supports).
Modified:
trunk/reactos/include/psdk/intrin_x86.h
trunk/reactos/lib/rtl/rtl.h
trunk/reactos/ntoskrnl/include/ntoskrnl.h
Modified: trunk/reactos/include/psdk/intrin_x86.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/intrin_x86.h?…
==============================================================================
--- trunk/reactos/include/psdk/intrin_x86.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/intrin_x86.h [iso-8859-1] Tue Apr 1 12:49:03 2008
@@ -680,6 +680,15 @@
return retval;
}
+#ifndef __MSVCRT__
+static __inline__ __attribute__((always_inline)) unsigned short _rotl(const unsigned long
value, const unsigned char shift)
+{
+ unsigned short retval;
+ __asm__("roll %b[shift], %w[retval]" : [retval] "=rm" (retval) :
"[retval]" (value), [shift] "Nc" (shift));
+ return retval;
+}
+#endif
+
static __inline__ __attribute__((always_inline)) unsigned char _rotr8(const unsigned char
value, const unsigned char shift)
{
unsigned char retval;
Modified: trunk/reactos/lib/rtl/rtl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rtl.h?rev=32808&am…
==============================================================================
--- trunk/reactos/lib/rtl/rtl.h [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/rtl.h [iso-8859-1] Tue Apr 1 12:49:03 2008
@@ -14,6 +14,7 @@
/* We're a core NT DLL, we don't import syscalls */
#define WIN32_NO_STATUS
#define _INC_SWPRINTF_INL_
+#undef __MSVCRT__
/* C Headers */
#include <stdlib.h>
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/ntoskrnl.…
==============================================================================
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] Tue Apr 1 12:49:03 2008
@@ -9,6 +9,7 @@
/* INCLUDES ******************************************************************/
/* Version Data */
+#undef __MSVCRT__
#include <psdk/ntverp.h>
#define _WIN32_WINNT _WIN32_WINNT_WS03
#define NTDDI_VERSION NTDDI_WS03SP1