* Code to add WSLProfiles. * Updates recomended by miniksa * Corrections from Mauve * More updates from miniska (clarified WaitForSingleObject errors, and moved the try block to the calling function) * Added THROW_LAST_ERROR for WAIT_FAILED instead of passing an unhandled exception. * Migrate STL dependancies to LibraryIncludes.h * Renamed function to provide more clarity * Set WSL starting directory. * Default Linux icon and brackets on new lines. * Added system path so we don't rely on execution from the PATH environment variable. Removed incorrect error useage. Removed variable that was not required. * Remove default directory setting.
70 lines
1.3 KiB
C++
70 lines
1.3 KiB
C++
// Copyright (c) Microsoft Corporation.
|
|
// Licensed under the MIT license.
|
|
|
|
#pragma once
|
|
|
|
|
|
#pragma warning(push)
|
|
|
|
// C
|
|
#include <climits>
|
|
#include <cwchar>
|
|
#include <cwctype>
|
|
|
|
// STL
|
|
|
|
// Block minwindef.h min/max macros to prevent <algorithm> conflict
|
|
#define NOMINMAX
|
|
|
|
#include <algorithm>
|
|
#include <atomic>
|
|
#include <deque>
|
|
#include <list>
|
|
#include <memory>
|
|
#include <map>
|
|
#include <mutex>
|
|
#include <shared_mutex>
|
|
#include <new>
|
|
#include <optional>
|
|
#include <queue>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
#include <thread>
|
|
#include <tuple>
|
|
#include <utility>
|
|
#include <vector>
|
|
#include <unordered_map>
|
|
#include <iterator>
|
|
#include <math.h>
|
|
#include <sstream>
|
|
#include <fstream>
|
|
#include <iomanip>
|
|
#include <filesystem>
|
|
#include <functional>
|
|
|
|
// WIL
|
|
#include <wil/Common.h>
|
|
#include <wil/Result.h>
|
|
#include <wil/resource.h>
|
|
#include <wil/wistd_memory.h>
|
|
#include <wil/com.h>
|
|
#include <wil/filesystem.h>
|
|
|
|
// GSL
|
|
// Block GSL Multi Span include because it both has C++17 deprecated iterators
|
|
// and uses the C-namespaced "max" which conflicts with Windows definitions.
|
|
#define GSL_MULTI_SPAN_H
|
|
#include <gsl/gsl>
|
|
|
|
// CppCoreCheck
|
|
#include <CppCoreCheck/Warnings.h>
|
|
|
|
// IntSafe
|
|
#define ENABLE_INTSAFE_SIGNED_FUNCTIONS
|
|
#include <intsafe.h>
|
|
|
|
// SAL
|
|
#include <sal.h>
|
|
|
|
#pragma warning(pop)
|