From 00994759b6c52b0c73148a7cb37320bfe4019f83 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Fri, 1 Jul 2011 12:45:25 +0000 Subject: [PATCH] * include/sys/param.h (NGROUPS): Redefine as NGROUPS_MAX. (MAXHOSTNAMELEN): Redefine with same value as MAX_HOSTNAME_LEN. Change comment. (MAXPATHLEN): Improve comment. (MAXSYMLINKS): Define and add comment. --- winsup/cygwin/ChangeLog | 8 ++++++++ winsup/cygwin/include/sys/param.h | 14 +++++++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 00d39e5ac..04b365ad5 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,11 @@ +2011-07-01 Corinna Vinschen + + * include/sys/param.h (NGROUPS): Redefine as NGROUPS_MAX. + (MAXHOSTNAMELEN): Redefine with same value as MAX_HOSTNAME_LEN. Change + comment. + (MAXPATHLEN): Improve comment. + (MAXSYMLINKS): Define and add comment. + 2011-07-01 Corinna Vinschen * fhandler.cc (fhandler_base::open): Move NFS-specific code into the diff --git a/winsup/cygwin/include/sys/param.h b/winsup/cygwin/include/sys/param.h index 16e181940..70c4ac98e 100644 --- a/winsup/cygwin/include/sys/param.h +++ b/winsup/cygwin/include/sys/param.h @@ -19,19 +19,23 @@ #define NOFILE 8192 /* Max number of groups; must keep in sync with NGROUPS_MAX in limits.h */ -#define NGROUPS 1024 +#define NGROUPS NGROUPS_MAX /* Ticks/second for system calls such as times() */ /* FIXME: is this the appropriate value? */ #define HZ 1000 -/* Max hostname size that can be dealt with */ -/* FIXME: is this the appropriate value? */ -#define MAXHOSTNAMELEN 64 +/* Max hostname size that can be dealt with (== Win32 MAX_HOSTNAME_LEN) */ +#define MAXHOSTNAMELEN 128 -/* The Posix version is PATH_MAX. MAXPATHLEN is the BSD variant. */ +/* Maximum path length including trailing NUL; the Posix version is PATH_MAX. + MAXPATHLEN is the BSD variant. */ #define MAXPATHLEN PATH_MAX +/* Maximum number of nested symlinks; the Posix version is SYMLOOP_MAX. + MAXSYMLINKS is the BSD variant. */ +#define MAXSYMLINKS SYMLOOP_MAX + /* This is the number of bytes per block given in the st_blocks stat member. It should be in sync with S_BLKSIZE in sys/stat.h. S_BLKSIZE is the BSD variant of this constant. */