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:
authorChristopher Faylor <me@cgf.cx>2005-03-22 22:00:31 +0300
committerChristopher Faylor <me@cgf.cx>2005-03-22 22:00:31 +0300
commitb1d9a0bd41fbd1b8bb1424ae79d3be26fb3a4dcd (patch)
treec98214c49d0cbf3978df204493f9f59441596ee2 /winsup/cygwin/cygheap.h
parent7e3fd32b1cfee93aa4d73570940e3781ad2d5680 (diff)
* 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/cygheap.h')
-rw-r--r--winsup/cygwin/cygheap.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/winsup/cygwin/cygheap.h b/winsup/cygwin/cygheap.h
index 9a57a9b2d..a338c6ed7 100644
--- a/winsup/cygwin/cygheap.h
+++ b/winsup/cygwin/cygheap.h
@@ -21,6 +21,7 @@ enum cygheap_types
HEAP_ARCHETYPES,
HEAP_TLS,
HEAP_1_START,
+ HEAP_1_HOOK,
HEAP_1_STR,
HEAP_1_ARGV,
HEAP_1_BUF,
@@ -262,6 +263,13 @@ struct user_heap_info
unsigned chunk;
};
+struct hook_chain
+{
+ void **loc;
+ const void *func;
+ struct hook_chain *next;
+};
+
struct init_cygheap
{
_cmalloc_entry *chain;
@@ -291,6 +299,7 @@ struct init_cygheap
int open_fhs;
pid_t pid; /* my pid */
HANDLE pid_handle; /* handle for my pid */
+ hook_chain hooks;
void close_ctty ();
};