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>2009-07-17 13:00:19 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-07-17 13:00:19 +0400
commit0fb0fb8391f2e78177585c8e4842d0fce79e4408 (patch)
tree5da550cae68679224c31aa0137b2b6de7730021f /winsup/cygwin/globals.cc
parentb7735ec72d95b7abb02dc8014432a84001c1ce7a (diff)
* globals.cc: Improve comment on R/O UNICODE_STRINGs.
* mount.h (class fs_info): Add is_mvfs bit. * mount.cc (fs_info::update): Recognize MVFS remote filesystem. (fillout_mntent): Reorder filesystem checks for speed. Add mvfs, unixfs, and sunwnfs filesystem types. * path.h (class path_conv): Add fs_is_mvfs method. * path.cc (symlink_worker): On MVFS, always create symlinks as Windows shortcuts. Explain why.
Diffstat (limited to 'winsup/cygwin/globals.cc')
-rw-r--r--winsup/cygwin/globals.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/winsup/cygwin/globals.cc b/winsup/cygwin/globals.cc
index ef1753425..ccfc20830 100644
--- a/winsup/cygwin/globals.cc
+++ b/winsup/cygwin/globals.cc
@@ -72,7 +72,13 @@ char NO_COPY almost_null[1];
char *old_title;
-/* Heavily-used const UNICODE_STRINGs are defined here once. */
+/* Heavily-used const UNICODE_STRINGs are defined here once. The idea is a
+ speed improvement by not having to initialize a UNICODE_STRING every time
+ we make a string comparison. The strings are not defined as const,
+ because the respective NT functions are not taking const arguments
+ and doing so here results in lots of extra casts for no good reason.
+ Rather, the strings are placed in the R/O section .rdata, so we get
+ a SEGV if some code erroneously tries to overwrite these strings. */
#define _ROU(_s) \
{ Length: sizeof (_s) - sizeof (WCHAR), \
MaximumLength: sizeof (_s), \