Subject: SYS_NMLN & struct utsname
To: None <tech-kern@netbsd.org>
From: Simon Burge <simonb@telstra.com.au>
List: tech-kern
Date: 11/01/1998 09:05:55
At the moment, the members of struct utsname in <sys/utsname.h> have
their length defined by a magic number (256 in this case).  Some code I
was compiling assumed that the length of the members would be 'SYS_NMLN'
- the two other O/S's I use day-to-day (Ultrix and Solaris) both define
this.  Solaris at least has the

	#if (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)) 

standards dance around the #define, and uses __SYS_NMLN as well.

Anyone object if I do something similar for our <sys/utsname.h>?


As a side note, Solaris has the comment "Must be at least 257 to support
Internet hostnames."  I guess this is to allow 256 char hostnames.  Two
questions:

 a)  Is there anywhere that says an "internet hostname" can be up to
     256 chars?
 b)  Would simply changing this break binary compatibility with
     anything?

Simon.