ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/Daodan/MSYS2/mingw32/i686-w64-mingw32/include/rtinfo.h
Revision: 1166
Committed: Tue Oct 26 14:22:36 2021 UTC (4 years ago) by rossy
Content type: text/x-chdr
File size: 1282 byte(s)
Log Message:
Daodan: Replace MinGW build env with an up-to-date MSYS2 env

File Contents

# Content
1 /**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6 #ifndef __ROUTING_RTINFO_H__
7 #define __ROUTING_RTINFO_H__
8
9 #define ALIGN_SIZE 0x00000008
10 #define ALIGN_SHIFT (ALIGN_SIZE - 0x00000001)
11 #define ALIGN_MASK_POINTER (~(UINT_PTR)ALIGN_SHIFT)
12 #define ALIGN_MASK_LENGTH (~ALIGN_SHIFT)
13 #define ALIGN_MASK (~ALIGN_SHIFT)
14
15 #define ALIGN_POINTER(ptr) { (ptr) = (PVOID)((DWORD_PTR)(ptr) + ALIGN_SHIFT); (ptr) = (PVOID)((DWORD_PTR)(ptr) & ALIGN_MASK_POINTER); }
16 #define ALIGN_LENGTH(length) { (length) = (DWORD)((length) + ALIGN_SHIFT); (length) = (DWORD)((length) & ALIGN_MASK_LENGTH); }
17 #define IS_ALIGNED(ptr) (((UINT_PTR)(ptr) & ALIGN_SHIFT)==0x00000000)
18
19 typedef struct _RTR_TOC_ENTRY {
20 ULONG InfoType;
21 ULONG InfoSize;
22 ULONG Count;
23 ULONG Offset;
24 } RTR_TOC_ENTRY,*PRTR_TOC_ENTRY;
25
26 #define RTR_INFO_BLOCK_VERSION 1
27
28 typedef struct _RTR_INFO_BLOCK_HEADER {
29 ULONG Version;
30 ULONG Size;
31 ULONG TocEntriesCount;
32 RTR_TOC_ENTRY TocEntry[1];
33 } RTR_INFO_BLOCK_HEADER,*PRTR_INFO_BLOCK_HEADER;
34
35 #define GetInfoFromTocEntry(hdr,toc) (((toc)->Offset < (hdr)->Size) ? ((PVOID)(((PBYTE)(hdr)) + (toc)->Offset)) : NULL)
36 #endif