re PR libfortran/53445 (No sticky bit on VxWorks - fix chmod.c)

2012-05-23  Robert Mason  <rbmj@verizon.net>
            Tobias Burnus  <burnus@net-b.de>

        PR libfortran/53445
        * intrinsics/chmod.c (chmod_func): Ignore S_ISVTX on VxWorks.


Co-Authored-By: Tobias Burnus <burnus@net-b.de>

From-SVN: r187797
This commit is contained in:
Robert Mason 2012-05-23 08:52:09 +00:00 committed by Tobias Burnus
parent 4179e59afa
commit b8ce6b9cc0
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2012-05-23 Robert Mason <rbmj@verizon.net>
Tobias Burnus <burnus@net-b.de>
PR libfortran/53445
* intrinsics/chmod.c (chmod_func): Ignore S_ISVTX on VxWorks.
2012-05-23 Tobias Burnus <burnus@net-b.de>
PR libfortran/53444

View File

@ -459,17 +459,19 @@ clause_done:
if ((ugo[2] || honor_umask) && !rwxXstugo[8])
file_mode = (file_mode & ~(S_IROTH | S_IWOTH | S_IXOTH))
| (new_mode & (S_IROTH | S_IWOTH | S_IXOTH));
#ifndef __VXWORKS__
if (is_dir && rwxXstugo[5])
file_mode |= S_ISVTX;
else if (!is_dir)
file_mode &= ~S_ISVTX;
#endif
#endif
}
else if (set_mode == 2)
{
/* Clear '-'. */
file_mode &= ~new_mode;
#ifndef __MINGW32__
#if !defined( __MINGW32__) && !defined (__VXWORKS__)
if (rwxXstugo[5] || !is_dir)
file_mode &= ~S_ISVTX;
#endif
@ -477,7 +479,7 @@ clause_done:
else if (set_mode == 3)
{
file_mode |= new_mode;
#ifndef __MINGW32__
#if !defined (__MINGW32__) && !defined (__VXWORKS__)
if (rwxXstugo[5] && is_dir)
file_mode |= S_ISVTX;
else if (!is_dir)