diff options
author | Robert Mason <rbmj@verizon.net> | 2012-05-23 08:52:09 +0000 |
---|---|---|
committer | Tobias Burnus <burnus@gcc.gnu.org> | 2012-05-23 10:52:09 +0200 |
commit | b8ce6b9cc0db94756438606b8bae88d14f14f668 (patch) | |
tree | c8b9a133380c614c48743cb758fae6bbe449faac | |
parent | 4179e59afafbe4c5eb00b0a82da11db7cc5a1a8c (diff) | |
download | gcc-b8ce6b9cc0db94756438606b8bae88d14f14f668.zip gcc-b8ce6b9cc0db94756438606b8bae88d14f14f668.tar.gz gcc-b8ce6b9cc0db94756438606b8bae88d14f14f668.tar.bz2 |
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
-rw-r--r-- | libgfortran/ChangeLog | 6 | ||||
-rw-r--r-- | libgfortran/intrinsics/chmod.c | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index 12cf5f1..e5f79e0 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -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 diff --git a/libgfortran/intrinsics/chmod.c b/libgfortran/intrinsics/chmod.c index 9156303..e8a81d5 100644 --- a/libgfortran/intrinsics/chmod.c +++ b/libgfortran/intrinsics/chmod.c @@ -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) |