* 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.
Alexandre Oliva [Thu, 22 Mar 2001 18:17:54 +0000 (18:17 +0000)]
Re-installed:
2001-01-02 Laurynas Biveinis <lauras@softhome.net>
* ltcf-c.sh: Clear ac_cv_prog_cc_pic for DJGPP. Do not add
'-DPIC' to ac_cv_prog_cc_pic for DJGPP.
* ltcf-cxx.sh: Likewise.
* ltcf-gcj.sh: Likewise.
* autoload.cc (kernel32_init): New function for kernel32 autoload
initialization.
(SignalObjectAndWait): Add conditional load of this function when it is
available.
Jeff Johnston [Wed, 21 Mar 2001 21:47:31 +0000 (21:47 +0000)]
2001-03-21 Egor Duda <deo@logos-m.ru>
Allow building internal stubs for non-reentrant syscalls
if target provides its own malloc
* libc/reent/reent.c (errno): Move definition here.
* libc/reent/sbrkr.c: From here.
* 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*.
* libc/include/sys/types.h (BSD int typedefs): Guard with _BSDTYPES_DEFINED
rather than _WINSOCK_H.
(fd_set): Add !defined __USE_W32_SOCKETS to guard; define _SYS_TYPES_FD_SET.
* libc/include/sys/unistd.h (gethostname): Don't declare if defined
(_WINSOCK_H) || defined (__USE_W32_SOCKETS).
* 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.
Jim Blandy [Tue, 20 Mar 2001 18:22:38 +0000 (18:22 +0000)]
* libiberty/cp-demangle.c (struct demangling_def): New fields:
is_constructor and is_destructor.
(demangling_new): Initialize them.
(demangle_ctor_dtor_name): Set them, if we detect a constructor
or destructor.
(demangle_v3_with_details, is_gnu_v3_mangled_ctor,
is_gnu_v3_mangled_dtor): New functions.
* include/demangle.h (enum gnu_v3_constructor_kinds,
is_gnu_v3_mangled_ctor, enum gnu_v3_destructor_kinds,
is_gnu_v3_mangled_dtor): New declarations.
* 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.
Corinna Vinschen [Mon, 19 Mar 2001 11:02:41 +0000 (11:02 +0000)]
* 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.
* 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.
* 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.
* path.cc: Translate scan states from defines to enums.
(suffix_scan): Rename state to nextstate for clarity.
(lnk_match): Change to allow multiple states to indicate that a .lnk has been
matched.
(suffix_scan::has): Eliminate a goto. Handle .lnk as a special case, since a
.lnk may also need to be tacked on the end of a .lnk.
(suffix_scan::next): Don't increment next state. Set it specifically.
Recognize new .lnk states.
* cygwin.din: Export the new functions.
* pthread.cc (pthread_cond_*): Add wrapper functions that call __pthread_cond*
functions.
* thread.cc (__pthread_cond_*): Implement the pthread_cond* functions.
* thread.h: Add new class entries and prototypes for __pthread_cond* functions.
* include/pthread.h: user land header prototypes for pthread_cond* functions
and related defines.
Egor Duda [Mon, 12 Mar 2001 21:27:42 +0000 (21:27 +0000)]
* fhandler.h (fhandler_termios::fixup_after_exec): New function.
* 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().
Egor Duda [Mon, 12 Mar 2001 20:39:40 +0000 (20:39 +0000)]
* fhandler.h (fhandler_termios::fhandler_termios): Enable fixup
after fork.
* fhandler_console.cc (fhandler_console::fhandler_console): Fixup
after fork is now enabled in the base class constructor.
Earnie Boyd [Mon, 12 Mar 2001 19:26:16 +0000 (19:26 +0000)]
* include/commctrl.h (TBSTYLE_FLAT): New definition.
(TB_GETBUTTONSIZE): Ditto.
(TCS_HOTTRACK): Ditto.
Thanks to: Chris Hansen <popeofpop@softhome.net>
* autoload.cc (noload): Use proper method for multiline strings or newer gcc's
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.
* shortcut.c (PATH_ALL_EXEC): Add parentheses to avoid a compiler warning.
* exceptions.cc (setup_handler): Clarify debugging message.
* sigproc.cc (proc_subproc): Remove PROC_CHILDSTOPPED test. It is handled by
normal PROC_CLEARWAIT case.
(wait_sig): Eliminate "dispatched" tracking. Remove __SIGCHILDSTOPPED test.
Decrement counter again before jumping out of InterlockedDecrement loop so that
subsequent InterlockedIncrement will keep the counter at the correctly
decremented value and also detect when there are pending signals.
* sigproc.h: Remove __SIGCHILDSTOPPED element.
(procstuff): Remove PROC_CHILDSTOPPED element.
* syscalls.cc (_rename): Set errno to ENOENT when an old path doesn't exist
(from Kazuhiro Fujieda <fujieda@jaist.ac.jp>). Also set EACCES when directory
is not writable.
* syscalls.cc (_read): Change definition to return ssize_t to be consistent
with read.
(_write): Change definition to return ssize_t to be consistent with write.
* sigproc.h (sigthread): Declare new methods. Create new winapi_lock field.
(sigframe:;set): Call get_winapi_lock after frame is set so that signal handler
thread knows not to call SuspendThread.
(sigframe::~sigframe): Release winapi_lock.
* exceptions.cc (sigthread::get_winapi_lock): New method.
(sigthread::release_winapi_lock): New method.
(setup_handler): Use get_winapi_lock to ensure that signalled thread is not
blocked in a Windows API.
* path.h (path_types): Avoid broken GCC warning.
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.
* dlopen.c (dlopen): Return NULL when name is NULL (suggested by
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.
* libc/include/sys/stat.h: Use special defines for executable stat bits when
compiling for Cygwin.
* libc/include/sys/unistd.h: Use special define for X_OK when compiling for
Cygwin.
Egor Duda [Sun, 4 Mar 2001 15:34:25 +0000 (15:34 +0000)]
* fhandler.h (class fhandler_tty_common): New mutex and event to
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.
* cygwinenv.sgml: Add text for `winsymlinks' option.
* how-api.texinfo: Add text to explain new symlinks==shortcuts
and the CYGWIN setting `(no)winsymlinks'.
* how-using.texinfo: Add text that Cygwin now treats shortcuts
as symlinks.
* dir.cc (readdir): Fix shortcut==symlink condition.
* environ.cc: Add extern decl for `allow_winsymlinks'.
(struct parse_thing): Add entry for `[no]winsymlinks'.
* path.cc (symlink): Change to be able to create both,
symlink==shortcut and symlink==systemfile, dependent of
the setting of `allow_winsymlinks'.
* security.cc (cygwin_logon_user): Add debug output.
* shortcut.c: Add defines from path.h.
(has_exec_chars): Copy from path.h.
(check_shortcut): Check for executable file condition if not a
shortcut.