/* Common definitions.
- Copyright (C) 1986-2020 Free Software Foundation, Inc.
+ Copyright (C) 1986-2021 Free Software Foundation, Inc.
This file is part of GDB.
#include <stdarg.h>
#include <stdio.h>
+
+/* Include both cstdlib and stdlib.h to ensure we have standard functions
+ defined both in the std:: namespace and in the global namespace. */
+#include <cstdlib>
#include <stdlib.h>
+
#include <stddef.h>
#include <stdint.h>
#include <string.h>
/* 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__))