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: [PATCH 2/5] sysvipc: Move __IPC_64 to kernel-features.h



On 16/05/2019 12:38, Andreas Schwab wrote:
> On Mai 16 2019, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
> 
>> diff --git a/sysdeps/unix/sysv/linux/arm/kernel-features.h b/sysdeps/unix/sysv/linux/arm/kernel-features.h
>> index 2d2d355844..4f5c621f82 100644
>> --- a/sysdeps/unix/sysv/linux/arm/kernel-features.h
>> +++ b/sysdeps/unix/sysv/linux/arm/kernel-features.h
>> @@ -17,6 +17,9 @@
>>     License along with the GNU C Library.  If not, see
>>     <http://www.gnu.org/licenses/>.  */
>>  
>> +#ifndef _KERNEL_FEATURES_H
>> +#define _KERNEL_FEATURES_H 1
> 
> Why do you need to add the guards (and only for some of them)?
> 
> Andreas.
> 

I added as I tried to build against the ABI and saw failures. The main
different is different than other __ASSUME flags, __IPC_64 is redefined.  
And this make compiler throw a lot of redefine error. For ARM specifically:

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

In general I think unguarded headers file are error-prone.


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