-- --
-- 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- --
-- 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, --
-- 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
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");
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");
mode : chars;
stream : FILEs)
return FILEs;
- pragma Import (C, freopen, "freopen");
+ pragma Import (C, freopen, "__gnat_freopen");
function fseek
(stream : FILEs;
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");