diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/string.in.h | 10 | ||||
-rw-r--r-- | lib/wchar.in.h | 10 |
2 files changed, 12 insertions, 8 deletions
diff --git a/lib/string.in.h b/lib/string.in.h index 8977153c88..8d77ae3800 100644 --- a/lib/string.in.h +++ b/lib/string.in.h @@ -84,12 +84,14 @@ /* The definition of _GL_WARN_ON_USE is copied here. */ /* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ -#if (@REPLACE_FREE@ && !defined free \ - && !(defined __cplusplus && defined GNULIB_NAMESPACE)) _GL_EXTERN_C void free (void *); -# define free rpl_free -#endif +#if @GNULIB_FREE_POSIX@ +# if (@REPLACE_FREE@ && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +# define free rpl_free _GL_EXTERN_C void free (void *); +# endif +#endif /* Clear a block of memory. The compiler will not delete a call to this function, even if the block is dead after the call. */ diff --git a/lib/wchar.in.h b/lib/wchar.in.h index acb9d4ea64..f13379ad84 100644 --- a/lib/wchar.in.h +++ b/lib/wchar.in.h @@ -147,12 +147,14 @@ typedef int rpl_mbstate_t; #endif /* Declare 'free' if needed for _GL_ATTRIBUTE_DEALLOC_FREE. */ -#if (@REPLACE_FREE@ && !defined free \ - && !(defined __cplusplus && defined GNULIB_NAMESPACE)) _GL_EXTERN_C void free (void *); -# define free rpl_free -#endif +#if @GNULIB_FREE_POSIX@ +# if (@REPLACE_FREE@ && !defined free \ + && !(defined __cplusplus && defined GNULIB_NAMESPACE)) +# define free rpl_free _GL_EXTERN_C void free (void *); +# endif +#endif /* Convert a single-byte character to a wide character. */ #if @GNULIB_BTOWC@ |