diff options
Diffstat (limited to 'gcc/ada/s-crtl.ads')
-rw-r--r-- | gcc/ada/s-crtl.ads | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/gcc/ada/s-crtl.ads b/gcc/ada/s-crtl.ads index 9fef16b4f24..42bdf02c73e 100644 --- a/gcc/ada/s-crtl.ads +++ b/gcc/ada/s-crtl.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2003 Free Software Foundation, Inc. -- +-- Copyright (C) 2003-2005 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- -- @@ -41,6 +41,9 @@ pragma Preelaborate (CRTL); subtype chars is System.Address; -- Pointer to null-terminated array of characters + subtype DIRs is System.Address; + -- Corresponds to the C type DIR* + subtype FILEs is System.Address; -- Corresponds to the C type FILE* @@ -59,6 +62,15 @@ 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"); + + function dup2 (from, to : int) return int; + pragma Import (C, dup2, "dup2"); + function fclose (stream : FILEs) return int; pragma Import (C, fclose, "fclose"); @@ -124,6 +136,9 @@ 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 read (fd : int; buffer : chars; nbytes : int) return int; pragma Import (C, read, "read"); @@ -134,6 +149,9 @@ pragma Preelaborate (CRTL); procedure rewind (stream : FILEs); pragma Import (C, rewind, "rewind"); + procedure rmdir (dir_name : String); + pragma Import (C, rmdir, "rmdir"); + function setvbuf (stream : FILEs; buffer : chars; |