Commit Graph

280 Commits

Author SHA1 Message Date
Kaveh R. Ghazi 17998b22b5 libiberty.h (xstrndup): Declare.
include:
	* libiberty.h (xstrndup): Declare.

libiberty:
	* Makefile.in (CFILES): Add strndup.c and xstrndup.c.
	(REQUIRED_OFILES): Add xstrndup.o.
	(CONFIGURED_OFILES): Add strndup.o.
	Regenerate dependencies.

	* configure.ac (funcs, AC_CHECK_FUNCS): Add strndup.

	* strndup.c, xstrndup.c: New.

	* config.in, configure, functions.texi: Regenerate.

From-SVN: r97034
2005-03-25 04:41:41 +00:00
Kaveh R. Ghazi 65ec6c0eb2 * libiberty.h (make_relative_prefix): Add ATTRIBUTE_MALLOC.
From-SVN: r96904
2005-03-22 23:47:49 +00:00
Mark Mitchell 17049f0bbb libiberty.h (gettimeofday): Declare.
* libiberty.h (gettimeofday): Declare.

	* configure.ac (funcs): Add gettimeofday.
	* configure: Regenerated.
	* gettimeofday.c: New file.
	* Makefile.in (CFILES): Add gettimeofday.
	(CONFIGURED_OFILES): Add gettimeofday.o.
	(./gettimeofday.o): New rule.

From-SVN: r96230
2005-03-10 00:57:10 +00:00
Jan Beulich c363985db8 libiberty.h: Declare unlink_if_ordinary.
include/
2005-03-01  Jan Beulich  <jbeulich@novell.com>

	* libiberty.h: Declare unlink_if_ordinary.

libiberty/
2005-03-01  Jan Beulich  <jbeulich@novell.com>

	* Makefile.in (CFILES): Add unlink-if-ordinary.c
	(REQUIRED_OFILES): Add unlink-if-ordinary.o.
	Add dependencies and rule for unlink-if-ordinary.o.
	* unlink-if-ordinary.c: New.

From-SVN: r95732
2005-03-01 09:23:26 +00:00
Paolo Bonzini be0f1e5478 re PR bootstrap/19818 (GCC 4.0 cannot bootstrap itself)
include:
2005-02-08  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/19818
	* ansidecl.h (PARAMS): Guard from redefinition.

libcpp:
2005-02-08  Paolo Bonzini  <bonzini@gnu.org>

	PR bootstrap/19818
	* configure.ac: Check for declaration of basename and getopt.
	* config.in: Regenerate.
	* configure: Regenerate.
	* internal.h (ustrcspn): New.
	* macro.c (create_iso_definition): Fix allocation of memory.
	(padding_token): Add cast to remove const-ness.
	* pch.c (cpp_read_state): Use ustrcspn.

From-SVN: r95003
2005-02-14 08:52:24 +00:00
Ben Elliston d49d090735 fibheap.h (struct fibnode): Only use unsigned long bitfields when __GNUC__ is defined and ints are less...
[include]
	* fibheap.h (struct fibnode): Only use unsigned long bitfields
	when __GNUC__ is defined and ints are less than 32-bits wide.
[libiberty]
	* configure.ac: Invoke AC_CHECK_SIZEOF for sizeof (int).
	* configure: Regenerate.
	* config.in: Likewise.

From-SVN: r92009
2004-12-11 08:25:00 +11:00
Bob Wilson 530f533138 xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS, [...]): New.
2004-10-07  Bob Wilson  <bob.wilson@acm.org>
        * xtensa-config.h (XSHAL_USE_ABSOLUTE_LITERALS,
        XCHAL_HAVE_PREDICTED_BRANCHES, XCHAL_INST_FETCH_WIDTH): New.
        (XCHAL_EXTRA_SA_SIZE, XCHAL_EXTRA_SA_ALIGN): Delete.

From-SVN: r88727
2004-10-08 00:28:50 +00:00
DJ Delorie f45c31ea1a Spacing bug.
From-SVN: r87476
2004-09-13 21:14:58 -04:00
Aaron W. LaFramboise ff06bf4bd0 * libiberty.h (basename): Prototype for __MINGW32__.
From-SVN: r87475
2004-09-13 21:12:49 -04:00
Kaveh Ghazi 3d091dac56 builtin-attrs.def (ATTR_SENTINEL, [...]): New.
gcc:
	* builtin-attrs.def (ATTR_SENTINEL, ATTR_SENTINEL_NOTHROW_LIST):
	New.
	* builtins.def (BUILT_IN_EXECL, BUILT_IN_EXECLP): Add `sentinel'
	attribute.
	* c-common.c (handle_sentinel_attribute, check_function_sentinel):
	New functions.
	(c_common_attribute_table): Add `sentinel' attribute.
	(check_function_arguments): Handle `sentinel' attribute.
	* doc/extend.texi: Document `sentinel' attribute.

gcc/testsuite:
	* gcc.dg/format/sentinel-1.c: New test.

include:
	* ansidecl.h (ATTRIBUTE_SENTINEL): Define.
	* libiberty.h (concat, reconcat, concat_length, concat_copy,
	concat_copy2): Use ATTRIBUTE_SENTINEL.

From-SVN: r87096
2004-09-05 02:50:09 +00:00
Ian Lance Taylor 2502b0bcf5 Split ChangeLog
From-SVN: r86172
2004-08-18 13:11:56 +09:30
Gabriel Dos Reis b1e8c0fdac libiberty.h (XDELETE, [...]): Remove any const-qualification before disposal.
include/
        * libiberty.h (XDELETE, XDELETEVEC, XRESIZEVEC): Remove any
        const-qualification before disposal.

gcc/
        * vec.h (DEF_VEC_P): Add proper cast to uses of vec_o_reserve and
        vec_p_reserve.
        * langhooks.h (lang_hooks::builtin_function): Rename parameter
        from "class" to "bt_class".

