From lechner@cs.uml.edu Fri Aug 25 00:50:40 2006 Received: from saturn.cs.uml.edu (saturn.cs.uml.edu [129.63.8.2]) by earth.cs.uml.edu (8.12.11.20060308/8.11.6) with ESMTP id k7P4oewq020696; Fri, 25 Aug 2006 00:50:40 -0400 Received: from saturn.cs.uml.edu (localhost [127.0.0.1]) by saturn.cs.uml.edu (8.12.9/8.12.9) with ESMTP id k7P4oeXi278791; Fri, 25 Aug 2006 00:50:40 -0400 (EDT) Received: (from lechner@localhost) by saturn.cs.uml.edu (8.12.9/8.12.9/Submit) id k7P4od3H504608; Fri, 25 Aug 2006 00:50:39 -0400 (EDT) From: Bob Lechner Message-Id: <200608250450.k7P4od3H504608@saturn.cs.uml.edu> Subject: PATH_MAX and NAME_MAX - never mind - I found them (values differ) To: omacneil@cs.uml.edu (Dan MacNeil) Date: Fri, 25 Aug 2006 00:50:39 -0400 (EDT) Cc: lechner@cs.uml.edu (Bob Lechner), ken@cs.uml.edu (Ken Kleiner) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2596 Lines: 63 X-Status: X-Keywords: X-UID: 1133 X-Evolution: 000005ce-0000 Status: RO g++ complained about my work-around: #define PATH_MAXto 255 It said I redefined the value in /usr/include/linux/limits.h: (BOth PATH_MAX and NAME_MAX are MUCH larger than om saturn:) mercury(202)> cat /usr/include/linux/limits.h ----------------------------- #ifndef _LINUX_LIMITS_H #define _LINUX_LIMITS_H #define NR_OPEN 1024 #define NGROUPS_MAX 65536 /* supplemental group IDs are available */ #define ARG_MAX 131072 /* # bytes of args + environ for exec() */ #define CHILD_MAX 999 /* no limit :-) */ #define OPEN_MAX 256 /* # open files a process may have */ #define LINK_MAX 127 /* # links a file may have */ #define MAX_CANON 255 /* size of the canonical input queue */ #define MAX_INPUT 255 /* size of the type-ahead buffer */ #define NAME_MAX 255 /* # chars in a file name */ #define PATH_MAX 4096 /* # chars in a path name including nul */ #define PIPE_BUF 4096 /* # bytes in atomic write to a pipe */ #define XATTR_NAME_MAX 255 /* # chars in an extended attribute name */ #define XATTR_SIZE_MAX 65536 /* size of an extended attribute value (64k) */ #define XATTR_LIST_MAX 65536 /* size of extended attribute namelist (64k) */ #define RTSIG_MAX 32 ============================================================= Forwarded message: > From lechner@cs.uml.edu Fri Aug 25 00:14:06 2006 > From: Bob Lechner > Subject: PATH_MAX and NAME_MAX - whre are they on Mercury? > To: omacneil@cs.uml.edu (Dan MacNeil) > Date: Fri, 25 Aug 2006 00:14:04 -0400 (EDT) > Cc: lechner@cs.uml.edu (Bob Lechner), sfrye@cs.uml.edu (Scot Frye), > ralmonte@cs.uml.edu (Almonte) > > I have been referring to PATH_MAX and NAME_MAX in bde/src, > and #include . Can you say what should happen > for Mercury Red-Hat Linux? > > Thanks, > Bob Lechner > > > This works on saturn: > ------------------------------ > saturn.cs.uml.edu(115)> grep '(PATH|NAME)_MAX' /usr/include/limits.h > 100:#define _POSIX_NAME_MAX 14 > 104:#define _POSIX_PATH_MAX 255 > 108:#define _POSIX_TZNAME_MAX 3 > 109:#define _POSIX_LOGIN_NAME_MAX 9 > 110:#define _POSIX_TTY_NAME_MAX 9 > 135:#define LOGIN_NAME_MAX 64 > 136:#define TTY_NAME_MAX 13 > 149:#define CHARCLASS_NAME_MAX 255 /* Max. number of bytes in character class name */ > 183:#define NL_LANGMAX PATH_MAX /* max number of of bytes in a LANG name */ > ------------------------- > > but not om mercury: > ----------------------------- From lechner@cs.uml.edu Fri Aug 25 00:14:06 2006 Received: from saturn.cs.uml.edu (saturn.cs.uml.edu [129.63.8.2]) by earth.cs.uml.edu (8.12.11.20060308/8.11.6) with ESMTP id k7P4E5qm020272; Fri, 25 Aug 2006 00:14:05 -0400 Received: from saturn.cs.uml.edu (localhost [127.0.0.1]) by saturn.cs.uml.edu (8.12.9/8.12.9) with ESMTP id k7P4E5Xi272635; Fri, 25 Aug 2006 00:14:05 -0400 (EDT) Received: (from lechner@localhost) by saturn.cs.uml.edu (8.12.9/8.12.9/Submit) id k7P4E561278986; Fri, 25 Aug 2006 00:14:05 -0400 (EDT) From: Bob Lechner Message-Id: <200608250414.k7P4E561278986@saturn.cs.uml.edu> Subject: PATH_MAX and NAME_MAX - whre are they on Mercury? To: omacneil@cs.uml.edu (Dan MacNeil) Date: Fri, 25 Aug 2006 00:14:04 -0400 (EDT) Cc: lechner@cs.uml.edu (Bob Lechner), sfrye@cs.uml.edu (Scot Frye), ralmonte@cs.uml.edu (Almonte) X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 2884 Lines: 88 X-Status: X-Keywords: X-UID: 1131 X-Evolution: 000005ca-0000 Status: RO I have been referring to PATH_MAX and NAME_MAX in bde/src, and #include . Can you say what should happen for Mercury Red-Hat Linux? Thanks, Bob Lechner This works on saturn: ------------------------------ saturn.cs.uml.edu(115)> grep '(PATH|NAME)_MAX' /usr/include/limits.h 100:#define _POSIX_NAME_MAX 14 104:#define _POSIX_PATH_MAX 255 108:#define _POSIX_TZNAME_MAX 3 109:#define _POSIX_LOGIN_NAME_MAX 9 110:#define _POSIX_TTY_NAME_MAX 9 135:#define LOGIN_NAME_MAX 64 136:#define TTY_NAME_MAX 13 149:#define CHARCLASS_NAME_MAX 255 /* Max. number of bytes in character class name */ 183:#define NL_LANGMAX PATH_MAX /* max number of of bytes in a LANG name */ ------------------------- but not om mercury: ----------------------------- mercury(173)> pwd /usr/lib/gcc/i386-redhat-linux/3.4.3/include mercury(174)> grep _MAX limits.h 21:#ifndef MB_LEN_MAX 22:#define MB_LEN_MAX 1 27:#define SCHAR_MIN (-SCHAR_MAX - 1) 28:#undef SCHAR_MAX 29:#define SCHAR_MAX __SCHAR_MAX__ 32:#undef UCHAR_MAX 33:#if __SCHAR_MAX__ == __INT_MAX__ 34:# define UCHAR_MAX (SCHAR_MAX * 2U + 1U) 36:# define UCHAR_MAX (SCHAR_MAX * 2 + 1) 42:# if __SCHAR_MAX__ == __INT_MAX__ 47:# undef CHAR_MAX 48:# define CHAR_MAX UCHAR_MAX 52:# undef CHAR_MAX 53:# define CHAR_MAX SCHAR_MAX 58:#define SHRT_MIN (-SHRT_MAX - 1) 59:#undef SHRT_MAX 60:#define SHRT_MAX __SHRT_MAX__ 63:#undef USHRT_MAX 64:#if __SHRT_MAX__ == __INT_MAX__ 65:# define USHRT_MAX (SHRT_MAX * 2U + 1U) 67:# define USHRT_MAX (SHRT_MAX * 2 + 1) 72:#define INT_MIN (-INT_MAX - 1) 73:#undef INT_MAX 74:#define INT_MAX __INT_MAX__ 77:#undef UINT_MAX 78:#define UINT_MAX (INT_MAX * 2U + 1U) 83:#define LONG_MIN (-LONG_MAX - 1L) 84:#undef LONG_MAX 85:#define LONG_MAX __LONG_MAX__ 88:#undef ULONG_MAX 89:#define ULONG_MAX (LONG_MAX * 2UL + 1UL) 94:# define LLONG_MIN (-LLONG_MAX - 1LL) 95:# undef LLONG_MAX 96:# define LLONG_MAX __LONG_LONG_MAX__ 99:# undef ULLONG_MAX 100:# define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL) 106:# define LONG_LONG_MIN (-LONG_LONG_MAX - 1LL) 107:# undef LONG_LONG_MAX 108:# define LONG_LONG_MAX __LONG_LONG_MAX__ 111:# undef ULONG_LONG_MAX 112:# define ULONG_LONG_MAX (LONG_LONG_MAX * 2ULL + 1ULL) mercury(175)> -------------------------------- mercury(175)> grep include limits.h 11:#include "syslimits.h" 122:#include_next /* recurse down to the real one */ mercury(176)> ---------------------------- mercury(178)> cat syslimits.h /* syslimits.h stands for the system's own limits.h file. If we can use it ok unmodified, then we install this text. If fixincludes fixes it, then the fixed version is installed instead of this text. */ #define _GCC_NEXT_LIMITS_H /* tell gcc's limits.h to recurse */ #include_next #undef _GCC_NEXT_LIMITS_H mercury(179)> -------------------------