X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=m4%2Fgethostname.m4;h=b813c36fb6a9d4dc78fc40a230b8ea8e82eead52;hb=06a366de002272748bd110dcd4da6d967ff57d46;hp=02ce846208aeb6eb4e7c185c4ddf77bf09dfb6cc;hpb=30dccb610124997ff5776d80979d24375f39b12a;p=gnulib.git diff --git a/m4/gethostname.m4 b/m4/gethostname.m4 index 02ce84620..b813c36fb 100644 --- a/m4/gethostname.m4 +++ b/m4/gethostname.m4 @@ -1,5 +1,5 @@ -# gethostname.m4 serial 9 -dnl Copyright (C) 2002, 2008, 2009 Free Software Foundation, Inc. +# gethostname.m4 serial 11 +dnl Copyright (C) 2002, 2008-2011 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], @@ -83,7 +83,11 @@ lucky #if HAVE_NETDB_H # include #endif -]) +], + [dnl The system does not define MAXHOSTNAMELEN in any of the common + dnl headers. Use a safe fallback. + gl_cv_decl_HOST_NAME_MAX=256 + ]) fi fi ])