diff mbox

Don't include pathmax.h from common-defs.h

Message ID 20191126184442.246508-1-cbiesinger@google.com
State New
Headers show

Commit Message

Doug Evans via gdb-patches Nov. 26, 2019, 6:44 p.m. UTC
pathmax.h is a Gnulib file, and common-defs is also used by IPA, which
does not use gnulib.

This is a prerequisite to cleaning up the include flags for IPA.

gdb/ChangeLog:

2019-11-26  Christian Biesinger  <cbiesinger@google.com>

	* gdbsupport/common-defs.h: Include limits.h for UINT_MAX.

gdb/gdbserver/ChangeLog:

2019-11-26  Christian Biesinger  <cbiesinger@google.com>

	* server.c: Include unistd.h instead of pathmax.h.

Change-Id: Iac7e8f36b5a9107ac21b3327200d49620ce2a94f
---
 gdb/gdbserver/server.c       | 1 +
 gdb/gdbsupport/common-defs.h | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)


base-commit: 6d91ce9a659f5b65bb6ad2d30d74250da342150c
diff mbox

Patch

diff --git a/gdb/gdbserver/server.c b/gdb/gdbserver/server.c
index c5f7176cff..769c5611a5 100644
--- a/gdb/gdbserver/server.c
+++ b/gdb/gdbserver/server.c
@@ -25,6 +25,7 @@ 
 #include "gdbsupport/signals-state-save-restore.h"
 #include <ctype.h>
 #include <unistd.h>
+#include <limits.h>
 #if HAVE_SIGNAL_H
 #include <signal.h>
 #endif
diff --git a/gdb/gdbsupport/common-defs.h b/gdb/gdbsupport/common-defs.h
index 3b10468f24..4fa84ff8e5 100644
--- a/gdb/gdbsupport/common-defs.h
+++ b/gdb/gdbsupport/common-defs.h
@@ -97,7 +97,7 @@ 
 #endif
 #include <errno.h>
 #include <alloca.h>
-/* Must be included before pathmax.h to avoid build errors about localtime_r
+/* Must be included before unistd.h to avoid build errors about localtime_r
    and gmtime_r in gnulib on MinGW.  This is a gnulib bug:
    https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00022.html  */
 #include <time.h>
@@ -119,7 +119,7 @@ 
 #endif
 
 #include "libiberty.h"
-#include "pathmax.h"
+#include <unistd.h>
 #include "gdb/signals.h"
 #include "gdb_locale.h"
 #include "ptid.h"