Re: [MinGW-w64]Build gdb/ctf.c failed

Yao Qi
2013-03-25T10:50:45Z

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