summaryrefslogtreecommitdiff
path: root/libgfortran
diff options
context:
space:
mode:
authorfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-09 11:21:01 +0000
committerfxcoudert <fxcoudert@138bc75d-0d04-0410-961f-82ee72b054a4>2005-05-09 11:21:01 +0000
commit8f45276f12aea60fbe58745832a92050effde500 (patch)
tree7986eb5beb061270c1c86ffeaa510692657c6378 /libgfortran
parent3bcb100d435198326198cea3af9341f44e3ceaee (diff)
downloadgcc-8f45276f12aea60fbe58745832a92050effde500.tar.gz
PR libfortran/19155
* io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first non-blank characters of a real number. * gfortran.dg/pr19155.f: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99424 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgfortran')
-rw-r--r--libgfortran/ChangeLog6
-rw-r--r--libgfortran/io/unix.c15
2 files changed, 15 insertions, 6 deletions
diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog
index 3e0b3613c5d..c91b98cb4ae 100644
--- a/libgfortran/ChangeLog
+++ b/libgfortran/ChangeLog
@@ -1,3 +1,9 @@
+2005-05-09 Francois-Xavier Coudert <coudert@clipper.ens.fr>
+
+ PR libfortran/19155
+ * io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first
+ non-blank characters of a real number.
+
2005-05-04 Thomas Koenig <Thomas.Koenig@online.de>
PR libfortran/21354
diff --git a/libgfortran/io/unix.c b/libgfortran/io/unix.c
index 78ed0f718f8..865eb68caf8 100644
--- a/libgfortran/io/unix.c
+++ b/libgfortran/io/unix.c
@@ -892,7 +892,7 @@ open_internal (char *base, int length)
* around it. */
static stream *
-fd_to_stream (int fd, int prot)
+fd_to_stream (int fd, int prot, int avoid_mmap)
{
struct stat statbuf;
unix_stream *s;
@@ -911,7 +911,10 @@ fd_to_stream (int fd, int prot)
s->file_length = S_ISREG (statbuf.st_mode) ? statbuf.st_size : -1;
#if HAVE_MMAP
- mmap_open (s);
+ if (avoid_mmap)
+ fd_open (s);
+ else
+ mmap_open (s);
#else
fd_open (s);
#endif
@@ -1153,7 +1156,7 @@ open_external (unit_flags *flags)
internal_error ("open_external(): Bad action");
}
- return fd_to_stream (fd, prot);
+ return fd_to_stream (fd, prot, 0);
}
@@ -1163,7 +1166,7 @@ open_external (unit_flags *flags)
stream *
input_stream (void)
{
- return fd_to_stream (STDIN_FILENO, PROT_READ);
+ return fd_to_stream (STDIN_FILENO, PROT_READ, 1);
}
@@ -1173,7 +1176,7 @@ input_stream (void)
stream *
output_stream (void)
{
- return fd_to_stream (STDOUT_FILENO, PROT_WRITE);
+ return fd_to_stream (STDOUT_FILENO, PROT_WRITE, 1);
}
@@ -1183,7 +1186,7 @@ output_stream (void)
stream *
error_stream (void)
{
- return fd_to_stream (STDERR_FILENO, PROT_WRITE);
+ return fd_to_stream (STDERR_FILENO, PROT_WRITE, 1);
}
/* init_error_stream()-- Return a pointer to the error stream. This