This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]