From-SVN: r85441
2004-08-02 16:45:52 +00:00
Bernardo Innocenti 5673cd61ce * ansidecl.h (ARG_UNUSED): New Macro.
From-SVN: r85120
2004-07-24 19:49:27 +02:00
Bernardo Innocenti b50a5a953b libiberty.h (XNEW, [...]): Move here from libcpp/internal.h.
* libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
	libcpp/internal.h.
	(XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
	macros.

From-SVN: r85119
2004-07-24 19:48:01 +02:00
Paolo Bonzini 4b997cc8bb ansidecl.h (ATTRIBUTE_PURE): New.
2004-07-21  Paolo Bonzini  <bonzini@gnu.org>

        * ansidecl.h (ATTRIBUTE_PURE): New.

From-SVN: r85001
2004-07-21 08:25:57 +00:00
Bernardo Innocenti b6fa4f6e16 libiberty.h (XNEW, [...]): Move here from libcpp/internal.h.
* libiberty.h (XNEW, XCNEW, XNEWVEC, XCNEWVEC, XOBNEW): Move here from
	libcpp/internal.h.
	(XDELETE, XRESIZEVEC, XDELETEVEC, XNEWVAR, XCNEWVAR, XRESIZEVAR): New
	macros.

From-SVN: r84643
2004-07-13 22:59:09 +02:00
Bernardo Innocenti 5557e16d2a libiberty.h (ASTRDUP): Add casts required for stricter type conversion rules of C++.
* libiberty.h (ASTRDUP): Add casts required for stricter
	type conversion rules of C++.
	* obstack.h (obstack_free): Likewise.

From-SVN: r84642
2004-07-13 22:54:38 +02:00
Diego Novillo 6de9cd9a88 Merge tree-ssa-20020619-branch into mainline.
From-SVN: r81764
2004-05-13 02:41:07 -04:00
Andreas Jaeger 073273c359 demangle.h: Do not use C++ reserved keyword typename as parameter for...
* demangle.h: Do not use C++ reserved keyword typename as
	parameter for cplus_demangle_fill_builtin_type.

From-SVN: r81481
2004-05-04 20:13:54 +02:00
Richard Henderson 228c46dbd8 * hashtab.h (struct htab): Add size_prime_index.
From-SVN: r81030
2004-04-22 10:36:03 -07:00
Jeff Law 7f96816adb hashtab.c (htab_remove_elt_with_hash): New function.
* hashtab.c (htab_remove_elt_with_hash): New function.
	(htab_remove_elt): Implement in terms of htab_remove_elt_with_hash.

	* hashtab.h (htab_remove_elt_with_hash): Prototype new function.

From-SVN: r80641
2004-04-13 08:48:56 -06:00
Zack Weinberg cfdfa11075 * hashtab.h, splay-tree.h: Use new shorter form of GTY markers.
From-SVN: r80092
2004-03-30 19:23:16 +00:00
Ian Lance Taylor 0d7fbf1468 * dyn-string.h: Update copyright date.
From-SVN: r78415
2004-02-25 01:42:20 +00:00
Ian Lance Taylor 795b4c374c dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and the associated #defines.
* dyn-string.h: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
	the associated #defines.

From-SVN: r78346
2004-02-24 02:32:30 +00:00
Ian Lance Taylor d051dc88ef demangle.h: Instead of checking ANSI_PROTOTYPES, just include "libiberty.h".
2004-01-12  Ian Lance Taylor  <ian@wasabisystems.com>

	* demangle.h: Instead of checking ANSI_PROTOTYPES, just include
	"libiberty.h".

From-SVN: r75789
2004-01-13 03:06:13 +00:00
Ian Lance Taylor e4a32afbe1 * demangle.h: If ANSI_PROTOTYPES is defined, include <stddef.h>.
From-SVN: r75783
2004-01-13 01:49:16 +00:00
Ian Lance Taylor 5e777af517 demangle.h (enum demangle_component_type): Define.
* demangle.h (enum demangle_component_type): Define.
	(struct demangle_operator_info): Declare.
	(struct demangle_builtin_type_info): Declare.
	(struct demangle_component): Define.
	(cplus_demangle_fill_component): Declare.
	(cplus_demangle_fill_name): Declare.
	(cplus_demangle_fill_builtin_type): Declare.
	(cplus_demangle_fill_operator): Declare.
	(cplus_demangle_fill_extended_operator): Declare.
	(cplus_demangle_fill_ctor, cplus_demangle_fill_dtor): Declare.
	(cplus_demangle_v3_components): Declare.
	(cplus_demangle_print): Declare.

	* cp-demangle.c: Include "cp-demangle.h".  If IN_GLIBCPP_V3 is
	defined, rename some functions which are to become static via
	#define.
	(CP_STATIC_IF_GLIBCPP_V3): Define.
	(struct d_operator_info): Move definition to cp-demangle.h, and
	rename to demangle_operator_info.  Change all uses.
	(enum d_builtin_type_print): Move definition to cp-demangle.h.
	(struct d_builtin_type_info): Move definition to cp-demangle.h,
	and rename to demangle_builtin_type_info.  Change all uses.
	(enum d_comp_type): Move definition to include/demangle.h, and
	rename to demangle_component_type, and change all enums to start
	with DEMANGLE_COMPONENT_ instead of D_.  Change all uses.
	(struct d_comp): Move definition to include/demangle.h, and rename
	to demangle_component.  Change all uses.
	(struct d_info): Move definition to cp-demangle.h.
	(cplus_demangle_fill_name): New function.
	(cplus_demangle_fill_extended_operator): New function.
	(cplus_demangle_fill_ctor): New function.
	(cplus_demangle_fill_dtor): New function.
	(d_make_empty): Remove type parameter.  Change all callers.
	(d_make_name): Use cplus_demangle_fill_name.
	(d_make_extended_operator): Use
	cplus_demangle_fill_extended_operator.
	(d_make_ctor): Use cplus_demangle_fill_ctor.
	(d_make_dtor): Use cplus_demangle_fill_dtor.
	(cplus_demangle_mangled_name): Rename from d_mangled_name.  Make
	non-static by default.  Change all callers.
	(cplus_demangle_operators): Rename from d_operators.  Change all
	uses.  Make non-static by default.  Add sentinel at end of array.
	(d_operator_name): Adjust initialization of high for new sentinel
	in cplus_demangle_operators.
	(cplus_demangle_builtin_types): Rename from d_builtin_types.
	Change all uses.  Make non-static by default.  Change initializer
	to use D_BUILTIN_TYPE_COUNT instead of magic number 26.
	(cplus_demangle_type): Rename from d_type.  Make non-static by
	default.  Change all callers.
	(cplus_demangle_init_info): Rename from d_init_info.  Make
	non-static by default.  Change all callers.
	* cp-demangle.h: New file.
	* cp-demint.c: New file.
	* Makefile.in: Rebuild dependencies.
	(CFILES): Add cp-demint.c.
	(REQUIRED_OFILES): Add cp-demint.o.

From-SVN: r75748
2004-01-12 19:46:31 +00:00
Andreas Tobler 7dff81909b fibheap.h (fibnode): Use __extension__ for bit-fields mark and degree if __GNUC__.
* include/fibheap.h (fibnode): Use __extension__ for
	bit-fields mark and degree if __GNUC__.

From-SVN: r74836
2003-12-19 14:37:36 +00:00
Kazu Hirata 4fe5f18266 fibheap.h (fibnode): Use unsigned long int for bit-fields if __GNUC__ is defined.
* include/fibheap.h (fibnode): Use unsigned long int for
	bit-fields if __GNUC__ is defined.

From-SVN: r74817
2003-12-19 03:17:40 +00:00
Joseph Myers dc70e81d6e obstack.h: Merge the following change from gnulib...
include:
	* obstack.h: Merge the following change from gnulib:
	2003-10-21  Paul Eggert  <eggert@twinsun.com>
	* obstack.h (obstack_1grow_fast): Properly parenthesize arg.
	(obstack_ptr_grow_fast, obstack_int_grow_fast):
	Don't use lvalue casts, as GCC plans to remove support for them
	in GCC 3.5.  Reported by Joseph S. Myers.  This bug
	was also present in the non-GCC version, indicating that this
	code had always been buggy and had never been widely used.
	(obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
	Use the fast variant of each macro, rather than copying the
	definiens of the fast variant; that way, we'll be more likely to
	catch future bugs in the fast variants.

gcc:
	* c-typeck.c (pedantic_lvalue_warning): Unconditionally warn of
	deprecation of casts as lvalues.
	* fixinc/inclhack.def (obstack_lvalue_cast): New fix.
	* fixinc/fixincl.x: Regenerate.
	* fixinc/tests/base/obstack.h: New test.

gcc/testsuite:
	* gcc.dg/cast-lvalue-1.c: New test.

From-SVN: r72826
2003-10-22 23:28:39 +01:00
Andrew Cagney 83c073429b floatformat.h (struct floatformat): Add field "is_valid".
2003-09-22  Andrew Cagney  <cagney@redhat.com>

	* floatformat.h (struct floatformat): Add field "is_valid".

2003-09-22  Andrew Cagney  <cagney@redhat.com>

	* floatformat.c (floatformat_i387_ext_is_valid): New function.
	(floatformat_always_valid): New function.
	(floatformat_i387_ext): Initialize new "is_valid" field to
	"floatformat_i387_ext_is_valid".
	(floatformat_ieee_single_little): Initialize "is_valid" field to
	floatformat_always_valid.
	(floatformat_ieee_double_big): Ditto.
	(floatformat_ieee_double_little): Ditto.
	(floatformat_ieee_double_little): Ditto.
	(floatformat_ieee_double_littlebyte_bigword): Ditto.
	(floatformat_i960_ext): Ditto.
	(floatformat_m88110_ext): Ditto.
	(floatformat_m88110_harris_ext): Ditto.
	(floatformat_arm_ext_big): Ditto.
	(floatformat_arm_ext_littlebyte_bigword): Ditto.
	(floatformat_ia64_spill_big): Ditto.
	(floatformat_ia64_spill_little): Ditto.
	(floatformat_ia64_quad_big): Ditto.
	(floatformat_ia64_quad_little): Ditto.
	(floatformat_ia64_quad_little): Ditto.
	(floatformat_is_valid): Call "is_valid".

From-SVN: r71659
2003-09-22 17:42:03 +00:00
Andrew Cagney c9fbef12be Index: include/ChangeLog
2003-09-15  Andrew Cagney  <cagney@redhat.com>

	* floatformat.h (floatformat_to_double): Make input buffer constant.
	(floatformat_from_double, floatformat_is_valid): Ditto.

Index: libiberty/ChangeLog
2003-09-15  Andrew Cagney  <cagney@redhat.com>

	* floatformat.c (get_field): Make "data" constant.
	(floatformat_is_valid, floatformat_to_double): Make "from"
	constant, fix casts.
	(floatformat_from_double): Make "from" constant.

From-SVN: r71422
2003-09-16 01:51:07 +00:00
Andrew Cagney a4cbdc57c8 floatformat.h (struct floatformat): Make "exp_bias" signed.
2003-09-15  Andrew Cagney  <cagney@redhat.com>

	* floatformat.h (struct floatformat): Make "exp_bias" signed.

From-SVN: r71407
2003-09-15 21:28:49 +00:00
Daniel Jacobowitz 0d66a8212c * floatformat.h (floatformat_is_valid): Add prototype.
From-SVN: r71404
2003-09-15 20:16:22 +00:00
Bob Wilson b31185fe2f * xtensa-config.h: Undef all macros before defining them.
From-SVN: r69174
2003-07-10 05:08:27 +00:00
H.J. Lu 513dab3208 demangle.h: Support C++.
2003-07-06  H.J. Lu <hongjiu.lu@intel.com>

	* demangle.h: Support C++.

From-SVN: r69016
2003-07-06 14:45:37 -07:00
Zack Weinberg b6728b1b51 * filenames.h: New file imported from binutils.
From-SVN: r68791
2003-07-01 20:29:16 +00:00
Bob Wilson e677f70c66 xtensa-config.h: New file imported from binutils.
include/ChangeLog:
	* xtensa-config.h: New file imported from binutils.

gcc/ChangeLog:
	* config/xtensa/lib1funcs.asm: Use "xtensa-config.h" from
	top-level include directory.
	* config/xtensa/lib2funcs.S: Likewise.
	* config/xtensa/xtensa.h: Likewise.
	* config/xtensa/xtensa-config.h: Remove.
	* doc/install.texi: Update location of "xtensa-config.h" header.

From-SVN: r68747
2003-07-01 00:14:33 +00:00
Zack Weinberg 21299dbda4 safe-ctype.h (HC_UNKNOWN, [...]): Rename to HOST_CHARSET_UNKNOWN...
include:
	* safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC): Rename to
	HOST_CHARSET_UNKNOWN, HOST_CHARSET_ASCII, HOST_CHARSET_EBCDIC
	respectively.
libiberty:
	* safe-ctype.c: Use HOST_CHARSET_ASCII and HOST_CHARSET_EBCDIC,
	not HC_ASCII and HC_EBCDIC.
	Add documentation in form expected by gather-docs.
	* hex.c: Use HOST_CHARSET, not hand-coded check of character set.
	* Makefile.in, functions.texi: Regenerate.
gcc:
	* config/i370/i370.c, config/i370/i370.h: Use HOST_CHARSET_ASCII
	and HOST_CHARSET_EBCDIC, not HC_ASCII and HC_EBCDIC.

From-SVN: r68335
2003-06-22 15:59:49 +00:00
Zack Weinberg 7468e0b523 safe-ctype.h (HC_UNKNOWN, [...]): New #defines.
include:
	* safe-ctype.h (HC_UNKNOWN, HC_ASCII, HC_EBCDIC, HOST_CHARSET):
	New #defines.
libiberty:
	* safe-ctype.c: Separate out EOF==-1 check.  Use HOST_CHARSET
	for charset determination.
gcc:
	* aclocal.m4 (gcc_AC_C_CHARSET): Delete.
	* configure.in: Don't use gcc_AC_C_CHARSET.
	* configure, config.in: Regenerate.
	* config/i370/i370.c, config/i370/i370.h: Use
	(HOST_CHARSET == HC_EBCDIC) or (HOST_CHARSET == HC_ASCII)
	instead of HOST_EBCDIC or !HOST_EBCDIC.  Clarify comments a tad.

From-SVN: r68317
2003-06-21 23:22:30 +00:00
Kaveh R. Ghazi a54928c932 alloc-pool.c: Don't check HAVE_LONG_DOUBLE.
gcc:
	* alloc-pool.c: Don't check HAVE_LONG_DOUBLE.
	* fixinc/gnu-regex.c: Don't define `volatile'.
	* ggc-page.c: Don't check HAVE_LONG_DOUBLE.
	* ggc-simple.c: Likewise.
	* system.h: Don't define `volatile'.

	* aclocal.m4 (gcc_AC_C_VOLATILE, gcc_AC_C_LONG_DOUBLE): Delete.
	* configure.in (gcc_AC_C_VOLATILE, gcc_AC_C_LONG_DOUBLE): Don't
	call these macros.
	* config.in, configure: Regenerated.

include:
	* ansidecl.h: Delete HAVE_LONG_DOUBLE GCC bootstrap support.

From-SVN: r68085
2003-06-17 14:10:01 +00:00
Jim Blandy 49a19cfd34 hex.c (_hex_value): Make this unsigned.
libiberty/ChangeLog:
2003-05-14  Jim Blandy  <jimb@redhat.com>

	* hex.c (_hex_value): Make this unsigned.
	(hex_value): Update documentation for new return type.  hex_value
	now expands to an unsigned int expression, to avoid unexpected
	sign extension when we store it in a bfd_vma, which is larger than
	int on some platforms.
	* functions.texi: Regenerated.

include/ChangeLog:
2003-05-14  Jim Blandy  <jimb@redhat.com>

	* libiberty.h (hex_value): Make the value an unsigned int, to
	avoid unexpected sign-extension when cast to unsigned types larger
	than int --- like bfd_vma, on some platforms.
	(_hex_value): Update declaration.

From-SVN: r66840
2003-05-15 19:02:13 +00:00
Jason Merrill 9d70d418db s/burtle/iterative
From-SVN: r66577
2003-05-07 16:30:32 -04:00
Jason Merrill 5cc5a0d00d hashtab.c (burtle_hash): New fn.
libiberty/
        * hashtab.c (burtle_hash): New fn.
        * configure.in: Add AC_C_BIGENDIAN_CROSS.
        * aclocal.m4: Include accross.m4.
        * configure, config.in: Regenerate.
include/
        * hashtab.h (burtle_hash): Prototype.
        (burtle_hash_object): New macro.

From-SVN: r66565
2003-05-07 14:07:58 -04:00
Kaveh R. Ghazi d41c4351fe ansidecl.h (ATTRIBUTE_NONNULL, [...]): New.
include:
	* ansidecl.h (ATTRIBUTE_NONNULL, ATTRIBUTE_NULL_PRINTF,
	ATTRIBUTE_NULL_PRINTF_1, ATTRIBUTE_NULL_PRINTF_2,
	ATTRIBUTE_NULL_PRINTF_3, ATTRIBUTE_NULL_PRINTF_4,
	ATTRIBUTE_NULL_PRINTF_5): New.
	(ATTRIBUTE_PRINTF): Add ATTRIBUTE_NONNULL.

gcc:
	* dwarf2asm.h: Delete obsolete comment.
	(dw2_asm_output_data, dw2_asm_output_delta, dw2_asm_output_offset,
	dw2_asm_output_pcrel, dw2_asm_output_addr,
	dw2_asm_output_addr_rtx, dw2_asm_output_encoded_addr_rtx,
	dw2_asm_output_nstring, dw2_asm_output_data_uleb128,
	dw2_asm_output_data_sleb128, dw2_asm_output_delta_uleb128,
	dw2_asm_output_delta_sleb128): Add ATTRIBUTE_NULL_PRINTF.

From-SVN: r64505
2003-03-17 22:57:27 +00:00
Jan Hubicka dbccdc4211 ggc-common.c (ggc_mark_roots): Use htab_traverse_noresize.
* ggc-common.c (ggc_mark_roots): Use htab_traverse_noresize.

	* hashtab.h (htab_traverse_noresize): Declare.

	* hashtab.c (htab_traverse_noresize): Break out from ...
	* hashtab.c (htab_traverse): ... here.

From-SVN: r64496
2003-03-17 17:59:58 +00:00
Kaveh R. Ghazi 9308be9056 * libiberty.h: Document return value of physmem routines.
From-SVN: r63521
2003-02-27 20:28:40 +00:00
Kaveh R. Ghazi a354191ebf libiberty.h (physmem_total, [...]): Prototype.
include:
	* libiberty.h (physmem_total, physmem_available): Prototype.

libiberty:
	* Makefile.in (CFILES): Add physmem.c.
	(REQUIRED_OFILES): Add physmem.o.
	* configure.in: Check for sys/pstat.h.
	(checkfuncs): Add pstat_getstatic and pstat_getdynamic.
	* physmem.c: New file, copied from textutils.

	* config.in, configure: Regenerated.

From-SVN: r63198
2003-02-21 00:27:04 +00:00
Daniel Jacobowitz 378ca31ee5 * libiberty.h (lrealpath): Add declaration.
From-SVN: r63185
2003-02-20 22:10:40 +00:00
Daniel Jacobowitz 74828682c7 hashtab.h (htab_alloc_with_arg, [...]): Add new types.
include/
	* hashtab.h (htab_alloc_with_arg, htab_free_with_arg): Add new types.
	(struct htab): Add alloc_arg, alloc_with_arg_f, free_with_arg_f.
	(htab_create_alloc_ex): New prototype.
	(htab_set_functions_ex): New prototype.

libiberty/
	* hashtab.c (htab_create_alloc_ex): New function.
	(hatab_set_functions_ex): New function.
	(htab_delete, htab_expand): Support alternate allocation functions.

From-SVN: r61820
2003-01-26 07:09:41 +00:00
Geoffrey Keating 17211ab553 Merge from pch-branch.
From-SVN: r61136
2003-01-10 02:22:34 +00:00
Simon Burge f60d9a8a86 * libiberty.h (basename): Add NetBSD to the list.
From-SVN: r59421
2002-11-24 06:54:38 +00:00
Daniel Jacobowitz 42766f8db1 libiberty.h (make_relative_prefix): Add prototype.
include/
	* libiberty.h (make_relative_prefix): Add prototype.
libiberty/
	* Makefile.in: Add make-relative-prefix.c.
	* make-relative-prefix.c: New file.
	* functions.texi: Rebuilt.
gcc/
	* gcc.c (make_relative_prefix, split_directories)
	(free_split_directories): Removed.

From-SVN: r59385
2002-11-22 20:01:07 +00:00
Roger Sayle 45329aca77 partition.h: Close the extern "C" scope when compiling with C++.
* partition.h:  Close the extern "C" scope when compiling with C++.
	* getopt.h: Update copyright year from the previous patch.

From-SVN: r58570
2002-10-27 01:00:34 +00:00
Roger Sayle f416dcd5bf re PR bootstrap/8351 (3.3 20021024 (experimental) fails to bootstrap on cygwin)
PR bootstrap/8351
	* getopt.h:  Avoid prototyping getopt with no arguments in C++.

Co-Authored-By: DJ Delorie <dj@redhat.com>

From-SVN: r58569
2002-10-27 00:54:50 +00:00
Nathan Tallent e4aaa2f87d ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the list of platform compilers that may look...
* ansidecl.h (__STDC__): Add (__alpha && __cplusplus) to the
list of	platform compilers that may look, smell and act
like __STDC__ but that may not define it.

From-SVN: r58513
2002-10-24 19:36:25 -04:00
David O'Brien 6ba08913bd Remove bogus copyright message in my last entry.
From-SVN: r58188
2002-10-16 03:45:02 +00:00
David O'Brien 520157677f getopt.h: getopt is in unistd.h.
2002-10-11  David O'Brien  <obrien@FreeBSD.org>
	* getopt.h: getopt is in unistd.h.  The Single UNIX(tm) Specification,
	Version 2 Copyright (c)1997 The Open Group

Approved by:  Committed as obvious.

From-SVN: r58078
2002-10-12 04:01:04 +00:00
Alexandre Oliva e2bb0cb4b3 libiberty.h (asprintf, vasprintf): Don't declare them if the corresponding HAVE_DECL_ macro is 1.
* libiberty.h (asprintf, vasprintf): Don't declare them if the
corresponding HAVE_DECL_ macro is 1.

From-SVN: r57324
2002-09-20 00:21:54 +00:00
Alan Modra 8ff82b06d6 demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>.
* demangle.h: #include "ansidecl.h" rather than #include <ansidecl.h>.
	* fibheap.h: Likewise.
	* hashtab.h: Likewise.
	* partition.h: Likewise.
	* sort.h: Likewise.
	* splay-tree.h: Likewise.

From-SVN: r54974
2002-06-25 09:44:15 +09:30
Alan Modra 66443ad2fd libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
* libiberty.h (basename): Don't declare if HAVE_DECL_BASENAME.
	* getopt.h (getopt): Don't declare if HAVE_DECL_GETOPT.

From-SVN: r54941
2002-06-24 14:38:02 +09:30
DJ Delorie 917ccc05a6 hashtab.h (htab): Rearrange new members for backward compatibility.
* hashtab.h (htab): Rearrange new members for backward
compatibility.
(htab_create): Don't use a macro that requires other headers.

From-SVN: r54316
2002-06-06 08:42:06 -04:00
Geoffrey Keating 045b3a49ca Index: include/ChangeLog
Index: include/ChangeLog
	* hashtab.h (htab_create): Restore prototype for backward
	compatibility.
	(htab_try_create): Likewise.

Index: libiberty/ChangeLog
	* hashtab.c (htab_create): New stub function for backward
	compatibility.
	(htab_try_create): Likewise.

From-SVN: r54300
2002-06-06 03:23:27 +00:00
Geoffrey Keating e2500fedef Merge from pch-branch up to tag pch-commit-20020603.
From-SVN: r54232
2002-06-04 07:11:05 +00:00
David S. Miller 4780f10144 xregex2.h (__restrict_arr): Define to __restrict on GCC 3.1 and later.
2002-04-16  David S. Miller  <davem@redhat.com>

	* xregex2.h (__restrict_arr): Define to __restrict on GCC
	3.1 and later.  Do not redefine.

From-SVN: r52383
2002-04-16 17:12:54 -07:00
Phil Edwards 7bf421c163 dyn-string.h: Also allow IN_GLIBCPP_V3 to redefine names.
2002-04-01  Phil Edwards  <pme@gcc.gnu.org>

	* dyn-string.h:  Also allow IN_GLIBCPP_V3 to redefine names.

From-SVN: r51707
2002-04-01 21:54:28 +00:00
Andrew Cagney ccc49bed1c Remove floatformat_arm_ext.
From-SVN: r50345
2002-03-06 06:29:00 +00:00
Jim Blandy 00c2f96f89 Allow the user to specify functions for allocating memory for splay tree roots and nodes.
include:
Allow the user to specify functions for allocating memory for
splay tree roots and nodes.
* splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn):
New types.
(splay_tree): New fields: `allocate', `deallocate', and
`allocate_data'.
(splay_tree_new_with_allocator): New function declaration.

libiberty:
* splay-tree.c (splay_tree_xmalloc_allocate,
splay_tree_xmalloc_deallocate): New functions.
(splay_tree_new): Call splay_tree_new_with_allocator, passing the
above functions and a dummy data pointer.
(splay_tree_new_with_allocator): New function.
(splay_tree_delete_helper, splay_tree_delete, splay_tree_insert,
splay_tree_remove): Use the splay tree's allocation and
deallocation functions.

From-SVN: r49968
2002-02-22 17:01:23 +00:00
Jason Merrill c13db5d119 demangle.h (cplus_demangle_v3): Add "options" parm.
* demangle.h (cplus_demangle_v3): Add "options" parm.
        (cplus_demangle_v3_type): Remove prototype.
        (DMGL_VERBOSE): New macro.
        (DMGL_TYPES): New macro.

        * cplus-dem.c (flags): Add DMGL_VERBOSE
        (cplus_demangle_v3_p): Remove.
        (demangle_it): Add DMGL_TYPES to passed flags.
        * cp-demangle.c (cplus_demangle_v3_all): Remove.
        (cplus_demangle_v3_type): Remove.
        (cplus_demangle_v3): Add options parm.

        * collect2.c (dump_file): Pass DMGL_VERBOSE to cplus_demangle.

From-SVN: r49525
2002-02-05 11:33:31 -05:00
DJ Delorie 02ae22b851 minor typo
From-SVN: r49461
2002-02-03 08:10:29 -05:00
H.J. Lu 4437e4d46b demangle.h (cplus_demangle_v3_type): New prototype.
2002-02-02  H.J. Lu  (hjl@gnu.org)

	* demangle.h (cplus_demangle_v3_type): New prototype.

From-SVN: r49455
2002-02-02 19:59:23 -08:00
Kaveh R. Ghazi b05c4e590b * libiberty.h (C_alloca): Add ATTRIBUTE_MALLOC.
From-SVN: r49299
2002-01-28 21:08:34 +00:00
Richard Henderson d06ba3c7e6 demangle.h (no_demangling): New.
* demangle.h (no_demangling): New.
        (NO_DEMANGLING_STYLE_STRING): New.

        * cplus-dem.c (libiberty_demanglers): Add no_demangling case.
        (cplus_demangle): Support no_demangling.

From-SVN: r47733
2001-12-06 13:56:15 -08:00
Neil Booth 5a6943c725 * include/safe-ctype.h (_sch_isbasic, IS_ISOBASIC): New.
From-SVN: r46470
2001-10-24 19:29:16 +00:00
Kaveh R. Ghazi e5969ba63a libiberty.h (hex_init): Revert delete.
include:
	* libiberty.h (hex_init): Revert delete.

libiberty:
	* hex.c (hex_init): Provide empty stub.

From-SVN: r46421
2001-10-23 03:17:29 +00:00
Kaveh R. Ghazi 26ad2982d8 libiberty.h (_hex_value): Const-ify.
include:
	* libiberty.h (_hex_value): Const-ify.
	(hex_init): Delete.

libiberty:
	* hex.c (hex_init): Delete.
	(_hex_value): Const-ify and initialize at compile-time.

From-SVN: r46417
2001-10-22 22:32:57 +00:00
Kaveh R. Ghazi 0be6abca22 demangle.h (demangler_engine): Const-ify.
include:
	* demangle.h (demangler_engine): Const-ify.
	* libiberty.h (buildargv): Likewise.

libiberty:
	* argv.c (buildargv, tests, main): Const-ify.
	* cp-demangle.c (operator_code): Likewise.
	* cplus-dem.c (optable, libiberty_demanglers,
	cplus_demangle_set_style, cplus_demangle_name_to_style,
	print_demangler_list): Likewise.
	* hashtab.c (higher_prime_number): Likewise.
	* strcasecmp.c (charmap): Likewise.
	* strerror.c (error_info, strerror, main): Likewise.
	* strncasecmp.c (charmap): Likewise.
	* strsignal.c (signal_info): Likewise.

From-SVN: r46060
2001-10-07 14:45:04 +00:00
Kaveh R. Ghazi ad43d46f3a libiberty.h (reconcat): New function.
include:
	* libiberty.h (reconcat): New function.

libiberty:
	* concat.c (reconcat): New function.

gcc:
	* c-aux-info.c (affix_data_type): Use ATTRIBUTE_MALLOC.  Avoid
	leak by passing malloc'ed pointer to reconcat, not concat.

From-SVN: r45789
2001-09-24 22:38:22 +00:00
Kaveh R. Ghazi 69ee340e99 libiberty.h (concat, [...]): Improve comments.
* libiberty.h (concat, concat_length, concat_copy, concat_copy2,
	ACONCAT): Improve comments.

From-SVN: r45683
2001-09-18 20:07:31 +00:00
Alan Modra b9bc4bf6de * objalloc.h (OBJALLOC_ALIGN): Define using offsetof.
From-SVN: r45677
2001-09-18 23:09:40 +09:30
Kaveh R. Ghazi c793eea7ab libiberty.h (concat_length, [...]): New.
include:
	* libiberty.h (concat_length, concat_copy, concat_copy2,
	libiberty_concat_ptr, ACONCAT): New.

libiberty:
	* concat.c (vconcat_length, vconcat_copy, concat_length,
	concat_copy, concat_copy2): New functions.
	(concat): Use vconcat_length/vconcat_copy.

gcc:
	* gcc.c (find_file): Use ACONCAT in lieu of alloca/strcpy/strcat.

From-SVN: r45664
2001-09-17 22:15:10 +00:00
Kaveh R. Ghazi c1d49704bc libiberty.h (ASTRDUP): New macro.
include:
	* libiberty.h (ASTRDUP): New macro.
	libiberty_optr, libiberty_nptr, libiberty_len): Declare.

libiberty:
	* alloca.c (libiberty_optr, libiberty_nptr, libiberty_len):
	Define.

gcc:
	* c-aux-info.c (affix_data_type): Use ASTRDUP in lieu of
	alloca/strcpy.

From-SVN: r45657
2001-09-17 18:48:45 +00:00
Kaveh R. Ghazi c864312278 * ansidecl.h: Update comments reflecting previous change.
From-SVN: r45275
2001-08-29 19:44:39 +00:00
Kaveh R. Ghazi e2dff3f2f6 ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.
include:
	* ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.

libiberty:
	* concat.c (concat): Use VPARAMS, VA_OPEN, VA_FIXEDARG & VA_CLOSE.

From-SVN: r45204
2001-08-27 19:10:39 +00:00
Lars Brinkhoff 88c1082bf8 dyn-string.h, [...]: replace "GNU CC" with "GCC".
* dyn-string.h, fibheap.h, partition.h, sort.h, splay-tree.h:
	replace "GNU CC" with "GCC".

From-SVN: r45130
2001-08-23 12:07:58 +00:00
Richard Henderson d7a0e799d3 fibheap.h: Tidy formatting.
* fibheap.h: Tidy formatting.
        (fibnode_t): Limit degree to 31 bits to avoid warning.

From-SVN: r45088
2001-08-21 18:53:38 -07:00
Andrew Cagney 0310e5ac70 floatformat.h (floatformat_arm_ext): Document as deprecated.
* floatformat.h (floatformat_arm_ext): Document as deprecated.
(floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
(floatformat_ia64_spill_little, floatformat_ia64_quad_little)
(floatformat_ia64_spill_big, floatformat_ia64_quad_big)
(floatformat_m88110_harris_ext): Declare.

From-SVN: r45065
2001-08-21 00:09:09 +00:00
Daniel Berlin 8c23e0a440 fibheap.h: New file.
include/
2001-08-20  Daniel Berlin  <dan@cgsoftware.com>

	* fibheap.h: New file. Fibonacci heap.

libiberty/
2001-08-20  Daniel Berlin  <dan@cgsoftware.com>

	* fibheap.c: New file. Fibonacci heap.

	* Makefile.in (CFILES): Add fibheap.c.
	(REQUIRED_OFILES): Add fibheap.o.
	(fibheap.o): Add dependencies for fibheap.o.

From-SVN: r45062
2001-08-20 20:06:07 +00:00
Zack Weinberg b649398a84 ansidecl.h: Reorganize for readability...
include:
        * ansidecl.h: Reorganize for readability, remove documentation
        of obsolete macros, document PARAMS and VPARAMS.  Add new
        macros VA_OPEN, VA_CLOSE, and VA_FIXEDARG for nicer variadic
        function implementation.

gcc:
        * cpperror.c: Use VA_OPEN/VA_CLOSE/VA_FIXEDARG throughout.

From-SVN: r45011
2001-08-18 20:46:45 +00:00
Richard Henderson 457f49df10 * hashtab.h (htab_hash_string): Declare.
From-SVN: r44949
2001-08-16 18:54:01 -07:00
Andrew Cagney b0e9bc8cc3 Oops, fix check-in date.
From-SVN: r44816
2001-08-12 02:06:34 +00:00
Andrew Cagney 0ef5547d0e (lbasename): Change function declaration to return a const char pointer.
From-SVN: r44782
2001-08-10 23:45:11 +00:00
Mark Kettenis ead4cf347a xregex.h (_REGEX_RE_COMP): Define.
* xregex.h (_REGEX_RE_COMP): Define.
(re_comp): Define to xre_comp.
(re_exec): Define to xre_exec.

From-SVN: r44585
2001-08-02 19:23:47 -04:00
DJ Delorie 27ffc806c4 merge from glibc
From-SVN: r44138
2001-07-18 19:40:00 -04:00
Jeff Johnston 3eb90047bc xregex.h: New file to support libiberty regex.
* xregex.h: New file to support libiberty regex.
* xregex2.h: Ditto.

From-SVN: r43913
2001-07-10 20:10:28 -04:00
Matt Kraai c25d4f6a6b * partition.h: Fix misspelling of `implementation'.
From-SVN: r42171
2001-05-16 21:00:55 +00:00
Kaveh R. Ghazi f59328a83d * ansidecl.h (NULL_PTR): Delete.
From-SVN: r41946
2001-05-10 19:11:58 +00:00
Zack Weinberg 641b2721c4 cp-demangle.c (demangle_v3_with_details, [...]): Use K+R style function definition.
* cp-demangle.c (demangle_v3_with_details,
	is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor): Use K+R style
	function definition.
	* ternary.c: Use K+R style function definitions.  Use PTR, not
	void *.  Make arguments constant where possible.
	* demangle.h: Use PARAMS for all prototypes.
	* ternary.h: Use PARAMS for all prototypes.  Use PTR, not void *.
	Make arguments constant where possible.

