Skip to content
Snippets Groups Projects
  1. Jan 16, 2023
  2. Jan 03, 2022
  3. Sep 22, 2021
    • Alan Modra's avatar
      obstack.h __PTR_ALIGN vs. ubsan · b0321032
      Alan Modra authored
      Current ubsan complains on every use of __PTR_ALIGN (when ptrdiff_t is
      as large as a pointer), due to making calculations relative to a NULL
      pointer.  This patch avoids the problem by extracting out and
      simplifying __BPTR_ALIGN for the usual case.  I've continued to use
      ptrdiff_t here, where it might be better to throw away __BPTR_ALIGN
      entirely and just assume uintptr_t exists.
      
      	* obstack.h (__PTR_ALIGN): Expand and simplify __BPTR_ALIGN
      	rather than calculating relative to a NULL pointer.
      b0321032
  4. Jan 04, 2021
  5. Jan 01, 2020
  6. Jan 01, 2019
  7. Jan 03, 2018
  8. Jan 04, 2017
  9. Nov 09, 2015
    • Alan Modra's avatar
      Modify obstack.[hc] to avoid having to include other gnulib files · f0e525fe
      Alan Modra authored
      Using the standard gnulib obstack source requires importing quite a
      lot of other files from gnulib, and requires build changes.
      
      include/
      	* obstack.h (__attribute_pure__): Expand _GL_ATTRIBUTE_PURE.
      libiberty/
      	* obstack.c (__alignof__): Expand alignof_type from alignof.h.
      	(obstack_exit_failure): Don't use exitfail.h.
      	(_): Include libintl.h when HAVE_LIBINTL_H and nls enabled.
      	Provide default.  Don't include gettext.h.
      	(_Noreturn): Define.
      	* obstacks.texi: Adjust node references to external libc info files.
      
      From-SVN: r229988
      f0e525fe
    • Alan Modra's avatar
      Copy gnulib obstack files · c9f265c9
      Alan Modra authored
      This copies obstack.[ch] from gnulib, and updates the docs.  The next
      patch should be applied if someone repeats the import at a later date.
      
      include/
      	* obstack.h: Import current gnulib file.
      libiberty/
      	* obstack.c: Import current gnulib file.
      	* obstacks.texi: Updated doc, from glibc's manual/memory.texi.
      
      From-SVN: r229987
      c9f265c9
  10. Jul 14, 2015
  11. Oct 22, 2011
  12. Oct 20, 2008
  13. May 10, 2005
  14. Mar 28, 2005
    • Gabriel Dos Reis's avatar
      partition.h: Remove use of PARAMS. · 885f2199
      Gabriel Dos Reis authored
      include/
      2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              * partition.h: Remove use of PARAMS.
              * obstack.h: Remove conditional prototypes __STDC__.
              * objalloc.h:  Remove use of PARAMS.
              * splay-tree.h: Likewise.
      
      libiberty/
      2005-03-27  Gabriel Dos Reis  <gdr@integrable-solutions.net>
      
              Convert libiberty to use ISO C prototype style 5/n.
              * random.c (srandom, initstate, setstate, random): Use ISO C
              prototypes.
              * putenv.c (putenv): Likewise.
              * physmem.c (physmem_available, physmem_total, main):
              Likewise.
              * pex-win32.c (fix_argv, pexecute, pwait): Likewise.
              * pex-unix.c (pexecute, pwait): Likewise.
              * pex-msdos.c (pexecute, pwait): Likewise.
              * pex-djgpp.c (pexecute, pwait): Likewise.
              * partition.c (partition_new, partition_delete,
              partition_union)
              (elem_compare, partition_print): Likewise.
              * obstack.c (_obstack_begin, _obstack_begin_1,
              _obstack_newchunk,
              _obstack_allocated_p, _obstack_free, obstack_free,
              _obstack_memory_used, print_and_abort, obstack_next_free,
              obstack_object_size, obstack_base): Likewise.  Remove codes
              predicated on !defined(__STDC__).
              * objalloc.c (objalloc_create, _objalloc_alloc, objalloc_free,
              objalloc_free_block): Use ISO C prototypes.
              * mkstemps.c (mkstemps): Likewise.
              * memset.c (memset): Likewise.
              * mempcpy.c (mempcpy): Likewise.
              * rename.c (rename): Likewise.
              * rindex.c (rindex): Likewise.
              * setenv.c (setenv, unsetenv): Likewise.
              * sigsetmask.c (sigsetmask): Likewise.
              * snprintf.c (snprintf): Likewise.
              * sort.c (sort_pointers, xmalloc): Likewise.
              * spaces.c (spaces): Likewise.
              * splay-tree.c (splay_tree_delete_helper,
              splay_tree_splay_helper, splay_tree_splay,
              splay_tree_foreach_helper, splay_tree_xmalloc_allocate,
              splay_tree_new, splay_tree_xmalloc_allocate,
              splay_tree_new_with_allocator, splay_tree_delete,
              splay_tree_insert, splay_tree_remove, splay_tree_lookup,
              splay_tree_max, splay_tree_min, splay_tree_predecessor,
              splay_tree_successor, splay_tree_foreach,
              splay_tree_compare_ints, splay_tree_compare_pointers):
              Likewise.
              * stpcpy.c (stpcpy): Likewise.
              * stpncpy.c (stpncpy): Likewise.
              * strcasecmp.c (strcasecmp): Likewise.
              * strchr.c (strchr): Likewise.
              * strdup.c (strdup): Likewise.
      
      From-SVN: r97125
      885f2199
  15. Jul 13, 2004
  16. Oct 22, 2003
    • Joseph Myers's avatar
      obstack.h: Merge the following change from gnulib... · dc70e81d
      Joseph Myers authored
      include:
      	* obstack.h: Merge the following change from gnulib:
      	2003-10-21  Paul Eggert  <eggert@twinsun.com>
      	* obstack.h (obstack_1grow_fast): Properly parenthesize arg.
      	(obstack_ptr_grow_fast, obstack_int_grow_fast):
      	Don't use lvalue casts, as GCC plans to remove support for them
      	in GCC 3.5.  Reported by Joseph S. Myers.  This bug
      	was also present in the non-GCC version, indicating that this
      	code had always been buggy and had never been widely used.
      	(obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
      	Use the fast variant of each macro, rather than copying the
      	definiens of the fast variant; that way, we'll be more likely to
      	catch future bugs in the fast variants.
      
      gcc:
      	* c-typeck.c (pedantic_lvalue_warning): Unconditionally warn of
      	deprecation of casts as lvalues.
      	* fixinc/inclhack.def (obstack_lvalue_cast): New fix.
      	* fixinc/fixincl.x: Regenerate.
      	* fixinc/tests/base/obstack.h: New test.
      
      gcc/testsuite:
      	* gcc.dg/cast-lvalue-1.c: New test.
      
      From-SVN: r72826
      dc70e81d
  17. Mar 14, 2001
  18. Dec 07, 2000
  19. Sep 01, 1999
    • Kaveh R. Ghazi's avatar
      Avoids false positives with -Wcast-qual: · 98c3e05d
      Kaveh R. Ghazi authored
      	* obstack.h (obstack_grow, obstack_grow0): Move (char*) casts
      	in calls to `_obstack_memcpy' from here ...
      
      	(_obstack_memcpy): ... to here, except in the __STDC__ case which
      	doesn't need it.
      
      From-SVN: r29028
      98c3e05d
  20. Sep 05, 1998
  21. Aug 21, 1997
  22. Aug 11, 1997
  23. Jun 21, 1997
  24. May 27, 1997
Loading