aboutsummaryrefslogtreecommitdiffstats
path: root/malloc
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-09-04 16:44:12 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2017-09-08 15:51:34 +0200
commite00f2425996829632de5abff88bc1797558ce92e (patch)
treeeae9e3fa6942c533535a7ad704447f6a32c2a590 /malloc
parent5554304f0dddf75dc27cc6250fc53355161fd16a (diff)
downloadtermbaud-e00f2425996829632de5abff88bc1797558ce92e.tar.gz
termbaud-e00f2425996829632de5abff88bc1797558ce92e.tar.xz
termbaud-e00f2425996829632de5abff88bc1797558ce92e.zip
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 'malloc')
-rw-r--r--malloc/scratch_buffer_grow.c6
-rw-r--r--malloc/scratch_buffer_grow_preserve.c6
-rw-r--r--malloc/scratch_buffer_set_array_size.c6
3 files changed, 15 insertions, 3 deletions
diff --git a/malloc/scratch_buffer_grow.c b/malloc/scratch_buffer_grow.c
index 22bae506a19..d2df028654d 100644
--- a/malloc/scratch_buffer_grow.c
+++ b/malloc/scratch_buffer_grow.c
@@ -16,6 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
#include <scratch_buffer.h>
#include <errno.h>
@@ -49,4 +53,4 @@ __libc_scratch_buffer_grow (struct scratch_buffer *buffer)
buffer->length = new_length;
return true;
}
-libc_hidden_def (__libc_scratch_buffer_grow);
+libc_hidden_def (__libc_scratch_buffer_grow)
diff --git a/malloc/scratch_buffer_grow_preserve.c b/malloc/scratch_buffer_grow_preserve.c
index 18543ef85b7..9268615311f 100644
--- a/malloc/scratch_buffer_grow_preserve.c
+++ b/malloc/scratch_buffer_grow_preserve.c
@@ -16,6 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
#include <scratch_buffer.h>
#include <errno.h>
#include <string.h>
@@ -60,4 +64,4 @@ __libc_scratch_buffer_grow_preserve (struct scratch_buffer *buffer)
buffer->length = new_length;
return true;
}
-libc_hidden_def (__libc_scratch_buffer_grow_preserve);
+libc_hidden_def (__libc_scratch_buffer_grow_preserve)
diff --git a/malloc/scratch_buffer_set_array_size.c b/malloc/scratch_buffer_set_array_size.c
index 8ab6d9d300d..6fcc115340d 100644
--- a/malloc/scratch_buffer_set_array_size.c
+++ b/malloc/scratch_buffer_set_array_size.c
@@ -16,6 +16,10 @@
License along with the GNU C Library; if not, see
<http://www.gnu.org/licenses/>. */
+#ifndef _LIBC
+# include <libc-config.h>
+#endif
+
#include <scratch_buffer.h>
#include <errno.h>
#include <limits.h>
@@ -57,4 +61,4 @@ __libc_scratch_buffer_set_array_size (struct scratch_buffer *buffer,
buffer->length = new_length;
return true;
}
-libc_hidden_def (__libc_scratch_buffer_set_array_size);
+libc_hidden_def (__libc_scratch_buffer_set_array_size)