From-SVN: r41910
2001-05-08 06:13:58 +00:00
Mark Mitchell 5cdba4ff5f splay-tree.h (splay_tree_max): New function.
* splay-tree.h (splay_tree_max): New function.
	(splay_tree_min): Likewise.

From-SVN: r41895
2001-05-07 15:45:24 +00:00
Daniel Berlin 9dab060e9d ternary.h: New file - Ternary search tree header.
2001-04-15  Daniel Berlin  <dan@cgsoftware.com>

	* ternary.h: New file - Ternary search tree header.

2001-04-15  Daniel Berlin  <dan@cgsoftware.com>

	* ternary.c: New file - Ternary search tree implementation.

	* Makefile.in: Add ternary.o, and ternary.c dependencies.

From-SVN: r41380
2001-04-16 15:30:17 +00:00
Zack Weinberg d02af17340 ansidecl.h: All logic from gcc/gansidecl.h moved here.
include:
	* ansidecl.h: All logic from gcc/gansidecl.h moved here.
gcc:
	* gansidecl.h: Delete file.
	* configure.in: Change all refs to gansidecl.h to use
	ansidecl.h.  Adjust *_file_list so they know where ansidecl.h
	lives.
	* configure: Regenerate.

	* Makefile.in (intl.o): Don't depend on gansidecl.h.
	* defaults.h: s/gansidecl.h/ansidecl.h/ in comment.
	* ggc.h, config/fr30/fr30.h, config/mcore/mcore.c:
	Don't include gansidecl.h.
	* intl.c, main.c, version.c, fixinc/fixlib.h,
	fixinc/procopen.c, fixinc/server.c: Include ansidecl.h not
	gansidecl.h.
