[MinGW-Notify] [mingw] #39856: sys/stat.h defines S_IXUSR but not S_IXGRP or S_IXOTH

Back to archive index
MinGW Notification List mingw****@lists*****
Fri Jan 17 09:15:08 JST 2020


#39856: sys/stat.h defines S_IXUSR but not S_IXGRP or S_IXOTH

  Open Date: 2019-12-18 20:16
Last Update: 2020-01-17 00:15

URL for this Ticket:
    https://osdn.net//projects/mingw/ticket/39856
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39856

---------------------------------------------------------------------

Last Changes/Comment on this Ticket:
2020-01-17 00:15 Updated by: keith
 * Status Update from Open to Closed

 * Resolution Update from None to Rejected


Comment:

First, let me make it clear that it was not my choice to define S_IXUSR, (or
the closely related S_IRUSR, S_IWUSR, and S_IRWXU flags), in MinGW's <sys/
stat.h>; the appropriate Microsoft compatible flags are _S_IEXEC, _S_IREAD,
_S_WRITE, and the boolean sum thereof, (or their old, legacy names, without the
leading underscore). That said, the POSIX flags names which are defined do map,
quite well, to the corresponding Microsoft names, which may offer some
justification for having defined them. OTOH, the S_IXGRP, S_IXOTH, S_IRGRP,
S_IROTH, S_IWGRP, S_IWOTH, S_IRWXG, and S_IRWXO flags simply have no viable
corresponding equivalents in the Microsoft Windows world, so there can be no
plausible justification for defining them.

This seems to be closely related to the discussion I had with Steve Kargl, on
GCC Bugzilla. That was, ultimately, resolved in favour of not defining these
flags, in MinGW headers, but rather adapting libgfortran to recognize that they
have no place on this platform; I see no reason to reverse this decision now.
In fact, from my viewpoint, the compiler errors when you try to compile code
which gratuitously uses them, provides a valuable clue that you need to modify
the application code, to make it portable.



---------------------------------------------------------------------
Ticket Status:

      Reporter: cbiesinger_g
         Owner: (None)
          Type: Issues
        Status: Closed
      Priority: 5 - Medium
     MileStone: (None)
     Component: WSL
      Severity: 5 - Medium
    Resolution: Rejected
---------------------------------------------------------------------

Ticket details:

sys/stat.h in MinGW only defines S_IXUSR but not S_IXOTH or S_IXGRP. Why not? A
number of program use those bits and thus can't be compiled with mingw.



-- 
Ticket information of MinGW - Minimalist GNU for Windows project
MinGW - Minimalist GNU for Windows Project is hosted on OSDN

Project URL: https://osdn.net/projects/mingw/
OSDN: https://osdn.net

URL for this Ticket:
    https://osdn.net/projects/mingw/ticket/39856
RSS feed for this Ticket:
    https://osdn.net/ticket/ticket_rss.php?group_id=3917&tid=39856



More information about the MinGW-Notify mailing list
Back to archive index