Files
Iain Buclaw 919b6fa6ad d: Merge upstream dmd, druntime 1017635a96, phobos 5a142da0a
D front-end changes:

	- Import dmd v2.112.0-beta.1.

D runtime changes:

	- Import druntime v2.112.0-beta.1.
	- Added 64-bit `mul' and `udivmod' overloads to `core.int128'.

Phobos changes:

	- Added `lazyCache' to `std.algorithm.iteration'.
	- Added `writeText', `writeWText', and `writeDText' to
	  `std.conv'.

gcc/d/ChangeLog:

	* dmd/MERGE: Merge upstream dmd 1017635a96.
	* dmd/VERSION: Bump version to v2.112.0-beta.1.
	* decl.cc (DeclVisitor::finish_vtable): Update for new front-end
	interface.
	(DeclVisitor::visit): Likewise.
	* typeinfo.cc (TypeInfoVisitor::visit): Likewise.

libphobos/ChangeLog:

	* libdruntime/MERGE: Merge upstream druntime 1017635a96.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_LINUX): Add
	core/sys/linux/sys/syscall.d, core/sys/linux/syscall.d.
	* libdruntime/Makefile.in: Regenerate.
	* src/MERGE: Merge upstream phobos 5a142da0a.
	* src/Makefile.am (PHOBOS_DSOURCES): Remove
	std/internal/windows/bcrypt.d.
	* src/Makefile.in: Regenerate.

gcc/testsuite/ChangeLog:

	* gdc.dg/asm1.d: Adjust test.
2026-01-30 11:24:27 +01:00

86 lines
2.5 KiB
D

/**
* Windows API header module
*
* Translated from MinGW Windows headers
*
* Authors: Stewart Gordon
* License: $(LINK2 http://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
* Source: $(DRUNTIMESRC core/sys/windows/_ntdef.d)
*/
module core.sys.windows.ntdef;
version (Windows):
import core.sys.windows.basetsd, core.sys.windows.subauth, core.sys.windows.windef, core.sys.windows.winnt;
enum uint
OBJ_INHERIT = 0x0002,
OBJ_PERMANENT = 0x0010,
OBJ_EXCLUSIVE = 0x0020,
OBJ_CASE_INSENSITIVE = 0x0040,
OBJ_OPENIF = 0x0080,
OBJ_OPENLINK = 0x0100,
OBJ_VALID_ATTRIBUTES = 0x01F2;
void InitializeObjectAttributes(OBJECT_ATTRIBUTES* p, UNICODE_STRING* n,
uint a, HANDLE r, void* s) {
with (*p) {
Length = OBJECT_ATTRIBUTES.sizeof;
RootDirectory = r;
Attributes = a;
ObjectName = n;
SecurityDescriptor = s;
SecurityQualityOfService = null;
}
}
pragma(inline, true) @safe pure nothrow @nogc {
bool NT_SUCCESS()(NTSTATUS Status) { return Status >= 0; }
bool NT_INFORMATION()(NTSTATUS Status) { return ((cast(ULONG) Status) >> 30) == 1; }
bool NT_WARNING()(NTSTATUS Status) { return ((cast(ULONG) Status) >> 30) == 2; }
bool NT_ERROR()(NTSTATUS Status) { return ((cast(ULONG) Status) >> 30) == 3; }
}
/* In MinGW, NTSTATUS, UNICODE_STRING, STRING and their associated pointer
* type aliases are defined in ntdef.h, ntsecapi.h and subauth.h, each of
* which checks that none of the others is already included.
*/
alias int NTSTATUS;
alias int* PNTSTATUS;
struct UNICODE_STRING {
USHORT Length;
USHORT MaximumLength;
PWSTR Buffer;
}
alias UNICODE_STRING* PUNICODE_STRING;
alias const(UNICODE_STRING)* PCUNICODE_STRING;
struct STRING {
USHORT Length;
USHORT MaximumLength;
PCHAR Buffer;
}
alias STRING ANSI_STRING, OEM_STRING;
alias STRING* PSTRING, PANSI_STRING, POEM_STRING;
alias LARGE_INTEGER PHYSICAL_ADDRESS;
alias LARGE_INTEGER* PPHYSICAL_ADDRESS;
enum SECTION_INHERIT {
ViewShare = 1,
ViewUnmap
}
/* In MinGW, this is defined in ntdef.h and ntsecapi.h, each of which checks
* that the other isn't already included.
*/
struct OBJECT_ATTRIBUTES {
ULONG Length = OBJECT_ATTRIBUTES.sizeof;
HANDLE RootDirectory;
PUNICODE_STRING ObjectName;
ULONG Attributes;
PVOID SecurityDescriptor;
PVOID SecurityQualityOfService;
}
alias OBJECT_ATTRIBUTES* POBJECT_ATTRIBUTES;