When using obstack.h/c in other projects it isn't very nice that gnulib
headers like exitfail.h and gettext.h need to be present. Far worse
is a dependency on gnulib's version of stdlib.h for __attribute_pure__
and _Noreturn. This only works if a project is willing to import
rather a lot of gnuli
This gets us 4G obstack support, without changing ABI compatibility.
a) Replace "int" size parameters, return values, and macro local vars
with __OBSTACK_SIZE_T, an "unsigned int" for now.
b) Make obstack.chunk_size a __CHUNK_SIZE_T, an "unsigned long" for now.
c) Make all obstack macros checki
a) Delete nonsense about "not polluting the namespace with stddef.h
symbols" since string.h includes stddef.h a little later anyway.
b) Don't roll our own slow memcpy in _obstack_newchunk.
c) Rename obstack_free to _obstack_free. This makes the naming consistent
with other obstack functions and
This patch series gives obstacks some much needed TLC. The first patch
is mostly just a tidy, with one perhaps controversial change, renaming
the function obstack_free to _obstack_free. This will be visible to
users who compile some code using a new obstack.h and try to link
against an old (but n
And >2G on 32-bit.
* include/gnu-versions.h (_GNU_OBSTACK_INTERFACE_VERSION): Bump.
* include/obstack.h: Add _obstack2_newchunk hidden proto.
* malloc/obstack.h: Import from gnulib.
* malloc/obstack.c: Likewise.
* malloc/obstackv1.c: New file.
* mall
a) Correct calls to alloc function, to use a size_t arg. "long" is
just wrong on targets like x86_64-mingw64 where "long" is 32 bits
and "size_t" 64 bits.
b) Consolidate _obstack_begin and _obstack_begin1 code.
* lib/obstack.h (struct obstack ): Correct prototype to
use "siz
This finally enables full 64-bit obstack support. Renaming the
_obstack_* functions to _obstack2_* is necessary to prevent a shared
library using version 1 obstack functions from having these functions
overridden by version 2 functions in the main executable. Not all
shared libraries are created
This fixes this error:
In file included from util/grub-mkimage.c:54:0:
./grub-core/gnulib/argp.h:627:49: error: '__sbistype' is static but
used in inline function '_option_is_short' which is not static
[-Werror] cc1: all warnings being treated as errors gmake[2]: ***
[util/grub_mkimage-grub-mkimag