diff options
author | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 17:31:25 +0000 |
---|---|---|
committer | mark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-09-16 17:31:25 +0000 |
commit | 3224dcddf987d47154c3232d1974a9d4ba517c8a (patch) | |
tree | 4f2a9c21f2f44550b76340c3bcc5b88dc79c1940 /base/compat_execinfo.h | |
parent | 48c70517e3bb914c4157e27fb0d70492f4f76cbe (diff) | |
download | chromium_src-3224dcddf987d47154c3232d1974a9d4ba517c8a.zip chromium_src-3224dcddf987d47154c3232d1974a9d4ba517c8a.tar.gz chromium_src-3224dcddf987d47154c3232d1974a9d4ba517c8a.tar.bz2 |
Use MAC_OS_X_DEPLOYMENT_TARGET instead of rolling our own macro.
Allow the deployment target and SDK to be overridden by GYP variables.
Review URL: http://codereview.chromium.org/193128
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@26360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/compat_execinfo.h')
-rw-r--r-- | base/compat_execinfo.h | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/base/compat_execinfo.h b/base/compat_execinfo.h index 472fa5e..c615cf2 100644 --- a/base/compat_execinfo.h +++ b/base/compat_execinfo.h @@ -1,29 +1,33 @@ // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// -// A file you can include instead of <execinfo.h> if your project might have -// been compiled with our SUPPORT_MACOSX_10_4 flag defined. -// If SUPPORT_MACOSX_10_4 is not defined it just includes execinfo.h as normal, -// otherwise it defines the symbols itself as weak linked imports, which enables -// launching on 10.4 where they are not defined. + +// A file you can include instead of <execinfo.h> if your project might need +// to run on Mac OS X 10.4. #ifndef BASE_COMPAT_EXECINFO_H #define BASE_COMPAT_EXECINFO_H -#ifdef SUPPORT_MACOSX_10_4 +#include "build/build_config.h" + +#if defined(OS_MACOSX) +#include <AvailabilityMacros.h> +#endif + +#if defined(OS_MACOSX) && MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5 // Manually define these here as weak imports, rather than including execinfo.h. // This lets us launch on 10.4 which does not have these calls. extern "C" { - extern int backtrace(void**, int) __attribute__((weak_import)); - extern char** backtrace_symbols(void* const*, int) - __attribute__((weak_import)); - extern void backtrace_symbols_fd(void* const*, int, int) - __attribute__((weak_import)); -} + +extern int backtrace(void**, int) __attribute__((weak_import)); +extern char** backtrace_symbols(void* const*, int) + __attribute__((weak_import)); +extern void backtrace_symbols_fd(void* const*, int, int) + __attribute__((weak_import)); + +} // extern "C" #else #include <execinfo.h> #endif -#endif // BASE_COMPAT_EXECINFO_H - +#endif // BASE_COMPAT_EXECINFO_H |