Commit Graph

993 Commits

Author SHA1 Message Date
Christopher Faylor 5817ee2d09 * path.cc (fillout_mntent): Always remove drive root directories from future
consideration by "/cygdrive" reporting.
(cygdrive_getmnt): Avoid reporting removable drives or drives with no media
mounted.
2001-04-01 05:09:57 +00:00
Christopher Faylor f2aeff27f0 * thread.h (struct _winsup_t): Remove obsolete elements. Add available_drives
element.
* path.cc (mount_info::getmntent): Report "/cygdrive" drives when mounted
drives are exhausted.
(fillout_mntent): New function.
(mount_item::getmntent): Use fillout_mntent.
(cygdrives_mntent): New function.  Returns next available "/cygdrive".
(setmntent): Initialize available "/cygdrives".
* syscalls.cc: Remove some if 0'ed code.
* times.cc (timezone): Use more descriptive variable name.
2001-04-01 03:06:02 +00:00
Christopher Faylor f611148366 * sigproc.h (class sigframe): Implement 'unregister()' method.
(sigframe::~sigframe): Use unregister method.
(sigframe::call_signal_handler): Declare new method.
* exceptions.cc (sigframe::call_signal_handler): New method.  Unregisters
current sigframe before calling signal handler.
(setup_handler): Clear waiting threads prior to arming signal_arrived.
* syscalls.cc (_read): Change goto to loop.  Recalculate sigframe inside of
loop so that constructor is called when appropriate.
* wait.cc (wait4): Ditto.
* signal.cc: Change "sig" to "signal" in debugging messages throughout.
* sigproc.cc: Ditto.
2001-04-01 00:06:17 +00:00
Christopher Faylor ab57d14639 * fhandler_serial.cc (fhandler_serial::raw_write): Close protected handles with
ForceCloseHandle or suffer spurious warnings.
2001-03-31 22:13:02 +00:00
Christopher Faylor 0cec322603 * fhandler.cc (fhandler_base::read): Remove special handling of CTRL-Z. 2001-03-31 21:24:48 +00:00
Corinna Vinschen c796f4f1e6 Fix formatting. 2001-03-31 11:00:52 +00:00
Corinna Vinschen 70afbaae17 * fhandler.h (class fhandler_console): Add members `insert_mode'.
* 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-31 09:19:32 +00:00
Christopher Faylor 12453b4590 Fix strange formatting. 2001-03-31 04:18:01 +00:00
Christopher Faylor 0ed560cb08 Fix strange formatting. 2001-03-31 03:56:58 +00:00
Earnie Boyd 0e09a700d1 * include/winuser.h (RT_CURSOR): Add protection for XFree86Server.
(RT_FONT): Ditto.
	(VK_KANA): New definition.
	* include/basetsd.h (INT32): Ditto.
	* include/windef.h (ATOM): Ditto.
	(BOOL): Ditto.
	(BYTE): Ditto.
	* include/winbase.h (FreeResource): Ditto.
	Thanks to: "Harold Hunt" <huntharo@msu.edu>
2001-03-30 13:22:17 +00:00
Corinna Vinschen f42da31ad6 * fhandler.h (class fhandler_console): Add members `savebufsiz' and
`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-30 11:10:13 +00:00
Christopher Faylor b5eb3d0f15 * path.cc (chdir): Eat trailing whitespace on input path. 2001-03-29 00:30:39 +00:00
Christopher Faylor 1ac6d1a144 * lib/_cygwin_S_IEXEC.c: Remove "const" from globals or they never seem to be
defined.  Wrap definitions in extern "C".  Include winsup.h to assure proper
definitions.
* dcrt0.cc (dll_crt0_1): Call stdio_init after premain run so that binmode.o,
etc., will control default stdio settings.
* dtable.cc (dtable::init_std_file_from_handle): Allow __fmode to force
binmode/textmode settings.  Default pipes to binmode.
2001-03-28 03:42:58 +00:00
Corinna Vinschen 37a2d97a31 * mmap.cc (mmap): Fix conditional for previous patch. 2001-03-27 09:35:39 +00:00
Christopher Faylor 90725b3297 add missing stuff. 2001-03-26 22:17:06 +00:00
Corinna Vinschen 1636a5a1e8 * mmap.cc (mmap): Outflank copy-on-write problem on 9x by
setting access mode to FILE_MAP_READ when read access is requested.
2001-03-26 18:17:15 +00:00
Christopher Faylor aa73152ef7 * dlfcn.cc (check_access): Eliminate.
(check_path_access): Use passed in path_conv buf.
(get_full_path_of_dll): Use passed in name buf to avoid a static.  Rip out most
of the path checking since LoadLibrary will do all of this automatically.
(dlopen): Set errno when appropriate (may not be compliant?).
* environ.cc (posify): Don't pass in "native" path if it seems to actually be
posix.
2001-03-26 01:16:11 +00:00
Christopher Faylor db0421f6ec * fhandler.h (fhandler_dev_clipboard): Extend to support writing.
* 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-22 22:11:34 +00:00
Christopher Faylor 0b30bad456 * fhandler_console.cc (fhandler_console::set_default_attr): Update console
color attributes on tty reset.
2001-03-22 18:19:00 +00:00
Christopher Faylor c445814840 * autoload.cc (kernel32_init): New function for kernel32 autoload
initialization.
(SignalObjectAndWait): Add conditional load of this function when it is
available.
2001-03-22 03:42:08 +00:00
Christopher Faylor 99a40adcd9 add new file. 2001-03-21 16:06:22 +00:00
Christopher Faylor 6b2a2aa4af Add missing files. 2001-03-21 14:00:29 +00:00
Christopher Faylor 9a08b2c02e * sched.cc: New file. Implement sched*.
* include/sched.h: New file.  User land includes for sched*.
* Makefile.in: Add sched.o
* cygwin.din: Add exports for sched*.
2001-03-21 02:17:58 +00:00
Christopher Faylor a1299ba54b * dtable.cc: Guard against new winsock.h/winsock2.h warnings when mixing
winsock*.h and sys/types.h.
* fhandler_socket.cc: Ditto.
* net.cc: Ditto.
* select.cc: Ditto.
* exceptions.cc: Remove unneeded define.
2001-03-20 19:50:28 +00:00
Christopher Faylor dac9c6045f * include/winsock.h (_SYS_TYPES_H macro guard for int types): Remove; use only
_BSDTYPES_DEFINED macro now defined in newlib sys/types.h.
(SYS_TYPES_H macro guard for fd_set): Replace with_SYS_TYPES_FD_SET macro now
defined in newlib sys/types.h.  Emit warning if defined.
* include/winsock2.h: Ditto.
* include/windows.h (Win32_Winsock): Replace with new macros __USE_W32_SOCKETS
and warn of deprecation.
2001-03-20 19:27:37 +00:00
DJ Delorie eec74f4ac6 * configure: fix regeneration bug. 2001-03-20 01:26:45 +00:00
Christopher Faylor b8c8fa1786 * exceptions.cc (interruptible): Update debugging output.
(setup_handler): Ensure that wait_sig loop wakes up when we punt on sending a
signal.
* poll.cc (poll): Add signal guard here.
2001-03-19 22:48:26 +00:00
Egor Duda 78ace8a7e5 * tty.h (tty::create_inuse): Add new parameter to allow non-
inheritable 'inuse' events.
* tty.cc (tty::create_inuse): Use new parameter.
* fhandler_tty.cc (fhandler_tty_master::init): Ditto.
* fhandler_tty.cc (fhandler_pty_master::open): Ditto.
* fhandler_tty.cc (fhandler_tty_master::init): Create master_alive
event.
* tty.cc (tty_list::terminate): Close master_alive event.
* fhandler_tty.cc (fhandler_tty_common::close): Send EOF to slaves
when master side is closed.
2001-03-19 18:27:37 +00:00
Corinna Vinschen 98750a8404 * mmap.cc (map::get_list_by_fd): Avoid calling `get_namehash' when
file descriptor is -1.
2001-03-19 13:33:51 +00:00
Corinna Vinschen 30f326bf5e * syscalls.cc (check_posix_perm): New static function.
(fpathconf): Add _PC_POSIX_PERMISSIONS and _PC_POSIX_SECURITY
        support.
        (pathconf): Ditto.
        * include/cygwin/version.h: Bump API minor number to 37.
