summaryrefslogtreecommitdiff
path: root/gcc/ada/g-dirope.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-10 13:49:15 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2005-02-10 13:49:15 +0000
commitfda708fecf0f53769f452ce92f5c2ba78bee59cf (patch)
tree5dc2dd33c332df90154ebf5f0909edf17dcd72d9 /gcc/ada/g-dirope.adb
parent3bb8af62398b088423a940f1ec2294f2550ca17c (diff)
downloadgcc-fda708fecf0f53769f452ce92f5c2ba78bee59cf.tar.gz
2005-02-09 Doug Rupp <rupp@adacore.com>
* gnatchop.adb (dup, dup2), g-dirope.adb (closedir, opendir, rmdir): Reference via System.CRTL. * gnatlbr.adb (mkdir), mlib-tgt-vms-ia64.adb (popen, plose): Import with decc$ prefix. * s-crtl.ads (closdir, dup, dup2, opendir, rmdir): Import. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94807 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/g-dirope.adb')
-rw-r--r--gcc/ada/g-dirope.adb22
1 files changed, 7 insertions, 15 deletions
diff --git a/gcc/ada/g-dirope.adb b/gcc/ada/g-dirope.adb
index 40a181a7087..6c46baa86b4 100644
--- a/gcc/ada/g-dirope.adb
+++ b/gcc/ada/g-dirope.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1998-2003 Ada Core Technologies, Inc. --
+-- Copyright (C) 1998-2005 Ada Core Technologies, 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- --
@@ -34,9 +34,12 @@
with Ada.Characters.Handling;
with Ada.Strings.Fixed;
with Ada.Strings.Maps;
+
with Unchecked_Deallocation;
with Unchecked_Conversion;
-with System; use System;
+
+with System; use System;
+with System.CRTL; use System.CRTL;
with GNAT.OS_Lib;
@@ -181,10 +184,6 @@ package body GNAT.Directory_Operations is
-----------
procedure Close (Dir : in out Dir_Type) is
-
- function closedir (Directory : System.Address) return Integer;
- pragma Import (C, closedir, "closedir");
-
Discard : Integer;
pragma Warnings (Off, Discard);
@@ -193,7 +192,7 @@ package body GNAT.Directory_Operations is
raise Directory_Error;
end if;
- Discard := closedir (System.Address (Dir.all));
+ Discard := closedir (DIRs (Dir.all));
Free (Dir);
end Close;
@@ -630,12 +629,8 @@ package body GNAT.Directory_Operations is
is
C_File_Name : constant String := Dir_Name & ASCII.NUL;
- function opendir
- (File_Name : String) return Dir_Type_Value;
- pragma Import (C, opendir, "opendir");
-
begin
- Dir := new Dir_Type_Value'(opendir (C_File_Name));
+ Dir := new Dir_Type_Value'(Dir_Type_Value (opendir (C_File_Name)));
if not Is_Open (Dir) then
Free (Dir);
@@ -737,9 +732,6 @@ package body GNAT.Directory_Operations is
Success : Boolean;
Working_Dir : Dir_Type;
- procedure rmdir (Dir_Name : String);
- pragma Import (C, rmdir, "rmdir");
-
begin
-- Remove the directory only if it is empty