aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/dcrt0.cc
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2011-04-02 11:30:27 +0000
committerCorinna Vinschen <corinna@vinschen.de>2011-04-02 11:30:27 +0000
commitbb8216a1140d53534247949ee29c48bc158f3d13 (patch)
treed8038b0998778b580244f51e9cd863a2e955b125 /winsup/cygwin/dcrt0.cc
parente9b55002ba0831f71ccd76955b94ce4e1a61a682 (diff)
downloadnewlib-bb8216a1140d53534247949ee29c48bc158f3d13.zip
newlib-bb8216a1140d53534247949ee29c48bc158f3d13.tar.gz
newlib-bb8216a1140d53534247949ee29c48bc158f3d13.tar.bz2
* autoload.cc (GetExtendedTcpTable): Remove.
(GetTcpTable): Remove. (CharNextExA): Remove. (FindWindowA): Remove. (ShowWindowAsync): Remove. * dcrt0.cc (disable_dep): Remove unused function. (dll_crt0_0): Drop comment babbling about TS & DEP. * fhandler_socket.cc (address_in_use): Remove unused function. * wincap.cc: Throughout, drop ts_has_dep_problem from wincaps. (wincapc::init): Drop code setting ts_has_dep_problem flag. * wincap.h (struct wincaps): Drop ts_has_dep_problem flags and method.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r--winsup/cygwin/dcrt0.cc53
1 files changed, 0 insertions, 53 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index ad6b62b..827441c 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -650,36 +650,6 @@ child_info_spawn::handle_spawn ()
fixup_lockf_after_exec ();
}
-#if 0
-/* Setting the TS-aware flag in the application's PE header is sufficient.
- Just keep this in as a reminder. */
-
-static DEP_SYSTEM_POLICY_TYPE dep_system_policy = (DEP_SYSTEM_POLICY_TYPE) -1;
-
-static void
-disable_dep ()
-{
- DWORD ppolicy;
- BOOL perm;
-
- if (dep_system_policy < 0)
- {
- dep_system_policy = GetSystemDEPPolicy ();
- debug_printf ("DEP System Policy: %d", (int) dep_system_policy);
- }
- if (dep_system_policy < OptIn)
- return;
- if (!GetProcessDEPPolicy (GetCurrentProcess (), &ppolicy, &perm))
- {
- debug_printf ("GetProcessDEPPolicy: %E");
- return;
- }
- debug_printf ("DEP Process Policy: %d (permanent = %d)", ppolicy, perm);
- if (ppolicy > 0 && !perm && !SetProcessDEPPolicy (0))
- debug_printf ("SetProcessDEPPolicy: %E");
-}
-#endif
-
/* Retrieve and store system directory for later use. Note that the
directory is stored with a trailing backslash! */
static void
@@ -748,29 +718,6 @@ dll_crt0_0 ()
events_init ();
tty_list::init_session ();
-#if 0
- /* Setting the TS-aware flag in the application's PE header is sufficient.
- Just keep this in as a reminder. */
-
- /* The disable_dep function disables DEP for all Cygwin processes if
- the process runs on a Windows Server 2008 with Terminal Services
- installed. This combination (TS+DEP) breaks *some* Cygwin
- applications. The Terminal Service specific DLL tsappcmp.dll
- changes the page protection of some pages in the application's text
- segment from PAGE_EXECUTE_WRITECOPY to PAGE_WRITECOPY for no
- apparent reason. This occurs before any Cygwin or applicaton code
- had a chance to run. MS has no explanation for this so far, but is
- rather busy trying to avoid giving support for this problem (as of
- 2008-11-11).
-
- Unfortunately disabling DEP seems to have a not negligible
- performance hit. In the long run, either MS has to fix their
- problem, or we have to find a better workaround, if any exists.
- Idle idea: Adding EXECUTE protection to all text segment pages? */
- if (wincap.ts_has_dep_problem ())
- disable_dep ();
-#endif
-
_main_tls = &_my_tls;
/* Initialize signal processing here, early, in the hopes that the creation