aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/s-fileio.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:04:59 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2012-07-09 15:04:59 +0200
commita6f0cb16c658263c398773c27387adc6b10b236c (patch)
treefb77b7b5b44c1f6a19636abaad55d26ba365a9ef /gcc/ada/s-fileio.adb
parent02663f24a578d0ada1aa44220f545b4e0fe09c29 (diff)
downloadgcc-a6f0cb16c658263c398773c27387adc6b10b236c.zip
gcc-a6f0cb16c658263c398773c27387adc6b10b236c.tar.gz
gcc-a6f0cb16c658263c398773c27387adc6b10b236c.tar.bz2
[multiple changes]
2012-07-09 Tristan Gingold <gingold@adacore.com> * a-exexpr-gcc.adb (CleanupUnwind_Handler): Now imported from raise-gcc.c * raise-gcc.c (__gnat_cleanupunwind_handler): Defined. Strictly follow the ABI convention on ia64. 2012-07-09 Gary Dismukes <dismukes@adacore.com> * a-ststio.ads: Add pragma Preelaborate, per AI05-0283. * i-cstrea.ads (max_path_len): Change from variable to deferred constant to allow it to be used as a bound in string component in type System.File_IO.Temp_File_Record. * s-os_lib.ads, s-commun.ads, s-ficobl.ads, s-fileio.ads: Add pragma Preelaborate. * s-fileio.adb (Get_Case_Sensitive): Move function inside procedure Open. (File_Names_Case_Sensitive): Move variable inside procedure Open, to avoid violation of Preelaborate restriction (due to call to Get_Case_Sensitive). 2012-07-09 Ed Schonberg <schonberg@adacore.com> * layout.adb (Set_Elem_Alignment): Protect against meaningless size clause, to prevent overflow in internal computation of alignment. From-SVN: r189375
Diffstat (limited to 'gcc/ada/s-fileio.adb')
-rw-r--r--gcc/ada/s-fileio.adb21
1 files changed, 12 insertions, 9 deletions
diff --git a/gcc/ada/s-fileio.adb b/gcc/ada/s-fileio.adb
index a11d833..4fc72cf 100644
--- a/gcc/ada/s-fileio.adb
+++ b/gcc/ada/s-fileio.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2010, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2012, 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- --
@@ -98,14 +98,6 @@ package body System.File_IO is
(C, text_translation_required, "__gnat_text_translation_required");
-- If true, add appropriate suffix to control string for Open
- function Get_Case_Sensitive return Integer;
- pragma Import (C, Get_Case_Sensitive,
- "__gnat_get_file_names_case_sensitive");
- File_Names_Case_Sensitive : constant Boolean := Get_Case_Sensitive /= 0;
- -- Set to indicate whether the operating system convention is for file
- -- names to be case sensitive (e.g., in Unix, set True), or non case
- -- sensitive (e.g., in Windows, set False).
-
-----------------------
-- Local Subprograms --
-----------------------
@@ -757,6 +749,17 @@ package body System.File_IO is
pragma Import (C, Tmp_Name, "__gnat_tmp_name");
-- Set buffer (a String address) with a temporary filename
+ function Get_Case_Sensitive return Integer;
+ pragma Import (C, Get_Case_Sensitive,
+ "__gnat_get_file_names_case_sensitive");
+
+ File_Names_Case_Sensitive : constant Boolean := Get_Case_Sensitive /= 0;
+ -- Set to indicate whether the operating system convention is for file
+ -- names to be case sensitive (e.g., in Unix, set True), or not case
+ -- sensitive (e.g., in Windows, set False). Declared locally to avoid
+ -- breaking the Preelaborate rule that disallows function calls at the
+ -- library level.
+
Stream : FILEs := C_Stream;
-- Stream which we open in response to this request