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.
This commit is contained in:
Eli Zaretskii 2019-03-12 19:47:23 +02:00
parent ffdd69cf78
commit 3a3508220e
2 changed files with 12 additions and 0 deletions

View File

@ -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

View File

@ -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>