Commit Graph

509 Commits

Author SHA1 Message Date
Phil Edwards
bd7e6f2d20 cp-demangle.c (__cxa_demangle): Also protect with IN_GLIBCPP_V3.
2002-04-01  Phil Edwards  <pme@gcc.gnu.org>

	* cp-demangle.c (__cxa_demangle):  Also protect with IN_GLIBCPP_V3.
	(is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_ctor):  Conditionally
	not compile if IN_GLIBCPP_V3 defined.
	* dyn-string.c:  Also allow IN_GLIBCPP_V3 to change allocation scheme.

From-SVN: r51708
2002-04-01 21:55:12 +00:00
Bryce McKinlay
a8f55e51dc cp-demangle.c (java_demangle_v3): Don't try to release "demangled" if it is NULL.
* cp-demangle.c (java_demangle_v3): Don't try to release "demangled"
	if it is NULL.

From-SVN: r51594
2002-03-30 03:30:36 +00:00
DJ Delorie
96adcacb9f hex.c: Add documentation.
* hex.c: Add documentation.
(_hex_value): Provide non-ASCII empty table.
(hex_init): Initialize the non-ASCII table.
* functions.texi: Regenerate.

From-SVN: r51496
2002-03-27 23:04:20 -05:00
Mark Mitchell
2b613c6ac3 * dyn-string.c: Add libgcc exception to copyright notice.
From-SVN: r51461
2002-03-27 18:26:18 +00:00
H.J. Lu
cd862df851 config.table: Support --with-build-subdir.
2002-03-26  H.J. Lu  (hjl@gnu.org)

	* config.table: Support --with-build-subdir.
	* configure.in: Likewise.
	* configure: Rebuild.

From-SVN: r51416
2002-03-26 14:56:51 -08:00
Stuart Griffith
ed30079302 strtod.c (strtod): Increment 8 chars, not 7, when `infinity' seen.
2002-03-18  Stuart Griffith  <Stuart_Griffith@credence.com>

	* strtod.c (strtod): Increment 8 chars, not 7, when `infinity'
	seen.

From-SVN: r50994
2002-03-18 19:52:14 +00:00
Mark Mitchell
b3dd43df63 cp-demangle.c: Add libgcc exception to cp-demangle.c copyright notice.
* cp-demangle.c: Add libgcc exception to cp-demangle.c copyright
	notice.

