diff options
author | Eli Zaretskii <eliz@gnu.org> | 2019-03-12 19:47:23 +0200 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2019-03-12 19:47:23 +0200 |
commit | 3a3508220eecf27e1952a73cd3ea6d6314ce8e1d (patch) | |
tree | 35e0baf24204ec2c9c294b2104c8f82b60b1ed14 | |
parent | ffdd69cf7840f3b158de16819591361c8dae3a4d (diff) | |
download | gdb-3a3508220eecf27e1952a73cd3ea6d6314ce8e1d.zip gdb-3a3508220eecf27e1952a73cd3ea6d6314ce8e1d.tar.gz gdb-3a3508220eecf27e1952a73cd3ea6d6314ce8e1d.tar.bz2 |
Fix MinGW build with source-highlight
gdb/ChangeLog
2019-03-12 Eli Zaretskii <eliz@gnu.org>
PR/24325
* source-cache.c: #undef open and close, to avoid unresolved
externals during linking.
-rw-r--r-- | gdb/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/source-cache.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 8d72d38..4e592a3 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2019-03-12 Eli Zaretskii <eliz@gnu.org> + + PR/24325 + * source-cache.c: #undef open and close, to avoid unresolved + externals during linking. + 2019-03-12 Tom Tromey <tromey@adacore.com> * remote.c (magic_null_ptid, not_sent_ptid, any_thread_ptid): Now diff --git a/gdb/source-cache.c b/gdb/source-cache.c index 097c8a3..435de2a 100644 --- a/gdb/source-cache.c +++ b/gdb/source-cache.c @@ -23,6 +23,12 @@ #include "cli/cli-style.h" #ifdef HAVE_SOURCE_HIGHLIGHT +/* If Gnulib redirects 'open' and 'close' to its replacements + 'rpl_open' and 'rpl_close' via cpp macros, including <fstream> + below with those macros in effect will cause unresolved externals + when GDB is linked. Happens, e.g., in the MinGW build. */ +#undef open +#undef close #include <fstream> #include <sstream> #include <srchilite/sourcehighlight.h> |