diff options
Diffstat (limited to 'gcc/ada/a-textio.adb')
-rw-r--r-- | gcc/ada/a-textio.adb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/a-textio.adb b/gcc/ada/a-textio.adb index 98766ce9bf3..7afb804ff9c 100644 --- a/gcc/ada/a-textio.adb +++ b/gcc/ada/a-textio.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2003 Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2004 Free Software Foundation, Inc. -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1678,8 +1678,12 @@ package body Ada.Text_IO is -- because it is too much of a nuisance to have these odd line -- feeds when nothing has been written to the file. + -- We also avoid this for files opened in append mode, in + -- accordance with (RM A.8.2(10)) + elsif (File /= Standard_Err and then File /= Standard_Out) and then (File.Line = 1 and then File.Page = 1) + and then Mode (File) = Out_File then New_Line (File); end if; |