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

Adhemerval Zanella adhemerval.zanella@linaro.org
Mon Nov 9 20:22:02 GMT 2020



On 09/11/2020 15:39, Joseph Myers wrote:
> 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.

This might result is possible linking issues with C++ and mangling
if objects built with different time ABI get mixed together, although
I don't have a better solution.


More information about the Libc-alpha mailing list