Corinna Vinschen [Thu, 12 Nov 2009 14:41:12 +0000 (14:41 +0000)]
* new-features.sgml (ov-new1.7-os): Mention Windows 7 and 2008 R2.
(ov-new1.7-device): Add API get_avphys_pages, get_nprocs,
get_nprocs_conf, and get_phys_pages.
Corinna Vinschen [Wed, 11 Nov 2009 10:12:35 +0000 (10:12 +0000)]
* getfacl.c (print_version): Fix copyright.
(main): Don't reuse local variables confusingly. Don't print any file
information if acl() fails. Improve error message. Always print a
trailing empty line. Set return code to 2 if accessing some file fails.
* path.cc (symlink_info::check_reparse_point): Always check
SubstituteName for volume string to recognize volume mount points.
Reuse subst when calling sys_wcstombs.
* syscalls.cc (rename): Set errno to EBUSY when trying to rename
volume mount points. Explain why.
* fhandler_disk_file.cc (fhandler_base::fstat_helper): Drop all "other"
permissions from st_mode, if the reading the file's security descriptor
failed. Explain why.
* globals.cc (ro_u_scr): New R/O unicode string.
(ro_u_sys): Ditto.
* syscalls.cc (nt_path_has_suffix): Replace with ...
(nt_path_has_executable_suffix): New function checking for explicit
executable suffixes.
(rename): Call nt_path_has_executable_suffix instead of
nt_path_has_suffix. Check oldpath for nt_path_has_executable_suffix
as well to set old_explicit_suffix.
* transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
Check cygwin_internal for returning 0 rather than for != 0.
(transport_layer_pipes::accept): Add debug output.
(transport_layer_pipes::connect): Ditto.
* shared.cc (inst_root_inited): New static bool variable.
(init_installation_root): Set inst_root_inited to true.
(memory_init): Print installation root debug output only if
inst_root_inited is true.
* cygcheck.cc (cygwin_dll_path): New global variable.
(load_cygwin): Fetch cygwin DLL path and store in cygwin_dll_path.
* strace.cc: Full ditto.
* path.cc (read_mounts): First use the path stored in cygwin_dll_path,
if available. Then fall back to fetching own path. Add comment.
Drop printing warnings since they look funny in strace output.
* path.cc (read_mounts): First get installation path from own path.
Check if cygwin1.dll exists in same directory. Only if not, try to
get installation path from setup registry key. Add ample warnings.
* dlfcn.cc (get_full_path_of_dll): Drop enforcing a .dll suffix.
(dlopen): If last path component has no dot, append one to override
automatic .dll suffix in LoadLibrary.
Paul Brook [Mon, 2 Nov 2009 13:44:04 +0000 (13:44 +0000)]
2009-11-02 Paul Brook <paul@codesourcery.com>
ld/testsuite/
* ld-arm/arm-elf.exp: Add new attr-merge-vfp tests.
* ld-arm/attr-merge-vfp-1.d: New test.
* ld-arm/attr-merge-vfp-1r.d: New test.
* ld-arm/attr-merge-vfp-2.d: New test.
* ld-arm/attr-merge-vfp-2r.d: New test.
* ld-arm/attr-merge-vfp-3.d: New test.
* ld-arm/attr-merge-vfp-3r.d: New test.
* ld-arm/attr-merge-vfp-4.d: New test.
* ld-arm/attr-merge-vfp-4r.d: New test.
* ld-arm/attr-merge-vfp-5.d: New test.
* ld-arm/attr-merge-vfp-5r.d: New test.
* ld-arm/attr-merge-vfp-2.s: New test.
* ld-arm/attr-merge-vfp-3.s: New test.
* ld-arm/attr-merge-vfp-3-d16.s: New test.
* ld-arm/attr-merge-vfp-4.s: New test.
* ld-arm/attr-merge-vfp-4-d16.s: New test.
gas/
* doc/c-arm.texi: Document new -mfpu options.
* config/tc-arm.c (fpu_vfp_ext_v3xd, fpu_vfp_fp16, fpu_neon_ext_fma,
fpu_vfp_ext_fma): New.
(NEON_ENC_TAB): Add vfma, vfms, vfnma and vfnms.
(do_vfp_nsyn_fma_fms, do_neon_fmac): New functions.
(insns): Move double precision load/store. Split out double
precision VFPv3 instrucitons. Add VFPv4 instructions.
(arm_fpus): Add VFPv3-FP16, VFPv3xD and VFPv4 variants.
(aeabi_set_public_attributes): Set VFPv4 variants
gas/testsuite/
* gas/arm/attr-mfpu-vfpv4.d: New test.
* gas/arm/attr-mfpu-vfpv4-d16.d: New test.
* gas/arm/neon-fma-cov.d: New test.
* gas/arm/neon-fma-cov.s: New test.
* gas/arm/vfp-fma-inc.s: New test.
* gas/arm/vfp-fma-arm.d: New test.
* gas/arm/vfp-fma-arm.s: New test.
* gas/arm/vfp-fma-thumb.d: New test.
* gas/arm/vfp-fma-thumb.s: New test.
* gas/arm/vfma1.d: New test.
* gas/arm/vfma1.s: New test.
* gas/arm/vfpv3xd.d: New test.
* gas/arm/vfpv3xd.s: New test.
* miscfuncs.h (transform_chars): Declare. Define inline variation here.
* mount.cc (mount_info::from_fstab): Remove extern declaration of
transform_chars.
* path.cc (tfx_chars): Move to strfuncs.cc.
(transform_chars): Ditto.
* strfunc.cc (tfx_chars): Moved here from path.cc.
(transform_chars): Ditto.
(sys_cp_wcstombs): Make UNICODE private use area conversion roundtrip
save for all characters.
(sys_cp_mbstowcs): Ditto, by removing special case for UTF-8 sequences
representing U+f0XX UNICODE chars. Fix typo in comment.
Corinna Vinschen [Sat, 31 Oct 2009 13:24:43 +0000 (13:24 +0000)]
* transport_pipes.h (PIPE_NAME_PREFIX): New define.
(PIPE_NAME_SUFFIX): Ditto.
(class transport_layer_pipes): Convert _pipe_name from char pointer
to wchar_t array.
* transport_pipes.cc (transport_layer_pipes::transport_layer_pipes):
Accommodate the fact that _pipe_name is a wchar_t array, rather than
a char pointer.
(transport_layer_pipes::transport_layer_pipes): Initialize _pipe_name
with variable pipe name based in installation key fetched from Cygwin
DLL.
(transport_layer_pipes::accept): Call CreateNamedPipeW explicitely.
(transport_layer_pipes::connect): Call CreateFileW and WaitNamedPipeW
explicitely.
Corinna Vinschen [Sat, 31 Oct 2009 13:24:06 +0000 (13:24 +0000)]
* cygprops.h: New file.
* dtable.cc (handle_to_fn): Add check for correct installation_key
string in object name for pipes and ttys.
* external.cc (cygwin_internal): Add CW_GET_INSTKEY to allow fetching
the installation_key from cygserver.
* fhandler_fifo.cc (fhandler_fifo::fifo_name): Add installation_key
to fifo name.
* globals.cc: Include cygprops.h.
(_RDATA): Move slightly and add comment.
(cygwin_props): Define.
* mount.cc (mount_info::init): Accommodate the fact that
installation_root is now a global variable in DLL common shared memory,
rather than a member of cygwin_shared.
* pipe.cc (fhandler_pipe::create_selectable): Add installation_key to
pipe name.
* shared.cc (installation_root): Define here for storage in DLL
common shared memory.
(installation_key): Ditto.
(installation_key_buf): Ditto.
(init_installation_root): Convert from shared_info method to ordinary
function. Add initializing installation_key. Invalidate
installation_key depending of value of disable_key property. Add
comment to explain.
(get_shared_parent_dir): Add installation_key to directory name.
(get_session_parent_dir): Ditto.
(shared_info::initialize): Move call to init_installation_root from
here...
(memory_init): ...to here. Add debug output to print installation root
and installation key. Add comment to explain why.
* shared_info.h (SHARED_INFO_CB): Recalculate.
(CURR_SHARED_MAGIC): Ditto.
(class shared_info): Remove definition of installation_root and
declaration of init_installation_root.
(init_installation_root): Declare.
(installation_root): Declare.
(installation_key): Declare.
* uinfo.cc (pwdgrp::load): Accommodate the fact that installation_root
is now a global variable in DLL common shared memory.
* include/cygwin/version.h: Bump API minor number.
(CYGWIN_INFO_INSTALLATIONS_NAME): Add.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_GET_INSTKEY.
Corinna Vinschen [Fri, 30 Oct 2009 19:58:53 +0000 (19:58 +0000)]
* sec_helper.cc (security_descriptor::free): If sd_size is 0, call
LocalFree instead of ::free.
* sec_acl.cc: Throughout replace old ACE flag definitions with current
definitions as used in MSDN man pages.
* security.cc: Ditto.
* fhandler.cc (fhandler_base::open): Make sure file has really been
just created before fixing file permissions. Add S_JUSTCREATED
attribute to set_file_attribute call.
* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Always create dir
with default security descriptor and fix descriptor afterwards.
Add S_JUSTCREATED flag to set_file_attribute call.
* fhandler_socket.cc (fhandler_socket::bind): Ditto for AF_LOCAL
socket files.
* path.cc (symlink_worker): Ditto for symlinks.
* security.cc (get_file_sd): Call GetSecurityInfo rather than
NtQuerySecurityObject. Explain why. Change error handling accordingly.
(alloc_sd): Skip non-inherited, non-standard entries in ACL if
S_JUSTCREATED attribute is set. Explain why. Minor format fixes.
* security.h (S_JUSTCREATED): New define.
(security_descriptor::operator=): New operator.
Corinna Vinschen [Fri, 30 Oct 2009 09:02:30 +0000 (09:02 +0000)]
* smallprint.cc (hex_str): New const string.
(__rn): Drop str and use hex_str instead.
(__small_vsprintf): If 'l' modifier has been found, print subsequent
multibyte or wide char string using the s, S, or W options in extended
hex value layout.
* fhandler_disk_file.cc (fhandler_disk_file::readdir): Print WCHAR
and resulting multibyte filename in extended hex value layout in
debug output.
Corinna Vinschen [Fri, 30 Oct 2009 08:26:41 +0000 (08:26 +0000)]
* libc/stdio/fflush.c (_fflush_r): Store old errno to check for
low-level seek error condition. Restore old errno in case of
success. Don't use new position after seek as error condition,
rather check for return value of -1 and errno. Handle EINVAL
just like ESPIPE. Only set fp->_offset if errno is 0.
Nick Clifton [Mon, 26 Oct 2009 10:05:23 +0000 (10:05 +0000)]
newlib:
* configure.host: Add support for RX architecture.
* libc/include/machine/ieeefp.h: Likewise.
* libc/include/machine/setjmp.h: Likewise.
* libc/include/machine/configure.in: Likewise.
* libc/include/machine/configure: Regenerate.
* libc/machine/rx: New directory.
* libc/machine/rx/*: New files to support RX architecture.
libgloss:
* configure.in: Add support for RX sub-directory.
* configure: Regenerate.
* rx: New directory.
* rx/*: New files to support RX architecture.
Eric Blake [Sat, 24 Oct 2009 13:24:29 +0000 (13:24 +0000)]
Fix isalpha(0x100000001LL) and friends on 64-bit machines.
* libc/include/ctype.h (__ctype_lookup): New macro.
(isalpha, isupper, islower, isdigit, isxdigit, isspace, ispunct)
(isalnum, isprint, isgraph, iscntrl, isblank): Use it to fix bug
on 64-bit machines.
include/opcode/
* cgen-bitset.h: Delete, moved to ../cgen/bitset.h.
* cgen.h: Update. Improve multi-inclusion macro name.
include/cgen/
* basic-modes.h: New file. Moved here from opcodes/cgen-types.h.
* basic-ops.h: New file. Moved here from opcodes/cgen-ops.h.
* bitset.h: New file. Moved here from ../opcode/cgen-bitset.h.
Update license to GPL v3.
Jeff Johnston [Tue, 20 Oct 2009 16:44:11 +0000 (16:44 +0000)]
2009-10-16 Jeff Johnston <jjohnstn@redhat.com>
* libc/include/sys/config.h[__CYGWIN__]: Set __USE_XOPEN2K flag
if not __STRICT_ANSI__ or stdc version C99 or greater.
* libc/include/stdio.h[__STRICT_ANSI__]: Add __USE_XOPEN2K check
for fseeko and ftello prototypes.
Corinna Vinschen [Thu, 15 Oct 2009 11:40:02 +0000 (11:40 +0000)]
* cygpath.cc (get_special_folder): Fetch path as WCHAR and convert
using my_wcstombs.
(get_user_folder): Remove.
(do_sysfolders): Use get_special_folder instead of get_user_folder.
Fetch system paths as WCHAR and convert using my_wcstombs.
Corinna Vinschen [Tue, 13 Oct 2009 10:23:31 +0000 (10:23 +0000)]
* include/sys/cygwin.h: Add new cygwin_getinfo_type
CW_SET_EXTERNAL_TOKEN.
Add new enum CW_TOKEN_IMPERSONATION, CW_TOKEN_RESTRICTED.
* cygheap.h (cyguser): New flags ext_token_is_restricted,
curr_token_is_restricted and setuid_to_restricted.
* external.cc (cygwin_internal): Add CW_SET_EXTERNAL_TOKEN.
* sec_auth.cc (set_imp_token): New function.
(cygwin_set_impersonation_token): Call set_imp_token ().
* security.h (set_imp_token): New prototype.
* spawn.cc (spawn_guts): Use CreateProcessAsUserW if restricted token
was enabled by setuid(). Do not create new window station in this case.
* syscalls.cc (seteuid32): Add handling of restricted external tokens.
Set HANDLE_FLAG_INHERIT for primary token.
(setuid32): Set setuid_to_restricted flag.
* uinfo.cc (uinfo_init): Do not reimpersonate if restricted token was
enabled by setuid (). Initialize user.*_restricted flags.
Eric Blake [Tue, 13 Oct 2009 02:26:33 +0000 (02:26 +0000)]
Improve clock_gettime and utimensat resolution.
* hires.h (hires_ms): Change initime_us to initime_ns, with 10x
more resolution.
(hires_ms::nsecs): New prototype.
(hires_ms::usecs, hires_ms::msecs, hires_ms::uptime): Adjust.
* times.cc (systime_ns): New helper function.
(hires_ms::prime): Use it for more resolution.
(hires_ms::usecs): Change to...
(hires_ms::nsecs): ...with more resolution.
(clock_gettime): Use more resolution.
(systime): Rewrite in terms of systime_ns.
(timespec_to_filetime): Rewrite math to reflect true operation.
* fhandler_disk_file.cc (utimens_fs): Use higher resolution.
* libc/locale/locale.c (DEFAULT_LOCALE): New define.
(__default_locale): New global variable set to the default locale.
(__get_locale_env): Return __default_locale rather than fixed "C".
Jeff Johnston [Thu, 8 Oct 2009 16:44:10 +0000 (16:44 +0000)]
2009-10-08 Jeff Johnston <jjohnstn@redhat.com>
* configure.host: For RTEMS, define HAVE_ASSERT_FUNC.
* libc/stdlib/assert.c (_assert_func): Do not specify
__assert_func if HAVE_ASSERT_FUNC flag is set.