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

Side by Side Diff: chrome/browser/mac/closure_leopard_compat/block.h

Issue 7582032: Allow use of ^blocks, even with the 10.5 SDK, and even with a 10.5 runtime (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_MAC_CLOSURE_LEOPARD_COMPAT_BLOCK_H_
6 #define CHROME_BROWSER_MAC_CLOSURE_LEOPARD_COMPAT_BLOCK_H_
7 #pragma once
8
9 // __NSConcreteGlobalBlock is a private implementation detail of libclosure
10 // defined in libclosure/libclosure-38/Block_private.h, but it's exposed from
11 // libSystem as a public symbol, and the block-enabled compiler will emit code
12 // that references this symbol. Because the symbol is not present in 10.5's
13 // libSystem, it must be declared as a weak import in any file that uses
14 // blocks. Any block-using file must #include this header to guarantee that
15 // the symbol will show up in linked output as a weak import when compiling
16 // for a 10.5 deployment target. Because the symbol is always present in 10.6
17 // and higher, it does not need to be a weak import when the deployment target
18 // is at least 10.6.
19
20 #include <AvailabilityMacros.h>
21
22 #if MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_5 // DT <= 10.5
23
24 extern "C" {
25
26 __attribute__((weak_import)) extern void* _NSConcreteGlobalBlock[32];
Mark Mentovai 2011/08/08 18:30:21 Nico: FYI: References to _NSConcreteGlobalBlock ar
27
28 } // extern "C"
29
30 #endif // DT <= 10.5
31
32 #endif // CHROME_BROWSER_MAC_CLOSURE_LEOPARD_COMPAT_BLOCK_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698