diff options
Diffstat (limited to 'gcc/ada')
-rw-r--r-- | gcc/ada/ChangeLog | 22 | ||||
-rw-r--r-- | gcc/ada/gcc-interface/decl.c | 8 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-linux__x32.ads | 9 | ||||
-rw-r--r-- | gcc/ada/libgnarl/s-osinte__x32.adb | 1 | ||||
-rw-r--r-- | gcc/ada/mingw32.h | 10 | ||||
-rw-r--r-- | gcc/ada/sysdep.c | 8 |
6 files changed, 35 insertions, 23 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 4e931f9a6ff..f4588406422 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,23 @@ +2017-10-05 Eric Botcazou <ebotcazou@adacore.com> + + PR ada/82393 + * mingw32.h (_O_U8TEXT, _O_U16TEXT, _O_WTEXT): Delete. + * sysdep.c (__gnat_set_mode ): Use DJGPP version for Cygwin. + +2017-10-02 Eric Botcazou <ebotcazou@adacore.com> + Pierre-Marie de Rodat <derodat@adacore.com> + + PR ada/82384 + * libgnarl/s-linux__x32.ads (suseconds_t): New subtype. + (time_t): Change from derived type to subtype. + (timeval): Use suseconds_t for tv_usec. + * libgnarl/s-osinte__x32.adb (To_Timespec): Remove use type clause. + +2017-10-02 Richard Sandiford <richard.sandiford@linaro.org> + + * gcc-interface/decl.c (annotate_value): Use wi::to_widest when + handling the form (plus/mult (convert @0) @1). + 2017-09-29 Bob Duff <duff@adacore.com> * exp_ch6.adb (Expand_Call_Helper): Replace with code more similar to @@ -11,7 +31,7 @@ * doc/gnat_ugn/building_executable_programs_with_gnat.rst, doc/gnat_ugn/the_gnat_compilation_model.rst: Avoid use of single colon in comment markup. - * gnat_ugn.texi: Regenerate. + * gnat_ugn.texi: Regenerate. 2017-09-29 Justin Squirek <squirek@adacore.com> diff --git a/gcc/ada/gcc-interface/decl.c b/gcc/ada/gcc-interface/decl.c index 7b304975874..e6cd8d6ba50 100644 --- a/gcc/ada/gcc-interface/decl.c +++ b/gcc/ada/gcc-interface/decl.c @@ -8153,11 +8153,13 @@ annotate_value (tree gnu_size) { tree inner_op_op1 = TREE_OPERAND (inner_op, 1); tree gnu_size_op1 = TREE_OPERAND (gnu_size, 1); - wide_int op1; + widest_int op1; if (TREE_CODE (gnu_size) == MULT_EXPR) - op1 = wi::mul (inner_op_op1, gnu_size_op1); + op1 = (wi::to_widest (inner_op_op1) + * wi::to_widest (gnu_size_op1)); else - op1 = wi::add (inner_op_op1, gnu_size_op1); + op1 = (wi::to_widest (inner_op_op1) + + wi::to_widest (gnu_size_op1)); ops[1] = UI_From_gnu (wide_int_to_tree (sizetype, op1)); ops[0] = annotate_value (TREE_OPERAND (inner_op, 0)); } diff --git a/gcc/ada/libgnarl/s-linux__x32.ads b/gcc/ada/libgnarl/s-linux__x32.ads index 823d806ea84..ad9a7b9fc30 100644 --- a/gcc/ada/libgnarl/s-linux__x32.ads +++ b/gcc/ada/libgnarl/s-linux__x32.ads @@ -6,7 +6,7 @@ -- -- -- S p e c -- -- -- --- Copyright (C) 2013-2017, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2017, Free Software Foundation, Inc. -- -- -- -- -- GNARL is free software; you can redistribute it and/or modify it under -- @@ -45,8 +45,9 @@ package System.Linux is -- Time -- ---------- - type time_t is new Long_Long_Integer; - subtype clockid_t is Interfaces.C.int; + subtype suseconds_t is Long_Long_Integer; + subtype time_t is Long_Long_Integer; + subtype clockid_t is Interfaces.C.int; type timespec is record tv_sec : time_t; @@ -56,7 +57,7 @@ package System.Linux is type timeval is record tv_sec : time_t; - tv_usec : Long_Long_Integer; + tv_usec : suseconds_t; end record; pragma Convention (C, timeval); diff --git a/gcc/ada/libgnarl/s-osinte__x32.adb b/gcc/ada/libgnarl/s-osinte__x32.adb index a2874be3d69..6bb80cd6d0f 100644 --- a/gcc/ada/libgnarl/s-osinte__x32.adb +++ b/gcc/ada/libgnarl/s-osinte__x32.adb @@ -90,7 +90,6 @@ package body System.OS_Interface is S : time_t; F : Duration; - use type System.Linux.time_t; begin S := time_t (Long_Long_Integer (D)); F := D - Duration (S); diff --git a/gcc/ada/mingw32.h b/gcc/ada/mingw32.h index cf2d9de1715..91f85f80f93 100644 --- a/gcc/ada/mingw32.h +++ b/gcc/ada/mingw32.h @@ -59,16 +59,6 @@ #endif #include <windows.h> -#ifndef _O_U8TEXT -#define _O_U8TEXT _O_TEXT -#endif -#ifndef _O_U16TEXT -#define _O_U16TEXT _O_TEXT -#endif -#ifndef _O_WTEXT -#define _O_WTEXT _O_TEXT -#endif - /* After including this file it is possible to use the character t as prefix to routines. If GNAT_UNICODE_SUPPORT is defined then the unicode enabled versions will be used. */ diff --git a/gcc/ada/sysdep.c b/gcc/ada/sysdep.c index 455a78a5645..698c8ca04f7 100644 --- a/gcc/ada/sysdep.c +++ b/gcc/ada/sysdep.c @@ -126,7 +126,7 @@ extern struct tm *localtime_r(const time_t *, struct tm *); */ -#if defined (WINNT) || defined (__CYGWIN__) || defined(__DJGPP__) +#if defined (WINNT) || defined (__CYGWIN__) || defined (__DJGPP__) const char __gnat_text_translation_required = 1; @@ -137,7 +137,7 @@ const char __gnat_text_translation_required = 1; #define WIN_SETMODE _setmode #endif -#if defined(__DJGPP__) +#if defined (__DJGPP__) #include <io.h> #define _setmode setmode #endif /* __DJGPP__ */ @@ -154,7 +154,7 @@ __gnat_set_text_mode (int handle) WIN_SETMODE (handle, O_TEXT); } -#ifdef __DJGPP__ +#if defined (__CYGWIN__) || defined (__DJGPP__) void __gnat_set_mode (int handle, int mode) { @@ -826,7 +826,7 @@ __gnat_localtime_tzoff (const time_t *timer ATTRIBUTE_UNUSED, #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (__linux__) \ || defined (__GLIBC__) || defined (__DragonFly__) || defined (__OpenBSD__) \ - || defined(__DJGPP__) + || defined (__DJGPP__) { localtime_r (timer, &tp); *off = tp.tm_gmtoff; |