X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fstpncpy.m4;h=701a82d98664d519acb89364e06fa17c07e6a35d;hb=32a3eff7f5191d76a82be7db1190a98ed9ef55d0;hp=158cc087d9e6af70e004b353dc9a694199e77f6c;hpb=c5728261c324a75f8d23dd7d10cb42dde9420227;p=gnulib.git diff --git a/m4/stpncpy.m4 b/m4/stpncpy.m4 index 158cc087d..701a82d98 100644 --- a/m4/stpncpy.m4 +++ b/m4/stpncpy.m4 @@ -29,7 +29,8 @@ AC_DEFUN([gl_FUNC_STPNCPY], AC_CHECK_FUNCS_ONCE([stpncpy]) if test $ac_cv_func_stpncpy = yes; then AC_CACHE_CHECK([for working stpncpy], [gl_cv_func_stpncpy], [ - AC_TRY_RUN([ + AC_RUN_IFELSE( + [AC_LANG_SOURCE([[ #include #include /* for strcpy */ /* The stpncpy prototype is missing in on AIX 4. */ @@ -50,7 +51,9 @@ int main () { if (stpncpy (dest, src, 7) != dest + 5) exit(1); exit(0); } -], [gl_cv_func_stpncpy=yes], [gl_cv_func_stpncpy=no], +]])], + [gl_cv_func_stpncpy=yes], + [gl_cv_func_stpncpy=no], [AC_EGREP_CPP([Thanks for using GNU], [ #include #ifdef __GNU_LIBRARY__