summaryrefslogtreecommitdiffstats
path: root/gcc/ada/a-ststio.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 10:14:25 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2008-05-27 10:14:25 +0000
commite24843bcaa8ea853207a7162dd3d876feaf799b8 (patch)
treef8477ecfb2c883ca1bd8ae86692e823bda30959f /gcc/ada/a-ststio.adb
parent9f8bf1ca3a2d61719fb8c9ab3fc48d7727f140c8 (diff)
downloadppe42-gcc-e24843bcaa8ea853207a7162dd3d876feaf799b8.tar.gz
ppe42-gcc-e24843bcaa8ea853207a7162dd3d876feaf799b8.zip
2008-05-27 Thomas Quinot <quinot@adacore.com>
(System.File_IO.{Close, Delete, Reset}): Change File parameter from "in out AFCB_Ptr" to "access AFCB_Ptr". (Ada.*_IO.{Close, Delete, Reset, Set_Mode}): Pass File parameter by reference. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@136002 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-ststio.adb')
-rw-r--r--gcc/ada/a-ststio.adb17
1 files changed, 13 insertions, 4 deletions
diff --git a/gcc/ada/a-ststio.adb b/gcc/ada/a-ststio.adb
index 6b8376489ad..fd5e39a7a32 100644
--- a/gcc/ada/a-ststio.adb
+++ b/gcc/ada/a-ststio.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2007, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, 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- --
@@ -101,8 +101,11 @@ package body Ada.Streams.Stream_IO is
-----------
procedure Close (File : in out File_Type) is
+ AFCB : aliased AP;
+ for AFCB'Address use File'Address;
+ pragma Import (Ada, AFCB);
begin
- FIO.Close (AP (File));
+ FIO.Close (AFCB'Access);
end Close;
------------
@@ -137,8 +140,11 @@ package body Ada.Streams.Stream_IO is
------------
procedure Delete (File : in out File_Type) is
+ AFCB : aliased AP;
+ for AFCB'Address use File'Address;
+ pragma Import (Ada, AFCB);
begin
- FIO.Delete (AP (File));
+ FIO.Delete (AFCB'Access);
end Delete;
-----------------
@@ -351,6 +357,9 @@ package body Ada.Streams.Stream_IO is
--------------
procedure Set_Mode (File : in out File_Type; Mode : File_Mode) is
+ AFCB : aliased AP;
+ for AFCB'Address use File'Address;
+ pragma Import (Ada, AFCB);
begin
FIO.Check_File_Open (AP (File));
@@ -362,7 +371,7 @@ package body Ada.Streams.Stream_IO is
if ((File.Mode = FCB.In_File) /= (Mode = In_File))
and then not File.Update_Mode
then
- FIO.Reset (AP (File), FCB.Inout_File);
+ FIO.Reset (AFCB'Access, FCB.Inout_File);
File.Update_Mode := True;
end if;
OpenPOWER on IntegriCloud