gcc/java:
	* Make-lang.in (buffer.o, check-init.o, class.o): Don't depend
	on gansidecl.h.
	* buffer.c, jvgenmain.c: Don't include gansidecl.h.
libiberty:
	* make-temp-file.c (try): Inline.

From-SVN: r41069
2001-04-04 00:46:27 +00:00
Kaveh R. Ghazi cc56c744ee * libiberty.h (alloca): Handle setting C_ALLOCA.
From-SVN: r40978
2001-03-31 18:59:56 +00:00
Jim Blandy 2d32013ffe demangle.h (enum gnu_v3_constructor_kinds, [...]): New declarations.
* demangle.h (enum gnu_v3_constructor_kinds,
is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds,
is_gnu_v3_mangled_dtor): New declarations.

From-SVN: r40709
2001-03-21 14:37:53 -05:00
DJ Delorie 4cf6b384ac Fix pathname.
From-SVN: r40473
2001-03-14 16:34:39 -05:00
Nick Clifton 01f537aba0 Fix copyright dates
From-SVN: r40469
2001-03-14 19:44:38 +00:00
Neil Booth 2b757d5101 lbasename.c: New file.
* libiberty/lbasename.c: New file.
	* libiberty/Makefile.in: Update for lbasename.
	* include/libiberty.h: Add lbasename.

