This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: Is Y2038-proofing in a glibc roadmap somewhere?


On Mon, Aug 3, 2015 at 9:36 AM, Albert ARIBAUD <albert.aribaud@3adev.fr> wrote:
>> 'struct stat', for instance, contains both time_t and
>> off_t quantities, so there would have to be four different definitions
>> of it if _FILE_OFFSET_BITS and _TIME_BITS were independent, but only
>> three if _TIME_BITS=64 requires _FILE_OFFSET_BITS=64.  And restricting
>> it to three variants also makes it more likely that the different
>> structures can be told apart by sizeof().
>
> I get the idea, although I am not sure why we would want to use
> structure size to tell variants apart. If we know there are variants
> to begin with, then we know on which macro these variants depend and we
> can tell the variants apart based on which macros are defined, could
> we not?

This is only a relevant factor in cases when you can't tell them apart
any other way.  'struct stat' was a bad example because that's already
handled with the xstat mechanism and the '64' suffix, but imagine that
there's some poorly-documented ioctl() taking a structure containing
both an off_t and a struct timespec.

zw


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