From f235fedee9919b7396c17f2a16f6b8d0f79ee87f Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 4 Oct 2010 15:07:59 +0000 Subject: 2010-10-04 Vincent Celier * a-direct.adb (Copy_File): Interpret the Form parameter and call System.OS_Lib.Copy_File to do the work accordingly. Raise Use_Error if the Form parameter contains an incorrect value for field preserve= or mode=. * a-direct.ads (Create_Directory, Create_Path): Indicate that the Form parameter is ignored. (Copy_File): Indicate the interpretation of the Form parameter. 2010-10-04 Vincent Celier * make.adb (Gnatmake): When there are no foreign languages declared and a main in attribute Main of the main project does not exist or is a source of another project, fail immediately before attempting compilation. 2010-10-04 Javier Miranda * exp_disp.ads (Convert_Tag_To_Interface): New function which must be used to convert a node referencing a tag to a class-wide interface type. * exp_disp.adb (Convert_Tag_To_Interface): New function. (Expand_Interface_Conversion): Replace invocation of Unchecked_Conversion by new function Convert_Tag_To_Interface. (Write_DT): Add support for null primitives. * exp_ch3.adb (Expand_N_Object_Declaration): For tagged type objects, cleanup code that handles interface conversions and avoid unchecked conversion of referenced tag components. * exp_ch5.adb (Expand_N_Assignment_Statement): Code cleanup. Avoid unrequired conversions when generating a dispatching call to _assign. * sprint.adb (Write_Itype): Fix wrong output of not null access itypes. 2010-10-04 Ed Schonberg * exp_ch4.adb (Expand_N_Op_Not): Handle properly both operands when the parent is a binary boolean operation and the operand is an unpacked array. (Build_Boolean_Array_Proc_Call): If the operands are both negations, the operands of the rewritten node are the operands of the negations, not the negations themselves. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164942 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/a-direct.ads | 41 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 40 insertions(+), 1 deletion(-) (limited to 'gcc/ada/a-direct.ads') diff --git a/gcc/ada/a-direct.ads b/gcc/ada/a-direct.ads index 25652704f03..ddabed6fc33 100644 --- a/gcc/ada/a-direct.ads +++ b/gcc/ada/a-direct.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2004-2009, Free Software Foundation, Inc. -- +-- Copyright (C) 2004-2010, Free Software Foundation, Inc. -- -- -- -- This specification is derived for use with GNAT from AI-00248, which is -- -- expected to be a part of a future expected revised Ada Reference Manual. -- @@ -104,6 +104,8 @@ package Ada.Directories is -- identification of a directory. The exception Use_Error is propagated if -- the external environment does not support the creation of a directory -- with the given name (in the absence of Name_Error) and form. + -- + -- The Form parameter is ignored. procedure Delete_Directory (Directory : String); -- Deletes an existing empty directory with name Directory. The exception @@ -129,6 +131,8 @@ package Ada.Directories is -- The exception Use_Error is propagated if the external environment does -- not support the creation of any directories with the given name (in the -- absence of Name_Error) and form. + -- + -- The Form parameter is ignored. procedure Delete_Tree (Directory : String); -- Deletes an existing directory with name Directory. The directory and @@ -172,6 +176,41 @@ package Ada.Directories is -- not support the creating of the file with the name given by Target_Name -- and form given by Form, or copying of the file with the name given by -- Source_Name (in the absence of Name_Error). + -- + -- Interpretation of the Form parameter: + -- The Form parameter is case-insensitive. + -- Two fields are recognized in the Form parameter: + -- preserve= + -- mode= + -- starts immediatey after the character '=' and ends with the + -- character immediatey preceding the next comma (',') or with the last + -- character of the parameter. + -- The only possible values for preserve= are: + -- no_attributes: do not try to preserve any file attributes. This is + -- the default if no preserve= is found in Form. + -- all_attributes: try to preserve all file attributes (timestamps, + -- access rights). + -- timestamps: preserve the timestamp of the copied file, but not the + -- other file attributes. + -- The only possible values for mode= are: + -- copy: only do the copy if the destination file does not already + -- exist. If it already exist, Copy_File fails. + -- overwrite: copy the file in all cases. Overwite an aready existing + -- destination file. + -- append: append the original file to the destination file. If the + -- destination file does not exist, the destination file is + -- a copy of the source file. + -- When mode=append, the field preserve=, if it exists, is not + -- taken into account. + -- If the Form parameter includes one or both of the fields and the value + -- or values are incorrect, Copy_file fails with Use_Error. + -- Examples of correct Forms: + -- Form => "preserve=no_attributes,mode=overwrite" (the default) + -- Form => "mode=append" + -- Form => "mode=copy, preserve=all_attributes" + -- Examples of incorrect Forms + -- Form => "preserve=junk" + -- Form => "mode=internal, preserve=timestamps" ---------------------------------------- -- File and directory name operations -- -- cgit v1.2.1