]> Savannah Git Hosting - gnulib.git/commitdiff
Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04).
authorBruno Haible <bruno@clisp.org>
Thu, 13 Jan 2022 15:23:21 +0000 (16:23 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 13 Jan 2022 15:23:21 +0000 (16:23 +0100)
Reported by Werner Lemberg <wl@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00094.html>.

* m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining
_GL_ATTRIBUTE_DEALLOC_FREE.

ChangeLog
m4/gnulib-common.m4

index 33dbeb7bc61b88e838c170c86cff676fdc1a7f97..c41c2e26c242f56d12064260c04412eb10430d50 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2022-01-13  Bruno Haible  <bruno@clisp.org>
+
+       Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04).
+       Reported by Werner Lemberg <wl@gnu.org> in
+       <https://lists.gnu.org/archive/html/bug-gnulib/2022-01/msg00094.html>.
+       * m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining
+       _GL_ATTRIBUTE_DEALLOC_FREE.
+
 2022-01-10  Paul Eggert  <eggert@cs.ucla.edu>
 
        backupfile: fix bug when renaming not from wd
index bd7318aeadf2b77ce3ad479fc14a5919140b5032..3730860f6dc1e9578a87225bf2b38abd98394755 100644 (file)
@@ -1,4 +1,4 @@
-# gnulib-common.m4 serial 70
+# gnulib-common.m4 serial 71
 dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -181,7 +181,12 @@ AC_DEFUN([gl_COMMON_BODY], [
 #else
 # define _GL_ATTRIBUTE_DEALLOC(f, i)
 #endif
-#define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+/* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
+   to use this earlier definition, since <stdlib.h> may not have been included
+   yet.  */
+#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
+# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+#endif
 
 /* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
    The compiler may warn if the entity is used.  */