2001-03-19 11:02:41 +00:00
Christopher Faylor 94b03f2380 Fix spacing, copyrights. 2001-03-18 21:11:25 +00:00
Christopher Faylor 51cb7ca7ac fix spacing. 2001-03-18 20:58:18 +00:00
Egor Duda 5e8e21d938 * fhandler.h (fhandler_tty_slave): Declare new methods.
* 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-18 18:05:01 +00:00
Christopher Faylor ca1cea7ed3 Update copyrights. 2001-03-18 03:34:05 +00:00
Christopher Faylor 9d1373cf8a Update copyright. 2001-03-18 03:25:30 +00:00
Christopher Faylor 00a7496150 * external.cc (fillout_pinfo): Match windows pid, as well as cygwin pid when
passed in pid.  Don't prematurely break when searching for a pid.
* thread.h (_winsup_t): Eliminate unneeded field.
2001-03-18 02:49:29 +00:00
Christopher Faylor ee57685985 * kill.cc (forcekill): Use dwProcessId when opening a process, not the Cygwin
pid.
2001-03-18 02:47:39 +00:00
Corinna Vinschen 8eb72e632c * net.cc (get_95_ifconf): Use strcasematch instead of strcasecmp.
* syscalls.cc (_unlink): Ditto.
        (_rename): Ditto.
