Future branch status

Peter Mazinger ps.m at gmx.net
Tue Apr 24 21:54:10 UTC 2012


> Peter,
> 

> I get alot of errors when compiling for x86_64 (i.e. 64bit), e.g.:
> 
> libc/misc/dirent/versionsort.c:16:1: warning: return type defaults to
> 'int' [enabled by default]
> libc/misc/dirent/versionsort.c:16:1: warning: function declaration
> isn't a prototype [-Wstrict-prototypes]

means, your headers do not provide a prototype for versionsort()

> libc/misc/dirent/versionsort.c: In function 'strongs_alias_untyped':
> libc/misc/dirent/versionsort.c:16:1: warning: type of 'versionsort'
> defaults to 'int' [enabled by default]

same as above

> libc/misc/dirent/versionsort.c:16:1: warning: type of 'versionsort64'
> defaults to 'int' [enabled by default]

same as above

> libc/misc/dirent/versionsort.c:16:1: error: expected '{' at end of input
> libc/misc/dirent/versionsort.c:16:1: warning: control reaches end of
> non-void function [-Wreturn-type]

unusual, but could be dependent of the above problem

> In the respective commit, you write:
> 
> versionsort*.c, alphasort*.c: do not need *64 compiled for __WORDSIZE = 64
> 
> but for this to really happen one would, i think, have to say:
> diff --git a/libc/misc/dirent/versionsort.c
> b/libc/misc/dirent/versionsort.c
> index e298728..6269862 100644
> --- a/libc/misc/dirent/versionsort.c
> +++ b/libc/misc/dirent/versionsort.c
> @@ -12,6 +12,6 @@ int versionsort(const struct dirent **a, const
> struct dirent **b)
>  {
>  	return strverscmp((*a)->d_name, (*b)->d_name);
>  }
> -#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE == 64
> +#if defined __UCLIBC_HAS_LFS__ && __WORDSIZE != 64
>  strongs_alias_untyped(versionsort,versionsort64)
>  #endif

as per usage until now, if LFS is not enabled, there is no X64() function enabled in uClibc (provided by the guard __UCLIBC_HAS_LFS__)
The strong alias is used, since on 64 bit archs the function is the same, in this concret case, the struct dirent = struct dirent64
> 
> Since this also happens in other such places like below, i must be
> doing something wrong?
> Please elaborate how you meant the hunks above and below to work.
> 
> fcntl{64,}.c: fix x86_64 && LFS duly:
> -#if defined __UCLIBC_HAS_LFS__ && (__WORDSIZE == 64 || !defined
> __NR_fcntl64)
> +#if defined __UCLIBC_HAS_LFS__ && (__WORDSIZE != 64 && defined
> __NR_fcntl64)

fcntl is a special case, not comparable with the other X64() functions (at least in uClibc), this case can be discussed on ml if you want to. 

Regards, Peter
> 
> thanks,

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de


More information about the uClibc mailing list