This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec


On Fri, Nov 15, 2013 at 3:38 AM, Arnaud Charlet <charlet@adacore.com> wrote:
>> > Looks better now, but please do not add a dependency on System.Linux in
>> > s-taprop-linux.adb, and instead use:
>> >
>> >     type timeval is array (1 .. 2) of System.OS_Interface.time_t;
>> >
>> > Arno
>>
>> It doesn't work:
>>
>> s-taprop.adb:630:60: "time_t" is not a visible entity of "OS_Interface"
>
> Right, time_t is private in s-osinte-linux.ads, so you need to add:
>
> --- s-osinte-linux.ads  (revision 298854)
> +++ s-osinte-linux.ads  (working copy)
> @@ -218,6 +218,7 @@
>     ----------
>
>     type timespec is private;
> +   type time_t is private;
>
>     function To_Duration (TS : timespec) return Duration;
>     pragma Inline (To_Duration);
>
> To make it visible.

Here is the new patch.  Does it look OK?

Thanks.

-- 
H.J.
---
2013-11-15  H.J. Lu  <hongjiu.lu@intel.com>

    PR ada/54040
    * s-linux-x32.ads: New file.
    * s-osprim-x32.adb: Likewise.
    * s-linux.ads (time_t): New type.
    * s-linux-alpha.ads (time_t):  Likewise.
    * s-linux-hppa.ads (time_t):  Likewise.
    * s-linux-mipsel.ads (time_t):  Likewise.
    * s-linux-sparc.ads (time_t):  Likewise.
    * s-osinte-linux.ads (time_t): Mark it private.  Replace long
    with System.Linux.time_t.
    (timespec): Replace long with time_t.
    * s-osinte-posix.adb (To_Timespec): Likewise.
    * s-taprop-linux.adb (timeval): Replace C.long with
    System.OS_Interface.time_t.
    * gcc-interface/Makefile.in (LIBGNAT_TARGET_PAIRS): Replace
    s-linux.ads with s-linux-x32.ads, s-osprim-posix.adb with
    s-osprim-x32.adb for x32.

Attachment: pr54040-3.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]