summaryrefslogtreecommitdiffstats
path: root/gcc/ada/a-direio.ads
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-direio.ads
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-direio.ads')
-rw-r--r--gcc/ada/a-direio.ads26
1 files changed, 26 insertions, 0 deletions
diff --git a/gcc/ada/a-direio.ads b/gcc/ada/a-direio.ads
index 6ac1a8a95b6..70ff5ed3ca9 100644
--- a/gcc/ada/a-direio.ads
+++ b/gcc/ada/a-direio.ads
@@ -138,6 +138,32 @@ package Ada.Direct_IO is
Data_Error : exception renames IO_Exceptions.Data_Error;
private
+
+ -- The following procedures have a File_Type formal of mode IN OUT because
+ -- they may close the original file. The Close operation may raise an
+ -- exception, but in that case we want any assignment to the formal to
+ -- be effective anyway, so it must be passed by reference (or the caller
+ -- will be left with a dangling pointer).
+
+ pragma Export_Procedure
+ (Internal => Close,
+ External => "",
+ Mechanism => Reference);
+ pragma Export_Procedure
+ (Internal => Delete,
+ External => "",
+ Mechanism => Reference);
+ pragma Export_Procedure
+ (Internal => Reset,
+ External => "",
+ Parameter_Types => (File_Type),
+ Mechanism => Reference);
+ pragma Export_Procedure
+ (Internal => Reset,
+ External => "",
+ Parameter_Types => (File_Type, File_Mode),
+ Mechanism => (File => Reference));
+
type File_Type is new System.Direct_IO.File_Type;
Bytes : constant Interfaces.C_Streams.size_t :=
OpenPOWER on IntegriCloud