aboutsummaryrefslogtreecommitdiff
path: root/include/libiberty.h
AgeCommit message (Collapse)AuthorFilesLines
2017-07-18Fix spelling typos.Yuri Chornovian1-1/+1
2017-01-02Update year range in copyright notice of all files.Alan Modra1-1/+1
2016-08-02Synchronize libiberty sources with FSF GCC mainline version.Nick Clifton1-0/+11
include * libiberty.h (MAX_ALLOCA_SIZE): New macro. libiberty * make-relative-prefix.c (make_relative_prefix_1): Fall back to malloc if alloca argument is greater than MAX_ALLOCA_SIZE. * cp-demangle.c (cplus_demangle_operators): Add f[lrLR]. (d_expression_1): Handle them. (d_maybe_print_fold_expression): New. (d_print_comp_inner): Use it. (d_index_template_argument): Handle negative index. * cp-demangle.c (cplus_demangle_operators): Add sP and sZ. (d_print_comp_inner): Handle them. (d_template_args_1): Split out from d_template_args. (d_args_length): New. PR c++/70926 * cplus-dem.c: Handle large values and overflow when demangling length variables. (demangle_template_value_parm): Read only until end of mangled string. (do_hpacc_template_literal): Likewise. (do_type): Handle overflow when demangling array indices. * cp-demangle.c (cplus_demangle_print_callback): Avoid zero-length VLAs. PR c++/70498 * cp-demangle.c (d_expression_1): Formatting fix. * cplus-dem.c (enum type_kind_t): Add tk_rvalue_reference constant. (demangle_template_value_parm): Handle tk_rvalue_reference type kind. (do_type): Support 'O' type id (rvalue references). * testsuite/demangle-expected: Add tests. PR c++/70498 * cp-demangle.c: Parse numbers as integer instead of long to avoid overflow after sanity checks. Include <limits.h> if available. (INT_MAX): Define if necessary. (d_make_template_param): Takes integer argument instead of long. (d_make_function_param): Likewise. (d_append_num): Likewise. (d_identifier): Likewise. (d_number): Parse as and return integer. (d_compact_number): Handle overflow. (d_source_name): Change variable type to integer for parsed number. (d_java_resource): Likewise. (d_special_name): Likewise. (d_discriminator): Likewise. (d_unnamed_type): Likewise. * testsuite/demangle-expected: Add regression test cases. * configure: Remove SH5 support. PR c++/69687 * cplus-dem.c: Include <limits.h> if available. (INT_MAX): Define if necessary. (remember_type, remember_Ktype, register_Btype, string_need): Abort if we detect cases where we the size of the allocation would overflow. PR c++/70492 * cplus-dem.c (gnu_special): Handle case where consume_count returns -1. PR c++/67394 PR c++/70481 * cplus-dem.c (squangle_mop_up): Zero bsize/ksize after freeing btypevec/ktypevec. * testsuite/demangle-expected: Add coverage tests.
2016-01-05libiberty: {count,dup,write}argv: constify argv input slightlyMike Frysinger1-3/+3
Would be more useful if we could use "const char * const *", but there's a long standing bug where gcc warns about incompatible pointers when you try to pass in "char **". We can at least constify the array itself as gcc will not warn in that case.
2016-01-01Copyright update for binutilsAlan Modra1-1/+1
2015-06-24Sync libiberty from GCC, replaying updates to configure scriptsIain Buclaw1-1/+1
2015-01-14Merge include/libiberty.h from GCCJan-Benedict Glaw1-0/+32
This pulls in some missing prototypes and also adds corresponding entries to the ChangeLog file. Please note that for one function, strverscmp(), the ChangeLog entry was already there, but the actual prototype wasn't. These ChangeLog entries are added: 2014-10-28 Yury Gribov <y.gribov@samsung.com> * libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes. 2014-10-15 David Malcolm <dmalcolm@redhat.com> * libiberty.h (choose_tmpdir): New prototype.
2015-01-07Sync with gcc/libiberty.Richard Earnshaw1-0/+10
2015-01-02ChangeLog rotatation and copyright year updateAlan Modra1-2/+1
2014-10-11Sync libiberty with upstream GCC.Iain Buclaw1-1/+13
include/ChangeLog * libiberty.h (PEX_STDOUT_APPEND): New flag. (PEX_STDERR_APPEND): Likewise. * demangle.h (DMGL_DLANG): New macro. (DMGL_STYLE_MASK): Add DMGL_DLANG. (demangling_styles): Add dlang_demangling. (DLANG_DEMANGLING_STYLE_STRING): New macro. (DLANG_DEMANGLING): New macro. (dlang_demangle): New prototype. * longlong.h: Add __udiv_w_sdiv prototype. libiberty/ChangeLog * cp-demangle.c (d_substitution): Handle abi tags on abbreviation. * pex-common.h (struct pex_funcs): Add new parameter for open_write field. * pex-unix.c (pex_unix_open_write): Add support for new parameter. * pex-djgpp.c (pex_djgpp_open_write): Likewise. * pex-win32.c (pex_win32_open_write): Likewise. * pex-common.c (pex_run_in_environment): Likewise. * Makefile.in (CFILES): Add d-demangle.c. (REQUIRED_OFILES): Add d-demangle.o. * cplus-dem.c (libiberty_demanglers): Add dlang_demangling case. (cplus_demangle): Likewise. * d-demangle.c: New file. * testsuite/Makefile.in (really-check): Add check-d-demangle. * testsuite/d-demangle-expected: New file. * simple-object-elf.c (simple_object_elf_write_ehdr): Correctly handle objects with more than SHN_LORESERVE sections. (simple_object_elf_write_shdr): Add sh_link parameter. (simple_object_elf_write_to_file): Correctly handle objects with more than SHN_LORESERVE sections. * cp-demangle.c (d_dump): Only access field from s_fixed part of the union for DEMANGLE_COMPONENT_FIXED_TYPE. (d_count_templates_scopes): Likewise. * testsuite/demangler-fuzzer.c: New file. * testsuite/Makefile.in (fuzz-demangler): New rule. (demangler-fuzzer): Likewise. (mostlyclean): Clean up demangler fuzzer.
2014-01-21[PATCH] include * ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, ↵tromey1-3/+3
PARAMS) (VPARAMS, VA_START, VA_OPEN, VA_CLOSE, VA_FIXEDARG, CONST) (VOLATILE, SIGNED, PROTO, EXFUN, DEFUN, DEFUN_VOID, AND, DOTS) (NOARGS): Don't define. * libiberty.h (expandargv, writeargv): Don't use PARAMS. libiberty * _doprint.c (checkit): Use stdarg, not VA_* macros. * asprintf.c (asprintf): Use stdarg, not VA_* macros. * concat.c (concat_length, concat_copy, concat_copy2, concat) (reconcat): Use stdarg, not VA_* macros. * snprintf.c (snprintf): Use stdarg, not VA_* macros. * vasprintf.c (checkit): Use stdarg, not VA_* macros. * vsnprintf.c (checkit): Use stdarg, not VA_* macros. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@206881 138bc75d-0d04-0410-961f-82ee72b054a4
2013-11-082013-10-29 Marc Glisse <marc.glisse@inria.fr>glisse1-17/+17
PR tree-optimization/58689 include/ * ansidecl.h (ATTRIBUTE_RETURNS_NONNULL): New macro. * libiberty.h (basename, lbasename, dos_lbasename, unix_lbasename, concat_copy): Mark with attributes nonnull(1) and returns_nonnull. (concat, reconcat, concat_copy2, choose_temp_base, xstrerror, xmalloc, xrealloc, xcalloc, xstrdup, xstrndup, xmemdup, pex_init): Mark with attribute returns_nonnull. libiberty/ * concat.c: Remove note about xmalloc. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@204159 138bc75d-0d04-0410-961f-82ee72b054a4
2011-09-28merge from gccDJ Delorie1-0/+4
2011-07-22merge from gccDJ Delorie1-1/+4
2011-01-03merge from gccDJ Delorie1-1/+1
2010-10-06merge from gccDJ Delorie1-0/+3
2010-04-24merge from gccDJ Delorie1-0/+11
2009-07-25merge from gccDJ Delorie1-1/+1
2009-07-25merge from gccDJ Delorie1-1/+4
2008-06-24merge from gccDJ Delorie1-0/+8
2007-09-06merge from gccDJ Delorie1-2/+3
2007-05-08merge from gccDJ Delorie1-0/+4
2007-02-09merge from gccDJ Delorie1-27/+0
2007-01-31 include/Vladimir Prus1-0/+21
* libiberty.h (PEX_STDERR_TO_PIPE): New define. (PEX_BINARY_ERROR): New define. (pex_read_err): New function. libiberty/ * pex-common.h (struct pex_obj): New fields stderr_pipe and read_err. * pex-common.c (pex_init_common): Initialize stderr_pipe. (pex_run_in_environment): Add error checking for PEX_STDERR_TO_PIPE. Create a pipe for stderr if necessary. (pex_read_err): New. (pex_free): Close read_err. * pexecute.txh: Document changes. * functions.texi: Regenerated.
2006-11-30include:Joern Rennecke1-0/+7
2006-05-03 Andrew Stubbs <andrew.stubbs@st.com> J"orn Rennecke <joern.rennecke@st.com> PR driver/29931 * libiberty.h (make_relative_prefix_ignore_links): Declare. libiberty: 2006-05-03 Andrew Stubbs <andrew.stubbs@st.com> J"orn Rennecke <joern.rennecke@st.com> PR driver/29931 * make-relative-prefix.c (make_relative_prefix_1): New function, broken out of make_relative_prefix. Make link resolution dependent on new parameter. (make_relative_prefix): Use make_relative_prefix_1. (make_relative_prefix_ignore_links): New function.
2006-06-01merge from gccDJ Delorie1-0/+17
2006-04-12merge from gccDJ Delorie1-0/+41
2005-09-26 * libiberty.h (expandargv): New function.Mark Mitchell1-0/+3
* argv.c (safe-ctype.h): Include it. (ISBLANK): Remove. (stdio.h): Include. (buildargv): Use ISSPACE instead of ISBLANK. (expandargv): New function. * Makefile.in: Regenerated.
2005-06-21Index: include/ChangeLogGeoffrey Keating1-0/+5
2005-06-20 Geoffrey Keating <geoffk@apple.com> * libiberty.h (strverscmp): Prototype. Index: libiberty/ChangeLog 2005-06-20 Geoffrey Keating <geoffk@apple.com> * strverscmp.c: New. * Makefile.in (CFILES): Add strverscmp.c. (CONFIGURED_OFILES): Add strverscmp.o. (strverscmp.o): New rule. (stamp-functions): Add $(srcdir) to files in source directory. * configure.ac (funcs): Add strverscmp. (AC_CHECK_FUNCS): Add strverscmp. * configure: Regenerate. * functions.texi: Regenerate.
2005-06-06merge from gccDJ Delorie1-1/+1
2005-06-02merge from gccDJ Delorie1-3/+2
2005-05-28merge from gccDJ Delorie1-0/+10
2005-05-24merge from gccDJ Delorie1-1/+1
2005-05-12merge from gccDJ Delorie1-1/+4
2005-05-10Update the address and phone number of the FSF organizationNick Clifton1-2/+2
2005-04-26merge from gccDJ Delorie1-0/+6
2005-04-19merge from gccDJ Delorie1-5/+5
2005-04-16merge from gccDJ Delorie1-0/+6
2005-04-14merge from gccDJ Delorie1-3/+3
2005-04-11merge from gccDJ Delorie1-0/+8
2005-03-29merge from gccDJ Delorie1-1/+1
2005-03-29libiberty:Ian Lance Taylor1-1/+163
* pex-common.c: New file. * pex-one.c: New file. * pexecute.c: New file. * pex-common.h: Include <stdio.h>. (struct pex_obj): Define. (struct pex_funcs): Define. (pex_init_common): Declare. * pex-unix.c: Rewrite. * pex-win32.c: Rewrite. * pex-djgpp.c: Rewrite. * pex-msdos.c: Rewrite. * testsuite/text-pexecute.c: New file. * pexecute.txh: Rewrite. * configure.ac: Check for wait3 and wait4. Set CHECK to really-check rather than check-cplus-dem. * functions.texi: Rebuild. * Makefile.in: Rebuild dependencies. (CFILES): Add pexecute.c, pex-common.c, pex-one.c. (REQUIRED_OFILES): Add pexecute.o, pex-common.o, pex-one.o. * testsuite/Makefile.in (really-check): New target. (check-pexecute, test-pexecute): New targets. * configure: Rebuild. include: * libiberty.h: Include <stdio.h>. (PEX_RECORD_TIMES, PEX_USE_PIPES, PEX_SAVE_TEMPS): Define. (PEX_LAST, PEX_SEARCH, PEX_SUFFIX, PEX_STDERR_TO_STDOUT): Define. (PEX_BINARY_INPUT, PEX_BINARY_OUTPUT): Define. (pex_init, pex_run, pex_read_output): Declare. (pex_get_status, pex_get_times, pex_free, pex_one): Declare. (struct pex_time): Define.
2005-03-29 * libiberty.h (ffs): Declare, if necessary.Mark Mitchell1-0/+7
2005-03-27merge from gccDJ Delorie1-50/+48
2005-03-25merge from gccDJ Delorie1-0/+4
2005-03-23merge from gccDJ Delorie1-1/+1
2005-03-10merge from gccDJ Delorie1-0/+9
2005-03-01merge from gccDJ Delorie1-0/+4
2004-09-14merge from gccDJ Delorie1-1/+1
2004-09-05merge from gccDJ Delorie1-5/+5