Commit Graph

676 Commits

Author SHA1 Message Date
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
Alex Samuel
aee749cf85 cp-demangle.c (demangle_type_ptr): Increment position past pointer and reference characters.
* cp-demangle.c (demangle_type_ptr): Increment position past
	pointer and reference characters.

From-SVN: r36151
2000-09-05 03:46:56 +00:00
Alex Samuel
92a16bbe76 cp-demangle.c (demangle_nv_offset): New function.
* cp-demangle.c (demangle_nv_offset): New function.
	(demangle_v_offset): Likewise.
	(demangle_call_offset): Likewise.
	(demangle_special_name): Update thunk demangling to comply with
	ABI changes.

From-SVN: r36150
2000-09-05 03:07:14 +00:00
Alex Samuel
31e0ab1f76 In include:
* dyn-string.h: Adjust formatting.
        (dyn_string_insert_char): New macro.  New declaration.

In libiberty:

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

From-SVN: r36148
2000-09-05 01:01:12 +00:00
Hans-Peter Nilsson
ccbc3eb78e Add testcases and missing changelogs:
2000-08-31  Hans-Peter Nilsson  <hp@axis.com>

	* testsuite/demangle-expected: Add nine tests for
	underscore-after-number followed by five tests for name-signature
	delimiter.

2000-07-24  Hans-Peter Nilsson  <hp@axis.com>

	* cplus-dem.c (work_stuff_copy_to_from): New.
	(delete_non_B_K_work_stuff): New.
	(delete_work_stuff): New.
	(mop_up): Break out work_stuff destruction to delete_work_stuff.
	(iterate_demangle_function): New.
	(demangle_prefix): Call iterate_demangle_function instead of
	demangle_function_name.  Leave handling of name-signature
	__-delimiters to iterate_demangle_function.

	* cplus-dem.c (demangle_integral_value): Strip an optional
	following underscore cautiously.  Handle negative numbers.

From-SVN: r36086
2000-08-31 21:44:25 +00:00
Richard Henderson
53dce58223 * Makefile.in (md5.o): Depend on config.h.
From-SVN: r36029
2000-08-28 21:35:59 -07:00
Jason Merrill
881c6935bf [multiple changes]
2000-08-28  Daniel Berlin  <dberlin@redhat.com>

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

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

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

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

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

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

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

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

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

        * md5.h: New file.

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

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

From-SVN: r36022
2000-08-28 20:29:29 -04:00
Alex Samuel
a440fd1970 cp-demangle.c (demangle_name): Initialize template_p in local name case.
* cp-demangle.c (demangle_name): Initialize template_p in local
	name case.  Don't re-add substitutions as candidates.
	(demangle_nested_name): Use <unqualified-name>.
	(demangle_prefix): Likewise.  Don't add template names as
	substitution candidates twice, or re-add a substitution or the
	last prefix component.
	(demangle_local_name): Adjust output format.

From-SVN: r36014
2000-08-28 05:23:40 +00:00
Alex Samuel
d01ce591e5 cp-demangle.c (result_add_separated_char): Change parameter to int.
* cp-demangle.c (result_add_separated_char): Change parameter to
	int.
	(substitution_add): Don't check for duplicates.  Check if
	previously allocated size is zero.
	(demangle_name): Remove duplicate check for std substitution.
	Clear template flag appropriately.
	(demangle_prefix): Remove argument to demangle_substitution.
	Don't check that template flag is already set.
	(demangle_operator_name): Add pt operator.
	(demangle_type): Don't treat r as built-in type.  Remove argument
	to demangle_substitution.  Fix substitution candidate mechanics.
	Handle <template-template-parm>s.  Improve comments.
	(demangle_template_param): Don't handle template arg lists here.
	(demangle_substitution): Remove parameter.
	(print_usage): Remove extra fprintf option.

From-SVN: r35995
2000-08-25 22:52:25 +00:00
Greg McGary
2f59c8eb4b * libiberty/random.c (end_ptr): Revert previous change.
From-SVN: r35962
2000-08-24 22:44:37 +00:00
Greg McGary
2f26c11dbb cplus-dem.c (cplus_demangle_opname, [...]): Use ARRAY_SIZE.
* libiberty/cplus-dem.c (cplus_demangle_opname, cplus_mangle_opname,
	demangle_expression, demangle_function_name): Use ARRAY_SIZE.
	* libiberty/random.c (end_ptr): Likewise.

From-SVN: r35948
2000-08-24 20:29:48 +00:00
Alex Samuel
e282c9c9f5 cp-demangle.c (result_close_template_list): Remove function.
* cp-demangle.c (result_close_template_list): Remove function.
	(result_add_separated_char): New function.
	(result_open_template_list): New macro.
	(result_close_template_list): Likewise.
	(demangle_prefix): Don't set template_p if the
	prefix ends with a ctor name.
	(demangle_type_ptr): Remove duplicate RETURN_IF_ERROR.
	(demangle_type): Check for template args after substitution.
	(demangle_template_args): Use result_open_template_list.

From-SVN: r35915
2000-08-23 17:03:03 +00:00
Daniel Berlin
3388651ce0 cplus-dem.c (demangle_signature): Change if (GNU_DEMANGLING) to if (AUTO_DEMANGLING || GNU_DEMANGLING)
* cplus-dem.c (demangle_signature): Change if (GNU_DEMANGLING) to
        if (AUTO_DEMANGLING || GNU_DEMANGLING)

From-SVN: r35652
2000-08-11 20:55:05 -04:00
Zack Weinberg
c9b6494a24 * pexecute.c: Don't use vfork. Initialize 'pid' before retry loop.
From-SVN: r35436
2000-08-02 22:03:53 +00:00
Jeff Law
c00fb68324 Fix typo.
From-SVN: r35298
2000-07-27 12:50:18 -06:00
Dave Pitts
4f21e37737 mh-openedition.h: Added -DLE370 definition.
2000-04-27  Dave Pitts  <dpitts@cozx.com>

        * config/mh-openedition.h: Added -DLE370 definition.

From-SVN: r35283
2000-07-26 20:00:36 -06:00
Mark Elbrecht
0aab2795b3 pexecute.c (pexecute): Change __GO32__ to __DJGPP__.
* pexecute.c (pexecute) [__MSDOS__]: Change __GO32__ to
        __DJGPP__. Use P_WAIT instead of constant in the spawnv* call.
        Cast program to 'char *' in errmsg_arg assignment.
        (PWAIT_ERROR): Define.
        (pwait): Use PWAIT_ERROR.  Adjust DJGPP's status code to conform
        to DJGPP's WIF* macros.

From-SVN: r35281
2000-07-26 19:48:33 -06:00
Rodney Brown
73aa9564f6 getcwd.c: Include string.h, stdlib.h for prototypes
* getcwd.c: Include string.h, stdlib.h for prototypes

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r35273
2000-07-26 17:29:55 -06:00
Rodney Brown
c2f275e484 Makefile.in (rename.o, waitpid.o): Depend on config.h
* Makefile.in (rename.o, waitpid.o): Depend on config.h
        * rename.c: include config.h, unistd.h
        * waitpid.c: include config.h, sys/wait.h

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r35272
2000-07-26 17:23:24 -06:00
Michael Sokolov
c6451ce1ed configure.in (AC_CHECK_HEADERS): Add time.h.
* configure.in (AC_CHECK_HEADERS): Add time.h.
        (AC_HEADER_TIME): Add check.
        * configure, config.in: Regenerate.
        * getruntime.c: Portably #include <sys/time.h> and/or <time.h>.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r35212
2000-07-23 13:18:32 -06:00
Michael Sokolov
cd44736010 configure.in (AC_CHECK_HEADERS): Add limits.h.
* configure.in (AC_CHECK_HEADERS): Add limits.h.
        * configure, config.in: Regenerate.
        * sort.c: Portably #include <limits.h> and/or <sys/param.h>.
        * strtol.c, strtoul.c: #include "config.h". Portably #include
        <limits.h> and/or <sys/param.h>.
        * Makefile.in (strtol.o, strtoul.o): Update dependencies.

Co-Authored-By: Jeffrey A Law <law@cygnus.com>

From-SVN: r35211
2000-07-23 13:13:46 -06:00
Alex Samuel
0fac482ed6 cp-demangle.c (demangle_ctor_dtor_name): Remove not-in-charge allocating ctor mangling.
* cp-demangle.c (demangle_ctor_dtor_name): Remove not-in-charge
	allocating ctor mangling.
	(demangle_array_type): Handle empty and non-constant array length.

From-SVN: r35210
2000-07-23 17:55:13 +00:00
Michael Sokolov
3b58c09931 aclocal.m4 (libiberty_AC_DECLARE_ERRNO): New macro.
* aclocal.m4 (libiberty_AC_DECLARE_ERRNO): New macro.
	* configure.in (libiberty_AC_DECLARE_ERRNO): Add check.
	* configure, config.in: Regenerate.
	* pexecute.c, strtol.c, strtoul.c: Declare errno if necessary.

From-SVN: r35199
2000-07-23 10:05:03 -06:00
Michael Sokolov
8502a10066 * cp-demangle.c, mkstemps.c: #include <sys/types.h>.
From-SVN: r35198
2000-07-23 09:57:38 -06:00
Mike Stump
0c978c4686 * (vasprintf.o): Add dependency for config.h in vasprintf.c.
From-SVN: r35181
2000-07-21 23:18:01 +00:00
Mike Stump
da0c774308 * Makefile.in (xexit.o): Add dependency for config.h in xexit.c.
From-SVN: r35180
2000-07-21 23:09:30 +00:00
Kaveh R. Ghazi
838f8562e6 Warning fixes:
* cp-demangle.c (cp_demangle_type): Wrap in IN_LIBGCC2.

	* setenv.c (setenv): Initialize variable `ep'.

	* sigsetmask.c (abort): Prototype.

	* vasprintf.c: Include config.h.  Check ANSI_PROTOTYPES, not
	__STDC__ for stdarg.h include.
	(int_vasprintf): Prototype.
	(checkit): Prototype.  Use VPARAMS/ANSI_PROTOTYPES/VA_START in
	definition.  Cast `global_total_width' in comparison.
	(main): Prototype.  Return a value.

	* vfork.c (fork): Prototype.

	* xexit.c: Include config.h.

From-SVN: r35178
2000-07-21 20:08:36 +00:00
Joseph Myers
e995813266 cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int, and print it with %u.
* cplus-dem.c (demangle_fund_type): Make 'dec' an unsigned int,
        and print it with %u.

From-SVN: r35153
2000-07-20 13:58:34 -06:00
Hans-Peter Nilsson
39a6492f9d regress-demangle (failed test): Show result and expected output.
* testsuite/regress-demangle (failed test): Show result and
	expected output.

From-SVN: r35093
2000-07-17 10:35:41 +00:00
Andrew Haley
6d0be3693d cplus-dem.c (main): fflush() after emitting last char before waiting for input.
2000-07-07  Andrew Haley  <aph@cygnus.com>

	* cplus-dem.c (main): fflush() after emitting last char before
	waiting for input.

From-SVN: r34902
2000-07-07 13:50:49 +00:00
Alex Samuel
bece74bdee in libiberty/ChangeLog:
* cp-demangle.c (demangle_encoding): Accept no substitutions.
	(demangle_name): Handle <substitution> followed by
	<unqualified-template-name>.
	(demangle_type): Follow special substitutions with
	<class-enum-type>
	(demangle_subtitution): Set template_p for special substitutions.
	(main): Fix typos.

