* winnt.h: Fix several SUBLANG ID errors (ref:
http://msdn.microsoft.com/en-us/library/dd318693(VS.85).aspx).
(SUBLANG_UI_CUSTOM_DEFAULT): 0x05, not 0x03.
(SUBLANG_HAUSA_NIGERIA): Bad ID name, correct one is ...
(SUBLANG_HAUSA_NIGERIA_LATIN): ... this.
(SUBLANG_INUKTITUT_CANADA_LATIN): 0x02, not 0x01.
(SUBLANG_IRISH_IRELAND): 0x02, not 0x01.
(SUBLANG_LAO_LAO_PDR): Bad ID name, correct one is ...
(SUBLANG_LAO_LAO): ... this.
(SUBLANG_LOWER_SORBIAN_GERMANY): 0x02, not 0x01.
(SUBLANG_SAMI_SKOLT_FINLAND): 0x08, not 0x03.
(SUBLANG_SAMI_INARI_FINLAND): 0x09, not 0x03.
(SUBLANG_SYRIAC_SYRIA): define as SUBLANG_SYRIAC (what MSDN mentions).
(SUBLANG_TIGRIGNA_ERITREA): 0x02, not 0x01.
(SUBLANG_BENGALI_INDIA): 0x01, not 0x00.
(SUBLANG_BENGALI_BANGLADESH): 0x02, not 0x01.
(SUBLANG_PUNJABI_INDIA): 0x01, not 0x00.
(SUBLANG_PUNJABI_PAKISTAN): not defined in MSDN.
(SUBLANG_ROMANIAN_ROMANIA): 0x01, not 0x00.
(SUBLANG_ROMANIAN_MOLDOVA): not defined in MSDN.
Corinna Vinschen [Fri, 20 Aug 2010 11:18:58 +0000 (11:18 +0000)]
* fhandler_disk_file.cc (readdir_check_reparse_point): Rename from
is_volume_mountpoint. Return valid d_type value for underlying
reparse point type.
(readdir_get_ino): Don't rely on the handle set in pc.check. Open
file here if pc.handle() is NULL.
(fhandler_disk_file::readdir_helper): Try to set a correct d_type value
more diligent.
(fhandler_disk_file::readdir): Don't reset dirent_set_d_ino unless
we're really sure it's due to an untrusted FS. Simplify usage of
FileAttributes, which is 0 if buf is NULL, anyway. Set d_type
correctly for faked "." and ".." entries. Improve debug output.
* path.cc (symlink_info::check): Don't keep handle to volume mount
point open. Explain why.
Corinna Vinschen [Fri, 20 Aug 2010 08:52:25 +0000 (08:52 +0000)]
* fhandler_disk_file.cc (fhandler_disk_file::fstatvfs): Revert usage
of get_stat_handle () to get_handle (). Add comment to explain why.
* syscalls.cc (statvfs): Drop using PC_KEEP_HANDLE.
Corinna Vinschen [Thu, 19 Aug 2010 10:35:25 +0000 (10:35 +0000)]
* new-features.sgml (ov-new1.7.7): New section.
* pathnames.sgml: Throughout, align style of screen elements.
Throughout, make all emphasis elements bold.
(pathnames-win32-api): Rewrite section.
Corinna Vinschen [Wed, 18 Aug 2010 14:22:07 +0000 (14:22 +0000)]
* exceptions.cc (open_stackdumpfile): Don't try to open file if we
have no filesystem based CWD. Add comment.
* path.cc (cwdstuff::set): Set CWD handle to NULL if CWD is a virtual
path. Simplify matching comment.
Corinna Vinschen [Fri, 13 Aug 2010 11:51:54 +0000 (11:51 +0000)]
* cygheap.h (class cwdstuff): Make drive_length private.
Add "error" member.
(cwdstuff::get_error): New inline method.
(cwdstuff::get_error_desc): Declare.
(cwdstuff::set): Change first parameter to pointer to path_conv.
* path.cc (chdir): Drop doit. Align call to cwdstuff::set to
new arguments.
(cwdstuff::init): Only call cwdstuff::set if it's not already
initialized. Add comment. Drop third parameter in call to
cwdstuff::set.
(cwdstuff::set): Partially rewrite. Add lots of comments to explain
everything. Drop "doit" since it's not used anymore. Always create
new handle to CWD if not in a virtual path. Drop PEB locking when
reading PEB values in init phase. Check for accessibility to set
correct error code. Drop Vista workaround. Never write back into PEB.
Set Win32 CWD to \\?\PIPE\ on init. Simplify creation of win32 path.
Set new error member to a meaningful value.
(cwdstuff::get_error_desc): New method to generate error message
from cwd error code.
* spawn.cc (spawn_guts): Call cwdstuff::get_error_desc to create
more meaningful error message when not being able to start native
Win32 app due to CWD restrictions. When starting native Win32 app,
lock cwd and use in calls to CreateProcessW/CreateProcessAsUserW.
Corinna Vinschen [Wed, 11 Aug 2010 11:01:14 +0000 (11:01 +0000)]
* mount.cc (do_mount): Don't treat "bind" mount as remote mount.
(mount_entries): Drop the "bind" option from output.
* utils.sgml (mount): Match examples to actual mount output. Add
"bind" option and add example.
* cygheap.h (cygheap_fdmanip): Delete fh and use fd index into cygheap->fdtab
throughout.
(cygheap_fdnew): Replace fh by using fd index into cygheap->fdtab throughout.
(cygheap_fdget): Ditto. (cygheap_fdenum): Ditto.
Implement POSIX.1-2004 Monotonic Clock.
* hires.h: Change hires_us to hires_ns, with nanosecond resolution.
(hires_ns::primed_ft): Remove.
(hires_ns::nsecs): New prototype.
(hires_ns::usecs): Rewrite in terms of nsecs.
(hires_ns::resolution): New prototype.
* times.cc: Change hires_us to hires_ns.
(ntod): Declare.
(systime): Remove.
(hires_ns::prime): Increase resolution to nanoseconds.
(hires_ns::nsecs): Rename usecs to nsecs to reflect increased resolution.
Remove justdelta argument.
(hires_ns::resolution): New function.
(clock_gettime): Accept CLOCK_MONOTONIC.
Use EINVAL instead of ENOSYS per POSIX.1-2004.
(clock_getres): Ditto.
(clock_setres): Use EINVAL instead of ENOSYS to conform with other
implementations.
* strace.cc (strace::microseconds): Adjust for hires_ns.
* sysconf.cc (sca): Set _SC_MONOTONIC_CLOCK to _POSIX_MONOTONIC_CLOCK.
* include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* fhandler_proc.cc: Add /proc/filesystems virtual file.
(format_proc_filesystems): New function.
* mount.cc (fs_names): Move to global scope. Redefine as array
of { "name", block_device? } structs.
(fillout_mntent): Use name member of fs_names.
* mount.h (fs_names): New prototype.
* path.cc (cygwin_conv_path): Rearrange test for "." in POSIX to
relative DOS path conversion. Simplify fixing the path.
In CCP_POSIX_TO_WIN_W conversion, always drop long path prefix if path
fits into MAX_PATH. Explain why.
* libm/common/s_lrint.c (lrint): Annotate shift operations with
possible shift amount ranges, and use SAFE_RIGHT_SHIFT to avoid
undefined behaviour.
* libm/common/s_llrint.c (llrint): Likewise.
* libm/common/s_lround.c (lround): Correct some comments on ranges.
* libm/common/s_llround.c (llround): Likewise.
* exceptions.cc (_cygtls::interrupt_now): Revert to checking for "spinning"
when choosing to defer signal.
(_cygtls::call_signal_handler): Grab func when we have the lock.
* gendef: Update copyright.
(__sigbe): Simplify slightly.
(_sigdelayed): Grab a lock before manipulating stuff.
(_cygtls::pop): Properly return popped value.
(stabilize_sig_stack): Set incyg when we have the lock.
* sigproc.cc: Update copyright.
* cygthread.h (LPVOID_THREAD_START_ROUTINE): Define.
(cygthread::create): Rename from cygthread::cygthread.
(cygthread::cygthread): Define new constructor which accepts
LPVOID_THREAD_START_ROUTINE as the first argument. Call cygthread::create.
* cygthread.cc (cygthread::create): Rename from cygthread::cygthread. Use
'arglen' rather than 'n' since 'n' is no longer supplied.
* fhandler_tty.cc (process_input): Define as void/noreturn.
(process_output): Ditto.
(process_ioctl): Ditto.
(fhandler_tty_master::init): Don't "zap_h" cygthreads which are noreturn. It's
now implied.
DJ Delorie [Thu, 29 Jul 2010 18:41:26 +0000 (18:41 +0000)]
[include/opcode]
* rx.h (RX_Operand_Type): Add TwoReg.
(RX_Opcode_ID): Remove ediv and ediv2.
[opcodes]
* rx-decode.opc (SRR): New.
(rx_decode_opcode): Use it for movbi and movbir. Decode NOP2 (mov
r0,r0) and NOP3 (max r0,r0) special cases.
* rx-decode.c: Regenerate.
[sim/rx]
* rx.c (decode_cache_base): New.
(id_names): Remove ediv and edivu.
(optype_names): Add TwoReg.
(maybe_get_mem_page): New.
(rx_get_byte): Call it.
(get_op): Add TwoReg support.
(put_op): Likewise.
(PD, PS, PS2, GD, GS, GS2, DSZ, SSZ, S2SZ, US1, US2, OM): "opcode"
is a pointer now.
(DO_RETURN): New. We use longjmp to return an exception result.
(decode_opcode): Make opcode a pointer to the decode cache. Save
decoded opcode information and re-use. Call DO_RETURN instead of
return throughout. Remove ediv and edivu.
* mem.c (ptdc): New. Adds decode cache.
(rx_mem_ptr): Support it.
(rx_mem_decode_cache): New.
* mem.h (enum mem_ptr_action): add MPA_DECODE_CACHE.
(rx_mem_decode_cache): Declare.
* gdb-if.c (sim_resume): Add decode_opcode's setjmp logic here...
* main.c (main): ...and here. Use a fast loop if neither trace
nor disassemble is given.
* cpu.h (RX_MAKE_STEPPED, RX_MAKE_HIT_BREAK, RX_MAKE_EXITED,
RX_MAKE_STOPPED, RX_EXITED, RX_STOPPED): Adjust so that 0 is not a
valid code for anything.
* configure.host: Compact v850* support and add
check for newlib_may_supply_syscalls.
* libc/sys/sysnecv850/Makefile.am: Add support for
'--disable-newlib-supplied-syscalls' option.
* libc/sys/sysnecv850/Makefile.in: Regenerated.
* dump_setup.cc (tfx_chars): New WCHAR array, copied from Cygwin.
(transform_chars): New function, copied from Cygwin.
(simple_nt_stat): New function to check file existance using native
NT function. Explain why.
(directory_exists): Call simple_nt_stat.
(file_exists): Ditto.
Alan Modra [Tue, 20 Jul 2010 14:08:30 +0000 (14:08 +0000)]
include/elf/
* internal.h (ELF_TBSS_SPECIAL): New macro, extracted from..
(ELF_SECTION_SIZE): ..here.
(ELF_SECTION_IN_SEGMENT_1): Add "strict" arg.
(ELF_SECTION_IN_SEGMENT_STRICT): New macro.
bfd/
* elf.c (assign_file_positions_for_load_sections): Check that
zero size sections are allocated in segments too.
(assign_file_positions_for_non_load_sections): Warn if zero
size alloc sections are found here.
(copy_elf_program_header): Don't drop zero size sections from
segment map.
(copy_private_bfd_data): Check for changes in zero size sections.
binutils/
* readelf.c (process_program_headers): Don't ignore all zero size
sections.
ld/testsuite/
* ld-powerpc/tlsexe.r: Update.
* ld-powerpc/tlsexetoc.r: Update.
* ld-powerpc/tlsso.r: Update.
* ld-powerpc/tlstocso.r: Update.
Dave Korn [Tue, 20 Jul 2010 01:33:05 +0000 (01:33 +0000)]
* libm/common/fdlibm.h (SAFE_LEFT_SHIFT): New macro definition.
(SAFE_RIGHT_SHIFT): Likewise.
* libm/common/s_llround.c (llround): Annotate shift operations with
possible shift amount ranges, and use SAFE_RIGHT_SHIFT to avoid
undefined behaviour.
* libm/common/s_lround.c (lround): Likewise.
Eric Blake [Mon, 19 Jul 2010 18:25:41 +0000 (18:25 +0000)]
Document mkostemp and mkostemps.
* textbinary.sgml (textbin-devel): Document temp file behavior.
(textbin-issue): Use sed rather than cat as an example of a
default-mode application.
* new-features.sgml (ov-new1.7.6): Document mkostemp[s].
* exceptions.cc (_cygtls::interrupt_now): Avoid nonsensical tests which delay
an interrupt.
(setup_handler): Remove unneeded DEBUGGING handling. Ensure that stack is
locked when we are about to do push/pop to it. Fix debugging output.
* gendef: Throughout, remove lock from xchgl since it is implied.
(__ZN7_cygtls3popEv): Avoid potential (but probably nonexistent) race when
clearing element after pop.
Paolo Bonzini [Sun, 18 Jul 2010 08:12:40 +0000 (08:12 +0000)]
2010-07-17 Jack Howarth <howarth@bromo.med.uc.edu>
PR target/44862
* Makefile.tpl (POSTSTAGE1_CXX_EXPORT):
Provide -B option to allow for link spec %s substitutions for
libstdc++.a on darwin.
* Makefile.in: Regenerate.
Chris Sutcliffe [Thu, 8 Jul 2010 23:14:54 +0000 (23:14 +0000)]
2010-07-08 Markus Koenig <basilo@users.sourceforge.net>
* include/gdiplus.h: New file.
* include/gdiplus/gdiplus.h: New file.
* include/gdiplus/gdiplusbase.h: New file.
* include/gdiplus/gdiplusbrush.h: New file.
* include/gdiplus/gdipluscolor.h: New file.
* include/gdiplus/gdipluscolormatrix.h: New file.
* include/gdiplus/gdipluseffects.h: New file.
* include/gdiplus/gdiplusenums.h: New file.
* include/gdiplus/gdiplusflat.h: New file.
* include/gdiplus/gdiplusgpstubs.h: New file.
* include/gdiplus/gdiplusgraphics.h: New file.
* include/gdiplus/gdiplusheaders.h: New file.
* include/gdiplus/gdiplusimageattributes.h: New file.
* include/gdiplus/gdiplusimagecodec.h: New file.
* include/gdiplus/gdiplusimaging.h: New file.
* include/gdiplus/gdiplusimpl.h: New file.
* include/gdiplus/gdiplusinit.h: New file.
* include/gdiplus/gdipluslinecaps.h: New file.
* include/gdiplus/gdiplusmatrix.h: New file.
* include/gdiplus/gdiplusmem.h: New file.
* include/gdiplus/gdiplusmetafile.h: New file.
* include/gdiplus/gdiplusmetaheader.h: New file.
* include/gdiplus/gdipluspath.h: New file.
* include/gdiplus/gdipluspen.h: New file.
* include/gdiplus/gdipluspixelformats.h: New file.
* include/gdiplus/gdiplusstringformat.h: New file.
* include/gdiplus/gdiplustypes.h: New file.
* lib/gdiplus.c: New file containing GDI+ variable definitions
and GUIDs.
* lib/gdiplus.def: New file.
* lib/Makefile.in: Add gdiplus.o to EXTRA_OBJS,
add gdiplus.c to SOURCES.
* lib/test.c: Include gdiplus.h.
* libc/posix/rewinddir.c (rewinddir): Remove incorrect cast to off_t.
* libc/sys/rtems/sys/dirent.h (_seekdir): Add prototype.
* libc/sys/linux/sys/dirent.h (_seekdir): Fix prototype to use long
rather than off_t.
opcodes/
* mips-dis.c (print_mips16_insn_arg): Remove branch instruction
type and delay slot determination.
(print_insn_mips16): Extend branch instruction type and delay
slot determination to cover all instructions.
* mips16-opc.c (BR): Remove macro.
(UBR, CBR): New macros.
(mips16_opcodes): Update branch annotation for "b", "beqz",
"bnez", "bteqz" and "btnez". Add branch annotation for "jalrc"
and "jrc".
Align seekdir and telldir API to POSIX definition.
* Makefile.in (NEW_FUNCTIONS): Remove seekdir and telldir mappings.
* dir.cc (telldir): Move functionality from telldir64 here. Use
long, rather than _off_t.
(telldir64): Just call telldir. Only keep for backward compatibility.
(seekdir): Move functionality from seekdir64 here. Use long, rather
than _off_t.
(seekdir64): Just call seekdir. Only keep for backward compatibility.
* fhandler.h: Throughout, change prototypes of seekdir and telldir
methods to use long, rather than _off64_t.
* fhandler_disk_file.cc: Change aforementioned methods accordingly.
* fhandler_netdrive.cc: Ditto.
* fhandler_registry.cc: Ditto.
* fhandler_virtual.cc: Ditto.
* include/sys/dirent.h (struct __DIR): Change __d_position from
_off_t to long to reflect API change.
(telldir): Change prototype to use long, rather than off_t.
(seekdir): Ditto.
* ldd.cc: Clean up formatting throughout.
(head): Move earlier.
(saw_file): Ditto.
(print_dlls): Reset head here. Record seen dll names so they will not
potentially be printed later.
(process_file): Remove clearing of head here.
* path.cc (path_conv::check): Move fs-specific settings to a point where we
know that we have filled out the filesystem information.
* path.h (path_conv::path_conv): Use consistent initialization for
constructors.
* include/sys/cygwin.h: Define CW_STRERROR.
* include/cygwin/version.h: Bump CYGWIN_VERSION_API_MINOR to 228.
* include/external.h: Implement CW_STRERROR.
* net.cc (cygwin_getsockopt): Make sure SO_PEERCRED is only handled
in level SOL_SOCKET. Workaround a return value regression in Vista
and later. Add comment to explain.
* libc/ctype/ctype_.c (__ctype_ptr): Reinstate definition (guarded by
_NEED_OLD_CTYPE_PTR_DEFINITION) for backwards compatibility with newlib
1.16.0 and earlier.