[roland/maxhostnamelen] Use HOST_NAME_MAX for MAXHOSTNAMELEN in <sys/param.h>.
diff mbox

Message ID 20150914181817.9A42A2C39F1@topped-with-meat.com
State New
Headers show

Commit Message

Roland McGrath Sept. 14, 2015, 6:18 p.m. UTC
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.

Patch
diff mbox

diff --git a/misc/sys/param.h b/misc/sys/param.h
index 62b7ed2..1908b93 100644
--- a/misc/sys/param.h
+++ b/misc/sys/param.h
@@ -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