* 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.
Corinna Vinschen [Wed, 21 Feb 2001 21:49:37 +0000 (21:49 +0000)]
* Makefile.in: Add `-lshell32 -luuid' to link pass for new-cygwin1.dll.
* 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.
* cygwin.din: Export rand48 functions.
* thread.cc (MTinterface::Init): Remove the initialization of `reent_data'.
* dcrt0.cc: Add the initalizer to the declaration of `reent_data'.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 35.
* fork.cc (fork_parent): Return EAGAIN when can't record pid.
* pinfo.h (pinfo::remember): Return value of call to proc_subproc.
* sigproc.cc (proc_subproc): Return error if can't record pid.
* mmap.cc (class list): Add member `hash'.
(list::list): Initialize `hash'.
(list::get_list_by_fd): Use filepath hash value to get the correct
mapping list if it's not an anonymous mapping.
(map::add_list): Initialize `hash' with filepath hash value.
(mmap): Check for reusing a mapping only on MAP_SHARED.
* autoload.cc: Add LoadDLLinitfunc for iphlpapi.dll.
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'.
* fhandler.cc (fhandler_base::open): Always add GENERIC_READ access
when opening raw disk devices.
* fhandler_floppy.cc (fhandler_dev_floppy::lseek): Implement bytewise
access.
* fhandler_raw.cc (fhandler_dev_raw::open): Always open raw disk device
binary.
(fhandler_dev_raw::raw_write): Don't drop read buffer content when
writing after read.
* mmap.cc (mmap_record::fixup_map): New method to duplicate
the memory protection in a just forked child.
(mmap): Realign gran_len to page boundary only on anonymous
mapping before saving in the mmap_record.
(munmap): Cleanup code.
(msync): Ditto.
(fixup_mmaps_after_fork): Ditto. Call mmap_record::fixup_map now.
Binutils portion of fix for syntax array elements when max
operands is greater than 127.
2001-02-02 Patrick Macdonald <patrickm@redhat.com>
* cgen.h (CGEN_SYNTAX_CHAR_TYPE): Typedef as unsigned short.
(CGEN_MAX_SYNTAX_ELEMENTS): Rename from CGEN_MAX_SYNTAX_BYTES.
(CGEN_SYNTAX): Define using CGEN_MAX_SYNTAX_ELEMENTS.
* fr30-desc.h: Regenerate with CGEN_MAX_SYNTAX_ELEMENTS.
* m32r-desc.h: Regenerate.
Earnie Boyd [Fri, 2 Feb 2001 18:10:58 +0000 (18:10 +0000)]
* include/winnt.h: (__TEXT): Add private macro.
(_TEXT): Modify definition to use __TEXT.
(_T): Ditto.
This change allows the passing of a MACRO as an argument and have that
MACRO resolved first.
Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
Earnie Boyd [Fri, 2 Feb 2001 16:50:06 +0000 (16:50 +0000)]
Fri Feb 2 10:34:07 2001 Earnie Boyd <earnie@users.sourceforge.net>
* include/tchar.h: (__TEXT): Add private macro.
(_TEXT): Modify definition to use __TEXT.
(_T): Ditto.
This change allows the passing of a MACRO as an argument and have that
MACRO resolved first.
Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
Earnie Boyd [Wed, 31 Jan 2001 22:41:22 +0000 (22:41 +0000)]
* Makefile.in: Increment VERSION to 0.5
* include/winnt.h: Change TEXT to _TEXT throughout.
(SID_RELEASE): Define.
Thanks to: Eric PAIRE <eric.paire@ri.silicomp.com>
Jeff Johnston [Wed, 31 Jan 2001 20:11:48 +0000 (20:11 +0000)]
2001-01-31 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/stdio.h (FILENAME_MAX): Changed to use __FILENAME_MAX__
if defined.
(FOPEN_MAX): Changed to use __FOPEN_MAX__ if defined.
(L_tmpnam): Changed to use __L_tmpnam__ if defined.
* libc/include/sys/config.h: Changed to set __FILENAME_MAX__
appropriately for Cygwin and RTEMS so not to exceed PATH_MAX.
Earnie Boyd [Tue, 30 Jan 2001 13:34:50 +0000 (13:34 +0000)]
* objidl.h: (GetClassID): Argument needs to be a pointer.
(GetUnmarshalClass): CLSID argument needs to be a pointer.
Thanks To: <bge@users.sourceforge.net>
Jeff Johnston [Mon, 29 Jan 2001 22:40:50 +0000 (22:40 +0000)]
2001-01-29 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/math.h (signgam): Change to errno-like solution
using a function to return the address of the real signgam.
* libc/reent/signgam.c: New file containing __signgam().
* libc/reent/Makefile.am: Added signgam.c to list of files.
* libc/reent/Makefile.in: Regenerated.