Commit Graph

9 Commits

Author SHA1 Message Date
Gabriel Dos Reis 6da879de22 md5.h: Remove definition and uses of __P.
include/
2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	* md5.h: Remove definition and uses of __P.
	* dyn-string.h: Remove uses of PARAMS.
	* fibheap.h: Likewise.
	* floatformat.h: Likewise.
	* hashtab.h: Likewise.

libiberty/

2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>

	Convert libiberty to use ISO C prototype style 4/n.
	* hashtab.c (higher_prime_index, hash_pointer, eq_pointer,
	htab_size, htab_elements, htab_mod_1, htab_mod, htab_mod_m2,
	htab_create_alloc, htab_set_functions_ex, htab_create,
	htab_try_create, htab_delete, htab_empty,
	find_empty_slot_for_expand, htab_expand, htab_find_with_hash,
	htab_find, htab_find_slot_with_hash, htab_find_slot,
	htab_remove_elt, htab_remove_elt_with_hash, htab_clear_slot,
	htab_traverse_noresize, htab_traverse, htab_collisions,
	htab_hash_string, iterative_hash): Use ISO C prototype.
	* hex.c (hex_init): Likewise.
	* index.c (index): Likewise.
	* insque.c (insque, remque): Likewise.
	* lbasename.c (lbasename): Likewise.
	* lrealpath.c (lrealpath): Likewise.
	* make-relative-prefix.c (save_string, split_directories,
	free_split_directories, make_relative_prefix): Likewise.
	* make-temp-file.c (try, choose_tmpdir, make_temp_file): Likewise.
	* md5.c (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
	md5_buffer, md5_process_bytes, md5_process_block): Likewise.
	* memchr.c (memchr): Likewise.
	* memcpy.c (memcpy): Likewise.
	* memmove.c (memmove): Likewise.
	* gettimeofday.c (gettimeofday): Likewise.
	* getruntime.c (get_run_time): Likewise.
	* getpwd.c (getpwd, getpwd): Likewise.
	* getpagesize.c (getpagesize): Likewise.
	* getopt1.c (getopt_long, getopt_long_only, main): Likewise.
	* getopt.c (my_index, exchange, _getopt_initialize,
	_getopt_internal, getopt, main): Likewise.
	* getcwd.c (getcwd): Likewise.
	* fnmatch.c (fnmatch): Likewise.
	* floatformat.c (floatformat_always_valid,
	floatformat_i387_ext_is_valid, get_field, floatformat_to_double,
	put_field, floatformat_from_double, floatformat_is_valid,
	ieee_test, main): Likewise.
	* fibheap.c (fibheap_new, fibnode_new, fibheap_compare,
	fibheap_comp_data, fibheap_insert, fibheap_min, fibheap_min_key,
	fibheap_union, fibheap_extract_min, fibheap_replace_key_data,
	fibheap_replace_key, fibheap_replace_data, fibheap_delete_node,
	fibheap_delete, fibheap_empty, fibheap_extr_min_node,
	fibheap_ins_root, fibheap_rem_root, fibheap_consolidate,
	fibheap_link, fibheap_cut, fibheap_cascading_cut,
	fibnode_insert_after, fibnode_remove): Likewise.
	* ffs.c (ffs): Likewise.
	* fdmatch.c (fdmatch): Likewise.
	* dyn-string.c (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_insert_char,
	dyn_string_append, dyn_string_append_cstr,
	dyn_string_append_char, dyn_string_substring, dyn_string_eq):
	Likewise.

From-SVN: r97113
2005-03-27 15:31:13 +00:00
Ian Lance Taylor 8ad1c80ea8 dyn-string.c: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and the associated #define of...
* dyn-string.c: Remove test of IN_LIBGCC2 and IN_GLIBCPP_V3 and
	the associated #define of RETURN_ON_ALLOCATION_FAILURE.

From-SVN: r78347
2004-02-24 02:32:50 +00:00
Phil Edwards bd7e6f2d20 cp-demangle.c (__cxa_demangle): Also protect with IN_GLIBCPP_V3.
2002-04-01  Phil Edwards  <pme@gcc.gnu.org>

	* 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.

From-SVN: r51708
2002-04-01 21:55:12 +00:00
Mark Mitchell 2b613c6ac3 * dyn-string.c: Add libgcc exception to copyright notice.
From-SVN: r51461
2002-03-27 18:26:18 +00: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
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
Philippe De Muyter 48f3e29b38 cp-demangle.c (stdio.h): File included unconditionaly.
* cp-demangle.c (stdio.h): File included unconditionaly.
	(template_arg_list_new): Parameter list is PARAMS ((void)), not ().
	* dyn-string.c (stdio.h): File included.
	* partition.c (partition_print): No `&' needed to take the address of
	a function.

From-SVN: r34450
2000-06-08 07:29:53 +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