From f8e27d88e4c31089467d8717597c4153723081e6 Mon Sep 17 00:00:00 2001 From: Christian Biesinger Date: Fri, 8 Nov 2019 11:25:17 -0600 Subject: Import the time_r gnulib module This allows GDB to use localtime_r unconditionally. See https://lists.gnu.org/archive/html/bug-gnulib/2019-11/msg00022.html for details on the compile error mentioned below. gdb/ChangeLog: 2019-11-15 Christian Biesinger * gdbsupport/common-defs.h: Include time.h before pathmax.h to avoid compile errors. gnulib/ChangeLog: 2019-11-15 Christian Biesinger * Makefile.in: Regenerate. * aclocal.m4: Regenerate. * config.in: Regenerate. * configure: Regenerate. * import/Makefile.am: Update. * import/Makefile.in: Regenerate. * import/m4/gnulib-cache.m4: Update. * import/m4/gnulib-comp.m4: Update. * import/m4/time_r.m4: New file. * import/time_r.c: New file. * update-gnulib.sh: Import time_r. Change-Id: I53fc861b192940d613ca97f2910b4533c730f667 --- gdb/gdbsupport/common-defs.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'gdb/gdbsupport/common-defs.h') diff --git a/gdb/gdbsupport/common-defs.h b/gdb/gdbsupport/common-defs.h index 203bd89..3b10468 100644 --- a/gdb/gdbsupport/common-defs.h +++ b/gdb/gdbsupport/common-defs.h @@ -97,6 +97,11 @@ #endif #include #include +/* Must be included before pathmax.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 + #include "ansidecl.h" /* This is defined by ansidecl.h, but we prefer gnulib's version. On -- cgit v1.1