diff options
author | Yuanhui Zhang <asmwarrior@gmail.com> | 2015-03-16 11:28:24 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2015-03-16 11:36:00 +0000 |
commit | d053f6be557fa3bedd4ccbd969103dbb51a37439 (patch) | |
tree | 968282cee5db36ad117f1e14e56134f09b0ac974 /gdb/stub-termcap.c | |
parent | b1a921c8c6f9e3d033629f32473c6470c360b43f (diff) | |
download | gdb-d053f6be557fa3bedd4ccbd969103dbb51a37439.zip gdb-d053f6be557fa3bedd4ccbd969103dbb51a37439.tar.gz gdb-d053f6be557fa3bedd4ccbd969103dbb51a37439.tar.bz2 |
stub termcap, add extern "C"
Fixes linking an --enable-build-with-cxx build on mingw:
../readline/terminal.c:278: undefined reference to `tgetnum'
../readline/terminal.c:297: undefined reference to `tgetnum'
../readline/libreadline.a(terminal.o): In function `get_term_capabilities':
../readline/terminal.c:427: undefined reference to `tgetstr'
../readline/libreadline.a(terminal.o): In function `_rl_init_terminal_io':
[etc.]
gdb/ChangeLog:
2015-03-16 Yuanhui Zhang <asmwarrior@gmail.com>
Pedro Alves <palves@redhat.com>
* gdb_curses.h (tgetnum): Mark with EXTERN_C.
* stub-termcap.c (tgetent, tgetnum, tgetflag, tgetstr, tputs)
(tgoto): Wrap with extern "C".
Diffstat (limited to 'gdb/stub-termcap.c')
-rw-r--r-- | gdb/stub-termcap.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/gdb/stub-termcap.c b/gdb/stub-termcap.c index cecb3fb..5897d89 100644 --- a/gdb/stub-termcap.c +++ b/gdb/stub-termcap.c @@ -24,6 +24,10 @@ #include <stdlib.h> +#ifdef __cplusplus +extern "C" { +#endif + /* -Wmissing-prototypes */ extern int tgetent (char *buffer, char *termtype); extern int tgetnum (char *name); @@ -32,6 +36,10 @@ extern char* tgetstr (char *name, char **area); extern int tputs (char *string, int nlines, int (*outfun) (int)); extern char *tgoto (const char *cap, int col, int row); +#ifdef __cplusplus +} +#endif + /* Each of the files below is a minimal implementation of the standard termcap function with the same name, suitable for use in a Windows console window. */ |