From-SVN: r50679
2002-03-12 20:34:15 +00:00
Douglas B Rupp
50c7457998 * xatexit.c [VMS]: Include stdlib.h and unixlib.h.
From-SVN: r50575
2002-03-11 07:47:53 -05:00
Jim Blandy
957978a414 splay-tree.c (splay_tree_xmalloc_allocate, [...]): Use K&R-style definitions, not prototyped definitions.
* splay-tree.c (splay_tree_xmalloc_allocate,
splay_tree_xmalloc_deallocate): Use K&R-style definitions, not
prototyped definitions.  Mark `data' arguments as unused.

From-SVN: r50384
2002-03-07 00:20:12 +00:00
Andrew Cagney
ccc49bed1c Remove floatformat_arm_ext.
From-SVN: r50345
2002-03-06 06:29:00 +00:00
Phil Edwards
48d7db63ff configure.in: Add --enable-install-libiberty option.
2002-03-04  Phil Edwards  <pme@gcc.gnu.org>

	* configure.in:  Add --enable-install-libiberty option.
	* Makefile.in (INSTALLED_HEADERS):  New variable.
	(install_to_libdir):  Possibly also copy headers.
	* configure:  Regenerated.

From-SVN: r50288
2002-03-04 21:41:06 +00:00
Neil Booth
af18e951d4 * xmalloc.c (xmalloc_fail): Clarify error message further.
From-SVN: r50287
2002-03-04 21:22:52 +00:00
Neil Booth
d8d7c3c3e3 * xmalloc.c (xmalloc_fail): Clarify error message.
From-SVN: r50265
2002-03-03 21:57:57 +00:00
Jim Blandy
00c2f96f89 Allow the user to specify functions for allocating memory for splay tree roots and nodes.
include:
Allow the user to specify functions for allocating memory for
splay tree roots and nodes.
* splay-tree.h (splay_tree_allocate_fn, splay_tree_deallocate_fn):
New types.
(splay_tree): New fields: `allocate', `deallocate', and
`allocate_data'.
(splay_tree_new_with_allocator): New function declaration.

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

From-SVN: r49968
2002-02-22 17:01:23 +00:00
Scott Snyder
b1c1a22fb2 demangle-expected: Add test case for infinite loop in demangler.
* testsuite/demangle-expected: Add test case for infinite loop in
demangler.
* cplus-dem.c (demangle_arm_hp_template): Stop trying to demangle
if do_type() doesn't make any progress --- prevents an infinite
loop.

From-SVN: r49875
2002-02-19 15:02:16 -05:00
Carlo Wood
336669e7b0 re PR other/5390 ([3.3 only?] Libiberty fails to demangle multi-digit template parameters.)
2002-02-18  Carlo Wood  <carlo@gnu.org>

	PR c++/5390
        * cplus-dem.c (demangle_integral_value): Accept multi-digit
        numbers that do not start with an underscore; This is needed
        for integer template parameters. This doesn't break anything
        because multi-digit numbers are never followed by a digit.
        * testsuite/demangle-expected: Corrected all mangled test
        cases with multi-digit template parameters: g++ 2.95.x does
        not generate underscores around these parameters.

From-SVN: r49851
2002-02-18 22:41:45 +00:00
Jason Merrill
c13db5d119 demangle.h (cplus_demangle_v3): Add "options" parm.
* demangle.h (cplus_demangle_v3): Add "options" parm.
        (cplus_demangle_v3_type): Remove prototype.
        (DMGL_VERBOSE): New macro.
        (DMGL_TYPES): New macro.

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

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

From-SVN: r49525
2002-02-05 11:33:31 -05:00
H.J. Lu
d74697b84d cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2.
2002-02-02  H.J. Lu  (hjl@gnu.org)

	* cp-demangle.c (cp_demangle_type): Do not protect with
	IN_LIBGCC2.
	(cplus_demangle_v3_all): New.
	(cplus_demangle_v3): Call cplus_demangle_v3_all.
	(cplus_demangle_v3_type): Call cplus_demangle_v3_all.

	* cplus-dem.c (cplus_demangle_v3_p): New function pointer.
	Initialized to cplus_demangle_v3.
	(cplus_demangle_with_style): Call cplus_demangle_v3_p instead
	of cplus_demangle_v3.
	(main): Set cplus_demangle_v3_p to cplus_demangle_v3_type for
	command line symbol.

	* testsuite/regress-demangle: Pass the mangled name at the
	command line.

From-SVN: r49456
2002-02-02 20:00:36 -08:00
H.J. Lu
3a441e3884 cp-demangle.c (cp_demangle_type): Call demangling_new with DMGL_GNU_V3.
2002-02-01  H.J. Lu  <hjl@gnu.org>

	* cp-demangle.c (cp_demangle_type): Call demangling_new with
	DMGL_GNU_V3.

From-SVN: r49409
2002-02-01 12:37:13 -08:00
Phil Edwards
6d747e63e0 cp-demangle.c: Revert yesterday's change.
2002-01-31  Phil Edwards  <pme@gcc.gnu.org>

	* cp-demangle.c:  Revert yesterday's change.

From-SVN: r49386
2002-02-01 01:27:21 +00:00
Adam Megacz
46af757b06 configure.in: Treat mingw the same as cywin wrt HAVE_SYS_ERRLIST.
* gcc/libiberty/configure.in: Treat mingw the same as cywin
wrt HAVE_SYS_ERRLIST.

From-SVN: r49371
2002-01-31 13:19:39 -05:00
Phil Edwards
46ab74b1fd cp-demangle.c (cp_demangle_type): Do not protect with IN_LIBGCC2.
2002-01-30  Phil Edwards  <pme@gcc.gnu.org>

	* cp-demangle.c (cp_demangle_type):  Do not protect with IN_LIBGCC2.
	(cplus_demangle_v3):  Mimic __cxa_demangle and fall back on
	cp_demangle_type.
	* testsuite/demangle-expected:  New gnu-v3 test.

From-SVN: r49353
2002-01-31 01:03:05 +00:00
Momchil Velikov
e64d0626b4 configure.in (variable detection): Use arrays of unspecified size instead of plain integers.
* configure.in (variable detection): Use arrays of unspecified
        size instead of plain integers.

From-SVN: r49103
2002-01-22 14:31:52 -08:00
DJ Delorie
9ce3f7e5d3 Makefile.in (TESTLIB): New.
* Makefile.in (TESTLIB): New.  This library is for future
testsuites.
(CFILES, REQUIRED_OFILES, CONFIGURED_OFILES): Re-alphabetize,
break down by letter.
(REQUIRED_OFILES): List long-to-compile files first.
(maint-deps): New, target for updating dependencies.
(dependencies): Update.
* maint-tool: Add dependency-generating option.
* configure.in: Check for _doprnt even if we're not providing it.
* configure: Regenerate.

* _doprnt.c: Modifications to allow compiling on any platform.
* copysign.c: Likewise.
* putenv.c: Likewise.
* setenv.c: Likewise.
* vsprintf.c: Likewise.

From-SVN: r49090
2002-01-22 15:03:29 -05:00
Douglas B Rupp
0e83ceb1b9 mkstemps.c (mkstemps): On VMS, open temp file with option that causes it to be deleted when closed.
* libiberty/mkstemps.c (mkstemps): On VMS, open temp file with option
	that causes it to be deleted when closed.
	* gcc/gcc.c (delete_if_ordinary): Backout previous change.

From-SVN: r48872
2002-01-15 09:34:56 -05:00
Kaveh R. Ghazi
5e65297bbb gcc.c (default_compilers): Const-ify.
* gcc.c (default_compilers): Const-ify.
	* mips-tdump.c (stab_names): Likewise.
	* mips-tfile.c (map_coff_types, map_coff_storage,
	map_coff_sym_type, map_coff_derived_type, stabs_symbol,
	pseudo_ops_t, pseudo_ops): Likewise.
	* protoize.c (default_include): Likewise

f:
	* com.c (clear_binding_level): Const-ify.
	(ffecom_arglist_expr_): Likewise.
	* info.c (ffeinfo_types_): Don't needlessly zero init.
	* lex.c (ffelex_hash_kludge): Const-ify.

java:
	* parse.y (src_parse_roots): Don't needlessly zero init.

libiberty:
	* cp-demangle.c (long_options): Const-ify.
	* cplus-dem.c (long_options): Likewise.

From-SVN: r48485
2002-01-02 23:18:59 +00:00
Kaveh R. Ghazi
adddf5bf27 cplus-dem.c (mystrstr): Delete.
* cplus-dem.c (mystrstr): Delete.  All callers changed to use
	strstr instead.

From-SVN: r48476
2002-01-02 17:07:40 +00:00
Douglas B Rupp
af328d8dd7 configure.in (uintptr_t): Use AC_CHECK_TYPE.
* configure.in (uintptr_t): Use AC_CHECK_TYPE.
	* configure: Regenerated.

From-SVN: r48442
2002-01-01 05:01:43 -05:00
Ira Ruben
a4219437e2 aclocal.m4 (libiberty_AC_FUNC_STRNCMP): Use anon mmap as 2nd try.
* aclocal.m4 (libiberty_AC_FUNC_STRNCMP): Use anon mmap as 2nd try.
* configure: Regenerated.

From-SVN: r48436
2001-12-31 18:23:49 -05:00
Douglas B Rupp
fdfc290b94 configure.in (uintptr_t): Use AC_CHECK_TYPE.
* configure.in (uintptr_t): Use AC_CHECK_TYPE.
	* configure: Regenerated.

From-SVN: r48306
2001-12-24 12:51:40 -05:00
Craig Rodrigues
63de15a4b4 re PR other/2719 (demangler crash)
2001-12-12  Craig Rodrigues  <rodrigc@gcc.gnu.org>

        PR other/2719
        * cplus-dem.c (consume_count): Treat negative count as an error.
        * testsuite/demangle-expected: Added testcase.

From-SVN: r47952
2001-12-12 23:08:07 +00:00
Douglas B Rupp
ee262b6f6a configure.in: Hardcode that vfork works on VMS host.
* gcc/configure.in: Hardcode that vfork works on VMS host.
	* gcc/configure: Regenerated.
	* libiberty/configure.in: Hardcode that vfork works on VMS host.
	* libiberty/configure: Regenerated.

From-SVN: r47869
2001-12-11 07:17:33 -05:00
Richard Henderson
d06ba3c7e6 demangle.h (no_demangling): New.
* demangle.h (no_demangling): New.
        (NO_DEMANGLING_STYLE_STRING): New.

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

From-SVN: r47733
2001-12-06 13:56:15 -08:00
Zack Weinberg
e490616e33 top level:
2001-11-27  DJ Delorie <dj@redhat.com>
	    Zack Weinberg  <zack@codesourcery.com>

	When build != host, create libiberty for the build machine.

	* Makefile.in (TARGET_CONFIGARGS, BUILD_CONFIGARGS): Replace
	CONFIG_ARGUMENTS.
	(ALL_BUILD_MODULES_LIST, BUILD_CONFIGDIRS, BUILD_SUBDIR):
	New variables.
	(ALL_BUILD_MODULES, CONFIGURE_BUILD_MODULES): New variables
	and rules.
	(all.normal): Depend on ALL_BUILD_MODULES.
	(CONFIGURE_TARGET_MODULES rule): Use TARGET_CONFIGARGS.
	(all-build-libiberty): Depend on configure-build-libiberty.

	* configure: Calculate and substitute proper value for
	ALL_BUILD_MODULES.
	* configure.in: Create the build subdirectory.
	Calculate and substitute TARGET_CONFIGARGS (formerly
	CONFIG_ARGUMENTS); also BUILD_SUBDIR and BUILD_CONFIGARGS (new).

libiberty:
2001-11-27  Zack Weinberg  <zack@codesourcery.com>

	* _doprnt.c: Moved here from gcc/doprint.c.  Adjust to build
	in libiberty context.  Fix typo in leading comment.
	* configure.in: Fix various AC_DEFINEs so autoheader works.
	If any of vprintf, vsprintf, vfprintf is missing from libc,
	then AC_REPLACE_FUNCS(_doprnt).

From-SVN: r47393
2001-11-28 01:37:24 +00:00
DJ Delorie
97e620cf89 Makefile.in (stamp-h): Depend on Makefile for proper serialization.
* Makefile.in (stamp-h): Depend on Makefile for proper
serialization.
(*-subdir): Depend on config.h for proper serialization.

Co-Authored-By: Daniel Jacobowitz <drow@mvista.com>

From-SVN: r47354
2001-11-26 16:24:43 -05:00
DJ Delorie
4dcc42a39c Fix typo.
From-SVN: r47353
2001-11-26 15:03:21 -05:00
DJ Delorie
c3bb7df00b configure.in: Check for alloca.h (for regex.c and putenv.c).
* configure.in: Check for alloca.h (for regex.c and putenv.c).
* configure: Regenerate.
* config.h: Add HAVE_ALLOCA_H.

From-SVN: r47352
2001-11-26 15:02:19 -05:00
Kaveh R. Ghazi
2c47b56b0a Update test for token pasting to also check "|| defined(ALMOST_STDC)"
From-SVN: r47108
2001-11-16 21:54:17 +00:00
Kaveh R. Ghazi
23850d35ec regex.c: Check defined(__STDC__) || defined(HAVE_STRINGIZE) to determine whether ISO CPP...
* regex.c: Check defined(__STDC__) || defined(HAVE_STRINGIZE)
	to determine whether ISO CPP token pasting is available.

From-SVN: r47107
2001-11-16 21:49:25 +00:00
Jeffrey A Law
d3982b7128 config.in (HAVE_UINTPTR_T): Provide autoconf stub.
* config.in (HAVE_UINTPTR_T): Provide autoconf stub.
        * configure.in (HAVE_UINTPTR_T): Test for system defining
        uintptr_t and define HAVE_UINTPTR_T appropriately.
        * regex.c (uintptr_t): Do not provide a definition if the
        system provided one.

From-SVN: r47068
2001-11-15 11:11:24 -07:00
Jeffrey A Law
7ddfb6510b regex.c (PREFIX): Provide an alternate definition for non-ANSI/ISO compilers.
* regex.c (PREFIX): Provide an alternate definition for
	non-ANSI/ISO compilers.
	(ARG_PREFIX): Likewise.

From-SVN: r47067
2001-11-15 11:04:08 -07:00
Jim Meyering
2e68303737 obstack.c (_): Honor the setting of ENABLE_NLS.
2001-11-12  Jim Meyering  <meyering@lucent.com>

	* obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
	this code would end up calling gettext even in packages built
	with --disable-nls.
	* getopt.c (_): Likewise.
	* regex.c (_): Likewise.

From-SVN: r46975
2001-11-12 22:46:00 -05:00
DJ Delorie
fae8182ab4 remove trailing whitespace
From-SVN: r46779
2001-11-04 20:11:12 -05:00
Alan Modra
55a10d7ca3 Add missing entry.
From-SVN: r46778
2001-11-05 10:36:31 +10:30
Alan Modra
f749bd83cb * configure.in: Cope with missing makeinfo.
From-SVN: r46767
2001-11-04 18:12:47 +10:30
Kaveh R. Ghazi
e5969ba63a libiberty.h (hex_init): Revert delete.
include:
	* libiberty.h (hex_init): Revert delete.

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

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

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

From-SVN: r46417
2001-10-22 22:32:57 +00:00
H.J. Lu
afb649d5c9 Makefile.in ($(TARGETLIB)): Also generate pic/$(TARGETLIB) if necessary.
2001-10-19  H.J. Lu <hjl@gnu.org>

	* Makefile.in ($(TARGETLIB)): Also generate pic/$(TARGETLIB) if
	necessary.

From-SVN: r46369
2001-10-19 22:39:06 -07:00
DJ Delorie
5bed56d982 argv.c, [...]: Improve manual formatting.
* argv.c, asprintf.c, choose-temp.c, concat.c, cplus-dem.c,
ffs.c, fnmatch.txh, getruntime.c, make-temp-file.c,
mkstemps.c, pexecute.c, random.c, strsitnal.c, vasprintf.c:
Improve manual formatting.
* functions.texi: Regenerate.

From-SVN: r46323
2001-10-17 17:15:41 -04:00
DJ Delorie
aac04c15d7 Makefile.in (TEXIFILES): Add fnmatch.txh.
* Makefile.in (TEXIFILES): Add fnmatch.txh.
(maint-undoc): New.
maint-tool: Add "undoc" tool.
* alloca.c, argv.c, asprintf.c, choose-temp.c, concat.c,
fdmatch.c, ffs.c, getruntime.c, insque.c, lbasename.c,
make-temp-file.c, mkstemps.c, pexecute.c, random.c, spaces.c,
strerror.s, strsignal.c, strtol.c, vasprintf.c: Add or update
documentation.
* fnmatch.txh: New.
* functions.texi: Regenerate.

From-SVN: r46274
2001-10-15 22:50:13 -04:00
Joseph Myers
0e4e9e8f54 bcmp.c, setenv.c: Use "nonzero" instead of "non-zero".
* bcmp.c, setenv.c: Use "nonzero" instead of "non-zero".
	* strtod.c: Use "ISO C" instead of "ANSI C".
	* functions.texi: Regenerate.

From-SVN: r46136
2001-10-10 00:33:57 +01:00
Joseph Myers
7f8fa05dae alloca.c, [...]: Improve manual formatting.
* alloca.c, clock.c, getcwd.c, getpagesize.c, getpwd.c, index.c,
	libiberty.texi, memchr.c, putenv.c, rindex.c, strchr.c, strdup.c,
	strerror.c, strrchr.c, strstr.c, strtod.c, tmpnam.c, vfork.c,
	xatexit.c, xmalloc.c, xstrerror.c: Improve manual formatting.  Fix
	spelling.  Give names to function arguments in documentation.  Use
	(void) prototypes in documentation.
	* functions.texi: Regenerate.

From-SVN: r46068
2001-10-07 22:53:31 +01:00
Kaveh R. Ghazi
0be6abca22 demangle.h (demangler_engine): Const-ify.
include:
	* demangle.h (demangler_engine): Const-ify.
	* libiberty.h (buildargv): Likewise.

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

From-SVN: r46060
2001-10-07 14:45:04 +00:00
DJ Delorie
0e30ffc5ef * configure: Regenerate.
From-SVN: r45881
2001-09-29 12:48:58 -04:00
Kaveh R. Ghazi
576fb78782 * concat.c: Include stdlib.h.
From-SVN: r45861
2001-09-28 15:31:03 +00:00
Eli Zaretskii
e922f9785c libiberty.texi: (Top level): Add syncodeindex pg.
* libiberty.texi: (Top level): Add syncodeindex pg.  Add
@dircategory and @direntry directives.  Add @finalout.
(many nodes): Lose the next,prev,up pointers on the @nide line.
(Using, Supplemental Functions, Replacement Functions): Fix
markup.
(Functions): Move around, to allow makeinfo to build the manual
without next,prev,up pointers in thye node lines.
(Licenses): Fix typos.

* index.c, rindex.c, strchr.c, strerror.c, strrchr.c, strstr.c,
strtol.c, xatexit.c, xexit.c, xmalloc.c: Fix spelling and markup.
* functions.texi: Regenerate.

* copying-lib.texi: Lose the next,prev,up pointers on the @node
line.

From-SVN: r45847
2001-09-27 15:55:37 -04:00
DJ Delorie
ae9092da96 configure.in: Don't use in-tree texinfo, because libiberty must be built before it.
* configure.in: Don't use in-tree texinfo, because libiberty must
be built before it.  Check for makeinfo version 4 or higher.
* functions.texi: Regenerate.

From-SVN: r45846
2001-09-27 15:44:32 -04:00
DJ Delorie
aaa5f039eb configure.in (MAKEINFO, PERL): Detect these.
* configure.in (MAKEINFO, PERL): Detect these.
(--enable-maintainer-mode): Add.
* configure: Regenerate.
* Makefile.in (MAKEINFO, PERL): Define.
(libiberty.info, libiberty.dvi, libiberty.html): New.
(CFILES): Add bsearch.c.
(CONFIGURED_OFILES): New, list of objects configure might add.
(maint-missing, maint-buildall): New, for maintainers only.
(clean, mostlyclean): Add info/dvi/html files.
* libiberty.texi, copying-lib.texi, obstacks.texi, functions.texi: New.
* gather-docs: New, for maintainers.
* maint-tool: New, for maintainers.
* alloca.c, atexit.c, basename.c, bcmp.c, bcopy.c, bsearch.c,
bzero.c, calloc.c, clock.c, configure.in, configure, getcwd.c,
getpagesize.c, getpwd.c, index.c, memchr.c, memcmp.c, memcpy.c,
memmove.c, memset.c, putenv.c, rename.c, rindex.c, setenv.c,
sigsetmask.c, strcasecmp.c, strchr.c, strdup.c, strerror.c,
strncasecmp.c, strncmp.c, strrchr.c, strstr.c, strtod.c, strtol.c,
tmpnam.c, vfork.c, vprintf.c, waitpid.c, xatexit.c, xexit.c,
xmalloc.c, xmemdup.c, xstrdup.c, xstrerror.c: Add or update
documentation.

Co-Authored-By: Phil Edwards <pedwards@disaster.jaj.com>

From-SVN: r45828
2001-09-26 14:16:17 -04:00
Kaveh R. Ghazi
c176688132 * concat.c (reconcat): Fix for traditional C.
From-SVN: r45814
2001-09-25 22:05:40 +00:00
Kaveh R. Ghazi
ad43d46f3a libiberty.h (reconcat): New function.
include:
	* libiberty.h (reconcat): New function.

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

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

From-SVN: r45789
2001-09-24 22:38:22 +00:00
Kaveh R. Ghazi
c793eea7ab libiberty.h (concat_length, [...]): New.
include:
	* libiberty.h (concat_length, concat_copy, concat_copy2,
	libiberty_concat_ptr, ACONCAT): New.

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

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

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

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

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

From-SVN: r45657
2001-09-17 18:48:45 +00:00
Kaveh R. Ghazi
7a98d9b248 asprintf.c: Don't define USE_STDARG.
* asprintf.c: Don't define USE_STDARG.  Use VPARAMS, VA_OPEN,
	VA_FIXEDARG & VA_CLOSE.

	* vasprintf.c: Check HAVE_STRING_H when including string.h.
	(checkit): Delete redundant prototype.  Add ATTRIBUTE_PRINTF_1.
	Use VA_OPEN, VA_FIXEDARG & VA_CLOSE.  Free allocated string.

From-SVN: r45382
2001-09-04 18:19:18 +00:00
Kaveh R. Ghazi
e2dff3f2f6 ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.
include:
	* ansidecl.h (VA_OPEN, VA_CLOSE): Allow multiple uses.

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

From-SVN: r45204
2001-08-27 19:10:39 +00:00
Ulrich Drepper
d0708dc1b9 merge from glibc
From-SVN: r45134
2001-08-23 11:19:05 -04:00
Matt Kraai
ffb9435bfe fibheap.c (fibheap_init, [...]): Remove.
* fibheap.c (fibheap_init, fibnode_init): Remove.
 	(fibheap_new, fibnode_new): Use xcalloc to allocate and
 	initialize memory.
 	(fibheap_insert): Remove check for node allocation failure.

From-SVN: r45113
2001-08-22 21:02:06 +00:00
Richard Henderson
f379eac3fa Makefile.in (fibheap.o): Depend on config.h.
* Makefile.in (fibheap.o): Depend on config.h.
        * fibheap.c: Tidy formatting.  Use config.h.` Rearrange some
        functions for inlining.

