From 6e3a3f8b302dc76c29a78f643ff43c56141b9ca7 Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Mon, 31 Jan 2022 13:42:50 -0800 Subject: [PATCH 1/2] Prefix remaining OS defines with FML_ namespace --- flow/frame_timings_recorder_unittests.cc | 2 +- fml/backtrace.cc | 4 ++-- fml/build_config.h | 10 +++++----- fml/eintr_wrapper.h | 4 ++-- fml/file_unittest.cc | 2 +- fml/logging.cc | 4 ++-- fml/mapping.h | 2 +- fml/memory/thread_checker.h | 4 ++-- fml/message_loop_impl.cc | 4 ++-- fml/message_loop_unittests.cc | 2 +- fml/native_library.h | 10 +++++----- fml/paths.cc | 6 +++--- fml/synchronization/semaphore.cc | 2 +- fml/thread.cc | 6 +++--- fml/unique_fd.cc | 6 +++--- fml/unique_fd.h | 18 +++++++++--------- lib/ui/painting/image_generator_registry.cc | 4 ++-- lib/ui/ui_dart_state.cc | 4 ++-- runtime/dart_snapshot.cc | 2 +- runtime/dart_vm.cc | 8 ++++---- runtime/ptrace_check.cc | 2 +- runtime/ptrace_check.h | 2 +- shell/platform/embedder/embedder.cc | 18 +++++++++--------- testing/debugger_detection.cc | 6 +++--- testing/run_all_unittests.cc | 8 ++++---- testing/test_vulkan_context.cc | 2 +- 26 files changed, 71 insertions(+), 71 deletions(-) diff --git a/flow/frame_timings_recorder_unittests.cc b/flow/frame_timings_recorder_unittests.cc index 434f06b802e6f..fe2f0f8bf9495 100644 --- a/flow/frame_timings_recorder_unittests.cc +++ b/flow/frame_timings_recorder_unittests.cc @@ -122,7 +122,7 @@ TEST(FrameTimingsRecorderTest, RecordRasterTimesWithCache) { } // Windows and Fuchsia don't allow testing with killed by signal. -#if !defined(OS_FUCHSIA) && !defined(OS_WIN) && \ +#if !defined(OS_FUCHSIA) && !defined(FML_OS_WIN) && \ (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG) TEST(FrameTimingsRecorderTest, ThrowWhenRecordBuildBeforeVsync) { diff --git a/fml/backtrace.cc b/fml/backtrace.cc index 1a9fbdd4aee9f..34b0ef06b146b 100644 --- a/fml/backtrace.cc +++ b/fml/backtrace.cc @@ -11,7 +11,7 @@ #include #include -#if OS_WIN +#if FML_OS_WIN #include #include #endif @@ -132,7 +132,7 @@ static void ToggleSignalHandlers(bool set) { } void InstallCrashHandler() { -#if OS_WIN +#if FML_OS_WIN if (!IsDebuggerPresent()) { _CrtSetReportMode(_CRT_ASSERT, _CRTDBG_MODE_FILE | _CRTDBG_MODE_DEBUG); _CrtSetReportFile(_CRT_ASSERT, _CRTDBG_FILE_STDERR); diff --git a/fml/build_config.h b/fml/build_config.h index 256201614d467..29dfafa42a05d 100644 --- a/fml/build_config.h +++ b/fml/build_config.h @@ -4,7 +4,7 @@ // This file adds defines about the platform we're currently building on. // Operating System: -// OS_WIN / FML_OS_MACOSX / FML_OS_LINUX / FML_OS_POSIX (MACOSX or LINUX) / +// FML_OS_WIN / FML_OS_MACOSX / FML_OS_LINUX / FML_OS_POSIX (MACOSX or LINUX) / // FML_OS_NACL (NACL_SFI or NACL_NONSFI) / FML_OS_NACL_SFI / // FML_OS_NACL_NONSFI // Compiler: @@ -27,7 +27,7 @@ #include #define FML_OS_MACOSX 1 #if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE -#define OS_IOS 1 +#define FML_OS_IOS 1 #endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE #elif defined(__linux__) #define FML_OS_LINUX 1 @@ -38,7 +38,7 @@ #define LIBC_GLIBC 1 #endif #elif defined(_WIN32) -#define OS_WIN 1 +#define FML_OS_WIN 1 #elif defined(__FreeBSD__) #define FML_OS_FREEBSD 1 #elif defined(__OpenBSD__) @@ -51,10 +51,10 @@ #error Please add support for your platform in flutter/fml/build_config.h #endif -// For access to standard BSD features, use OS_BSD instead of a +// For access to standard BSD features, use FML_OS_BSD instead of a // more specific macro. #if defined(FML_OS_FREEBSD) || defined(FML_OS_OPENBSD) -#define OS_BSD 1 +#define FML_OS_BSD 1 #endif // For access to standard POSIXish features, use FML_OS_POSIX instead of a diff --git a/fml/eintr_wrapper.h b/fml/eintr_wrapper.h index 3d0721a4676e6..94ad2e6a4f664 100644 --- a/fml/eintr_wrapper.h +++ b/fml/eintr_wrapper.h @@ -9,7 +9,7 @@ #include "flutter/fml/build_config.h" -#if defined(OS_WIN) +#if defined(FML_OS_WIN) // Windows has no concept of EINTR. #define FML_HANDLE_EINTR(x) (x) @@ -38,6 +38,6 @@ eintr_wrapper_result; \ }) -#endif // defined(OS_WIN) +#endif // defined(FML_OS_WIN) #endif // FLUTTER_FML_EINTR_WRAPPER_H_ diff --git a/fml/file_unittest.cc b/fml/file_unittest.cc index c0081383273a8..ca6ca2ae493c1 100644 --- a/fml/file_unittest.cc +++ b/fml/file_unittest.cc @@ -228,7 +228,7 @@ TEST(FileTest, CanStopVisitEarly) { ASSERT_TRUE(fml::UnlinkDirectory(dir.fd(), "a")); } -#if OS_WIN +#if FML_OS_WIN #define AtomicWriteTest DISABLED_AtomicWriteTest #else #define AtomicWriteTest AtomicWriteTest diff --git a/fml/logging.cc b/fml/logging.cc index 5830cb79c2624..1c5c9c81841ad 100644 --- a/fml/logging.cc +++ b/fml/logging.cc @@ -11,7 +11,7 @@ #if defined(FML_OS_ANDROID) #include -#elif defined(OS_IOS) +#elif defined(FML_OS_IOS) #include #elif defined(OS_FUCHSIA) #include @@ -94,7 +94,7 @@ LogMessage::~LogMessage() { break; } __android_log_write(priority, "flutter", stream_.str().c_str()); -#elif defined(OS_IOS) +#elif defined(FML_OS_IOS) syslog(LOG_ALERT, "%s", stream_.str().c_str()); #elif defined(OS_FUCHSIA) fx_log_severity_t fx_severity; diff --git a/fml/mapping.h b/fml/mapping.h index fd46eb728c166..3bf50841cd130 100644 --- a/fml/mapping.h +++ b/fml/mapping.h @@ -82,7 +82,7 @@ class FileMapping final : public Mapping { uint8_t* mapping_ = nullptr; uint8_t* mutable_mapping_ = nullptr; -#if OS_WIN +#if FML_OS_WIN fml::UniqueFD mapping_handle_; #endif diff --git a/fml/memory/thread_checker.h b/fml/memory/thread_checker.h index 3de97f2d2188d..a5aed0d2b7c0c 100644 --- a/fml/memory/thread_checker.h +++ b/fml/memory/thread_checker.h @@ -12,7 +12,7 @@ #include "flutter/fml/logging.h" #include "flutter/fml/macros.h" -#if defined(OS_WIN) +#if defined(FML_OS_WIN) #include #else #include @@ -30,7 +30,7 @@ namespace fml { // there's a small space cost to having even an empty class. ) class ThreadChecker final { public: -#if defined(OS_WIN) +#if defined(FML_OS_WIN) ThreadChecker() : self_(GetCurrentThreadId()) {} ~ThreadChecker() {} diff --git a/fml/message_loop_impl.cc b/fml/message_loop_impl.cc index ca47c0964e896..e16509b633bfb 100644 --- a/fml/message_loop_impl.cc +++ b/fml/message_loop_impl.cc @@ -21,7 +21,7 @@ #include "flutter/fml/platform/fuchsia/message_loop_fuchsia.h" #elif FML_OS_LINUX #include "flutter/fml/platform/linux/message_loop_linux.h" -#elif OS_WIN +#elif FML_OS_WIN #include "flutter/fml/platform/win/message_loop_win.h" #endif @@ -36,7 +36,7 @@ fml::RefPtr MessageLoopImpl::Create() { return fml::MakeRefCounted(); #elif FML_OS_LINUX return fml::MakeRefCounted(); -#elif OS_WIN +#elif FML_OS_WIN return fml::MakeRefCounted(); #else return nullptr; diff --git a/fml/message_loop_unittests.cc b/fml/message_loop_unittests.cc index ab209ed1d642c..03405ebc852c7 100644 --- a/fml/message_loop_unittests.cc +++ b/fml/message_loop_unittests.cc @@ -18,7 +18,7 @@ #include "gtest/gtest.h" #define TIMESENSITIVE(x) TimeSensitiveTest_##x -#if OS_WIN +#if FML_OS_WIN #define PLATFORM_SPECIFIC_CAPTURE(...) [ __VA_ARGS__, count ] #else #define PLATFORM_SPECIFIC_CAPTURE(...) [__VA_ARGS__] diff --git a/fml/native_library.h b/fml/native_library.h index 175afed3edc3a..c85b0b4b681f8 100644 --- a/fml/native_library.h +++ b/fml/native_library.h @@ -12,20 +12,20 @@ #include "flutter/fml/memory/ref_counted.h" #include "flutter/fml/memory/ref_ptr.h" -#if defined(OS_WIN) +#if defined(FML_OS_WIN) #include -#endif // defined(OS_WIN) +#endif // defined(FML_OS_WIN) namespace fml { class NativeLibrary : public fml::RefCountedThreadSafe { public: -#if OS_WIN +#if FML_OS_WIN using Handle = HMODULE; using SymbolHandle = FARPROC; -#else // OS_WIN +#else // FML_OS_WIN using Handle = void*; using SymbolHandle = void*; -#endif // OS_WIN +#endif // FML_OS_WIN static fml::RefPtr Create(const char* path); diff --git a/fml/paths.cc b/fml/paths.cc index b55f447cb1f6f..2e0dab13f38e8 100644 --- a/fml/paths.cc +++ b/fml/paths.cc @@ -19,11 +19,11 @@ std::string JoinPaths(std::initializer_list components) { i++; stream << component; if (i != size) { -#if OS_WIN +#if FML_OS_WIN stream << "\\"; -#else // OS_WIN +#else // FML_OS_WIN stream << "/"; -#endif // OS_WIN +#endif // FML_OS_WIN } } return stream.str(); diff --git a/fml/synchronization/semaphore.cc b/fml/synchronization/semaphore.cc index c28a57d632c3a..34e271b15a0fd 100644 --- a/fml/synchronization/semaphore.cc +++ b/fml/synchronization/semaphore.cc @@ -59,7 +59,7 @@ class PlatformSemaphore { } // namespace fml -#elif OS_WIN +#elif FML_OS_WIN #include namespace fml { diff --git a/fml/thread.cc b/fml/thread.cc index 7a5e951da1621..220d66dd07191 100644 --- a/fml/thread.cc +++ b/fml/thread.cc @@ -13,7 +13,7 @@ #include "flutter/fml/message_loop.h" #include "flutter/fml/synchronization/waitable_event.h" -#if defined(OS_WIN) +#if defined(FML_OS_WIN) #include #elif defined(OS_FUCHSIA) #include @@ -55,7 +55,7 @@ void Thread::Join() { thread_->join(); } -#if defined(OS_WIN) +#if defined(FML_OS_WIN) // The information on how to set the thread name comes from // a MSDN article: http://msdn2.microsoft.com/en-us/library/xcb2z8hs.aspx const DWORD kVCThreadNameException = 0x406D1388; @@ -75,7 +75,7 @@ void Thread::SetCurrentThreadName(const std::string& name) { pthread_setname_np(name.c_str()); #elif defined(FML_OS_LINUX) || defined(FML_OS_ANDROID) pthread_setname_np(pthread_self(), name.c_str()); -#elif defined(OS_WIN) +#elif defined(FML_OS_WIN) THREADNAME_INFO info; info.dwType = 0x1000; info.szName = name.c_str(); diff --git a/fml/unique_fd.cc b/fml/unique_fd.cc index 5721b0f82958d..bb9243d0b3aa5 100644 --- a/fml/unique_fd.cc +++ b/fml/unique_fd.cc @@ -9,7 +9,7 @@ namespace fml { namespace internal { -#if OS_WIN +#if FML_OS_WIN namespace os_win { @@ -22,7 +22,7 @@ void UniqueFDTraits::Free_Handle(HANDLE fd) { } // namespace os_win -#else // OS_WIN +#else // FML_OS_WIN namespace os_unix { @@ -36,7 +36,7 @@ void UniqueDirTraits::Free(DIR* dir) { } // namespace os_unix -#endif // OS_WIN +#endif // FML_OS_WIN } // namespace internal } // namespace fml diff --git a/fml/unique_fd.h b/fml/unique_fd.h index c4b79dc3496e4..573deb194d3b9 100644 --- a/fml/unique_fd.h +++ b/fml/unique_fd.h @@ -8,20 +8,20 @@ #include "flutter/fml/build_config.h" #include "flutter/fml/unique_object.h" -#if OS_WIN +#if FML_OS_WIN #include #include #include #include -#else // OS_WIN +#else // FML_OS_WIN #include #include -#endif // OS_WIN +#endif // FML_OS_WIN namespace fml { namespace internal { -#if OS_WIN +#if FML_OS_WIN namespace os_win { @@ -69,7 +69,7 @@ struct UniqueFDTraits { } // namespace os_win -#else // OS_WIN +#else // FML_OS_WIN namespace os_unix { @@ -87,20 +87,20 @@ struct UniqueDirTraits { } // namespace os_unix -#endif // OS_WIN +#endif // FML_OS_WIN } // namespace internal -#if OS_WIN +#if FML_OS_WIN using UniqueFD = UniqueObject; -#else // OS_WIN +#else // FML_OS_WIN using UniqueFD = UniqueObject; using UniqueDir = UniqueObject; -#endif // OS_WIN +#endif // FML_OS_WIN } // namespace fml diff --git a/lib/ui/painting/image_generator_registry.cc b/lib/ui/painting/image_generator_registry.cc index 0fc40010f2f6b..3a607791c3990 100644 --- a/lib/ui/painting/image_generator_registry.cc +++ b/lib/ui/painting/image_generator_registry.cc @@ -10,7 +10,7 @@ #include "third_party/skia/src/codec/SkCodecImageGenerator.h" #ifdef FML_OS_MACOSX #include "third_party/skia/include/ports/SkImageGeneratorCG.h" -#elif OS_WIN +#elif FML_OS_WIN #include "third_party/skia/include/ports/SkImageGeneratorWIC.h" #endif @@ -32,7 +32,7 @@ ImageGeneratorRegistry::ImageGeneratorRegistry() : weak_factory_(this) { std::move(generator)); }, 0); -#elif OS_WIN +#elif FML_OS_WIN AddFactory( [](sk_sp buffer) { auto generator = SkImageGeneratorWIC::MakeFromEncodedWIC(buffer); diff --git a/lib/ui/ui_dart_state.cc b/lib/ui/ui_dart_state.cc index 0aac768d61167..9284e6553ba05 100644 --- a/lib/ui/ui_dart_state.cc +++ b/lib/ui/ui_dart_state.cc @@ -13,7 +13,7 @@ #if defined(FML_OS_ANDROID) #include -#elif defined(OS_IOS) +#elif defined(FML_OS_IOS) extern "C" { // Cannot import the syslog.h header directly because of macro collision. extern void syslog(int, const char*, ...); @@ -219,7 +219,7 @@ void UIDartState::LogMessage(const std::string& tag, #if defined(FML_OS_ANDROID) __android_log_print(ANDROID_LOG_INFO, tag.c_str(), "%.*s", (int)message.size(), message.c_str()); -#elif defined(OS_IOS) +#elif defined(FML_OS_IOS) std::stringstream stream; if (tag.size() > 0) { stream << tag << ": "; diff --git a/runtime/dart_snapshot.cc b/runtime/dart_snapshot.cc index b875cbc48d2b7..657210586dc26 100644 --- a/runtime/dart_snapshot.cc +++ b/runtime/dart_snapshot.cc @@ -25,7 +25,7 @@ const char* DartSnapshot::kIsolateInstructionsSymbol = // data through symbols that are statically linked into the executable. // On other platforms this data is obtained by a dynamic symbol lookup. #define DART_SNAPSHOT_STATIC_LINK \ - ((OS_WIN || FML_OS_ANDROID) && FLUTTER_JIT_RUNTIME) + ((FML_OS_WIN || FML_OS_ANDROID) && FLUTTER_JIT_RUNTIME) #if !DART_SNAPSHOT_STATIC_LINK diff --git a/runtime/dart_vm.cc b/runtime/dart_vm.cc index 77bf094e960a3..59711aa0bc47c 100644 --- a/runtime/dart_vm.cc +++ b/runtime/dart_vm.cc @@ -221,7 +221,7 @@ static std::vector ProfilingFlags(bool enable_profiling) { // This instructs the profiler to walk C++ frames, and to include // them in the profile. "--profile-vm", -#if OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL +#if FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL // Set the profiler interrupt period to 500Hz instead of the // default 1000Hz on 32-bit iOS devices to reduce average and worst // case frame build times. @@ -232,7 +232,7 @@ static std::vector ProfilingFlags(bool enable_profiling) { "--profile_period=2000", #else "--profile_period=1000", -#endif // OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL +#endif // FML_OS_IOS && FML_ARCH_CPU_ARM_FAMILY && FML_ARCH_CPU_ARMEL }; } else { return {"--no-profiler"}; @@ -341,7 +341,7 @@ DartVM::DartVM(std::shared_ptr vm_data, #endif // !OS_FUCHSIA #if (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG) -#if !OS_IOS && !FML_OS_MACOSX +#if !FML_OS_IOS && !FML_OS_MACOSX // Debug mode uses the JIT, disable code page write protection to avoid // memory page protection changes before and after every compilation. PushBackAll(&args, kDartWriteProtectCodeArgs, @@ -361,7 +361,7 @@ DartVM::DartVM(std::shared_ptr vm_data, PushBackAll(&args, kDartDisableIntegerDivisionArgs, fml::size(kDartDisableIntegerDivisionArgs)); #endif // TARGET_CPU_ARM -#endif // !OS_IOS && !FML_OS_MACOSX +#endif // !FML_OS_IOS && !FML_OS_MACOSX #endif // (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG) if (enable_asserts) { diff --git a/runtime/ptrace_check.cc b/runtime/ptrace_check.cc index 56e5b15918d0a..c9baa6d9c5b1e 100644 --- a/runtime/ptrace_check.cc +++ b/runtime/ptrace_check.cc @@ -33,7 +33,7 @@ // Being extra careful and adding additional landmines that will prevent // compilation of this TU in an incorrect runtime mode. -static_assert(OS_IOS, "This translation unit is iOS specific."); +static_assert(FML_OS_IOS, "This translation unit is iOS specific."); static_assert(FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG, "This translation unit must only be compiled in the debug " "runtime mode as it " diff --git a/runtime/ptrace_check.h b/runtime/ptrace_check.h index e3e12a1e5da5c..2409808af654c 100644 --- a/runtime/ptrace_check.h +++ b/runtime/ptrace_check.h @@ -11,7 +11,7 @@ namespace flutter { #define TRACING_CHECKS_NECESSARY \ - OS_IOS && !TARGET_OS_SIMULATOR && \ + FML_OS_IOS && !TARGET_OS_SIMULATOR && \ (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG) enum class TracingResult { diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index a4850e3f64909..2271e109d0ded 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -20,11 +20,11 @@ #include "third_party/dart/runtime/include/dart_native_api.h" #if !defined(FLUTTER_NO_EXPORT) -#if OS_WIN +#if FML_OS_WIN #define FLUTTER_EXPORT __declspec(dllexport) -#else // OS_WIN +#else // FML_OS_WIN #define FLUTTER_EXPORT __attribute__((visibility("default"))) -#endif // OS_WIN +#endif // FML_OS_WIN #endif // !FLUTTER_NO_EXPORT extern "C" { @@ -95,7 +95,7 @@ static FlutterEngineResult LogEmbedderError(FlutterEngineResult code, const char* function, const char* file, int line) { -#if OS_WIN +#if FML_OS_WIN constexpr char kSeparator = '\\'; #else constexpr char kSeparator = '/'; @@ -183,18 +183,18 @@ static bool IsRendererValid(const FlutterRendererConfig* config) { return false; } -#if FML_OS_LINUX || OS_WIN +#if FML_OS_LINUX || FML_OS_WIN static void* DefaultGLProcResolver(const char* name) { static fml::RefPtr proc_library = #if FML_OS_LINUX fml::NativeLibrary::CreateForCurrentProcess(); -#elif OS_WIN // FML_OS_LINUX +#elif FML_OS_WIN // FML_OS_LINUX fml::NativeLibrary::Create("opengl32.dll"); -#endif // OS_WIN +#endif // FML_OS_WIN return static_cast( const_cast(proc_library->ResolveSymbol(name))); } -#endif // FML_OS_LINUX || OS_WIN +#endif // FML_OS_LINUX || FML_OS_WIN static flutter::Shell::CreateCallback InferOpenGLPlatformViewCreationCallback( @@ -284,7 +284,7 @@ InferOpenGLPlatformViewCreationCallback( return ptr(user_data, gl_proc_name); }; } else { -#if FML_OS_LINUX || OS_WIN +#if FML_OS_LINUX || FML_OS_WIN gl_proc_resolver = DefaultGLProcResolver; #endif } diff --git a/testing/debugger_detection.cc b/testing/debugger_detection.cc index 8ce2321763eac..daea74636d20f 100644 --- a/testing/debugger_detection.cc +++ b/testing/debugger_detection.cc @@ -15,9 +15,9 @@ #include #endif // FML_OS_MACOSX -#if OS_WIN +#if FML_OS_WIN #include -#endif // OS_WIN +#endif // FML_OS_WIN namespace flutter { namespace testing { @@ -54,7 +54,7 @@ DebuggerStatus GetDebuggerStatus() { return ((info.kp_proc.p_flag & P_TRACED) != 0) ? DebuggerStatus::kAttached : DebuggerStatus::kDontKnow; -#elif OS_WIN +#elif FML_OS_WIN return ::IsDebuggerPresent() ? DebuggerStatus::kAttached : DebuggerStatus::kDontKnow; diff --git a/testing/run_all_unittests.cc b/testing/run_all_unittests.cc index 5e6c934185912..e6baa80f37849 100644 --- a/testing/run_all_unittests.cc +++ b/testing/run_all_unittests.cc @@ -13,9 +13,9 @@ #include "flutter/testing/test_timeout_listener.h" #include "gtest/gtest.h" -#ifdef OS_IOS +#ifdef FML_OS_IOS #include -#endif // OS_IOS +#endif // FML_OS_IOS std::optional GetTestTimeoutFromArgs(int argc, char** argv) { const auto command_line = fml::CommandLineFromArgcArgv(argc, argv); @@ -37,12 +37,12 @@ std::optional GetTestTimeoutFromArgs(int argc, char** argv) { int main(int argc, char** argv) { fml::InstallCrashHandler(); -#ifdef OS_IOS +#ifdef FML_OS_IOS asl_log_descriptor(NULL, NULL, ASL_LEVEL_NOTICE, STDOUT_FILENO, ASL_LOG_DESCRIPTOR_WRITE); asl_log_descriptor(NULL, NULL, ASL_LEVEL_ERR, STDERR_FILENO, ASL_LOG_DESCRIPTOR_WRITE); -#endif // OS_IOS +#endif // FML_OS_IOS ::testing::InitGoogleTest(&argc, argv); diff --git a/testing/test_vulkan_context.cc b/testing/test_vulkan_context.cc index 73df59d813104..36c30989d08d0 100644 --- a/testing/test_vulkan_context.cc +++ b/testing/test_vulkan_context.cc @@ -8,7 +8,7 @@ #ifdef FML_OS_MACOSX #define VULKAN_SO_PATH "libvk_swiftshader.dylib" -#elif OS_WIN +#elif FML_OS_WIN #define VULKAN_SO_PATH "vk_swiftshader.dll" #else #define VULKAN_SO_PATH "libvk_swiftshader.so" From 7e28201475a17f241334c783c379310e855189bf Mon Sep 17 00:00:00 2001 From: Brandon DeRosier Date: Mon, 31 Jan 2022 13:44:42 -0800 Subject: [PATCH 2/2] Format --- fml/build_config.h | 4 ++-- runtime/ptrace_check.h | 2 +- shell/platform/embedder/embedder.cc | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fml/build_config.h b/fml/build_config.h index 29dfafa42a05d..3c7ebc9528d79 100644 --- a/fml/build_config.h +++ b/fml/build_config.h @@ -4,8 +4,8 @@ // This file adds defines about the platform we're currently building on. // Operating System: -// FML_OS_WIN / FML_OS_MACOSX / FML_OS_LINUX / FML_OS_POSIX (MACOSX or LINUX) / -// FML_OS_NACL (NACL_SFI or NACL_NONSFI) / FML_OS_NACL_SFI / +// FML_OS_WIN / FML_OS_MACOSX / FML_OS_LINUX / FML_OS_POSIX (MACOSX or LINUX) +// / FML_OS_NACL (NACL_SFI or NACL_NONSFI) / FML_OS_NACL_SFI / // FML_OS_NACL_NONSFI // Compiler: // COMPILER_MSVC / COMPILER_GCC diff --git a/runtime/ptrace_check.h b/runtime/ptrace_check.h index 2409808af654c..1c023bdb333de 100644 --- a/runtime/ptrace_check.h +++ b/runtime/ptrace_check.h @@ -10,7 +10,7 @@ namespace flutter { -#define TRACING_CHECKS_NECESSARY \ +#define TRACING_CHECKS_NECESSARY \ FML_OS_IOS && !TARGET_OS_SIMULATOR && \ (FLUTTER_RUNTIME_MODE == FLUTTER_RUNTIME_MODE_DEBUG) diff --git a/shell/platform/embedder/embedder.cc b/shell/platform/embedder/embedder.cc index 2271e109d0ded..838c4c496590a 100644 --- a/shell/platform/embedder/embedder.cc +++ b/shell/platform/embedder/embedder.cc @@ -190,7 +190,7 @@ static void* DefaultGLProcResolver(const char* name) { fml::NativeLibrary::CreateForCurrentProcess(); #elif FML_OS_WIN // FML_OS_LINUX fml::NativeLibrary::Create("opengl32.dll"); -#endif // FML_OS_WIN +#endif // FML_OS_WIN return static_cast( const_cast(proc_library->ResolveSymbol(name))); }