mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 16:36:33 +00:00
- 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).
svn path=/trunk/; revision=32808
This commit is contained in:
parent
2c1cfd7207
commit
d9e96afb6d
3 changed files with 11 additions and 0 deletions
|
@ -680,6 +680,15 @@ static __inline__ __attribute__((always_inline)) unsigned short _rotl16(const un
|
|||
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;
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
/* INCLUDES ******************************************************************/
|
||||
|
||||
/* Version Data */
|
||||
#undef __MSVCRT__
|
||||
#include <psdk/ntverp.h>
|
||||
#define _WIN32_WINNT _WIN32_WINNT_WS03
|
||||
#define NTDDI_VERSION NTDDI_WS03SP1
|
||||
|
|
Loading…
Reference in a new issue