From-SVN: r45089
2001-08-21 18:56:34 -07:00
Christopher Faylor
b1c45ae429 configure.in: Need to set HAVE_SYS_ERRLIST and HAVE_SYS_NERR whenever hosting on cygwin.
* configure.in: Need to set HAVE_SYS_ERRLIST and HAVE_SYS_NERR whenever hosting
on cygwin.
* configure: Regenerate.

From-SVN: r45081
2001-08-21 16:40:45 +00:00
Andrew Cagney
0310e5ac70 floatformat.h (floatformat_arm_ext): Document as deprecated.
* floatformat.h (floatformat_arm_ext): Document as deprecated.
(floatformat_arm_ext_big, floatformat_arm_ext_littlebyte_bigword)
(floatformat_ia64_spill_little, floatformat_ia64_quad_little)
(floatformat_ia64_spill_big, floatformat_ia64_quad_big)
(floatformat_m88110_harris_ext): Declare.

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

	* fibheap.h: New file. Fibonacci heap.

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

	* fibheap.c: New file. Fibonacci heap.

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

From-SVN: r45062
2001-08-20 20:06:07 +00:00
Christopher Faylor
91625004b2 configure.in: Always set HAVE_SYS_ERRLIST when targetting cygwin.
* configure.in: Always set HAVE_SYS_ERRLIST when targetting cygwin.
* configure: Regenerate.

