diff options
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/config/os/bsd/darwin/os_defines.h | 138 | ||||
-rwxr-xr-x | libstdc++-v3/configure | 15 | ||||
-rw-r--r-- | libstdc++-v3/configure.ac | 11 | ||||
-rw-r--r-- | libstdc++-v3/configure.host | 4 | ||||
-rw-r--r-- | libstdc++-v3/include/std/std_fstream.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/eh_alloc.cc | 8 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/eh_globals.cc | 44 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/eh_terminate.cc | 47 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/new_handler.cc | 20 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/new_op.cc | 25 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/new_opnt.cc | 13 | ||||
-rw-r--r-- | libstdc++-v3/libsupc++/pure.cc | 12 |
12 files changed, 303 insertions, 40 deletions
diff --git a/libstdc++-v3/config/os/bsd/darwin/os_defines.h b/libstdc++-v3/config/os/bsd/darwin/os_defines.h index 07fb55b6125..bbe2000c8e5 100644 --- a/libstdc++-v3/config/os/bsd/darwin/os_defines.h +++ b/libstdc++-v3/config/os/bsd/darwin/os_defines.h @@ -44,4 +44,142 @@ // -flat_namespace to work around the way that it doesn't. #define _GLIBCXX_WEAK_DEFINITION __attribute__ ((weak)) +/* APPLE LOCAL begin keymgr */ +/* Copyright (C) 1989, 92-97, 1998, Free Software Foundation, Inc. + +This file is part of GNU CC. + +GNU CC is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU CC is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU CC; see the file COPYING. If not, write to +the Free Software Foundation, 59 Temple Place - Suite 330, +Boston, MA 02111-1307, USA. */ + + +/* + * This file added by Apple Computer Inc. for its OS X + * environment. + */ + +#ifndef __KEYMGR_H +#define __KEYMGR_H + +#ifdef __cplusplus +extern "C" { +#endif + + + +/* + * keymgr - Create and maintain process-wide global data known to + * all threads across all dynamic libraries. + * + */ + +typedef enum node_kinds { + NODE_THREAD_SPECIFIC_DATA=1, + NODE_PROCESSWIDE_PTR=2, + NODE_LAST_KIND + } TnodeKind ; + +/* + * These enum members are bits or combination of bits. + */ + +typedef enum node_mode { + NM_ALLOW_RECURSION=1, + NM_RECURSION_ILLEGAL=2, + NM_ENHANCED_LOCKING=3, + NM_LOCKED=4 + } TnodeMode ; + +/* WARNING: the return value of _keymgr_set_per_thread_data is + not meaningful on Tiger and above. Use the macro + KEYMGR_SET_PER_THREAD_DATA (below) to handle this properly. */ +extern void * _keymgr_get_per_thread_data(unsigned int key) ; +extern int _keymgr_set_per_thread_data(unsigned int key, void *keydata) ; +extern void *_keymgr_get_and_lock_processwide_ptr(unsigned int key) ; +extern void _keymgr_set_and_unlock_processwide_ptr(unsigned int key, void *ptr) ; +extern void _keymgr_unlock_processwide_ptr(unsigned int key) ; +extern void _keymgr_set_lockmode_processwide_ptr(unsigned int key, unsigned int mode) ; +extern unsigned int _keymgr_get_lockmode_processwide_ptr(unsigned int key) ; +extern int _keymgr_get_lock_count_processwide_ptr(unsigned int key) ; + +extern void *__keymgr_global[]; +typedef struct _Sinfo_Node { + unsigned int size ; /*size of this node*/ + unsigned short major_version ; /*API major version.*/ + unsigned short minor_version ; /*API minor version.*/ + } _Tinfo_Node ; + +#define KEYMGR_VERSION \ + (__keymgr_global[2] ? ((_Tinfo_Node *)__keymgr_global[2])->major_version : 0) + +#define KEYMGR_SET_PER_THREAD_DATA(key, keydata) \ + (KEYMGR_VERSION >= 4 \ + ? _keymgr_set_per_thread_data((key), (keydata)) \ + : (_keymgr_set_per_thread_data((key), (keydata)), 0)) + +#ifndef NULL +#ifdef __GNUG__ +#define NULL __null +#else +#define NULL 0 +#endif +#endif + +/* + * Keys currently in use: + */ + +#define KEYMGR_EH_CONTEXT_KEY 1 /*stores handle for root pointer of exception context node.*/ + +#define KEYMGR_NEW_HANLDER_KEY 2 /*store handle for new handler pointer.*/ + +#define KEYMGR_UNEXPECTED_HANDLER_KEY 3 /*store handle for unexpected exception pointer.*/ + +#define KEYMGR_TERMINATE_HANDLER_KEY 4 /*store handle for terminate handler pointer. */ + +#define KEYMGR_MODE_BITS 5 /*stores handle for runtime mode bits.*/ + +#define KEYMGR_IO_LIST 6 /*Root pointer to the list of open streams.*/ + +#define KEYMGR_IO_STDIN 7 /*GNU stdin.*/ + +#define KEYMGR_IO_STDOUT 8 /*GNU stdout.*/ + +#define KEYMGR_IO_STDERR 9 /*GNU stderr.*/ + +#define KEYMGR_IO_REFCNT 10 /*How many plugins/main program currently using streams.*/ + +#define KEYMGR_IO_MODE_BITS 11 /*Flags controlling the behavior of C++ I/O.*/ + +#define KEYMGR_ZOE_IMAGE_LIST 12 /*Head pointer for list of per image dwarf2 unwind sections.*/ + +#define KEYMGR_EH_GLOBALS_KEY 13 /* Variable used in eh_globals.cc */ + +/* + * Other important data. + */ + +#define KEYMGR_API_REV_MAJOR 2 /*Major revision number of the keymgr API.*/ +#define KEYMGR_API_REV_MINOR 1 /*Minor revision number of the keymgr API.*/ + + + +#ifdef __cplusplus +} +#endif + +#endif /* __KEYMGR_H */ +/* APPLE LOCAL end keymgr */ #endif diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index 2d5016a374a..648514f3727 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -1544,7 +1544,16 @@ if test "$build" != "$host"; then GLIBCXX_IS_NATIVE=false else - GLIBCXX_IS_NATIVE=true + # APPLE LOCAL begin 64-bit + case "$target" in + powerpc-apple-darwin8*) + GLIBCXX_IS_NATIVE=false + cross_compiling=yes + ;; + *) + GLIBCXX_IS_NATIVE=true ;; + esac + # APPLE LOCAL end 64-bit fi # Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the @@ -4390,7 +4399,7 @@ test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic" case $host in *-*-irix6*) # Find out which ABI we are using. - echo '#line 4393 "configure"' > conftest.$ac_ext + echo '#line 4402 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -5011,7 +5020,7 @@ fi; # # Fake what AC_TRY_COMPILE does. XXX Look at redoing this new-style. cat > conftest.$ac_ext << EOF -#line 5014 "configure" +#line 5023 "configure" struct S { ~S(); }; void bar(); void foo() diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index 5d0a54f9c4c..e0e55ad70b2 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -44,7 +44,16 @@ if test "$build" != "$host"; then GLIBCXX_IS_NATIVE=false GCC_NO_EXECUTABLES else - GLIBCXX_IS_NATIVE=true + # APPLE LOCAL begin 64-bit + case "$target" in + powerpc-apple-darwin8*) + GLIBCXX_IS_NATIVE=false + cross_compiling=yes + ;; + *) + GLIBCXX_IS_NATIVE=true ;; + esac + # APPLE LOCAL end 64-bit fi # Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the diff --git a/libstdc++-v3/configure.host b/libstdc++-v3/configure.host index b3582a41d79..c1c063ee1f9 100644 --- a/libstdc++-v3/configure.host +++ b/libstdc++-v3/configure.host @@ -180,12 +180,16 @@ case "${host_os}" in # treatment of coalesced symbols. OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module -Wl,-flat_namespace" os_include_dir="os/bsd/darwin" + # APPLE LOCAL darwin native radar 3729768 + enable_cxx_flags="-DAPPLE_KEYMGR $enable_cxx_flags" ;; darwin[89] | darwin[89].* | darwin[1-9][0-9]* ) # On Darwin, performance is improved if libstdc++ is single-module, # and on 8+ compatibility is better if not -flat_namespace. OPT_LDFLAGS="${OPT_LDFLAGS} -Wl,-single_module" os_include_dir="os/bsd/darwin" + # APPLE LOCAL darwin native radar 3729768 + enable_cxx_flags="-DAPPLE_KEYMGR $enable_cxx_flags" ;; *djgpp*) # leading * picks up "msdosdjgpp" os_include_dir="os/djgpp" diff --git a/libstdc++-v3/include/std/std_fstream.h b/libstdc++-v3/include/std/std_fstream.h index ed119d4c8ea..6993042eb60 100644 --- a/libstdc++-v3/include/std/std_fstream.h +++ b/libstdc++-v3/include/std/std_fstream.h @@ -414,7 +414,8 @@ namespace std typedef basic_istream<char_type, traits_type> __istream_type; private: - __filebuf_type _M_filebuf; + /* APPLE LOCAL work with -malign-natural. */ + __filebuf_type _M_filebuf __attribute((aligned(8))); public: // Constructors/Destructors: @@ -538,7 +539,8 @@ namespace std typedef basic_ostream<char_type, traits_type> __ostream_type; private: - __filebuf_type _M_filebuf; + /* APPLE LOCAL work with -malign-natural. */ + __filebuf_type _M_filebuf __attribute__((aligned(8))); public: // Constructors: diff --git a/libstdc++-v3/libsupc++/eh_alloc.cc b/libstdc++-v3/libsupc++/eh_alloc.cc index 4728bcbf380..64a36f9e95a 100644 --- a/libstdc++-v3/libsupc++/eh_alloc.cc +++ b/libstdc++-v3/libsupc++/eh_alloc.cc @@ -77,6 +77,14 @@ using namespace __cxxabiv1; # define EMERGENCY_OBJ_COUNT 4 #endif +/* APPLE LOCAL begin reduce emergency buffer size */ +/* 256 bytes is more than large enough for an std::bad_alloc object */ +#undef EMERGENCY_OBJ_SIZE +#undef EMERGENCY_OBJ_COUNT +#define EMERGENCY_OBJ_SIZE 256 +#define EMERGENCY_OBJ_COUNT 2 +/* APPLE LOCAL end reduce emergency buffer size */ + #if INT_MAX == 32767 || EMERGENCY_OBJ_COUNT <= 32 typedef unsigned int bitmask_type; #else diff --git a/libstdc++-v3/libsupc++/eh_globals.cc b/libstdc++-v3/libsupc++/eh_globals.cc index 0f0dee58d45..3243e2ae414 100644 --- a/libstdc++-v3/libsupc++/eh_globals.cc +++ b/libstdc++-v3/libsupc++/eh_globals.cc @@ -41,41 +41,15 @@ using namespace __cxxabiv1; static __cxa_eh_globals globals_static; #if __GTHREADS -static __gthread_key_t globals_key; +/* APPLE LOCAL begin radar 3373515 */ static int use_thread_key = -1; static void -get_globals_dtor (void *ptr) -{ - if (ptr) - { - __cxa_exception *exn, *next; - exn = ((__cxa_eh_globals *) ptr)->caughtExceptions; - while (exn) - { - next = exn->nextException; - _Unwind_DeleteException (&exn->unwindHeader); - exn = next; - } - std::free (ptr); - } -} - -static void -get_globals_init () -{ - use_thread_key = - (__gthread_key_create (&globals_key, get_globals_dtor) == 0); -} - -static void get_globals_init_once () { - static __gthread_once_t once = __GTHREAD_ONCE_INIT; - if (__gthread_once (&once, get_globals_init) != 0 - || use_thread_key < 0) - use_thread_key = 0; + use_thread_key = 1; } +/* APPLE LOCAL end radar 3373515 */ #endif extern "C" __cxa_eh_globals * @@ -83,7 +57,9 @@ __cxxabiv1::__cxa_get_globals_fast () throw() { #if __GTHREADS if (use_thread_key) - return (__cxa_eh_globals *) __gthread_getspecific (globals_key); + /* APPLE LOCAL begin radar 3373515 */ + return (__cxa_eh_globals *) _keymgr_get_per_thread_data (KEYMGR_EH_GLOBALS_KEY); + /* APPLE LOCAL end radar 3373515 */ else return &globals_static; #else @@ -109,12 +85,16 @@ __cxxabiv1::__cxa_get_globals () throw() return &globals_static; } - g = (__cxa_eh_globals *) __gthread_getspecific (globals_key); + /* APPLE LOCAL begin radar 3373515 */ + g = (__cxa_eh_globals *) _keymgr_get_per_thread_data (KEYMGR_EH_GLOBALS_KEY); + /* APPLE LOCAL end radar 3373515 */ if (! g) { if ((g = (__cxa_eh_globals *) std::malloc (sizeof (__cxa_eh_globals))) == 0 - || __gthread_setspecific (globals_key, (void *) g) != 0) + /* APPLE LOCAL begin radar 3373515 */ + || KEYMGR_SET_PER_THREAD_DATA (KEYMGR_EH_GLOBALS_KEY, (void *) g) != 0) + /* APPLE LOCAL end radar 3373515 */ std::terminate (); g->caughtExceptions = 0; g->uncaughtExceptions = 0; diff --git a/libstdc++-v3/libsupc++/eh_terminate.cc b/libstdc++-v3/libsupc++/eh_terminate.cc index bf9d74db116..14b5c88e013 100644 --- a/libstdc++-v3/libsupc++/eh_terminate.cc +++ b/libstdc++-v3/libsupc++/eh_terminate.cc @@ -34,6 +34,12 @@ #include "unwind-cxx.h" #include "exception_defines.h" +/* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) +#include "bits/os_defines.h" +#endif +/* APPLE LOCAL end keymgr */ + using namespace __cxxabiv1; void @@ -50,6 +56,18 @@ __cxxabiv1::__terminate (std::terminate_handler handler) void std::terminate () { + /* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + /* + * If the Key Manager has a terminate function assigned to this thread, invoke that fn. + * If not (KeyMgr has 0), use whatever is initialized into my local static pointer (above). + */ + std::terminate_handler __keymgr_terminate_func = (std::terminate_handler) + _keymgr_get_per_thread_data (KEYMGR_TERMINATE_HANDLER_KEY); + if (__keymgr_terminate_func) + __terminate_handler = __keymgr_terminate_func; +#endif /* APPLE_KEYMGR */ + /* APPLE LOCAL end keymgr */ __terminate (__terminate_handler); } @@ -63,13 +81,32 @@ __cxxabiv1::__unexpected (std::unexpected_handler handler) void std::unexpected () { + /* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + /* Similar to terminate case above. */ + std::unexpected_handler __keymgr_unexpected_func = (std::unexpected_handler) + _keymgr_get_per_thread_data (KEYMGR_UNEXPECTED_HANDLER_KEY); + if (__keymgr_unexpected_func) + __unexpected_handler = __keymgr_unexpected_func; +#endif /* APPLE_KEYMGR */ + /* APPLE LOCAL end keymgr */ __unexpected (__unexpected_handler); } std::terminate_handler std::set_terminate (std::terminate_handler func) throw() { + /* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + std::terminate_handler old = + (std::terminate_handler) _keymgr_get_per_thread_data (KEYMGR_TERMINATE_HANDLER_KEY); + _keymgr_set_per_thread_data (KEYMGR_TERMINATE_HANDLER_KEY, (void *) func) ; + if ( ! old) + old = __terminate_handler; +#else std::terminate_handler old = __terminate_handler; +#endif /* APPLE_KEYMGR */ + /* APPLE LOCAL end keymgr */ __terminate_handler = func; return old; } @@ -77,7 +114,17 @@ std::set_terminate (std::terminate_handler func) throw() std::unexpected_handler std::set_unexpected (std::unexpected_handler func) throw() { + /* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + std::unexpected_handler old = + (std::unexpected_handler) _keymgr_get_per_thread_data (KEYMGR_UNEXPECTED_HANDLER_KEY); + _keymgr_set_per_thread_data (KEYMGR_UNEXPECTED_HANDLER_KEY, (void *) func); + if ( ! old) + old = __unexpected_handler; +#else std::unexpected_handler old = __unexpected_handler; +#endif /* APPLE_KEYMGR */ + /* APPLE LOCAL end keymgr */ __unexpected_handler = func; return old; } diff --git a/libstdc++-v3/libsupc++/new_handler.cc b/libstdc++-v3/libsupc++/new_handler.cc index 2f9f6bd3579..42b19e69367 100644 --- a/libstdc++-v3/libsupc++/new_handler.cc +++ b/libstdc++-v3/libsupc++/new_handler.cc @@ -31,6 +31,12 @@ #include "new" +/* APPLE LOCAL begin keymgr */ +#if defined APPLE_KEYMGR && ! defined(LIBCC_KEXT) && ! defined(APPLE_KERNEL_EXTENSION) +#include "bits/os_defines.h" +#endif +/* APPLE LOCAL end keymgr */ + const std::nothrow_t std::nothrow = { }; using std::new_handler; @@ -39,9 +45,23 @@ new_handler __new_handler; new_handler std::set_new_handler (new_handler handler) throw() { +/* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + new_handler prev_handler = + (new_handler) _keymgr_get_per_thread_data (KEYMGR_NEW_HANLDER_KEY); + if ( ! prev_handler) + prev_handler = __new_handler; + _keymgr_set_per_thread_data (KEYMGR_NEW_HANLDER_KEY, (void *) handler); +#else /* ! APPLE_KEYMGR */ new_handler prev_handler = __new_handler; +#endif /* APPLE_KEYMGR */ +/* APPLE LOCAL end keymgr */ __new_handler = handler; return prev_handler; } +/* APPLE LOCAL begin libcc_kext */ +#if !defined(LIBCC_KEXT) std::bad_alloc::~bad_alloc() throw() { } +#endif +/* APPLE LOCAL end libcc_kext */ diff --git a/libstdc++-v3/libsupc++/new_op.cc b/libstdc++-v3/libsupc++/new_op.cc index 43c22405eb5..124fcdd68f4 100644 --- a/libstdc++-v3/libsupc++/new_op.cc +++ b/libstdc++-v3/libsupc++/new_op.cc @@ -30,13 +30,25 @@ // the GNU General Public License. #include "new" +/* APPLE LOCAL begin libcc_kext */ +#ifdef LIBCC_KEXT +extern "C" { +extern void *malloc (size_t); +extern int panic (); +} +#define ABORT() panic () +#else #include <cstdlib> +#define ABORT() std::abort () +#endif +/* APPLE LOCAL end libcc_kext */ #include <exception_defines.h> #include <bits/c++config.h> using std::new_handler; using std::bad_alloc; -#if _GLIBCXX_HOSTED +/* APPLE LOCAL libcc_kext */ +#if _GLIBCXX_HOSTED && !defined(LIBCC_KEXT) using std::malloc; #else // A freestanding C runtime may not provide "malloc" -- but there is no @@ -57,12 +69,21 @@ operator new (std::size_t sz) throw (std::bad_alloc) p = (void *) malloc (sz); while (p == 0) { + /* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + /* Ask Key Manager for new_handler; if provided (!=0), use it, else use local version. */ + new_handler handler = + (new_handler) _keymgr_get_per_thread_data (KEYMGR_NEW_HANLDER_KEY); +#else /* ! APPLE_KEYMGR */ new_handler handler = __new_handler; +#endif /* APPLE_KEYMGR */ + /* APPLE LOCAL end keymgr */ if (! handler) #ifdef __EXCEPTIONS throw bad_alloc(); #else - std::abort(); + /* APPLE LOCAL libcc_kext */ + ABORT(); #endif handler (); p = (void *) malloc (sz); diff --git a/libstdc++-v3/libsupc++/new_opnt.cc b/libstdc++-v3/libsupc++/new_opnt.cc index c25ce5a2d30..8f61ebd79c7 100644 --- a/libstdc++-v3/libsupc++/new_opnt.cc +++ b/libstdc++-v3/libsupc++/new_opnt.cc @@ -31,6 +31,12 @@ #include <exception_defines.h> #include <bits/c++config.h> +/* APPLE LOCAL begin keymgr */ +#if defined APPLE_KEYMGR && ! defined(LIBCC_KEXT) && ! defined(APPLE_KERNEL_EXTENSION) +#include "bits/os_defines.h" +#endif /* APPLE_KEYMGR */ +/* APPLE LOCAL end keymgr */ + using std::new_handler; using std::bad_alloc; @@ -48,7 +54,14 @@ operator new (std::size_t sz, const std::nothrow_t&) throw() p = (void *) malloc (sz); while (p == 0) { + /* APPLE LOCAL begin keymgr */ +#if defined(APPLE_KEYMGR) && ! defined(APPLE_KERNEL_EXTENSION) && ! defined(LIBCC_KEXT) + new_handler handler = + (new_handler) _keymgr_get_per_thread_data (KEYMGR_NEW_HANLDER_KEY); +#else /* ! APPLE_KEYMGR */ new_handler handler = __new_handler; +#endif /* APPLE_KEYMGR */ + /* APPLE LOCAL end keymgr */ if (! handler) return 0; try diff --git a/libstdc++-v3/libsupc++/pure.cc b/libstdc++-v3/libsupc++/pure.cc index 2e75492e705..82011dbc1e8 100644 --- a/libstdc++-v3/libsupc++/pure.cc +++ b/libstdc++-v3/libsupc++/pure.cc @@ -27,9 +27,13 @@ // invalidate any other reasons why the executable file might be covered by // the GNU General Public License. +/* APPLE LOCAL begin libcc_kext */ +#ifndef LIBCC_KEXT /* Kludge: easier than identifying correct -Ipath, and unnecessary for kext */ #include <bits/c++config.h> #include <cxxabi.h> #include "unwind-cxx.h" +#endif +/* APPLE LOCAL end libcc_kext */ #if _GLIBCXX_HOSTED #ifdef _GLIBCXX_HAVE_UNISTD_H @@ -51,6 +55,14 @@ extern "C" void __cxxabiv1::__cxa_pure_virtual (void) { + +/* APPLE LOCAL begin libcc_kext */ +#ifndef LIBCC_KEXT writestr ("pure virtual method called\n"); std::terminate (); +#else + extern void panic (void); + panic (); +#endif +/* APPLE LOCAL end libcc_kext */ } |