summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-11-15 19:29:15 +0000
committerPedro Alves <palves@redhat.com>2016-11-17 03:08:18 +0000
commit00a902b472fb0fc6628520f27cf83c647c6413ab (patch)
treefbcbaaa48bb2649db8f69880308c6132b9f1169e
parent3b9af7e81def124519b6e4b18d49755d638097df (diff)
downloadbinutils-gdb-00a902b472fb0fc6628520f27cf83c647c6413ab.tar.gz
gdb/ctf.c: Get rid of mkdir redefinition
Making GDB use gnulib's C++ namespace support shows this build error on mingw: ../../src/gdb/ctf.c: In function 'void ctf_start(trace_file_writer*, const char*)': ../../src/gdb/ctf.c:309:46: error: no match for call to '(const gnulib::_gl_mkdir_wrapper) (const char*&)' #define mkdir(pathname, mode) mkdir (pathname) ^ ../../src/gdb/ctf.c:327:15: note: in expansion of macro 'mkdir' if (gnulib::mkdir (dirname, hmode) && errno != EEXIST) ^ ../../src/gdb/ctf.c:309:46: note: candidate: gnulib::_gl_mkdir_wrapper::type {aka int (*)(const char*, short unsigned int)} <conversion> #define mkdir(pathname, mode) mkdir (pathname) ^ ../../src/gdb/ctf.c:327:15: note: in expansion of macro 'mkdir' if (gnulib::mkdir (dirname, hmode) && errno != EEXIST) ^ ../../src/gdb/ctf.c:309:46: note: candidate expects 3 arguments, 2 provided #define mkdir(pathname, mode) mkdir (pathname) ^ ../../src/gdb/ctf.c:327:15: note: in expansion of macro 'mkdir' if (gnulib::mkdir (dirname, hmode) && errno != EEXIST) ^ The problem is the mkdir define. We can just remove it, since gnulib's replacement already takes care of this prototype difference detail.
-rw-r--r--gdb/ctf.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/gdb/ctf.c b/gdb/ctf.c
index 7daa47e28a4..2091b8da422 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -304,11 +304,6 @@ ctf_target_save (struct trace_file_writer *self,
return 0;
}
-#ifdef USE_WIN32API
-#undef mkdir
-#define mkdir(pathname, mode) mkdir (pathname)
-#endif
-
/* This is the implementation of trace_file_write_ops method
start. It creates the directory DIRNAME, metadata and datastream
in the directory. */