Re: [PATCH 1/4] Split the HOST_NAME_MAX detection into a separate m4 macro

2011-12-03 Thread Bruno Haible
whitespace+comments change. diff --git a/m4/gethostname.m4 b/m4/gethostname.m4 --- a/m4/gethostname.m4 +++ b/m4/gethostname.m4 @@ -43,9 +43,8 @@ AC_DEFUN([gl_FUNC_GETHOSTNAME], gl_PREREQ_HOST_NAME_MAX ]) -dnl Also provide HOST_NAME_MAX when lacks it. +# Provide HOST_NAME_MAX when lacks it

[PATCH 1/4] Split the HOST_NAME_MAX detection into a separate m4 macro

2011-12-02 Thread Ben Walton
This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -40,7 +40,12 @@ AC_DEFUN([gl_FUNC_GETHOSTNAME], HAVE_GETHOSTNAME=0 fi - dnl Also provide HOST_NAME_MAX when lacks it. + gl_PREREQ_HOST_NAME_MAX +]) + +dnl Also

Re: [PATCH 1/3] Split the HOST_NAME_MAX detection into separate m4 macro

2011-11-30 Thread Bruno Haible
undation > 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_

[PATCH 1/3] Split the HOST_NAME_MAX detection into separate m4 macro

2011-11-29 Thread Ben Walton
+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 lacks it. dnl - On most Unix systems, use MAXHOSTNAMELEN from instead. dnl - On Solaris, Cygwin, BeOS, use

Re: HOST_NAME_MAX on HP-NonStop

2010-12-25 Thread Bruno Haible
Joachim Schmitz wrote: > Problem: I seem to need automake 1.11 but only have 1.8 Yes, the file DEPENDENCIES says that you need automake 1.9.6 at least, for use with gnulib. > Meanwhile it'd be great if you could create me a new testdir Find it at http://www.haible.de/bruno/gnu/testdir-posix.tar.

RE: HOST_NAME_MAX on HP-NonStop

2010-12-25 Thread Joachim Schmitz
2010 1:57 PM To: Joachim Schmitz Cc: bug-gnulib@gnu.org Subject: Re: HOST_NAME_MAX on HP-NonStop Joachim Schmitz wrote: > Good question. In config.h I can only see: > > #define HOST_NAME_MAX > > So it gets #define'd but with no value ... > Possibly because it does not #include

Re: HOST_NAME_MAX on HP-NonStop

2010-12-24 Thread Bruno Haible
Joachim Schmitz wrote: > Good question. In config.h I can only see: > > #define HOST_NAME_MAX > > So it gets #define'd but with no value > ... > Possibly because it does not #include is such a rarely included header file that we can ignore it here, and simply use a

RE: HOST_NAME_MAX on HP-NonStop

2010-12-23 Thread Joachim Schmitz
Good question. In config.h I can only see: #define HOST_NAME_MAX So it gets #define'd but with no value >From config.log: configure:33394: checking for HOST_NAME_MAX configure:33420: cc -o conftest -g -I/usr/local/include conftest.c >&5 static long int longval () { return

Re: HOST_NAME_MAX on HP-NonStop