From-SVN: r44979
2001-08-17 20:17:23 +00:00
Richard Henderson
0ed5305d8d Add commentary.
From-SVN: r44978
2001-08-17 12:58:05 -07:00
Richard Henderson
9e0ba68596 * hashtab.c (htab_hash_string): New.
From-SVN: r44950
2001-08-16 18:54:43 -07:00
Andrew Cagney
d80dedbe52 floatformat.c (floatformat_ieee_double_littlebyte_bigword): Fix name.
* floatformat.c (floatformat_ieee_double_littlebyte_bigword): Fix
name.

From-SVN: r44878
2001-08-14 00:31:41 +00:00
Isamu Hasegawa
ccea0d8509 backport: regex.c (wcs_regex_compile): Use appropriate string to compare with collating element.
Merge from libc:
* regex.c (wcs_regex_compile): Use appropriate string
to compare with collating element.
Fix the padding for the alignment.

From-SVN: r44838
2001-08-12 22:23:00 -04:00
Andrew Cagney
b0e9bc8cc3 Oops, fix check-in date.
From-SVN: r44816
2001-08-12 02:06:34 +00:00
Andrew Cagney
0ef5547d0e (lbasename): Change function declaration to return a const char pointer.
From-SVN: r44782
2001-08-10 23:45:11 +00:00
Jason Merrill
056400f19d cp-demangle.c (demangle_special_name): "GR" -> "reference temporary for".
* cp-demangle.c (demangle_special_name): "GR" -> "reference temporary
        for".

