diff options
author | Christopher Faylor <me@cgf.cx> | 2011-06-08 00:55:10 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-06-08 00:55:10 +0400 |
commit | 0791c40b209d5622b300320e11f2bf2af8b2b775 (patch) | |
tree | aa71d49f619087ca54b1452c6747478ff6fb32f3 /winsup/cygwin/shared.cc | |
parent | 772832a85b7e03acf341d53ec55003c9564bc16e (diff) |
* fhandler_console.cc (fhandler_console::open_shared_console): Semi-revert to
using fixed location for console stuff.
* shared.cc (offsets): Ditto. Comment.
* shared_info (shared_locations): Re-add SH_SHARED_CONSOLE.
Diffstat (limited to 'winsup/cygwin/shared.cc')
-rw-r--r-- | winsup/cygwin/shared.cc | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/winsup/cygwin/shared.cc b/winsup/cygwin/shared.cc index a4b5b006a..b538af56f 100644 --- a/winsup/cygwin/shared.cc +++ b/winsup/cygwin/shared.cc @@ -206,18 +206,22 @@ shared_name (WCHAR *ret_buf, const WCHAR *str, int num) /* The order in offsets is so that the constant blocks shared_info and user_info are right below the cygwin DLL, then the pinfo block - which changes with each process. */ + which changes with each process. Below that is the console_state, + an optional block which only exists when running in a Windows console + window. Therefore, if we are not running in a console, we have 64K + more of contiguous memory below the Cygwin DLL. */ static ptrdiff_t offsets[] = { - - pround (sizeof (shared_info)), - - pround (sizeof (shared_info)) + - pround (sizeof (shared_info)), /* SH_CYGWIN_SHARED */ + - pround (sizeof (shared_info)) /* SH_USER_SHARED */ - pround (sizeof (user_info)), - - pround (sizeof (shared_info)) + - pround (sizeof (shared_info)) /* SH_MYSELF */ - pround (sizeof (user_info)) - pround (sizeof (_pinfo)), - - pround (sizeof (shared_info)) + - pround (sizeof (shared_info)) /* SH_SHARED_CONSOLE */ - pround (sizeof (user_info)) - - pround (sizeof (_pinfo)), + - pround (sizeof (_pinfo)) + - pround (sizeof (fhandler_console::console_state)), 0 }; |