Ralf Wildenhues wrote: > > What's the point of that? > > To supply a prototype for strcpy which is used in the test.
Thanks for explaining. The only risk is that of a possible prototype clash for stpncpy() between <string.h> and the expected one, but I've checked AIX and glibc (the only platforms known so far to have stpncpy()) and there appears to be no problem. So I checked in this: *** stpncpy.m4 2 Mar 2005 17:19:45 -0000 1.6 --- stpncpy.m4 25 Sep 2006 14:33:50 -0000 *************** *** 1,5 **** ! # stpncpy.m4 serial 3 ! dnl Copyright (C) 2002-2003, 2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. --- 1,5 ---- ! # stpncpy.m4 serial 4 ! dnl Copyright (C) 2002-2003, 2005-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. *************** *** 22,27 **** --- 22,29 ---- AC_CACHE_CHECK([for working stpncpy], gl_cv_func_stpncpy, [ AC_TRY_RUN([ #include <stdlib.h> + #include <string.h> /* for strcpy */ + /* The stpncpy prototype is missing in <string.h> on AIX 4. */ extern char *stpncpy (char *dest, const char *src, size_t n); int main () { const char *src = "Hello";