Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2007-10-10 20:54:09 +0400
committerCorinna Vinschen <corinna@vinschen.de>2007-10-10 20:54:09 +0400
commit044b62c7676d56bcabea5956cae38771eb5b2179 (patch)
treef81c4546538d0c5c7d728f476098c339829a70b5 /winsup/cygwin/include/limits.h
parent4797f5bca35d9598ae6ac4a021ef37ba3f1a75e0 (diff)
* path.cc (struct symlink_info): Change size of contents member to
be able to keep SYMLINK_MAX sized strings. (symlink_worker): Rework for long path names. When writing windows shortcuts, store pathname additionally "hidden" after the actual shortcut data to workaround size limitations of the description field. (symlink_info::check_shortcut): Drop file name parameter. Drop max file size check. Use NT functions. Use appended full path if available, description otherwise. Check symlink string length for not exceeding SYMLINK_MAX. Don't close file here. (symlink_info::check_sysfile): Drop file name parameter. Use NT functions. Check symlink string length for not exceeding SYMLINK_MAX. Don't close file here. (symlink_info::check_reparse_point): Drop file name parameter. Drop useless length checks. Allow SYMLINK_MAX length symlink strings. Don't close file here. (symlink_info::posixify): Allow SYMLINK_MAX length symlink strings. (symlink_info::check): Turn around checking for symlink file attributes. Use NT functions. Close symlink file here. * include/limits.h (PATH_MAX): Define as 32760. Change comment. (SYMLINK_MAX): Define as PATH_MAX - 1.
Diffstat (limited to 'winsup/cygwin/include/limits.h')
-rw-r--r--winsup/cygwin/include/limits.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/include/limits.h b/winsup/cygwin/include/limits.h
index f7ae460e8..6dcf9caa1 100644
--- a/winsup/cygwin/include/limits.h
+++ b/winsup/cygwin/include/limits.h
@@ -318,9 +318,10 @@ details. */
#undef NAME_MAX
#define NAME_MAX 255
-/* Maximum length of a path */
+/* Maximum length of a path including trailing NUL.
+ (32767 - max. native NT path prefix) */
#undef PATH_MAX
-#define PATH_MAX 260
+#define PATH_MAX 32760
/* # of bytes in a pipe buf. This is the max # of bytes which can be
written to a pipe in one atomic operation. */
@@ -352,7 +353,7 @@ details. */
/* Maximum number of bytes in a symbolic link. */
#undef SYMLINK_MAX
-#define SYMLINK_MAX PATH_MAX
+#define SYMLINK_MAX (PATH_MAX - 1)
/* Runtime Increasable Values */