This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH][DJGPP][libgfortran] Do not use S_ISVTX for DJGPP in libfortran/intrinsic/chmod.c
- From: Andris Pavenis <andris dot pavenis at iki dot fi>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>, DJ Delorie <dj at delorie dot com>
- Date: Sun, 15 Nov 2015 20:14:34 +0200
- Subject: [PATCH][DJGPP][libgfortran] Do not use S_ISVTX for DJGPP in libfortran/intrinsic/chmod.c
- Authentication-results: sourceware.org; auth=none
DJGPP do not have S_ISVTX defined. Therefore its use should be avoided.
Attached patch updates existing preprocessor conditional constructions
not to use S_ISVTX also for DJGPP
Andris
2015-11-15 Andris Pavenis <andris.pavenis@iki.fi>
* libgfortran/intrinsics/chmod.c (chmod_internal): do not use S_ISVTX for DJGPP target
>From 09606704601c67d87ab69c0ee1da140b8f2d984d Mon Sep 17 00:00:00 2001
From: Andris Pavenis <andris.pavenis@iki.fi>
Date: Sat, 14 Nov 2015 19:37:36 +0200
Subject: [PATCH] [DJGPP] libgfortran/intrinsic/chmod.c: avoid using S_ISVTX
for DJGPP
---
libgfortran/intrinsics/chmod.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libgfortran/intrinsics/chmod.c b/libgfortran/intrinsics/chmod.c
index 1fffa3d..482a8a6 100644
--- a/libgfortran/intrinsics/chmod.c
+++ b/libgfortran/intrinsics/chmod.c
@@ -451,7 +451,7 @@ 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 !defined(__VXWORKS__) && !defined(__DJGPP__)
if (is_dir && rwxXstugo[5])
file_mode |= S_ISVTX;
else if (!is_dir)
@@ -463,7 +463,7 @@ clause_done:
{
/* Clear '-'. */
file_mode &= ~new_mode;
-#if !defined( __MINGW32__) && !defined (__VXWORKS__)
+#if !defined( __MINGW32__) && !defined (__VXWORKS__) && !defined(__DJGPP__)
if (rwxXstugo[5] || !is_dir)
file_mode &= ~S_ISVTX;
#endif
@@ -471,7 +471,7 @@ clause_done:
else if (set_mode == 3)
{
file_mode |= new_mode;
-#if !defined (__MINGW32__) && !defined (__VXWORKS__)
+#if !defined (__MINGW32__) && !defined (__VXWORKS__) && !defined(__DJGPP__)
if (rwxXstugo[5] && is_dir)
file_mode |= S_ISVTX;
else if (!is_dir)
--
2.4.3