summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin
Commit message (Collapse)AuthorAgeFilesLines
...
* * fhandler.h (fhandler_socket::recv_internal): Add bool parameter.Corinna Vinschen2012-08-013-15/+36
| | | | | | | | | | | | | | | | Add regparm attribute. * fhandler_socket.cc (fhandler_socket::read): Call recv_internal with second parameter set to false. (fhandler_socket::readv): Ditto. (fhandler_socket::recvfrom): Ditto. (fhandler_socket::recv_internal): Convert use_recvmsg from local variable to parameter. Use as request for using WSARecvMsg. Only fail if WSARecvMsg can't be loaded and wsamsg->Control.len > 0, otherwise use WSARecv{From}. Restrict dwFlags to MSG_PEEK when using WSARecvMsg. (fhandler_socket::recvmsg): Prefer using WSARecvMsg. Change priority of tests for not using WSARecvMsg. Call recv_internal with second parameter set accordingly.
* * Makefile.in: Semi-revert patch from 2012-07-01, assuming the previousCorinna Vinschen2012-08-011-9/+2
| | | | patch to etc::dir_changed fixes the underlying issue.
* * Makefile.in: Semi-revert patch from 2012-07-01, assuming the previousCorinna Vinschen2012-08-011-0/+5
| | | | patch to etc::dir_changed fixes the underlying issue.
* * path.cc (etc::dir_changed): Revert muto changes since function isCorinna Vinschen2012-07-312-28/+25
| | | | called under lock condition anyway.
* * path.cc (etc::dir_changed): Change `io' to a static NO_COPYCorinna Vinschen2012-07-313-22/+40
| | | | | | variable. Explain why. Add a muto to guard overwriting the changed_h handle by multiple concurrent threads. * path.h (class etc): Drop unused changed_h member.
* * Makefile.common (CFLAGS_COMMON): Add temporary define to work around w32apiChristopher Faylor2012-07-303-2/+9
| | | | | | | | problem. * cygwin/winlean.h: Define constant which will be needed eventually. Remove hack in favor of another hack. * cygwin/lib/crt0.h: Use "winlean.h".
* * winlean.h: Add temporary define.Christopher Faylor2012-07-303-6/+6
| | | | * winsup.h: Remove ancient debugging defines.
* * cygwait.cc (cancelable_wait): Add some debugging-only output.Christopher Faylor2012-07-308-48/+75
| | | | | | | | | | | | | | | | | | | | * exceptions.cc (sig_handle_tty_stop): Make sure that incyg is cleared when exiting if we have no parent process. Only wait for signal_arrived. (sigpacket::process): Make continue_now a bool. Delay sending signal_arrived until the end. Make code more defensive to avoid calling signal handler when stopped. Only set signal_arrived when stopped. * sigproc.cc (sig_hold): Rename from sigCONT. Make static. (sig_send): Accommodate sigCONT -> sig_hold rename. (wait_sig): Ditto. * sigproc.h (sigCONT): Delete declaration. * fhandler_console.cc (fhandler_console::write): Use new '%0c' facility to print characters. Change to paranoid to avoid excessive strace output. * fhandler_tty.cc (fhandler_pty_master::accept_input): Make frequent strace printf "paranoid" to help cut down on strace output size. * signal.cc (sigsuspend): Add standard syscall strace output. (sigpause): Ditto. (pause): Ditto. * cygtls.h (_cygtls::reset_signal_arrived): New function.
* Doh. Check in missing file from previous submission.Christopher Faylor2012-07-291-1/+7
|
* * cygtls.cc (_cygtls::reset_signal_arrived): New function.Christopher Faylor2012-07-295-63/+46
| | | | | | | | | | | | | | | (set_signal_arrived::~set_signal_arrived): Use reset_signal_arrived to reset state. * exceptions.cc (sig_handle_tty_stop): Use WAIT_SIGNALED rather than assume we know the return from cancelable_wait. (_cygtls::interrupt_setup): Modify to allow calling when executing in non-cygwin code via sigdelayed. Always reset signal_arrived. * gendef: Throughout use start_offset rather than the completely wrong sizeof__cygtls. (_sigdelayed): Rewrite to avoid duplication when calling the signal handler. (sigreturn): Delete. * gentls_offsets: Define start_offset rather than sizeof__cygtls. * tlsoffsets.h: Regenerate.
* Add missing file from last checkin.Christopher Faylor2012-07-291-1/+11
|
* * fhandler_termios.cc (fhandler_termios::line_edit): Use special case '%0c'Christopher Faylor2012-07-295-3/+19
| | | | | | | | | handling to print non-printable characters using hex notation. * smallprint.cc (__small_vsprintf): Semi-reimplement printing of non-printable characters in hex but only when padding is specified. * dcrt0.cc (dll_crt0_0): Remove tty_list initialization. * shared.cc (memory_init): Initialize tty_list here. * path.cc (path_conv::check): Remove unneeded parentheses from if check.
* * include/inttypes.h: Add x86_64 target considerations throughout.Corinna Vinschen2012-07-283-91/+230
| | | | | Define macros in C++ according to C99 requirements. * include/stdint.h: Ditto.
* * signal.cc (clock_nanosleep): Force return on signal rather than lettingChristopher Faylor2012-07-252-1/+6
| | | | cancelable_wait loop on signal.
* * syscalls.cc (enum bin_status): Add dir_not_empty.Corinna Vinschen2012-07-252-38/+89
| | | | | | | | | | | | | (try_to_bin): Call NtQueryInformationFile(FileInternalInformation) with exact buffer size. Explain why. Ditto for NtSetInformationFile(FileRenameInformation). Handle race-condition which might lead to renaming a non-empty directory. (unlink_nt): Rearrange and partially rephrase comments related to the STATUS_SHARING_VIOLATION case. Fix condition under which a dir is tested for being non-empty. Handle dir_not_empty return code from try_to_bin. Gracefully handle disappearing directory in rm -r workaround. Fix typo in comment.
* * wincap.cc (wincapc::init): Drop memset call since it can result inCorinna Vinschen2012-07-242-53/+39
| | | | | a race condition. Drop all considerations for pre-Windows 2000 systems since Cygwin won't start on them anyway.
* Change "set_thread_waiting" to "set_signal_arrived" throughout.Christopher Faylor2012-07-2310-12/+16
|
* * DevNotes: Add entry cgf-000013.Christopher Faylor2012-07-2131-380/+381
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cygserver_ipc.h (ipc_set_proc_info): Use _cygtls::ipc_set_proc_info to set per-thread signal arrived value. * cygthread.cc (cygthread::detach): Use per-thread signal_arrived via set_thread_waiting. * fork.cc (_cygtls::fixup_after_fork): Clear signal_arrived. (_cygtls::remove): Close any signal_arrived handle when thread exists. (_cygtls::find_tls): Remove unneeded function. * cygtls.h: Update copyright. (class _cygtls): Reorganize to help avoid rebuilding newlib when structure changes. (_cygtls::event): Delete. (_cygtls::threadkill): Ditto. (_cygtls::signal_waiting): Declare new bool. (_cygtls::find_tls): Delete declaration. (_cygtls::set_threadkill): Ditto. (_cygtls::reset_threadkill): Ditto. (_cygtls::set_signal_arrived): Declare new function. (class set_thread_waiting): Declare new class. * cygwait.cc (cw_nowait_storage): Define. (cygwait): Set per-thread signal_arrived via set_thread_waiting. Don't special-case _main_tls. * cygwait.h (cw_nowait): Define. (cw_infinite): Ditto. (cygwait): Redefine pathological wait-only case. * dcrt0.cc (dll_crt0_0): Remove call to now-defunct events_init(). (dll_crt0_1): Remove call to now-defunct create_signal_arrived(). * exceptions.cc: Reflect set_signal_mask() argument reordering throughout. Remove signal mask synchronization throughout. (events_init): Delete definition. (mask_sync): Delete now-unneeded mask synchronization. (set_signal_mask): Reverse order of arguments to "standard" to, from layout. Rename "newmask" argument to "setmask". Remove debugging. (sig_handle_tty_stop): Use cancelable_wait rather than WFMO. (_cygtls::interrupt_setup): Don't treat "threadkill" events specially. Conditionally set signal_arrived depending on whether the thread has created it or not. (sigpacket::process): Reorganize to reflect thread-specific sending of signals which is more in line with the way it was actually supposed to work. * fhandler_socket.cc (get_inet_addr): Use cancelable_wait rather than IsEventSignalled to avoid potential race. (fhandler_socket::wait_for_events): Set signal_arrived event using set_thread_waiting(). (fhandler_socket::close): Use cygwait for the case of just waiting 10 ms for a signal. * fhandler_tape.cc (fhandler_dev_tape::_lock): Use cancelable_wait rather than WFMO. Redo switch/case tests accordingly. * fhandler_termios.cc (fhandler_termios::bg_check): Use cygwait for case of just waiting 0 ms for a potential signal. * fhandler_tty.cc (fhandler_pty_master::process_slave_output): Use cancelable_wait rather than WFSO. * fhandler_windows.cc (fhandler_windows::read): Set per-thread signal_arrived via set_thread_waiting(). * flock.cc (lf_setlock): Ditto. * select.cc (pselect): Ditto. Set per-thread signal_arrived using set_thread_waiting(). * gendef: Don't special case handling of _cygtls::sig for threads. * gentls_offsets: Use #pragma once in tlsoffsets.h. * ntdll.h: Use #pragma once. * poll.cc: Reflect set_signal_mask() argument reordering. * posix_ipc.cc (ipc_mutex_lock): Use cancelable_wait rather than WFMO. (ipc_cond_timedwait): Set perl-thread signal arrived using set_thread_waiting(). * security.h: Use #pragma once. * signal.cc (abort): Reflect set_signal_mask() argument reordering. (clock_nanosleep): Ditto. Change call to cancelable_wait to properly specify handling of cancel and interrupt. (sigwaitinfo): Remove handling of per-thread event in favor of per-thread signal_arrived. Use cancelable_wait rather than WFSO. * sigproc.cc (signal_arrived): Delete definition. (create_signal_arrived): Ditto. * sigproc.h (signal_arrived): Delete declaration. (set_signal_mask): Avoid defining as a "C" function. Don't conditionally declare. (create_signal_arrived): Delete declaration. * syscalls.cc (rename): Use cygwait() rather than WFSO. * thread.h (fast_mutex::lock): Use cw_infinite rather than LARGE_NULL. * wait.cc (wait4): Ditto. * thread.cc (pthread_mutex::lock): Ditto. (pthread::join): Ditto. (semaphore::_wait): Ditto. (pthread_kill): Remove set_threadkill() accommodation. * tlsoffsets.h: Regenerate.
* * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 17.Christopher Faylor2012-07-212-1/+5
|
* *** empty log message ***Corinna Vinschen2012-07-191-0/+6
|
* * mount.cc (getmntent_r): Remove unused but set variable.Yaakov Selkowitz2012-07-192-2/+5
|
* * cygwin.din (getmntent_r): Export.Corinna Vinschen2012-07-187-2/+43
| | | | | | | * mount.cc (getmntent_r): New function. * posix.sgml (std-gnu): Add getmntent_r. * include/mntent.h (getmntent_r): Declare. * include/cygwin/version.h (CYGWIN_VERSION_API_MINOR): Bump.
* * winlean.h: Make sure certain Windows macros are undefined again.Corinna Vinschen2012-07-124-5/+49
| | | | | | | | Add comment to explain why. * winsup.h: Include winlean.h from C sources as well. * libc/minires-os-if.c: Drop including ntdef.h. Fix previous ChangeLog entry.
* * pseudo-reloc.cc: Drop including wchar.h.Corinna Vinschen2012-07-124-5/+8
| | | | | | (__report_error): Define module as WCHAR. * advapi.cc: Drop including wchar.h. * kernel32.cc: Ditto.
* * cygtls.cc (well_known_dlls): Add ole32.dll and wbemprox.dll.Corinna Vinschen2012-07-112-0/+6
|
* * cygwin.sc (.rdata): Revert patch from 2012-07-06.Corinna Vinschen2012-07-092-1/+5
|
* * passwd.cc (getpass): Make check for closed stream more reliable.Corinna Vinschen2012-07-092-8/+19
| | | | | Check if setting tty attributes worked and only revert to old state if so.
* * Makefile.in, configure.in, mkvers.sh: Revert accidental checkin fromCorinna Vinschen2012-07-094-11/+8
| | | | 2012-07-06.
* * Makefile.in: Change mingw_lib (temporarily?) back to w32api_lib.Christopher Faylor2012-07-082-1/+5
|
* * winlean.h (__STRALIGN_H_): Drop definition.Corinna Vinschen2012-07-065-6/+16
|
* * fhandler_procnet.cc: Fix copyright.Corinna Vinschen2012-07-065-4/+11
| | | | | | * syslog.cc: Ditto. * libc/minires-os-if.c: Ditto. * libc/minires.h: Ditto.
* Add files missing in previous checkinCorinna Vinschen2012-07-062-65/+52
|
* In terms of network related functionality, rely on Winsock definitionsCorinna Vinschen2012-07-0613-37/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as much as possible: * dtable.cc: Drop including sys/socket.h. * fhandler_procnet.cc: Change includes accordingly. * fhandler_socket.cc: Ditto. (fhandler_socket::listen): Avoid gcc error message initializing sin6. (LPFN_WSARECVMSG): Only define when building against w32api headers. * net.cc: Change includes accordingly. Define USE_SYS_TYPES_FD_SET and __WSA_ERR_MACROS_DEFINED. Define _INC_NETIOAPI temporarily and explain why. (struct _IP_ADAPTER_UNICAST_ADDRESS_LH): Only define when building against w32api headers. (struct _IP_ADAPTER_ADDRESSES_LH): Ditto. (SIO_GET_INTERFACE_LIST): Ditto. (ws_freeaddrinfo): Rename from freeaddrinfo so as not to collide with Winsock declaration. Change througout. (ws_getaddrinfo): Ditto. (ws_getnameinfo): Ditto. * select.cc: Include netdb.h after defining USE_SYS_TYPES_FD_SET. * syslog.cc: Drop including netinet/in.h. Define USE_SYS_TYPES_FD_SET and include ws2tcpip.h. * include/netdb.h (struct addrinfo): Don't define when building Cygwin. * include/cygwin/if.h: Don't declare if_xxx functions when building Cygwin. * include/cygwin/in.h: Disable most definitions when building Cygwin. * include/cygwin/socket.h: Disable sockaddr and sockaddr_storage definitions when building Cygwin. Same for MCAST_INCLUDE/MCAST_EXCLUDE. * libc/inet_addr.c: Don't define __INSIDE_CYGWIN__ nor __INSIDE_CYGWIN_NET__. * libc/inet_network.c: Ditto. * libc/minires.h: Drop redundant inclusion of netdb.h. Define __INSIDE_CYGWIN_NET__ only before including netdb.h and resolver headers.
* * winbase.h: Throughout use LONG rather than long type to prepare forCorinna Vinschen2012-07-062-15/+26
| | | | | 64 bit. (InterlockedCompareExchangePointer): Define.
* * fhandler_registry.cc (RegOpenUserClassesRoot): Only define whenCorinna Vinschen2012-07-066-5/+48
| | | | | | | | | | | | | | | | | | building against w32api headers. (RegOpenCurrentUser): Ditto. * fhandler_tty.cc (GetNamedPipeClientProcessId): Ditto. * ntdll.h (enum _PROCESSINFOCLASS): Add ProcessImageFileName. (RtlInitAnsiString): Declare. (RtlUnicodeStringToAnsiSize): Declare. * sched.cc (GetForegroundWindow): Ditto. * sec_helper.cc (SECURITY_NT_NON_UNIQUE): Define as SECURITY_NT_NON_UNIQUE_RID when building against w32api headers. (cygsid::get_sid): Use SECURITY_NT_NON_UNIQUE rather than SECURITY_NT_NON_UNIQUE_RID. (__sec_user): Use PISECURITY_DESCRIPTOR rather than PSECURITY_DESCRIPTOR to allow valid pointer arithmetic. (_recycler_sd): Ditto. (_everyone_sd): Ditto.
* * advapi32.cc (_ADVAPI32_): Drop definition.Corinna Vinschen2012-07-063-13/+24
| | | | | | * kernel32.cc (_KERNEL32_): Ditto. * winlean.h: Add definitions required to use Mingw64 headers. (FILE_SHARE_VALID_FLAGS): Drop definition.
* * winsup.h (_WIN32_WINNT): Define. Explain why.Corinna Vinschen2012-07-062-1/+9
|
* * libc/rcmd.cc: Don't undef __INSIDE_CYGWIN_NET__.Corinna Vinschen2012-07-062-0/+5
|
* * cygwin.sc (.rdata): Include all sections starting with .rdata.Corinna Vinschen2012-07-062-1/+8
| | | | | (.debug_pubtypes): Make sure section is loaded at the end like all other debug sections.
* * dcrt0.cc (build_argv): Guard against NULL pointer dereference found by Clang.Christopher Faylor2012-07-042-1/+7
|
* * exceptions.cc (setup_handler): Remove unneeded assignment found by Clang.Christopher Faylor2012-07-042-1/+6
|
* * hookapi.cc (find_first_notloaded_dll): Remove unused assignment ofChristopher Faylor2012-07-042-2/+5
| | | | importRVASize found by Clang.
* * fhandler_tty.cc (fhandler_pty_slave::read): Remove duplicate assignment toChristopher Faylor2012-07-042-1/+5
| | | | bytes_in_pipe found by Clang.
* fix typoChristopher Faylor2012-07-041-1/+1
|
* * exceptions.cc (exception::handle): Use error_code in klog, as intended.Christopher Faylor2012-07-032-2/+6
| | | | Found by Clang.
* * fhandler.h (class fhandler_dev_clipboard): Remove member eof.Corinna Vinschen2012-07-024-77/+87
| | | | | | | | | | | * fhandler_clipboard.cc: Throughout remove handling of eof member. (fhandler_dev_clipboard::write): Handle EOF condition immediately, rather than pushing it erroneously to the next read call. Rearrange code. Fix bug in CF_UNICODETEXT case which potentially dropped single bytes at the end of the buffer. Add comment. * strfuncs.cc (sys_cp_wcstombs): Allow returning non-NUL-terminated buffer if dst != NULL and len == (size_t) -1. Extend leading comment to explain what's returned in more detail.
* * fhandler_virtual.cc (fhandler_virtual::opendir): Eliminate duplicateChristopher Faylor2012-07-022-1/+5
| | | | assignment found by Clang.
* * fhandler_registry.cc (fhandler_registry::open): Handle missing EROFS errorChristopher Faylor2012-07-022-0/+6
| | | | condition pointed to by Clang.
* * pinfo.cc (_pinfo::commune_request): Eliminate unneeded assignment found byChristopher Faylor2012-07-022-2/+5
| | | | Clang.
* * external.cc (fillout_pinfo): Return NULL rather than 0.Christopher Faylor2012-07-022-5/+12
| | | | (exit_process): Guard against NULL pointer dereference found by Clang.