summaryrefslogtreecommitdiffstats
path: root/winsup
Commit message (Collapse)AuthorAgeFilesLines
* * include/winsock.h: Keep IP_OPTIONS and SO_xxx definitions whenCorinna Vinschen2012-07-063-4/+11
| | | | | | building Cygwin. * include/winsock2.h: Keep sockaddr and sockaddr_storage definitions when building Cygwin.
* * 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.
* * Makefile.common (ALL_CFLAGS): Change := to = to allow overriding inCorinna Vinschen2012-07-062-1/+6
| | | | dependent Makefiles.
* * 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.
* * mount.cc (mount_info::conv_to_win32_path): Eliminate unneeded assignmentChristopher Faylor2012-07-022-2/+7
| | | | | | found by CLANG. * path.cc (symlink_info::check): Remove unneeded/unused variable found by CLANG.
* * path.cc (symlink_info::check): Remove unneeded/unused variable.Christopher Faylor2012-07-022-3/+4
|
* * dll_init.cc (dll_list::alloc): Take long UNC paths into account.Corinna Vinschen2012-07-022-1/+12
|
* * Makefile.in: Add some more optimization flags for cygwait, malloc and ↵Christopher Faylor2012-07-029-16/+53
| | | | | | | | | | | | | | | | | | | | | path. Explain why -fomit-frame-pointer doesn't work right for passwd.o and path.o. Add -static to link command line for cygwin0.dll. * fhandler_disk_file.cc (fhandler_disk_file::facl): Reorganize slightly to silence compiler warning when compiling with -fstack-check. * net.cc (inet_ntop6): Initialize structure members to silence compiler warning when compiling with -fstack-check. * pseudo-reloc.cc (_pei386_runtime_relocator): Make this a C function. Detect NULL u. * winsup.h (_pei386_runtime_relocator): Declare this as extern "C". * lib/_cygwin_crt0_common.cc (_pei386_runtime_relocator): Call with NULL argument. * signal.cc (sigaction_worker): Eliminate last argument. Let callers report their own strace info. Regparmize. (sigaction): Reflect sigaction_worker changes. (siginterrupt): Ditto. * exceptions.cc: Update copyright.
* * path.cc: Perform some whitespace fixups throughout.Christopher Faylor2012-07-022-21/+26
|
* * kernel32.cc (_KERNEL32_): Define. Explain why.Corinna Vinschen2012-06-282-3/+12
| | | | (CreateFileMappingW): Drop undocumented flProtect flags.
* * fhandler_serial.cc: Fix includes for IOCTL codes to support Mingw64.Corinna Vinschen2012-06-285-32/+20
| | | | | | | | * fhandler_tape.cc: Ditto. * flock.cc (allow_others_to_sync): Use PISECURITY_DESCRIPTOR since PSECURITY_DESCRIPTOR is supposed to be the opaque type. * ntdll.h: Remove CreateDisposition flags again, now that they are defined in Mingw64's ntdef.h. Ditto for Create/Open flags.
* * exceptions.cc (RtlUnwind): Align declaration with MSDN.Corinna Vinschen2012-06-284-1/+43
| | | | | * ntdll.h: Define CreateDisposition Flags. Add comments. * winlean.h: Define FILE_SHARE_VALID_FLAGS if using Mingw64 headers.
* * cygwait.h (cancelable_wait): Make extern to avoid always including.Christopher Faylor2012-06-274-33/+51
| | | | | | | | | | * select.cc (allocfd_set): Try to make a little more efficient. (cygwin_select): Break into two functions to avoid what seems to be a strange compiler problem with alloca and sel constructor. (select): New function. Always honor return from call_signal_handler. (select_stuff::wait): Always honor return from call_signal_handler. * select.h (select_stuff::select_stuff): Use NULL to initialize pointers rather than 0.
* * exceptions.cc (exception::handle): Cast exception code to NTSTATUSCorinna Vinschen2012-06-273-60/+12
| | | | | | for comparison. * ntdll.h: Drop defining NT status codes in favor of including ntstatus.h.
* * miscfuncs.cc (WritePipeOverlapped): Define second parameter LPCVOID,Corinna Vinschen2012-06-273-3/+9
| | | | | rather than PCVOID. * miscfuncs.h (WritePipeOverlapped): Ditto.
* * advapi32.cc (_ADVAPI32_): Define. Explain why.Corinna Vinschen2012-06-274-3/+41
| | | | | | | | | | | | | (ImpersonateNamedPipeClient): Add missing WINAPI. * ntdll.h (STATUS_INVALID_PARAMETER): Only define if it isn't already. (STATUS_DLL_NOT_FOUND): Ditto. (STATUS_ENTRYPOINT_NOT_FOUND): Ditto. (enum _EVENT_TYPE): Guard against redefinition since it's already defined in Mingw64's ntdef.h. (enum _TIMER_TYPE): Ditto. (enum _SECTION_INHERIT): Define if using Mingw64 headers since it's missing in Mingw64's ntdef.h. * winlean.h (__STRALIGN_H_): Define before including windows.h.
* * winsup.h (GetLastError): Drop redundant definition.Corinna Vinschen2012-06-262-4/+5
|
* fix typoChristopher Faylor2012-06-261-1/+1
|
* * cygwait.cc (cancelable_wait): Make sure that timer is cancelled beforeChristopher Faylor2012-06-252-6/+10
| | | | cancelling thread.
* * cygwait.h (cancelable_wait): Need to force time to negative to indicateChristopher Faylor2012-06-252-1/+6
| | | | relative time.
* * path.cc (realpath): Fix comment.Corinna Vinschen2012-06-222-2/+6
|
* * path.cc (realpath): Call mount_info::conv_to_posix_path rather thanCorinna Vinschen2012-06-212-1/+10
| | | | | mount_info::cygdrive_posix_path to convert DOS paths to POSIX paths. Add comment to explain why that's necessary at all.
* * cygwait.h (LARGE_NULL): Define.Christopher Faylor2012-06-196-9/+31
| | | | | | | | | | | | | | (cancelable_wait): Define variant which accepts DWORD time argument. (cygwait): Use cancelable_wait with DWORD argument. (cygwait): Use cancelable_wait with DWORD argument and cw_sig_eintr for timeout-only case. * exceptions.cc (handle_sigsuspend): Use LARGE_NULL as second argument to distinguish between cancelable_wait variants. * thread.cc (pthread_mutex::lock): Ditto. (pthread::join): Ditto. (semaphore::_timedwait): Ditto. * thread.h (fast_mutex::lock): Ditto. * wait.cc (wait4): Ditto.
* Revert errneous checkin.Christopher Faylor2012-06-1920-77/+95
| | | | Check in actual change associated with ChangeLog.
* * cygwait.cc (cancelable_wait): Mimic old cygwait behavior more closely wrtChristopher Faylor2012-06-1920-90/+78
| | | | | | | | handling of call_signal_handler. * cygwait.h (WAIT_CANCELED): Move here and redefine. (WAIT_SIGNALED): Ditto. * thread.h (WAIT_CANCELED): Delete. (WAIT_SIGNALED): Ditto.
* * cygheap.cc (init_cygheap::init_installation_root): Rearrange codeCorinna Vinschen2012-06-182-6/+28
| | | | | creating valid native NT installation_root path. Only strip last backslash from path if the result is a valid NT path. Explain why.
* Add '#include "cygwait.h"' throughout, where appropriate.Christopher Faylor2012-06-1718-176/+269
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * DevNotes: Add entry cgf-000012. * Makefile.in (DLL_OFILES): Add cygwait.o. * sigproc.h: Remove cygwait definitions. * cygwait.h: New file. Define/declare Cygwin waitfor functions. * cygwait.cc: Ditto. * exceptions.cc: Include cygwait.h. (handle_sigsuspend): Accommodate change in cancelable_wait arguments. (sigpacket::process): Display thread tls in debugging output. * fhandler.cc (fhandler_base_overlapped::wait_overlapped): Use symbolic names for signal and cancel return. * fhandler_console.cc (fhandler_console::read): Ditto. (fhandler_dev_dsp::Audio_out::waitforspace): Ditto. fhandler_dev_dsp::Audio_in::waitfordata): Ditto. * fhandler_fifo.cc (fhandler_fifo::wait): Ditto. * fhandler_serial.cc (fhandler_serial::raw_read): Ditto. * fhandler_tty.cc (fhandler_pty_slave::read): Ditto. * select.cc (cygwin_select): Ditto. * wait.cc (wait4): Ditto. * thread.cc (cancelable_wait): Move definition to cygwait.h. (pthread_cond::wait): Accommodate change in cancelable_wait arguments. (pthread_mutex::lock): Ditto. (pthread_spinlock::lock): Ditto. (pthread::join): Ditto. (pthread::thread_init_wrapper): Display tls in debugging output. (semaphore::_timedwait): Ditto. * thread.h (cw_sig_wait): Move to cygwait.h. (cw_cancel_action): Delete. (cancelable_wait): Move declaration to cygwait.h.
* Fix last ChangeLog entry.Yaakov Selkowitz2012-06-121-1/+1
|
* * regex/regcomp.c (p_ere): Allow vertical-line followingYaakov Selkowitz2012-06-112-0/+8
| | | | left-parenthesis in ERE, as in glibc.
* * include/sys/elf_common.h (R_386_16): Define.Yaakov Selkowitz2012-06-102-0/+11
| | | | | | (R_386_PC16): Define. (R_386_8): Define. (R_386_PC8): Define.
* * select.cc (cygwin_select): Remove select_timeout test.Christopher Faylor2012-06-103-6/+9
| | | | | (select_stuff::wait): Return select_set_zero on timeout. (thread_socket): Report timeout when debugging.
* * include/elf.h: Update from FreeBSD.Yaakov Selkowitz2012-06-068-245/+1401
| | | | | | | | | | | | * include/machine/elf.h: New header, from FreeBSD. * include/sys/elf.h: Ditto. * include/sys/elf32.h: Update from FreeBSD. * include/sys/elf64.h: Ditto. * include/sys/elf_common.h: Ditto. (R_IA64_*): Define Linux-style names as aliases to R_IA_64_*. (R_SH_*): Define, based on sh-4 psABI. (R_390_*): Define, based on s390x psABI. * include/sys/elf_generic.h: Ditto.
* * fhandler_disk_file.cc (fhandler_disk_file::link ): TranslateCorinna Vinschen2012-06-042-1/+7
| | | | STATUS_NOT_SUPPORTED to EPERM as well.
* * dtable.cc (dtable::dup3): Only return with lock set when O_EXCL flag isChristopher Faylor2012-06-043-2/+16
| | | | | passed in. * syscalls.cc (dup_finish): Pass O_EXCL in flags to dtable::dup3.
* * DevNotes: Add entry cgf-000011.Christopher Faylor2012-06-037-20/+74
| | | | | | | | | | | | | | | | | | | * fhandler.h (fhandler_base::refcnt): Delete. (fhandler_base::inc_refcnt): New function. (fhandler_base::dec_refcnt): New function. * cygheap.h (cygheap_fdnew::~cygheap_fdnew): Accommodate split of refcnt to inc_refcnt/dec_refcnt. (cygheap_fdget::cygheap_fdget): Ditto. (cygheap_fdget::~cygheap_fdget::cygheap_fdget): Ditto. * dtable.cc (dtable::release): Ditto. (cygwin_attach_handle_to_fd): Ditto. (dtable::init_std_file_from_handle): Ditto. (dtable::dup3): On success, return with fdtab locked. * dtable.h (dtable): Add dup_finish as a friend. * syscalls.cc (dup_finish): Define new function. Increment refcnt while fdtab is locked. (dup2): Use common dup_finish() to perform dup operation. (dup3): Ditto.