Nick Clifton [Tue, 17 Jun 2008 16:01:28 +0000 (16:01 +0000)]
* app.c (do_scrub_chars): Do not UNGET an EOF value.
* ti.h (GET_SCNHDR_NLNNO): Provide an alternative version of this
macro which does not trigger an array bounds warning in gcc.
(PUT_SCNHDR_NLNNO): Likewise.
(GET_SCNHDR_FLAGS): Likewise.
(PUT_SCNHDR_FLAGS): Likewise.
(GET_SCNHDR_PAGE): Likewise.
(PUT_SCNHDR_PAGE): Likewise.
Nick Clifton [Thu, 12 Jun 2008 21:44:53 +0000 (21:44 +0000)]
* mips.h: Document new field descriptors +Q.
(OP_SH_SEQI, OP_MASK_SEQI): New bit mask and shift count for SEQI.
opcodes/
* mips-dis.c (print_insn_args): Handle field descriptor +Q.
* mips-opc.c (mips_builtin_opcodes): Add Octeon instructions seq,
seqi, sne and snei.
gas/
* config/tc-mips.c (validate_mips_insn): Handle field descriptor +Q.
(mips_ip): Likewise.
(macro_build): Likewise.
(CPU_HAS_SEQ): New macro.
(macro2) <M_SEQ_I, M_SNE_I>: Use it. Emit seq/sne and seqi/snei.
gas/testsuite/
* gas/mips/octeon.s, gas/mips/octeon.d: Add tests for seq* and sne*.
* gas/mips/octeon-ill.s, gas/mips/octeon-ill.s: Add tests for seqi
and snei.
Nick Clifton [Thu, 12 Jun 2008 16:14:52 +0000 (16:14 +0000)]
include/opcode/
* mips.h: Document new field descriptors +x, +X, +p, +P, +s, +S.
Update comment before MIPS16 field descriptors to mention MIPS16.
(OP_SH_BBITIND, OP_MASK_BBITIND): New bit mask and shift count for
BBIT.
(OP_SH_CINSPOS, OP_MASK_CINSPOS, OP_SH_CINSLM1, OP_MASK_CINSLM1):
New bit masks and shift counts for cins and exts.
* gas/mips/octeon.s, gas/mips/octeon.d: Add tests for baddu,
bbit*, cins*, dmul, pop, dpop, exts*, mtm*, mtp*, syncs, syncw,
syncws, vm3mulu, vm0 and vmulu.
* gas/mips/octeon-ill.s, gas/mips/octeon-ill.s: New test.
* gas/mips/mips.exp: Run it. Run octeon test with
run_dump_test_arches.
Corinna Vinschen [Thu, 12 Jun 2008 15:57:23 +0000 (15:57 +0000)]
* fhandler.h (set_console_state_for_spawn): Drop declaration.
* fhandler_console.cc (set_console_state_for_spawn): Remove.
(fhandler_console::open): Set console state last. Don't set
ENABLE_PROCESSED_INPUT flag.
* spawn.cc (spawn_guts): Drop call to set_console_state_for_spawn.
Corinna Vinschen [Wed, 11 Jun 2008 14:06:05 +0000 (14:06 +0000)]
* path.cc (get_nt_native_path): Drop considerations for DOS devices.
Keep relative paths relative.
(cygwin_conv_path): Don't try to skip native NT prefixes on relative
paths.
Corinna Vinschen [Wed, 11 Jun 2008 09:43:59 +0000 (09:43 +0000)]
* include/cygwin/version.h (CYGWIN_VERSION_MOUNT_REGISTRY): Bump.
(CYGWIN_INFO_CYGWIN_MOUNT_REGISTRY_NAME): Remove.
(CYGWIN_INFO_CYGDRIVE_FLAGS): Remove.
(CYGWIN_INFO_CYGDRIVE_PREFIX): Remove.
(CYGWIN_INFO_CYGDRIVE_DEFAULT_PREFIX): Add comment to differ from the
registry related defines.
Corinna Vinschen [Tue, 10 Jun 2008 19:58:58 +0000 (19:58 +0000)]
* fhandler_procnet.cc (get_scope): New static function to evaluate
scope.
(dad_to_flags): New static array to convert Windows DAD state to
Linux values.
(format_procnet_ifinet6): Drop asking for IfIndex, just use Ipv6IfIndex.
Use get_scope and dad_to_flags to generate more accurate linux-like
output.
Corinna Vinschen [Tue, 10 Jun 2008 18:15:57 +0000 (18:15 +0000)]
* net.cc (if_nametoindex): Fix typo in call to get_adapters_addresses.
(if_indextoname): Prefer IPv6 loopback device name over IPv4 loopback
device name on pre-Vista systems.
(if_nameindex): Ditto.
Corinna Vinschen [Tue, 10 Jun 2008 17:24:00 +0000 (17:24 +0000)]
* fhandler_procnet.cc (format_procnet_ifinet6): Use sprintf rather than
__small_sprintf.
* net.cc (if_nametoindex): Prefer IPv6IfIndex over IfIndex for
consistency with /proc/net/if_inet6.
(if_indextoname): Ditto.
(if_nameindex): Ditto.
Jeff Johnston [Mon, 26 May 2008 23:31:08 +0000 (23:31 +0000)]
2008-05-26 Eric Blake <ebb9@byu.net>
Optimize the generic and x86 memchr.
* libc/string/memchr.c (memchr) [!__OPTIMIZE_SIZE__]:
Pre-align pointer so unaligned searches aren't penalized.
* libc/machine/i386/memchr.S (memchr) [!__OPTIMIZE_SIZE__]: Word
operations are faster than repnz byte searches.
Jeff Johnston [Mon, 26 May 2008 22:56:14 +0000 (22:56 +0000)]
2008-05-26 Eric Blake <ebb9@byu.net>
Optimize the generic and x86 strlen.
* libc/string/strlen.c (strlen) [!__OPTIMIZE_SIZE__]: Pre-align
data so unaligned searches aren't penalized.
* libc/machine/i386/strlen.S (strlen) [!__OPTIMIZE_SIZE__]:
Word operations are faster than repnz byte searches.
* mount.cc (mount_info::init): Revert previous change.
(mount_info::from_fstab): Change system_printf to debug_printf. Just use a
local NT_MAX_PATH sized temporary buffer.
Corinna Vinschen [Fri, 23 May 2008 17:22:18 +0000 (17:22 +0000)]
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Don't try to
use FileIdBothDirectoryInformation on NFS shares. Fix comment to
explain why.
* path.cc (symlink_info::check): Reinstantiate no_ea. Use in
erroneously changed condition.
* mount.cc (find_root_from_cygwin_dll): New function factored from from_fstab.
Avoid use of tls since it isn't necessarily initialized when cygwin1.dll is
dynamically loaded.
(mount_info::create_root_entry): Ditto.
(mount_info::init): Calculate cygwin root once. Use create_root_entry to
record it. Pass fstab location to from_fstab.
(mount_info::from_fstab): Move root calculation stuff elsewhere, as per above.
* shared_info.h (mount_info::from_fstab_line): Make private.
(mount_info::fstab): Ditto. Accommodate new arguments.
* mount.cc (mount_info::from_fstab): Use cygwin_hmodule rather than trying to
find handle based on cygwin1.dll.
* path.cc (symlink_info::check): Remove unused variable.
Corinna Vinschen [Fri, 23 May 2008 11:00:35 +0000 (11:00 +0000)]
* path.cc (symlink_info::check): Define eabuf and easize outside of
loop. Set to NULL on first STATUS_EAS_NOT_SUPPORTED. Align comments.
Fix formatting.
* path.cc (symlink_info::check): Don't pass EaBuffer to NtCreateFile if it has
indicated that it isn't appropriate.
* ntdll.h (STATUS_EAS_NOT_SUPPORTED): Define.
* winsup.h: Remove __builtin* defines.
Corinna Vinschen [Thu, 22 May 2008 20:32:15 +0000 (20:32 +0000)]
* cygtls.h (struct san): Add two int values to store the current
tls_pathbuf counters.
(return_from_fault): Restore tls_pathbuf counters.
(setup_fault): Save tls_pathbuf counters.
* tlsoffset.h: Regenerate.
Nick Clifton [Wed, 21 May 2008 14:50:07 +0000 (14:50 +0000)]
* reloc-macros.h: Add a comment about the use of the
END_RELOC_NUMBERS symbol as a sentinel value.
* arm.h (END_RELOC_NUMBERS): Provide a maximum value.
Corinna Vinschen [Wed, 21 May 2008 10:23:19 +0000 (10:23 +0000)]
* fhandler_disk_file.cc (get_ino_by_handle): Rename pfai to fai.
(fhandler_base::fstat_by_handle): Drop fai_size and pfai in favor of
static struct fai_buf. Restructure.
(fhandler_base::fstat_by_name): Drop fvi_size and pfvi. Drop fdi_size
and pfdi in favor of static struct fdi_buf. Drop redundant test for
existance. Use FileDirectoryInformation class instead of
FileBothDirectoryInformation. Drop call to NtQueryVolumeInformationFile
in favor of using pc.fs_serial_number (). Fix FileId information given
to fstat_helper.
(fhandler_disk_file::fstatvfs): Drop fvi_size, pfvi, fai_size and pfai.
Drop getting FileFsVolumeInformation and FileFsAttributeInformation in
favor of using the related path_conv info.
(fhandler_disk_file::opendir): Fix comment.
(fhandler_disk_file::readdir): Ditto. Use FileDirectoryInformation
class instead of FileBothDirectoryInformation.
* path.cc (fs_info::update): Store MaximumComponentNameLength in new
member name_len.
* path.h (struct fs_info): Use ULONG rather than DWORD. Add member
name_len to store MaximumComponentNameLength. Add accessor methods.
(path_conv::fs_name_len): New method.
Corinna Vinschen [Wed, 21 May 2008 09:02:42 +0000 (09:02 +0000)]
* fhandler.h (dirent_states): Add dirent_nfs_d_ino state and add it to
dirent_info_mask.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set
dirent_nfs_d_ino flag for NFS shares. Explain why.
(fhandler_disk_file::readdir): Use FileNamesInformation instead of
FileBothDirectoryInformation info class on NFS clients not supporting
the FileIdBothDirectoryInformation info class. Use local pointers to
accommodate different offsets.
* path.cc (symlink_info::check): Don't test directories for symlinks
on NFS shares. Enhance comment.
Corinna Vinschen [Tue, 20 May 2008 18:26:45 +0000 (18:26 +0000)]
* path.cc (symlink_worker): Fix EA buffer size info given to
NtCreateFile.
(symlink_info::check_nfs_symlink): Get 64K buffer for EA buffer.
Change EA buffer size info given to NtQueryEaFile accordingly.
Corinna Vinschen [Tue, 20 May 2008 18:19:32 +0000 (18:19 +0000)]
* path.cc (symlink_info::check_shortcut): Minimize requested file
access flags.
(symlink_info::check_sysfile): Ditto. Add missing `else'.
(symlink_info::check): Only retry to open file if first try failed
with access denied.
Corinna Vinschen [Tue, 20 May 2008 15:11:23 +0000 (15:11 +0000)]
* Makefile.in (DLL_OFILES): Add nfs.o.
* fhandler.cc (fhandler_base::open): Open files on NFS shares with
correct access flags and EAs.
* fhandler.h (fhandler_base::fstat_by_nfs_ea): Declare.
* fhandler_disk_file.cc (fhandler_base::fstat_by_nfs_ea): New method.
(fhandler_base::fstat_by_handle): Call fstat_by_nfs_ea for files on
NFS shares.
(fhandler_disk_file::fchmod): Use NFS specific method to set mode for
files on NFS shares. Don't overrule errno from call to
set_file_attribute with errno from NtSetInformationFile call.
(fhandler_disk_file::fchown): Add comment.
* mount.cc (fillout_mntent): Accommodate change in second parameter
to fs_info::update.
* nfs.cc: New file.
* nfs.h: New file.
* path.cc (fs_info::update): Take handle instead of bool as second
parameter. Use that handle if it's not NULL. Only close handle if
it has been opened here. Use static defined buffers instead of
alloca'd buffers.
(path_conv::check): Call symlink_info::check with reference to fs.
Don't call fs.update here if file exists.
(conv_path_list): Prefer tmp_pathbuf buffer over using alloca.
(symlink_worker): Use NFS specific method to create symlinks on NFS
shares. Prefer tmp_pathbuf buffer over using alloca.
(symlink_info::check_shortcut): Reopen file from incoming handle
with necessary FILE_GENERIC_READ flag. Prefer tmp_pathbuf buffer over
using alloca.
(symlink_info::check_sysfile): Ditto.
(symlink_info::check_reparse_point): Use tmp_pathbuf buffer to
allocate REPARSE_DATA_BUFFER.
(symlink_info::check_nfs_symlink): New method.
(enum symlink_t): Remove.
(symlink_info::check): Don't use NtQueryAttributesFile. Rather, open
file with necessary access flags and call NtQueryInformationFile. Fix
error handling in case file can't be opened. For existing files, call
fs_info::update here. Restructure symlink checking to accommodate the
fact that the file is already open. Add case for NFS symlinks.
* path.h (fs_info::update): Take handle instead of bool as second
parameter.
Corinna Vinschen [Tue, 20 May 2008 10:18:12 +0000 (10:18 +0000)]
* path.cc (path_conv::check): Free wide_path and normalized_path if
necessary.
* path.h (path_conv::path_conv): Set wide_path, normalized_path and
normalized_path_size to 0 in all constructors.
Corinna Vinschen [Mon, 19 May 2008 20:22:29 +0000 (20:22 +0000)]
* syscalls.cc (rename): Allocate temporary path buffers using
tmp_pathbuf. Don't try to unset R/O attribute on dstpc if a
removepc exists. dstpc is a non-existant file in that case.