OSDN Git Service

2012-05-23 Robert Mason <rbmj@verizon.net>
authorburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 May 2012 08:52:09 +0000 (08:52 +0000)
committerburnus <burnus@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 23 May 2012 08:52:09 +0000 (08:52 +0000)
            Tobias Burnus  <burnus@net-b.de>

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

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187797 138bc75d-0d04-0410-961f-82ee72b054a4

libgfortran/ChangeLog
libgfortran/intrinsics/chmod.c

index 12cf5f1..e5f79e0 100644 (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
index 9156303..e8a81d5 100644 (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)