in gcc/cp/ChangeLog:

	* mangle.c (find_substitution): Use same_type_p.
	(write_encoding): Don't check for substitutions.

in libio/ChangeLog:

	* libioP.h (VTABLE_LABEL): Update for new vtable mangling.
	* stdstrbufs.cc (filebuf_vtable): Likewise.
	(stdiobuf_vtable): Likewise.

From-SVN: r34811
2000-06-30 15:25:33 +00:00
Alex Samuel
229b8ec7c6 cp-demangle.c (demangle_special_name): Swap base and derived class when demangling construction vtables.
* cp-demangle.c (demangle_special_name): Swap base and derived
	class when demangling construction vtables.

From-SVN: r34751
2000-06-28 06:08:27 +00:00
Alex Samuel
051664b069 in include/ChangeLog:
* dyn-string.h (dyn_string_init, dyn_string_new,
	dyn_string_delete, dyn_string_release, dyn_string_resize,
	dyn_string_clear, dyn_string_copy, dyn_string_copy_cstr,
	dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
	dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
	dyn_string_append_char, dyn_string_substring_dyn_string_eq):
	Define as same name with __cxa_ prepended, if IN_LIBGCC2.
	(dyn_string_init, dyn_string_copy, dyn_string_copy_cstr,
	dyn_string_prepend, dyn_string_prepend_cstr, dyn_string_insert,
	dyn_string_insert_cstr, dyn_string_append, dyn_string_append_cstr,
	dyn_string_append_char, dyn_string_substring): Change return type
	to int.

in libiberty/ChangeLog:

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

in gcc/cp/ChangeLog:

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

From-SVN: r34657
2000-06-23 03:58:44 +00:00
Zack Weinberg
fe06b6968b cp-demangle.c (demangle_operator_name): Add spaces before names beginning with a letter...
* cp-demangle.c (demangle_operator_name): Add spaces before
	names beginning with a letter: delete, delete[], new, new[],
	sizeof.
	(demangle_special_name): Handle TF <type> and TJ <type>.

