Commit Graph

10096 Commits

Author SHA1 Message Date
Corinna Vinschen 42ce449890 * path.cc (etc::test_file_change): In case of NtQueryFullAttributesFile
returning an error, only return true if file actually exists.
2014-01-22 15:45:29 +00:00
Corinna Vinschen 01f05a28c8 * include/cygwin/in6.h (struct ipv6_rt_hdr): Define.
* include/cygwin/socket.h: Fix formatting.
	(IP_UNICAST_IF): Define.
	(IPV6_JOIN_GROUP): Remove Windowism.
	(IPV6_LEAVE_GROUP): Ditto.
	(IPV6_UNICAST_IF): Define.
	(IPV6_TCLASS): Ditto.
	(IPV6_RECVTCLASS): Ditto.
2014-01-20 17:25:54 +00:00
Corinna Vinschen 3228065cea * include/netinet/ip6.h: New file, copied from FreeBSD vebatim. 2014-01-18 11:37:55 +00:00
Christopher Faylor 58f6b1f1b2 * dtable.h (dtable::lock): Revert static.
(dtable::unlock): Ditto.
2014-01-17 17:22:57 +00:00
Corinna Vinschen 39f090d060 * passwd.cc (setpassent): Align to BSD definition. 2014-01-17 14:53:04 +00:00
Corinna Vinschen b1782642d2 *** empty log message *** 2014-01-17 11:11:25 +00:00
Corinna Vinschen 3507271d6b * syscalls.cc (popen): Introduce Glibc 'e' flag to allow thread-safe
opening of the pipe with O_CLOEXEC flag.  Simplify FD_CLOEXEC handling.
2014-01-17 11:07:37 +00:00
Corinna Vinschen 92a8ea56e5 * include/sys/file.h (LOCK_SH): Drop definition in favor of new
definitions in newlib.
	(LOCK_EX): Ditto.
	(LOCK_NB): Ditto.
	(LOCK_UN): Ditto.
	(flock): Ditto.
	(F_OK): Drop.  Already correctly defined in unistd.h.
	(X_OK): Ditto.
	(W_OK): Ditto.
	(R_OK): Ditto.
