summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * 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".
* * mount.cc (fs_info::update): Revert to open filesystem with access setCorinna Vinschen2009-07-232-5/+16
| | | | to READ_CONTROL. If that fails, try additionally with FILE_READ_DATA.
* * exceptions.cc (handle_exceptions): Set si_addr according toEric Blake2009-07-232-7/+14
| | | | POSIX for SIGSEGV.
* * mount.cc (fs_info::update): Open filesystem with access set to 0.Corinna Vinschen2009-07-222-4/+11
| | | | Explain why.
* * mount.cc: Revert accidental checkin.Corinna Vinschen2009-07-222-1/+5
|
* * path.cc (symlink_info::check): Handle STATUS_NOT_SUPPORTED fromCorinna Vinschen2009-07-222-1/+8
| | | | NtCreateFile just like STATUS_EAS_NOT_SUPPORTED.
* * mount.cc (fillout_mntent): Fix typo (noexec -> notexec).Corinna Vinschen2009-07-222-2/+6
|
* * path.cc (symlink_info::check): Fix typo in comment.Corinna Vinschen2009-07-222-2/+6
|
* * fhandler.h (enum del_lock_called_from): New enumeration.Corinna Vinschen2009-07-224-7/+35
| | | | | | | | | | | (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.
* * dtable.cc (dup2): Correct return value for no-op.Corinna Vinschen2009-07-212-1/+5
|
* * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Add special caseCorinna Vinschen2009-07-212-6/+49
| | | | | | | 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.h (wincaps::has_always_all_codepages): New element.Corinna Vinschen2009-07-205-6/+71
| | | | | | | | | | | | | | | * 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.
* * fork.cc (fork): Create local tmp_pathbuf. Explain why.Corinna Vinschen2009-07-202-0/+9
|
* * exceptions.cc (sig_handle_tty_stop): Set stopsig to SIGCONT when continuing.Christopher Faylor2009-07-185-4/+21
| | | | | | | | (stopped_or_terminated): Honor WCONTINUED. * wait.cc (wait4): Ditto. * include/cygwin/wait.h (WCONTINUED): Define. (__W_CONTINUED): Ditto. (WIFCONTINUED): Ditto.
* * libstdcxx_wrapper.cc (operator delete): Remove stray space inDave Korn2009-07-172-1/+6
| | | | asm name.
* revert erroneous checkinChristopher Faylor2009-07-172-111/+36
|
* * cygtls.cc (_cygtls::init_exception_handler): Test for e, not e->prev or weChristopher Faylor2009-07-175-43/+142
| | | | | | could still end up adding our handler twice. Add comment explaining what we're doing. * dll_init.cc (dll_dllcrt0_1): Clarify comment.
* * cygtls.cc (_cygtls::init_exception_handler): Avoid adding our exceptionChristopher Faylor2009-07-172-0/+8
| | | | handler twice.
* * syscalls.cc (unlink_nt): Just return when a sharing violationCorinna Vinschen2009-07-172-1/+18
| | | | occurs on remote filesystems.
* * globals.cc: Improve comment on R/O UNICODE_STRINGs.Corinna Vinschen2009-07-176-13/+48
| | | | | | | | | | * mount.h (class fs_info): Add is_mvfs bit. * mount.cc (fs_info::update): Recognize MVFS remote filesystem. (fillout_mntent): Reorder filesystem checks for speed. Add mvfs, unixfs, and sunwnfs filesystem types. * path.h (class path_conv): Add fs_is_mvfs method. * path.cc (symlink_worker): On MVFS, always create symlinks as Windows shortcuts. Explain why.
* * syscalls.cc (unlink_nt): First remove the R/O DOS attribute withCorinna Vinschen2009-07-162-11/+32
| | | | | FILE_WRITE_ATTRIBUTES access only, then re-open the file for DELETE. Explain why.
* * fhandler_disk_file.cc (fhandler_disk_file::fchmod): Remove fileCorinna Vinschen2009-07-162-2/+6
| | | | attribute check already done in NtSetAttributesFile.
* * globals.cc: Reorder constant UNICODE_STRINGs for clarity.Corinna Vinschen2009-07-165-68/+81
| | | | | | | | | | | | | * mount.h (fs_info::sttaus): Move filesystem type flags into substructure. Add union to allow simple test for having set any one filesystem type flag. Replace has_buggy_open flag with is_sunwnfs flag. Replace has_buggy_fileid_dirinfo with is_unixfs flag. (fs_info::got_fs): New private method. (fs_info::has_buggy_open): New explicit implementation. (fs_info::has_buggy_fileid_dirinfo): Ditto. * mount.cc (fs_info::update): Optimize filesystem checks for speed. * winsup.h (IMPLEMENT_STATUS_FLAG): Change write accessor to return value just set.
* * fhandler_netdrive.cc (GET_RESOURCE_INFO): Remove.Corinna Vinschen2009-07-152-12/+18
| | | | | | (thread_netdrive): Drop GET_RESOURCE_INFO case. (fhandler_netdrive::exists): Use GET_RESOURCE_OPENENUM info class to check for existance.
* * fhandler_netdrive.cc (fhandler_netdrive::readdir): Remove uselessCorinna Vinschen2009-07-152-1/+5
| | | | alloca.
* * path.cc (cwdstuff::set): Only fix up UNC path in win32 so as notCorinna Vinschen2009-07-152-1/+10
| | | | to overwrite incoming path.
* Throughout avoid having to initialize constant UNICODE_STRINGs.Corinna Vinschen2009-07-1410-75/+98
| | | | | | | | | | | | | | | | | | | | | | * globals.cc: Define constant UNICODE_STRINGs and store in .rdata section. * fhandler_disk_file.cc: Throughout, use readonly UNICODE_STRINGs rather then initializing local UNICODE_STRING variable where applicable. * fhandler_mem.cc (fhandler_dev_mem::open): Ditto. * flock.cc (inode_t::inode_t): Ditto. * mmap.cc: Ditto. * syscalls.cc: Ditto. * mount.cc (fs_info::update): Ditto. * path.cc: Ditto. * ntdll.h (RtlEqualUnicodePathPrefix): Redefine to take prefix as UNICODE_STRING. (RtlEqualUnicodePathSuffix): Redefine to take suffix as UNICODE_STRING. * fhandler_disk_file.cc: Accommodate throughout. * mount.cc (fs_info::update): Ditto. * path.cc (cwdstuff::set): Ditto. * syscalls.cc: Ditto.
* * globals.cc (active_codepage): Remove.Corinna Vinschen2009-07-142-3/+4
|
* * how-spawn-works.txt: Add "out of date" note.Christopher Faylor2009-07-123-1/+7
| | | | * how-vfork-works.txt: Ditto.
* * Makefile.in: Don't do anything special with any RCS directories.Christopher Faylor2009-07-125-3/+15
| | | | | | * ntdll.h (PROCESSINFOCLASS): Remove unneeded trailing comma. * pinfo.cc (_pinfo::dup_proc_pipe): Remove unneeded assignment. * sigproc.cc (sig_send): Don't send signal to myself if this is an exec stub.
* * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Don't useCorinna Vinschen2009-07-122-20/+45
| | | | | FileAllInformation info class since it needs a big buffer. Add a comment.
* * winbase.h (ilockexch): Avoid making 'ret' volatile.Dave Korn2009-07-072-2/+7
| | | | (ilockcmpexch): Likewise.
* * ChangeLog: Assorted minor whitespace fixes in old entries.Dave Korn2009-07-071-11/+11
|
* winsup/ChangeLog:Dave Korn2009-07-0711-21/+314
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.common (COMPILE_CXX): Add support for per-file overrides to exclude $(nostdinc) and $(nostdincxx) from compiler flags. (COMPILE_CC): Likewise for $(nostdinc). winsup/cygwin/ChangeLog: * Makefile.in (DLL_OFILES): Add libstdcxx_wrapper.o (libstdcxx_wrapper_CFLAGS): Add flags for new module. (_cygwin_crt0_common_STDINCFLAGS): Define per-file override. (libstdcxx_wrapper_STDINCFLAGS, cxx_STDINCFLAGS): Likewise. * cxx.cc: Include "cygwin-cxx.h". (operator new): Tweak prototype for full standards compliance. (operator new[]): Likewise. (operator new (nothrow)): New fallback function. (operator new[] (nothrow), operator delete (nothrow), operator delete[] (nothrow)): Likewise. (default_cygwin_cxx_malloc): New struct of pointers to the above, for final last-resort fallback default. * cygwin-cxx.h: New file. (struct per_process_cxx_malloc): Define. (default_cygwin_cxx_malloc): Declare extern. * cygwin.din (__wrap__ZdaPv): Export new wrapper. (__wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv, __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj, __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj, __wrap__ZnwjRKSt9nothrow_t): Likewise. * globals.cc (__cygwin_user_data): Init newly-repurposed 'forkee' field (now 'cxx_malloc') to point to default_cygwin_cxx_malloc. * libstdcxx_wrapper.cc: New file. (__wrap__ZdaPv, __wrap__ZdaPvRKSt9nothrow_t, __wrap__ZdlPv, __wrap__ZdlPvRKSt9nothrow_t, __wrap__Znaj, __wrap__ZnajRKSt9nothrow_t, __wrap__Znwj, __wrap__ZnwjRKSt9nothrow_t): Define wrapper functions for libstdc++ malloc operators and their overrides. * winsup.h (default_cygwin_cxx_malloc): Declare extern. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * include/sys/cygwin.h (struct per_process_cxx_malloc): Forward declare here. (struct per_process::forkee): Rename and repurpose from this ... (struct per_process::cxx_malloc): ... to this. * lib/_cygwin_crt0_common.cc: Include cygwin-cxx.h. (WEAK): Define shorthand helper macro. (__cygwin_cxx_malloc): Define and populate with weak references to whatever libstdc++ malloc operators will be visible at final link time for Cygwin apps and dlls. (_cygwin_crt0_common): Always look up cygwin DLL's internal per_process data, and don't test for (impossible) failure. Inherit any members of __cygwin_cxx_malloc that we don't have overrides for from the DLL's default and store the resulting overall set of overrides back into the DLL's global per_process data.
* * cygtls.cc (_cygtls::remove): Fix typo.Corinna Vinschen2009-07-072-3/+6
|
* * Makefile.in (clean): Clean generated files in srcdir.Christopher Faylor2009-07-063-50/+55
| | | | * tlsoffsets.h: Regenerate.
* * cygtls.cc (_cygtls::remove): Avoid closing a NULL handle.Christopher Faylor2009-07-062-1/+6
|
* * fhandler_socket.cc (fhandler_socket::recv_internal): Convert wsabufCorinna Vinschen2009-07-062-10/+18
| | | | and wsacnt to references. Fix handling of WSAEMSGSIZE.
* * cygtls.h (struct _local_storage): Add thread storage pointers forCorinna Vinschen2009-07-065-33/+91
| | | | | | | | | | | | | | | | | | | | | memory used by socket select functions. Combine them into a single struct select. * cygtls.cc: Accommodate above change throughout. (_cygtls::init_thread): Drop initalizing of sockevt to INVALID_HANDLE_VALUE. (_cygtls::fixup_after_fork): Reset sockevt to NULL. (_cygtls::remove): Don't use sockevt value to bail out prematurely. Set sockevt to NULL. Free malloced select members. * select.h (struct select_socket_info): Drop max_w4 member. * select.cc (thread_socket): Use INFINITE timeout value if number of objects to wait for is <= MAXIMUM_WAIT_OBJECTS. Use num_w4 member of select_socket_info struct rather than dropped max_w4. (init_tls_select_info): New inline function to initialize TLS select members. (start_thread_socket): Just call init_tls_select_info to initialize TLS select members and use them later on. (socket_cleanup): Don't free select_socket_info pointer members since they are thread local now.
* * dtable.cc (handle_to_fn): Detect failing NtQueryObject.Christopher Faylor2009-07-062-2/+7
|
* * autoload.cc: Delete stray CR.Corinna Vinschen2009-07-062-1/+5
|
* * fhandler_console.cc: Change workstation -> windows station throughout.Christopher Faylor2009-07-052-8/+13
|
* * autoload.cc (SetParent): Add new import.Christopher Faylor2009-07-045-40/+148
| | | | | | | | | | | | | * fhandler.h (fhandler_console::create_invisible_console): Declare new function. (create_invisible_console_workaround): Ditto. * fhandler_console.cc (fhandler_console::create_invisible_console): Define new function. (create_invisible_console_workaround): Ditto. Add too much code to deal with broken Windows 7. Use a helper app to start an invisible console window. (fhandler_console::need_invisible): Reorganize to use helper functions to create invisible console. * spawn.cc (spawn_guts): Avoid zeroing already zeroed fields in si.
* * autoload.cc (AttachConsole): Correct size of args.Dave Korn2009-07-042-1/+5
|
* * dcrt0.cc (jit_debug): New global.Christopher Faylor2009-07-0311-38/+85
| | | | | | | | | | | | | | | | | | | | | (initial_env): Set jit_debug when we are automatically starting a gdb process. * dtable.cc (dtable::get_debugger_info): Don't tty tricks when we are being debugged by our own captive gdb, as determined by jit_debug == true. (dtable::init_std_file_from_handle): Detect errors when initializing a tty early rather than at random points later. * fhandler.h (fhandler_*::init): Return int to indicate success/failure. * fhandler.cc (fhandler_base::init): Reflect change in return value. * pipe.cc (fhandler_pipe::init): Ditto. (fhandler_pipe::create_selectable): Don't say we're retrying when we aren't. * fhandler_console.cc (fhandler_console::init): Ditto. Return success/failure. * fhandler_serial.cc (fhandler_serial::init): Ditto. * fhandler_tty.cc (fhandler_tty_slave::init): Ditto. (fhandler_tty_slave::open): Make debugging output more detailed. * tty.cc (tty_list::terminate): Don't close I/O handles before all slaves have checked in. (tty::slave_alive): Make a non-inlined function. Check if tty pipe handles can be created as an additional exists check. * tty.h (tty::slave_alive): Just define here.
* * posix.sgml: Add fpurge and mkstemps to BSD list.Corinna Vinschen2009-07-032-0/+6
|
* * cygwin.din (fpurge, mkstemps): New exports.Corinna Vinschen2009-07-034-9/+43
| | | | | | | * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump. * mktemp.cc (_gettemp): Add parameter. (mkstemps): New function. (mkstemp, mkdtemp, mktemp): Adjust clients.
* * autoload.cc: Fix typo in comment.Corinna Vinschen2009-07-032-3/+18
| | | | | | | (ShowWindowAsync): Define. (AttachConsole): Define. * fhandler_console.cc (fhandler_console::need_invisible): Add band-aid for Windows 7 AllocConsole bug.
* * net.cc (get_xp_ifs): Fix typo in comment.Corinna Vinschen2009-07-012-1/+5
|
* * fhandler.h (class fhandler_socket): Add class members and methodsCorinna Vinschen2009-07-014-17/+68
| | | | | | | | | | | | | | | | to store and retrieve the SO_RCVBUF and SO_SNDBUF sizes. * fhandler_socket.cc (fhandler_socket::dup): Duplicate new members. (fhandler_socket::send_internal): Check for SO_SNDBUF size and restrict send to 1 byte less per KB 823764. Leave loop immediately if WSASendMsg has been used. * net.cc (fdsock): Change comment again. Set buffer sizes to 65536. Store values in fhandler_socket. (cygwin_setsockopt): Store SO_RCVBUF and SO_SNDBUF sizes in fhandler_socket. (cygwin_sendto): Drop call to sig_dispatch_pending. (cygwin_recvfrom): Ditto. (cygwin_recvmsg): Ditto. (cygwin_sendmsg): Ditto.