Fix preprocessor conditional

Message ID 1433841679-12499-1-git-send-email-gbenson@redhat.com
State New, archived
Headers

Commit Message

Gary Benson June 9, 2015, 9:21 a.m. UTC
  Hi all,

This commit fixes a typo in common/fileio.c where S_IWGRP was
misspelled as S_IWRGRP in a preprocessor conditional, causing
Host-I/O "vFile:fstat:" and File-I/O "Fstat" and "Ffstat"
responses to always indicate files were not group-writable
regardless of their actual status.

Pushed as obvious.

Thanks,
Gary

---
 gdb/ChangeLog       |    5 +++++
 gdb/common/fileio.c |    2 +-
 2 files changed, 6 insertions(+), 1 deletions(-)
  

Comments

Gary Benson June 9, 2015, 12:24 p.m. UTC | #1
This commit does have a ChangeLog entry; for some reason the
script I'm using didn't pick it up for the commit message :(

Gary Benson wrote:
> Hi all,
> 
> This commit fixes a typo in common/fileio.c where S_IWGRP was
> misspelled as S_IWRGRP in a preprocessor conditional, causing
> Host-I/O "vFile:fstat:" and File-I/O "Fstat" and "Ffstat"
> responses to always indicate files were not group-writable
> regardless of their actual status.
> 
> Pushed as obvious.
> 
> Thanks,
> Gary
> 
> ---
>  gdb/ChangeLog       |    5 +++++
>  gdb/common/fileio.c |    2 +-
>  2 files changed, 6 insertions(+), 1 deletions(-)
> 
> diff --git a/gdb/common/fileio.c b/gdb/common/fileio.c
> index 28335ec..ef00ea8 100644
> --- a/gdb/common/fileio.c
> +++ b/gdb/common/fileio.c
> @@ -132,7 +132,7 @@ fileio_mode_pack (mode_t mode)
>    if (mode & S_IRGRP)
>      tmode |= FILEIO_S_IRGRP;
>  #endif
> -#ifdef S_IWRGRP
> +#ifdef S_IWGRP
>    if (mode & S_IWGRP)
>      tmode |= FILEIO_S_IWGRP;
>  #endif
> -- 
> 1.7.1
  

Patch

diff --git a/gdb/common/fileio.c b/gdb/common/fileio.c
index 28335ec..ef00ea8 100644
--- a/gdb/common/fileio.c
+++ b/gdb/common/fileio.c
@@ -132,7 +132,7 @@  fileio_mode_pack (mode_t mode)
   if (mode & S_IRGRP)
     tmode |= FILEIO_S_IRGRP;
 #endif
-#ifdef S_IWRGRP
+#ifdef S_IWGRP
   if (mode & S_IWGRP)
     tmode |= FILEIO_S_IWGRP;
 #endif