Co-Authored-By: John David Anglin <dave@hiauly1.hia.nrc.ca>

From-SVN: r40363
2001-03-10 10:41:25 +00:00
Zack Weinberg 1f50aafb85 oops, edited changelogs in wrong tree
this is the log for the big alloca configuration patch

From-SVN: r40260
2001-03-06 10:01:28 +00:00
Zack Weinberg b548dffbda aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
libiberty:
	* aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
	* configure.in: Replace all alloca logic with a simple use of
	the above new macro.
	* config.table: Kill *-*-beos* entry.
	* config/mh-beos: Delete.
	* configure, config.in: Regenerate.

	* Makefile.in (ALLOCA, HFILES): Kill.
	(REQUIRED_OFILES): Add alloca.o.
	(alloca.o): Depend on libiberty.h.
	(argv.o): Don't depend on alloca-conf.h.
	* alloca-conf.h: Delete.
	* alloca.c: Include libiberty.h.  Kill all #ifdef emacs
	blocks.  Provide the C alloca unconditionally.  Use PTR where
	appropriate.  Make i00afunc static.
	* argv.c: Don't include alloca-conf.h.

include:
	* libiberty.h: Prototype C_alloca; define alloca to either
	__builtin_alloca or C_alloca as appropriate.

gcc:
	* aclocal.m4 (AM_GNU_GETTEXT): Don't AC_REQUIRE
	AC_FUNC_ALLOCA.
	* configure, config.in: Regenerate.
	* config.gcc: Remove references to deleted files.

	* genattr.c, genattrtab.c, genextract.c, genoutput.c,
	genrecog.c, rtl.c: Do not use alloca anywhere.

	* Makefile.in, build-make, system.h, config/x-interix,
	config/x-svr4, config/xm-interix.h, config/xm-openbsd.h,
	config/alpha/xm-alpha.h, config/alpha/xm-vms.h,
	config/arc/xm-arc.h, config/arm/xm-arm.h,
	config/d30v/xm-d30v.h, config/dsp16xx/xm-dsp16xx.h,
	config/h8300/xm-h8300.h, config/i370/x-oe,
	config/i370/xm-linux.h, config/i386/x-aix, config/i386/x-beos,
	config/i386/x-ncr3000, config/i386/x-sco5,
	config/i386/xm-dgux.h, config/i860/x-sysv4,
	config/i960/xm-i960.h, config/m32r/xm-m32r.h,
	config/m68k/x-crds, config/m68k/x-dpx2, config/m68k/x-hp320,
	config/m68k/x-hp320g, config/m69k/x-mot3300,
	config/m68k/x-mot3300-gas, config/m68k/xm-amix.h,
	config/m68k/xm-hp320.h, config/m68k/xm-m68kv.h,
	config/m68k/xm-mot3300.h, config/m88k/x-dolph,
	config/m88k/x-sysv4, config/m88k/x-tekXD88,
	config/m88k/xm-m88k.h, config/mcore/xm-mcore.h,
	config/mips/x-iris, config/mips/x-iris3,
	config/mips/x-sni-svr4, config/mips/x-sysv,
	config/mips/xm-iris6.h, config/mips/xm-mips.h,
	config/mips/xm-nws3250v4.h, config/pa/x-hpux,
	config/pa/x-pa-mpeix, config/pa/xm-pa.h,
	config/pa/xm-pa64hpux.h, config/pa/xm-pahpux.h,
	config/pa/xm-papro.h, config/romp/xm-romp.h,
	config/rs6000/x-aix31, config/rs6000/x-aix41,
	config/rs6000/x-beos, config/rs6000/x-lynx,
	config/rs6000/x-mach, config/rs6000/x-rs6000,
	config/rs6000/x-sysv4, config/rs6000/xm-rs6000.h,
	config/rs6000/xm-sysv4.h, config/sh/xm-sh.h,
	config/sparc/x-sysv4, config/sparc/xm-linux.h,
	config/sparc/xm-pbd.h, config/sparc/xm-sparc.h,
	config/vax/xm-vms.h: Eradicate all references to alloca and
	related stuff.

	* config/xm-alloca.h, config/clipper/x-clix,
	config/i386/xm-sysv4.h, config/i860/x-fx2800,
	config/i860/x-sysv3, config/m88k/x-sysv3,
	config/sparc/xm-sol2.h, config/we32k/x-we32k: Delete
	(contained only alloca related hacks).

	* config/i386/xm-beos.h, config/rs6000/xm-beos.h: Just define
	USE_C_ALLOCA.

From-SVN: r40259
2001-03-06 09:52:35 +00:00
John David Anglin 9bb9ef2834 safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc compatibility.
* safe-ctype.h (_sch_test): Cast enum bit to unsigned short int for pcc
	compatibility.

