I noticed that both gdbserver and gdb define current_directory.
However, as it is referenced by gdbsupport, it seemed better to define
it there as well.  This patch also moves the declaration to
pathstuff.h.  Tested by rebuilding.
              value);
 }
 
-/* Current working directory.  */
-
-char *current_directory;
-
 /* The last command line executed on the console.  Used for command
    repetitions when the user enters an empty line.  */
 
 
       break;                                   \
     }
 
-/* String containing the current directory (what getwd would return).  */
-
-char *current_directory;
-
 /* The environment to pass to the inferior when creating it.  */
 
 static gdb_environ our_environ;
 
 /* 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
 
 
 /* See gdbsupport/pathstuff.h.  */
 
+char *current_directory;
+
+/* See gdbsupport/pathstuff.h.  */
+
 gdb::unique_xmalloc_ptr<char>
 gdb_realpath (const char *filename)
 {
 
 
 extern gdb::char_vector make_temp_filename (const std::string &f);
 
+/* String containing the current directory (what getwd would return).  */
+extern char *current_directory;
+
 #endif /* COMMON_PATHSTUFF_H */