(IMPLEMENT_FS_FLAG): New define.
(class fs_info): Convert filesystem type status flags into an enum
fs_info_type. Add cifs FS. Revert change to has_buggy_open and
has_buggy_fileid_dirinfo. Make them normal; status flags again.
Implement is_FS functions using IMPLEMENT_FS_FLAG.
* mount.cc (fs_info::update): Define MINIMAL_WIN_NTFS_FLAGS and
FS_IS_WINDOWS_NTFS. Add comment. Only test remote filesystems
for "NTFS" once. Add is_cifs check using FS_IS_WINDOWS_NTFS.
Set has_buggy_open flag for SUNWNFS. Set has_buggy_fileid_dirinfo
flag for UNIXFS and all cifs type filesystems. Only check for
caseinsensitivity once.
(fillout_mntent): Create locale fs_names array. Use for setting
_my_tls.locals.mnt_type.
* sigproc.cc (wait_for_sigthread): Ditto. Don't synchronize with wait_sig
after receiving an event that it is ready to go.
(init_sig_pipe): New function.
(wait_sig): Call init_sig_pipe to create pipes for communicating signals to
this process. Don't send sigCONT signal when initializing.
* fork.cc (frok::child): Accommodate wait_for_sigpipe parameter change.
* fhandler.h (fhandler_*::write): Make ssize_t/__stdcall.
(fhandler_*::write_overlapped): Ditto.
(fhandler_*::raw_write): Ditto.
(fhandler_*::readv): Ditto.
(fhandler_*::writev): Ditto.
(fhandler_*::raw_read): Make __stdcall.
* fhandler: Accommodate changes to read/write functions throughout.
* fhandler_clipboard.cc: Ditto.
* fhandler_console.cc: Ditto.
* fhandler_dsp.cc: Ditto.
* fhandler_fifo.cc: Ditto.
* fhandler_mailslot.cc: Ditto.
* fhandler_mem.cc: Ditto.
* fhandler_mem.cc: Ditto.
* fhandler_random.cc: Ditto.
* fhandler_tape.cc: Ditto.
* fhandler_tty.cc: Ditto.
* fhandler_virtual.cc: Ditto.
* fhandler_windows.cc: Ditto.
* fhandler_zero.cc: Ditto.
* syscalls.cc (readv): Use ssize_t as temp variable.
* fhandler.cc (fhandler_base::read): Coerce returned len to signed or it will
never be treated as < 0.
(fhandler_base::wait_overlapped): Minimize calls to GetLastError. Remove
duplicate debugging test. Fix error return.
* fhandler.h (fhandler_fifo::fifo_name): Declare new function.
(fhandler_fifo::close): Ditto.
(fhandler_fifo::dup): Ditto.
(fhandler_fifo::close_on_exec): Ditto.
* fhandler.cc (fhandler_fifo::fifo_name): Define new function.
(FIFO_BUF_SIZE): New define.
(cnp): Ditto.
(fhandler_fifo::open): Rework. Use cnp to open named pipe. Always open write
side as a client. Open dummy client when writing and can't connect.
(wait): Rework. Implement fifo_wait_for_next_client. Handle signals during
connect better. Add new fifo_wait_for_server code which polls
(sigh) waiting for server.
(fhandler_fifo::raw_read): Handle transition states when one client closes and
another is available.
(fhandler_fifo::close): Define.
(fhandler_fifo::dup): Ditto.
(fhandler_fifo::close_on_exec): Ditto.
(fs_info::clear): Clear fsn.
(fs_info::fsname): New read accessor for fsn.
* mount.cc (fs_info::update): Fill in fsn member with lowercased
filesystem name if filesystem is not well-known. Fall back to
"unknown" if filesystem name is missing.
(fillout_mntent): Print filesystem name retrieved in fs_info::update
rather than static string "unknown".
(fhandler_base::del_my_locks): Declare taking a del_lock_called_from
as argument.
* fhandler.cc (fhandler_base::close): Call del_my_locks with "on_close".
(fhandler_base::fixup_after_fork): Call del_my_locks with "after_fork".
(fhandler_base::fixup_after_exec): Call del_my_locks with "after_exec".
* flock.cc (fhandler_base::del_my_locks): Take del_lock_called_from
as argument. Call node->del_my_locks with NULL handle in after_exec
case. Explain why.
of path.cc for usage in mount.
(mount.exe): Add dependency to path-mount.o.
* mount.cc (force): Convert to bool value. Accommodate throughout.
(from_fstab): New function.
(do_mount_from_fstab): New function.
(longopts): Add --all option.
(opts): Add -a option.
(usage): Document -a/--all option.
(main): Handle -a option as well as single parameter.
* path.cc: Add FSTAB_ONLY conditional to allow building path-mount.o.
(mount_table): Remove static storage class.
(max_mount_entry): Ditto.
(root_here): Unused. Remove.
(from_fstab_line): Remove static.
* path.h (struct mnt_t): Define here rather than in path.cc.
(from_fstab_line): Declare.
(mount_table): Declare.
(max_mount_entry): Declare.
* utils.sgml (mount): Document -a/--all option and mounting of single
path from fstab files.
for MVFS. Explain why.
(fhandler_disk_file::utimens): Drop local variables lastaccess and
lastwrite. Copy timestamps right into FILE_BASIC_INFORMATION structure
to avoid copying them twice.
* wincap.cc: Implement above element throughout.
* wchar.h (__sjis_mbtowc): Declare.
(__eucjp_mbtowc): Ditto.
(__gbk_mbtowc): Ditto.
(__kr_mbtowc): Ditto.
(__big5_mbtowc): Ditto.
* syscalls.cc (internal_setlocale): Convert to char * function.
Return parameter by default. Return NULL if request to use a
charset can't be satisfied due to missing codepage support in the
underlying OS. Fix comment.
(setlocale): Store original locale. Restore to original locale if
internal_setlocale returns NULL.
(cygwin-ug-net/cygwin-ug-net-nochunks.html.gz): Ditto.
(cygwin-ug-net/cygwin-ug-net.pdf): Convert to use docbook2pdf.
(cygwin-api/cygwin-api.pdf): Ditto.
* cpu_features.c: replace gcc-specific construct with portable alternative
and match the code a few lines above.
* crt1.c: remove gcc-specific noreturn attribute with mingw alternative
* mingwex/math/cephes_mconf.h mingwex/math/erfl.c mingwex/math/lgamma.c
mingwex/math/lgammal.c mingwex/math/powl.c mingwex/math/sinhl.c
mingwex/math/tanhl.c mingwex/math/tgamma.c mingwex/math/tgammal.c: Based on
the fixes from the mingw-w64 code tree, fixed strict-aliasing issues.