[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Please revert the patches in bug #54040 and #59346 and special case x32



On Wed, 2014-04-09 at 16:24 +0200, Eric Botcazou wrote:
> > Would it be possible to have s-osinte-posix.adb also for x32 and in
> > s-osinte-x32.ads use the following construct:
> > ...
> >    type timespec is private;
> > ...
> >    type timespec is record
> >       tv_sec  : time_t;
> >       tv_nsec : long long;
> >    end record;
> >    pragma Convention (C, timespec);
> > 
> > and similiar for timeval if needed?
> > 
> > That's the construct other unices use now when s-osinte-posix.adb
> > defines tv_nsec as time_t?
> 
> Not sure what the "now" is referring to, but if you want to revert the 
> original POSIX breakage in s-osinte-posix.adb, you need to define timespec 
> according to the POSIX spec, there is no other way.

I thought of creating a new type for x32: 

type nanosec_t is private; 
type nanosec_t is new long long;

  type timespec is record
      tv_sec  : time_t;
      tv_nsec : nanosec_t;
   end record;

Having the correct definition of tv_nsec in s-osinte-posix.adb
   type timespec is record
      tv_sec  : time_t;
      tv_nsec : long;
   end record;
   pragma Convention (C, timespec);



Reply to: