diff options
author | Bruno Haible <bruno@clisp.org> | 2022-04-14 00:52:26 +0200 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2022-04-14 00:52:26 +0200 |
commit | f358d8ddab84e94e63a2c21e7d47290bdfc3f2a8 (patch) | |
tree | 8c3bc14f07ba935e71509aa9cf18eb2613f54066 /lib/string.in.h | |
parent | 0b3f5d1b4c0b13bb51b4b6aa63392aa5231da3fc (diff) | |
download | gnulib-f358d8ddab84e94e63a2c21e7d47290bdfc3f2a8.tar.gz |
string, wchar: Fix error in C++ mode on glibc systems with clang.
* lib/string.in.h (free): Add exception specification like glibc does.
* lib/wchar.in.h (free): Likewise.
Diffstat (limited to 'lib/string.in.h')
-rw-r--r-- | lib/string.in.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index b818ae9cdf..b6840fa912 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -125,14 +125,22 @@ _GL_EXTERN_C void rpl_free (void *); # if defined _MSC_VER _GL_EXTERN_C void __cdecl free (void *); # else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else _GL_EXTERN_C void free (void *); +# endif # endif # endif #else # if defined _MSC_VER _GL_EXTERN_C void __cdecl free (void *); # else +# if defined __cplusplus && (__GLIBC__ + (__GLIBC_MINOR__ >= 14) > 2) +_GL_EXTERN_C void free (void *) throw (); +# else _GL_EXTERN_C void free (void *); +# endif # endif #endif |