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
2009-03-24 * ctype.cc (_CTYPE_DATA_0_127): Add _B class to TAB character.Corinna Vinschen
(__ctype_default): New character class array for default ASCII character set. (__ctype_iso): New array of character class array for ISO charsets. (__ctype_cp): Ditto for singlebyte Windows codepages. (tolower): Implement as distinct function to support any singlebyte charset. (toupper): Ditto. (__set_ctype): New function to copy singlebyte character classes corresponding to current charset to ctype_b array. Align copyright text to upstream. * dcrt0.cc (dll_crt0_1): Reset current locale to "C" per POSIX. * environ.cc (set_file_api_mode): Remove. (codepage_init): Remove. (parse_thing): Remove "codepage" setting. (environ_init): Set locale according to environment settings, or to current codepage, before converting environment to multibyte. * fhandler.h (fhandler_console::write_replacement_char): Drop argument. * fhandler_console.cc (dev_console::str_to_con): Call sys_cp_mbstowcs rather than MultiByteToWideChar. (fhandler_console::write_replacement_char): Always print a funny half filled square if a character isn't in the current charset. (fhandler_console::write_normal): Convert to using __mbtowc rather than next_char. * fork.cc (frok::child): Drop call to set_file_api_mode. * globals.cc (enum codepage_type) Remove. (current_codepage): Remove. * miscfuncs.cc (cygwin_wcslwr): Unused, dangerous. Remove. (cygwin_wcsupr): Ditto. (is_cp_multibyte): Remove. (next_char): Remove. * miscfuncs.h (is_cp_multibyte): Drop declaration. (next_char): Ditto. * strfuncs.cc (get_cp): Remove. (__db_wctomb): New function to implement _wctomb_r functionality for doublebyte charsets using WideCharToMultiByte. (__sjis_wctomb): New function to replace unusable newlib function. (__jis_wctomb): Ditto. (__eucjp_wctomb): Ditto. (__gbk_wctomb): New function. (__kr_wctomb): Ditto. (__big5_wctomb): Ditto. (__db_mbtowc): New function to implement _mbtowc_r functionality for doublebyte charsets using MultiByteToWideChar. (__sjis_mbtowc): New function to replace unusable newlib function. (__jis_mbtowc): Ditto. (__eucjp_mbtowc): Ditto. (__gbk_mbtowc): New function. (__kr_mbtowc): New function (__big5_mbtowc): New function (__set_charset_from_codepage): New function. (sys_wcstombs): Reimplement, basically using same wide char to multibyte conversion as newlib's application level functions. Plus extras. Add lengthy comment to explain. Change return type to size_t. (sys_wcstombs_alloc): Just use sys_wcstombs. Change return type to size_t. (sys_cp_mbstowcs): Replace sys_mbstowcs, take additional codepage argument. Explain why. Change return type to size_t. (sys_mbstowcs_alloc): Just use sys_mbstowcs. Change return type to size_t. * wchar.h: Declare internal functions implemented in strfuncs.cc. (wcscasecmp): Remove. (wcsncasecmp): Remove. (wcslwr): Remove. (wcsupr): Remove. * winsup.h (codepage_init): Remove declaration. (get_cp): Ditto. (sys_wcstombs): Align declaration to new implementation. (sys_wcstombs_alloc): Ditto. (sys_cp_mbstowcs): Add declaration. (sys_mbstowcs): Define as inline function. (sys_mbstowcs_alloc): Align declaration to new implementation. (set_file_api_mode): Remove declaration. * include/ctype.h (isblank): Redefine to use _B character class. (toupper): Remove ASCII-only definition. (tolower): Ditto.
2008-07-14 * miscfuncs.cc (cygwin_strncasecmp): Fix bug which results inCorinna Vinschen
prematurely truncated strings. Simplify target length argument to sys_mbstowcs.
2008-04-07Add miscfuncs.h to files as needed throughout.Christopher Faylor
* mount.cc: New file. * path.cc: Move mount-specific stuff into mount.cc. Move common stuff into miscfuncs.cc. Remove unneeded includes. * miscfuncs.cc: Move some common path functions here. * miscfuncs.h: New file. * winsup.h: Move miscelleneous functions to miscfuncs.h. * dcrt0.cc: Remove unneeded includes. * Makefile.in (DLL_OFILES): Add mount.o. * include/cygwin/config.h: Fix a minor typo.
2008-03-23* dtable.cc: Define various device-related string constants as wide characterChristopher Faylor
constants. (dtable::init_std_file_from_handle): Reorganize pipe handling to try to catch special tty case. (build_fh_name_worker): Declare for common use. (build_fh_name): Define char version. (build_fh_name): Define (currently unused) UNICODE_STRING version. (decode_tty): Detect if pipe is actually a cygwin tty, returning the tty name in the buffer. (handle_to_fn): Reorganize to use wide characters. * dtable.h (build_fh_name): Declare (currently unused) UNICODE_STRING version. * fhandler_tty.cc (fhandler_pty_master::setup): Use fhandler_pipe::create_selectable to create a pipe with a given name. * pipe.cc (pipe_handler): Make returned handle inheritable. (fhandler_pipe::create_selectable): Take an optional name. Use a standard cygwin introducer for the name. * path.cc (path_conv::check): Make first argument const. * path.h (path_conv::check): Ditto for declaration. (path_conv::path_conv): Ditto for UNICODE_STRING version.
2008-02-25 * dcrt0.cc (initial_env): Only use local buffer "buf" if DEBUGGING isCorinna Vinschen
enabled. Replace calls to GetEnvironmentVariable by calls to GetEnvironmentVariableA for clarity. Call GetEnvironmentVariableA with NULL buffer. (cygbench): Ditto, drop local buffer. * environ.cc (getearly): Call GetEnvironmentVariableA. (environ_init): Retrieve unicode environment and convert to current codepage locally. (getwinenveq): Ditto. * exceptions.cc (try_to_debug): Accommodate new sys_mbstowcs calling convention. * fhandler_clipboard.cc (set_clipboard): Call sys_mbstowcs to retrieve required buffer length. * fork.cc (frok::child): Call GetEnvironmentVariableA. * miscfuncs.cc: Accommodate changed arguments in calls to sys_mbstowcs. * sec_auth.cc: Ditto. * strfuncs.cc (sys_wcstombs_alloc): Fix formatting. (sys_mbstowcs): Change arguments to allow specifying a source string length. (sys_mbstowcs_alloc): Ditto. * uinfo.cc (cygheap_user::ontherange): Accommodate changed arguments in calls to sys_mbstowcs. * winsup.h (sys_mbstowcs): Adjust declaration. (sys_mbstowcs_alloc): Ditto.
2008-02-15Perform whitespace cleanup throughout.Christopher Faylor
* dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread.
2008-02-11 * dcrt0.cc (dll_crt0_1): Fix typo in call to sys_wcstombs.Corinna Vinschen
* miscfuncs.cc (next_char): Initialize ret to keep gcc happy.
2008-02-07 * miscfuncs.cc (next_char): Fix typos in comment.Corinna Vinschen
* strfuncs.cc: Remove cygserver guards.
2008-02-06 * fhandler.h (fhandler_console::trunc_buf): Add to use as cache forCorinna Vinschen
truncated multibyte characters on input. (fhandler_console::write_replacement_char): Declare new method. * fhandler_console.cc (CONVERT_LIMIT): Raise to 64K. (fhandler_console::fhandler_console): Initialize trunc_buf. (ERR): Define as independent value again. (fhandler_console::write_replacement_char): New method to print replacement chars. (fhandler_console::write_normal): Add handling for truncated multibyte sequences. Call next_char instead of pathetic CharNextExA function. Don't change src, rather just work with found later on. * miscfuncs.cc (is_cp_multibyte): Move here from strfuncs.cc. Don't call Windows function, restrict to well-known ANSI/OEM codepages and UTF-8. (next_char): Call CharNextExA only for doublebyte codepages. Implement for UTF-8 here. * strfuncs.cc (is_cp_multibyte): Move to miscfuncs.cc. * winsup.h (next_char): Declare. * include/limits.h (MB_LEN_MAX): Set to maximum value of MB_CUR_MAX as defined by newlib for now.
2008-02-01 * miscfuncs.cc (cygwin_wcsncasecmp): Never access more than nCorinna Vinschen
characters. (cygwin_strncasecmp): Ditto. Fix for strings longer than n.
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.
2007-08-02* dcrt0.cc (codepage_type): Remove definition.Christopher Faylor
* strfuncs.cc: Move it here. New file with bits of miscfuncs.cc. * miscfuncs.cc: Remove wide character stuff.
2007-02-23 * exceptions.cc (dummy_ctrl_c_handler): Remove.Corinna Vinschen
(init_console_handler): Drop has_null_console_handler_routine checks. * fhandler_raw.cc (fhandler_dev_raw::open): Drop has_raw_devices check. * fhandler_serial.cc (fhandler_serial::open): Drop .supports_reading_modem_output_lines check. * miscfuncs.cc (low_priority_sleep): Drop has_switch_to_thread check. * shared.cc (open_shared): Drop needs_memory_protection checks. * spawn.cc (spawn_guts): Drop start_proc_suspended check. * uname.cc (uname): Drop has_valid_processorlevel check. * wincap.cc: Remove has_raw_devices, has_valid_processorlevel, supports_reading_modem_output_lines, needs_memory_protection, has_switch_to_thread, start_proc_suspended and has_null_console_handler_routine throughout. * wincap.h: Ditto.
2006-10-19 * fhandler_proc.cc: Drop superfluous definition of _WIN32_WINNT.Corinna Vinschen
* miscfuncs.cc: Ditto. * sched.cc: Ditto.
2006-05-28white spaceChristopher Faylor
2006-02-07 * dtable.cc (handle_to_fn): Accomodate new argument order in call toCorinna Vinschen
sys_wcstombs. * fhandler_disk_file.cc (fhandler_disk_file::readdir): Call sys_wcstombs instead of just wcstombs to accomodate OEM codepages. * miscfuncs.cc (sys_wcstombs): Split len argument in source and target length. Always 0-terminate result in target string. * security.cc (lsa2wchar): Remove unused function. (lsa2str): Ditto. (get_lsa_srv_inf): Ditto. (get_logon_server): Accomodate new argument order in call to sys_wcstombs. (get_user_groups): Ditto. (get_user_local_groups): Ditto. (get_priv_list): Call sys_wcstombs directly instead of lsa2str. * uinfo.cc (cygheap_user::ontherange): Accomodate new argument order in call to sys_wcstombs. * winsup.h (sys_wcstombs): Change prototype to match new argument order.
2005-12-20 * winsup.h (flush_file_buffers): Define as inline function.Corinna Vinschen
* miscfuncs.cc (flush_file_buffers): Remove.
2005-12-20 * winsup.h (flush_file_buffers): Declare new function.Corinna Vinschen
(FLushFileBuffers): New define. * miscfuncs.cc (flush_file_buffers): Define new function.
2005-08-19* winsup.h (create_pipe): Declare new function.Christopher Faylor
(CreatePipe): New define. * miscfuncs.cc (create_pipe): Define new function.
2005-07-07Eliminate (void) cast on standalone function calls throughout.Christopher Faylor
2005-07-03Replace valid memory checks with new myfault class "exception handling", almostChristopher Faylor
everywhere. Leave some thread.cc stuff alone for now. * cygtls.h: Kludge some definitions to avoid including a problematic windows header. (_cygtls::_myfault): New entry. (_cygtls::_myfault_errno): Ditto. (_cygtls::fault_guarded): New function. (_cygtls::setup_fault): Ditto. (_cygtls::return_from_fault): Ditto. (_cygtls::clear_fault): Ditto. (myfault): New class. * exceptions.cc (handle_exceptions): Handle case of guarded fault in system routine. * gendef: Add another entry point for setjmp that the compiler doesn't know about and won't complain about. * gentls_offsets: Just include windows.h rather than kludging a HANDLE def. * miscfuncs.cc (check_null_str): Delete. (check_null_empty_str): Ditto. (check_null_empty_str_errno): Ditto. (check_null_str_errno): Ditto. (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr): Ditto. (__check_invalid_read_ptr_errno): Ditto. (dummytest): New function. (check_iovec_for_read): Delete. (chec_iovec): Rename from check_iovec_for_write. Take a read/write parameter. * tlsoffsets.h: Regenerate. * winsup.h: Remove check_* declarations. (check_iovec_for_read): Delete declaration. Turn into a define instead. (check_iovec_for_write): Ditto. (check_iovec): New declaration. * thread.h: Use ifdef guard name consistent with other header files.
2005-02-20copyrightChristopher Faylor
2005-02-13white spaceChristopher Faylor
2005-01-26 * cygwin.din: Export getpriority and setpriority.Corinna Vinschen
* fork.cc (fork_parent): Copy parent's nice value into child. * spawn.cc (spawn_guts): Ditto. * miscfuncs.cc (winprio_to_nice): New function. (nice_to_winprio): Ditto. * pinfo.cc (pinfo_init): If parent is not a Cygwin process, set default nice value according to current Win32 priority class. * pinfo.h (class _pinfo): Add nice member. * syscalls.cc (setpriority): New function, only implementing PRIO_PROCESS for now. (getpriority): Ditto. (nice): Just call setpriority. * wincap.h (wincaps::has_extended_priority_class): New element. * wincap.cc: Implement above element throughout. * winsup.h: Add prototypes for winprio_to_nice and nice_to_winprio. * include/limits.h (NZERO): New define. * include/cygwin/types.h (id_t): New datatype. * include/cygwin/version.h: Bump API minor version. * include/sys/resource.h: Add PRIO_XXX defines and prototypes for getpriority and setpriority.
2004-06-172004-06-17 Pierre Humblet <pierre.humblet@ieee.org>Pierre Humblet
* fhandler.cc (fhandler_base::open_9x): Do not check for null name. Move debug_printf to common code line. (fhandler_base::open): Ditto. Initialize upath. Remove second argument of pc.get_nt_native_path. * path.h (path_conv::get_nt_native_path): Remove second argument. * path.cc (path_conv::get_nt_native_path): Ditto. Call str2uni_cat. * security.h (str2buf2uni_cat): Delete declaration. (str2uni_cat): New declaration. * security.cc (str2buf2uni): Get length from sys_mbstowcs call. (str2buf2uni_cat): Delete function. (str2uni_cat): New function. * miscfuncs.cc (sys_mbstowcs): Add debug_printf.
2004-02-26 * miscfuncs.cc (check_invalid_virtual_addr): Assure the last pageCorinna Vinschen
in the range is always tested. Add appropriate const. * mmap.cc (mmap_record::aloc_fh): Remove unused static path_conf object.
2004-02-25 * miscfuncs.cc (check_invalid_virtual_addr): New function.Corinna Vinschen
* winsup.h (check_invalid_virtual_addr): Declare. * mmap.cc (munmap): Call check_invalid_virtual_addr instead of IsBadReadPtr.
2004-02-12Rename _threadinfo to _cygtls, throughout.Christopher Faylor
* cygtls.h (_cygtls::call_signal_handler): Rename from call_signal_handler_now. (_cygtls::push): Make second argument mandatory. (_cygtls::fixup_after_fork): Declare new function. (_cygtls::lock): Ditto. * cygtls.cc (_cygtls::fixup_after_fork): Define new function. * dcrt0.cc (cygwin_finished_initializing): Define as bool. (alloc_stack): Use _tlstop rather than arbitrary variable in probably vain attempt to avoid strange fork problem on CTRL-C. (dll_crt0_0): Remove obsolete winpids::init call. * dll_init.cc (dll_dllcrt0): Detect forkee condition as equivalent to initializing. * winsup.h (cygwin_finished_initializing): Declare as bool. * exceptions.cc (handle_exceptions): Rely on cygwin_finished_initializing to determine how to handle exception during process startup. (_cygtls::call_signal_handler): Rename from call_signal_handler_now. (_cygtls::interrupt_now): Fill in second argument to push. (signal_fixup_after_fork): Eliminate. (setup_handler): Initialize locked to avoid potential inappropriate unlock. Resume thread if it has acquired the stack lock. (ctrl_c_handler): Just exit if ctrl-c is hit before cygiwn has finished initializing. * fork.cc (sync_with_child): Don't call abort since it can cause exit deadlocks. (sync_with_child): Change debugging output slightly. (fork_child): Set cygwin_finished_initializing here. Call _cygtls fork fixup and explicitly call sigproc_init. (fork_parent): Release malloc lock on fork failure. (vfork): Call signal handler via _my_tls. * sigproc.cc (sig_send): Ditto. * syscalls.cc (readv): Ditto. * termios.cc (tcsetattr): Ditto. * wait.cc (wait4): Ditto. * signal.cc (nanosleep): Ditto. (abort): Ditto. (kill_pgrp): Avoid killing self if exiting. * sync.cc (muto::acquire): Remove (temporarily?) ill-advised exiting_thread check. * gendef (_sigfe): Be more agressive in protecting stack pointer from other access by signal thread. (_cygtls::locked): Define new function. (_sigbe): Ditto. (_cygtls::pop): Protect edx. (_cygtls::lock): Use guaranteed method to set eax to 1. (longjmp): Aggressively protect signal stack. * miscfuncs.cc (low_priority_sleep): Reduce "sleep time" for secs == 0. * pinfo.cc (winpids::set): Counterintuitively use malloc's lock to protect simultaneous access to the pids list since there are pathological conditions which can cause malloc to call winpid. (winpids::init): Eliminate. * pinfo.h (winpids::cs): Eliminate declaration. * pinfo.h (winpids::init): Eliminate definition.
2003-12-12* miscfuncs.cc (low_priority_sleep): Correct thinko which caused SetPriority toChristopher Faylor
be called unnecessarily. * thread.cc (pthread::init_main_thread): Call new create_cancel_event function. (pthread::precreate): Ditto. (pthread::postcreate): Remove cancel_event creation. (pthread::create_cancel_event): Define new function. * thread.h (pthread::create_cancel_event): Declare new function.
2003-11-28Eliminate use of sigframe and sigthread throughout.Christopher Faylor
* Makefile.in (DLL_OFILES): Add sigfe.o. Remove reliance on cygwin.def from cygwin0.dll dependency since dependence on sigfe.o implies that. Generate def file on the fly using 'gendef'. * configure.in: Don't auto-generate cygwin.def. * configure: Regenerate. * cygwin.din: Add SIGFE stuff where appropriate. * dcrt0.cc (dll_crt0_1): Initialize cygwin tls early in process startup. Set _main_tls to address of the main thread's cygwin tls. * debug.h: Remove now unneeded WFSO and WFMO declarations. * exceptions.cc (_last_thread): Define. (set_thread_state_for_signals): New function. (reset_thread_exception_for_signals): Ditto. (init_thread_for_signals): Ditto. (delete_thread_for_signals): Ditto. (capture_thread_for_signals): Ditto. (handle_exceptions): Set return address explicitly for exceptions prior to calling sig_send. (interrupt_on_return): Eliminate. (setup_handler): Add preliminary implementation for dealing with thread-specific signals by querying _main_tls. (signal_exit): Use cygthread::main_thread_id instead of mainthread.id. (call_signal_handler_now): For now, just handle the main thread. * fork.cc (vfork): Save and restore main _my_tls. * gendef: New file. Generates def file and sigfe.s file. * gentls_offsets: New file. Generates offsets for perl to use in sigfe.s. * how-signals-work.txt: Mention that info is obsolete. * init.cc (dll_entry): Initialize cygwin tls storage here. * miscfuncs.cc (low_priority_sleep): Make a C function for easier calling from asm. * perthread.h (vfork_save::tls): New element. * signal.cc (nanosleep): Replace previous use of sigframe.call_signal_handler_now with straight call to call_signal_handler_now. (abort): Ditto. * syscalls.cc (readv): Ditto. * termios.cc (tcsetattr): Ditto. * wait.cc (wait4): Ditto. * sigproc.cc (sig_dispatch_pending): Ditto. (sig_send): Ditto. * sigproc.h: Declare call_signal_handler_now. * thread.cc (pthread::thread_init_wrapper): Initialize cygwin tls. Remove obsolete and unworking signal stuff. * thread.h (verifyable_object::sigs): Eliminate. (verifyable_object::sigmask): Eliminate. (verifyable_object::sigtodo): Eliminate. (verifyable_object::exit): Make attribute noreturn. (verifyable_object::thread_init_wrapper): Ditto. (pthread_null::exit): Ditto. * winbase.h (__stackbase): Always define. * winsup.h (low_priority_sleep): Declare as a "C" function. * include/cygwin/version.h: Bump API version to reflect sigwait export. * include/sys/queue.h: Protect SLIST_ENTRY from previous declaration. * signal.cc (sigwait): Implement. * select.cc (fhandler_base::ready_for_read): Add debugging output. * devices.h: Define more device pointers via their storage. * devices.in: Don't parse things like /dev/inet/tcp, as they really have no meaning. * devices.cc: Regenerate. * gendevices: Set proper protection for output file. * cygtls.h: New file. * gendef: New file. * gentls_offsets: New file. * tlsoffsets.h: New file. Autogenerated. * config/i386/longjmp.c: Remove. File subsumed by gendef output. * config/i386/makefrag: Remove obsolete file. * fhandler.cc: Remove spurious access_worker declaration. * spawn.cc (spawnve): Make debugging output more accurate. * cygwin-gperf: Remove. * devices.cc: Remove.
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.
2003-11-11* miscfuncs.cc (low_priority_sleep): Make a "C" function.Christopher Faylor
* winsup.h (low_priority_sleep): Revert previous change to declaration.
2003-10-27 * miscfunc.cc (__check_invalid_read_ptr): New function.Corinna Vinschen
* winsup.h: Declare.
2003-08-28* syscalls.cc (mount): Don't check win32_path when doing cygdrive mount.Christopher Faylor
2003-08-21* miscfuncs.cc (low_priority_sleep): Sleep at same priority as main thread.Christopher Faylor
* sigproc.cc (wait_sig): Keep looping if there are more signals to consider and we are flushing signals. (sig_send): Put nonsync signals in the correct bucket.
2003-01-10 Split ChangeLog, create ChangeLog-2002.Corinna Vinschen
Fix copyright dates.
2003-01-10* cygthread.cc (cygthread::cygthread): Be more noisy about odd condition.Christopher Faylor
* miscfuncs.cc (low_priority_sleep): Sleep in regular priority if that's what we're currently running at.
2002-11-22* exceptions.cc (sigthread::get_winapi_lock): Just do standard 'give upChristopher Faylor
timeslice' wait. (setup_handler): Revamp YA to attempt to deliver signal multiple times on failure rather than punting to wait_sig. * miscfuncs.cc (low_priority_sleep): Accept INFINITE sleep to mean "don't reset the priority after setting it to idle". Return previous priority. * winsup.h (SLEEP_0_STAY_LOW): Define. (low_priority_sleep): Return an int. * sigproc.h: Define WAIT_SIG_PRIORITY here. * sigproc.cc: Remove WAIT_SIG_PRIORITY definition.
2002-11-15* exceptions.cc (setup_handler): Add debugging output. Set thread priority toChristopher Faylor
idle if pending signals to allow other threads to get into interruptible state. * miscfuncs.cc (sys_mbstowcs): Save current thread in variable to avoid an OS call. * wait.cc (wait_sig): Reset thread priority each time through loop since the priority may have been set down to deal with pending signals.
2002-11-13* miscfuncs.cc (low_priority_sleep): New function. Use throughout where codeChristopher Faylor
is supposed to be giving up time slice. * fhandler_console.cc (fhandler_console::read): Switch button 2/3 output escape sequences to be consistent with xterm.
2002-10-31* external.cc (cygwin_internal): Implement CW_CMDLINE.Christopher Faylor
* pinfo.h (SIGCOMMUNE): New signal type. (commune_result): New structure for commune functions. (picom): New enum for commune functions. (_pinfo::hello_pid): New. Pid who's communicating with me. (_pinfo::tothem): New. Handle of communicating pipe. (_pinfo::fromthem): Ditto. (_pinfo::commune_recv): Declare. (_pinfo::commune_send): Declare. (_pinfo::alive): Declare. (_pinfo::cmdline): Declare. (_pinfo::lock): Declare. * pinfo.cc (set_myself): Initialize new _pinfo lock. (_pinfo::alive): Define. Determines if process still exists. (_pinfo::commune_recv): Define. Receive info from another cooperating process. (_pinfo::commune_send): Define. Send info to another cooperating process. (_pinfo::cmdline): Define. Determine command line of a given process. * include/sys/cygwin.h (CW_CMDLINE): Define. *sigproc.cc (talktome): Communicate with any processes who want to talk to me. (wait_sig): Honor __SIGCOMMUNE. * fhandler.cc (fhandler_virtual::fixup_after_exec): Declare. * fhandler_proc.cc: Use malloc/free/realloc throughout rather than cmalloc since buffers don't need to be propagated to subprocesses. * fhandler_registry.cc: Ditto. * fhandler_virtual.cc: Ditto. (fhandler_virtual::fixup_after_exec): Define. * fhandler_process.cc: Ditto for malloc/free/realloc. (process_listin): Add "cmdline". (fhandler_process::fill_filebuf): Implement PROCESS_CMDLINE. * miscfuncs.cc (isalpha_array): New array populated with xor values for alpha characters to switch from one case to another. * string.h (cygwin_strcasematch): New asm implementation of case match. * string.h (cygwin_nstrcasematch): New asm implementation of counted case match.
2002-08-30* miscfuncs.cc (check_iovec_for_read): Don't check buffer when zero lengthChristopher Faylor
iov_len. (check_iovec_for_write): Ditto. * fhandler.h (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * fhandler.cc (fhandler_base::readv): New method. (fhandler_base::writev): Ditto. * syscalls.cc (_read): Delegate to readv(2). (_write): Ditto, mutatis mutandi. (readv): Rewrite, based on the old _read code, to use the new fhandler_base::readv method. Improve access mode handling and ensure all calls reach the final strace statement. (writev): Ditto, mutatis mutandi. * include/sys/uio.h (struct iovec): Change field types to match SUSv3. * winsup.h (check_iovec_for_read): New function. (check_iovec_for_write): Ditto. * miscfuncs.cc (check_iovec_for_read): Ditto. (check_iovec_for_write): Ditto.
2002-08-08 * winsup.h (__check_null_invalid_struct): Make ptr argument non-const.Conrad Scott
(__check_null_invalid_struct_errno): Ditto. * miscfuncs.cc (__check_null_invalid_struct): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr_errno): Remove superfluous cast. * net.cc (get): Set appropriate errno if fd is not a socket. (cygwin_sendto): Fix parameter checking. (cygwin_recvfrom): Ditto. (cygwin_setsockopt): Ditto. (cygwin_getsockopt): Ditto. (cygwin_connect): Ditto. (cygwin_gethostbyaddr): Ditto. (cygwin_accept): Ditto. (cygwin_bind): Ditto. (cygwin_getsockname): Ditto. (cygwin_listen): Ditto. (cygwin_getpeername): Ditto. (cygwin_send): Ditto. (cygwin_shutdown): Ditto. Move sigframe to fhandler_socket. (cygwin_recvmsg): Fix parameter checking. Add tracing. (cygwin_sendmsg): Ditto. * fhandler_socket.cc (fhandler_socket::shutdown): Add sigframe. * resource.cc (setrlimit): Fix parameter checking.
2002-06-26* autoload (noload): Avoid clobbering bx register.Christopher Faylor
* environ.cc (codepage_init): Use case insensitive match. * fhandler_console.cc (cp_get_internal): Delete. (con_to_str): Use get_cp to derive code page. (str_to_con): Ditto. * miscfuncs.cc (get_cp): New function. (sys_wcstombs): New function. Converted from macro. (sys_mbstowcs): Ditto. * winsup.h: Reflect above changes.
2001-11-30* debug.cc (makethread): Eliminate unneeded function call.Christopher Faylor
* miscfuncs.cc (tls_ix): Predefine. * perthread.h (set_reent): Eliminate. (get_reent): Ditto. * winbase.h (my_tlsalloc): Use global stack base pointer. Set newly allocated location to NULL. (my_tlssetvalue): Use global stack base pointer. (my_tlsgetvalue): Ditto.
2001-11-28* cygwin.din (ualarm): New export.Christopher Faylor
* dcrt0.cc (_dll_crt0): Add experimental tls storage declaration. (dll_crt0): Ditto. * debug.cc (thread_stub): Ditto. * thread.cc: Minor cleanup. (__pthread_create): Add experimental tls storage declaration. * miscfuncs.cc: Define tls index. * winsup.h: Declare experimental tls storage. * window.cc (alarm): Use old timer return from setitimer. (ualarm): New function.
2001-11-24* dtable.cc (dtable::vfork_parent_restore): Add debugging statement.Christopher Faylor
* exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger attached. * fhandler.h (fhandler_base::set_nohandle): New method. (fhandler_base::get_nohandle): New method. * fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no handle. * fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on dummy fd. * Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a * fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting since it is no longer used. * miscfuncs.cc (check_null_str): New function. (+check_null_str_errno): Ditto. * net.cc: Add defensive buffer checking throughout. (cygwin_sendto): Protect against invalid fd. (cygwin_recvfrom): Ditto. (cygwin_getpeername): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * winsup.h: Declare a new function. * select.cc (set_bits): Fix conditional for setting fd in exceptfds. * dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device type. * path.cc (get_devn): Set correct pipe device type from device name.
2001-10-24Ensure that all fhandler_*::read definitions are __stdcall throughout.Christopher Faylor
* fhandler.cc (fhandler_base::set_inheritance): Be more defensive in debugging code. * fhandler.h: Adjust regparms throughout to reflect passing 'this' parameter. * fhandler_console.cc (fhandler_console::read): Remove unneeded test. Only honor "key down" events. * miscfuncs.cc (strcasestr): Reorganize for efficient code use. (check_null_empty_str_errno): Ditto. (__check_null_invalid_struct_errno): Ditto. (__check_invalid_read_ptr_errno): Ditto. * syscalls.cc (_read): Return 0 when length == 0, as per Single UNIX Specification.
2001-10-22 * miscfuncs.cc (__check_invalid_read_ptr_errno): Return error, if any.Corinna Vinschen
2001-10-20* miscfuncs.cc (+__check_invalid_read_ptr_errno): New function.Christopher Faylor
* syscalls.c (_write): Validate that write buffer is accessible for reading, not writing. * winsup.h: Declare new function, increase regparmization of check_* functions.