This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec
- From: Arnaud Charlet <charlet at adacore dot com>
- To: "H.J. Lu" <hjl dot tools at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Eric Botcazou <ebotcazou at adacore dot com>
- Date: Fri, 15 Nov 2013 11:50:54 +0100
- Subject: Re: [PATCH] PR ada/54040: [x32] Incorrect timeval and timespec
- Authentication-results: sourceware.org; auth=none
- References: <CAMe9rOpyx+5Dv_kdUKJpFrPVg7TTqx1cMRw4FN-v3YYuk8RxPg at mail dot gmail dot com> <20131114100216 dot GD19827 at adacore dot com> <CAMe9rOoPj441p7Zt4=XhQx72FG6vSf=pv3Zu39PYBTVE-k+==g at mail dot gmail dot com> <20131114103019 dot GA25699 at adacore dot com> <CAMe9rOobLZz4rc56qaGBqJBw9Gjgis7C-4e1DvQS1n5ce_yVhQ at mail dot gmail dot com> <20131114141639 dot GA5675 at adacore dot com> <CAMe9rOpk3A4JZCbdJFBBbncU3Jh7LueN9nrejvSy5xKxpdvr7g at mail dot gmail dot com> <CAMe9rOpAXacQAxckGV1eoSqV4Pwih6da1iGEq=b9TpWe2OB4jw at mail dot gmail dot com> <20131115101126 dot GA11383 at adacore dot com> <CAMe9rOobDA0tByri=q0tF7sw5OBPu_McmF8Tc9RcC=waqh_2nQ at mail dot gmail dot com>
> >> 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,
and also you cannot add a dependency on System.Linux (linux specific!)
in s-osprim-posix.adb (shared by non linux posix systems).
Although I can't find a diff for s-osprim-posix.adb, so perhaps you
reuse an old/wrong changelog?
Arno