Here it is.

On Saturday, March 16, 2019, Liu Hao <lh_mo...@126.com> wrote:
> 在 2019/3/16 17:07, Biswapriyo Nath 写道:
>> I've tested this header file with gcc as you've said.
>>
>>
>>
>
>> +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP |
WINAPI_PARTITION_SERVER)
>
> `WINAPI_PARTITION_SERVER` is not supported by mingw-w64 and should be
> deleted. See <winapifamily.h> for more information.
>
>> +typedef enum _WSL_DISTRIBUTION_FLAGS
>
> This enum tag doesn't seem to exist in the Microsoft header.
>
>
>
>
> --
> Best regards,
> LH_Mouse
>
From 7e830cd146f90839465b5e70a75c1918082f0cd4 Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbap...@gmail.com>
Date: Sat, 16 Mar 2019 19:11:36 +0530
Subject: [PATCH] include/wslapi.h: Add wslapi header file

Signed-off-by: Biswapriyo Nath <nathbap...@gmail.com>
---
 mingw-w64-headers/include/wslapi.h | 42 ++++++++++++++++++++++++++++++
 1 file changed, 42 insertions(+)
 create mode 100644 mingw-w64-headers/include/wslapi.h

diff --git a/mingw-w64-headers/include/wslapi.h b/mingw-w64-headers/include/wslapi.h
new file mode 100644
index 00000000..ac17975f
--- /dev/null
+++ b/mingw-w64-headers/include/wslapi.h
@@ -0,0 +1,42 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+#ifndef _WSLAPI_H_
+#define _WSLAPI_H_
+
+#include <apiset.h>
+#include <apisetcconv.h>
+#include <wtypes.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
+
+BOOL WslIsDistributionRegistered(PCWSTR distributionName);
+HRESULT WslRegisterDistribution(PCWSTR distributionName, PCWSTR tarGzFilename);
+HRESULT WslUnregisterDistribution(PCWSTR distributionName);
+
+typedef enum {
+    WSL_DISTRIBUTION_FLAGS_NONE = 0x0,
+    WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP = 0x1,
+    WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH = 0x2,
+    WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING = 0x4
+} WSL_DISTRIBUTION_FLAGS;
+
+#define WSL_DISTRIBUTION_FLAGS_VALID (WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP | WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH | WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING)
+#define WSL_DISTRIBUTION_FLAGS_DEFAULT (WSL_DISTRIBUTION_FLAGS_ENABLE_INTEROP | WSL_DISTRIBUTION_FLAGS_APPEND_NT_PATH | WSL_DISTRIBUTION_FLAGS_ENABLE_DRIVE_MOUNTING)
+
+HRESULT WslConfigureDistribution(PCWSTR distributionName, ULONG defaultUID, WSL_DISTRIBUTION_FLAGS wslDistributionFlags);
+HRESULT WslGetDistributionConfiguration(PCWSTR distributionName, ULONG* distributionVersion, ULONG* defaultUID, WSL_DISTRIBUTION_FLAGS* wslDistributionFlags, PSTR** defaultEnvironmentVariables, ULONG* defaultEnvironmentVariableCount);
+HRESULT WslLaunchInteractive(PCWSTR distributionName, PCWSTR command, BOOL useCurrentWorkingDirectory, DWORD* exitCode);
+HRESULT WslLaunch(PCWSTR distributionName, PCWSTR command, BOOL useCurrentWorkingDirectory, HANDLE stdIn, HANDLE stdOut, HANDLE stdErr, HANDLE* process);
+
+#endif
+#ifdef __cplusplus
+}
+#endif
+#endif
-- 
2.21.0

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to