mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:35:59 +00:00
[PSDK]
- Add missing alignment defines to winnt.h (copied from ntdef.h) - Update bcrypt.h to Wine 1.5.4 svn path=/trunk/; revision=56775
This commit is contained in:
parent
6c59846bd7
commit
8d85413312
2 changed files with 37 additions and 3 deletions
|
@ -35,6 +35,11 @@
|
||||||
#define OPTIONAL
|
#define OPTIONAL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef WINE_NTSTATUS_DECLARED
|
||||||
|
#define WINE_NTSTATUS_DECLARED
|
||||||
|
typedef LONG NTSTATUS;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef struct _BCRYPT_ALGORITHM_IDENTIFIER
|
typedef struct _BCRYPT_ALGORITHM_IDENTIFIER
|
||||||
{
|
{
|
||||||
LPWSTR pszName;
|
LPWSTR pszName;
|
||||||
|
|
|
@ -109,12 +109,41 @@ extern "C" {
|
||||||
#ifndef RC_INVOKED
|
#ifndef RC_INVOKED
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* FIXME: add more architectures. Is there a way to specify this in GCC? */
|
#if defined(_M_MRX000) || defined(_M_ALPHA) || defined(_M_PPC) || defined(_M_IA64) || defined(_M_AMD64)
|
||||||
#if defined(_M_AMD64)
|
#define ALIGNMENT_MACHINE
|
||||||
#undef UNALIGNED
|
|
||||||
#define UNALIGNED __unaligned
|
#define UNALIGNED __unaligned
|
||||||
|
#if defined(_WIN64)
|
||||||
|
#define UNALIGNED64 __unaligned
|
||||||
#else
|
#else
|
||||||
|
#define UNALIGNED64
|
||||||
|
#endif
|
||||||
|
#else
|
||||||
|
#undef ALIGNMENT_MACHINE
|
||||||
#define UNALIGNED
|
#define UNALIGNED
|
||||||
|
#define UNALIGNED64
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_WIN64) || defined(_M_ALPHA)
|
||||||
|
#define MAX_NATURAL_ALIGNMENT sizeof(ULONGLONG)
|
||||||
|
#define MEMORY_ALLOCATION_ALIGNMENT 16
|
||||||
|
#else
|
||||||
|
#define MAX_NATURAL_ALIGNMENT sizeof(ULONG)
|
||||||
|
#define MEMORY_ALLOCATION_ALIGNMENT 8
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Returns the type's alignment */
|
||||||
|
#if defined(_MSC_VER) && (_MSC_VER >= 1300)
|
||||||
|
#define TYPE_ALIGNMENT(t) __alignof(t)
|
||||||
|
#else
|
||||||
|
#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined(_AMD64_) || defined(_X86_)
|
||||||
|
#define PROBE_ALIGNMENT(_s) TYPE_ALIGNMENT(ULONG)
|
||||||
|
#elif defined(_IA64_) || defined(_ARM_)
|
||||||
|
#define PROBE_ALIGNMENT(_s) max((TYPE_ALIGNMENT(_s), TYPE_ALIGNMENT(ULONG))
|
||||||
|
#else
|
||||||
|
#error "unknown architecture"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef DECLSPEC_NOVTABLE
|
#ifndef DECLSPEC_NOVTABLE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue