* 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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user