diff -Naurp a/gdb/Makefile.in b/gdb/Makefile.in
--- a/gdb/Makefile.in 2020-11-05 01:01:47.226370154 +0100
+++ b/gdb/Makefile.in 2020-11-05 01:04:58.623203363 +0100
-@@ -582,7 +582,7 @@ SUBDIR_GDBTK_SRCS = \
+@@ -583,7 +583,7 @@ SUBDIR_GDBTK_SRCS = \
SUBDIR_GDBTK_DEPS = $(LIBGUI) $(TCL_DEPS) $(TK_DEPS)
SUBDIR_GDBTK_LDFLAGS =
diff -Naurp a/gdb/Makefile.in b/gdb/Makefile.in
--- a/gdb/Makefile.in 2024-12-27 15:00:52.535357471 +0100
+++ b/gdb/Makefile.in 2024-12-27 15:01:28.735716787 +0100
-@@ -558,15 +558,15 @@ GDBTK_LIBRARY = $(datadir)/insight$(GDBT
+@@ -559,15 +559,15 @@ GDBTK_LIBRARY = $(datadir)/insight$(GDBT
GDBTK_SRC_DIR = @GDBTK_SRC_DIR@
SUBDIR_GDBTK_OBS = \
SUBDIR_GDBTK_SRCS = \
gdbtk/generic/gdbtk.c \
-@@ -597,7 +597,7 @@ HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_
+@@ -598,7 +598,7 @@ HAVE_NATIVE_GCORE_TARGET = @HAVE_NATIVE_
HAVE_GSTACK = @HAVE_GSTACK@
CONFIG_SRC_SUBDIR = arch cli dwarf2 mi compile tui unittests guile python \
CONFIG_DEP_SUBDIR = $(addsuffix /$(DEPDIR),$(CONFIG_SRC_SUBDIR))
# -I. for config files.
-@@ -2104,10 +2104,8 @@ $(CONFIG_DEP_SUBDIR):
+@@ -2105,10 +2105,8 @@ $(CONFIG_DEP_SUBDIR):
# Python files need special flags.
python/%.o: INTERNAL_CFLAGS += $(PYTHON_CFLAGS)
installcheck:
-@@ -2337,6 +2335,7 @@ uninstall: force $(CONFIG_UNINSTALL)
+@@ -2338,6 +2336,7 @@ uninstall: force $(CONFIG_UNINSTALL)
# computing the list of source files from the list of object files.
INIT_FILES_FILTER_OUT = \
init.o \
version.o \
xml-builtin.o \
-@@ -2817,10 +2816,10 @@ clean-gdbtk:
+@@ -2818,10 +2817,10 @@ clean-gdbtk:
rm -f insight$(EXEEXT)
# Removing the old gdb first works better if it is running, at least on SunOS.
$(TDEPLIBS) $(TUI_LIBRARY) $(CLIBS) $(LOADLIBES)
gdbres.o: $(srcdir)/gdbtk/gdb.rc $(srcdir)/gdbtk/gdbtool.ico
-@@ -2855,7 +2854,7 @@ endif
+@@ -2856,7 +2855,7 @@ endif
# A list of all the objects we might care about in this build, for
# dependency tracking.
--- /dev/null
+gdb: handle unlimited screen width case in print_gdb_hints
+
+- If the screen width is unlimited, it is returned as a negative signed
+ integer, so it has to be compared to another signed integer, not a size_t.
+- Remove an unused WIDTH-sized variable.
+diff -Naurp a/gdb/top.c b/gdb/top.c
+--- a/gdb/top.c 2025-11-28 01:56:25.424379499 +0100
++++ b/gdb/top.c 2025-11-29 11:09:40.045553217 +0100
+@@ -1442,9 +1442,8 @@ print_gdb_hints (struct ui_file *stream)
+ style, use the simple styling of a singular visual break. The longest
+ URL is used because the other messages may be broken into multiple
+ lines, but URLs can't. */
+- if (width - 3 <= docs_url.length ())
++ if (width - 3 <= (int) docs_url.length ())
+ {
+- std::string sep (width, '-');
+ for (string_file &msg : styled_msg)
+ gdb_printf (stream, "%s\n", msg.c_str ());
+