aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/doc
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@adacore.com>2020-04-23 05:46:29 -0400
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-18 05:08:30 -0400
commit8cd7aec26f11d3d317e0e59e3dbe04b96b7052e4 (patch)
tree4d86db185b225f11a160ebf06051052c0ade1ca3 /gcc/ada/doc
parent5b3950bed95136ad2b5e037e29daf3a464dc7cd5 (diff)
downloadgcc-8cd7aec26f11d3d317e0e59e3dbe04b96b7052e4.zip
gcc-8cd7aec26f11d3d317e0e59e3dbe04b96b7052e4.tar.gz
gcc-8cd7aec26f11d3d317e0e59e3dbe04b96b7052e4.tar.bz2
[Ada] Add support for XDR streaming in the default runtime
2020-06-18 Arnaud Charlet <charlet@adacore.com> gcc/ada/ * Makefile.rtl: Add s-statxd.o. * bindgen.adb (Gen_Adainit): Add support for XDR_Stream. * bindusg.adb (Display): Add mention of -xdr. * gnatbind.adb: Process -xdr switch. * init.c (__gl_xdr_stream): New. * opt.ads (XDR_Stream): New. * libgnat/s-stratt__xdr.adb: Rename to... * libgnat/s-statxd.adb: this and adjust. * libgnat/s-statxd.ads: New. * libgnat/s-stratt.ads, libgnat/s-stratt.adb: Choose between default and XDR implementation at runtime. * libgnat/s-ststop.ads: Update comments. * doc/gnat_rm/implementation_advice.rst: Update doc on XDR streaming. * gnat_rm.texi: Regenerate.
Diffstat (limited to 'gcc/ada/doc')
-rw-r--r--gcc/ada/doc/gnat_rm/implementation_advice.rst35
1 files changed, 6 insertions, 29 deletions
diff --git a/gcc/ada/doc/gnat_rm/implementation_advice.rst b/gcc/ada/doc/gnat_rm/implementation_advice.rst
index 31376d9..998d0c5 100644
--- a/gcc/ada/doc/gnat_rm/implementation_advice.rst
+++ b/gcc/ada/doc/gnat_rm/implementation_advice.rst
@@ -712,43 +712,20 @@ RM 13.13.2(1.6): Stream Oriented Attributes
to the nearest factor or multiple of the word size that is also a
multiple of the stream element size."
-Followed, except that the number of stream elements is a power of 2.
+Followed, except that the number of stream elements is 1, 2, 3, 4 or 8.
The Stream_Size may be used to override the default choice.
-However, such an implementation is based on direct binary
-representations and is therefore target- and endianness-dependent. To
-address this issue, GNAT also supplies an alternate implementation of
-the stream attributes ``Read`` and ``Write``, which uses the
-target-independent XDR standard representation for scalar types.
+The default implementation is based on direct binary representations and is
+therefore target- and endianness-dependent. To address this issue, GNAT also
+supplies an alternate implementation of the stream attributes ``Read`` and
+``Write``, which uses the target-independent XDR standard representation for
+scalar types. This XDR alternative can be enabled via the binder switch -xdr.
.. index:: XDR representation
-
.. index:: Read attribute
-
.. index:: Write attribute
-
.. index:: Stream oriented attributes
-The XDR implementation is provided as an alternative body of the
-``System.Stream_Attributes`` package, in the file
-:file:`s-stratt-xdr.adb` in the GNAT library.
-There is no :file:`s-stratt-xdr.ads` file.
-In order to install the XDR implementation, do the following:
-
-* Replace the default implementation of the
- ``System.Stream_Attributes`` package with the XDR implementation.
- For example on a Unix platform issue the commands:
-
- .. code-block:: sh
-
- $ mv s-stratt.adb s-stratt-default.adb
- $ mv s-stratt-xdr.adb s-stratt.adb
-
-
-*
- Rebuild the GNAT run-time library as documented in
- the *GNAT and Libraries* section of the :title:`GNAT User's Guide`.
-
RM A.1(52): Names of Predefined Numeric Types
=============================================