This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 2/5] sysvipc: Move __IPC_64 to kernel-features.h
On 20/05/2019 04:42, Andreas Schwab wrote:
> On Mai 16 2019, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
>
>> In file included from ../sysdeps/unix/sysv/linux/arm/kernel-features.h:23,
>> from ../sysdeps/unix/sysv/linux/lowlevellock-futex.h:25,
>> from ../sysdeps/nptl/lowlevellock.h:23,
>> from ../nptl/descr.h:29,
>> from ../sysdeps/arm/nptl/tls.h:42,
>> from ../sysdeps/unix/sysv/linux/arm/tls.h:23,
>> from ../sysdeps/unix/sysv/linux/arm/sysdep.h:33,
>> from <stdin>:2:
>> ../sysdeps/unix/sysv/linux/kernel-features.h:83: error: "__IPC_64" redefined [-Werror]
>> #define __IPC_64 0x0
>>
>> In file included from ../sysdeps/unix/sysv/linux/sysdep.h:19,
>> from ../sysdeps/unix/sysv/linux/arm/sysdep.h:27,
>> from <stdin>:2:
>> ../sysdeps/unix/sysv/linux/arm/kernel-features.h:58: note: this is the location of the previous definition
>> #define __IPC_64 0x100
>
> I think trying to put __IPC_64 in kernel-features.h is the wrong way to
> solve this.
I don't a strong preference here, one option is to parametrize even more
the __IPC_64 with another flag that set/unset by kernel-features.h and
then handled by ipc-priv.h or whatever. However I think this is more
unnecessary complexity.
>
>> In general I think unguarded headers file are error-prone.
>
> kernel-features.h is special since it is chain-loaded.
Does it really to continue to be chain-loaded? It limits the way we
code it to just set/unset.
>
> Andreas.
>