From-SVN: r34477
2000-06-09 18:55:36 +00:00
Philippe De Muyter
6223e158fd * cp-demangle.c (template_arg_list_new): Revert previous PARAMS patch.
From-SVN: r34455
2000-06-08 16:51:44 +00:00
Philippe De Muyter
48f3e29b38 cp-demangle.c (stdio.h): File included unconditionaly.
* cp-demangle.c (stdio.h): File included unconditionaly.
	(template_arg_list_new): Parameter list is PARAMS ((void)), not ().
	* dyn-string.c (stdio.h): File included.
	* partition.c (partition_print): No `&' needed to take the address of
	a function.

From-SVN: r34450
2000-06-08 07:29:53 +00:00
Kaveh R. Ghazi
69197e7e5e configure.in (ac_libiberty_warn_cflags): Add -pedantic.
libiberty:
	* configure.in (ac_libiberty_warn_cflags): Add -pedantic.

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

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

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

	* memcmp.c (memcmp): Constify.

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

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

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

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

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

From-SVN: r34447
2000-06-07 21:13:14 +00:00
Kaveh R. Ghazi
7eb23b1f31 Makefile.in (cp-demangle.o): Depend on $(INCDIR)/demangle.h.
* Makefile.in (cp-demangle.o): Depend on $(INCDIR)/demangle.h.

	* cp-demangle.c: Include demangle.h.
	(template_arg_list_new): DeANSIfy.
	(cp_demangle): Make static and add prototype.
	(operator_code, operators): Constify.
	(demangle_operator_name): Likewise for variables `p1', `p2' and `p'.

From-SVN: r34446
2000-06-07 20:35:43 +00:00
Alex Samuel
3faa108c7b cp-demangle.c (demangle_prefix): Cast argument to isdigit to unsigned char.
* cp-demangle.c (demangle_prefix): Cast argument to isdigit to
	unsigned char.
	(demangle_unqualified_name): Likewise.
	(demangle_number_literally): Likewise.
	(demangle_type): Likewise.
	(demangle_substitution): Likewise.
	(is_mangled_char): Likewise, for isalnum.

From-SVN: r34411
2000-06-05 18:24:07 +00:00
Alex Samuel
69afa80d10 In include,
* dyn-string.h: Move here from gcc/dyn-string.h.  Add new functions.

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

In libiberty,

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

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

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

From-SVN: r34397
2000-06-05 02:28:41 +00:00
Andrew Cagney
0b72c3df6b Add field ``name'' to floatformat.
From-SVN: r34292
2000-05-31 11:00:54 +00:00
Jeff Law
270cea065e * Makefile.in (objalloc.o): Depend on config.h
From-SVN: r34277
2000-05-30 15:07:43 -06:00
Jeff Law
e483d5cc05 * Makefile.in (objalloc.o): Depend on config.h
From-SVN: r34275
2000-05-30 15:06:31 -06:00
Zack Weinberg
d11ec6f0d9 hashtab.c, [...]: Include string.h if HAVE_STRING_H.
* hashtab.c, partition.c, sort.c, xmemdup.c: Include string.h
	if HAVE_STRING_H.
	* pexecute.c, xexit.c: Include stdlib.h if HAVE_STDLIB_H.
	* objalloc.c: Include config.h.  Include stdlib.h and don't
	declare malloc or free if HAVE_STDLIB_H.
	* strerror.c, strsignal.c: Include stdlib.h if HAVE_STDLIB_H,
	else declare malloc without prototype.  Include string.h if
	HAVE_STRING_H, else declare memset without prototype.  Don't
	include stddef.h.

From-SVN: r34254
2000-05-29 19:33:52 +00:00
Mike Stump
f8e2da56c1 Makefile.in (xmalloc.o): Add dependency for config.h, fixes make -j3.
* Makefile.in (xmalloc.o): Add dependency for config.h, fixes make
 	-j3.

From-SVN: r34117
2000-05-24 01:46:44 +00:00
J. David Anglin
650f30687e * xmalloc.c: Include config.h for HAVE_SBRK definition.
From-SVN: r34003
2000-05-18 16:48:34 -06:00
Horst von Brand
1d2da2e1ce hashtab.c (hash_pointer): Delete low-order bits which are probably zero, also eliminate a warning on alpha.
* hashtab.c (hash_pointer): Delete low-order bits which are
	probably zero, also eliminate a warning on alpha.

From-SVN: r33934
2000-05-16 16:59:20 +00:00
David Edelsohn
c7a79a32a5 - fix typo in entry
From-SVN: r33919
2000-05-15 22:51:23 -04:00
David Edelsohn
47668d0a4a Makefile.in: Change "pic" to depend on $(PICFLAG), not
on $(enable_shared).

From-SVN: r33918
2000-05-15 22:48:28 -04:00
Jakub Jelinek
36348eab5d config.table: Use mh-sparcpic for sparc*-*-*.
* config.table: Use mh-sparcpic for sparc*-*-*.

	* configure.in: Use mh-sparcpic for sparc*-*-*.

From-SVN: r33848
2000-05-11 16:16:25 +02:00
Nick Clifton
209bbe34b3 Add strncmp.c to list of CFILES and strncmp to the NEEDED list
From-SVN: r33785
2000-05-09 01:23:33 +00:00
Kaveh R. Ghazi
a85a47fbf4 demangle.h (demangler_engine): Constify.
include:
	* demangle.h (demangler_engine): Constify.

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

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

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

From-SVN: r33670
2000-05-04 15:40:25 +00:00
Alexandre Oliva
3b94497c20 Makefile.in (maintainer-clean-subdir): Fix handling of empty SUBDIRS.
* Makefile.in (maintainer-clean-subdir): Fix handling of empty
SUBDIRS.

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

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

From-SVN: r33525
2000-04-28 18:22:22 -04:00
Kaveh R. Ghazi
a9266bfa4a aclocal.m4: New file with new test libiberty_AC_FUNC_STRNCMP.
* aclocal.m4: New file with new test libiberty_AC_FUNC_STRNCMP.

	* configure.in (AC_CHECK_HEADERS): Add sys/mman.h fcntl.h.
	(libiberty_AC_FUNC_STRNCMP): Invoke.

	* strncmp.c: New file.

From-SVN: r33498
2000-04-28 01:42:43 +00:00
Jan Hubicka
8e02c4d08d hashtab.c (htab_expand): Add prototype.
* hashtab.c (htab_expand): Add prototype.
	(find_empty_slot_for_expand): Likewise.

From-SVN: r33487
2000-04-27 14:59:55 +00:00
Kaveh R. Ghazi
4feeaae33e hashtab.c (hash_pointer, eq_pointer): Make definition static to match prototype.
* hashtab.c (hash_pointer, eq_pointer): Make definition static to
       match prototype.
       (htab_expand): Cast the return value of xcalloc.

From-SVN: r33391
2000-04-24 22:29:09 +00:00
Mark Mitchell
18a94a2f75 hashtab.h (hash_pointer): Declare.
* hashtab.h (hash_pointer): Declare.
	(eq_pointer): Likewise.

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

From-SVN: r33372
2000-04-24 07:29:11 +00:00
Mark Mitchell
b51024fc89 * sort.c (sort_pointers): Fix endianness bugs.
From-SVN: r33368
2000-04-24 05:52:07 +00:00
Mark Mitchell
eeb0656f22 sort.c: New file.
* sort.c: New file.
	* Makefile.in (CFILES): Add sort.c
	(REQUIRED_OFILES): Add sort.o.
	(sort.o): New target.

From-SVN: r33364
2000-04-24 00:51:08 +00:00
Michael Sokolov
7277f72df9 Makefile.in (*-subdir): Revamp slightly to avoid losing on 4.3BSD systems.
2000-04-21  Michael Sokolov  <msokolov@ivan.Harhan.ORG>

        * Makefile.in (*-subdir): Revamp slightly to avoid losing on
        4.3BSD systems.

From-SVN: r33329
2000-04-21 16:20:20 -06:00
Richard Kenner
e38992e8d3 conflict.c (conflict_graph_add): Pass enum type to htab_find_slot.
* gcc/conflict.c (conflict_graph_add): Pass enum type to
	htab_find_slot.
	* gcc/cpperror.c (hashtab.h): Now include.
	* gcc/cppexp.c (hashtab.h): Likewise.
	* gcc/cpplex.c (hashtab.h): Likewise.
	* gcc/cppfiles.c (hashtab.h): Likewise.
	(find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type
	to htab_find_slot_with_hash.
	* gcc/cpphash.c (hashtab.h): Now include.
	(_cpp_lookup_slot): INSERT is now enum insert_option.
	* gcc/cpphash.h (_cpp_lookup_slot): Likewise.
	* gcc/cppinit.c (hashtab.h): Include earlier.
	(initialize_builtins): Pass enum to htab_find_slot.
	* gcc/cpplib.c (hashtab.h): Now include.
	(do_define, do_undef): Pass enum type to _cpp_lookup_slot.
	(do_pragma_poison, do_assert): Likewise.
	* gcc/emit-rtl.c (gen_rtx_CONST_INT): Pass enum to
	htab_find_slot_with_hash.
	* gcc/simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise.
	* gcc/tree.c (type_hash_add): Likewise.
	(build1): Minor cleanup.
	* include/hashtab.h (enum insert_option): New type.
	(htab_find_slot, htab_find_slot_with_hash): Use it.
	* libiberty/hashtab.c: Various minor cleanups.
	(htab_find_slot_with_hash): INSERT is now enum insert_option.
	(htab_find_slot): Likewise.

From-SVN: r33236
2000-04-18 16:42:00 -04:00
Dave Pitts
498e1ab148 * cplus-dem.c (cplus_demangle_opname): Changed to use islower.
From-SVN: r33189
2000-04-16 17:51:19 -07:00
Richard Henderson
dc17cc7bec * splay-tree.c (splay_tree_remove): New.
From-SVN: r32949
2000-04-05 17:13:50 -07:00
Jason Merrill
dff7cb5b08 From Mark Elbrecht:
* makefile.dos: Remove; obsolete.
        * configure.bat: Remove; obsolete.

From-SVN: r32938
2000-04-05 15:02:02 -04:00
Mark Mitchell
b13eb66b7d hashtab.h (hashval_t): New type.
* hashtab.h (hashval_t): New type.
	(htab_find_with_hash): Use it as an argument.
	(htab_find_slot_with_hash): Likewise.

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

From-SVN: r32842
2000-03-31 07:04:37 +00:00
Zack Weinberg
0194e877a3 hashtab.c (htab_find_with_hash): Avoid calculating hash2 unless it will be used.
* hashtab.c (htab_find_with_hash): Avoid calculating hash2
	unless it will be used.  Rearrange loop for better
	optimization.
	(higher_prime_number): Add static prototype.

From-SVN: r32809
2000-03-29 19:04:54 +00:00
Ian Lance Taylor
5ad5a9844b merge from bfdland
From-SVN: r32729
2000-03-24 16:32:08 -05:00
Jeffrey A Law
abc61fd406 * Makefile.in (partition.o): Depend on config.h
From-SVN: r32580
2000-03-16 01:37:47 -07:00
Bernd Schmidt
8c5d513f17 Some cleanups/additions for hashtables
From-SVN: r32536
2000-03-14 18:28:45 +00:00
Alex Samuel
d9d4fb433e Changes in include:
* partition.h: New file.

Changes in libiberty:

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

Changes in gcc:

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

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

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

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

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

From-SVN: r32437
2000-03-08 23:44:29 +00:00
Mumit Khan
aeecce429e pexecute.c: Conditionally include string.h.
2000-01-04  Mumit Khan  <khan@xraylith.wisc.edu>

	* pexecute.c: Conditionally include string.h.
	(fix_argv): Handle embedded whitespace in args for Mingw32.

From-SVN: r31214
2000-01-04 21:09:51 +00:00
Kaveh Ghazi
cfa770517e Update copyright
From-SVN: r31206
2000-01-04 16:11:32 +00:00
Kaveh R. Ghazi
1eaf7d9c9b configure.in (ac_libiberty_warn_cflags): Turn on warnings if we're using gcc.
* configure.in (ac_libiberty_warn_cflags): Turn on warnings if
	we're using gcc.

	* Makefile.in (COMPILE.c): Add @ac_libiberty_warn_cflags@

From-SVN: r31205
2000-01-04 16:09:57 +00:00
Geoff Keating
0fadedb2df vasprintf.c (int_vasprintf): Don't re-read the format character as this mishandles strings like '%%s'.
* vasprintf.c (int_vasprintf): Don't re-read the format character
as this mishandles strings like '%%s'.

From-SVN: r31102
1999-12-27 21:38:06 +00:00
Mark Mitchell
08230f26ce splay-tree.h (struct splay_tree_node): Rename to ...
* splay-tree.h (struct splay_tree_node): Rename to ...
	(struct splay_tree_node_s): ... this.
	(struct splay_tree): Rename to ...
	(struct splay_tree_s): ... this.

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

From-SVN: r30790
1999-12-05 18:13:48 +00:00
Philippe De Muyter
6de9b8ff12 * hashtab.c (sys/types.h): File included.
From-SVN: r30683
1999-11-28 00:58:37 -07:00
Jason Merrill
f3636679d9 strtoul.c, [...]: Remove advertising clause from BSD license
* strtoul.c, strtol.c, random.c: Remove advertising clause from
        BSD license

From-SVN: r30620
1999-11-22 13:36:49 -05:00
Jeff Law
f507211e3c Revert last change.
Revert last change.  HJ's message meant "code like this already exists
in libiberty/libio", not "code like this needs to be added to libiberty/libio".

What a waste of my time.

From-SVN: r30534
1999-11-15 02:01:30 -07:00
Jeffrey A Law
ecc45b285a * Makefile.in (LIBOBJS): Depend on stamp-picdir.
From-SVN: r30533
1999-11-15 01:59:33 -07:00
Jeffrey A Law
36dd3a44a3 * hashtab.c: Include stdio.h.
From-SVN: r30475
1999-11-10 09:45:34 -07:00
Jeffrey A Law
6e30047279 * hashtab.c (traverse_hash_table): Protect prototype with PARAMS.
From-SVN: r30453
1999-11-08 09:26:37 -07:00
Philippe De Muyter
df548dfc02 * xstrdup (sys/types.h): Include this file.
From-SVN: r30347
1999-11-02 03:25:28 -07:00
Nathan Sidwell
2c37514337 Makefile.in (SUBDIRS): New macro.
* Makefile.in (SUBDIRS): New macro.
	(mostlyclean, clean, distclean, maintainer-clean): Adjust to
	avoid multiple subdirectory cleaning.
	(*-subdir): Use SUBDIRS.

From-SVN: r30229
1999-10-28 08:26:42 +00:00
Jim Kingdon
a82cecdad5 cplus-dem.c: Move declarations of standard_symbol_characters and hp_symbol_characters inside...
* cplus-dem.c: Move declarations of standard_symbol_characters and
        hp_symbol_characters inside #ifdef MAIN to avoid compiler
        warnings.

From-SVN: r30175
1999-10-25 22:30:08 -06:00
Zack Weinberg
ed38f5d5d8 hashtab.c (find_hash_table_entry): When returning a DELETED_ENTRY slot, change it to EMPTY_ENTRY first.
1999-10-23 08:51 -0700  Zack Weinberg  <zack@bitmover.com>

	* hashtab.c (find_hash_table_entry): When returning a
	DELETED_ENTRY slot, change it to EMPTY_ENTRY first.
	(clear_hash_table_slot): New function which deletes an entry
	by its position in the table, not its value.
	(traverse_hash_table): New function which calls a hook
	function for every live entry in the table.

	* hashtab.h: Give hash_table_t a struct tag.  Add prototypes
	for clear_hash_table_slot and traverse_hash_table.  Correct
	prototype of all_hash_table_collisions.

From-SVN: r30138
1999-10-23 15:56:52 +00:00
Mark Mitchell
b60fe4a75b cplus-dem.c (INTBUF_SIZE): New macro.
* cplus-dem.c (INTBUF_SIZE): New macro.
	(string_append_template_idx): New function.
	(demangle_expression): Likewise.
	(demangle_integral_value): Use it.
	(demangle_real_value): New function, split out from ...
	(demangle_template_value_parm): ... here.  Use
	string_append_template_idx.  Use demangle_real_value.
	(demangle_template): Use string_append_template_idx.
	(demangle_qualified): Use consume_count_with_underscores.
	(get_count): Tweak formatting.
	(do_type): Use string_append_template_idx.

From-SVN: r30091
1999-10-19 17:52:52 +00:00
Kaveh R. Ghazi
3da5522a60 * calloc.c: Add a public domain notice.
From-SVN: r30069
1999-10-18 15:25:01 +00:00
Philippe De Muyter
d7d36ea879 * setenv.c (sys/types.h, stdio.h): Include those files unconditionaly.
From-SVN: r30067
1999-10-18 02:36:29 -06:00
Vladimir Makarov
a2f945c649 Makefile.in (CFILES): Add hashtab.c
* Makefile.in (CFILES): Add hashtab.c
        (REQUIRED_OFILES): Add hashtab.o
        (hashtab.o): Add dependencies.
        * hashtab.c: New file

From-SVN: r30012
1999-10-15 01:50:25 -06:00
Mumit Khan
7f22ec2e64 basename.c (DIR_SEPARATOR): New macro.
* basename.c (DIR_SEPARATOR): New macro.
        (DIR_SEPARATOR_2): Likewise.
        (HAVE_DOS_BASED_FILESYSTEM): Likewise.
        (IS_DIR_SEPARATOR): Likewise.
        (main): Handle MSDOS style pathname.

From-SVN: r29937
1999-10-13 01:18:09 -06:00
Mark Mitchell
7c56a6cef7 cplus-dem.c (do_type): Handle pointer to member types whose enclosing classes have namespace scope.
* cplus-dem.c (do_type): Handle pointer to member types whose
	enclosing classes have namespace scope.

From-SVN: r29901
1999-10-11 08:32:10 +00:00
Marc Espie
cd32188bd6 * config.table: Provide a backup shell for executing move-if-change.
From-SVN: r29883
1999-10-10 01:27:40 -06:00
Mark Mitchell
fc232f7a62 xmalloc.c (xmalloc): Fix spelling error.
* xmalloc.c (xmalloc): Fix spelling error.
	(xcalloc, xrealloc): Likewise.

From-SVN: r29779
1999-10-03 01:55:59 +00:00
Kaveh R. Ghazi
2a138827f0 cplus-dem.c (fancy_abort, [...]): Add prototype.
* cplus-dem.c (fancy_abort, demangle_integral_value,
	demangle_arm_hp_template, recursively_demangle,
	standard_symbol_characters, hp_symbol_characters, main): Add prototype.
	(program_name, program_version, fatal): Constify a char*.
	(usage, fatal): Mark with ATTRIBUTE_NORETURN.
	(main): Call return, not exit.

From-SVN: r29776
1999-10-02 20:03:15 +00:00
Richard Henderson
2c45d1a04d alloca-conf.h (alloca): Don't use Gcc builtin or <alloca.h>.
* alloca-conf.h (alloca) [C_ALLOCA]: Don't use Gcc builtin
        or <alloca.h>.
        * clock.c (GNU_HZ): New definition.
        (clock): Use it.
        * getruntime.c: Likewise.

        * config.table: Use mh-beos.
        * config/mh-beos: New file.

From-SVN: r29680
1999-09-27 11:45:52 -06:00
Kaveh R. Ghazi
5a657fc371 libiberty.h (make_temp_file): Add a prototype.
include:

        * libiberty.h (make_temp_file):  Add a prototype.

libiberty:

        * choose-temp.c: Remove obsolete comment about gcc.
        (make_temp_file): Constify a char*.

gcc:

        * collect2.c (make_temp_file): Don't prototype.

        * gcc.c (make_temp_file): Likewise.

        * mips.c (mips_make_temp_file): Renamed from `make_temp_file'.

From-SVN: r29662
1999-09-25 13:11:17 +00:00
Kaveh R. Ghazi
33c5ddcd3e * xmemdup.c: Include sys/types.h.
From-SVN: r29218
1999-09-09 00:11:39 +00:00
Jeff Garzik
b10647f1b2 xmemdup.c: New xmemdup function.
* xmemdup.c:  New xmemdup function.
	* Makefile.in, makefile.vms, vmsbuild.com:  Use xmemdup.[co].

From-SVN: r29199
1999-09-08 02:19:52 -06:00
Linas Vepstas
3dd6c3afe3 config.table: Add openedition target.
* config.table: Add openedition target.
        * config/mh-openedition: New file.

