From: Eli Zaretskii Date: Tue, 12 Mar 2019 17:47:23 +0000 (+0200) Subject: Fix MinGW build with source-highlight X-Git-Tag: binutils-2_33~1876 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a3508220eecf27e1952a73cd3ea6d6314ce8e1d;p=external%2Fbinutils.git Fix MinGW build with source-highlight gdb/ChangeLog 2019-03-12 Eli Zaretskii PR/24325 * source-cache.c: #undef open and close, to avoid unresolved externals during linking. --- 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 + + PR/24325 + * source-cache.c: #undef open and close, to avoid unresolved + externals during linking. + 2019-03-12 Tom Tromey * 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 + 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 #include #include