summaryrefslogtreecommitdiff
path: root/gcc/ada/s-direio.ads
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/ada/s-direio.ads')
-rw-r--r--gcc/ada/s-direio.ads20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/ada/s-direio.ads b/gcc/ada/s-direio.ads
index a43ebb67fc7..3e32c982d42 100644
--- a/gcc/ada/s-direio.ads
+++ b/gcc/ada/s-direio.ads
@@ -6,7 +6,7 @@
-- --
-- S p e c --
-- --
--- Copyright (C) 1992-2006, 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- --
@@ -111,7 +111,6 @@ package System.Direct_IO is
Size : Interfaces.C_Streams.size_t);
procedure Reset (File : in out File_Type; Mode : FCB.File_Mode);
-
procedure Reset (File : in out File_Type);
procedure Set_Index (File : File_Type; To : Positive_Count);
@@ -125,4 +124,21 @@ package System.Direct_IO is
Zeroes : System.Storage_Elements.Storage_Array);
-- Note: Zeroes is the buffer of zeroes used to fill out partial records
+ -- 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 => Reset,
+ External => "",
+ Parameter_Types => (File_Type),
+ Mechanism => Reference);
+ pragma Export_Procedure
+ (Internal => Reset,
+ External => "",
+ Parameter_Types => (File_Type, FCB.File_Mode),
+ Mechanism => (File => Reference));
+
end System.Direct_IO;