From-SVN: r29188
1999-09-07 23:33:11 -07:00
Marc Espie
19e28e2aee * pexecute.c (pexecute): Fill in temp_base when needed.
From-SVN: r29053
1999-09-02 01:37:50 -06:00
Richard Henderson
4dfeccf9d0 * getpwd.c: Check HAVE_GETCWD before defining it away.
From-SVN: r29013
1999-08-31 13:33:13 -07:00
Kaveh R. Ghazi
4ac3cb830a Makefile.in (CFILES): Add calloc.c and getpwd.c.
* Makefile.in (CFILES): Add calloc.c and getpwd.c.
	(REQUIRED_OFILES): Add getpwd.o.
	(getpwd.o): Add target.

	* configure.in (AC_PREREQ): Bump to 2.13.
	(AC_CHECK_HEADERS): Add check for <sys/stat.h>.

	* getpwd.c: New file, moved here from gcc.

From-SVN: r28996
1999-08-31 00:50:36 +00:00
Kaveh R. Ghazi
e797ff7048 Warning fixes:
* cplus-dem.c (gnu_special): Cast a `size_t' to `long' when
	comparing against a signed quantity.
	(arm_special): Likewise.
	(demangle_fund_type): Likewise.
	(do_hpacc_template_const_value): Mark parameter `work' with
	ATTRIBUTE_UNUSED.
	(main): Constify variable `valid_symbols'.

From-SVN: r28859
1999-08-25 13:29:34 +00:00
Philippe De Muyter
55247fce70 * strtoul.c (strtoul): Add parentheses around && within ||.
From-SVN: r28819
1999-08-24 02:51:03 -06:00
Daniel Jacobowitz
76632dd06d Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix, libdir, libsubdir and tooldir.
* Makefile.in (FLAGS_TO_PASS): Include prefix, exec_prefix,
        libdir, libsubdir and tooldir.
Applied in libchill, libf2c, libiberty and libobjc

From-SVN: r28569
1999-08-06 23:37:16 -06:00
Mark Mitchell
d080bbfa45 * splay-tree.h (splay_tree_insert): Return the new node.
From-SVN: r28389
1999-08-02 05:54:50 +00:00
Ian Lance Taylor
652374d338 splay-tree.c (splay_tree_insert): Add initialization to avoid warning.
* splay-tree.c (splay_tree_insert): Add initialization to avoid
        warning.

From-SVN: r28269
1999-07-26 11:57:25 -06:00
Richard Henderson
a81c752ad3 argv.c: Include stdlib.h and string.h instead of prototyping directly.
* argv.c: Include stdlib.h and string.h instead of
        prototyping directly.
        * choose-temp.c: Conditionally include string.h.

From-SVN: r28099
1999-07-14 10:29:38 -07:00
Jason Merrill
8f1824d91b * Makefile.in (NEEDED): Add bcmp, bcopy, bzero.
From-SVN: r28071
1999-07-12 14:20:41 -04:00
Jason Merrill
a654176720 tweak
From-SVN: r28003
1999-07-07 22:43:10 -04:00
Jason Merrill
a4494286a6 Makefile.in (needed-list): Only include stuff we actually need for libstdc++.
* Makefile.in (needed-list): Only include stuff we actually need
	for libstdc++.

From-SVN: r27999
1999-07-07 11:22:55 -04:00
Jeff Law
e8bb250c8d Whoops. Revert patch applied to the wrong tre.
From-SVN: r27737
1999-06-24 15:30:38 -06:00
Philippe De Muyter
4ef877d9fb setenv.c (sys/types.h, stdio.h): Files included.
* setenv.c (sys/types.h, stdio.h): Files included.
        * xstrdup.c (sys/types.h): File included.
For the gcc-2.95 branch only.  Not to be migrated into the mainline tree
because it is incomplete.

From-SVN: r27736
1999-06-24 15:28:22 -06:00
Andreas Schwab
90e72e20a3 configure.in (checkfuncs): Add gettimeofday.
* configure.in (checkfuncs): Add gettimeofday.
        * config.in, configure: Regenerated.

From-SVN: r27647
1999-06-20 23:01:18 -06:00
Mumit Khan
62133b5e6a configure.in (*-*-uwin*): UWIN has sys_{errlist,nerr} even if the test fails.
p
        * configure.in (*-*-uwin*): UWIN has sys_{errlist,nerr} even if
        the test fails.
        * configure: Regenerate.

From-SVN: r27642
1999-06-20 22:56:40 -06:00
Mumit Khan
b569200e6d configure.in (*-*-uwin*): UWIN has sys_{errlist,nerr} even if the test fails.
�
        * configure.in (*-*-uwin*): UWIN has sys_{errlist,nerr} even if
        the test fails.
        * configure: Regenerate.

From-SVN: r27641
1999-06-20 22:56:38 -06:00
Mike Stump
739194481c Mike Stump <mrs@wrs.com>
Mike Stump  <mrs@wrs.com>
        * Makefile.in (setenv.o): Add config.h dep for setenv.o to fix
        parallel builds.

From-SVN: r27477
1999-06-10 13:43:56 -07:00
Kaveh R. Ghazi
fee9125c10 putenv.c: Include ansidecl.h to define `const'.
* putenv.c: Include ansidecl.h to define `const'.
        * setenv.c: Likewise.

From-SVN: r27221
1999-05-28 07:34:48 +00:00
Jeff Law
a7c9637fbf Forgot to commit.
From-SVN: r27172
1999-05-26 05:35:41 -06:00
Jeff Law
9eb4080f6f Makefile.in (CFILES): Add putenv.c and setenv.c.
* Makefile.in (CFILES): Add putenv.c and setenv.c.
        * configure.in (funcs): Add putenv and setenv.
        (AC_CHECK_FUNCS): Check for putenv and setenv.
        * configure: Rebuilt.
        * putenv.c setenv.c: New files.

[[Split portion of a mixed commit.]]

From-SVN: r27162.2
1999-05-25 21:13:18 -06:00
Melissa O'Neill
d05ba2205f getcwd.c (getcwd): If pathname is NULL, then obtain SIZE bytes of space using malloc.
P
        * getcwd.c (getcwd): If pathname is NULL, then obtain SIZE
        bytes of space using malloc.

From-SVN: r27161
1999-05-25 21:04:27 -06:00
Melissa O'Neill
71cce721af getcwd.c (getcwd): If pathname is NULL, then obtain SIZE bytes of space using malloc.
�
        * getcwd.c (getcwd): If pathname is NULL, then obtain SIZE
        bytes of space using malloc.

From-SVN: r27160
1999-05-25 21:04:25 -06:00
Stu Grossman
53504016e1 cplus-dem.c (demangle_fund_type (near 'I' case)): Don't advance the *mangled pointer beyond the end of the string.
* cplus-dem.c (demangle_fund_type (near 'I' case)): Don't advance
        the *mangled pointer beyond the end of the string.  Clean up code to
        match prevailing coding style.

From-SVN: r26959
1999-05-16 18:44:09 -06:00
Michael Hayes
348425392f * tmpnam.c (L_tmpnam): Fix typo.
From-SVN: r26921
1999-05-12 19:23:42 -06:00
Marc Espie
3a08531df2 cplus-dem.c (standard_symbol_characters): Renamed from standard_symbol_alphabet.
* cplus-dem.c (standard_symbol_characters): Renamed from
        standard_symbol_alphabet.  No longer modify TABLE.
        (hp_symbol_characters): Renamed from hp_symbol_alphabet.  No longer
        modify TABLE.
        (main): Corresponding changes.  Use strchr to determine if a
        character is valid.

From-SVN: r26912
1999-05-12 18:24:18 -06:00
Jim Blandy
8db9d08ba1 *** empty log message ***
From-SVN: r26888
1999-05-11 12:40:31 +00:00
Jim Blandy
3eca405bd9 cplus-dem.c (main): Use table lookup to distinguish identifier characters from non-identifier...
* cplus-dem.c (main): Use table lookup to distinguish identifier
characters from non-identifier characters.
(standard_symbol_alphabet, hp_symbol_alphabet): New functions.

From-SVN: r26887
1999-05-11 12:39:46 +00:00
Fred Fish
6a071f4a74 Fred Fish <fnf@be.com>
Fred Fish  <fnf@be.com>
        * configure.in (sys/resource.h): Add to AC_CHECK_HEADERS list.
        * getruntime.c: Only attempt to include sys/resource.h and
        use getrusage if both HAVE_GETRUSAGE and HAVE_SYS_RESOURCE_H
        are defined.

From-SVN: r26808
1999-05-06 13:57:01 -07:00
Donn Terry
7dd8861714 configure.in (alloca detection): Handle alloca directly for interix.
* configure.in (alloca detection): Handle alloca directly for interix.
        * configure: Rebuilt.

From-SVN: r26635
1999-04-25 18:40:51 -06:00
Mumit Khan
7a1528bc63 * choose-temp.c (DIR_SEPARATOR): Use '\\' only for native windows32.
From-SVN: r26619
1999-04-24 18:23:06 -06:00
Jim Blandy
76409268c4 *** empty log message ***
From-SVN: r26563
1999-04-20 11:02:02 +00:00
Jim Blandy
c5a855ce6e Fix from Dale Hawkins:
* cplus-dem.c (mop_up): Set typevec_size to zero, so it'll be
reallocated properly if we use it again.
* cplus-dem.c (demangle_fund_type): Check for buffer overrun.  Be
stricter about syntax.  Always null-terminate string.

From-SVN: r26562
1999-04-20 11:00:27 +00:00
Mumit Khan
acbbd80a54 configure.in (checkfuncs): Check for sbrk.
* configure.in (checkfuncs): Check for sbrk.
        * config.in: Rebuilt.
        * configure: Likewise.
        * xmalloc.c: Use HAVE_SBRK instead of the host specific definitions.

From-SVN: r26480
1999-04-15 16:05:35 -06:00
Jim Blandy
9252355101 *** empty log message ***
From-SVN: r26374
1999-04-12 12:36:31 +00:00
Jim Blandy
92b0366412 Fix from Marcus Daniels:
* cplus-dem.c (demangle_fund_type): Don't run off the end of the
identifier looking for another underscore.

From-SVN: r26373
1999-04-12 12:36:00 +00:00
Mumit Khan
36eb4217ac pexecute.c: Change all references to __UWIN__ to _UWIN.
* pexecute.c: Change all references to __UWIN__ to _UWIN.
        * xmalloc.c: Likewise.
        (xcalloc): UWIN has sbrk.
        (xrealloc): Fix guard macro.

From-SVN: r26352
1999-04-11 16:21:28 -06:00
Mark Mitchell
391cdef056 cplus-dem.c (demangle_template_value_parm): Handle pointers-to-members.
* cplus-dem.c (demangle_template_value_parm): Handle
	pointers-to-members.
	(do_type): Handle template parameters as qualifiers.

From-SVN: r26350
1999-04-11 18:46:52 +00:00
Jeff Law
f4f30aa199 Mon Dec 14 09:55:50 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
From-SVN: r26322
1999-04-09 16:26:17 -06:00
Jim Blandy
9d22998936 cplus-dem.c: Attempt to handle overflows in counts with some semblance of grace.
1999-04-01  Jim Blandy  <jimb@zwingli.cygnus.com>
	* cplus-dem.c: Attempt to handle overflows in counts with some
	semblance of grace.
	(consume_count): Detect overflows.  Return -1 to indicate errors,
	instead of zero.
	(demangle_template_value_parm, demangle_template): Handle change
	to consume_count's return convention.