2010-12-23 Thread Bruno Haible
Joachim Schmitz wrote: > Problem with HOST_NAME_MAX (MAXHOSTNAMELEN is set to 64 in , > added this to gllib/unistd.in.h, but don't think it belongs there): >     char buf[HOST_NAME_MAX]; >          ^ > "/usr/local/Floss/gnulib/testdir-posix/gltests/test-gethostname.

Re: HOST_NAME_MAX

2009-08-11 Thread Simon Josefsson
Bruno Haible writes: > Simon Josefsson wrote: >> Then I'm less sure that it makes sense for >> gnulib's limit.h to define HOST_NAME_MAX -- programs written against >> POSIX should not assume that symbol exists. > > On the other hand, the support of POSI

Re: HOST_NAME_MAX

2009-08-10 Thread Bruno Haible
Simon Josefsson wrote: > Then I'm less sure that it makes sense for > gnulib's limit.h to define HOST_NAME_MAX -- programs written against > POSIX should not assume that symbol exists. On the other hand, the support of POSIX for unspecified maximum host name lengths is weak:

Re: HOST_NAME_MAX

2009-08-10 Thread Simon Josefsson
Bruno Haible writes: >> It seems clear that FreeBSD isn't POSIX compliant here since >> HOST_NAME_MAX needs to be provided, as far as I can tell. > > So, FreeBSD is POSIX compliant. See [1]: HOST_NAME_MAX is inside a section > that begins with: > "A definitio

Re: HOST_NAME_MAX

2009-08-10 Thread Bruno Haible
Simon Josefsson wrote: > Is the maximum string ever returned by gethostname bounded by > MAXHOSTNAMELEN? I expect so. > It seems clear that FreeBSD isn't POSIX compliant here since > HOST_NAME_MAX needs to be provided, as far as I can tell. So, FreeBSD is POSIX compliant. See [

Re: HOST_NAME_MAX

2009-08-10 Thread Simon Josefsson
Bruno Haible writes: > Simon Josefsson wrote: >> Right, it seems clear that gnulib should define HOST_NAME_MAX on more >> systems. >> >> I note that a Solaris 10 I have access to defines _POSIX_HOST_NAME_MAX: >> >> /usr/include/limits.h:#define _POS

Re: HOST_NAME_MAX

2009-08-08 Thread Bruno Haible
Simon Josefsson wrote: > Right, it seems clear that gnulib should define HOST_NAME_MAX on more > systems. > > I note that a Solaris 10 I have access to defines _POSIX_HOST_NAME_MAX: > > /usr/include/limits.h:#define _POSIX_HOST_NAME_MAX255 But _POSIX_HOS

Re: HOST_NAME_MAX

2009-08-06 Thread Simon Josefsson
"Tom G. Christensen" writes: > It assumes that only win32 lacks HOST_NAME_MAX which is not > true. :-( > The daily gnulib snapshot from Simon fails thusly on > sparc-sun-solaris2.6: > test-gethostname.c: In function 'main': > test-gethostname.c:34: error:

Re: HOST_NAME_MAX

2009-08-06 Thread Tom G. Christensen
On Sun, Aug 02, 2009 at 03:31:24PM +0200, Bruno Haible wrote: > > 2009-08-02 Simon Josefsson > > Bruno Haible > > > > Ensure HOST_NAME_MAX as part of the gethostname module. > > * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows

Re: HOST_NAME_MAX

2009-08-03 Thread Simon Josefsson
Bruno Haible writes: > I've applied it with a few tweaks, as follows: > - Document the problem under "problems fixed by Gnulib", not under > "problems not fixed by Gnulib". > - Move the AC_DEFINE out of gl_PREREQ_GETHOSTNAME, since it's the >

Re: HOST_NAME_MAX

2009-08-02 Thread Bruno Haible
> 2009-08-02 Simon Josefsson > Bruno Haible > > Ensure HOST_NAME_MAX as part of the gethostname module. > * m4/gethostname.m4 (gl_FUNC_GETHOSTNAME): On native Windows platforms, > define also HOST_NAME_MAX. > * tests/test-gethostname

Re: HOST_NAME_MAX

2009-08-02 Thread Bruno Haible
Simon Josefsson wrote on 2009-04-01: > > The definition can be triggered by the 'gethostname' module. I don't think > > anyone will need HOST_NAME_MAX without needing the gethostname() function. > > That would be fine with me. How about the patch below

Re: HOST_NAME_MAX

2009-04-01 Thread Simon Josefsson
Bruno Haible writes: >> One complication is that POSIX says the symbol should be defined in >> limits.h. Do we need a gnulib replacement header for limits.h to be >> able to define HOST_NAME_MAX? > > No, it is more convenient to define it in config.h, simply throug

Re: HOST_NAME_MAX

2009-04-01 Thread Bruno Haible
Simon Josefsson wrote: > POSIX requires this symbol, but MinGW doesn't appear to define it: > > ../../../../src/gss-0.1.1/lib/krb5/name.c:89: error: 'HOST_NAME_MAX' > undeclared (first use in this function) > > According to MSDN gethostname documentation: >

HOST_NAME_MAX

2009-03-31 Thread Simon Josefsson
POSIX requires this symbol, but MinGW doesn't appear to define it: ../../../../src/gss-0.1.1/lib/krb5/name.c:89: error: 'HOST_NAME_MAX' undeclared (first use in this function) According to MSDN gethostname documentation: http://msdn.microsoft.com/en-us/library/ms738527.aspx &qu