mirror of
https://github.com/dart-lang/sdk
synced 2024-07-20 18:05:01 +00:00
[vm] Reland: Prefix HOST_OS_* and TARGET_OS_* with DART_
This relands https://dart-review.googlesource.com/c/sdk/+/205633 but without renaming TARGET_OS_IPHONE to DART_TARGET_OS_IPHONE. It also changes uses of TARGET_OS_IOS to DART_TARGET_OS_MACOS_IOS to be consistent with the rest of the VM. TargetConditionals.h for XCode 13 defines several TARGET_OS_* preprocessor symbols that confuse the Dart build. There is probably a more targeted fix for this, but renaming the symbols that Dart uses will also prevent this problem if more symbols are added to the platform headers in the future. See: https://github.com/dart-lang/sdk/issues/46499 TEST=It builds. Change-Id: Ie775c19dd23cfdf5f65e5ebc6ee4ec3a561676fa Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/205860 Commit-Queue: Zach Anderson <zra@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>
This commit is contained in:
parent
930895e8a2
commit
f407419d0a
2
DEPS
2
DEPS
|
@ -144,7 +144,7 @@ vars = {
|
|||
"pub_rev": "3c14d86a67db7207bbc9f654ac49ee60e08e5240",
|
||||
"pub_semver_rev": "f50d80ef10c4b2fa5f4c8878036a4d9342c0cc82",
|
||||
"resource_rev": "6b79867d0becf5395e5819a75720963b8298e9a7",
|
||||
"root_certificates_rev": "ef7b563890e219a93579b61584f9ffa64c7c8d9c",
|
||||
"root_certificates_rev": "692f6d6488af68e0121317a9c2c9eb393eb0ee50",
|
||||
"rust_revision": "b7856f695d65a8ebc846754f97d15814bcb1c244",
|
||||
"shelf_static_rev": "fa30419055279a00c9e428439b1abe362d18f25d",
|
||||
"shelf_packages_handler_rev": "78302e67c035047e6348e692b0c1182131f0fe35",
|
||||
|
|
|
@ -71,22 +71,22 @@ config("dart_os_config") {
|
|||
defines = []
|
||||
|
||||
if (target_os == "android") {
|
||||
defines += [ "TARGET_OS_ANDROID" ]
|
||||
defines += [ "DART_TARGET_OS_ANDROID" ]
|
||||
} else if (target_os == "fuchsia") {
|
||||
defines += [ "TARGET_OS_FUCHSIA" ]
|
||||
defines += [ "DART_TARGET_OS_FUCHSIA" ]
|
||||
} else if (target_os == "ios") {
|
||||
defines += [ "TARGET_OS_MACOS" ]
|
||||
defines += [ "TARGET_OS_MACOS_IOS" ]
|
||||
defines += [ "DART_TARGET_OS_MACOS" ]
|
||||
defines += [ "DART_TARGET_OS_MACOS_IOS" ]
|
||||
} else if (target_os == "linux") {
|
||||
defines += [ "TARGET_OS_LINUX" ]
|
||||
defines += [ "DART_TARGET_OS_LINUX" ]
|
||||
} else if (target_os == "mac") {
|
||||
defines += [ "TARGET_OS_MACOS" ]
|
||||
defines += [ "DART_TARGET_OS_MACOS" ]
|
||||
} else if (target_os == "win") {
|
||||
defines += [ "TARGET_OS_WINDOWS" ]
|
||||
defines += [ "DART_TARGET_OS_WINDOWS" ]
|
||||
} else if (target_os == "winuwp") {
|
||||
defines += [
|
||||
"TARGET_OS_WINDOWS",
|
||||
"TARGET_OS_WINDOWS_UWP",
|
||||
"DART_TARGET_OS_WINDOWS",
|
||||
"DART_TARGET_OS_WINDOWS_UWP",
|
||||
]
|
||||
} else {
|
||||
print("Unknown target_os: $target_os")
|
||||
|
@ -98,7 +98,7 @@ config("dart_os_config") {
|
|||
# targeting Mac and Linux. This configuration is used to unconditionally target
|
||||
# Fuchsia. It should not be combined with dart_os_config.
|
||||
config("dart_os_fuchsia_config") {
|
||||
defines = [ "TARGET_OS_FUCHSIA" ]
|
||||
defines = [ "DART_TARGET_OS_FUCHSIA" ]
|
||||
}
|
||||
|
||||
config("dart_arch_config") {
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
// closes the connection and UNIX socket.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -101,4 +101,4 @@ int main() {
|
|||
return -1;
|
||||
}
|
||||
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include "platform/globals.h"
|
||||
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOSX)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOSX)
|
||||
#if defined(__has_feature)
|
||||
#if __has_feature(address_sanitizer)
|
||||
|
||||
|
@ -23,4 +23,4 @@ __asan_default_options() {
|
|||
|
||||
#endif // __has_feature(address_sanitizer)
|
||||
#endif // defined(__has_feature)
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_MACOSX)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOSX)
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || \
|
||||
defined(HOST_OS_ANDROID) || defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOS) || \
|
||||
defined(DART_HOST_OS_ANDROID) || defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/console.h"
|
||||
|
||||
|
@ -88,5 +88,5 @@ void Console::RestoreConfig() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) ||
|
||||
// defined(HOST_OS_ANDROID) || defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOS) || \
|
||||
// defined(DART_HOST_OS_ANDROID) || defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
#include "bin/console.h"
|
||||
|
||||
#include "bin/file.h"
|
||||
|
@ -152,4 +152,4 @@ void Console::RestoreConfig() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -21,7 +21,7 @@ namespace dart {
|
|||
namespace bin {
|
||||
|
||||
#if defined(DART_USE_CRASHPAD)
|
||||
#if !defined(HOST_OS_WINDOWS)
|
||||
#if !defined(DART_HOST_OS_WINDOWS)
|
||||
#error "Currently we only support Crashpad on Windows"
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
|
@ -41,4 +41,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/crypto.h"
|
||||
|
||||
|
@ -20,4 +20,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
|
@ -41,4 +41,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include <errno.h> // NOLINT
|
||||
#include <fcntl.h> // NOLINT
|
||||
|
@ -39,4 +39,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include <bcrypt.h>
|
||||
#include "bin/crypto.h"
|
||||
|
@ -28,4 +28,4 @@ bool Crypto::GetRandomBytes(intptr_t count, uint8_t* buffer) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -59,11 +59,11 @@ MagicNumberData kernel_list_magic_number = {
|
|||
MagicNumberData gzip_magic_number = {2, {0x1f, 0x8b, 0, 0}};
|
||||
|
||||
static bool IsWindowsHost() {
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
return true;
|
||||
#else // defined(HOST_OS_WINDOWS)
|
||||
#else // defined(DART_HOST_OS_WINDOWS)
|
||||
return false;
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
}
|
||||
|
||||
Dart_Handle CommandLineOptions::CreateRuntimeOptions() {
|
||||
|
|
|
@ -140,7 +140,7 @@ bool DFE::CanUseDartFrontend() const {
|
|||
}
|
||||
|
||||
PathSanitizer::PathSanitizer(const char* path) {
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
// For Windows we need to massage the paths a bit according to
|
||||
// http://blogs.msdn.com/b/ie/archive/2006/12/06/file-uris-in-windows.aspx
|
||||
//
|
||||
|
@ -169,15 +169,15 @@ PathSanitizer::PathSanitizer(const char* path) {
|
|||
sanitized_uri_ = std::unique_ptr<char[]>(uri);
|
||||
#else
|
||||
sanitized_uri_ = path;
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
}
|
||||
|
||||
const char* PathSanitizer::sanitized_uri() const {
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
return sanitized_uri_.get();
|
||||
#else
|
||||
return sanitized_uri_;
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
}
|
||||
|
||||
Dart_KernelCompilationResult DFE::CompileScript(const char* script_uri,
|
||||
|
|
|
@ -138,11 +138,11 @@ class PathSanitizer {
|
|||
const char* sanitized_uri() const;
|
||||
|
||||
private:
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
std::unique_ptr<char[]> sanitized_uri_;
|
||||
#else
|
||||
const char* sanitized_uri_;
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(PathSanitizer);
|
||||
};
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
|
@ -508,4 +508,4 @@ bool Directory::Rename(Namespace* namespc,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
|
@ -512,4 +512,4 @@ bool Directory::Rename(Namespace* namespc,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
|
@ -506,4 +506,4 @@ bool Directory::Rename(Namespace* namespc,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
|
@ -446,4 +446,4 @@ bool Directory::Rename(Namespace* namespc,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/directory.h"
|
||||
|
||||
|
@ -531,4 +531,4 @@ bool Directory::Rename(Namespace* namespc,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
#include <vm/cpu.h>
|
||||
#include <vm/virtual_memory.h>
|
||||
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
|
||||
|
@ -25,7 +25,7 @@ namespace elf {
|
|||
class Mappable {
|
||||
public:
|
||||
static Mappable* FromPath(const char* path);
|
||||
#if defined(HOST_OS_FUCHSIA) || defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_FUCHSIA) || defined(DART_HOST_OS_LINUX)
|
||||
static Mappable* FromFD(int fd);
|
||||
#endif
|
||||
static Mappable* FromMemory(const uint8_t* memory, size_t size);
|
||||
|
@ -151,7 +151,7 @@ Mappable* Mappable::FromPath(const char* path) {
|
|||
return new FileMappable(File::Open(/*namespc=*/nullptr, path, File::kRead));
|
||||
}
|
||||
|
||||
#if defined(HOST_OS_FUCHSIA) || defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_FUCHSIA) || defined(DART_HOST_OS_LINUX)
|
||||
Mappable* Mappable::FromFD(int fd) {
|
||||
return new FileMappable(File::OpenFD(fd));
|
||||
}
|
||||
|
@ -424,7 +424,7 @@ bool LoadedElf::LoadSegments() {
|
|||
ERROR("Unsupported segment flag set.");
|
||||
}
|
||||
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
// mmap is less flexible on Fuchsia than on Linux and Darwin, in (at least)
|
||||
// two important ways:
|
||||
//
|
||||
|
@ -546,7 +546,7 @@ MappedMemory* LoadedElf::MapFilePiece(uword file_start,
|
|||
|
||||
using namespace dart::bin::elf; // NOLINT
|
||||
|
||||
#if defined(HOST_OS_FUCHSIA) || defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_FUCHSIA) || defined(DART_HOST_OS_LINUX)
|
||||
DART_EXPORT Dart_LoadedElf* Dart_LoadELF_Fd(int fd,
|
||||
uint64_t file_offset,
|
||||
const char** error,
|
||||
|
@ -569,7 +569,7 @@ DART_EXPORT Dart_LoadedElf* Dart_LoadELF_Fd(int fd,
|
|||
}
|
||||
#endif
|
||||
|
||||
#if !defined(HOST_OS_FUCHSIA)
|
||||
#if !defined(DART_HOST_OS_FUCHSIA)
|
||||
DART_EXPORT Dart_LoadedElf* Dart_LoadELF(const char* filename,
|
||||
uint64_t file_offset,
|
||||
const char** error,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h> // NOLINT
|
||||
|
@ -12,4 +12,4 @@ BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
|
|||
return true;
|
||||
}
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -582,15 +582,15 @@ class DescriptorInfoMultipleMixin : public DI {
|
|||
} // namespace dart
|
||||
|
||||
// The event handler delegation class is OS specific.
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
#include "bin/eventhandler_android.h"
|
||||
#elif defined(HOST_OS_FUCHSIA)
|
||||
#elif defined(DART_HOST_OS_FUCHSIA)
|
||||
#include "bin/eventhandler_fuchsia.h"
|
||||
#elif defined(HOST_OS_LINUX)
|
||||
#elif defined(DART_HOST_OS_LINUX)
|
||||
#include "bin/eventhandler_linux.h"
|
||||
#elif defined(HOST_OS_MACOS)
|
||||
#elif defined(DART_HOST_OS_MACOS)
|
||||
#include "bin/eventhandler_macos.h"
|
||||
#elif defined(HOST_OS_WINDOWS)
|
||||
#elif defined(DART_HOST_OS_WINDOWS)
|
||||
#include "bin/eventhandler_win.h"
|
||||
#else
|
||||
#error Unknown target os.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
#include "bin/eventhandler_android.h"
|
||||
|
@ -432,4 +432,4 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
#include "bin/eventhandler_fuchsia.h"
|
||||
|
@ -659,4 +659,4 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
#include "bin/eventhandler_linux.h"
|
||||
|
@ -436,4 +436,4 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
#include "bin/eventhandler_macos.h"
|
||||
|
@ -496,4 +496,4 @@ uint32_t EventHandlerImplementation::GetHashmapHashFromFd(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/eventhandler.h"
|
||||
#include "bin/eventhandler_win.h"
|
||||
|
@ -1499,4 +1499,4 @@ void EventHandlerImplementation::Shutdown() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -16,11 +16,11 @@ static bool StartsWithPathSeparator(const char* path,
|
|||
const char* sep,
|
||||
intptr_t sep_length) {
|
||||
return (strncmp(path, sep, sep_length) == 0
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
// TODO(aam): GetExecutableName doesn't work reliably on Windows,
|
||||
|| *path == '/'
|
||||
#endif
|
||||
);
|
||||
); // NOLINT
|
||||
}
|
||||
|
||||
// Returns the directory portion of a given path.
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include <dlfcn.h> // NOLINT
|
||||
#include "bin/extensions.h"
|
||||
|
@ -39,4 +39,4 @@ Dart_Handle Extensions::GetError() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/extensions.h"
|
||||
|
||||
|
@ -43,4 +43,4 @@ Dart_Handle Extensions::GetError() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include <dlfcn.h> // NOLINT
|
||||
#include "bin/extensions.h"
|
||||
|
@ -39,4 +39,4 @@ Dart_Handle Extensions::GetError() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include <dlfcn.h> // NOLINT
|
||||
#include "bin/extensions.h"
|
||||
|
@ -39,4 +39,4 @@ Dart_Handle Extensions::GetError() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/extensions.h"
|
||||
#include "bin/utils.h"
|
||||
|
@ -51,4 +51,4 @@ Dart_Handle Extensions::GetError() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
|
||||
|
@ -139,4 +139,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
|
||||
|
@ -138,4 +138,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
|
||||
|
@ -139,4 +139,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/fdutils.h"
|
||||
|
||||
|
@ -139,4 +139,4 @@ void FDUtils::SaveErrorAndClose(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
#include "platform/globals.h"
|
||||
#include "platform/memory_sanitizer.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
#include <psapi.h>
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
@ -116,7 +116,7 @@ DART_EXPORT uint8_t IsThreadInGenerated() {
|
|||
: 0;
|
||||
}
|
||||
|
||||
#if !defined(HOST_OS_WINDOWS)
|
||||
#if !defined(DART_HOST_OS_WINDOWS)
|
||||
DART_EXPORT void* UnprotectCodeOtherThread(void* isolate,
|
||||
std::condition_variable* var,
|
||||
std::mutex* mut) {
|
||||
|
@ -185,7 +185,7 @@ DART_EXPORT void* TestUnprotectCode(void (*fn)(void)) {
|
|||
// Clobbers some registers with special meaning in Dart before re-entry, for
|
||||
// stress-testing. Not used on 32-bit Windows due to complications with Windows
|
||||
// "safeseh".
|
||||
#if defined(TARGET_OS_WINDOWS) && defined(HOST_ARCH_IA32)
|
||||
#if defined(DART_TARGET_OS_WINDOWS) && defined(HOST_ARCH_IA32)
|
||||
void ClobberAndCall(void (*fn)()) {
|
||||
fn();
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ struct CallbackTestData {
|
|||
void (*callback)();
|
||||
};
|
||||
|
||||
#if defined(TARGET_OS_LINUX)
|
||||
#if defined(DART_TARGET_OS_LINUX)
|
||||
|
||||
thread_local sigjmp_buf buf;
|
||||
void CallbackTestSignalHandler(int) {
|
||||
|
@ -312,13 +312,13 @@ DART_EXPORT intptr_t TestLeafCallApi(void (*fn)()) {
|
|||
#endif
|
||||
}
|
||||
|
||||
#endif // defined(TARGET_OS_LINUX)
|
||||
#endif // defined(DART_TARGET_OS_LINUX)
|
||||
|
||||
// Restore default SIGPIPE handler, which is only needed on mac
|
||||
// since that is the only platform we explicitly ignore it.
|
||||
// See Platform::Initialize() in platform_macos.cc.
|
||||
DART_EXPORT void RestoreSIGPIPEHandler() {
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
signal(SIGPIPE, SIG_DFL);
|
||||
#endif
|
||||
}
|
||||
|
@ -428,7 +428,7 @@ void Fatal(char const* file, int line, char const* error) {
|
|||
#define FATAL(error) Fatal(__FILE__, __LINE__, error)
|
||||
|
||||
DART_EXPORT void SleepOnAnyOS(intptr_t seconds) {
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
Sleep(1000 * seconds);
|
||||
#else
|
||||
sleep(seconds);
|
||||
|
|
|
@ -50,25 +50,23 @@ config("define_target_arch_x64") {
|
|||
}
|
||||
|
||||
config("define_target_os_android") {
|
||||
defines = [ "TARGET_OS_ANDROID" ]
|
||||
defines = [ "DART_TARGET_OS_ANDROID" ]
|
||||
}
|
||||
|
||||
config("define_target_os_ios") {
|
||||
# This is TARGET_OS_MACOS_IOS instead of TARGET_OS_IOS because the latter is
|
||||
# defined by Xcode already. See https://dartbug.com/24453.
|
||||
defines = [ "TARGET_OS_MACOS_IOS" ]
|
||||
defines = [ "DART_TARGET_OS_MACOS_IOS" ]
|
||||
}
|
||||
|
||||
config("define_target_os_linux") {
|
||||
defines = [ "TARGET_OS_LINUX" ]
|
||||
defines = [ "DART_TARGET_OS_LINUX" ]
|
||||
}
|
||||
|
||||
config("define_target_os_macos") {
|
||||
defines = [ "TARGET_OS_MACOS" ]
|
||||
defines = [ "DART_TARGET_OS_MACOS" ]
|
||||
}
|
||||
|
||||
config("define_target_os_windows") {
|
||||
defines = [ "TARGET_OS_WINDOWS" ]
|
||||
defines = [ "DART_TARGET_OS_WINDOWS" ]
|
||||
}
|
||||
|
||||
build_run_ffi_unit_tests("run_ffi_unit_tests_arm_android") {
|
||||
|
|
|
@ -221,7 +221,7 @@ class File : public ReferenceCounted<File> {
|
|||
// (stdin, stout or stderr).
|
||||
static File* OpenStdio(int fd);
|
||||
|
||||
#if defined(HOST_OS_FUCHSIA) || defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_FUCHSIA) || defined(DART_HOST_OS_LINUX)
|
||||
static File* OpenFD(int fd);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
|
@ -748,4 +748,4 @@ File::Identical File::AreIdentical(Namespace* namespc_1,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
|
@ -704,4 +704,4 @@ File::Identical File::AreIdentical(Namespace* namespc_1,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
|
@ -745,4 +745,4 @@ File::Identical File::AreIdentical(Namespace* namespc_1,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/file.h"
|
||||
|
||||
|
@ -650,4 +650,4 @@ File::Identical File::AreIdentical(Namespace* namespc_1,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/file_system_watcher.h"
|
||||
|
||||
|
@ -152,4 +152,4 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/file_system_watcher.h"
|
||||
|
||||
|
@ -48,4 +48,4 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/file_system_watcher.h"
|
||||
|
||||
|
@ -146,4 +146,4 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/file_system_watcher.h"
|
||||
|
||||
#if !HOST_OS_IOS
|
||||
#if !DART_HOST_OS_IOS
|
||||
|
||||
#include <CoreServices/CoreServices.h> // NOLINT
|
||||
#include <errno.h> // NOLINT
|
||||
|
@ -350,7 +350,7 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#else // !HOST_OS_IOS
|
||||
#else // !DART_HOST_OS_IOS
|
||||
|
||||
namespace dart {
|
||||
namespace bin {
|
||||
|
@ -387,5 +387,5 @@ intptr_t FileSystemWatcher::WatchPath(intptr_t id,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // !HOST_OS_IOS
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // !DART_HOST_OS_IOS
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/file_system_watcher.h"
|
||||
|
||||
|
@ -132,4 +132,4 @@ Dart_Handle FileSystemWatcher::ReadEvents(intptr_t id, intptr_t path_id) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
@ -1128,4 +1128,4 @@ File::Identical File::AreIdentical(Namespace* namespc_1,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -44,7 +44,7 @@ uint8_t* IOBuffer::Reallocate(uint8_t* buffer, intptr_t new_size) {
|
|||
}
|
||||
return buffer;
|
||||
}
|
||||
#if defined(TARGET_OS_WINDOWS)
|
||||
#if defined(DART_TARGET_OS_WINDOWS)
|
||||
// It seems windows realloc() doesn't free memory when shrinking, so we'll
|
||||
// manually allocate a new buffer, copy the data and free the old buffer.
|
||||
auto new_buffer = IOBuffer::Allocate(new_size);
|
||||
|
|
|
@ -225,13 +225,13 @@ void Options::PrintUsage() {
|
|||
"--root-certs-cache=<path>\n"
|
||||
" The path to a cache directory containing the trusted root certificates to\n"
|
||||
" use for secure socket connections.\n"
|
||||
#if defined(HOST_OS_LINUX) || \
|
||||
defined(HOST_OS_ANDROID) || \
|
||||
defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_LINUX) || \
|
||||
defined(DART_HOST_OS_ANDROID) || \
|
||||
defined(DART_HOST_OS_FUCHSIA)
|
||||
"--namespace=<path>\n"
|
||||
" The path to a directory that dart:io calls will treat as the root of the\n"
|
||||
" filesystem.\n"
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
"\n"
|
||||
"The following options are only used for VM development and may\n"
|
||||
"be changed in any future version:\n");
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/namespace.h"
|
||||
|
||||
|
@ -156,4 +156,4 @@ NamespaceScope::~NamespaceScope() {}
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/namespace.h"
|
||||
#include "bin/namespace_fuchsia.h"
|
||||
|
@ -167,4 +167,4 @@ NamespaceScope::~NamespaceScope() {}
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#define RUNTIME_BIN_NAMESPACE_FUCHSIA_H_
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if !defined(HOST_OS_FUCHSIA)
|
||||
#if !defined(DART_HOST_OS_FUCHSIA)
|
||||
#error "This header file should only be included when targeting Fuchsia."
|
||||
#endif
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/namespace.h"
|
||||
|
||||
|
@ -156,4 +156,4 @@ NamespaceScope::~NamespaceScope() {}
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/namespace.h"
|
||||
|
||||
|
@ -64,4 +64,4 @@ NamespaceScope::~NamespaceScope() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/namespace.h"
|
||||
|
||||
|
@ -74,4 +74,4 @@ NamespaceScope::~NamespaceScope() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
#include "platform/globals.h"
|
||||
#include "platform/utils.h"
|
||||
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
#include "bin/platform_macos.h"
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
||||
namespace dart {
|
||||
namespace bin {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/platform.h"
|
||||
|
||||
|
@ -173,4 +173,4 @@ void Platform::SetCoreDumpResourceLimit(int value) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/platform.h"
|
||||
|
||||
|
@ -164,4 +164,4 @@ void Platform::SetCoreDumpResourceLimit(int value) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/platform.h"
|
||||
|
||||
|
@ -180,4 +180,4 @@ void Platform::SetCoreDumpResourceLimit(int value) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,16 +3,16 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/platform.h"
|
||||
#include "bin/platform_macos.h"
|
||||
|
||||
#include <CoreFoundation/CoreFoundation.h>
|
||||
|
||||
#if !HOST_OS_IOS
|
||||
#if !DART_HOST_OS_IOS
|
||||
#include <crt_externs.h> // NOLINT
|
||||
#endif // !HOST_OS_IOS
|
||||
#endif // !DART_HOST_OS_IOS
|
||||
#include <errno.h> // NOLINT
|
||||
#include <mach-o/dyld.h>
|
||||
#include <signal.h> // NOLINT
|
||||
|
@ -107,7 +107,7 @@ int Platform::NumberOfProcessors() {
|
|||
}
|
||||
|
||||
const char* Platform::OperatingSystem() {
|
||||
#if HOST_OS_IOS
|
||||
#if DART_HOST_OS_IOS
|
||||
return "ios";
|
||||
#else
|
||||
return "macos";
|
||||
|
@ -262,7 +262,7 @@ bool Platform::LocalHostname(char* buffer, intptr_t buffer_length) {
|
|||
}
|
||||
|
||||
char** Platform::Environment(intptr_t* count) {
|
||||
#if HOST_OS_IOS
|
||||
#if DART_HOST_OS_IOS
|
||||
// TODO(zra,chinmaygarde): On iOS, environment variables are seldom used. Wire
|
||||
// this up if someone needs it. In the meantime, we return an empty array.
|
||||
char** result;
|
||||
|
@ -343,4 +343,4 @@ void Platform::SetCoreDumpResourceLimit(int value) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// for details. All rights reserved. Use of this source code is governed by a
|
||||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
#include "bin/platform.h"
|
||||
#include "vm/unit_test.h"
|
||||
|
||||
|
@ -50,4 +50,4 @@ TEST_CASE(Platform_ExtractsOSVersionFromString) {
|
|||
}
|
||||
|
||||
} // namespace dart
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/platform.h"
|
||||
|
||||
|
@ -319,4 +319,4 @@ void Platform::SetCoreDumpResourceLimit(int value) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
#include "bin/namespace.h"
|
||||
#include "bin/thread.h"
|
||||
#include "platform/globals.h"
|
||||
#if !defined(HOST_OS_WINDOWS)
|
||||
#if !defined(DART_HOST_OS_WINDOWS)
|
||||
#include "platform/signal_blocker.h"
|
||||
#endif
|
||||
#include "platform/utils.h"
|
||||
|
@ -348,8 +348,8 @@ class BufferListBase {
|
|||
DISALLOW_COPY_AND_ASSIGN(BufferListBase);
|
||||
};
|
||||
|
||||
#if defined(HOST_OS_ANDROID) || defined(HOST_OS_FUCHSIA) || \
|
||||
defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_ANDROID) || defined(DART_HOST_OS_FUCHSIA) || \
|
||||
defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOS)
|
||||
class BufferList : public BufferListBase {
|
||||
public:
|
||||
BufferList() {}
|
||||
|
@ -366,13 +366,13 @@ class BufferList : public BufferListBase {
|
|||
ASSERT(free_size() > 0);
|
||||
ASSERT(free_size() <= kBufferSize);
|
||||
intptr_t block_size = dart::Utils::Minimum(free_size(), available);
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
intptr_t bytes = NO_RETRY_EXPECTED(
|
||||
read(fd, reinterpret_cast<void*>(FreeSpaceAddress()), block_size));
|
||||
#else
|
||||
intptr_t bytes = TEMP_FAILURE_RETRY(
|
||||
read(fd, reinterpret_cast<void*>(FreeSpaceAddress()), block_size));
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
if (bytes < 0) {
|
||||
return false;
|
||||
}
|
||||
|
@ -386,7 +386,7 @@ class BufferList : public BufferListBase {
|
|||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(BufferList);
|
||||
};
|
||||
#endif // defined(HOST_OS_ANDROID) ...
|
||||
#endif // defined(DART_HOST_OS_ANDROID) ...
|
||||
|
||||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
|
@ -1159,4 +1159,4 @@ void Process::Cleanup() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
|
@ -867,4 +867,4 @@ void Process::Cleanup() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
|
@ -1155,4 +1155,4 @@ void Process::Cleanup() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,11 +3,11 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
#if !HOST_OS_IOS
|
||||
#if !DART_HOST_OS_IOS
|
||||
#include <crt_externs.h> // NOLINT
|
||||
#endif
|
||||
#include <errno.h> // NOLINT
|
||||
|
@ -468,7 +468,7 @@ class ProcessStarter {
|
|||
ReportChildError();
|
||||
}
|
||||
|
||||
#if !HOST_OS_IOS
|
||||
#if !DART_HOST_OS_IOS
|
||||
if (program_environment_ != NULL) {
|
||||
// On MacOS you have to do a bit of magic to get to the
|
||||
// environment strings.
|
||||
|
@ -521,7 +521,7 @@ class ProcessStarter {
|
|||
(TEMP_FAILURE_RETRY(chdir(working_directory_)) == -1)) {
|
||||
ReportChildError();
|
||||
}
|
||||
#if !HOST_OS_IOS
|
||||
#if !DART_HOST_OS_IOS
|
||||
if (program_environment_ != NULL) {
|
||||
// On MacOS you have to do a bit of magic to get to the
|
||||
// environment strings.
|
||||
|
@ -1191,4 +1191,4 @@ void Process::Cleanup() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/process.h"
|
||||
|
||||
|
@ -935,7 +935,7 @@ int64_t Process::CurrentRSS() {
|
|||
// https://docs.microsoft.com/en-us/windows/win32/api/psapi/nf-psapi-getprocessmemoryinfo
|
||||
// claims that GetProcessMemoryInfo is UWP compatible, it is actually not
|
||||
// hence this function cannot work when compiled in UWP mode.
|
||||
#ifdef TARGET_OS_WINDOWS_UWP
|
||||
#ifdef DART_TARGET_OS_WINDOWS_UWP
|
||||
return -1;
|
||||
#else
|
||||
PROCESS_MEMORY_COUNTERS pmc;
|
||||
|
@ -947,7 +947,7 @@ int64_t Process::CurrentRSS() {
|
|||
}
|
||||
|
||||
int64_t Process::MaxRSS() {
|
||||
#ifdef TARGET_OS_WINDOWS_UWP
|
||||
#ifdef DART_TARGET_OS_WINDOWS_UWP
|
||||
return -1;
|
||||
#else
|
||||
PROCESS_MEMORY_COUNTERS pmc;
|
||||
|
@ -1140,4 +1140,4 @@ void Process::Cleanup() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID) || \
|
||||
#if defined(DART_HOST_OS_MACOS) || defined(DART_HOST_OS_ANDROID) || \
|
||||
defined(DART_IO_ROOT_CERTS_DISABLED)
|
||||
|
||||
namespace dart {
|
||||
|
@ -17,6 +17,6 @@ unsigned int root_certificates_pem_length = 0;
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID) || ...
|
||||
#endif // defined(DART_HOST_OS_MACOS) || defined(DART_HOST_OS_ANDROID) || ...
|
||||
|
||||
#endif // !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
|
|
@ -161,7 +161,7 @@ void FUNCTION_NAME(SecureSocket_NewX509CertificateWrapper)(
|
|||
Dart_NativeArguments args) {
|
||||
// This is to be used only in conjunction with certificate trust evaluator
|
||||
// running asynchronously, which is only used on mac/ios at the moment.
|
||||
#if !defined(HOST_OS_MACOS)
|
||||
#if !defined(DART_HOST_OS_MACOS)
|
||||
FATAL("This is to be used only on mac/ios platforms");
|
||||
#endif
|
||||
intptr_t x509_pointer = DartUtils::GetNativeIntptrArgument(args, 0);
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/security_context.h"
|
||||
|
||||
|
@ -64,6 +64,6 @@ TrustEvaluateHandlerFunc SSLCertContext::GetTrustEvaluateHandler() const {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#endif // !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/security_context.h"
|
||||
|
||||
|
@ -57,6 +57,6 @@ TrustEvaluateHandlerFunc SSLCertContext::GetTrustEvaluateHandler() const {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#endif // !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/security_context.h"
|
||||
|
||||
|
@ -83,6 +83,6 @@ TrustEvaluateHandlerFunc SSLCertContext::GetTrustEvaluateHandler() const {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#endif // !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/security_context.h"
|
||||
|
||||
|
@ -347,6 +347,6 @@ void SSLCertContext::TrustBuiltinRoots() {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#endif // !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#if !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/security_context.h"
|
||||
|
||||
|
@ -20,7 +20,7 @@
|
|||
#include "bin/secure_socket_utils.h"
|
||||
#include "platform/syslog.h"
|
||||
|
||||
#ifndef TARGET_OS_WINDOWS_UWP
|
||||
#ifndef DART_TARGET_OS_WINDOWS_UWP
|
||||
#pragma comment(lib, "crypt32.lib")
|
||||
#endif
|
||||
|
||||
|
@ -42,7 +42,7 @@ static void PrintSSLErr(const char* str) {
|
|||
Syslog::PrintErr("%s %s\n", str, error_string);
|
||||
}
|
||||
|
||||
#ifndef TARGET_OS_WINDOWS_UWP
|
||||
#ifndef DART_TARGET_OS_WINDOWS_UWP
|
||||
static bool AddCertificatesFromNamedSystemStore(const wchar_t* name,
|
||||
DWORD store_type,
|
||||
X509_STORE* store) {
|
||||
|
@ -158,13 +158,13 @@ static bool AddCertificatesFromSystemStore(DWORD store_type,
|
|||
}
|
||||
return true;
|
||||
}
|
||||
#endif // ifdef TARGET_OS_WINDOWS_UWP
|
||||
#endif // ifdef DART_TARGET_OS_WINDOWS_UWP
|
||||
|
||||
// Add certificates from Windows trusted root store.
|
||||
static bool AddCertificatesFromRootStore(X509_STORE* store) {
|
||||
// The UWP platform doesn't support CertEnumCertificatesInStore hence
|
||||
// this function cannot work when compiled in UWP mode.
|
||||
#ifdef TARGET_OS_WINDOWS_UWP
|
||||
#ifdef DART_TARGET_OS_WINDOWS_UWP
|
||||
return false;
|
||||
#else
|
||||
if (!AddCertificatesFromSystemStore(CERT_SYSTEM_STORE_CURRENT_USER, store)) {
|
||||
|
@ -176,7 +176,7 @@ static bool AddCertificatesFromRootStore(X509_STORE* store) {
|
|||
}
|
||||
|
||||
return true;
|
||||
#endif // ifdef TARGET_OS_WINDOWS_UWP
|
||||
#endif // ifdef DART_TARGET_OS_WINDOWS_UWP
|
||||
}
|
||||
|
||||
void SSLCertContext::TrustBuiltinRoots() {
|
||||
|
@ -226,6 +226,6 @@ TrustEvaluateHandlerFunc SSLCertContext::GetTrustEvaluateHandler() const {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#endif // !defined(DART_IO_SECURE_SOCKET_DISABLED)
|
||||
|
|
|
@ -201,7 +201,7 @@ static AppSnapshot* TryReadAppSnapshotElf(
|
|||
*isolate_data_buffer = nullptr,
|
||||
*isolate_instructions_buffer = nullptr;
|
||||
Dart_LoadedElf* handle = nullptr;
|
||||
#if !defined(HOST_OS_FUCHSIA)
|
||||
#if !defined(DART_HOST_OS_FUCHSIA)
|
||||
if (force_load_elf_from_memory) {
|
||||
#endif
|
||||
File* const file =
|
||||
|
@ -218,7 +218,7 @@ static AppSnapshot* TryReadAppSnapshotElf(
|
|||
&isolate_data_buffer, &isolate_instructions_buffer);
|
||||
delete memory;
|
||||
file->Release();
|
||||
#if !defined(HOST_OS_FUCHSIA)
|
||||
#if !defined(DART_HOST_OS_FUCHSIA)
|
||||
} else {
|
||||
handle = Dart_LoadELF(script_name, file_offset, &error, &vm_data_buffer,
|
||||
&vm_instructions_buffer, &isolate_data_buffer,
|
||||
|
@ -349,7 +349,7 @@ AppSnapshot* Snapshot::TryReadAppSnapshot(const char* script_uri,
|
|||
// For testing AOT with the standalone embedder, we also support loading
|
||||
// from a dynamic library to simulate what happens on iOS.
|
||||
|
||||
#if defined(TARGET_OS_LINUX) || defined(TARGET_OS_MACOS)
|
||||
#if defined(DART_TARGET_OS_LINUX) || defined(DART_TARGET_OS_MACOS)
|
||||
// On Linux and OSX, resolve the script path before passing into dlopen()
|
||||
// since dlopen will not search the filesystem for paths like 'libtest.so'.
|
||||
std::unique_ptr<char, decltype(std::free)*> absolute_path{
|
||||
|
|
|
@ -208,12 +208,12 @@ Dart_Handle ListeningSocketRegistry::CreateUnixDomainBindListen(
|
|||
return result;
|
||||
}
|
||||
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
// Abstract unix domain socket doesn't exist in file system.
|
||||
if (File::Exists(namespc, addr.un.sun_path) && path[0] != '@') {
|
||||
#else
|
||||
if (File::Exists(namespc, addr.un.sun_path)) {
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
if (unix_domain_sockets_ != nullptr) {
|
||||
// If there is a socket listening on this file. Ensure
|
||||
// that it was created with `shared` mode and current `shared`
|
||||
|
@ -285,7 +285,7 @@ bool ListeningSocketRegistry::CloseOneSafe(OSSocket* os_socket,
|
|||
}
|
||||
// Unlink the socket file, if os_socket contains unix domain sockets.
|
||||
if (os_socket->address.addr.sa_family == AF_UNIX) {
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
// If the socket is abstract, which has a path starting with a null byte,
|
||||
// unlink() is not necessary because the file doesn't exist.
|
||||
if (os_socket->address.un.sun_path[0] != '\0') {
|
||||
|
@ -293,7 +293,7 @@ bool ListeningSocketRegistry::CloseOneSafe(OSSocket* os_socket,
|
|||
}
|
||||
#else
|
||||
Utils::Unlink(os_socket->address.un.sun_path);
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
// Remove os_socket from unix_domain_sockets_ list.
|
||||
OSSocket* prev = nullptr;
|
||||
OSSocket* current = unix_domain_sockets_;
|
||||
|
@ -409,7 +409,7 @@ void FUNCTION_NAME(Socket_CreateBindConnect)(Dart_NativeArguments args) {
|
|||
|
||||
void FUNCTION_NAME(Socket_CreateUnixDomainBindConnect)(
|
||||
Dart_NativeArguments args) {
|
||||
#if defined(HOST_OS_WINDOWS) || defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_WINDOWS) || defined(DART_HOST_OS_FUCHSIA)
|
||||
OSError os_error(
|
||||
-1, "Unix domain sockets are not available on this operating system.",
|
||||
OSError::kUnknown);
|
||||
|
@ -450,11 +450,11 @@ void FUNCTION_NAME(Socket_CreateUnixDomainBindConnect)(
|
|||
} else {
|
||||
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
|
||||
}
|
||||
#endif // defined(HOST_OS_WINDOWS) || defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS) || defined(DART_HOST_OS_FUCHSIA)
|
||||
}
|
||||
|
||||
void FUNCTION_NAME(Socket_CreateUnixDomainConnect)(Dart_NativeArguments args) {
|
||||
#if defined(HOST_OS_WINDOWS) || defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_WINDOWS) || defined(DART_HOST_OS_FUCHSIA)
|
||||
OSError os_error(
|
||||
-1, "Unix domain sockets are not available on this operating system.",
|
||||
OSError::kUnknown);
|
||||
|
@ -481,7 +481,7 @@ void FUNCTION_NAME(Socket_CreateUnixDomainConnect)(Dart_NativeArguments args) {
|
|||
} else {
|
||||
Dart_SetReturnValue(args, DartUtils::NewDartOSError());
|
||||
}
|
||||
#endif // defined(HOST_OS_WINDOWS) || defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS) || defined(DART_HOST_OS_FUCHSIA)
|
||||
}
|
||||
|
||||
void FUNCTION_NAME(Socket_CreateBindDatagram)(Dart_NativeArguments args) {
|
||||
|
@ -855,7 +855,7 @@ void FUNCTION_NAME(ServerSocket_CreateBindListen)(Dart_NativeArguments args) {
|
|||
|
||||
void FUNCTION_NAME(ServerSocket_CreateUnixDomainBindListen)(
|
||||
Dart_NativeArguments args) {
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
OSError os_error(
|
||||
-1, "Unix domain sockets are not available on this operating system.",
|
||||
OSError::kUnknown);
|
||||
|
@ -876,7 +876,7 @@ void FUNCTION_NAME(ServerSocket_CreateUnixDomainBindListen)(
|
|||
ListeningSocketRegistry::Instance()->CreateUnixDomainBindListen(
|
||||
socket_object, namespc, path, backlog, shared);
|
||||
Dart_SetReturnValue(args, result);
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
}
|
||||
|
||||
void FUNCTION_NAME(ServerSocket_Accept)(Dart_NativeArguments args) {
|
||||
|
|
|
@ -262,7 +262,7 @@ class ListeningSocketRegistry {
|
|||
const char* path) {
|
||||
while (current != NULL) {
|
||||
ASSERT(current->address.addr.sa_family == AF_UNIX);
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
bool condition;
|
||||
if (path[0] == '\0') {
|
||||
condition = current->address.un.sun_path[0] == '\0' &&
|
||||
|
@ -280,7 +280,7 @@ class ListeningSocketRegistry {
|
|||
namespc, path) == File::kIdentical) {
|
||||
return current;
|
||||
}
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
current = current->next;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/socket.h"
|
||||
|
||||
|
@ -280,4 +280,4 @@ intptr_t ServerSocket::Accept(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -128,7 +128,7 @@ void SocketAddress::GetSockAddr(Dart_Handle obj, RawAddr* addr) {
|
|||
Dart_Handle SocketAddress::GetUnixDomainSockAddr(const char* path,
|
||||
Namespace* namespc,
|
||||
RawAddr* addr) {
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
NamespaceScope ns(namespc, path);
|
||||
path = ns.path();
|
||||
bool is_abstract = (path[0] == '@');
|
||||
|
@ -139,7 +139,7 @@ Dart_Handle SocketAddress::GetUnixDomainSockAddr(const char* path,
|
|||
// connection will be rejected.
|
||||
bzero(addr->un.sun_path, sizeof(addr->un.sun_path));
|
||||
}
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
if (sizeof(path) > sizeof(addr->un.sun_path)) {
|
||||
OSError os_error(-1,
|
||||
"The length of path exceeds the limit. "
|
||||
|
@ -149,12 +149,12 @@ Dart_Handle SocketAddress::GetUnixDomainSockAddr(const char* path,
|
|||
}
|
||||
addr->un.sun_family = AF_UNIX;
|
||||
Utils::SNPrint(addr->un.sun_path, sizeof(addr->un.sun_path), "%s", path);
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
// In case of abstract namespace, transfer the leading '@' into a null byte.
|
||||
if (is_abstract) {
|
||||
addr->un.sun_path[0] = '\0';
|
||||
}
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_ANDROID)
|
||||
return Dart_Null();
|
||||
}
|
||||
|
||||
|
|
|
@ -7,15 +7,15 @@
|
|||
|
||||
#include "platform/globals.h"
|
||||
// Declare the OS-specific types ahead of defining the generic class.
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
#include "bin/socket_base_android.h"
|
||||
#elif defined(HOST_OS_FUCHSIA)
|
||||
#elif defined(DART_HOST_OS_FUCHSIA)
|
||||
#include "bin/socket_base_fuchsia.h"
|
||||
#elif defined(HOST_OS_LINUX)
|
||||
#elif defined(DART_HOST_OS_LINUX)
|
||||
#include "bin/socket_base_linux.h"
|
||||
#elif defined(HOST_OS_MACOS)
|
||||
#elif defined(DART_HOST_OS_MACOS)
|
||||
#include "bin/socket_base_macos.h"
|
||||
#elif defined(HOST_OS_WINDOWS)
|
||||
#elif defined(DART_HOST_OS_WINDOWS)
|
||||
#include "bin/socket_base_win.h"
|
||||
#else
|
||||
#error Unknown target os.
|
||||
|
@ -86,7 +86,8 @@ class SocketAddress {
|
|||
static intptr_t GetAddrScope(const RawAddr& addr);
|
||||
|
||||
private:
|
||||
#if defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOS) || \
|
||||
defined(DART_HOST_OS_ANDROID)
|
||||
// Unix domain address is only on Linux, Mac OS and Android now.
|
||||
// unix(7) require sun_path to be 108 bytes on Linux and Android, 104 bytes on
|
||||
// Mac OS.
|
||||
|
@ -95,8 +96,8 @@ class SocketAddress {
|
|||
char as_string_[kMaxUnixPathLength];
|
||||
#else
|
||||
char as_string_[INET6_ADDRSTRLEN];
|
||||
#endif // defined(HOST_OS_LINUX) || defined(HOST_OS_MACOS) || \
|
||||
// defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_LINUX) || defined(DART_HOST_OS_MACOS) || \
|
||||
// defined(DART_HOST_OS_ANDROID)
|
||||
RawAddr addr_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SocketAddress);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/socket_base.h"
|
||||
|
||||
|
@ -470,4 +470,4 @@ bool SocketBase::LeaveMulticast(intptr_t fd,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/socket_base.h"
|
||||
|
||||
|
@ -429,4 +429,4 @@ bool SocketBase::LeaveMulticast(intptr_t fd,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/socket_base.h"
|
||||
|
||||
|
@ -472,4 +472,4 @@ bool SocketBase::LeaveMulticast(intptr_t fd,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/socket_base.h"
|
||||
|
||||
|
@ -484,4 +484,4 @@ bool SocketBase::LeaveMulticast(intptr_t fd,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/socket_base.h"
|
||||
|
||||
|
@ -489,4 +489,4 @@ bool SocketBase::LeaveMulticast(intptr_t fd,
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/socket.h"
|
||||
|
||||
|
@ -266,4 +266,4 @@ intptr_t ServerSocket::Accept(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/socket.h"
|
||||
|
||||
|
@ -277,4 +277,4 @@ intptr_t ServerSocket::Accept(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/socket.h"
|
||||
|
||||
|
@ -294,4 +294,4 @@ intptr_t ServerSocket::Accept(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/builtin.h"
|
||||
#include "bin/eventhandler.h"
|
||||
|
@ -315,4 +315,4 @@ bool ServerSocket::StartAccept(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/stdio.h"
|
||||
|
||||
|
@ -111,4 +111,4 @@ bool Stdout::AnsiSupported(intptr_t fd, bool* supported) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_FUCHSIA)
|
||||
#if defined(DART_HOST_OS_FUCHSIA)
|
||||
|
||||
#include "bin/stdio.h"
|
||||
|
||||
|
@ -62,4 +62,4 @@ bool Stdout::AnsiSupported(intptr_t fd, bool* supported) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_FUCHSIA)
|
||||
#endif // defined(DART_HOST_OS_FUCHSIA)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_LINUX)
|
||||
#if defined(DART_HOST_OS_LINUX)
|
||||
|
||||
#include "bin/stdio.h"
|
||||
|
||||
|
@ -111,4 +111,4 @@ bool Stdout::AnsiSupported(intptr_t fd, bool* supported) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_LINUX)
|
||||
#endif // defined(DART_HOST_OS_LINUX)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_MACOS)
|
||||
#if defined(DART_HOST_OS_MACOS)
|
||||
|
||||
#include "bin/stdio.h"
|
||||
|
||||
|
@ -111,4 +111,4 @@ bool Stdout::AnsiSupported(intptr_t fd, bool* supported) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_MACOS)
|
||||
#endif // defined(DART_HOST_OS_MACOS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_WINDOWS)
|
||||
#if defined(DART_HOST_OS_WINDOWS)
|
||||
|
||||
#include "bin/stdio.h"
|
||||
|
||||
|
@ -136,4 +136,4 @@ bool Stdout::AnsiSupported(intptr_t fd, bool* supported) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_WINDOWS)
|
||||
#endif // defined(DART_HOST_OS_WINDOWS)
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
// BSD-style license that can be found in the LICENSE file.
|
||||
|
||||
#include "platform/globals.h"
|
||||
#if defined(HOST_OS_ANDROID)
|
||||
#if defined(DART_HOST_OS_ANDROID)
|
||||
|
||||
#include "bin/sync_socket.h"
|
||||
|
||||
|
@ -89,4 +89,4 @@ void SynchronousSocket::Close(intptr_t fd) {
|
|||
} // namespace bin
|
||||
} // namespace dart
|
||||
|
||||
#endif // defined(HOST_OS_ANDROID)
|
||||
#endif // defined(DART_HOST_OS_ANDROID)
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue