* autoload.cc (GetTcpTable): Define.
* fhandler_socket.cc (address_in_use): New function to check if
sockaddr_in address is already in use.
(fhandler_socket::bind): Check if address is alreay in use in case of
SO_REUSEADDR, to circumvent WinSock non-standard behaviour.
Corinna Vinschen [Tue, 31 Jan 2006 21:49:39 +0000 (21:49 +0000)]
* dlfcn.cc (check_path_access): Call find_exec with FE_DLL option.
* path.h (enum fe_types): Add FE_DLL value.
* spawn.cc (std_suffixes): Remove.
(exe_suffixes): New suffix_info for executing files.
(dll_suffixes): New suffix_info for searching shared libraries.
(perhaps_suffix): Add opt argument. Use dll_suffixes if FE_DLL
option is given, exe_suffixes otherwise.
(find_exec): Propagate opt argument to perhaps_suffix. Drop suffix
check when testing execute permission.
(spawn_guts): Call perhaps_suffix with FE_NADA opt argument.
Corinna Vinschen [Tue, 31 Jan 2006 21:09:43 +0000 (21:09 +0000)]
* spawn.cc (find_exec): Only return files with execute permission set
if ntsec is on. Don't check execute permission of Windows batch files.
(av::fixup): Handle empty files gracefully. Drop execute permission
test here.
* path.cc (suffix_scan::next): Don't skip any suffix on first run.
Paul Brook [Tue, 31 Jan 2006 14:11:13 +0000 (14:11 +0000)]
2006-01-31 Paul Brook <paul@codesourcery.com>
Richard Earnshaw <rearnsha@arm.com>
* gas/config/tc-arm.c: Use arm_feature_set.
(arm_ext_*, arm_arch_full, arm_arch_t2, arm_arch_none,
arm_cext_iwmmxt, arm_cext_xscale, arm_cext_maverick, fpu_fpa_ext_v1,
fpu_fpa_ext_v2, fpu_vfp_ext_v1xd, fpu_vfp_ext_v1, fpu_vfp_ext_v2):
New variables.
(insns): Use them.
(md_atof, opcode_select, opcode_select, md_assemble, md_assemble,
md_begin, arm_parse_extension, arm_parse_cpu, arm_parse_arch,
arm_parse_fpu, arm_parse_float_abi, aeabi_set_public_attributes,
s_arm_cpu, s_arm_arch, s_arm_fpu): Use macros for accessing CPU
feature flags.
(arm_legacy_option_table, arm_option_cpu_value_table): New types.
(arm_opts): Move old cpu/arch options from here...
(arm_legacy_opts): ... to here.
(md_parse_option): Search arm_legacy_opts.
(arm_cpus, arm_archs, arm_extensions, arm_fpus)
(arm_float_abis, arm_eabis): Make const.
* include/opcode/arm.h: Use ARM_CPU_FEATURE.
(ARM_AEXT_*, FPU_ENDIAN_PURE, FPU_VFP_HARD): New.
(arm_feature_set): Change to a structure.
(ARM_CPU_HAS_FEATURE, ARM_MERGE_FEATURE_SETS, ARM_CLEAR_FEATURE,
ARM_FEATURE): New macros.
Corinna Vinschen [Tue, 31 Jan 2006 08:56:22 +0000 (08:56 +0000)]
* dir.cc (readdir_worker): Add comment about writing old 32 bit d_ino.
* include/cygwin/version.h: Bump API minor number to 152.
(CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO): Remove.
Corinna Vinschen [Mon, 30 Jan 2006 10:30:58 +0000 (10:30 +0000)]
* fhandler_disk_file.cc (d_cachepos): Rename from d_pos to distinct
clearly from __d_position. Change throughout.
(fhandler_disk_file::rewinddir): Reset readdir cache on NT.
Corinna Vinschen [Sun, 29 Jan 2006 12:23:44 +0000 (12:23 +0000)]
* fhandler.h (class fhandler_socket): Add saw_reuseaddr status flag.
* fhandler_socket.cc (fhandler_socket::bind): Set socket to
SO_EXCLUSIVEADDRUSE if application didn't explicitely set SO_REUSEADDR
socket option, on systems supporting SO_EXCLUSIVEADDRUSE.
* net.cc (cygwin_setsockopt): Set fhandler's saw_reuseaddr status flag
if SO_REUSEADDR socket option has been successsfully set.
* wincap.h (wincaps::has_exclusiveaddruse): New element.
* wincap.cc: Implement above element throughout.
Corinna Vinschen [Sat, 28 Jan 2006 13:41:22 +0000 (13:41 +0000)]
* fhandler_disk_file.cc (DIR_NUM_ENTRIES): New define determining
minimum number of dir entries which fit into the readdir cache.
(DIR_BUF_SIZE): Define globally as size of readdir cache.
(struct __DIR_cache): New structure used for readdir caching on NT.
(d_dirname): Accessor for struct __DIR_cache, use throughout.
(d_pos): Ditto.
(d_cache): Ditto.
(fhandler_disk_file::opendir): Allocate __d_dirname to contain readdir
cache on NT.
(fhandler_disk_file::readdir): Use buf as pointer into readdir cache.
Implement readdir caching.
Corinna Vinschen [Fri, 27 Jan 2006 21:50:42 +0000 (21:50 +0000)]
* autoload.cc (NtQueryDirectoryFile): Define.
* dir.cc (__opendir_with_d_ino): Just call opendir.
(opendir): Remove CYGWIN_VERSION_CHECK_FOR_NEEDS_D_INO handling.
(readdir_worker): Only try generating d_ino if it's 0.
Utilize namehash of directories fhandler. Call readdir_get_ino to
generate d_ino for "..".
(seekdir64): Keep dirent_set_d_ino flag.
* fhandler.h (enum dirent_states): Add dirent_get_d_ino.
(class fhandler_disk_file): Declare new private methods readdir_helper
and readdir_9x.
* fhandler_disk_file.cc (path_conv::hasgood_inode): New method to
evaluate if a filesystem has reliable inode numbers.
(fhandler_base::fstat_by_handle): Accomodate structure member name
change from IndexNumber to FileId.
(fhandler_base::fstat_helper): Call hasgood_inode here.
(fhandler_disk_file::opendir): Call fhaccess only for real files.
Don't append '*' to __d_dirname here, move to readdir_9x. On NT,
open directory handle here. Set dirent_get_d_ino and dirent_set_d_ino
flags according to wincap and filesystem.
(fhandler_disk_file::readdir_helper): New method to implement readdir
postprocessing only once.
(readdir_get_ino_by_handle): New static function.
(readdir_get_ino): New function to centralize inode number evaluation
in case inode number hasn't been returned by NtQueryDirectoryFile.
(fhandler_disk_file::readdir): Move old functionality to readdir_9x.
Call readdir_9x when on 9x/Me. Implement NT specific readdir here.
(fhandler_disk_file::readdir_9x): Move 9x specific readdir here.
(fhandler_disk_file::seekdir): Accomodate new NT readdir method.
(fhandler_disk_file::closedir): Ditto.
(fhandler_cygdrive::fstat): Set d_ino to namehash. Add comment.
(fhandler_cygdrive::opendir): Call get_namehash to prepare later
correct evaluation of d_ino.
(fhandler_cygdrive::readdir): Replace recursion with loop. Evaluate
drive's d_ino by calling readdir_get_ino.
* fhandler_proc.cc (fhandler_proc::readdir): Set dirent_saw_dot and
dirent_saw_dot_dot to avoid seeing . and .. entries twice.
* fhandler_process.cc (fhandler_process::readdir): Ditto.
* fhandler_registry.cc (fhandler_registry::readdir): Ditto.
* ntdll.h (STATUS_INVALID_PARAMETER): New define.
(STATUS_INVALID_LEVEL): New define.
(struct _FILE_INTERNAL_INFORMATION): Rename member IndexNumber to
FileId (as in Nebbitt).
* path.h (path_conv::hasgood_inode): Now implemented in
fhandler_disk_file.cc.
* wincap.h (wincaps::has_fileid_dirinfo): New element.
* wincap.cc: Implement above element throughout.
* winsup.h (readdir_get_ino): Add declaration.
* include/sys/dirent.h (struct dirent): Slightly rename structure
members to accomodate changes.
Remove __USE_EXPENSIVE_CYGWIN_D_INO handling and declaration of
__opendir_with_d_ino.
* faq-programming.xml (faq.programming.ipc): Add new FAQ about
cygserver and its relation to the "Bad system call" error.
* faq-setup.xml (faq.setup.uninstall-all): Mention postgresql.
* overview2.sgml: Update security info on shared memory.
Paolo Bonzini [Thu, 26 Jan 2006 18:56:02 +0000 (18:56 +0000)]
2006-01-16 Paolo Bonzini <bonzini@gnu.org>
* configure.in: Set with_gnu_as, with_gnu_ld, with_newlib earlier.
Set md_exec_prefix. Use ACX_CHECK_INSTALLED_TARGET_TOOL to find
the assembler, linker and binutils.
* configure: Regenerate.
config:
2006-01-16 Paolo Bonzini <bonzini@gnu.org>
* acx.m4 (NCN_STRICT_CHECK_TARGET_TOOLS): Test $with_build_time_tools.
(ACX_PATH_SEP): New.
(ACX_TOOL_DIRS): Move here from the gcc directory.
(ACX_CHECK_INSTALLED_TARGET_TOOL): New.
(GCC_TARGET_TOOL): Do not use a host tool if we found a target tool
with a complete path in either $with_build_time_tools or $exec_prefix.
* faq-programming.xml (faq.programming.building-cygwin): Add
list of packages required for building and exact check instructions.
* faq-setup.xml (faq.setup.uninstall-service): New instructions
on uninstalling a cygwin service.
(faq.setup.uninstall-all): Reference new service uninstall FAQ.
Corinna Vinschen [Tue, 24 Jan 2006 17:40:55 +0000 (17:40 +0000)]
* fhandler_process.cc (fhandler_process::fill_filebuf): Disable
stripping the .exe suffix from the link target in PROCESS_EXE and
PROCESS_EXENAME case.
* path.cc (realpath): Tack on .exe suffix if necessary.
Jeff Johnston [Tue, 24 Jan 2006 17:24:02 +0000 (17:24 +0000)]
2006-01-24 Jeff Johnston <jjohnstn@redhat.com>
* acinclude.m4: Add nodefine to AM_INIT_AUTOMAKE macro invocation
so as not to define PACKAGE and VERSION in newlib.h.
* aclocal.m4: Regenerated.
* configure: Ditto.
* newlib.hin: Ditto.
* include/cygwin/version.h: Bump API minor number to 151.
* dir.cc (__opendir_with_d_ino): New function.
(opendir): Set flag if we should be calculating inodes.
(readdir_worker): Calculate d_ino by calling stat if the user has asked for it.
(seekdir64): Maintain all persistent flag settings.
* fhandler.h (dirent_states): Add dirent_set_d_ino.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Reflect changes to
dirent structure.
* fhandler_virtual.cc (fhandler_virtual::opendir): Ditto.
* include/sys/dirent.h (struct dirent): Coalesce two similar structures.
Remove all threads of the apparently highly confusing references to inodes.
Add support for calculating a real inode if __USE_EXPENSIVE_CYGWIN_D_INO is
defined.
Corinna Vinschen [Fri, 20 Jan 2006 10:22:38 +0000 (10:22 +0000)]
* fhandler_socket.cc (fhandler_socket::prepare): Fix debug output.
(fhandler_socket::release): Add debug output for WSAEventSelect failure.
(fhandler_socket::ioctl): Always cancel WSAEventSelect before switching
to blocking mode. Only set nonblocking flag if ioctlsocket call
succeeded. Only print new socket state if ioctlsocket call succeeded.
* dir.cc (readdir_worker): Fill in invalid fields with -1. Accommodate name
change from __ino32 to __invalid_ino32.
* include/sys/dirent.h (__invalid_ino32): Rename from __ino32. Don't define
unused d_type macros.
Corinna Vinschen [Wed, 18 Jan 2006 18:24:33 +0000 (18:24 +0000)]
* autoload.cc (rresvport): Remove.
* net.cc (last_used_rrecvport): New global shared variable.
(cygwin_rresvport): Implement rresvport without using rresvport from
wsock32.
Corinna Vinschen [Sun, 15 Jan 2006 09:29:02 +0000 (09:29 +0000)]
* Makefile.in (cygcheck.exe): Do not link against libwininet.a.
* cygcheck.cc (pInternetCloseHandle): Define global function pointer.
(display_internet_error): Use it.
(package_grep): Attempt to load wininet.dll at runtime. Call WinInet
API through function pointers throughout.
Corinna Vinschen [Fri, 13 Jan 2006 13:39:05 +0000 (13:39 +0000)]
* cygcheck.cc (dump_sysinfo): Convert osname to const and remove casts
in subsequent assignments. Recognize Longhorn/Vista and report as not
yet supported. Recognize when running under WOW64 and report native
CPU type. Slightly rearrange \n printing.
Corinna Vinschen [Fri, 13 Jan 2006 10:18:31 +0000 (10:18 +0000)]
* net.cc (cygwin_setsockopt): Ignore errors when setting IP_TOS on
Windows 2000 and above. Clarify the comment about IP_TOS and move
to the place where the magic happens.
(get_ifconf): Remove unused code.
* wincap.h (wincaps::has_disabled_user_tos_setting): New element.
* wincap.cc: Implement above element throughout.
* fhandler.h (set_console_state_for_spawn): Whackamole the argument back to a
bool.
* spawn.cc (spawn_guts): Ditto, i.e., once again call
set_console_state_for_spawn with an indication of whether we're about to start
a cygwin process.
* fhandler_console.cc (set_console_state_for_spawn): Don't set the console
state if we know we're starting a cygwin process or if we're using a "real"
tty.
Corinna Vinschen [Tue, 10 Jan 2006 18:11:32 +0000 (18:11 +0000)]
* dcrt0.cc (dll_crt0_0): Remove call to wincap.init.
* init.cc (dll_entry): Rename is_wow64_proc to wow64_test_stack_marker.
Call wincap.init here before doing anything else. Use wincap.is_wow64
to determine if we're running in a WOW64 emulator.
* mmap.cc (MapViewNT): Don't use AT_ROUND_TO_PAGE in WOW64, it's
apparently not supported.
(mmap64): Don't create mappings beyond EOF, which would need to use
AT_ROUND_TO_PAGE, on WOW64.
* wincap.cc (wincap): Throw into the .cygwin_dll_common section.
(wincapc::init): Determine if running in WOW64 and set wow_64 flag.
* wincap.h (class wincapc): Add wow64 member.
(wincapc::is_wow64): New method.
Jeff Johnston [Tue, 10 Jan 2006 16:51:58 +0000 (16:51 +0000)]
2006-01-10 Jeff Johnston <jjohnstn@redhat.com>
* libm/mathfp/s_frexp.c: Check for special values on
the original input, not the manipulated output value.
* libm/mathfp/sf_frexp.c: Ditto.
* libm/mathfp/s_atangent.c: Don't use local value branch
when checking for quadrant.
* libm/mathfp/sf_atangent.c: Ditto.