From-SVN: r44694
2001-08-07 12:15:04 -04:00
Richard Henderson
4e627c4144 * Makefile.in (concat.o): Depend on config.h.
From-SVN: r44622
2001-08-03 17:36:49 -07:00
Andreas Jaeger
b6a2f88470 * concat.c: Include "config.h".
From-SVN: r44481
2001-07-30 21:23:38 +02:00
Andreas Jaeger
c4b9cfe087 backport: regex.c: Declare wcs functions only if compiling with MBS_SUPPORT.
Merge from glibc:
        * regex.c: Declare wcs functions only if compiling with
        MBS_SUPPORT.
        Don't use #elif for traditional C.

        * regex.c: Revamp memory allocation for WCHAR functions to
        not use too much stack.

From-SVN: r44471
2001-07-30 13:54:36 +02:00
Daniel Jacobowitz
2cf50fd3a4 * Makefile.in (regex.o): Add dependency on config.h.
From-SVN: r44394
2001-07-26 08:41:40 +00:00
DJ Delorie
27ffc806c4 merge from glibc
From-SVN: r44138
2001-07-18 19:40:00 -04:00
Jeff Johnston
dd7716320a Makefile.in: Add support for regex code.
* Makefile.in: Add support for regex code.
* regex.c: New file.

From-SVN: r43914
2001-07-10 20:11:12 -04:00
Mark Klein
29650b2b2f Makefile.in: Add ffs.c dependency.
* Makefile.in: Add ffs.c dependency.
* configure.in: Add ffs.c.
* ffs.c: New file.

From-SVN: r43784
2001-07-05 13:24:39 -04:00
Richard Henderson
c8b2822138 * concat.c: Include <sys/types.h>.
From-SVN: r43449
2001-06-18 13:46:48 -07:00
Loren J. Rittle
a4c03da24b Add GNATS ID.
From-SVN: r43244
2001-06-12 05:08:23 +00:00
Loren J. Rittle
473c2d0bcb strerror.c (sys_nerr): Hide the OS header version.
* strerror.c (sys_nerr): Hide the OS header version.
	* strsignal.c (sys_nsig): Likewise.

From-SVN: r43242
2001-06-12 05:04:42 +00:00
Richard Henderson
0bdcca681d concat.c: Include string.h.
* concat.c: Include string.h.  Fix int vs size_t usage.
        Simplify the iteration loops.  Use memcpy.

