From b1dc44f0fc043ce4894dadcf7c0597d5538d4dfd Mon Sep 17 00:00:00 2001 From: ebotcazou Date: Wed, 9 Apr 2014 14:54:29 +0000 Subject: [PATCH] PR ada/54040 PR ada/59346 * s-osinte-x32.adb: New file. * s-linux.ads (Time): New section. * s-linux-alpha.ads (Time): Likewise. * s-linux-android.ads (Time: Likewise. * s-linux-hppa.ads (Time): Likewise. * s-linux-mipsel.ads (Time): Likewise. * s-linux-sparc.ads (Time): Likewise. * s-linux-x32.ads (Time): Likewise. * s-osprim-x32.ads (timespec): Adjust. * s-osinte-linux.ads (Time): Define local subtypes for those defined in System.Linux. * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval. * s-osinte-hpux.ads (timespec): Revert POSIX breakage. * s-osinte-kfreebsd-gnu.ads (timespec): Likewise. * s-osinte-solaris-posix.ads (timespec): Likewise. * s-osinte-posix.adb (To_Timespec): Likewise. * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@209244 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/ChangeLog | 23 +++++++++++++++++++ gcc/ada/gcc-interface/Makefile.in | 2 +- gcc/ada/s-linux-alpha.ads | 28 +++++++++++++++++++----- gcc/ada/s-linux-android.ads | 24 ++++++++++++++++---- gcc/ada/s-linux-hppa.ads | 26 +++++++++++++++++----- gcc/ada/s-linux-mipsel.ads | 26 +++++++++++++++++----- gcc/ada/s-linux-sparc.ads | 28 +++++++++++++++++++----- gcc/ada/s-linux-x32.ads | 21 ++++++++++++++---- gcc/ada/s-linux.ads | 26 +++++++++++++++++----- gcc/ada/s-osinte-hpux.ads | 4 ++-- gcc/ada/s-osinte-kfreebsd-gnu.ads | 4 ++-- gcc/ada/s-osinte-linux.ads | 15 ++++--------- gcc/ada/s-osinte-posix.adb | 7 +++--- gcc/ada/s-osinte-solaris-posix.ads | 4 ++-- gcc/ada/{s-osinte-posix.adb => s-osinte-x32.adb} | 7 +++--- gcc/ada/s-osprim-x32.adb | 4 ++-- gcc/ada/s-taprop-linux.adb | 4 +--- 17 files changed, 187 insertions(+), 66 deletions(-) copy gcc/ada/{s-osinte-posix.adb => s-osinte-x32.adb} (94%) diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index e3a690ad0ec..a43ad50d58a 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,25 @@ +2014-04-09 Eric Botcazou + + PR ada/54040 + PR ada/59346 + * s-osinte-x32.adb: New file. + * s-linux.ads (Time): New section. + * s-linux-alpha.ads (Time): Likewise. + * s-linux-android.ads (Time: Likewise. + * s-linux-hppa.ads (Time): Likewise. + * s-linux-mipsel.ads (Time): Likewise. + * s-linux-sparc.ads (Time): Likewise. + * s-linux-x32.ads (Time): Likewise. + * s-osprim-x32.ads (timespec): Adjust. + * s-osinte-linux.ads (Time): Define local subtypes for those defined + in System.Linux. + * s-taprop-linux.adb (Monotonic_Clock): Do not define timeval. + * s-osinte-hpux.ads (timespec): Revert POSIX breakage. + * s-osinte-kfreebsd-gnu.ads (timespec): Likewise. + * s-osinte-solaris-posix.ads (timespec): Likewise. + * s-osinte-posix.adb (To_Timespec): Likewise. + * gcc-interface/Makefile.in (x32/Linux): Use s-osinte-x32.adb. + 2014-04-08 Eric Botcazou PR ada/60411 @@ -6,6 +28,7 @@ * s-intman-android.adb: Likewise. * sigtramp-armdroid.c: Likewise. * sigtramp.h: Add Android support. + * s-osinte-android.ads: Adjust. 2014-04-07 Eric Botcazou diff --git a/gcc/ada/gcc-interface/Makefile.in b/gcc/ada/gcc-interface/Makefile.in index 5741bd9b841..9af1967ce9f 100644 --- a/gcc/ada/gcc-interface/Makefile.in +++ b/gcc/ada/gcc-interface/Makefile.in @@ -2239,7 +2239,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) $(target_os))),) s-linux.ads S, - tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9))); + tv_nsec => long (Long_Long_Integer (F * 10#1#E9))); end To_Timespec; end System.OS_Interface; diff --git a/gcc/ada/s-osinte-solaris-posix.ads b/gcc/ada/s-osinte-solaris-posix.ads index 7aa20f11598..0859b8d7b82 100644 --- a/gcc/ada/s-osinte-solaris-posix.ads +++ b/gcc/ada/s-osinte-solaris-posix.ads @@ -7,7 +7,7 @@ -- S p e c -- -- -- -- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2013, Free Software Foundation, Inc. -- +-- Copyright (C) 1995-2014, 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- -- @@ -513,7 +513,7 @@ private type timespec is record tv_sec : time_t; - tv_nsec : time_t; + tv_nsec : long; end record; pragma Convention (C, timespec); diff --git a/gcc/ada/s-osinte-posix.adb b/gcc/ada/s-osinte-x32.adb similarity index 94% copy from gcc/ada/s-osinte-posix.adb copy to gcc/ada/s-osinte-x32.adb index 402ddcb6190..17989cdaf5a 100644 --- a/gcc/ada/s-osinte-posix.adb +++ b/gcc/ada/s-osinte-x32.adb @@ -7,7 +7,7 @@ -- B o d y -- -- -- -- Copyright (C) 1991-1994, Florida State University -- --- Copyright (C) 1995-2010, AdaCore -- +-- Copyright (C) 1995-2014, AdaCore -- -- -- -- 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- -- @@ -30,8 +30,7 @@ -- -- ------------------------------------------------------------------------------ --- This is a GNU/LinuxThreads, Solaris pthread and HP-UX pthread version --- of this package. +-- This version is for Linux/x32 pragma Polling (Off); -- Turn off polling, we do not want ATC polling to take place during @@ -104,7 +103,7 @@ package body System.OS_Interface is end if; return timespec'(tv_sec => S, - tv_nsec => time_t (Long_Long_Integer (F * 10#1#E9))); + tv_nsec => Long_Long_Integer (F * 10#1#E9)); end To_Timespec; end System.OS_Interface; diff --git a/gcc/ada/s-osprim-x32.adb b/gcc/ada/s-osprim-x32.adb index 5d4964a2776..fb00e780fa6 100644 --- a/gcc/ada/s-osprim-x32.adb +++ b/gcc/ada/s-osprim-x32.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2013, Free Software Foundation, Inc. -- +-- Copyright (C) 2013-2014, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -42,7 +42,7 @@ package body System.OS_Primitives is type timespec is record tv_sec : time_t; - tv_nsec : time_t; + tv_nsec : Long_Long_Integer; end record; pragma Convention (C, timespec); diff --git a/gcc/ada/s-taprop-linux.adb b/gcc/ada/s-taprop-linux.adb index 515850a6838..5aa384ba126 100644 --- a/gcc/ada/s-taprop-linux.adb +++ b/gcc/ada/s-taprop-linux.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 1992-2012, Free Software Foundation, Inc. -- +-- Copyright (C) 1992-2014, Free Software Foundation, Inc. -- -- -- -- GNARL 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- -- @@ -627,8 +627,6 @@ package body System.Task_Primitives.Operations is function Monotonic_Clock return Duration is use Interfaces; - type timeval is array (1 .. 2) of System.OS_Interface.time_t; - procedure timeval_to_duration (T : not null access timeval; sec : not null access C.long; -- 2.11.4.GIT