On Mon, Aug 6, 2012 at 9:34 PM, Dimitrios Apostolou <ji...@gmx.net> wrote: > As an addendum to my previous patch, I made an attempt to properly add > strnlen() to libiberty, with the code copied from gnulib. Unfortunately it > seems I've messed it up somewhere since defining HAVE_STRNLEN to 0 doesn't > seem to build strnlen.o for me. Any ideas?
What do you mean by "defining HAVE_STRNLEN to 0"? The thing that will control building strnlen.o is having AC_REPLACE_FUNCS in libiberty/configure.in fail to find strlen. One way you can test this is by adding this to libiberty/config.cache: ac_cv_func_strnlen=${ac_cv_func_strnlen=yes} before invoking configure. Ian