/* Common definitions.
- Copyright (C) 1986-2021 Free Software Foundation, Inc.
+ Copyright (C) 1986-2023 Free Software Foundation, Inc.
This file is part of GDB.
/* We don't support Windows versions before XP, so we define
_WIN32_WINNT correspondingly to ensure the Windows API headers
- expose the required symbols. */
+ expose the required symbols.
+
+ NOTE: this must be kept in sync with common.m4. */
#if defined (__MINGW32__) || defined (__CYGWIN__)
# ifdef _WIN32_WINNT
# if _WIN32_WINNT < 0x0501
#define ATTRIBUTE_UNUSED_RESULT
#endif
+#if (GCC_VERSION > 4000)
+#define ATTRIBUTE_USED __attribute__ ((__used__))
+#else
+#define ATTRIBUTE_USED
+#endif
+
#include "libiberty.h"
#include "pathmax.h"
#include "gdb/signals.h"
/* Pull in gdb::unique_xmalloc_ptr. */
#include "gdbsupport/gdb_unique_ptr.h"
-/* String containing the current directory (what getwd would return). */
-extern char *current_directory;
-
/* sbrk on macOS is not useful for our purposes, since sbrk(0) always
returns the same value. brk/sbrk on macOS is just an emulation
that always returns a pointer to a 4MB section reserved for