From-SVN: r40175
2001-03-02 01:17:23 +00:00
Bryce McKinlay 3b60dd8e10 Add support for Java demangling under the v3 ABI:
* cp-demangle.c (NAMESPACE_SEPARATOR): New define.
	(struct demangling_def): Add `style' field.
	(demangling_new): New parameter `style'. Set it in demangling_t.
	(demangle_prefix): Use NAMESPACE_SEPARATOR.
	(demangle_type_ptr): Don't emit pointer symbol if doing Java output.
	(cp_demangle): New parameter `style'. Pass it to demangling_new().
	(main): Call cp_demangle with extra parameter.
	(java_demangle_v3): New function.
	(java_builtin_type_names): New. Table of primitive type names used
	for Java demangling.
	(demangle_builtin_type): Look up in java_builtin_type_names if doing
	Java output.
	* cplus-dem.c (cplus_demangle): Use java_demangle_v3 to do Java
	demangling.
	(long_options): Remove obsolete `java' option.
	(main): Remove explicit handling of `java' option. Instead, pass style
	parameter in cplus_demangle flags as gdb does.
	* testsuite/demangle.expected: Add some Java test cases.

From-SVN: r39399
2001-02-02 00:27:39 +00:00
Joseph Myers 2cb5082c1e COPYING: Update to current ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes...
* COPYING: Update to current
	ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references
	to 19yy as example year in copyright notice).

gcc:
	* COPYING: Update to current
	ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references
	to 19yy as example year in copyright notice).

gcc/f:
	* g77.texi: Update GPL copy not to refer to years 19@var{yy}.

include:
	* COPYING: Update to current
	ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references
	to 19yy as example year in copyright notice).

From-SVN: r38366
2000-12-18 21:47:20 +00:00
Herman A.J. ten Brugge d092a92533 safe-ctype.h: Make code work on all targets and not just on targets where a char is 8 bits.
* safe-ctype.h: Make code work on all targets and not just on
        targets where a char is 8 bits.

From-SVN: r38312
2000-12-16 11:12:06 -08:00
Zack Weinberg f6bbde28c4 safe-ctype.h: New file.
include:
	* safe-ctype.h: New file.
libiberty:
	* safe-ctype.c: New file.
	* Makefile.in (CFILES): Add safe-ctype.c.
	(REQUIRED_OFILES): Add safe-ctype.o.

	* argv.c: Define ISBLANK and use it, not isspace.
	* basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c,
	strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h.  Use
	uppercase ctype macros.  Don't test ISUPPER(c)/ISLOWER(c)
	before calling TOLOWER(c)/TOUPPER(c).
gcc:
	* Makefile.in (HOST_RTL): Add safe-ctype.o.
	(safe-ctype.o): New rule.
	* system.h: Include safe-ctype.h, not ctype.h.  No need to
	wrap ctype macros.

	* cpphash.h: Zap IStable and related macros.  Define is_* in
	terms of safe-ctype.h macros.
	* cppinit.c: Delete the IStable and all related code.

	* tradcpp.c: Delete is_idchar, is_idstart, is_hor_space, and
	is_space arrays.  Delete initialize_char_syntax.  Change all
	references to the above arrays to use macros instead.
	* tradcpp.h: Define is_idchar, is_idstart, is_space, and
	is_nvspace in terms of safe_ctype.h's macros.
	* tradcif.y: is_idchar, is_idstart are macros not arrays.

	* config/i370/i370.c, config/winnt/dirent.c,
	config/winnt/fixinc-nt.c, config/winnt/ld.c:
	Use uppercase ctype macros.  If we included ctype.h,
	include safe-ctype.h instead.

	* fixinc/fixfixes.c: Use uppercase ctype macros.  Don't test
	ISLOWER(c) before calling TOUPPER(c).
	* fixinc/fixincl.c (extract_quoted_files): Simplify out some gunk.
	* fixinc/gnu-regex.c: Include safe-ctype.h, not ctype.h.  No need to
	wrap ctype macros.  Don't test ISUPPER(x) before calling TOLOWER(x).
gcc/ch:
	* lex.c: Don't bother checking whether ISUPPER(c) before
	calling TOLOWER(c).  Don't bother checking whether isascii(c)
	before testing ISSPACE(c); ISSPACE(c) includes '\n'.
gcc/f:
	* Make-lang.in: Link f/fini with safe-ctype.o.
	* bad.c: Don't test ISUPPER(c) || ISLOWER(c) before calling TOUPPER(c).
	* com.c: Use TOUPPER, not ffesrc_toupper.
	* fini.c: Don't test ISALPHA(c) before calling TOUPPER(c)/TOLOWER(c).
	* intrin.c: Don't test IN_CTYPE_DOMAIN(c).
	* src.c: Delete ffesrc_toupper_ and ffesrc_tolower_ and their
	initializing code; use TOUPPER and TOLOWER instead of
	ffesrc_toupper and ffesrc_tolower.
	* src.h: Don't declare ffesrc_toupper_ or ffesrc_tolower_.
	Don't define ffesrc_toupper or ffesrc_tolower.
gcc/java:
	* jvgenmain.c: Use ISPRINT not isascii.

From-SVN: r38124
2000-12-08 03:00:26 +00:00
Rodney Brown 0b749da1b8 * getopt.h obstack.h: Standarize copyright statement.
From-SVN: r38086
2000-12-06 18:54:13 -07:00
Jason Merrill 85c64f78c6 also tweak comment
From-SVN: r38034
2000-12-05 08:28:46 -05:00
Richard Henderson 675ad22cfc * demangle.h: Change "new_abi" to "v3" everywhere.
From-SVN: r38020
2000-12-04 15:46:57 -08:00
Zack Weinberg d1209685fa Makefile.in, [...]: Expunge remaining traces of facility for running MD files through C preprocessor.
gcc:
        * Makefile.in, config.gcc, configure.in: Expunge remaining
        traces of facility for running MD files through C preprocessor.

libiberty:
        * aclocal.m4 (LIB_AC_PROG_CC): Moved here from configure.in.
        (AC_DEFINE_NOAUTOHEADER): New - work around bug in autoheader.
        * configure.in: Call AC_C_INLINE and AC_C_CONST.  Use three
        argument form of AC_DEFINE in dummy definitions block.  Use
        AC_DEFINE_NOAUTOHEADER for real definitions of things defined
        in dummy block.  Preload cache variables instead of bypassing
        tests, where possible.
        * acconfig.h: Removed.

        * xmalloc.c (xmalloc_failed): New function, does error
        reporting on failed allocation.
        (xmalloc, xcalloc, xrealloc): Use it.
        * libiberty.h: Move #includes to top.  Prototype xmalloc_failed.

From-SVN: r37650
2000-11-22 08:32:26 +00:00
Hans-Peter Nilsson ba7aa3c1c3 Correct date and style of last entry
From-SVN: r37476
2000-11-15 11:57:23 +00:00
Kenneth Block 7ecdd10b6d * demangle.h: Add gnat and java demangle styles.
From-SVN: r37474
2000-11-15 11:52:30 +00:00
Hans-Peter Nilsson 5dd0f480ae hashtab.h (struct htab): Add member return_allocation_failure.
* hashtab.h (struct htab): Add member return_allocation_failure.
	(htab_try_create): New prototype.  Mention which functions may
	return NULL when this is used.

From-SVN: r37246
2000-11-04 07:35:33 +00:00
Hans-Peter Nilsson 5aa2300021 * hashtab.h: Change void * to PTR where necessary.
From-SVN: r37230
2000-11-03 20:23:00 +00:00
Mark Mitchell 2c9f4db73a splay-tree.h (splay_tree_predecessor): Declare.
* splay-tree.h (splay_tree_predecessor): Declare.

	* splay-tree.c (splay_tree_predecessor): New function.
	(splay_tree_successor): Likewise.

From-SVN: r36304
2000-09-10 21:28:21 +00:00
John David Anglin 84802b1397 John David Anglin <dave@hiauly1.hia.nrc.ca>
* md5.h (md5_uint32): Choose via INT_MAX instead of UINT_MAX.

From-SVN: r36181
2000-09-05 23:10:12 -07:00
Alex Samuel 31e0ab1f76 In include:
* dyn-string.h: Adjust formatting.
        (dyn_string_insert_char): New macro.  New declaration.

In libiberty:

        * cp-demangle.c (ANONYMOUS_NAMESPACE_PREFIX): New macro.
        (substitution_def): Remove template_parm_number.
        (NOT_TEMPLATE_PARM): Remove.
        (result_insert_string): New macro.
        (result_insert): Likewise.
        (result_insert_char): Likewise.
        (substitution_add): Remove last parameter.  Don't store template
        parm number.
        (BFT_NO_RETURN_TYPE): Define as NULL.
        (demangle_encoding): Adjust call to demangle_bare_function_type.
        (demangle_name): Adjust substitution.  Adjust call to
        substitution_add.
        (demangle_prefix): Adjust call to substitution_add.
        (demangle_identifier): Handle anonymous namespaces.
        (demangle_operator_name): Change demangling of vendor-extended
        operator to match ABI changes.
        (demangle_type_ptr): Change parameters.  Make recursive.  Handle
        substitutions here.
        (demangle_type): Adjust calls to demangle_template_param,
        substitution_add, and demangle_type_ptr.  Fix substitution of
        templated types.
        (demangle_function_type): Change parameter to a pointer.
        (demangle_bare_function_type): Likewise.  Adjust insertion point.
        (demangle_template_param): Remove last parameter.
        (demangle_expr_primary): Remove unused variable.  Adjust call to
        demangle_template_param.
        (is_mangled_char): Accept `$' and `.'.
        * cplus-dem.c (gnu_new_abi_symbol_characters): Add '$' and '.'.
        * dyn-string.c (dyn_string_insert_char): New function.

From-SVN: r36148
2000-09-05 01:01:12 +00:00
Jason Merrill 881c6935bf [multiple changes]
2000-08-28  Daniel Berlin  <dberlin@redhat.com>

        * dwarf2out.c (DIE_LABEL_PREFIX): Remove leading "__".
        (print_die): If we don't know the offset of the
        target die, try the symbol.  Add a trailing newline.
        (reverse_all_dies): New fn.
        (dwarf2out_finish): Call it.
        (break_out_includes): Reorganize for clarity.
        (add_sibling_attributes): Don't call reverse_die_lists.
        (output_comp_unit): Rename from output_comdat_comp_unit.  Use for
        primary CU, too.
        * flags.h: Add flag_eliminate_dwarf2_dups.
        * toplev.c (f_options): Support -feliminate-dwarf2-dups.

