Commit Graph

8 Commits

Author SHA1 Message Date
Joseph Myers 04277e02d7 Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2019-01-01 00:11:28 +00:00
Joseph Myers 688903eb3e Update copyright dates with scripts/update-copyrights.
* All files with FSF copyright notices: Update copyright dates
	using scripts/update-copyrights.
	* locale/programs/charmap-kw.h: Regenerated.
	* locale/programs/locfile-kw.h: Likewise.
2018-01-01 00:32:25 +00:00
Adhemerval Zanella 5f9f31ad12 scratch_buffer: use union for internal buffer
Problem reported by Florian Weimer [1] and solution suggested by
Andreas Schwab [2].  It also set the same buffer size independent
of architecture max_align_t size.

Checked on x86_64-linux-gnu and i686-linux-gnu.

	* lib/malloc/scratch_buffer.h (struct scratch_buffer):
	Use an union instead of a max_align_t array for __space,
	so that __space is the same size on all platforms.
	* malloc/scratch_buffer_grow_preserve.c
	(__libc_scratch_buffer_grow_preserve): Likewise.

[1] https://sourceware.org/ml/libc-alpha/2017-09/msg00693.html
[2] https://sourceware.org/ml/libc-alpha/2017-09/msg00695.html
2017-09-25 18:04:22 -07:00
Adhemerval Zanella e00f242599 Sync scratch_buffer with gnulib
This patch syncs the scratch_buffer grom gnulib commit 3866ef6 with
GLIBC code.

Checked on x86_64-linux-gnu and on a build using build-many-glibcs.py
for all major architectures.

	* include/scratch_buffer.h (scratch_buffer): Use a C99 align method
	instead of GCC extension.
	* malloc/scratch_buffer_grow.c [!_LIBC]: Include libc-config.h.
	* malloc/scratch_buffer_grow_preserve.c [!_LIBC]: Likewise.
	* malloc/scratch_buffer_set_array_size.c [!_LIBC]: Likewise.
2017-09-08 15:51:34 +02:00
Joseph Myers bfff8b1bec Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Joseph Myers f7a9f785e5 Update copyright dates with scripts/update-copyrights. 2016-01-04 16:05:18 +00:00
Joseph Myers dbb7600658 Use max_align_t from <stddef.h>.
Now that we build with -std=gnu11 and can rely on a compiler providing
max_align_t in <stddef.h>, we no longer need our own version
libc_max_align_t.  This patch removes it and replaces the single user
with a use of max_align_t.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch for x86_64; for x86, I see
some code reordering of no significance).

	* include/libc-internal.h (libc_max_align_t): Remove typedef.
	* include/scratch_buffer.h: Include <stddef.h> instead of
	<libc-internal.h>.
	(struct scratch_buffer): Use max_align_t instead of
	libc_max_align_t.
2015-10-29 12:46:22 +00:00
Florian Weimer cfcfd4614b Add struct scratch_buffer and its internal helper functions
These will be used from NSS modules, so they have to be exported.
2015-04-07 11:03:43 +02:00