Commit Graph

244 Commits

Author SHA1 Message Date
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