Revisión | c15a79c78cc0111296b487de3fa59365f13df3bc (tree) |
---|---|
Tiempo | 2019-08-13 01:57:56 |
Autor | Tom Tromey <tom@trom...> |
Commiter | Tom Tromey |
Remove gdb workaround from readline/xfree.c
There is a gdb-local patch to deal with interrupts during completion.
The original thread adding this patch is here:
https://sourceware.org/ml/gdb-patches/2011-06/msg00147.html
I believe readline now implements the approach suggested by
Chet Ramey:
https://sourceware.org/ml/gdb-patches/2011-06/msg00493.html
So, I believe this patch can be removed.
readline/ChangeLog.gdb
2018-10-07 Tom Tromey <tom@tromey.com>
* Makefile.in (xfree.o): Don't depend on readline.h.
* xfree.c (xfree): Remove gdb workaround.
* xmalloc.h (xfree): Remove #define.
@@ -1,5 +1,11 @@ | ||
1 | 1 | 2019-08-12 Tom Tromey <tom@tromey.com> |
2 | 2 | |
3 | + * Makefile.in (xfree.o): Don't depend on readline.h. | |
4 | + * xfree.c (xfree): Remove gdb workaround. | |
5 | + * xmalloc.h (xfree): Remove #define. | |
6 | + | |
7 | +2018-08-12 Tom Tromey <tom@tromey.com> | |
8 | + | |
3 | 9 | * emacs_keymap.c: Remove gdb workaround. |
4 | 10 | |
5 | 11 | 2018-08-12 Tom Tromey <tom@tromey.com> |
@@ -437,7 +437,7 @@ vi_mode.o: rldefs.h ${BUILD_DIR}/config.h rlconf.h | ||
437 | 437 | vi_mode.o: readline.h keymaps.h rltypedefs.h chardefs.h tilde.h |
438 | 438 | vi_mode.o: history.h ansi_stdlib.h rlstdc.h |
439 | 439 | xfree.o: ${BUILD_DIR}/config.h |
440 | -xfree.o: ansi_stdlib.h readline.h | |
440 | +xfree.o: ansi_stdlib.h | |
441 | 441 | xmalloc.o: ${BUILD_DIR}/config.h |
442 | 442 | xmalloc.o: ansi_stdlib.h |
443 | 443 |
@@ -31,10 +31,7 @@ | ||
31 | 31 | # include "ansi_stdlib.h" |
32 | 32 | #endif /* HAVE_STDLIB_H */ |
33 | 33 | |
34 | -#include <stdio.h> | |
35 | - | |
36 | 34 | #include "xmalloc.h" |
37 | -#include "readline.h" | |
38 | 35 | |
39 | 36 | /* **************************************************************** */ |
40 | 37 | /* */ |
@@ -48,10 +45,6 @@ void | ||
48 | 45 | xfree (string) |
49 | 46 | PTR_T string; |
50 | 47 | { |
51 | - /* Leak a bit. */ | |
52 | - if (RL_ISSTATE(RL_STATE_SIGHANDLER)) | |
53 | - return; | |
54 | - | |
55 | 48 | if (string) |
56 | 49 | free (string); |
57 | 50 | } |
@@ -38,9 +38,6 @@ | ||
38 | 38 | |
39 | 39 | #endif /* !PTR_T */ |
40 | 40 | |
41 | -/* xmalloc and xrealloc should be also protected from RL_STATE_SIGHANDLER. */ | |
42 | -#define xfree xfree_readline | |
43 | - | |
44 | 41 | extern PTR_T xmalloc PARAMS((size_t)); |
45 | 42 | extern PTR_T xrealloc PARAMS((void *, size_t)); |
46 | 43 | extern void xfree PARAMS((void *)); |