2000-08-28  Jason Merrill  <jason@redhat.com>

        * dwarf2.h (DW_TAG_GNU_BINCL, DW_TAG_GNU_EINCL): New tags.
        * dwarf2out.c: #include "md5.h".
        (DIE_LABEL_PREFIX): New macro.
        (dw_val_struct): Add 'external' flag to val_die_ref.
        (add_AT_die_ref, AT_ref): Adjust.
        (AT_ref_external, set_AT_ref_external): New fns.
        (build_abbrev_table): Call set_AT_ref_external.
        (value_format): Call AT_ref_external.
        (die_struct): Add die_symbol field.
        (new_die): Clear it.
        (dwarf_tag_name): Handle BINCL/EINCL.
        (dwarf2out_start_source_file): Add BINCL DIE.
        (dwarf2out_end_source_file): Add EINCL DIE.
        (push_new_compile_unit, pop_compile_unit, clear_die_sizes): New fns.
        (loc_checksum, attr_checksum, die_checksum): New fns.
        (is_type_die, is_comdat_die, is_symbol_die): New fns.
        (compute_section_prefix, assign_symbol_names): New fns.
        (gen_internal_sym, output_die_symbol, output_symbolic_ref): New fns.
        (output_die): Call output_die_symbol and AT_ref_external.
        (output_comdat_comp_unit): New fn, split out from...
        (dwarf2out_finish): ...here.  Also call add_sibling_attributes for
        secondary CUs.
        (output_pubnames, output_aranges): Abort if we see entries from
        secondary CUs.
        * toplev.h: Declare file_name_nondirectory.
        * toplev.c (file_name_nondirectory): New fn, moved from C++ frontend.
        (rest_of_type_compilation): Call dwarf2out_decl if at toplevel.
        (debug_start_source_file): Call dwarf2out_start_source_file
        regardless of debug verbosity.
        (debug_end_source_file): Similarly.
        * tree.h: Declare clean_symbol_name.
        * tree.c (clean_symbol_name): Split out from...
        (get_file_function_name_long): ...here.

        * dwarf2out.c (new_loc_descr): Use calloc.
        (splice_child_die): Remove the die from the right parent.
        (gen_struct_or_union_die): Don't add AT_name to a specification DIE.

gcc/cp:
2000-08-28  Jason Merrill  <jason@redhat.com>

        * lex.c (file_name_nondirectory): Move to toplev.c.

libiberty:
2000-08-28  Jason Merrill  <jason@redhat.com>

        * Makefile.in (REQUIRED_OFILES): Add md5.o.
        (CFILES): Add md5.c.
        * md5.c: New file.

include:
2000-08-28  Jason Merrill  <jason@redhat.com>

        * md5.h: New file.

gcc/cp:
2000-08-28  Jason Merrill  <jason@redhat.com>

        * cp-tree.h (LOCAL_CLASS_P): New macro.
        * class.c (finish_struct_1): Use it.

From-SVN: r36022
2000-08-28 20:29:29 -04:00
Greg McGary 672a59e0ad * libiberty.h (ARRAY_SIZE): New macro.
From-SVN: r35947
2000-08-24 20:28:15 +00:00
Jason Merrill cd3165f5c3 tweak
From-SVN: r35230
2000-07-24 13:36:49 -04:00
Alex Samuel 051664b069 in include/ChangeLog:
* dyn-string.h (dyn_string_init, dyn_string_new,
	dyn_string_delete, dyn_string_release, dyn_string_resize,
	dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
	dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
	dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
	dyn_string_append_char, dyn_string_substring_dyn_string_eq):
	Define as same name with __cxa_ prepended, if IN_LIBGCC2.
	(dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
	dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
	dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
	dyn_string_append_char, dyn_string_substring): Change return type
	to int.

in libiberty/ChangeLog:

	* cp-demangle.c: Don't include ctype.h.
	(IS_DIGIT): New macro.
	(IS_ALPHA): Likewise.  Use IS_DIGIT and IS_ALPHA throughout
	instead of isdigit and isalpanum.
	(demangling_def): Make name and next const pointers.
	(STATUS_ALLOCATION_FAILED): New status code.
	(dyn_string_append_space): Handle failure in
	dyn_string_append_char.
	(int_to_dyn_string): Likewise.  Change return value to status_t.
	(string_list_new): Handle failure of dyn_string_init.
	(result_close_template_list): Change return type to status_t.
	Handle failure in dyn_string_append.
	(result_push): Change return value to status_t.  Handle failure in
	string_list_new.  Handle failure of result_push throughout.
	(substitution_add): Change return value to status_t.  Handle
	dyn_string failures.  Handle failure of substitution_add
	throughout.
	(template_arg_list_new): Return NULL on allocation failure.
	(result_append_string): Return STATUS_ALLOCATION_FAILED on error.
	Handle error result throughout.
	(result_append): Likewise.
	(result_append_char): Likewise.
	(result_append_space): Likewise.
	(demangling_new): Make argument a const pointer.  Handle
	allocation failures.
	(demangle_template_args): Handle failure in template_arg_list_new
	and result_close_template_list.
	(demangle_discriminator): Return if int_to_dyn_string fails.
	(cp_demangle): Likewise.
	(cp_demangle_type): New function.
	(cplus_demangle_new_abi): Don't call dyn_string_delete.  Abort on
	memory allocation failure.
	(main): Likewise.
	* dyn-string.c (RETURN_ON_ALLOCATION_FAILURE): Define if
	IN_LIBGCC2.
	(dyn_string_init): Change return value to int.  Handle
	RETURN_ON_ALLOCATION_FAILURE case.
	(dyn_string_new): Handle RETURN_ON_ALLOCATION_FAILURE case.
	(dyn_string_release): Delete the dyn_string.
	(dyn_string_resize): Handle RETURN_ON_ALLOCATION_FAILURE case.
	(dyn_string_copy): Change return type to int.
	(dyn_string_copy_cstr): Likewise.
	(dyn_string_prepend): Likewise.
	(dyn_string_prepend_cstr): Likewise.
	(dyn_string_insert): Likewise.
	(dyn_string_insert_cstr): Likewise.
	(dyn_string_append): Likewise.
	(dyn_string_append_cstr): Likewise.
	(dyn_string_append_char): Likewise.
	(dyn_string_substring): Likewise.

