tech-misc archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[PATCH] POSIX01: implement _POSIX_HOST_NAME_MAX



From: Andy Shevchenko <andy.shevchenko%gmail.com@localhost>

Implement mandatory _POSIX_HOST_NAME_MAX constant.
So, MAXHOSTNAMELEN should be synchronized with it.
---
 include/limits.h |    1 +
 sys/sys/param.h  |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/limits.h b/include/limits.h
index ea8d96d..4ed0b8e 100644
--- a/include/limits.h
+++ b/include/limits.h
@@ -42,6 +42,7 @@
 #define        _POSIX_AIO_MAX          1
 #define        _POSIX_ARG_MAX          4096
 #define        _POSIX_CHILD_MAX        25
+#define        _POSIX_HOST_NAME_MAX    255
 #define        _POSIX_LINK_MAX         8
 #define        _POSIX_LOGIN_NAME_MAX   9
 #define        _POSIX_MAX_CANON        255
diff --git a/sys/sys/param.h b/sys/sys/param.h
index 561938b..dfae46f 100644
--- a/sys/sys/param.h
+++ b/sys/sys/param.h
@@ -94,6 +94,7 @@
  * Redefined constants are from POSIX 1003.1 limits file.
  *
  * MAXCOMLEN should be >= sizeof(ac_comm) (see <acct.h>)
+ * MAXHOSTNAMELEN should be = (_POSIX_HOST_NAME_MAX + 1) (see <limits.h>)
  * MAXLOGNAME should be >= UT_NAMESIZE (see <utmp.h>)
  */
 #include <sys/syslimits.h>
-- 
1.5.2.5




Home | Main Index | Thread Index | Old Index