X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgethostname.m4;h=7413f9e395dfc5c0760d5773eea6d3e171812a29;hb=fdd1b511c5c12912aae79b58e0c5f6ffa0492d6e;hp=025c55d59d4d16fb214fb812528843c107b81c21;hpb=15884890b30bc2c220e8e5c035d8009885b4810d;p=gnulib.git diff --git a/m4/gethostname.m4 b/m4/gethostname.m4 index 025c55d59..7413f9e39 100644 --- a/m4/gethostname.m4 +++ b/m4/gethostname.m4 @@ -1,5 +1,5 @@ -# gethostname.m4 serial 10 -dnl Copyright (C) 2002, 2008-2010 Free Software Foundation, Inc. +# gethostname.m4 serial 13 +dnl Copyright (C) 2002, 2008-2013 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. @@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_GETHOSTNAME], dnl Where is gethostname() defined? dnl - On native Windows, it is in ws2_32.dll. - dnl - Otherwise is is in libc. + dnl - Otherwise it is in libc. GETHOSTNAME_LIB= AC_CHECK_FUNCS([gethostname], , [ AC_CACHE_CHECK([for gethostname in winsock2.h and -lws2_32], @@ -37,12 +37,14 @@ AC_DEFUN([gl_FUNC_GETHOSTNAME], AC_SUBST([GETHOSTNAME_LIB]) if test "$ac_cv_func_gethostname" = no; then - AC_LIBOBJ([gethostname]) HAVE_GETHOSTNAME=0 - gl_PREREQ_GETHOSTNAME fi - dnl Also provide HOST_NAME_MAX when lacks it. + gl_PREREQ_HOST_NAME_MAX +]) + +# Provide HOST_NAME_MAX when lacks it. +AC_DEFUN([gl_PREREQ_HOST_NAME_MAX], [ dnl - On most Unix systems, use MAXHOSTNAMELEN from instead. dnl - On Solaris, Cygwin, BeOS, use MAXHOSTNAMELEN from instead. dnl - On mingw, use 256, because