[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/3] Split the HOST_NAME_MAX detection into separate m4 macro
From: |
Bruno Haible |
Subject: |
Re: [PATCH 1/3] Split the HOST_NAME_MAX detection into separate m4 macro |
Date: |
Wed, 30 Nov 2011 11:32:06 +0100 |
User-agent: |
KMail/1.13.6 (Linux/2.6.37.6-0.5-desktop; KDE/4.6.0; x86_64; ; ) |
Ben Walton wrote:
> --- a/m4/gethostname.m4
> +++ b/m4/gethostname.m4
> @@ -1,4 +1,4 @@
> -# gethostname.m4 serial 12
> +# gethostname.m4 serial 13
> 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,
> @@ -40,6 +40,10 @@ AC_DEFUN([gl_FUNC_GETHOSTNAME],
> HAVE_GETHOSTNAME=0
> fi
>
> + gl_PREREQ_HOST_NAME_MAX
> +])
> +
> +AC_DEFUN([gl_PREREQ_HOST_NAME_MAX], [
> dnl Also provide HOST_NAME_MAX when <limits.h> lacks it.
> dnl - On most Unix systems, use MAXHOSTNAMELEN from <sys/param.h> instead.
> dnl - On Solaris, Cygwin, BeOS, use MAXHOSTNAMELEN from <netdb.h> instead.
>
Looks fine. I would move the one-line comment
"Provide HOST_NAME_MAX when <limits.h> lacks it." outside the new macro,
as a quick overview of what it does. The details documentation can stay
inside the macro.
Bruno
--
In memoriam Alfred Herrhausen <http://en.wikipedia.org/wiki/Alfred_Herrhausen>