Skip to content
Snippets Groups Projects
  1. Jan 03, 2024
  2. Jan 16, 2023
  3. Jan 03, 2022
  4. Jan 04, 2021
  5. Jan 03, 2021
  6. Jun 26, 2020
    • Nick Clifton's avatar
      This patch removes the use of the "register" keyword from the bsearch() and... · 87fce92c
      Nick Clifton authored
      This patch removes the use of the "register" keyword from the bsearch() and bsearch_r() functions supplied by libiberty.  The register keyword is deprecated in C++17.
      
      2020-06-25  Nick Clifton  <nickc@redhat.com>
      
      include/
      	* libiberty.h (bsearch_r): Remove use of the register keyword from
      	the prototype.
      
      libiberty/
      	* bsearch.c (bsearch): Remove use of register keyword.
      	* bsearch_r.c (bsearch_r): Likewise.
      87fce92c
  7. Jun 23, 2020
    • Nick Alcock's avatar
      libiberty, include: add bsearch_r · aec24341
      Nick Alcock authored
      libctf wants a bsearch that takes a void * arg pointer to avoid a
      nonportable use of __thread.
      
      bsearch_r is required, not optional, at this point because as far as I
      can see this obvious-sounding function is not implemented by anyone's
      libc.  We can easily move it to AC_LIBOBJ later if it proves necessary
      to do so.
      
      include/
      	* libiberty.h (bsearch_r): New.
      libiberty/
      	* bsearch_r.c: New file.
      	* Makefile.in (CFILES): Add bsearch_r.c.
      	(REQUIRED_OFILES): Add bsearch_r.o.
      	* functions.texi: Regenerate.
      aec24341
  8. Jan 01, 2020
  9. Aug 08, 2019
    • Martin Liska's avatar
      Fix file descriptor existence of MinGW. · 0fddb184
      Martin Liska authored
      2019-08-08  Martin Liska  <mliska@suse.cz>
      
      	PR bootstrap/91352
      	* gcc.c (driver::detect_jobserver): Use is_valid_fd.
      	* lto-wrapper.c (jobserver_active_p): Likewise.
      2019-08-08  Martin Liska  <mliska@suse.cz>
      
      	PR bootstrap/91352
      	* libiberty.h (is_valid_fd): New function.
      2019-08-08  Martin Liska  <mliska@suse.cz>
      
      	PR bootstrap/91352
      	* lrealpath.c (is_valid_fd): New function.
      
      From-SVN: r274208
      0fddb184
  10. Jun 10, 2019
  11. Apr 26, 2019
  12. Jan 09, 2019
    • Sandra Loosemore's avatar
      PR other/16615 [2/5] · adcb167e
      Sandra Loosemore authored
      2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>
      
      	PR other/16615 [2/5]
      
      	include/
      	* libiberty.h: Mechanically replace "can not" with "cannot".
      	* plugin-api.h: Likewise.
      
      	libiberty/
      	* cp-demangle.c: Mechanically replace "can not" with "cannot".
      	* floatformat.c: Likewise.
      	* strerror.c: Likewise.
      
      From-SVN: r267784
      adcb167e
  13. Jan 01, 2019
  14. Jul 26, 2018
    • Martin Liska's avatar
      Add linker_output as prefix for LTO temps (PR lto/86548). · c00c9d03
      Martin Liska authored
      2018-07-26  Martin Liska  <mliska@suse.cz>
      
              PR lto/86548
      	* lto-wrapper.c: Add linker_output as prefix
              for ltrans_output_file.
      2018-07-26  Martin Liska  <mliska@suse.cz>
      
              PR lto/86548
      	* libiberty.h (make_temp_file_with_prefix): New function.
      2018-07-26  Martin Liska  <mliska@suse.cz>
      
              PR lto/86548
      	* make-temp-file.c (TEMP_FILE): Remove leading 'cc'.
      	(make_temp_file): Call make_temp_file_with_prefix with
              first argument set to NULL.
      	(make_temp_file_with_prefix): Support also prefix.
      
      From-SVN: r262999
      c00c9d03
  15. Jan 03, 2018
  16. May 25, 2017
  17. Jan 04, 2017
  18. Jul 29, 2016
    • Aldy Hernandez's avatar
      libiberty.h (MAX_ALLOCA_SIZE): New macro. · ac631cbe
      Aldy Hernandez authored
      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.
      
      From-SVN: r238880
      ac631cbe
  19. Jan 05, 2016
    • Mike Frysinger's avatar
      libiberty: {count,dup,write}argv: constify argv input slightly · 66f49f07
      Mike Frysinger authored
      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.
      
      From-SVN: r232089
      66f49f07
  20. May 22, 2015
  21. Jan 14, 2015
  22. Dec 24, 2014
    • Uros Bizjak's avatar
      xasprintf.c: New file. · e8850918
      Uros Bizjak authored
      
      libiberty/ChangeLog:
      
      	* xasprintf.c: New file.
      	* Makefile.in (CFILES): Add xasprintf.c.
      	(REQUIRED_OFILES): Add xasprintf.$(objext).
      	(xasprintf.$(objext)): New target.
      	* functions.texi: Regenerate.
      
      include/ChangeLog:
      
      	* libiberty.h (xasprintf): Declare.
      
      gcc/ChangeLog:
      
      	* gengtype.h (xasprintf): Remove declaration.
      	* gengtype.c (xasprintf): Remove.
      
      
      Co-Authored-By: default avatarBen Elliston <bje@au.ibm.com>
      Co-Authored-By: default avatarManuel López-Ibáñez <manu@gcc.gnu.org>
      
      From-SVN: r219060
      e8850918
  23. Dec 11, 2014
    • Uros Bizjak's avatar
      xvasprintf.c: New file. · 01ca36af
      Uros Bizjak authored
      
      	* xvasprintf.c: New file.
      	* vprintf-support.h: Likewise.
      	* vprintf-support.c: Likewise.
      	* Makefile.in (CFILES): Add vprintf-support.c, xvasprintf.c.
      	(REQUIRED_OFILES): Add vprintf-support.$(objext), xvasprintf.$(objext).
      	(vprintf-support.$(objext), xvasprintf.$(objext)): New targets.
      	(vasprintf.$(objext)): Depend on $(srcdir)/vprintf-support.h.
      	* functions.texi: Regenerate.
      	* vasprintf.c (int_vasprintf): Use libiberty_vprintf_buffer_size.
      
      include/ChangeLog:
      
      	* libiberty.h (xvasprintf): Declare.
      
      libcpp/ChangeLog:
      
      	* directives.c (cpp_define_formatted): Use xvasprintf.
      
      
      Co-Authored-By: default avatarBen Elliston <bje@au.ibm.com>
      Co-Authored-By: default avatarManuel López-Ibáñez <manu@gcc.gnu.org>
      
      From-SVN: r218618
      01ca36af
  24. Oct 28, 2014
    • Yury Gribov's avatar
      Add strtoll and strtoull to libiberty. · ea41822a
      Yury Gribov authored
      2014-10-28  Yury Gribov  <y.gribov@samsung.com>
      
      include/
      	* libiberty.h (strtol, strtoul, strtoll, strtoull): New prototypes.
      
      libiberty/
      	* strtoll.c: New file.
      	* strtoull.c: New file.
      	* configure.ac: Add long long checks.  Add harness for strtoll and
      	strtoull.  Check decls for strtol, strtoul, strtoll, strtoull.
      	* Makefile.in (CFILES, CONFIGURED_OFILES): Add strtoll and strtoull.
      	* config.in: Regenerate.
      	* configure: Regenerate.
      	* functions.texi: Regenerate.
      	* testsuite/Makefile.in (check-strtol): New rule.
      	(test-strtol): Likewise.
      	(mostlyclean): Clean up strtol test.
      	* testsuite/test-strtol.c: New test.
      
      From-SVN: r216772
      ea41822a
  25. Oct 15, 2014
    • David Malcolm's avatar
      libiberty: Expose choose_tmpdir, and fix constness of return type · e39423c0
      David Malcolm authored
      include/ChangeLog:
      	* libiberty.h (choose_tmpdir): New prototype.
      
      libiberty/ChangeLog:
      	* choose-temp.c (choose_tmpdir): Remove now-redundant local
      	copy of prototype.
      	* functions.texi: Regenerate.
      	* make-temp-file.c (choose_tmpdir): Convert return type from
      	char * to const char * - given that this returns a pointer to
      	a memoized allocation, the caller must not touch it.
      
      From-SVN: r216285
      e39423c0
  26. Sep 26, 2014
    • Max Ostapenko's avatar
      pex-common.h (struct pex_funcs): Add new parameter for open_write field. · 29ce50b0
      Max Ostapenko authored
      libiberty/
      
      2014-09-26  Max Ostapenko  <m.ostapenko@partner.samsung.com>
      
      	* 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.
      
      
      include/
      
      2014-09-26  Max Ostapenko  <m.ostapenko@partner.samsung.com>
      
      	* libiberty.h (PEX_STDOUT_APPEND): New flag.
      	(PEX_STDERR_APPEND): Likewise.
      
      From-SVN: r215632
      29ce50b0
  27. Jun 10, 2014
    • Thomas Schwinge's avatar
      [PR lto/61334] Declare prototype for strnlen, if needed. · 35fa894a
      Thomas Schwinge authored
      	include/
      	* libiberty.h [defined (HAVE_DECL_STRNLEN) &&
      	!HAVE_DECL_STRNLEN] (strnlen): New prototype.
      	gcc/
      	* configure.ac: Use gcc_AC_CHECK_DECLS to check for strnlen
      	prototype.
      	* config.in: Regenerate.
      	* configure: Likewise.
      
      From-SVN: r211401
      35fa894a
  28. May 21, 2014
    • John Marino's avatar
      config.gcc (*-*-dragonfly*): New target. · dbed5a9b
      John Marino authored
      2014-05-21  John Marino  <gnugcc@marino.st>
      
      gcc:
      
      	* config.gcc (*-*-dragonfly*): New target.
      	* configure.ac: Detect dl_iterate_phdr (*freebsd*, *dragonfly*).
      	* configure: Regenerate.
      	* config/dragonfly-stdint.h: New.
      	* config/dragonfly.h: New.
      	* config/dragonfly.opt: New.
      	* config/i386/dragonfly.h: New.
      	* ginclude/stddef.h: Detect _PTRDIFF_T_DECLARED for DragonFly.
      
      include:
      
      	* liberty.h: Use basename function on DragonFly.
      
      libcilkrts:
      
      	* runtime/os-unix.c (__DragonFly__): New target.
      
      libgcc:
      
      	* config.host (*-*-dragonfly*): New target.
      	* crtstuff.c: Make dl_iterate_support generic on *bsd.
      	* enable-execute-stack-mprotect.c: Always mprotect on FreeBSD.
      	* unwind-dw2-fde-dip.c: Add dl_iterate_phr support for DragonFly.
      	* config/i386/dragonfly-unwind.h: New.
      
      libitm:
      
      	* configure.tgt (*-*-dragonfly*): New target.
      
      libstdc++-v3:
      
      	* acinclude.m4 (*-*-dragonfly*): New target.
      	* configure: Regenerate.
      	* configure.host (*-*-dragonfly*): New target.
      	* config/locale/dragonfly/c_locale.cc: New.
      	* config/locale/dragonfly/ctype_members.cc: New.
      	* config/os/bsd/dragonfly/ctype_base.h: New.
      	* config/os/bsd/dragonfly/ctype_configure_char.cc: New.
      	* config/os/bsd/dragonfly/ctype_inline.h: New.
      	* config/os/bsd/dragonfly/os_defines.h: New.
      
      From-SVN: r210694
      dbed5a9b
  29. Jan 21, 2014
    • Tom Tromey's avatar
      include · d2d21de9
      Tom Tromey authored
      	* ansidecl.h (ANSI_PROTOTYPES, PTRCONST, LONG_DOUBLE, 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.
      
      From-SVN: r206881
      d2d21de9
  30. Oct 29, 2013
    • Marc Glisse's avatar
      re PR tree-optimization/58689 ([meta-bug] __attribute__((returns_nonnull)) enhancements) · eda14d6a
      Marc Glisse authored
      2013-10-29  Marc Glisse  <marc.glisse@inria.fr>
      
      	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.
      
      From-SVN: r204159
      eda14d6a
  31. Sep 28, 2011
  32. Jul 22, 2011
    • Jakub Jelinek's avatar
      re PR c++/49756 (g++ ICE) · d423df48
      Jakub Jelinek authored
      	PR c++/49756
      	* libiberty.h (stack_limit_increase): New prototype.
      
      	* stack-limit.c: New file.
      	* Makefile.in: Regenerate deps.
      	(CFILES): Add stack-limit.c.
      	(REQUIRED_OFILES): Add ./stack-limit.$(objext).
      	* configure.ac (checkfuncs): Add getrlimit and setrlimit.
      	(AC_CHECK_FUNCS): Likewise.
      	* configure: Regenerated.
      	* config.in: Regenerated.
      
      	* gcc.c (main): Call stack_limit_increase (64MB).
      	* toplev.c (toplev_main): Likewise.
      
      From-SVN: r176617
      d423df48
  33. Jan 03, 2011
  34. Oct 06, 2010
    • Andi Kleen's avatar
      [PATCH] Report LTO phase in lto1 process name v2 · 6e9bd0f8
      Andi Kleen authored
      On larger parallel WHOPR builds I find it useful to see in top which
      phase a given lto1 is in.
      
      Set the process name to lto1-wpa, lto1-ltrans, lto1-lto depending
      on the current mode.
      
      This is currently only implemented for Linux and only
      using the "comm" process name, which is reported in top.
      
      v2: Moved function to libiberty, renamed setproctitle to match
      BSD. In theory it should pick up BSD's libc function for this
      on a BSD system, but I haven't tested this.
      
      gcc/lto/
      
      2010-10-06  Andi Kleen <ak@linux.intel.com>
      
      	* lto.c (lto_process_name): Add.
      	(lto_main): Call lto_process_name.
      
      include/
      
      2010-10-06  Andi Kleen <ak@linux.intel.com>
      
      	* libiberty.h (setproctitle): Add prototype.
      
      libiberty/
      
      2010-10-06  Andi Kleen <ak@linux.intel.com>
      
      	* Makefile.in (CFILES): Add setproctitle.
      	(CONFIGURED_OFILES): Add setproctitle.
      	(setproctitle): Add rule.
      	* config.in: Regenerate.
      	* configure: Regenerate.
      	* configure.ac: Add checks for prctl PR_SET_NAME and setproctitle.
      	* setproctitle.c: Add file.
      	* functions.texi: Regenerate.
      
      From-SVN: r165066
      6e9bd0f8
  35. Apr 24, 2010
    • Pedro Alves's avatar
      filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR... · 3009276c
      Pedro Alves authored
      2010-04-23  Pedro Alves  <pedro@codesourcery.com>
      
      include/
      * filenames.h (IS_DIR_SEPARATOR_1): Rename from IS_DIR_SEPARATOR,
      always define it independently of host, add `dos_based' parameter,
      and handle it.
      (HAS_DRIVE_SPEC_1): Rename from HAS_DRIVE_SPEC, always define it
      independently of host, add `dos_based' parameter, and handle it.
      (IS_ABSOLUTE_PATH_1): Rename from IS_ABSOLUTE_PATH, always define
      it independently of host, add `dos_based' parameter, and handle
      it.
      (IS_DOS_DIR_SEPARATOR, IS_DOS_ABSOLUTE_PATH)
      (IS_UNIX_DIR_SEPARATOR, IS_UNIX_ABSOLUTE_PATH)
      (HAS_DOS_DRIVE_SPEC): New.
      (HAS_DRIVE_SPEC): Reimplement on top of HAS_DRIVE_SPEC_1.
      (IS_DIR_SEPARATOR): Reimplement on top of IS_DIR_SEPARATOR_1.
      (IS_ABSOLUTE_PATH): Reimplement on top of IS_ABSOLUTE_PATH_1.
      * libiberty.h (dos_lbasename, unix_lbasename): Declare.
      
      libiberty/
      * lbasename.c (lbasename): Split into ...
      (unix_lbasename, dos_basename): ... these.
      (lbasename): ... and reimplement on top of them.
      * Makefile.in (lbasename.o): Add dependency on
      $(INCDIR)/filenames.h.
      
      From-SVN: r158681
      3009276c
  36. Jul 25, 2009
  37. Jul 24, 2009
    • Ian Lance Taylor's avatar
      crc32.c: New file. · b524249c
      Ian Lance Taylor authored
      libiberty/:
      	* crc32.c: New file.
      	* Makefile.in: Rebuild dependencies.
      	(CFILES): Add crc32.c.
      	(REQUIRED_OFILES): Add ./crc32.o.
      	* functions.texi: Rebuild.
      include/:
      	* libiberty.h (crc32): Declare.
      
      From-SVN: r150067
      b524249c
  38. Jun 24, 2008
  39. Sep 06, 2007
Loading