2014-01-17 11:01:46 +00:00
Corinna Vinschen 5780e35aa3 * include/cygwin/config.h (_STDIO_BSD_SEMANTICS): Define as 1. 2014-01-17 10:56:25 +00:00
Christopher Faylor ae5b40a65b * dtable.h (dtable::lock): Make static. 2014-01-16 18:40:13 +00:00
Christopher Faylor 716c3014a6 . 2014-01-08 16:55:23 +00:00
Christopher Faylor 8aca67421d * exceptions.h (cygwin_exception::open_stackdumpfile): Move old function into
class.
(cygwin_exception::h): New member.
(cygwin_exception::cygwin_exception): Initialize h to NULL.
* exceptions.cc (cygwin_exception::open_stackdumpfile): Move into
cygwin_exception class.  Use 'h' class member.
(cygwin_exception::dumpstack): Close stack dump file handle if opened.
2014-01-08 16:51:20 +00:00
Corinna Vinschen 6d49b42a95 * faq-programming.xml: Update packages needed to build Cygwin. 2014-01-07 14:54:58 +00:00
Christopher Faylor 20ac3f6c3b Recreate 2014-01-05 00:09:39 +00:00
Christopher Faylor 36383c6f6e * fhandler.h: Update copyright.
(cltype): New enum.
(dev_console::console_attrs): Define struct name.
(dev_console::console_attrs::set_cl_x): New function.
(dev_console::console_attrs::set_cl_y): New function.
(fhandler_console::clear_screen): Redefine input params.
* fhandler_console.cc: Update copyright.  Throughout, reflect change in
arguments to fhandler_console::clear_screeen.
(fhandler_console::mouse_aware): Simplify logic slightly.
(fhandler_console::scroll_screen): Remove hopefully obsolete win95 code.
(dev_console::console_attrs::set_cl_x): New function.
(dev_console::console_attrs::set_cl_y): New function.
(fhandler_console::clear_screen): Redefine input params.  Calculate position
based on enum value.
(region_split): Change arguments.  Simplify.
(ReadConsoleOutputWrapper): Remove coord argument since we now always use 0, 0.
Send extra arguments to region_split.
2014-01-04 23:58:32 +00:00
Christopher Faylor 1affdef86f . 2013-12-31 22:27:12 +00:00
Christopher Faylor 7b52fd6713 * fhandler_console.cc (region_split): New function.
(delta): Ditto.
(ReadConsoleOutputWrapper): Ditto.
(fhandler_console::char_command): Use ReadConsoleOutputWrapper to avoid OOM
condition from ReadConsoleOutputW.  Add more debugging.
2013-12-31 22:19:07 +00:00
Christopher Faylor 53b14dc2b1 * strace.cc (strace::vsprntf): Fix potential (if unlikely) use of uninitialized
variable.
2013-12-22 07:07:48 +00:00
Corinna Vinschen 5536f9210f *** empty log message *** 2013-12-18 20:50:04 +00:00
Christopher Faylor 5730605d55 . 2013-12-18 17:49:51 +00:00
Christopher Faylor ccb3158c4f * dcrt0.cc (dll_crt0_1): Remove NtSetTimerResolution.
* pinfo.cc (pinfo::init): Increase wait interval when waiting for procinfo to
stabilize.
2013-12-18 17:44:20 +00:00
Christopher Faylor 27c6e45ea3 * autoload.cc (timeBeginPeriod): Delete.
* dcrt0.cc (dll_crt0_1): Use NtSetTimerResolution rather than timeBeginPeriod.
2013-12-18 04:39:36 +00:00
Christopher Faylor e9da9dfb94 * autoload.cc (timeBeginPeriod): Autoload.
* dcrt0.cc (dll_crt0_1): Use timeBeginPeriod to set default resolution to 1 ms.
* pinfo.cc (pinfo::thisproc): Set ppid for redirected _pinfo blocks too.
(pinfo::init): Avoid using VirtualQuery.  Just rely on the assumption that
procinfo will be populated.
* pinfo.h (_pinfo::ppid): Move into redirected block.
2013-12-18 04:28:46 +00:00
Christopher Faylor 13621d2ef8 * external.cc (fillout_pinfo): Remove nonsensical loop.
* fork.cc (frok::parent): When initializing pinfo for child new PID_NEW flag +
actual defined constant rather than raw number.  Don't set start_time here.
* pinfo.cc (pinfo::thisproc): Use PID_NEW when initializing pinfo.  Avoid
checking h for NULL multiple times.  Don't set start_time here.
(pinfo_init): Aways set ppid last.  Tweak strace output.
(pinfo::init): Handle new PID_NEW flag.  Wait for shared memory to contain
useful information.  Set start_time if PID_NEW.
(_onreturn:h): Define as HANDLE rather than HANDLE *.
(_onreturn::~onreturn): Accommodate h definition change.
(_onreturn::no_close_handle): Rename from no_close_p_handle.  Take a pinfo arg
and set hProcess to h before zeroing.
(winpids::add): Don't open a handle to our own process.  Change logic
associated with when a handle gets closed.  Accommodate no_close_handle
changes.
(winpids::enum_processes): Simplify process enumeration loop.
(winpids::set): Eliminate ill-considered malloc locking.
* sigproc.cc (proc_subproc): Always set ppid last.
2013-12-18 03:58:11 +00:00
Christopher Faylor 1147c2111d * sigproc.cc (sig_send): Set PIPE_NOWAIT for pipes which are not us. 2013-12-18 03:01:39 +00:00
Christopher Faylor 891b1e7e22 * fhandler.h (fhandler_pty_master::~fhandler_pty_master): Delete.
* fhandler_tty.cc (fhandler_pty_master::~fhandler_pty_master): Ditto.
2013-12-17 19:05:26 +00:00
Corinna Vinschen f51db32d8c * syscalls.cc (NT_TRANSACTIONAL_ERROR): Define.
(stop_transaction): Take "trans" HANDLE by reference and set it to
	NULL after closing it.
	(unlink_nt): If NtOpenFile fails due to a transactional error, stop
	transaction and retry NtOpenFile.  Simplify check for having to call
	stop_transaction.
	(rename): If NtOpenFile fails due to a transactional error, stop
	transaction and retry NtOpenFile in both affected cases.  Simplify check
	for having to call stop_transaction and add comment from unlink_nt.
2013-12-11 12:12:12 +00:00
Corinna Vinschen c28222be54 * mount.cc (fs_info::update): Fix formatting. 2013-12-11 10:24:52 +00:00
Corinna Vinschen f2988299eb * fhandler.h (fhandler_dev_clipboard): Add private member
cygnativeformat.  Declare private method set_clipboard.
	* fhandler_clipboard.cc (cygnativeformat): Convert static variable to
	fhandler_dev_clipboard member.
	(fhandler_dev_clipboard::set_clipboard): Convert from static function
	to fhandler_dev_clipboard method.
