]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Move include block to pathstuff.h
authorTom Tromey <tromey@adacore.com>
Mon, 9 Nov 2020 13:55:39 +0000 (06:55 -0700)
committerTom Tromey <tromey@adacore.com>
Tue, 10 Nov 2020 20:12:59 +0000 (13:12 -0700)
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.

gdbsupport/ChangeLog
gdbsupport/pathstuff.cc
gdbsupport/pathstuff.h

index 1d83cbb505ef85b2abadd783357590cb8cf106cc..2e5b3fa8004808051019dc9ee4d25e43c4d066a7 100644 (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.
index a52e53b8671e2df0f749e7b5e0eb699e986d0bef..311456720e4aa09cae5bc08d555026b2a8e2dd8a 100644 (file)
 #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
index 996c8f2bbf6a9f144f74157ca395beb395f071a7..7e35f62c78cf55888dfcc11dcfc70da0fa0f9aef 100644 (file)
 
 #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.