in gcc/cp/ChangeLog:

	* Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
	(CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
	(cp-demangle.o): New rule.
	(dyn-string.o): Likewise.
	* inc/cxxabi.h (__cxa_demangle): New declaration.

From-SVN: r34657
2000-06-23 03:58:44 +00:00
Kaveh R. Ghazi 69197e7e5e configure.in (ac_libiberty_warn_cflags): Add -pedantic.
libiberty:
	* configure.in (ac_libiberty_warn_cflags): Add -pedantic.

	* choose-temp.c (try, choose_temp_base, make_temp_file): Constify.

	* cp-demangle.c (demangle_char): Change parameter from char to int.
	(demangle_expression, demangle_expr_primary): Remove extra
	semi-colon in prototype.

	* dyn-string.c (dyn_string_append_char): Change parameter from
	char to int.

	* memcmp.c (memcmp): Constify.

	* mkstemps.c (gcc_uint64_t): Mark GNUC `long long' case with
	__extension__.

	* partition.c (elem_compare): Prototype.  Don't cast away
	const-ness.

	* setenv.c (setenv): Use braces to avoid ambiguous `else'.

include:
	* demangle.h (demangling_styles): Remove trailing comma in enum.

	* dyn-string.h (dyn_string_append_char): Change parameter from
	char to int.

From-SVN: r34447
2000-06-07 21:13:14 +00:00
Alex Samuel 69afa80d10 In include,
* dyn-string.h: Move here from gcc/dyn-string.h.  Add new functions.

	* demangle.h (DMGL_GNU_NEW_ABI): New macro.
	(DMGL_STYLE_MASK): Or in DMGL_GNU_NEW_ABI.
	(current_demangling_style): Add gnu_new_abi_demangling.
	(GNU_NEW_ABI_DEMANGLING_STYLE_STRING): New macro.
	(GNU_NEW_ABI_DEMANGLING): Likewise.
	(cplus_demangle_new_abi): New declaration.

In libiberty,

	* Makefile.in (CFILES): Add cp-demangle.c and dyn-string.c.
	(REQUIRED_OFILES): Add cp-demangle.o and dyn-string.o.
	(cp-demangle.o): New dependency.
	(dyn-string.o): Likewise.

	* dyn-string.c: Move here from gcc/dyn-string.c.  Add new functions.

	* cplus-dem.c (libiberty_demanglers): Add initializer for new-ABI
	demangler.
	(cplus_demangle): Call cplus_demangle_new_abi if in new-ABI
	demangling mode.
	(gnu_new_abi_symbol_characters): New function.
	(main): Use gnu_new_abi_symbol_characters.  * cp-demangle.c: New
	file.
	* cp-demangle.c: New file.

From-SVN: r34397
2000-06-05 02:28:41 +00:00
Jason Merrill 18fa855f72 restore comment
From-SVN: r34349
2000-06-01 19:16:50 -04:00
Andrew Cagney 0b72c3df6b Add field ``name'' to floatformat.
From-SVN: r34292
2000-05-31 11:00:54 +00:00
Kaveh R. Ghazi f31e826ba3 getopt.h (getopt): Also check HAVE_DECL_* when prototyping.
include:
	* getopt.h (getopt): Also check HAVE_DECL_* when prototyping.

	* libiberty.h (basename): Likewise.

gcc:
	* aclocal.m4 (gcc_AC_CHECK_DECL, gcc_AC_CHECK_DECLS): New macros
	rewritten from the internals of gcc_AC_NEED_DECLARATION{S}.

	* configure.in (gcc_AC_CHECK_DECLS): Call this instead of
	gcc_AC_NEED_DECLARATIONS.

	* dwarfout.c: Don't prototype time().

	* gcc.c: Check HAVE_DECL_* instead of NEED_DECLARATION_*.

	* system.h: Likewise.

	* toplev.c: Likewise.

From-SVN: r34108
2000-05-23 17:42:19 +00:00
Zack Weinberg 8784fdcd69 cpphash.h: Remove conditional #define of __extension__.
gcc:
	* cpphash.h: Remove conditional #define of __extension__.
	* rtl.h: Add __extension__ to RTL_CHECK1, RTL_CHECK2,
	RTL_CHECKC1, RTL_CHECKC2, and RTVEC_ELT macros
	(ENABLE_RTL_CHECKING only).
	* tree.h: Add __extension__ to TREE_CHECK, TREE_CLASS_CHECK,
	CST_OR_CONSTRUCTOR_CHECK, and EXPR_CHECK macros
	(ENABLE_TREE_CHECKING only).
	* varray.h: Add __extension__ to VARRAY_CHECK macro
	(ENABLE_CHECKING only).

include:
	* ansidecl.h: #define __extension__ to nothing if
	GCC_VERSION < 2008.

From-SVN: r33733
2000-05-06 20:00:03 +00:00
Kaveh R. Ghazi a85a47fbf4 demangle.h (demangler_engine): Constify.
include:
	* demangle.h (demangler_engine): Constify.

libiberty:
	* cplus-dem.c (cplus_demangle_opname, demangle_function_name):
	Cast the arguments to `islower' to `unsigned char'.
	(print_demangler_list): Prototype.

From-SVN: r33679
2000-05-04 18:21:03 +00:00
Philippe De Muyter 4aef973c2e sort.h (sys/types.h): File included unconditionnaly.
* sort.h (sys/types.h): File included unconditionnaly.
	(stddef.h): File include only #ifdef __STDC__.

	* sort.c (UCHAR_MAX): Provide fallback definition.

From-SVN: r33670
2000-05-04 15:40:25 +00:00
Zack Weinberg 12cf91fef0 cpphash.h (U): New define, to correct type of string constants.
gcc:
	* cpphash.h (U): New define, to correct type of string constants.
	(ustrcmp, ustrncmp, ustrlen, uxstrdup, ustrchr): New wrapper
	routines, to do casts when passing unsigned strings to libc.
	* cppexp.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c: Use them.

	* cppfiles.c (_cpp_execute_include): Make filename an U_CHAR *.
	* cpphash.c (_cpp_quote_string): Make string an U_CHAR *.
	* cppinit.c (dump_special_to_buffer): Make macro name an U_CHAR *.
	* cpplex.c (parse_ifdef, parse_include, validate_else): Make
	second argument an U_CHAR *.

	* cppinit.c (builtin_array): Make name and value U_CHAR *, add
	length field, clean up initializer.
	(ISTABLE): Add __extension__ to designated-
	initializers version.
	* cpplex.c (CHARTAB): Likewise.

	* mbchar.c: Add dummy external declaration to the !MULTIBYTE_CHARS
	case so the file won't be empty.

include:
	* symcat.h: Remove #endif label.

From-SVN: r33657
2000-05-04 04:38:01 +00:00
Kenneth Block 24eaa47a46 * libiberty/cplus-dem.c
(libiberty_demanglers): new table for demangle styles
        (cplus_demangle_set_style): New function for setting style
        (cplus_demangle_name_to_style): New function to translate name
        * include/demangle.h
        (libiberty_demanglers): new table for different styles
        (cplus_demangle_set_style): New function for setting style
        (cplus_demangle_name_to_style): New function to translate name

Co-Authored-By: Jason Merrill <jason@casey.cygnus.com>

From-SVN: r33525
2000-04-28 18:22:22 -04:00
Mark Mitchell 18a94a2f75 hashtab.h (hash_pointer): Declare.
* hashtab.h (hash_pointer): Declare.
	(eq_pointer): Likewise.

	* hashtab.c (hash_pointer): New function.
	(eq_pointer): Likewise.
	(htab_hash_pointer): New variable.
	(htab_eq_pointer): Likewise.

From-SVN: r33372
2000-04-24 07:29:11 +00:00
Mark Mitchell 9380267cde * sort.h: New file.
From-SVN: r33365
2000-04-24 00:51:36 +00:00
Richard Kenner e38992e8d3 conflict.c (conflict_graph_add): Pass enum type to htab_find_slot.
* gcc/conflict.c (conflict_graph_add): Pass enum type to
	htab_find_slot.
	* gcc/cpperror.c (hashtab.h): Now include.
	* gcc/cppexp.c (hashtab.h): Likewise.
	* gcc/cpplex.c (hashtab.h): Likewise.
	* gcc/cppfiles.c (hashtab.h): Likewise.
	(find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type
	to htab_find_slot_with_hash.
	* gcc/cpphash.c (hashtab.h): Now include.
	(_cpp_lookup_slot): INSERT is now enum insert_option.
	* gcc/cpphash.h (_cpp_lookup_slot): Likewise.
	* gcc/cppinit.c (hashtab.h): Include earlier.
	(initialize_builtins): Pass enum to htab_find_slot.
	* gcc/cpplib.c (hashtab.h): Now include.
	(do_define, do_undef): Pass enum type to _cpp_lookup_slot.
	(do_pragma_poison, do_assert): Likewise.
	* gcc/emit-rtl.c (gen_rtx_CONST_INT): Pass enum to
	htab_find_slot_with_hash.
	* gcc/simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise.
	* gcc/tree.c (type_hash_add): Likewise.
	(build1): Minor cleanup.
	* include/hashtab.h (enum insert_option): New type.
	(htab_find_slot, htab_find_slot_with_hash): Use it.
	* libiberty/hashtab.c: Various minor cleanups.
	(htab_find_slot_with_hash): INSERT is now enum insert_option.
	(htab_find_slot): Likewise.

From-SVN: r33236
2000-04-18 16:42:00 -04:00
Kaveh R. Ghazi 130bfbdd7a symcat.h: Honor autoconf macro HAVE_STRINGIZE.
* symcat.h: Honor autoconf macro HAVE_STRINGIZE.  Add
        comments/caveats with regard to traditional C behavior.

From-SVN: r33209
2000-04-17 14:48:13 +00:00
Richard Henderson aa5a5f0272 * splay-tree.h (splay_tree_remove): Declare.
From-SVN: r32948
2000-04-05 17:12:41 -07:00
Mark Mitchell b13eb66b7d hashtab.h (hashval_t): New type.
* hashtab.h (hashval_t): New type.
	(htab_find_with_hash): Use it as an argument.
	(htab_find_slot_with_hash): Likewise.

	* hashtab.c (find_empty_slot_for_expand): Use hashval_t for hash
	codes.
	(htab_find_with_hash): Likewise.
	(htab_find_slot_with_hash): Likewise.

From-SVN: r32842
2000-03-31 07:04:37 +00:00
Bernd Schmidt 8c5d513f17 Some cleanups/additions for hashtables
From-SVN: r32536
2000-03-14 18:28:45 +00:00
Alex Samuel d9d4fb433e Changes in include:
* partition.h: New file.

Changes in libiberty:

	* Makefile.in (CFILES): Add partition.c.
	(REQUIRED_OFILES): Add partition.o.
	(partition.o): New rule.
	* partition.c: New file.

Changes in gcc:

	* Makefile.in (ssa.o): New rule.
	(OBJS): Add ssa.o.
	(STAGESTUFF): Add *.ssa and *.ussa.
	(mostlyclean): Delete *.ssa, *.ussa, */*.ssa, */*.ussa.
	* rtl.def (PHI): New RTL expression.
	* rtl.h (clear_log_links): New declaration.
	(convert_to_ssa): Likewise.
	(convert_from_ssa): Likewise.
	* flow.c (split_edge): If the entry node falls through to the
	split edge's source block, split the entry edge.
	(clear_log_links): New function.
	* toplev.c (ssa_dump): New variable.
	(flag_ssa): Likewise.
	(f_options): Add "ssa".
	(compile_file): Create SSA dump files.
	(rest_of_compilation): Go to and from SSA if enabled.
	(decide_d_option): Handle -de for SSA dump files.
	* ssa.c: New file.

From-SVN: r32465
2000-03-10 08:16:55 +00:00
Zack Weinberg 5dc9cffdfd hashtab.h (struct htab): Add del_f.
* hashtab.h (struct htab): Add del_f.
	(htab_del): New type.
	(htab_create): Add fourth argument.

	* hashtab.c (htab_create): Set del_f.
	(htab_delete, htab_empty, htab_remove_elt, htab_clear_slot):
	Use it.

From-SVN: r32459
2000-03-10 00:00:24 +00:00
Zack Weinberg 5194cf0890 hashtab.c: Remove debugging variables (all_searches, all_collisions, all_expansions).
* hashtab.c: Remove debugging variables (all_searches,
	all_collisions, all_expansions). Delete
	all_hash_table_collisions.
	(create_hash_table, delete_hash_table, empty_hash_table,
	find_hash_table_entry, remove_element_from_hash_table_entry,
	clear_hash_table_slot, traverse_hash_table, hash_table_size,
	hash_table_elements_number, hash_table_collisions): Rename to:
	htab_create, htab_delete, htab_empty, htab_find_slot,
	htab_remove_elt, htab_clear_slot, htab_traverse, htab_size,
	htab_elements, htab_collisions.
	(htab_find): New function, handles common case where you don't
	plan to add or delete an entry.
	(htab_expand): Don't create a whole new table, just a new
	entry vector.
	(htab_find_slot): Simplify logic.

	* hashtab.h (hash_table_t): Rename to htab_t.
	(struct hash_table): Rename to struct htab.  Shorten element
	names.  Reorder elements by size.
	(htab_hash, htab_eq, htab_trav): New typedefs for the callback
	function pointers.
	(hash_table_entry_t): Discard; just use void * for element
	type.

From-SVN: r32437
2000-03-08 23:44:29 +00:00
Hans-Peter Nilsson 2f52c7e641 symcat.h (STRINGX): Change "?" to "s" to stringify argument s.
* symcat.h (STRINGX) [!__STDC__ || ALMOST_STDC]: Change "?" to "s"
	to stringify argument s.

From-SVN: r31159
2000-01-01 17:26:13 +00:00
Mark Mitchell 08230f26ce splay-tree.h (struct splay_tree_node): Rename to ...
* 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.

	* splay-tree.c (splay_tree_new): Use struct splay_tree_node_s
	rather than struct splay_tree_node.
	(splay_tree_insert): Use struct splay_tree_s rather than struct
	splay_tree.

From-SVN: r30790
1999-12-05 18:13:48 +00:00