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 2:50 AM, Arnaud Charlet <charlet@adacore.com> wrote:
>> >> This is what I got.  I added s-posix-time.ads which declares
>> >> System.OS_Time.time_t.  I use it instead long for time_t.  I
>> >> didn't add time_t to s-linux.ads since it isn't used by
>> >> s-osprim-posix.adb.
>> >
>> > Adding s-posix-time.ads isn't desirable, too intrusive.
>> > Better to use time_t (only) from system.linux in s-osinte, and provide
>> > an alternate s-osprim-x32.adb
>> >
>>
>> Here is the patch.  Does it look OK?
>
> No, you need to define the new type time_t in all variants of s-linux*.ads,

Fixed.  Does it look OK?

> and also you cannot add a dependency on System.Linux (linux specific!)
> in s-osprim-posix.adb (shared by non linux posix systems).

It was cut and paste.

> Although I can't find a diff for s-osprim-posix.adb, so perhaps you
> reuse an old/wrong changelog?

Yes.

> Arno

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): 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.Linux.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]