mirror of
https://github.com/reactos/reactos.git
synced 2024-07-30 16:18:43 +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
|
@ -680,6 +680,15 @@ static __inline__ __attribute__((always_inline)) unsigned short _rotl16(const un
|
||||||
return retval;
|
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)
|
static __inline__ __attribute__((always_inline)) unsigned char _rotr8(const unsigned char value, const unsigned char shift)
|
||||||
{
|
{
|
||||||
unsigned char retval;
|
unsigned char retval;
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
/* We're a core NT DLL, we don't import syscalls */
|
/* We're a core NT DLL, we don't import syscalls */
|
||||||
#define WIN32_NO_STATUS
|
#define WIN32_NO_STATUS
|
||||||
#define _INC_SWPRINTF_INL_
|
#define _INC_SWPRINTF_INL_
|
||||||
|
#undef __MSVCRT__
|
||||||
|
|
||||||
/* C Headers */
|
/* C Headers */
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
/* INCLUDES ******************************************************************/
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
/* Version Data */
|
/* Version Data */
|
||||||
|
#undef __MSVCRT__
|
||||||
#include <psdk/ntverp.h>
|
#include <psdk/ntverp.h>
|
||||||
#define _WIN32_WINNT _WIN32_WINNT_WS03
|
#define _WIN32_WINNT _WIN32_WINNT_WS03
|
||||||
#define NTDDI_VERSION NTDDI_WS03SP1
|
#define NTDDI_VERSION NTDDI_WS03SP1
|
||||||
|
|
Loading…
Reference in a new issue