aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-os_lib.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2008-08-04 14:35:08 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-04 14:35:08 +0200
commitd559d5c686f2db3fedc2c2b1ec6a7027c03b772e (patch)
tree4f87dac202e6aafa0b52499817b743d57f1625d2 /gcc/ada/s-os_lib.adb
parenta0ac393230b56069de1b28b7fea89ac0dfc708e2 (diff)
downloadgcc-d559d5c686f2db3fedc2c2b1ec6a7027c03b772e.zip
gcc-d559d5c686f2db3fedc2c2b1ec6a7027c03b772e.tar.gz
gcc-d559d5c686f2db3fedc2c2b1ec6a7027c03b772e.tar.bz2
adaint.c, [...]: Use Windows ACL to deal with file attributes.
2008-08-04 Pascal Obry <obry@adacore.com> * adaint.c, s-os_lib.adb, s-os_lib.ads: Use Windows ACL to deal with file attributes. From-SVN: r138613
Diffstat (limited to 'gcc/ada/s-os_lib.adb')
-rwxr-xr-xgcc/ada/s-os_lib.adb19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/ada/s-os_lib.adb b/gcc/ada/s-os_lib.adb
index 8edc7c9..ca19e5a 100755
--- a/gcc/ada/s-os_lib.adb
+++ b/gcc/ada/s-os_lib.adb
@@ -1316,6 +1316,25 @@ package body System.OS_Lib is
return Is_Readable_File (F_Name'Address);
end Is_Readable_File;
+ ------------------------
+ -- Is_Executable_File --
+ ------------------------
+
+ function Is_Executable_File (Name : C_File_Name) return Boolean is
+ function Is_Executable_File (Name : Address) return Integer;
+ pragma Import (C, Is_Executable_File, "__gnat_is_executable_file");
+ begin
+ return Is_Executable_File (Name) /= 0;
+ end Is_Executable_File;
+
+ function Is_Executable_File (Name : String) return Boolean is
+ F_Name : String (1 .. Name'Length + 1);
+ begin
+ F_Name (1 .. Name'Length) := Name;
+ F_Name (F_Name'Last) := ASCII.NUL;
+ return Is_Executable_File (F_Name'Address);
+ end Is_Executable_File;
+
---------------------
-- Is_Regular_File --
---------------------