diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-09-04 16:44:12 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2017-09-08 15:51:34 +0200 |
commit | e00f2425996829632de5abff88bc1797558ce92e (patch) | |
tree | eae9e3fa6942c533535a7ad704447f6a32c2a590 /include/scratch_buffer.h | |
parent | 5554304f0dddf75dc27cc6250fc53355161fd16a (diff) | |
download | glibc-e00f2425996829632de5abff88bc1797558ce92e.zip glibc-e00f2425996829632de5abff88bc1797558ce92e.tar.gz glibc-e00f2425996829632de5abff88bc1797558ce92e.tar.bz2 |
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.
Diffstat (limited to 'include/scratch_buffer.h')
-rw-r--r-- | include/scratch_buffer.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/scratch_buffer.h b/include/scratch_buffer.h index dd17a4a..bb04662 100644 --- a/include/scratch_buffer.h +++ b/include/scratch_buffer.h @@ -66,8 +66,7 @@ struct scratch_buffer { void *data; /* Pointer to the beginning of the scratch area. */ size_t length; /* Allocated space at the data pointer, in bytes. */ - char __space[1024] - __attribute__ ((aligned (__alignof__ (max_align_t)))); + max_align_t __space[(1023 + sizeof (max_align_t)) / sizeof (max_align_t)]; }; /* Initializes *BUFFER so that BUFFER->data points to BUFFER->__space |