diff options
author | Bruno Haible <bruno@clisp.org> | 2021-08-08 18:18:25 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-08-08 18:18:25 +0200 |
commit | 48ece5c3f2185f52ab8cd73ceac9bd9f0e01eac6 (patch) | |
tree | f4ce9f2792efa53a82d9b49eda9e9e8fedebc8e8 /modules/free-posix | |
parent | 6ccfbd6495f2849b1aeea84f73327f6ced0080a7 (diff) | |
download | gnulib-48ece5c3f2185f52ab8cd73ceac9bd9f0e01eac6.tar.gz |
stdlib, string, wchar: Improve GCC 11 allocation-deallocation checking.
* lib/stdlib.in.h (aligned_alloc): For GCC >= 11: Declare also when the
platform already declares the function or when the module
'aligned_alloc' is not in use.
(calloc): For GCC >= 11: Declare nearly always.
(canonicalize_file_name): For GCC >= 11: Declare also when the platform
already declares the function or when the module 'canonicalize-lgpl' is
not in use.
(malloc, realloc): For GCC >= 11: Declare nearly always.
* lib/malloc.in.h: Remove redundant include.
(memalign): For GCC >= 11: Declare also when the platform already
declares the function or when the module 'memalign' is not in use.
* lib/string.in.h: Include <stdlib.h> always.
(strdup): For GCC >= 11: Declare also when the platform already declares
the function or when the module 'strdup' or 'strdup-posix' is not in
use.
* lib/wchar.in.h: Include <stdlib.h> always.
(wcsdup): For GCC >= 11: Declare also when the platform already declares
the function or when the module 'wcsdup' is not in use.
* modules/free-posix (Depends-on): Add string, wchar.
Diffstat (limited to 'modules/free-posix')
-rw-r--r-- | modules/free-posix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/free-posix b/modules/free-posix index f48e38851b..1d0056327a 100644 --- a/modules/free-posix +++ b/modules/free-posix @@ -7,6 +7,8 @@ m4/free.m4 Depends-on: stdlib +string +wchar configure.ac: gl_FUNC_FREE |