X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgethostname.m4;h=02ce846208aeb6eb4e7c185c4ddf77bf09dfb6cc;hb=959d9cb463d992f9c5cc2fbeb54bf12eee2346f7;hp=e32f7e52eeefedd0c94868ab4aad375d445e7a8b;hpb=9e74daebbd03566e8e2f18ee49c4a928a563ccb5;p=gnulib.git diff --git a/m4/gethostname.m4 b/m4/gethostname.m4 index e32f7e52e..02ce84620 100644 --- a/m4/gethostname.m4 +++ b/m4/gethostname.m4 @@ -1,4 +1,4 @@ -# gethostname.m4 serial 8 +# gethostname.m4 serial 9 dnl Copyright (C) 2002, 2008, 2009 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -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