diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2020-05-20 10:10:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-05-20 10:10:26 -0700 |
| commit | 9d9a50bc9823ca1673019aa18f23d28c7a1d2ff9 (patch) | |
| tree | 54c5f724a2cc2414dfb1978edeb4dd201b50ba51 /toolsrc/src/vcpkg-test | |
| parent | 9b4535e7ee7673fb8515d1f4f256990423a0d952 (diff) | |
| download | vcpkg-9d9a50bc9823ca1673019aa18f23d28c7a1d2ff9.tar.gz vcpkg-9d9a50bc9823ca1673019aa18f23d28c7a1d2ff9.zip | |
[vcpkg] fix extern C around ctermid (#11343)
Additionally, move the system_header invocations to their own header file,
<vcpkg/base/system_header.h>
Diffstat (limited to 'toolsrc/src/vcpkg-test')
| -rw-r--r-- | toolsrc/src/vcpkg-test/system.cpp | 10 | ||||
| -rw-r--r-- | toolsrc/src/vcpkg-test/util.cpp | 12 |
2 files changed, 7 insertions, 15 deletions
diff --git a/toolsrc/src/vcpkg-test/system.cpp b/toolsrc/src/vcpkg-test/system.cpp index 6b9dfaf95..6e87f9b3e 100644 --- a/toolsrc/src/vcpkg-test/system.cpp +++ b/toolsrc/src/vcpkg-test/system.cpp @@ -1,4 +1,4 @@ -#define _POSIX_C_SOURCE 200112L +#include <vcpkg/base/system_headers.h> #include <catch2/catch.hpp> #include <string> @@ -8,14 +8,6 @@ #include <vcpkg/base/strings.h> #include <vcpkg/base/system.h> -#if defined(_WIN32) -#define _NOMINMAX -#define WIN32_LEAN_AND_MEAN -#include <windows.h> -#else -#include <stdlib.h> -#endif - using vcpkg::Optional; using vcpkg::StringView; using vcpkg::ZStringView; diff --git a/toolsrc/src/vcpkg-test/util.cpp b/toolsrc/src/vcpkg-test/util.cpp index 8ead355f1..ce38e62e4 100644 --- a/toolsrc/src/vcpkg-test/util.cpp +++ b/toolsrc/src/vcpkg-test/util.cpp @@ -1,3 +1,5 @@ +#include <vcpkg/base/system_headers.h> + #include <catch2/catch.hpp> #include <vcpkg-test/util.h> @@ -20,15 +22,13 @@ #define FILESYSTEM_SYMLINK_UNIX 1 #define FILESYSTEM_SYMLINK_NONE 2 -#if defined(__cpp_lib_filesystem) +#if VCPKG_USE_STD_FILESYSTEM #define FILESYSTEM_SYMLINK FILESYSTEM_SYMLINK_STD -#include <filesystem> // required for filesystem::create_{directory_}symlink #elif !defined(_MSC_VER) #define FILESYSTEM_SYMLINK FILESYSTEM_SYMLINK_UNIX -#include <unistd.h> #else @@ -169,10 +169,10 @@ namespace vcpkg::Test #if FILESYSTEM_SYMLINK == FILESYSTEM_SYMLINK_STD if (can_create_symlinks()) { - std::filesystem::path targetp = target.native(); - std::filesystem::path filep = file.native(); + fs::path targetp = target.native(); + fs::path filep = file.native(); - std::filesystem::create_symlink(targetp, filep, ec); + fs::stdfs::create_symlink(targetp, filep, ec); } else { |