From-SVN: r43149
2001-06-10 11:57:15 -07:00
Matt Kraai
6de133d3c7 * partition.c: Fix misspelling of `implementation'.
From-SVN: r42170
2001-05-16 20:44:03 +00:00
Thiemo Seufer
8a1532886f md5.c (md5_init_ctx): Declare constants as unsigned.
* md5.c (md5_init_ctx): Declare constants as unsigned.
(md5_process_block): Likewise.

From-SVN: r41930
2001-05-09 15:09:55 -04:00
Zack Weinberg
641b2721c4 cp-demangle.c (demangle_v3_with_details, [...]): Use K+R style function definition.
* cp-demangle.c (demangle_v3_with_details,
	is_gnu_v3_mangled_ctor, is_gnu_v3_mangled_dtor): Use K+R style
	function definition.
	* ternary.c: Use K+R style function definitions.  Use PTR, not
	void *.  Make arguments constant where possible.
	* demangle.h: Use PARAMS for all prototypes.
	* ternary.h: Use PARAMS for all prototypes.  Use PTR, not void *.
	Make arguments constant where possible.

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

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

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

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

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

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

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

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

From-SVN: r41069
2001-04-04 00:46:27 +00:00
Richard Henderson
94b68558d1 * Makefile.in (make-temp-file.o): Depend on config.h.
From-SVN: r40929
2001-03-28 03:32:54 -08:00
Kaveh R. Ghazi
27f66c0bcb * memchr.c (memchr): Adjust condition to avoid infinite loop.
From-SVN: r40899
2001-03-28 04:10:24 +00:00
Jakub Jelinek
f1a0345cf6 mangle.c (write_discriminator): Use _0' for discriminator 1, not _'.
* mangle.c (write_discriminator): Use `_0' for discriminator 1,
	not `_'.

	* cp-demangle.c (demangle_discriminator): `_0' is discriminator #1,
	`_' not followed by a digit is invalid.

From-SVN: r40795
2001-03-23 23:12:55 +01:00
Jim Blandy
a519fba6e8 cp-demangle.c (string_list_delete): Don't forget to free the actual contents of the string.
* cp-demangle.c (string_list_delete): Don't forget to free the
actual contents of the string.

From-SVN: r40744
2001-03-22 15:15:18 +00:00
Jim Blandy
7dce2effb4 cp-demangle.c (struct demangling_def): New fields: is_constructor and is_destructor.
* cp-demangle.c (struct demangling_def): New fields:
is_constructor and is_destructor.
(demangling_new): Initialize them.
(demangle_ctor_dtor_name): Set them, if we detect a constructor
or destructor.
(demangle_v3_with_details, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor): New functions.

From-SVN: r40713
2001-03-21 15:01:40 -05:00
Zack Weinberg
49ee944b86 make-temp-file.c: Always default DIR_SEPARATOR to '/'.
* make-temp-file.c: Always default DIR_SEPARATOR to '/'.
	Don't default P_tmpdir to anything.  Try /var/tmp before
	/usr/tmp.

From-SVN: r40706
2001-03-21 19:29:33 +00:00
Zack Weinberg
33437dc76d choose-temp.c: Split off make_temp_file...
* choose-temp.c: Split off make_temp_file, and the code
        duplicated between it and choose_temp_base, into...
        * make-temp-file.c: ... here; new file.

        * Makefile.in (CFILES): Add make-temp-file.c.
        (REQUIRED_OFILES): Add make-temp-file.o.

From-SVN: r40683
2001-03-21 07:29:37 +00:00
Jason Merrill
e03a61f143 * cplus-dem.c (main): Skip initial $.
From-SVN: r40655
2001-03-20 11:54:17 -05:00
Michael Meissner
6e8afa9980 fix typo
From-SVN: r40517
2001-03-15 21:41:13 +00:00
Michael Meissner
f8a0ba8c2f Silence warning
From-SVN: r40512
2001-03-15 20:24:59 +00:00
Michael Meissner
8860ddab5d Silence warning
From-SVN: r40511
2001-03-15 20:14:33 +00:00
Neil Booth
2b757d5101 lbasename.c: New file.
* libiberty/lbasename.c: New file.
	* libiberty/Makefile.in: Update for lbasename.
	* include/libiberty.h: Add lbasename.

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

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

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

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

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

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

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

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

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

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

From-SVN: r40259
2001-03-06 09:52:35 +00:00
John David Anglin
d9fd5aae76 * cplus-dem.c (main): Cast enum style to int.
From-SVN: r40242
2001-03-05 02:43:27 +00:00
Loren J. Rittle
4031ed6598 cplus-dem.c (main): Initialize style.
2001-02-16  Loren J. Rittle  <ljrittle@acm.org>

	* cplus-dem.c (main): Initialize style.

From-SVN: r39782
2001-02-16 23:28:14 +00:00
Phil Edwards
2ca46e8a70 COPYING.LIB: Update to LGPL 2.1 from the FSF.
2001-02-02  Phil Edwards  <pme@sources.redhat.com>

	* COPYING.LIB:  Update to LGPL 2.1 from the FSF.

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

From-SVN: r39399
2001-02-02 00:27:39 +00:00
Phil Edwards
42c0c80add COPYING.LIB: Update to LGPL 2.1 from the FSF.
2001-01-29  Phil Edwards  <pme@sources.redhat.com>

	* COPYING.LIB:  Update to LGPL 2.1 from the FSF.

From-SVN: r39330
2001-01-29 13:32:47 +00:00
DJ Delorie
584932e9b4 fnmatch.c: Make the note about the origins of this file more accurate...
* fnmatch.c: Make the note about the origins of this file more
accurate, at least until we can sync with glibc.
* getopt.c: Ditto.
* getopt1.c: Ditto.
* md5.c: Ditto.
* obstack.c: Ditto.

From-SVN: r38550
2000-12-29 14:37:03 -05:00
Michael Sokolov
dac45916f0 bsearch.c: New file.
* bsearch.c: New file.
* configure.in (funcs): Add bsearch.
(AC_CHECK_FUNCS): Likewise.
* configure, config.in: Regenerate.

From-SVN: r38492
2000-12-26 17:16:22 -05:00
Michael Sokolov
a8e4a997df safe-ctype.c: #include "ansidecl.h".
* safe-ctype.c: #include "ansidecl.h".
* strtod.c: Likewise.

From-SVN: r38224
2000-12-13 13:11:45 -05:00
Michael Sokolov
75444da786 * strtoul.c: Include safe-ctype.h, not ctype.h.
From-SVN: r38221
2000-12-13 12:44:01 -05:00
Mike Stump
5a2eb52b16 Add - before rms to be more portable.
From-SVN: r38142
2000-12-08 23:18:00 +00:00
Zack Weinberg
f6bbde28c4 safe-ctype.h: New file.
include:
	* safe-ctype.h: New file.
libiberty:
	* safe-ctype.c: New file.
	* Makefile.in (CFILES): Add safe-ctype.c.
	(REQUIRED_OFILES): Add safe-ctype.o.

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

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

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

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

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

From-SVN: r38124
2000-12-08 03:00:26 +00:00
Mike Stump
6c1ce62b50 Fix typo.
From-SVN: r38118
2000-12-07 22:36:56 +00:00
Mike Stump
b25a8973bb * Makefile.in (distclean): When cleaning, remove testsuite.
From-SVN: r38116
2000-12-07 22:04:07 +00:00
Jason Merrill
b5d1497d5e cp-demangle.c (cplus_demangle_v3): Check that it's a v3 mangled name before allocating the dyn_string.
* cp-demangle.c (cplus_demangle_v3): Check that it's a v3 mangled
        name before allocating the dyn_string.

From-SVN: r38043
2000-12-05 12:29:12 -05:00
Jason Merrill
c6e13630ab cp-demangle.c: s/new_abi/v3/.
* cp-demangle.c: s/new_abi/v3/.
        * cplus-dem.c: Likewise.
        (current_demangling_style): Now auto_demangling.
        (cplus_demangle): Try v3 demangling if AUTO_DEMANGLING.
        (main): Use standard symbol chars for auto_demangling.

From-SVN: r38002
2000-12-04 12:11:17 -05:00
Mark Mitchell
a4c9b97e26 hashtab.c (higher_prime_number): Use a table, rather than a seive, to find the next prime.
* hashtab.c (higher_prime_number): Use a table, rather than a
	seive, to find the next prime.

From-SVN: r37775
2000-11-27 04:23:38 +00:00
H.J. Lu
3b3bd9a786 * cplus-dem.c (main): Handle gnat_demangling.
From-SVN: r37679
2000-11-22 23:57:50 +00:00
Zack Weinberg
d1209685fa Makefile.in, [...]: Expunge remaining traces of facility for running MD files through C preprocessor.
gcc:
        * Makefile.in, config.gcc, configure.in: Expunge remaining
        traces of facility for running MD files through C preprocessor.

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

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

From-SVN: r37650
2000-11-22 08:32:26 +00:00
Hans-Peter Nilsson
cf183ac2bd cplus-dem.c (cplus_demangle): Fix formatting.
* cplus-dem.c (cplus_demangle): Fix formatting.
	(grow_vect): Ditto.
	(ada_demangle): Ditto.
	(internal_cplus_demangle): Ditto.
	(mop_up): Ditto.

	* cplus-dem.c (main): Handle java_demangling.

From-SVN: r37612
2000-11-21 10:47:30 +00:00
Kaveh R. Ghazi
8bcc782ce9 cplus-dem.c (grow_vect): Prototype.
* cplus-dem.c (grow_vect): Prototype.
	(ada_demangle): Cast the arg of ctype macros to unsigned char.

From-SVN: r37563
2000-11-19 12:46:33 +00:00
Hans-Peter Nilsson
29120f4427 cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED for parameter `option'.
* cplus-dem.c (ada_demangle): Add back ATTRIBUTE_UNUSED for
parameter `option'.
Do s/cplus_dem.c/cplus-dem.c/g on ChangeLog.

From-SVN: r37494
2000-11-16 09:12:47 +00:00
Gerald Pfeifer
9e038f71b0 Fix ChangeLog entry: cplus-dem.c instead of cplus_dem.c
From-SVN: r37489
2000-11-15 23:03:52 +00:00
Kenneth Block
0437a5a8a8 cplus_dem.c: Eliminate use of DEFUN, it is obsolete and cannot be used in GCC.
* cplus_dem.c: Eliminate use of DEFUN, it is obsolete and cannot
	be used in GCC.

From-SVN: r37483
2000-11-15 17:35:20 +00:00
Hans-Peter Nilsson
eab0c1ab23 Correct style of last entry
From-SVN: r37477
2000-11-15 11:58:16 +00:00
Kenneth Block
61ab980a02 cplus_dem.c: Add gnat demangler.
* cplus_dem.c: Add gnat demangler.  Add java to demangle style
	list.

From-SVN: r37475
2000-11-15 11:54:53 +00:00
Hans-Peter Nilsson
d50d20ecc8 hashtab.c (htab_expand): Change to return int.
* hashtab.c (htab_expand): Change to return int.  Use calloc or
 	xcalloc depending on htab->return_allocation_failure.  Return zero
 	if calloc fails.
	(htab_create): Update comment to cover memory allocation.
	(htab_try_create): New.
	(htab_find_slot_with_hash): Return NULL if htab_expand fails.
  	Update comment to cover this.

From-SVN: r37247
2000-11-04 07:42:53 +00:00
Hans-Peter Nilsson
35e9340fc9 (htab_create, htab_expand): Correct formatting of comment before
function.

From-SVN: r37231
2000-11-03 20:26:51 +00:00
Alex Samuel
ea343d1a91 Fix incorrect date in ChangeLog entry.
From-SVN: r37017
2000-10-23 18:11:23 +00:00
Alex Samuel
0870bfd6d8 cp-demangle.c (string_list_def): Add caret_position and comments.
* cp-demangle.c (string_list_def): Add caret_position and comments.
	(result_caret_pos): New macro.
	(result_append_string): Rename to...
	(result_add_string): ... this, and insert at caret position.
	Rename throughout.
	(result_append): Rename to...
	(result_add): ... this, and insert at caret position.  Rename
	throughout.
	(result_append_char): Rename to...
	(result_add_char): ... this, and insert at caret position.  Rename
	throughout.
	(result_append_space): Remove.
	(string_list_new): Initialize caret position.
	(result_add_separated_char): Use caret position.
	(result_get_caret): New funtion.
	(result_set_caret): Likewise.
	(result_shift_caret): Likewise.
	(result_previous_char_is_space): Likewise.
	(substitution_start): Use caret position.
	(substitution_add): Likewise.
	(demangling_new): Initialize caret position.
	(demangle_encoding): Use caret position.
	(demanglin_nested_name): Put CV qualifiers after name.
	(demangle_type_ptr): Use switch statement.  Handle pointers to
	arrays.  Don't use result_append_space.  Use caret position.
	(demangle_type): Emit CV qualifiers after underlying type.  Adjust
	call to demangle_array_type.
	(demangle_array_type): Add parameter to handle pointers to arrays.

From-SVN: r37011
2000-10-22 23:59:25 +00:00
Mark Mitchell
f15b9af984 c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only.
* c-decl.c (c_expand_body): Don't generate RTL if flag_syntax_only.
	(lang_mark_false_label_stack): Remove.
	* c-lex.c (init_c_lex): Add file_info_tree as GC root.  Allocate
	<top level> string in GC area.
	(mark_splay_tree_node): New function.
	(mark_splay_tree): Likewise.
	* except.c (mark_eh_status): Only call lang_mark_false_label_stack
	if it exists.
	* ggc-callbacks.c (lang_mark_false_label_stack): Remove.
	* ggc-common.c (lang_mark_false_label_stack): Change type.
	* ggc.h (ggc_alloc_string): Add comment.
	(ggc_strdup): New function.

	* decl.c (lang_mark_false_label_stack): Remove.
	* lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.

	* com.c (lang_mark_false_label_stack): Remove.

	Convert to GC.
	* Make-lang.in (s-java): Don't depend on ggc-callbacks.o.
	* Makefile.in (BACKEND): Don't include ggc-callbacks.o.
	(typeck.o): Depend on ggc.h.
	* class.c (add_method_1): Use GC functions for allocation.
	(init_class_processing): Register roots.
	* decl.c (ggc_p): Set to 1.
	(pending_local_decls): Make it static.
	(push_jvm_slot): Use GC functions for allocation.
	(init_decl_processing): Register roots.
	(give_name_to_locals): Use GC functions for allocation.
	(lang_mark_tree): New function.
	* java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Use GC
	functions for allocation.
	* jcf-parse.c (jcf_parse_source): Use ggc_strdup.
	* lex.c (java_lex): Use build_string, rather than replicating it
	inline.
	* parse.y (goal): Add more roots.
	(mark_parser_ctxt): New function.
	* typeck.c: Include ggc.h.

	* splay-tree.c (splay_tree_insert): Fix formatting.

From-SVN: r36687
2000-10-01 19:19:30 +00:00
Mark Mitchell
8f17b5c5cb splay-tree.c (splay_tree_predecessor): Fix typo in comment.
* splay-tree.c (splay_tree_predecessor): Fix typo in comment.

	Convert the C front-end to use function-at-a-time mode.
	* c-common.h: Include splay-tree.h.
	(C_DECLARED_LABEL_FLAG): New macro.
	(struct language_function): Add x_scope_stmt_stack and
	x_function_name_declared_p.
	(RECHAIN_STMTS): Move definition.
	(lang_statment_code_p): Likewise.
	(lang_expand_stmt): Likewise.
	(lang_expand_decl_stmt): New variable.
	(lang_expand_function_end): Likewise.
	(current_scope_stmt_stack): New function.
	(add_decl_stmt): Likewise.
	(add_scope_stmt): Likewise.
	(mark_stmt_tree): Likewise.
	(struct c_lang_decl): New structure.
	(DECL_SAVED_TREE): Define.
	(c_mark_lang_decl): New function.
	(c_expand_start_cond): Change prototype.
	(c_finish_then): New function.
	(c_finish_else): Likewise.
	(current_function_name_declared): Remove.
	(set_current_function_name_declared): Likewise.
	(mark_c_language_function): Declare.
	(case_compare): Likewise.
	(c_add_case_label): Likewise.
	(c_expand_expr): Likewise.
	(c_safe_from_p): Likewise.
	* c-common.c (lang_expand_function_end): New variable.
	(struct if_elt): Add if_stmt.
	(c_expand_start_cond): Add the if-statement to the statement-tree,
	rather than generating RTL.
	(c_finish_then): New function.
	(c_expand_start_else): Don't generate RTL.
	(c_finish_else): New function.
	(c_expand_expr_stmt): Don't generate RTL.
	(statement_code_p): Add SCOPE_STMT.
	(case_compare): New function.
	(c_add_case_label): Likewise.
	(mark_stmt_tree): Likewise.
	(c_mark_lang_decl): Likewise.
	(mark_c_language_function): Likewise.
	(c_expand_expr): Likewise.
	(c_safe_from_p): Likewise.
	* c-decl.c (c_stmt_tree): New variable
	(c_scope_stmt_stack): Likewise.
	(c_function_name_declared_p): Likewise.
	(lang_expand_expr_stmt): Remove.
	(poplevel): Don't call output_inline_function for nested
	functions.
	(pushdecl): Don't set DECL_CONTEXT for a local declaration of an
	`extern' function.
	(redeclaration_error_message): Change means of computing whether
	or not a function is nested.
	(lookup_label): Don't call label_rtx.
	(init_decl_processing): Add more GC roots.
	(start_decl): Add DECL_STMTs to the statement-tree, rather than
	calling rest_of_decl_compilation.
	(finish_decl): Don't call expand_decl.
	(store_parm_decls): Begin the statement-tree, but don't generate
	RTL.
	(finish_function): Tie off the statement-tree.  Call c_expand_body
	if appropriate.
	(c_expand_body): New function.
	(push_c_function_context): Save more information.
	(pop_c_function_contxt): Likewise.
	(copy_lang_decl): Now that we use DECL_LANG_SPECIFIC, copy it.
	(lang_mark_tree): Mark it.
	(current_stmt_tree): Adjust.
	(current_scope_stmt_stack): New function.
	(do_case): Remove.
	(set_current_name_declared): Likewise.
	(c_begin_compound_stmt): Define.
	(c_expand_decl_stmt): Likewise.
	* c-lang.c: Include rtl.h and expr.h.
	(lang_init): Set more language-specific hooks.
	* c-lex.c: Include expr.h.
	* c-parse.in: Changes throughout to add statements to the
	statement-tree, rather than generating RTL after every statement.
	* c-semantics.c (lang_expand_decl_stmt): Define.
	(add_decl_stmt): New function.
	(add_scope_stmt): Likewise.
	(finish_stmt_tree): Tweak.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Handle local labels, and call
	lang_expand_decl_stmt if required.
	(genrtl_for_stmt): Fix line-number handling.
	(genrtl_case_label): Handle cleanups.
	(genrtl_asm_stmt): Don't call combine_strings.
	(genrtl_compound_stmt): Simplify.
	(expand_stmt): Handle SCOPE_STMTs.
	* c-tree.h (struct lang_decl): New structure.
	(C_DECLARED_LABEL_FLAG): Remove.
	(c_begin_compound_stmt): Declare.
	(c_expand_decl_stmt): Likewise.
	(c_expand_start_case): Rename to c_start_case.
	(c_finish_case): New function.
	* c-typeck.c (start_init): Tweak setting of
	constructor_incremental.
	(c_expand_asm_operands): Tweak error-handling.  Add to the
	statement-tree.
	(c_expand_return): Add to the statement-tree.
	(c_expand_start_case): Rename to ...
	(c_start_case): ... this.
	(struct c_switch): New type.
	(switch_stack): New variable.
	(do_case): Simplify.
	(c_finish_case): New function.
	* dependence.c: Include expr.h.
	(enum dependence_type): Change spelling of enumerals.
	(check_node_dependence): Adjust.
	* expr.h (lang_safe_from_p): Declare.
	(safe_from_p): Likewise.
	* expr.c (lang_safe_from_p): New variable.
	(safe_from_p): Give it external linkage.  Use lang_safe_from_p.
	* stmt.c (expand_expr_stmt): Avoid clobberring of last_expr_type.
	* toplev.c (rest_of_decl_compilation): Robustify.
	* tree.c (contains_placeholder_p): Likewise.
	* Makefile.in: Update dependencies.
	* objc/objc-act.h: Adjust calculation of value for dummy_tree_code.
	* objc/objc-act.c: Include rtl.h, expr.h, and c-common.h.
	(objc_expand_function_end): New function.
	(finish_method_def): Use it.
	(init_objc): Initialize more language-specific hooks.
	* objc/Make-lang.in: Update dependencies.

	* cp-tree.h (struct cp_language_function): Remove
	x_scope_stmt_stack and name_declared.
	(current_scope_stmt_stack): Remove.
	(function_name_declared_p): New macro.
	(struct lang_decl_flags): Use c_lang_decl as a base class.
	(context): Remove.
	(struct lang_decl): Replace saved_tree with context.
	(DECL_FRIEND_CONTEXT): Adjust accordingly.
	(SET_DECL_FRIEND_CONTEXT): Likewise.
	(DECL_VIRTUAL_CONTEXT): Likewise.
	(DECL_SAVED_TREE): Remove.
	(C_DECLARED_LABEL_FLAG): Likewise.
	(cplus_expand_expr_stmt): Don't declare.
	(add_decl_stmt): Likewise.
	(add_scope_stmt): Likewise.
	* decl.c (mark_stmt_tree): Remove.
	(case_compare): Likewise.
	(finish_case_label): Use c_add_case_label.
	(init_decl_processing): Set more language-specific hooks.
	(build_enumerator): Fix typo in comment.
	(cplus_expand_expr_stmt): Remove.
	(mark_lang_function): Use mark_c_language_function.
	(lang_mark_tree): Use c_mark_lang_decl.
	* decl2.c: Change order of inclusion.
	* except.c: Likewise.
	* expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
	back on c_expand_expr.
	* friend.c: Include expr.h.
	* init.c: Change order of inclusion.
	* Makefile.in: Update dependencies.
	* lex.h (free_lang_decl_chain): Remove.
	* optimize.c (maybe_clone_body): Use function_name_declared_p.
	* pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
	it doesn't exist.
	(instantiate_decl): Use function_name_declared_p.
	* semantics.c (lang_expand_expr_stmt): Remove.
	(set_current_function_name_declared): Likewise.
	(current_function_name_declared): Likewise.
	(begin_compound_stmt): Use function_name_declared_p.
	(add_decl_stmt): Remove.
	(setup_vtbl_ptr): Use function_name_declared_p.
	(add_scope_stmt): Remove.
	(current_scope_stmt_stack): New function.
	(cp_expand_stmt): Don't handle SCOPE_STMTs.
	(expand_body): Use function_name_declared_p.
	* tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
	* typeck.c: Change order of includes.
	(convert_sequence): Remove.

