On Sat, 1 Nov 2025, Pali Rohár wrote:
FILE_DISPOSITION_INFORMATION_EX is used for issuing POSIX unlink() syscall. Definitions taken from public header ntddk.h file. --- mingw-w64-headers/ddk/include/ddk/ntddk.h | 15 +++++++++++++++ mingw-w64-headers/include/winternl.h | 15 +++++++++++++++ 2 files changed, 30 insertions(+)diff --git a/mingw-w64-headers/ddk/include/ddk/ntddk.h b/mingw-w64-headers/ddk/include/ddk/ntddk.h index 6f5259d40001..c67e6457d3c2 100644 --- a/mingw-w64-headers/ddk/include/ddk/ntddk.h +++ b/mingw-w64-headers/ddk/include/ddk/ntddk.h @@ -1161,6 +1161,21 @@ typedef struct _FILE_DISPOSITION_INFORMATION { BOOLEAN DeleteFile; } FILE_DISPOSITION_INFORMATION, *PFILE_DISPOSITION_INFORMATION; +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS1) +#define FILE_DISPOSITION_DO_NOT_DELETE 0x00000000 +#define FILE_DISPOSITION_DELETE 0x00000001 +#define FILE_DISPOSITION_POSIX_SEMANTICS 0x00000002 +#define FILE_DISPOSITION_FORCE_IMAGE_SECTION_CHECK 0x00000004 +#define FILE_DISPOSITION_ON_CLOSE 0x00000008 +#if (_WIN32_WINNT >= _WIN32_WINNT_WIN10_RS5) +#define FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE 0x00000010 +#endif +
I pushed this change, but I left out the changes to winternl.h, as we shouldn't expose things there that aren't exposed in public WinSDK.
Also do note that the ifdefs are kinda bogus here - there's no define _WIN32_WINNT_WIN10_RS5 in our headers, and neither is there in WinSDK either. But despite that, the WinSDK also has similarly bogus ifdefs.
It's not possible to distinguish between different versions of Windows 10/11 with the _WIN32_WINNT define anyway; it is possible with NTDDI_VERSION though.
// Martin _______________________________________________ Mingw-w64-public mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
