This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [commit/obvious] Remove last traces of gdb_stat.h.
- From: Pedro Alves <palves at redhat dot com>
- To: Joel Brobecker <brobecker at adacore dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 02 Dec 2013 10:02:16 +0000
- Subject: Re: [commit/obvious] Remove last traces of gdb_stat.h.
- Authentication-results: sourceware.org; auth=none
- References: <1385953689-12594-1-git-send-email-brobecker at adacore dot com>
On 12/02/2013 03:08 AM, Joel Brobecker wrote:
> @@ -320,7 +320,7 @@ ctf_start (struct trace_file_writer *self, const char *dirname)
> #ifdef S_IXGRP
> | S_IXGRP
> #endif
Hmm, I think those #ifdef's are no longer necessary too.
-------
gnulib's sys/stat.h always defines S_IRGRP, S_IXGRP, S_IXOTH.
Confirmed that cross building a mingw gdb still works, and also made
sure it was gnulib's sys/stat.h that was defining the values, by
hacking the header with #errors where the macros are defined.
gdb/
2013-12-02 Pedro Alves <palves@redhat.com>
* ctf.c (ctf_start): Use S_IRGRP, S_IXGRP, S_IXOTH
unconditionally.
---
gdb/ctf.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/gdb/ctf.c b/gdb/ctf.c
index dcc4eb8..b886d67 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -313,18 +313,7 @@ ctf_start (struct trace_file_writer *self, const char *dirname)
struct ctf_trace_file_writer *writer
= (struct ctf_trace_file_writer *) self;
int i;
- mode_t hmode = S_IRUSR | S_IWUSR | S_IXUSR
-#ifdef S_IRGRP
- | S_IRGRP
-#endif
-#ifdef S_IXGRP
- | S_IXGRP
-#endif
- | S_IROTH
-#ifdef S_IXOTH
- | S_IXOTH
-#endif
- ;
+ mode_t hmode = S_IRUSR | S_IWUSR | S_IXUSR | S_IRGRP | S_IXGRP | S_IROTH;
/* Create DIRNAME. */
if (mkdir (dirname, hmode) && errno != EEXIST)