aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libgfortran/ChangeLog4
-rw-r--r--libgfortran/io/unix.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 35f21d9..79e8f9b 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,7 @@
+2005-08-04 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ * io/unix.c: Add O_RDWR to open() call.
+
2005-08-04 Paul Thomas <pault@gcc.gnu.org>
* transfer.c (data_transfer_init): Truncate file in
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index b35182d..56df254 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -998,7 +998,7 @@ tempfile (void)
if (mktemp (template))
do
- fd = open (template, O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
+ fd = open (template, O_RDWR |O_CREAT | O_EXCL, S_IREAD | S_IWRITE);
while (!(fd == -1 && errno == EEXIST) && mktemp (template));
else
fd = -1;