summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorfgsch <fgsch@openbsd.org>2002-05-11 12:59:41 +0000
committerfgsch <fgsch@openbsd.org>2002-05-11 12:59:41 +0000
commit7e6600349f8fe112d7879cb2485afd8c8fec60fc (patch)
tree6357cbff8f86af5eccb9f91f9394c165e769c4ad
parentlibiberty version bundled with binutils 2.11. (diff)
downloadwireguard-openbsd-7e6600349f8fe112d7879cb2485afd8c8fec60fc.tar.xz
wireguard-openbsd-7e6600349f8fe112d7879cb2485afd8c8fec60fc.zip
don't pull these yet.
-rw-r--r--gnu/egcs/libiberty/ChangeLog741
-rw-r--r--gnu/egcs/libiberty/Makefile.in78
-rw-r--r--gnu/egcs/libiberty/argv.c11
-rw-r--r--gnu/egcs/libiberty/basename.c4
-rw-r--r--gnu/egcs/libiberty/config.in52
-rw-r--r--gnu/egcs/libiberty/configure.in98
-rw-r--r--gnu/egcs/libiberty/floatformat.c41
-rw-r--r--gnu/egcs/libiberty/fnmatch.c10
-rw-r--r--gnu/egcs/libiberty/getcwd.c6
-rw-r--r--gnu/egcs/libiberty/getruntime.c14
-rw-r--r--gnu/egcs/libiberty/memcmp.c4
-rw-r--r--gnu/egcs/libiberty/mkstemps.c3
-rw-r--r--gnu/egcs/libiberty/objalloc.c7
-rw-r--r--gnu/egcs/libiberty/partition.c12
-rw-r--r--gnu/egcs/libiberty/rename.c6
-rw-r--r--gnu/egcs/libiberty/setenv.c14
-rw-r--r--gnu/egcs/libiberty/sigsetmask.c2
-rw-r--r--gnu/egcs/libiberty/splay-tree.c115
-rw-r--r--gnu/egcs/libiberty/strerror.c19
-rw-r--r--gnu/egcs/libiberty/strsignal.c19
-rw-r--r--gnu/egcs/libiberty/strtod.c13
-rw-r--r--gnu/egcs/libiberty/strtol.c23
-rw-r--r--gnu/egcs/libiberty/strtoul.c21
-rw-r--r--gnu/egcs/libiberty/testsuite/demangle-expected80
-rw-r--r--gnu/egcs/libiberty/testsuite/regress-demangle2
-rw-r--r--gnu/egcs/libiberty/vasprintf.c54
-rw-r--r--gnu/egcs/libiberty/vfork.c4
-rw-r--r--gnu/egcs/libiberty/waitpid.c7
-rw-r--r--gnu/egcs/libiberty/xexit.c9
-rw-r--r--gnu/egcs/libiberty/xmalloc.c97
-rw-r--r--gnu/egcs/libiberty/xmemdup.c3
31 files changed, 275 insertions, 1294 deletions
diff --git a/gnu/egcs/libiberty/ChangeLog b/gnu/egcs/libiberty/ChangeLog
index dc1ef098304..c858409d301 100644
--- a/gnu/egcs/libiberty/ChangeLog
+++ b/gnu/egcs/libiberty/ChangeLog
@@ -1,740 +1,3 @@
-2000-12-29 DJ Delorie <dj@redhat.com>
-
- * fnmatch.c: Make the note about the origins of this file more
- accurate, at least until we can sync with glibc.
- * getopt.c: Ditto.
- * getopt1.c: Ditto.
- * md5.c: Ditto.
- * obstack.c: Ditto.
-
-2000-12-26 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * bsearch.c: New file.
- * configure.in (funcs): Add bsearch.
- (AC_CHECK_FUNCS): Likewise.
- * configure, config.in: Regenerate.
-
-2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * safe-ctype.c: #include "ansidecl.h".
- * strtod.c: Likewise.
-
-2000-12-13 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * strtoul.c: Include safe-ctype.h, not ctype.h.
-
-2000-12-07 Zack Weinberg <zack@wolery.stanford.edu>
-
- * 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).
-
-2000-12-07 Mike Stump <mrs@wrs.com>
-
- * Makefile.in (distclean): When cleaning, remove testsuite.
-
-2000-12-05 Jason Merrill <jason@redhat.com>
-
- * cp-demangle.c (cplus_demangle_v3): Check that it's a v3 mangled
- name before allocating the dyn_string.
-
-2000-12-04 Jason Merrill <jason@redhat.com>
-
- * cp-demangle.c: s/new_abi/v3/.
- * cplus-dem.c: Likewise.
- (current_demangling_style): Now auto_demangling.
- (cplus_demangle): Try v3 demangling if AUTO_DEMANGLING.
- (main): Use standard symbol chars for auto_demangling.
-
-2000-11-26 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.c (higher_prime_number): Use a table, rather than a
- seive, to find the next prime.
-
-2000-11-22 H.J. Lu <hjl@gnu.org>
-
- * cplus-dem.c (main): Handle gnat_demangling.
-
-2000-11-22 Zack Weinberg <zack@wolery.stanford.edu>
-
- * 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.
-
-2000-11-21 Hans-Peter Nilsson <hp@bitrange.com>
-
- * cplus-dem.c (cplus_demangle): Fix formatting.
- (grow_vect): Ditto.
- (ada_demangle): Ditto.
- (internal_cplus_demangle): Ditto.
- (mop_up): Ditto.
-
-2000-11-21 H.J. Lu <hjl@gnu.org>
-
- * cplus-dem.c (main): Handle java_demangling.
-
-2000-11-19 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * cplus-dem.c (grow_vect): Prototype.
- (ada_demangle): Cast the arg of ctype macros to unsigned char.
-
-2000-11-15 Hans-Peter Nilsson <hp@bitrange.com>
-
- * cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED for
- parameter `option'.
-
-2000-11-15 Kenneth Block <kenneth.block@compaq.com>
-
- * cplus-dem.c: Eliminate use of DEFUN, it is obsolete and cannot
- be used in GCC.
-
-2000-11-15 Kenneth Block <kenneth.block@compaq.com>
-
- * cplus-dem.c: Add gnat demangler. Add java to demangle style
- list.
-
-2000-11-04 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.c (htab_expand): Change to return int. Use calloc or
- xcalloc depending on htab->return_allocation_failure. Return zero
- if calloc fails.
- (htab_create): Update comment to cover memory allocation.
- (htab_try_create): New.
- (htab_find_slot_with_hash): Return NULL if htab_expand fails.
- Update comment to cover this.
-
-2000-11-03 Hans-Peter Nilsson <hp@bitrange.com>
-
- * hashtab.c: Change void * to PTR where necessary.
- (htab_create, htab_expand): Correct formatting of comment before
- function.
-
-2000-10-22 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (string_list_def): Add caret_position and comments.
- (result_caret_pos): New macro.
- (result_append_string): Rename to...
- (result_add_string): ... this, and insert at caret position.
- Rename throughout.
- (result_append): Rename to...
- (result_add): ... this, and insert at caret position. Rename
- throughout.
- (result_append_char): Rename to...
- (result_add_char): ... this, and insert at caret position. Rename
- throughout.
- (result_append_space): Remove.
- (string_list_new): Initialize caret position.
- (result_add_separated_char): Use caret position.
- (result_get_caret): New funtion.
- (result_set_caret): Likewise.
- (result_shift_caret): Likewise.
- (result_previous_char_is_space): Likewise.
- (substitution_start): Use caret position.
- (substitution_add): Likewise.
- (demangling_new): Initialize caret position.
- (demangle_encoding): Use caret position.
- (demanglin_nested_name): Put CV qualifiers after name.
- (demangle_type_ptr): Use switch statement. Handle pointers to
- arrays. Don't use result_append_space. Use caret position.
- (demangle_type): Emit CV qualifiers after underlying type. Adjust
- call to demangle_array_type.
- (demangle_array_type): Add parameter to handle pointers to arrays.
-
-2000-10-01 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.c (splay_tree_insert): Fix formatting.
-
-2000-09-16 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.c (splay_tree_predecessor): Fix typo in comment.
-
-2000-09-14 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * splay-tree.c: #include <stdio.h>.
-
-2000-09-14 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/demangle-expected: Add two tests for anonymous
- namespaces.
- * cplus-dem.c (gnu_special): Handle anonymous namespaces.
-
-2000-09-10 Mark Mitchell <mark@codesourcery.com>
-
- * splay-tree.c (splay_tree_predecessor): New function.
- (splay_tree_successor): Likewise.
-
-2000-09-10 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/demangle-expected: Add four tests for type_info
- mangling.
- * cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type,
- for a non-template non-qualified type_info function or node.
-
-2000-09-08 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c: Fix copyright banner.
-
-2000-09-07 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * md5.c: #include "ansidecl.h".
-
-2000-09-06 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (status_allocation_failed): Rearrange whitespace.
- (demangle_type): Handle substitution candidates correctly in the
- face of special substitutions.
-
-2000-09-05 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_encoding): Rename variable.
- (demangle_name): Rename parameter. Handle return type
- suppression.
- (demangle_nested_name): Rename parameter.
- (demangle_prefix): Likewise. Change return type suppression.
- (demangle_unqualified_name): Add parameter. Flag constructors and
- conversion operators.
- (demangle_special_name): Fix comment.
- (demangle_type): Rename variable.
- (demangle_bare_function_type): Check for missing return type and
- parameter.
- (demangle_class_enum_type): Rename parameter.
- (demangle_discriminator): Fix misspelling in comment.
-
-2000-08-31 DJ Delorie <dj@redhat.com>
-
- * configure.in (Cygwin): special case cygwin only when we're
- building cygwin, not when we're hosting cygwin.
-
-2000-09-04 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_template_arg): Eat an `E' after an
- <expression>.
-
-2000-09-04 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_type_ptr): Increment position past
- pointer and reference characters.
-
-2000-09-04 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_nv_offset): New function.
- (demangle_v_offset): Likewise.
- (demangle_call_offset): Likewise.
- (demangle_special_name): Update thunk demangling to comply with
- ABI changes.
-
-2000-09-03 Alex Samuel <samuel@codesourcery.com>
-
- * 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.
-
-2000-08-31 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/demangle-expected: Add nine tests for
- underscore-after-number followed by five tests for name-signature
- delimiter.
-
-2000-08-28 Richard Henderson <rth@cygnus.com>
-
- * Makefile.in (md5.o): Depend on config.h.
-
-2000-08-28 Jason Merrill <jason@redhat.com>
-
- * Makefile.in (REQUIRED_OFILES): Add md5.o.
- (CFILES): Add md5.c.
- * md5.c: New file.
-
-2000-08-27 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_name): Initialize template_p in local
- name case. Don't re-add substitutions as candidates.
- (demangle_nested_name): Use <unqualified-name>.
- (demangle_prefix): Likewise. Don't add template names as
- substitution candidates twice, or re-add a substitution or the
- last prefix component.
- (demangle_local_name): Adjust output format.
-
-2000-08-25 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (result_add_separated_char): Change parameter to
- int.
- (substitution_add): Don't check for duplicates. Check if
- previously allocated size is zero.
- (demangle_name): Remove duplicate check for std substitution.
- Clear template flag appropriately.
- (demangle_prefix): Remove argument to demangle_substitution.
- Don't check that template flag is already set.
- (demangle_operator_name): Add pt operator.
- (demangle_type): Don't treat r as built-in type. Remove argument
- to demangle_substitution. Fix substitution candidate mechanics.
- Handle <template-template-parm>s. Improve comments.
- (demangle_template_param): Don't handle template arg lists here.
- (demangle_substitution): Remove parameter.
- (print_usage): Remove extra fprintf option.
-
-2000-08-24 Greg McGary <greg@mcgary.org>
-
- * libiberty/random.c (end_ptr): Revert previous change.
-
-2000-08-24 Greg McGary <greg@mcgary.org>
-
- * libiberty/cplus-dem.c (cplus_demangle_opname, cplus_mangle_opname,
- demangle_expression, demangle_function_name): Use ARRAY_SIZE.
- * libiberty/random.c (end_ptr): Likewise.
-
-2000-08-23 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (result_close_template_list): Remove function.
- (result_add_separated_char): New function.
- (result_open_template_list): New macro.
- (result_close_template_list): Likewise.
- (demangle_prefix): Don't set template_p if the
- prefix ends with a ctor name.
- (demangle_type_ptr): Remove duplicate RETURN_IF_ERROR.
- (demangle_type): Check for template args after substitution.
- (demangle_template_args): Use result_open_template_list.
-
-2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
-
- * pexecute.c: Don't use vfork. Initialize 'pid' before retry loop.
-
-2000-07-26 Dave Pitts <dpitts@cozx.com>
-
- * config/mh-openedition.h: Added -DLE370 definition.
-
-2000-07-26 Mark Elbrecht <snowball3@bigfoot.com>
-
- * pexecute.c (pexecute) [__MSDOS__]: Change __GO32__ to
- __DJGPP__. Use P_WAIT instead of constant in the spawnv* call.
- Cast program to 'char *' in errmsg_arg assignment.
- (PWAIT_ERROR): Define.
- (pwait): Use PWAIT_ERROR. Adjust DJGPP's status code to conform
- to DJGPP's WIF* macros.
-
-2000-07-27 RodneyBrown <RodneyBrown@pmsc.com>
- Jeff Law <law@cygnus.com>
-
- * getcwd.c: Include string.h, stdlib.h for prototypes
-
- * Makefile.in (rename.o, waitpid.o): Depend on config.h
- * rename.c: Include config.h, unistd.h
- * waitpid.c: Include config.h, sys/wait.h
-
-2000-07-24 Hans-Peter Nilsson <hp@axis.com>
-
- * cplus-dem.c (work_stuff_copy_to_from): New.
- (delete_non_B_K_work_stuff): New.
- (delete_work_stuff): New.
- (mop_up): Break out work_stuff partly destruction to
- delete_non_B_K_work_stuff.
- (iterate_demangle_function): New.
- (demangle_prefix): Call iterate_demangle_function instead of
- demangle_function_name. Leave handling of name-signature
- __-delimiters to iterate_demangle_function.
- (demangle_integral_value): Strip an optional
- following underscore cautiously. Handle negative numbers.
-
-2000-07-24 Daniel Berlin <dberlin@redhat.com>
-
- * cplus-dem.c (demangle_signature): Change if (GNU_DEMANGLING) to
- if (AUTO_DEMANGLING || GNU_DEMANGLING)
-
-2000-07-21 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_ctor_dtor_name): Remove not-in-charge
- allocating ctor mangling.
- (demangle_array_type): Handle empty and non-constant array length.
-
-2000-07-23 Michael Sokolov <msokolov@ivan.Harhan.ORG>
- Jeff Law <law@cygnus.com>
-
- * configure.in (AC_CHECK_HEADERS): Add time.h.
- (AC_HEADER_TIME): Add check.
- * configure, config.in: Regenerate.
- * getruntime.c: Portably #include <sys/time.h> and/or <time.h>.
-
- * configure.in (AC_CHECK_HEADERS): Add limits.h.
- * configure, config.in: Regenerate.
- * sort.c: Portably #include <limits.h> and/or <sys/param.h>.
- * strtol.c, strtoul.c: #include "config.h". Portably #include
- <limits.h> and/or <sys/param.h>.
- * Makefile.in (strtol.o, strtoul.o): Update dependencies.
-
- * aclocal.m4 (libiberty_AC_DECLARE_ERRNO): New macro.
- * configure.in (libiberty_AC_DECLARE_ERRNO): Add check.
- * configure, config.in: Regenerate.
- * pexecute.c, strtol.c, strtoul.c: Declare errno if necessary.
-
- * cp-demangle.c, mkstemps.c: #include <sys/types.h>.
-
-2000-07-21 Mike Stump <mrs@wrs.com>
-
- * Makefile.in (xexit.o): Add dependency for config.h in xexit.c.
- * (vasprintf.o): Add dependency for config.h in vasprintf.c.
-
-2000-07-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * cp-demangle.c (cp_demangle_type): Wrap in IN_LIBGCC2.
-
- * setenv.c (setenv): Initialize variable `ep'.
-
- * sigsetmask.c (abort): Prototype.
-
- * vasprintf.c: Include config.h. Check ANSI_PROTOTYPES, not
- __STDC__ for stdarg.h include.
- (int_vasprintf): Prototype.
- (checkit): Prototype. Use VPARAMS/ANSI_PROTOTYPES/VA_START in
- definition. Cast `global_total_width' in comparison.
- (main): Prototype. Return a value.
-
- * vfork.c (fork): Prototype.
-
- * xexit.c: Include config.h.
-
-2000-07-20 Joseph S. Myers <jsm28@cam.ac.uk>
-
- * cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int,
- and print it with %u.
-
-2000-07-17 Hans-Peter Nilsson <hp@axis.com>
-
- * testsuite/regress-demangle (failed test): Show result and
- expected output.
-
-2000-07-07 Andrew Haley <aph@cygnus.com>
-
- * cplus-dem.c (main): fflush() after emitting last char before
- waiting for input.
-
-2000-06-28 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_encoding): Accept no substitutions.
- (demangle_name): Handle <substitution> followed by
- <unqualified-template-name>.
- (demangle_type): Follow special substitutions with
- <class-enum-type>
- (demangle_subtitution): Set template_p for special substitutions.
- (main): Fix typos.
-
-2000-06-27 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_special_name): Swap base and derived
- class when demangling construction vtables.
-
-2000-06-21 Alex Samuel <samuel@codesourcery.com>
-
- * 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.
-
-2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
-
- * cp-demangle.c (demangle_operator_name): Add spaces before
- names beginning with a letter: delete, delete[], new, new[],
- sizeof.
- (demangle_special_name): Handle TF <type> and TJ <type>.
-
-Thu Jun 8 18:52:24 2000 Philippe De Muyter <phdm@macqel.be>
-
- * cp-demangle.c (template_arg_list_new): Revert previous PARAMS patch.
-
-Thu Jun 8 09:25:54 2000 Philippe De Muyter <phdm@macqel.be>
-
- * 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.
-
-2000-06-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * 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'.
-
-2000-06-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * Makefile.in (cp-demangle.o): Depend on $(INCDIR)/demangle.h.
-
- * cp-demangle.c: Include demangle.h.
- (template_arg_list_new): DeANSIfy.
- (cp_demangle): Make static and add prototype.
- (operator_code, operators): Constify.
- (demangle_operator_name): Likewise for variables `p1', `p2' and `p'.
-
-2000-06-05 Alex Samuel <samuel@codesourcery.com>
-
- * cp-demangle.c (demangle_prefix): Cast argument to isdigit to
- unsigned char.
- (demangle_unqualified_name): Likewise.
- (demangle_number_literally): Likewise.
- (demangle_type): Likewise.
- (demangle_substitution): Likewise.
- (is_mangled_char): Likewise, for isalnum.
-
-2000-06-04 Alex Samuel <samuel@codesourcery.com>
-
- * 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.
-
-Tue May 30 16:45:25 2000 Andrew Cagney <cagney@b1.cygnus.com>
-
- * floatformat.c: Add name to each floatformat field.
-
-Tue May 30 15:07:52 2000 Jeffrey A Law (law@cygnus.com)
-
- * Makefile.in (objalloc.o): Depend on config.h
-
-2000-05-29 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.c, partition.c, sort.c, xmemdup.c: Include string.h
- if HAVE_STRING_H.
- * pexecute.c, xexit.c: Include stdlib.h if HAVE_STDLIB_H.
- * objalloc.c: Include config.h. Include stdlib.h and don't
- declare malloc or free if HAVE_STDLIB_H.
- * strerror.c, strsignal.c: Include stdlib.h if HAVE_STDLIB_H,
- else declare malloc without prototype. Include string.h if
- HAVE_STRING_H, else declare memset without prototype. Don't
- include stddef.h.
-
-2000-05-23 Mike Stump <mrs@wrs.com>
-
- * Makefile.in (xmalloc.o): Add dependency for config.h, fixes make
- -j3.
-
-2000-05-18 J. David Anglin <dave@hiauly1.hia.nrc.ca>
-
- * xmalloc.c: Include config.h for HAVE_SBRK definition.
-
-2000-05-16 Horst von Brand <vonbrand@sleipnir.valparaiso.cl>
-
- * hashtab.c (hash_pointer): Delete low-order bits which are
- probably zero, also eliminate a warning on alpha.
-
-2000-05-15 David Edelsohn <edelsohn@gnu.org>
-
- * Makefile.in: Change "pic" to depend on $(PICFLAG), not
- on $(enable_shared).
-
-2000-05-10 Jakub Jelinek <jakub@redhat.com>
-
- * config.table: Use mh-sparcpic for sparc*-*-*.
-
-2000-05-08 Nick Clifton <nickc@cygnus.com>
-
- * Makefile.in (CFILES): Add strncmp.c.
- (NEEDED): Add strncmp.
-
-2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * cplus-dem.c (cplus_demangle_opname, demangle_function_name):
- Cast the arguments to `islower' to `unsigned char'.
- (print_demangler_list): Prototype.
-
-Thu May 4 17:14:41 2000 Philippe De Muyter <phdm@macqel.be>
-
- * sort.c (UCHAR_MAX): Provide fallback definition.
-
-2000-04-29 Alexandre Oliva <aoliva@cygnus.com>
-
- * Makefile.in (maintainer-clean-subdir): Fix handling of empty
- SUBDIRS.
-
-2000-04-28 Kenneth Block <block@zk3.dec.com>
- Jason Merrill <jason@casey.cygnus.com>
-
- * 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.
-
-2000-04-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * aclocal.m4: New file with new test libiberty_AC_FUNC_STRNCMP.
-
- * configure.in (AC_CHECK_HEADERS): Add sys/mman.h fcntl.h.
- (libiberty_AC_FUNC_STRNCMP): Invoke.
-
- * strncmp.c: New file.
-
-Thu Apr 27 16:58:43 MET DST 2000 Jan Hubicka <jh@suse.cz>
-
- * hashtab.c (htab_expand): Add prototype.
- (find_empty_slot_for_expand): Likewise.
-
-2000-04-24 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
-
- * hashtab.c (hash_pointer, eq_pointer): Make definition static to
- match prototype.
- (htab_expand): Cast the return value of xcalloc.
-
-2000-04-24 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.c (hash_pointer): New function.
- (eq_pointer): Likewise.
- (htab_hash_pointer): New variable.
- (htab_eq_pointer): Likewise.
-
-2000-04-23 Mark Mitchell <mark@codesourcery.com>
-
- * sort.c (sort_pointers): Fix endianness bugs.
-
- * sort.c: New file.
- * Makefile.in (CFILES): Add sort.c
- (REQUIRED_OFILES): Add sort.o.
- (sort.o): New target.
-
-2000-04-21 Michael Sokolov <msokolov@ivan.Harhan.ORG>
-
- * Makefile.in (*-subdir): Revamp slightly to avoid losing on
- 4.3BSD systems.
-
-Tue Apr 18 16:23:31 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
-
- * hashtab.c: Various minor cleanups.
- (htab_find_slot_with_hash): INSERT is now enum insert_option.
- (htab_find_slot): Likewise.
-
-2000-04-16 Dave Pitts <dpitts@cozx.com>
-
- * cplus-dem.c (cplus_demangle_opname): Changed to use islower.
-
-2000-04-05 Richard Henderson <rth@cygnus.com>
-
- * splay-tree.c (splay_tree_remove): New.
-
-2000-03-30 Mark Mitchell <mark@codesourcery.com>
-
- * hashtab.c (find_empty_slot_for_expand): Use hashval_t for hash
- codes.
- (htab_find_with_hash): Likewise.
- (htab_find_slot_with_hash): Likewise.
-
-2000-03-29 Zack Weinberg <zack@wolery.cumb.org>
-
- * hashtab.c (htab_find_with_hash): Avoid calculating hash2
- unless it will be used. Rearrange loop for better
- optimization.
- (higher_prime_number): Add static prototype.
-
Thu Mar 16 01:33:58 2000 Jeffrey A Law (law@cygnus.com)
* Makefile.in (partition.o): Depend on config.h
@@ -756,7 +19,7 @@ Thu Mar 16 01:33:58 2000 Jeffrey A Law (law@cygnus.com)
(REQUIRED_OFILES): Add partition.o.
(partition.o): New rule.
* partition.c: New file.
-
+
2000-03-09 Zack Weinberg <zack@wolery.cumb.org>
* hashtab.c (htab_create): Set del_f.
@@ -3740,7 +3003,7 @@ Thu Feb 11 22:20:47 1993 Fred Fish (fnf@cygnus.com)
* cplus-dem.c (string_prepends): Used now, remove #if 0.
* cplus-dem.c (demangle_signature): Call demangle_qualified
with prepending.
- * cplus-dem.c (gnu_special): Recognize static data members that
+ * cplus_dem.c (gnu_special): Recognize static data members that
use qualified names.
* cplus-dem.c (demangle_qualified): Accumulate qualifiers in a
temporary buffer and the prepend or append them to the result,
diff --git a/gnu/egcs/libiberty/Makefile.in b/gnu/egcs/libiberty/Makefile.in
index 0eab5a6c141..9aa57f06d4b 100644
--- a/gnu/egcs/libiberty/Makefile.in
+++ b/gnu/egcs/libiberty/Makefile.in
@@ -1,6 +1,6 @@
#
# Makefile
-# Copyright (C) 1990, 91-99, 2000
+# Copyright (C) 1990, 91 - 99, 2000
# Free Software Foundation
#
# This file is part of the libiberty library.
@@ -108,9 +108,8 @@ INCDIR=$(srcdir)/$(MULTISRCTOP)../include
COMPILE.c = $(CC) -c @DEFS@ $(LIBCFLAGS) -I. -I$(INCDIR) $(HDEFINES) @ac_libiberty_warn_cflags@
.c.o:
- if [ x"$(PICFLAG)" != x ]; then \
- $(COMPILE.c) $(PICFLAG) $< -o pic/$@; \
- else true; fi
+ test x"$(enable_shared)" != xyes || \
+ $(COMPILE.c) $(PICFLAG) $< -o pic/$@
$(COMPILE.c) $<
info: info-subdir
@@ -125,28 +124,26 @@ HFILES = alloca-conf.h
# (alphabetical), and add them to REQUIRED_OFILES or funcs in
# configure.in.
CFILES = asprintf.c alloca.c argv.c atexit.c basename.c bcmp.c bcopy.c \
- bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c \
- cp-demangle.c dyn-string.c fdmatch.c fnmatch.c getcwd.c \
- getpwd.c getopt.c getopt1.c getpagesize.c getruntime.c \
- floatformat.c hashtab.c hex.c index.c insque.c md5.c memchr.c \
+ bzero.c calloc.c choose-temp.c clock.c concat.c cplus-dem.c fdmatch.c \
+ fnmatch.c getcwd.c getpwd.c getopt.c getopt1.c getpagesize.c \
+ getruntime.c floatformat.c hashtab.c hex.c index.c insque.c memchr.c \
memcmp.c memcpy.c memmove.c memset.c mkstemps.c objalloc.c obstack.c \
- partition.c pexecute.c putenv.c random.c rename.c rindex.c setenv.c \
- sigsetmask.c safe-ctype.c sort.c spaces.c splay-tree.c strcasecmp.c \
- strncasecmp.c strchr.c strdup.c strerror.c strncmp.c strrchr.c \
- strsignal.c strstr.c strtod.c strtol.c strtoul.c tmpnam.c vasprintf.c \
- vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c xatexit.c xexit.c \
- xmalloc.c xmemdup.c xstrdup.c xstrerror.c
+ partition.c pexecute.c putenv.c random.c rename.c rindex.c \
+ setenv.c sigsetmask.c spaces.c splay-tree.c strcasecmp.c \
+ strncasecmp.c strchr.c strdup.c strerror.c strrchr.c \
+ strsignal.c strstr.c strtod.c strtol.c strtoul.c tmpnam.c \
+ vasprintf.c vfork.c vfprintf.c vprintf.c vsprintf.c waitpid.c \
+ xatexit.c xexit.c xmalloc.c xmemdup.c xstrdup.c xstrerror.c
# These are always included in the library.
-REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o cp-demangle.o \
- dyn-string.o fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o \
- getruntime.o hashtab.o hex.o floatformat.o md5.o objalloc.o obstack.o \
- partition.o pexecute.o safe-ctype.o sort.o spaces.o splay-tree.o \
- strerror.o strsignal.o xatexit.o xexit.o xmalloc.o xmemdup.o \
- xstrdup.o xstrerror.o
+REQUIRED_OFILES = argv.o choose-temp.o concat.o cplus-dem.o \
+ fdmatch.o fnmatch.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o \
+ hex.o floatformat.o objalloc.o obstack.o partition.o pexecute.o spaces.o \
+ splay-tree.o strerror.o strsignal.o xatexit.o xexit.o xmalloc.o \
+ xmemdup.o xstrdup.o xstrerror.o
$(TARGETLIB): $(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
- -rm -f $(TARGETLIB)
+ rm -f $(TARGETLIB)
$(AR) $(AR_FLAGS) $(TARGETLIB) \
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA)
$(RANLIB) $(TARGETLIB)
@@ -170,7 +167,7 @@ install_to_tooldir: all
# to include there. Do not add anything LGPL to this list; libstdc++
# can't use anything encumbering.
NEEDED = atexit calloc memchr memcmp memcpy memmove memset rename strchr \
- strerror strncmp strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
+ strerror strrchr strstr strtol strtoul tmpnam vfprintf vprintf \
vfork waitpid bcmp bcopy bzero
needed-list: Makefile
rm -f needed-list; touch needed-list; \
@@ -188,7 +185,7 @@ required-list: Makefile
echo $(REQUIRED_OFILES) > required-list
stamp-picdir:
- if [ x"$(PICFLAG)" != x ] && [ ! -d pic ]; then \
+ if [ x"$(enable_shared)" = xyes ] && [ ! -d pic ]; then \
mkdir pic; \
else true; fi
touch stamp-picdir
@@ -214,20 +211,19 @@ ls:
# Cleaning has to be done carefully to ensure that we don't clean our SUBDIRS
# multiple times, hence our explicit recursion with an empty SUBDIRS.
mostlyclean: mostlyclean-subdir
- -rm -rf *.o pic core errs \#* *.E a.out
- -rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
- -rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
+ rm -rf *.o pic core errs \#* *.E a.out
+ rm -f needed.awk needed2.awk errors dummy needed-list config.h stamp-*
+ rm -f $(CONFIG_H) $(NEEDED_LIST) stamp-picdir
@$(MULTICLEAN) multi-clean DO=mostlyclean
clean: clean-subdir
$(MAKE) SUBDIRS="" mostlyclean
- -rm -f *.a required-list tmpmulti.out
+ rm -f *.a required-list tmpmulti.out
@$(MULTICLEAN) multi-clean DO=clean
distclean: distclean-subdir
$(MAKE) SUBDIRS="" clean
@$(MULTICLEAN) multi-clean DO=distclean
- -rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out
- -rm -f config.log
- -rmdir testsuite 2>/dev/null
+ rm -f *~ Makefile config.status xhost-mkfrag TAGS multilib.out
+ rm -f config.log
maintainer-clean realclean: maintainer-clean-subdir
$(MAKE) SUBDIRS="" distclean
@@ -248,10 +244,9 @@ all-subdir check-subdir installcheck-subdir info-subdir \
install-info-subdir clean-info-subdir dvi-subdir install-subdir \
etags-subdir mostlyclean-subdir clean-subdir distclean-subdir \
maintainer-clean-subdir:
- @subdirs='$(SUBDIRS)'; \
- target=`echo $@ | sed -e 's/-subdir//'`; \
- for dir in $$subdirs ; do \
- cd $$dir && $(MAKE) $$target; \
+ @target=`echo $@ | sed -e 's/-subdir//'`; \
+ for dir in . $(SUBDIRS) ; do \
+ test $$dir = . || (cd $$dir && $(MAKE) $$target) || exit 1; \
done
$(REQUIRED_OFILES) $(EXTRA_OFILES) $(LIBOBJS) $(ALLOCA): stamp-picdir
@@ -264,8 +259,6 @@ choose-temp.o: config.h
clock.o: config.h
concat.o: $(INCDIR)/libiberty.h
cplus-dem.o: config.h $(INCDIR)/demangle.h
-cp-demangle.o: config.h $(INCDIR)/dyn-string.h $(INCDIR)/demangle.h
-dyn-string.o: config.h $(INCDIR)/dyn-string.h
fdmatch.o: $(INCDIR)/libiberty.h
fnmatch.o: config.h $(INCDIR)/fnmatch.h
getcwd.o: config.h
@@ -277,26 +270,19 @@ getruntime.o: config.h $(INCDIR)/libiberty.h
hex.o: $(INCDIR)/libiberty.h
floatformat.o: $(INCDIR)/floatformat.h
mkstemps.o: config.h
-md5.o: config.h
-objalloc.o: config.h $(INCDIR)/objalloc.h
+objalloc.o: $(INCDIR)/objalloc.h
obstack.o: config.h $(INCDIR)/obstack.h
partition.o: config.h $(INCDIR)/partition.h
pexecute.o: config.h $(INCDIR)/libiberty.h
-rename.o: config.h
setenv.o: config.h
-sort.o: config.h $(INCDIR)/sort.h $(INCDIR)/ansidecl.h
spaces.o: $(INCDIR)/libiberty.h
splay-tree.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/splay-tree.h $(INCDIR)/ansidecl.h
strerror.o: config.h $(INCDIR)/libiberty.h
strsignal.o: config.h $(INCDIR)/libiberty.h
-strtol.o: config.h
-strtoul.o: config.h
-vasprintf.o: config.h
xatexit.o: $(INCDIR)/libiberty.h
-xexit.o: config.h $(INCDIR)/libiberty.h
-xmalloc.o: config.h $(INCDIR)/libiberty.h
+xexit.o: $(INCDIR)/libiberty.h
+xmalloc.o: $(INCDIR)/libiberty.h
xmemdup.o: config.h $(INCDIR)/libiberty.h
xstrdup.o: config.h $(INCDIR)/libiberty.h
xstrerror.o: config.h $(INCDIR)/libiberty.h
-waitpid.o: config.h
hashtab.o: config.h $(INCDIR)/libiberty.h $(INCDIR)/hashtab.h $(INCDIR)/ansidecl.h
diff --git a/gnu/egcs/libiberty/argv.c b/gnu/egcs/libiberty/argv.c
index 7aec9c04cf1..f596ffd0110 100644
--- a/gnu/egcs/libiberty/argv.c
+++ b/gnu/egcs/libiberty/argv.c
@@ -25,7 +25,10 @@ Boston, MA 02111-1307, USA. */
#include "ansidecl.h"
#include "libiberty.h"
-#define ISBLANK(ch) ((ch) == ' ' || (ch) == '\t')
+#ifdef isspace
+#undef isspace
+#endif
+#define isspace(ch) ((ch) == ' ' || (ch) == '\t')
/* Routines imported from standard C runtime libraries. */
@@ -224,7 +227,7 @@ char *input;
do
{
/* Pick off argv[argc] */
- while (ISBLANK (*input))
+ while (isspace (*input))
{
input++;
}
@@ -257,7 +260,7 @@ char *input;
arg = copybuf;
while (*input != EOS)
{
- if (ISBLANK (*input) && !squote && !dquote && !bsquote)
+ if (isspace (*input) && !squote && !dquote && !bsquote)
{
break;
}
@@ -323,7 +326,7 @@ char *input;
argc++;
argv[argc] = NULL;
- while (ISBLANK (*input))
+ while (isspace (*input))
{
input++;
}
diff --git a/gnu/egcs/libiberty/basename.c b/gnu/egcs/libiberty/basename.c
index ca089ebbc5a..7698f06f8ae 100644
--- a/gnu/egcs/libiberty/basename.c
+++ b/gnu/egcs/libiberty/basename.c
@@ -20,7 +20,7 @@ BUGS
#include "ansidecl.h"
#include "libiberty.h"
-#include "safe-ctype.h"
+#include <ctype.h>
#ifndef DIR_SEPARATOR
#define DIR_SEPARATOR '/'
@@ -50,7 +50,7 @@ basename (name)
#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
/* Skip over the disk name in MSDOS pathnames. */
- if (ISALPHA (name[0]) && name[1] == ':')
+ if (isalpha (name[0]) && name[1] == ':')
name += 2;
#endif
diff --git a/gnu/egcs/libiberty/config.in b/gnu/egcs/libiberty/config.in
index 1fb946afccd..6e64208da92 100644
--- a/gnu/egcs/libiberty/config.in
+++ b/gnu/egcs/libiberty/config.in
@@ -3,9 +3,6 @@
/* Define if using alloca.c. */
#undef C_ALLOCA
-/* Define to empty if the keyword does not work. */
-#undef const
-
/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
This function is required for alloca.c support on those systems. */
#undef CRAY_STACKSEG_END
@@ -16,18 +13,12 @@
/* Define if you have <alloca.h> and it should be used (not on Ultrix). */
#undef HAVE_ALLOCA_H
-/* Define if you have a working `mmap' system call. */
-#undef HAVE_MMAP
-
/* Define if you have <sys/wait.h> that is POSIX.1 compatible. */
#undef HAVE_SYS_WAIT_H
/* Define if you have <vfork.h>. */
#undef HAVE_VFORK_H
-/* Define as __inline if that's what the C compiler calls it. */
-#undef inline
-
/* Define to `int' if <sys/types.h> doesn't define. */
#undef pid_t
@@ -46,12 +37,21 @@
/* Define if you have the ANSI C header files. */
#undef STDC_HEADERS
-/* Define if you can safely include both <sys/time.h> and <time.h>. */
-#undef TIME_WITH_SYS_TIME
-
/* Define vfork as fork if vfork does not work. */
#undef vfork
+/* Define if you have the sys_errlist variable. */
+#undef HAVE_SYS_ERRLIST
+
+/* Define if you have the sys_nerr variable. */
+#undef HAVE_SYS_NERR
+
+/* Define if you have the sys_siglist variable. */
+#undef HAVE_SYS_SIGLIST
+
+/* Define if you have the strerror function. */
+#undef HAVE_STRERROR
+
/* Define if you have the asprintf function. */
#undef HAVE_ASPRINTF
@@ -67,9 +67,6 @@
/* Define if you have the bcopy function. */
#undef HAVE_BCOPY
-/* Define if you have the bsearch function. */
-#undef HAVE_BSEARCH
-
/* Define if you have the bzero function. */
#undef HAVE_BZERO
@@ -199,12 +196,6 @@
/* Define if you have the waitpid function. */
#undef HAVE_WAITPID
-/* Define if you have the <fcntl.h> header file. */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <limits.h> header file. */
-#undef HAVE_LIMITS_H
-
/* Define if you have the <stdlib.h> header file. */
#undef HAVE_STDLIB_H
@@ -217,9 +208,6 @@
/* Define if you have the <sys/file.h> header file. */
#undef HAVE_SYS_FILE_H
-/* Define if you have the <sys/mman.h> header file. */
-#undef HAVE_SYS_MMAN_H
-
/* Define if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
@@ -232,21 +220,5 @@
/* Define if you have the <sys/time.h> header file. */
#undef HAVE_SYS_TIME_H
-/* Define if you have the <time.h> header file. */
-#undef HAVE_TIME_H
-
/* Define if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
-
-/* Define if errno must be declared even when <errno.h> is included. */
-#undef NEED_DECLARATION_ERRNO
-
-/* Define if you have the sys_errlist variable. */
-#undef HAVE_SYS_ERRLIST
-
-/* Define if you have the sys_nerr variable. */
-#undef HAVE_SYS_NERR
-
-/* Define if you have the sys_siglist variable. */
-#undef HAVE_SYS_SIGLIST
-
diff --git a/gnu/egcs/libiberty/configure.in b/gnu/egcs/libiberty/configure.in
index af80e0dd2d2..cc1b2c2082b 100644
--- a/gnu/egcs/libiberty/configure.in
+++ b/gnu/egcs/libiberty/configure.in
@@ -36,11 +36,51 @@ dnl to call AC_CHECK_PROG.
AC_CHECK_TOOL(AR, ar)
AC_CHECK_TOOL(RANLIB, ranlib, :)
+# FIXME: We temporarily define our own version of AC_PROG_CC. This is
+# copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS. We
+# are probably using a cross compiler, which will not be able to fully
+# link an executable. This should really be fixed in autoconf
+# itself.
+
+AC_DEFUN(LIB_AC_PROG_CC,
+[AC_BEFORE([$0], [AC_PROG_CPP])dnl
+AC_PROVIDE([AC_PROG_CC])
+AC_CHECK_PROG(CC, gcc, gcc)
+if test -z "$CC"; then
+ AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+ test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+fi
+
+AC_PROG_CC_GNU
+
+if test $ac_cv_prog_gcc = yes; then
+ GCC=yes
+ ac_libiberty_warn_cflags='-W -Wall -Wtraditional'
+dnl Check whether -g works, even if CFLAGS is set, in case the package
+dnl plays around with CFLAGS (such as to build both debugging and
+dnl normal versions of a library), tasteless as that idea is.
+ ac_test_CFLAGS="${CFLAGS+set}"
+ ac_save_CFLAGS="$CFLAGS"
+ CFLAGS=
+ AC_PROG_CC_G
+ if test "$ac_test_CFLAGS" = set; then
+ CFLAGS="$ac_save_CFLAGS"
+ elif test $ac_cv_prog_cc_g = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-O2"
+ fi
+else
+ GCC=
+ ac_libiberty_warn_cflags=
+ test "${CFLAGS+set}" = set || CFLAGS="-g"
+fi
+])
+AC_SUBST(ac_libiberty_warn_cflags)
+
LIB_AC_PROG_CC
AC_ISC_POSIX
-AC_C_CONST
-AC_C_INLINE
dnl When we start using libtool:
dnl Default to a non shared library. This may be overridden by the
@@ -69,11 +109,8 @@ AC_SUBST_FILE(host_makefile_frag)
# It's OK to check for header files. Although the compiler may not be
# able to link anything, it had better be able to at least compile
# something.
-AC_CHECK_HEADERS(sys/file.h sys/param.h limits.h stdlib.h string.h unistd.h strings.h sys/time.h time.h sys/resource.h sys/stat.h sys/mman.h fcntl.h)
+AC_CHECK_HEADERS(sys/file.h sys/param.h stdlib.h string.h unistd.h strings.h sys/time.h sys/resource.h sys/stat.h)
AC_HEADER_SYS_WAIT
-AC_HEADER_TIME
-
-libiberty_AC_DECLARE_ERRNO
# This is the list of functions which libiberty will provide if they
# are not available on the host.
@@ -83,7 +120,6 @@ funcs="$funcs atexit"
funcs="$funcs basename"
funcs="$funcs bcmp"
funcs="$funcs bcopy"
-funcs="$funcs bsearch"
funcs="$funcs bzero"
funcs="$funcs calloc"
funcs="$funcs clock"
@@ -128,16 +164,16 @@ checkfuncs="getrusage on_exit psignal strerror strsignal sysconf times sbrk gett
# These are neither executed nor required, but they help keep
# autoheader happy without adding a bunch of text to acconfig.h.
if test "x" = "y"; then
- AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bsearch bzero calloc clock)
- AC_CHECK_FUNCS(getcwd getpagesize index insque mkstemps memchr memcmp memcpy)
- AC_CHECK_FUNCS(memmove memset putenv random rename rindex sigsetmask)
- AC_CHECK_FUNCS(strcasecmp setenv strchr strdup strncasecmp strrchr strstr)
- AC_CHECK_FUNCS(strtod strtol strtoul tmpnam vasprintf vfprintf vprintf)
- AC_CHECK_FUNCS(vsprintf waitpid getrusage on_exit psignal strerror strsignal)
- AC_CHECK_FUNCS(sysconf times sbrk gettimeofday)
- AC_DEFINE(HAVE_SYS_ERRLIST, 1, [Define if you have the sys_errlist variable.])
- AC_DEFINE(HAVE_SYS_NERR, 1, [Define if you have the sys_nerr variable.])
- AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define if you have the sys_siglist variable.])
+ AC_CHECK_FUNCS(asprintf atexit basename bcmp bcopy bzero calloc clock getcwd)
+ AC_CHECK_FUNCS(getpagesize index insque mkstemps memchr memcmp memcpy memmove)
+ AC_CHECK_FUNCS(memset putenv random rename rindex sigsetmask strcasecmp)
+ AC_CHECK_FUNCS(setenv strchr strdup strncasecmp strrchr strstr strtod strtol)
+ AC_CHECK_FUNCS(strtoul tmpnam vasprintf vfprintf vprintf vsprintf waitpid)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
+ AC_DEFINE(HAVE_SYS_NERR)
+ AC_DEFINE(HAVE_SYS_SIGLIST)
+ AC_CHECK_FUNCS(getrusage on_exit psignal strerror strsignal sysconf times)
+ AC_CHECK_FUNCS(sbrk gettimeofday)
fi
# For each of these functions, if the host does not provide the
@@ -176,7 +212,7 @@ if test -n "${with_target_subdir}"; then
# dont have to check them here.
# Of the functions in $checkfuncs, newlib only has strerror.
- AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR)
+ AC_DEFINE(HAVE_STRERROR)
setobjs=yes
@@ -217,7 +253,7 @@ if test -z "${setobjs}"; then
# don't have to check them here.
# Of the functions in $checkfuncs, VxWorks only has strerror.
- AC_DEFINE_NOAUTOHEADER(HAVE_STRERROR)
+ AC_DEFINE(HAVE_STRERROR)
setobjs=yes
;;
@@ -241,22 +277,18 @@ if test -z "${setobjs}"; then
# provides from our shell variables, so that they appear to be
# missing.
- # DJ - only if we're *building* cygwin, not just building *with* cygwin
-
- if test -n "${with_target_subdir}"
- then
- funcs="`echo $funcs | sed -e 's/random//'`"
- LIBOBJS="$LIBOBJS random.o"
- vars="`echo $vars | sed -e 's/sys_siglist//'`"
- checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
- fi
+ funcs="`echo $funcs | sed -e 's/random//'`"
+ LIBOBJS="$LIBOBJS random.o"
+ vars="`echo $vars | sed -e 's/sys_siglist//'`"
+ checkfuncs="`echo $checkfuncs | sed -e 's/strsignal//' -e 's/psignal//'`"
;;
*-*-mingw32*)
# Under mingw32, sys_nerr and sys_errlist exist, but they are
# macros, so the test below won't find them.
- libiberty_cv_var_sys_nerr=yes
- libiberty_cv_var_sys_errlist=yes
+ vars="`echo $vars | sed -e 's/sys_nerr//' -e 's/sys_errlist//'`"
+ AC_DEFINE(HAVE_SYS_NERR)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
;;
*-*-uwin*)
@@ -267,8 +299,8 @@ if test -z "${setobjs}"; then
# Under uwin 2.0+, sys_nerr and sys_errlist exist, but they are
# macros (actually, these are imported from a DLL, but the end effect
# is the same), so the test below won't find them.
- libiberty_cv_var_sys_nerr=yes
- libiberty_cv_var_sys_errlist=yes
+ AC_DEFINE(HAVE_SYS_NERR)
+ AC_DEFINE(HAVE_SYS_ERRLIST)
;;
esac
@@ -320,8 +352,6 @@ EOF
AC_CHECK_FUNCS($checkfuncs)
fi
-libiberty_AC_FUNC_STRNCMP
-
# Install a library built with a cross compiler in $(tooldir) rather
# than $(libdir).
if test -z "${with_cross_host}"; then
diff --git a/gnu/egcs/libiberty/floatformat.c b/gnu/egcs/libiberty/floatformat.c
index 3cb78f51dde..1d8f16df353 100644
--- a/gnu/egcs/libiberty/floatformat.c
+++ b/gnu/egcs/libiberty/floatformat.c
@@ -1,5 +1,5 @@
/* IEEE floating point support routines, for GDB, the GNU Debugger.
- Copyright (C) 1991, 1994, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1991, 1994, 1999 Free Software Foundation, Inc.
This file is part of GDB.
@@ -36,27 +36,19 @@ extern char *memset ();
/* floatformats for IEEE single and double, big and little endian. */
const struct floatformat floatformat_ieee_single_big =
{
- floatformat_big, 32, 0, 1, 8, 127, 255, 9, 23,
- floatformat_intbit_no,
- "floatformat_ieee_single_big"
+ floatformat_big, 32, 0, 1, 8, 127, 255, 9, 23, floatformat_intbit_no
};
const struct floatformat floatformat_ieee_single_little =
{
- floatformat_little, 32, 0, 1, 8, 127, 255, 9, 23,
- floatformat_intbit_no,
- "floatformat_ieee_single_little"
+ floatformat_little, 32, 0, 1, 8, 127, 255, 9, 23, floatformat_intbit_no
};
const struct floatformat floatformat_ieee_double_big =
{
- floatformat_big, 64, 0, 1, 11, 1023, 2047, 12, 52,
- floatformat_intbit_no,
- "floatformat_ieee_double_big"
+ floatformat_big, 64, 0, 1, 11, 1023, 2047, 12, 52, floatformat_intbit_no
};
const struct floatformat floatformat_ieee_double_little =
{
- floatformat_little, 64, 0, 1, 11, 1023, 2047, 12, 52,
- floatformat_intbit_no,
- "floatformat_ieee_double_little"
+ floatformat_little, 64, 0, 1, 11, 1023, 2047, 12, 52, floatformat_intbit_no
};
/* floatformat for IEEE double, little endian byte order, with big endian word
@@ -64,30 +56,24 @@ const struct floatformat floatformat_ieee_double_little =
const struct floatformat floatformat_ieee_double_littlebyte_bigword =
{
- floatformat_littlebyte_bigword, 64, 0, 1, 11, 1023, 2047, 12, 52,
- floatformat_intbit_no,
- "floatformat_ieee_double_little"
+ floatformat_littlebyte_bigword, 64, 0, 1, 11, 1023, 2047, 12, 52, floatformat_intbit_no
};
const struct floatformat floatformat_i387_ext =
{
floatformat_little, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
- floatformat_intbit_yes,
- "floatformat_i387_ext"
+ floatformat_intbit_yes
};
const struct floatformat floatformat_m68881_ext =
{
/* Note that the bits from 16 to 31 are unused. */
- floatformat_big, 96, 0, 1, 15, 0x3fff, 0x7fff, 32, 64,
- floatformat_intbit_yes,
- "floatformat_m68881_ext"
+ floatformat_big, 96, 0, 1, 15, 0x3fff, 0x7fff, 32, 64, floatformat_intbit_yes
};
const struct floatformat floatformat_i960_ext =
{
/* Note that the bits from 0 to 15 are unused. */
floatformat_little, 96, 16, 17, 15, 0x3fff, 0x7fff, 32, 64,
- floatformat_intbit_yes,
- "floatformat_i960_ext"
+ floatformat_intbit_yes
};
const struct floatformat floatformat_m88110_ext =
{
@@ -95,20 +81,17 @@ const struct floatformat floatformat_m88110_ext =
/* Harris uses raw format 128 bytes long, but the number is just an ieee
double, and the last 64 bits are wasted. */
floatformat_big,128, 0, 1, 11, 0x3ff, 0x7ff, 12, 52,
- floatformat_intbit_no,
- "floatformat_m88110_ext(harris)"
+ floatformat_intbit_no
#else
floatformat_big, 80, 0, 1, 15, 0x3fff, 0x7fff, 16, 64,
- floatformat_intbit_yes,
- "floatformat_m88110_ext"
+ floatformat_intbit_yes
#endif /* HARRIS_FLOAT_FORMAT */
};
const struct floatformat floatformat_arm_ext =
{
/* Bits 1 to 16 are unused. */
floatformat_big, 96, 0, 17, 15, 0x3fff, 0x7fff, 32, 64,
- floatformat_intbit_yes,
- "floatformat_arm_ext"
+ floatformat_intbit_yes
};
static unsigned long get_field PARAMS ((unsigned char *,
diff --git a/gnu/egcs/libiberty/fnmatch.c b/gnu/egcs/libiberty/fnmatch.c
index eb898ee14d8..0a9bfe6152b 100644
--- a/gnu/egcs/libiberty/fnmatch.c
+++ b/gnu/egcs/libiberty/fnmatch.c
@@ -1,7 +1,7 @@
/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-NOTE: This source is derived from an old version taken from the GNU C
-Library (glibc).
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
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
@@ -45,7 +45,8 @@ Boston, MA 02111-1307, USA. */
#include <errno.h>
#include <fnmatch.h>
-#include <safe-ctype.h>
+#include <ctype.h>
+
/* Comment out all this code if we are using the GNU C Library, and are not
actually compiling the library itself. This code is part of the GNU C
@@ -73,7 +74,8 @@ fnmatch (pattern, string, flags)
register const char *p = pattern, *n = string;
register unsigned char c;
-#define FOLD(c) ((flags & FNM_CASEFOLD) ? TOLOWER (c) : (c))
+/* Note that this evalutes C many times. */
+#define FOLD(c) ((flags & FNM_CASEFOLD) && isupper (c) ? tolower (c) : (c))
while ((c = *p++) != '\0')
{
diff --git a/gnu/egcs/libiberty/getcwd.c b/gnu/egcs/libiberty/getcwd.c
index 344556392b3..47b1c1eec31 100644
--- a/gnu/egcs/libiberty/getcwd.c
+++ b/gnu/egcs/libiberty/getcwd.c
@@ -29,12 +29,6 @@ BUGS
#include <sys/param.h>
#endif
#include <errno.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
extern char *getwd ();
extern int errno;
diff --git a/gnu/egcs/libiberty/getruntime.c b/gnu/egcs/libiberty/getruntime.c
index 4abfa83bf33..b855ea6e82f 100644
--- a/gnu/egcs/libiberty/getruntime.c
+++ b/gnu/egcs/libiberty/getruntime.c
@@ -26,20 +26,10 @@ Boston, MA 02111-1307, USA. */
single way is available for all host systems, nor are there reliable
ways to find out which way is correct for a given host. */
-#ifdef TIME_WITH_SYS_TIME
-# include <sys/time.h>
-# include <time.h>
-#else
-# if HAVE_SYS_TIME_H
-# include <sys/time.h>
-# else
-# ifdef HAVE_TIME_H
-# include <time.h>
-# endif
-# endif
-#endif
+#include <time.h>
#if defined (HAVE_GETRUSAGE) && defined (HAVE_SYS_RESOURCE_H)
+#include <sys/time.h>
#include <sys/resource.h>
#endif
diff --git a/gnu/egcs/libiberty/memcmp.c b/gnu/egcs/libiberty/memcmp.c
index 0fd21cad11e..127ae0c8019 100644
--- a/gnu/egcs/libiberty/memcmp.c
+++ b/gnu/egcs/libiberty/memcmp.c
@@ -25,8 +25,8 @@ int
DEFUN(memcmp, (str1, str2, count),
const PTR str1 AND const PTR str2 AND size_t count)
{
- register const unsigned char *s1 = (const unsigned char*)str1;
- register const unsigned char *s2 = (const unsigned char*)str2;
+ register unsigned char *s1 = (unsigned char*)str1;
+ register unsigned char *s2 = (unsigned char*)str2;
while (count-- > 0)
{
diff --git a/gnu/egcs/libiberty/mkstemps.c b/gnu/egcs/libiberty/mkstemps.c
index 4b89162751d..16c16a23263 100644
--- a/gnu/egcs/libiberty/mkstemps.c
+++ b/gnu/egcs/libiberty/mkstemps.c
@@ -20,7 +20,6 @@
#include "config.h"
#endif
-#include <sys/types.h>
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
@@ -40,7 +39,7 @@
/* We need to provide a type for gcc_uint64_t. */
#ifdef __GNUC__
-__extension__ typedef unsigned long long gcc_uint64_t;
+typedef unsigned long long gcc_uint64_t;
#else
typedef unsigned long gcc_uint64_t;
#endif
diff --git a/gnu/egcs/libiberty/objalloc.c b/gnu/egcs/libiberty/objalloc.c
index 50995691e33..57754a86105 100644
--- a/gnu/egcs/libiberty/objalloc.c
+++ b/gnu/egcs/libiberty/objalloc.c
@@ -18,8 +18,6 @@ Foundation, 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
#include "ansidecl.h"
-#include "config.h"
-
#include "objalloc.h"
/* Get a definition for NULL. */
@@ -35,16 +33,11 @@ Boston, MA 02111-1307, USA. */
#include <stddef.h>
#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#else
/* For systems with larger pointers than ints, this must be declared. */
extern PTR malloc PARAMS ((size_t));
extern void free PARAMS ((PTR));
#endif
-#endif
-
/* These routines allocate space for an object. Freeing allocated
space may or may not free all more recently allocated space.
diff --git a/gnu/egcs/libiberty/partition.c b/gnu/egcs/libiberty/partition.c
index a5a734937ae..c1d584774bf 100644
--- a/gnu/egcs/libiberty/partition.c
+++ b/gnu/egcs/libiberty/partition.c
@@ -27,15 +27,9 @@
#include <stdlib.h>
#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
-
#include "libiberty.h"
#include "partition.h"
-static int elem_compare PARAMS ((const void *, const void *));
-
/* Creates a partition of NUM_ELEMENTS elements. Initially each
element is in a class by itself. */
@@ -130,8 +124,8 @@ elem_compare (elem1, elem2)
const void *elem1;
const void *elem2;
{
- int e1 = * (const int *) elem1;
- int e2 = * (const int *) elem2;
+ int e1 = * (int *) elem1;
+ int e2 = * (int *) elem2;
if (e1 < e2)
return -1;
else if (e1 > e2)
@@ -177,7 +171,7 @@ partition_print (part, fp)
c = elements[c].next - elements;
}
/* Sort them. */
- qsort ((void *) class_elements, count, sizeof (int), elem_compare);
+ qsort ((void *) class_elements, count, sizeof (int), &elem_compare);
/* Print them. */
fputc ('(', fp);
for (i = 0; i < count; ++i)
diff --git a/gnu/egcs/libiberty/rename.c b/gnu/egcs/libiberty/rename.c
index 2e9dec18fa1..ae26e2d0040 100644
--- a/gnu/egcs/libiberty/rename.c
+++ b/gnu/egcs/libiberty/rename.c
@@ -3,13 +3,7 @@
/* Rename a file. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
#include <errno.h>
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
int
rename (zfrom, zto)
diff --git a/gnu/egcs/libiberty/setenv.c b/gnu/egcs/libiberty/setenv.c
index f025716e7f5..eec13006c22 100644
--- a/gnu/egcs/libiberty/setenv.c
+++ b/gnu/egcs/libiberty/setenv.c
@@ -63,7 +63,7 @@ setenv (name, value, replace)
const char *value;
int replace;
{
- register char **ep = 0;
+ register char **ep;
register size_t size;
const size_t namelen = strlen (name);
const size_t vallen = strlen (value) + 1;
@@ -72,13 +72,11 @@ setenv (name, value, replace)
size = 0;
if (__environ != NULL)
- {
- for (ep = __environ; *ep != NULL; ++ep)
- if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
- break;
- else
- ++size;
- }
+ for (ep = __environ; *ep != NULL; ++ep)
+ if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+ break;
+ else
+ ++size;
if (__environ == NULL || *ep == NULL)
{
diff --git a/gnu/egcs/libiberty/sigsetmask.c b/gnu/egcs/libiberty/sigsetmask.c
index db6408df75a..2a09e6a6c5a 100644
--- a/gnu/egcs/libiberty/sigsetmask.c
+++ b/gnu/egcs/libiberty/sigsetmask.c
@@ -12,8 +12,6 @@
#include <sys/types.h>
#include <signal.h>
-extern void abort PARAMS ((void)) ATTRIBUTE_NORETURN;
-
#ifdef SIG_SETMASK
int
DEFUN(sigsetmask,(set),
diff --git a/gnu/egcs/libiberty/splay-tree.c b/gnu/egcs/libiberty/splay-tree.c
index 52b57c088a7..22ea07d84ad 100644
--- a/gnu/egcs/libiberty/splay-tree.c
+++ b/gnu/egcs/libiberty/splay-tree.c
@@ -1,5 +1,5 @@
/* A splay-tree datatype.
- Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999 Free Software Foundation, Inc.
Contributed by Mark Mitchell (mark@markmitchell.com).
This file is part of GNU CC.
@@ -32,8 +32,6 @@ Boston, MA 02111-1307, USA. */
#include <stdlib.h>
#endif
-#include <stdio.h>
-
#include "libiberty.h"
#include "splay-tree.h"
@@ -305,53 +303,12 @@ splay_tree_insert (sp, key, value)
node->right->left = 0;
}
- sp->root = node;
- }
+ sp->root = node;
+ }
return sp->root;
}
-/* Remove KEY from SP. It is not an error if it did not exist. */
-
-void
-splay_tree_remove (sp, key)
- splay_tree sp;
- splay_tree_key key;
-{
- splay_tree_splay (sp, key);
-
- if (sp->root && (*sp->comp) (sp->root->key, key) == 0)
- {
- splay_tree_node left, right;
-
- left = sp->root->left;
- right = sp->root->right;
-
- /* Delete the root node itself. */
- if (sp->delete_value)
- (*sp->delete_value) (sp->root->value);
- free (sp->root);
-
- /* One of the children is now the root. Doesn't matter much
- which, so long as we preserve the properties of the tree. */
- if (left)
- {
- sp->root = left;
-
- /* If there was a right child as well, hang it off the
- right-most leaf of the left child. */
- if (right)
- {
- while (left->right)
- left = left->right;
- left->right = right;
- }
- }
- else
- sp->root = right;
- }
-}
-
/* Lookup KEY in SP, returning VALUE if present, and NULL
otherwise. */
@@ -368,72 +325,6 @@ splay_tree_lookup (sp, key)
return 0;
}
-/* Return the immediate predecessor KEY, or NULL if there is no
- predecessor. KEY need not be present in the tree. */
-
-splay_tree_node
-splay_tree_predecessor (sp, key)
- splay_tree sp;
- splay_tree_key key;
-{
- int comparison;
- splay_tree_node node;
-
- /* If the tree is empty, there is certainly no predecessor. */
- if (!sp->root)
- return NULL;
-
- /* Splay the tree around KEY. That will leave either the KEY
- itself, its predecessor, or its successor at the root. */
- splay_tree_splay (sp, key);
- comparison = (*sp->comp)(sp->root->key, key);
-
- /* If the predecessor is at the root, just return it. */
- if (comparison < 0)
- return sp->root;
-
- /* Otherwise, find the leftmost element of the right subtree. */
- node = sp->root->left;
- if (node)
- while (node->right)
- node = node->right;
-
- return node;
-}
-
-/* Return the immediate successor KEY, or NULL if there is no
- predecessor. KEY need not be present in the tree. */
-
-splay_tree_node
-splay_tree_successor (sp, key)
- splay_tree sp;
- splay_tree_key key;
-{
- int comparison;
- splay_tree_node node;
-
- /* If the tree is empty, there is certainly no predecessor. */
- if (!sp->root)
- return NULL;
-
- /* Splay the tree around KEY. That will leave either the KEY
- itself, its predecessor, or its successor at the root. */
- splay_tree_splay (sp, key);
- comparison = (*sp->comp)(sp->root->key, key);
-
- /* If the successor is at the root, just return it. */
- if (comparison > 0)
- return sp->root;
-
- /* Otherwise, find the rightmost element of the left subtree. */
- node = sp->root->right;
- if (node)
- while (node->left)
- node = node->left;
-
- return node;
-}
-
/* Call FN, passing it the DATA, for every node in SP, following an
in-order traversal. If FN every returns a non-zero value, the
iteration ceases immediately, and the value is returned.
diff --git a/gnu/egcs/libiberty/strerror.c b/gnu/egcs/libiberty/strerror.c
index 0dd2220cd73..644cc75462a 100644
--- a/gnu/egcs/libiberty/strerror.c
+++ b/gnu/egcs/libiberty/strerror.c
@@ -25,17 +25,14 @@
/* Routines imported from standard C runtime libraries. */
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#else
-extern PTR malloc ();
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-extern PTR memset ();
-#endif
+#ifdef __STDC__
+#include <stddef.h>
+extern void *malloc (size_t size); /* 4.10.3.3 */
+extern void *memset (void *s, int c, size_t n); /* 4.11.6.1 */
+#else /* !__STDC__ */
+extern char *malloc (); /* Standard memory allocater */
+extern char *memset ();
+#endif /* __STDC__ */
#ifndef MAX
# define MAX(a,b) ((a) > (b) ? (a) : (b))
diff --git a/gnu/egcs/libiberty/strsignal.c b/gnu/egcs/libiberty/strsignal.c
index 5625323b71b..c7bb10c441c 100644
--- a/gnu/egcs/libiberty/strsignal.c
+++ b/gnu/egcs/libiberty/strsignal.c
@@ -23,17 +23,14 @@
/* Routines imported from standard C runtime libraries. */
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#else
-extern PTR malloc ();
-#endif
-
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-extern PTR memset ();
-#endif
+#ifdef __STDC__
+#include <stddef.h>
+extern void *malloc (size_t size); /* 4.10.3.3 */
+extern void *memset (void *s, int c, size_t n); /* 4.11.6.1 */
+#else /* !__STDC__ */
+extern char *malloc (); /* Standard memory allocater */
+extern char *memset ();
+#endif /* __STDC__ */
/* Undefine the macro we used to hide the definition of sys_siglist
found in the system header files. */
diff --git a/gnu/egcs/libiberty/strtod.c b/gnu/egcs/libiberty/strtod.c
index 90292c224b6..c86c73de9b3 100644
--- a/gnu/egcs/libiberty/strtod.c
+++ b/gnu/egcs/libiberty/strtod.c
@@ -22,8 +22,7 @@ the resulting executable to be covered by the GNU General Public License.
This exception does not however invalidate any other reasons why
the executable file might be covered by the GNU General Public License. */
-#include "ansidecl.h"
-#include "safe-ctype.h"
+#include <ctype.h>
extern double atof ();
@@ -43,7 +42,7 @@ strtod (str, ptr)
p = str;
- while (ISSPACE (*p))
+ while (isspace (*p))
++p;
if (*p == '+' || *p == '-')
@@ -89,10 +88,10 @@ strtod (str, ptr)
}
/* digits, with 0 or 1 periods in it. */
- if (ISDIGIT (*p) || *p == '.')
+ if (isdigit (*p) || *p == '.')
{
int got_dot = 0;
- while (ISDIGIT (*p) || (!got_dot && *p == '.'))
+ while (isdigit (*p) || (!got_dot && *p == '.'))
{
if (*p == '.')
got_dot = 1;
@@ -106,9 +105,9 @@ strtod (str, ptr)
i = 1;
if (p[i] == '+' || p[i] == '-')
++i;
- if (ISDIGIT (p[i]))
+ if (isdigit (p[i]))
{
- while (ISDIGIT (p[i]))
+ while (isdigit (p[i]))
++i;
*ptr = p + i;
return atof (str);
diff --git a/gnu/egcs/libiberty/strtol.c b/gnu/egcs/libiberty/strtol.c
index 7095c7254be..5467cc3e2e9 100644
--- a/gnu/egcs/libiberty/strtol.c
+++ b/gnu/egcs/libiberty/strtol.c
@@ -28,20 +28,13 @@
* SUCH DAMAGE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#ifdef HAVE_LIMITS_H
#include <limits.h>
-#endif
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
+#include <ctype.h>
#include <errno.h>
-#ifdef NEED_DECLARATION_ERRNO
-extern int errno;
+#if 0
+#include <stdlib.h>
#endif
-#include "safe-ctype.h"
+#include "ansidecl.h"
/* FIXME: It'd be nice to configure around these, but the include files are too
painful. These macros should at least be more portable than hardwired hex
@@ -84,7 +77,7 @@ strtol(nptr, endptr, base)
*/
do {
c = *s++;
- } while (ISSPACE(c));
+ } while (isspace(c));
if (c == '-') {
neg = 1;
c = *s++;
@@ -120,10 +113,10 @@ strtol(nptr, endptr, base)
cutlim = cutoff % (unsigned long)base;
cutoff /= (unsigned long)base;
for (acc = 0, any = 0;; c = *s++) {
- if (ISDIGIT(c))
+ if (isdigit(c))
c -= '0';
- else if (ISALPHA(c))
- c -= ISUPPER(c) ? 'A' - 10 : 'a' - 10;
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
diff --git a/gnu/egcs/libiberty/strtoul.c b/gnu/egcs/libiberty/strtoul.c
index 66420f268b2..2ec32043e6b 100644
--- a/gnu/egcs/libiberty/strtoul.c
+++ b/gnu/egcs/libiberty/strtoul.c
@@ -28,24 +28,13 @@
* SUCH DAMAGE.
*/
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#ifdef HAVE_LIMITS_H
#include <limits.h>
-#endif
-#ifdef HAVE_SYS_PARAM_H
-#include <sys/param.h>
-#endif
+#include <ctype.h>
#include <errno.h>
-#ifdef NEED_DECLARATION_ERRNO
-extern int errno;
-#endif
#if 0
#include <stdlib.h>
#endif
#include "ansidecl.h"
-#include "safe-ctype.h"
#ifndef ULONG_MAX
#define ULONG_MAX ((unsigned long)(~0L)) /* 0xFFFFFFFF */
@@ -74,7 +63,7 @@ strtoul(nptr, endptr, base)
*/
do {
c = *s++;
- } while (ISSPACE(c));
+ } while (isspace(c));
if (c == '-') {
neg = 1;
c = *s++;
@@ -91,10 +80,10 @@ strtoul(nptr, endptr, base)
cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
for (acc = 0, any = 0;; c = *s++) {
- if (ISDIGIT(c))
+ if (isdigit(c))
c -= '0';
- else if (ISALPHA(c))
- c -= ISUPPER(c) ? 'A' - 10 : 'a' - 10;
+ else if (isalpha(c))
+ c -= isupper(c) ? 'A' - 10 : 'a' - 10;
else
break;
if (c >= base)
diff --git a/gnu/egcs/libiberty/testsuite/demangle-expected b/gnu/egcs/libiberty/testsuite/demangle-expected
index a5d72fab0fe..d3a1fe43890 100644
--- a/gnu/egcs/libiberty/testsuite/demangle-expected
+++ b/gnu/egcs/libiberty/testsuite/demangle-expected
@@ -2486,83 +2486,3 @@ f(Bar<21>, int)
--format=gnu
f__FGt3Bar1i24XY_t
f(Bar<2>, XY_t)
-#
---format=gnu
-foo__H1Zt2TA2ZRCiZt2NA1Ui9_X01_i
-int foo<TA<int const &, NA<9> > >(TA<int const &, NA<9> >)
-#
---format=gnu
-foo__H1Zt2TA2ZcZt2NA1Ui_20__X01_i
-int foo<TA<char, NA<20> > >(TA<char, NA<20> >)
-#
---format=gnu
-foo__H1Zt2TA2ZiZt8N___A___1Ui_99__X01_i
-int foo<TA<int, N___A___<99> > >(TA<int, N___A___<99> >)
-#
---format=gnu
-foo__H1Zt2TA2ZRCiZt2NA1im1_X01_i
-int foo<TA<int const &, NA<-1> > >(TA<int const &, NA<-1> >)
-#
---format=gnu
-foo__H1Zt2TA2ZRCiZt2NA1im9_X01_i
-int foo<TA<int const &, NA<-9> > >(TA<int const &, NA<-9> >)
-#
---format=gnu
-foo__H1Zt2TA2ZcZt2NA1i_m20__X01_i
-int foo<TA<char, NA<-20> > >(TA<char, NA<-20> >)
-#
---format=gnu
-foo__H1Zt2TA2ZcZt2NA1im1_X01_i
-int foo<TA<char, NA<-1> > >(TA<char, NA<-1> >)
-#
---format=gnu
-foo__H1Zt2TA2ZiZt4N__A1im9_X01_i
-int foo<TA<int, N__A<-9> > >(TA<int, N__A<-9> >)
-#
---format=gnu
-foo__H1Zt2TA2ZiZt4N__A1i_m99__X01_i
-int foo<TA<int, N__A<-99> > >(TA<int, N__A<-99> >)
-#
---format=gnu
-__opi__t2TA2ZiZt4N__A1i9
-TA<int, N__A<9> >::operator int(void)
-#
---format=gnu
-__opi__t2TA2ZiZt8N___A___1i_m99_
-TA<int, N___A___<-99> >::operator int(void)
-#
---format=gnu
-foo___bar__baz_____H1Zt2TA2ZiZt8N___A___1i_99__X01_i
-int foo___bar__baz___<TA<int, N___A___<99> > >(TA<int, N___A___<99> >)
-#
---format=gnu
-foo__bar___foobar_____t2TA2ZiZt8N___A___1i_m99_
-TA<int, N___A___<-99> >::foo__bar___foobar___(void)
-#
---format=gnu
-foo__bar___foobar_____t2TA2ZiZt4N__A1i9
-TA<int, N__A<9> >::foo__bar___foobar___(void)
-#
---format=gnu
-__tfP8sockaddr
-sockaddr * type_info function
-#
---format=gnu
-__tfPQ25libcwt16option_event_tct1Z12burst_app_ct
-libcw::option_event_tct<burst_app_ct> * type_info function
-#
---format=gnu
-__tiP8sockaddr
-sockaddr * type_info node
-#
---format=gnu
-__tiPQ25libcwt16option_event_tct1Z12burst_app_ct
-libcw::option_event_tct<burst_app_ct> * type_info node
-#
---format=gnu
-_27_GLOBAL_.N.__12burst_app_ct.app_instance
-{anonymous}::app_instance
-#
---format=gnu
-_26_GLOBAL_\$N\$_tmp_n.iilg4Gya\$app_instance
-{anonymous}::app_instance
diff --git a/gnu/egcs/libiberty/testsuite/regress-demangle b/gnu/egcs/libiberty/testsuite/regress-demangle
index 1086762dbb2..bd48ce9013e 100644
--- a/gnu/egcs/libiberty/testsuite/regress-demangle
+++ b/gnu/egcs/libiberty/testsuite/regress-demangle
@@ -15,8 +15,6 @@ sed -e '/^#/ d' "$1" | (
if test "x$x" != "x$demangled"; then
failures=`expr $failures + 1`
echo "FAIL: $type $mangled"
- echo " result: $x"
- echo " expected: $demangled"
fi
done
diff --git a/gnu/egcs/libiberty/vasprintf.c b/gnu/egcs/libiberty/vasprintf.c
index c34585d0498..b959f5f9ca5 100644
--- a/gnu/egcs/libiberty/vasprintf.c
+++ b/gnu/egcs/libiberty/vasprintf.c
@@ -18,31 +18,21 @@ License along with libiberty; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <ansidecl.h>
-#ifdef ANSI_PROTOTYPES
+#ifdef __STDC__
#include <stdarg.h>
#else
#include <varargs.h>
#endif
#include <stdio.h>
#include <string.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#else
-extern unsigned long strtoul ();
-extern PTR malloc ();
-#endif
-#include "libiberty.h"
+#include <ansidecl.h>
#ifdef TEST
int global_total_width;
#endif
-
-static int int_vasprintf PARAMS ((char **, const char *, va_list *));
+unsigned long strtoul ();
+char *malloc ();
static int
int_vasprintf (result, format, args)
@@ -70,7 +60,7 @@ int_vasprintf (result, format, args)
total_width += abs (va_arg (ap, int));
}
else
- total_width += strtoul (p, (char **) &p, 10);
+ total_width += strtoul (p, &p, 10);
if (*p == '.')
{
++p;
@@ -80,7 +70,7 @@ int_vasprintf (result, format, args)
total_width += abs (va_arg (ap, int));
}
else
- total_width += strtoul (p, (char **) &p, 10);
+ total_width += strtoul (p, &p, 10);
}
while (strchr ("hlL", *p))
++p;
@@ -142,33 +132,33 @@ vasprintf (result, format, args)
}
#ifdef TEST
-static void checkit PARAMS ((const char *, ...));
-
-static void
-checkit VPARAMS ((const char* format, ...))
+void
+checkit
+#ifdef __STDC__
+ (const char* format, ...)
+#else
+ (va_alist)
+ va_dcl
+#endif
{
va_list args;
char *result;
-#ifndef ANSI_PROTOTYPES
- const char *format;
-#endif
- VA_START (args, format);
-
-#ifndef ANSI_PROTOTYPES
- format = va_arg (args, const char *);
+#ifdef __STDC__
+ va_start (args, format);
+#else
+ char *format;
+ va_start (args);
+ format = va_arg (args, char *);
#endif
-
vasprintf (&result, format, args);
- if (strlen (result) < (size_t) global_total_width)
+ if (strlen (result) < global_total_width)
printf ("PASS: ");
else
printf ("FAIL: ");
printf ("%d %s\n", global_total_width, result);
}
-extern int main PARAMS ((void));
-
int
main ()
{
@@ -179,7 +169,5 @@ main ()
checkit ("%s", "jjjjjjjjjiiiiiiiiiiiiiiioooooooooooooooooppppppppppppaa\n\
777777777777777777333333333333366666666666622222222222777777777777733333");
checkit ("%f%s%d%s", 1.0, "foo", 77, "asdjffffffffffffffiiiiiiiiiiixxxxx");
-
- return 0;
}
#endif /* TEST */
diff --git a/gnu/egcs/libiberty/vfork.c b/gnu/egcs/libiberty/vfork.c
index 5e877210081..86c45919f66 100644
--- a/gnu/egcs/libiberty/vfork.c
+++ b/gnu/egcs/libiberty/vfork.c
@@ -1,10 +1,6 @@
/* Emulate vfork using just plain fork, for systems without a real vfork.
This function is in the public domain. */
-#include "ansidecl.h"
-
-extern int fork PARAMS ((void));
-
int
vfork ()
{
diff --git a/gnu/egcs/libiberty/waitpid.c b/gnu/egcs/libiberty/waitpid.c
index 2848309826a..23db0b932d2 100644
--- a/gnu/egcs/libiberty/waitpid.c
+++ b/gnu/egcs/libiberty/waitpid.c
@@ -1,10 +1,3 @@
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-
int
waitpid (pid, stat_loc, options)
int pid, *stat_loc, options;
diff --git a/gnu/egcs/libiberty/xexit.c b/gnu/egcs/libiberty/xexit.c
index e8b1ed1c007..431bbe02991 100644
--- a/gnu/egcs/libiberty/xexit.c
+++ b/gnu/egcs/libiberty/xexit.c
@@ -17,15 +17,10 @@ License along with libiberty; see the file COPYING.LIB. If not, write
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
+#include "ansidecl.h"
#include "libiberty.h"
+#include <stdio.h>
/* This variable is set by xatexit if it is called. This way, xmalloc
doesn't drag xatexit into the link. */
diff --git a/gnu/egcs/libiberty/xmalloc.c b/gnu/egcs/libiberty/xmalloc.c
index 3ea2d4afc06..621c6d216c7 100644
--- a/gnu/egcs/libiberty/xmalloc.c
+++ b/gnu/egcs/libiberty/xmalloc.c
@@ -17,9 +17,6 @@ License along with libiberty; see the file COPYING.LIB. If
not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
#include "ansidecl.h"
#include "libiberty.h"
@@ -64,31 +61,6 @@ xmalloc_set_program_name (s)
#endif /* HAVE_SBRK */
}
-void
-xmalloc_failed (size)
- size_t size;
-{
-#ifdef HAVE_SBRK
- extern char **environ;
- size_t allocated;
-
- if (first_break != NULL)
- allocated = (char *) sbrk (0) - first_break;
- else
- allocated = (char *) sbrk (0) - (char *) &environ;
- fprintf (stderr,
- "\n%s%sCannot allocate %lu bytes after allocating %lu bytes\n",
- name, *name ? ": " : "",
- (unsigned long) size, (unsigned long) allocated);
-#else /* HAVE_SBRK */
- fprintf (stderr,
- "\n%s%sCannot allocate %lu bytes\n",
- name, *name ? ": " : "",
- (unsigned long) size);
-#endif /* HAVE_SBRK */
- xexit (1);
-}
-
PTR
xmalloc (size)
size_t size;
@@ -99,8 +71,27 @@ xmalloc (size)
size = 1;
newmem = malloc (size);
if (!newmem)
- xmalloc_failed (size);
-
+ {
+#ifdef HAVE_SBRK
+ extern char **environ;
+ size_t allocated;
+
+ if (first_break != NULL)
+ allocated = (char *) sbrk (0) - first_break;
+ else
+ allocated = (char *) sbrk (0) - (char *) &environ;
+ fprintf (stderr,
+ "\n%s%sCannot allocate %lu bytes after allocating %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) size, (unsigned long) allocated);
+#else /* HAVE_SBRK */
+ fprintf (stderr,
+ "\n%s%sCannot allocate %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) size);
+#endif /* HAVE_SBRK */
+ xexit (1);
+ }
return (newmem);
}
@@ -115,8 +106,27 @@ xcalloc (nelem, elsize)
newmem = calloc (nelem, elsize);
if (!newmem)
- xmalloc_failed (nelem * elsize);
-
+ {
+#ifdef HAVE_SBRK
+ extern char **environ;
+ size_t allocated;
+
+ if (first_break != NULL)
+ allocated = (char *) sbrk (0) - first_break;
+ else
+ allocated = (char *) sbrk (0) - (char *) &environ;
+ fprintf (stderr,
+ "\n%s%sCannot allocate %lu bytes after allocating %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) (nelem * elsize), (unsigned long) allocated);
+#else /* HAVE_SBRK */
+ fprintf (stderr,
+ "\n%s%sCannot allocate %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) (nelem * elsize));
+#endif /* HAVE_SBRK */
+ xexit (1);
+ }
return (newmem);
}
@@ -134,7 +144,26 @@ xrealloc (oldmem, size)
else
newmem = realloc (oldmem, size);
if (!newmem)
- xmalloc_failed (size);
-
+ {
+#ifdef HAVE_SBRK
+ extern char **environ;
+ size_t allocated;
+
+ if (first_break != NULL)
+ allocated = (char *) sbrk (0) - first_break;
+ else
+ allocated = (char *) sbrk (0) - (char *) &environ;
+ fprintf (stderr,
+ "\n%s%sCannot reallocate %lu bytes after allocating %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) size, (unsigned long) allocated);
+#else /* HAVE_SBRK */
+ fprintf (stderr,
+ "\n%s%sCannot reallocate %lu bytes\n",
+ name, *name ? ": " : "",
+ (unsigned long) size);
+#endif /* HAVE_SBRK */
+ xexit (1);
+ }
return (newmem);
}
diff --git a/gnu/egcs/libiberty/xmemdup.c b/gnu/egcs/libiberty/xmemdup.c
index fdb17a547f3..f780041aa13 100644
--- a/gnu/egcs/libiberty/xmemdup.c
+++ b/gnu/egcs/libiberty/xmemdup.c
@@ -9,9 +9,6 @@
#include "libiberty.h"
#include <sys/types.h> /* For size_t. */
-#ifdef HAVE_STRING_H
-#include <string.h>
-#endif
PTR
xmemdup (input, copy_size, alloc_size)