X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgethostname.m4;h=ef0b43ef9109d924ac0420db5437f0fd2b82ba41;hb=8924d470065e554cb4532df49ba159ffdf8c1b32;hp=e32f7e52eeefedd0c94868ab4aad375d445e7a8b;hpb=9e74daebbd03566e8e2f18ee49c4a928a563ccb5;p=gnulib.git diff --git a/m4/gethostname.m4 b/m4/gethostname.m4 index e32f7e52e..ef0b43ef9 100644 --- a/m4/gethostname.m4 +++ b/m4/gethostname.m4 @@ -1,5 +1,5 @@ -# gethostname.m4 serial 8 -dnl Copyright (C) 2002, 2008, 2009 Free Software Foundation, Inc. +# gethostname.m4 serial 9 +dnl Copyright (C) 2002, 2008, 2009, 2010 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,12 +22,12 @@ AC_DEFUN([gl_FUNC_GETHOSTNAME], [gl_cv_w32_gethostname=no gl_save_LIBS="$LIBS" LIBS="$LIBS -lws2_32" - AC_TRY_LINK([ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #ifdef HAVE_WINSOCK2_H #include #endif #include -], [gethostname(NULL, 0);], [gl_cv_w32_gethostname=yes]) +]], [[gethostname(NULL, 0);]])], [gl_cv_w32_gethostname=yes]) LIBS="$gl_save_LIBS" ]) if test "$gl_cv_w32_gethostname" = "yes"; then