From: DJ Delorie Date: Mon, 1 Apr 2002 22:01:20 +0000 (+0000) Subject: merge from gcc X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0c4460bb3cd58e4f6d4d1aaea52afd62eabda37d;p=binutils-gdb.git merge from gcc --- diff --git a/include/ChangeLog b/include/ChangeLog index 6cc4b8ed625..135105899f6 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -1,3 +1,7 @@ +2002-04-01 Phil Edwards + + * dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names. + 2002-03-10 Daniel Jacobowitz * gdb: New directory. diff --git a/include/dyn-string.h b/include/dyn-string.h index 315f63fabc8..2a771c7a5d1 100644 --- a/include/dyn-string.h +++ b/include/dyn-string.h @@ -1,5 +1,5 @@ /* An abstract string datatype. - Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2002 Free Software Foundation, Inc. Contributed by Mark Mitchell (mark@markmitchell.com). This file is part of GCC. @@ -45,7 +45,7 @@ typedef struct dyn_string names in user programs, the functions that are used in the demangler are given implementation-reserved names. */ -#ifdef IN_LIBGCC2 +#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) #define dyn_string_init __cxa_dyn_string_init #define dyn_string_new __cxa_dyn_string_new @@ -66,7 +66,7 @@ typedef struct dyn_string #define dyn_string_substring __cxa_dyn_string_substring #define dyn_string_eq __cxa_dyn_string_eq -#endif /* IN_LIBGCC2 */ +#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */ extern int dyn_string_init PARAMS ((struct dyn_string *, int)); diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index feb0379bc17..56bd2312a71 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +2002-04-01 Phil Edwards + + * cp-demangle.c (__cxa_demangle): Also protect with IN_GLIBCPP_V3. + (is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_ctor): Conditionally + not compile if IN_GLIBCPP_V3 defined. + * dyn-string.c: Also allow IN_GLIBCPP_V3 to change allocation scheme. + 2002-03-30 Bryce McKinlay * cp-demangle.c (java_demangle_v3): Don't try to release "demangled" diff --git a/libiberty/cp-demangle.c b/libiberty/cp-demangle.c index a130fd8374c..4a91700d543 100644 --- a/libiberty/cp-demangle.c +++ b/libiberty/cp-demangle.c @@ -3577,7 +3577,7 @@ cp_demangle_type (type_name, result) return status; } -#ifdef IN_LIBGCC2 +#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) extern char *__cxa_demangle PARAMS ((const char *, char *, size_t *, int *)); /* ia64 ABI-mandated entry point in the C++ runtime library for performing @@ -3685,7 +3685,7 @@ __cxa_demangle (mangled_name, output_buffer, length, status) } } -#else /* !IN_LIBGCC2 */ +#else /* ! (IN_LIBGCC2 || IN_GLIBCPP_V3) */ /* Variant entry point for integration with the existing cplus-dem demangler. Attempts to demangle MANGLED. If the demangling @@ -3854,7 +3854,7 @@ java_demangle_v3 (mangled) return return_value; } -#endif /* IN_LIBGCC2 */ +#endif /* IN_LIBGCC2 || IN_GLIBCPP_V3 */ /* Demangle NAME in the G++ V3 ABI demangling style, and return either @@ -3894,6 +3894,7 @@ demangle_v3_with_details (name) } +#ifndef IN_GLIBCPP_V3 /* Return non-zero iff NAME is the mangled form of a constructor name in the G++ V3 ABI demangling style. Specifically, return: - '1' if NAME is a complete object constructor, @@ -3936,6 +3937,7 @@ is_gnu_v3_mangled_dtor (name) else return 0; } +#endif /* IN_GLIBCPP_V3 */ #ifdef STANDALONE_DEMANGLER diff --git a/libiberty/dyn-string.c b/libiberty/dyn-string.c index c41d7ccac3e..1da76c2110d 100644 --- a/libiberty/dyn-string.c +++ b/libiberty/dyn-string.c @@ -50,7 +50,7 @@ Boston, MA 02111-1307, USA. */ abort if an allocation fails. Instead, percolate an error code up through the call chain. */ -#ifdef IN_LIBGCC2 +#if defined(IN_LIBGCC2) || defined(IN_GLIBCPP_V3) #define RETURN_ON_ALLOCATION_FAILURE #endif