diff options
author | Hristian Kirtchev <kirtchev@adacore.com> | 2008-07-31 15:27:47 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2008-07-31 15:27:47 +0200 |
commit | fb59381ec6d4e8967d166c1e73746d21200e4905 (patch) | |
tree | 2c1ccf2511c8e6d3bc9d57188a6a97027da4359c /gcc/ada/s-ststop.adb | |
parent | 8198b93da51f3930d16298c7b9fd72f36a3343b7 (diff) | |
download | gcc-fb59381ec6d4e8967d166c1e73746d21200e4905.tar.gz |
2008-07-31 Hristian Kirtchev <kirtchev@adacore.com>
* bindgen.adb Comment reformatting. Update the list of run-time globals.
(Gen_Adainit_Ada): Add the declaration, import and value set for
configuration flag Canonical_Streams.
(Gen_Adainit_C): Add the declaration and initial value of external
symbol __gl_canonical_streams.
* init.c: Update the list of global values computed by the binder.
* opt.ads: Add flag Canonical_Streams.
* par-prag.adb (Prag): Include Pragma_Canonical_Streams to the list of
semantically handled pragmas.
* sem_prag.adb: Add an entry into enumeration type Sig_Flags.
(Analyze_Pragma): Add case for pragma Canonical_Streams.
* snames.adb: Add character value for name Canonical_Streams.
* snames.ads:
Add Name_Canonical_Streams to the list of configuration pragmas.
Add Pragma_Canonical_Streams to enumeration type Pragma_Id.
* snames.h: Add a definition for Pragma_Canonical_Streams.
* s-ststop.adb:
Add a flag and import to seize the value of external symbol
__gl_canonical_streams. Update comment and initial value of constant
Use_Block_IO.
* gnat_rm.texi: Add section of pragma Canonical_Streams.
* gnat_ugn.texi:
Add pragma Canonical_Streams to the list of configuration pragmas.
From-SVN: r138407
Diffstat (limited to 'gcc/ada/s-ststop.adb')
-rw-r--r-- | gcc/ada/s-ststop.adb | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/gcc/ada/s-ststop.adb b/gcc/ada/s-ststop.adb index 88e29f04b36..7dca75fbbe0 100644 --- a/gcc/ada/s-ststop.adb +++ b/gcc/ada/s-ststop.adb @@ -92,12 +92,23 @@ package body System.Strings.Stream_Ops is subtype String_Block is String_Type (1 .. C_In_Default_Block); - -- Block IO is used when the low level can support block IO and the size - -- of the character type is a multiple of the stream element type. + Flag : Integer; + pragma Import (C, Flag, "__gl_canonical_streams"); + -- This imported value is used to determine whether configuration pragma + -- Canonical_Streams is present. A value of zero indicates whether any + -- stream-related optimizations are enabled, while a value of one + -- indicates a disabled status. + + Canonical_Streams : constant Boolean := Flag = 1; + + -- Block IO is used when the low level can support block IO, the size + -- of the character type is a multiple of the stream element type and + -- the compilation can use stream optimizations. Use_Block_IO : constant Boolean := Stream_Attributes.Block_IO_OK - and then C_Size mod SE_Size = 0; + and then C_Size mod SE_Size = 0 + and then not Canonical_Streams; -- Conversions to and from Default_Block |