summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* 2009-08-14 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2009-08-152-3/+7
| | | | * include/_mingw.h: Increment version to 3.16.
* * fhandler_disk_file.cc (fhandler_disk_file::readdir): Fix lengthCorinna Vinschen2009-08-142-1/+6
| | | | check for ".." dir.
* * fhandler_disk_file.cc (fhandler_disk_file::readdir): Change commentCorinna Vinschen2009-08-142-1/+6
| | | | to be fair.
* * fhandler_disk_file.cc (fhandler_disk_file::readdir_helper): RemoveCorinna Vinschen2009-08-142-17/+55
| | | | | | | | ill-advised attempt to optimize "." and ".." handling by checking for specific position in directory listing. Explain why. (fhandler_disk_file.cc (fhandler_disk_file::readdir): Ditto. Special-case opening file on NFS to fetch inode number and add longish comment to explain why.
* * (fhandler_socket::getsockname): Fix length returned for unboundCorinna Vinschen2009-08-143-6/+11
| | | | | | | | AF_LOCAL sockets. (fhandler_socket::getpeername): Ditto. * net.cc (socketpair): Don't set sun_path and peer_sun_path to make sure getsockname and getpeername return the correct values for AF_LOCAL sockets.
* * fhandler_socket.cc (fhandler_socket::accept): Use sizeof ratherCorinna Vinschen2009-08-132-16/+27
| | | | | | | | then constant size. Truncate returned data, but return full address length as per POSIX. (fhandler_socket::getsockname): Truncate returned data, but return full address length as per POSIX. (fhandler_socket::getpeername): Ditto.
* * fhandler.h (class fhandler_socket): Add peer_sun_path member.Corinna Vinschen2009-08-134-24/+94
| | | | | | | | | | | | | | | | | | | (fhandler_socket::set_peer_sun_path): New method. (fhandler_socket::get_peer_sun_path): New method. * fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize peer_sun_path to NULL. (fhandler_socket::~fhandler_socket): Free peer_sun_path if necessary. (fhandler_socket::dup): Duplicate peer_sun_path. (fhandler_socket::accept): Ditto. Return fake unbound peer content and len in case of AF_LOCAL sockets. (fhandler_socket::getsockname): Always use local sockaddr_storage to store socket address and copy over to incoming address. Handle every namelen correctly per POSIX. (fhandler_socket::getpeername): Ditto. Add code path to return correct value for AF_LOCAL sockets. (fhandler_socket::set_peer_sun_path): New method. * net.cc (socketpair): Set peer_sun_path to empty string, just like sun_path.
* * cxx.cc (default_cygwin_cxx_malloc): Enhance commenting.Corinna Vinschen2009-08-136-8/+70
| | | | | | | | | * dll_init.cc (dll_dllcrt0_1): Likewise. * dlfcn.cc (dlopen): Prevent dlopen()'d DLL from installing any cxx malloc overrides. * include/cygwin/cygwin_dll.h (__dynamically_loaded): New variable. * lib/_cygwin_crt0_common.cc (_cygwin_crt0_common): Check it and only install cxx malloc overrides when statically loaded. Extend comments.
* * faq-using.xml (faq.using.bloda): Typofix MacAfee -> McAfee.Dave Korn2009-08-122-1/+5
|
* * fhandler_socket.cc (fhandler_socket::accept): Always use localCorinna Vinschen2009-08-122-18/+16
| | | | | | sockaddr_storage to store peer address and copy over to incoming peer address if available. Truncate data as necessary according to POSIX.
* * mkgroup.c (enum_local_groups): Avoid error message if given groupCorinna Vinschen2009-08-113-3/+24
| | | | | | | name isn't found and return 0 to allow searching to proceed. Always return 0 or 1, not -1. (enum_groups): Avoid error message if given group name isn't found. * mkpasswd.c (enum_users): Ditto.
* * include/limits.h (NGROUPS_MAX): Set to a more sane value.Corinna Vinschen2009-08-113-2/+7
| | | | * include/sys/param.h (NGROUPS): Ditto.
* * spawn.cc (av::fixup): Check shell scripts for executability only onCorinna Vinschen2009-08-102-1/+6
| | | | filesystems/mounts supporting real permissions.
* * dtable.cc (DEV_SOCKET): New static WCHAR string. Name ofCorinna Vinschen2009-08-102-106/+122
| | | | | | | | | | | the native NT socket device. (dtable::init_std_file_from_handle): Remove unused tmp_pathbuf variable. Move check for sockets into FILE_TYPE_PIPE clause. Rely on handle_to_fn having recognized socket, or check if getsockopt works to accommodate NT4 shortcoming. (handle_to_fn): Use tmp_pathbuf for OBJECT_NAME_INFORMATION buffer and simplify code due to that. Check name returned by NtQueryObject for socket device.
* * fhandler_console.cc (create_invisible_console_workaround): Fix size of cmd inChristopher Faylor2009-08-102-1/+6
| | | | the way originally intended.
* * fhandler_console.cc (create_invisible_console_workaround): FixCorinna Vinschen2009-08-102-1/+6
| | | | size of cmd to take spaces into account.
* * mingw: Add fallbacks to search for MinGW components in standardDave Korn2009-08-102-1/+7
| | | | install locations if not found in compiler's $prefix.
* * mount.cc (do_mount): Don't exit, just return.Corinna Vinschen2009-08-092-2/+4
|
* * include/winnls.h (IS_HIGH_SURROGATE, IS_LOW_SURROGATE,Corinna Vinschen2009-08-092-0/+8
| | | | IS_SURROGATE_PAIR): Define.
* * dtable.cc (dtable::init_std_file_from_handle): Fix comment toCorinna Vinschen2009-08-083-19/+19
| | | | | | document change in the Windows 7 workaround. * wincap.cc (wincapc::init): Don't set has_console_handle_problem to false on 32 bit systems.
* 2009-08-08 Danny Smith <dannysmith@users.sourceforge.net>Chris Sutcliffe2009-08-086-3/+32
| | | | | | | | | * include/math.h (__fpclassifyl, __isnan, __isnanf, isnanl, __signbit, __signbitf, __signbitl, sinhf, tanhf, expf, frexpf, ldexpf, hypotf, powf, __fp_unordered_compare): Add prototypes. * include/stdio.h (vsnwprintf): Add prototype. * include/wchar.h (vsnwprintf): Add prototype. * include/unistd.h (ftruncate): Move prototype out of __NO_INLINE__ guard.
* * net.cc (cygwin_getnameinfo): Force setting NI_NUMERICSERV onlyCorinna Vinschen2009-08-062-12/+25
| | | | | on Windows 2003 and earlier, only if the port number doesn't resolve to a well-known service. Change comment accordingly.
* * cygheap.h (cygheap_debug::endh): Delete.Christopher Faylor2009-08-054-25/+33
| | | | | | | | | | | | | | | | | | * debug.cc (lock_debug::acquired): Delete. (lock_debug::lock_debug): Simplify. (lock_debug::unlock): Ditto. (find_handle): Don't set endh here. (add_handle): Add new handle to beginning of the list rather than trying to maintain an end list pointer. (delete_handle): Minor optimization. (mark_closed): Make logic clearer. (verify_handle): Lock handle list before scanning. (setclexec): Ditto. (modify_handle): Ditto. (newh): Don't lock handle list here. Assume caller did this. (mark_closed): Ditto. (close_handle): Remove unneeded #if. * dtable.cc (dtable::dup2): Tweak debug output.
* * path.cc (patch_conv::check): Zero path before setting it.Christopher Faylor2009-08-052-2/+7
|
* * fhandler_socket.cc (fhandler_socket::send_internal): Just use wmem size ifChristopher Faylor2009-08-045-5/+15
| | | | | | | | the length exceeds it. * net.cc (fdsock): Use 65535 as window size, just like the comment says or we run into problems with DuplicateHandle. * path.cc (patch_conv::check): Use set_path to set invalid filename. * path.h (path_conv::path_conv): Ditto.
* * fhandler.h (pdrive_buf): Defensively allocate one extra byte.Christopher Faylor2009-08-042-1/+5
|
* * fhandler.h (fhandler_cygdrive:DRVSZ): New enum.Christopher Faylor2009-08-048-18/+35
| | | | | | | | | | | (pdrive_buf): New place to hold information about cygdrive. * fhandler_disk_file.cc (fhandler_cygdrive::set_drives): Store drive info in pdrive_buf since get_win32_name() could now be too small to hold everything. (fhandler_cygdrive::rewinddir): Reset pdrive to pdrive_buf. (fhandler_cygdrive::closedir): Ditto. * pipe.cc (fhandler_pipe::init): Be more defensive when referencing get_win32_name(). Rework logic which made a copy of the POSIX path and then never used it.
* * sigproc.cc (stopped_or_terminated): Don't return a match when stopsig ==Christopher Faylor2009-08-023-4/+11
| | | | | SIGCONT and not WCONTINUED. * termios.cc (tcsetpgrp): Improve debugging output.
* * cygheap_malloc.h: New file.Christopher Faylor2009-08-019-86/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygheap.h: Remove stuff now included in cygheap_malloc.h and include that file. Make cygheap_init a standard c++ function. Remove unneeded child_info declaration. * path.h: Include cygheap_malloc.h. Remove extra cstrdup declaration. (path_conv): Reorganize to group variables together. (path_conv::path): Make const char *. (path_conv::known_suffix): Ditto. (path_conv::normalized_path): Ditto. (path_conv::path_conv): Reorganize initializers to reflect new element ordering. (path_conv::get_win32): Change return value to const char *. (path_conv::set_path): Move back here from spawn.cc. (parh_conv::modifiable_path): New function. * path.cc (path_conv::add_ext_from_sym): Accommodate const'ness of known_suffixes. (path_conv::set_normalized_path): Ditto for normalized_path. (path_conv::check): Use modifiable_path whereever we need to modify the path element. Use set_path to set the path. (path_conv::~path_conv): Accommodate new const'ness. * spawn.cc (perhaps_suffix): Declare ext as const since that's what is being returned. (path_conv::set_path): Move back to path.h. * winf.f (linebuf): Perform minor cleanup. (linebuf::fromargv): Change second parameter to const. * winf.cc (linebuf::fromargv): Ditto.
* * path.h (path_conv::set_path): Change return value.Christopher Faylor2009-08-013-5/+11
| | | | | * spawn.cc (path_conv::set_path): Return newly set value. (find_exec): Set retval to newly set value when calling set_path.
* * spawn.cc (find_exec): Fix one more path where retval was not set.Christopher Faylor2009-08-012-0/+5
|
* * spawn.cc (find_exec): Stop relying on the ability to set retval to a fixedChristopher Faylor2009-08-012-4/+13
| | | | path_conv buffer and set it on the fly instead.
* * path.h (cstrdup): Fix declaration.Corinna Vinschen2009-07-302-1/+5
|
* * globals.cc (enum exit_states::ES_GLOBAL_DTORS): Delete.Corinna Vinschen2009-07-303-7/+17
| | | | | | | * dcrt0.cc (__main): Schedule dll_global_dtors to run atexit before global dtors. (do_exit): Delete test for ES_GLOBAL_DTORS and call to dll_global_dtors.
* * path.h (class path_conv): Convert path from char array to char *.Corinna Vinschen2009-07-304-44/+65
| | | | | | | | | | | | | | Initialize to NULL in constructors. Drop normalized_path_size member. (path_conv::size): Remove. (path_conv::operator =): Always copy with sizeof path_conv. Always duplicate path on cygheap. (path_conv::set_path): Move implementation to spawn.cc. * path.cc (path_conv::set_normalized_path): Always allocate normalized_path on cygheap. (path_conv::check): Don't work on path, rather allocate THIS_path in TLS and use it throughout. When finished, allocate path on cygheap and copy over. Defer tacking on extension after having copied path. * spawn.cc (path_conv::set_path): Implement here.
* Fix formatting issue with last entryChris Sutcliffe2009-07-301-1/+1
|
* Correct disposition of wchar_t output in printf().Keith Marshall2009-07-292-4/+11
|
* * mount.h (enum fs_info_type): New type.Corinna Vinschen2009-07-283-84/+131
| | | | | | | | | | | | | | | | (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.
* 2009-07-27 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2009-07-282-2/+5
| | | | * mingwex/stdio/pformat.c: Implement better fix for type punned warning.
* Convert to monolithic configuration procedure.Keith Marshall2009-07-2712-8342/+215
|
* * include/winnt.h (FILE_SUPPORTS_HARD_LINKS,Corinna Vinschen2009-07-273-0/+24
| | | | | | | FILE_SUPPORTS_EXTENDED_ATTRIBUTES, FILE_SUPPORTS_OPEN_BY_FILE_ID, FILE_SUPPORTS_USN_JOURNALS): Define. Add comment. * include/ddk/ntifs.h: Ditto. (FILE_SEQUENTIAL_WRITE_ONCE, FILE_SUPPORTS_TRANSACTIONS): Define.
* * posix.sgml (std-notes): Remove obsolete reference to CYGWIN=server.Corinna Vinschen2009-07-272-3/+5
|
* * posix.sgml (std-notes): Add flock restriction.Corinna Vinschen2009-07-262-0/+9
|
* * fhandler_console.cc (set_console_title): Set buffer size toCorinna Vinschen2009-07-252-2/+7
| | | | TITLESIZE + 1. Call sys_mbstowcs with correct destination length.
* * sigproc.h (wait_for_sigthread): Eliminate parameter.Christopher Faylor2009-07-2421-143/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * syscalls.cc (internal_setlocale): Fix typo in GBK codepage.Corinna Vinschen2009-07-242-1/+5
|
* * syscalls.cc (unlink_nt): Ignore sharing violation on NFS. AlignCorinna Vinschen2009-07-242-3/+9
| | | | comments.
* 2009-07-23 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>Chris Sutcliffe2009-07-242-0/+7
| | | | | * msvcrt.def.in: disable time symbol for libmsvcr90.a and libmsvcr90d.a due to complaints that it causes issues.
* 2009-07-23 Jacky Lai <crazyjacky@users.sourceforge.net>Chris Sutcliffe2009-07-242-1/+5
| | | | * mingwex/math/fminf.c: switch to using __isnanf() as opposed to _isnan().
* * mount.h (fs_info::fsn): New member.Corinna Vinschen2009-07-233-3/+28
| | | | | | | | | | (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".