* 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.
* 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.
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.
* 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.
* autoload.cc: Add LoadDLLinitfunc for ole32.dll.
Add LoadDLLfuncEx statements for CoInitialize@4, CoUninitialize@0
and CoCreateInstance@20.
* dir.cc (dir_suffixes): New datastructure.
(readdir): Check for R/O *.lnk files to hide the suffix.
(opendir): Use `dir_suffixes' in path conversion.
(rmdir): Ditto.
* fhandler.cc (fhandler_disk_file::fstat): Add S_IFLNK flag
before calling `get_file_attribute'. Take FILE_ATTRIBUTE_READONLY
into account only if the file is no symlink.
* path.cc (inner_suffixes): New datastructure.
(SYMLINKATTR): Eliminated.
(path_conv::check): Use `inner_suffixes' on inner path components.
(shortcut_header): New global static variable.
(shortcut_initalized): Ditto.
(create_shortcut_header): New function.
(cmp_shortcut_header): Ditto.
(symlink): Create symlinks by creating windows shortcuts. Preserve
the old code.
(symlink_info::check_shortcut): New method.
(symlink_info::check_sysfile): Ditto.
(symlink_info::check): Check for shortcuts. Move code reading
old system attribute symlinks into symlink_info::check_sysfile().
(chdir): Use `dir_suffixes' in path conversion.
* security.cc (get_file_attribute): Check for S_IFLNK flag.
Force 0777 permissions then.
* spawn.cc (std_suffixes): Add ".lnk" suffix.
* syscalls.cc (_unlink): Use `inner_suffixes' in path conversion.
Check for shortcut symlinks to eliminate R/O attribute before
calling DeleteFile().
(stat_suffixes): Add ".lnk" suffix.
(stat_worker): Force 0777 permissions if file is a symlink.
Add LoadDLLfuncEx statements for GetIfTable@12 and GetIpAddrTable@12.
* fhandler_socket.cc (fhandler_socket::ioctl): Move variable
definitions to the beginning of the function to allow better debugging.
Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
* net.cc: Include iphlpapi.h.
(get_2k_ifconf): Rewritten. Uses IP Helper API now.
(get_nt_ifconf): Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC
and SIOCGIFMTU.
(get_95_ifconf): Ditto. Renamed from `get_9x_ifconf'.
(get_ifconf): Name loopback `lo' instead of `lo0' as in Linux.
Add handling for SIOCGIFHWADDR, SIOCGIFMETRIC and SIOCGIFMTU.
Call `get_95_ifconf' only on Windows 95, `get_nt_ifconf' only
on Windows NT < Service Pack 3, `get_2k_ifconf otherwise.
* include/asm/socket.h: Add defines for SIOCGIFHWADDR, SIOCGIFMETRIC
and SIOCGIFMTU.
* include/cygwin/if.h: Add `ifr_hwaddr', `ifr_metric' and `ifr_mtu'.
(struct ifreq): Add `ifru_hwaddr'.
* 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.
* environ.cc (codepage_init): To here.
* exceptoins.cc (SIG_NONMASKABLE): Remove SIGCONT from consideration since it
is supposed to be maskable.
* signal.cc (sigaction): Ditto.
* sigproc.cc (wait_sig): Ditto.
* winsup.h: Eliminate global declaration of codepage_init.
* dcrt0.cc (dll_crt0_1): Translate command line to OEM if current codepage is
OEM.
* environ.cc: Add new option 'codepage' to CYGWIN environment variable.
* fhandler_clipboard.cc (fhandler_clipboard::read): Read clipboard in OEM mode
if current codepage is OEM.
* fhandler_console.cc (fhandler_console::read): Only translate console input if
current codepage is ANSI.
* fhandler_console.cc (fhandler_console::write_normal): Translate output data
if current codepage is ANSI.
* pinfo.cc (codepage_init): New function. Setup current codepage from CYGWIN
environment variable and set codepage for file APIs.
* security.cc (read_sd): Translate file name to it if current codepage is OEM.
* winsup.h: (sys_wcstombs,sys_mbstowcs): Use current codepage for translations
between multibyte and widechar string and vice versa.
(EnumProcesses9x): Rename from EnumProcessesW95. Change arguments to be more
useful for cygwin.
(winpids::init): Accomodate argument changes.
(enum_init): Ditto.
* pinfo.h (winpids): Make pidlist dynamically extendable by storing it as a
pointer and remembering the size.
* ntdll.h: Add extra definitions needed for EnumProcessesNT. Reformat via
'indent'.