From 9cc29fc6f4116e86c5b09ce2915673caec1029b8 Mon Sep 17 00:00:00 2001 From: Thomas Quinot Date: Wed, 27 Oct 2004 15:03:38 +0200 Subject: g-os_lib.ads, [...] (Set_Executable, [...]): New subprograms. 2004-10-26 Thomas Quinot * g-os_lib.ads, g-os_lib.adb (Set_Executable, Set_Writable, Set_Read_Only): New subprograms. These new routines allow the user to set or unset the Owner execute and Owner write permission flags on a file. * makegpr.adb, mlib.adb, mlib-prj.adb: Use GNAT.OS_Lib.Set_Executable instead of rolling our own. From-SVN: r89654 --- gcc/ada/mlib.adb | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'gcc/ada/mlib.adb') diff --git a/gcc/ada/mlib.adb b/gcc/ada/mlib.adb index 8e6d0e3..df8796f 100644 --- a/gcc/ada/mlib.adb +++ b/gcc/ada/mlib.adb @@ -37,8 +37,6 @@ with MLib.Utl; use MLib.Utl; with GNAT.Directory_Operations; use GNAT.Directory_Operations; with GNAT.OS_Lib; use GNAT.OS_Lib; -with System; - package body MLib is ------------------- @@ -107,9 +105,6 @@ package body MLib is To_Dir : constant String := Get_Name_String (To); Interface : Boolean := False; - procedure Set_Readonly (Name : System.Address); - pragma Import (C, Set_Readonly, "__gnat_set_readonly"); - procedure Verbose_Copy (Index : Positive); -- In verbose mode, output a message that the indexed file is copied -- to the destination directory. @@ -264,7 +259,8 @@ package body MLib is Success := Status and Actual_Len = Len + 3; if Success then - Set_Readonly (Name_Buffer'Address); + Set_Read_Only ( + Name_Buffer (1 .. Name_Len - 1)); end if; end if; end if; -- cgit v1.1