From-SVN: r36464
2000-09-17 07:38:23 +00:00
Michael Sokolov
4eaa189a5c * splay-tree.c: #include <stdio.h>.
From-SVN: r36432
2000-09-15 11:16:14 -04:00
Hans-Peter Nilsson
2979107801 demangle-expected: Add two tests for anonymous namespaces.
* testsuite/demangle-expected: Add two tests for anonymous
	namespaces.
	* cplus-dem.c (gnu_special): Handle anonymous namespaces.

From-SVN: r36398
2000-09-13 23:09:30 +00:00
Mark Mitchell
2c9f4db73a splay-tree.h (splay_tree_predecessor): Declare.
* splay-tree.h (splay_tree_predecessor): Declare.

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

From-SVN: r36304
2000-09-10 21:28:21 +00:00
Hans-Peter Nilsson
bb22da4b6d demangle-expected: Add four tests for type_info mangling.
* testsuite/demangle-expected: Add four tests for type_info
	mangling.

	* cplus-dem.c (gnu_special): Use do_type, not demangle_fund_type,
	for a non-template non-qualified type_info function or node.

From-SVN: r36301
2000-09-10 19:35:16 +00:00
Alex Samuel
759e81878c * cp-demangle.c: Fix copyright banner.
From-SVN: r36271
2000-09-08 17:50:54 +00:00
Michael Sokolov
2ecd81ef2b * md5.c: #include "ansidecl.h".
From-SVN: r36244
2000-09-07 14:38:43 -04:00
Alex Samuel
d93998ecbe cp-demangle.c (status_allocation_failed): Rearrange whitespace.
* cp-demangle.c (status_allocation_failed): Rearrange whitespace.
	(demangle_type): Handle substitution candidates correctly in the
	face of special substitutions.

