3 * floatformat.c (floatformat_i387_ext_is_valid): New function.
4 (floatformat_always_valid): New function.
5 (floatformat_i387_ext): Initialize new "is_valid" field to
6 "floatformat_i387_ext_is_valid".
7 (floatformat_ieee_single_little): Initialize "is_valid" field to
8 floatformat_always_valid.
9 (floatformat_ieee_double_big): Ditto.
10 (floatformat_ieee_double_little): Ditto.
11 (floatformat_ieee_double_little): Ditto.
12 (floatformat_ieee_double_littlebyte_bigword): Ditto.
13 (floatformat_i960_ext): Ditto.
14 (floatformat_m88110_ext): Ditto.
15 (floatformat_m88110_harris_ext): Ditto.
16 (floatformat_arm_ext_big): Ditto.
17 (floatformat_arm_ext_littlebyte_bigword): Ditto.
18 (floatformat_ia64_spill_big): Ditto.
19 (floatformat_ia64_spill_little): Ditto.
20 (floatformat_ia64_quad_big): Ditto.
21 (floatformat_ia64_quad_little): Ditto.
22 (floatformat_ia64_quad_little): Ditto.
23 (floatformat_is_valid): Call "is_valid".
27 * floatformat.c (get_field): Make "data" constant.
28 (floatformat_is_valid, floatformat_to_double): Make "from"
30 (floatformat_from_double): Make "from" constant.
34 * floatformat.c (floatformat_is_valid): New function.
35 (get_field, put_field): Correct comments.
39 * fibheap.c (fibheap_replace_key_data): Change type of OKEY to
45 * aclocal.m4 (AC_LANG_FUNC_LINK_TRY): Define.
50 * aclocal.m4: Include acx.m4 and no-executables.m4.
51 (libiberty_AC_FUNC_STRNCMP): Use AC_LIBOBJ.
52 (LIB_AC_PROG_CC): Remove.
53 * configure.in: Update AC_PREREQ to 2.57. Use GCC_NO_EXECUTABLES.
54 Use AC_PROG_CC and set ac_libiberty_warn_cflags instead of using
55 LIB_AC_PROG_CC. Use AC_LIBOBJ. Call AC_ISC_POSIX later, only if
56 performing link tests.
57 * configure: Regenerated.
61 * cp-demangle.c: Clarify what package(s) this is part of.
65 * pex-win32.c (pexecute): Mark parameters this_pname and
66 temp_base as unused. Remove unused variables retries,
67 sleep_interval. Initialize org_stdin, org_stdout.
68 (pwait): Mark parameter flags as unused.
72 * pex-win32.c (fix_argv): Ensure that the executable pathname
73 uses Win32 backslashes.
74 (pexecute): Cast away constness when assigning *errmsg_arg.
78 * testsuite/demangle-expected: Add more GNU V3 testcases.
82 * safe-ctype.c: Use HOST_CHARSET_ASCII and HOST_CHARSET_EBCDIC,
83 not HC_ASCII and HC_EBCDIC.
84 Add documentation in form expected by gather-docs.
85 * hex.c: Use HOST_CHARSET, not hand-coded check of character set.
86 * Makefile.in, functions.texi: Regenerate.
90 * safe-ctype.c: Separate out EOF==-1 check. Use HOST_CHARSET
91 for charset determination.
95 * configure.in: Add check for malloc.h needed by
96 m68k for function free().
97 * configure: Regenerated.
98 * config.in: Add HAVE_MALLOC_H.
99 * hashtab.c: include malloc.h were available for
105 * physmem.c: Update comment.
106 * configure.in: Modify test for _system_configuration for older
109 * config.in, configure: Regenerated.
114 * test-demangle.c (getline): Fix fence-post error.
118 * asprintf.c: Change comment to note that -1 is returned upon
120 * vasprintf.c: Likewise.
121 (vasprintf): Return -1 upon error.
122 * functions.texi: Document changes to asprintf and vasprintf.
126 * config.table: Accept i[345867]86 variant.
130 * hex.c (_hex_value): Make this unsigned.
131 (hex_value): Update documentation for new return type. hex_value
132 now expands to an unsigned int expression, to avoid unexpected
133 sign extension when we store it in a bfd_vma, which is larger than
134 int on some platforms.
135 * functions.texi: Regenerated.
139 * splay-tree.c (splay_tree_predecessor): Fix comment.
140 (splay_tree_successor): Fix comment.
144 * hashtab.c (iterative_hash): New fn.
145 * configure.in: Add AC_C_BIGENDIAN_CROSS.
146 * aclocal.m4: Include accross.m4.
147 * configure, config.in: Regenerate.
151 * configure.in (AC_CHECK_FUNCS): Don't make multiple calls.
152 * configure: Regenerate.
156 * cp-demangle.c: Fix typo in "char_traints" string-literal.
160 * vsnprintf.c (vsnprintf): Don't pad string with extra nulls.
161 (main): Test that we don't write too much data.
165 * configure.in (funcs, AC_CHECK_FUNCS): Add snprintf and
167 * snprintf.c, vsnprintf.c: New files.
168 * Makefile.in (CFILES): Add snprintf.c and vsnprintf.c.
169 (CONFIGURED_OFILES): Add snprintf.o and vsnprintf.o.
170 Regenerate dependencies.
172 * functions.texi, configure, config.in: Regenerated.
176 * mempcpy.c, stpcpy.c, stpncpy.c: New files.
177 * configure.in (funcs, AC_CHECK_FUNCS): Add mempcpy, stpcpy
179 * Makefile.in (CFILES): Add mempcpy.c, stpcpy.c and stpncpy.c.
180 (CONFIGURED_OFILES): Add mempcpy.o, stpcpy.o and stpncpy.o.
181 Regenerate dependencies.
183 * functions.texi, configure, config.in: Regenerated.
187 * argv.c: Fix comments.
188 * calloc.c: Don't unnecessarily include "libiberty.h".
189 (bzero): Add prototype.
190 * floatformat.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
191 * getcwd.c (getcwd): Use standard definition to avoid conflicts
193 * hashtab.c (htab_traverse): Delete unused variables.
194 * rename.c: Include "ansidecl.h".
195 (rename): Use standard definition to avoid conflicts with system
197 * strsignal.c: Rely on ANSI_PROTOTYPES.
198 * strstr.c: Check GNUC >= 2, not GNUC == 2.
199 * vfprintf.c: Include "ansidecl.h", rely on ANSI_PROTOTYPES.
200 * vprintf.c: Include "ansidecl.h" earlier, rely on
202 * vsprintf.c: Include "ansidecl.h" earlier, rely on
203 ANSI_PROTOTYPES and possibly include <stdarg.h>.
205 * Makefile.in: Regenerate dependencies.
209 * maint-tool (deps): Scan for headers in $srcdir also.
216 * getopt.c (exchange, _getopt_initialize): Use mempcpy not
218 * regex.c (regerror): Likewise.
222 * argv.c: Use ANSI_PROTOTYPES instead of __STDC__.
223 * memchr.c: Likewise.
224 * strcasecmp.c: Likewise.
225 * strncasecmp.c: Likewise.
226 * strncmp.c: Likewise.
227 * xatexit.c: Likewise.
228 * xmalloc.c: Likewise.
230 * copysign.c: Use traditional function declaration instead of DEFUN.
231 * sigsetmask.c: Likewise.
233 * memcmp.c: Both of the above, ANSI_PROTOTYPES and DEFUN.
234 * memset.c: Likewise.
236 * memcpy.c: ANSI_PROTOTYPES, DEFUN and prototype bcopy.
237 * memmove.c: Likewise.
241 * strdup.c (strdup): Tweak implementation to use memcpy.
245 * configure.in (HAVE_UINTPTR_T): Always define.
246 * configure: Regenerated.
250 * Makefile.in (MULTIOSDIR): New macro. Use $(CC) $(LIBCFLAGS)
251 instead of $$CC alone.
252 (install_to_tooldir): Use it.
256 * hashtab.c (htab_traverse_noresize): Break out from ...
257 * hashtab.c (htab_traverse): ... here.
261 * hashtab.c (htab_expand): Fix warning.
263 * hashtab.c (htab_expand): Compute the size of hashtable based
264 on the number of elements actually used.
265 (htab_traverse): Call htab_expand when table is too empty.
269 * cplus-dem.c (demangle_integral_value): Correction to reflect
270 patch of 2002-01-10 in order to also make negative multi-digits
271 without leading underscore work.
275 * cplus-dem.c: Add license exception to copyright notice.
279 * physmem.c: Formatting changes from upstream.
283 * physmem.c (physmem_total): Add _WIN32 support.
284 (physmem_available): Likewise.
288 * physmem.c (physmem_total) [HAVE_GETSYSINFO]: Test for
290 (physmem_available) [HAVE_TABLE]: Test for TBL_VMSTATS.
294 * configure.in: Check for sys/systemcfg.h and
295 _system_configuration.
296 * physmem.c: Add support for AIX. Tweek formatting as per
297 upstream coreutils beta.
303 * configure.in: Check for sys/sysctl.h and sysctl.
304 * physmem.c: Add support for *bsd and darwin.
305 * Makefile.in: Generate depedency for physmem.o.
309 * physmem.c (physmem_total) [HAVE_GETSYSINFO]: Use getsysinfo on
311 (physmem_available) [HAVE_TABLE && HAVE_SYS_TABLE_H]: Use table on
314 * configure.in (AC_CHECK_HEADERS): Check for sys/sysinfo.h,
315 machine/hal_sysinfo.h, sys/table.h.
316 (checkfuncs, AC_CHECKFUNCS): Check for getsysinfo, table.
317 * configure, config.in: Regenerate.
321 * configure.in: Check for sys/sysmp.h and sysmp.
322 * physmem.c: Pull upstream copy, add support for irix6.
324 * config.in, configure: Regenerated.
328 * physmem.c (physmem_total, physmem_available): De-ANSI-fy.
329 * configure.in (AC_CHECK_FUNCS): Add pstat_getstatic and
334 * Makefile.in (CFILES): Add physmem.c.
335 (REQUIRED_OFILES): Add physmem.o.
336 * configure.in: Check for sys/pstat.h.
337 (checkfuncs): Add pstat_getstatic and pstat_getdynamic.
338 * physmem.c: New file, copied from textutils.
340 * config.in, configure: Regenerated.
344 * Makefile.in (CFILES): Add lrealpath.c.
345 (REQUIRED_OFILES): Add lrealpath.o.
346 (lrealpath.o): Add rule.
347 * aclocal.m4 (libiberty_NEED_DECLARATION): Add.
348 * configure.in: Add realpath and canonicalize_file_name to
349 checkfuncs and AC_CHECK_FUNCS. Use libiberty_NEED_DECLARATION
350 for canonicalize_file_name.
351 * lrealpath.c: New file.
352 * make-relative-prefix.c: Update documentation.
353 (make_relative_prefix): Simplify. Use lbasename and lrealpath.
354 * config.in: Regenerated.
355 * configure: Regenerated.
356 * functions.texi: Regenerated.
360 * cplus_dem.c: Fix typo: intializes -> initializes.
364 * configure.in: Propagate ORIGINAL_LD_FOR_MULTILIBS to
366 * configure: Rebuilt.
371 * cplus-dem.c (demangle_signature): Call string_delete.
372 Remove extra string_init.
373 (demangle_arm_hp_template): Call string_delete instead of
374 string_clear. Add missing string_delete call.
375 (demangle_qualified): Add missing string_delete call.
376 (do_type): Remove unused variable btype. Add missing string_delete
377 call. Call string_delete instead of string_clear.
378 (demangle_fund_type): Move variable btype inside of the switch
379 statement. Add missing string_delete call.
380 (do_arg): Call string_delete instead of string_clear. Remove extra
382 (demangle_nested_args): Free work->previous_argument.
386 * acconfig.h: New file. Add uintptr_t.
387 * config.in: Regenerated.
391 * libiberty.texi: Update to GFDL 1.2.
395 * Makefile.in (libiberty_topdir): New subst.
396 (mkinstalldirs): Redefine in terms of the above.
397 * configure.in: AC_SUBST it.
398 * configure: Regenerate.
402 * Makefile.in (all-subdir, check-subdir, installcheck-subdir)
403 (info-subdir, install-info-subdir, clean-info-subdir)
404 (dvi-subdir, install-subdir, etags-subdir, mostlyclean-subdir)
405 (clean-subdir, distclean-subdir, maintainer-clean-subdir):
406 Pass $(FLAGS_TO_PASS).
410 * Makefile.in (install_to_tooldir): Instead of $(MULTISUBDIR), use
411 /`$$CC -print-multi-os-directory`.
415 * hashtab.c (htab_create_alloc_ex): New function.
416 (hatab_set_functions_ex): New function.
417 (htab_delete, htab_expand): Support alternate allocation functions.
421 * configure.in: Remove special pex-cygwin consideration.
422 * configure: Regenerate.
423 * pex-cygwin.c: Remove.
424 * Makefile.in: Remove pex-cygwin.[co] lines.
428 * Makefile.in (CFILES): Add pex-*.c.
429 (REQUIRED_OFILES): Change pexecute.o to @pexecute@
430 (CONFIGURED_OFILES): Add pex-*.o.
431 (TEXIFILES): Add pexecute.txh.
432 (pexecute.o): Delete rule.
433 (pex-cygwin.o, pex-djgpp.o, pex-mpw.o, pex-msdos.o, pex-os2.o,
434 pex-unix.o, pex-win32.o): New rules.
435 * configure.in: Change AC_INIT argument to xmalloc.c.
436 Compute appropriate pexecute implementation and substitute it
439 * pexecute.c: Split up into...
440 * pex-cygwin.c, pex-djgpp.c, pex-mpw.c, pex-msdos.c, pex-os2.c,
441 pex-unix.c, pex-win32.c, pex-common.h, pexecute.txh: ... these
444 * functions.texi: Regenerate.
445 * configure: Regenerate.
449 * hashtab.c (htab_expand): Fix allocation of new entries.
453 * Makefile.in (FLAGS_TO_PASS): Also pass DESTDIR.
455 * Makefile.in (install_to_libdir, install_to_tooldir): Add a
456 mkinstalldirs command.
460 * make-relative-prefix.c (HAVE_HOST_EXECUTABLE_SUFFIX):
461 Define for hosts with HOST_EXECUTABLE_SUFFIX.
465 * make-relative-prefix.c (make_relative_prefix): Ensure return
466 string is empty before using strcat to construct it.
470 * Makefile.in: Add make-relative-prefix.c.
471 * make-relative-prefix.c: New file.
472 * functions.texi: Rebuilt.
476 * md5.c (md5_process_block): Avoid `function-like macro "F{G,H,I}" must be
477 used with arguments in traditional C' warnings.
481 * config.table: Use mh-s390pic for s390x too.
485 * libiberty/cplus-dem.c (ada_demangle): Get rid of unneeded
486 variable and of strict-aliasing warning.
487 (grow_vect): Use char as first parameter.
491 * Makefile.in (all): Fix multilib parallel build.
495 * cp-demangle.c (demangling_new): Cast 0 to enum.
496 (demangle_char): Cast return of strdup to char *.
497 (is_gnu_v3_mangled_ctor): Cast 0 to enum.
498 (is_gnu_v3_mangled_dtor): Likewise.
499 * cplus-dem.c (grow_vect): Cast return of xrealloc to void *.
500 (work_stuff_copy_to_from): Cast return of xmalloc to char **.
501 * fibheap.c (fibnode_new): Cast return of xcalloc to fibnode_t.
502 * md5.c (md5_process_bytes): Cast results back to const void *.
503 (md5_process_block): Add cast to const md5_uint32 *.
504 * regex.c (re_compile_fastmap): Cast enum to UCHAR_T.
505 * safe-ctype.c (L, XL, U, XU, D, P, _, C, Z, M, V, T, S): Add cast to
507 * splay-tree.c (splay_tree_xmalloc_allocate): Cast return of xmalloc
509 * vasprintf.c (int_vasprintf): Cast return of malloc to char *.
513 * README: Update email addresses for bugs and patches.
517 * splay-tree.c (splay_tree_successor): Fix comments.
521 * cplus-dem.c: Code under #ifdef MAIN moved to gcc/cp/cxxfilt.c.
522 * testsuite/Makefile.in: Adjust for test-demangle.
523 * testsuite/regress-demangle: Deleted.
524 * testsuite/test-demangle.c: New file.
525 * testsuite/demangle-expected: Change \$ to $ throughout, now that
526 this file is not being read by a shell script.
530 * regex.c: Only use "#pragma alloca" on AIX when not using gcc.
534 * regex.c (re_error_msgid): Just use a simple array of strings.
535 (re_compile_pattern): Compensate.
538 (regerror): Likewise.
542 * cplus-dem.c (PREPEND_BLANK): Remove.
546 * cp-demangle.c (demangle_identifier): Support extended Unicode
551 * cp-demangle.c (demangle_v3_with_details): Wrap in
552 !defined IN_GLIBCPP_V3.
556 * cp-demangle.c (demangle_operator_name): Add type_arg parameter.
557 Set it for the "st" operator.
558 (demangle_expression): Handle expressions with types as arguments.
562 * configure.in (OUTPUT_OPTION,NO_MINUS_C_MINUS_O): Configure.
563 * Makefile.in (OUTPUT_OPTION): Use.
567 * Makefile.in (install_to_libdir): Add $(DESTDIR).
568 (install_to_tooldir): Likewise.
572 * lbasename.c: Add 2002 to copyright.
573 (IS_DIR_SEPARATOR): Remove VMS junk.
577 * hashtab.c (htab_create): New stub function for backward
579 (htab_try_create): Likewise.
583 * hashtab.c (htab_create): Delete.
584 (htab_try_create): Delete.
585 (htab_create_alloc): New.
586 (htab_delete): Support user-specified memory allocation.
587 (htab_expand): Likewise.
591 * configure.in: Fix typo in the code checking for sys_errlist.
592 * configure: Regenerated.
596 * config.table: Use mh-x86pic also for x86-64.
600 * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at
601 script entry, and set LD to it when configuring multilibs.
602 * configure: Rebuilt.
606 * configure.in (AC_TYPE_PID_T): Use it.
607 * configure: Regenerated.
608 * getruntime.c: Include <sys/types.h>.
609 * waitpid.c: Likewise. Use pid_t, not int, as the type of "pid".
613 * hashtab.c (higher_prime_number): Use 7 as minimum.
614 (find_empty_slot_for_expand): Don't compute hash2 unless needed.
615 (htab_find_slot_with_hash): Likewise.
619 * cp-demangle.c (__cxa_demangle): Also protect with IN_GLIBCPP_V3.
620 (is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_ctor): Conditionally
621 not compile if IN_GLIBCPP_V3 defined.
622 * dyn-string.c: Also allow IN_GLIBCPP_V3 to change allocation scheme.
626 * cp-demangle.c (java_demangle_v3): Don't try to release "demangled"
631 * hex.c: Add documentation.
632 (_hex_value): Provide non-ASCII empty table.
633 (hex_init): Initialize the non-ASCII table.
634 * functions.texi: Regenerate.
638 * dyn-string.c: Add libgcc exception to copyright notice.
642 * config.table: Support --with-build-subdir.
643 * configure.in: Likewise.
644 * configure: Rebuild.
648 * strtod.c (strtod): Increment 8 chars, not 7, when `infinity'
653 * cp-demangle.c: Add libgcc exception to cp-demangle.c copyright
658 * xatexit.c [VMS]: Include stdlib.h and unixlib.h.
662 * splay-tree.c (splay_tree_xmalloc_allocate,
663 splay_tree_xmalloc_deallocate): Use K&R-style definitions, not
664 prototyped definitions. Mark `data' arguments as unused.
668 * floatformat.c (floatformat_arm_ext_big): Delete definition.
672 * configure.in: Add --enable-install-libiberty option.
673 * Makefile.in (INSTALLED_HEADERS): New variable.
674 (install_to_libdir): Possibly also copy headers.
675 * configure: Regenerated.
679 * xmalloc.c (xmalloc_fail): Clarify error message further.
683 * xmalloc.c (xmalloc_fail): Clarify error message.
687 * splay-tree.c (splay_tree_xmalloc_allocate,
688 splay_tree_xmalloc_deallocate): New functions.
689 (splay_tree_new): Call splay_tree_new_with_allocator, passing the
690 above functions and a dummy data pointer.
691 (splay_tree_new_with_allocator): New function.
692 (splay_tree_delete_helper, splay_tree_delete, splay_tree_insert,
693 splay_tree_remove): Use the splay tree's allocation and
694 deallocation functions.
698 * testsuite/demangle-expected: Add test case for infinite loop in
700 * cplus-dem.c (demangle_arm_hp_template): Stop trying to demangle
701 if do_type() doesn't make any progress --- prevents an infinite
707 * cplus-dem.c (demangle_integral_value): Accept multi-digit
708 numbers that do not start with an underscore; This is needed
709 for integer template parameters. This doesn't break anything
710 because multi-digit numbers are never followed by a digit.
711 * testsuite/demangle-expected: Corrected all mangled test
712 cases with multi-digit template parameters: g++ 2.95.x does
713 not generate underscores around these parameters.
717 * cplus-dem.c (flags): Add DMGL_VERBOSE
718 (cplus_demangle_v3_p): Remove.
719 (demangle_it): Add DMGL_TYPES to passed flags.
720 * cp-demangle.c (cplus_demangle_v3_all): Remove.
721 (cplus_demangle_v3_type): Remove.
722 (cplus_demangle_v3): Add options parm.
726 * cp-demangle.c (cp_demangle_type): Do not protect with
728 (cplus_demangle_v3_all): New.
729 (cplus_demangle_v3): Call cplus_demangle_v3_all.
730 (cplus_demangle_v3_type): Call cplus_demangle_v3_all.
732 * cplus-dem.c (cplus_demangle_v3_p): New function pointer.
733 Initialized to cplus_demangle_v3.
734 (cplus_demangle_with_style): Call cplus_demangle_v3_p instead
735 of cplus_demangle_v3.
736 (main): Set cplus_demangle_v3_p to cplus_demangle_v3_type for
739 * testsuite/regress-demangle: Pass the mangled name at the
744 * cp-demangle.c (cp_demangle_type): Call demangling_new with
749 * cp-demangle.c: Revert yesterday's change.
753 * gcc/libiberty/configure.in: Treat mingw the same as cywin
754 wrt HAVE_SYS_ERRLIST.
758 * cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2.
759 (cplus_demangle_v3): Mimic __cxa_demangle and fall back on
761 * testsuite/demangle-expected: New gnu-v3 test.
765 * configure.in (variable detection): Use arrays of unspecified
766 size instead of plain integers.
770 * Makefile.in (TESTLIB): New. This library is for future
772 (CFILES, REQUIRED_OFILES, CONFIGURED_OFILES): Re-alphabetize,
773 break down by letter.
774 (REQUIRED_OFILES): List long-to-compile files first.
775 (maint-deps): New, target for updating dependencies.
776 (dependencies): Update.
777 * maint-tool: Add dependency-generating option.
778 * configure.in: Check for _doprnt even if we're not providing it.
779 * configure: Regenerate.
781 * _doprnt.c: Modifications to allow compiling on any platform.
782 * copysign.c: Likewise.
783 * putenv.c: Likewise.
784 * setenv.c: Likewise.
785 * vsprintf.c: Likewise.
789 * mkstemps.c (mkstemps): On VMS, open temp file with option
790 that causes it to be deleted when closed.
794 * cp-demangle.c (long_options): Const-ify.
795 * cplus-dem.c (long_options): Likewise.
797 * cplus-dem.c (mystrstr): Delete. All callers changed to use
802 * aclocal.m4 (libiberty_AC_FUNC_STRNCMP): Use anon mmap as 2nd try.
803 * configure: Regenerated.
807 * configure.in (uintptr_t): Use AC_CHECK_TYPE.
808 * configure: Regenerated.
813 * cplus-dem.c (consume_count): Treat negative count as an error.
814 * testsuite/demangle-expected: Added testcase.
818 * configure.in: Hardcode that vfork works on VMS host.
819 * configure: Regenerated.
823 * cplus-dem.c (libiberty_demanglers): Add no_demangling case.
824 (cplus_demangle): Support no_demangling.
828 * _doprnt.c: Moved here from gcc/doprint.c. Adjust to build
829 in libiberty context. Fix typo in leading comment.
830 * configure.in: Fix various AC_DEFINEs so autoheader works.
831 If any of vprintf, vsprintf, vfprintf is missing from libc,
832 then AC_REPLACE_FUNCS(_doprnt).
837 * Makefile.in (stamp-h): Depend on Makefile for proper
839 (*-subdir): Depend on config.h for proper serialization.
843 * configure.in: Check for alloca.h (for regex.c and putenv.c).
844 * configure: Regenerate.
845 * config.h: Add HAVE_ALLOCA_H.
849 * regex.c: Check defined(__STDC__) || defined(ALMOST_STDC) ||
850 defined(HAVE_STRINGIZE) to determine whether ISO CPP token pasting
855 * config.in (HAVE_UINTPTR_T): Provide autoconf stub.
856 * configure.in (HAVE_UINTPTR_T): Test for system defining
857 uintptr_t and define HAVE_UINTPTR_T appropriately.
858 * regex.c (uintptr_t): Do not provide a definition if the
861 * regex.c (PREFIX): Provide an alternate definition for
862 non-ANSI/ISO compilers.
863 (ARG_PREFIX): Likewise.
867 * obstack.c (_): Honor the setting of ENABLE_NLS. Otherwise,
868 this code would end up calling gettext even in packages built
870 * getopt.c (_): Likewise.
871 * regex.c (_): Likewise.
875 * configure.in: Cope with missing makeinfo.
876 * configure: Regenerate.
880 * hex.c (hex_init): Provide empty stub.
882 * hex.c (hex_init): Delete.
883 (_hex_value): Const-ify and initialize at compile-time.
887 * Makefile.in ($(TARGETLIB)): Also generate pic/$(TARGETLIB) if
892 * argv.c, asprintf.c, choose-temp.c, concat.c, cplus-dem.c,
893 ffs.c, fnmatch.txh, getruntime.c, make-temp-file.c,
894 mkstemps.c, pexecute.c, random.c, strsignal.c, vasprintf.c:
895 Improve manual formatting.
896 * functions.texi: Regenerate.
900 * Makefile.in (TEXIFILES): Add fnmatch.txh.
902 maint-tool: Add "undoc" tool.
903 * alloca.c, argv.c, asprintf.c, choose-temp.c, concat.c,
904 fdmatch.c, ffs.c, getruntime.c, insque.c, lbasename.c,
905 make-temp-file.c, mkstemps.c, pexecute.c, random.c, spaces.c,
906 strerror.s, strsignal.c, strtol.c, vasprintf.c: Add or update
909 * functions.texi: Regenerate.
913 * bcmp.c, setenv.c: Use "nonzero" instead of "non-zero".
914 * strtod.c: Use "ISO C" instead of "ANSI C".
915 * functions.texi: Regenerate.
919 * alloca.c, clock.c, getcwd.c, getpagesize.c, getpwd.c, index.c,
920 libiberty.texi, memchr.c, putenv.c, rindex.c, strchr.c, strdup.c,
921 strerror.c, strrchr.c, strstr.c, strtod.c, tmpnam.c, vfork.c,
922 xatexit.c, xmalloc.c, xstrerror.c: Improve manual formatting. Fix
923 spelling. Give names to function arguments in documentation. Use
924 (void) prototypes in documentation.
925 * functions.texi: Regenerate.
929 * argv.c (buildargv, tests, main): Const-ify.
930 * cp-demangle.c (operator_code): Likewise.
931 * cplus-dem.c (optable, libiberty_demanglers,
932 cplus_demangle_set_style, cplus_demangle_name_to_style,
933 print_demangler_list): Likewise.
934 * hashtab.c (higher_prime_number): Likewise.
935 * strcasecmp.c (charmap): Likewise.
936 * strerror.c (error_info, strerror, main): Likewise.
937 * strncasecmp.c (charmap): Likewise.
938 * strsignal.c (signal_info): Likewise.
942 * configure: Regenerate.
946 * concat.c: Include stdlib.h.
950 * libiberty.texi: (Top level): Add syncodeindex pg. Add
951 @dircategory and @direntry directives. Add @finalout.
952 (many nodes): Lose the next,prev,up pointers on the @nide line.
953 (Using, Supplemental Functions, Replacement Functions): Fix
955 (Functions): Move around, to allow makeinfo to build the manual
956 without next,prev,up pointers in thye node lines.
957 (Licenses): Fix typos.
959 * index.c, rindex.c, strchr.c, strerror.c, strrchr.c, strstr.c,
960 strtol.c, xatexit.c, xexit.c, xmalloc.c: Fix spelling and markup.
961 * functions.texi: Regenerate.
963 * copying-lib.texi: Lose the next,prev,up pointers on the @node
968 * configure.in: Don't use in-tree texinfo, because libiberty must
969 be built before it. Check for makeinfo version 4 or higher.
970 * functions.texi: Regenerate.
975 * configure.in (MAKEINFO, PERL): Detect these.
976 (--enable-maintainer-mode): Add.
977 * configure: Regenerate.
978 * Makefile.in (MAKEINFO, PERL): Define.
979 (libiberty.info, libiberty.dvi, libiberty.html): New.
980 (CFILES): Add bsearch.c.
981 (CONFIGURED_OFILES): New, list of objects configure might add.
982 (maint-missing, maint-buildall): New, for maintainers only.
983 (clean, mostlyclean): Add info/dvi/html files.
984 * libiberty.texi, copying-lib.texi, obstacks.texi, functions.texi: New.
985 * gather-docs: New, for maintainers.
986 * maint-tool: New, for maintainers.
987 * alloca.c, atexit.c, basename.c, bcmp.c, bcopy.c, bsearch.c,
988 bzero.c, calloc.c, clock.c, configure.in, configure, getcwd.c,
989 getpagesize.c, getpwd.c, index.c, memchr.c, memcmp.c, memcpy.c,
990 memmove.c, memset.c, putenv.c, rename.c, rindex.c, setenv.c,
991 sigsetmask.c, strcasecmp.c, strchr.c, strdup.c, strerror.c,
992 strncasecmp.c, strncmp.c, strrchr.c, strstr.c, strtod.c, strtol.c,
993 tmpnam.c, vfork.c, vprintf.c, waitpid.c, xatexit.c, xexit.c,
994 xmalloc.c, xmemdup.c, xstrdup.c, xstrerror.c: Add or update
999 * concat.c (reconcat): Fix for traditional C.
1003 * concat.c (reconcat): New function.
1007 * concat.c (vconcat_length, vconcat_copy, concat_length,
1008 concat_copy, concat_copy2): New functions.
1009 (concat): Use vconcat_length/vconcat_copy.
1011 * alloca.c (libiberty_optr, libiberty_nptr, libiberty_len):
1016 * asprintf.c: Don't define USE_STDARG. Use VPARAMS, VA_OPEN,
1017 VA_FIXEDARG & VA_CLOSE.
1019 * vasprintf.c: Check HAVE_STRING_H when including string.h.
1020 (checkit): Delete redundant prototype. Add ATTRIBUTE_PRINTF_1.
1021 Use VA_OPEN, VA_FIXEDARG & VA_CLOSE. Free allocated string.
1025 * concat.c (concat): Use VPARAMS, VA_OPEN, VA_FIXEDARG & VA_CLOSE.
1029 * regex.c (truncate_wchar): Use wcrtomb not wctomb.
1033 * posix/regex.c [_LIBC] (convert_mbs_to_wcs): Use __mbrtowc
1035 [_LIBC]: Use __iswctype instead of iswctype, __wcslen instead of
1036 wcslen, and __wcscoll instead of wcscoll.
1040 * fibheap.c (fibheap_init, fibnode_init): Remove.
1041 (fibheap_new, fibnode_new): Use xcalloc to allocate and
1043 (fibheap_insert): Remove check for node allocation failure.
1047 * Makefile.in (fibheap.o): Depend on config.h.
1048 * fibheap.c: Tidy formatting. Use config.h.` Rearrange some
1049 functions for inlining.
1053 * configure.in: Need to set HAVE_SYS_ERRLIST and HAVE_SYS_NERR whenever
1055 * configure: Regenerate.
1059 * floatformat.c (floatformat_m88110_ext): Remove #ifdef
1060 HARRIS_FLOAT_FORMAT.
1061 (floatformat_ia64_spill_little, floatformat_ia64_quad_little)
1062 (floatformat_ia64_spill_big, floatformat_ia64_quad_big)
1063 (floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
1064 (floatformat_m88110_harris_ext): New float formats.
1068 * fibheap.c: New file. Fibonacci heap.
1070 * Makefile.in (CFILES): Add fibheap.c.
1071 (REQUIRED_OFILES): Add fibheap.o.
1072 (fibheap.o): Add dependencies for fibheap.o.
1076 * configure.in: Always set HAVE_SYS_ERRLIST when targetting cygwin.
1077 * configure: Regenerate.
1081 * hashtab.c (htab_hash_string): New.
1085 * floatformat.c (floatformat_ieee_double_littlebyte_bigword): Fix
1090 * regex.c (wcs_regex_compile): Use appropriate string
1091 to compare with collating element.
1092 Fix the padding for the alignment.
1096 * lbasename.c (lbasename): Change function definition to return a
1101 * cp-demangle.c (demangle_special_name): "GR" -> "reference temporary
1106 * Makefile.in (concat.o): Depend on config.h.
1110 * concat.c: Include "config.h".
1114 * regex.c: Declare wcs functions only if compiling with
1116 Don't use #elif for traditional C.
1120 * regex.c: Revamp memory allocation for WCHAR functions to
1121 not use too much stack.
1125 * regex.c: Declare wcs functions only if compiling with
1127 Don't use #elif for traditional C.
1131 * Makefile.in (regex.o): Add dependency on config.h.
1135 * regex.c (WORDCHAR_P) [WCHAR]: Also return true for the
1136 underscore character.
1140 * regex.c: Limit string length printed in debug messages to 100
1145 * regex.c: Place under LGPL version 2.1.
1149 * Makefile.in: Add support for regex code.
1150 * regex.c: New file.
1154 * Makefile.in: Add ffs.c dependency.
1155 * configure.in: Add ffs.c.
1160 * concat.c: Include <sys/types.h>.
1165 * strerror.c (sys_nerr): Hide the OS header version.
1166 * strsignal.c (sys_nsig): Likewise.
1170 * concat.c: Include string.h. Fix int vs size_t usage.
1171 Simplify the iteration loops. Use memcpy.
1175 * partition.c: Fix misspelling of `implementation'.
1179 * md5.c (md5_init_ctx): Declare constants as unsigned.
1180 (md5_process_block): Likewise.
1184 * cp-demangle.c (demangle_v3_with_details,
1185 is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor): Use K+R style
1186 function definition.
1187 * ternary.c: Use K+R style function definitions. Use PTR, not
1188 void *. Make arguments constant where possible.
1192 * splay-tree.h (splay_tree_max): New function.
1193 (splay_tree_min): Likewise.
1197 * ternary.c: New file - Ternary search tree implementation.
1199 * Makefile.in: Add ternary.o, and ternary.c dependencies.
1203 * make-temp-file.c (try): Inline.
1207 * Makefile.in (make-temp-file.o): Depend on config.h.
1211 * memchr.c (memchr): Adjust condition to avoid infinite loop.
1215 * cp-demangle.c (demangle_discriminator): `_0' is discriminator #1,
1216 `_' not followed by a digit is invalid.
1220 * cp-demangle.c (string_list_delete): Use dyn_string_delete
1221 instead of free, to free the contents as well as the string
1226 * make-temp-file.c: Always default DIR_SEPARATOR to '/'.
1227 Don't default P_tmpdir to anything. Try /var/tmp before
1232 * choose-temp.c: Split off make_temp_file, and the code
1233 duplicated between it and choose_temp_base, into...
1234 * make-temp-file.c: ... here; new file.
1236 * Makefile.in (CFILES): Add make-temp-file.c.
1237 (REQUIRED_OFILES): Add make-temp-file.o.
1241 * cp-demangle.c (struct demangling_def): New fields:
1242 is_constructor and is_destructor.
1243 (demangling_new): Initialize them.
1244 (demangle_ctor_dtor_name): Set them, if we detect a constructor
1246 (demangle_v3_with_details, is_gnu_v3_mangled_ctor,
1247 is_gnu_v3_mangled_dtor): New functions.
1251 * cplus-dem.c (main): Skip initial $.
1255 * hashtab.c (higher_prime_number): Silence warning that 4294967291
1256 might be a signed integer under pre-ISO C systems.
1261 * libiberty/lbasename.c: New file.
1262 * libiberty/Makefile.in: Update for lbasename.
1266 * aclocal.m4 (libiberty_AC_FUNC_C_ALLOCA): New.
1267 * configure.in: Replace all alloca logic with a simple use of
1268 the above new macro.
1269 * config.table: Kill *-*-beos* entry.
1270 * config/mh-beos: Delete.
1271 * configure, config.in: Regenerate.
1273 * Makefile.in (ALLOCA, HFILES): Kill.
1274 (REQUIRED_OFILES): Add alloca.o.
1275 (alloca.o): Depend on libiberty.h.
1276 (argv.o): Don't depend on alloca-conf.h.
1277 * alloca-conf.h: Delete.
1278 * alloca.c: Include libiberty.h. Kill all #ifdef emacs
1279 blocks. Provide the C alloca unconditionally. Use PTR where
1280 appropriate. Make i00afunc static.
1281 * argv.c: Don't include alloca-conf.h.
1285 * cplus-dem.c (main): Cast enum style to int.
1289 * cplus-dem.c (main): Initialize style.
1293 * COPYING.LIB: Update to LGPL 2.1 from the FSF.
1297 Add support for Java demangling under the v3 ABI:
1298 * cp-demangle.c (NAMESPACE_SEPARATOR): New define.
1299 (struct demangling_def): Add `style' field.
1300 (demangling_new): New parameter `style'. Set it in demangling_t.
1301 (demangle_prefix): Use NAMESPACE_SEPARATOR.
1302 (demangle_type_ptr): Don't emit pointer symbol if doing Java output.
1303 (cp_demangle): New parameter `style'. Pass it to demangling_new().
1304 (main): Call cp_demangle with extra parameter.
1305 (java_demangle_v3): New function.
1306 (java_builtin_type_names): New. Table of primitive type names used
1307 for Java demangling.
1308 (demangle_builtin_type): Look up in java_builtin_type_names if doing
1310 * cplus-dem.c (cplus_demangle): Use java_demangle_v3 to do Java
1312 (long_options): Remove obsolete `java' option.
1313 (main): Remove explicit handling of `java' option. Instead, pass style
1314 parameter in cplus_demangle flags as gdb does.
1315 * testsuite/demangle.expected: Add some Java test cases.
1319 * fnmatch.c: Make the note about the origins of this file more
1320 accurate, at least until we can sync with glibc.
1328 * bsearch.c: New file.
1329 * configure.in (funcs): Add bsearch.
1330 (AC_CHECK_FUNCS): Likewise.
1331 * configure, config.in: Regenerate.
1335 * safe-ctype.c: #include "ansidecl.h".
1336 * strtod.c: Likewise.
1340 * strtoul.c: Include safe-ctype.h, not ctype.h.
1344 * safe-ctype.c: New file.
1345 * Makefile.in (CFILES): Add safe-ctype.c.
1346 (REQUIRED_OFILES): Add safe-ctype.o.
1348 * argv.c: Define ISBLANK and use it, not isspace.
1349 * basename.c, cplus-dem.c, fnmatch.c, pexecute.c, strtod.c,
1350 strtol.c, strtoul.c: Include safe-ctype.h, not ctype.h. Use
1351 uppercase ctype macros. Don't test ISUPPER(c)/ISLOWER(c)
1352 before calling TOLOWER(c)/TOUPPER(c).
1356 * Makefile.in (distclean): When cleaning, remove testsuite.
1360 * cp-demangle.c (cplus_demangle_v3): Check that it's a v3 mangled
1361 name before allocating the dyn_string.
1365 * cp-demangle.c: s/new_abi/v3/.
1366 * cplus-dem.c: Likewise.
1367 (current_demangling_style): Now auto_demangling.
1368 (cplus_demangle): Try v3 demangling if AUTO_DEMANGLING.
1369 (main): Use standard symbol chars for auto_demangling.
1373 * hashtab.c (higher_prime_number): Use a table, rather than a
1374 seive, to find the next prime.
1378 * cplus-dem.c (main): Handle gnat_demangling.
1382 * aclocal.m4 (LIB_AC_PROG_CC): Moved here from configure.in.
1383 (AC_DEFINE_NOAUTOHEADER): New - work around bug in autoheader.
1384 * configure.in: Call AC_C_INLINE and AC_C_CONST. Use three
1385 argument form of AC_DEFINE in dummy definitions block. Use
1386 AC_DEFINE_NOAUTOHEADER for real definitions of things defined
1387 in dummy block. Preload cache variables instead of bypassing
1388 tests, where possible.
1389 * acconfig.h: Removed.
1391 * xmalloc.c (xmalloc_failed): New function, does error
1392 reporting on failed allocation.
1393 (xmalloc, xcalloc, xrealloc): Use it.
1397 * cplus-dem.c (cplus_demangle): Fix formatting.
1399 (ada_demangle): Ditto.
1400 (internal_cplus_demangle): Ditto.
1405 * cplus-dem.c (main): Handle java_demangling.
1409 * cplus-dem.c (grow_vect): Prototype.
1410 (ada_demangle): Cast the arg of ctype macros to unsigned char.
1414 * cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED for
1419 * cplus-dem.c: Eliminate use of DEFUN, it is obsolete and cannot
1424 * cplus-dem.c: Add gnat demangler. Add java to demangle style
1429 * hashtab.c (htab_expand): Change to return int. Use calloc or
1430 xcalloc depending on htab->return_allocation_failure. Return zero
1432 (htab_create): Update comment to cover memory allocation.
1433 (htab_try_create): New.
1434 (htab_find_slot_with_hash): Return NULL if htab_expand fails.
1435 Update comment to cover this.
1439 * hashtab.c: Change void * to PTR where necessary.
1440 (htab_create, htab_expand): Correct formatting of comment before
1445 * cp-demangle.c (string_list_def): Add caret_position and comments.
1446 (result_caret_pos): New macro.
1447 (result_append_string): Rename to...
1448 (result_add_string): ... this, and insert at caret position.
1450 (result_append): Rename to...
1451 (result_add): ... this, and insert at caret position. Rename
1453 (result_append_char): Rename to...
1454 (result_add_char): ... this, and insert at caret position. Rename
1456 (result_append_space): Remove.
1457 (string_list_new): Initialize caret position.
1458 (result_add_separated_char): Use caret position.
1459 (result_get_caret): New funtion.
1460 (result_set_caret): Likewise.
1461 (result_shift_caret): Likewise.
1462 (result_previous_char_is_space): Likewise.
1463 (substitution_start): Use caret position.
1464 (substitution_add): Likewise.
1465 (demangling_new): Initialize caret position.
1466 (demangle_encoding): Use caret position.
1467 (demanglin_nested_name): Put CV qualifiers after name.
1468 (demangle_type_ptr): Use switch statement. Handle pointers to
1469 arrays. Don't use result_append_space. Use caret position.
1470 (demangle_type): Emit CV qualifiers after underlying type. Adjust
1471 call to demangle_array_type.
1472 (demangle_array_type): Add parameter to handle pointers to arrays.
1476 * splay-tree.c (splay_tree_insert): Fix formatting.
1480 * splay-tree.c (splay_tree_predecessor): Fix typo in comment.
1484 * splay-tree.c: #include <stdio.h>.
1488 * testsuite/demangle-expected: Add two tests for anonymous
1490 * cplus-dem.c (gnu_special): Handle anonymous namespaces.
1494 * splay-tree.c (splay_tree_predecessor): New function.
1495 (splay_tree_successor): Likewise.
1499 * testsuite/demangle-expected: Add four tests for type_info
1501 * cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type,
1502 for a non-template non-qualified type_info function or node.
1506 * cp-demangle.c: Fix copyright banner.
1510 * md5.c: #include "ansidecl.h".
1514 * cp-demangle.c (status_allocation_failed): Rearrange whitespace.
1515 (demangle_type): Handle substitution candidates correctly in the
1516 face of special substitutions.
1520 * cp-demangle.c (demangle_encoding): Rename variable.
1521 (demangle_name): Rename parameter. Handle return type
1523 (demangle_nested_name): Rename parameter.
1524 (demangle_prefix): Likewise. Change return type suppression.
1525 (demangle_unqualified_name): Add parameter. Flag constructors and
1526 conversion operators.
1527 (demangle_special_name): Fix comment.
1528 (demangle_type): Rename variable.
1529 (demangle_bare_function_type): Check for missing return type and
1531 (demangle_class_enum_type): Rename parameter.
1532 (demangle_discriminator): Fix misspelling in comment.
1536 * configure.in (Cygwin): special case cygwin only when we're
1537 building cygwin, not when we're hosting cygwin.
1541 * cp-demangle.c (demangle_template_arg): Eat an `E' after an
1546 * cp-demangle.c (demangle_type_ptr): Increment position past
1547 pointer and reference characters.
1551 * cp-demangle.c (demangle_nv_offset): New function.
1552 (demangle_v_offset): Likewise.
1553 (demangle_call_offset): Likewise.
1554 (demangle_special_name): Update thunk demangling to comply with
1559 * cp-demangle.c (ANONYMOUS_NAMESPACE_PREFIX): New macro.
1560 (substitution_def): Remove template_parm_number.
1561 (NOT_TEMPLATE_PARM): Remove.
1562 (result_insert_string): New macro.
1563 (result_insert): Likewise.
1564 (result_insert_char): Likewise.
1565 (substitution_add): Remove last parameter. Don't store template
1567 (BFT_NO_RETURN_TYPE): Define as NULL.
1568 (demangle_encoding): Adjust call to demangle_bare_function_type.
1569 (demangle_name): Adjust substitution. Adjust call to
1571 (demangle_prefix): Adjust call to substitution_add.
1572 (demangle_identifier): Handle anonymous namespaces.
1573 (demangle_operator_name): Change demangling of vendor-extended
1574 operator to match ABI changes.
1575 (demangle_type_ptr): Change parameters. Make recursive. Handle
1577 (demangle_type): Adjust calls to demangle_template_param,
1578 substitution_add, and demangle_type_ptr. Fix substitution of
1580 (demangle_function_type): Change parameter to a pointer.
1581 (demangle_bare_function_type): Likewise. Adjust insertion point.
1582 (demangle_template_param): Remove last parameter.
1583 (demangle_expr_primary): Remove unused variable. Adjust call to
1584 demangle_template_param.
1585 (is_mangled_char): Accept `$' and `.'.
1586 * cplus-dem.c (gnu_new_abi_symbol_characters): Add '$' and '.'.
1587 * dyn-string.c (dyn_string_insert_char): New function.
1591 * testsuite/demangle-expected: Add nine tests for
1592 underscore-after-number followed by five tests for name-signature
1597 * Makefile.in (md5.o): Depend on config.h.
1601 * Makefile.in (REQUIRED_OFILES): Add md5.o.
1602 (CFILES): Add md5.c.
1607 * cp-demangle.c (demangle_name): Initialize template_p in local
1608 name case. Don't re-add substitutions as candidates.
1609 (demangle_nested_name): Use <unqualified-name>.
1610 (demangle_prefix): Likewise. Don't add template names as
1611 substitution candidates twice, or re-add a substitution or the
1612 last prefix component.
1613 (demangle_local_name): Adjust output format.
1617 * cp-demangle.c (result_add_separated_char): Change parameter to
1619 (substitution_add): Don't check for duplicates. Check if
1620 previously allocated size is zero.
1621 (demangle_name): Remove duplicate check for std substitution.
1622 Clear template flag appropriately.
1623 (demangle_prefix): Remove argument to demangle_substitution.
1624 Don't check that template flag is already set.
1625 (demangle_operator_name): Add pt operator.
1626 (demangle_type): Don't treat r as built-in type. Remove argument
1627 to demangle_substitution. Fix substitution candidate mechanics.
1628 Handle <template-template-parm>s. Improve comments.
1629 (demangle_template_param): Don't handle template arg lists here.
1630 (demangle_substitution): Remove parameter.
1631 (print_usage): Remove extra fprintf option.
1635 * libiberty/random.c (end_ptr): Revert previous change.
1639 * libiberty/cplus-dem.c (cplus_demangle_opname, cplus_mangle_opname,
1640 demangle_expression, demangle_function_name): Use ARRAY_SIZE.
1641 * libiberty/random.c (end_ptr): Likewise.
1645 * cp-demangle.c (result_close_template_list): Remove function.
1646 (result_add_separated_char): New function.
1647 (result_open_template_list): New macro.
1648 (result_close_template_list): Likewise.
1649 (demangle_prefix): Don't set template_p if the
1650 prefix ends with a ctor name.
1651 (demangle_type_ptr): Remove duplicate RETURN_IF_ERROR.
1652 (demangle_type): Check for template args after substitution.
1653 (demangle_template_args): Use result_open_template_list.
1657 * pexecute.c: Don't use vfork. Initialize 'pid' before retry loop.
1661 * config/mh-openedition.h: Added -DLE370 definition.
1665 * pexecute.c (pexecute) [__MSDOS__]: Change __GO32__ to
1666 __DJGPP__. Use P_WAIT instead of constant in the spawnv* call.
1667 Cast program to 'char *' in errmsg_arg assignment.
1668 (PWAIT_ERROR): Define.
1669 (pwait): Use PWAIT_ERROR. Adjust DJGPP's status code to conform
1670 to DJGPP's WIF* macros.
1675 * getcwd.c: Include string.h, stdlib.h for prototypes
1677 * Makefile.in (rename.o, waitpid.o): Depend on config.h
1678 * rename.c: Include config.h, unistd.h
1679 * waitpid.c: Include config.h, sys/wait.h
1683 * cplus-dem.c (work_stuff_copy_to_from): New.
1684 (delete_non_B_K_work_stuff): New.
1685 (delete_work_stuff): New.
1686 (mop_up): Break out work_stuff partly destruction to
1687 delete_non_B_K_work_stuff.
1688 (iterate_demangle_function): New.
1689 (demangle_prefix): Call iterate_demangle_function instead of
1690 demangle_function_name. Leave handling of name-signature
1691 __-delimiters to iterate_demangle_function.
1692 (demangle_integral_value): Strip an optional
1693 following underscore cautiously. Handle negative numbers.
1697 * cplus-dem.c (demangle_signature): Change if (GNU_DEMANGLING) to
1698 if (AUTO_DEMANGLING || GNU_DEMANGLING)
1702 * cp-demangle.c (demangle_ctor_dtor_name): Remove not-in-charge
1703 allocating ctor mangling.
1704 (demangle_array_type): Handle empty and non-constant array length.
1709 * configure.in (AC_CHECK_HEADERS): Add time.h.
1710 (AC_HEADER_TIME): Add check.
1711 * configure, config.in: Regenerate.
1712 * getruntime.c: Portably #include <sys/time.h> and/or <time.h>.
1714 * configure.in (AC_CHECK_HEADERS): Add limits.h.
1715 * configure, config.in: Regenerate.
1716 * sort.c: Portably #include <limits.h> and/or <sys/param.h>.
1717 * strtol.c, strtoul.c: #include "config.h". Portably #include
1718 <limits.h> and/or <sys/param.h>.
1719 * Makefile.in (strtol.o, strtoul.o): Update dependencies.
1721 * aclocal.m4 (libiberty_AC_DECLARE_ERRNO): New macro.
1722 * configure.in (libiberty_AC_DECLARE_ERRNO): Add check.
1723 * configure, config.in: Regenerate.
1724 * pexecute.c, strtol.c, strtoul.c: Declare errno if necessary.
1726 * cp-demangle.c, mkstemps.c: #include <sys/types.h>.
1730 * Makefile.in (xexit.o): Add dependency for config.h in xexit.c.
1731 * (vasprintf.o): Add dependency for config.h in vasprintf.c.
1735 * cp-demangle.c (cp_demangle_type): Wrap in IN_LIBGCC2.
1737 * setenv.c (setenv): Initialize variable `ep'.
1739 * sigsetmask.c (abort): Prototype.
1741 * vasprintf.c: Include config.h. Check ANSI_PROTOTYPES, not
1742 __STDC__ for stdarg.h include.
1743 (int_vasprintf): Prototype.
1744 (checkit): Prototype. Use VPARAMS/ANSI_PROTOTYPES/VA_START in
1745 definition. Cast `global_total_width' in comparison.
1746 (main): Prototype. Return a value.
1748 * vfork.c (fork): Prototype.
1750 * xexit.c: Include config.h.
1754 * cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int,
1755 and print it with %u.
1759 * testsuite/regress-demangle (failed test): Show result and
1764 * cplus-dem.c (main): fflush() after emitting last char before
1769 * cp-demangle.c (demangle_encoding): Accept no substitutions.
1770 (demangle_name): Handle <substitution> followed by
1771 <unqualified-template-name>.
1772 (demangle_type): Follow special substitutions with
1774 (demangle_subtitution): Set template_p for special substitutions.
1779 * cp-demangle.c (demangle_special_name): Swap base and derived
1780 class when demangling construction vtables.
1784 * cp-demangle.c: Don't include ctype.h.
1785 (IS_DIGIT): New macro.
1786 (IS_ALPHA): Likewise. Use IS_DIGIT and IS_ALPHA throughout
1787 instead of isdigit and isalpanum.
1788 (demangling_def): Make name and next const pointers.
1789 (STATUS_ALLOCATION_FAILED): New status code.
1790 (dyn_string_append_space): Handle failure in
1791 dyn_string_append_char.
1792 (int_to_dyn_string): Likewise. Change return value to status_t.
1793 (string_list_new): Handle failure of dyn_string_init.
1794 (result_close_template_list): Change return type to status_t.
1795 Handle failure in dyn_string_append.
1796 (result_push): Change return value to status_t. Handle failure in
1797 string_list_new. Handle failure of result_push throughout.
1798 (substitution_add): Change return value to status_t. Handle
1799 dyn_string failures. Handle failure of substitution_add
1801 (template_arg_list_new): Return NULL on allocation failure.
1802 (result_append_string): Return STATUS_ALLOCATION_FAILED on error.
1803 Handle error result throughout.
1804 (result_append): Likewise.
1805 (result_append_char): Likewise.
1806 (result_append_space): Likewise.
1807 (demangling_new): Make argument a const pointer. Handle
1808 allocation failures.
1809 (demangle_template_args): Handle failure in template_arg_list_new
1810 and result_close_template_list.
1811 (demangle_discriminator): Return if int_to_dyn_string fails.
1812 (cp_demangle): Likewise.
1813 (cp_demangle_type): New function.
1814 (cplus_demangle_new_abi): Don't call dyn_string_delete. Abort on
1815 memory allocation failure.
1817 * dyn-string.c (RETURN_ON_ALLOCATION_FAILURE): Define if
1819 (dyn_string_init): Change return value to int. Handle
1820 RETURN_ON_ALLOCATION_FAILURE case.
1821 (dyn_string_new): Handle RETURN_ON_ALLOCATION_FAILURE case.
1822 (dyn_string_release): Delete the dyn_string.
1823 (dyn_string_resize): Handle RETURN_ON_ALLOCATION_FAILURE case.
1824 (dyn_string_copy): Change return type to int.
1825 (dyn_string_copy_cstr): Likewise.
1826 (dyn_string_prepend): Likewise.
1827 (dyn_string_prepend_cstr): Likewise.
1828 (dyn_string_insert): Likewise.
1829 (dyn_string_insert_cstr): Likewise.
1830 (dyn_string_append): Likewise.
1831 (dyn_string_append_cstr): Likewise.
1832 (dyn_string_append_char): Likewise.
1833 (dyn_string_substring): Likewise.
1837 * cp-demangle.c (demangle_operator_name): Add spaces before
1838 names beginning with a letter: delete, delete[], new, new[],
1840 (demangle_special_name): Handle TF <type> and TJ <type>.
1844 * cp-demangle.c (template_arg_list_new): Revert previous PARAMS patch.
1848 * cp-demangle.c (stdio.h): File included unconditionaly.
1849 (template_arg_list_new): Parameter list is PARAMS ((void)), not ().
1850 * dyn-string.c (stdio.h): File included.
1851 * partition.c (partition_print): No `&' needed to take the address of
1856 * configure.in (ac_libiberty_warn_cflags): Add -pedantic.
1858 * choose-temp.c (try, choose_temp_base, make_temp_file): Constify.
1860 * cp-demangle.c (demangle_char): Change parameter from char to int.
1861 (demangle_expression, demangle_expr_primary): Remove extra
1862 semi-colon in prototype.
1864 * dyn-string.c (dyn_string_append_char): Change parameter from
1867 * memcmp.c (memcmp): Constify.
1869 * mkstemps.c (gcc_uint64_t): Mark GNUC `long long' case with
1872 * partition.c (elem_compare): Prototype. Don't cast away
1875 * setenv.c (setenv): Use braces to avoid ambiguous `else'.
1879 * Makefile.in (cp-demangle.o): Depend on $(INCDIR)/demangle.h.
1881 * cp-demangle.c: Include demangle.h.
1882 (template_arg_list_new): DeANSIfy.
1883 (cp_demangle): Make static and add prototype.
1884 (operator_code, operators): Constify.
1885 (demangle_operator_name): Likewise for variables `p1', `p2' and `p'.
1889 * cp-demangle.c (demangle_prefix): Cast argument to isdigit to
1891 (demangle_unqualified_name): Likewise.
1892 (demangle_number_literally): Likewise.
1893 (demangle_type): Likewise.
1894 (demangle_substitution): Likewise.
1895 (is_mangled_char): Likewise, for isalnum.
1899 * Makefile.in (CFILES): Add cp-demangle.c and dyn-string.c.
1900 (REQUIRED_OFILES): Add cp-demangle.o and dyn-string.o.
1901 (cp-demangle.o): New dependency.
1902 (dyn-string.o): Likewise.
1904 * dyn-string.c: Move here from gcc/dyn-string.c. Add new functions.
1906 * cplus-dem.c (libiberty_demanglers): Add initializer for new-ABI
1908 (cplus_demangle): Call cplus_demangle_new_abi if in new-ABI
1910 (gnu_new_abi_symbol_characters): New function.
1911 (main): Use gnu_new_abi_symbol_characters. * cp-demangle.c: New
1913 * cp-demangle.c: New file.
1917 * floatformat.c: Add name to each floatformat field.
1921 * Makefile.in (objalloc.o): Depend on config.h
1925 * hashtab.c, partition.c, sort.c, xmemdup.c: Include string.h
1927 * pexecute.c, xexit.c: Include stdlib.h if HAVE_STDLIB_H.
1928 * objalloc.c: Include config.h. Include stdlib.h and don't
1929 declare malloc or free if HAVE_STDLIB_H.
1930 * strerror.c, strsignal.c: Include stdlib.h if HAVE_STDLIB_H,
1931 else declare malloc without prototype. Include string.h if
1932 HAVE_STRING_H, else declare memset without prototype. Don't
1937 * Makefile.in (xmalloc.o): Add dependency for config.h, fixes make
1942 * xmalloc.c: Include config.h for HAVE_SBRK definition.
1946 * hashtab.c (hash_pointer): Delete low-order bits which are
1947 probably zero, also eliminate a warning on alpha.
1951 * Makefile.in: Change "pic" to depend on $(PICFLAG), not
1952 on $(enable_shared).
1956 * config.table: Use mh-sparcpic for sparc*-*-*.
1960 * Makefile.in (CFILES): Add strncmp.c.
1961 (NEEDED): Add strncmp.
1965 * cplus-dem.c (cplus_demangle_opname, demangle_function_name):
1966 Cast the arguments to `islower' to `unsigned char'.
1967 (print_demangler_list): Prototype.
1971 * sort.c (UCHAR_MAX): Provide fallback definition.
1975 * Makefile.in (maintainer-clean-subdir): Fix handling of empty
1981 * cplus-dem.c (libiberty_demanglers): New table for demangle styles.
1982 (cplus_demangle_set_style): New function for setting style.
1983 (cplus_demangle_name_to_style): New function to translate name.
1987 * aclocal.m4: New file with new test libiberty_AC_FUNC_STRNCMP.
1989 * configure.in (AC_CHECK_HEADERS): Add sys/mman.h fcntl.h.
1990 (libiberty_AC_FUNC_STRNCMP): Invoke.
1992 * strncmp.c: New file.
1996 * hashtab.c (htab_expand): Add prototype.
1997 (find_empty_slot_for_expand): Likewise.
2001 * hashtab.c (hash_pointer, eq_pointer): Make definition static to
2003 (htab_expand): Cast the return value of xcalloc.
2007 * hashtab.c (hash_pointer): New function.
2008 (eq_pointer): Likewise.
2009 (htab_hash_pointer): New variable.
2010 (htab_eq_pointer): Likewise.
2014 * sort.c (sort_pointers): Fix endianness bugs.
2017 * Makefile.in (CFILES): Add sort.c
2018 (REQUIRED_OFILES): Add sort.o.
2019 (sort.o): New target.
2023 * Makefile.in (*-subdir): Revamp slightly to avoid losing on
2028 * hashtab.c: Various minor cleanups.
2029 (htab_find_slot_with_hash): INSERT is now enum insert_option.
2030 (htab_find_slot): Likewise.
2034 * cplus-dem.c (cplus_demangle_opname): Changed to use islower.
2038 * splay-tree.c (splay_tree_remove): New.
2042 * hashtab.c (find_empty_slot_for_expand): Use hashval_t for hash
2044 (htab_find_with_hash): Likewise.
2045 (htab_find_slot_with_hash): Likewise.
2049 * hashtab.c (htab_find_with_hash): Avoid calculating hash2
2050 unless it will be used. Rearrange loop for better
2052 (higher_prime_number): Add static prototype.
2056 * Makefile.in (partition.o): Depend on config.h
2060 * hashtab.c (find_empty_slot_for_expand): New function.
2061 (htab_expand): Use it instead of htab_find_slot.
2062 (htab_find_with_hash): Renamed from htab_find; now accepts extra
2064 (htab_find_slot_with_hash): Likewise for htab_find_slot.
2065 (htab_find): New wrapper function.
2066 (htab_find_slot): Likewise.
2067 (htab_traverse): Pass slot, not entry, to called function.
2071 * Makefile.in (CFILES): Add partition.c.
2072 (REQUIRED_OFILES): Add partition.o.
2073 (partition.o): New rule.
2074 * partition.c: New file.
2078 * hashtab.c (htab_create): Set del_f.
2079 (htab_delete, htab_empty, htab_remove_elt, htab_clear_slot):
2084 * hashtab.c: Remove debugging variables (all_searches,
2085 all_collisions, all_expansions). Delete
2086 all_hash_table_collisions.
2087 (create_hash_table, delete_hash_table, empty_hash_table,
2088 find_hash_table_entry, remove_element_from_hash_table_entry,
2089 clear_hash_table_slot, traverse_hash_table, hash_table_size,
2090 hash_table_elements_number, hash_table_collisions): Rename to:
2091 htab_create, htab_delete, htab_empty, htab_find_slot,
2092 htab_remove_elt, htab_clear_slot, htab_traverse, htab_size,
2093 htab_elements, htab_collisions.
2094 (htab_find): New function, handles common case where you don't
2095 plan to add or delete an entry.
2096 (htab_expand): Don't create a whole new table, just a new
2098 (htab_find_slot): Simplify logic.
2102 * floatformat.c: Add casts to avoid signed/unsigned warnings.
2103 * pexecute.c: Add ATTRIBUTE_UNUSED as needed on Unix.
2105 * Makefile.in (install_to_libdir): Change $(TARGETLIB).n to
2106 $(TARGETLIB)n so it works on MSDOS.
2107 (install_to_tooldir): Likewise.
2112 * makefile.dos: Remove; obsolete.
2113 * configure.bat: Remove; obsolete.
2117 * splay-tree.c (splay_tree_insert): Add initialization to avoid
2122 * pexecute.c: Conditionally include string.h.
2123 (fix_argv): Handle embedded whitespace in args for Mingw32.
2127 * configure.in (ac_libiberty_warn_cflags): Turn on warnings if
2130 * Makefile.in (COMPILE.c): Add @ac_libiberty_warn_cflags@
2134 * vasprintf.c (int_vasprintf): Don't re-read the format character
2135 as this mishandles strings like '%%s'.
2139 * splay-tree.c (splay_tree_new): Use struct splay_tree_node_s
2140 rather than struct splay_tree_node.
2141 (splay_tree_insert): Use struct splay_tree_s rather than struct
2146 * hashtab.c (sys/types.h): File included.
2150 * strtoul.c, strtol.c, random.c: Remove advertising clause from
2151 BSD license, pursuant with
2153 ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change
2157 * hashtab.c: Include stdio.h.
2161 * hashtab.c (traverse_hash_table): Protect prototype with PARAMS.
2165 * xstrdup (sys/types.h): Include this file.
2169 * Makefile.in (SUBDIRS): New macro.
2170 (mostlyclean, clean, distclean, maintainer-clean): Adjust to
2171 avoid multiple subdirectory cleaning.
2172 (*-subdir): Use SUBDIRS.
2174 1999-10-25 Jim Kingdon <http://developer.redhat.com/>
2176 * cplus-dem.c: Move declarations of standard_symbol_characters and
2177 hp_symbol_characters inside #ifdef MAIN to avoid compiler
2182 * hashtab.c (find_hash_table_entry): When returning a
2183 DELETED_ENTRY slot, change it to EMPTY_ENTRY first.
2184 (clear_hash_table_slot): New function which deletes an entry
2185 by its position in the table, not its value.
2186 (traverse_hash_table): New function which calls a hook
2187 function for every live entry in the table.
2191 * cplus-dem.c (INTBUF_SIZE): New macro.
2192 (string_append_template_idx): New function.
2193 (demangle_expression): Likewise.
2194 (demangle_integral_value): Use it.
2195 (demangle_real_value): New function, split out from ...
2196 (demangle_template_value_parm): ... here. Use
2197 string_append_template_idx. Use demangle_real_value.
2198 (demangle_template): Use string_append_template_idx.
2199 (demangle_qualified): Use consume_count_with_underscores.
2200 (get_count): Tweak formatting.
2201 (do_type): Use string_append_template_idx.
2205 * calloc.c: Add a public domain notice.
2209 * setenv.c (sys/types.h, stdio.h): Include those files unconditionaly.
2213 * Makefile.in (CFILES): Add hashtab.c
2214 (REQUIRED_OFILES): Add hashtab.o
2215 (hashtab.o): Add dependencies.
2216 * hashtab.c: New file
2220 * basename.c (DIR_SEPARATOR): New macro.
2221 (DIR_SEPARATOR_2): Likewise.
2222 (HAVE_DOS_BASED_FILESYSTEM): Likewise.
2223 (IS_DIR_SEPARATOR): Likewise.
2224 (main): Handle MSDOS style pathname.
2228 * cplus-dem.c (do_type): Handle pointer to member types whose
2229 enclosing classes have namespace scope.
2233 * config.table: Provide a backup shell for executing move-if-change.
2237 * xmalloc.c (xmalloc): Fix spelling error.
2238 (xcalloc, xrealloc): Likewise.
2242 * cplus-dem.c (fancy_abort, demangle_integral_value,
2243 demangle_arm_hp_template, recursively_demangle,
2244 standard_symbol_characters, hp_symbol_characters, main): Add prototype.
2245 (program_name, program_version, fatal): Constify a char*.
2246 (usage, fatal): Mark with ATTRIBUTE_NORETURN.
2247 (main): Call return, not exit.
2251 * choose-temp.c: Remove obsolete comment about gcc.
2252 (make_temp_file): Constify a char*.
2256 * xmemdup.c: Include sys/types.h.
2260 * xmemdup.c: New xmemdup function.
2261 * Makefile.in, makefile.vms, vmsbuild.com: Use xmemdup.[co].
2265 * config.table: Add openedition target.
2266 * config/mh-openedition: New file.
2270 * pexecute.c (pexecute): Fill in temp_base when needed.
2274 * getpwd.c: Check HAVE_GETCWD before defining it away.
2278 * Makefile.in (CFILES): Add calloc.c and getpwd.c.
2279 (REQUIRED_OFILES): Add getpwd.o.
2280 (getpwd.o): Add target.
2282 * configure.in (AC_PREREQ): Bump to 2.13.
2283 (AC_CHECK_HEADERS): Add check for <sys/stat.h>.
2285 * getpwd.c: New file, moved here from gcc.
2289 * cplus-dem.c (gnu_special): Cast a `size_t' to `long' when
2290 comparing against a signed quantity.
2291 (arm_special): Likewise.
2292 (demangle_fund_type): Likewise.
2293 (do_hpacc_template_const_value): Mark parameter `work' with
2295 (main): Constify variable `valid_symbols'.
2299 * strtoul.c (strtoul): Add parentheses around && within ||.
2303 * Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix,
2304 libdir, libsubdir and tooldir.
2308 * splay-tree.c (splay_tree_insert): Return the new node.
2312 * argv.c: Include stdlib.h and string.h instead of
2313 prototyping directly.
2314 * choose-temp.c: Conditionally include string.h.
2318 * Makefile.in (NEEDED): Add bcmp, bcopy, bzero.
2322 * splay-tree.c (splay_tree_insert): Add initialization to avoid
2327 * Makefile.in (needed-list): Only include stuff we actually need
2332 * configure.in (checkfuncs): Add gettimeofday.
2333 * config.in, configure: Regenerated.
2337 * configure.in (*-*-uwin*): UWIN has sys_{errlist,nerr} even if
2339 * configure: Regenerate.
2343 * Makefile.in (setenv.o): Add config.h dep for setenv.o to fix
2348 * putenv.c: Include ansidecl.h to define `const'.
2349 * setenv.c: Likewise.
2353 * Makefile.in (CFILES): Add putenv.c and setenv.c.
2354 * configure.in (funcs): Add putenv and setenv.
2355 (AC_CHECK_FUNCS): Check for putenv and setenv.
2356 * configure: Rebuilt.
2357 * putenv.c setenv.c: New files.
2359 * getcwd.c (getcwd): If pathname is NULL, then obtain SIZE
2360 bytes of space using malloc.
2364 * cplus-dem.c (demangle_fund_type (near 'I' case)): Don't advance
2365 the *mangled pointer beyond the end of the string. Clean up code to
2366 match prevailing coding style.
2370 * tmpnam.c (L_tmpnam): Fix typo.
2374 * cplus-dem.c (standard_symbol_characters): Renamed from
2375 standard_symbol_alphabet. No longer modify TABLE.
2376 (hp_symbol_characters): Renamed from hp_symbol_alphabet. No longer
2378 (main): Corresponding changes. Use strchr to determine if a
2383 * cplus-dem.c (main): Use table lookup to distinguish identifier
2384 characters from non-identifier characters.
2385 (standard_symbol_alphabet, hp_symbol_alphabet): New functions.
2389 * configure.in (sys/resource.h): Add to AC_CHECK_HEADERS list.
2390 * getruntime.c: Only attempt to include sys/resource.h and
2391 use getrusage if both HAVE_GETRUSAGE and HAVE_SYS_RESOURCE_H
2396 * configure.in (alloca detection): Handle alloca directly for interix.
2397 * configure: Rebuilt.
2401 * choose-temp.c (DIR_SEPARATOR): Use '\\' only for native windows32.
2405 Fix from Dale Hawkins:
2406 * cplus-dem.c (mop_up): Set typevec_size to zero, so it'll be
2407 reallocated properly if we use it again.
2409 * cplus-dem.c (demangle_fund_type): Check for buffer overrun. Be
2410 stricter about syntax. Always null-terminate string.
2414 * configure.in (checkfuncs): Check for sbrk.
2415 * config.in: Rebuilt.
2416 * configure: Likewise.
2417 * xmalloc.c: Use HAVE_SBRK instead of the host specific definitions.
2421 Fix from Marcus Daniels:
2422 * cplus-dem.c (demangle_fund_type): Don't run off the end of the
2423 identifier looking for another underscore.
2427 * pexecute.c: Change all references to __UWIN__ to _UWIN.
2428 * xmalloc.c: Likewise.
2429 (xcalloc): UWIN has sbrk.
2430 (xrealloc): Fix guard macro.
2434 * alloca-conf.h (alloca) [C_ALLOCA]: Don't use Gcc builtin
2436 * clock.c (GNU_HZ): New definition.
2438 * getruntime.c: Likewise.
2440 * config.table: Use mh-beos.
2441 * config/mh-beos: New file.
2445 * cplus-dem.c (demangle_template_value_parm): Handle
2446 pointers-to-members.
2447 (do_type): Handle template parameters as qualifiers.
2451 * cplus-dem.c: Attempt to handle overflows in counts with some
2453 (consume_count): Detect overflows. Return -1 to indicate errors,
2455 (demangle_template_value_parm, demangle_template): Handle change
2456 to consume_count's return convention.
2460 * testsuite/regress-demangle: New file.
2461 * testsuite/demangle-expected: New file.
2463 * Makefile.in (all, check, installcheck, info, install-info,
2464 clean-info, dvi, install, etags, tags, mostlyclean, clean,
2465 distclean, maintainer-clean, realclean): Depend on corresponding
2467 (all-subdir check-subdir installcheck-subdir info-subdir
2468 install-info-subdir clean-info-subdir dvi-subdir
2469 install-info-subdir etags-subdir mostlyclean-subdir clean-subdir
2470 distclean-subdir maintainer-clean-subdir): New target.
2471 * testsuite/Makefile.in: New file.
2472 * configure: Rebuilt.
2473 * configure.in: Create testsuite/Makefile.
2477 * splay-tree.h (splay_tree_compare_pointers): Define.
2481 * splay-tree.c (splay_tree_compare_ints): Define.
2485 * cplus-dem.c (consume_count): If `count' wraps, return 0 and
2486 don't advance input pointer.
2487 (demangle_class_name): If consume_count didn't find a count, do
2488 nothing. Don't bother with `strlen' sanity check; consume_count
2494 * cplus-dem.c (demangle_prefix): Don't grab all the '__' strings
2495 when doing arm or hp style.
2496 (demangle_nested_args): Decr forgetting_types field when done.
2500 * pexecute.c (__CYGWIN32__): Rename to
2502 * xmalloc.c: Likewise.
2504 Changes to support i386-pc-uwin.
2505 * configure.in (*-*-uwin*): Workaround for vfork bug.
2506 * configure: Regenerate.
2507 * pexecute.c (pexecute): Be like standard Unix.
2509 * xmalloc.c (first_break): Define.
2510 (xmalloc_set_program_name): Use.
2515 * config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc
2519 * config.table: Check cygwin*, not cygwin32*.
2523 * Makefile.in: Change mkstemp -> mkstemps.
2527 * Makefile.in (REQUIRED_OFILES): remove mkstemp.o
2528 * configure.in (funcs): Check for and conditionally add mkstemps to
2529 the list of functions libiberty will provide.
2530 * configure: Rebuilt.
2534 * clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on
2535 platforms that don't have HZ.
2536 * getruntime.c (HZ): Likewise.
2540 * Makefile.in (xstrdup.o): Depend on config.h.
2544 * cplus-dem.c (mop_up): Set work->previous_argument to NULL after
2549 * xstrdup.c (xstrdup): Switch from strcpy to memcpy for speed.
2553 * Makefile.in (CFILES): fix typo, splay-tree.c instead of
2558 * configure.in: Require autoconf 2.12.1 or higher.
2562 * random.c (NULL): Don't redefine NULL if it is already defined.
2566 * argv.c (buildargv): Cast the result of alloca in assignment.
2568 * choose-temp.c: Include stdlib.h.
2570 * cplus-dem.c (demangle_arm_pt): Remove unused prototype.
2571 (snarf_numeric_literal): Constify first parameter.
2572 (code_for_qualifier): Avoid a gcc extension, make the parameter an
2574 (demangle_qualifier): Likewise.
2575 (demangle_signature): Cast the argument of a ctype function to
2577 (arm_pt): Add parens around assignment used as truth value.
2578 (demangle_arm_hp_template): Constify variable `args'.
2579 (do_hpacc_template_const_value): Cast the argument of a ctype
2580 function to unsigned char.
2581 (do_hpacc_template_literal): Remove unused variable `i'.
2582 (snarf_numeric_literal): Constify parameter `args'.
2583 Cast the argument of a ctype function to unsigned char.
2585 * floatformat.c (floatformat_to_double): Add explicit braces to
2586 avoid ambiguous `else'.
2588 * fnmatch.c (fnmatch): Change type of variables `c', `c1',
2589 `cstart' and `cend' to unsigned char. Cast the argument of macro
2590 `FOLD', which uses ctype functions, to unsigned char.
2592 * objalloc.c (free): Add prototype.
2596 * Makefile.in (CFILES): Fix typo: splay-tree.c, not splay-tree.o
2600 * cplus-dem.c (demangle_arm_pt): remove declaration -- function
2602 (do_hpacc_template_literal): remove unused variable `i'.
2606 * cplus-dem.c (demangle_fund_type): Process CV and u codes before
2607 bumping the pointer we read from. Also prepend these codes,
2608 as we do in other places.
2612 * cplus-dem.c (demangle_arm_hp_template): Make variable 'args' be
2613 'const char *' in order to match its usage when calling siblings.
2614 (snarf_numeric_literal): Make first arg 'const char **' in order
2619 * choose-temp.c: Don't check IN_GCC anymore.
2621 * floatformat.c (floatformat_from_double): Use `const', not `CONST'.
2622 * memchr.c (memchr): Likewise.
2623 * memcpy.c (memcpy): Likewise.
2624 * memmove.c (memmove): Likewise.
2626 * mkstemp.c: Don't check IN_GCC anymore.
2627 * pexecute.c: Likewise.
2628 * splay-tree.c: Likewise.
2630 * strchr.c (strchr): Use `const', not `CONST'.
2631 * strrchr.c (strrchr): Likewise.
2632 * strtol.c (strtol): Likewise.
2633 * strtoul.c (strtoul): Likewise.
2642 * HP aCC demangling support.
2644 (main): Remove default to HP style demangling, set to EDG
2645 demangling correctly when -edg specified; set the demangling style
2646 when user specifies 'edg'. Set strip_underscore to
2647 prepends_underscore, if not HPUXHPPA. Set
2648 current_demangling_style to hp_demangling if HPUXHPPA. Set
2649 current demangling style correctly if the switch is hp. Read
2650 label correctly also in the HP style case.
2651 (work_stuff): add temp_start field; add field for volatile member
2653 (arm_pt): handle ARM_DEMANGLING and EDG_DEMANGLING styles; HP
2654 style for this case is the same as ARM.
2655 (demangle_args): handle EDG_DEMANGLING style; support HP style.
2656 (demangle_arm_hp_template): new function. (It was
2657 demangle_arm_pt.); check and set value of temp_start field in
2658 multiple places. Also, when ceching for end of template args,
2659 check to see if at end of static member of template class.
2660 (demangle_class): new local variable : save_class_name_end Don't
2661 include template args in string defining class.
2662 (demangle_class_name): use demangel_arm_hp_template.
2663 (demangle_function_name): handle case where demangling style is
2664 HP_DEMANGLING and currently point at an 'X' in the mangled name.
2665 Handle EDG_DEMANGLING style. Handle constructor and destructor
2667 (demangle_prefix): handle EDG_DEMANGLING and ARM_DEMANGLING
2668 styles. global destructor and constructor for HP style are same
2669 as for ARM style. Same for local variables.
2670 (demangle_qualified): handle EDG_DEMANGLING style.
2671 (demangle_signature): add case for volatile member function. For
2672 cases '1' - '9' : initialize the temp_start field to -1 and handle
2673 the EDG_DEMANGLING style. for case 'F' : handle EDG_DEMANGLING
2674 and AUTO_DEMANGLING styles. If expecting a function and managed
2675 to demangle the funct args, then handle the LUCID_DEMANGLING,
2676 ARM_DEMANGLING, and EDG_DEMANGLING styles. Add case for local
2677 class name after "Lnnn_ in HP style case. HP style too needs to
2678 forget types. _nnn is OK for HP style, so don't report failure.
2679 (do_hpacc_template_const_value): new function. Handle template's
2680 value param for HP/aCC.
2681 (do_hpacc_template_literal): new function. Handle a template's
2682 literal parameter for HP aCC.
2683 (recursively_demangle): new function
2684 (snarf_numeric_literal): new function.
2685 (usage): add 'edg' to the list of demangling styles; add hp switch
2690 * pexecute.c: Remove obsolete ifdefed cygwin code.
2694 * choose-temp.c: Always include libiberty.h. Avoid redundancies.
2695 * cplus-dem.c: Likewise. Conform to libiberty.h.
2696 * pexecute.c: Likewise.
2697 * splay-tree.c: Likewise.
2701 * Makefile.in (splay-tree.o): Add config.h dependency.
2705 * configure.in: Use AC_PREREQ(2.12.1).
2709 * cplus-dem.c (demangle_fund_type): Add demangling for C9x types.
2713 * mpw.c (mpw_access): Add missing parens.
2717 * configure.in: Call AC_HEADER_SYS_WAIT.
2719 * pexecute.c: Include sys/wait.h when !IN_GCC.
2723 * pexecute.c: revert back to checking old Cygwin
2724 preprocessor symbol until some time has passed.
2728 * pexecute.c: Reorganize WIN32 case to accomodate Cygwin
2729 since it will now support similar constructs.
2733 * configure.in: Check for calloc.
2735 * calloc.c: New file.
2737 * xmalloc.c (xcalloc): New function.
2741 *cplus-dem.c (demangle_prefix): Use the last "__"
2742 in the mangled name when looking for the signature. This allows
2743 template names to begin with "__".
2747 * cplus-dem.c (type_kind_t): Add tk_reference.
2748 (demangle_template_value_parm): Handle it.
2749 (do_type): Use it for references, instead of tk_pointer.
2751 * cplus-dem.c (demangle_template_value_parm): Use cplus_demangle,
2752 not internal_cplus_demangle.
2756 * choose-temp.c: Don't include gansidecl.h.
2757 * mkstemp.c: Likewise.
2758 * pexecute.c: Likewise.
2762 * configure.in: detect cygwin* instead of cygwin32*
2763 * configure: regenerate
2767 * pexecute.c: Check HAVE_CONFIG_H, not IN_GCC, when determining
2768 whether to include config.h. Possibly include unistd.h in the
2769 !IN_GCC case. Define VFORK_STRING as a printable function call
2770 for error messages (either "vfork" or "fork".) If HAVE_VFORK_H is
2771 defined, include vfork.h. If VMS is defined, define vfork()
2772 appropriately. Remove vfork check on USG, we're using autoconf.
2773 (pexecute): Set `errmsg_fmt' to VFORK_STRING instead of checking
2774 locally what string to use.
2778 * splay-tree.c: Tweak include directives to make sure declarations of
2779 xmalloc and free are available.
2783 * cplus-dem.c (gnu_special): Fix handling of virtual tables in
2784 anonymous namespaces.
2788 * cplus-dem.c (work_stuff): Replace const_type and volatile_type
2790 (TYPE_UNQUALIFIED): New macro.
2791 (TYPE_QUAL_CONST): Likewise.
2792 (TYPE_QUAL_VOLATILE): Likewise.
2793 (TYPE_QUAL_RESTRICT): Likewise.
2794 (code_for_qualifier): New function.
2795 (qualifier_string): Likewise.
2796 (demangle_qualifier): Likewise.
2797 (internal_cplus_demangle): Use them.
2798 (demangle_signature): Likewise.
2799 (demangle_template_value_parm): Likewise.
2800 (do_type): Likewise.
2801 (demangle_fund_type)): Likewise.
2805 * splay-tree.c (splay_tree_foreach_helper): Make definition static
2810 * splay-tree.c: New file.
2811 * Makefile.in (CFILES): Add it.
2812 (REQUIRED_OFILES): Likewise.
2813 (splay-tree.o): Add dependencies.
2817 * cplus-dem.c (demangle_qualified): Fix off-by-one when checking
2822 * choose-temp.c: Prototype mkstemps() when IN_GCC.
2824 * cplus-dem.c (consume_count): Cast argument of ctype macro to
2826 (cplus_demangle_opname): Cast the result of `strlen' to (int) when
2827 comparing against one.
2828 (cplus_mangle_opname): Likewise.
2829 (demangle_integral_value): Cast argument of ctype macro to
2831 (demangle_template_value_parm): Likewise.
2832 (demangle_template): Initialize variable `bindex'. Cast the
2833 result of `strlen' to (int) when comparing against one. Remove
2834 unused variable `start_of_value_parm'.
2835 (demangle_class_name): Cast the result of `strlen' to (int) when
2836 comparing against one.
2837 (demangle_prefix): Cast argument of ctype macro to `unsigned char'.
2838 (gnu_special): Likewise. Cast the result of `strlen' to (int)
2839 when comparing against one.
2840 (demangle_qualified): Cast argument of ctype macro to `unsigned char'.
2841 (get_count): Likewise.
2842 (do_type): Likewise. Cast the result of `strlen' to (int) when
2843 comparing against one.
2844 (demangle_fund_type): Cast argument of ctype macro to `unsigned char'.
2845 (demangle_function_name): Cast the result of `strlen' to (int)
2846 when comparing against one.
2848 * mkstemp.c (mkstemps): Cast variable `len' to (int) when
2849 comparing against one.
2853 * mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
2854 * configure.in (AC_CHECK_HEADERS): Check for sys/time.h too.
2855 * config.in, configure: Rebuilt.
2857 * getopt.c: Check HAVE_STRINGS_H before including strings.h.
2858 * configure.in (AC_CHECK_HEADERS): Check for strings.h too.
2859 * config.in, configure: Rebuilt.
2863 * configure.in: in comment, call AC_EXEEXT instead of AM_EXEEXT
2867 * Makefile.in (cplus-dem.o, obstack.o): Depend upon config.h.
2871 * Merge egcs & devo libiberty.
2875 * cplus-dem.c (demangle_arm_pt): Demangle anonymous namespaces.
2879 * mkstemp.c: Include config.h even when not IN_GCC. Wrap header
2880 inclusions inside HAVE_*_H macros. Include ansidecl.h when not
2883 * vasprintf.c: Include stdarg.h/varargs.h first.
2885 * vprintf.c: Likewise.
2889 * pexecute.c: Updates from gcc. Copy in gcc has been removed. This
2890 is the canonical copy. Define ISSPACE if !IN_GCC.
2891 * alloca.c, vfprintf.c, choose-temp.c, mkstemp.c, getopt.c: Similarly.
2892 * getopt1.c, obstack.c: Similarly.
2893 * Makefile.in: Build mkstemp.o
2897 * configure.in: Include asprintf in list of functions known not
2899 * configure: Rebuild.
2903 * cplus-dem.c (work_stuff): Add dllimported.
2904 (demangled_prefix): Mark symbols imported from PE DLL.
2905 (internal_cplus_demangled): Handle.
2909 * cplus-dem.c (do_type): Fix simple array handling. If we fail,
2914 * cplus-dem.c: Include config.h if it exists. Also, only
2915 prototype malloc/realloc if we can't get stdlib.h.
2919 * configure.in: Switch back to checking --with-target-subdir when
2920 deciding whether to check for newlib, undoing part of July 15
2922 * configure: Rebuild.
2926 * cplus-dem.c (type_kind_t): New type.
2927 (demangle_template_value_parm): Add type_kind_t parameter. Rely
2928 on this paramter, rather than demangling the type again.
2929 (demangle_integral_value): Pass tk_integral.
2930 (demangle_template_: Pass the value returned from do_type.
2931 (do_type): Return a type_kind_t. Pass tk_integral to
2932 demangle_template_value_parm for array bounds.
2933 (demangle_fund_type): Likewise.
2935 Also incorporate from GCC version:
2939 * cplus-dem.c (do_type): Use demangle_template_value_parm for arrays.
2943 * cplus-dem.c (demangle_nested_args): Make function definition
2944 static to match the prototype.
2948 * cplus-dem.c (type_kind_t): New type.
2949 (demangle_template_value_parm): Add type_kind_t parameter. Rely
2950 on this paramter, rather than demangling the type again.
2951 (demangle_integral_value): Pass tk_integral.
2952 (demangle_template_: Pass the value returned from do_type.
2953 (do_type): Return a type_kind_t. Pass tk_integral to
2954 demangle_template_value_parm for array bounds.
2955 (demangle_fund_type): Likewise.
2957 Also incorporate from GCC version:
2961 * cplus-dem.c (do_type): Use demangle_template_value_parm for arrays.
2965 * Makefile.in (ALLOCA): New variable.
2966 ($(TARGETLIB)): Add $(ALLOCA) to library.
2967 (needed-list): Add $(ALLOCA).
2968 ($(ALLOCA)): Depend upon stamp-picdir.
2972 * cplus-dem.c (demangle_nested_args): Make function definition
2973 static to match the prototype.
2977 * configure.in: Check --with-cross-host rather than
2978 --with-target-subdir when deciding whether build uses a cross
2979 compiler, and when deciding where to install the library.
2980 * configure: Rebuild.
2984 * cplus-dem.c (demangle_nested_args): Return a value.
2988 * cplus-dem.c (string): Move definition before work_stuff.
2989 (work_stuff): Add volatile_type, forgetting_types,
2990 previous_argument, and nrepeats fields.
2991 (SCOPE_STRING): New macro.
2992 (demangle_template): Add `remember' parameter. Add comment.
2993 Register the `B' code type here, if remembering. Tidy. Fix crash
2994 on NULL tmpl_argvec. Be consistent with use of tname/trawname.
2995 (demangle_nested_args): New function.
2996 (internal_cplus_demangle): Handle volatile-qualified member
2998 (mop_up): Delete the previous_argument string if present.
2999 (demangle_signature): Tidy. Handle volatile-qualified member
3000 functions. Handle back-references using the `B' code. Use extra
3001 parameter to demangle_template and SCOPE_STRING where appropriate.
3002 (demangle_template_value_parm): Fix thinko; 'B' is not an integral
3004 (demangle_class): Use SCOPE_STRING.
3005 (gnu_special): Pass additional argument to demangle_template.
3007 (demangle_qualified): Save qualified types for later
3008 back-references. Handle constructors and destructors for template
3010 (do_type): Tidy. Use SCOPE_STRING. Pass extra argument to
3011 demangle_template. Use demangled_nested_args. Don't remember
3012 qualified types here; that's now done in demangle_qualified.
3013 Similarly for templates.
3014 (do_arg): Improve commment. Handle 'n' repeat code.
3015 (remember_type): Check forgetting_types.
3016 (demangle_args): Deal with 'n' repeat codes. Tidy.
3020 * config.table: Only use mh-fbsd21 on *-*-freebsd2.2.[012], not on
3025 * configure.in (setobjs): Correct quoting error in cygwin32 case.
3030 * obstack.c: Update to latest FSF version.
3034 * Makefile.in: Add a dependency on stamp-picdir for the
3035 objects, so that we can do a parallel build.
3039 * configure.in (checkfuncs): Add missing "'".
3043 * obstack.c (_obstack_memory_used): Elide this function if we're
3044 on a system with GNU libc.
3048 * Makefile.in (distclean): Remove config.log.
3052 * Makefile.in (distclean): Don't remove alloca-conf.h.
3056 * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767.
3060 * cplus-dem.c (do_type): Handle volatile qualification.
3064 * configure.in: Check for unistd.h as well.
3065 * configure: Rebuild.
3066 * config.in: Rebuild.
3067 * getpagesize.c (GNU_OUR_PAGESIZE): Use sysconf only if _SC_PAGESIZE
3068 is defined in unistd.h. Reformat conditional block for easier reading.
3070 * config.table (shared): Default to no if ${enable_shared}
3071 is unset or empty; this logic is used by the toplevel
3072 configure scripts, too.
3076 * config.table: Add line to set enable_shared in the Makefile
3081 * cplus-dem.c (squangle_mop_up): Change return type to void.
3082 (internal_cplus_demangle): Remove unused parameter `options'.
3083 All callers changed.
3084 (cplus_demangle_opname): Remove function wide variable `int i' and
3085 replace with `size_t i' at each location where it is used.
3086 (cplus_mangle_opname): change type of `i' from int to size_t.
3090 * alloca-conf.h: Include config.h. Check HAVE_ALLOCA_H rather
3092 * Makefile.in (argv.o): Depend upon config.h and alloca-conf.h.
3096 * configure.in: Set libiberty_topdir correctly when srcdir is
3097 "." and with_target_subdir is not set.
3098 * configure: Rebuild.
3102 * configure.in: Add *-*-mingw32* case.
3103 * configure: Rebuild.
3107 * config.table: Never use a PIC file for *-*-cygwin32*.
3109 * Makefile.in (config.status): Depend upon config.table.
3111 * configure.in: On a cygwin32 host, always compile random, and
3112 don't test for sys_siglist, strsignal, or psignal.
3113 * configure: Rebuild.
3115 * clock.c: Check HAVE_SYS_PARAM_H rather than NO_SYS_PARAM_H.
3116 * getcwd.c: Likewise.
3117 * getpagesize.c: Likewise.
3118 * getruntime.c: Likewise.
3122 Use autoconf tests rather than the old dummy.c test:
3123 * configure.in: Add AC_ARG_WITH calls for --with-target-subdir and
3124 --with-newlib. Add AC_CONFIG_HEADER. Use AC_REPLACE_FUNCS for
3125 most functions. Add special cases to handle newlib and VxWorks.
3126 Remove target_makefile_frag. Create stamp-h in AC_OUTPUT if
3127 CONFIG_HEADERS is set. Only call config-ml.in in AC_OUTPUT if
3128 CONFIG_FILES is set; set ac_file before calling it.
3129 * config.table (arm-*-riscix*, *-*-cygwin32): Remove.
3130 (*-*-hpux*, *-*-hiux*, *-*-irix4*, *-*-solaris2*): Remove.
3131 (*-*-sysv4*, *-*-go32, *-*-vxworks5*, *-*-vxworks): Remove
3132 (i[3456]-*-mingw32*): Remove.
3133 * Makefile.in (ERRORS_CC, CONFIG_H, NEEDED_LIST): Remove.
3134 (LIBOBJS): New variable.
3135 (HOST_OFILES, DO_ALSO, STAGESTUFF): Remove.
3136 (all): Depend upon needed-list. Don't check RULE1.
3137 (@target_makefile_frag@): Remove.
3138 (COMPILE.c): Include @DEFS@.
3139 (HFILES): Add alloca-conf.h.
3140 (REQUIRED_OFILES): Remove basename.o.
3141 ($(TARGETLIB)): New target.
3142 (stamp-needed, lneeded-list, needed.awk, stamp-config): Remove.
3143 (lconfig.h, needed2.awk, dummy.o, errors): Remove.
3144 (needed-list, config.h): Rewrite.
3145 (RULE1, $(RULE1), RULE2, $(RULE2)): Remove.
3147 (Makefile): Set CONFIG_FILES and CONFIG_HEADERS.
3148 (stamp-h): New target.
3149 (atexit.o, clock.o, getcwd.o, getpagesize.o): New targets.
3150 (basename.o): Don't depend upon config.h.
3151 (getruntime.o): Depend upon config.h.
3152 * atexit.c: Include config.h. Check HAVE_ON_EXIT rather than
3154 * basename.c: Don't include config.h. Don't check NEED_basename.
3155 * clock.c: Include config.h.
3156 * getcwd.c: Likewise.
3157 * getpagesize.c: Likewise.
3158 * getruntime.c: Likewise. Fix checks which set HAVE_GETRUSAGE and
3160 * strerror.c: Change uses of NEED_sys_errlist to
3161 HAVE_SYS_ERRLIST. Likewise for NEED_strerror and HAVE_STRERROR.
3162 * strsignal.c: Likewise for NEED_sys_siglist and HAVE_SYS_SIGLIST,
3163 and for NEED_strsignal and HAVE_STRSIGNAL and for NEED_psignal and
3165 * acconfig.h: New file.
3167 * functions.def: Remove.
3168 * config/mh-cxux7 (HDEFINES): Remove -DHAVE_SYSCONF.
3169 * config/mh-windows (HDEFINES): Remove.
3170 * config/mh-cygwin32: Remove.
3171 * config/mh-go32: Remove.
3172 * config/mh-irix4: Remove.
3173 * config/mh-riscix: Remove.
3174 * config/mh-sysv4: Remove.
3175 * config/mt-mingw32: Remove.
3176 * config/mt-vxworks5: Remove.
3177 * config.in: New file, generated using autoheader.
3178 * configure: Rebuild.
3182 * configure.in: Rewrite to use autoconf.
3183 * configure: Generate using autoconf.
3184 * config/mh-a68bsd: Remove.
3185 * config/mh-apollo68: Remove.
3186 * config/mh-hpbsd: Remove.
3187 * config/mh-ncr3000: Remove.
3188 * config/mh-sysv: Remove.
3189 * config/mh-aix (RANLIB, INSTALL): Don't define.
3190 * config/mh-cxux7 (RANLIB, INSTALL): Don't define.
3191 * config/mh-irix4 (CC, RANLIB, INSTALL): Don't define.
3192 * config/mh-sysv4 (RANLIB, INSTALL): Don't define.
3193 * config.table: Change config_shell to CONFIG_SHELL, and use
3194 libiberty_topdir to find move-if-change.
3195 (m68k-apollo-bsd*, m68k-apollo-sysv*): Remove.
3196 (i[3456]86-ncr-sysv4*, *-*-dgux*, hppa*-hp-bsd*): Remove.
3197 (*-*-irix*, *-*-m88kbcs*, *-*-sysv*): Remove.
3198 * Makefile.in (srcdir): Set to @srcdir@.
3200 (prefix, exec_prefix, bindir, libdir): Set to autoconf variables.
3201 (SHELL, INSTALL, INSTALL_PROGRAM, INSTALL_DATA): Likewise.
3202 (CC, CFLAGS, RANLIB)): Likewise.
3203 (datadir, man*dir, infodir, includedir, MAKEINFO): Remove.
3204 (target_makefile_frag, host_makefile_frag): Add substitutions.
3205 (INSTALL_DEST): Set to @INSTALL_DEST@.
3206 (Makefile): Depend upon config.status. Don't depend upon
3207 $(host_makefile_frag) or $(target_makefile_frag).
3208 (config.status): New target.
3212 * config/mt-sunos4: Remove. Should be handled by --with-headers
3213 and --with-libraries options at top level.
3214 * config.table: Never use mt-sunos4.
3216 * alloca-conf.h: New file, combining alloca-norm.h and
3218 * alloca-norm.h: Remove.
3219 * alloca-botch.h: Remove.
3220 * configure.in: Set shell variables files and links to empty.
3221 * config.table: Don't set shell variable files.
3222 * configure.bat: Don't create alloca-conf.h.
3223 * makefile.vms: Likewise.
3224 * mpw-config.in: Likewise.
3225 * vmsbuild.com: Likewise.
3229 * Makefile.in ($(HOST_OFILES) $(REQUIRED_OFILES)): Remove old
3230 target depending upon config.h.
3231 (alloca.o): Add target depending upon config.h
3232 (basename.o, choose-temp.o, fnmatch.o): Likewise.
3233 (getopt.o, getopt1.o, pexecute.o, strerror.o): Likewise.
3234 (strsignal.o, xstrerror.o): Likewise.
3238 * cplus-dem.c (cplus_demangle_opname): Initialize work.
3242 * cplus-dem.c (demangle_qualified): Replace missing else.
3246 * cplus-dem.c (gnu_special): Fix off-by-one bug when checking the
3247 length in the name of a virtual table.
3251 * cplus-dem.c (struct work stuff): Add field for B and K mangle codes.
3252 (cplus_demangle_opname): Call mop_up_squangle.
3253 (cplus_demangle): Initialize squangle info, then call
3254 internal_cplus_demangle. (Most code moved there as well)
3255 (internal_cplus_demangle): New function, performs most of what use
3256 to be done in cplus_demangle, but is only called with this file.
3257 (squangle_mop_up): New function to clean up B and K code data.
3258 (mop_up): set pointers to NULL after freeing.
3259 (demangle_signature, demangle_template, demangle_class): Add
3260 switch elements to handle K and B codes.
3261 (demangle_prefix, gnu_special, demangle_qualified): Add
3262 code to handle K and B codes.
3263 (do_type, demangle_fund_type): Handle B and K codes.
3264 (remember_Ktype): New function to store K info.
3265 (register_Btype, remember_Btype): New functions for B codes.
3266 (forget_B_and_K_types): New function to destroy B and K info.
3270 * COPYING.LIB, choose-temp.c, cplus-dem.c: Sync with egcs & gcc.
3274 * config.table: Make locating frag files failsafe even for the
3275 special case if configuring and building in srcdir.
3279 * choose-temp.c: Fix handling of sys/file.h to work in libiberty.
3283 * choose-temp.c: Sync with copy in gcc.
3287 * getopt.c: Update to latest FSF version.
3288 * getopt1.c: Likewise.
3292 * cplus-dem.c (gnu_special): Don't get confused by .<digits>
3293 strings that are not actually lengths.
3297 * Makefile.in (FLAGS_TO_PASS): Don't pass PICFLAG.
3298 (.c.o): Check value of enable_shared, not PICFLAG.
3299 (stamp-picdir): Dito.
3303 * config/mh-cygwin32: remove vasprintf.o from EXTRA_OFILES
3304 since it gets built automatically
3308 * config.table (vxworks configs): Default to VxWorks 5.x, as that is
3309 the currently shipping OS.
3313 * vmsbuild.com [REQUIRE_OFILES]: Synchronized with Makefile.in:
3314 Add fnmatch.o and objalloc.o; remove vasprintf.o.
3315 [config.h]: Define NEED_strsignal.
3319 * functions.def: Correct argument types for strerror and
3324 * vasprintf.c (int_vasprintf): Increase buffer size for float/double
3330 Add mingw32 support.
3331 * pexecute.c (pexecute): New function for mingw32. Supports pipes.
3332 (pwait): New function for mingw32.
3334 * config.table (i[3456]86-*-mingw32*): Support for i386-mingw32.
3335 * config/mt-mingw32: New file.
3336 * xmalloc.c (first_break): Not used for mingw32.
3337 (xmalloc_set_program_name): Don't use sbrk on mingw32.
3338 (xmalloc): Likewise.
3339 (xrealloc): Likewise.
3343 * choose-temp.c: Sync with gcc version.
3347 * Makefile.in (install_to_libdir, install_to_tooldir): Add MULTISUBDIR
3348 to all filenames in libdir and tooldir.
3349 (distclean): Do MULTICLEAN before deleting Makefile.
3350 (stamp-needed, stamp-config): Add MULTISRCTOP to
3351 pathname for move-if-change.
3355 * strsignal.c (sys_nsig): Try NSIG and _NSIG.
3359 * alloca-norm.h (alloca, GCC case): Don't redefine alloca if it
3360 was already defined previously.
3364 * Makefile.in (INSTALL): Use ../install-sh, not install.
3368 * Makefile.in (CFILES): Add pexecute.c.
3372 * asprintf.c: Consistently use either stdarg or varargs.
3376 * cplus-dem.c (demangle_signature): Don't look for return types on
3377 constructors. Handle member template constructors.
3381 * README: Fix configuration instructions.
3385 * pexecute.c: Update to current version from /gd/gnu/lib:
3389 * pexecute.c: Use spawn if __CYGWIN32__.
3393 * pexecute.c: Include "config.h" first, as per autoconf manual.
3397 * pexecute.c (fix_argv): New function.
3398 (pexecute): Win32 but not Cygwin32 needs its arguments fixed.
3399 Add underscore to cwait function call.
3403 * cplus-dem.c (demangle_template): Add new parameter. Handle new
3404 template-function mangling.
3405 (consume_count_with_underscores): New function.
3406 (demangle_signature): Handle new name-mangling scheme.
3410 * asprintf.c: stdarg.h when ALMOST_STDC
3411 * config/mh-windows (EXTRA_OFILES): add asprintf.o and
3416 * vasprintf.c (vasprintf): Allow for _BSD_VA_LIST_.
3418 * config.table: Add case for FreeBSD 2.1 and 2.2, needs mh-fbsd21.
3420 * config/mh-fbsd21 (EXTRA_OFILES): Force vasprintf.o
3424 * cplus-dem.c (demangle_fund_type): Change "complex" to "__complex".
3428 * asprintf.c (asprintf): New file.
3429 * Makefile.in (CFILES): Add asprintf.c
3430 * functions.def: Ditto.
3434 * argv.c (dupargv): New function, duplicate an argument vector.
3438 * config/mh-cygwin32: also build random.o
3442 * cplus-dem.c: Add 'extern' to prepends_underscore.
3446 * cplus-dem.c: Various changes to produce Java output when passed
3447 DMGL_JAVA. Thus "::" becomes "." and "JArray<Foo>" becomes "Foo[]".
3448 (main): Support --java and -j flags to set DMGL_JAVA.
3452 * config/mh-go32 (CC, AR, RANLIB): Don't define.
3456 * Makefile.in (REQUIRED_OFILES): Add pexecute.o.
3457 (pexecute.o): New target.
3459 * Makefile.in (stamp-needed): New target, replacing needed-list.
3460 (needed-list): Just depend upon stamp-needed.
3461 (stamp-config): New target, replacing config.h.
3462 (config.h): Just depend upon stamp-config.
3463 (mostlyclean): Remove stamp-*.
3467 * Makefile.in (FLAGS_TO_PASS): pass INSTALL, INSTALL_PROGRAM and
3468 INSTALL_DATA for multilibbed installs
3474 * choose-temp.c (choose_temp_base): Don't dump core if TMPDIR is empty.
3476 * choose-temp.c (try): Insist that temp dir be searchable.
3480 * choose-temp.c (choose_temp_base): On VMS, use proper syntax
3481 for current directory.
3485 * pexecute.c: Remove special cases for cygwin32.
3486 (pwait): Remove local definition of `pid'.
3490 * pexecute.c (vfork): Supply new definition for VMS.
3491 (pwait): Use waitpid instead of wait for VMS.
3495 * cplus-dem.c (do_type): Handle `J'.
3496 (demangle_fund_type): Print "complex" for it.
3500 * configure.in: Don't turn on multilib here.
3504 * obstack.c: move _obstack_memory_used outside of ifdef. Cannot be
3505 elided; needed by gdb and not present in libc.
3509 * Makefile.in (clean): Remove tmpmulti.out.
3513 * floatformat.c (floatformat_ieee_double_littlebyte_bigword):
3514 Add new floatformat, mainly for ARM doubles.
3518 * config.table: Use ${config_shell} with ${moveifchange}. From
3523 * configure.in: Enable multilibing by default.
3524 Update multilib template to read config-ml.in.
3528 * makefile.vms: Add objalloc.
3532 * cplus-dem.c (demangle_it): Add prototype declaration.
3533 (usage, fatal): Likewise.
3535 * xexit.c (_xexit_cleanup): Add prototype.
3537 * strerror.c (init_error_tables): Declare.
3541 * functions.def: Add DEF of vasprintf, and DEFFUNC of strsignal.
3542 * strsignal.c: Only define strsignal if NEED_strsignal.
3543 * Makefile.in (REQUIRED_OFILES): Remove vasprintf.o.
3544 * configure.in: Add NEED_strsignal to xconfig.h. Add vasprintf.o
3546 * config/mh-cygwin32 (HDEFINES): Add -DNEED_strsignal.
3547 (EXTRA_OFILES): Define to vasprintf.o.
3548 * config/mh-windows (HDEFINES): Add -DNEED_strsignal.
3549 (EXTRA_OFILES): Add vasprintf.o.
3550 * config/mt-vxworks5 (vxconfig.h): Define NEED_strsignal.
3551 (vxneeded-list): Add vasprintf.o.
3555 * objalloc.c: Include <stdio.h>.
3559 * objalloc.c: New file.
3560 * Makefile.in (CFILES): Add objalloc.c
3561 (REQUIRED_OFILES): Add objalloc.o.
3562 (objalloc.o): New target.
3566 * obstack.c: Update to current FSF version.
3570 * cplus-dem.c: Add prototypes for all static functions.
3571 (mystrstr): Make static. Make arguments and result const.
3572 (cplus_match): Remove; not used.
3576 * cplus-dem.c (gnu_special): Call demangled_fund_type for other
3581 * spaces.c: Declare malloc and free properly.
3582 * strsignal.c (init_signal_tables): Add prototype.
3583 * xatexit.c (_xexit_cleanup): Add parameter declarations.
3587 * Makefile.in (lneeded-list): If alloca.o is needed, xexit.o is
3588 also required because of xmalloc.o.
3592 * strsignal.c: Unconditionally redefine sys_siglist around the
3593 inclusion of the system header files.
3597 * makefile.vms: Remove 8 bit characters. Update to latest
3602 * strsignal.c: Use NEED_sys_siglist instead of
3604 * config.table: Don't use mh-lynxos.
3605 * config/mh-lynxos: Remove.
3609 * cplus-dem.c: Fix indenting; make identical to the copy
3611 (do_type, case 'M'): Check for a template as well as a class.
3615 * config/mt-vxworks5 (vxneeded-list): Remove sigsetmask.o, since
3616 vxworks 5.[0-3] all have sigsetmask in them; the one provided by
3617 libiberty is incorrect, as well.
3621 * alloca.c (alloca): When compiled with an ANSI/ISO compiler,
3622 alloca takes a size_t argument, not just unsigned.
3626 * cplus-dem.c: Note that this file also lives in GCC.
3630 * alloca.c: Remove include of libiberty.h for hpux.
3631 * argv.c: Replace defs from libiberty.h.
3632 * spaces.c: Put back externs from removed from libiberty.h.
3633 * vasprintf.c: Remove include of libiberty.h for hpux.
3637 * cplus-dem.c: Checking in again; last checkin filed due to sticky tag.
3641 * cplus-dem.c: Revert last two commits due to conflicts with
3642 hpux system headers.
3646 * alloca.c, argv.c, spaces.c, strcasecmp.c, vasprintf.c, vprintf.c:
3647 Revert last commit due to conflicts with hpux system headers.
3651 * cplus-dem.c (x{m,re}alloc): Make declarations compatibile with
3652 libiberty.h when compiled with a standard compiler.
3656 * alloca.c: Include libiberty.h for definition of xmalloc.
3657 Don't redefine NULL.
3658 * argv.c: Move prototypes to libiberty.h.
3659 * cplus-dem.c: Include libiberty.h for definition of xmalloc.
3660 Don't redefine NULL.
3661 Use casts to eliminate compiler warnings.
3662 * spaces.c: Remove prototypes for malloc and free which are
3663 already in libibrty.h.
3664 * strcasecmp.c: Use casts to eliminate compiler warnings.
3665 * vasprintf.c: Include libiberty.h for definition of malloc.
3666 Don't redefine NULL.
3667 * vprintf.c: Include stdarg.h if __STDC__.
3671 * config/mh-windows: Add strcasecmp.o to EXTRA_OFILES.
3675 * mpw.c (mpwify_filename): Rewrite to simplify, and to handle
3676 upward components correctly.
3680 * config.table, config/mh-windows: Add support for building under
3681 MSVC (the Microsoft build environment).
3685 * fnmatch.c: Undef const if not __STDC__.
3689 * fnmatch.c: New file.
3690 * Makefile.in (CFILES): Add fnmatch.c.
3691 (REQUIRED_OFILES): Add fnmatch.o.
3692 (fnmatch.o): New target.
3696 * cplus-dem.c (demangle_template): Fix handling of address args.
3697 (gnu_special): Handle type_info stuff.
3701 * mpw.c (DebugPI): Make settable from the env var DEBUG_PATHNAMES.
3702 (mpwify_filename): Handle "::/" case.
3706 * config/mh-cygwin32: new file (need -DNEED_basename and
3707 -DNEED_sys_siglist for native NT rebuilding)
3708 * config.table (*-*-cygwin32): new entry
3709 * choose-temp.c: bring in sync with gcc (revert Aug 17 change)
3713 * config.table (i[345]86-*-*): Recognize i686 for pentium pro.
3717 * pexecute.c (pexecute) [MPW]: Remove old bogus code that
3718 messed with arguments that included a '/', add escape chars
3719 to double quotes, remove const decl from arg that Mac
3720 compilers don't seem to like.
3724 * pexecute.c: Update test for win32 (&& ! cygwin32).
3725 * choose-temp.c: fix WIN32 preprocessor defines
3729 * mpw-make.sed: Add @DASH_C_FLAG@ and @SEGMENT_FLAG({Default})@
3730 to editing of default makefile rule.
3734 * alloca-norm.h: Include <malloc.h> if _WIN32.
3735 * argv.c: Include non-prototyped decls for malloc and string
3736 functions if ! _WIN32 or if __GNUC__.
3740 * config.h-vms: New file.
3741 * makefile.vms: Use it.
3745 * getopt.c (_getopt_internal): If argc is 0, just return (before
3746 we reference *argv and segfault).
3750 * Makefile.in (distclean): Add multilib.out.
3754 * alloca-norm.h: Change #ifdef sparc to #if defined (sparc) &&
3761 * vmsbuild.com (REQUIRD_OFILES): Add choose-temp.o and xstrdup.o.
3765 * vmsbuild.com: Changes to handle DEFFUNC(on_exit).
3766 (do_ofiles): Allow nonexistent source file in pass 3.
3767 (chk_deffunc): New routine.
3771 * pexecute.c (PEXECUTE_VERBOSE): Define.
3772 (MPW pexecute): Check flags & PEXECUTE_VERBOSE instead of verbose_flag.
3776 * Makefile.in (docdir): Removed.
3780 * Makefile.in (oldincludedir): Removed.
3784 * Makefile.in (datadir): Set to $(prefix)/share.
3788 * cplus-dem.c (demangle_arm_pt): Reindent. Avoid endless loop by
3789 checking for errors from do_type.
3793 * makefile.vms: New file.
3794 * xmalloc.c: If VMS, include <stdlib.h> and <unixlib.h> rather
3795 than declaring malloc, realloc, and sbrk.
3799 * pexecute.c: New file.
3803 * xmalloc.c: Declare sbrk.
3807 * alloca-norm.h: Add SPARCworks cc compatible __builtin_alloca
3812 * xstrerror.c: Include <stdio.h>.
3816 * Makefile.in (CFILES): Add atexit.c.
3820 * choose-temp.c: Include sys/types.h before sys/file.h for sco3.2v5.
3824 * choose-temp.c: Don't #include sys/file.h ifdef NO_SYS_FILE_H.
3826 * config/mt-vxworks5 (HDEFINES): Define NO_SYS_FILE_H.
3830 * Makefile.in (lneeded-list): If alloca.o is needed, so is xmalloc.o.
3831 Reverts Feb 8, 1995 change.
3835 * choose-temp.c: New file.
3836 * Makefile.in (CFILES): Add choose-temp.c.
3837 (REQUIRED_OFILES): Add choose-temp.o.
3841 * floatformat.c (floatformat_to_double): Don't bias exponent when
3842 handling zero's, denorms or NaNs.
3846 * floatformat.c (floatformat_to_double): Fix bugs with handling
3847 numbers with fractions < 32 bits.
3851 * config.table: Permit --enable-shared to specify a list of
3856 * cplus-dem.c (demangle_template): Fix for non-mangled pointer
3861 * configure.in: If srcdir is `.' and with_target_subdir is not
3862 `.', then set MULTISRCTOP before calling config-ml.in.
3866 * mpw.c (mpw_open): Add debugging output option.
3870 * cplus-dem.c (demangle_template): Fix for address-of-extern arguments.
3874 * mpw.c (mpwify_filename): Change 6 to 5 in
3875 strncmp (unixname, "/tmp/", 5).
3879 * cplus-dem.c (demangle_template): Initialize is_bool. Correctly
3880 handle 0 as a pointer value parameter.
3884 * Makefile.in (all): Depend upon required-list.
3885 (required-list): New target.
3886 (clean): Remove required-list.
3891 * config.table (i386-*-win32): Deleted.
3892 * config/mh-i386win32: Deleted.
3896 * cplus-dem.c (cplus_demangle_opname): Change opname parameter to
3898 (cplus_mangle_opname): Change return type and opname parameter to
3899 const char *. Don't cast return value.
3903 * mpw.c: Include Timer.h, in order to get m68k Microseconds trap
3908 * obstack.c: Update copyright to 1996.
3909 (_obstack_memory_used): Define new function. Called via
3910 obstack_memory_used macro.
3914 * xstrdup.c: New file.
3915 * Makefile.in (CFILES): Add xstrdup.c.
3916 (REQUIRED_OFILES): Add xstrdup.o.
3917 (xstrdup.o): New target.
3921 * atexit.c: New stub to provide atexit on systems that have
3922 on_exit, like SunOS 4.1.x systems.
3923 * functions.def (on_exit, atexit): Ditto.
3927 * mpw.c (mpw_abort): Remove decl.
3928 (mpw_access): Move debugging printf.
3932 * config.table: Consistently use ${host} rather than ${xhost} or
3934 * configure.in: Don't bother to set ${xhost} before calling
3939 * Makefile.in (.c.o): Use test instead of the left bracket, to
3940 avoid problems with some versions of make.
3944 * mpw-make.sed: Fix INCDIR edit to work with Nov 14 change.
3948 * config/mh-hpux: Remove. It was only used to define EXTRA_OFILES,
3949 which was set to just alloca.o, which is now automatically marked
3950 as needed by the autoconfiguration process.
3954 * config.table: Check ${with_cross_host} rather than comparing
3955 ${host} and ${target}.
3959 * configure.in: If with_target_subdir is empty, set xhost to
3960 ${host} rather than ${target} before calling config.table.
3964 * Makefile.in (MULTITOP): Deleted.
3965 (MULTISRCTOP, MULTIBUILDTOP): New.
3966 (FLAGS_TO_PASS): Delete INCDIR.
3967 (INCDIR): Add $(MULTISRCTOP).
3968 (install_to_libdir): Add $(MULTISUBDIR). Call $(MULTIDO).
3969 * configure.in: Delete call to cfg-ml-com.in. Call config-ml.in
3970 instead of cfg-ml-pos.in.
3971 (cross-compile check): Change to test for with_target_subdir.
3972 (EXTRA_LINKS): Delete.
3976 * mpw-make.sed: Add getpagesize.c.o to needed-list.
3977 * mpw.c [USE_MW_HEADERS]: Conditionalize compiling of
3978 functions that are supplied by Metrowerks libraries.
3979 (fstat): Clean up descriptor->pointer conversion code.
3980 (InstallConsole, etc): Empty definitions, for when linking
3985 * Makefile.in (FLAGS_TO_PASS): Also pass PICFLAGS.
3986 (.c.o): Stylistic change.
3990 * strtol.c, strtoul.c: Don't include <stdlib.h>. From
3995 * configure.in: Correct sed call.
3999 * configure.in: Clean up / simplify for native.
4001 * configure.in: Merge in stuff from ../xiberty/configure.in.
4002 * Makefile.in (CC): Add definition (so it can be overrridden
4007 * mpw-make.sed: Leave strerror.c.o in standard list of functions.
4008 * mpw.c (R_OK, ENOENT, EACCESS, ENOSYS): Remove.
4009 (link): Remove useless definition with error return.
4010 (last_microseconds, warn_if_spin_delay, record_for_spin_delay):
4011 Use UnsignedWide type for microsecond counts.
4015 * memcmp.c (memcmp): Argument types are const void *, not void
4018 * strncasecmp.c (strncasecmp): Include ansidecl.h/stdarg.h, not
4020 * strcasecmp.c (strcasecmp): Ditto.
4024 * Makefile.in (BISON): Remove macro.
4028 * Makefile.in (HFILES): Add default empty definition.
4029 * mpw-config.in (config.h): Only update if changed.
4030 * mpw-make.in: Remove.
4031 * mpw-make.sed: New file, edits Makefile.in into MPW makefile.
4032 * mpw.c: Remove semi-clone of strerror code.
4033 (sys_nerr, sys_errlist): Define here.
4034 (Microseconds): Only define as A-line trap if m68k Mac.
4038 * Makefile.in (maintainer-clean): New synonym for distclean.
4042 * config.table: For host, generalize rs6000-ibm-aix*
4043 to *-ibm-aix* so we also include powerpc.
4049 * xstrerror.c: New file.
4050 * Makefile.in, vmsbuild.com: Compile it.
4054 * config.table (i386-*-win32): New.
4058 * Makefile.in (MULTITOP): New variable.
4059 (MULTIDIRS, MULTISUBDIR, MULTIDO, MULTICLEAN): Likewise.
4060 (all): Add multilib support.
4061 (install_to_tooldir, *clean): Likewise.
4065 * makefile.dos (OBJS): Add hex.o. From DJ Delorie.
4069 * vmsbuild.com: create "new-lib.olb", build libiberty under that
4070 name, and then make it become "liberty.olb" when done, so that an
4071 incomplete build attempt never leaves behind something which looks
4072 like a complete library.
4076 * config/mh-i386pe: New file for PE hosts.
4077 * config.table: Understand PE hosts.
4081 * cplus-dem.c: Update from gcc.
4083 * argv.c, dummy.c: If __STDC__, #include "alloca-conf.h" after
4085 * alloca-norm.h: If __STDC__, declare alloca with its parameter.
4089 * mpw-make.in (ALL_CFLAGS): Define NEED_basename.
4090 * mpw.c: Only test DebugPI once whenever printing debug info.
4091 (mpwify_filename): If filename is /tmp/foo, change it into :_foo,
4092 also fix to not write on input filename buffer.
4093 (mpw_access): Use stat() instead of open(), works for directories
4098 * Makefile.in: Massage broken shells that require 'else true'.
4102 * alloca-norm.h: Declare alloca as type "PTR" to match functions.def.
4103 Declare __builtin_alloca in the sparc case, as argv.c did.
4104 * argv.c: Replace inline version of alloca-norm.h at start of file with
4105 a #include of alloca-conf.h. Precede it with an include of ansidecl.h
4106 because alloca-norm.h needs to declare alloca as "PTR".
4110 * win32.c: New file.
4114 * dummy.c: #include "alloca-conf.h".
4118 * Makefile.in (mostlyclean): Remove stamp-picdir.
4123 * config.table (frags): Use toplevel pic frags.
4125 * Makefile.in (PICFLAG): New macro.
4126 (all): Depend on stamp-picdir.
4127 (needed-list): Ditto.
4128 (.c.o): Also build pic object.
4129 (stamp-picdir): New rule.
4130 (mostlyclean): Remove pic.
4131 (clean): Remove stamp-picdir.
4135 * vmsbuild.com (config.h): Add `#define NEED_basename'.
4139 * clock.c, getopt.c, strtod.c, vsprintf.c: Change from using LGPL
4140 to libio-style copyright.
4141 * getpagesize.c: Remove FSF copyright.
4145 Added improved VMS support from Pat Rankin:
4149 * vmsbuild.com: new file.
4151 * getpagesize.c (getpagesize): implement for VMS;
4152 * strerror.c (strerror, strerrno, strtoerrno): add rudimentary
4153 support for EVMSERR.
4159 * floatformat.c (floatformat_arm_ext): Define.
4163 * basename.c, bcmp.c, getcwd.c, insque.c, rename.c, sigsetmask.c,
4164 strerror.c, strsignal.c: Remove FSF copyright.
4165 * sigsetmask.c: #include <sys/types.h> - seems to be needed by ISC.
4169 * bcopy.c, bzero.c, memcmp.c, memcpy.c, memset.c, strchr.c,
4170 strrchr.c, strstr.c, vfork.c: Remove FSF Copyright, because this
4171 might contaminate libstdc++ with the LGPL. (OK'd by RMS 11 Oct 94.)
4172 * strchr.c, strrchr.c: Add cast to suppress const warning.
4176 * cplus-dem.c: Use const instead of CONST. Don't include
4177 ansidecl.h directly.
4181 * cplus-dem.c: Don't include libiberty.h. Do declare xmalloc and
4183 (-DMAIN): Don't rely on an externally-defined version number;
4184 instead, require the version number to be defined as a
4185 preprocessor macro. Handle the RS/6000 leading dot. Define
4186 xmalloc, xrealloc and fatal. Don't strip a leading underscore
4187 if we couldn't demangle the word.
4191 (Old mpw.c change descriptions retained for informational value.)
4192 * mpw.c (warning_threshold): Default to .4 sec.
4193 (overflow_count, current_progress): New globals.
4194 (warn_if_spin_delay): Include current progress type,
4195 such as program name, in message.
4196 (mpw_start_progress): Set current_progress variable from arg.
4197 (mpw_end_progress): Report spin delays by power-of-two-size
4198 buckets instead of constant-size buckets.
4200 * mpw.c: Clean up formatting, types, returns, etc.
4202 (mpw_fread, mpw_fwrite): Define.
4203 (sleep): Define correctly.
4205 * mpw.c: New code to implement cursor spinning support.
4206 (umask): New function.
4207 (mpw_fopen, mpw_fseek, stat, fstat): Call PROGRESS.
4209 * mpw.c (mpw_basename, mpw_mixed_basename): New functions, find
4210 basenames for MPW and MPW/Unix filenames.
4211 (mpw_special_init): New function, calls Macsbug if desired.
4213 * mpw.c: Add GPL notice.
4214 (mpwify_filename): Add more transformations.
4215 (mpw_fopen): Call mpwify_filename on file names.
4217 (chdir, getcwd): Add simple definitions.
4219 * mpw.c: Random cleanups, remove unused code bits.
4220 Added copy of strerror.c for gcc's use.
4221 (stat, fstat, _stat): New versions based on Guido van Rossum code.
4223 * mpw.c (mpw_fseek): Make it work correctly when doing SEEK_CUR.
4225 * mpw.c (stat): Remove hack definition, get from sys/stat.h.
4226 (fork, vfork, etc): Print error messages if called.
4227 (getrusage, sbrk, environ, isatty, link, utime, mkdir, rmdir,
4228 rename, chown): Define.
4230 * mpw-config.in: New file, MPW version of configure.in.
4231 * mpw-make.in: New file, MPW version of Makefile.in.
4232 * mpw.c: New file, MPW compatibility routines.
4236 * basename.c: Include config.h before checking for NEED_basename.
4240 * functions.def: Add DEFFUNC for basename.
4242 * basename.c: Only define basename if NEED_basename.
4246 * config.table: Fix --enable-shared logic for native builds.
4250 * cplus-dem.c (demangle_template): Demangle bool literals properly.
4254 * strtol.c strtoul.c: Replace these with less buggy versions from
4255 NetBSD. (strtoul in particular couldn't handle base 16.)
4259 * config/mt-vxworks5 (HDEFINES): Define NO_SYS_PARAM_H.
4261 * clock.c: If NO_SYS_PARAM_H is defined, don't include
4263 * getcwd.c, getpagesize.c, getruntime.c: Likewise.
4267 * getruntime.c (get_run_time): Don't assume that CLOCKS_PER_SEC is
4268 a number; ANSI appears to permit any expression, including a
4271 * config.table (*-*-vxworks5*): Use mt-vxworks5 when configuring
4273 * config/mt-vxworks5: New file.
4277 * basename.c (basename): Change argument to be const.
4281 * Makefile.in (lneeded-list): Don't worry about xmalloc.
4285 * Makefile.in (distclean): Delete xhost-mkfrag.
4289 * Makefile.in (lneeded-list): If alloca.o is needed, so is xmalloc.o.
4294 * Makefile.in (REQUIRED_OFILES, CFILES): List it.
4295 (hex.o): Add dependencies.
4297 * cplus-dem.c (demangle_prefix): For GNU style constructor and
4298 destructor names, try demangling the remainder of the string.
4302 * vasprintf.c (int_vasprintf): New static function.
4303 (vasprintf): Use int_vasprintf. Removes assumption that va_list
4304 is assignment compatible.
4308 * Makefile.in (LIBCFLAGS): New variable.
4309 (FLAGS_TO_PASS): Pass it.
4314 * getopt.c, getopt1.c: Do compile these functions under Linux,
4315 since many native versions are based on glibc but are buggy.
4319 * vasprintf.c: Make 'format' arg be const, to avoid a mismatch
4320 with prototype in GNU libc. Support stdarg.h as well as varargs.h.
4324 * Makefile.in (REQUIRED_OFILES): Add vasprintf.o.
4325 * functions.def: Remove vasprintf.
4329 * xmalloc.c (first_break): New static variable.
4330 (xmalloc_set_program_name): Record sbrk (0) in first_break.
4331 (xmalloc): If memory allocation fails, try to report how much
4332 memory was allocated by the program up to this point.
4333 (xrealloc): Likewise.
4337 * Makefile.in (ERRORS_CC): New variable, defaulted to $(CC). Use it
4339 * config.table: Add host RISCiX Makefile frag.
4340 * config/mh-riscix: New file.
4344 * Makefile.in (FLAGS_TO_PASS): Define.
4345 ($(RULE1)): Use $(FLAGS_TO_PASS).
4349 * vasprintf.c: Include <string.h>.
4350 (vasprintf): Add casts to void for va_arg to avoid gcc warnings.
4351 * xatexit.c: Declare malloc.
4355 * cplus-dem.c (demangle_args): Fix a bug in previous patch (the
4360 * cplus-dem.c (demangle args): Handle ARM repeat encoding where
4361 the type index is greater than 9.
4365 * cplus-dem.c (demangle_qualified): accept optional '_' between
4366 qualified name. This is baecause the template name may end with
4367 numeric and can mixed up with the length of next qualified name.
4371 * config/mt-sunos4: Use our standard location for cross-includes
4372 and cross-libs when the target is also a "host" environment (ie no
4373 newlib; includes and such don't belong to us). This is specific
4374 to the Cygnus Support environment.
4378 * cplus-dem.c (demangle_template): demangle as xxx<'Q'> not
4383 * cplus-dem.c (main): flush stdout to make pipe work.
4387 * config.table (*-*-cxux7*): Recognize.
4388 * floatformat.c (floatformat_m88110_ext) [HARRIS_FLOAT_FORMAT]:
4389 Harris-specific float format.
4390 * config/mh-cxux7: New file.
4394 * cplus-dem.c (demangle_template): Make sure that the result of
4395 consume_count doesn't index beyond the end of the string.
4399 * cplus-dem.c (gnu_special): Handle vtable mangling of gcc-2.4.5 and
4400 earlier. Improve test for new vtable mangling. Change output back
4405 * obstack.c: Always compile this code, even if using the GNU
4406 library. Avoids problems with relatively recent binary
4411 * cplus-dem.c: Include libiberty.h.
4412 (xmalloc, xrealloc, free): Don't declare.
4413 (strstr): Don't declare parameters.
4414 (xmalloc, xrealloc): Don't define.
4415 (long_options): Add no-strip-underscores.
4416 (main): Call xmalloc_set_program_name. Pass n in short options to
4417 getopt_long. Handle option 'n' to not strip underscores.
4418 (usage): Mention -n and --no-strip-underscores.
4422 * cplus-dem.c (demangle_template): Separate consecutive >'s with a
4424 (gnu_special): Demangle template and qualified names in a vtable name.
4428 From gas-2.3 and binutils-2.4 net releases:
4432 * makefile.dos: [new] Makefile for dos/go32
4433 * configure.bat: update for latest files
4434 * msdos.c: remove some functions now in libc.a
4438 * cplus-dem.c (gnu_special): Recognize thunks, as well as
4439 the new naming style for vtables (when -fvtable-thunks).
4443 * Makefile.in (XTRAFLAGS): Don't define.
4444 (.c.o, dummy.o): Don't use XTRAFLAGS.
4445 ($(RULE1)): Don't pass XTRAFLAGS down in recursive call.
4449 * vasprintf.c: New file.
4450 * Makefile.in, functions.def: Add it.
4454 * cplus-dem.c (demangle_fund_type): Grok bool.
4458 * config.table: Add go32
4459 * config/mh-go32: New template.
4463 * config.table, config/mt-sunos4: config for when sun4 is cross target.
4467 * getopt.c [not __GNU_LIBRARY__] [__GCC__] [not __STDC__]:
4468 Declare strlen to return int. Don't include stddef.h.
4472 * getopt.c: Delete use of IN_GCC to control whether
4473 stddef.h or gstddef.h is included.
4477 * cplus-dem.c (demangle_signature): Fix a bug in template function
4482 * cplus-dem.c (demangle_signature): Fix template function with arm
4483 style argument type number, Tn.
4487 * cplus-dem.c (optable): Add new[] and delete[].
4491 * argv.c (buildargv): Don't produce empty argument just because
4492 there is trailing whitespace.
4496 * cplus-dem.c (demangle_template): fix 'Q' qualified name bug.
4497 Handle 'p' same as 'P'.
4498 * cplus-dem.c (do_type): Handle 'p' same as 'P'.
4502 * floatformat.c (get_field, put_field): Fix off by one error in
4507 * floatformat.c (floatformat_from_double): Pass unsigned char *,
4508 not char *, to put_field.
4512 * memmove.c: Re-wrote; placed in public domain.
4516 * cplus-dem.c (demangle_prefix): If ARM demangling, don't treat
4517 __Q* as a constructor.
4521 * ieee-float.c: Removed; no longer used.
4522 * Makefile.in: Changed accordingly.
4526 * floatformat.c (get_field): Removed unused local variable i.
4527 (put_field): Removed unused local variable i.
4531 * floatformat.c: New file, intended to replace ieee-float.c.
4532 * Makefile.in: Change accordingly.
4536 * getopt.c: Remove #ifdef GETOPT_COMPAT and #if 0 code.
4537 (_getopt_initialize): New function, broken out of _getopt_internal.
4539 If long_only and the ARGV-element has the form "-f", where f is
4540 a valid short option, don't consider it an abbreviated form of
4541 a long option that starts with f. Otherwise there would be no
4542 way to give the -f short option.
4546 * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]:
4547 Test just __STDC__, not emacs.
4551 * getopt.c [not __GNU_LIBRARY__] [__GNUC__] [not IN_GCC]
4552 [emacs] [not __STDC__]: Don't include stddef.h. Don't declare strlen.
4556 * getopt.c (_NO_PROTO): Define before config.h is included.
4560 * getopt.c, getopt1.c [emacs || CONFIG_BROKETS]: Include
4561 <config.h> only under these, else "config.h".
4565 * getopt.c, getopt1.c [HAVE_CONFIG_H]: Include
4566 <config.h> instead of "config.h".
4570 * concat.c: Check ANSI_PROTOTYPES rather than __STDC__ to decide
4571 whether to use prototypes or not.
4572 * strerror.c (const): Never undefine; let ansidecl.h handle it.
4573 * strsignal.c (const): Likewise.
4577 * xatexit.c (_xexit_cleanup): Declare as extern; don't initialize.
4578 Merging common and initialized variables need not be supported by
4580 (xatexit): Initialize _xexit_cleanup if not already set.
4581 * xexit.c: Comment fix.
4585 * xmalloc.c: Don't declare xexit; it's declared in libiberty.h.
4586 (xrealloc): If oldmem is NULL, allocate with malloc, rather than
4587 assuming that realloc works correctly.
4591 * concat.c, ieee-float.c: Replace inclusion of <string.h>
4592 with explicit function declarations, as recommended by Ian Taylor.
4596 * xmalloc.c (xmalloc, xrealloc): Use PTR and size_t throughout.
4597 (malloc, realloc): Declare.
4601 * argv.c, basename.c: Include ansidecl.h and libiberty.h.
4602 * concat.c, fdmatch.c, getruntime.c, spaces.c: Likewise.
4603 * strerror.c, strsignal.c, xatexit.c, xexit.c: Likewise.
4604 * xmalloc.c: Likewise.
4605 * concat.c: Don't declare xmalloc. If __STDC__, use <stdarg.h>
4606 macros, not <varargs.h> macros.
4607 * spaces.c (spaces): Make return type const. Don't crash if
4608 malloc returns NULL.
4609 * strerror.c (struct error_info): Make name and msg fields const.
4610 (error_names): Make const.
4611 (strerrno): Make const.
4612 (strtoerrno): Make argument const.
4613 * strsignal.c (struct signal_info): Make name and msg fields
4615 (signal_names, sys_siglist): Make const.
4616 (strsignal, strsigno): Make const.
4617 (strtosigno): Make argument const.
4618 * xatexit.c: Declare parameter types.
4619 * xmalloc.c (name): Make const.
4620 (xmalloc_set_program_name): Make argument const.
4621 * Makefile.in (INCDIR): Define.
4622 (.c.o): Use $(INCDIR).
4623 (dummy.o): Likewise.
4624 (argv.o, basename.o): New targets; depend on libiberty.h.
4625 (concat.o, fdmatch.o, getruntime.o, spaces.o): Likewise.
4626 (strerror.o, strsignal.o, xatexit.o, xexit.o): Likewise.
4627 (xmalloc.o): Likewise.
4628 (cplus-dem.o): New target; depend on demangle.h.
4629 (getopt.o, getopt1.o): New targets; depend on getopt.h.
4630 (ieee-float.o): New target; depend on ieee-float.h.
4631 (obstack.o): New target; depend on obstack.h.
4635 Handle obstack_chunk_alloc returning NULL. This allows
4636 obstacks to be used by libraries, without forcing them
4637 to call exit or longjmp.
4638 * obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
4639 If CALL_CHUNKFUN returns NULL, set alloc_failed, else clear it.
4640 (_obstack_begin, _obstack_begin_1): Return 1 if successful, 0 if not.
4644 * concat.c, ieee-float.c: Include <string.h>.
4648 * xmalloc.c (xmalloc_set_program_name): New function.
4649 (xmalloc, xrealloc): Include the name in the error message, if set.
4651 * Replace atexit.c with xatexit.c.
4652 * Makefile.in (CFILES), functions.def: Change references.
4656 * getruntime.c (get_run_time): Use getrusage or times if
4657 HAVE_GETRUSAGE or HAVE_TIMES are defined.
4661 * atexit.c: New file.
4662 * Makefile.in (CFILES), functions.def: Add it.
4663 * xexit.c: New file.
4664 * Makefile.in (CFILES, REQUIRED_OFILES): Add it.
4665 * xmalloc.c (xmalloc, xrealloc): Call xexit instead of exit.
4666 Change request for 0 bytes into request for 1 byte.
4670 * xmalloc.c (xmalloc, xrealloc): Print size using %lu, and cast to
4671 unsigned long, to avoid warnings.
4675 * dummy.c: Don't include time.h ever; always define clock_t as
4676 "unsigned long". Until gcc/fixincludes ensures that clock_t
4677 exists, __STDC__ isn't a sufficient test. And if clock() doesn't
4678 exist, clock_t probably doesn't either.
4682 * clock.c, getruntime.c: New files.
4683 * Makefile.in: Add to file lists.
4684 * functions.def (clock): Add to list.
4685 * dummy.c (time.h): Add if __STDC__.
4686 (clock_t): #define as "unsigned long" if not __STDC__.
4695 * Makefile.in (errors): Use CFLAGS as well as LDFLAGS when
4700 * cplus-dem.c (demangle_arm_pt): New function. Common code
4701 for ARM template demangling.
4702 * cplus-dem.c (demangle_class_name): Use demangle_arm_pt.
4703 * cplus-dem.c (demangle_prefix): Likewise.
4707 * cplus-dem.c (cplus_demangle_opname): Add CONST to please gcc.
4712 * strerror.c, strsignal.c: As a small space optimization, don't
4713 include messages when they aren't actually used.
4715 Merge changes from takefive.co.at!joe (Josef Leherbauer)
4716 * cplus-dem.c (demangle_prefix, demangle_function_name,
4717 cplus_demangle_opname): Fixes for systems where cplus_marker
4718 is something other than '$'.
4722 * waitpid.c: Simple-minded approcimation to waitpid
4724 * functions.def, Makefile.in: Update accordingly,
4728 * cplus-dem.c(demangle_template): fix bug template instantiation
4729 with value of user defined type.
4733 * cplus-dem.c(cplus_demangle_opname): add the subject new function
4734 to support unified search of operator in class.
4739 * strtoul.c (strtoul): use "(digit = *s) != '\0'" not just
4740 "digit = *s" as condition in while loop.
4744 * Makefile.in: pass SHELL to recursive make
4748 * vfprintf.c, vprintf.c, vsprintf.c: Make format arg
4749 be (const char*), for ANSI (and gcc w/fixproto) consistency.
4753 * config.table: Make *-*-hiux* use mh-hpux.
4757 * config.table: Add * to end of all OS names.
4761 * Makefile.in (lneeded-list): ensure that object file names are
4762 not duplicated, as multiple instances of the same object file in
4763 a library causes problems on some machines
4767 * strcasecmp.c, strncasecmp.c: Change u_char to unsigned char.
4771 * strncasecmp.c: new file, implements strncasecmp
4772 * strcasecmp.c: new file, implement strcasecmp
4774 * Makefile.in (CFILES): list these two new source files
4776 * functions.def: add strcasecmp and strncasecmp entries
4780 * strtoul.c (strtoul), strtol.c (strtol): Handle overflow
4781 according to ANSI C.
4785 * cplus-dem.c: add support of ARM global constructor/destructor,
4786 and 'G' for passing record or union in parameter.
4790 * Makefile.in: Fix comment to clarify that stuff in REQUIRED_OFILES
4791 should not be in functions.def.
4795 * functions.def: Removed xmalloc. Stuff in REQUIRED_OFILES should
4796 not be in functions.def.
4800 * cplus-dem.c: change globl constructor/destructor to proper name
4804 * cplus-dem.c: fix bug in constructor/destructor
4808 * cplus-dem.c: support both old and new _vt$... vtbl mangled names
4812 * cplus-dem.c: Fix demangle_template prototype
4816 * cplus-dem.c: fix template demangling
4817 * cplus-dem.c: fix const type demangling
4818 * cplus-dem.c: fix constructor/destructor, virtual table,
4819 qualifier, global constructor/destructor demangling
4823 * strsignal.c, strerror.c: Use fully-bracketed initializer to
4824 keep gcc -Wall happy.
4828 * cplus-dem.c (do_type): Add CONSTS to make gcc happy with last
4833 Patch from Paul Flinders:
4834 * cplus-dem.c (do_type): Deal with arrays.
4838 * cplus-dem.c (demangle_qualified: Deal with GNU format for more
4843 * Makefile.in (dummy.o): Redirect to /dev/null to avoid "variable
4844 not initialized" warnings under HP/UX
4848 * strerror.c: Move include of stdio.h after sys_errlist #define.
4849 Also remove NULL definition (stdio.h always defines NULL, so it
4850 never did anything but clutter up the code).
4854 * Makefile.in, functions.def: handle xmalloc.c
4856 * xmalloc.c: provide xmalloc and xrealloc functions
4860 * cplus-dem.c: Fix a comment.
4864 * getopt1.c: Declare const the way getopt.c does.
4868 * obstack.c, alloca.c: Update from FSF.
4869 * getopt.c, getopt1.c: Update to current FSF version, which
4874 * Makefile.in (demangle): Add the target with a message saying
4875 where demangle went.
4879 * Makefile.in: Remove obsolete `demangle' target.
4884 avoid infinite loop on vtbl symbols with disambiguating "junk"
4889 * strsignal.c: work around some systems losing definitions of
4892 * config/mh-lynxos: this system has a losing definition of
4895 * config.table: use mh-lynxos for *-*-lynxos
4899 * config.table: Add support for HPPA BSD hosts.
4901 * config/mh-hpbsd: New file.
4905 * Makefile.in (TAGS): make work when srcdir != objdir.
4909 * cplus-dem.c (main): Add long options, including --help and
4911 (usage): New function from code in main.
4915 * config.table: New shell scipt, sourced by both ./configure,in
4916 and ../xiberty/configure.in, to avoid maintainance lossages.
4917 * configure.in and ../xiberty/configure.in: Use config.table.
4919 * configure.in: Don't use mh-aix for AIX 3.2, only for 3.1.
4920 * configure.in: Map *-*-irix* (except irix4) to mh-sysv.
4921 * ../xiberty/configure.in: Update from ./configure.in.
4923 Tue Jun 15 17:05:31 1993 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
4925 * Makefile.in: remove parentdir support
4929 * cplus-dem.c (xrealloc): Match definition with prototype.
4933 * cplus-dem.c (demangle_prefix): Demangle cfront
4934 local variables as an extension to ARM demangling.
4938 * ieee-float.c: Don't require pointers to double to be aligned.
4943 * cplus-dem.c (consume_count): Simplify.
4944 * cplus-dem.c (arm_pt, demangle_class_name): New functions.
4945 * cplus-dem.c (various): Calls to arm_pt, demangle_class_name.
4947 * cplus-dem.c (xmalloc, xrealloc, strstr): Make extern decls into
4949 * cplus-dem.c (free): Add prototype.
4950 * cplus-dem.c (optable): Fully bracketize initializer.
4954 * cplus-dem.c: Whether initial underscores are stripped
4955 depends on the external variable prepends_underscore
4956 (which is generated by the binutils Makefile).
4960 * cplus-dem.c (mop_up, arm_special): Remove some unused variables.
4964 * cplus-dem.c (consume_count): Return zero if arg does not
4965 start with digit, and don't consume any input.
4969 * Makefile.in (demangle): Use ${srcdir} not $^.
4971 * strtod.c: New file, needed at least for BSD 4.3.
4975 * strsignal.c (sys_siglist): For ANSI compilations, type is
4976 "const char *const". Also remove conditionalization on __STDC__
4977 since const is defined away for non-ANSI.
4981 * configure.in: Recognize *-*-hpux.
4982 * config/mh-hpux: New file.
4986 * tmpnam.c: Added ANSI tmpnam() function.
4987 * functions.def, Makefile.in: Update accordingly.
4991 * cplus-dem.c (demangle_function_name): Get the demangling of
4994 Fri Apr 16 23:48:24 1993 Jim Kingdon (kingdon at calvin)
4996 * cplus-dem.c: Declare strstr return type.
5000 * strsignal.c: Add some AIX signals.
5004 * Makefile.in (MAKEOVERRIDES): Define to be empty.
5006 Wed Mar 24 01:59:25 1993 david d `zoo' zuhn (zoo at poseidon.cygnus.com)
5008 * Makefile.in: add installcheck & dvi targets
5012 * ieee-float.c: New file, moved from ../gdb (since it is
5013 needed by ../opcode/m68k-dis.c).
5017 * cplus-dem.c: Replace all references to cfront with ARM.
5021 * cplus-dem.c: Fix main program (when compiled with -DMAIN)
5022 to be more useful as a filter.
5026 * Makefile.in (install_to_libdir, install_to_tooldir): Go into the
5027 destination directory before running $(RANLIB), in case that
5028 program tries to create a file in the current directory as part of
5033 * strsignal.c (sys_siglist): Remove yet another *%^&%&$# "const"
5034 because BSD 4.4 lacks one. Isn't this fun?
5038 * cplus-dem.c (demangle_signature): Set func_done after
5039 demangling a template.
5040 * cplus-dem.c (demangle_template): Fix several small bugs
5041 in demangling GNU style templates.
5042 * cplus-dem.c (demangle_prefix): Fix for templates in GNU
5044 * cplus-dem.c (gnu_special): Fix for templates in GNU style
5045 static data members.
5049 * cplus-dem.c (demangle_signature): Modify to include type
5050 modifiers like static and const in remembered types.
5054 * cplus-dem.c (demangled_qualified): Add new parameter that tells
5055 whether to prepend or append the qualifiers.
5056 * cplus-dem.c (string_prepends): Used now, remove #if 0.
5057 * cplus-dem.c (demangle_signature): Call demangle_qualified
5059 * cplus-dem.c (gnu_special): Recognize static data members that
5060 use qualified names.
5061 * cplus-dem.c (demangle_qualified): Accumulate qualifiers in a
5062 temporary buffer and the prepend or append them to the result,
5063 as specified by the new "append" flag.
5064 * cplus-dem.c (do_type): Call demangled_qualified with
5069 * strsignal.c (signal_table): Now const.
5070 (init_signal_tables): Variable eip now points to const.
5072 * strerror.c (error_table): Now const.
5073 (init_error_tables): Variable eip now points to const.
5077 * memchr.c (memchr): New (ANSI standard) function.
5078 * Makefile.in, functions.def: Added memchr.
5079 * Makefile.in (AR_FLAGS): Use rc instad of non-standard cq.
5081 Wed Dec 2 22:49:10 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5083 * getopt.c: remove use of USG around <alloca.h>, which never meant
5086 * config/mh-{aix,apollo68,ncr3000,sysv,sysv4}: removed definitions
5091 * cplus-dem.c (demangle_fund_type): Recognize `w', a wide character;
5092 it's now a type according to the ANSI X3J16 working paper; output
5094 (demangle_template): Accept `w' as an integral type.
5095 (xmalloc, xrealloc): Use `char *', not `PTR'. Cast calls to their
5096 counterparts malloc and realloc to `char *'.
5097 (main): Exit with a 0 status.
5098 * Makefile.in (demangle): Don't expect the user to define
5099 DEMANGLE, instead force to be cplus-dem.c. Look in $(srcdir)/../include
5100 for demangle.h. Pass it any HDEFINES or XTRAFLAGS.
5104 * Makefile.in (AR_FLAGS): Avoid verbosity.
5105 * config/mh-sysv4: Remove AR_FLAGS override, use INSTALL=cp,
5106 replace USGr4 with HAVE_SYSCONF.
5107 * config/mh-solaris: Remove; mh-sysv4 works now.
5108 * getpagesize.c: Replace USGr4 with HAVE_SYSCONF.
5109 * configure.in: Simplify host matching table, remove separate
5110 solaris config file.
5114 * configure.in (i[34]86-*-solaris2*): Add, use mh-sysv4.
5118 * cplus-dem.c (xmalloc, xrealloc): Add decls.
5119 (remember_type): Don't cast xmalloc.
5120 (string_need): Likewise; don't cast xrealloc either.
5124 * Makefile.in, functions.defs, rename.c: added simple
5125 implementation of rename, since some binutils programs use it.
5129 * strsignal.c: Add appropriate 'const' to sys_siglist
5130 extern declaration (if __STDC__). (Needed for Linux.)
5131 * strsignal.c (strsignal): Add cast to remove const-ness.
5135 * Makefile.in (needed.awk, needed2.awk): Remove erroneous \'s
5136 before "'s, diagnosed by BSD 4.4 awk.
5140 * Makefile.in: create config.h and needed-list through $(CONFIG_H)
5141 and $(NEEDED_LIST), to give some hooks for xiberty.
5143 Thu Oct 1 23:31:42 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5145 * configure.in: use cpu-vendor-triple instead of nested cases
5149 * Makefile.in, argv.c, basename.c, bcmp.c, bcopy.c, bzero.c,
5150 concat.c, cplus-dem.c, fdmatch.c, getcwd.c, getopt.c, getopt1.c,
5151 getpagesize.c, insque.c, memcmp.c, memcpy.c, memmove.c, memset.c,
5152 obstack.c, sigsetmask.c, spaces.c, strchr.c, strerror.c,
5153 strrchr.c, strsignal.c, strstr.c, vfork.c, vsprintf.c:
5154 Convert from using GPL to LGPL.
5158 * Makefile.in (errors): Leave dummy.o and dummy around so that
5159 we can see how the needed list was generated (it's sometimes wrong).
5160 (mostlyclean): Remove them.
5164 * getcwd.c: supply a default if MAXPATHLEN is not defined.
5166 * config/mh-irix4: set EXTRA_OFILES to alloca.o, from WRS.
5170 * Makefile.in: Use XTRAFLAGS when compiling, so that xiberty works
5171 when cross-compiling.
5175 * cplus-dem.c: (demangle_prefix): reduction in strength of strstr
5176 as a time optimization.
5178 * cplus-dem.c (cplus_demangle): remove strpbrk test. Appears to
5179 be more expensive than simply demangling.
5181 * cplus-dem.c (cplus_match): new function.
5185 * cplus-dem.c: #include <stdio.h>, to define NULL.
5186 Define current_demangling_style.
5190 * cplus-dem.c: New file, moved from ../gdb.
5191 * cplus-dem.c (set_cplus_marker_for_demangling): New exported
5192 function, to avoid compiling in target-dependency for CPLUS_MARKER.
5193 * cplus-dem.c (cplus_demangle): Allow demangling style option
5194 to be passed as a parameter, but using the global variable
5195 current_demangling_style as a default.
5196 * Makefile.in: Update for cplus-dem.c
5200 * obstack.c: Merge in comment changes from FSF version. Now
5201 matches the FSF version exactly.
5205 * obstack.c (CALL_FREEFUN): Can't use ?: with void values (at
5206 least on losing DECstations!); use if-then-else instead.
5210 * Makefile.in: always create installation directories.
5212 Mon Aug 10 17:33:40 1992 david d `zoo' zuhn (zoo at cirdan.cygnus.com)
5214 * Makefile.in: clean up definition of CFILES, more comments
5218 * getopt.c (my_index): Make first arg const to match strchr,
5219 which it sometimes is remapped to.
5223 * obstack.c (DEFAULT_ALIGNMENT): Update to match FSF version.
5224 * obstack.c (_obstack_begin): Initialize use_extra_arg.
5225 * obstack.c (_obstack_begin_1): New, from FSF version.
5229 * obstack.c (CALL_CHECKFUN, CALL_FREEFUN): Use use_extra_arg and
5231 * obstack.c (_obstack_begin): Remove area_id and flags arguments
5232 (previously added for mmalloc support, interface has changed).
5233 Also convert flags usage to use use_extra_arg and maybe_empty_object.
5237 * argv.c: Move expandargv inline and eliminate static variables.
5238 Rewrite to always allocate in powers of two. Fix to return an
5239 argv with a single null string arg if passed a null string.
5243 * random.c, sigsetmask.c, strerror.c, strsignal.c: Remove
5244 "(void)" casts from function calls where the return value is
5245 ignored, in accordance with GNU coding standards.
5247 Mon Jun 29 10:54:19 1992 Fred Fish (fnf at cygnus.com)
5249 * bcopy.c, strerror.c, strsignal.c: Lint.
5253 * getopt.c: merge changes from make.
5255 Thu Jun 25 04:43:22 1992 John Gilmore (gnu at cygnus.com)
5257 * alloca.c: Incorporate fixes from gdb/alloca.c.
5258 FIXME: Eventually move gdb's alloca configuration files here,
5259 and remove gdb/alloca.c and its Makefile.in support.
5263 * dummy.c: Define NOTHING to /*nothing*/, change return type
5264 of main to int and return zero.
5265 * functions.def: Supply NOTHING as the fourth arg to macros
5266 that don't have an explicit arg, to satisfy picky preprocessors.
5270 * Makefile.in: Clean up *clean rules, as per standards.texi.
5274 * getopt.c, getopt1.c: merged largely gratuitous, mostly
5275 whitespace diffs from other prep distributions.
5279 * config/mh-ncr3000 (INSTALL): Don't use /usr/ucb/install,
5280 it is broken on ncr 3000's.
5282 Mon Jun 15 01:03:26 1992 John Gilmore (gnu at cygnus.com)
5284 * sigsetmask.c: Rewrite. Old one was very confused about its
5285 arguments and result. New one can't do much, but at least knows
5286 what it can't do, and it's good enough for GDB's use.
5288 Sun Jun 14 15:17:40 1992 Stu Grossman (grossman at cygnus.com)
5290 * functions.def: Use proper prototype for strtoul.
5292 Fri Jun 12 19:22:40 1992 John Gilmore (gnu at cygnus.com)
5294 * Makefile.in: Add random.c.
5295 * config/mh-*: Use "true" rather than "echo >/dev/null" for ranlib.
5296 * configure.in: update solaris2 config.
5300 * random.c: Add for random() and srandom().
5301 * functions.def: Add random
5305 * config/{mh-ncr3000, mh-sysv4}: Add definition for INSTALL
5306 using /usr/ucb/install.
5310 * strerror.c: Kludge to guard against a conflict with
5311 possible declaration of sys_errlist in errno.h.
5313 Sun May 31 15:07:47 1992 Mark Eichin (eichin at cygnus.com)
5315 * configure.in, config/mh-solaris: add solaris2 config support.
5319 * sigsetmask.c: #ifdef out sigsetmask if SIG_SETMASK
5320 is not defined (should be defined in signal.h, says Posix.).
5324 * getopt.c: merged changes from make-3.62.11.
5328 * getopt.c: merged changes from bison-1.18.
5332 * Makefile.in: Don't have $(EXTRA_OFILES) depend on config.h,
5333 since that introduces a circular dependency.
5334 ($(EXTRA_OFILES) are used to build config.h.)
5336 * strtoul.c: Fixes to handle non-decimal bases better.
5340 * config/mh-ncr3000: Replace MINUS_G with CFLAGS.
5341 * Makefile.dos: Finish MINUS_G eradication.
5342 * Makefile.in (CFILES): Add strsignal.c.
5343 * Makefile.in (REQUIRED_OFILES): Add strerror.o strsignal.o
5344 * Makefile.in (needed-list): Split creation of errors file to
5345 separate make target.
5346 * Makefile.in (config.h, needed2.awk, errors): New targets.
5347 * Makefile.in (clean): Split to multiple lines, add needed2.awk
5349 * dummy.c (DEFFUNC, DEFVAR): Add defines and undefs.
5350 * functions.def (strerror): Remove from optional list.
5351 * functions.def (sys_nerr, sys_errlist, sys_siglist): DEFVAR's
5352 * functions.def (strerror, psignal): DEFFUNC's
5353 * strerror.c: Rewrite from scratch to use sys_errlist only if
5354 available, add errno_max(), add strerrno(), add strtoerrno(),
5356 * strsignal.c: New file, signal equivalent to strerror.c.
5357 Uses sys_siglist if available, defines signo_max(), strsignal(),
5358 strsigno(), strtosigno(), psignal(), and test driver.
5362 * Makefile.in: do not print recursion line.
5364 * Makefile.in: allow CFLAGS to be passed in from command line.
5365 Removed MINUS_G. Default CFLAGS to -g.
5369 * config/mh-aix: New. EXTRA_OFILES lists copysign.o,
5370 so libg++ users don't have to be inconvenienced by a
5371 libc.a bug (libc.a needs copysign, but doesn't define it!).
5372 * configure.in: Use config/mh-aix.
5373 * strtoul.c: Handle '-' as required by ANSI.
5374 Clean up radix handling.
5375 * strstr.c: Fix buggy algorithm.
5376 * Makefile.in: Change so that ${EXTRA_OFILES} is
5377 appended to needed-list (which is used by libg++).
5381 * configure.in: Recognize new ncr3000 config.
5382 * config/mh-ncr3000: New config file.
5384 Wed Apr 1 23:31:43 1992 John Gilmore (gnu at cygnus.com)
5386 * argv.c, dummy.c: Lint.
5390 * config/mh-sysv4: New config file.
5391 * configure.in (host_makefile_frag): Set to config/mh-sysv4 for
5393 * getpagesize.c: For SVR4, use sysconf(_SC_PAGESIZE) to get
5396 Sun Mar 29 12:26:42 1992 John Gilmore (gnu at cygnus.com)
5402 * functions.def (alloca): Fix return type and args to avoid
5403 type clash with gcc's builtin alloca.
5407 * configure.in, config/mh-irix4: irix4 support.
5409 * Makefile.in, functions.def, alloca.c: added alloca.
5411 Tue Mar 24 17:34:46 1992 Stu Grossman (grossman at cygnus.com)
5413 * obstack.c (CALL_FREEFUN): Make it compile on DECstations.
5417 * argv.c: Fix various external function definitions to be
5418 correct in an ANSI compilation environment.
5422 * obstack.c: Changes to support calling mmalloc functions,
5423 which take an additional argument over malloc functions.
5427 * added check target.
5431 * argv.c: #include alloca-conf.h (needed by AIX).
5435 * Makefile.in, configure.in: removed traces of namesubdir,
5436 -subdirs, $(subdir), $(unsubdir), some rcs triggers. Forced
5437 copyrights to '92, changed some from Cygnus to FSF.
5439 Sat Feb 22 01:09:21 1992 Stu Grossman (grossman at cygnus.com)
5441 * argv.c: Check in Fred's version which fixes problems with
5444 Fri Feb 7 21:46:08 1992 Stu Grossman (grossman at cygnus.com)
5446 * makefile.dos: Remove NUL to keep patch from failing.
5448 Thu Jan 30 22:48:41 1992 Stu Grossman (grossman at cygnus.com)
5450 * getopt.c (_getopt_internal): Fix usage of enum has_arg.
5452 Mon Jan 20 18:53:23 1992 Stu Grossman (grossman at cygnus.com)
5454 * getopt.c, getopt1.c, ../include/getopt.h: Get latest versions.
5456 Sat Jan 18 16:53:01 1992 Fred Fish (fnf at cygnus.com)
5458 * argv.c: New file to build and destroy standard argument
5459 vectors from a command string.
5461 * Makefile.in: Add argv.c and argv.o to appropriate macros.
5463 Fri Dec 20 12:12:57 1991 Fred Fish (fnf at cygnus.com)
5465 * configure.in: Change svr4 references to sysv4.
5467 * rindex.c: Declare return type of externally used function
5470 Thu Dec 19 18:35:03 1991 John Gilmore (gnu at cygnus.com)
5472 * Makefile.in: Remove "***" in normal output, since Make produces
5473 this on errors, and it's convenient to search for.
5475 Tue Dec 17 23:21:30 1991 Per Bothner (bothner at cygnus.com)
5477 * memcmp.c, memcpy.c, memmove.c, memset.c, strchr.c, strrchr.c:
5478 New ANSI functions. The old non-ANSI functions (such as bcopy)
5480 * bcopy.c: Fix to correctly handle overlapping regions.
5481 * index.c, rindex.c: Re-write in terms of strchr() and strrchr().
5482 * functions.def: Add the new functions.
5483 * functions.def: Add 4th parameter to DEF macro,
5484 an ansidecl.h-style prototype.
5485 * dummy.c: Use expanded DEF macro to create a dummy function
5486 call, with correct parameter types. (This avoids some
5487 complaints from gcc about predefined builtins.)
5489 Move the functionality of config/mh-default into Makefile.in.
5490 This avoid duplication, and simplifies things slightly.
5491 * Makefile.in: Tweak so we don't need config/mh-default.
5493 * configure.in: No longer need config/mh-default.
5494 * config/mh-default: Deleted.
5495 * config/mh-sysv: Remove lines copied from old mh-default.
5497 Tue Dec 17 05:46:46 1991 John Gilmore (gnu at cygnus.com)
5499 * fdmatch.c (fdmatch): Don't compare st_rdev, which is for
5500 'mknod' device numbers.
5502 Mon Dec 16 12:25:34 1991 Fred Fish (fnf at cygnus.com)
5504 * fdmatch.c, Makefile.in: Add new function that takes two
5505 open file descriptors and returns nonzero if they refer to
5506 the same file, zero otherwise. (used in gdb)
5508 Wed Dec 11 17:40:39 1991 Steve Chamberlain (sac at rtl.cygnus.com)
5510 * msdos.c: stub functions for dos.
5511 * makefile.dos, configdj.bat: new.
5512 * getopt.c: Don't include alloca-conf.h in a GO32 world.
5515 Tue Dec 10 04:14:49 1991 K. Richard Pixley (rich at rtl.cygnus.com)
5517 * Makefile.in: infodir belongs in datadir.
5519 Fri Dec 6 23:26:45 1991 K. Richard Pixley (rich at rtl.cygnus.com)
5521 * Makefile.in: remove spaces following hyphens because bsd make
5522 can't cope. added standards.text support. install using
5525 * configure.in: remove commontargets as it is no longer a
5528 Thu Dec 5 22:46:46 1991 K. Richard Pixley (rich at rtl.cygnus.com)
5530 * Makefile.in: idestdir and ddestdir go away. Added copyrights
5531 and shift gpl to v2. Added ChangeLog if it didn't exist. docdir
5532 and mandir now keyed off datadir by default.
5534 Fri Nov 22 19:15:29 1991 John Gilmore (gnu at cygnus.com)
5536 * Makefile.in: find-needed.awk does not fit in 14 chars.
5538 * Makefile.in: Suppress error checking when compiling the test
5539 program, because Ultrix make/sh aborts there due to a bug.
5541 Fri Nov 22 12:23:17 1991 Per Bothner (bothner at cygnus.com)
5543 * Makefile.in: Re-did how EXTRA_OFILES is used to be more useful.
5544 * README: Explained how the auto-configuration works,
5545 and how to add new files and/or configurations.
5547 Fri Nov 22 09:45:23 1991 John Gilmore (gnu at cygnus.com)
5549 * strtoul.c: Avoid defining ULONG_MAX if already defined;
5550 cast a const char * to char * for pedants.
5552 * getopt.c: Only define "const" after local include files get to,
5553 and only if they haven't defined it.
5555 Thu Nov 21 16:58:53 1991 John Gilmore (gnu at cygnus.com)
5557 * getcwd.c (remove getwd.c): GNU code should call getcwd(). We
5558 emulate it with getwd() if available. This avoids callers having
5559 to find a MAXPATHLEN or PATH_MAX value from somewhere.
5560 * Makefile.in, functions.def: getwd->getcwd.
5561 * configure.in: Use generic case for every system.
5562 * config/mh-{delta88,mach,rs6000,svr4}: Remove.
5563 * config/mh-sysv: Use default handling, just add -DUSG.
5565 Thu Nov 14 10:58:05 1991 Per Bothner (bothner at cygnus.com)
5567 * Makefile.in, config/mh-default: Re-do make magic
5568 so that for the default ("automatic") mode we only
5569 compile the files we actually need. Do this using
5570 a recursive make: The top-level generates the list
5571 of needed files (loosely, the ones missing in libc),
5572 and then passes that list to the recursive make.
5573 * config/mh-mach: Remove obsolete STRERROR-{C,O} macros.
5575 Tue Nov 12 19:10:57 1991 John Gilmore (gnu at cygnus.com)
5577 RS/6000 host support (grumble).
5579 * configure.in: Build alloca-conf.h file from alloca-norm.h
5580 (everything else) or alloca-botch.h (rs/6000).
5581 * Makefile.in: Include . on the include path.
5582 * getopt.c: Use alloca-conf.h.
5583 * alloca-norm.h: How to declare alloca on reasonable machines.
5584 * alloca-botch.h: How to declare alloca on braindead machines.
5586 Tue Nov 12 09:21:48 1991 Fred Fish (fnf at cygnus.com)
5588 * concat.c : New file, like concat() in gdb but can take a
5589 variable number of arguments rather than fixed at 3 args. For
5590 now, client applications must supply an xmalloc(), which is a
5591 front end function to malloc() that deals with out-of-memory
5594 * Makefile.in: Add concat.c and concat.o to appropriate macros.
5596 Sat Nov 9 13:29:59 1991 Fred Fish (fnf at cygnus.com)
5598 * config/mh-svr4: Add sigsetmask to list of required functions.
5600 Sun Nov 3 11:57:56 1991 Per Bothner (bothner at cygnus.com)
5602 * vsprintf.c: New file.
5603 * functions.def, Makefile.in: Add vsprintf.
5605 Sun Oct 27 16:31:22 1991 John Gilmore (gnu at cygnus.com)
5607 * configure.in, config/mh-rs6000: Add rs/6000 host support.
5608 * Makefile.in: Compile with debug info.
5610 Fri Oct 25 17:01:12 1991 Per Bothner (bothner at cygnus.com)
5612 * Makefile.in, configure.in, and new files: dummy.c, functions.def,
5613 config/mf-default: Added a default configuration mode,
5614 which includes into libiberty.a functions that are "missing" in libc.
5615 * strdup.c, vprintf.c, vfprintf.c: New files.
5617 Thu Oct 24 02:29:26 1991 Fred Fish (fnf at cygnus.com)
5619 * config/hmake-svr4: New file.
5621 * config/hmake-sysv: Add HOST_CFILES and HOST_OFILES.
5623 * basename.c, bcmp.c, bcopy.c, bzero.c, getpagesize.c getwd.c,
5624 index.c, insque.c, rindex.c, spaces.c, strstr.c, vfork.c: New
5625 files containing either portable C versions or emulations using
5626 native library calls.
5628 * strerror.c: Add copyright, internal documentation, etc.
5630 * strtol.c: Replace hardwired hex constants with some more
5631 portable macros. Remove illegal (according to gcc) cast.
5633 * strtoul.c: Replace hardwired hex constant with more portable
5636 * Makefile.in: Move TARGETLIB and CFLAGS where makefile fragments
5637 can override them. Add new source and object file names to CFILES
5638 and OFILES respectively.
5640 * configure.in: Add support for SVR4 makefile fragments.
5642 Tue Oct 22 19:00:23 1991 Steve Chamberlain (steve at cygnus.com)
5644 * Makefile.in: Move RANLIB, AR and AR_FLAGS to where they can be
5645 over-ridden by config/hmake-*
5646 * configure.in: added m88kcvs to sysv list
5648 Fri Oct 4 01:29:08 1991 John Gilmore (gnu at cygnus.com)
5650 * Makefile.in: Most hosts need strerror, but one or two don't,
5651 and they override these definitions in the host-dependent makefile
5653 * config/hmake-mach: The odd man out on strerror -- it's supplied.
5654 * strerror.c: New file.
5656 * strtol.c, strtoul.c: Add strtol to libiberty, since Mach lacks
5658 * configure.in, Makefile.in, config/hmake-mach: Only configure
5659 strtol & strotoul in on Mach.
5661 Tue Sep 3 06:36:23 1991 John Gilmore (gnu at cygint.cygnus.com)
5663 * obstack.c: Merge with latest FSF version.
5667 version-control: never