From b393c4e9d97d6d992ecc158ad8ef96859c9b179a Mon Sep 17 00:00:00 2001 From: "Sergey Semyonov (Serge)" Date: Mon, 14 Dec 2015 17:41:20 +0000 Subject: [PATCH] sdk: C++ exeptions support git-svn-id: svn://kolibrios.org@5963 a494cfbc-eb01-0410-851d-a64ba20cac60 --- .../sources/gcc_eh/config/i386/w32-unwind.h | 35 +- contrib/sdk/sources/gcc_eh/gthr-single.h | 10 +- contrib/sdk/sources/gcc_eh/gthr.h | 12 +- contrib/sdk/sources/gcc_eh/unwind-c.c | 23 +- contrib/sdk/sources/gcc_eh/unwind-dw2-fde.c | 40 +- contrib/sdk/sources/gcc_eh/unwind-dw2-fde.h | 3 +- contrib/sdk/sources/gcc_eh/unwind-dw2.c | 232 +++- contrib/sdk/sources/gcc_eh/unwind-dw2.h | 3 +- contrib/sdk/sources/gcc_eh/unwind-pe.h | 2 +- contrib/sdk/sources/gcc_eh/unwind.inc | 2 +- .../sources/libstdc++-v3/libsupc++/Makefile | 21 +- .../sources/libstdc++-v3/libsupc++/config.h | 1200 +++++++++++++++++ .../libstdc++-v3/libsupc++/cp-demangle.h | 169 +++ .../sources/libstdc++-v3/libsupc++/demangle.h | 671 +++++++++ .../libstdc++-v3/libsupc++/eh_globals.cc | 4 +- .../libstdc++-v3/libsupc++/eh_personality.cc | 2 +- .../libstdc++-v3/libsupc++/eh_throw.cc | 4 +- .../libstdc++-v3/libsupc++/initializer_list | 2 +- .../libstdc++-v3/libsupc++/libiberty.h | 686 ++++++++++ .../sources/libstdc++-v3/libsupc++/typeinfo | 20 +- .../libstdc++-v3/libsupc++/unwind-cxx.h | 2 +- .../libstdc++-v3/libsupc++/vterminate.cc | 8 +- contrib/sdk/sources/newlib/app.lds | 7 +- contrib/sdk/sources/newlib/libc/Makefile | 2 +- contrib/sdk/sources/newlib/libc/crt/crt3.c | 21 - .../sources/newlib/libc/include/kos32sys.h | 3 +- .../sdk/sources/newlib/libc/include/stdio.h | 4 - 27 files changed, 3029 insertions(+), 159 deletions(-) create mode 100644 contrib/sdk/sources/libstdc++-v3/libsupc++/config.h create mode 100644 contrib/sdk/sources/libstdc++-v3/libsupc++/cp-demangle.h create mode 100644 contrib/sdk/sources/libstdc++-v3/libsupc++/demangle.h create mode 100644 contrib/sdk/sources/libstdc++-v3/libsupc++/libiberty.h diff --git a/contrib/sdk/sources/gcc_eh/config/i386/w32-unwind.h b/contrib/sdk/sources/gcc_eh/config/i386/w32-unwind.h index d57077c4b0..e56357b094 100644 --- a/contrib/sdk/sources/gcc_eh/config/i386/w32-unwind.h +++ b/contrib/sdk/sources/gcc_eh/config/i386/w32-unwind.h @@ -1,6 +1,5 @@ /* Definitions for Dwarf2 EH unwind support for Windows32 targets - Copyright (C) 2007, 2009 - Free Software Foundation, Inc. + Copyright (C) 2007-2013 Free Software Foundation, Inc. Contributed by Pascal Obry This file is part of GCC. @@ -46,7 +45,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see some foreign code for which no unwind frame can be found. If this is a call from the Windows signal handler, then: - 2) We must get the signal context information. + 2) We must get the signal context information. * With the standard exception filter: @@ -119,7 +118,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see #define MD_FALLBACK_FRAME_STATE_FOR i386_w32_fallback_frame_state static _Unwind_Reason_Code -i386_w32_fallback_frame_state (struct _Unwind_Context *context, +i386_w32_fallback_frame_state (struct _Unwind_Context *context, _Unwind_FrameState *fs) { @@ -130,14 +129,13 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context, /* In the test below we look for two specific patterns found experimentally to be in the Windows signal handler. */ - if (SIG_PAT1 || SIG_PAT2 || SIG_SEH1 || SIG_SEH2) { PEXCEPTION_POINTERS weinfo_; PCONTEXT proc_ctx_; long new_cfa_; - if (SIG_SEH1) + if (SIG_SEH1) proc_ctx_ = (PCONTEXT) (*(int*)(ctx_cfa_ + 56)); else if (SIG_SEH2) proc_ctx_ = (PCONTEXT) (*(int*)(ctx_cfa_ + 8)); @@ -148,14 +146,12 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context, } /* The new context frame address is the stack pointer. */ - new_cfa_ = proc_ctx_->Esp; fs->regs.cfa_how = CFA_REG_OFFSET; fs->regs.cfa_reg = __builtin_dwarf_sp_column(); fs->regs.cfa_offset = new_cfa_ - (long) ctx_cfa_; - /* Save some registers. */ - + /* Restore registers. */ fs->regs.reg[0].how = REG_SAVED_OFFSET; fs->regs.reg[0].loc.offset = (long)&proc_ctx_->Eax - new_cfa_; fs->regs.reg[3].how = REG_SAVED_OFFSET; @@ -168,18 +164,13 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context, fs->regs.reg[6].loc.offset = (long)&proc_ctx_->Esi - new_cfa_; fs->regs.reg[7].how = REG_SAVED_OFFSET; fs->regs.reg[7].loc.offset = (long)&proc_ctx_->Edi - new_cfa_; - fs->regs.reg[9].how = REG_SAVED_OFFSET; - fs->regs.reg[9].loc.offset = (long)&proc_ctx_->Eip - new_cfa_; - fs->regs.reg[4].how = REG_SAVED_OFFSET; - fs->regs.reg[4].loc.offset = (long)&proc_ctx_->Ebp - new_cfa_; - - /* Set the return address to Eip + 1. As we can be called multiple - times we use another register for this. */ - - proc_ctx_->Dr0 = proc_ctx_->Eip + 1; + fs->regs.reg[5].how = REG_SAVED_OFFSET; + fs->regs.reg[5].loc.offset = (long)&proc_ctx_->Ebp - new_cfa_; fs->regs.reg[8].how = REG_SAVED_OFFSET; - fs->regs.reg[8].loc.offset = (long)&proc_ctx_->Dr0 - new_cfa_; + fs->regs.reg[8].loc.offset = (long)&proc_ctx_->Eip - new_cfa_; fs->retaddr_column = 8; + fs->signal_frame = 1; + return _URC_NO_REASON; } @@ -187,10 +178,9 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context, one of it's probes prior to the real SP adjustment. The only operations of interest performed is "pushl %ecx", followed by ecx clobbering. */ - - else if (SIG_ALLOCA) + else if (SIG_ALLOCA) { - /* Only one push between entry in _alloca and the probe trap. */ + /* Only one push between entry in _alloca and the probe trap. */ long new_cfa_ = (long) ctx_cfa_ + 4; fs->regs.cfa_how = CFA_REG_OFFSET; @@ -205,6 +195,7 @@ i386_w32_fallback_frame_state (struct _Unwind_Context *context, fs->retaddr_column = 8; fs->regs.reg[8].how = REG_SAVED_OFFSET; fs->regs.reg[8].loc.offset = 0; + fs->signal_frame = 1; return _URC_NO_REASON; } diff --git a/contrib/sdk/sources/gcc_eh/gthr-single.h b/contrib/sdk/sources/gcc_eh/gthr-single.h index 357528ad1f..7e6ad697fc 100644 --- a/contrib/sdk/sources/gcc_eh/gthr-single.h +++ b/contrib/sdk/sources/gcc_eh/gthr-single.h @@ -1,7 +1,6 @@ /* Threads compatibility routines for libgcc2 and libobjc. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997, 1999, 2000, 2004, 2008, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2013 Free Software Foundation, Inc. This file is part of GCC. @@ -36,6 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define UNUSED __attribute__((unused)) @@ -285,6 +285,12 @@ __gthread_recursive_mutex_unlock (__gthread_recursive_mutex_t *__mutex) return __gthread_mutex_unlock (__mutex); } +static inline int +__gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *__mutex) +{ + return __gthread_mutex_destroy (__mutex); +} + #endif /* _LIBOBJC */ #undef UNUSED diff --git a/contrib/sdk/sources/gcc_eh/gthr.h b/contrib/sdk/sources/gcc_eh/gthr.h index 6edfbcd69c..d3df8ba33d 100644 --- a/contrib/sdk/sources/gcc_eh/gthr.h +++ b/contrib/sdk/sources/gcc_eh/gthr.h @@ -1,6 +1,6 @@ /* Threads compatibility routines for libgcc2. */ /* Compile this one with gcc. */ -/* Copyright (C) 1997, 1998, 2004, 2008, 2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2013 Free Software Foundation, Inc. This file is part of GCC. @@ -51,11 +51,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see to initialize __gthread_mutex_t to get a fast non-recursive mutex. __GTHREAD_MUTEX_INIT_FUNCTION - some systems can't initialize a mutex without a - function call. On such systems, define this to a - function which looks like this: + to initialize __gthread_mutex_t to get a fast + non-recursive mutex. + Define this to a function which looks like this: void __GTHREAD_MUTEX_INIT_FUNCTION (__gthread_mutex_t *) - Don't define __GTHREAD_MUTEX_INIT in this case + Some systems can't initialize a mutex without a + function call. Don't define __GTHREAD_MUTEX_INIT in this case. __GTHREAD_RECURSIVE_MUTEX_INIT __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION as above, but for a recursive mutex. @@ -71,6 +72,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see int __gthread_setspecific (__gthread_key_t key, const void *ptr) int __gthread_mutex_destroy (__gthread_mutex_t *mutex); + int __gthread_recursive_mutex_destroy (__gthread_recursive_mutex_t *mutex); int __gthread_mutex_lock (__gthread_mutex_t *mutex); int __gthread_mutex_trylock (__gthread_mutex_t *mutex); diff --git a/contrib/sdk/sources/gcc_eh/unwind-c.c b/contrib/sdk/sources/gcc_eh/unwind-c.c index 86b9f55704..b937d9d655 100644 --- a/contrib/sdk/sources/gcc_eh/unwind-c.c +++ b/contrib/sdk/sources/gcc_eh/unwind-c.c @@ -1,5 +1,5 @@ /* Supporting functions for C exception handling. - Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc. + Copyright (C) 2002-2013 Free Software Foundation, Inc. Contributed by Aldy Hernandez . Shamelessly stolen from the Java front end. @@ -93,6 +93,8 @@ parse_lsda_header (struct _Unwind_Context *context, const unsigned char *p, #ifdef __USING_SJLJ_EXCEPTIONS__ #define PERSONALITY_FUNCTION __gcc_personality_sj0 #define __builtin_eh_return_data_regno(x) x +#elif defined(__SEH__) +#define PERSONALITY_FUNCTION __gcc_personality_imp #else #define PERSONALITY_FUNCTION __gcc_personality_v0 #endif @@ -107,6 +109,9 @@ PERSONALITY_FUNCTION (_Unwind_State state, struct _Unwind_Exception * ue_header, struct _Unwind_Context * context) #else +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) +static +#endif _Unwind_Reason_Code PERSONALITY_FUNCTION (int, _Unwind_Action, _Unwind_Exception_Class, struct _Unwind_Exception *, struct _Unwind_Context *); @@ -130,10 +135,10 @@ PERSONALITY_FUNCTION (int version, /* The dwarf unwinder assumes the context structure holds things like the function and LSDA pointers. The ARM implementation caches these in - the exception header (UCB). To avoid rewriting everything we make the - virtual IP register point at the UCB. */ + the exception header (UCB). To avoid rewriting everything we make a + virtual scratch register point at the UCB. */ ip = (_Unwind_Ptr) ue_header; - _Unwind_SetGR (context, 12, ip); + _Unwind_SetGR (context, UNWIND_POINTER_REG, ip); #else if (version != 1) return _URC_FATAL_PHASE1_ERROR; @@ -227,3 +232,13 @@ PERSONALITY_FUNCTION (int version, _Unwind_SetIP (context, landing_pad); return _URC_INSTALL_CONTEXT; } + +#if defined (__SEH__) && !defined (__USING_SJLJ_EXCEPTIONS__) +EXCEPTION_DISPOSITION +__gcc_personality_seh0 (PEXCEPTION_RECORD ms_exc, void *this_frame, + PCONTEXT ms_orig_context, PDISPATCHER_CONTEXT ms_disp) +{ + return _GCC_specific_handler (ms_exc, this_frame, ms_orig_context, + ms_disp, __gcc_personality_imp); +} +#endif /* SEH */ diff --git a/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.c b/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.c index 60535cfd78..831623ba65 100644 --- a/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.c +++ b/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.c @@ -1,6 +1,5 @@ /* Subroutines needed for unwinding stack frames for exception handling. */ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, - 2009 Free Software Foundation, Inc. +/* Copyright (C) 1997-2013 Free Software Foundation, Inc. Contributed by Jason Merrill . This file is part of GCC. @@ -64,6 +63,8 @@ init_object_mutex_once (void) __gthread_once (&once, init_object_mutex); } #else +/* ??? Several targets include this file with stubbing parts of gthr.h + and expect no locking to be done. */ #define init_object_mutex_once() #endif @@ -227,7 +228,6 @@ __deregister_frame (void *begin) free (__deregister_frame_info (begin)); } - /* Like base_of_encoded_value, but take the base from a struct object instead of an _Unwind_Context. */ @@ -265,10 +265,18 @@ get_cie_encoding (const struct dwarf_cie *cie) _sleb128_t stmp; aug = cie->augmentation; + p = aug + strlen ((const char *)aug) + 1; /* Skip the augmentation string. */ + if (__builtin_expect (cie->version >= 4, 0)) + { + if (p[0] != sizeof (void *) || p[1] != 0) + return DW_EH_PE_omit; /* We are not prepared to handle unexpected + address sizes or segment selectors. */ + p += 2; /* Skip address size and segment size. */ + } + if (aug[0] != 'z') return DW_EH_PE_absptr; - p = aug + strlen ((const char *)aug) + 1; /* Skip the augmentation string. */ p = read_uleb128 (p, &utmp); /* Skip code alignment. */ p = read_sleb128 (p, &stmp); /* Skip data alignment. */ if (cie->version == 1) /* Skip return address column. */ @@ -307,7 +315,7 @@ get_fde_encoding (const struct dwarf_fde *f) return get_cie_encoding (get_cie (f)); } - + /* Sorting an array of FDEs by address. (Ideally we would have the linker sort the FDEs so we don't have to do it at run time. But the linkers are not yet prepared for this.) */ @@ -614,6 +622,8 @@ classify_object_over_fdes (struct object *ob, const fde *this_fde) { last_cie = this_cie; encoding = get_cie_encoding (this_cie); + if (encoding == DW_EH_PE_omit) + return -1; base = base_from_object (encoding, ob); if (ob->s.b.encoding == DW_EH_PE_omit) ob->s.b.encoding = encoding; @@ -723,10 +733,26 @@ init_object (struct object* ob) { fde **p = ob->u.array; for (count = 0; *p; ++p) - count += classify_object_over_fdes (ob, *p); + { + size_t cur_count = classify_object_over_fdes (ob, *p); + if (cur_count == (size_t) -1) + goto unhandled_fdes; + count += cur_count; + } } else - count = classify_object_over_fdes (ob, ob->u.single); + { + count = classify_object_over_fdes (ob, ob->u.single); + if (count == (size_t) -1) + { + static const fde terminator; + unhandled_fdes: + ob->s.i = 0; + ob->s.b.encoding = DW_EH_PE_omit; + ob->u.single = &terminator; + return; + } + } /* The count field we have in the main struct object is somewhat limited, but should suffice for virtually all cases. If the diff --git a/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.h b/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.h index 6d7a8dee2c..2bbc60a837 100644 --- a/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.h +++ b/contrib/sdk/sources/gcc_eh/unwind-dw2-fde.h @@ -1,6 +1,5 @@ /* Subroutines needed for unwinding stack frames for exception handling. */ -/* Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004, 2009 - Free Software Foundation, Inc. +/* Copyright (C) 1997-2013 Free Software Foundation, Inc. Contributed by Jason Merrill . This file is part of GCC. diff --git a/contrib/sdk/sources/gcc_eh/unwind-dw2.c b/contrib/sdk/sources/gcc_eh/unwind-dw2.c index 2b2836f9e0..22cabb8243 100644 --- a/contrib/sdk/sources/gcc_eh/unwind-dw2.c +++ b/contrib/sdk/sources/gcc_eh/unwind-dw2.c @@ -1,6 +1,5 @@ /* DWARF2 exception handling and frame unwind runtime interface routines. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, - 2008, 2009, 2010 Free Software Foundation, Inc. + Copyright (C) 1997-2013 Free Software Foundation, Inc. This file is part of GCC. @@ -55,12 +54,79 @@ #define DWARF_REG_TO_UNWIND_COLUMN(REGNO) (REGNO) #endif +/* ??? For the public function interfaces, we tend to gcc_assert that the + column numbers are in range. For the dwarf2 unwind info this does happen, + although so far in a case that doesn't actually matter. + + See PR49146, in which a call from x86_64 ms abi to x86_64 unix abi stores + the call-saved xmm registers and annotates them. We havn't bothered + providing support for the xmm registers for the x86_64 port primarily + because the 64-bit windows targets don't use dwarf2 unwind, using sjlj or + SEH instead. Adding the support for unix targets would generally be a + waste. However, some runtime libraries supplied with ICC do contain such + an unorthodox transition, as well as the unwind info to match. This loss + of register restoration doesn't matter in practice, because the exception + is caught in the native unix abi, where all of the xmm registers are + call clobbered. + + Ideally, we'd record some bit to notice when we're failing to restore some + register recorded in the unwind info, but to do that we need annotation on + the unix->ms abi edge, so that we know when the register data may be + discarded. And since this edge is also within the ICC library, we're + unlikely to be able to get the new annotation. + + Barring a magic solution to restore the ms abi defined 128-bit xmm registers + (as distictly opposed to the full runtime width) without causing extra + overhead for normal unix abis, the best solution seems to be to simply + ignore unwind data for unknown columns. */ + +#define UNWIND_COLUMN_IN_RANGE(x) \ + __builtin_expect((x) <= DWARF_FRAME_REGISTERS, 1) + +#ifdef REG_VALUE_IN_UNWIND_CONTEXT +typedef _Unwind_Word _Unwind_Context_Reg_Val; + +#ifndef ASSUME_EXTENDED_UNWIND_CONTEXT +#define ASSUME_EXTENDED_UNWIND_CONTEXT 1 +#endif + +static inline _Unwind_Word +_Unwind_Get_Unwind_Word (_Unwind_Context_Reg_Val val) +{ + return val; +} + +static inline _Unwind_Context_Reg_Val +_Unwind_Get_Unwind_Context_Reg_Val (_Unwind_Word val) +{ + return val; +} +#else +typedef void *_Unwind_Context_Reg_Val; + +static inline _Unwind_Word +_Unwind_Get_Unwind_Word (_Unwind_Context_Reg_Val val) +{ + return (_Unwind_Word) (_Unwind_Internal_Ptr) val; +} + +static inline _Unwind_Context_Reg_Val +_Unwind_Get_Unwind_Context_Reg_Val (_Unwind_Word val) +{ + return (_Unwind_Context_Reg_Val) (_Unwind_Internal_Ptr) val; +} +#endif + +#ifndef ASSUME_EXTENDED_UNWIND_CONTEXT +#define ASSUME_EXTENDED_UNWIND_CONTEXT 0 +#endif + /* This is the register and unwind state for a particular frame. This provides the information necessary to unwind up past a frame and return to its caller. */ struct _Unwind_Context { - void *reg[DWARF_FRAME_REGISTERS+1]; + _Unwind_Context_Reg_Val reg[DWARF_FRAME_REGISTERS+1]; void *cfa; void *ra; void *lsda; @@ -143,7 +209,8 @@ _Unwind_SetSignalFrame (struct _Unwind_Context *context, int val) static inline _Unwind_Word _Unwind_IsExtendedContext (struct _Unwind_Context *context) { - return context->flags & EXTENDED_CONTEXT_BIT; + return (ASSUME_EXTENDED_UNWIND_CONTEXT + || (context->flags & EXTENDED_CONTEXT_BIT)); } /* Get the value of register INDEX as saved in CONTEXT. */ @@ -152,7 +219,7 @@ inline _Unwind_Word _Unwind_GetGR (struct _Unwind_Context *context, int index) { int size; - void *ptr; + _Unwind_Context_Reg_Val val; #ifdef DWARF_ZERO_REG if (index == DWARF_ZERO_REG) @@ -162,18 +229,18 @@ _Unwind_GetGR (struct _Unwind_Context *context, int index) index = DWARF_REG_TO_UNWIND_COLUMN (index); gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); size = dwarf_reg_size_table[index]; - ptr = context->reg[index]; + val = context->reg[index]; if (_Unwind_IsExtendedContext (context) && context->by_value[index]) - return (_Unwind_Word) (_Unwind_Internal_Ptr) ptr; + return _Unwind_Get_Unwind_Word (val); /* This will segfault if the register hasn't been saved. */ if (size == sizeof(_Unwind_Ptr)) - return * (_Unwind_Ptr *) ptr; + return * (_Unwind_Ptr *) (_Unwind_Internal_Ptr) val; else { gcc_assert (size == sizeof(_Unwind_Word)); - return * (_Unwind_Word *) ptr; + return * (_Unwind_Word *) (_Unwind_Internal_Ptr) val; } } @@ -205,11 +272,11 @@ _Unwind_SetGR (struct _Unwind_Context *context, int index, _Unwind_Word val) if (_Unwind_IsExtendedContext (context) && context->by_value[index]) { - context->reg[index] = (void *) (_Unwind_Internal_Ptr) val; + context->reg[index] = _Unwind_Get_Unwind_Context_Reg_Val (val); return; } - ptr = context->reg[index]; + ptr = (void *) (_Unwind_Internal_Ptr) context->reg[index]; if (size == sizeof(_Unwind_Ptr)) * (_Unwind_Ptr *) ptr = val; @@ -228,7 +295,7 @@ _Unwind_GetGRPtr (struct _Unwind_Context *context, int index) index = DWARF_REG_TO_UNWIND_COLUMN (index); if (_Unwind_IsExtendedContext (context) && context->by_value[index]) return &context->reg[index]; - return context->reg[index]; + return (void *) (_Unwind_Internal_Ptr) context->reg[index]; } /* Set the pointer to a register INDEX as saved in CONTEXT. */ @@ -239,7 +306,7 @@ _Unwind_SetGRPtr (struct _Unwind_Context *context, int index, void *p) index = DWARF_REG_TO_UNWIND_COLUMN (index); if (_Unwind_IsExtendedContext (context)) context->by_value[index] = 0; - context->reg[index] = p; + context->reg[index] = (_Unwind_Context_Reg_Val) (_Unwind_Internal_Ptr) p; } /* Overwrite the saved value for register INDEX in CONTEXT with VAL. */ @@ -250,10 +317,11 @@ _Unwind_SetGRValue (struct _Unwind_Context *context, int index, { index = DWARF_REG_TO_UNWIND_COLUMN (index); gcc_assert (index < (int) sizeof(dwarf_reg_size_table)); - gcc_assert (dwarf_reg_size_table[index] == sizeof (_Unwind_Ptr)); + /* Return column size may be smaller than _Unwind_Context_Reg_Val. */ + gcc_assert (dwarf_reg_size_table[index] <= sizeof (_Unwind_Context_Reg_Val)); context->by_value[index] = 1; - context->reg[index] = (void *) (_Unwind_Internal_Ptr) val; + context->reg[index] = _Unwind_Get_Unwind_Context_Reg_Val (val); } /* Return nonzero if register INDEX is stored by value rather than @@ -356,7 +424,16 @@ extract_cie_info (const struct dwarf_cie *cie, struct _Unwind_Context *context, aug += 2; } - /* Immediately following the augmentation are the code and + /* After the augmentation resp. pointer for "eh" augmentation + follows for CIE version >= 4 address size byte and + segment size byte. */ + if (__builtin_expect (cie->version >= 4, 0)) + { + if (p[0] != sizeof (void *) || p[1] != 0) + return NULL; + p += 2; + } + /* Immediately following this are the code and data alignment and return address column. */ p = read_uleb128 (p, &utmp); fs->code_align = (_Unwind_Word)utmp; @@ -888,14 +965,19 @@ execute_cfa_program (const unsigned char *insn_ptr, reg = insn & 0x3f; insn_ptr = read_uleb128 (insn_ptr, &utmp); offset = (_Unwind_Sword) utmp * fs->data_align; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how - = REG_SAVED_OFFSET; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.offset = offset; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + } } else if ((insn & 0xc0) == DW_CFA_restore) { reg = insn & 0x3f; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how = REG_UNSAVED; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + fs->regs.reg[reg].how = REG_UNSAVED; } else switch (insn) { @@ -926,26 +1008,35 @@ execute_cfa_program (const unsigned char *insn_ptr, insn_ptr = read_uleb128 (insn_ptr, ®); insn_ptr = read_uleb128 (insn_ptr, &utmp); offset = (_Unwind_Sword) utmp * fs->data_align; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how - = REG_SAVED_OFFSET; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.offset = offset; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + } break; case DW_CFA_restore_extended: insn_ptr = read_uleb128 (insn_ptr, ®); /* FIXME, this is wrong; the CIE might have said that the register was saved somewhere. */ - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN(reg)].how = REG_UNSAVED; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + fs->regs.reg[reg].how = REG_UNSAVED; break; case DW_CFA_same_value: insn_ptr = read_uleb128 (insn_ptr, ®); - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN(reg)].how = REG_UNSAVED; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + fs->regs.reg[reg].how = REG_UNSAVED; break; case DW_CFA_undefined: insn_ptr = read_uleb128 (insn_ptr, ®); - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN(reg)].how = REG_UNDEFINED; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + fs->regs.reg[reg].how = REG_UNDEFINED; break; case DW_CFA_nop: @@ -956,9 +1047,12 @@ execute_cfa_program (const unsigned char *insn_ptr, _uleb128_t reg2; insn_ptr = read_uleb128 (insn_ptr, ®); insn_ptr = read_uleb128 (insn_ptr, ®2); - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how = REG_SAVED_REG; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.reg = - (_Unwind_Word)reg2; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_REG; + fs->regs.reg[reg].loc.reg = (_Unwind_Word)reg2; + } } break; @@ -1016,8 +1110,12 @@ execute_cfa_program (const unsigned char *insn_ptr, case DW_CFA_expression: insn_ptr = read_uleb128 (insn_ptr, ®); - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how = REG_SAVED_EXP; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.exp = insn_ptr; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_EXP; + fs->regs.reg[reg].loc.exp = insn_ptr; + } insn_ptr = read_uleb128 (insn_ptr, &utmp); insn_ptr += utmp; break; @@ -1027,9 +1125,12 @@ execute_cfa_program (const unsigned char *insn_ptr, insn_ptr = read_uleb128 (insn_ptr, ®); insn_ptr = read_sleb128 (insn_ptr, &stmp); offset = stmp * fs->data_align; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how - = REG_SAVED_OFFSET; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.offset = offset; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + } break; case DW_CFA_def_cfa_sf: @@ -1052,36 +1153,46 @@ execute_cfa_program (const unsigned char *insn_ptr, insn_ptr = read_uleb128 (insn_ptr, ®); insn_ptr = read_uleb128 (insn_ptr, &utmp); offset = (_Unwind_Sword) utmp * fs->data_align; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how - = REG_SAVED_VAL_OFFSET; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.offset = offset; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_VAL_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + } break; case DW_CFA_val_offset_sf: insn_ptr = read_uleb128 (insn_ptr, ®); insn_ptr = read_sleb128 (insn_ptr, &stmp); offset = stmp * fs->data_align; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how - = REG_SAVED_VAL_OFFSET; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.offset = offset; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_VAL_OFFSET; + fs->regs.reg[reg].loc.offset = offset; + } break; case DW_CFA_val_expression: insn_ptr = read_uleb128 (insn_ptr, ®); - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how - = REG_SAVED_VAL_EXP; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.exp = insn_ptr; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_VAL_EXP; + fs->regs.reg[reg].loc.exp = insn_ptr; + } insn_ptr = read_uleb128 (insn_ptr, &utmp); insn_ptr += utmp; break; case DW_CFA_GNU_window_save: /* ??? Hardcoded for SPARC register window configuration. */ - for (reg = 16; reg < 32; ++reg) - { - fs->regs.reg[reg].how = REG_SAVED_OFFSET; - fs->regs.reg[reg].loc.offset = (reg - 16) * sizeof (void *); - } + if (DWARF_FRAME_REGISTERS >= 32) + for (reg = 16; reg < 32; ++reg) + { + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = (reg - 16) * sizeof (void *); + } break; case DW_CFA_GNU_args_size: @@ -1095,9 +1206,12 @@ execute_cfa_program (const unsigned char *insn_ptr, insn_ptr = read_uleb128 (insn_ptr, ®); insn_ptr = read_uleb128 (insn_ptr, &utmp); offset = (_Unwind_Word) utmp * fs->data_align; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].how - = REG_SAVED_OFFSET; - fs->regs.reg[DWARF_REG_TO_UNWIND_COLUMN (reg)].loc.offset = -offset; + reg = DWARF_REG_TO_UNWIND_COLUMN (reg); + if (UNWIND_COLUMN_IN_RANGE (reg)) + { + fs->regs.reg[reg].how = REG_SAVED_OFFSET; + fs->regs.reg[reg].loc.offset = -offset; + } break; default: @@ -1204,7 +1318,8 @@ __frame_state_for (void *pc_target, struct frame_state *state_in) int reg; memset (&context, 0, sizeof (struct _Unwind_Context)); - context.flags = EXTENDED_CONTEXT_BIT; + if (!ASSUME_EXTENDED_UNWIND_CONTEXT) + context.flags = EXTENDED_CONTEXT_BIT; context.ra = pc_target + 1; if (uw_frame_state_for (&context, &fs) != _URC_NO_REASON) @@ -1442,7 +1557,8 @@ uw_init_context_1 (struct _Unwind_Context *context, memset (context, 0, sizeof (struct _Unwind_Context)); context->ra = ra; - context->flags = EXTENDED_CONTEXT_BIT; + if (!ASSUME_EXTENDED_UNWIND_CONTEXT) + context->flags = EXTENDED_CONTEXT_BIT; code = uw_frame_state_for (context, &fs); gcc_assert (code == _URC_NO_REASON); @@ -1484,7 +1600,13 @@ static void _Unwind_DebugHook (void *cfa __attribute__ ((__unused__)), void *handler __attribute__ ((__unused__))) { + /* We only want to use stap probes starting with v3. Earlier + versions added too much startup cost. */ +#if defined (HAVE_SYS_SDT_H) && defined (STAP_PROBE2) && _SDT_NOTE_TYPE >= 3 + STAP_PROBE2 (libgcc, unwind, cfa, handler); +#else asm (""); +#endif } /* Install TARGET into CURRENT so that we can return to it. This is a @@ -1515,8 +1637,8 @@ uw_install_context_1 (struct _Unwind_Context *current, for (i = 0; i < DWARF_FRAME_REGISTERS; ++i) { - void *c = current->reg[i]; - void *t = target->reg[i]; + void *c = (void *) (_Unwind_Internal_Ptr) current->reg[i]; + void *t = (void *) (_Unwind_Internal_Ptr)target->reg[i]; gcc_assert (current->by_value[i] == 0); if (target->by_value[i] && c) diff --git a/contrib/sdk/sources/gcc_eh/unwind-dw2.h b/contrib/sdk/sources/gcc_eh/unwind-dw2.h index 2c558b4962..365e97470f 100644 --- a/contrib/sdk/sources/gcc_eh/unwind-dw2.h +++ b/contrib/sdk/sources/gcc_eh/unwind-dw2.h @@ -1,6 +1,5 @@ /* DWARF2 frame unwind data structure. - Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2009 - Free Software Foundation, Inc. + Copyright (C) 1997-2013 Free Software Foundation, Inc. This file is part of GCC. diff --git a/contrib/sdk/sources/gcc_eh/unwind-pe.h b/contrib/sdk/sources/gcc_eh/unwind-pe.h index 121f877672..12c8979631 100644 --- a/contrib/sdk/sources/gcc_eh/unwind-pe.h +++ b/contrib/sdk/sources/gcc_eh/unwind-pe.h @@ -1,5 +1,5 @@ /* Exception handling and frame unwind runtime interface routines. - Copyright (C) 2001, 2002, 2003, 2004, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2001-2013 Free Software Foundation, Inc. This file is part of GCC. diff --git a/contrib/sdk/sources/gcc_eh/unwind.inc b/contrib/sdk/sources/gcc_eh/unwind.inc index 5e2ec29c79..c902c7ffa2 100644 --- a/contrib/sdk/sources/gcc_eh/unwind.inc +++ b/contrib/sdk/sources/gcc_eh/unwind.inc @@ -1,5 +1,5 @@ /* Exception handling and frame unwind runtime interface routines. -*- C -*- - Copyright (C) 2001, 2003, 2008, 2009 Free Software Foundation, Inc. + Copyright (C) 2001-2013 Free Software Foundation, Inc. This file is part of GCC. diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile b/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile index 5cbb6e1e7b..54df9222de 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/Makefile @@ -7,17 +7,20 @@ CPP= kos32-g++ STRIP = kos32-strip CFLAGS = -U_Win32 -U_WIN32 -U__MINGW32__ -c -O2 -fno-ident -fomit-frame-pointer +CPPFLAGS = -fno-rtti ARFLAGS= crs -INCLUDES= -I. -I../../newlib/libc/include +INCLUDES= -I. -I../include/mingw32 -I../include -I../../newlib/libc/include -I/d/mingw/include LIBS:= -ldll -lc.dll -DEFINES= -DHAVE_CONFIG_H -DIN_GCC -DUSE_EMUTLS=1 -D_GLIBCXX_HAVE_TLS +DEFINES= -DHAVE_CONFIG_H -DIN_GCC -DIN_GLIBCPP_V3 -DUSE_EMUTLS=1 -D_GLIBCXX_HAVE_TLS -SOURCES = gthr_mutex.c \ +SOURCES = \ + cp-demangle.c \ + gthr_mutex.c \ array_type_info.cc \ atexit_thread.cc \ bad_alloc.cc \ @@ -81,22 +84,22 @@ $(LIBRARY).a: $(OBJECTS) Makefile $(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< %.o : %.cc Makefile - $(CPP) $(CFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< + $(CPP) $(CFLAGS) $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< eh_ptr.o: eh_ptr.cc - $(CPP) $(CFLAGS) -std=gnu++0x $(DEFINES) $(INCLUDES) -o $@ $< + $(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< eh_throw.o: eh_throw.cc - $(CPP) $(CFLAGS) -std=gnu++0x $(DEFINES) $(INCLUDES) -o $@ $< + $(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< guard.o: guard.cc - $(CPP) $(CFLAGS) -std=gnu++0x $(DEFINES) $(INCLUDES) -o $@ $< + $(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< atexit_thread.o: atexit_thread.cc - $(CPP) $(CFLAGS) -std=gnu++0x $(DEFINES) $(INCLUDES) -o $@ $< + $(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< nested_exception.o: nested_exception.cc - $(CPP) $(CFLAGS) -std=gnu++0x $(DEFINES) $(INCLUDES) -o $@ $< + $(CPP) $(CFLAGS) -std=gnu++0x $(CPPFLAGS) $(DEFINES) $(INCLUDES) -o $@ $< clean: -rm -f *.o diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/config.h b/contrib/sdk/sources/libstdc++-v3/libsupc++/config.h new file mode 100644 index 0000000000..4e079956b7 --- /dev/null +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/config.h @@ -0,0 +1,1200 @@ +/* config.h. Generated from config.h.in by configure. */ +/* config.h.in. Generated from configure.ac by autoheader. */ + +/* Define to 1 if you have the `acosf' function. */ +#define HAVE_ACOSF 1 + +/* Define to 1 if you have the `acosl' function. */ +#define HAVE_ACOSL 1 + +/* Define to 1 if you have the `asinf' function. */ +#define HAVE_ASINF 1 + +/* Define to 1 if you have the `asinl' function. */ +#define HAVE_ASINL 1 + +/* Define to 1 if the target assembler supports .symver directive. */ +/* #undef HAVE_AS_SYMVER_DIRECTIVE */ + +/* Define to 1 if you have the `atan2f' function. */ +#define HAVE_ATAN2F 1 + +/* Define to 1 if you have the `atan2l' function. */ +#define HAVE_ATAN2L 1 + +/* Define to 1 if you have the `atanf' function. */ +#define HAVE_ATANF 1 + +/* Define to 1 if you have the `atanl' function. */ +#define HAVE_ATANL 1 + +/* Define to 1 if you have the `at_quick_exit' function. */ +/* #undef HAVE_AT_QUICK_EXIT */ + +/* Define to 1 if the target assembler supports thread-local storage. */ +/* #undef HAVE_CC_TLS */ + +/* Define to 1 if you have the `ceilf' function. */ +#define HAVE_CEILF 1 + +/* Define to 1 if you have the `ceill' function. */ +#define HAVE_CEILL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_COMPLEX_H 1 + +/* Define to 1 if you have the `cosf' function. */ +#define HAVE_COSF 1 + +/* Define to 1 if you have the `coshf' function. */ +#define HAVE_COSHF 1 + +/* Define to 1 if you have the `coshl' function. */ +#define HAVE_COSHL 1 + +/* Define to 1 if you have the `cosl' function. */ +#define HAVE_COSL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_DLFCN_H */ + +/* Define if EBADMSG exists. */ +/* #undef HAVE_EBADMSG */ + +/* Define if ECANCELED exists. */ +/* #undef HAVE_ECANCELED */ + +/* Define if ECHILD exists. */ +#define HAVE_ECHILD 1 + +/* Define if EIDRM exists. */ +/* #undef HAVE_EIDRM */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_ENDIAN_H */ + +/* Define if ENODATA exists. */ +/* #undef HAVE_ENODATA */ + +/* Define if ENOLINK exists. */ +/* #undef HAVE_ENOLINK */ + +/* Define if ENOSPC exists. */ +#define HAVE_ENOSPC 1 + +/* Define if ENOSR exists. */ +/* #undef HAVE_ENOSR */ + +/* Define if ENOSTR exists. */ +/* #undef HAVE_ENOSTR */ + +/* Define if ENOTRECOVERABLE exists. */ +/* #undef HAVE_ENOTRECOVERABLE */ + +/* Define if ENOTSUP exists. */ +/* #undef HAVE_ENOTSUP */ + +/* Define if EOVERFLOW exists. */ +/* #undef HAVE_EOVERFLOW */ + +/* Define if EOWNERDEAD exists. */ +/* #undef HAVE_EOWNERDEAD */ + +/* Define if EPERM exists. */ +#define HAVE_EPERM 1 + +/* Define if EPROTO exists. */ +/* #undef HAVE_EPROTO */ + +/* Define if ETIME exists. */ +/* #undef HAVE_ETIME */ + +/* Define if ETIMEDOUT exists. */ +/* #undef HAVE_ETIMEDOUT */ + +/* Define if ETXTBSY exists. */ +/* #undef HAVE_ETXTBSY */ + +/* Define if EWOULDBLOCK exists. */ +/* #undef HAVE_EWOULDBLOCK */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_EXECINFO_H */ + +/* Define to 1 if you have the `expf' function. */ +#define HAVE_EXPF 1 + +/* Define to 1 if you have the `expl' function. */ +#define HAVE_EXPL 1 + +/* Define to 1 if you have the `fabsf' function. */ +#define HAVE_FABSF 1 + +/* Define to 1 if you have the `fabsl' function. */ +#define HAVE_FABSL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_FENV_H 1 + +/* Define to 1 if you have the `finite' function. */ +#define HAVE_FINITE 1 + +/* Define to 1 if you have the `finitef' function. */ +/* #undef HAVE_FINITEF */ + +/* Define to 1 if you have the `finitel' function. */ +/* #undef HAVE_FINITEL */ + +/* Define to 1 if you have the header file. */ +#define HAVE_FLOAT_H 1 + +/* Define to 1 if you have the `floorf' function. */ +#define HAVE_FLOORF 1 + +/* Define to 1 if you have the `floorl' function. */ +#define HAVE_FLOORL 1 + +/* Define to 1 if you have the `fmodf' function. */ +#define HAVE_FMODF 1 + +/* Define to 1 if you have the `fmodl' function. */ +#define HAVE_FMODL 1 + +/* Define to 1 if you have the `fpclass' function. */ +#define HAVE_FPCLASS 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_FP_H */ + +/* Define to 1 if you have the `frexpf' function. */ +#define HAVE_FREXPF 1 + +/* Define to 1 if you have the `frexpl' function. */ +#define HAVE_FREXPL 1 + +/* Define if _Unwind_GetIPInfo is available. */ +#define HAVE_GETIPINFO 1 + +/* Define if gets is available in . */ +#define HAVE_GETS 1 + +/* Define to 1 if you have the `hypot' function. */ +#define HAVE_HYPOT 1 + +/* Define to 1 if you have the `hypotf' function. */ +#define HAVE_HYPOTF 1 + +/* Define to 1 if you have the `hypotl' function. */ +#define HAVE_HYPOTL 1 + +/* Define if you have the iconv() function. */ +/* #undef HAVE_ICONV */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_IEEEFP_H */ + +/* Define if int64_t is available in . */ +#define HAVE_INT64_T 1 + +/* Define if int64_t is a long. */ +/* #undef HAVE_INT64_T_LONG */ + +/* Define if int64_t is a long long. */ +#define HAVE_INT64_T_LONG_LONG 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_INTTYPES_H 1 + +/* Define to 1 if you have the `isinf' function. */ +/* #undef HAVE_ISINF */ + +/* Define to 1 if you have the `isinff' function. */ +/* #undef HAVE_ISINFF */ + +/* Define to 1 if you have the `isinfl' function. */ +/* #undef HAVE_ISINFL */ + +/* Define to 1 if you have the `isnan' function. */ +#define HAVE_ISNAN 1 + +/* Define to 1 if you have the `isnanf' function. */ +/* #undef HAVE_ISNANF */ + +/* Define to 1 if you have the `isnanl' function. */ +/* #undef HAVE_ISNANL */ + +/* Defined if iswblank exists. */ +#define HAVE_ISWBLANK 1 + +/* Define if LC_MESSAGES is available in . */ +/* #undef HAVE_LC_MESSAGES */ + +/* Define to 1 if you have the `ldexpf' function. */ +#define HAVE_LDEXPF 1 + +/* Define to 1 if you have the `ldexpl' function. */ +#define HAVE_LDEXPL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_LIBINTL_H */ + +/* Only used in build directory testsuite_hooks.h. */ +/* #undef HAVE_LIMIT_AS */ + +/* Only used in build directory testsuite_hooks.h. */ +/* #undef HAVE_LIMIT_DATA */ + +/* Only used in build directory testsuite_hooks.h. */ +/* #undef HAVE_LIMIT_FSIZE */ + +/* Only used in build directory testsuite_hooks.h. */ +/* #undef HAVE_LIMIT_RSS */ + +/* Only used in build directory testsuite_hooks.h. */ +/* #undef HAVE_LIMIT_VMEM */ + +/* Define if futex syscall is available. */ +/* #undef HAVE_LINUX_FUTEX */ + +/* Define to 1 if you have the header file. */ +#define HAVE_LOCALE_H 1 + +/* Define to 1 if you have the `log10f' function. */ +#define HAVE_LOG10F 1 + +/* Define to 1 if you have the `log10l' function. */ +#define HAVE_LOG10L 1 + +/* Define to 1 if you have the `logf' function. */ +#define HAVE_LOGF 1 + +/* Define to 1 if you have the `logl' function. */ +#define HAVE_LOGL 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MACHINE_ENDIAN_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MACHINE_PARAM_H 1 + +/* Define if mbstate_t exists in wchar.h. */ +#define HAVE_MBSTATE_T 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_MEMORY_H 1 + +/* Define to 1 if you have the `modf' function. */ +#define HAVE_MODF 1 + +/* Define to 1 if you have the `modff' function. */ +#define HAVE_MODFF 1 + +/* Define to 1 if you have the `modfl' function. */ +#define HAVE_MODFL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_NAN_H */ + +/* Define if poll is available in . */ +/* #undef HAVE_POLL */ + +/* Define to 1 if you have the `powf' function. */ +#define HAVE_POWF 1 + +/* Define to 1 if you have the `powl' function. */ +#define HAVE_POWL 1 + +/* Define to 1 if you have the `qfpclass' function. */ +/* #undef HAVE_QFPCLASS */ + +/* Define to 1 if you have the `quick_exit' function. */ +/* #undef HAVE_QUICK_EXIT */ + +/* Define to 1 if you have the `setenv' function. */ +/* #undef HAVE_SETENV */ + +/* Define to 1 if you have the `sincos' function. */ +/* #undef HAVE_SINCOS */ + +/* Define to 1 if you have the `sincosf' function. */ +/* #undef HAVE_SINCOSF */ + +/* Define to 1 if you have the `sincosl' function. */ +/* #undef HAVE_SINCOSL */ + +/* Define to 1 if you have the `sinf' function. */ +#define HAVE_SINF 1 + +/* Define to 1 if you have the `sinhf' function. */ +#define HAVE_SINHF 1 + +/* Define to 1 if you have the `sinhl' function. */ +#define HAVE_SINHL 1 + +/* Define to 1 if you have the `sinl' function. */ +#define HAVE_SINL 1 + +/* Defined if sleep exists. */ +/* #undef HAVE_SLEEP */ + +/* Define to 1 if you have the `sqrtf' function. */ +#define HAVE_SQRTF 1 + +/* Define to 1 if you have the `sqrtl' function. */ +#define HAVE_SQRTL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDALIGN_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_STDBOOL_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STDINT_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STDLIB_H 1 + +/* Define if strerror_l is available in . */ +/* #undef HAVE_STRERROR_L */ + +/* Define if strerror_r is available in . */ +/* #undef HAVE_STRERROR_R */ + +/* Define to 1 if you have the header file. */ +#define HAVE_STRINGS_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_STRING_H 1 + +/* Define to 1 if you have the `strtof' function. */ +#define HAVE_STRTOF 1 + +/* Define to 1 if you have the `strtold' function. */ +#define HAVE_STRTOLD 1 + +/* Define if strxfrm_l is available in . */ +/* #undef HAVE_STRXFRM_L */ + +/* Define to 1 if the target runtime linker supports binding the same symbol + to different versions. */ +/* #undef HAVE_SYMVER_SYMBOL_RENAMING_RUNTIME_SUPPORT */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_FILIO_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_IOCTL_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_IPC_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_ISA_DEFS_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_MACHINE_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_PARAM_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_RESOURCE_H 1 + +/* Define to 1 if you have a suitable header file */ +/* #undef HAVE_SYS_SDT_H */ + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SEM_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_STAT_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_SYSINFO_H */ + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TIME_H 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_SYS_TYPES_H 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_SYS_UIO_H */ + +/* Define if S_IFREG is available in . */ +/* #undef HAVE_S_IFREG */ + +/* Define if S_IFREG is available in . */ +#define HAVE_S_ISREG 1 + +/* Define to 1 if you have the `tanf' function. */ +#define HAVE_TANF 1 + +/* Define to 1 if you have the `tanhf' function. */ +#define HAVE_TANHF 1 + +/* Define to 1 if you have the `tanhl' function. */ +#define HAVE_TANHL 1 + +/* Define to 1 if you have the `tanl' function. */ +#define HAVE_TANL 1 + +/* Define to 1 if you have the header file. */ +/* #undef HAVE_TGMATH_H */ + +/* Define to 1 if the target supports thread-local storage. */ +/* #undef HAVE_TLS */ + +/* Define to 1 if you have the header file. */ +#define HAVE_UNISTD_H 1 + +/* Defined if usleep exists. */ +/* #undef HAVE_USLEEP */ + +/* Defined if vfwscanf exists. */ +#define HAVE_VFWSCANF 1 + +/* Defined if vswscanf exists. */ +#define HAVE_VSWSCANF 1 + +/* Defined if vwscanf exists. */ +#define HAVE_VWSCANF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCHAR_H 1 + +/* Defined if wcstof exists. */ +#define HAVE_WCSTOF 1 + +/* Define to 1 if you have the header file. */ +#define HAVE_WCTYPE_H 1 + +/* Defined if Sleep exists. */ +/* #undef HAVE_WIN32_SLEEP */ + +/* Define if writev is available in . */ +/* #undef HAVE_WRITEV */ + +/* Define to 1 if you have the `_acosf' function. */ +/* #undef HAVE__ACOSF */ + +/* Define to 1 if you have the `_acosl' function. */ +/* #undef HAVE__ACOSL */ + +/* Define to 1 if you have the `_asinf' function. */ +/* #undef HAVE__ASINF */ + +/* Define to 1 if you have the `_asinl' function. */ +/* #undef HAVE__ASINL */ + +/* Define to 1 if you have the `_atan2f' function. */ +/* #undef HAVE__ATAN2F */ + +/* Define to 1 if you have the `_atan2l' function. */ +/* #undef HAVE__ATAN2L */ + +/* Define to 1 if you have the `_atanf' function. */ +/* #undef HAVE__ATANF */ + +/* Define to 1 if you have the `_atanl' function. */ +/* #undef HAVE__ATANL */ + +/* Define to 1 if you have the `_ceilf' function. */ +/* #undef HAVE__CEILF */ + +/* Define to 1 if you have the `_ceill' function. */ +/* #undef HAVE__CEILL */ + +/* Define to 1 if you have the `_cosf' function. */ +/* #undef HAVE__COSF */ + +/* Define to 1 if you have the `_coshf' function. */ +/* #undef HAVE__COSHF */ + +/* Define to 1 if you have the `_coshl' function. */ +/* #undef HAVE__COSHL */ + +/* Define to 1 if you have the `_cosl' function. */ +/* #undef HAVE__COSL */ + +/* Define to 1 if you have the `_expf' function. */ +/* #undef HAVE__EXPF */ + +/* Define to 1 if you have the `_expl' function. */ +/* #undef HAVE__EXPL */ + +/* Define to 1 if you have the `_fabsf' function. */ +/* #undef HAVE__FABSF */ + +/* Define to 1 if you have the `_fabsl' function. */ +/* #undef HAVE__FABSL */ + +/* Define to 1 if you have the `_finite' function. */ +/* #undef HAVE__FINITE */ + +/* Define to 1 if you have the `_finitef' function. */ +/* #undef HAVE__FINITEF */ + +/* Define to 1 if you have the `_finitel' function. */ +/* #undef HAVE__FINITEL */ + +/* Define to 1 if you have the `_floorf' function. */ +/* #undef HAVE__FLOORF */ + +/* Define to 1 if you have the `_floorl' function. */ +/* #undef HAVE__FLOORL */ + +/* Define to 1 if you have the `_fmodf' function. */ +/* #undef HAVE__FMODF */ + +/* Define to 1 if you have the `_fmodl' function. */ +/* #undef HAVE__FMODL */ + +/* Define to 1 if you have the `_fpclass' function. */ +/* #undef HAVE__FPCLASS */ + +/* Define to 1 if you have the `_frexpf' function. */ +/* #undef HAVE__FREXPF */ + +/* Define to 1 if you have the `_frexpl' function. */ +/* #undef HAVE__FREXPL */ + +/* Define to 1 if you have the `_hypot' function. */ +/* #undef HAVE__HYPOT */ + +/* Define to 1 if you have the `_hypotf' function. */ +/* #undef HAVE__HYPOTF */ + +/* Define to 1 if you have the `_hypotl' function. */ +/* #undef HAVE__HYPOTL */ + +/* Define to 1 if you have the `_isinf' function. */ +/* #undef HAVE__ISINF */ + +/* Define to 1 if you have the `_isinff' function. */ +/* #undef HAVE__ISINFF */ + +/* Define to 1 if you have the `_isinfl' function. */ +/* #undef HAVE__ISINFL */ + +/* Define to 1 if you have the `_isnan' function. */ +/* #undef HAVE__ISNAN */ + +/* Define to 1 if you have the `_isnanf' function. */ +/* #undef HAVE__ISNANF */ + +/* Define to 1 if you have the `_isnanl' function. */ +/* #undef HAVE__ISNANL */ + +/* Define to 1 if you have the `_ldexpf' function. */ +/* #undef HAVE__LDEXPF */ + +/* Define to 1 if you have the `_ldexpl' function. */ +/* #undef HAVE__LDEXPL */ + +/* Define to 1 if you have the `_log10f' function. */ +/* #undef HAVE__LOG10F */ + +/* Define to 1 if you have the `_log10l' function. */ +/* #undef HAVE__LOG10L */ + +/* Define to 1 if you have the `_logf' function. */ +/* #undef HAVE__LOGF */ + +/* Define to 1 if you have the `_logl' function. */ +/* #undef HAVE__LOGL */ + +/* Define to 1 if you have the `_modf' function. */ +/* #undef HAVE__MODF */ + +/* Define to 1 if you have the `_modff' function. */ +/* #undef HAVE__MODFF */ + +/* Define to 1 if you have the `_modfl' function. */ +/* #undef HAVE__MODFL */ + +/* Define to 1 if you have the `_powf' function. */ +/* #undef HAVE__POWF */ + +/* Define to 1 if you have the `_powl' function. */ +/* #undef HAVE__POWL */ + +/* Define to 1 if you have the `_qfpclass' function. */ +/* #undef HAVE__QFPCLASS */ + +/* Define to 1 if you have the `_sincos' function. */ +/* #undef HAVE__SINCOS */ + +/* Define to 1 if you have the `_sincosf' function. */ +/* #undef HAVE__SINCOSF */ + +/* Define to 1 if you have the `_sincosl' function. */ +/* #undef HAVE__SINCOSL */ + +/* Define to 1 if you have the `_sinf' function. */ +/* #undef HAVE__SINF */ + +/* Define to 1 if you have the `_sinhf' function. */ +/* #undef HAVE__SINHF */ + +/* Define to 1 if you have the `_sinhl' function. */ +/* #undef HAVE__SINHL */ + +/* Define to 1 if you have the `_sinl' function. */ +/* #undef HAVE__SINL */ + +/* Define to 1 if you have the `_sqrtf' function. */ +/* #undef HAVE__SQRTF */ + +/* Define to 1 if you have the `_sqrtl' function. */ +/* #undef HAVE__SQRTL */ + +/* Define to 1 if you have the `_tanf' function. */ +/* #undef HAVE__TANF */ + +/* Define to 1 if you have the `_tanhf' function. */ +/* #undef HAVE__TANHF */ + +/* Define to 1 if you have the `_tanhl' function. */ +/* #undef HAVE__TANHL */ + +/* Define to 1 if you have the `_tanl' function. */ +/* #undef HAVE__TANL */ + +/* Define to 1 if you have the `__cxa_thread_atexit_impl' function. */ +/* #undef HAVE___CXA_THREAD_ATEXIT_IMPL */ + +/* Define as const if the declaration of iconv() needs const. */ +/* #undef ICONV_CONST */ + +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#define LT_OBJDIR ".libs/" + +/* Name of package */ +/* #undef PACKAGE */ + +/* Define to the address where bug reports for this package should be sent. */ +#define PACKAGE_BUGREPORT "" + +/* Define to the full name of this package. */ +#define PACKAGE_NAME "package-unused" + +/* Define to the full name and version of this package. */ +#define PACKAGE_STRING "package-unused version-unused" + +/* Define to the one symbol short name of this package. */ +#define PACKAGE_TARNAME "libstdc++" + +/* Define to the home page for this package. */ +#define PACKAGE_URL "" + +/* Define to the version of this package. */ +#define PACKAGE_VERSION "version-unused" + +/* The size of `char', as computed by sizeof. */ +/* #undef SIZEOF_CHAR */ + +/* The size of `int', as computed by sizeof. */ +/* #undef SIZEOF_INT */ + +/* The size of `long', as computed by sizeof. */ +/* #undef SIZEOF_LONG */ + +/* The size of `short', as computed by sizeof. */ +/* #undef SIZEOF_SHORT */ + +/* The size of `void *', as computed by sizeof. */ +/* #undef SIZEOF_VOID_P */ + +/* Define to 1 if you have the ANSI C header files. */ +#define STDC_HEADERS 1 + +/* Version number of package */ +/* #undef VERSION */ + +/* Define if the compiler supports C++11 atomics. */ +#define _GLIBCXX_ATOMIC_BUILTINS 1 + +/* Define to use concept checking code from the boost libraries. */ +/* #undef _GLIBCXX_CONCEPT_CHECKS */ + +/* Define to 1 if a fully dynamic basic_string is wanted, 0 to disable, + undefined for platform defaults */ +#define _GLIBCXX_FULLY_DYNAMIC_STRING 0 + +/* Define if gthreads library is available. */ +/* #undef _GLIBCXX_HAS_GTHREADS */ + +/* Define to 1 if a full hosted library is built, or 0 if freestanding. */ +#define _GLIBCXX_HOSTED 1 + +/* Define if compatibility should be provided for -mlong-double-64. */ +/* #undef _GLIBCXX_LONG_DOUBLE_COMPAT */ + +/* Define if ptrdiff_t is int. */ +#define _GLIBCXX_PTRDIFF_T_IS_INT 1 + +/* Define if using setrlimit to set resource limits during "make check" */ +/* #undef _GLIBCXX_RES_LIMITS */ + +/* Define if size_t is unsigned int. */ +#define _GLIBCXX_SIZE_T_IS_UINT 1 + +/* Define if the compiler is configured for setjmp/longjmp exceptions. */ +/* #undef _GLIBCXX_SJLJ_EXCEPTIONS */ + +/* Define to the value of the EOF integer constant. */ +#define _GLIBCXX_STDIO_EOF -1 + +/* Define to the value of the SEEK_CUR integer constant. */ +#define _GLIBCXX_STDIO_SEEK_CUR 1 + +/* Define to the value of the SEEK_END integer constant. */ +#define _GLIBCXX_STDIO_SEEK_END 2 + +/* Define to use symbol versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER */ + +/* Define to use darwin versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_DARWIN */ + +/* Define to use GNU versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_GNU */ + +/* Define to use GNU namespace versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_GNU_NAMESPACE */ + +/* Define to use Sun versioning in the shared library. */ +/* #undef _GLIBCXX_SYMVER_SUN */ + +/* Define if C99 functions or macros from , , , + , and can be used or exposed. */ +/* #undef _GLIBCXX_USE_C99 */ + +/* Define if C99 functions in should be used in . Using + compiler builtins for these functions requires corresponding C99 library + functions to be present. */ +/* #undef _GLIBCXX_USE_C99_COMPLEX */ + +/* Define if C99 functions in should be used in . + Using compiler builtins for these functions requires corresponding C99 + library functions to be present. */ +/* #undef _GLIBCXX_USE_C99_COMPLEX_TR1 */ + +/* Define if C99 functions in should be imported in in + namespace std::tr1. */ +/* #undef _GLIBCXX_USE_C99_CTYPE_TR1 */ + +/* Define if C99 functions in should be imported in in + namespace std::tr1. */ +/* #undef _GLIBCXX_USE_C99_FENV_TR1 */ + +/* Define if C99 functions in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_INTTYPES_TR1 1 + +/* Define if wchar_t C99 functions in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_INTTYPES_WCHAR_T_TR1 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std. */ +#define _GLIBCXX_USE_C99_MATH 1 + +/* Define if C99 functions or macros in should be imported in + in namespace std::tr1. */ +#define _GLIBCXX_USE_C99_MATH_TR1 1 + +/* Define if C99 types in should be imported in in + namespace std::tr1. */ +#define _GLIBCXX_USE_C99_STDINT_TR1 1 + +/* Defined if clock_gettime has monotonic clock support. */ +/* #undef _GLIBCXX_USE_CLOCK_MONOTONIC */ + +/* Defined if clock_gettime syscall has monotonic and realtime clock support. */ +/* #undef _GLIBCXX_USE_CLOCK_GETTIME_SYSCALL */ + +/* Defined if clock_gettime has realtime clock support. */ +/* #undef _GLIBCXX_USE_CLOCK_REALTIME */ + +/* Define if ISO/IEC TR 24733 decimal floating point types are supported on + this host. */ +#define _GLIBCXX_USE_DECIMAL_FLOAT 1 + +/* Define if __float128 is supported on this host. */ +#define _GLIBCXX_USE_FLOAT128 1 + +/* Defined if gettimeofday is available. */ +#define _GLIBCXX_USE_GETTIMEOFDAY 1 + +/* Define if get_nprocs is available in . */ +/* #undef _GLIBCXX_USE_GET_NPROCS */ + +/* Define if __int128 is supported on this host. */ +/* #undef _GLIBCXX_USE_INT128 */ + +/* Define if LFS support is available. */ +/* #undef _GLIBCXX_USE_LFS */ + +/* Define if code specialized for long long should be used. */ +#define _GLIBCXX_USE_LONG_LONG 1 + +/* Defined if nanosleep is available. */ +/* #undef _GLIBCXX_USE_NANOSLEEP */ + +/* Define if NLS translations are to be used. */ +/* #undef _GLIBCXX_USE_NLS */ + +/* Define if pthreads_num_processors_np is available in . */ +/* #undef _GLIBCXX_USE_PTHREADS_NUM_PROCESSORS_NP */ + +/* Define if /dev/random and /dev/urandom are available for the random_device + of TR1 (Chapter 5.1). */ +/* #undef _GLIBCXX_USE_RANDOM_TR1 */ + +/* Defined if sched_yield is available. */ +/* #undef _GLIBCXX_USE_SCHED_YIELD */ + +/* Define if _SC_NPROCESSORS_ONLN is available in . */ +/* #undef _GLIBCXX_USE_SC_NPROCESSORS_ONLN */ + +/* Define if _SC_NPROC_ONLN is available in . */ +/* #undef _GLIBCXX_USE_SC_NPROC_ONLN */ + +/* Define if sysctl(), CTL_HW and HW_NCPU are available in . */ +/* #undef _GLIBCXX_USE_SYSCTL_HW_NCPU */ + +/* Define if code specialized for wchar_t should be used. */ +//#define _GLIBCXX_USE_WCHAR_T 1 + +/* Define to 1 if a verbose library is built, or 0 otherwise. */ +#define _GLIBCXX_VERBOSE 1 + +/* Defined if as can handle rdrand. */ +#define _GLIBCXX_X86_RDRAND 1 + +/* Define to 1 if mutex_timedlock is available. */ +#define _GTHREAD_USE_MUTEX_TIMEDLOCK 1 + +#if defined (HAVE__ACOSF) && ! defined (HAVE_ACOSF) +# define HAVE_ACOSF 1 +# define acosf _acosf +#endif + +#if defined (HAVE__ACOSL) && ! defined (HAVE_ACOSL) +# define HAVE_ACOSL 1 +# define acosl _acosl +#endif + +#if defined (HAVE__ASINF) && ! defined (HAVE_ASINF) +# define HAVE_ASINF 1 +# define asinf _asinf +#endif + +#if defined (HAVE__ASINL) && ! defined (HAVE_ASINL) +# define HAVE_ASINL 1 +# define asinl _asinl +#endif + +#if defined (HAVE__ATAN2F) && ! defined (HAVE_ATAN2F) +# define HAVE_ATAN2F 1 +# define atan2f _atan2f +#endif + +#if defined (HAVE__ATAN2L) && ! defined (HAVE_ATAN2L) +# define HAVE_ATAN2L 1 +# define atan2l _atan2l +#endif + +#if defined (HAVE__ATANF) && ! defined (HAVE_ATANF) +# define HAVE_ATANF 1 +# define atanf _atanf +#endif + +#if defined (HAVE__ATANL) && ! defined (HAVE_ATANL) +# define HAVE_ATANL 1 +# define atanl _atanl +#endif + +#if defined (HAVE__CEILF) && ! defined (HAVE_CEILF) +# define HAVE_CEILF 1 +# define ceilf _ceilf +#endif + +#if defined (HAVE__CEILL) && ! defined (HAVE_CEILL) +# define HAVE_CEILL 1 +# define ceill _ceill +#endif + +#if defined (HAVE__COSF) && ! defined (HAVE_COSF) +# define HAVE_COSF 1 +# define cosf _cosf +#endif + +#if defined (HAVE__COSHF) && ! defined (HAVE_COSHF) +# define HAVE_COSHF 1 +# define coshf _coshf +#endif + +#if defined (HAVE__COSHL) && ! defined (HAVE_COSHL) +# define HAVE_COSHL 1 +# define coshl _coshl +#endif + +#if defined (HAVE__COSL) && ! defined (HAVE_COSL) +# define HAVE_COSL 1 +# define cosl _cosl +#endif + +#if defined (HAVE__EXPF) && ! defined (HAVE_EXPF) +# define HAVE_EXPF 1 +# define expf _expf +#endif + +#if defined (HAVE__EXPL) && ! defined (HAVE_EXPL) +# define HAVE_EXPL 1 +# define expl _expl +#endif + +#if defined (HAVE__FABSF) && ! defined (HAVE_FABSF) +# define HAVE_FABSF 1 +# define fabsf _fabsf +#endif + +#if defined (HAVE__FABSL) && ! defined (HAVE_FABSL) +# define HAVE_FABSL 1 +# define fabsl _fabsl +#endif + +#if defined (HAVE__FINITE) && ! defined (HAVE_FINITE) +# define HAVE_FINITE 1 +# define finite _finite +#endif + +#if defined (HAVE__FINITEF) && ! defined (HAVE_FINITEF) +# define HAVE_FINITEF 1 +# define finitef _finitef +#endif + +#if defined (HAVE__FINITEL) && ! defined (HAVE_FINITEL) +# define HAVE_FINITEL 1 +# define finitel _finitel +#endif + +#if defined (HAVE__FLOORF) && ! defined (HAVE_FLOORF) +# define HAVE_FLOORF 1 +# define floorf _floorf +#endif + +#if defined (HAVE__FLOORL) && ! defined (HAVE_FLOORL) +# define HAVE_FLOORL 1 +# define floorl _floorl +#endif + +#if defined (HAVE__FMODF) && ! defined (HAVE_FMODF) +# define HAVE_FMODF 1 +# define fmodf _fmodf +#endif + +#if defined (HAVE__FMODL) && ! defined (HAVE_FMODL) +# define HAVE_FMODL 1 +# define fmodl _fmodl +#endif + +#if defined (HAVE__FPCLASS) && ! defined (HAVE_FPCLASS) +# define HAVE_FPCLASS 1 +# define fpclass _fpclass +#endif + +#if defined (HAVE__FREXPF) && ! defined (HAVE_FREXPF) +# define HAVE_FREXPF 1 +# define frexpf _frexpf +#endif + +#if defined (HAVE__FREXPL) && ! defined (HAVE_FREXPL) +# define HAVE_FREXPL 1 +# define frexpl _frexpl +#endif + +#if defined (HAVE__HYPOT) && ! defined (HAVE_HYPOT) +# define HAVE_HYPOT 1 +# define hypot _hypot +#endif + +#if defined (HAVE__HYPOTF) && ! defined (HAVE_HYPOTF) +# define HAVE_HYPOTF 1 +# define hypotf _hypotf +#endif + +#if defined (HAVE__HYPOTL) && ! defined (HAVE_HYPOTL) +# define HAVE_HYPOTL 1 +# define hypotl _hypotl +#endif + +#if defined (HAVE__ISINF) && ! defined (HAVE_ISINF) +# define HAVE_ISINF 1 +# define isinf _isinf +#endif + +#if defined (HAVE__ISINFF) && ! defined (HAVE_ISINFF) +# define HAVE_ISINFF 1 +# define isinff _isinff +#endif + +#if defined (HAVE__ISINFL) && ! defined (HAVE_ISINFL) +# define HAVE_ISINFL 1 +# define isinfl _isinfl +#endif + +#if defined (HAVE__ISNAN) && ! defined (HAVE_ISNAN) +# define HAVE_ISNAN 1 +# define isnan _isnan +#endif + +#if defined (HAVE__ISNANF) && ! defined (HAVE_ISNANF) +# define HAVE_ISNANF 1 +# define isnanf _isnanf +#endif + +#if defined (HAVE__ISNANL) && ! defined (HAVE_ISNANL) +# define HAVE_ISNANL 1 +# define isnanl _isnanl +#endif + +#if defined (HAVE__LDEXPF) && ! defined (HAVE_LDEXPF) +# define HAVE_LDEXPF 1 +# define ldexpf _ldexpf +#endif + +#if defined (HAVE__LDEXPL) && ! defined (HAVE_LDEXPL) +# define HAVE_LDEXPL 1 +# define ldexpl _ldexpl +#endif + +#if defined (HAVE__LOG10F) && ! defined (HAVE_LOG10F) +# define HAVE_LOG10F 1 +# define log10f _log10f +#endif + +#if defined (HAVE__LOG10L) && ! defined (HAVE_LOG10L) +# define HAVE_LOG10L 1 +# define log10l _log10l +#endif + +#if defined (HAVE__LOGF) && ! defined (HAVE_LOGF) +# define HAVE_LOGF 1 +# define logf _logf +#endif + +#if defined (HAVE__LOGL) && ! defined (HAVE_LOGL) +# define HAVE_LOGL 1 +# define logl _logl +#endif + +#if defined (HAVE__MODF) && ! defined (HAVE_MODF) +# define HAVE_MODF 1 +# define modf _modf +#endif + +#if defined (HAVE__MODFF) && ! defined (HAVE_MODFF) +# define HAVE_MODFF 1 +# define modff _modff +#endif + +#if defined (HAVE__MODFL) && ! defined (HAVE_MODFL) +# define HAVE_MODFL 1 +# define modfl _modfl +#endif + +#if defined (HAVE__POWF) && ! defined (HAVE_POWF) +# define HAVE_POWF 1 +# define powf _powf +#endif + +#if defined (HAVE__POWL) && ! defined (HAVE_POWL) +# define HAVE_POWL 1 +# define powl _powl +#endif + +#if defined (HAVE__QFPCLASS) && ! defined (HAVE_QFPCLASS) +# define HAVE_QFPCLASS 1 +# define qfpclass _qfpclass +#endif + +#if defined (HAVE__SINCOS) && ! defined (HAVE_SINCOS) +# define HAVE_SINCOS 1 +# define sincos _sincos +#endif + +#if defined (HAVE__SINCOSF) && ! defined (HAVE_SINCOSF) +# define HAVE_SINCOSF 1 +# define sincosf _sincosf +#endif + +#if defined (HAVE__SINCOSL) && ! defined (HAVE_SINCOSL) +# define HAVE_SINCOSL 1 +# define sincosl _sincosl +#endif + +#if defined (HAVE__SINF) && ! defined (HAVE_SINF) +# define HAVE_SINF 1 +# define sinf _sinf +#endif + +#if defined (HAVE__SINHF) && ! defined (HAVE_SINHF) +# define HAVE_SINHF 1 +# define sinhf _sinhf +#endif + +#if defined (HAVE__SINHL) && ! defined (HAVE_SINHL) +# define HAVE_SINHL 1 +# define sinhl _sinhl +#endif + +#if defined (HAVE__SINL) && ! defined (HAVE_SINL) +# define HAVE_SINL 1 +# define sinl _sinl +#endif + +#if defined (HAVE__SQRTF) && ! defined (HAVE_SQRTF) +# define HAVE_SQRTF 1 +# define sqrtf _sqrtf +#endif + +#if defined (HAVE__SQRTL) && ! defined (HAVE_SQRTL) +# define HAVE_SQRTL 1 +# define sqrtl _sqrtl +#endif + +#if defined (HAVE__STRTOF) && ! defined (HAVE_STRTOF) +# define HAVE_STRTOF 1 +# define strtof _strtof +#endif + +#if defined (HAVE__STRTOLD) && ! defined (HAVE_STRTOLD) +# define HAVE_STRTOLD 1 +# define strtold _strtold +#endif + +#if defined (HAVE__TANF) && ! defined (HAVE_TANF) +# define HAVE_TANF 1 +# define tanf _tanf +#endif + +#if defined (HAVE__TANHF) && ! defined (HAVE_TANHF) +# define HAVE_TANHF 1 +# define tanhf _tanhf +#endif + +#if defined (HAVE__TANHL) && ! defined (HAVE_TANHL) +# define HAVE_TANHL 1 +# define tanhl _tanhl +#endif + +#if defined (HAVE__TANL) && ! defined (HAVE_TANL) +# define HAVE_TANL 1 +# define tanl _tanl +#endif diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/cp-demangle.h b/contrib/sdk/sources/libstdc++-v3/libsupc++/cp-demangle.h new file mode 100644 index 0000000000..ae635beb4c --- /dev/null +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/cp-demangle.h @@ -0,0 +1,169 @@ +/* Internal demangler interface for g++ V3 ABI. + Copyright (C) 2003, 2004, 2005, 2006, 2007, 2010 + Free Software Foundation, Inc. + Written by Ian Lance Taylor . + + This file is part of the libiberty library, which is part of GCC. + + This file 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 of the License, or + (at your option) any later version. + + In addition to the permissions in the GNU General Public License, the + Free Software Foundation gives you unlimited permission to link the + compiled version of this file into combinations with other programs, + and to distribute those combinations without any restriction coming + from the use of this file. (The General Public License restrictions + do apply in other respects; for example, they cover modification of + the file, and distribution when not linked into a combined + executable.) + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. +*/ + +/* This file provides some definitions shared by cp-demangle.c and + cp-demint.c. It should not be included by any other files. */ + +/* Information we keep for operators. */ + +struct demangle_operator_info +{ + /* Mangled name. */ + const char *code; + /* Real name. */ + const char *name; + /* Length of real name. */ + int len; + /* Number of arguments. */ + int args; +}; + +/* How to print the value of a builtin type. */ + +enum d_builtin_type_print +{ + /* Print as (type)val. */ + D_PRINT_DEFAULT, + /* Print as integer. */ + D_PRINT_INT, + /* Print as unsigned integer, with trailing "u". */ + D_PRINT_UNSIGNED, + /* Print as long, with trailing "l". */ + D_PRINT_LONG, + /* Print as unsigned long, with trailing "ul". */ + D_PRINT_UNSIGNED_LONG, + /* Print as long long, with trailing "ll". */ + D_PRINT_LONG_LONG, + /* Print as unsigned long long, with trailing "ull". */ + D_PRINT_UNSIGNED_LONG_LONG, + /* Print as bool. */ + D_PRINT_BOOL, + /* Print as float--put value in square brackets. */ + D_PRINT_FLOAT, + /* Print in usual way, but here to detect void. */ + D_PRINT_VOID +}; + +/* Information we keep for a builtin type. */ + +struct demangle_builtin_type_info +{ + /* Type name. */ + const char *name; + /* Length of type name. */ + int len; + /* Type name when using Java. */ + const char *java_name; + /* Length of java name. */ + int java_len; + /* How to print a value of this type. */ + enum d_builtin_type_print print; +}; + +/* The information structure we pass around. */ + +struct d_info +{ + /* The string we are demangling. */ + const char *s; + /* The end of the string we are demangling. */ + const char *send; + /* The options passed to the demangler. */ + int options; + /* The next character in the string to consider. */ + const char *n; + /* The array of components. */ + struct demangle_component *comps; + /* The index of the next available component. */ + int next_comp; + /* The number of available component structures. */ + int num_comps; + /* The array of substitutions. */ + struct demangle_component **subs; + /* The index of the next substitution. */ + int next_sub; + /* The number of available entries in the subs array. */ + int num_subs; + /* The number of substitutions which we actually made from the subs + array, plus the number of template parameter references we + saw. */ + int did_subs; + /* The last name we saw, for constructors and destructors. */ + struct demangle_component *last_name; + /* A running total of the length of large expansions from the + mangled name to the demangled name, such as standard + substitutions and builtin types. */ + int expansion; +}; + +/* To avoid running past the ending '\0', don't: + - call d_peek_next_char if d_peek_char returned '\0' + - call d_advance with an 'i' that is too large + - call d_check_char(di, '\0') + Everything else is safe. */ +#define d_peek_char(di) (*((di)->n)) +#define d_peek_next_char(di) ((di)->n[1]) +#define d_advance(di, i) ((di)->n += (i)) +#define d_check_char(di, c) (d_peek_char(di) == c ? ((di)->n++, 1) : 0) +#define d_next_char(di) (d_peek_char(di) == '\0' ? '\0' : *((di)->n++)) +#define d_str(di) ((di)->n) + +/* Functions and arrays in cp-demangle.c which are referenced by + functions in cp-demint.c. */ +#ifdef IN_GLIBCPP_V3 +#define CP_STATIC_IF_GLIBCPP_V3 static +#else +#define CP_STATIC_IF_GLIBCPP_V3 extern +#endif + +#ifndef IN_GLIBCPP_V3 +extern const struct demangle_operator_info cplus_demangle_operators[]; +#endif + +#define D_BUILTIN_TYPE_COUNT (33) + +CP_STATIC_IF_GLIBCPP_V3 +const struct demangle_builtin_type_info +cplus_demangle_builtin_types[D_BUILTIN_TYPE_COUNT]; + +CP_STATIC_IF_GLIBCPP_V3 +struct demangle_component * +cplus_demangle_mangled_name (struct d_info *, int); + +CP_STATIC_IF_GLIBCPP_V3 +struct demangle_component * +cplus_demangle_type (struct d_info *); + +extern void +cplus_demangle_init_info (const char *, int, size_t, struct d_info *); + +/* cp-demangle.c needs to define this a little differently */ +#undef CP_STATIC_IF_GLIBCPP_V3 diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/demangle.h b/contrib/sdk/sources/libstdc++-v3/libsupc++/demangle.h new file mode 100644 index 0000000000..58bf547d54 --- /dev/null +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/demangle.h @@ -0,0 +1,671 @@ +/* Defs for interface to demanglers. + Copyright 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, + 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License + as published by the Free Software Foundation; either version 2, or + (at your option) any later version. + + In addition to the permissions in the GNU Library General Public + License, the Free Software Foundation gives you unlimited + permission to link the compiled version of this file into + combinations with other programs, and to distribute those + combinations without any restriction coming from the use of this + file. (The Library Public License restrictions do apply in other + respects; for example, they cover modification of the file, and + distribution when not linked into a combined executable.) + + This program 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 + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA + 02110-1301, USA. */ + + +#if !defined (DEMANGLE_H) +#define DEMANGLE_H + +#include "libiberty.h" + +#ifdef __cplusplus +extern "C" { +#endif /* __cplusplus */ + +/* Options passed to cplus_demangle (in 2nd parameter). */ + +#define DMGL_NO_OPTS 0 /* For readability... */ +#define DMGL_PARAMS (1 << 0) /* Include function args */ +#define DMGL_ANSI (1 << 1) /* Include const, volatile, etc */ +#define DMGL_JAVA (1 << 2) /* Demangle as Java rather than C++. */ +#define DMGL_VERBOSE (1 << 3) /* Include implementation details. */ +#define DMGL_TYPES (1 << 4) /* Also try to demangle type encodings. */ +#define DMGL_RET_POSTFIX (1 << 5) /* Print function return types (when + present) after function signature. + It applies only to the toplevel + function type. */ +#define DMGL_RET_DROP (1 << 6) /* Suppress printing function return + types, even if present. It applies + only to the toplevel function type. + */ + +#define DMGL_AUTO (1 << 8) +#define DMGL_GNU (1 << 9) +#define DMGL_LUCID (1 << 10) +#define DMGL_ARM (1 << 11) +#define DMGL_HP (1 << 12) /* For the HP aCC compiler; + same as ARM except for + template arguments, etc. */ +#define DMGL_EDG (1 << 13) +#define DMGL_GNU_V3 (1 << 14) +#define DMGL_GNAT (1 << 15) + +/* If none of these are set, use 'current_demangling_style' as the default. */ +#define DMGL_STYLE_MASK (DMGL_AUTO|DMGL_GNU|DMGL_LUCID|DMGL_ARM|DMGL_HP|DMGL_EDG|DMGL_GNU_V3|DMGL_JAVA|DMGL_GNAT) + +/* Enumeration of possible demangling styles. + + Lucid and ARM styles are still kept logically distinct, even though + they now both behave identically. The resulting style is actual the + union of both. I.E. either style recognizes both "__pt__" and "__rf__" + for operator "->", even though the first is lucid style and the second + is ARM style. (FIXME?) */ + +extern enum demangling_styles +{ + no_demangling = -1, + unknown_demangling = 0, + auto_demangling = DMGL_AUTO, + gnu_demangling = DMGL_GNU, + lucid_demangling = DMGL_LUCID, + arm_demangling = DMGL_ARM, + hp_demangling = DMGL_HP, + edg_demangling = DMGL_EDG, + gnu_v3_demangling = DMGL_GNU_V3, + java_demangling = DMGL_JAVA, + gnat_demangling = DMGL_GNAT +} current_demangling_style; + +/* Define string names for the various demangling styles. */ + +#define NO_DEMANGLING_STYLE_STRING "none" +#define AUTO_DEMANGLING_STYLE_STRING "auto" +#define GNU_DEMANGLING_STYLE_STRING "gnu" +#define LUCID_DEMANGLING_STYLE_STRING "lucid" +#define ARM_DEMANGLING_STYLE_STRING "arm" +#define HP_DEMANGLING_STYLE_STRING "hp" +#define EDG_DEMANGLING_STYLE_STRING "edg" +#define GNU_V3_DEMANGLING_STYLE_STRING "gnu-v3" +#define JAVA_DEMANGLING_STYLE_STRING "java" +#define GNAT_DEMANGLING_STYLE_STRING "gnat" + +/* Some macros to test what demangling style is active. */ + +#define CURRENT_DEMANGLING_STYLE current_demangling_style +#define AUTO_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_AUTO) +#define GNU_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU) +#define LUCID_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_LUCID) +#define ARM_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_ARM) +#define HP_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_HP) +#define EDG_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_EDG) +#define GNU_V3_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNU_V3) +#define JAVA_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_JAVA) +#define GNAT_DEMANGLING (((int) CURRENT_DEMANGLING_STYLE) & DMGL_GNAT) + +/* Provide information about the available demangle styles. This code is + pulled from gdb into libiberty because it is useful to binutils also. */ + +extern const struct demangler_engine +{ + const char *const demangling_style_name; + const enum demangling_styles demangling_style; + const char *const demangling_style_doc; +} libiberty_demanglers[]; + +extern char * +cplus_demangle (const char *mangled, int options); + +extern int +cplus_demangle_opname (const char *opname, char *result, int options); + +extern const char * +cplus_mangle_opname (const char *opname, int options); + +/* Note: This sets global state. FIXME if you care about multi-threading. */ + +extern void +set_cplus_marker_for_demangling (int ch); + +extern enum demangling_styles +cplus_demangle_set_style (enum demangling_styles style); + +extern enum demangling_styles +cplus_demangle_name_to_style (const char *name); + +/* Callback typedef for allocation-less demangler interfaces. */ +typedef void (*demangle_callbackref) (const char *, size_t, void *); + +/* V3 ABI demangling entry points, defined in cp-demangle.c. Callback + variants return non-zero on success, zero on error. char* variants + return a string allocated by malloc on success, NULL on error. */ +extern int +cplus_demangle_v3_callback (const char *mangled, int options, + demangle_callbackref callback, void *opaque); + +extern char* +cplus_demangle_v3 (const char *mangled, int options); + +extern int +java_demangle_v3_callback (const char *mangled, + demangle_callbackref callback, void *opaque); + +extern char* +java_demangle_v3 (const char *mangled); + +char * +ada_demangle (const char *mangled, int options); + +enum gnu_v3_ctor_kinds { + gnu_v3_complete_object_ctor = 1, + gnu_v3_base_object_ctor, + gnu_v3_complete_object_allocating_ctor, + gnu_v3_object_ctor_group +}; + +/* Return non-zero iff NAME is the mangled form of a constructor name + in the G++ V3 ABI demangling style. Specifically, return an `enum + gnu_v3_ctor_kinds' value indicating what kind of constructor + it is. */ +extern enum gnu_v3_ctor_kinds + is_gnu_v3_mangled_ctor (const char *name); + + +enum gnu_v3_dtor_kinds { + gnu_v3_deleting_dtor = 1, + gnu_v3_complete_object_dtor, + gnu_v3_base_object_dtor, + gnu_v3_object_dtor_group +}; + +/* Return non-zero iff NAME is the mangled form of a destructor name + in the G++ V3 ABI demangling style. Specifically, return an `enum + gnu_v3_dtor_kinds' value, indicating what kind of destructor + it is. */ +extern enum gnu_v3_dtor_kinds + is_gnu_v3_mangled_dtor (const char *name); + +/* The V3 demangler works in two passes. The first pass builds a tree + representation of the mangled name, and the second pass turns the + tree representation into a demangled string. Here we define an + interface to permit a caller to build their own tree + representation, which they can pass to the demangler to get a + demangled string. This can be used to canonicalize user input into + something which the demangler might output. It could also be used + by other demanglers in the future. */ + +/* These are the component types which may be found in the tree. Many + component types have one or two subtrees, referred to as left and + right (a component type with only one subtree puts it in the left + subtree). */ + +enum demangle_component_type +{ + /* A name, with a length and a pointer to a string. */ + DEMANGLE_COMPONENT_NAME, + /* A qualified name. The left subtree is a class or namespace or + some such thing, and the right subtree is a name qualified by + that class. */ + DEMANGLE_COMPONENT_QUAL_NAME, + /* A local name. The left subtree describes a function, and the + right subtree is a name which is local to that function. */ + DEMANGLE_COMPONENT_LOCAL_NAME, + /* A typed name. The left subtree is a name, and the right subtree + describes that name as a function. */ + DEMANGLE_COMPONENT_TYPED_NAME, + /* A template. The left subtree is a template name, and the right + subtree is a template argument list. */ + DEMANGLE_COMPONENT_TEMPLATE, + /* A template parameter. This holds a number, which is the template + parameter index. */ + DEMANGLE_COMPONENT_TEMPLATE_PARAM, + /* A function parameter. This holds a number, which is the index. */ + DEMANGLE_COMPONENT_FUNCTION_PARAM, + /* A constructor. This holds a name and the kind of + constructor. */ + DEMANGLE_COMPONENT_CTOR, + /* A destructor. This holds a name and the kind of destructor. */ + DEMANGLE_COMPONENT_DTOR, + /* A vtable. This has one subtree, the type for which this is a + vtable. */ + DEMANGLE_COMPONENT_VTABLE, + /* A VTT structure. This has one subtree, the type for which this + is a VTT. */ + DEMANGLE_COMPONENT_VTT, + /* A construction vtable. The left subtree is the type for which + this is a vtable, and the right subtree is the derived type for + which this vtable is built. */ + DEMANGLE_COMPONENT_CONSTRUCTION_VTABLE, + /* A typeinfo structure. This has one subtree, the type for which + this is the tpeinfo structure. */ + DEMANGLE_COMPONENT_TYPEINFO, + /* A typeinfo name. This has one subtree, the type for which this + is the typeinfo name. */ + DEMANGLE_COMPONENT_TYPEINFO_NAME, + /* A typeinfo function. This has one subtree, the type for which + this is the tpyeinfo function. */ + DEMANGLE_COMPONENT_TYPEINFO_FN, + /* A thunk. This has one subtree, the name for which this is a + thunk. */ + DEMANGLE_COMPONENT_THUNK, + /* A virtual thunk. This has one subtree, the name for which this + is a virtual thunk. */ + DEMANGLE_COMPONENT_VIRTUAL_THUNK, + /* A covariant thunk. This has one subtree, the name for which this + is a covariant thunk. */ + DEMANGLE_COMPONENT_COVARIANT_THUNK, + /* A Java class. This has one subtree, the type. */ + DEMANGLE_COMPONENT_JAVA_CLASS, + /* A guard variable. This has one subtree, the name for which this + is a guard variable. */ + DEMANGLE_COMPONENT_GUARD, + /* The init and wrapper functions for C++11 thread_local variables. */ + DEMANGLE_COMPONENT_TLS_INIT, + DEMANGLE_COMPONENT_TLS_WRAPPER, + /* A reference temporary. This has one subtree, the name for which + this is a temporary. */ + DEMANGLE_COMPONENT_REFTEMP, + /* A hidden alias. This has one subtree, the encoding for which it + is providing alternative linkage. */ + DEMANGLE_COMPONENT_HIDDEN_ALIAS, + /* A standard substitution. This holds the name of the + substitution. */ + DEMANGLE_COMPONENT_SUB_STD, + /* The restrict qualifier. The one subtree is the type which is + being qualified. */ + DEMANGLE_COMPONENT_RESTRICT, + /* The volatile qualifier. The one subtree is the type which is + being qualified. */ + DEMANGLE_COMPONENT_VOLATILE, + /* The const qualifier. The one subtree is the type which is being + qualified. */ + DEMANGLE_COMPONENT_CONST, + /* The restrict qualifier modifying a member function. The one + subtree is the type which is being qualified. */ + DEMANGLE_COMPONENT_RESTRICT_THIS, + /* The volatile qualifier modifying a member function. The one + subtree is the type which is being qualified. */ + DEMANGLE_COMPONENT_VOLATILE_THIS, + /* The const qualifier modifying a member function. The one subtree + is the type which is being qualified. */ + DEMANGLE_COMPONENT_CONST_THIS, + /* C++11 A reference modifying a member function. The one subtree is the + type which is being referenced. */ + DEMANGLE_COMPONENT_REFERENCE_THIS, + /* C++11: An rvalue reference modifying a member function. The one + subtree is the type which is being referenced. */ + DEMANGLE_COMPONENT_RVALUE_REFERENCE_THIS, + /* A vendor qualifier. The left subtree is the type which is being + qualified, and the right subtree is the name of the + qualifier. */ + DEMANGLE_COMPONENT_VENDOR_TYPE_QUAL, + /* A pointer. The one subtree is the type which is being pointed + to. */ + DEMANGLE_COMPONENT_POINTER, + /* A reference. The one subtree is the type which is being + referenced. */ + DEMANGLE_COMPONENT_REFERENCE, + /* C++0x: An rvalue reference. The one subtree is the type which is + being referenced. */ + DEMANGLE_COMPONENT_RVALUE_REFERENCE, + /* A complex type. The one subtree is the base type. */ + DEMANGLE_COMPONENT_COMPLEX, + /* An imaginary type. The one subtree is the base type. */ + DEMANGLE_COMPONENT_IMAGINARY, + /* A builtin type. This holds the builtin type information. */ + DEMANGLE_COMPONENT_BUILTIN_TYPE, + /* A vendor's builtin type. This holds the name of the type. */ + DEMANGLE_COMPONENT_VENDOR_TYPE, + /* A function type. The left subtree is the return type. The right + subtree is a list of ARGLIST nodes. Either or both may be + NULL. */ + DEMANGLE_COMPONENT_FUNCTION_TYPE, + /* An array type. The left subtree is the dimension, which may be + NULL, or a string (represented as DEMANGLE_COMPONENT_NAME), or an + expression. The right subtree is the element type. */ + DEMANGLE_COMPONENT_ARRAY_TYPE, + /* A pointer to member type. The left subtree is the class type, + and the right subtree is the member type. CV-qualifiers appear + on the latter. */ + DEMANGLE_COMPONENT_PTRMEM_TYPE, + /* A fixed-point type. */ + DEMANGLE_COMPONENT_FIXED_TYPE, + /* A vector type. The left subtree is the number of elements, + the right subtree is the element type. */ + DEMANGLE_COMPONENT_VECTOR_TYPE, + /* An argument list. The left subtree is the current argument, and + the right subtree is either NULL or another ARGLIST node. */ + DEMANGLE_COMPONENT_ARGLIST, + /* A template argument list. The left subtree is the current + template argument, and the right subtree is either NULL or + another TEMPLATE_ARGLIST node. */ + DEMANGLE_COMPONENT_TEMPLATE_ARGLIST, + /* An initializer list. The left subtree is either an explicit type or + NULL, and the right subtree is a DEMANGLE_COMPONENT_ARGLIST. */ + DEMANGLE_COMPONENT_INITIALIZER_LIST, + /* An operator. This holds information about a standard + operator. */ + DEMANGLE_COMPONENT_OPERATOR, + /* An extended operator. This holds the number of arguments, and + the name of the extended operator. */ + DEMANGLE_COMPONENT_EXTENDED_OPERATOR, + /* A typecast, represented as a unary operator. The one subtree is + the type to which the argument should be cast. */ + DEMANGLE_COMPONENT_CAST, + /* A nullary expression. The left subtree is the operator. */ + DEMANGLE_COMPONENT_NULLARY, + /* A unary expression. The left subtree is the operator, and the + right subtree is the single argument. */ + DEMANGLE_COMPONENT_UNARY, + /* A binary expression. The left subtree is the operator, and the + right subtree is a BINARY_ARGS. */ + DEMANGLE_COMPONENT_BINARY, + /* Arguments to a binary expression. The left subtree is the first + argument, and the right subtree is the second argument. */ + DEMANGLE_COMPONENT_BINARY_ARGS, + /* A trinary expression. The left subtree is the operator, and the + right subtree is a TRINARY_ARG1. */ + DEMANGLE_COMPONENT_TRINARY, + /* Arguments to a trinary expression. The left subtree is the first + argument, and the right subtree is a TRINARY_ARG2. */ + DEMANGLE_COMPONENT_TRINARY_ARG1, + /* More arguments to a trinary expression. The left subtree is the + second argument, and the right subtree is the third argument. */ + DEMANGLE_COMPONENT_TRINARY_ARG2, + /* A literal. The left subtree is the type, and the right subtree + is the value, represented as a DEMANGLE_COMPONENT_NAME. */ + DEMANGLE_COMPONENT_LITERAL, + /* A negative literal. Like LITERAL, but the value is negated. + This is a minor hack: the NAME used for LITERAL points directly + to the mangled string, but since negative numbers are mangled + using 'n' instead of '-', we want a way to indicate a negative + number which involves neither modifying the mangled string nor + allocating a new copy of the literal in memory. */ + DEMANGLE_COMPONENT_LITERAL_NEG, + /* A libgcj compiled resource. The left subtree is the name of the + resource. */ + DEMANGLE_COMPONENT_JAVA_RESOURCE, + /* A name formed by the concatenation of two parts. The left + subtree is the first part and the right subtree the second. */ + DEMANGLE_COMPONENT_COMPOUND_NAME, + /* A name formed by a single character. */ + DEMANGLE_COMPONENT_CHARACTER, + /* A number. */ + DEMANGLE_COMPONENT_NUMBER, + /* A decltype type. */ + DEMANGLE_COMPONENT_DECLTYPE, + /* Global constructors keyed to name. */ + DEMANGLE_COMPONENT_GLOBAL_CONSTRUCTORS, + /* Global destructors keyed to name. */ + DEMANGLE_COMPONENT_GLOBAL_DESTRUCTORS, + /* A lambda closure type. */ + DEMANGLE_COMPONENT_LAMBDA, + /* A default argument scope. */ + DEMANGLE_COMPONENT_DEFAULT_ARG, + /* An unnamed type. */ + DEMANGLE_COMPONENT_UNNAMED_TYPE, + /* A transactional clone. This has one subtree, the encoding for + which it is providing alternative linkage. */ + DEMANGLE_COMPONENT_TRANSACTION_CLONE, + /* A non-transactional clone entry point. In the i386/x86_64 abi, + the unmangled symbol of a tm_callable becomes a thunk and the + non-transactional function version is mangled thus. */ + DEMANGLE_COMPONENT_NONTRANSACTION_CLONE, + /* A pack expansion. */ + DEMANGLE_COMPONENT_PACK_EXPANSION, + /* A name with an ABI tag. */ + DEMANGLE_COMPONENT_TAGGED_NAME, + /* A cloned function. */ + DEMANGLE_COMPONENT_CLONE +}; + +/* Types which are only used internally. */ + +struct demangle_operator_info; +struct demangle_builtin_type_info; + +/* A node in the tree representation is an instance of a struct + demangle_component. Note that the field names of the struct are + not well protected against macros defined by the file including + this one. We can fix this if it ever becomes a problem. */ + +struct demangle_component +{ + /* The type of this component. */ + enum demangle_component_type type; + + union + { + /* For DEMANGLE_COMPONENT_NAME. */ + struct + { + /* A pointer to the name (which need not NULL terminated) and + its length. */ + const char *s; + int len; + } s_name; + + /* For DEMANGLE_COMPONENT_OPERATOR. */ + struct + { + /* Operator. */ + const struct demangle_operator_info *op; + } s_operator; + + /* For DEMANGLE_COMPONENT_EXTENDED_OPERATOR. */ + struct + { + /* Number of arguments. */ + int args; + /* Name. */ + struct demangle_component *name; + } s_extended_operator; + + /* For DEMANGLE_COMPONENT_FIXED_TYPE. */ + struct + { + /* The length, indicated by a C integer type name. */ + struct demangle_component *length; + /* _Accum or _Fract? */ + short accum; + /* Saturating or not? */ + short sat; + } s_fixed; + + /* For DEMANGLE_COMPONENT_CTOR. */ + struct + { + /* Kind of constructor. */ + enum gnu_v3_ctor_kinds kind; + /* Name. */ + struct demangle_component *name; + } s_ctor; + + /* For DEMANGLE_COMPONENT_DTOR. */ + struct + { + /* Kind of destructor. */ + enum gnu_v3_dtor_kinds kind; + /* Name. */ + struct demangle_component *name; + } s_dtor; + + /* For DEMANGLE_COMPONENT_BUILTIN_TYPE. */ + struct + { + /* Builtin type. */ + const struct demangle_builtin_type_info *type; + } s_builtin; + + /* For DEMANGLE_COMPONENT_SUB_STD. */ + struct + { + /* Standard substitution string. */ + const char* string; + /* Length of string. */ + int len; + } s_string; + + /* For DEMANGLE_COMPONENT_*_PARAM. */ + struct + { + /* Parameter index. */ + long number; + } s_number; + + /* For DEMANGLE_COMPONENT_CHARACTER. */ + struct + { + int character; + } s_character; + + /* For other types. */ + struct + { + /* Left (or only) subtree. */ + struct demangle_component *left; + /* Right subtree. */ + struct demangle_component *right; + } s_binary; + + struct + { + /* subtree, same place as d_left. */ + struct demangle_component *sub; + /* integer. */ + int num; + } s_unary_num; + + } u; +}; + +/* People building mangled trees are expected to allocate instances of + struct demangle_component themselves. They can then call one of + the following functions to fill them in. */ + +/* Fill in most component types with a left subtree and a right + subtree. Returns non-zero on success, zero on failure, such as an + unrecognized or inappropriate component type. */ + +extern int +cplus_demangle_fill_component (struct demangle_component *fill, + enum demangle_component_type, + struct demangle_component *left, + struct demangle_component *right); + +/* Fill in a DEMANGLE_COMPONENT_NAME. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_name (struct demangle_component *fill, + const char *, int); + +/* Fill in a DEMANGLE_COMPONENT_BUILTIN_TYPE, using the name of the + builtin type (e.g., "int", etc.). Returns non-zero on success, + zero if the type is not recognized. */ + +extern int +cplus_demangle_fill_builtin_type (struct demangle_component *fill, + const char *type_name); + +/* Fill in a DEMANGLE_COMPONENT_OPERATOR, using the name of the + operator and the number of arguments which it takes (the latter is + used to disambiguate operators which can be both binary and unary, + such as '-'). Returns non-zero on success, zero if the operator is + not recognized. */ + +extern int +cplus_demangle_fill_operator (struct demangle_component *fill, + const char *opname, int args); + +/* Fill in a DEMANGLE_COMPONENT_EXTENDED_OPERATOR, providing the + number of arguments and the name. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_extended_operator (struct demangle_component *fill, + int numargs, + struct demangle_component *nm); + +/* Fill in a DEMANGLE_COMPONENT_CTOR. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_ctor (struct demangle_component *fill, + enum gnu_v3_ctor_kinds kind, + struct demangle_component *name); + +/* Fill in a DEMANGLE_COMPONENT_DTOR. Returns non-zero on success, + zero for bad arguments. */ + +extern int +cplus_demangle_fill_dtor (struct demangle_component *fill, + enum gnu_v3_dtor_kinds kind, + struct demangle_component *name); + +/* This function translates a mangled name into a struct + demangle_component tree. The first argument is the mangled name. + The second argument is DMGL_* options. This returns a pointer to a + tree on success, or NULL on failure. On success, the third + argument is set to a block of memory allocated by malloc. This + block should be passed to free when the tree is no longer + needed. */ + +extern struct demangle_component * +cplus_demangle_v3_components (const char *mangled, int options, void **mem); + +/* This function takes a struct demangle_component tree and returns + the corresponding demangled string. The first argument is DMGL_* + options. The second is the tree to demangle. The third is a guess + at the length of the demangled string, used to initially allocate + the return buffer. The fourth is a pointer to a size_t. On + success, this function returns a buffer allocated by malloc(), and + sets the size_t pointed to by the fourth argument to the size of + the allocated buffer (not the length of the returned string). On + failure, this function returns NULL, and sets the size_t pointed to + by the fourth argument to 0 for an invalid tree, or to 1 for a + memory allocation error. */ + +extern char * +cplus_demangle_print (int options, + const struct demangle_component *tree, + int estimated_length, + size_t *p_allocated_size); + +/* This function takes a struct demangle_component tree and passes back + a demangled string in one or more calls to a callback function. + The first argument is DMGL_* options. The second is the tree to + demangle. The third is a pointer to a callback function; on each call + this receives an element of the demangled string, its length, and an + opaque value. The fourth is the opaque value passed to the callback. + The callback is called once or more to return the full demangled + string. The demangled element string is always nul-terminated, though + its length is also provided for convenience. In contrast to + cplus_demangle_print(), this function does not allocate heap memory + to grow output strings (except perhaps where alloca() is implemented + by malloc()), and so is normally safe for use where the heap has been + corrupted. On success, this function returns 1; on failure, 0. */ + +extern int +cplus_demangle_print_callback (int options, + const struct demangle_component *tree, + demangle_callbackref callback, void *opaque); + +#ifdef __cplusplus +} +#endif /* __cplusplus */ + +#endif /* DEMANGLE_H */ diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_globals.cc b/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_globals.cc index d18afb504e..5d4ad647ba 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_globals.cc +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_globals.cc @@ -93,9 +93,9 @@ struct __eh_globals_init bool _M_init; __eh_globals_init() : _M_init(false) - { + { if (__gthread_active_p()) - _M_init = __gthread_key_create(&_M_key, eh_globals_dtor) == 0; + _M_init = __gthread_key_create(&_M_key, eh_globals_dtor) == 0; } ~__eh_globals_init() diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_personality.cc b/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_personality.cc index 0c83a9e16a..e2ceb11600 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_personality.cc +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_personality.cc @@ -95,7 +95,7 @@ get_ttype_entry (lsda_header_info *info, _uleb128_t i) i *= size_of_encoded_value (info->ttype_encoding); read_encoded_value_with_base (info->ttype_encoding, info->ttype_base, info->TType - i, &ptr); - + return reinterpret_cast(ptr); } diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_throw.cc b/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_throw.cc index 0c31d2a72a..a79a025af1 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_throw.cc +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/eh_throw.cc @@ -57,7 +57,7 @@ __gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc) extern "C" void -__cxxabiv1::__cxa_throw (void *obj, std::type_info *tinfo, +__cxxabiv1::__cxa_throw (void *obj, std::type_info *tinfo, void (_GLIBCXX_CDTOR_CALLABI *dest) (void *)) { PROBE2 (throw, obj, tinfo); @@ -100,7 +100,7 @@ __cxxabiv1::__cxa_rethrow () globals->caughtExceptions = 0; else { - header->handlerCount = -header->handlerCount; + header->handlerCount = -header->handlerCount; // Only notify probe for C++ exceptions. PROBE2 (rethrow, __get_object_from_ambiguous_exception(header), header->exceptionType); diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/initializer_list b/contrib/sdk/sources/libstdc++-v3/libsupc++/initializer_list index bb2262ecfc..f99298b606 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/initializer_list +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/initializer_list @@ -77,7 +77,7 @@ namespace std // One past the last element. constexpr const_iterator end() const noexcept { return begin() + size(); } - }; + }; /** * @brief Return an iterator pointing to the first element of diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/libiberty.h b/contrib/sdk/sources/libstdc++-v3/libsupc++/libiberty.h new file mode 100644 index 0000000000..cacde800ea --- /dev/null +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/libiberty.h @@ -0,0 +1,686 @@ +/* Function declarations for libiberty. + + Copyright 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, + 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. + + Note - certain prototypes declared in this header file are for + functions whoes implementation copyright does not belong to the + FSF. Those prototypes are present in this file for reference + purposes only and their presence in this file should not construed + as an indication of ownership by the FSF of the implementation of + those functions in any way or form whatsoever. + + This program 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. + + This program 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 this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street - Fifth Floor, + Boston, MA 02110-1301, USA. + + Written by Cygnus Support, 1994. + + The libiberty library provides a number of functions which are + missing on some operating systems. We do not declare those here, + to avoid conflicts with the system header files on operating + systems that do support those functions. In this file we only + declare those functions which are specific to libiberty. */ + +#ifndef LIBIBERTY_H +#define LIBIBERTY_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "ansidecl.h" + +/* Get a definition for size_t. */ +#include +/* Get a definition for va_list. */ +#include + +#include + +/* If the OS supports it, ensure that the supplied stream is setup to + avoid any multi-threaded locking. Otherwise leave the FILE pointer + unchanged. If the stream is NULL do nothing. */ + +extern void unlock_stream (FILE *); + +/* If the OS supports it, ensure that the standard I/O streams, stdin, + stdout and stderr are setup to avoid any multi-threaded locking. + Otherwise do nothing. */ + +extern void unlock_std_streams (void); + +/* Open and return a FILE pointer. If the OS supports it, ensure that + the stream is setup to avoid any multi-threaded locking. Otherwise + return the FILE pointer unchanged. */ + +extern FILE *fopen_unlocked (const char *, const char *); +extern FILE *fdopen_unlocked (int, const char *); +extern FILE *freopen_unlocked (const char *, const char *, FILE *); + +/* Build an argument vector from a string. Allocates memory using + malloc. Use freeargv to free the vector. */ + +extern char **buildargv (const char *) ATTRIBUTE_MALLOC; + +/* Free a vector returned by buildargv. */ + +extern void freeargv (char **); + +/* Duplicate an argument vector. Allocates memory using malloc. Use + freeargv to free the vector. */ + +extern char **dupargv (char **) ATTRIBUTE_MALLOC; + +/* Expand "@file" arguments in argv. */ + +extern void expandargv PARAMS ((int *, char ***)); + +/* Write argv to an @-file, inserting necessary quoting. */ + +extern int writeargv PARAMS ((char **, FILE *)); + +/* Return the number of elements in argv. */ + +extern int countargv (char**); + +/* Return the last component of a path name. Note that we can't use a + prototype here because the parameter is declared inconsistently + across different systems, sometimes as "char *" and sometimes as + "const char *" */ + +/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is + undefined, we haven't run the autoconf check so provide the + declaration without arguments. If it is 0, we checked and failed + to find the declaration so provide a fully prototyped one. If it + is 1, we found it so don't provide any declaration at all. */ +#if !HAVE_DECL_BASENAME +#if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME) +extern char *basename (const char *); +#else +/* Do not allow basename to be used if there is no prototype seen. We + either need to use the above prototype or have one from + autoconf which would result in HAVE_DECL_BASENAME being set. */ +#define basename basename_cannot_be_used_without_a_prototype +#endif +#endif + +/* A well-defined basename () that is always compiled in. */ + +extern const char *lbasename (const char *); + +/* Same, but assumes DOS semantics (drive name, backslash is also a + dir separator) regardless of host. */ + +extern const char *dos_lbasename (const char *); + +/* Same, but assumes Unix semantics (absolute paths always start with + a slash, only forward slash is accepted as dir separator) + regardless of host. */ + +extern const char *unix_lbasename (const char *); + +/* A well-defined realpath () that is always compiled in. */ + +extern char *lrealpath (const char *); + +/* Concatenate an arbitrary number of strings. You must pass NULL as + the last argument of this function, to terminate the list of + strings. Allocates memory using xmalloc. */ + +extern char *concat (const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL; + +/* Concatenate an arbitrary number of strings. You must pass NULL as + the last argument of this function, to terminate the list of + strings. Allocates memory using xmalloc. The first argument is + not one of the strings to be concatenated, but if not NULL is a + pointer to be freed after the new string is created, similar to the + way xrealloc works. */ + +extern char *reconcat (char *, const char *, ...) ATTRIBUTE_MALLOC ATTRIBUTE_SENTINEL; + +/* Determine the length of concatenating an arbitrary number of + strings. You must pass NULL as the last argument of this function, + to terminate the list of strings. */ + +extern unsigned long concat_length (const char *, ...) ATTRIBUTE_SENTINEL; + +/* Concatenate an arbitrary number of strings into a SUPPLIED area of + memory. You must pass NULL as the last argument of this function, + to terminate the list of strings. The supplied memory is assumed + to be large enough. */ + +extern char *concat_copy (char *, const char *, ...) ATTRIBUTE_SENTINEL; + +/* Concatenate an arbitrary number of strings into a GLOBAL area of + memory. You must pass NULL as the last argument of this function, + to terminate the list of strings. The supplied memory is assumed + to be large enough. */ + +extern char *concat_copy2 (const char *, ...) ATTRIBUTE_SENTINEL; + +/* This is the global area used by concat_copy2. */ + +extern char *libiberty_concat_ptr; + +/* Concatenate an arbitrary number of strings. You must pass NULL as + the last argument of this function, to terminate the list of + strings. Allocates memory using alloca. The arguments are + evaluated twice! */ +#define ACONCAT(ACONCAT_PARAMS) \ + (libiberty_concat_ptr = (char *) alloca (concat_length ACONCAT_PARAMS + 1), \ + concat_copy2 ACONCAT_PARAMS) + +/* Check whether two file descriptors refer to the same file. */ + +extern int fdmatch (int fd1, int fd2); + +/* Return the position of the first bit set in the argument. */ +/* Prototypes vary from system to system, so we only provide a + prototype on systems where we know that we need it. */ +#if defined (HAVE_DECL_FFS) && !HAVE_DECL_FFS +extern int ffs(int); +#endif + +/* Get the working directory. The result is cached, so don't call + chdir() between calls to getpwd(). */ + +extern char * getpwd (void); + +/* Get the current time. */ +/* Prototypes vary from system to system, so we only provide a + prototype on systems where we know that we need it. */ +#ifdef __MINGW32__ +/* Forward declaration to avoid #include . */ +struct timeval; +extern int gettimeofday (struct timeval *, void *); +#endif + +/* Get the amount of time the process has run, in microseconds. */ + +extern long get_run_time (void); + +/* Generate a relocated path to some installation directory. Allocates + return value using malloc. */ + +extern char *make_relative_prefix (const char *, const char *, + const char *) ATTRIBUTE_MALLOC; + +/* Generate a relocated path to some installation directory without + attempting to follow any soft links. Allocates + return value using malloc. */ + +extern char *make_relative_prefix_ignore_links (const char *, const char *, + const char *) ATTRIBUTE_MALLOC; + +/* Choose a temporary directory to use for scratch files. */ + +extern char *choose_temp_base (void) ATTRIBUTE_MALLOC; + +/* Return a temporary file name or NULL if unable to create one. */ + +extern char *make_temp_file (const char *) ATTRIBUTE_MALLOC; + +/* Remove a link to a file unless it is special. */ + +extern int unlink_if_ordinary (const char *); + +/* Allocate memory filled with spaces. Allocates using malloc. */ + +extern const char *spaces (int count); + +/* Return the maximum error number for which strerror will return a + string. */ + +extern int errno_max (void); + +/* Return the name of an errno value (e.g., strerrno (EINVAL) returns + "EINVAL"). */ + +extern const char *strerrno (int); + +/* Given the name of an errno value, return the value. */ + +extern int strtoerrno (const char *); + +/* ANSI's strerror(), but more robust. */ + +extern char *xstrerror (int); + +/* Return the maximum signal number for which strsignal will return a + string. */ + +extern int signo_max (void); + +/* Return a signal message string for a signal number + (e.g., strsignal (SIGHUP) returns something like "Hangup"). */ +/* This is commented out as it can conflict with one in system headers. + We still document its existence though. */ + +/*extern const char *strsignal (int);*/ + +/* Return the name of a signal number (e.g., strsigno (SIGHUP) returns + "SIGHUP"). */ + +extern const char *strsigno (int); + +/* Given the name of a signal, return its number. */ + +extern int strtosigno (const char *); + +/* Register a function to be run by xexit. Returns 0 on success. */ + +extern int xatexit (void (*fn) (void)); + +/* Exit, calling all the functions registered with xatexit. */ + +extern void xexit (int status) ATTRIBUTE_NORETURN; + +/* Set the program name used by xmalloc. */ + +extern void xmalloc_set_program_name (const char *); + +/* Report an allocation failure. */ +extern void xmalloc_failed (size_t) ATTRIBUTE_NORETURN; + +/* Allocate memory without fail. If malloc fails, this will print a + message to stderr (using the name set by xmalloc_set_program_name, + if any) and then call xexit. */ + +extern void *xmalloc (size_t) ATTRIBUTE_MALLOC; + +/* Reallocate memory without fail. This works like xmalloc. Note, + realloc type functions are not suitable for attribute malloc since + they may return the same address across multiple calls. */ + +extern void *xrealloc (void *, size_t); + +/* Allocate memory without fail and set it to zero. This works like + xmalloc. */ + +extern void *xcalloc (size_t, size_t) ATTRIBUTE_MALLOC; + +/* Copy a string into a memory buffer without fail. */ + +extern char *xstrdup (const char *) ATTRIBUTE_MALLOC; + +/* Copy at most N characters from string into a buffer without fail. */ + +extern char *xstrndup (const char *, size_t) ATTRIBUTE_MALLOC; + +/* Copy an existing memory buffer to a new memory buffer without fail. */ + +extern void *xmemdup (const void *, size_t, size_t) ATTRIBUTE_MALLOC; + +/* Physical memory routines. Return values are in BYTES. */ +extern double physmem_total (void); +extern double physmem_available (void); + +/* Compute the 32-bit CRC of a block of memory. */ +extern unsigned int xcrc32 (const unsigned char *, int, unsigned int); + +/* These macros provide a K&R/C89/C++-friendly way of allocating structures + with nice encapsulation. The XDELETE*() macros are technically + superfluous, but provided here for symmetry. Using them consistently + makes it easier to update client code to use different allocators such + as new/delete and new[]/delete[]. */ + +/* Scalar allocators. */ + +#define XALLOCA(T) ((T *) alloca (sizeof (T))) +#define XNEW(T) ((T *) xmalloc (sizeof (T))) +#define XCNEW(T) ((T *) xcalloc (1, sizeof (T))) +#define XDUP(T, P) ((T *) xmemdup ((P), sizeof (T), sizeof (T))) +#define XDELETE(P) free ((void*) (P)) + +/* Array allocators. */ + +#define XALLOCAVEC(T, N) ((T *) alloca (sizeof (T) * (N))) +#define XNEWVEC(T, N) ((T *) xmalloc (sizeof (T) * (N))) +#define XCNEWVEC(T, N) ((T *) xcalloc ((N), sizeof (T))) +#define XDUPVEC(T, P, N) ((T *) xmemdup ((P), sizeof (T) * (N), sizeof (T) * (N))) +#define XRESIZEVEC(T, P, N) ((T *) xrealloc ((void *) (P), sizeof (T) * (N))) +#define XDELETEVEC(P) free ((void*) (P)) + +/* Allocators for variable-sized structures and raw buffers. */ + +#define XALLOCAVAR(T, S) ((T *) alloca ((S))) +#define XNEWVAR(T, S) ((T *) xmalloc ((S))) +#define XCNEWVAR(T, S) ((T *) xcalloc (1, (S))) +#define XDUPVAR(T, P, S1, S2) ((T *) xmemdup ((P), (S1), (S2))) +#define XRESIZEVAR(T, P, S) ((T *) xrealloc ((P), (S))) + +/* Type-safe obstack allocator. */ + +#define XOBNEW(O, T) ((T *) obstack_alloc ((O), sizeof (T))) +#define XOBNEWVEC(O, T, N) ((T *) obstack_alloc ((O), sizeof (T) * (N))) +#define XOBNEWVAR(O, T, S) ((T *) obstack_alloc ((O), (S))) +#define XOBFINISH(O, T) ((T) obstack_finish ((O))) + +/* hex character manipulation routines */ + +#define _hex_array_size 256 +#define _hex_bad 99 +extern const unsigned char _hex_value[_hex_array_size]; +extern void hex_init (void); +#define hex_p(c) (hex_value (c) != _hex_bad) +/* If you change this, note well: Some code relies on side effects in + the argument being performed exactly once. */ +#define hex_value(c) ((unsigned int) _hex_value[(unsigned char) (c)]) + +/* Flags for pex_init. These are bits to be or'ed together. */ + +/* Record subprocess times, if possible. */ +#define PEX_RECORD_TIMES 0x1 + +/* Use pipes for communication between processes, if possible. */ +#define PEX_USE_PIPES 0x2 + +/* Save files used for communication between processes. */ +#define PEX_SAVE_TEMPS 0x4 + +/* Prepare to execute one or more programs, with standard output of + each program fed to standard input of the next. + FLAGS As above. + PNAME The name of the program to report in error messages. + TEMPBASE A base name to use for temporary files; may be NULL to + use a random name. + Returns NULL on error. */ + +extern struct pex_obj *pex_init (int flags, const char *pname, + const char *tempbase); + +/* Flags for pex_run. These are bits to be or'ed together. */ + +/* Last program in pipeline. Standard output of program goes to + OUTNAME, or, if OUTNAME is NULL, to standard output of caller. Do + not set this if you want to call pex_read_output. After this is + set, pex_run may no longer be called with the same struct + pex_obj. */ +#define PEX_LAST 0x1 + +/* Search for program in executable search path. */ +#define PEX_SEARCH 0x2 + +/* OUTNAME is a suffix. */ +#define PEX_SUFFIX 0x4 + +/* Send program's standard error to standard output. */ +#define PEX_STDERR_TO_STDOUT 0x8 + +/* Input file should be opened in binary mode. This flag is ignored + on Unix. */ +#define PEX_BINARY_INPUT 0x10 + +/* Output file should be opened in binary mode. This flag is ignored + on Unix. For proper behaviour PEX_BINARY_INPUT and + PEX_BINARY_OUTPUT have to match appropriately--i.e., a call using + PEX_BINARY_OUTPUT should be followed by a call using + PEX_BINARY_INPUT. */ +#define PEX_BINARY_OUTPUT 0x20 + +/* Capture stderr to a pipe. The output can be read by + calling pex_read_err and reading from the returned + FILE object. This flag may be specified only for + the last program in a pipeline. + + This flag is supported only on Unix and Windows. */ +#define PEX_STDERR_TO_PIPE 0x40 + +/* Capture stderr in binary mode. This flag is ignored + on Unix. */ +#define PEX_BINARY_ERROR 0x80 + + +/* Execute one program. Returns NULL on success. On error returns an + error string (typically just the name of a system call); the error + string is statically allocated. + + OBJ Returned by pex_init. + + FLAGS As above. + + EXECUTABLE The program to execute. + + ARGV NULL terminated array of arguments to pass to the program. + + OUTNAME Sets the output file name as follows: + + PEX_SUFFIX set (OUTNAME may not be NULL): + TEMPBASE parameter to pex_init not NULL: + Output file name is the concatenation of TEMPBASE + and OUTNAME. + TEMPBASE is NULL: + Output file name is a random file name ending in + OUTNAME. + PEX_SUFFIX not set: + OUTNAME not NULL: + Output file name is OUTNAME. + OUTNAME NULL, TEMPBASE not NULL: + Output file name is randomly chosen using + TEMPBASE. + OUTNAME NULL, TEMPBASE NULL: + Output file name is randomly chosen. + + If PEX_LAST is not set, the output file name is the + name to use for a temporary file holding stdout, if + any (there will not be a file if PEX_USE_PIPES is set + and the system supports pipes). If a file is used, it + will be removed when no longer needed unless + PEX_SAVE_TEMPS is set. + + If PEX_LAST is set, and OUTNAME is not NULL, standard + output is written to the output file name. The file + will not be removed. If PEX_LAST and PEX_SUFFIX are + both set, TEMPBASE may not be NULL. + + ERRNAME If not NULL, this is the name of a file to which + standard error is written. If NULL, standard error of + the program is standard error of the caller. + + ERR On an error return, *ERR is set to an errno value, or + to 0 if there is no relevant errno. +*/ + +extern const char *pex_run (struct pex_obj *obj, int flags, + const char *executable, char * const *argv, + const char *outname, const char *errname, + int *err); + +/* As for pex_run (), but takes an extra parameter to enable the + environment for the child process to be specified. + + ENV The environment for the child process, specified as + an array of character pointers. Each element of the + array should point to a string of the form VAR=VALUE, + with the exception of the last element which must be + a null pointer. +*/ + +extern const char *pex_run_in_environment (struct pex_obj *obj, int flags, + const char *executable, + char * const *argv, + char * const *env, + const char *outname, + const char *errname, int *err); + +/* Return a stream for a temporary file to pass to the first program + in the pipeline as input. The file name is chosen as for pex_run. + pex_run closes the file automatically; don't close it yourself. */ + +extern FILE *pex_input_file (struct pex_obj *obj, int flags, + const char *in_name); + +/* Return a stream for a pipe connected to the standard input of the + first program in the pipeline. You must have passed + `PEX_USE_PIPES' to `pex_init'. Close the returned stream + yourself. */ + +extern FILE *pex_input_pipe (struct pex_obj *obj, int binary); + +/* Read the standard output of the last program to be executed. + pex_run can not be called after this. BINARY should be non-zero if + the file should be opened in binary mode; this is ignored on Unix. + Returns NULL on error. Don't call fclose on the returned FILE; it + will be closed by pex_free. */ + +extern FILE *pex_read_output (struct pex_obj *, int binary); + +/* Read the standard error of the last program to be executed. + pex_run can not be called after this. BINARY should be non-zero if + the file should be opened in binary mode; this is ignored on Unix. + Returns NULL on error. Don't call fclose on the returned FILE; it + will be closed by pex_free. */ + +extern FILE *pex_read_err (struct pex_obj *, int binary); + +/* Return exit status of all programs in VECTOR. COUNT indicates the + size of VECTOR. The status codes in the vector are in the order of + the calls to pex_run. Returns 0 on error, 1 on success. */ + +extern int pex_get_status (struct pex_obj *, int count, int *vector); + +/* Return times of all programs in VECTOR. COUNT indicates the size + of VECTOR. struct pex_time is really just struct timeval, but that + is not portable to all systems. Returns 0 on error, 1 on + success. */ + +struct pex_time +{ + unsigned long user_seconds; + unsigned long user_microseconds; + unsigned long system_seconds; + unsigned long system_microseconds; +}; + +extern int pex_get_times (struct pex_obj *, int count, + struct pex_time *vector); + +/* Clean up a pex_obj. If you have not called pex_get_times or + pex_get_status, this will try to kill the subprocesses. */ + +extern void pex_free (struct pex_obj *); + +/* Just execute one program. Return value is as for pex_run. + FLAGS Combination of PEX_SEARCH and PEX_STDERR_TO_STDOUT. + EXECUTABLE As for pex_run. + ARGV As for pex_run. + PNAME As for pex_init. + OUTNAME As for pex_run when PEX_LAST is set. + ERRNAME As for pex_run. + STATUS Set to exit status on success. + ERR As for pex_run. +*/ + +extern const char *pex_one (int flags, const char *executable, + char * const *argv, const char *pname, + const char *outname, const char *errname, + int *status, int *err); + +/* pexecute and pwait are the old pexecute interface, still here for + backward compatibility. Don't use these for new code. Instead, + use pex_init/pex_run/pex_get_status/pex_free, or pex_one. */ + +/* Definitions used by the pexecute routine. */ + +#define PEXECUTE_FIRST 1 +#define PEXECUTE_LAST 2 +#define PEXECUTE_ONE (PEXECUTE_FIRST + PEXECUTE_LAST) +#define PEXECUTE_SEARCH 4 +#define PEXECUTE_VERBOSE 8 + +/* Execute a program. */ + +extern int pexecute (const char *, char * const *, const char *, + const char *, char **, char **, int); + +/* Wait for pexecute to finish. */ + +extern int pwait (int, int *, int); + +#if !HAVE_DECL_ASPRINTF +/* Like sprintf but provides a pointer to malloc'd storage, which must + be freed by the caller. */ + +extern int asprintf (char **, const char *, ...) ATTRIBUTE_PRINTF_2; +#endif + +#if !HAVE_DECL_VASPRINTF +/* Like vsprintf but provides a pointer to malloc'd storage, which + must be freed by the caller. */ + +extern int vasprintf (char **, const char *, va_list) ATTRIBUTE_PRINTF(2,0); +#endif + +#if defined(HAVE_DECL_SNPRINTF) && !HAVE_DECL_SNPRINTF +/* Like sprintf but prints at most N characters. */ +extern int snprintf (char *, size_t, const char *, ...) ATTRIBUTE_PRINTF_3; +#endif + +#if defined(HAVE_DECL_VSNPRINTF) && !HAVE_DECL_VSNPRINTF +/* Like vsprintf but prints at most N characters. */ +extern int vsnprintf (char *, size_t, const char *, va_list) ATTRIBUTE_PRINTF(3,0); +#endif + +#if defined(HAVE_DECL_STRVERSCMP) && !HAVE_DECL_STRVERSCMP +/* Compare version strings. */ +extern int strverscmp (const char *, const char *); +#endif + +/* Set the title of a process */ +extern void setproctitle (const char *name, ...); + +/* Increase stack limit if possible. */ +extern void stack_limit_increase (unsigned long); + +#define ARRAY_SIZE(a) (sizeof (a) / sizeof ((a)[0])) + +/* Drastically simplified alloca configurator. If we're using GCC, + we use __builtin_alloca; otherwise we use the C alloca. The C + alloca is always available. You can override GCC by defining + USE_C_ALLOCA yourself. The canonical autoconf macro C_ALLOCA is + also set/unset as it is often used to indicate whether code needs + to call alloca(0). */ +extern void *C_alloca (size_t) ATTRIBUTE_MALLOC; +#undef alloca +#if GCC_VERSION >= 2000 && !defined USE_C_ALLOCA +# define alloca(x) __builtin_alloca(x) +# undef C_ALLOCA +# define ASTRDUP(X) \ + (__extension__ ({ const char *const libiberty_optr = (X); \ + const unsigned long libiberty_len = strlen (libiberty_optr) + 1; \ + char *const libiberty_nptr = (char *const) alloca (libiberty_len); \ + (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len); })) +#else +# define alloca(x) C_alloca(x) +# undef USE_C_ALLOCA +# define USE_C_ALLOCA 1 +# undef C_ALLOCA +# define C_ALLOCA 1 +extern const char *libiberty_optr; +extern char *libiberty_nptr; +extern unsigned long libiberty_len; +# define ASTRDUP(X) \ + (libiberty_optr = (X), \ + libiberty_len = strlen (libiberty_optr) + 1, \ + libiberty_nptr = (char *) alloca (libiberty_len), \ + (char *) memcpy (libiberty_nptr, libiberty_optr, libiberty_len)) +#endif + +#ifdef __cplusplus +} +#endif + + +#endif /* ! defined (LIBIBERTY_H) */ diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/typeinfo b/contrib/sdk/sources/libstdc++-v3/libsupc++/typeinfo index 4bd946f1b0..2a3d0efcfd 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/typeinfo +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/typeinfo @@ -7,12 +7,12 @@ // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3, or (at your option) // any later version. -// +// // GCC 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. -// +// // Under Section 7 of GPL version 3, you are granted additional // permissions described in the GCC Runtime Library Exception, version // 3.1, as published by the Free Software Foundation. @@ -77,7 +77,7 @@ namespace __cxxabiv1 #endif #endif -namespace std +namespace std { /** * @brief Part of RTTI. @@ -85,7 +85,7 @@ namespace std * The @c type_info class describes type information generated by * an implementation. */ - class type_info + class type_info { public: /** Destructor first. Being the first non-inline virtual function, this @@ -169,9 +169,9 @@ namespace std protected: const char *__name; - + explicit type_info(const char *__n): __name(__n) { } - + private: /// Assigning type_info is not supported. type_info& operator=(const type_info&); @@ -184,7 +184,7 @@ namespace std * * If you attempt an invalid @c dynamic_cast expression, an instance of * this class (or something derived from this class) is thrown. */ - class bad_cast : public exception + class bad_cast : public exception { public: bad_cast() _GLIBCXX_USE_NOEXCEPT { } @@ -196,12 +196,12 @@ namespace std // See comment in eh_exception.cc. virtual const char* what() const _GLIBCXX_USE_NOEXCEPT; }; - - /** + + /** * @brief Thrown when a NULL pointer in a @c typeid expression is used. * @ingroup exceptions */ - class bad_typeid : public exception + class bad_typeid : public exception { public: bad_typeid () _GLIBCXX_USE_NOEXCEPT { } diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/unwind-cxx.h b/contrib/sdk/sources/libstdc++-v3/libsupc++/unwind-cxx.h index 7cc6a3394f..ed4eea5665 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/unwind-cxx.h +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/unwind-cxx.h @@ -174,7 +174,7 @@ typedef enum { } __cxa_type_match_result; extern "C" __cxa_type_match_result __cxa_type_match(_Unwind_Exception*, const std::type_info*, - bool, void**); + bool, void**); extern "C" bool __cxa_begin_cleanup (_Unwind_Exception*); extern "C" void __cxa_end_cleanup (void); #endif diff --git a/contrib/sdk/sources/libstdc++-v3/libsupc++/vterminate.cc b/contrib/sdk/sources/libstdc++-v3/libsupc++/vterminate.cc index 65f9faa481..3ac8b2146a 100644 --- a/contrib/sdk/sources/libstdc++-v3/libsupc++/vterminate.cc +++ b/contrib/sdk/sources/libstdc++-v3/libsupc++/vterminate.cc @@ -47,7 +47,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION if (terminating) { fputs("terminate called recursively\n", stderr); - abort (); + abort (); } terminating = true; @@ -61,8 +61,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION { int status = -1; char *dem = 0; - -// dem = __cxa_demangle(name, 0, 0, &status); + + dem = __cxa_demangle(name, 0, 0, &status); fputs("terminate called after throwing an instance of '", stderr); if (status == 0) @@ -91,7 +91,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } else fputs("terminate called without an active exception\n", stderr); - + abort(); } diff --git a/contrib/sdk/sources/newlib/app.lds b/contrib/sdk/sources/newlib/app.lds index b98ae836fa..db673473a8 100644 --- a/contrib/sdk/sources/newlib/app.lds +++ b/contrib/sdk/sources/newlib/app.lds @@ -79,6 +79,12 @@ SECTIONS ___iend = . ; } + .eh_frame BLOCK(16) : + { + PROVIDE (___EH_FRAME_BEGIN__ = .) ; + *(.eh_frame*) + } + .idata ALIGN(16): { __idata_start = .; @@ -113,7 +119,6 @@ SECTIONS *(.debug$F) *(.drectve) *(.note.GNU-stack) - *(.eh_frame) *(.comment) *(.debug_abbrev) *(.debug_info) diff --git a/contrib/sdk/sources/newlib/libc/Makefile b/contrib/sdk/sources/newlib/libc/Makefile index aa30e1816b..87058a0991 100644 --- a/contrib/sdk/sources/newlib/libc/Makefile +++ b/contrib/sdk/sources/newlib/libc/Makefile @@ -3,7 +3,7 @@ CC = kos32-gcc AR = kos32-ar LD = kos32-ld -CFLAGS = -c -O2 -fno-ident -fomit-frame-pointer -DBUILD_DLL -DMISSING_SYSCALL_NAMES +CFLAGS = -c -O2 -fno-ident -fomit-frame-pointer -fexceptions -DBUILD_DLL -DMISSING_SYSCALL_NAMES LDFLAGS = -shared -s -T libcdll.lds --out-implib libc.dll.a --image-base 0 #LDFLAGS+= --output-def libc.orig.def ARFLAGS = crs diff --git a/contrib/sdk/sources/newlib/libc/crt/crt3.c b/contrib/sdk/sources/newlib/libc/crt/crt3.c index 624d6b2431..37df8fcce5 100644 --- a/contrib/sdk/sources/newlib/libc/crt/crt3.c +++ b/contrib/sdk/sources/newlib/libc/crt/crt3.c @@ -18,28 +18,9 @@ #include #include -/* -typedef void (*ctp)(); -static void __do_global_ctors () -{ - extern int __CTOR_LIST__; - int *c = &__CTOR_LIST__; - c++; - while (*c) - { - ctp d = (ctp)*c; - (d)(); - c++; - } -} -*/ - void *load_libc(); -//void __main (){}; - void* get_entry_point(void *raw); -void _pei386_runtime_relocator (void){}; void __attribute__((noreturn)) __crt_startup (void) @@ -48,8 +29,6 @@ __crt_startup (void) void *img; void __attribute__((noreturn)) (*entry)(void *img); -// _pei386_runtime_relocator(); - img = load_libc(); if(img == NULL) diff --git a/contrib/sdk/sources/newlib/libc/include/kos32sys.h b/contrib/sdk/sources/newlib/libc/include/kos32sys.h index e669898549..b9b756f8f3 100644 --- a/contrib/sdk/sources/newlib/libc/include/kos32sys.h +++ b/contrib/sdk/sources/newlib/libc/include/kos32sys.h @@ -424,7 +424,8 @@ static inline void get_proc_info(char *info) __asm__ __volatile__( "int $0x40" : - :"a"(9), "b"(info), "c"(-1)); + :"a"(9), "b"(info), "c"(-1) + :"memory"); }; static inline void GetProcInfo(char *info) __attribute__ ((alias ("get_proc_info"))); diff --git a/contrib/sdk/sources/newlib/libc/include/stdio.h b/contrib/sdk/sources/newlib/libc/include/stdio.h index 9dd8ba75f3..ce92a1cf23 100644 --- a/contrib/sdk/sources/newlib/libc/include/stdio.h +++ b/contrib/sdk/sources/newlib/libc/include/stdio.h @@ -655,10 +655,6 @@ _ELIDABLE_INLINE int __sputc_r(struct _reent *_ptr, int _c, FILE *_p) { #define clearerr(p) __sclearerr(p) #endif -#if 0 /*ndef __STRICT_ANSI__ - FIXME: must initialize stdio first, use fn */ -#define fileno(p) __sfileno(p) -#endif - #ifndef __CYGWIN__ #ifndef lint #define getc(fp) __sgetc_r(_REENT, fp)