OSDN Git Service

2006-10-31 Robert Dewar <dewar@adacore.com>
[pf3gnuchains/gcc-fork.git] / gcc / ada / s-crtl.ads
index 42bdf02..5397776 100644 (file)
@@ -6,7 +6,7 @@
 --                                                                          --
 --                                 S p e c                                  --
 --                                                                          --
---          Copyright (C) 2003-2005 Free Software Foundation, Inc.          --
+--          Copyright (C) 2003-2006, Free Software Foundation, 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- --
@@ -16,8 +16,8 @@
 -- or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License --
 -- for  more details.  You should have  received  a copy of the GNU General --
 -- Public License  distributed with GNAT;  see file COPYING.  If not, write --
--- to  the Free Software Foundation,  59 Temple Place - Suite 330,  Boston, --
--- MA 02111-1307, USA.                                                      --
+-- to  the  Free Software Foundation,  51  Franklin  Street,  Fifth  Floor, --
+-- Boston, MA 02110-1301, USA.                                              --
 --                                                                          --
 -- As a special exception,  if other files  instantiate  generics from this --
 -- unit, or you link  this unit with other files  to produce an executable, --
@@ -35,8 +35,9 @@
 --  on non-VMS systems.
 
 with System.Parameters;
+
 package System.CRTL is
-pragma Preelaborate (CRTL);
+   pragma Preelaborate;
 
    subtype chars is System.Address;
    --  Pointer to null-terminated array of characters
@@ -62,9 +63,6 @@ pragma Preelaborate (CRTL);
    procedure clearerr (stream : FILEs);
    pragma Import (C, clearerr, "clearerr");
 
-   function closedir (directory : DIRs) return Integer;
-   pragma Import (C, closedir, "closedir");
-
    function dup  (handle : int) return int;
    pragma Import (C, dup, "dup");
 
@@ -87,7 +85,7 @@ pragma Preelaborate (CRTL);
    pragma Import (C, fgets, "fgets");
 
    function fopen (filename : chars; Mode : chars) return FILEs;
-   pragma Import (C, fopen, "fopen");
+   pragma Import (C, fopen, "__gnat_fopen");
 
    function fputc (C : int; stream : FILEs) return int;
    pragma Import (C, fputc, "fputc");
@@ -103,7 +101,7 @@ pragma Preelaborate (CRTL);
       mode     : chars;
       stream   : FILEs)
       return     FILEs;
-   pragma Import (C, freopen, "freopen");
+   pragma Import (C, freopen, "__gnat_freopen");
 
    function fseek
      (stream : FILEs;
@@ -136,8 +134,11 @@ pragma Preelaborate (CRTL);
    procedure mktemp (template : chars);
    pragma Import (C, mktemp, "mktemp");
 
-   function opendir (file_name : String) return DIRs;
-   pragma Import (C, opendir, "opendir");
+   function pclose (stream : System.Address) return int;
+   pragma Import (C, pclose, "pclose");
+
+   function popen (command, mode : System.Address) return System.Address;
+   pragma Import (C, popen, "popen");
 
    function read (fd : int; buffer : chars; nbytes : int) return int;
    pragma Import (C, read, "read");