From-SVN: r26309
1999-04-09 09:01:35 +00:00
Jeff Law
3510075c6d Changes from official libiberty sources.
* Missing ChangeLog entries.
	* Some java demangling stuff
	* More cygwin32->cygwin related changes.

From-SVN: r26236
1999-04-06 21:31:24 -06:00
Tom Tromey
7c72138aa2 regress-demangle: New file.
* testsuite/regress-demangle: New file.
	* testsuite/demangle-expected: New file.
	* Makefile.in (all, check, installcheck, info, install-info,
	clean-info, dvi, install, etags, tags, mostlyclean, clean,
	distclean, maintainer-clean, realclean): Depend on corresponding
	`-subdir' target.
	(all-subdir check-subdir installcheck-subdir info-subdir
	install-info-subdir clean-info-subdir dvi-subdir
	install-info-subdir etags-subdir mostlyclean-subdir clean-subdir
	distclean-subdir maintainer-clean-subdir): New target.
	* testsuite/Makefile.in: New file.
	* configure: Rebuilt.
	* configure.in: Create testsuite/Makefile.

From-SVN: r26205
1999-04-05 14:28:59 +00:00
Mark Mitchell
ae7f727035 splay-tree.h (splay_tree_compare_pointers): Declare.
1999-04-02  Mark Mitchell  <mark@codesourcery.com>
	* splay-tree.h (splay_tree_compare_pointers): Declare.
1999-04-02  Mark Mitchell  <mark@codesourcery.com>
	* splay-tree.h (splay_tree_compare_pointers): Define.

From-SVN: r26132
1999-04-02 15:18:06 +00:00
Mark Mitchell
30f7237966 alias.c (alias_set_compare): Remove.
* alias.c (alias_set_compare): Remove.
	(record_alias_subset): Use splay_tree_compare_ints instaed of
	alias_set_compare.
	(init_alias_once): Likewise.
	* cse.c: Include splay-tree.h.
	(reg_qty): Remove.
	(reg_tick): Likewise.
	(reg_table): Likewise.
	(cse_reg_info): New structure.
	(cse_reg_info_free_list): New variable.
	(cse_reg_info_tree): Likewise.
	(cached_regno): Likewise.
	(cached_cse_reg_info): Likewise.
	(all_minus_one): Remove.
	(consec_ints): Likewise.
	(GET_CSE_REG_INFO): New macro.
	(REG_TICK): Likewise.  Use throughout instead of reg_tick.
	(REG_IN_TABLE): Likewise.  Use throughout instead of reg_in_table.
	(REG_QTY): Likewise.  Use throughout instead of reg_qty.
	(get_cse_reg_info): New function.
	(free_cse_reg_info): Likewise.
	(new_basic_block): Reinitialize cse_reg_info_tree instead of
	reg_tick, all_minus_one, and consec_ints.
	* Makefile.in (cse.o): Depend on splay-tree.h
	* splay-tree.h (splay_tree_compare_ints): Declare.
	* splay-tree.c (splay_tree_compare_ints): Define.

From-SVN: r26069
1999-03-30 20:52:33 +00:00
Tom Tromey
4cc48683f6 cplus-dem.c (consume_count): If `count' wraps, return 0 and don't advance input pointer.
* cplus-dem.c (consume_count): If `count' wraps, return 0 and
	don't advance input pointer.
	(demangle_class_name): If consume_count didn't find a count, do
	nothing.  Don't bother with `strlen' sanity check; consume_count
	does it for us.

From-SVN: r26068
1999-03-30 16:12:25 +00:00
Mumit Khan
89f602a793 pexecute.c (__CYGWIN32__): Rename to
* pexecute.c (__CYGWIN32__): Rename to
        (__CYGWIN__): this.
        * xmalloc.c: Likewise.
        Changes to support i386-pc-uwin.
        * configure.in (*-*-uwin*): Workaround for vfork bug.
        * configure: Regenerate.
        * pexecute.c (pexecute): Be like standard Unix.
        (pwait): Likewise.
        * xmalloc.c (first_break): Define.
        (xmalloc_set_program_name): Use.
        (xmalloc): Use.

From-SVN: r25694
1999-03-10 17:32:50 -07:00
Franz Sirl
222ccb597f config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc
H
        * config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc

From-SVN: r25689
1999-03-10 17:10:20 -07:00
Franz Sirl
9346c8240e config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc
�
        * config.table: Cleanup and add mh-*pic handling for alpha, arm, powerpc

From-SVN: r25688
1999-03-10 17:10:19 -07:00
Dave Brolley
8ec65f13b0 Makefile.in: Change mkstemp -> mkstemps.
Tue Feb  9 16:39:01 1999  Dave Brolley  <brolley@cygnus.com>
	* Makefile.in: Change mkstemp -> mkstemps.

From-SVN: r25110
1999-02-09 08:40:23 -05:00
Marc Espie
687361c834 Makefile.in (REQUIRED_OFILES): remove mkstemp.o
* Makefile.in (REQUIRED_OFILES): remove mkstemp.o
        * configure.in (funcs): Check for and conditionally add mkstemps to
        the list of functions libiberty will provide.
        * configure: Rebuilt.

From-SVN: r25106
1999-02-08 17:17:32 -07:00
Mumit Khan
b207e09ce5 clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on platforms that don't have HZ.
* clock.c (HZ): Define in terms of (ISO C) CLOCKS_PER_SEC on
        platforms that don't have HZ.
        * getruntime.c (HZ): Likewise.

From-SVN: r24993
1999-02-02 16:05:16 -07:00
Richard Henderson
16b4c15e6a * Makefile.in (xstrdup.o): Depend on config.h.
From-SVN: r24921
1999-01-30 05:28:44 -08:00
Ulrich Drepper
38beb75c54 * cplus-dem.c (mop_up): Set work->previous_argument to NULL after freeing it.
From-SVN: r24664
1999-01-14 12:09:46 +00:00
Ulrich Drepper
2363489cfd (mop_up): Set work->previous_argument to NULL after freeing it.
From-SVN: r24663
1999-01-14 12:09:01 +00:00
Michael Meissner
fb9939b8f8 random.c (NULL): Don't redefine NULL if it is already defined.
1998-12-30  Michael Meissner  <meissner@cygnus.com>
        * random.c (NULL): Don't redefine NULL if it is already defined.

From-SVN: r24659
1999-01-13 14:38:14 -07:00
Kaveh R. Ghazi
7e4311a31b * xstrdup.c (xstrdup): Switch from strcpy to memcpy for speed.
From-SVN: r24651
1999-01-13 11:30:56 +00:00
Jeff Law
0cd4357773 More address fixes
From-SVN: r24644
1999-01-12 12:09:02 -07:00
Jeff Law
2892309926 More address fixes.
From-SVN: r24618
1999-01-11 07:06:22 -07:00
Jeff Law
916a8c46b9 Update FSF address in copyright header.
From-SVN: r24617
1999-01-11 06:53:51 -07:00
Kaveh R. Ghazi
087aa39894 Warning fixes:
* argv.c (buildargv): Cast the result of alloca in assignment.
        * choose-temp.c: Include stdlib.h.
        * cplus-dem.c (demangle_arm_pt): Remove unused prototype.
        (snarf_numeric_literal): Constify first parameter.
        (code_for_qualifier): Avoid a gcc extension, make the parameter an
        int, not a char.
        (demangle_qualifier): Likewise.
        (demangle_signature): Cast the argument of a ctype function to
        unsigned char.
        (arm_pt): Add parens around assignment used as truth value.
        (demangle_arm_hp_template): Constify variable `args'.
        (do_hpacc_template_const_value): Cast the argument of a ctype
        function to unsigned char.
        (do_hpacc_template_literal): Remove unused variable `i'.
        (snarf_numeric_literal): Constify parameter `args'.
        Cast the argument of a ctype function to unsigned char.
        * floatformat.c (floatformat_to_double): Add explicit braces to
        avoid ambiguous `else'.
        * fnmatch.c (fnmatch): Change type of variables `c', `c1',
        `cstart' and `cend' to unsigned char.  Cast the argument of macro
        `FOLD', which uses ctype functions, to unsigned char.
        * objalloc.c (free): Add prototype.

From-SVN: r24392
1998-12-22 06:57:17 +00:00
Hans-Peter Nilsson
21f2174d55 * Makefile.in (CFILES): Fix typo: splay-tree.c, not splay-tree.o
From-SVN: r24388
1998-12-20 22:57:18 -07:00
Andrew MacLeod
e8fc822288 cplus-dem.c (demangle_fund_type): Process CV and u codes before bumping the pointer we read from.
Fri Dec 18 16:11:43 EST 1998  Andrew MacLeod  <amacleod@cygnus.com>
	* cplus-dem.c (demangle_fund_type): Process CV and u codes before
	bumping the pointer we read from. Also prepend these codes,
	as we do in other places.

From-SVN: r24374
1998-12-18 13:16:13 +00:00
Kaveh R. Ghazi
11a0bb74cd choose-temp.c: Don't check IN_GCC anymore.
* choose-temp.c: Don't check IN_GCC anymore.
        * floatformat.c (floatformat_from_double): Use `const', not `CONST'.
        * memchr.c (memchr): Likewise.
        * memcpy.c (memcpy): Likewise.
        * memmove.c (memmove): Likewise.
        * mkstemp.c: Don't check IN_GCC anymore.
        * pexecute.c: Likewise.
        * splay-tree.c: Likewise.
        * strchr.c (strchr): Use `const', not `CONST'.
        * strrchr.c (strrchr): Likewise.
        * strtol.c (strtol): Likewise.
        * strtoul.c (strtoul): Likewise.

From-SVN: r24307
1998-12-14 07:01:03 +00:00
David Taylor
70d5ccef06 * HP aCC demangling support.
* cplus-dem.c
        (main): Remove default to HP style demangling, set to EDG
        demangling correctly when -edg specified; set the demangling style
        when user specifies 'edg'. Set strip_underscore to
        prepends_underscore, if not HPUXHPPA.  Set
        current_demangling_style to hp_demangling if HPUXHPPA.  Set
        current demangling style correctly if the switch is hp.  Read
        label correctly also in the HP style case.
        (work_stuff): add temp_start field; add field for volatile member
        function.
        (arm_pt): handle ARM_DEMANGLING and EDG_DEMANGLING styles; HP
        style for this case is the same as ARM.
        (demangle_args): handle EDG_DEMANGLING style; support HP style.
        (demangle_arm_hp_template): new function. (It was
        demangle_arm_pt.); check and set value of temp_start field in
        multiple places. Also, when ceching for end of template args,
        check to see if at end of static member of template class.
        (demangle_class): new local variable : save_class_name_end Don't
        include template args in string defining class.
        (demangle_class_name): use demangel_arm_hp_template.
        (demangle_function_name): handle case where demangling style is
        HP_DEMANGLING and currently point at an 'X' in the mangled name.
        Handle EDG_DEMANGLING style.  Handle constructor and destructor
        ops for HP style.
        (demangle_prefix): handle EDG_DEMANGLING and ARM_DEMANGLING
        styles.  global destructor and constructor for HP style are same
        as for ARM style. Same for local variables.
        (demangle_qualified): handle EDG_DEMANGLING style.
        (demangle_signature): add case for volatile member function.  For
        cases '1' - '9' : initialize the temp_start field to -1 and handle
        the EDG_DEMANGLING style.  for case 'F' : handle EDG_DEMANGLING
        and AUTO_DEMANGLING styles.  If expecting a function and managed
        to demangle the funct args, then handle the LUCID_DEMANGLING,
        ARM_DEMANGLING, and EDG_DEMANGLING styles.  Add case for local
        class name after "Lnnn_ in HP style case. HP style too needs to
        forget types.  _nnn is OK for HP style, so don't report failure.
        (do_hpacc_template_const_value): new function. Handle template's
        value param for HP/aCC.
        (do_hpacc_template_literal): new function.  Handle a template's
        literal parameter for HP aCC.
        (recursively_demangle): new function
        (snarf_numeric_literal): new function.
        (usage): add 'edg' to the list of demangling styles; add hp switch
        to message.

