From a4e224edc0ed554e1adeb4b02a05beffbe653a5e Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 13 Jan 2022 16:23:21 +0100 Subject: [PATCH] Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04). Reported by Werner Lemberg in . * m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining _GL_ATTRIBUTE_DEALLOC_FREE. --- ChangeLog | 8 ++++++++ m4/gnulib-common.m4 | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa1735b5b5..c37b8483ab 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2022-01-13 Bruno Haible + + Avoid warning "_GL_ATTRIBUTE_DEALLOC_FREE redefined" (regr. 2022-01-04). + Reported by Werner Lemberg in + . + * m4/gnulib-common.m4 (gl_COMMON_BODY): Avoid redefining + _GL_ATTRIBUTE_DEALLOC_FREE. + 2022-01-10 Paul Eggert backupfile: fix bug when renaming not from wd diff --git a/m4/gnulib-common.m4 b/m4/gnulib-common.m4 index 87a9a751b6..3b8f9e95fd 100644 --- a/m4/gnulib-common.m4 +++ b/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 69 +# gnulib-common.m4 serial 69.1 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 or has already defined this macro, continue + to use this earlier definition, since 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. */ -- 2.39.5