aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2013-12-02 11:09:24 +0000
committerPedro Alves <palves@redhat.com>2013-12-02 11:09:24 +0000
commit840207d8ee5249c11463baaf5fb37c44595c4f00 (patch)
treedd4dc82a14fd03297d900d281160c4866eff0953 /gdb
parent0fdf84ca4b795a8993faa9b67d0acccae2390b03 (diff)
downloadgdb-840207d8ee5249c11463baaf5fb37c44595c4f00.zip
gdb-840207d8ee5249c11463baaf5fb37c44595c4f00.tar.gz
gdb-840207d8ee5249c11463baaf5fb37c44595c4f00.tar.bz2
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.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/ChangeLog5
-rw-r--r--gdb/ctf.c13
2 files changed, 6 insertions, 12 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 3d8ed20..ca2ca0e 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@
+2013-12-02 Pedro Alves <palves@redhat.com>
+
+ * ctf.c (ctf_start): Use S_IRGRP, S_IXGRP, S_IXOTH
+ unconditionally.
+
2013-12-02 Pedro Alves <pedro@codesourcery.com>
Maciej W. Rozycki <macro@codesourcery.com>
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)