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
2001-09-23* dtable.cc (dtable::build_fhandler): Accept an optional path_conv argument.Christopher Faylor
If available, use this to calculate path name and device number. * dtable.h (dtable): Reflect above change. * fhandler.h (fhandler_base): Declare virtual method which accepts path_conv rather than path string as first argument. * fhandler.cc (fhandler_base::open): Define above new method. * syscalls.cc (_open): Set aside a path_conv variable for use in build_fhandler and subsequent call to open.
2001-09-22* exceptions.cc (setup_handler): Always relinquish lock after we'veChristopher Faylor
interrupted. * fhandler.cc: Move pipe methods to pipe.cc. * fhandler.h (fhandler_pipe): Add new methods. * fork.cc (sync_with_parent): Make error messages more informative. * pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc. (fhandler_pipe::lseek): Ditto. (fhandler_pipe::set_close_on_exec): New method. (fhandler_pipe::read): Ditto. (fhandler_pipe::close): Ditto. (fhandler_pipe::dup): Ditto. (make_pipe): Create the guard mutex on the read side of the pipe. * select.cc (peek_pipe): Use guard_mutex to discover if we have the right to read on this pipe. (fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to peek_pipe. * syscalls.cc (_read): Always detect signal catchers, for now. * debug.cc (makethread): Eliminate hack to make thread inheritable. * sigproc.cc (subproc_init): Don't use hack to make thread inheritable.
2001-09-21* fhandler.cc (fhandler_base::set_inheritance): Just use DUPLICATE_CLOSE_SOURCEChristopher Faylor
to change inheritance. Eliminate all other logic dealing with closed handles. * fhandler.h (fhandler_base::set_inheritance): Reflect above change. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
2001-09-20 * fhandler.h (fhandler_socket::fixup_after_exec): Remove inlineCorinna Vinschen
implementation. (fhandler_dev_raw::fixup_after_exec): Ditto. * fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Don't duplicate buffer on fork to avoid memory leak. (fhandler_dev_raw::fixup_after_exec): New implementation equal to former fixup_after_fork() implementation. * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Do nothing when not using Winsock2. (fhandler_socket::fixup_after_exec): New implementation. (fhandler_socket::set_close_on_exec): Never call set_inheritance().
2001-09-14* fhandler.h (fhandler_pipe::is_slow): Return true only if pipes are reliableChristopher Faylor
(i.e., not Win9x). * wincap.cc: Make statics NO_COPY to avoid fork overhead.
2001-09-12 * Makefile.in: Build wincap.o.Corinna Vinschen
* wincap.cc: New file. * wincap.h: Ditto. * autoload.cc: Add dynamic load statement for `CreateHardLinkA'. * dcrt0.cc (os_being_run): Eliminated. (osname): Ditto. (iswinnt): Ditto. (set_os_type): Ditto. (dll_crt0_1): Call wincap.init() instead of set_os_type(). (_dll_crt0): Ditto. * environ.cc (set_chunksize): New function. (parse_thing): `forkchunk' setting now invokes function `set_chunksize'. * fork.cc (chunksize): Eliminated. Moved to be member of wincap. * host_dependent.h: Removed. * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available. * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc, environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc, fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h, security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc, times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap capability check throughout. * winsup.h: Include wincap.h. Eliminate extern declarations of `os_being_run' and `iswinnt'. Eliminate `os_type" definition. * include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12Update copyrights.Christopher Faylor
2001-09-01* debug.cc (mark_closed): Rename from debug_mark_closed and make static.Christopher Faylor
(setclexec_pid): New function for marking saved handle as close-on-exec. (delete_handle): New function. (debug_fixup_after_fork): New function. * debug.h: Declare new functions, remove obsolete ones. * fork.cc (debug_fixup_after_fork): Call to cleanup close-on-exec handles. * fhandler.cc (fhandler_disk_file::close): Minor reorg. (fhandler_base::set_inheritance): Set flag appropriately for debugging when close-on-exec so forked process can delete closed handles. * tty.h (open_output_mutex): Eliminate unneeded argument. (open_input_mutex): Ditto. * fhandler_tty.cc (fhandler_tty_slave::open): reflect open_*_mutex argument changes. * fhandler.h (fhandler_socket): Make saw_shutdown_* functions type bool. * tty.cc (tty::get_event): Eliminate unneeded argument. (tty::common_init): Reflect change to get_event. Events should always be inherited.
2001-08-31space reduction.Christopher Faylor
2001-08-31* cygwin.sc: New file -- linker script for building cygwin DLL.Christopher Faylor
* Makefile.in: Use linker script to control location of cygheap. * cygheap.cc (buckets): Make static. (init_cheap): Remove special iswinnt handling. Allocate cygheap at a fixed location. Display more info when allocation fails. (cygheap_fixup_in_child): Try harder to move cygheap to correct location. Display more info when allocation fails. * fhandler.h (fhandler_socket): Add macros for tracking socket shutdown state. * net.cc (cygwin_shutdown): Set appropriate shutdown value for future use. * select.cc (select_stuff::cleanup): New method. (cygwin_select): Call cleanup explicitly to avoid a race. (select_stuff:~select_stuff): Call cleanup chain via cleanup method. (fhandler_socket::select_read): Set *_ready when shutdown has been called on the socket. (fhandler_socket::select_write): Ditto. (fhandler_socket::select_except): Ditto. * winsup.h: Move NO_COPY to "COMMON" section. * autoload.cc (wsock_started): Avoid initializing NO_COPY value. * sigproc.cc: Remove initialization from NO_COPY variables. (sigproc_init): Initialize sig_loop_wait here, rather than via initialization. (subproc_init): Initialize proc_loop_wait here, rather than via initialization.
2001-08-15 * fhandler.cc (fhandler_base::is_nonblocking): New method.Corinna Vinschen
(fhandler_base::set_nonblocking): Ditto. * fhandler.h (fhandler_base): Declare new methods `is_nonblocking' and `set_nonblocking'. * fhandler_socket.cc (fhandler_socket::ioctl): Use `set_nonblocking'. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Use `is_nonblocking'. (fhandler_tty_slave::read): Ditto. (fhandler_tty_slave::ioctl): Use `set_nonblocking'. (fhandler_pty_master::ioctl): Ditto. * net.cc (cygwin_sendto): Fallback to winsock 1 functionality in case of nonblocking IO. (cygwin_recvfrom): Ditto. (cygwin_recv): Ditto. (cygwin_send): Ditto. * syscalls.cc (_read): Use `is_nonblocking'.
2001-08-14 * fhandler.cc (fhandler_base::fcntl): Use new O_NONBLOCK_MASK define.Corinna Vinschen
* fhandler.h: Move definitions of O_NOSYMLINK, O_DIROPEN and OLD_O_NDELAY from winsup.h to here. Add O_NONBLOCK_MASK define. * fhandler_socket.cc (fhandler_socket::close): Add hack to allow a graceful shutdown even if shutdown() hasn't been called by the application. Add debug output. (fhandler_socket::ioctl): Set fhandler's NONBLOCK flag according to FIONBIO setting. (fhandler_socket::fcntl): Use new O_NONBLOCK_MASK define. Actually set `request' before using it. * fhandler_tty.cc: Use new O_NONBLOCK_MASK define throughout. (fhandler_tty_slave::ioctl): Set fhandler's NONBLOCK flag according to FIONBIO setting. (fhandler_pty_master::ioctl): Ditto. * net.cc (wsock_event::prepare): Compare WSACreateEvent return code with `WSA_INVALID_EVENT' according to MSDN. * syscalls.cc (_read): Use new O_NONBLOCK_MASK define.
2001-08-07* cygheap.cc (cygheap_root::set): Avoid treating '/' specially.Christopher Faylor
* fhandler.cc (fhandler_base::fcntl): Only set specific O_NDELAY style flag passed in from application. * fhandler_socket.cc (fhandler_socket::fcntl): Ditto. * fhandler.h: Set constant for future use. * winsup.h: Define OLD_O_NDELAY only for old programs. * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_OLD_O_NONBLOCK.
2001-08-05Throughout, change check for running under Windows NT to 'iswinnt'.Christopher Faylor
* dcrt0.cc (set_os_type): Set 'iswinnt' appropriately. * cygheap.cc (init_cheap): Revert to using VirtualAlloc for allocating cygheap. (cygheap_setup_for_child_cleanup): New function. Standard function to call after calling CreateProcess to cleanup cygheap info passed to child. (cygheap_fixup_in_child): Copy cygheap from shared memory into allocated space under Windows 9x or if can't relocate shared space under NT. * cygheap.h: Declare new function. * spawn.cc (spawn_guts): Use cygheap_fixup_in_child. * fork.cc (fork_parent): Ditto. * winsup.h: Declare iswinnt.
2001-07-26Throughout, reorganize header file inclusion to put security.h prior toChristopher Faylor
fhandler.h. * fhandler.h (fhandler_base::get_inheritance): New method. * fhandler_socket.cc (fhandler_socket::create_secret_event): Use proper close-on-exec inheritance when creating. (fhandler_socket::check_peer_secret_event): Create handle as non-inheritable.
2001-06-26* mmap.cc: Clean up *ResourceLock calls throughout.Christopher Faylor
* thread.cc (pthread_cond::TimedWait): Check for WAIT_TIMEOUT as well as WAIT_ABANDONED. (__pthread_cond_timedwait): Calculate a relative wait from the abstime parameter.
2001-06-23 * fhandler.h class fhandler_socket): Declare new methodCorinna Vinschen
`set_close_on_exec'. * fhandler_socket.cc (fhandler_socket::set_close_on_exec): New method.
2001-06-20* fhandler_socket.cc (fhandler_socket::signal_secret_event): NewEgor Duda
function. * fhandler.h: Declare it. * fhandler_socket.cc (fhandler_socket::create_secret_event): Don't signal secret event immediately. (fhandler_socket::check_peer_secret_event): Do it after peer event was opened. * net.cc (cygwin_connect): Or if socket is non-blocking. (cygwin_accept): Ditto.
2001-06-14* fhandler.cc (fhandler_base::open): Set win32 access flagsEgor Duda
to 0, when requested. * fhandler.h: New status flag FH_QUERYOPEN. (fhandler::get_query_open): New function. (fhandler::set_query_open): Ditto. * syscalls.cc (stat_worker): Request query-only open mode.
2001-05-31* path.cc (chdir): Always send unsigned chars to isspace since newlib's isspaceChristopher Faylor
doesn't deal well with "negative" chars. * fhandler.cc (fhandler_disk_file::open): Propagate remote status of file garnered from path_conv. Move #! checking to fstat. (fhandler_disk_file::fstat): Reorganize st_mode setting to eliminate duplication. Move check for #! here from fhandler::open. * fhandler.h (fhandler_base::isremote): New method. (fhandler_base::set_isremote): Ditto. (fhandler_base::set_execable_p): Also record "don't care if executable state". (fhandler_base::dont_care_if_execable): New method. * path.cc (path_conv::check): Clear new flags. Appropriately set vol_flags, drive_type, and is_remote_drive. * path.h: Add new flags and methods for manipulating them. * syscalls.cc (_unlink): Use isremote() to determine if a path is remote rather than calling GetDriveType. (stat_worker): Ditto. * security.cc (get_file_attribute): Or attribute with result of NTReadEA to be consistent with get_nt_attribute.
2001-05-24* exceptions.cc (handle_exceptions): Bump repeat count for debugging kick out.Christopher Faylor
* fhandler.h (fhandler_dev_dsp): Add a fixup_after_exec. * fhandler_dsp.cc (class Audio): Add TOT_BLOCK_SIZE to enum. (operator new): New. (bigwavebuffer): Declare using TOT_BLOCK_SIZE to avoid buffer overruns. (Audio::Audio): Optimize slightly. (fhandler_dev_dsp::open): Allocate s_audio using static buffer. (fhandler_dev_dsp::fixup_after_exec): New function. Ditto.
2001-05-09* fhandler.h (fhandler_termios::echo_erase): Declare new method.Christopher Faylor
* fhandler_termios.cc (fhandler_termios::echo_erase): New method for echoing erase characters. (fhandler_termios::line_edit): Check the echo flag before echoing control characters (from Kazuhiro Fujieda <fujieda@jaist.ac.jp>).
2001-05-08* cygheap.cc (_cfree): Add regparm attribute.Christopher Faylor
(_crealloc): Ditto. * dcrt0.cc (dll_crt0_1): Default to always checking for executable for now. * dtable.cc (dtable::not_open): Move method. * dtable.h (dtable): Here. * exceptions.cc (ctrl_c_handler): Don't expect process group leader to handle a signal if it doesn't exist. * fhandler.h (fhandler_base): Make openflags protected. * localtime.c (tzsetwall): Check for __CYGWIN__ as well as __WIN32__. * path.cc (path_conv::check): Add some comments. Change strcat to assignment. * lib/_cygwin_S_IEXEC.cc (_cygwin_bob__): Eliminate. * fhandler_tty.cc (fhandler_console::dup): Set controlling terminal if necessary. * fhandler_tty.cc (fhandler_tty_slave::dup): Ditto.
2001-04-29Throughout, change 'tty_attached' to 'real_tty_attached', for clarity.Christopher Faylor
Throughout, change 'OutputStopped' to 'output_stopped', for consistency. * dtable.cc (stdio_init): Set controlling tty if not set by stdio opens. * exceptions.cc (ctrl_c_handler): Avoid special pgid checking if no tty is associated with the process. (Suggested by Tim Baker <dbaker@direct.ca>) * external.cc (fillout_pinfo): Return actual tty number for ctty. * fhandler_console.cc (get_tty_stuff): Set ctty when shared memory is allocated. Accept flags input from open(). (set_console_ctty): New function. (fhandler_console::open): Pass flags to get_tty_stuff and rely on this function to set the ctty, if appropriate. * fhandler_termios.cc (fhandler_termios::set_ctty): Move to tty_min class. * fhandler_tty.cc (fhandler_tty_slave::open): Use tc field to access set_ctty(). * tty.h (TTY_CONSOLE): Move to include/sys/cygwin.h. (tty_min): Add set_ctty class here. * include/sys/cygwin.h (TTY_CONSOLE): New home here. * path.cc (symlink_info): Make contents an actual buffer. Pass more flags to case_check. (path_conv::check): Reorganize to do parsing based on posix path rather than native path. (symlink_info::check): Expect posix path as input. Translate to native path here. Accept path_conv flags. Stop parsing if not a symlink regardless of whether previous path was a symlink.
2001-04-24Remove trailing underscore from fhandler_base and friends, throughout.Christopher Faylor
* fhandler.h (fhandler_base::set_open_status): New method. Stores original open status. (fhandler_base::get_open_status): New method. Retrieves original open status. (fhandler_base::reset_to_open_binmode): New method. * fhandler.cc (fhandler_base::open): Save open status. (fhandler_base::init): Ditto. * fhandler_clipboard.cc (fhandler_clipboard::open): Ditto. * fhandler_console.cc (fhandler_console::open): Ditto. * fhandler_dsp.cc (fhandler_dsp::open): Ditto. * fhandler_dev_mem.cc (fhandler_dev_mem::open): Ditto. * fhandler_dev_random.cc (fhandler_dev_random::open): Ditto. * fhandler_serial.cc (fhandler_serial::open): Ditto. * fhandler_tty_slave.cc (fhandler_tty_slave::open): Ditto. * fhandler_tty_master.cc (fhandler_tty_master::open): Ditto. * fhandler_dev_zero.cc (fhandler_dev_zero::open): Ditto. * syscalls.cc (setmode): Rework so that 0 mode value causes reversion to open state. * fhandler_tty_slave.cc (fhandler_tty_slave::read): Use correct multiplier when converting from deciseconds to milliseconds.
2001-04-23* fhandler.h (fhandler_base::clear_r_binary): New method.Christopher Faylor
(fhandler_base::clear_w_binary): New method. * syscalls.cc (setmode): Accept 0 as mode value. Resets text/binary behavior for fd to default.
2001-04-17* path.h (cwdstuff): Move class.Christopher Faylor
* cygheap.h (cwdstuff): To here. (init_cygheap): Add cwd field. * child_info.h (cygheap_exec_info): Eliminate cwd stuff. (child_info_spawn): Ditto. * dcrt0.cc (dll_crt0_1): Remove cygcwd.fixup_after_exec call. Convert cygcwd reference to cygheap->cwd. * path.cc: Ditto, throughout. (cwdstuff::copy): Eliminate. (cwdstuff::fixup_after_exec): Ditto. * spawn.cc (spawn_guts): Eliminate call to cygcwd.copy. * fhandler.h (FH_OSS_DSP): Move into "fast" device category.
2001-04-16* autoload.cc: Add winmm functions needed by fhandler_dsp.cc.Christopher Faylor
* fhandler_dsp.cc: New file. Implements OSS like /dev/dsp. * include/sys/soundcard.h: New file. User land includes for OSS /dev/dsp. * fhandler.h: Add new class fhandler_dev_dsp and a FH_OSS_DSP definition. * dtable.cc (dtable::build_fhandler): Allow creation of the /dev/dsp device. * path.cc (windows_device_names): Add /dev/dsp into list of device names. * Makefile.in (DLL_OFILES): Add fhandler_dsp.o.
2001-04-09* fhandler.h (class fhandler_socket): Add members and methods toEgor Duda
support secure connections on AF_UNIX sockets. * fhandler_socket.cc (fhandler_socket::set_connect_secret): New method. (fhandler_socket::get_connect_secret): Ditto. (fhandler_socket::create_secret_event): Ditto. (fhandler_socket::close_secret_event): Ditto. (fhandler_socket::check_peer_secret_event): Ditto. (fhandler_socket::fixup_after_fork): Duplicate secret event to child. (fhandler_socket::dup): Copy address family. (fhandler_socket::close): Close secret event. * net.cc (get_inet_addr): Read secret cookie. (cygwin_connect): Check if peer knows secret cookie value. (cygwin_accept): Ditto. Copy address family to newly created socket. (cygwin_bind): Generate and write secret cookie. (wsock_init): Initialize random number generator.
2001-03-31 * fhandler.h (class fhandler_console): Add members `insert_mode'.Corinna Vinschen
* fhandler_console.cc (fhandler_console::dup): Duplicate `insert_mode'. (fhandler_console::fhandler_console): Initialize `insert_mode'. fhandler_console::char_command): Add terminal capabilities "enter insert mode" = \E[4h and "exit insert mode" = \E[4l. Care for insert mode on terminal capability "repeat char" = \E[x;yb. (fhandler_console::write_normal): Care for insert mode before writing to the console. (array keytable): Add keymapping for modified cursor and control block keys (xterm like).
2001-03-30 * fhandler.h (class fhandler_console): Add members `savebufsiz' andCorinna Vinschen
`savebuf' to allow save/restore of screen. * fhandler_console.cc (fhandler_console::dup): Duplicate savebuf. (fhandler_console::fhandler_console): Initialize `savebufsiz' and `savebuf'. (fhandler_console::char_command): Add terminal capabilities "save screen content" = \E[?47h and "restore screen content" = \E[?47l.
2001-03-23* fhandler.h (fhandler_dev_clipboard): Extend to support writing.Christopher Faylor
* fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard): Initialize new fields. Open clipboard here. (fhandler_dev_clipboard::dup): New method. (fhandler_dev_clipboard::open): Accomodate new fields. Register clipboard here, if appropriate. (set_clipboard): New function. Moves buffer to clipboard. (fhandler_dev_clipboard::write): Truly implement clipboard writing. (fhandler_dev_clipboard::read): Reimplement to allow successive reads. (fhandler_dev_clipboard::lseek): Truly implement seeks in clipboard. (fhandler_dev_clipboard::close): Clear out new fields. Support sequential reads and sequential writes. Support for binary data via a native clipboard format.
2001-03-18* fhandler.h (fhandler_tty_slave): Declare new methods.Egor Duda
* select.cc (fhandler_tty_slave::select_read): New method. * select.cc (fhandler_tty_slave::ready_for_read): Ditto. * select.cc (verify_tty_slave): New function. * fhandler_termios.cc (fhandler_termios::line_edit): Empty input buffer on signal. * fhandler_tty.cc (fhandler_tty_slave::read): Check for input data after reading from pipe. Reset event if input pipe is empty. * tty.h (class tty): Allow creating events with manual reset. * tty.cc (tty::get_event): Use manual_reset flag. * tty.cc (tty::common_init): Create input_available_event with manual reset.
2001-03-13* fhandler.h (fhandler_termios::fixup_after_exec): New function.Egor Duda
* fhandler.cc (fhandler_termios::fixup_after_fork): New function. Fixup output handle. * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Output handle is now fixed up in fhandler_termios::fixup_after_fork().
2001-03-12* fhandler.h (fhandler_termios::fhandler_termios): Enable fixupEgor Duda
after fork. * fhandler_console.cc (fhandler_console::fhandler_console): Fixup after fork is now enabled in the base class constructor.
2001-03-11* autoload.cc (noload): Use proper method for multiline strings or newer gcc'sChristopher Faylor
complain. * exceptions.cc (unused_sig_wrapper): Ditto. * fhandler.h (fhandler_base): Make get_io_handle and friends return self. * fhandler_tty.cc (fhandler_pty_common::close_on_exec): Accomodate DEBUGGING flag to avoid spurious warnings when inheritance is set.
2001-03-06 * autoload.c (cygwin_premain0): Add missing parameter.Corinna Vinschen
* binmode.c (cygwin_premain0): Ditto. * textmode.c (cygwin_premain0): Ditto. Patch contributed by Jason Tiller <jtiller@sjm.com> : * auto_load.cc: Add "GetKeyboardLayout" entry in the list of Win32 User32.DLL exports to provide. * fhandler.h (class fhandler_console): Add meta_mask private member to remember which keystroke modifiers should generate META. * fhandler_console.cc (fhandler_console::read): Modify code that tests a keystroke for a META-escaped key to use the 'meta_mask' variable. (fhandler_console::fhandler_console): Add definition for variable "meta_mask" used to determine if a keystroke should be preceded by META in the client console stream. Set meta_mask based on whether or not user's keyboard language is English - non-English keyboards pass AltGr (right <ALT>) unmolested, whereas English keyboards now interpret left- and right-<ALT> as META.
2001-03-05* dlopen.c (dlopen): Return NULL when name is NULL (suggested byChristopher Faylor
chrisiasci@aol.com). * cygwin.din: Add a new, internally used export - _check_for_executable. * dcrt0.cc (dll_crt0_1): Set _check_for_executable for older binaries. Pass user_data to premain functions. * fhandler.cc (fhandler_disk_file::open): Only check for executable if the linked program is intereested in the executable bit. (fhandler_disk_file::check_execable_p): Delete. * fhandler.h (executable_states): New enumeration of various states of executable bit caring. (fhandler_base::set_execable_p): New method. * fhandler_termios.cc (fhandler_termios::line_edit): Flag when a signal has been sent to the tty. Return -1 when this is so. * fhandler_console.cc (fhandler_console::read): Return -1 when signal sending character encountered. * path.cc (path_conv::check): Record when path refers to a disk device. Move executable extension check here. (check_sysfile): Accomodate new EXEC path states. (has_suffix): Remove. (next_suffix): Remove. (class suffix_scan): New clas. (suffix_scan::has): New method. (suffix_scan:next): New method. (symlink_info::check): Use suffix_scan method to control for scanning for suffixes. * path.h (path_conv::exec_state): New method. * perprocess.h: Make "C" friendly. * include/cygwin/version.h: Define CYGWIN_VERSION_CHECK_FOR_S_IEXEC. Bump CYGWIN_VERSION_API_MINOR. * include/sys/cygwin.h: Change premain declarations. * winsup.h: Move __cplusplus test to after builtin defines.
2001-03-04* fhandler.h (class fhandler_tty_common): New mutex and event toEgor Duda
syncronize input on master tty with slave tty. * fhandler_tty.cc (fhandler_pty_master::accept_input): Use them to syncronize with slave. * fhandler_tty.cc (fhandler_tty_slave::read): Use input mutex and event to syncronize with master. Do not limit amount of data read from master to vmin value. Interrupt on signal and return already read data, if any. * fhandler_tty.cc (fhandler_tty_slave::open): Handle input mutex and event. * fhandler_tty.cc (fhandler_tty_common::close): Ditto. * fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto. * fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Ditto. * fhandler_tty.cc (fhandler_tty_common::dup): Ditto. * tty.h (tty::open_input_mutex): New function. * tty.cc (tty::common_init): Create input mutex and event.
2001-03-02* select.cc (peek_console): Don't report read_ready on mouse events unless weChristopher Faylor
are looking for mouse events. * fhandler.h (fhandler_console::mouse_aware): New method.
2001-02-27* fhandler.h (class fhandler_console): Make all variables thatEgor Duda
describe "state" of console to be members of fhandler_console. default_color is now the color which is set when console recieves reset command. * fhandler_console.cc (fhandler_console::fhandler_console): Turn mouse handling and raw keyboard mode off by default. Initialize state information. * fhandler.cc (fhandler_console::set_raw_win32_keyboard_mode): New function. * fhandler_console.cc (fhandler_console::set_default_attr): New function. Reset console attributes to default values. * fhandler_console.cc (fhandler_console::open): Reset attributes. * fhandler_console.cc (fhandler_console::get_win32_attr): New function. Calculate win32-style console attribute based on terminal attributes. * fhandler_console.cc (fhandler_console::set_cursor_maybe): Use member variable. * fhandler_console.cc (fhandler_console::read): If in raw-win32 keyboard mode, encode win32 keyboard events in \033{x;y;z;t;u;wK sequences. * fhandler_console.cc (fhandler_console::dup): Copy all state information to the dup()ed handle. * fhandler_console.cc (fhandler_console::scroll_screen): Use current fill-in attribute. * fhandler_console.cc (fhandler_console::clear_screen): Ditto. * fhandler_console.cc (fhandler_console::char_command): Check if we saw '?' symbol by member variable. Set terminal attributes on \033[Xm commands. \033[24m - turn off underline mode, \033[27m - turn off reverse mode, \033[39m - restore default foreground color. \033[49m - restore default background color. \033[2000h - turn on raw keyboard mode, \033[2000l - turn off raw keyboard mode. * fhandler_console.cc (fhandler_console::write): Set attribues to default values on reset command.
2001-01-17* autoload.cc (LoadDLLinitfunc): Remove debugging statement.Christopher Faylor
* exceptions.cc (sig_handle_tty_stop): Move setting of PID_STOPPED to earlier in interrupt. ((interrupt_setup): i.e., here. (sig_handle): Don't queue multiple SIGSTOPS. * fhandler.h (bg_check_types): Enumerate return value of bg_check for clarity. * signal.cc (kill_pgrp): Minor cleanup. * fhandler_termios.cc (fhandler_termios::bg_check): Use enumerated type for function return. Don't raise signal if a signal is already queued. * fhandler_console.cc (fhandler_console::read): Use enumerated return type for bg_check. * select.cc: Ditto, throughout. * read.cc: Ditto, throughout. * termios.cc: Ditto, throughout. (_read): YA interrupt detect simplification. * wait.cc (wait4): Ditto.
2001-01-11 * fhandler.h (fhandler_base): New method `fixup_mmap_after_fork'.Corinna Vinschen
(fhandler_disk_file: Ditto. (fhandler_dev_mem): Ditto. * fhandler_mem.cc (fhandler_dev_mem::open): Set OBJ_INHERIT attribute for device\physicalmemory handle. (fhandler_dev_mem::mmap): Ditto. * fhandler_mem.cc (fhandler_dev_mem::fixup_mmap_after_fork): New method. * mmap.cc (mmap_record): Add private `fdesc_' member. Change constructor accordingly. (get_fd): New method. (mmap): Use new mmap_record constructor. (fhandler_base::fixup_mmap_after_fork): New method. (fhandler_disk_file::fixup_mmap_after_fork): Ditto. (fixup_mmaps_after_fork): Call `fixup_mmap_after_fork' of appropriate fhandler class.
2000-12-15* fhandler.h (fhandler_console): Add additional argument to char_commandChristopher Faylor
method. * fhandler_console.cc (fhandler_console::read): Revert previously misapplied patch. (fhandler_console::char_command): Add a second argument. (fhandler_console::write): Recognize when a '?' is found after a <esc>[.
2000-11-13* path.cc (get_device_number): Allow /dev/ttySn to designate a com port.Christopher Faylor
2000-11-01 * fhandler.h (fhandler_dev_raw): Add method `fixup_after_exec'.Corinna Vinschen
2000-11-01 * fhandler.h (fhandler_dev_raw): Add definition for methodCorinna Vinschen
`fixup_after_fork'. * fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Add `set_need_fixup_after_fork' call. (fhandler_dev_raw::~fhandler_dev_raw): Revert to user space allocation. (fhandler_dev_raw::open): Ditto. (fhandler_dev_raw::dup): Ditto. Reset buffer pointer. (fhandler_dev_raw::fixup_after_fork): New function. * fhandler_tape.cc (fhandler_dev_tape::open): Revert to user space memory allocation. (fhandler_dev_tape::ioctl): Ditto. Change behaviour on MTSETBLK when new size is 1.
2000-10-28Whitespace cleanup.Christopher Faylor
* configure.in: Eliminate subdir stuff. * configure: Regenerate. * include/getopt.h (option): Make name field 'const'.
2000-10-27 * fhandler_socket.cc: New file.Corinna Vinschen
* Makefile.in: Add fhandler_socket.o to dependencies. * fhandler.h: Change comment. * net.cc Move all fhandler_socket methods to fhandler_socket.cc. * winsup.h: Add declaration for `ws2_32_handle'.
2000-10-26 * dtable.cc (dtable::release): Check for socket. ChangeCorinna Vinschen
cnt_need_fixup_before accordingly. (dtable::dup2): Ditto. (dtable::fixup_before_fork): New method. (dtable::fixup_before_exec): Ditto. * dtable.h (class dtable): Add member `cnt_need_fixup_before'. Add definition for methods `dec_need_fixup_before', `inc_need_fixup_before', `need_fixup_before', `fixup_before_exec' and `fixup_before_fork'. * fhandler.h (class fhandler_base): Slight rearrangements. Add definitions for methods `fixup_before_fork_exec'. (class fhandler_socket): Eliminate superfluous constructor. Add member `prot_info_ptr'. Add destructor. Add definitions for methods `dup', `fixup_before_fork_exec', `fixup_after_fork' and `fixup_after_exec'. * fork.cc (fork_parent): Care for file types which need a fixup before fork. Start child in suspended state then. * net.cc: New global variable `ws2_32_handle' and `wsadata'. (fdsock): Check for Winsock version. Call `set_socket_inheritance' only if Winsock version < 2.0. Care for `need_fixup' count in fdtab. (cygwin_socket): Eliminate call to `set_socket_inheritance'. (cygwin_accept): Ditto. (cygwin_rcmd): Ditto. (cygwin_rresvport): Ditto. (cygwin_rexec): Ditto. (socketpair): Ditto. (fhandler_socket::fhandler_socket): Set `need_fork_fixup'. Allocate space for the WSAPROTOCOL_INFOA struct used in fixup. (fhandler_socket::~fhandler_socket): New destructor. (fhandler_socket::fixup_before_fork_exec): New method. (fhandler_socket::fixup_after_fork): Ditto. (fhandler_socket::dup): Ditto. (wsock_init): New static function. (LoadDLLinitfunc (wsock32)): Rearranged. (LoadDLLinitfunc (ws2_32)): New function. (dummy_autoload): Add autoload statemants for `WSADuplicateSocketA' and `WSASocketA'. * spawn.cc (spawn_guts): Care for file types which need a fixup before exec. Start child in suspended state then.