[roland/maxhostnamelen] Use HOST_NAME_MAX for MAXHOSTNAMELEN in <sys/param.h>.
Commit Message
This is a generic change, but in fact it only affects *-nacl
configurations. For Linux configurations, <bits/param.h> (via the
kernel's <asm/param.h>) defines MAXHOSTNAMELEN already. For Hurd,
nothing defines HOST_NAME_MAX, so this won't change anything.
If there are no objections soon, I'll put this on both trunk and
2.22 branch. It is a user-visible change and I didn't bother filing
in bugzilla, because no NaCl application developer will actually see
the 2.22-release version before this change.
Thanks,
Roland
2015-09-14 Roland McGrath <roland@hack.frob.com>
* misc/sys/param.h [!MAXHOSTNAMELEN && HOST_NAME_MAX]
(MAXHOSTNAMELEN): Define it to HOST_NAME_MAX.
@@ -50,6 +50,9 @@
#if !defined NOFILE && defined OPEN_MAX
# define NOFILE OPEN_MAX
#endif
+#if !defined MAXHOSTNAMELEN && defined HOST_NAME_MAX
+# define MAXHOSTNAMELEN HOST_NAME_MAX
+#endif
#ifndef NCARGS
# ifdef ARG_MAX
# define NCARGS ARG_MAX