Use OS_WIN, not OS_WINDOWS; provide crashpad_types traits for Fuchsia

The incorrect macro was used in f4b906c79c02 (at my request when I was
reviewing from a phone).

The Windows and Fuchsia builds are broken, so…

TBR: epastor@google.com
Change-Id: I8aebbbc24db261f3c3377210bb1c477132964828
Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2270920
Commit-Queue: Mark Mentovai <mark@chromium.org>
Reviewed-by: Mark Mentovai <mark@chromium.org>
This commit is contained in:
Mark Mentovai 2020-06-27 00:42:33 -04:00 committed by Commit Bot
parent f4b906c79c
commit 09d1df04bf
3 changed files with 36 additions and 1 deletions

View File

@ -20,10 +20,12 @@
#include "client/crashpad_info.h"
#include "util/misc/as_underlying_type.h"
#if defined(OS_WINDOWS)
#if defined(OS_WIN)
#include "util/win/traits.h"
#elif defined(OS_LINUX) || defined(OS_ANDROID)
#include "util/linux/traits.h"
#elif defined(OS_FUCHSIA)
#include "util/fuchsia/traits.h"
#endif
namespace crashpad {

View File

@ -544,6 +544,7 @@ static_library("util") {
"fuchsia/koid_utilities.h",
"fuchsia/scoped_task_suspend.cc",
"fuchsia/scoped_task_suspend.h",
"fuchsia/traits.h",
"misc/capture_context_fuchsia.S",
"misc/paths_fuchsia.cc",
"process/process_memory_fuchsia.cc",

32
util/fuchsia/traits.h Normal file
View File

@ -0,0 +1,32 @@
// Copyright 2020 The Crashpad Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef CRASHPAD_UTIL_FUCHSIA_TRAITS_H_
#define CRASHPAD_UTIL_FUCHSIA_TRAITS_H_
#include <stdint.h>
namespace crashpad {
struct Traits32 {
using Address = uint32_t;
};
struct Traits64 {
using Address = uint64_t;
};
} // namespace crashpad
#endif // CRASHPAD_UTIL_FUCHSIA_TRAITS_H_