Skip to content

Commit 31eea4a

Browse files
committed
gdb: fix readline for gdb 15.2
Remove a nonexistent function call and keep janitorial changes only. Add missing patch for tcap.h Signed-off-by: Kirill K. Smirnov <kirill.k.smirnov@gmail.com>
1 parent 899e015 commit 31eea4a

File tree

2 files changed

+52
-12
lines changed

2 files changed

+52
-12
lines changed

packages/gdb/15.2/0000-readline-bring-in-signal.c-from-gdb-16-branch.patch

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,7 @@ issues.
116116
# endif
117117
#endif /* SIGTSTP */
118118
/* Any signals that should be blocked during cleanup should go here. */
119-
@@ -261,6 +255,8 @@
120-
case SIGTERM:
121-
#if defined (SIGALRM)
122-
case SIGALRM:
123-
+ if (sig == SIGALRM)
124-
+ _rl_timeout_handle_sigalrm ();
125-
#endif
126-
#if defined (SIGQUIT)
127-
case SIGQUIT:
128-
@@ -285,19 +281,6 @@
119+
@@ -285,19 +279,6 @@
129120

130121
/* We don't have to bother unblocking the signal because we are not
131122
running in a signal handler context. */
@@ -145,7 +136,7 @@ issues.
145136

146137
#if defined (__EMX__)
147138
signal (sig, SIG_ACK);
148-
@@ -311,16 +294,6 @@
139+
@@ -311,16 +292,6 @@
149140

150141
/* We don't need to modify the signal mask now that this is not run in
151142
a signal handler context. */
@@ -162,7 +153,7 @@ issues.
162153

163154
rl_reset_after_signal ();
164155
}
165-
@@ -330,7 +303,7 @@
156+
@@ -330,7 +301,7 @@
166157
}
167158

168159
#if defined (SIGWINCH)
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
From 11d45226114bf2e1405964c81c7610a8d6074947 Mon Sep 17 00:00:00 2001
2+
From: Chris Packham <judge.packham@gmail.com>
3+
Date: Wed, 30 Apr 2025 16:37:48 +1200
4+
Subject: [PATCH] readline/tcap.h: Update definitions for C23
5+
6+
C23 changes how function definitions like int `int tputs ()` are
7+
interpreted. In older standards this meant that the function arguments
8+
are unknown. In C23 this is interpreted as `int tputs (void)` so now
9+
when we compile with GCC15 (which defaults to -std=gnu23) we get an
10+
error such as
11+
12+
readline/display.c:2839:17: error: too many arguments to function 'tputs'; expected 0, have 3
13+
14+
Add the function arguments for tgetent(), tgetflag(), tgetnum(),
15+
tgetstr(), tputs() and tgoto().
16+
17+
Signed-off-by: Chris Packham <judge.packham@gmail.com>
18+
---
19+
readline/readline/tcap.h | 12 ++++++------
20+
1 file changed, 6 insertions(+), 6 deletions(-)
21+
22+
diff --git a/readline/readline/tcap.h b/readline/readline/tcap.h
23+
index 859e6eed5aa..9e2ed124e49 100644
24+
--- a/readline/readline/tcap.h
25+
+++ b/readline/readline/tcap.h
26+
@@ -46,14 +46,14 @@ extern char *UP, *BC;
27+
28+
extern short ospeed;
29+
30+
-extern int tgetent ();
31+
-extern int tgetflag ();
32+
-extern int tgetnum ();
33+
-extern char *tgetstr ();
34+
+extern int tgetent (char *bp, const char *name);
35+
+extern int tgetflag (char *id);
36+
+extern int tgetnum (char *id);
37+
+extern char *tgetstr (char *id, char **area);
38+
39+
-extern int tputs ();
40+
+extern int tputs (const char *str, int affcnt, int (*putc)(int));
41+
42+
-extern char *tgoto ();
43+
+extern char *tgoto (const char *cap, int col, int row);
44+
45+
#endif /* HAVE_TERMCAP_H */
46+
47+
--
48+
2.49.0
49+

0 commit comments

Comments
 (0)