Hi,

This thread is obviously related to what we discussed three years ago:
https://lists.gnu.org/archive/html/bug-gnulib/2020-05/msg00376.html

At that time, we discussed the function GetFileInformationByHandle,
and it is implemented in mingw's winstorecompat library:
https://github.com/mirror/mingw-w64/blob/master/mingw-w64-libraries/winstorecompat/src/GetFileInformationByHandle.c

Steve Lhomme wrote:
> The API is forbidden [1] and HANDLE_FLAG_INHERIT would never be set as exec()
> is not allowed either [2].
> 
> [1] 
> https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-gethandleinformation

Ah, you mean the marker "[desktop apps only]" in that page?

> +# if defined WINAPI_FAMILY && 
> !WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
> +/* GetHandleInformation is not available in UWP, the flags it would provide
> +   are also not available, so we just return 0.
> +   
> <https://docs.microsoft.com/en-us/windows/win32/api/handleapi/nf-handleapi-gethandleinformation>
> +   <https://learn.microsoft.com/en-us/uwp/win32-and-com/win32-apis> */
> +static inline BOOL GetHandleInformation(HANDLE h, DWORD *pf)
> +{
> +  *pf = 0;
> +  return TRUE;
> +}

I think the proper place for such code is mingw's winstorecompat library,
not Gnulib. Can you try to submit it there?

Bruno




Reply via email to