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
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-09*** empty log message ***Corinna Vinschen
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.
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-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.
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.
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-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-06 * dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.Corinna Vinschen
* dll_init.cc: Fix formatting. (dll_list::alloc): Only allocate as much memory for struct dll as necessary for given DLL name. (dll_list::load_after_fork): Only read a single page of parent memory. Only read more if namelen indicates that it's necessary.
2008-08-13 * dll_init.cc: Throughout convert to use long pathnames.Corinna Vinschen
* dll_init.h (struct dll): Change name to WCHAR, change operator [] to take PWCHAR argument.
2008-08-04Changes suggested by Dave Korn.Christopher Faylor
* dcrt0.cc (cygwin_exit): Remove (hopefully) extraneous call to dll_global_dtors. * dll_init.cc (dll_global_dtors): Run destructors in reverse dependency/load order. * dll_init.h (dll_list): Add dll_global_dtors as a friend.
2008-02-14 * cygheap.cc (cwcsdup): New function.Corinna Vinschen
(cwcsdup1): New function. * cygheap.h (cygheap_user::get_windows_id): New method returning PWCHAR. (cwcsdup): Declare. (cwcsdup1): Declare. * registry.cc (get_registry_hive_path): Use WCHAR instead of char throughout. (load_registry_hive): Ditto. * registry.h (get_registry_hive_path): Change declaration accordingly. (load_registry_hive): Ditto. * sec_helper.cc (cygpsid::string): New method returning PWCHAR. * security.h (cygpsid::string): Declare. * syscalls.cc (seteuid32): Convert local name var to WCHAR. * uinfo.cc (cygheap_user::env_userprofile): Convert local name buffers to WCHAR. Call sys_wcstombs_alloc to generate puserprof buffer. * winsup.h: Fix comment. (NT_MAX_PATH): New definition for maximum internal path length. Use throughout where appropriate. * include/limits.h (PATH_MAX): Set to 4096 as on Linux.
2007-12-12 * dcrt0.cc: Include string.h.Corinna Vinschen
(initial_env): Use small_printf's %P specifier. * dll_init.cc (dll_list::alloc): Use PATH_MAX instead of CYG_MAX_PATH for path name buffer size. * dll_init.h (struct dll): Ditto. * environ.cc: Include string.h. (win_env::add_cache): Use temporary local buffer for path conversion. (posify): Ditto. * exceptions.cc (try_to_debug): Use CreateProcessW to allow long path names. * miscfuncs.cc: Drop unused implementations of strcasematch and strncasematch. (ch_case_eq): Drop. (strcasestr): Drop. (cygwin_wcscasecmp): New function. (cygwin_wcsncasecmp): New function. (cygwin_strcasecmp): New function. (cygwin_strncasecmp): New function. (cygwin_wcslwr): New function. (cygwin_wcsupr): New function. (cygwin_strlwr): New function. (cygwin_strupr): New function. * ntdll.h (RtlDowncaseUnicodeString): Declare. (RtlUpcaseUnicodeString): Declare. (RtlInt64ToHexUnicodeString): Fix typo in comment. * string.h: Disable not NLS aware implementations of strcasematch and strncasematch. (cygwin_strcasecmp): Declare. (strcasecmp): Define as cygwin_strcasecmp. (cygwin_strncasecmp): Declare. (strncasecmp): Define as cygwin_strncasecmp. (strcasematch):Define using cygwin_strcasecmp. (strncasematch):Define using cygwin_strncasecmp. (cygwin_strlwr): Declare. (strlwr): Define as cygwin_strlwr. (cygwin_strupr): Declare. (strupr): Define as cygwin_strupr. * wchar.h: New file. * wincap.cc (wincapc::init): Use "NT" as fix OS string. * winsup.h (strcasematch): Drop declaration. (strncasematch): Ditto. (strcasestr): Ditto.
2005-04-14* dcrt0.cc (do_global_dtors): Run DLL dtors.Christopher Faylor
(__main): Don't rely on atexit to run dtors. (do_exit): Specifically call do_global_dtors here. (cygwin_exit): Ditto. * dll_init.cc (dll_global_dtors): Make global. Only run dtors once. (dll_list::init): Just set flag that dtors should be run. Don't rely on atexit. * dll_init.h (dll_global_dtors): Declare. * exceptions.cc (sigrelse): Define. * path.h (is_fs_device): New method. (is_lnk_special): Ditto. * fhandler_disk_file.cc (fhandler_disk_file::link): Use "is_lnk_special" rather than "is_lnk_symlink". * syscalls.cc (rename): Ditto. * hookapi.cc (ld_preload): Use colon as a separator rather than space.
2005-04-03 Unify usage of CYG_MAX_PATH throughout. Change buffers fromCorinna Vinschen
size CYG_MAX_PATH + 1 to CYG_MAX_PATH. Change length tests accordingly.
2003-11-152003-11-11 Robert Collins <rbtcollins@hotmail.com>Robert Collins
Ron Parker <rdparker@butlermfg.com> * bsdlib.cc: Update throughout to use CYG_MAX_PATH rather than MAX_PATH. * cygheap.h: Ditto. * dcrt0.cc: Ditto. * delqueue.cc: Ditto. * dlfcn.cc: Ditto. * dll_init.cc: Ditto. * dll_init.h: Ditto. * dtable.cc: Ditto. * environ.cc: Ditto. * environ.h: Ditto. * exceptions.cc: Ditto. * external.cc: Ditto. * fhandler_disk_file.cc: Ditto. * fhandler_proc.cc: Ditto. * fhandler_process.cc: Ditto. * fhandler_raw.cc: Ditto. * fhandler_registry.cc: Ditto. * fhandler_socket.cc: Ditto. * fhandler_virtual.cc: Ditto. * miscfuncs.cc: Ditto. * mmap.cc: Ditto. * netdb.cc: Ditto. * path.cc: Ditto. * path.h: Ditto. * pinfo.cc: Ditto. * pinfo.h: Ditto. * pthread.cc: Ditto. * registry.cc: Ditto. * shared.cc: Ditto. * shared_info.h: Ditto. * smallprint.c: Ditto. * spawn.cc: Ditto. * strace.cc: Ditto. * syscalls.cc: Ditto. * thread.h: Ditto. * uinfo.cc: Ditto. * winsup.h: Ditto. * include/limits.h: Ditto. * include/cygwin/config.h: Ditto. * include/sys/param.h: Ditto.
2002-11-14* dll_init.cc (dll_list::detach): Eliminate reliance on passed in dll address.Christopher Faylor
Infer from module of caller instead. (cygwin_detach_dll): Ignore dll_index argument. * dll_init.h (dll_list::detach): Reflect argument change above.
2002-04-19revert patchChristopher Faylor
2002-04-192002-04-16 Thomas Pfaff <tpfaff@gmx.net>Robert Collins
* dll_init.h (per_process::dtors_run): New member. * dll_init.cc (per_module::run_dtors): Run dtors only once. (dll::init): Initialize dtors_run flag.
2001-11-03* dll_init.h (class dll_list): Reorder functions to avoid compiler "can'tChristopher Faylor
inline" warnings. * security.h (class cygsid): Ditto. * sigproc.cc (get_proc_lock): Ditto. * sigproc.h (class sigframe): Ditto. * sync.h (class muto): Ditto. * fhandler.h (fhandler_base::get_guard): Actually MAKE virtual as previously indicated. * pipe.cc (make_pipe): Remove extraneous set_errno. * syscalls.cc (_open): Ditto. * select.cc (peek_pipe): Need to check that there is still something to read from the pipe after acquiring the mutex since another process/thread could have eaten the input before we got to acquiring the lock. (Thanks to Nick Duffek for this inspiration.)
2001-09-12Update copyrights.Christopher Faylor
2000-07-15* hinfo.cc (hinfo::linearize_fd_array): Make max_used_fd an int so that we canChristopher Faylor
detect when there are no fds to pass. * dcrt0.cc (host_dependent_constants::init): Revert Sat Mar 18 01:32:04 2000 change. (dll_crt0_1): Set "cygwin_finished_initializing" flag. (dll_crt0): Don't perform memcpy if uptr is already set to internal structure. (_dll_crt0): Remember location of programs envptr. * dll_init.h (per_module, dll, dll_list): Revamp. * dll_init.cc: Revamp. Use new classes. * fork.cc (fork): Use new revamped dll, dll_list, and per_module stuff. * environ.cc: Use __cygwin_environ throughout rather than the user_data->envptr. * exec.cc: Ditto. * spawn.cc: Ditto. * winsup.h: Declare update_envptrs, cygwin_finished_initializing. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Revert previous change. * lib/cygwin_attach_dll.cc (cygwin_attach_dll): Always pass in own per_process structure or we end up overwriting information from the main program.
2000-02-17import winsup-2000-02-17 snapshotChristopher Faylor