2001-03-17 19:53:52 +00:00
David Starks-Browning 75c12e1f7a British -> US spelling.
Add .inputrc tip to entry "How can I copy and paste into Cygwin console windows?"
2001-03-17 18:50:22 +00:00
Christopher Faylor 57499703f2 * path.cc (suffix_scan::next): Avoid searching for foo.lnk twice when input is
"foo".
2001-03-17 17:44:53 +00:00
Corinna Vinschen 298fad4623 * net.cc (cygwin_socket): Set protocol to 0 when address family is
AF_UNIX to avoid WSAEPROTONOSUPPORT error.
2001-03-17 17:13:52 +00:00
Corinna Vinschen f52488f76b * net.cc (cygwin_socket): Pass protocol parameter to socket call. 2001-03-17 17:04:45 +00:00
David Starks-Browning 3614840015 Remove "not yet updated" caveat from entry:
"How is the DOS/Unix CR/LF thing handled?"
2001-03-17 16:18:01 +00:00
Christopher Faylor b63a3f55a7 * dir.cc (readdir): Use strcasematch for consistency.
* path.cc (symlink_info): Eliminate known_suffix.
(path_conv::check): Always copy ext_here to end of buffer, if found.
(suffix_scan): Eliminate ext_here, add suffixes_start.
(suffix_scan::has): Eliminate an argument.  Reorganize.  Always return pointer
to end of input path.
(suffix_scan::next): Take a second pass through the suffix list looking for
.lnk.
(symlink_info::check): Eliminate known_suffix usage.
2001-03-17 07:09:41 +00:00
Christopher Faylor 92f4bf9725 Fix typo. 2001-03-17 05:14:16 +00:00
Christopher Faylor db15b3e359 Accomodate all devices. 2001-03-17 05:11:20 +00:00
Christopher Faylor 5bb22c6b1d * syscalls.cc (stat_dev): Give devices full read/write. 2001-03-17 05:06:14 +00:00
Christopher Faylor c0c9de3c66 * thread.cc (MTinterface::CreateCond): Check for null attr pointer. 2001-03-17 04:49:13 +00:00
Christopher Faylor ddca580f9a * fhandler_termios.cc (fhandler_termios::line_edit): Don't accept input when a
signal is sent or we'll end up in an EOF/signal race.
2001-03-17 02:15:33 +00:00
Christopher Faylor ed4c976cf2 fix spelling error. 2001-03-17 01:45:40 +00:00