strnlen

Zimmermann Paul Paul.Zimmermann at inria.fr
Tue May 14 17:09:53 CEST 2013


> From: Torbjorn Granlund <tg at gmplib.org>
> Date: Tue, 14 May 2013 15:47:19 +0200
> 
> Zimmermann Paul <Paul.Zimmermann at inria.fr> writes:
> 
>   when cross-compiling, GMP assumes the strnlen() function is not present on the
>   target machine, and if it is present on the compilation machine, we get a
>   conflict with the "static" declaration in printf/repl-vsnprintf.c.
>   
>   It seems this is the only similar issue with 5.1.1.
>   
> Are you refering to the code,
> 
> #if ! HAVE_STRNLEN
> static size_t
> strnlen (const char *s, size_t n)
> ...  
> 
> in printf/repl-vsnprintf.c?

yes.

> I don't understand the correlation of any problems with this code and
> cross-compilation.
> 
> And if the (cross-) compilation environment is set up properly, wouldn't
> HAVE_STRNLEN be set correctly?
> 
> -- 
> Torbjörn

sorry, I reported this issue more than one month ago, and now I cannot
reproduce it any more.

Paul


More information about the gmp-bugs mailing list