I've tested this header file with gcc as you've said.
From 9771232de0197253d9061d4d3de9bad029c444ec Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbap...@gmail.com>
Date: Sat, 16 Mar 2019 14:34:18 +0530
Subject: [PATCH] include/wslapi.h: Add wslapi header file

Signed-off-by: Biswapriyo Nath <nathbap...@gmail.com>
---
 mingw-w64-headers/include/wslapi.h | 43 ++++++++++++++++++++++++++++++
 1 file changed, 43 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..a5eb13ac
--- /dev/null
+++ b/mingw-w64-headers/include/wslapi.h
@@ -0,0 +1,43 @@
+/**
+ * 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 | WINAPI_PARTITION_SERVER)
+
+BOOL WslIsDistributionRegistered(PCWSTR distributionName);
+HRESULT WslRegisterDistribution(PCWSTR distributionName, PCWSTR tarGzFilename);
+HRESULT WslUnregisterDistribution(PCWSTR distributionName);
+
+typedef enum _WSL_DISTRIBUTION_FLAGS
+{
+    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