* cygheap.cc (cygheap_user::~cygheap_user): Remove unneeded if 0'ed code.
* fhandler_registry.cc (fhandler_registry::exists): Recode goto as if/else to
avoid a gcc4 compiler warning.
(fhandler_registry::open): Ditto. Use one goto rather than two.
* gentls_offsets: Fix compiler warning in generated output.
* tlsoffsets.h: Regenerate.
* mount.cc (fillout_mntent): slashify native paths returned via getmntent.
* libc/include/sys/features.h: Set RTEMS's _POSIX_MONOTONIC_CLOCK to
200112L (SUSv3 compliance).
Comment out RTEMS's _POSIX_SHARED_MEMORY_OBJECTS (Unsupported).
Jeff Johnston [Wed, 10 Dec 2008 21:27:58 +0000 (21:27 +0000)]
2008-12-10 Joseph Myers <joseph@codesourcery.com>
* libc/include/stdint.h (INT32_MIN, INT32_MAX, UINT32_MAX,
INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX): Define to
constants with "long" types where appropriate.
(INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN,
INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX,
UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX):
Correct to match logic for defining corresponding types.
(INTMAX_MAX, INTMAX_MIN, UINTMAX_MAX): Define.
(SIZE_MAX): Define using __SIZE_MAX__ if available.
(PTRDIFF_MAX): Define using __PTRDIFF_MAX__ if available.
(PTRDIFF_MIN): Define in terms of PTRDIFF_MAX.
(WCHAR_MAX, WCHAR_MIN, WINT_MAX, WINT_MIN): Define.
(UINT8_C, UINT16_C): Define to give signed values if corresponding
types would promote to int.
* fhandler_registry.cc (encode_regname): Add Parameter add_val.
Append "%val" if add_val is set.
(decode_regname): Remove trailing "%val". Change returncode accordingly.
(__DIR_hash): New class.
(d_hash): New macro.
(key_exists): New function.
(fhandler_registry::exists): Remove encode of registry name before path
compare, decode file part of path instead. Skip checks for keys if
trailing "%val" detected.
(fhandler_registry::fstat): Change check of return value of
decode_regname ().
(fhandler_registry::readdir): Allocate __DIR_hash. Record key names in
hash table. Append "%val" if key with same name exists. Fix error
handling of encode_regname (). Set dirent.d_type.
(fhandler_registry::closedir): Delete __DIR_hash.
(fhandler_registry::open): Don't open key if trailing "%val" detected
by decode_regname ().
(open_key): Ditto.
* libc/minires.c (open_sock): Set non blocking and close on exec.
(res_ninit): Set id pseudo-randomly.
(res_nsend): Do not set close on exec. Initialize server from id.
Flush socket. Tighten rules for answer acceptance.
(res_nmkquery): Update id using current data.
Nick Clifton [Wed, 3 Dec 2008 14:50:56 +0000 (14:50 +0000)]
include/elf/
* common.h (STT_IFUNC): Define.
elfcpp/
* elfcpp.h (enum STT): Add STT_IFUNC.
bfd/
* syms.c (struct bfd_symbol): Add new flag BSF_INDIRECT_FUNCTION.
Remove redundant flag BFD_FORT_COMM_DEFAULT_VALUE. Renumber flags
to remove gaps.
(bfd_print_symbol_vandf): Return 'i' for BSF_INDIRECT_FUNCTION.
(bfd_decode_symclass): Likewise.
* elf.c (swap_out_syms): Translate BSF_INDIRECT_FUNCTION into
STT_IFUNC.
(elf_find_function): Treat STT_IFUNC in the same way as STT_FUNC.
(_bfd_elf_is_function_type): Likewise.
* elf32-arm.c (arm_elf_find_function): Likewise.
(elf32_arm_adjust_dynamic_symbol): Likewise.
(elf32_arm_swap_symbol_in): Likewise.
(elf32_arm_additional_program_headers): Likewise.
* elf32-i386.c (is_indirect_symbol): New function.
(elf_i386_check_relocs): Also generate dynamic relocs for
relocations against STT_IFUNC symbols.
(allocate_dynrelocs): Likewise.
(elf_i386_relocate_section): Likewise.
* elf64-x86-64.c (is_indirect_symbol): New function.
(elf64_x86_64_check_relocs): Also generate dynamic relocs for
relocations against STT_IFUNC symbols.
(allocate_dynrelocs): Likewise.
(elf64_x86_64_relocate_section): Likewise.
* elfcode.h (elf_slurp_symbol_table): Translate STT_IFUNC into
BSF_INDIRECT_FUNCTION.
* elflink.c (_bfd_elf_adjust_dynamic_reloc_section): Add support
for STT_IFUNC symbols.
(get_ifunc_reloc_section_name): New function.
(_bfd_elf_make_ifunc_reloc_section): New function.
* elf-bfd.h (struct bfd_elf_section_data): Add indirect_relocs field.
* bfd-in2.h: Regenerate.
gas/
* config/obj-elf.c (obj_elf_type): Add support for STT_IFUNC type.
* doc/as.texinfo: Document new feature.
* NEWS: Mention new feature.
gas/testsuite/
* gas/elf/type.s: Add test of STT_IFUNC symbol type.
* gas/elf/type.e: Update expected disassembly.
* gas/elf/elf.exp: Update grep of symbol types.
ld/
* NEWS: Mention new feature.
* pe-dll.c (process_def_file): Replace use of redundant
BFD_FORT_COMM_DEFAULT_VALUE with 0.
* scripttempl/elf.sc: Add .rel.ifunc.dyn and .rela.ifunc.dyn
sections.
ld/testsuite/
* ld-mips-elf/reloc-1-n32.d: Updated expected output for reloc
descriptions.
* ld-mips-elf/reloc-1-n64.d: Likewise.
* ld-i386/ifunc.d: New test.
* ld-i386/ifunc.s: Source file for the new test.
* ld-i386/i386.exp: Run the new test.
* fhandler_registry.cc (must_encode): New function.
(encode_regname): Ditto.
(decode_regname): Ditto.
(fhandler_registry::exists): Encode name before path compare.
(fhandler_registry::fstat): Pass decoded name to win32 registry call.
(fhandler_registry::readdir): Return encoded name to user.
(fhandler_registry::open): Store decoded name into value_name.
(open_key): Pass decoded name to win32 registry call.
* ntsec.sgml: Further changes for 1.7. Switch from "NT" to "Windows".
Add preliminary text. Try to be more clear in description. Remove
useless chapters. Finish the permission related chapters.
Remove unneeded whitespace.
* fhandler_fifo.cc (fhandler_fifo::open): Rework to cause errno to be set to
ENXIO when opening a fifo write/nonblocking.
* environ.cc (ucreqenv): Rename to ucenv. Move code from old ucenv here and
conditionalize it on create_upcaseenv.
(ucenv): Delete.
(environ_init): Fix compiler warning by moving create_upcaseenv test to ucenv.
Don't bother checking for child_proc_info when calling ucenv since it is
assumed to be NULL at the point where the function is called.
* path.cc (symlink_worker): Turn off MS-DOS path warnings when dealing with
devices since the device handler passes in a translated MS-DOS path.
* sec_auth.cc (lsaprivkeyauth): Avoid variable initialization which causes a
compiler error.
* fhandler_netdrive.cc: Update copyright.
Corinna Vinschen [Wed, 26 Nov 2008 10:19:09 +0000 (10:19 +0000)]
* passwd.c (longopts): Add --reg-store-pwd option.
(opts): Add -R option.
(usage): Add text for -R/--reg-store-pwd option.
(main): Fix size of local user and password string arrays.
Handle -R option.
* utils.sgml: Add text for passwd -R/--reg-store-pwd option.
Corinna Vinschen [Wed, 26 Nov 2008 10:18:53 +0000 (10:18 +0000)]
* Makefile.in (OBJS): Add setpwd.o.
* README: Explain new service to store passwords in the LSA registry
area.
* bsd_helper.cc (get_token_info): Make externally available.
* bsd_helper.h (get_token_info): Declare.
* client.cc (client_request::handle_request): Add case for
CYGSERVER_REQUEST_SETPWD request.
* setpwd.cc: New file implementing the CYGSERVER_REQUEST_SETPWD
request.
Corinna Vinschen [Wed, 26 Nov 2008 10:18:10 +0000 (10:18 +0000)]
* Makefile.in (DLL_OFILES): Add setlsapwd.o.
* cygserver.h (CYGWIN_SERVER_VERSION_API): Bump.
(request_code_t): Define CYGSERVER_REQUEST_SETPWD request type.
* cygserver_msg.h (client_request_msg::retval): Use default value of -1
for retval if msglen is 0.
* cygserver_sem.h (client_request_sem::retval): Ditto.
* cygserver_shm.h (client_request_shm::retval): Ditto.
* cygserver_setpwd.h: New file.
* external.cc (cygwin_internal): Implement new CW_SET_PRIV_KEY type.
* sec_auth.cc (open_local_policy): Make externally available.
Get ACCESS_MASK as argument.
(create_token): Accommodate change to open_local_policy.
(lsaauth): Ditto.
(lsaprivkeyauth): New function fetching token by retrieving
password stored in Cygwin or Interix LSA private data area and
calling LogonUser with it.
* security.h (lsaprivkeyauth): Declare.
(open_local_policy): Declare.
* setlsapwd.cc: New file implementing setting LSA private data password
using LsaStorePrivateData or by calling cygserver if available.
* syscalls.cc (seteuid32): Add workaround to get the original token
when switching back to the original privileged user, even if
setgroups group list is still active. Add long comment to explain why.
Call lsaprivkeyauth first, only if that fails call lsaauth or
create_token.
* include/cygwin/version.h: Bump API minor number.
* include/sys/cygwin.h (cygwin_getinfo_types): Add CW_SET_PRIV_KEY.
Alan Modra [Wed, 26 Nov 2008 01:04:12 +0000 (01:04 +0000)]
include/
PR 7047
* bfdlink.h (struct bfd_elf_version_expr): Delete "symbol".
Add "literal".
bfd/
PR 7047
* configure.in: Bump version.
* configure: Regenerate.
* elflink.c (_bfd_elf_link_assign_sym_version): Continue matching
against version nodes when a global match is a wildcard. Similarly
continue matching on local wildcard matches, rather than only
continuing for "*". Have any global wildcard match override a
local wildcard match. Correct logic hiding unversioned symbol.
(bfd_elf_size_dynamic_sections): Update for changes to struct
bfd_elf_version_expr.
ld/
PR 7047
* emultempl/ppc64elf.em (gld${EMULATION_NAME}_new_vers_pattern): Update
for changes to struct bfd_elf_version_expr.
* ldlang.c (lang_vers_match, version_expr_head_hash): Likewise.
(version_expr_head_eq, lang_finalize_version_expr_head): Likewise.
(lang_register_vers_node): Likewise.
(lang_new_vers_pattern): Likewise. Ensure "literal" is set when
no glob chars found in "pattern".
(realsymbol): Correct backslash quote logic.
* ld.texinfo (VERSION): Warn about global wildcards.
* libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
include wchar.h for prototype, remove extraneous includes, use
C99/POSIX ULLONG_MAX (but allow for poor limits.h).
* libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
base value check noted above), remove extraneous includes.
* libc/stdio/asnprintf.c: Add #include "local.h" to get function
prototype for _svfprintf_r().
* libc/stdio/vasnprintf.c: Ditto.
* libc/stdio/local.h: Add function prototype for __submore().
* libc/include/stdio.h: Add function prototypes for _fseeko_r and
_ftello_r.
* libc/posix/namespace.h: Commented out define for write to
eliminate write() prototype being missing for collate.c (which is
the only file that presently includes namespace.h).
* libc/include/reent.h: Added _rename_r.
* libc/reent/renamer.c: Corrected function prototypes in synopses.
* libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
* libc/stdlib/wcstoull_r.c: Add EINVAL return for bad base value,
include wchar.h for prototype, remove extraneous includes, use
C99/POSIX ULLONG_MAX (but allow for poor limits.h).
* libc/stdlib/wcstoull.c: Fix usage comments (mistakes and to add
base value check noted above), remove extraneous includes.
* libc/stdio/asnprintf.c: Add #include "local.h" to get function
prototype for _svfprintf_r().
* libc/stdio/vasnprintf.c: Ditto.
* libc/stdio/local.h: Add function prototype for __submore().
* libc/include/stdio.h: Add function prototypes for _fseeko_r and
_ftello_r.
* libc/posix/namespace.h: Commented out define for write to
eliminate write() prototype being missing for collate.c (which is
the only file that presently includes namespace.h).
* libc/include/reent.h: Added _rename_r.
* libc/reent/renamer.c: Corrected function prototypes in synopses.
* libc/locale/ldpart.c: Use struct stat64 when calling fstat64.
* config/tc-xtensa.c (check_t1_t2_reads_and_writes): Call
xtensa_state_is_shared_or to allow multiple opcodes within a
single FLIX bundle to write to these special states.
Corinna Vinschen [Fri, 21 Nov 2008 13:46:17 +0000 (13:46 +0000)]
* fhandler_floppy.cc (fhandler_dev_floppy::raw_read): Drop
initialization of bytes_to_read. Set bytes_to_read to len in
non-buffered case. Call read_bytes correctly with bytes_to_read
instead of len.
Jeff Johnston [Wed, 19 Nov 2008 21:05:31 +0000 (21:05 +0000)]
2008-11-19 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/include/sys/config.h[__mips__]: Don't bother
setting __ATTRIBUTE_IMPURE_PTR__ here.
[__rtems__][__mips__]: No need to undef the __ATTRIBUTE_IMPURE_PTR__
macro anymore.
* libc/include/pthread.h: Remove prototypes for
pthread_attr_getcputime and pthread_attr_setcputime which
were proposed but never approved by the POSIX standard.