X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstpncpy.m4;fp=m4%2Fstpncpy.m4;h=158cc087d9e6af70e004b353dc9a694199e77f6c;hb=c5728261c324a75f8d23dd7d10cb42dde9420227;hp=d2344acc4a51ee06862732f893070c26778fd27d;hpb=a6e3f90ba60482e679b8c60a2e2658058715da12;p=gnulib.git diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4 index d2344acc4..158cc087d 100644 --- a/m4/stpncpy.m4 +++ b/m4/stpncpy.m4 @@ -1,4 +1,4 @@ -# stpncpy.m4 serial 11 +# stpncpy.m4 serial 12 dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 Free Software Foundation, dnl Inc. dnl This file is free software; the Free Software Foundation @@ -25,6 +25,7 @@ AC_DEFUN([gl_FUNC_STPNCPY], dnl in AIX: dest + max(0,n-1) dnl Only the glibc return value is useful in practice. + AC_CHECK_DECLS_ONCE([stpncpy]) AC_CHECK_FUNCS_ONCE([stpncpy]) if test $ac_cv_func_stpncpy = yes; then AC_CACHE_CHECK([for working stpncpy], [gl_cv_func_stpncpy], [ @@ -32,7 +33,9 @@ AC_DEFUN([gl_FUNC_STPNCPY], #include #include /* for strcpy */ /* The stpncpy prototype is missing in on AIX 4. */ +#if !HAVE_DECL_STPNCPY extern char *stpncpy (char *dest, const char *src, size_t n); +#endif int main () { const char *src = "Hello"; char dest[10];