On Sun, May 28, 2006 at 05:52:45PM +0200, Ralf Wildenhues wrote:
> And yes, that happens with GCC as well. They simply forget the final
> `\0', I guess. As also mentioned here[2], the strndup declaration is
> #ifdef'ed away behind a _LINUX_SOURCE_COMPAT define.
>
> I guess Autoconf should have a AC_FUNC_STRNLEN analogous to
> AC_FUNC_STRNLEN, and the Gnulib strnlen modules should use that.
> I don't know whether other buggy strn* functions exist on AIX.
When we build coreutils on AIX 4, we add the following to ./configure:
ac_cv_func_strndup=no ac_cv_have_decl_strndup=no
The -D_LINUX_SOURCE_COMPAT was added to a future AIX 4.3.3 release by
a libc patch so we ignore to avoid customers having to upgrade their
libc.
--
albert chin (address@hidden)