2013-12-10 21:05:23 +00:00
Christopher Faylor a3afe81551 signal hang 2013-12-09 20:47:13 +00:00
Christopher Faylor ae8456bdf2 * globals.cc (hntdll): Define/declare.
* exceptions.cc (inside_kernel): Don't call GetModuleFileName if we know we're
in ntdll.
* sigproc.cc (wait_sig): Initialize hntdll.
2013-12-09 20:32:24 +00:00
Corinna Vinschen db0d50a67d * include/cygwin/stdlib.h (initstate, random, setstate, srandom):
Harden _XOPEN_SOURCE guard against applications defining _XOPEN_SOURCE
	with empty value.
2013-12-09 10:12:42 +00:00
Corinna Vinschen 4726a0e769 * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 28. 2013-12-08 13:42:16 +00:00
Corinna Vinschen 9a0027836f *** empty log message *** 2013-12-08 13:38:27 +00:00
Corinna Vinschen 17bb9160d5 * new-features.xml (ov-new1.7.26): Add new section. 2013-12-07 10:12:55 +00:00
Corinna Vinschen 7630387c51 * path.cc (symlink_native): Workaround Windows 8.1 bug: Drop long path
prefix from symlink target path.  Add comment to explain why.
2013-12-07 10:12:25 +00:00
Christopher Faylor 870f29b5c3 * syscalls.cc (dup): Use cygheap_fdnew properly. 2013-12-06 15:38:21 +00:00
Christopher Faylor 09244c002e * cygheap.h (cygheap_fdnew): Avoid setting errno directly since it will have
been set by a previous function.
* dtable.h (dtable::extend): Accept second size_t argument.
* dtable.cc (dtable::extend): Accept second "min" argument which allows
checking for OPEN_MAX_MAX boundary conditions.
(dtable_init): Accommodate second argument to dtable::extend.
(dtable::find_unused_handle): Ditto.
* syscalls.cc (setdtablesize): Ditto.
(dup): Return any error passed by cygheap_fdnew() directly.
(getdtablesize): Just return dtable size directly.
2013-12-05 19:43:34 +00:00
Christopher Faylor 9915ebec8a * dtable.cc (dtable::find_unused_handle): When extending, always make sure that
there is a NOFILE_INCR chunk following the free fd.
2013-12-04 17:55:17 +00:00
Christopher Faylor d924d6b583 * configure.ac: Back out stupid change.
* configure: Regenerate.
2013-12-03 20:51:05 +00:00
Christopher Faylor 4bf6a52173 * select.cc (select): Add workaround for, as yet undebugged, pathological case. 2013-12-03 20:28:55 +00:00
Christopher Faylor d7f07b3dde * configure.ac: Don't require 64-bit compiler for 32-bit builds.
* configure: Regenerate.
2013-12-03 18:37:40 +00:00
Christopher Faylor 9262c05537 * dtable.cc (dtable::find_unused_handle): Break out of the right loop. 2013-12-01 19:17:56 +00:00
Christopher Faylor f456b9f6f8 * dtable.cc (dtable::find_unused_handle): Fix off-by-one error. Always exit
through the bottom.
(cygwin_attach_handle_to_fd): Make sure that fd tab is locked for the duration
of this function.
* dtable.h (dtable::lock): Make public.
(dtable::unlock): Ditto.
(dtable): Remove friends.
2013-12-01 17:52:48 +00:00
Corinna Vinschen 10a5939224 Fix ChangeLog entry 2013-12-01 10:47:29 +00:00
Corinna Vinschen eeaa47ef21 * dtable.cc (dtable::extend): Change local variable new_size to size_t
as well.

	* thread.cc: Fix comment.
2013-12-01 10:27:16 +00:00
Christopher Faylor bc54373f85 . 2013-12-01 02:58:03 +00:00
Christopher Faylor 499494d2cc * dtable.h (dtable::first_fd_for_open): Change declaration to size_t.
(dtable::extend): Change parameter to size_t.
(dtable::find_unused_handle): Ditto.
* dtable.cc: Remove now-unused header.
(dtable::extend): Remove pointless test.  Change parameter to size_t.
(dtable::find_unused_handle): Rework to avoid MAX calculation in extend() call.
Change parameter to size_t.
2013-12-01 02:52:54 +00:00
Christopher Faylor 483c843a6a * dtable.cc (build_fh_pc): When creating an archetype, use native name rather
than unix name if name doesn't exist.
2013-12-01 02:09:22 +00:00
Christopher Faylor 8116e5e59b * include/cygwin/version.h (CYGWIN_VERSION_DLL_MINOR): Bump to 27. 2013-11-29 13:31:54 +00:00