This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MinGW-w64]Build gdb/ctf.c failed
- From: Yao Qi <yao at codesourcery dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: <ktietz70 at googlemail dot com>, <asmwarrior at gmail dot com>, <tromey at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Mon, 25 Mar 2013 18:49:12 +0800
- Subject: Re: [MinGW-w64]Build gdb/ctf.c failed
- References: <83ip4s4ixc dot fsf at gnu dot org> <1363407692-18959-1-git-send-email-yao at codesourcery dot com> <1363407692-18959-4-git-send-email-yao at codesourcery dot com> <CADPb22RwSq0iv_gQu5PSGezQoUy0ve16M2hmL51HvM19v0M5Ow at mail dot gmail dot com> <51492077 dot 30307 at codesourcery dot com> <83sj3qyogk dot fsf at gnu dot org> <87vc8m7z1d dot fsf at fleche dot redhat dot com> <514FA117 dot 9030604 at gmail dot com> <83hajz3oef dot fsf at gnu dot org> <CAEwic4Y020-LqwtNeYFXn3oQvk5fWBFm1T5ZoAmwqPSpD=PASg at mail dot gmail dot com> <515009B1 dot 5030500 at codesourcery dot com> <838v5b3mcx dot fsf at gnu dot org>
On 03/25/2013 04:38 PM, Eli Zaretskii wrote:
> I think you should "#undef mkdir" before redefining it, to be
> absolutely safe here.
Added.
>
> Other than that, I'm OK with this.
Check in the patch below.
--
Yao (éå)
gdb:
2013-03-25 Yao Qi <yao@codesourcery.com>
* ctf.c [USE_WIN32API]: Undef 'mkdir' and use 'mkdir'
instead of '_mkdir'.
---
gdb/ctf.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gdb/ctf.c b/gdb/ctf.c
index d160f63..6b68239 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -296,7 +296,8 @@ ctf_target_save (struct trace_file_writer *self,
}
#ifdef USE_WIN32API
-#define mkdir(pathname, mode) _mkdir (pathname)
+#undef mkdir
+#define mkdir(pathname, mode) mkdir (pathname)
#endif
/* This is the implementation of trace_file_write_ops method
--
1.7.7.6