* fhandler.h (fhandler_base::ready_for_read): Remove unused argument.
(fhandler_tty_slave::ready_for_read): Ditto.
(select_record): Remove poll, initialize peek.
* select.cc: Remove all poll functions, throughout. Change second argument of
peek_* functions to 'bool' throughout. Specifically initialize *_ready
variables throughout.
(select_stuff::poll): Subsume previous poll functionality.
(peek_pipe): Don't grab guard mutex when in select loop. select()/read() is
racy by design so there is no need to worry about a race in select().
(fhandler_base::ready_for_read): Remove unused argument.
(fhandler_tty_slave::ready_for_read): Ditto.
* syscalls.cc (_read): Eliminate third argument in ready_for_read call.
* security.cc (get_supplementary_group_sidlist): New function.
(get_group_sidlist): Call get_supplementary_group_sidlist() to
retrieve list of supplementary groups SIDs from /etc/group and
add them to the user's group list.
* fhandler.cc (fhandler_base::read): Return just read ahead characters if slow
device.
* fhandler.h (fhandler_base::set_eof): New virtual method.
(fhandler_pipe::set_eof): New method.
* pipe.cc (fhandler_pipe::fhandler_pipe): Clear saweof flag.
(fhandler_pipe::read): Return immediately if hit eof.
(fhandler_pipe::hit_eof): Return true if saweof flag is set.
* select.cc (peek_pipe): Don't call PeekNamedPipe if we couldn't grab the guard
mutex.
* dll_init.h (class dll_list): Reorder functions to avoid compiler "can't
inline" warnings.
* security.h (class cygsid): Ditto.
* sigproc.cc (get_proc_lock): Ditto.
* sigproc.h (class sigframe): Ditto.
* sync.h (class muto): Ditto.
* fhandler.h (fhandler_base::get_guard): Actually MAKE virtual as previously
indicated.
* pipe.cc (make_pipe): Remove extraneous set_errno.
* syscalls.cc (_open): Ditto.
* select.cc (peek_pipe): Need to check that there is still something to read
from the pipe after acquiring the mutex since another process/thread could have
eaten the input before we got to acquiring the lock. (Thanks to Nick Duffek
for this inspiration.)
* fhandler.h: Change Windows 'BOOL's to c++ 'bool's for all variables.
* select.cc (fhandler_base::ready_for_read): Set read_ready to zero prior to
testing it or it will be uninitialized.
* Makefile.in (CFLAGS): Move setting to Makefile.common.
* cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not open.
* select.cc (fhandler_base::ready_for_read): Release an open guard mutex when
exiting with an error condition.
* syscalls.cc (_read): Check frequently for closed fd as a kludge until
something better is invented.
* dtable.cc (dtable::build_fhandler): Issue internal error on unknown device.
* fhandler.cc (fhandler_base::close): Show both name and handle in debugging
output.
* fhandler.h (fhandler_base::get_guard): New virtual method.
(fhandler_pipe::get_guard): New method.
(fhandler_socket::ready_for_read): Delete declaration.
(fhandler_pipe::ready_for_read): Ditto.
(fhandler_serial::ready_for_read): Ditto.
(fhandler_console::ready_for_read): Ditto.
(fhandler_tty_common::ready_for_read): Ditto.
(fhandler_windows::ready_for_read): Ditto.
(struct select_record::peek): Declare new method.
* select.cc (MAKEready): Delete.
(peek_pipe): Use get_guard method to retrieve potential guard mutex handle.
(fhandler_base::ready_for_read): Rewrite as generic ready-for-read handler.
Should only be called for "slow" devices.
(fhandler_socket::ready_for_read): Delete definition.
(fhandler_pipe::ready_for_read): Ditto.
(fhandler_serial::ready_for_read): Ditto.
(fhandler_console::ready_for_read): Ditto.
(fhandler_tty_common::ready_for_read): Ditto.
(fhandler_windows::ready_for_read): Ditto.
(fhandler_pipe::select_read): Fill in new peek record in select_record
structure.
(fhandler_console::select_read): Ditto.
(fhandler_tty_common::select_read): Ditto.
(fhandler_serial::select_read): Ditto.
(fhandler_socket::select_read): Ditto.
(fhandler_socket::select_read): Ditto.
(fhandler_tty_slave::ready_for_read): Check for tty not open. Set errnos
appropriately.
* syscalls.cc (_read): Allow ready_for_read to set errno.
* pinfo.cc (pinfo::init): Return spawn/NO_WAIT process as valid if it is
initializing.
* sigproc.cc (getsem): Adjust wait for process to initialize downward to avoid
huge waits.
Jeff Johnston [Thu, 1 Nov 2001 19:47:32 +0000 (19:47 +0000)]
2001-11-01 Arati Dikey <aratidikey@hotmail.com>
* libm/mathfp/sf_isinf.c (isinff): Change to use _DEFUN macro.
[_DOUBLE_IS_32BITS](isinf): New function that calls isinff.
* libm/mathfp/sf_isnan.c (isnanf): Change to use _DEFUN macro.
[_DOUBLE_IS_32BITS](isnan): New function that calls isnanf.
Earnie Boyd [Thu, 1 Nov 2001 19:42:57 +0000 (19:42 +0000)]
2001-11-01 Danny Smith <dannysmith@users.sourceforge.net>
* include/basetyps.h (DECLARE_INTERFACE): Don't add
__attribute__((com_interface)) for __GNUC__ >= 3.
2001-11-01 Danny Smith <dannysmith@users.sourceforge.net>
* include/commdlg.h (PRINTPAGERANGE): Add structure
definition.
(PRINTDLGEX[AW]): Likewise.
(PrintDlgEx[AW]): Add function declaration.
* lib/comdlg32.def (PrintDlgEx[AW]): Add function stubs.
* ChangeLog: Fix typo in last entry.
2001-11-01 TAMURA Kent <tkent@users.sourceforge.net>
* include/objbase.h (CoGetClassObject): Change third parameter
to COSERVERINFO*.
2001-10-30 Danny Smith <dannysmith@users.sourceforge.net>
* include/winuser.h (MOUSEEVENTF_WHEEL): Define.
Thanks to: Kim Saunders.
* include/oleauto.h: Define VARIANT* flags for VariantChangeType.
Thanks to: Pat Thoyts.
* include/winnt.h: Change C++ style comment to C style.
* include/shlobj.h: Ditto.
* include/objbase.h (enum tagCOINIT): Remove comma at end of
list.
* include/oledlg.h (enum tagOLEUIPASTEFLAG): Ditto.
* include/oleidl.h (enum tagDROPEFFECT): Mark as __extension__
(enum not limited to range of int).
* include/oaidl.h (struct tagVARIANT): Mark as __extension__
(struct with no named members), ifndef NONAMELESSUNION.
2001-10-30 Danny Smith <dannysmith@users.sourceforge.net>
* include/winuser.h (CREATESTRUCT): UNICODE it.
(CBT_CREATEWND): Likewise.
Jeff Johnston [Wed, 31 Oct 2001 19:26:13 +0000 (19:26 +0000)]
2001-10-31 Jeff Johnston <jjohnstn@redhat.com>
* m32r/Makefile.in: Use gdb stub set by configure.
* m32r/configure.in: Add a special macro for testing
c compiler without building executable. Add setting of
GDBSTUB.
* m32r/configure: Regenerated.
Jeff Johnston [Wed, 31 Oct 2001 19:19:08 +0000 (19:19 +0000)]
2001-10-31 David Howells <dhowells@redhat.com>
* syscall.h: Added SYS_times, SYS_gettimeofday, SYS_link values.
* mn10300/times.c: Renamed "times" to "_times" so that it can be
referenced by newlib.
* mn10300/cygmon.c: New file.
* mn10300/crt0_redboot.S: Ditto.
* mn10300/crt0_cygmon.S: Ditto.
* mn10300/Makefile.in: Added RedBoot and Cygmon support.
* mn10300/configure.in: Changed to allow for future
evaluation boards to be added.
* mn10300/configure: Regenerated.
* sigproc.cc (sigproc_terminate): Don't signal main thread when exiting.
* sigproc.h (sigframe): Decorate some methods with `inline'.
(new_muto): Coerce pointer to new to void *.
* cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh.
(cygheap_fdmanip::isopen): New method.
* syscalls.cc (_read): Avoid accessing closed fd.
* path.h (fe_types): New enum.
(path_conv::set_path): New method.
(find_exec): Change null_if_not_found argument to something more generic.
* spawn.cc (find_exec): Default to returning the POSIX path rather than the
windows path, unless instructed otherwise.
(spawn_guts): Force call to find_exec to use native paths.
* dlfcn.cc (check_path_access): Accommodate new find_exec arguments.
* environ.h (win_env::get_posix): New method.
* dtable.cc (dtable::dup2): Add some debugging. Use methods from passed in
class rather than cygheap->fdtab.
* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add more
debugging output.
(fhandler_socket::dup): Allocate new space for prot_info_ptr for duplicated
entry.
* syscalls.cc (stat_worker): Always delete fh if it has been created.
* fhandler.cc (fhandler_base::set_name): Set namehash here to catch name
changes.
(fhandler_base::open): Remove namehash setting.
(fhandler_base::fstat): Subtract 1 from arbitrary time setting to avoid strange
ls -l granularity problem.
* shared_info.h (MOUNT_VE
* fhandler.h (fhandler_serial::fhandler_serial): Change to only accept unit
argument.
* fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
(fhandler_serial::open): Avoid else when previous clause is a return().
* path.cc (get_devn): Alias /dev/ttyS0 -> /dev/com1, etc.
(get_device_number): Reallow standalone "com1" as a valid name for /dev/com1.
* select.cc (MAKEready): Check for read_ready in loop since select_read could
set it.
(peek_socket): Check ready/write/except specifically since they could have been
set even prior to peek_socket call.
* shared_info.h (MOUNT_VERSION): Change to a smaller, still arbitrary number.
* shared.cc (open_shared): Accept a number to denote the shared memory region.
(memory_init): Use shared memory version as part of the object name of the
shared region. Ditto for the mount table.
* path.cc (CYGWIN_REGNAME): New define used in place of
CYGWIN_INFO_CYGWIN_REGISTRY_NAME throughout.
* external.cc (cygwin_internal): Implement CW_[GS]ET_CYGWIN_REGISTRY_NAME.
* cygheap.h (init_cygheap::cygwin_regname): New element.
Jeff Johnston [Wed, 24 Oct 2001 18:10:30 +0000 (18:10 +0000)]
2001-10-24 Christopher Faylor <cgf@redhat.com>
* libc/stdio/fseek.c: Reset pointer to buffer base
when forced to seek outside of current buffer contents.
This prevents the code from erroneously thinking there is
anything in the current buffer.
Ensure that all fhandler_*::read definitions are __stdcall throughout.
* fhandler.cc (fhandler_base::set_inheritance): Be more defensive in debugging
code.
* fhandler.h: Adjust regparms throughout to reflect passing 'this' parameter.
* fhandler_console.cc (fhandler_console::read): Remove unneeded test. Only
honor "key down" events.
* miscfuncs.cc (strcasestr): Reorganize for efficient code use.
(check_null_empty_str_errno): Ditto.
(__check_null_invalid_struct_errno): Ditto.
(__check_invalid_read_ptr_errno): Ditto.
* syscalls.cc (_read): Return 0 when length == 0, as per Single UNIX
Specification.
* debug.cc (set_errno): Return value of errno that was set, just like the
macro.
(setclexec_pid): Replace old handle with new handle.
* debug.h: Reflect change in arguments for setclexec_pid.
* fhandler.cc (fhandler_base::set_inheritance): Ditto.
(fhandler_base::fork_fixup): Ditto.
* cygerrno.h: Reflect return value change for set_errno.
Corinna Vinschen [Mon, 22 Oct 2001 18:31:00 +0000 (18:31 +0000)]
Patch suggested by Ian Ray <ian.ray@nokia.com>:
* syscalls.cc (seteuid): Unset environment variables HOMEDRIVE and
HOMEPATH before calling internal_getlogin().
* uinfo.cc (internal_getlogin): Use default HOMEPATH and HOMEDRIVE
from environment if both are present, else query NetUserGetInfo().
* libc/posix/execvp.c: Remove obsolete CYGWIN32 considerations throughout.
* signal.h: Change comment to reflect __CYGWIN__ rather than __CYGWIN32__.
* popen.c (popen): Use __CYGWIN_ rather than __CYGWIN32__.
* system.c (_system_r): Ditto.
* autoload.cc: Autoload GetProcessMemoryInfo.
* resource.cc (fill_rusage): Calculate ru_maxrss and ru_majflt entries.
(Bug report on this from Guido Serassio in the squid project). This requires
including psapi.h.
Corinna Vinschen [Sat, 20 Oct 2001 13:56:09 +0000 (13:56 +0000)]
* mkgroup.c: Avoid compiler warnings.
(print_special): New function.
(main): Print special accounts by calling print_special().
* mkpasswd.c: Avoid compiler warnings.
(enum_users): Print additional U-domain\username info in gecos
field when SIDs are printed.
(print_special): New function.
(main): Print special accounts by calling print_special().
* miscfuncs.cc (+__check_invalid_read_ptr_errno): New function.
* syscalls.c (_write): Validate that write buffer is accessible for reading,
not writing.
* winsup.h: Declare new function, increase regparmization of check_* functions.
Chris Demetriou [Thu, 18 Oct 2001 01:42:16 +0000 (01:42 +0000)]
[gas/testsuite/ChangeLog]
2001-10-17 Chris Demetriou <cgd@broadcom.com>
* gas/mips/mips.exp (sb1-ext-ps): New test to test
SB-1 core's paired-single extensions to the MIPS64 ISA.
* gas/mips/sb1-ext-ps.d: New file.
* gas/mips/sb1-ext-ps.s: New file.
[include/opcode/ChangeLog]
2001-10-17 Chris Demetriou <cgd@broadcom.com>
* mips.h (INSN_SB1): New cpu-specific instruction bit.
(OPCODE_IS_MEMBER): Allow instructions matching INSN_SB1
if cpu is CPU_SB1.
[opcodes/ChangeLog]
2001-10-17 Chris Demetriou <cgd@broadcom.com>
* mips-dis.c (mips_isa_type): Make the ISA used to disassemble
SB-1 binaries include instructions specific to the SB-1.
* mips-opc.c (SB1): New definition.
(mips_builtin_opcodes): Add SB-1 extension opcodes "div.ps",
"recip.ps", "rsqrt.ps", and "sqrt.ps".
Corinna Vinschen [Tue, 16 Oct 2001 20:17:23 +0000 (20:17 +0000)]
* fhandler_raw.cc (fhandler_dev_raw::open): Eliminate compatibility
code since no Win32 device names are used anymore.
* fhandler_tape.cc (fhandler_dev_tape::tape_set_blocksize): Allow
0 as blocksize to indicate variable blocksize.
* path.cc (win32_device_name): Generate NT internal device names
using upper/lower case names for readability.
Generate \DosDevices\<letter>: device name for mount table
compatibility devices.
Corinna Vinschen [Tue, 16 Oct 2001 16:28:39 +0000 (16:28 +0000)]
* fhandler_tape.cc (fhandler_dev_tape::tape_status): Report
EOTWarningZoneSize in get->mt_eotwarningzonesize.
* include/cygwin/mtio.h: Define DEFTAPE.
(struct mtget): Add member `mt_eotwarningzonesize'. Add a comment.
* include/cygwin/version.h: Bump API minor version to 47.
Corinna Vinschen [Tue, 16 Oct 2001 14:53:26 +0000 (14:53 +0000)]
* autoload.cc: Add load statement for `NtOpenFile'.
* fhandler.h (fhandler_dev_raw::get_unit): New method.
(fhandler_dev_tape::norewind): Eliminate.
(fhandler_dev_tape::is_rewind_device): New method.
* fhandler_raw.cc (fhandler_dev_raw::open): Open new
fixed device name devices using NT internal method.
Keep calling fhandler_base::open() for old mount table
device mapping compatibility devices.
(fhandler_dev_raw::fstat): Eliminate. Settings are done
by fhandler_base::fstat() already.
* fhandler_tape.cc: Remove `norewind' usage throughout.
* ntdll.h: Define FILE_SYNCHRONOUS_IO_NONALERT.
Define struct _IO_STATUS_BLOCK.
Declare NtOpenFile().
* path.cc (get_raw_device_number): Add new approach for
using fixed device names.
(win32_device_name): Ditto.
(get_device_number): Ditto. Require POSIX path to begin
with "/dev/".
(mount_info::conv_to_win32_path): Call win32_device_name()
instead of get_device_number() after evaluating mount points
to allow changing the win32 destination path again.
* security.cc (str2buf2uni): Remove `static' to be able to
call function from fhandler_dev_raw::open().
* wincap.cc: Set flag has_raw_devices appropriately.
* wincap.h: Add flag has_raw_devices.
* cygerrno.h (set_errno): Define more informative version of this function for
debugging.
(__set_errno): Declare when DEBUGGING.
* cygheap.h (cygheap_fdget::cygheap_fdget): Add a flag to control when errno is
set.
* debug.cc (__set_errno): New function.
* fcntl.cc (_fcntl): Fix so that correct fd is used for second argument to
dup2.
* syscalls.cc (_cygwin_istext_for_stdio): Don't set errno here when using
cygheap_fdget.
Corinna Vinschen [Mon, 15 Oct 2001 09:41:18 +0000 (09:41 +0000)]
* uname.cc (uname): Use `wProcessorLevel' unless OS sets it wrong.
Use `dwProcessorType' then instead.
* wincap.cc: Set flag has_valid_processorlevel appropriately.
* wincap.h: Add flag has_valid_processorlevel.
* dtable.cc (dtable::build_fhandler_from_name): Use PC_FULL to determine path
name.
* fork.cc (fork_parent): Correct the "unable to allocate forker_finished event"
error message. It named the wrong event before.
* autoload.cc (load_wsock32): Declare dummy function to force loading of
winsock.
* fhandler.cc (fhandler_base::set_inheritance): Make debugging output more
verbose.
* fhandler_socket.cc (fhandler_socket::fixup_after_fork): Force loading of
winsock32 if winsock2 not available.
* net.cc (set_socket_inheritance): Use DuplicateHandle in all cases to set
inheritance correctly.
(fdsock): Use winsock2_active macro to determine when to set socket
inheritance. Remove fdtab resource locking since this function should already
be protected.
(cygwin_accept): Simplify logic. Ensure that fdtab unlock is not called
inappropriately.
(cygwin_rcmd): Use fdtab locking.
(cygwin_rresvport): Ditto.
(cygwin_rexec): Ditto.
* select.cc (peek_socket): Set errno appropriately if winsock select fails.
* winsup.h: Declare check_pty_fds.
* syscalls.cc (check_pty_fds): Rename from check_ttys_fds. Also check pty
master.
(setsid): Use check_pty_fds.
* dtable.cc (dtable::dec_console_fds): Add check on pty fds.
* fhandler_dsp.cc (fhandler_dsp::ioctl): Return 0 for successful
SNDCTL_DSP_GETBLKSIZE operation. Remove obsolete 'name' arg from fhandler_*
constructors throughout.
* winsup.h (winsock_active): New macro.
(winsock2_active): Ditto.
* autoload.cc (wsock_init): Use new macros to decide if winsock or winsock2 is
loaded.
(nonexist_wsock32): Dummy function to force winsock load.
(nonexist_ws2_32): Dummy function to force winsock2 load.
* fhandler.h (fhandler_socket::fstat): Declare new method. Currently unused.
* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Check that
winsock2 is active before trying WSADuplicateSocketA.
(fhandler_socket::fixup_after_fork): Add extra check for winsock2_active.
Otherwise use iffy procedures for Windows 95.
(fhandler_socket::fixup_after_exec): Add debugging.
(fhandler_socket::dup): Add debugging.
(fhandler_socket::fstat): New method.
(fhandler_socket::set_close_on_exec): Attempt to perform iffy stuff on Windows
95.
* errno.cc (_sys_nerr): Work around compiler strangeness.
* pinfo.cc (winpids::add): Add extra element at end of allocated array for
setting to NULL.
(winpids::enumNT): Ditto.
(winpids::init): Don't modify pidlist if it hasn't been allocated
(possibly due to malloc problem).
Matthew Green [Sat, 13 Oct 2001 01:59:09 +0000 (01:59 +0000)]
[gas/ChangeLog]
* config/tc-ppc.c (md_parse_option): New -m7410, -m7450 and -m7455
flags, equivalent to -m7400. New -maltivec to enable AltiVec
instructions. New -mbook64 and -mbooke/-mbooke32 flags to enable
64-bit and 32-bit BookE support, respectively. Change -m403 and
-m405 to set PPC403 option.
(md_show_usage): Adjust for new options.
* doc/all.texi: Set PPC.
* doc/as.texinfo: Add PPC support and pull in c-ppc.texi.
* doc/c-ppc.texi: New file.
* doc/Makefile.am (CPU_DOCS): Add c-ppc.texi.
* doc/Makefile.in: Regenerate.
[gas/testsuite/ChangeLog]
* gas/ppc/booke.s: New test for Motorola BookE.
* gas/ppc/booke.d: New file.
* gas/ppc/ppc.exp: Test booke.s.
[include/opcode/ChangeLog]
* ppc.h (PPC_OPCODE_BOOKE, PPC_OPCODE_403): New opcode flags for
BookE and PowerPC403 instructions.
[opcodes/ChangeLog]
* ppc-opc.c (insert_de, extract_de, insert_des, extract_des): New
instruction field instruction/extraction functions for new BookE
DE form instructions.
(CT): New macro for CT field in an X form instruction.
(DE, DES, DEO, DE_MASK): New macros for DE/DES fields in DE form
instructions.
(PPC64): Don't include PPC_OPCODE_PPC.
(403): New opcode macro for PPC403 processors.
(BOOKE): New opcode macro for BookE processors.
(bce, bcel, bcea, bcela, bclre, bclrel: New BookE instructions.
(bcctre, bcctrel, be, bel, bea, bela, icbt, icbte, lwzxe): Likewise.
(dcbste, lwzuxe, luxe, dcbfe, lbzxe, lwarxe, lbzuxe): Likewise.
(stwcxe, stwxe, stxe, stwuxe, stuxe, stbxe, dcbtste, stbuxe): Likewise.
(mfapidi, dcbte, lhzxe, lhzuxe, lhaxe, lhauxe, subfe64): Likewise.
(subfeo64, adde64, addeo64, sthxe, sthuxe, subfze64): Likewise.
(subfzeo64, addze64, addzeo64, dcbie, subfme64, subfmeo64): Likewise.
(addme64, addmeo64, stdcxe., mcrxr64, lwbrxe, lfsxe, lfsuxe): Likewise.
(lfdxe, lfduxe, stwbrxe, stfsxe, stfsuxe, stfdxe, dcbae): Likewise.
(stfduxe, tlbivax, tlbivaxe, lhbrxe, ldxe, lduxe, tlbsx): Likewise.
(tlbsxe, sthbrxe, stdxe, stduxe, icbie, stfiwxe, dcbze, lbze): Likewise.
(lbzue, ldue, lhze, lhzue, lhae, lhaue, lwze, lwzue): Likewise.
(stbe, stbue, sthe, sthue, stwe, stwue, lfse, lfsue, lfde): Likewise.
(lfdue, stde, stdue, stfse, stfsue, stfde, stfdue): Likewise.
* ppc-dis.c (print_insn_big_powerpc, print_insn_little_powerpc): Look
for a disassembler option of `booke', `booke32' or `booke64' to enable
BookE support in the disassembler.