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.
* select.cc (peek_console): Don't report read_ready on mouse events unless we
are looking for mouse events.
* fhandler.h (fhandler_console::mouse_aware): New method.
Jeff Johnston [Wed, 28 Feb 2001 18:41:57 +0000 (18:41 +0000)]
2001-02-28 Will Cohen <wcohen@redhat.com>
* src/libgloss/m68k/Makefile.in: Updated copyright and
added rules to build simulator related libraries.
(SIM_SCRIPTS): New variable.
(SIM_LDFLAGS): New variable.
(SIM_BSP): New variable.
(SIM_CRT0): New variable.
(SIM_OBJS): New variable.
(SIM_TEST): New variable.
(SIM_INSTALL): new variable.
* src/libgloss/m68k/sim-abort.c: New file.
* src/libgloss/m68k/sim-crt0.S: New file.
* src/libgloss/m68k/sim-errno.c: New file.
* src/libgloss/m68k/sim-funcs.c: New file.
* src/libgloss/m68k/sim-inbyte.c: New file.
* src/libgloss/m68k/sim-print.c: New file.
* src/libgloss/m68k/sim-sbrk.c: New file.
* src/libgloss/m68k/sim.ld: New file.
* src/libgloss/m68k/simulator.S: New file.
Egor Duda [Wed, 28 Feb 2001 09:59:54 +0000 (09:59 +0000)]
* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Determine
drive geometry or partition size to allow seeking from the end of
raw floppy device. Don't allow positioning past the end of media or
to offsets bigger then max off_t.
Egor Duda [Tue, 27 Feb 2001 09:14:35 +0000 (09:14 +0000)]
* fhandler.h (class fhandler_console): Make all variables that
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.
Corinna Vinschen [Mon, 26 Feb 2001 09:50:24 +0000 (09:50 +0000)]
* strace.cc (strace::vprntf): Move prntf functionality to this function
adding an va_list interface to strace.
(strace::printf): Calls strace::vprntf now.
(strace_printf): New function providing an extern "C" interface to
trace output.
* include/sys/strace.h: Make plain C clean.
(class strace): Add `vprntf' method.
Jeff Johnston [Thu, 22 Feb 2001 22:12:43 +0000 (22:12 +0000)]
2001-02-22 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/machine/setjmp-dj.h: With DJ Delorie's permission,
changed the copyright information to allow free modification of the
file with no reference to "copying.dj".
* libc/include/sys/stat-dj.h: Ditto.
* libc/machine/i386/setjmp.S: Ditto.
* libc/sys/h8300hms/sys/file.h: Ditto.
* libc/sys/sysmec/access.c: Ditto.
* libc/sys/sysnecv850/access.c: Ditto.
* libc/stdio/mktemp.c: Fixed typo for the word copyright.
* libc/stdlib/getenv_r.c: Ditto.
* libc/stdlib/putenv_r.c: Ditto.
* libc/stdlib/setenv_r.c: Ditto.
* libc/stdlib/getenv.c: Removed DJ reference since any possible
modifications will now be in the _r version of this file.
* libc/stdlib/putenv.c: Ditto.
* libc/stdlib/setenv.c: Ditto.
* libc/sys/go32/copying.dj: Removed DJ's address which is no longer
valid. Added a reference to DJ's web page that contains his address.
* libc/sys/go32/*.s: Removed references to DJ's old address.
* libc/sys/go32/*.c: Ditto.
* libc/sys/go32/*.h: Ditto.
* libc/sys/go32/*.S: Ditto.
* libc/sys/go32/sys/*.h: Ditto.
Corinna Vinschen [Thu, 22 Feb 2001 16:26:13 +0000 (16:26 +0000)]
* path.cc (symlink): Keep relative paths relative in the DOS
path inside of a shortcut. If that's impossible or the target
path is already absolute save an absolute path.
Corinna Vinschen [Thu, 22 Feb 2001 12:56:36 +0000 (12:56 +0000)]
* shortcut.c: New file. Provides a C interface to reading of
Windows shortcuts to avoid compiler flag `-fvtable-thunks'.
* shortcut.h: Ditto.
* Makefile.in: Add shortcut.o to DLL_OFILES.
* cygerrno.h: Provide a C interface to `geterrno_from_win_error' for
using in shortcut.c.
* errno.cc (geterrno_from_win_error): Define as extern "C".
* path.cc (struct symlink_info): Remove methods `check_shortcut' and
`check_sysfile'.
(shortcut_header): Move to shortcut.c.
(shortcut_initalized): Ditto.
(create_shortcut_header): Ditto.
(cmp_shortcut_header): Ditto.
(symlink_info::check_shortcut): Ditto. Reorganize as a plain C function.
(symlink_info::check_sysfile): Redefine as a global function using the
same parameter list as `check_shortcut' for clearness.
(symlink_info::check): Change parameter list for calls to
`check_shortcut' and `check_sysfile'.
Jeff Johnston [Wed, 21 Feb 2001 23:11:06 +0000 (23:11 +0000)]
2001-02-21 Jeff Johnston <jjohnstn@redhat.com>
* libc/stdio/fdopen.c (fdopen): Protect calls to _fcntl() with
HAVE_FCNTL flag check.
* configure.host: Define HAVE_FCNTL for Cygwin, go32, RTEMS, sparc64,
powerpcle, x86 netware, x86 sco, x86 Linux and Vxworks.