diff options
author | Christopher Faylor <me@cgf.cx> | 2005-03-22 19:00:31 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-03-22 19:00:31 +0000 |
commit | b1d9a0bd41fbd1b8bb1424ae79d3be26fb3a4dcd (patch) | |
tree | c98214c49d0cbf3978df204493f9f59441596ee2 /winsup/cygwin/init.cc | |
parent | 7e3fd32b1cfee93aa4d73570940e3781ad2d5680 (diff) | |
download | cygnal-b1d9a0bd41fbd1b8bb1424ae79d3be26fb3a4dcd.tar.gz cygnal-b1d9a0bd41fbd1b8bb1424ae79d3be26fb3a4dcd.tar.bz2 cygnal-b1d9a0bd41fbd1b8bb1424ae79d3be26fb3a4dcd.zip |
* Makefile.in (DLL_OFILES): Add hookapi.o. Eliminate some cruft.
* cygheap.h (cygheap_types): Add new enum: HEAP_1_HOOK.
(hook_chain): New struct.
(init_cygheap::hooks): Define new element.
* cygheap.cc (cygheap_fixup_in_child): Zero hook chain on exec.
* dcrt0.cc (dll_crt0_1): Call ld_preload just before calling main function.
* external.cc (cygwin_internal): Implement CW_HOOK.
* fork.cc (fork_child): Call fixup_hooks_after_fork.
* init.cc (cygwin_hmodule): Reinstate after a long absence.
* include/sys/cygwin.h: Define CW_HOOK.
* hookapi.cc: New file.
* select.cc (start_thread_socket): Add debugging output.
* fhandler_disk_file.cc (fhandler_disk_file::fchmod): gcc 4.x accommodation.
* fhandler_socket.cc (fhandler_socket::connect): Make sure that err is
initialized.
Diffstat (limited to 'winsup/cygwin/init.cc')
-rw-r--r-- | winsup/cygwin/init.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc index d3e41b6a4..3d7a91c50 100644 --- a/winsup/cygwin/init.cc +++ b/winsup/cygwin/init.cc @@ -108,6 +108,8 @@ respawn_wow64_process () extern void __stdcall dll_crt0_0 (); +HMODULE NO_COPY cygwin_hmodule; + extern "C" int WINAPI dll_entry (HANDLE h, DWORD reason, void *static_load) { @@ -116,6 +118,7 @@ dll_entry (HANDLE h, DWORD reason, void *static_load) switch (reason) { case DLL_PROCESS_ATTACH: + cygwin_hmodule = (HMODULE) h; /* Is the stack at an unusual high address? Check if we're running on a 64 bit machine. If so, respawn. */ if (&is_64bit_machine >= (PBOOL) 0x400000 |