diff options
Diffstat (limited to 'gcc/ada/s-crtl.ads')
-rw-r--r-- | gcc/ada/s-crtl.ads | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/gcc/ada/s-crtl.ads b/gcc/ada/s-crtl.ads index 53977768c5d..30bca62c455 100644 --- a/gcc/ada/s-crtl.ads +++ b/gcc/ada/s-crtl.ads @@ -57,6 +57,11 @@ package System.CRTL is type size_t is mod 2 ** Standard'Address_Size; + type Filename_Encoding is (UTF8, ASCII_8bits); + for Filename_Encoding use (UTF8 => 0, ASCII_8bits => 1); + pragma Convention (C, Filename_Encoding); + -- Describes the filename's encoding + function atoi (A : System.Address) return Integer; pragma Import (C, atoi, "atoi"); @@ -84,7 +89,10 @@ package System.CRTL is function fgets (strng : chars; n : int; stream : FILEs) return chars; pragma Import (C, fgets, "fgets"); - function fopen (filename : chars; Mode : chars) return FILEs; + function fopen + (filename : chars; + mode : chars; + encoding : Filename_Encoding := UTF8) return FILEs; pragma Import (C, fopen, "__gnat_fopen"); function fputc (C : int; stream : FILEs) return int; @@ -99,8 +107,8 @@ package System.CRTL is function freopen (filename : chars; mode : chars; - stream : FILEs) - return FILEs; + stream : FILEs; + encoding : Filename_Encoding := UTF8) return FILEs; pragma Import (C, freopen, "__gnat_freopen"); function fseek @@ -175,4 +183,5 @@ package System.CRTL is function write (fd : int; buffer : chars; nbytes : int) return int; pragma Import (C, write, "write"); + end System.CRTL; |