From 232fee428a9afc01d2ff5f551b6ad6afff3e7394 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 29 Mar 2005 17:46:17 +0000 Subject: [PATCH] * include/limits.h (NAME_MAX): New define. (PATH_MAX): POSIX allows PATH_MAX to include trailing NUL. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/include/limits.h | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 22814279b..aa28ca4dc 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-03-29 Eric Blake + + * include/limits.h (NAME_MAX): New define. + (PATH_MAX): POSIX allows PATH_MAX to include trailing NUL. + 2005-03-29 Corinna Vinschen * path.cc (is_floppy): Make externally available. diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h index 5ef3513ce..d6237f653 100644 --- a/winsup/cygwin/include/limits.h +++ b/winsup/cygwin/include/limits.h @@ -125,7 +125,10 @@ details. */ #define SSIZE_MAX (__LONG_MAX__) /* Maximum length of a path */ -#define PATH_MAX (260 - 1 /*NUL*/) +#define PATH_MAX 260 + +/* Maximum length of a path component. */ +#define NAME_MAX 255 /* Max num groups for a user, value taken from NT documentation */ /* Must match NGROUPS */ -- 2.43.5