mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-03-01 20:08:05 +00:00
Funnel all bootstrap_register calls through a routine that doesn't care that
it's deprecated. Apple marked bootstrap_register as deprecated on 10.5 but it's actually still needed on that OS release. There isn't a way to get the functionality Breakpad needs from it without calling it until 10.6. Review URL: https://breakpad.appspot.com/350001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@921 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
430c0a371a
commit
6fbc102794
|
@ -43,6 +43,12 @@
|
||||||
3329D4ED0FA16D820007BBC5 /* Breakpad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3329D4EC0FA16D820007BBC5 /* Breakpad.xib */; };
|
3329D4ED0FA16D820007BBC5 /* Breakpad.xib in Resources */ = {isa = PBXBuildFile; fileRef = 3329D4EC0FA16D820007BBC5 /* Breakpad.xib */; };
|
||||||
33880C800F9E097100817F82 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 33880C7E0F9E097100817F82 /* InfoPlist.strings */; };
|
33880C800F9E097100817F82 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 33880C7E0F9E097100817F82 /* InfoPlist.strings */; };
|
||||||
4084699D0F5D9CF900FDCA37 /* crash_report_sender.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */; };
|
4084699D0F5D9CF900FDCA37 /* crash_report_sender.icns in Resources */ = {isa = PBXBuildFile; fileRef = 4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */; };
|
||||||
|
4D61A25F14F43CFC002D5862 /* bootstrap_compat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */; };
|
||||||
|
4D61A26B14F43D3C002D5862 /* bootstrap_compat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */; };
|
||||||
|
4D61A26C14F43D42002D5862 /* bootstrap_compat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */; };
|
||||||
|
4D61A26D14F43D43002D5862 /* bootstrap_compat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */; };
|
||||||
|
4D61A26E14F43D45002D5862 /* bootstrap_compat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */; };
|
||||||
|
4D61A26F14F43D48002D5862 /* bootstrap_compat.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */; };
|
||||||
4D72CA0E13DFAD5C006CABE3 /* md5.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.cc */; };
|
4D72CA0E13DFAD5C006CABE3 /* md5.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.cc */; };
|
||||||
4D72CA2513DFAE1C006CABE3 /* md5.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.cc */; };
|
4D72CA2513DFAE1C006CABE3 /* md5.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.cc */; };
|
||||||
4D72CA2F13DFAE65006CABE3 /* md5.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.cc */; };
|
4D72CA2F13DFAE65006CABE3 /* md5.cc in Sources */ = {isa = PBXBuildFile; fileRef = 4D72CA0D13DFAD5C006CABE3 /* md5.cc */; };
|
||||||
|
@ -558,6 +564,8 @@
|
||||||
3329D4EC0FA16D820007BBC5 /* Breakpad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Breakpad.xib; path = sender/Breakpad.xib; sourceTree = "<group>"; };
|
3329D4EC0FA16D820007BBC5 /* Breakpad.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Breakpad.xib; path = sender/Breakpad.xib; sourceTree = "<group>"; };
|
||||||
33880C7F0F9E097100817F82 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = sender/English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
33880C7F0F9E097100817F82 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = sender/English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = crash_report_sender.icns; path = sender/crash_report_sender.icns; sourceTree = "<group>"; };
|
4084699C0F5D9CF900FDCA37 /* crash_report_sender.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; name = crash_report_sender.icns; path = sender/crash_report_sender.icns; sourceTree = "<group>"; };
|
||||||
|
4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bootstrap_compat.cc; path = ../../common/mac/bootstrap_compat.cc; sourceTree = SOURCE_ROOT; };
|
||||||
|
4D61A25E14F43CFC002D5862 /* bootstrap_compat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = bootstrap_compat.h; path = ../../common/mac/bootstrap_compat.h; sourceTree = SOURCE_ROOT; };
|
||||||
4D72CA0D13DFAD5C006CABE3 /* md5.cc */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; name = md5.cc; path = ../../common/md5.cc; sourceTree = SOURCE_ROOT; };
|
4D72CA0D13DFAD5C006CABE3 /* md5.cc */ = {isa = PBXFileReference; explicitFileType = sourcecode.cpp.cpp; fileEncoding = 4; name = md5.cc; path = ../../common/md5.cc; sourceTree = SOURCE_ROOT; };
|
||||||
4DBE4769134A4F080072546A /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
|
4DBE4769134A4F080072546A /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = System/Library/Frameworks/CoreServices.framework; sourceTree = SDKROOT; };
|
||||||
8B31007011F0CD3C00FCF3E4 /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMDefines.h; path = ../../common/mac/GTMDefines.h; sourceTree = SOURCE_ROOT; };
|
8B31007011F0CD3C00FCF3E4 /* GTMDefines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GTMDefines.h; path = ../../common/mac/GTMDefines.h; sourceTree = SOURCE_ROOT; };
|
||||||
|
@ -943,6 +951,8 @@
|
||||||
F92C53770ECCE635009BE4BA /* HTTPMultipartUpload.m */,
|
F92C53770ECCE635009BE4BA /* HTTPMultipartUpload.m */,
|
||||||
F92C53780ECCE635009BE4BA /* MachIPC.h */,
|
F92C53780ECCE635009BE4BA /* MachIPC.h */,
|
||||||
F92C53790ECCE635009BE4BA /* MachIPC.mm */,
|
F92C53790ECCE635009BE4BA /* MachIPC.mm */,
|
||||||
|
4D61A25D14F43CFC002D5862 /* bootstrap_compat.cc */,
|
||||||
|
4D61A25E14F43CFC002D5862 /* bootstrap_compat.h */,
|
||||||
F92C537A0ECCE635009BE4BA /* macho_id.cc */,
|
F92C537A0ECCE635009BE4BA /* macho_id.cc */,
|
||||||
F92C537B0ECCE635009BE4BA /* macho_id.h */,
|
F92C537B0ECCE635009BE4BA /* macho_id.h */,
|
||||||
F92C537C0ECCE635009BE4BA /* macho_utilities.cc */,
|
F92C537C0ECCE635009BE4BA /* macho_utilities.cc */,
|
||||||
|
@ -1679,6 +1689,7 @@
|
||||||
D24641A012BAA67F005170D0 /* macho_walker.cc in Sources */,
|
D24641A012BAA67F005170D0 /* macho_walker.cc in Sources */,
|
||||||
D24641AF12BAA82D005170D0 /* macho_utilities.cc in Sources */,
|
D24641AF12BAA82D005170D0 /* macho_utilities.cc in Sources */,
|
||||||
4D72CA2513DFAE1C006CABE3 /* md5.cc in Sources */,
|
4D72CA2513DFAE1C006CABE3 /* md5.cc in Sources */,
|
||||||
|
4D61A26C14F43D42002D5862 /* bootstrap_compat.cc in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1717,6 +1728,7 @@
|
||||||
D24641EE12BAC6FB005170D0 /* pathname_stripper.cc in Sources */,
|
D24641EE12BAC6FB005170D0 /* pathname_stripper.cc in Sources */,
|
||||||
D24641EF12BAC6FB005170D0 /* basic_code_modules.cc in Sources */,
|
D24641EF12BAC6FB005170D0 /* basic_code_modules.cc in Sources */,
|
||||||
4D72CA3913DFAE92006CABE3 /* md5.cc in Sources */,
|
4D72CA3913DFAE92006CABE3 /* md5.cc in Sources */,
|
||||||
|
4D61A26F14F43D48002D5862 /* bootstrap_compat.cc in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1727,6 +1739,7 @@
|
||||||
F92C53B80ECCE7B3009BE4BA /* Inspector.mm in Sources */,
|
F92C53B80ECCE7B3009BE4BA /* Inspector.mm in Sources */,
|
||||||
F9286B3A0F7EB25800A4DCC8 /* InspectorMain.mm in Sources */,
|
F9286B3A0F7EB25800A4DCC8 /* InspectorMain.mm in Sources */,
|
||||||
163201E31443029300C4DBF5 /* ConfigFile.mm in Sources */,
|
163201E31443029300C4DBF5 /* ConfigFile.mm in Sources */,
|
||||||
|
4D61A26B14F43D3C002D5862 /* bootstrap_compat.cc in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1748,6 +1761,7 @@
|
||||||
F92C56480ECD10CA009BE4BA /* SimpleStringDictionary.mm in Sources */,
|
F92C56480ECD10CA009BE4BA /* SimpleStringDictionary.mm in Sources */,
|
||||||
F92C56490ECD10CA009BE4BA /* string_utilities.cc in Sources */,
|
F92C56490ECD10CA009BE4BA /* string_utilities.cc in Sources */,
|
||||||
F92C564A0ECD10CA009BE4BA /* string_conversion.cc in Sources */,
|
F92C564A0ECD10CA009BE4BA /* string_conversion.cc in Sources */,
|
||||||
|
4D61A25F14F43CFC002D5862 /* bootstrap_compat.cc in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1787,6 +1801,7 @@
|
||||||
F93803D70F8083B7004D428B /* string_utilities.cc in Sources */,
|
F93803D70F8083B7004D428B /* string_utilities.cc in Sources */,
|
||||||
D23F4B2E12A7E13200686C8D /* minidump_generator_test.cc in Sources */,
|
D23F4B2E12A7E13200686C8D /* minidump_generator_test.cc in Sources */,
|
||||||
4D72CA2F13DFAE65006CABE3 /* md5.cc in Sources */,
|
4D72CA2F13DFAE65006CABE3 /* md5.cc in Sources */,
|
||||||
|
4D61A26D14F43D43002D5862 /* bootstrap_compat.cc in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
@ -1827,6 +1842,7 @@
|
||||||
D2F9A3D51212F87C002747C1 /* exception_handler_test.cc in Sources */,
|
D2F9A3D51212F87C002747C1 /* exception_handler_test.cc in Sources */,
|
||||||
D244540B12439BA0009BBCE0 /* memory_unittest.cc in Sources */,
|
D244540B12439BA0009BBCE0 /* memory_unittest.cc in Sources */,
|
||||||
4D72CA3813DFAE91006CABE3 /* md5.cc in Sources */,
|
4D72CA3813DFAE91006CABE3 /* md5.cc in Sources */,
|
||||||
|
4D61A26E14F43D45002D5862 /* bootstrap_compat.cc in Sources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -28,7 +28,9 @@
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#import "OnDemandServer.h"
|
#import "OnDemandServer.h"
|
||||||
|
|
||||||
#import "Breakpad.h"
|
#import "Breakpad.h"
|
||||||
|
#include "common/mac/bootstrap_compat.h"
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
#define PRINT_MACH_RESULT(result_, message_) \
|
#define PRINT_MACH_RESULT(result_, message_) \
|
||||||
|
@ -100,7 +102,8 @@ kern_return_t OnDemandServer::Initialize(const char *server_command,
|
||||||
// in the subset by registering it under a known name. The inspector will
|
// in the subset by registering it under a known name. The inspector will
|
||||||
// recover this port and set it as its own bootstrap port in Inspector.mm
|
// recover this port and set it as its own bootstrap port in Inspector.mm
|
||||||
// Inspector::ResetBootstrapPort.
|
// Inspector::ResetBootstrapPort.
|
||||||
kr = bootstrap_register(bootstrap_subset_port,
|
kr = breakpad::BootstrapRegister(
|
||||||
|
bootstrap_subset_port,
|
||||||
const_cast<char*>(BREAKPAD_BOOTSTRAP_PARENT_PORT),
|
const_cast<char*>(BREAKPAD_BOOTSTRAP_PARENT_PORT),
|
||||||
bootstrap_port);
|
bootstrap_port);
|
||||||
if (kr != BOOTSTRAP_SUCCESS) {
|
if (kr != BOOTSTRAP_SUCCESS) {
|
||||||
|
@ -169,7 +172,7 @@ void OnDemandServer::Unregister() {
|
||||||
|
|
||||||
if (server_port_ != MACH_PORT_NULL) {
|
if (server_port_ != MACH_PORT_NULL) {
|
||||||
// unregister the service
|
// unregister the service
|
||||||
kern_return_t kr = bootstrap_register(server_port_,
|
kern_return_t kr = breakpad::BootstrapRegister(server_port_,
|
||||||
service_name_,
|
service_name_,
|
||||||
MACH_PORT_NULL);
|
MACH_PORT_NULL);
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
|
|
||||||
#import "common/mac/SimpleStringDictionary.h"
|
#import "common/mac/SimpleStringDictionary.h"
|
||||||
#import "common/mac/MachIPC.h"
|
#import "common/mac/MachIPC.h"
|
||||||
|
#include "common/mac/bootstrap_compat.h"
|
||||||
|
|
||||||
#import "GTMDefines.h"
|
#import "GTMDefines.h"
|
||||||
|
|
||||||
|
@ -174,7 +175,7 @@ kern_return_t Inspector::ServiceCheckOut(const char *receive_port_name) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unregister the service associated with the receive port.
|
// Unregister the service associated with the receive port.
|
||||||
kr = bootstrap_register(bootstrap_subset_port_,
|
kr = breakpad::BootstrapRegister(bootstrap_subset_port_,
|
||||||
(char*)receive_port_name,
|
(char*)receive_port_name,
|
||||||
MACH_PORT_NULL);
|
MACH_PORT_NULL);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@
|
||||||
|
|
||||||
#import <stdio.h>
|
#import <stdio.h>
|
||||||
#import "MachIPC.h"
|
#import "MachIPC.h"
|
||||||
|
#include "common/mac/bootstrap_compat.h"
|
||||||
|
|
||||||
namespace google_breakpad {
|
namespace google_breakpad {
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
|
@ -187,7 +188,8 @@ ReceivePort::ReceivePort(const char *receive_port_name) {
|
||||||
if (init_result_ != KERN_SUCCESS)
|
if (init_result_ != KERN_SUCCESS)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
init_result_ = bootstrap_register(bootstrap_port,
|
init_result_ = breakpad::BootstrapRegister(
|
||||||
|
bootstrap_port,
|
||||||
const_cast<char*>(receive_port_name),
|
const_cast<char*>(receive_port_name),
|
||||||
port_);
|
port_);
|
||||||
}
|
}
|
||||||
|
|
42
src/common/mac/bootstrap_compat.cc
Normal file
42
src/common/mac/bootstrap_compat.cc
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
// Copyright (c) 2012, Google Inc.
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are
|
||||||
|
// met:
|
||||||
|
//
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following disclaimer
|
||||||
|
// in the documentation and/or other materials provided with the
|
||||||
|
// distribution.
|
||||||
|
// * Neither the name of Google Inc. nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived from
|
||||||
|
// this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#include "common/mac/bootstrap_compat.h"
|
||||||
|
|
||||||
|
namespace breakpad {
|
||||||
|
|
||||||
|
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
|
||||||
|
kern_return_t BootstrapRegister(mach_port_t bp,
|
||||||
|
name_t service_name,
|
||||||
|
mach_port_t sp) {
|
||||||
|
return bootstrap_register(bp, service_name, sp);
|
||||||
|
}
|
||||||
|
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
|
||||||
|
|
||||||
|
} // namesapce breakpad
|
54
src/common/mac/bootstrap_compat.h
Normal file
54
src/common/mac/bootstrap_compat.h
Normal file
|
@ -0,0 +1,54 @@
|
||||||
|
// Copyright (c) 2012, Google Inc.
|
||||||
|
// All rights reserved.
|
||||||
|
//
|
||||||
|
// Redistribution and use in source and binary forms, with or without
|
||||||
|
// modification, are permitted provided that the following conditions are
|
||||||
|
// met:
|
||||||
|
//
|
||||||
|
// * Redistributions of source code must retain the above copyright
|
||||||
|
// notice, this list of conditions and the following disclaimer.
|
||||||
|
// * Redistributions in binary form must reproduce the above
|
||||||
|
// copyright notice, this list of conditions and the following disclaimer
|
||||||
|
// in the documentation and/or other materials provided with the
|
||||||
|
// distribution.
|
||||||
|
// * Neither the name of Google Inc. nor the names of its
|
||||||
|
// contributors may be used to endorse or promote products derived from
|
||||||
|
// this software without specific prior written permission.
|
||||||
|
//
|
||||||
|
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||||
|
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||||
|
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||||
|
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||||
|
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||||
|
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||||
|
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#ifndef COMMON_MAC_BOOTSTRAP_COMPAT_H_
|
||||||
|
#define COMMON_MAC_BOOTSTRAP_COMPAT_H_
|
||||||
|
|
||||||
|
#include <servers/bootstrap.h>
|
||||||
|
|
||||||
|
namespace breakpad {
|
||||||
|
|
||||||
|
// Wrapper for bootstrap_register to avoid deprecation warnings.
|
||||||
|
//
|
||||||
|
// In 10.6, it's possible to call bootstrap_check_in as the one-stop-shop for
|
||||||
|
// handling what bootstrap_register is used for. In 10.5, bootstrap_check_in
|
||||||
|
// can't check in a service whose name has not yet been registered, despite
|
||||||
|
// bootstrap_register being marked as deprecated in that OS release. Breakpad
|
||||||
|
// needs to register new service names, and in 10.5, calling
|
||||||
|
// bootstrap_register is the only way to achieve that. Attempts to call
|
||||||
|
// bootstrap_check_in for a new service name on 10.5 will result in
|
||||||
|
// BOOTSTRAP_UNKNOWN_SERVICE being returned rather than registration of the
|
||||||
|
// new service name.
|
||||||
|
kern_return_t BootstrapRegister(mach_port_t bp,
|
||||||
|
name_t service_name,
|
||||||
|
mach_port_t sp);
|
||||||
|
|
||||||
|
} // namespace breakpad
|
||||||
|
|
||||||
|
#endif // COMMON_MAC_BOOTSTRAP_COMPAT_H_
|
Loading…
Reference in a new issue