Definitions for setting structures alignment and packing
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
Rafal Kupiec 2023-02-02 15:47:21 +01:00
parent 73fc7607cd
commit 2e2b01742a
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4

View File

@ -30,8 +30,9 @@
#define NULL ((PVOID) 0)
#define NULL64 ((VOID * PVOID) 0)
/* Preprocessor macro for defining a structure alignment */
#define ALIGN(x) __declspec(align(x))
/* Preprocessor macros for defining a structure alignment and packing */
#define ALIGN(x) __attribute__((aligned(x)))
#define PACK __attribute__((packed))
/* Macro for calculating size of an array */
#define ARRAY_SIZE(x) (sizeof(x) / sizeof(*x))