diff options
| author | Yuuki Harano | 2021-11-11 00:39:53 +0900 |
|---|---|---|
| committer | Yuuki Harano | 2021-11-11 00:39:53 +0900 |
| commit | 4dd1f56f29fc598a8339a345c2f8945250600602 (patch) | |
| tree | af341efedffe027e533b1bcc0dbf270532e48285 /lib/malloc | |
| parent | 4c49ec7f865bdad1629d2f125f71f4e506b258f2 (diff) | |
| parent | 810fa21d26453f898de9747ece7205dfe6de9d08 (diff) | |
| download | emacs-4dd1f56f29fc598a8339a345c2f8945250600602.tar.gz emacs-4dd1f56f29fc598a8339a345c2f8945250600602.zip | |
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs into feature/pgtk
Diffstat (limited to 'lib/malloc')
| -rw-r--r-- | lib/malloc/dynarray-skeleton.c | 41 | ||||
| -rw-r--r-- | lib/malloc/dynarray.h | 8 | ||||
| -rw-r--r-- | lib/malloc/dynarray_at_failure.c | 15 | ||||
| -rw-r--r-- | lib/malloc/dynarray_emplace_enlarge.c | 12 | ||||
| -rw-r--r-- | lib/malloc/dynarray_finalize.c | 12 | ||||
| -rw-r--r-- | lib/malloc/dynarray_resize.c | 12 | ||||
| -rw-r--r-- | lib/malloc/dynarray_resize_clear.c | 12 | ||||
| -rw-r--r-- | lib/malloc/scratch_buffer.h | 8 | ||||
| -rw-r--r-- | lib/malloc/scratch_buffer_dupfree.c | 8 | ||||
| -rw-r--r-- | lib/malloc/scratch_buffer_grow.c | 8 | ||||
| -rw-r--r-- | lib/malloc/scratch_buffer_grow_preserve.c | 8 | ||||
| -rw-r--r-- | lib/malloc/scratch_buffer_set_array_size.c | 8 |
12 files changed, 88 insertions, 64 deletions
diff --git a/lib/malloc/dynarray-skeleton.c b/lib/malloc/dynarray-skeleton.c index 4995fd1c049..48210e32527 100644 --- a/lib/malloc/dynarray-skeleton.c +++ b/lib/malloc/dynarray-skeleton.c | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| @@ -192,7 +192,7 @@ DYNARRAY_NAME (free__array__) (struct DYNARRAY_STRUCT *list) | |||
| 192 | 192 | ||
| 193 | /* Initialize a dynamic array object. This must be called before any | 193 | /* Initialize a dynamic array object. This must be called before any |
| 194 | use of the object. */ | 194 | use of the object. */ |
| 195 | __nonnull ((1)) | 195 | __attribute_nonnull__ ((1)) |
| 196 | static void | 196 | static void |
| 197 | DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) | 197 | DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) |
| 198 | { | 198 | { |
| @@ -202,7 +202,7 @@ DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) | |||
| 202 | } | 202 | } |
| 203 | 203 | ||
| 204 | /* Deallocate the dynamic array and its elements. */ | 204 | /* Deallocate the dynamic array and its elements. */ |
| 205 | __attribute_maybe_unused__ __nonnull ((1)) | 205 | __attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
| 206 | static void | 206 | static void |
| 207 | DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) | 207 | DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) |
| 208 | { | 208 | { |
| @@ -213,7 +213,7 @@ DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) | |||
| 213 | } | 213 | } |
| 214 | 214 | ||
| 215 | /* Return true if the dynamic array is in an error state. */ | 215 | /* Return true if the dynamic array is in an error state. */ |
| 216 | __nonnull ((1)) | 216 | __attribute_nonnull__ ((1)) |
| 217 | static inline bool | 217 | static inline bool |
| 218 | DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) | 218 | DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) |
| 219 | { | 219 | { |
| @@ -222,7 +222,7 @@ DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) | |||
| 222 | 222 | ||
| 223 | /* Mark the dynamic array as failed. All elements are deallocated as | 223 | /* Mark the dynamic array as failed. All elements are deallocated as |
| 224 | a side effect. */ | 224 | a side effect. */ |
| 225 | __nonnull ((1)) | 225 | __attribute_nonnull__ ((1)) |
| 226 | static void | 226 | static void |
| 227 | DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) | 227 | DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) |
| 228 | { | 228 | { |
| @@ -236,7 +236,7 @@ DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) | |||
| 236 | 236 | ||
| 237 | /* Return the number of elements which have been added to the dynamic | 237 | /* Return the number of elements which have been added to the dynamic |
| 238 | array. */ | 238 | array. */ |
| 239 | __nonnull ((1)) | 239 | __attribute_nonnull__ ((1)) |
| 240 | static inline size_t | 240 | static inline size_t |
| 241 | DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) | 241 | DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) |
| 242 | { | 242 | { |
| @@ -245,7 +245,7 @@ DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) | |||
| 245 | 245 | ||
| 246 | /* Return a pointer to the array element at INDEX. Terminate the | 246 | /* Return a pointer to the array element at INDEX. Terminate the |
| 247 | process if INDEX is out of bounds. */ | 247 | process if INDEX is out of bounds. */ |
| 248 | __nonnull ((1)) | 248 | __attribute_nonnull__ ((1)) |
| 249 | static inline DYNARRAY_ELEMENT * | 249 | static inline DYNARRAY_ELEMENT * |
| 250 | DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) | 250 | DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) |
| 251 | { | 251 | { |
| @@ -257,7 +257,7 @@ DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) | |||
| 257 | /* Return a pointer to the first array element, if any. For a | 257 | /* Return a pointer to the first array element, if any. For a |
| 258 | zero-length array, the pointer can be NULL even though the dynamic | 258 | zero-length array, the pointer can be NULL even though the dynamic |
| 259 | array has not entered the failure state. */ | 259 | array has not entered the failure state. */ |
| 260 | __nonnull ((1)) | 260 | __attribute_nonnull__ ((1)) |
| 261 | static inline DYNARRAY_ELEMENT * | 261 | static inline DYNARRAY_ELEMENT * |
| 262 | DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) | 262 | DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) |
| 263 | { | 263 | { |
| @@ -267,7 +267,7 @@ DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) | |||
| 267 | /* Return a pointer one element past the last array element. For a | 267 | /* Return a pointer one element past the last array element. For a |
| 268 | zero-length array, the pointer can be NULL even though the dynamic | 268 | zero-length array, the pointer can be NULL even though the dynamic |
| 269 | array has not entered the failure state. */ | 269 | array has not entered the failure state. */ |
| 270 | __nonnull ((1)) | 270 | __attribute_nonnull__ ((1)) |
| 271 | static inline DYNARRAY_ELEMENT * | 271 | static inline DYNARRAY_ELEMENT * |
| 272 | DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) | 272 | DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) |
| 273 | { | 273 | { |
| @@ -294,7 +294,7 @@ DYNARRAY_NAME (add__) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) | |||
| 294 | /* Add ITEM at the end of the array, enlarging it by one element. | 294 | /* Add ITEM at the end of the array, enlarging it by one element. |
| 295 | Mark *LIST as failed if the dynamic array allocation size cannot be | 295 | Mark *LIST as failed if the dynamic array allocation size cannot be |
| 296 | increased. */ | 296 | increased. */ |
| 297 | __nonnull ((1)) | 297 | __attribute_nonnull__ ((1)) |
| 298 | static inline void | 298 | static inline void |
| 299 | DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) | 299 | DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) |
| 300 | { | 300 | { |
| @@ -348,7 +348,8 @@ DYNARRAY_NAME (emplace__) (struct DYNARRAY_STRUCT *list) | |||
| 348 | /* Allocate a place for a new element in *LIST and return a pointer to | 348 | /* Allocate a place for a new element in *LIST and return a pointer to |
| 349 | it. The pointer can be NULL if the dynamic array cannot be | 349 | it. The pointer can be NULL if the dynamic array cannot be |
| 350 | enlarged due to a memory allocation failure. */ | 350 | enlarged due to a memory allocation failure. */ |
| 351 | __attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) | 351 | __attribute_maybe_unused__ __attribute_warn_unused_result__ |
| 352 | __attribute_nonnull__ ((1)) | ||
| 352 | static | 353 | static |
| 353 | /* Avoid inlining with the larger initialization code. */ | 354 | /* Avoid inlining with the larger initialization code. */ |
| 354 | #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)) | 355 | #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)) |
| @@ -372,7 +373,7 @@ DYNARRAY_NAME (emplace) (struct DYNARRAY_STRUCT *list) | |||
| 372 | existing size, new elements are added (which can be initialized). | 373 | existing size, new elements are added (which can be initialized). |
| 373 | Otherwise, the list is truncated, and elements are freed. Return | 374 | Otherwise, the list is truncated, and elements are freed. Return |
| 374 | false on memory allocation failure (and mark *LIST as failed). */ | 375 | false on memory allocation failure (and mark *LIST as failed). */ |
| 375 | __attribute_maybe_unused__ __nonnull ((1)) | 376 | __attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
| 376 | static bool | 377 | static bool |
| 377 | DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) | 378 | DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) |
| 378 | { | 379 | { |
| @@ -417,7 +418,7 @@ DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) | |||
| 417 | } | 418 | } |
| 418 | 419 | ||
| 419 | /* Remove the last element of LIST if it is present. */ | 420 | /* Remove the last element of LIST if it is present. */ |
| 420 | __attribute_maybe_unused__ __nonnull ((1)) | 421 | __attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
| 421 | static void | 422 | static void |
| 422 | DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) | 423 | DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) |
| 423 | { | 424 | { |
| @@ -434,7 +435,7 @@ DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) | |||
| 434 | 435 | ||
| 435 | /* Remove all elements from the list. The elements are freed, but the | 436 | /* Remove all elements from the list. The elements are freed, but the |
| 436 | list itself is not. */ | 437 | list itself is not. */ |
| 437 | __attribute_maybe_unused__ __nonnull ((1)) | 438 | __attribute_maybe_unused__ __attribute_nonnull__ ((1)) |
| 438 | static void | 439 | static void |
| 439 | DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) | 440 | DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) |
| 440 | { | 441 | { |
| @@ -452,7 +453,8 @@ DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) | |||
| 452 | stored in *RESULT if LIST refers to an empty list. On success, the | 453 | stored in *RESULT if LIST refers to an empty list. On success, the |
| 453 | pointer in *RESULT is heap-allocated and must be deallocated using | 454 | pointer in *RESULT is heap-allocated and must be deallocated using |
| 454 | free. */ | 455 | free. */ |
| 455 | __attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1, 2)) | 456 | __attribute_maybe_unused__ __attribute_warn_unused_result__ |
| 457 | __attribute_nonnull__ ((1, 2)) | ||
| 456 | static bool | 458 | static bool |
| 457 | DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, | 459 | DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, |
| 458 | DYNARRAY_FINAL_TYPE *result) | 460 | DYNARRAY_FINAL_TYPE *result) |
| @@ -483,7 +485,8 @@ DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, | |||
| 483 | have a sentinel at the end). If LENGTHP is not NULL, the array | 485 | have a sentinel at the end). If LENGTHP is not NULL, the array |
| 484 | length is written to *LENGTHP. *LIST is re-initialized and can be | 486 | length is written to *LENGTHP. *LIST is re-initialized and can be |
| 485 | reused. */ | 487 | reused. */ |
| 486 | __attribute_maybe_unused__ __attribute_warn_unused_result__ __nonnull ((1)) | 488 | __attribute_maybe_unused__ __attribute_warn_unused_result__ |
| 489 | __attribute_nonnull__ ((1)) | ||
| 487 | static DYNARRAY_ELEMENT * | 490 | static DYNARRAY_ELEMENT * |
| 488 | DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp) | 491 | DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp) |
| 489 | { | 492 | { |
diff --git a/lib/malloc/dynarray.h b/lib/malloc/dynarray.h index 84e4394bf32..638c33f9867 100644 --- a/lib/malloc/dynarray.h +++ b/lib/malloc/dynarray.h | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
diff --git a/lib/malloc/dynarray_at_failure.c b/lib/malloc/dynarray_at_failure.c index a4424593748..8dd68507870 100644 --- a/lib/malloc/dynarray_at_failure.c +++ b/lib/malloc/dynarray_at_failure.c | |||
| @@ -3,22 +3,26 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #ifndef _LIBC | ||
| 20 | # include <libc-config.h> | ||
| 21 | # include <stdlib.h> | ||
| 22 | #endif | ||
| 23 | |||
| 19 | #include <dynarray.h> | 24 | #include <dynarray.h> |
| 20 | #include <stdio.h> | 25 | #include <stdio.h> |
| 21 | #include <stdlib.h> | ||
| 22 | 26 | ||
| 23 | void | 27 | void |
| 24 | __libc_dynarray_at_failure (size_t size, size_t index) | 28 | __libc_dynarray_at_failure (size_t size, size_t index) |
| @@ -28,6 +32,7 @@ __libc_dynarray_at_failure (size_t size, size_t index) | |||
| 28 | __snprintf (buf, sizeof (buf), "Fatal glibc error: " | 32 | __snprintf (buf, sizeof (buf), "Fatal glibc error: " |
| 29 | "array index %zu not less than array length %zu\n", | 33 | "array index %zu not less than array length %zu\n", |
| 30 | index, size); | 34 | index, size); |
| 35 | __libc_fatal (buf); | ||
| 31 | #else | 36 | #else |
| 32 | abort (); | 37 | abort (); |
| 33 | #endif | 38 | #endif |
diff --git a/lib/malloc/dynarray_emplace_enlarge.c b/lib/malloc/dynarray_emplace_enlarge.c index 7ac4b6db403..0f8baf94ad1 100644 --- a/lib/malloc/dynarray_emplace_enlarge.c +++ b/lib/malloc/dynarray_emplace_enlarge.c | |||
| @@ -3,19 +3,23 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #ifndef _LIBC | ||
| 20 | # include <libc-config.h> | ||
| 21 | #endif | ||
| 22 | |||
| 19 | #include <dynarray.h> | 23 | #include <dynarray.h> |
| 20 | #include <errno.h> | 24 | #include <errno.h> |
| 21 | #include <intprops.h> | 25 | #include <intprops.h> |
diff --git a/lib/malloc/dynarray_finalize.c b/lib/malloc/dynarray_finalize.c index be9441e313d..c33da41389e 100644 --- a/lib/malloc/dynarray_finalize.c +++ b/lib/malloc/dynarray_finalize.c | |||
| @@ -3,19 +3,23 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #ifndef _LIBC | ||
| 20 | # include <libc-config.h> | ||
| 21 | #endif | ||
| 22 | |||
| 19 | #include <dynarray.h> | 23 | #include <dynarray.h> |
| 20 | #include <stdlib.h> | 24 | #include <stdlib.h> |
| 21 | #include <string.h> | 25 | #include <string.h> |
diff --git a/lib/malloc/dynarray_resize.c b/lib/malloc/dynarray_resize.c index 92bbddd4461..5a57166a849 100644 --- a/lib/malloc/dynarray_resize.c +++ b/lib/malloc/dynarray_resize.c | |||
| @@ -3,19 +3,23 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #ifndef _LIBC | ||
| 20 | # include <libc-config.h> | ||
| 21 | #endif | ||
| 22 | |||
| 19 | #include <dynarray.h> | 23 | #include <dynarray.h> |
| 20 | #include <errno.h> | 24 | #include <errno.h> |
| 21 | #include <intprops.h> | 25 | #include <intprops.h> |
diff --git a/lib/malloc/dynarray_resize_clear.c b/lib/malloc/dynarray_resize_clear.c index 99c2cc87c31..9c43b00c3a7 100644 --- a/lib/malloc/dynarray_resize_clear.c +++ b/lib/malloc/dynarray_resize_clear.c | |||
| @@ -3,19 +3,23 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
| 19 | #ifndef _LIBC | ||
| 20 | # include <libc-config.h> | ||
| 21 | #endif | ||
| 22 | |||
| 19 | #include <dynarray.h> | 23 | #include <dynarray.h> |
| 20 | #include <string.h> | 24 | #include <string.h> |
| 21 | 25 | ||
diff --git a/lib/malloc/scratch_buffer.h b/lib/malloc/scratch_buffer.h index 26e306212d1..36d0bef4bb1 100644 --- a/lib/malloc/scratch_buffer.h +++ b/lib/malloc/scratch_buffer.h | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
diff --git a/lib/malloc/scratch_buffer_dupfree.c b/lib/malloc/scratch_buffer_dupfree.c index 775bff5609f..07363b9bc86 100644 --- a/lib/malloc/scratch_buffer_dupfree.c +++ b/lib/malloc/scratch_buffer_dupfree.c | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
diff --git a/lib/malloc/scratch_buffer_grow.c b/lib/malloc/scratch_buffer_grow.c index e7606d81cd7..22c8c7781ee 100644 --- a/lib/malloc/scratch_buffer_grow.c +++ b/lib/malloc/scratch_buffer_grow.c | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
diff --git a/lib/malloc/scratch_buffer_grow_preserve.c b/lib/malloc/scratch_buffer_grow_preserve.c index 59f8c710001..2b2b819289e 100644 --- a/lib/malloc/scratch_buffer_grow_preserve.c +++ b/lib/malloc/scratch_buffer_grow_preserve.c | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||
diff --git a/lib/malloc/scratch_buffer_set_array_size.c b/lib/malloc/scratch_buffer_set_array_size.c index e2b9f31211a..a47f9276a82 100644 --- a/lib/malloc/scratch_buffer_set_array_size.c +++ b/lib/malloc/scratch_buffer_set_array_size.c | |||
| @@ -3,16 +3,16 @@ | |||
| 3 | This file is part of the GNU C Library. | 3 | This file is part of the GNU C Library. |
| 4 | 4 | ||
| 5 | The GNU C Library is free software; you can redistribute it and/or | 5 | The GNU C Library is free software; you can redistribute it and/or |
| 6 | modify it under the terms of the GNU General Public | 6 | modify it under the terms of the GNU Lesser General Public |
| 7 | License as published by the Free Software Foundation; either | 7 | License as published by the Free Software Foundation; either |
| 8 | version 3 of the License, or (at your option) any later version. | 8 | version 2.1 of the License, or (at your option) any later version. |
| 9 | 9 | ||
| 10 | The GNU C Library is distributed in the hope that it will be useful, | 10 | The GNU C Library is distributed in the hope that it will be useful, |
| 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | General Public License for more details. | 13 | Lesser General Public License for more details. |
| 14 | 14 | ||
| 15 | You should have received a copy of the GNU General Public | 15 | You should have received a copy of the GNU Lesser General Public |
| 16 | License along with the GNU C Library; if not, see | 16 | License along with the GNU C Library; if not, see |
| 17 | <https://www.gnu.org/licenses/>. */ | 17 | <https://www.gnu.org/licenses/>. */ |
| 18 | 18 | ||