From-SVN: r36228
2000-09-07 05:44:46 +00:00
Alex Samuel
1056d2281e cp-demangle.c (demangle_encoding): Rename variable.
* cp-demangle.c (demangle_encoding): Rename variable.
	(demangle_name): Rename parameter.  Handle return type
	suppression.
	(demangle_nested_name): Rename parameter.
	(demangle_prefix): Likewise.  Change return type suppression.
	(demangle_unqualified_name): Add parameter.  Flag constructors and
	conversion operators.
	(demangle_special_name): Fix comment.
	(demangle_type): Rename variable.
	(demangle_bare_function_type): Check for missing return type and
	parameter.
	(demangle_class_enum_type): Rename parameter.
	(demangle_discriminator): Fix misspelling in comment.

From-SVN: r36168
2000-09-05 22:37:17 +00:00
DJ Delorie
2f31ed7e88 configure.in (Cygwin): special case cygwin only when we're building cygwin, not when we're hosting cygwin.
* configure.in (Cygwin): special case cygwin only when we're
building cygwin, not when we're hosting cygwin.

From-SVN: r36164
2000-09-05 14:43:26 -04:00
Alex Samuel
02bcb9c64d cp-demangle.c (demangle_template_arg): Eat an `E' after an <expression>.
* cp-demangle.c (demangle_template_arg): Eat an `E' after an
	<expression>.

From-SVN: r36153
2000-09-05 05:48:59 +00:00