Move include block to pathstuff.h

A recent commit caused pathstuff.cc to fail to compile on mingw, like:

../../binutils-gdb/gdbsupport/pathstuff.cc:324:1: error: no previous declaration for 'std::string find_gdb_home_config_file(const char*, _stati64*)' [-Werror=missing-declarations]

Some newly-added #includes were changing which "stat" was being seen
by the compiler.  This patch moves the includes to the header, so that
the declaration and definition now agree.

2020-11-10  Tom Tromey  <tromey@adacore.com>

	PR build/26848:
	* pathstuff.h: Move include block here...
	* pathstuff.cc: ... from here.
This commit is contained in:
Tom Tromey
2020-11-09 06:55:39 -07:00
parent ed1afd8666
commit 6c51cf513d
3 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,9 @@
2020-11-10 Tom Tromey <tromey@adacore.com>
PR build/26848:
* pathstuff.h: Move include block here...
* pathstuff.cc: ... from here.
2020-11-02 Tom Tromey <tom@tromey.com>
* pathstuff.h (get_standard_config_dir): Declare.

View File

@ -23,10 +23,6 @@
#include "filenames.h"
#include "gdb_tilde_expand.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#ifdef USE_WIN32API
#include <windows.h>
#endif

View File

@ -22,6 +22,10 @@
#include "gdbsupport/byte-vector.h"
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
/* Path utilities. */
/* Return the real path of FILENAME, expanding all the symbolic links.