Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1233)

Side by Side Diff: compat/mac/mach-o/getsect.h

Issue 561933004: 10.6 SDK compatibility (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « compat/compat.gyp ('k') | compat/mac/mach-o/getsect.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 The Crashpad Authors. All rights reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 #ifndef CRASHPAD_COMPAT_MAC_MACH_O_GETSECT_H_
16 #define CRASHPAD_COMPAT_MAC_MACH_O_GETSECT_H_
17
18 #include_next <mach-o/getsect.h>
19
20 #include <AvailabilityMacros.h>
21
22 // This file checks the SDK instead of the deployment target. The SDK is correct
23 // because this file is concerned with providing compile-time declarations,
24 // which are either present in a specific SDK version or not.
25
26 #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
27
28 #include <mach-o/loader.h>
29 #include <stdint.h>
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 // Don’t use a typedef to account for the mach_header/mach_header_64 difference
36 // between the 32-bit and 64-bit versions of getsectiondata() and
37 // getsegmentdata(). This file should be faithfully equivalent to the native
38 // SDK, and adding typedefs here would pollute the namespace in a way that the
39 // native SDK does not.
40
41 #if !defined(__LP64__)
42
43 uint8_t* getsectiondata(const struct mach_header* mhp,
44 const char* segname,
45 const char* sectname,
46 unsigned long* size);
47
48 uint8_t* getsegmentdata(
49 const struct mach_header* mhp, const char* segname, unsigned long* size);
50
51 #else
52
53 uint8_t* getsectiondata(const struct mach_header_64* mhp,
54 const char* segname,
55 const char* sectname,
56 unsigned long* size);
57
58 uint8_t* getsegmentdata(
59 const struct mach_header_64* mhp, const char* segname, unsigned long* size);
60
61 #endif
62
63 #ifdef __cplusplus
64 } // extern "C"
65 #endif
66
67 #endif // MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
68
69 #endif // CRASHPAD_COMPAT_MAC_MACH_O_GETSECT_H_
OLDNEW
« no previous file with comments | « compat/compat.gyp ('k') | compat/mac/mach-o/getsect.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698