include: Define FIELD_OFFSET to the standard offsetof.

This commit is contained in:
Amine Khaldi 2012-12-10 23:14:02 +01:00 committed by Alexandre Julliard
parent 130cabbca6
commit e3dd01a264
1 changed files with 1 additions and 2 deletions

View File

@ -746,8 +746,7 @@ typedef struct _MEMORY_BASIC_INFORMATION
#define UNICODE_STRING_MAX_CHARS 32767
#define FIELD_OFFSET(type, field) \
((LONG)(INT_PTR)&(((type *)0)->field))
#define FIELD_OFFSET(type, field) ((LONG)offsetof(type, field))
#define CONTAINING_RECORD(address, type, field) \
((type *)((PCHAR)(address) - (PCHAR)(&((type *)0)->field)))