re PR libfortran/20788 (Loading libgfortran.so clobbers C redirection of stdin/stdout...
authorFrancois-Xavier Coudert <coudert@clipper.ens.fr>
Tue, 10 May 2005 08:34:58 +0000 (10:34 +0200)
committerFrançois-Xavier Coudert <fxcoudert@gcc.gnu.org>
Tue, 10 May 2005 08:34:58 +0000 (08:34 +0000)
PR libfortran/20788
Missing entry from previous commit:
* io/unix.c (fd_to_stream): Add an avoid_mmap argument indicating
we don't we to mmap this stream. Use fd_open instead of mmap_open
in that case.
(open_external): Call fd_to_stream with avoid_mmap = 0.
(input_stream): Call fd_to_stream with avoid_mmap = 1.
(output_stream): Likewise.
(error_stream): Likewise.

Really committing:
* io/read.c (read_f): Accept 'e', 'E', 'd' and 'D' as first
non-blank characters of a real number.

From-SVN: r99508

libgfortran/ChangeLog
libgfortran/io/read.c

index 3da84b68d340b274da2423dc24c900ba4f87f317..496da2ec5333e88655b09b8e23ce702f90e042a0 100644 (file)
@@ -1,3 +1,14 @@
+2005-05-10  Francois-Xavier Coudert  <coudert@clipper.ens.fr>
+
+       PR libfortran/20788
+       * io/unix.c (fd_to_stream): Add an avoid_mmap argument indicating
+       we don't we to mmap this stream. Use fd_open instead of mmap_open
+       in that case.
+       (open_external): Call fd_to_stream with avoid_mmap = 0.
+       (input_stream): Call fd_to_stream with avoid_mmap = 1.
+       (output_stream): Likewise.
+       (error_stream): Likewise.
+
 2005-05-09  Mike Stump  <mrs@apple.com>
 
        * configure: Regenerate.
index 2087ac54aeb758082e5c19c0f67f8b58d72d9851..1c8b3b0daa8d6b6ae3a34a09505c1fd77a9f13cb 100644 (file)
@@ -536,9 +536,11 @@ read_f (fnode * f, char *dest, int length)
 
   exponent_sign = 1;
 
-  /* A digit (or a '.') is required at this point */
+  /* A digit, a '.' or a exponent character ('e', 'E', 'd' or 'D')
+     is required at this point */
 
-  if (!isdigit (*p) && *p != '.')
+  if (!isdigit (*p) && *p != '.' && *p != 'd' && *p != 'D'
+      && *p != 'e' && *p != 'E')
     goto bad_float;
 
   /* Remember the position of the first digit.  */