* autoload.cc (IsDebuggerPresent): Make conditional load since it is not
available everywhere.
* path.cc (mount_info::conv_to_win32_path): Only consider /cygdrive to be
FH_CYGDRIVE, not /cygdrive/x.
* dtable.cc (dtable::vfork_parent_restore): Add debugging statement.
* exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger
attached.
* fhandler.h (fhandler_base::set_nohandle): New method.
(fhandler_base::get_nohandle): New method.
* fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no
handle.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on
dummy fd.
* Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a
* fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting
since it is no longer used.
* miscfuncs.cc (check_null_str): New function.
(+check_null_str_errno): Ditto.
* net.cc: Add defensive buffer checking throughout.
(cygwin_sendto): Protect against invalid fd.
(cygwin_recvfrom): Ditto.
(cygwin_getpeername): Ditto.
(cygwin_recv): Ditto.
(cygwin_send): Ditto.
* winsup.h: Declare a new function.
* select.cc (set_bits): Fix conditional for setting fd in exceptfds.
* dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device
type.
* path.cc (get_devn): Set correct pipe device type from device name.
* path.cc (conv_path_list): Fix wild indexing into path due to conflicting
methods for setting src pointer.
* dir.cc (opendir): Only pass path_conv argument to opendir, since name is
already part of the fhandler.
* dtable.cc (dtable::build_fhandler): Accomodate new FH_CYGDRIVE type.
* fhandler.cc (fhandler_base::opendir): Nuke name argument.
* fhandler.h: Add FH_CYGDRIVE to "device" enum.
(fhandler_base::opendir): Nuke name argument.
(fhandler_disk_file::opendir): Ditto.
(fhandler_disk_file::fhandler_disk_file): Declare new method which passes
devtype through.
(fhandler_cygdrive): Add elements for tracking drives.
(fhandler_cygdrive::set_drives): Declare new method.
(fhandler_cygdrive::iscygdrive_root): Declare new method.
(fhandler_cygdrive::opendir): Declare new method.
(fhandler_cygdrive::readdir): Declare new method.
(fhandler_cygdrive::telldir): Declare new method.
(fhandler_cygdrive::seekdir): Declare new method.
(fhandler_cygdrive::rewinddir): Declare new method.
(fhandler_cygdrive::closedir): Declare new method.
(fhandler_cygdrive::fstat): Declare new method.
* fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file): Define new
method which passes devtype through.
(fhandler_disk_file::open): Tweak debug output.
(fhandler_disk_file::opendir): Nuke first argument. Use info from path_conv
and class rather than calling fstat.
(fhandler_cygdrive::set_drives): New method.
(fhandler_cygdrive::iscygdrive_root): New method.
(fhandler_cygdrive::opendir): New method.
(fhandler_cygdrive::readdir): New method.
(fhandler_cygdrive::telldir): New method.
(fhandler_cygdrive::seekdir): New method.
(fhandler_cygdrive::rewinddir): New method.
(fhandler_cygdrive::closedir): New method.
(fhandler_cygdrive::fstat): New method.
* path.cc (iscygdrive_device): Assume cygdriveness is already verified.
(path_conv::check): Treat FH_CYGDRIVE "method" as a special case, setting file
attributes as needed.
(mount_info::conv_to_win32_path): Allow stand-alone /cygdrive, meaning "the
directory which contains all of the drives on the system".
(fillout_mntent): Use cyg_tolower for conversions.
(mount_info::cygdrive_win32_path): Replace unused argument with unit number.
* shared_info.h (mount_info::cygdrive_win32_path): Reflect argument change.
Corinna Vinschen [Wed, 21 Nov 2001 23:13:59 +0000 (23:13 +0000)]
Patch by Pierre Muller <muller@ics.u-strasbg.fr>:
* w32api/include/winnt.h: prepare SSE register support.
(CONTEXT_EXTENDED_REGISTERS): Add new define.
(MAXIMUM_SUPPORTED_EXTENSION): New define.
(struct CONTEXT): ExtendedRegisters field added.
Corinna Vinschen [Wed, 21 Nov 2001 10:39:43 +0000 (10:39 +0000)]
Patch by Mark Bradshaw <bradshaw@staff.crosswalk.com>:
* mkpasswd.c: include lmerr.h
(main): New -u option to allow specifying a
specific user. If specified, groups aren't displayed and
output is limited to only the specified user.
(enum_users): If specific user is specified, via -u option,
display only that user's record. With -u use NetUserGetInfo
instead of NetUserEnum.
(load_netapi): Added netusergetinfo.
* Makefile.in (DLL_OFILES): Add fhandler_disk_file.o.
* cygheap.h (cygheap_fdnew::operator =): New operator.
* dir.cc: Add invalid struct checking throughout. Use methods for all
directory manipulation throughout.
* fhandler.cc: Move fhandler_disk_file stuff to own file.
(fhandler_base::opendir): New method.
(fhandler_base::readdir): New method.
(fhandler_base::telldir): New method.
(fhandler_base::seekdir): New method.
(fhandler_base::rewinddir): New method.
(fhandler_base::closedir): New method.
* fhandler_disk_file.cc: New file.
* fhandler.h (fhandler_base): Declare new virtual methods.
(fhandler_disk_file): Ditto.
(fhandler_cygdrive): New class.
* path.cc (conv_path_list): Use strccpy to break apart path.
Corinna Vinschen [Sat, 17 Nov 2001 09:48:09 +0000 (09:48 +0000)]
* strace.cc (main): Change getopt() to getopt_long().
Add support for help and version info.
Use new parse_mask() function for -m/--mask option.
(longopts): Add long options structure.
(opts): Move options string from getopts call to static var.
(usage): Print usage information.
(SCCSid): Version info.
(version): New function for displaying version info.
(parse_mask): New function supporting parsing of mnemonics,
hex, and basic expressions in masks.
(mnemonic2ul): New mnemonic parsing function.
(tag_mask_mnemonic): New type.
(mnemonic_table): New table of mnemonics for mnemonic2ul() to
search through.
* exceptions.cc: Add stdlib.h include for alloca declaration.
* poll.cc: Ditto.
* termios.cc: Ditto.
* syscalls.cc (_write): Only allow zero length when fd is valid.
Corinna Vinschen [Wed, 14 Nov 2001 21:47:41 +0000 (21:47 +0000)]
* fhandler.cc (fhandler_disk_file::fstat): Add setting access time
and creation time to last modification time for files on filesystems
not supporting multiple timestamps.
(fhandler_disk_file::fstat_helper): Set access time and creation
time in incoming Windows structure instead of in stat buf to avoid
incorrectly overwriting Epoch timestamp.
Corinna Vinschen [Wed, 14 Nov 2001 10:25:35 +0000 (10:25 +0000)]
* libc/include/alloca.h: Move libc/sys/linux/include/alloca.h
to here. Rearrange for general inclusion by stdlib.h.
* libc/include/stdlib.h: Include <alloca.h> if __STRICT_ANSI__
isn't defined.
* libc/sys/linux/include/alloca.h: Move to libc/include.
Jeff Holcomb [Wed, 14 Nov 2001 06:24:41 +0000 (06:24 +0000)]
2001-11-13 Jeff Holcomb <jeffh@redhat.com>
Merged from net gcc:
2001-07-30 Jeff Sturm <jsturm@one-pont.com>
* ltcf-c.sh: Use $objext, not $ac_objext.
2001-07-27 Mark Kettenis <kettenis@gnu.org>
* ltcf-cxx.sh: Add support for GNU.
2001-07-22 Timothy Wall <twall@redhat.com>
* ltcf-c.sh: Don't disable shared libraries for AIX5/IA64. Preserve
default settings if using GNU tools with that configuration.
* ltcf-cxx.sh: Ditto.
* ltcf-gcj.sh: Ditto.
2001-07-21 Michael Chastain <chastain@redhat.com>
* ltconfig: Set max_cmd_len to a maximum of 512Kb, as it seems some
HPUX 11.0 systems have trouble with 1MB. Mark as gcc-local.
* ltmain.sh: Mark as gcc-local.
Corinna Vinschen [Tue, 13 Nov 2001 21:49:06 +0000 (21:49 +0000)]
* dir.cc (mkdir): Add HIDDEN file attribute if file has leading dot
and HIDDEN_DOT_FILES is defined.
* fhandler.cc (fhandler_base::open): Ditto.
* path.cc (symlink): Ditto.
* syscalls.cc (_rename): Ditto and remove HIDDEN file attribute if
new filename does not begin with a dot.
Alan Modra [Tue, 13 Nov 2001 01:03:55 +0000 (01:03 +0000)]
* i386.h (i386_optab): Add entries for "sldr", "smsw" and "str" to
accept WordReg.
* i386-dis.c (grps): Change "sldt", "str", and "smsw" entries
to "sldtQ", "strQ", "smswQ" respectively; all with Ev operand
category instead of Ew.
* cygcheck.cc (scan_registry): Open registry with read-only access.
(main): Reflect argument change for dump_setup.
* dump_setup.cc (dump_setup): Add preliminary extra argument for future use.
* path.cc (read_mounts): Open registry with read-only access.
* dump_setup.cc: New file.
* Makefile.in: Add info for dump_setup.o.
* cygcheck.cc (main): Recognize '-c' option for checking setup installed base.
* path.cc (cygpath): Read mount table if not loaded.
* Makefile.in (cygcheck.exe): Compile as -mno-cygwin executable.
* path.cc: New file.
* cygcheck.cc (init_paths): Use MS-DOS path syntax.
(cygwin_info): Properly display cygwin version numbers. Prettify some output.
(dump_sysinfo): Calculate max names of posix and ms-dos paths for prettier
output.
* select.cc (fhandler_tty_slave::ready_for_read): Return 0 on EBADF.
* syscalls.cc (_read): If ready_for_read() failed, save errno from
being overwritten by signal handler call.
* libc/include/sys/unistd.h: Add prototypes for endusershell(),
getusershell(), iruserok(), revoke(), ruserok() and setusershell()
when __CYGWIN__ is defined.
* libc/sys/cygwin/sys/utmp.h: Add prototypes for login_tty() and
logwtmp().
* lib/Makefile.in: Add .NOTPARALLEL target since dlltool cannot run in parallel
invocations.
* lib/scrnsave.c (WinMain): Trivial change to avoid a compiler warning.
* getfacl.c (username): New function.
(groupname): Ditto.
(usage): Ditto. Add more user friendly help text.
(main): Add -n and --help option. Print names instead of IDs
unless -n option is given.
* setfacl.c (getperm): Tolerate whitespace and comment chars in input.
(getaclentry): Fix several input string misdetections.
(getaclentries): Allow - as input file name to read from stdin.
Tolerate whitespace and comment chars in input.
(usage): Add more user friendly help text.
(main): Add --help option.
Egor Duda [Sun, 4 Nov 2001 12:57:55 +0000 (12:57 +0000)]
* strace.cc (main): New option '-w'. Start traced process in separate
window. New option '-S x'. Flush buffered output every x seconds.
(create_child): Start child process in new window, when requested.
When requested, periodically flush debugging output.