summaryrefslogtreecommitdiff
path: root/gcc/ada/s-os_lib.ads
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-27 13:06:06 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-10-27 13:06:06 +0000
commita18832dd17dad648ef0f20441e821bf91ffc1711 (patch)
tree0214bfd0d71f1fd62a7120a78eeb8925bd3ed168 /gcc/ada/s-os_lib.ads
parentec2886ede5e6f9ae7c323db49b85c7d7d128086a (diff)
downloadgcc-a18832dd17dad648ef0f20441e821bf91ffc1711.tar.gz
2009-10-27 Arnaud Charlet <charlet@adacore.com>
* exp_aggr.adb: Fix comment. 2009-10-27 Emmanuel Briot <briot@adacore.com> * prj-err.adb (Error_Msg): take into account continuation lines when computing whether we have a warning. 2009-10-27 Vasiliy Fofanov <fofanov@adacore.com> * make.adb, s-os_lib.adb, s-os_lib.ads (Create_Temp_Output_File): New routine that is designed to create temp file descriptor specifically for redirecting an output stream. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@153591 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/s-os_lib.ads')
-rwxr-xr-xgcc/ada/s-os_lib.ads24
1 files changed, 21 insertions, 3 deletions
diff --git a/gcc/ada/s-os_lib.ads b/gcc/ada/s-os_lib.ads
index b77b3f01266..034a7f06943 100755
--- a/gcc/ada/s-os_lib.ads
+++ b/gcc/ada/s-os_lib.ads
@@ -245,9 +245,27 @@ package System.OS_Lib is
Name : out String_Access);
-- Create and open for writing a temporary file in the current working
-- directory. The name of the file and the File Descriptor are returned.
- -- No mode parameter is provided. Since this is a temporary file, there is
- -- no point in doing text translation on it. It is the responsibility of
- -- the caller to deallocate the access value returned in Name.
+ -- It is the responsibility of the caller to deallocate the access value
+ -- returned in Name.
+ --
+ -- The file is opened in binary mode (no text translation).
+ --
+ -- This procedure will always succeed if the current working directory is
+ -- writable. If the current working directory is not writable, then
+ -- Invalid_FD is returned for the file descriptor and null for the Name.
+ -- There is no race condition problem between processes trying to create
+ -- temp files at the same time in the same directory.
+
+ procedure Create_Temp_Output_File
+ (FD : out File_Descriptor;
+ Name : out String_Access);
+ -- Create and open for writing a temporary file in the current working
+ -- directory suitable to redirect standard output. The name of the file
+ -- and the File Descriptor are returned.
+ -- It is the responsibility of the caller to deallocate the access value
+ -- returned in Name.
+ --
+ -- The file is opened in the mode specified by the With_Mode parameter.
--
-- This procedure will always succeed if the current working directory is
-- writable. If the current working directory is not writable, then