diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-18 12:59:26 +0200 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-07-18 12:59:26 +0200 |
commit | 676fa39756b56648026fa383dfe89239c72fb7ea (patch) | |
tree | cc0b54e0ccd02c0c238e0c46ce80772a93d5ebed | |
parent | cd077efd33fc56016b9bea8f30964fb93a40ff3a (diff) | |
download | gcc-676fa39756b56648026fa383dfe89239c72fb7ea.zip gcc-676fa39756b56648026fa383dfe89239c72fb7ea.tar.gz gcc-676fa39756b56648026fa383dfe89239c72fb7ea.tar.bz2 |
[multiple changes]
2014-07-18 Robert Dewar <dewar@adacore.com>
* gnat_rm.texi: Document that Wchar_T_Size and Word_Size are
static attributes.
2014-07-18 Arnaud Charlet <charlet@adacore.com>
* a-witeio.adb, initialize.c: Update comments. Minor clean ups.
2014-07-18 Pascal Obry <obry@adacore.com>
* adaint.c: Do not include wchar.h on VxWorks.
* mingw32.h: Remove obsolete definition.
From-SVN: r212812
-rw-r--r-- | gcc/ada/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/ada/a-witeio.adb | 12 | ||||
-rw-r--r-- | gcc/ada/adaint.c | 2 | ||||
-rw-r--r-- | gcc/ada/gnat_rm.texi | 5 | ||||
-rw-r--r-- | gcc/ada/initialize.c | 4 | ||||
-rw-r--r-- | gcc/ada/mingw32.h | 1 |
6 files changed, 27 insertions, 11 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 55e0b3f..ab3d1d3 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,17 @@ +2014-07-18 Robert Dewar <dewar@adacore.com> + + * gnat_rm.texi: Document that Wchar_T_Size and Word_Size are + static attributes. + +2014-07-18 Arnaud Charlet <charlet@adacore.com> + + * a-witeio.adb, initialize.c: Update comments. Minor clean ups. + +2014-07-18 Pascal Obry <obry@adacore.com> + + * adaint.c: Do not include wchar.h on VxWorks. + * mingw32.h: Remove obsolete definition. + 2014-07-18 Pascal Obry <obry@adacore.com> * a-textio.adb, a-witeio.adb, a-ztexio.adb: Use C_Streams Default_Text. diff --git a/gcc/ada/a-witeio.adb b/gcc/ada/a-witeio.adb index 6e2ccf5..6324906 100644 --- a/gcc/ada/a-witeio.adb +++ b/gcc/ada/a-witeio.adb @@ -1227,13 +1227,13 @@ package body Ada.Wide_Text_IO is (File : File_Type; Item : Wide_Character) is - wide_text_translation_required : Boolean; - for wide_text_translation_required'Size use Character'Size; - pragma Import (C, wide_text_translation_required, - "__gnat_wide_text_translation_required"); + wide_text_translation_required : Integer; + pragma Import + (C, wide_text_translation_required, + "__gnat_wide_text_translation_required"); -- Text translation is required on Windows only. This means that the -- console is doing translation and we do not want to do any encoding - -- here. If this boolean is set we just output the character as-is. + -- here. If this variable is not 0 we output the character via fputwc. procedure Out_Char (C : Character); -- Procedure to output one character of a wide character sequence @@ -1256,7 +1256,7 @@ package body Ada.Wide_Text_IO is begin FIO.Check_Write_Status (AP (File)); - if wide_text_translation_required + if wide_text_translation_required /= 0 or else File.Text_Encoding /= Default_Text then set_mode (fileno (File.Stream), File.Text_Encoding); diff --git a/gcc/ada/adaint.c b/gcc/ada/adaint.c index 2f3a730..84c67f5 100644 --- a/gcc/ada/adaint.c +++ b/gcc/ada/adaint.c @@ -229,8 +229,10 @@ extern unsigned int LIB$CALLG_64 (unsigned long long argument_list [], #else #include <utime.h> +#if ! defined (__vxworks) #include <wchar.h> #endif +#endif #if defined (_WIN32) #include <process.h> diff --git a/gcc/ada/gnat_rm.texi b/gcc/ada/gnat_rm.texi index 29165c9..1615b46 100644 --- a/gcc/ada/gnat_rm.texi +++ b/gcc/ada/gnat_rm.texi @@ -9896,13 +9896,14 @@ but, unlike @code{Size}, may be set for non-first subtypes. @code{Standard'Wchar_T_Size} (@code{Standard} is the only permissible prefix) provides the size in bits of the C @code{wchar_t} type primarily for constructing the definition of this type in -package @code{Interfaces.C}. +package @code{Interfaces.C}. The result is a static constant. @node Attribute Word_Size @unnumberedsec Attribute Word_Size @findex Word_Size @code{Standard'Word_Size} (@code{Standard} is the only permissible -prefix) provides the value @code{System.Word_Size}. +prefix) provides the value @code{System.Word_Size}. The result is +a static constant. @node Standard and Implementation Defined Restrictions @chapter Standard and Implementation Defined Restrictions diff --git a/gcc/ada/initialize.c b/gcc/ada/initialize.c index 1eab275..36df501 100644 --- a/gcc/ada/initialize.c +++ b/gcc/ada/initialize.c @@ -62,8 +62,8 @@ extern "C" { /* __gnat_initialize (NT-mingw32 Version) */ /******************************************/ -char __gnat_wide_text_translation_required = 0; -// wide text translation, 0=none, 1=activated +int __gnat_wide_text_translation_required = 0; +/* wide text translation, 0=none, 1=activated */ #if defined (__MINGW32__) #include "mingw32.h" diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h index e466ee8..325c2ae 100644 --- a/gcc/ada/mingw32.h +++ b/gcc/ada/mingw32.h @@ -63,7 +63,6 @@ extern UINT CurrentCodePage; extern UINT CurrentCCSEncoding; -extern char __gnat_wide_text_translation_required; /* Macros to convert to/from the code page specified in CurrentCodePage. */ #define S2WSC(wstr,str,len) \ |