summaryrefslogtreecommitdiff
path: root/lib/string.in.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/string.in.h')
-rw-r--r--lib/string.in.h10
1 files changed, 6 insertions, 4 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. */