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
AgeCommit message (Collapse)Author
2014-10-10 * dlfcn.cc (dlopen): Disable old 32 bit code on 64 bit.Corinna Vinschen
* dcrt0.cc (check_sanity_and_sync): Ditto. * dll_init.cc (dll_dllcrt0_1): Fix typo in comment.
2014-08-07* common.din (__cxa_finalize): Export.Yaakov Selkowitz
* dcrt0.cc (cygwin_atexit): Use d->handle with __cxa_atexit. * dll_init.cc (dll_list::detach): Use d->handle with __cxa_finalize. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Use 274 for __cxa_finalize as well.
2014-06-23 * dll_init.cc (dll_list::alloc): Fix buffer overrun (CID 59940).Corinna Vinschen
2013-05-27 * dll_init.cc (dll_list::topsort): Fix early-return condition toCorinna Vinschen
accommodate process with all runtime loaded DLLs already dlclosed at fork time. * gendef (_sigfe_maybe): Fix code handling early return if we don't have a tls, broken on 2013-05-21.
2013-04-23 * Merge in cygwin-64bit-branch.Corinna Vinschen
2013-01-21Throughout, update copyrights to reflect dates which correspond to main-branchChristopher Faylor
checkins. Regularize copyright format.
2012-08-17whitespace cleanupChristopher Faylor
2012-07-02 * dll_init.cc (dll_list::alloc): Take long UNC paths into account.Corinna Vinschen
2012-03-05 * dll_init.cc (dll_list::operator[]): Extend comment a bit more toCorinna Vinschen
explain previous patch.
2012-03-04 * dll_init.cc (dll_list::alloc): Compare linked DLLs by basename only.Corinna Vinschen
Explain why. Add code to check if a DLL with the same basename but different path is the same DLL. Bail out if not. (in_load_after_fork): New static NO_COPY bool to allow to differ between linked and loaded DLL at fork. (dll_list::load_after_fork): Set in_load_after_fork accordingly. (dll_dllcrt0_1): Don't treat DLL as linked if in_load_after_fork is set. Drop test for in_forkee.
2012-03-04 * dll_init.cc: Revert pathname changes from 2012-02-08.Corinna Vinschen
(dll_list::operator[]): Add long comment to explain the misery. (dll_list::alloc): Skip long pathname prefix potentially returned by GetModuleFileNameW. * dll_init.h (dll_list::find_by_modname): Add back declaration.
2012-02-09 * dll_init.h (struct dll): Re-add modname.Corinna Vinschen
* dll_init.cc: Throughout, use modname where it was used before. (dll_list::operator[]): Use modname. Move comment from dll_list::alloc here and remove hint about GetModuleBaseNameW. (dll_list::alloc): Store full path in name, pointer to basename in modname. Search dll using modname.
2012-02-08 * dll_init.cc: Throughout, drop usage of modname in favor of name.Corinna Vinschen
(dll_list::find_by_modname): Remove. (dll_list::alloc): Only store module basename in name. Add comment to explain why. Simplify address check. Fix formatting in comment. * dll_init.h (struct dll): Drop modname and find_by_modname.
2012-02-08 * dll_init.cc (dll_list::alloc): Add DLL name to fabort output. FixCorinna Vinschen
fabort string in case of bss start.
2011-12-08* dll_init.cc (dll_dllcrt0): Don't try to initialize dll data if we'reChristopher Faylor
dynamically loaded since fork() doesn't work in that scenario anyway. (dll_dllcrt0_1): Don't accommodate dynamically loaded dlls. * exceptions.cc (ctrl_c_handler): Don't lock the process; there's too much risk of deadlock. * sigproc.cc (_cygtls::remove_wq): Don't try to remove anything from the waitq if there is obviously nothing there. * strace.cc (strace::activate): Allow stracing dynamically loaded cygwin1.dll.
2011-11-29* sync.cc: Fix comment.Christopher Faylor
* dll_init.cc (dll_list::reserve_space): Use %p rather than %lx to show reserved space.
2011-08-03* dll_init.cc: Use fabort in favor of api_fatal and fork_info->abort whereChristopher Faylor
appropriate throughout. (fabort): Define. (dll_list::topsort): Don't print sorting information. Fix formatting. (dll_list::topsort_visit): Fix formatting. (dll_list::load_after_fork_impl): Perform comment fixups. * sigproc.cc (child_info_fork::abort): (for now?) Always print cause of fork failure. * include/sys/strace.h (strace_vprintf): Remove _STRACE_NOTALL when printing. We really do want to see this.
2011-08-01* dll_init.cc (dll_list::load_after_fork_impl): Add a hint to an error message.Christopher Faylor
2011-06-06whitespace eliminationChristopher Faylor
2011-05-30* dll_init.cc (dll_list::append): Eliminate increment of unused tot variable.Christopher Faylor
* dll_init.h (dll_list::tot): Delete. (dll_list::populate_all_deps): Delete undefined function. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Move EPIPE handling under error condition.
2011-05-30* dll_init.cc (reserve_upto): Remove.Christopher Faylor
(release_upto): Ditto. (dll_list::reserve_space): New function to reserve space needed by DLL_LOAD dlls early in the fork process. (dll_list::load_after_fork): Rewrite to use recursion to track reservations it makes while trying to make dlls land where they belong. (dll_list::load_after_fork_impl): New function used by load_after_fork. (dll_list::alloc): Initialize image base field. * dll_init.h (dll_list::prefered_base): New field. (dll_list::reserve_space): Declare new function. (dll_list::load_after_fork): Declare new function. * fork.cc (frok::child): call dll_list::reserve_space early, so we can retry if it fails.
2011-05-30* dll_init.cc (dll_list::find_by_modname): New function to search the dll listChristopher Faylor
for a module name only (no path). (dll_list::alloc): Initialize newly-added members of struct dll. (dll_list::append): New function to factor out the append operation (used by dll_list::topsort). (dll_list::populate_deps): New function to identify dll dependencies. (dll_list::topsort): New function to sort the dll list topologically by dependencies. (dll_list::topsort_visit): New helper function for the above. * dll_init.h (dll::ndeps): New class member. (dll::deps): Ditto. (dll::modname): Ditto. (dll_list::find_by_modname): New function related to topsort. (dll_list::populate_all_deps): Ditto. (dll_list::populate_deps): Ditto. (dll_list::topsort): Ditto. (dll_list::topsort_visit): Ditto. (dll_list::append): Ditto. (pefile): New struct allowing simple introspection of dll images. * fork.cc (fork): Topologically sort the dll list before forking * child_info.h (CURR_CHILD_INFO_MAGIC): Refresh. (child_info::refresh_cygheap): New function. * spawn.cc (spawn_guts): Call refresh_cygheap before creating a new process to ensure that cygheap_max is up-to-date. * fork.cc (frok::parent): Ditto.
2011-05-29* dll_init.cc (dll_list::alloc): Initialize dll::image_size.Christopher Faylor
(reserve_at): Don't reserve space needed by the target dll if the latter overlaps the free region to be blocked. (dll_list::load_after_fork): Use new version of reserve_at. * dll_init.h (dll::image_size): New member. (pefile): New struct.
2011-05-29Revert previous checkins as they introduced a bug when running zsh.Christopher Faylor
2011-05-29* dll_init.cc (reserve_upto): Remove.Christopher Faylor
(release_upto): Ditto. (dll_list::reserve_space): New function to reserve space needed by DLL_LOAD dlls early in the fork process. (dll_list::load_after_fork): Rewrite to use recursion for tracking reservations made while trying to make dlls land where they belong. (dll_list::load_after_fork_impl): Ditto. (dll_list::alloc): Initialize image base field. * dll_init.h (struct dll_list): declare new functions. (dll::image_size): New member.
2011-05-29* dll_init.cc (dll_list::find_by_modname): New function to search the dll listChristopher Faylor
for a module name only (no path). (dll_list::alloc): Initialize newly-added members of struct dll. (dll_list::append): New function to factor out the append operation (used by dll_list::topsort). (dll_list::populate_deps): New function to identify dll dependencies. (dll_list::topsort): New function to sort the dll list topologically by dependencies. (dll_list::topsort_visit): New helper function for the above. * dll_init.h (dll::ndeps): New class member. (dll::deps): Ditto. (dll::modname): Ditto. (dll_list::find_by_modname): New function related to topsort. (dll_list::populate_all_deps): Ditto. (dll_list::populate_deps): Ditto. (dll_list::topsort): Ditto. (dll_list::topsort_visit): Ditto. (dll_list::append): Ditto. (pefile): New struct allowing simple introspection of dll images. * fork.cc (fork): Topologically sort the dll list before forking.
2011-05-29* dll_init.c (dll_list::load_after_fork): Don't clear in_forkee here.Christopher Faylor
* fork.cc (frok::errmsg): Rename from 'error'. (frok::error): New function. Handle conditional printing of error messages. (frok::parent): Record hchild handle for use by error function. Use throughout. Use error function rather than setting error pointer directly. (fork): Clear is_forkee here. Accommodate rename of 'error' to 'errmsg'. * sigproc.cc (child_info::proc_retry): Detect EXITCODE_FORK_FAILED.
2011-05-28* autoload.cc: Call _api_fatal in asm.Christopher Faylor
* child_info.h: Redefine CURR_CHILD_INFO_MAGIC. (child_info_fork::abort): Rename from handle_failure. Change arguments. * cygtls.h (_local_storage::ttybuf): New field. * dcrt0.cc (vapi_fatal): Split api_fatal. Add "in forked process" to message when appropriate. (api_fatal): Use vapi_fatal. * devices.h: Make multiple inclusion safe. (fh_devices): Add FH_CONS* stuff. Reorder slightly. (device): Eliminate anonymous union. Add more ways to access minor/major. (device::setunit): Accommodate no-longer-anonymous union. (device::is_fs): Ditto. (device::is_fs_special): Ditto. (device::major): New function. (device::minor): Ditto. (device::is_device): New function. (device::not_device): Ditto. (device::operator int): New operator. (device::operator fh_devices): Ditto. (device::operator bool): Ditto. (device::operator DWORD): Ditto. (device::operator =): Ditto. (isproc_dev): New function. (isprocsys_dev): Ditto. (iscons_dev): Ditto. (istty_slave_dev): Ditto. * devices.in: Add new "/dev/cons*" strings. Accommodate no-longer-anonymous union throughout. (BRACK): Use more precise method for initialization. * devices.cc: Regenerate. * dtable.cc (dtable::stdio_init): Use get_cttyp instead of get_tty. (dtable::find_archetype): Use new DWORD operator in device to test archetypes. (dtable::init_std_file_from_handle): Use different method to initialize 'dev'. Adapt to different ctty handling and accommodate /dev/cons*. (fh_alloc): Accommodate no-longer-anonymous union. Adapt to new /dev/cons*. (build_fh_pc): Make debugging output more useful. * exceptions.cc (ctrl_c_handler): Use get_cttyp instead of get_tty. * external.cc (fillout_pinfo): Accommodate new cons* stuff. * fhandler.cc (fhandler_base::read): Eliminate is_slow() test. * fhandler.h (fhandler_base::*): Adapt to changes in device.h. (fhandler_*::is_slow): Delete. ( fhandler_proc::get_proc_fhandler): Return fh_devices type. * fhandler_console.cc (open_shared_console): New function. (console_unit): New class. (console_unit::console_unit): New constructor. (enum_windows): New function. Declare as friend to console_unit. (fhandler_console::set_unit): New function. (fhandler_console::get_tty_stuff): Call set_unit to set the unit number and determine if initialization is needed. Eliminate flags parameter. (tty_list::get_cttyp): Rename (sorta) from get_tty. Return pointer to correct tty_min. (fhandler_console::open): Adapt to elimination of argument to get_tty_stuff. (fhandler_console::output_tcsetattr): Properly detect error condition. (fhandler_console::fixup_after_fork_exec): Adapt to get_tty_stuff() setting tc automatically. * fhandler_proc.cc: Use FH_BAD rather than 0 throughout where using fh_devices enum. (fhandler_proc::get_proc_fhandler): Return fh_devices. Adapt to devices.h changes. * fhandler_process.cc: Adapt to devices.h changes. Use FH_BAD rather than 0 throughout where using fh_devices enum. * fhandler_procnet.cc: Ditto. * fhandler_procsys.cc: Ditto. * fhandler_procsysvipc.cc: Ditto. * fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Ditto. * fhandler_termios.cc (handler_termios::bg_check): Use tc->ttyname() rather than assuming that we can construct a tty. * fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Just return get_minor() of dev. (fhandler_pty_master::process_slave_output): Add slightly more debugging info. (fhandler_tty_slave::fhandler_tty_slave): Change name from ntty to unit. (fhandler_pty_master::open): Ditto. (fhandler_tty_slave::ioctl): Adapt to change which causes ctty to represent a complete device. (fhandler_tty_master::init_console): Add debugging for failure path. (fhandler_pty_master::setup): Use get_unit() to retrieve unit number rather than relying on raw ntty. (fhandler_pty_master::setup): Ditto. * fhandler_virtual.h (virt_tab_t): Redefine fhandler as fh_devices. * fork.cc: Remove obsolete vfork stuff. (frok::child): Don't assume that a ctty == 0 is valid. * mount.cc (mount_info::conv_to_win32_path): Adapt to device struct changes. (mount_info::conv_to_win32_path): Ditto. * path.cc (path_conv::check): Retrive major/minor numbers via a method rather than accessing them directly from device. Rely on dev operators to set/retrieve device information as required by device struct change. * path.h (isproc_dev): Move to devices.h. (isprocsys_dev): Ditto. (isvirtual_dev): Ditto. (path_conv:{isdevice,isfifo,isspecial,iscygdrive,issocket,get_devn,get_unitn}): Use device methods to access/manipulate devices. * pinfo.cc (pinfo::exit): Don't assume that ctty == 0 is valid. Use iscons_dev to determine if a device is a console. (_pinfo::_ctty): Use device::parse to generate tty/cons name. (_pinfo::set_ctty): Don't assume that ctty == 0 is valid. Remove redundant info from debugging. * shared.cc (offsets): Remove console offset. * shared_info.h (shared_locations): Ditto. * syscalls.cc (umask): Use device methods to manipulate device information. (ctermid): Use device::parse to generate term device name. * tlsoffsets.h: Regenerate. * tty.cc (ttyslot): Return minor number of ctty since ctty now represents a full device. (tty::create_master): Set ctty to a complete device. (tty_list::attach): Rework to detect new /dev/cons* stuff. (tty_list::terminate): Adapt to changes to ctty. (tty_list::init): Adapt to change to setntty - pass in device major number. (tty::exists): Use get_unit() to retrive tty unit number. (tty::open_mutex): Ditto. (tty::open_inuse): Ditto. (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty_min::ttyname): Define new function. * tty.h (tty_min::ntty): Redefine as fh_devices. (tty::exists): Use get_unit() to retrive tty unit number. (tty::open_mutex): Ditto. (tty::open_inuse): Ditto. (tty::create_inuse): Ditto. (tty::get_event): Ditto. (tty_min::ttyname): Declare new function. (tty::getntty): Declare as const. (tty_list::operator []): Assure that only minor part of argument is used. * dll_init.cc (dll_list::alloc): Detect mismatch of data segments early issuing an explicit error message if necessary. * heap.cc (heap_init): Adapt to changes from fork->handle_failure to fork->abort. * pinfo.h (EXITCODE_FORK_FAILED): New enum. (from Ryan Johnson) * sigproc.cc (child_info_fork::abort): Rename from handle_failure. Change arguments to allow passing in a printf-like message. * winsup.h (api_fatal): Delete macro definition. (api_fatal): Redefine from __api_fatal. (vapi_fatal): Declare new function. * include/sys/strace.h (strace_vprintf): Define new macro. * ntdll.h (_SYSTEM_INFORMATION_CLASS): Add SystemHandleInformation.
2011-05-04* dll_list::detach (dll_list::detach): Avoid doing anything with detach duringChristopher Faylor
a failing fork.
2011-05-04* dll_init.cc (dll_global_dtors): Avoid calling destructors during failingChristopher Faylor
fork().
2011-05-02Eliminate trailing whitespace in some files.Christopher Faylor
* dll_init.cc (dll_list::alloc): Reset 'p' in forked process. * select.cc (select_stuff::wait): Move cleanup() closer to WFMO to minimize unavoidable (?) race.
2011-04-21* cygheap.cc (init_cygheap::close_ctty): Avoid closing console-cttys since theyChristopher Faylor
don't use archetypes and this will just result in double frees. * dll_init.cc (dll_list::protect): Define. (dll_list::alloc): Guard list access. (dll_list::detach): Ditto. * dll_init.h (dll_list::protect): Declare new muto. (dll_list::guard): Define/declare function to guard list access. * fhandler_termios.cc (fhandler_termios::sigflush): Avoid SEGV in pathological condition of get_ttyp() == NULL.
2011-04-06* dll_init.cc (reserve_at, release_at): New functions.Christopher Faylor
(load_after_fork): If the DLL was loaded higher than the required address, assume that it loaded at it's base address and also reserve memory there to force it to be relocated.
2011-03-27* dll_init.cc (dll::init): Accommodate ill-behaved dlls who don't fill outChristopher Faylor
p.envptr.
2011-02-15 * Throughout fix copyright dates.Corinna Vinschen
2011-02-08* dll_init.cc: Fix typo in comment.Christopher Faylor
2010-05-08* Makefile.in (DLL_OFILES): Add pseudo-reloc.o.Christopher Faylor
* dcrt0.cc (child_info_fork::handle_fork): Call _pei386_runtime_relocator here. (dll_crt0_1): Ditto for non-fork case. * dll_init.cc (dll::init): Complain more in comment. Clean up slightly. (dll_dllcrt0_1): Call _pei386_runtime_relocator when we know we have a filled-in per_process structure. * globals.cc (__cygwin_user_data): Accommodate new fields for _pei386_runtime_relocator. * pseudo-reloc.cc: New file adapted from old lib/pseudo-reloc.c. Include winsup.h directly. Collapse #ifdef __CYGWIN__ into one block. Perform minor whitespace code reformatting. (__report_error): Use small_printf to output error. (_pei386_runtime_relocator): Conditionalize for cygwin to take per_process pointer parameter. * winsup.h (_pei386_runtime_relocator): Declare. * include/cygwin/version.h (CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED): New macro. (CYGWIN_VERSION_USER_API_VERSION_COMBINED): Use above macro. (CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL): New macro. (CYGWIN_VERSION_API_MINOR): Bump to 227. * include/sys/cygwin.h: Remove obsolete comment. (per_process::unused2): Shorten. (per_process::pseudo_reloc_start): New field. (per_process::pseudo_reloc_end): Ditto. (per_process::image_base): Ditto. * lib/_cygwin_crt0_common.cc: Declare pseudo runtime externs needed for per_process structure. (_cygwin_crt0_common): Fill in pseudo_reloc runtime constants. * lib/pseudo-reloc-dummy.c: New file. Dummy function to satisify ld. * lib/pseudo-reloc.c: Delete.
2010-05-03* dll_init.cc (dll_list::alloc): Add debugging assertion.Christopher Faylor
2010-03-28* globals.cc (exit_status): Add new ES_EXIT_STARTING enum.Christopher Faylor
* dcrt0.cc (cygwin_exit): Set exit_state to ES_EXIT_STARTING prior to calling real exit. * dll_init.cc (dll_list::detach): Remove dll from linked list and call destructors even if exiting. Don't call __cxa_finalize in exiting case.
2010-02-28Update some copyrights.Christopher Faylor
* cygtls.cc (_cygtls::call): Invoke new exception protection here. (_cygtls::init_thread): Remove conditionalized exception handler setup. (exception_list): Delete declaration. (_cygtls::init_exception_handler): Delete obsolete function. * cygtls.h: Remove (now) unneeded include. (_cygtls): Make this a real C++ class. (_cygtls::handle_exceptions): Remove. (_cygtls::init_exception_handler): Remove. (_cygtls::call2): Make private. (myfault::faulted): Remove unneeded parentheses. * dcrt0.cc (dll_crt0_1): Remove exception handler setup. * dlfcn.cc (dlopen): Ditto. (dlclose): Ditto. * dll_init.cc (dll_dllcrt0_1): Ditto. (dll_list::detach): Use new exception handler protection. * exceptions.cc (dump_exception): Rename to prevent confusion with new class. (exception::handle): Rename from _cygtls::handle_exceptions. Accommodate new exception class. Accommodate rename to dump_exception. * tlsoffsets.h: Regenerate.
2010-02-27* cygtls.h (_cygtls::init_exception_handler): Eliminate argument.Christopher Faylor
(_cygtls::andreas): Convert to a pointer. (san): Convert to a real class with methods. Use a linked list to keep track of previous handlers on the "stack". (myfault): Rewrite to use new san class rather than calling directly into _cygtls. * cygtls.cc (_cygtls::init_exception_handler): Just assume that we're always using the standard exception handler. (_cygtls::init_thread): Reflect loss of argument to init_exception_handler. * dcrt0.cc (dll_crt0_1): Ditto. * dfcn.cc (dlopen): Ditto. (dlclose): Reset the exception handler after FreeLibrary. * dll_init.cc (dll_list::detach): Make sure that the exception handler is initialized before calling destructors. * exceptions.cc (_cygtls::handle_exceptions): Accommodate new andreas pointer. * thread.cc (verifyable_object_isvalid): Pass objectptr to faulted for explicit NULL pointer checking. * tlsoffsets.h: Regenerate.
2010-02-05* dll_init.cc (per_module::run_dtors): Use consistent method for runningChristopher Faylor
destructors.
2010-02-02* dcrt0.cc (atexit_lock): Delete.Christopher Faylor
(cygwin_exit): Remove atexit lock. (cygwin_atexit): Ditto. Rename parameter to match newlib. Call __cxa_atexit when invoked by a registered DLL. * dll_init.cc (remove_dll_atexit): Delete. (dll_list::find): New function. (dll_list::detach): Use dll_list::find to find dll associated with return address. Use __cxa_finalize to run atexit functions associated with the dll. (cygwin_detach_dll): Don't assume that HANDLE == void *. * dll_init.h (dll_list::find): Declare. (__cxa_atexit): Ditto. (__cxa_finalize): Ditto. * init.cc (dll_entry): Clarify comment.
2010-01-29* dll_init.cc (remove_dll_atexit): New function.Christopher Faylor
(dll_list::detach): Run any atexit handlers registered in the DLL prior to unloading.
2010-01-29* libc/strfmon.c (__setup_vars): Fix compiler warning about assigning constChristopher Faylor
strings. Compare a pointer to NULL rather than '\0'. * dll_init.cc (dll_dllcrt0_1): Minor comment fix. * pipe.cc (fhandler_pipe::create_selectable): Remove Win9x accommodation.
2009-08-22* dll_init.h (has_dtors): New flag.Christopher Faylor
(run_dtors): New wrapper function which avoids calling dtors more than once. * dll_init.cc (dll_global_dtors): Use dll.run_dtors wrapper. (dll_list::detach): Ditto. (dll_list::alloc): Set has_dtors flag.
2009-08-13 * cxx.cc (default_cygwin_cxx_malloc): Enhance commenting.Corinna Vinschen
* dll_init.cc (dll_dllcrt0_1): Likewise. * dlfcn.cc (dlopen): Prevent dlopen()'d DLL from installing any cxx malloc overrides. * include/cygwin/cygwin_dll.h (__dynamically_loaded): New variable. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Check it and only install cxx malloc overrides when statically loaded. Extend comments.
2009-07-17* cygtls.cc (_cygtls::init_exception_handler): Test for e, not e->prev or weChristopher Faylor
could still end up adding our handler twice. Add comment explaining what we're doing. * dll_init.cc (dll_dllcrt0_1): Clarify comment.
2009-06-08* cygheap.h (mini_cygheap): New struct.Christopher Faylor
(init_cygheap): Inherit locale field via mini_cygheap. * cygheap.cc (cygheap_at_start): Define new variable. (cygheap): Initialize as cygheap_at_start so that locale information is always available. (cygheap_init): Initialize cygheap iff it is set to cygheap_at_start. * shared_info.h (memory_init): Accommodate argument change. * memory.cc (memory_init): Accept an argument indicating whether cygheap should be initialized or not. * dcrt0.cc (child_info_fork::handle_fork): Pass false to memory_init(). (child_info_spawn::handle_spawn): Ditto. (dll_crt0_0): Pass true to memory_init when not forking or execing. * cygheap.h (cygheap_types::HEAP_2_DLL): New enum. * dll_init.h (dll): Remove unused namelen field. (dll_list::load_after_fork): Accommodate change in arguments. * dll_init.cc (dll_list::alloc): Allocate dll information in the cygwin heap. (dll_list::detach): Free dll information from the cygwin heap. (dll_list::load_after_fork): Use dll information in the cygwin heap directly rather than querying parent. * fork.cc (frok::first_dll): Delete. (frok::child): Don't report on first_dll. Don't pass it to load_on_fork. (frok::parent): Don't set first_dll. (fork): Ditto.
2009-06-07 * dll_init.cc (dll_list::alloc): Allocate memory using a sectionCorinna Vinschen
object. Explain why. Drop call to GetSystemInfo, rather call getpagesize to get allocation granularity. Only align to allocation granularity under WOW64. Use roundup2 to align. (dll_list::detach): Call NtUnmapViewOfSection instead of VirtualFree.