[PATCH 2/3] msqid: Provide internal copy of struct __msqid64_ds

Joseph Myers joseph@codesourcery.com
Mon Nov 9 18:39:07 GMT 2020


On Mon, 9 Nov 2020, Adhemerval Zanella via Libc-alpha wrote:

> On 06/11/2020 14:37, Joseph Myers wrote:
> > On Fri, 6 Nov 2020, Lukasz Majewski wrote:
> > 
> >> 3. The exported header (from point 1) shall have:
> >>
> >> #if __TIMESIZE == 32 && defined __USE_TIME_BITS64
> >> # define timespec __timespec64
> >> #endif
> > 
> > You'll need to make sure that's permitted under the namespace reservations 
> > in POSIX.
> > 
> > For the cases where a struct tag has the same name as a function (e.g. 
> > stat), #undef of the function name is definitely allowed for user 
> > programs, so relying on defining the struct tag as a macro is probably 
> > unsafe in that case.
> 
> In these which alternative would be better?  Export __timespec64 as 
> different name or use the strategy to redefine timespec to different
> member sizes and layout depending of time ABI?

If in a particular case defining the struct tag as a macro is unsafe, we 
can't avoid having different definitions of the contents of the same 
struct tag depending on how _TIME_BITS is defined.

-- 
Joseph S. Myers
joseph@codesourcery.com


More information about the Libc-alpha mailing list