Co-Authored-By: Andrew MacLeod <amacleod@cygnus.com>
Co-Authored-By: Edith Epstein <eepstein@cygnus.com>
Co-Authored-By: Elena Zannoni <ezannoni@cygnus.com>
Co-Authored-By: Satish Pai <pai@apollo.hp.com>
Co-Authored-By: Stan Shebs <shebs@cygnus.com>

From-SVN: r24170
1998-12-07 15:21:45 -07:00
Christopher Faylor
8d525fa8a7 * pexecute.c: Remove obsolete ifdefed cygwin code.
From-SVN: r24084
1998-12-03 18:21:00 -07:00
Kaveh R. Ghazi
9b1a92d882 choose-temp.c: Always include libiberty.h.
* choose-temp.c: Always include libiberty.h.  Avoid redundancies.
        * cplus-dem.c: Likewise.  Conform to libiberty.h.
        * pexecute.c: Likewise.
        * splay-tree.c: Likewise.

From-SVN: r23935
1998-11-27 10:28:57 +00:00
Mike Stump
c85c32322e * Makefile.in (splay-tree.o): Add config.h dependency.
From-SVN: r23873
1998-11-25 11:02:19 -07:00
Kaveh R. Ghazi
35a6cd99b0 * configure.in: Use AC_PREREQ(2.12.1).
From-SVN: r23804
1998-11-23 14:01:42 +00:00
Benjamin Kosnik
6e6e34b7a8 cplus-dem.c (demangle_fund_type): Add demangling for C9x types.
�
1998-11-16  Benjamin Kosnik  <bkoz@haight.constant.com>
        * cplus-dem.c (demangle_fund_type): Add demangling for C9x types.

From-SVN: r23799
1998-11-23 12:12:03 +00:00
Jeffrey A Law
59b67c1143 * mpw.c (mpw_access): Add missing parens.
From-SVN: r23726
1998-11-19 14:17:54 -07:00
Geoffrey Noer
dd8f3ed555 configure.in: detect cygwin* instead of cygwin32*
* configure.in: detect cygwin* instead of cygwin32*
  	* configure: regenerate
  	* configure.in: in comment, call AC_EXEEXT instead of AM_EXEEXT

From-SVN: r23725
1998-11-19 14:16:49 -07:00
Kaveh R. Ghazi
a6458d1ddd configure.in: Call AC_HEADER_SYS_WAIT.
* configure.in: Call AC_HEADER_SYS_WAIT.
        * pexecute.c: Include sys/wait.h when !IN_GCC.

From-SVN: r23711
1998-11-19 10:05:03 +00:00
Kaveh Ghazi
9f3b55830c Regenerate config.in (accidentally omitted from last patch.)
From-SVN: r23700
1998-11-18 19:49:11 +00:00
Kaveh R. Ghazi
a9acf74156 configure.in: Check for calloc.
* configure.in: Check for calloc.
        * calloc.c: New file.
        * xmalloc.c (xcalloc): New function.

From-SVN: r23642
1998-11-13 16:36:04 +00:00
Andrew MacLeod
a49fb37af2 cplus-dem.c (demangle_prefix): Use the last __ in the mangled name when looking for the signature.
* cplus-dem.c (demangle_prefix): Use the last __
in the mangled name when looking for the signature. This allows
template names to begin with __.

From-SVN: r23627
1998-11-13 05:55:40 +00:00
Mark Mitchell
ec2288ffe0 cplus-dem.c (type_kind_t): Add tk_reference.
* cplus-dem.c (type_kind_t): Add tk_reference.
	(demangle_template_value_parm): Handle it.
	(do_type): Use it for references, instead of tk_pointer.

From-SVN: r23572
1998-11-08 13:20:53 +00:00
Mark Mitchell
0e714131c8 cplus-dem.c (demangle_template_value_parm): Use cplus_demangle, not internal_cplus_demangle.
* cplus-dem.c (demangle_template_value_parm): Use cplus_demangle,
	not internal_cplus_demangle.

From-SVN: r23570
1998-11-08 13:13:03 +00:00
Kaveh R. Ghazi
2931b6d47f choose-temp.c: Don't include gansidecl.h.
* choose-temp.c: Don't include gansidecl.h.
        * mkstemp.c: Likewise.
        * pexecute.c: Likewise.

