summaryrefslogtreecommitdiff
path: root/gdbsupport
diff options
context:
space:
mode:
Diffstat (limited to 'gdbsupport')
-rw-r--r--gdbsupport/ChangeLog7
-rw-r--r--gdbsupport/common-defs.h4
-rw-r--r--gdbsupport/common-utils.h6
3 files changed, 14 insertions, 3 deletions
diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog
index 487107e3b14..f12a7a6eea7 100644
--- a/gdbsupport/ChangeLog
+++ b/gdbsupport/ChangeLog
@@ -1,3 +1,10 @@
+2021-01-22 Paul E. Murphy <murphy@linux.ibm.com>
+
+ * common-defs.h (ATTRIBUTE_PRINTF): rename
+ _GL_ATTRIBUTE_FORMAT_PRINTF to _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD.
+ * common-utils.h (xfree): use GNULIB_NAMESPACE namespace when calling
+ free if this macro is defined.
+
2021-01-22 Simon Marchi <simon.marchi@polymtl.ca>
* common-debug.h (debug_prefixed_printf_cond_nofunc): New.
diff --git a/gdbsupport/common-defs.h b/gdbsupport/common-defs.h
index e5ece3baccc..5b644010cd9 100644
--- a/gdbsupport/common-defs.h
+++ b/gdbsupport/common-defs.h
@@ -105,10 +105,10 @@
/* This is defined by ansidecl.h, but we prefer gnulib's version. On
MinGW, gnulib might enable __USE_MINGW_ANSI_STDIO, which may or not
require use of attribute gnu_printf instead of printf. gnulib
- checks that at configure time. Since _GL_ATTRIBUTE_FORMAT_PRINTF
+ checks that at configure time. Since _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
is compatible with ATTRIBUTE_PRINTF, simply use it. */
#undef ATTRIBUTE_PRINTF
-#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF
+#define ATTRIBUTE_PRINTF _GL_ATTRIBUTE_FORMAT_PRINTF_STANDARD
#if GCC_VERSION >= 3004
#define ATTRIBUTE_UNUSED_RESULT __attribute__ ((__warn_unused_result__))
diff --git a/gdbsupport/common-utils.h b/gdbsupport/common-utils.h
index 4429f086fce..28c08ee9766 100644
--- a/gdbsupport/common-utils.h
+++ b/gdbsupport/common-utils.h
@@ -59,7 +59,11 @@ xfree (T *ptr)
data type. Use operator delete instead.");
if (ptr != NULL)
- free (ptr); /* ARI: free */
+#ifdef GNULIB_NAMESPACE
+ GNULIB_NAMESPACE::free (ptr); /* ARI: free */
+#else
+ free (ptr); /* ARI: free */
+#endif
}