Commit b8ce6b9c by Robert Mason Committed by Tobias Burnus

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
parent 4179e59a
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
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment