Commit Graph

9559 Commits

Author SHA1 Message Date
Christopher Faylor b8a84b73d7 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 17. 2012-07-21 17:13:42 +00:00
Corinna Vinschen 1692ae3a30 * pathnames.sgml (pathnames-intro): Remove paragraph on UNC paths.
Try to be clearer on POSIX vs. Win32 paths.
	(unc-paths): New section.
	(cygdrive): Fix a few SGML qualifiers.
	* setup-net.sgml: Move ntsec section from here...
	* using.sgml: ..to here.
2012-07-20 09:23:44 +00:00
Corinna Vinschen 847a5f899b * woutsup.h: Just include winlean.h. 2012-07-19 17:56:46 +00:00
Corinna Vinschen 7cad0dc664 *** empty log message *** 2012-07-19 09:43:56 +00:00
Yaakov Selkowitz 90c352ad77 * mount.cc (getmntent_r): Remove unused but set variable. 2012-07-19 09:04:02 +00:00
Yaakov Selkowitz fe05ac4f14 * new-features.sgml (ov-new1.7.16): Document getmntent_r. 2012-07-18 11:23:11 +00:00
Corinna Vinschen 010f7350ba * cygwin.din (getmntent_r): Export.
* 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.
2012-07-18 11:17:25 +00:00
Yaakov Selkowitz 03b7882aa0 * faq-programming.xml (faq.programming.unix-gui): Update to
reflect the availability of X11 toolkits on Cygwin.
2012-07-18 02:11:04 +00:00
Corinna Vinschen 6902b88b0b * winlean.h: Make sure certain Windows macros are undefined again.
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.
2012-07-12 11:27:28 +00:00
Corinna Vinschen 568e72f561 * pseudo-reloc.cc: Drop including wchar.h.
(__report_error): Define module as WCHAR.
	* advapi.cc: Drop including wchar.h.
	* kernel32.cc: Ditto.
2012-07-12 10:33:54 +00:00
Corinna Vinschen 6e1e3bb8e5 * Makefile.in (cygcheck.exe): Link against psapi.dll.
* bloda.cc: Change include section to work with Mingw64 headers.
	Include psapi.h.  Use SystemProcessInformation instead of
	SystemProcessesAndThreadsInformation throughout and add define for
	w32api headers.  Ditto for PSYSTEM_PROCESS_INFORMATION vs.
	PSYSTEM_PROCESSES.
	(system_module_list): New type to replace SYSTEM_MODULE_INFORMATION.
	Change usage throughout accordingly.
	(get_module_list): Fetch module list using PSAPI functions
	EnumDeviceDrivers and GetDeviceDriverBaseNameA.
	* cygcheck.cc (max): Define as __max if not defined already.
	(alloca): Only define if not defined already.
	(handle_unique_object_name): Use explicit sharing flags rather than
	FILE_SHARE_VALID_FLAGS which officially is only available in DDK
	headers.
	(PRODUCT_ULTIMATE_E): Only define if not defined already.
	* dump_setup.cc: Change include section to work with Mingw64 headers.
	(NtQueryAttributesFile): Drop NTOSAPI aka DECLSPEC_IMPORT.
	* strace.cc: Change include section to work with Mingw64 headers.
	(alloca): Only define if not defined already.
2012-07-11 16:41:51 +00:00
Corinna Vinschen 4a4f6f949c * cygtls.cc (well_known_dlls): Add ole32.dll and wbemprox.dll. 2012-07-11 09:21:36 +00:00
Corinna Vinschen 6930762ffa * cygwin.sc (.rdata): Revert patch from 2012-07-06. 2012-07-09 14:55:02 +00:00
Corinna Vinschen 7c4626ed08 * passwd.cc (getpass): Make check for closed stream more reliable.
Check if setting tty attributes worked and only revert to old state
	if so.
2012-07-09 12:57:03 +00:00
Corinna Vinschen c416f16d44 * Makefile.in, configure.in, mkvers.sh: Revert accidental checkin from
2012-07-06.
2012-07-09 09:00:56 +00:00
Christopher Faylor a9cd97c8e2 * Makefile.in: Change mingw_lib (temporarily?) back to w32api_lib. 2012-07-08 00:51:45 +00:00
Corinna Vinschen 9cfc9511cd * cygpath.cc: Change including headers to allow building against
Mingw64 headers. Include ntdef.h and ntdll.h rather than ddk headers.
	Define _WIN32_WINNT and WINVER as 0x0602.
	(RtlEqualUnicodePathPrefix): Drop definition.  Pulled in from ntdll.h
	now.
	(get_device_name): s/Zw/Nt.
	* dumper.cc: Include sys/param.h
	(dumper::dump_memory_region): Use MIN rather than min.
	* locale.cc: Include stdlib.h.  Define _WIN32_WINNT and WINVER as
	0x0602.
	* ps.cc: Include ntdef.h and ntdll.h rather than ddk headers.
	* regtool.cc (regDeleteKeyEx): Drop WINADVAPI qualifier.
2012-07-06 14:52:33 +00:00
Corinna Vinschen 3eedbf8611 * winlean.h (__STRALIGN_H_): Drop definition. 2012-07-06 14:44:13 +00:00
Corinna Vinschen 44fb3af98a * fhandler_procnet.cc: Fix copyright.
* syslog.cc: Ditto.
	* libc/minires-os-if.c: Ditto.
	* libc/minires.h: Ditto.
2012-07-06 13:56:37 +00:00
Corinna Vinschen acddda4bf9 Add files missing in previous checkin 2012-07-06 13:53:23 +00:00
Corinna Vinschen db80f635c1 In terms of network related functionality, rely on Winsock definitions
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.
2012-07-06 13:52:19 +00:00
Corinna Vinschen dc45bfa0bf * include/winsock.h: Keep IP_OPTIONS and SO_xxx definitions when
building Cygwin.
	* include/winsock2.h: Keep sockaddr and sockaddr_storage definitions
	when building Cygwin.
2012-07-06 13:52:10 +00:00
Corinna Vinschen f3a43e7ef0 * winbase.h: Throughout use LONG rather than long type to prepare for
64 bit.
	(InterlockedCompareExchangePointer): Define.
2012-07-06 13:51:26 +00:00
Corinna Vinschen 6f94526c1c * fhandler_registry.cc (RegOpenUserClassesRoot): Only define when
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.
2012-07-06 13:49:53 +00:00
Corinna Vinschen 261c701bf3 * advapi32.cc (_ADVAPI32_): Drop definition.
* kernel32.cc (_KERNEL32_): Ditto.
	* winlean.h: Add definitions required to use Mingw64 headers.
	(FILE_SHARE_VALID_FLAGS): Drop definition.
2012-07-06 13:43:05 +00:00
Corinna Vinschen a02924944e * winsup.h (_WIN32_WINNT): Define. Explain why. 2012-07-06 12:13:50 +00:00
Corinna Vinschen 862de2d0ae * libc/rcmd.cc: Don't undef __INSIDE_CYGWIN_NET__. 2012-07-06 12:05:19 +00:00
Corinna Vinschen da36286e64 * cygwin.sc (.rdata): Include all sections starting with .rdata.
(.debug_pubtypes): Make sure section is loaded at the end like all other
	debug sections.
2012-07-06 10:44:38 +00:00
Corinna Vinschen 0390476c47 * Makefile.common (ALL_CFLAGS): Change := to = to allow overriding in
dependent Makefiles.
2012-07-06 10:32:11 +00:00
Christopher Faylor ea51d3d425 * dcrt0.cc (build_argv): Guard against NULL pointer dereference found by Clang. 2012-07-04 17:30:55 +00:00
Christopher Faylor 85b2b14e7a * exceptions.cc (setup_handler): Remove unneeded assignment found by Clang. 2012-07-04 06:06:54 +00:00
Christopher Faylor 226133e80c * hookapi.cc (find_first_notloaded_dll): Remove unused assignment of
importRVASize found by Clang.
2012-07-04 06:04:16 +00:00
Christopher Faylor 0bdf68577d * fhandler_tty.cc (fhandler_pty_slave::read): Remove duplicate assignment to
bytes_in_pipe found by Clang.
2012-07-04 06:01:16 +00:00
Christopher Faylor aa01a03c10 fix typo 2012-07-04 02:26:52 +00:00
Christopher Faylor 51e4c3d44c * exceptions.cc (exception::handle): Use error_code in klog, as intended.
Found by Clang.
2012-07-03 05:31:11 +00:00
Corinna Vinschen 8fd8f9e72b * fhandler.h (class fhandler_dev_clipboard): Remove member eof.
* 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.
2012-07-02 20:17:27 +00:00
Christopher Faylor ceec584ad3 * fhandler_virtual.cc (fhandler_virtual::opendir): Eliminate duplicate
assignment found by Clang.
2012-07-02 20:01:19 +00:00
Christopher Faylor e82360f659 * fhandler_registry.cc (fhandler_registry::open): Handle missing EROFS error
condition pointed to by Clang.
2012-07-02 20:00:22 +00:00
Christopher Faylor e9d7f5b3a9 * pinfo.cc (_pinfo::commune_request): Eliminate unneeded assignment found by
Clang.
2012-07-02 19:55:51 +00:00
Christopher Faylor fb348d22af * external.cc (fillout_pinfo): Return NULL rather than 0.
(exit_process): Guard against NULL pointer dereference found by Clang.
2012-07-02 19:48:33 +00:00
Christopher Faylor e14a5a7efa * mount.cc (mount_info::conv_to_win32_path): Eliminate unneeded assignment
found by CLANG.
* path.cc (symlink_info::check): Remove unneeded/unused variable found by
CLANG.
2012-07-02 19:42:34 +00:00
Christopher Faylor fade1f2e21 * path.cc (symlink_info::check): Remove unneeded/unused variable. 2012-07-02 19:38:41 +00:00
Corinna Vinschen 26e603454f * dll_init.cc (dll_list::alloc): Take long UNC paths into account. 2012-07-02 14:14:01 +00:00
Christopher Faylor 1809b65e23 * Makefile.in: Add some more optimization flags for cygwait, malloc and 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.
2012-07-02 02:24:25 +00:00
Christopher Faylor c4441d46b6 * path.cc: Perform some whitespace fixups throughout. 2012-07-02 00:40:06 +00:00
Corinna Vinschen ca4d966d1b * kernel32.cc (_KERNEL32_): Define. Explain why.
(CreateFileMappingW): Drop undocumented flProtect flags.
2012-06-28 20:06:23 +00:00
Corinna Vinschen ca7f6a04b3 * fhandler_serial.cc: Fix includes for IOCTL codes to support Mingw64.
* 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.
2012-06-28 19:25:22 +00:00
Corinna Vinschen 06e429fd6d * exceptions.cc (RtlUnwind): Align declaration with MSDN.
* ntdll.h: Define CreateDisposition Flags.  Add comments.
	* winlean.h: Define FILE_SHARE_VALID_FLAGS if using Mingw64 headers.
2012-06-28 14:06:06 +00:00
Christopher Faylor b052bf2671 * cygwait.h (cancelable_wait): Make extern to avoid always including.
* 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.
2012-06-27 21:42:11 +00:00
Corinna Vinschen c60437258a * exceptions.cc (exception::handle): Cast exception code to NTSTATUS
for comparison.
	* ntdll.h: Drop defining NT status codes in favor of including
	ntstatus.h.
2012-06-27 16:24:54 +00:00
Corinna Vinschen 165f575341 * miscfuncs.cc (WritePipeOverlapped): Define second parameter LPCVOID,
rather than PCVOID.
	* miscfuncs.h (WritePipeOverlapped): Ditto.
2012-06-27 13:35:48 +00:00
Corinna Vinschen 25f3ea84f8 * advapi32.cc (_ADVAPI32_): Define. Explain why.
(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.
2012-06-27 13:19:11 +00:00
Corinna Vinschen a90b8a20ed * winsup.h (GetLastError): Drop redundant definition. 2012-06-26 16:36:00 +00:00
Christopher Faylor 8bec43b39b fix typo 2012-06-26 05:23:10 +00:00
Christopher Faylor 6ec05d23b3 * cygwait.cc (cancelable_wait): Make sure that timer is cancelled before
cancelling thread.
2012-06-25 16:28:50 +00:00
Christopher Faylor d6953d3f7d * cygwait.h (cancelable_wait): Need to force time to negative to indicate
relative time.
2012-06-25 05:00:39 +00:00
Corinna Vinschen 970790c681 * path.cc (realpath): Fix comment. 2012-06-22 09:51:29 +00:00
Corinna Vinschen 797ff24dfb * path.cc (realpath): Call mount_info::conv_to_posix_path rather than
mount_info::cygdrive_posix_path to convert DOS paths to POSIX paths.
	Add comment to explain why that's necessary at all.
2012-06-21 09:33:19 +00:00
Christopher Faylor 978441cc0e * cygwait.h (LARGE_NULL): Define.
(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.
2012-06-19 00:52:59 +00:00
Christopher Faylor 2addde8cb1 Revert errneous checkin.
Check in actual change associated with ChangeLog.
2012-06-19 00:38:02 +00:00
Christopher Faylor af5cd14583 * cygwait.cc (cancelable_wait): Mimic old cygwait behavior more closely wrt
handling of call_signal_handler.
* cygwait.h (WAIT_CANCELED): Move here and redefine.
(WAIT_SIGNALED): Ditto.
* thread.h (WAIT_CANCELED): Delete.
(WAIT_SIGNALED): Ditto.
2012-06-19 00:31:15 +00:00
Corinna Vinschen 099817c3db * cygheap.cc (init_cygheap::init_installation_root): Rearrange code
creating valid native NT installation_root path.  Only strip last
	backslash from path if the result is a valid NT path.  Explain why.
2012-06-18 20:17:15 +00:00
Christopher Faylor 4ae6378382 Add '#include "cygwait.h"' throughout, where appropriate.
* 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.
2012-06-17 20:50:24 +00:00
Yaakov Selkowitz 933ee0ecbf Fix last ChangeLog entry. 2012-06-12 18:34:38 +00:00
Yaakov Selkowitz 3e5a48af5e * regex/regcomp.c (p_ere): Allow vertical-line following
left-parenthesis in ERE, as in glibc.
2012-06-11 22:15:27 +00:00
Yaakov Selkowitz 53943a2e87 * include/sys/elf_common.h (R_386_16): Define.
(R_386_PC16): Define.
	(R_386_8): Define.
	(R_386_PC8): Define.
2012-06-10 18:28:16 +00:00
Christopher Faylor abf1b60039 * select.cc (cygwin_select): Remove select_timeout test.
(select_stuff::wait): Return select_set_zero on timeout.
(thread_socket): Report timeout when debugging.
2012-06-10 01:57:53 +00:00
Yaakov Selkowitz f513e3a206 * include/elf.h: Update from FreeBSD.
* 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.
2012-06-06 04:45:48 +00:00
Corinna Vinschen cd69beda67 * fhandler_disk_file.cc (fhandler_disk_file::link ): Translate
STATUS_NOT_SUPPORTED to EPERM as well.
2012-06-04 08:49:13 +00:00
Christopher Faylor b9c61a8d7b * dtable.cc (dtable::dup3): Only return with lock set when O_EXCL flag is
passed in.
* syscalls.cc (dup_finish): Pass O_EXCL in flags to dtable::dup3.
2012-06-04 01:26:05 +00:00
Christopher Faylor 3143cb7c00 * DevNotes: Add entry cgf-000011.
* 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.
2012-06-03 18:02:45 +00:00
Corinna Vinschen ff80d22a7c * new-features.sgml (ov-new1.7.16): Document ReFS support. 2012-06-03 16:53:03 +00:00
Corinna Vinschen ba9846ad9b *** empty log message *** 2012-06-03 16:47:57 +00:00
Corinna Vinschen 115d74b99e * globals.cc (ro_u_refs): New R/O unicode string.
* mount.cc (fs_info::update): Recognize ReFS.
	* mount.h (enum fs_info_type): Add refs.
	(class fs_info): Add refs flag and accessor methods.
	* ntdll.h (RtlAddAccessAllowedAceEx): Declare.
	(RtlAddAccessDeniedAceEx): Declare.
	* path.h (path_conv::fs_is_refs): Define.
	* sec_helper.cc (_recycler_sd): New function to create security
	descriptors suitable for the recycler bin starting with Vista.
	* security.cc (add_access_allowed_ace): Use RtlAddAccessAllowedAceEx
	and drop code to set AceFlags explicitely.
	(add_access_denied_ace): Use RtlAddAccessDeniedAceEx and drop code to
	set AceFlags explicitely.
	* security.h (_recycler_sd): Declare.
	(recycler_sd): Define.
	* syscalls.cc (desktop_ini): Change formatting.
	(desktop_ini_ext): Define third line of recycler desktop.ini file
	since Vista,
	(try_to_bin): Handle ReFS just like NTFS.  Write Vista and later
	Recycler in all uppercase, just like shell32 does when recreating it.
	Fix comments to include ReFS.  Don't implicitely reuse object
	attributes from earlier NtOpenFile call, rather recreate it for safety.
	Use recycler_sd call when creating security descriptor for Recycler
	dirs and files on Vista and later.  Write third line of desktop.ini
	when on Vista and later.
2012-06-03 16:46:53 +00:00
Corinna Vinschen 6a713dabad * cygcheck.cc (dump_sysinfo): Change "Server 8" to official
"Server 2012".
2012-06-03 16:45:27 +00:00
Christopher Faylor b7ae842aea * winbase.h: Add missing copyright date. 2012-06-03 16:32:00 +00:00
Christopher Faylor 7c15768aa5 * select.cc (cygwin_select): Make sure that we only return -1 as an error
return.
(select_stuff::wait): Semi-revert to previous method for filling out w4.
2012-06-03 16:31:33 +00:00
Christopher Faylor 00a3124325 * select.cc (cygwin_select): Add some comments.
(select_stuff::wait): Ditto.
2012-06-03 03:29:47 +00:00
Christopher Faylor 45b61a88be * DevNotes: Add entry cgf-000010.
* select.cc (set_handle_or_return_if_not_open): Remove unneeded final backslash
from definition.
(cygwin_select): Reorganize to incorporate outer retry loop.  Move remaining
time recalculation here for retry case.  Use select_stuff::wait_states for loop
control.
(select_stuff::cleanup): Avoid unneeded initialization.
(select_stuff::wait): Modify definition to return select_stuff::wait_states.
Eliminate is_cancelable.  Don't element 1 of an array if it is a cancel handle.
Remove loop.  Rely on being called from enclosing loop in cygwin_select.
Remove time recalculation when restarting.  Try harder to always return from
the bottom.
* select.h (select_stuff::wait_state): New enum.
(select_stuff::wait): Modify declaration to return select_stuff::wait_states.
2012-06-03 02:59:20 +00:00
Christopher Faylor faab45455a * exceptions.cc (setup_handler): Make debugging output a little more verbose. 2012-06-03 02:26:58 +00:00
Christopher Faylor 841ab2f971 * cygtls.h (_cygtls::protect_linked_list): Delete unused field. 2012-06-02 20:28:57 +00:00
Corinna Vinschen 0b592aeef2 * hookapi.cc (find_first_notloaded_dll): Extend comment. Fix usage of
mapped memory.  Shorten static library name buffer to MAX_PATH.  Use
	strlcpy to copy library name to buffer.  Only Unmap "map" if it has been
	Mapped before.
	* pinfo.cc (status_exit): Drop unneeded declaration of
	find_first_notloaded_dll in favor of the declaration in winsup.h.
2012-05-30 14:37:53 +00:00
Corinna Vinschen 52174bb4cc * thread.cc: Remove temporary newlib workaround, now that newlib
handles thread cancellation by itself.
	(class __cygwin_lock_handler): Remove.
	(__cygwin_lock_cleanup): Remove.
	(__cygwin_lock_lock): Revert newlib workaround,
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Ditto.
	(pthread::pop_cleanup_handler): Ditto.
2012-05-30 09:15:38 +00:00
Corinna Vinschen d6719f7e17 * select.cc (select_stuff::wait): Temporarily disable restarting
entirely.
2012-05-29 13:11:34 +00:00
Corinna Vinschen d560c4b2ba * security.h (cygsidlist::+=): Correctly copy well_known_sid info from
source cygsid.
2012-05-29 13:01:50 +00:00
Corinna Vinschen 00ef94f338 * Makefile.in (LIBS): Re-add advapi32.dll. Explain why.
* make-64bit-version-with-mingw-w64.sh (LIBS): Ditto.
	* cyglsa.c: Drop NTDLL function declarations.  Use equivalent advapi32
	functions again, throughout.
	* cyglsa64.dll: Regenerate.
2012-05-29 12:46:01 +00:00
Corinna Vinschen d610936513 * registry.cc (reg_key::build_reg): Fix typo in debug output. 2012-05-25 14:49:56 +00:00
Corinna Vinschen 8e599b1e3a * select.cc (select_stuff::wait): When not returning after receiving
a signal, recalculate timeout.  Apply temporary fix to avoid crashes
	after calling the signal handler.  Explain.
2012-05-25 14:33:18 +00:00
Corinna Vinschen df5cda0e93 * fhandler_serial.cc (fhandler_serial::raw_read): Check for
ERROR_OPERATION_ABORTED rather than ERROR_IO_INCOMPLETE after CancelIo.
2012-05-25 11:08:10 +00:00
Corinna Vinschen 96d5b7d17c * fhandler_serial.cc (fhandler_serial::raw_read): Just call ReadFile
directly in case of non-blocking I/O and handle result gracefully.
2012-05-25 09:29:17 +00:00
Corinna Vinschen 32c02f191b * thread.cc (__cygwin_lock_lock): Replace null thread check with test
for cygwin_finished_initializing to handle process startup.
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Ditto.
2012-05-24 14:17:51 +00:00
Corinna Vinschen 9cbf10a06e * thread.cc (__cygwin_lock_lock): Take null thread at process startup
into account.
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Ditto.
2012-05-23 19:49:39 +00:00
Corinna Vinschen 2b165a453e * thread.cc (pthread::cancel): Re-allow asynchronous cancellation from
Cygwin code since it looks like the problem is Windows only.
2012-05-23 17:39:39 +00:00
Corinna Vinschen bff08077a6 * thread.cc: Add a temporary workaround to help Cygwin along while
newlib doesn't install cleanup handlers.  Explain the problem.
	(class __cygwin_lock_handler): New class.
	(__cygwin_lock_cleanup): New function.
	(__cygwin_lock_lock): Push __cygwin_lock_cleanup thread cleanup
	handler.
	(__cygwin_lock_trylock): Ditto.
	(__cygwin_lock_unlock): Pop thread cleanup handler.
	(pthread::pop_cleanup_handler): Temporarily allow cleanup function to
	destroy cleanup handler so we can pop in another function than we
	pushed in.
2012-05-23 16:26:34 +00:00
Corinna Vinschen 86b35406f2 * thread.cc (pthread::cancel): Only allow asynchronous cancellation
if the thread is not executing Cygwin or Windows code.  Explain why.
2012-05-23 13:30:26 +00:00
Corinna Vinschen 750329ae90 * thread.cc (pthread::precreate): Make sure mutex is recursive.
Explain why.
2012-05-23 13:24:57 +00:00
Corinna Vinschen dacf4be3fa * thread.cc (pthread::pop_cleanup_handler): Move setting the cancelstate
to PTHREAD_CANCEL_DISABLE from here...
	(pthread::pop_all_cleanup_handlers): ...to here, otherwise any explicit
	call to pthread_cleanup_pop disables cancellation for this thread.
2012-05-23 13:18:34 +00:00
Corinna Vinschen 2ca9ed527e * fhandler.h (refcnt): Add i interlocked. Explain why.
* winbase.h (ilockadd): New function.
	(InterlockedAdd): Define as ilockadd.
2012-05-23 13:13:56 +00:00
Corinna Vinschen 73447abbb6 * devices.in: Fix native name of /dev/kmem.
* devices.cc: Regenerate.
	* dtable.cc (fh_alloc): Don't forget FH_KMEM.
	* fhandler_mem.cc (fhandler_dev_mem::open): Set errno to EACCES rather
	than ENOENT on systems not granting access to physical memory from
	user space.
2012-05-22 17:37:40 +00:00
Corinna Vinschen 6014310903 * thread.cc (pthread::cancel): Set thread's cancel_event in
PTHREAD_CANCEL_ASYNCHRONOUS case, too.  Explain why.
2012-05-22 10:28:05 +00:00