summaryrefslogtreecommitdiff
path: root/libgfortran/configure
diff options
context:
space:
mode:
authorjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-22 20:44:32 +0000
committerjb <jb@138bc75d-0d04-0410-961f-82ee72b054a4>2011-12-22 20:44:32 +0000
commitec55604a1cb0e41cfe5d999983d7f512cf23ddd8 (patch)
treeb51c2b0e0174c8fedc4a4c39e1f7692f16814598 /libgfortran/configure
parented845d9d6d471baa1a22124a5465dfa9d9c4801a (diff)
downloadgcc-ec55604a1cb0e41cfe5d999983d7f512cf23ddd8.tar.gz
PR 51646 Use POSIX mode flags in open() argument.
2011-12-22 Janne Blomqvist <jb@gcc.gnu.org> Tobias Burnus <burnus@net-b.de> PR libfortran/51646 * acinclude.m4 (LIBGFOR_CHECK_UNLINK_OPEN_FILE): Use POSIX mode flags, omit mode argument when flags argument does not have O_CREAT. * io/unix.c (tempfile): Use POSIX mode flags. * configure: Regenerate. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@182638 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran/configure')
-rwxr-xr-xlibgfortran/configure4
1 files changed, 2 insertions, 2 deletions
diff --git a/libgfortran/configure b/libgfortran/configure
index 6ae1f09f48c..3ce3d08ae89 100755
--- a/libgfortran/configure
+++ b/libgfortran/configure
@@ -25598,7 +25598,7 @@ int main ()
{
int fd;
- fd = open ("testfile", O_RDWR | O_CREAT, S_IWRITE | S_IREAD);
+ fd = open ("testfile", O_RDWR | O_CREAT, S_IWUSR | S_IRUSR);
if (fd <= 0)
return 0;
if (unlink ("testfile") == -1)
@@ -25606,7 +25606,7 @@ int main ()
write (fd, "This is a test\n", 15);
close (fd);
- if (open ("testfile", O_RDONLY, S_IWRITE | S_IREAD) == -1 && errno == ENOENT)
+ if (open ("testfile", O_RDONLY) == -1 && errno == ENOENT)
return 0;
else
return 1;