From 4597ba0f947be6434d2df5042b2a84864f149490 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 22 Feb 2000 16:40:36 +0000 Subject: [PATCH] merge with include from egcs 2000-02-22 --- include/ChangeLog | 79 +++++++++++++++++++++++++++++++++++++++++++++- include/ansidecl.h | 40 +++++++++++++++++++---- 2 files changed, 112 insertions(+), 7 deletions(-) diff --git a/include/ChangeLog b/include/ChangeLog index bd9ba9a545b..5d0e386d88f 100644 --- a/include/ChangeLog +++ b/include/ChangeLog @@ -32,9 +32,14 @@ Tue Feb 8 17:01:13 2000 Andrew Cagney * dis-asm.h: Add prototype for disassembler_usage(). Add prototype for arm_disassembler_options(). - Remvoe prototype for arm_toggle_regnames(). + Remove prototype for arm_toggle_regnames(). Add prototype for parse_arm_disassembler_option(). +Sat Jan 1 19:06:52 2000 Hans-Peter Nilsson + + * symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s" + to stringify argument s. + Wed Dec 15 11:22:56 1999 Jeffrey A Law (law@cygnus.com) * hp-symtab.h (HP_LANGUAGE_FORTRAN): New enumeration constant. @@ -44,6 +49,32 @@ Wed Dec 15 11:22:56 1999 Jeffrey A Law (law@cygnus.com) * dis-asm.h: Enclose in extern "C" ifdef __cplusplus. +1999-12-05 Mark Mitchell + + * splay-tree.h (struct splay_tree_node): Rename to ... + (struct splay_tree_node_s): ... this. + (struct splay_tree): Rename to ... + (struct splay_tree_s): ... this. + +1999-11-30 Kaveh R. Ghazi + + * ansidecl.h (ATTRIBUTE_MALLOC): New macro. + + * libiberty.h (buildargv, dupargv, concat, choose_temp_base, + make_temp_file, xmalloc, xcalloc, xstrdup, xmemdup): Add + ATTRIBUTE_MALLOC. + (xatexit): Remove __GNUC__ check, add ATTRIBUTE_NORETURN. + +1999-11-28 Kaveh R. Ghazi + + * libiberty.h: Include stdarg.h when ANSI_PROTOTYPES is defined. + (asprintf, vasprintf): Provide declarations. + +Wed Nov 10 12:43:21 1999 Philippe De Muyter + Kaveh R. Ghazi + + * ansidecl.h: Define and test `GCC_VERSION', not `HAVE_GCC_VERSION'. + 1999-11-04 Jimmy Guo * hp-symtab.h (dntt_type_fparam): Add doc_ranges, misc_kind @@ -54,14 +85,60 @@ Sun Oct 24 19:11:32 1999 Andrew Cagney * sim-d10v.h (SIM_D10V_TS2_DMAP_REGNUM): Define. +1999-10-23 08:51 -0700 Zack Weinberg + + * hashtab.h: Give hash_table_t a struct tag. Add prototypes + for clear_hash_table_slot and traverse_hash_table. Correct + prototype of all_hash_table_collisions. + Sat Oct 23 19:00:13 1999 Andrew Cagney * sim-d10v.h: New file. +Fri Oct 15 01:47:51 1999 Vladimir Makarov + + * hashtab.h: New file. + +1999-10-10 Kaveh R. Ghazi + + * ansidecl.h (HAVE_GCC_VERSION): New macro. Use it instead of + explicitly testing __GNUC__ and __GNUC_MINOR__. + + (ATTRIBUTE_PRINTF): Use `__format__', not `format'. + +1999-09-25 Kaveh R. Ghazi + + * libiberty.h (make_temp_file): Add a prototype. + +Tue Sep 14 00:35:02 1999 Marc Espie + + * libiberty.h (basename): OpenBSD has a correct prototype. + (xrealloc): Remove outdated comment. + +1999-09-07 Jeff Garzik + + * libiberty.h (xmemdup): Add prototype for new function. + 1999-09-04 Steve Chamberlain * dis-asm.h (print_insn_pj): Declare. +1999-09-01 Kaveh R. Ghazi + + * obstack.h (obstack_grow, obstack_grow0): Move (char*) casts + in calls to `_obstack_memcpy' from here ... + + (_obstack_memcpy): ... to here, except in the __STDC__ case which + doesn't need it. + +1999-08-30 Kaveh R. Ghazi + + * libiberty.h (getpwd): Prototype. + +1999-08-01 Mark Mitchell + + * splay-tree.h (splay_tree_insert): Return the new node. + 1999-07-11 Ian Lance Taylor * ansidecl.h: Copy attribute support macros from egcs. diff --git a/include/ansidecl.h b/include/ansidecl.h index 989dd6778dd..10308676f1a 100644 --- a/include/ansidecl.h +++ b/include/ansidecl.h @@ -160,20 +160,48 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif /* ANSI C. */ +/* Using MACRO(x,y) in cpp #if conditionals does not work with some + older preprocessors. Thus we can't define something like this: + +#define HAVE_GCC_VERSION(MAJOR, MINOR) \ + (__GNUC__ > (MAJOR) || (__GNUC__ == (MAJOR) && __GNUC_MINOR__ >= (MINOR))) + +and then test "#if HAVE_GCC_VERSION(2,7)". + +So instead we use the macro below and test it against specific values. */ + +/* This macro simplifies testing whether we are using gcc, and if it + is of a particular minimum version. (Both major & minor numbers are + significant.) This macro will evaluate to 0 if we are not using + gcc at all. */ +#ifndef GCC_VERSION +#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) +#endif /* GCC_VERSION */ + /* Define macros for some gcc attributes. This permits us to use the macros freely, and know that they will come into play for the version of gcc in which they are supported. */ -#if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7) +#if (GCC_VERSION < 2007) # define __attribute__(x) #endif -#ifndef ATTRIBUTE_UNUSED_LABEL -# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 93) -# define ATTRIBUTE_UNUSED_LABEL +/* Attribute __malloc__ on functions was valid as of gcc 2.96. */ +#ifndef ATTRIBUTE_MALLOC +# if (GCC_VERSION >= 2096) +# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) # else +# define ATTRIBUTE_MALLOC +# endif /* GNUC >= 2.96 */ +#endif /* ATTRIBUTE_MALLOC */ + +/* Attributes on labels were valid as of gcc 2.93. */ +#ifndef ATTRIBUTE_UNUSED_LABEL +# if (GCC_VERSION >= 2093) # define ATTRIBUTE_UNUSED_LABEL ATTRIBUTE_UNUSED -# endif /* GNUC < 2.93 */ +# else +# define ATTRIBUTE_UNUSED_LABEL +# endif /* GNUC >= 2.93 */ #endif /* ATTRIBUTE_UNUSED_LABEL */ #ifndef ATTRIBUTE_UNUSED @@ -185,7 +213,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #endif /* ATTRIBUTE_NORETURN */ #ifndef ATTRIBUTE_PRINTF -#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((format (__printf__, m, n))) +#define ATTRIBUTE_PRINTF(m, n) __attribute__ ((__format__ (__printf__, m, n))) #define ATTRIBUTE_PRINTF_1 ATTRIBUTE_PRINTF(1, 2) #define ATTRIBUTE_PRINTF_2 ATTRIBUTE_PRINTF(2, 3) #define ATTRIBUTE_PRINTF_3 ATTRIBUTE_PRINTF(3, 4) -- 2.30.2