From-SVN: r23560
1998-11-07 13:03:59 +00:00
Kaveh R. Ghazi
c5f7c4459e pexecute.c: Check HAVE_CONFIG_H, not IN_GCC, when determining whether to include config.h.
* pexecute.c: Check HAVE_CONFIG_H, not IN_GCC, when determining
        whether to include config.h.  Possibly include unistd.h in the
        !IN_GCC case.  Define VFORK_STRING as a printable function call
        for error messages (either "vfork" or "fork".)  If HAVE_VFORK_H is
        defined, include vfork.h.  If VMS is defined, define vfork()
        appropriately.  Remove vfork check on USG, we're using autoconf.
        (pexecute): Set `errmsg_fmt' to VFORK_STRING instead of checking
        locally what string to use.

From-SVN: r23499
1998-11-02 07:24:47 +00:00
Mark Mitchell
ad3ef78e25 splay-tree.c: Tweak include directives to make sure declarations of xmalloc and free are...
* splay-tree.c: Tweak include directives to make sure declarations of
	xmalloc and free are available.

From-SVN: r23358
1998-10-26 23:24:48 +00:00
Mark Mitchell
224301c1b9 cplus-dem.c (gnu_special): Fix handling of virtual tables in anonymous namespaces.
* cplus-dem.c (gnu_special): Fix handling of virtual tables in
	anonymous namespaces.

From-SVN: r23324
1998-10-25 23:10:09 +00:00
Mark Mitchell
d9db46fd48 cplus-dem.c (work_stuff): Replace const_type and volatile_type with type_quals.
* cplus-dem.c (work_stuff): Replace const_type and volatile_type
	with type_quals.
	(TYPE_UNQUALIFIED): New macro.
	(TYPE_QUAL_CONST): Likewise.
	(TYPE_QUAL_VOLATILE): Likewise.
	(TYPE_QUAL_RESTRICT): Likewise.
	(code_for_qualifier): New function.
	(qualifier_string): Likewise.
	(demangle_qualifier): Likewise.
	(internal_cplus_demangle): Use them.
	(demangle_signature): Likewise.
	(demangle_template_value_parm): Likewise.
	(do_type): Likewise.
	(demangle_fund_type)): Likewise.

From-SVN: r23260
1998-10-23 16:36:15 +00:00
Mark Mitchell
91063b5138 cplus-dem.c (work_stuff): Replace const_type and volatile_type with type_quals.
* cplus-dem.c (work_stuff): Replace const_type and volatile_type
	with type_quals.
	(TYPE_UNQUALIFIED): New macro.
	(TYPE_QUAL_CONST): Likewise.
	(TYPE_QUAL_VOLATILE): Likewise.
	(TYPE_QUAL_RESTRICT): Likewise.
	(code_for_qualifier): New function.
	(qualifier_string): Likewise.
	(demangle_qualifier): Likewise.
	(internal_cplus_demangle): Use them.
	(demangle_signature): Likewise.
	(demangle_template_value_parm): Likewise.
	(do_type): Likewise.
	(demangle_fund_type)): Likewise.
	* Makefile.in (hash.h): Run gperf when necessary.
	* cp-tree.h (CP_TYPE_READONLY): Remove.
	(CP_TYPE_VOLATILE): Likewise.
	(CP_TYPE_QUALS): New macro.
	(CP_TYPE_CONST_P): Likewise.
	(CP_TYPE_VOLATILE_P): Likewise.
	(CP_TYPE_RESTRICT_P): Likewise.
	(CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.
	(c_apply_type_quals_to_decl): Declare.
	(SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
	(SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
	(cp_type_qual_from_rid): New function.
	(compparms): Remove unused parameter.  All callers changed.
	(cp_type_quals): New function.
	(at_least_as_qualified_p): Likewise.
	(more_qualified_p): Likewise.
	* call.c (standard_conversion): Replace calls to
	cp_build_type_variant with cp_build_qualified_type.  Use
	CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
	compare them.  Use CP_TYPE_* macros to check qualifiers.
	(reference_binding): Likewise.
	(implicit_conversion): Likewise.
	(add_builtin_candidates): Likewise.
	(build_over_call): Likewise.
	* class.c (overrides): Compare all qualifiers, not just `const',
	on method declarations.
	* cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
	(convert_pointer_to_real): Likewise.
	(type_promotes_to): Likewise.
	* decl.c (check_for_uninitialized_const_var): New function.
	(init_decl_processing): More CP_TYPE_QUALS conversion, etc.
	(cp_finish_decl): Use check_for_uninitialized_const_var.
	(grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
	handle `restrict'.
	(grok_ctor_properties): Likewise.
	(grok_op_properties): Likewise.
	(start_function): Likewise.
	(rever_static_member_fn): Likewise.
	* decl2.c (grok_method_quals): Likewise.
	(grokfield): Likewise.
	* error.c (dump_readonly_or_volatile): Rename to ...
	(dump_qualifiers): New function.  Handle `restrict'.
	(dump_type_real): Use it.
	(dump_aggr_type): Likewise.
	(dump_type_prefix): Likewise.
	(dump_type_suffix): Likewise.
	(dump_function_decl): Likewise.
	(cv_as_string): Likewise.
	* gxx.gperf: Add __restrict and __restrict__.
	* gxxint.texi: Document `u' as used for `__restrict', and a few
	other previously undocumented codes.
	* hash.h: Regenerated.
	* init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
	(build_member_call): Likewise.
	(build_new_1): Likewise.
	* lex.c (init_parse): Add entry for RID_RESTRICT.
	(cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
	(cp_type_qual_from_rid): Define.
	* lex.h (enum rid): Add RID_RESTRICT.
	* method.c (process_modifiers): Deal with `restrict'.
	* parse.y (primary): More CP_TYPE_QUALS conversion, etc.
	* parse.c: Regenerated.
	* pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
	(tsubst_aggr_type): Likewise.
	(tsubst): Likewise.
	(check_cv_quals_for_unify): Likewise.
	(unify): Likewise.
	* rtti.c (init_rtti_processing): Likewise.
	(build_headof): Likewise.
	(get_tinfo_var): Likewise.
	(buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
	(expand_class_desc): Likewise.
	(expand_attr_desc): Likewise.
	(synthesize_tinfo_fn): Likewise.
	* search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
	(get_matching_virtual): Likewise.
	(expand_upcast_fixups): Likewise.
	* sig.c (build_signature_pointer_or_reference_name): Take
	type_quals, not constp and volatilep.
	(build_signature_pointer_or_reference_type): Likewise.
	(match_method_types): More CP_TYPE_QUALS conversion, etc.
	(build_signature_pointer_constructor): Likewise.
	(build_signature_method_call): Likewise.
	* tree.c (build_cplus_array_type): Likewise.
	(cp_build_type_variant): Rename to ...
	(cp_build_qualified_type): New function.  Deal with `__restrict'.
	(canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
	(build_exception_variant): Likewise.
	(mapcar): Likewise.
	* typeck.c (qualif_type): Likewise.
	(common_type): Likewise.
	(comptypes): Likewise.
	(comp_cv_target_types): Likewise.
	(at_least_as_qualified_p): Define.
	(more_qualified_p): Likewise.
	(comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
	(compparms): Likewise.
	(inline_conversion): Likewise.
	(string_conv_p): Likewise.
	(build_component_ref): Likewise.
	(build_indirect_ref): Likewise.
	(build_array_ref): Likewise.
	(build_unary_op): Likewise.
	(build_conditional_expr): Likewise.
	(build_static_cast): Likewise.
	(build_c_cast): Likewise.
	(build_modify_expr): Likewise.
	(convert_For_assignment): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(cp_type_quals): New function.

From-SVN: r23258
1998-10-23 14:53:28 +00:00
Kaveh R. Ghazi
b056ad1c68 splay-tree.c (splay_tree_foreach_helper): Make definition static to match prototype.
* splay-tree.c (splay_tree_foreach_helper): Make definition static
        to match prototype.

From-SVN: r23230
1998-10-22 17:00:43 +00:00
Mark Mitchell
ed87f9c827 splay-tree.c: New file.
* splay-tree.c: New file.
	* Makefile.in (CFILES): Add it.
	(REQUIRED_OFILES): Likewise.
	(splay-tree.o): Add dependencies.

From-SVN: r23210
1998-10-21 09:19:13 +00:00
Andreas Schwab
e0c13971df cplus-dem.c (demangle_qualified): Fix off-by-one when checking range of 'K' index.
Tue Oct 20 12:29:02 1998  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
        * cplus-dem.c (demangle_qualified): Fix off-by-one when checking
        range of 'K' index.

From-SVN: r23202
1998-10-20 12:30:45 +00:00
Kaveh R. Ghazi
91e0f659c9 Warning fixes:
* choose-temp.c: Prototype mkstemps() when IN_GCC.
        * cplus-dem.c (consume_count): Cast argument of ctype macro to
        `unsigned char'.
        (cplus_demangle_opname): Cast the result of `strlen' to (int) when
        comparing against one.
        (cplus_mangle_opname): Likewise.
        (demangle_integral_value): Cast argument of ctype macro to
        `unsigned char'.
        (demangle_template_value_parm): Likewise.
        (demangle_template): Initialize variable `bindex'.  Cast the
        result of `strlen' to (int) when comparing against one.  Remove
        unused variable `start_of_value_parm'.
        (demangle_class_name): Cast the result of `strlen' to (int) when
        comparing against one.
        (demangle_prefix): Cast argument of ctype macro to `unsigned char'.
        (gnu_special): Likewise.  Cast the result of `strlen' to (int)
        when comparing against one.
        (demangle_qualified): Cast argument of ctype macro to `unsigned char'.
        (get_count): Likewise.
        (do_type): Likewise.  Cast the result of `strlen' to (int) when
        comparing against one.
        (demangle_fund_type): Cast argument of ctype macro to `unsigned char'.
        (demangle_function_name): Cast the result of `strlen' to (int)
        when comparing against one.
        * mkstemp.c (mkstemps): Cast variable `len' to (int) when
        comparing against one.

From-SVN: r23113
1998-10-15 15:55:04 +00:00
Jeffrey A Law
ae76f1bedd mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
* mkstemp.c: Check HAVE_SYS_TIME_H before including sys/time.h
        * configure.in (AC_CHECK_HEADERS): Check for sys/time.h too.
        * config.in, configure: Rebuilt.

From-SVN: r23067
1998-10-13 17:08:18 -06:00
Jeffrey A Law
73aeb2ff9b getopt.c: Check HAVE_STRINGS_H before including strings.h.
* getopt.c: Check HAVE_STRINGS_H before including strings.h.
        * configure.in (AC_CHECK_HEADERS): Check for strings.h too.
        * config.in, configure: Rebuilt.

From-SVN: r23065
1998-10-13 16:59:40 -06:00
Michael Tiemann
f77d841359 Fix parallel make problem.
* Makefile.in (cplus-dem.o, obstack.o): Depend upon config.h.

From-SVN: r23029
1998-10-12 10:45:24 -07:00
Jeff Law
ca6b370dc8 Thu Oct 8 23:42:08 1998 Jeffrey A Law (law@cygnus.com)
* Merge egcs & devo libiberty.

From-SVN: r22941
1998-10-08 16:48:52 -06:00
Martin v. Löwis
ab4856b150 * cplus-dem.c (demangle_arm_pt): Demangle anonymous namespaces.
From-SVN: r22335
1998-09-08 14:33:57 -04:00
Kaveh R. Ghazi
96e88994f8 mkstemp.c: Include config.h even when not IN_GCC.
* mkstemp.c: Include config.h even when not IN_GCC.  Wrap header
       inclusions inside HAVE_*_H macros.  Include ansidecl.h when not
       IN_GCC.
       * vasprintf.c: Include stdarg.h/varargs.h first.
       * vprintf.c: Likewise.

From-SVN: r22314
1998-09-07 20:37:13 +00:00
Jeffrey A Law
f45da49cd6 pexecute.c: Updates from gcc.
* pexecute.c: Updates from gcc.  Copy in gcc has been removed.  This
        is the canonical copy.  Define ISSPACE if !IN_GCC.
        * alloca.c, vfprintf.c, choose-temp.c, mkstemp.c, getopt.c: Similarly.
        * getopt1.c, obstack.c: Similarly.
        * Makefile.in: Build mkstemp.o

From-SVN: r22259
1998-09-05 06:24:41 -06:00
Jeffrey A Law
7520c31b2d pexecute.c: Updates from gcc.
* pexecute.c: Updates from gcc.  Copy in gcc has been removed.  This
        is the canonical copy.  Define ISSPACE if !IN_GCC.
        * alloca.c, vfprintf.c, choose-temp.c, mkstemp.c, getopt.c: Similarly.
        * getopt1.c: Similarly.
        * Makefile.in: Build mkstemp.o

From-SVN: r22257
1998-09-05 06:10:25 -06:00
Jeffrey A Law
16ba4214ee pexecute.c: Updates from gcc.
* pexecute.c: Updates from gcc.  Copy in gcc has been removed.  This
        is the canonical copy.  Define ISSPACE if !IN_GCC.
        * alloca.c, vfprintf.c, choose-temp.c, mkstemp.c: Similarly.
        * Makefile.in: Build mkstemp.o

From-SVN: r22252
1998-09-05 05:09:09 -06:00
Jeff Law
29382d668f pexecute.c: Updates from gcc.
* pexecute.c: Updates from gcc.  Copy in gcc has been removed.  This
        is the canonical copy.  Define ISSPACE if !IN_GCC.
        * alloca.c, vfprintf.c: Similarly.

From-SVN: r22249
1998-09-05 04:42:19 -06:00
Jeffrey A Law
3f3726a3fe pexecute.c: Updates from gcc.
* pexecute.c: Updates from gcc.  Copy in gcc has been removed.  This
        is the canonical copy.  Define ISSPACE if !IN_GCC.

From-SVN: r22243
1998-09-04 20:26:35 -06:00
Mumit Khan
9b559a2720 cplus-dem.c (work_stuff): Add dllimported.
x
	* cplus-dem.c (work_stuff): Add dllimported.
	(demangled_prefix): Mark symbols imported from PE DLL.
	(internal_cplus_demangled): Handle.

From-SVN: r21852
1998-08-19 07:05:52 -06:00
Mumit Khan
28235a5ca8 cplus-dem.c (work_stuff): Add dllimported.
�
	* cplus-dem.c (work_stuff): Add dllimported.
	(demangled_prefix): Mark symbols imported from PE DLL.
	(internal_cplus_demangled): Handle.

From-SVN: r21851
1998-08-19 07:05:50 -06:00
Jason Merrill
09007174da tweak
From-SVN: r21799
1998-08-17 14:46:03 -04:00
Jason Merrill
5210f3d05f cplus-dem.c (do_type): Fix simple array handling.
* cplus-dem.c (do_type): Fix simple array handling.  If we fail,
	stay failed.

From-SVN: r21798
1998-08-17 14:39:16 -04:00
Kaveh R. Ghazi
a782562574 cplus-dem.c: Include config.h if it exists.
* cplus-dem.c: Include config.h if it exists.  Also, only
        prototype malloc/realloc if we can't get stdlib.h.

From-SVN: r21787
1998-08-17 05:42:54 -06:00
Mark Mitchell
4d17a06f32 cplus-dem.c (type_kind_t): New type.
* cplus-dem.c (type_kind_t): New type.
	(demangle_template_value_parm): Add type_kind_t parameter.  Rely
	on this paramter, rather than demangling the type again.
	(demangle_integral_value): Pass tk_integral.
	(demangle_template_: Pass the value returned from do_type.
	(do_type): Return a type_kind_t.  Pass tk_integral to
	demangle_template_value_parm for array bounds.
	(demangle_fund_type): Likewise.

From-SVN: r21434
1998-07-28 11:45:32 +00:00
Kaveh R. Ghazi
d94f5c58a8 This fixes a problem when using KNR compilers.
* cplus-dem.c (demangle_nested_args): Make function definition
        static to match the prototype.

From-SVN: r21281
1998-07-19 05:28:57 +00:00
Jason Merrill
4d59ab3fda tweak formatting
From-SVN: r21145
1998-07-14 12:16:52 -04:00
Mark Mitchell
8a2a7ea294 Update entry for last change to include more details.
From-SVN: r21102
1998-07-13 10:55:11 +00:00
Mark Mitchell
9923cc566f cplus-dem.c: Incorporate changes from GCC version not present in the libiberty version.
* cplus-dem.c: Incorporate changes from GCC version not present in
	the libiberty version.

From-SVN: r21101
1998-07-13 10:54:01 +00:00
Mumit Khan
6391b50a28 * configure.in (checkfuncs): Add missing "'".
From-SVN: r20144
1998-05-30 17:19:36 -06:00
Andreas Schwab
10c62dce04 * Makefile.in (distclean): Don't remove alloca-conf.h
From-SVN: r19987
1998-05-23 16:32:53 -06:00
Hans-Peter Nilsson
911c3b7d7c cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767.
�
        * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767.

From-SVN: r19945
1998-05-21 18:39:52 -06:00
Hans-Peter Nilsson
75f6bf44da cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767.
�
        * cplus-dem.c (MBUF_SIZE): Bumped from 512 to 32767.

From-SVN: r19944
1998-05-21 18:39:51 -06:00
Mike Stump
7b195f77b7 Makefile.in: Add a dependency on stamp-picdir for the objects...
* Makefile.in: Add a dependency on stamp-picdir for the
        objects, so that we can do a parallel build.

From-SVN: r19942
1998-05-21 18:20:51 -06:00
Mark Mitchell
1cc7529801 * cplus-dem.c (do_type): Handle volatile qualification.
From-SVN: r19932
1998-05-21 15:22:54 +00:00
Manfred Hollstein
39d6585022 configure.in: Check for unistd.h as well.
�
	* configure.in: Check for unistd.h as well.
	* configure: Rebuild.
	* config.in: Rebuild.
	* getpagesize.c (GNU_OUR_PAGESIZE): Use sysconf only if _SC_PAGESIZE
	is defined in unistd.h. Reformat conditional block for easier reading.
	* config.table (shared): Default to no if ${enable_shared}
	is unset or empty; this logic is used by the toplevel
	configure scripts, too.

From-SVN: r19925
1998-05-21 07:52:43 +00:00
Manfred Hollstein
b9256371fa configure.in: Check for unistd.h as well.
0
	* configure.in: Check for unistd.h as well.
	* configure: Rebuild.
	* config.in: Rebuild.
	* getpagesize.c (GNU_OUR_PAGESIZE): Use sysconf only if _SC_PAGESIZE
	is defined in unistd.h. Reformat conditional block for easier reading.
	* config.table (shared): Default to no if ${enable_shared}
	is unset or empty; this logic is used by the toplevel
	configure scripts, too.

From-SVN: r19924
1998-05-21 07:52:41 +00:00
Manfred Hollstein
3fe97d74ad configure.in: Check for unistd.h as well.
�
	* configure.in: Check for unistd.h as well.
	* configure: Rebuild.
	* config.in: Rebuild.
	* getpagesize.c (GNU_OUR_PAGESIZE): Use sysconf only if _SC_PAGESIZE
	is defined in unistd.h. Reformat conditional block for easier reading.
	* config.table (shared): Default to no if ${enable_shared}
	is unset or empty; this logic is used by the toplevel
	configure scripts, too.

From-SVN: r19923
1998-05-21 07:52:38 +00:00
Jeffrey A Law
c295379590 config.table: Add line to set enable_shared in the Makefile as needed.
* config.table: Add line to set enable_shared in the Makefile
        as needed.

From-SVN: r19805
1998-05-16 07:02:37 -06:00
Jeff Law
0bc0cd11e7 Initial revision
From-SVN: r19799
1998-05-16 00:20:36 -06:00
Jeff Law
3affd5f0f4 Update from Cygnus libiberty.
libiberty uses autoconf now.

From-SVN: r19791
1998-05-15 17:42:58 -06:00
Jeff Law
fe806bddb8 This commit was generated by cvs2svn to compensate for changes in r19789,
which included commits to RCS files with non-trunk default branches.

From-SVN: r19790
1998-05-15 17:21:05 -06:00
Peter Schauer
63586755e5 cplus-dem.c (cplus_demangle_opname): Initialize work.
* cplus-dem.c (cplus_demangle_opname):  Initialize work.
Bring over from devo.

From-SVN: r19787
1998-05-15 17:02:07 -06:00
Kaveh R. Ghazi
d6f4ec5199 Warning fixes:
* Makefile.in (c-lang.o): Depend on c-tree.h, c-lex.h and toplev.h.
	(c-lex.o): Depend on output.h.
	(c-common.o): Likewise.
	(stmt.o): Likewise.
	(calls.o): Likewise.
	(integrate.o): Depend on toplev.h.
	(regclass.o): Depend on output.h.
	(final.o): Depend on reload.h.
	* c-common.c: Include output.h.
	(check_format_info): Remove unused variable `integral_format'.
	* c-decl.c (print_lang_decl): Mark parameters `file', `node' and
	`indent' with ATTRIBUTE_UNUSED.
	(print_lang_type): Likewise.
	(maybe_build_cleanup): Likewise for parameter `decl'.
	(copy_lang_decl): Likewise for parameter `node'.
	* c-lang.c: Include c-tree.h, c-lex.h and toplev.h.
	(lang_print_xnode): Mark parameters `file', `node' and `indent'
 	with ATTRIBUTE_UNUSED.
	(lookup_interface): Likewise for parameter `arg'.
	(is_class_name): Likewise.
	(maybe_objc_check_decl): Likewise for parameter `decl'.
	(maybe_objc_comptypes): Likewise for parameters `lhs', `rhs' and
	`reflexive'.
	(maybe_objc_method_name): Likewise for parameter `decl'.
	(build_objc_string): Likewise for parameters `len' and `str'.
	* c-lex.c: Include output.h.
	* c-lex.h (position_after_white_space): Correct typo in prototype.
	* c-tree.h (finish_file, c_expand_start_cond, c_expand_start_else,
 	c_expand_end_cond, init_iterators): Add prototypes.
	* caller-save.c (set_reg_live): Mark parameters `reg' and `setter'
	with ATTRIBUTE_UNUSED.
	* calls.c: Include output.h.
	* cccp.c (pipe_closed): Mark parameter `signo' with
 	ATTRIBUTE_UNUSED.
	* combine.c: Move inclusion of expr.h to after insn-config.h.
	* iris6.h (ASM_IDENTIFY_GCC, ASM_IDENTIFY_LANGUAGE): Don't define
	as empty, rather define as ((void)0).
	* sparc.c (sparc_check_64): Add braces around ambiguous `else'.
	Add parentheses around assignment used as truth value.
	* cplus-dem.c (squangle_mop_up): Change return type to void.
	(internal_cplus_demangle): Remove unused parameter `options'.
	All callers changed.
	(cplus_demangle_opname): Remove function wide variable `int i' and
 	replace with `size_t i' at each location where it is used.
	(cplus_demangle_opname): change type of `i' from int to size_t.
	* cppexp.c (right_shift): Mark parameter `pfile' with
	ATTRIBUTE_UNUSED.
	* cpphash.c (cpp_lookup): Likewise.
	(cpp_hash_cleanup): Likewise.
	* cpplib.c (parse_name): Add a prototype and make it static.
	(null_underflow): Mark parameter `pfile' with ATTRIBUTE_UNUSED.
	(null_cleanup): Likewise for parameters `pbuf' and `pfile'.
	(macro_cleanup): Likewise for parameter `pfile'.
	(file_cleanup): Likewise.
	* cpplib.h (cpp_reader_init, cpp_options_init, cpp_start_read,
 	cpp_read_check_assertion, skip_rest_of_line): Add prototypes.
	* crtstuff.c (force_to_data, __CTOR_LIST__, force_to_data,
	__DTOR_END__, __FRAME_END__): Mark with ATTRIBUTE_UNUSED.
	* cse.c (cse_check_loop_start): Mark parameter `set' with
 	ATTRIBUTE_UNUSED.
	* dbxout.c (flag_minimal_debug, have_used_extensions,
	source_label_number): Move inside macro wrapper check against
	defined (DBX_DEBUGGING_INFO) || defined (XCOFF_DEBUGGING_INFO).
	* dwarf2out.c (gen_entry_point_die): Hide prototype and definition.
	* except.h (doing_eh): Provide prototype.
	* expr.c: Move inclusion of expr.h to after insn-config.h.
	* final.c: Include reload.h.
	(shorten_branches): Cast the first argument of bzero to char *.
	* fix-header.c (cpp_print_containing_files): Mark parameter
 	`pfile' with ATTRIBUTE_UNUSED.
	(cpp_fatal): Likewise.
	* flow.c (find_basic_blocks_1): Cast the first argument of bzero
	to char *.
	* genattrtab.c (make_length_attrs): Change the type of variable
	`i' from int to size_t.
	(zero_fn): Mark parameter `exp' with ATTRIBUTE_UNUSED.
	(one_fn): Likewise.
	* genextract.c (main): When generating insn-extract.c, mark
	variable `junk' with ATTRIBUTE_UNUSED.
	* gengenrtl.c (gencode): When generating genrtl.c, cast the first
	argument of bzero to char*.
	* integrate.c: Include toplev.h.
	* libgcc2.c: Wrap `struct exception_table' and
	`find_exception_handler' in macro DWARF2_UNWIND_INFO.
	* objc/Make-lang.in (objc-act.o): Depend on toplev.h.
	* objc/objc-act.c: Include toplev.h.
	(lang_print_xnode): Mark parameters `file', `node' and `indent'
	with ATTRIBUTE_UNUSED.
	(finish_protocol): Likewise for parameter `protocol'.
	* output.h (declare_weak): Add prototype.
	(decode_reg_name): Don't wrap with TREE_CODE macro.
	(assemble_alias): Add prototype.
	* regclass.c: Include output.h.
	* reload.h (reloads_conflict): Add prototype.
	* rtl.h (print_rtl_single, mark_elimiation, reg_class_subset_p,
	output_func_start_profiler): Add prototypes.
	* rtlanal.c (reg_set_p_1): Mark parameters `x' and `pat' with
 	ATTRIBUTE_UNUSED.
	* scan-decls.c: Include scan.h.
	* scan.h (recognized_function, recognized_extern): Add prototypes.
	* stmt.c: Include output.h.
	* toplev.c (error_for_asm, warning_for_asm): Remove prototypes.
	(output_lang_identify): Hide prototype and definition.
	(float_signal): Mark parameter `signo' with ATTRIBUTE_UNUSED.
	(pipe_closed): Likewise.
	* toplev.h (count_error, strip_off_ending, error_for_asm,
 	warning_for_asm): Add prototypes.

From-SVN: r19712
1998-05-13 12:40:39 +00:00
Jeff Law
38e012594e typo typo fixes fixes
From-SVN: r19601
1998-05-06 15:09:07 -06:00
Andrew MacLeod
0762341703 cplus-dem.c (demangle_qualified): Add a missing else which caused qualified...
cplus-dem.c (demangle_qualified): Add a missing else which caused
qualified names with temp,lates to be demangled improperly.

From-SVN: r19433
1998-04-27 12:59:51 +00:00
Andreas Schwab
7bf407413f cplus-dem.c (gnu_special): Fix off-by-one bug when checking the length in the name of a virtual table.
* cplus-dem.c (gnu_special): Fix off-by-one bug when checking the
	length in the name of a virtual table.

From-SVN: r19417
1998-04-26 11:41:36 -04:00
Andrew MacLeod
5e5199e86c cplus-dem.c: Add code to enable demangling of names produced with the -fsquangle option.
* cplus-dem.c:  Add code to enable demangling of names produced
                with the -fsquangle option.

From-SVN: r19371
1998-04-22 08:04:13 +00:00
Jeffrey A Law
9ee02b5c40 * cplus-dem.c: Sync with gcc.
From-SVN: r19077
1998-04-09 18:45:43 -06:00
Kaveh R. Ghazi
4cb1caaf7b Patched in the gcc directory:
* Makefile.in (choose-temp.o): Depend on system.h.
Patched in both the libiberty and gcc directories:
        * choose-temp.c: Include system.h when IN_GCC.

From-SVN: r18952
1998-04-02 11:07:45 +00:00
Mark Mitchell
f9c8545454 cplus-dem.c (optable): Add sizeof.
* cplus-dem.c (optable): Add sizeof.
	(demangle_template_value_parm): New function containing code
	previously found in demangle_template.
	(demangle_integral_value): New function which handles complicated
	integral expressions.
	(demangle_template): Use them.

From-SVN: r18930
1998-04-01 13:48:48 +00:00
Manfred Hollstein
0a9e7530d9 config.table: Make locating frag files failsafe even for the special case if...
* config.table: Make locating frag files failsafe even for the
	special case if configuring and building in srcdir.
	* configure.in: Make locating frag files failsafe even for the
	special case if configuring and building in srcdir.

From-SVN: r18410
1998-03-05 00:28:10 +00:00