diff options
author | Bruno Haible <bruno@clisp.org> | 2023-02-09 13:16:31 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-02-09 13:16:31 +0100 |
commit | e5ba746bbe60e1f9d6ba89acaf2cbd9ec0a76f06 (patch) | |
tree | b40f12e34733b12a8f6e09bfbeadfe5517001880 /lib/string.in.h | |
parent | ca362f2a87253a372c9a4a75e92d858e09dbbea0 (diff) | |
download | gnulib-e5ba746bbe60e1f9d6ba89acaf2cbd9ec0a76f06.tar.gz |
Fix error in C++ mode on glibc systems (regression 2022-04-28).
* lib/malloc.in.h (rpl_free): Add exception specification like
stdlib.in.h does.
* lib/string.in.h (rpl_free): Likewise.
* lib/wchar.in.h (rpl_free): Likewise.
Diffstat (limited to 'lib/string.in.h')
-rw-r--r-- | lib/string.in.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index aa08821392..b6bf432e1f 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -126,7 +126,11 @@ # if (@REPLACE_FREE@ && !defined free \ && !(defined __cplusplus && defined GNULIB_NAMESPACE)) /* We can't do '#define free rpl_free' here. */ +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void rpl_free (void *) throw (); +# else _GL_EXTERN_C void rpl_free (void *); +# endif # undef _GL_ATTRIBUTE_DEALLOC_FREE # define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (rpl_free, 1) # else |