[PATCH] update bits/errno.h to include kernel header errno.h instead of errno_values.h

Carmelo AMOROSO carmelo.amoroso at st.com
Wed Jun 11 15:55:25 UTC 2008


Denys Vlasenko wrote:
> On Wednesday 11 June 2008 11:00, Carmelo AMOROSO wrote:
>   
>> Hi,
>> I've found some problem while building bluez-utils for uclibc due to 
>> missing
>> ENOKEY errno, that is properly defined in linux/asm-generic/errno.h
>> that uclibc doesn't include from include/bits/errno.h.
>> We use instead bits/errno_values.h.
>>
>> I think it should be worth to be always aligned with errno as defined by 
>> the kernel headers
>> we link against. So I suggest this patch and to remove the errno_values.h.
>> (note that glibc does the same)
>>
>> Does it make sense for you ?
>>     
>
> Yes.
>
> BTW, the reference you are removing is the only one
> that exists in the tree:
>
> # grep -Fr bits/errno_values.h .
> ./libc/sysdeps/linux/common/bits/errno.h:# include <bits/errno_values.h>
>
> After your patch these four files seems to be not referenced
> from anywhere:
>
> # find -name errno_values.h
> ./libc/sysdeps/linux/mips/bits/errno_values.h
> ./libc/sysdeps/linux/alpha/bits/errno_values.h
> ./libc/sysdeps/linux/sparc/bits/errno_values.h
> ./libc/sysdeps/linux/common/bits/errno_values.h
> --
> vda
>   
yes, I intend to remove all of them... they seems to be now useless.
I think errno values should be correctly defined within kernel headers
and correctly managed by kernel.
Indeed, following the headers inclusion chain it should work

linux/errno.h -> asm-<cpu>/errno.h -> asm-generic/errno.h -> 
asm-generic/errno-base.h

Ciao,
Carmelo




More information about the uClibc mailing list