Commit Graph

7877 Commits

Author SHA1 Message Date
Christopher Faylor d0e99ecc19 * ps.cc (main): Return 0 if pid found. 2009-12-18 03:34:59 +00:00
Corinna Vinschen 314c2d2fed * syscalls.cc (try_to_bin): Handle remote shares as well. Just rename
files in this case, instead of moving them to the recycler.  Create
	even more unique filename.  Add comment to explain filename.
	(unlink_nt): Remove code returning with EBUSY on remote shares.
	Set bin_stat to move_to_bin except on NFS.  Add comment to explain.
2009-12-17 18:33:05 +00:00
Eric Blake 214f44da10 * signal.cc (nanosleep): Support 'infinite' sleep times.
(sleep): Avoid uninitialized memory.
2009-12-17 14:04:04 +00:00
Corinna Vinschen beeae48288 * fhandler_console.cc (read): Detect and handle mouse wheel scrolling
events (for completion of mouse reporting mode 1000) and mouse
	movement events (for additional mouse reporting modes 1002 and 1003).
	Use mouse_aware() as a guard and only condition for mouse
	reporting in order to enforce consistence of read() and select().
	Add focus reports (for additional focus reporting mode 1004).
	(mouse_aware): Enable detection of additional mouse events for select().
	Tune function to precisely match actual reporting criteria.
	Move adjustment of mouse position (by window scroll offset)
	here to avoid duplicate code.
	(char_command): Initialization of enhanced mouse reporting modes.
	Initialization of focus reporting mode.
	* fhandler.h (use_mouse): Change flag (bool->int) to indicate
	additional mouse modes. Add flag to indicate focus reporting.
	(mouse_aware): Move enhanced function into fhandler_console.cc.
	* select.cc (peek_console): Use modified mouse_aware() for more
	general detection of mouse events. Also check for focus reports.
2009-12-16 14:56:10 +00:00
Corinna Vinschen 7077c48e54 * regtool.cc: Throughout, convert all registry calls to wide char
calls and use string conversion according to current locale.
	(longopts): Change "dword-le" to "dword-be", as was originally
	intended.
	(usage): Change usage accordingly.
	(print_version): Simplify copyright dates in output.
	(cmd_list): Handle REG_LINK like REG_SZ.
	(cmd_get): Ditto.
	(main): Call setlocale.
	* utils.sgml (regtool): Fix options and add missing descriptions for
	new features.
2009-12-16 14:02:57 +00:00
Corinna Vinschen d1600b38c0 * registry.cc (cygnus_class): Remove.
(reg_key::build_reg): Don't set class when creating key.
2009-12-16 13:09:46 +00:00
Corinna Vinschen 2f5d8f7bd0 * net.cc (cygwin_setsockopt): Only skip calling setsockopt(SO_REUSEADDR)
on stream sockets under systems supporting enhanced socket security.
2009-12-15 17:08:20 +00:00
Corinna Vinschen f04f6d49fa * fhandler_console.cc (char_command): Fix code to select dim mode
to 2 rather than 9.  Add entries for mode 22 (normal, not bold)
	28 (visible, not invisible), 25 (not blinking).
2009-12-15 12:46:40 +00:00
Corinna Vinschen a3bb10f356 * faq-setup.xml (faq.setup.mirror): Fix URL to wget. 2009-12-14 17:15:51 +00:00
Corinna Vinschen 5d5594597e * libc/getopt.c (getopt_internal): Set optreset according to optind
setting earlier.  Reevaluate POSIXLY_CORRECT if optreset is set to !0.
	Handle a leading '-' in options independently of posixly_correct.
2009-12-14 10:47:25 +00:00
Christopher Faylor d0f9de23a1 * fhandler_fifo.cc (fhandler_fifo::open): Avoid resetting errno after it has
been explicitly set.
* include/cygwin/version.h: Bump DLL minor version number to 2.
2009-12-09 16:52:43 +00:00
Corinna Vinschen 6d67afbe9c * include/cygwin/version.h: Bump DLL minor version number to 1. 2009-12-06 12:24:34 +00:00
Corinna Vinschen 2bc3381e5c * fhandler_socket.cc (send_internal): Don't split datagram messages
into pieces.

	* syslog.cc (vsyslog): Set default facility to LOG_USER if it hasn't
	been set yet.
2009-12-02 15:23:03 +00:00
Corinna Vinschen 725d792fe1 * setup2.sgml (setup-env): Clarify that Windows environment gets
copied over.  Add paragraph about TMP, TEMP, and TMPDIR.
2009-12-02 09:36:54 +00:00
Corinna Vinschen b4a3a3e367 * fhandler_registry.cc (fhandler_registry::open): Mark /proc/registry
directory and siblings as nohandle fhandler.
2009-12-01 16:31:04 +00:00
Christopher Faylor c84fd8fe23 * speclib: Use last dll found since that's the real name of the cygwin DLL. 2009-11-30 15:40:23 +00:00
Corinna Vinschen 19ac72547f * setfacl.c (getaclentry): Allow to delete default entries for the
owner and owner group.
2009-11-29 14:28:29 +00:00
Chris Sutcliffe ff928075e9 2009-11-29 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/_mingw.h: Increment version to 3.17.
2009-11-28 06:07:27 +00:00
Chris Sutcliffe bde3635669 2009-11-25 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* mingwex/gdtoa/misc.c: Fix security vulnerability in gdtoa:
 http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2009-0689
2009-11-28 05:28:35 +00:00
Corinna Vinschen 667d9ad130 * fhandler_disk_file.cc (fhandler_base::fstat_helper): Fix typos in
comments.  Always open file synchronized when reading header bytes,
	otherwise suffer stack corruption.
2009-11-27 14:27:22 +00:00
Corinna Vinschen 3449d470ba * cygcheck.cc (dump_sysinfo): Fix typo in products. 2009-11-27 10:01:50 +00:00
Corinna Vinschen 7bdbf062cd * dtable.cc (dtable::stdio_init): Use GetCurrentProcess() rather than
hMainProc as process handle when duplicating the stdout handle.
	Explain why.  Add Win32 error code to debug output.
2009-11-26 10:58:06 +00:00
Corinna Vinschen 27bbefdefd * fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add
socket handle value to debug output.
	(fhandler_socket::fixup_after_fork): Ditto.  Make new socket handle
	OVERLAPPED, just as if it has been created with socket().
	* net.cc (fdsock): Close duplicated socket and explain why.  Disable
	the entire WSADuplicateSocket test for now and explain why.
2009-11-23 14:50:14 +00:00
Corinna Vinschen 013e402bfc * fhandler_socket.cc (fhandler_socket::set_close_on_exec): Only call
fhandler_base::set_close_on_exec for inheritable sockets.
2009-11-23 12:21:39 +00:00
Corinna Vinschen d9e9c7b5a7 * globals.cc (ro_u_dll): New R/O unicode string.
* syscalls.cc (nt_path_has_executable_suffix): Add ro_u_dll to
	blessed_executable_suffixes array.  Explain why.
2009-11-21 12:44:13 +00:00
Chris Sutcliffe fe6f5bbeaa 2009-20-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shlobj.h (SHParseDisplayName): Fix definition.
2009-11-21 05:26:02 +00:00
Chris Sutcliffe 3cd3c5b30c 2009-20-10 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.14.
        * Makefile.in: Ditto.
2009-11-21 03:46:37 +00:00
Chris Sutcliffe bed4952298 2009-20-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shlobj.h (SHParseDisplayName): Define.

        Thanks to James Roberts-Thomson for the report.
2009-11-21 03:25:23 +00:00
Chris Sutcliffe 03312ffc1f 2009-20-10 Chris Sutcliffe <ir0n3h4d@users.sourceforge.net>
* include/wingdi.h (ENHMFENUMPROC): Correct definition.

        Thanks to Alexander Vassilev for the report.
2009-11-21 00:55:51 +00:00
Chris Sutcliffe 0dcfbad035 2009-20-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/iprtrmib.h (MIB_IPADDRROW): Correct definition.

        Thanks to Thomas Denk for the report.
2009-11-21 00:44:50 +00:00
Chris Sutcliffe 67779b719c 2009-20-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/winbase.h (UnmapViewOfFile): Correct definition.

        Thanks to Dimitry Sibiryakov for the report.
2009-11-21 00:38:55 +00:00
Chris Sutcliffe 626e7233d9 2009-20-10 Aleksey Chernov <virxkane@users.sourceforge.net>
* include/sspi.h: Include ntsecapi.h to correct postgresql build error.
2009-11-20 23:59:11 +00:00
Chris Sutcliffe 547f15d128 2009-20-10 Heiko Hund <heiko@ist.eigentlich.net>
* include/commctrl.h (GetMUILanguage, InitMUILanguage): Add prototypes.
        * lib/comctl32.def (GetMUILanguage, InitMUILanguage): Define.
2009-11-20 23:54:02 +00:00
Chris Sutcliffe 21d105b7c6 2009-20-10 Michael James <james.me@gmail.com>
* include/wingdi.h (CLEARTYPE_QUALITY): Define.
        * include/winuser.h (WM_KEYLAST): Alternative definition when _WIN32_WINNT
        >= 0x0501.
        (WM_UNICHAR,UNICODE_NOCHAR): Define.
        * lib/comctl32.def (DefSubclassProc@16,GetWindowSubclass@16,
        RemoveWindowSubclass@12): Add exports.
        * lib/gdi32.def (GetDCBrushColor@4,GetDCPenColor@4): Add exports.
2009-11-20 23:46:05 +00:00
Chris Sutcliffe 64d9a4c6e6 2009-20-10 Jarkko Sakkinen <jarkko.sakkinen@iki.fi>
* include/winuser.h (WM_TOUCHMOVE, WM_TOUCHDOWN, WM_TOUCHUP,
        TOUCHEVENTF_DOWN, TOUCHEVENTF_INRANGE, TOUCHEVENTF_MOVE,
        TOUCHEVENTF_NOCOALESCE, TOUCHEVENTF_PALM, TOUCHEVENTF_PEN,
        TOUCHEVENTF_PRIMARY, TOUCHEVENTF_UP, TOUCHEVENTMASKF_CONTACTAREA,
        TOUCHEVENTMASKF_EXTRAINFO, TOUCHEVENTMASKF_TIMEFROMSYSTEM, TOUCHINPUT,
        CloseTouchInputHandle, GetTouchInputInfo, IsTouchWindow,
        RegisterTouchWindow, UnregisterTouchWindow): Define.
        * lib/user32.def (CloseTouchInputHandle, GetTouchInputInfo, IsTouchWindow,
        RegisterTouchWindow, UnregisterTouchWindow): Define.
2009-11-20 23:32:27 +00:00
Chris Sutcliffe 7c404cf4ed 2009-20-10 Dmitry Potapov <dpotapov@users.sourceforge.net>
* include/winver.h (VerQueryValue[AW]): Correct definition.
2009-11-20 23:16:40 +00:00
Chris Sutcliffe b87c3e2791 2009-20-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shlobj.h (SHARD): Add enum.
        (SHARD_PATH): Define based on UNICODE.

        Thanks to Jacek Caban for the report.
2009-11-20 15:14:17 +00:00
Corinna Vinschen 9fa63f7a5e * flock.cc (fhandler_disk_file::lock): Disable a shortcut from the
original BSD code, but keep it in and documented why we can't use it.
2009-11-18 20:05:46 +00:00
Corinna Vinschen 7d5ae9ccf7 * overview2.sgml (ov-hi-files): Remove reference to root directory when
explaining fstab content.  Add paragraph about Extended Attributes.
	Discourage chroot.
2009-11-18 16:07:05 +00:00
Corinna Vinschen b1d699c434 * ntea.cc (read_ea): Always add length of "user." prefix, not only
on Samba.  Change comment.
2009-11-18 15:57:08 +00:00
Corinna Vinschen 7b426e9f4a * ntea.cc (read_ea): Try to open file first to have more sensible
error codes.  Always refuse non "user." EAs for Linux compatibility
	and return EOPNOTSUPP.  Fix handling of empty (== non-existant) EAs.
	Always prepend "user." prefix to EA names.
	(write_ea): Try to open file first to have more sensible error codes.
	Always refuse non "user." EAs for Linux compatibility and return
	EOPNOTSUPP.  Delay skipping "user." prefix until after potential call
	to read_ea.
2009-11-18 11:57:41 +00:00
Corinna Vinschen b14f53a8ec Reintegrate socket duplication via WSADuplicateSocket/WSASocket.
* autoload.cc (WSADuplicateSocketW): Define.
	(WSASocketW): Define.
	* dtable.cc (dtable::release): Call dec_need_fixup_before if necessary.
	(dtable::fixup_before_fork): New function.
	(dtable::fixup_before_exec): New function.
	* dtable.h (class dtable): Add member cnt_need_fixup_before.  Add
	declarations for above new functions.
	(dtable::dec_need_fixup_before): New inline method.
	(dtable::inc_need_fixup_before): New inline method.
	(dtable::need_fixup_before): New inline method.
	* fhandler.h (fhandler_base::fixup_before_fork_exec): New virtual
	method.
	(fhandler_base::need_fixup_before): New virtual method.
	(class fhandler_socket): Add member prot_info_ptr.
	(fhandler_socket::init_fixup_before): Declare.
	(fhandler_socket::need_fixup_before): New inline method.
	(fhandler_socket::fixup_before_fork_exec): Declare.
	(fhandler_socket::fixup_after_exec): Declare.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Initialize
	prot_info_ptr to NULL.
	(fhandler_socket::~fhandler_socket): Free prot_info_ptr conditionally.
	(fhandler_socket::init_fixup_before): New method.
	(fhandler_socket::fixup_before_fork_exec): Ditto.
	(fhandler_socket::fixup_after_fork): Use WSASocketW to duplicate
	socket if necessary.
	(fhandler_socket::fixup_after_exec): New method.
	(fhandler_socket::dup): Use fixup_before_fork_exec/fixup_after_fork
	to duplicate socket if necessary.
	* fork.cc (frok::parent): Start child suspended if some fhandler
	needs fixup before fork.  If so, call dtable::fixup_before_fork after
	CreateProcess and resume child.
	* net.cc (fdsock): Try to find out if socket needs fixup before and
	initialize socket accordingly.  Add HUGE comment to explain what happens
	and why.
	* spawn.cc (spawn_guts): Start child suspended if some fhandler needs
	fixup before exec.  If so, call dtable::fixup_before_exec after
	CreateProcess.
2009-11-17 10:43:01 +00:00
Eric Blake d01a44977f Fix setenv and unsetenv corner cases.
* environ.cc (setenv): Detect invalid argument.
(unsetenv): Distinguish EFAULT from EINVAL.
2009-11-16 20:05:49 +00:00
Corinna Vinschen b755d497f5 * pathnames.sgml (pathnames-specialchars): Fix typos. 2009-11-16 12:30:00 +00:00
Corinna Vinschen 969afaf753 * Makefile.in (cygserver.exe): Link with -static to avoid linking
against cygstdc++-6.dll due to references to __cxa_pure_virtual.
2009-11-16 08:50:07 +00:00
Chris Sutcliffe 88dc5cc365 2009-14-09 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/wingdi.h (_devicemodeW, _devicemodeA): Correct definition.

        Thanks to Bruno Martinez for the report.
2009-11-14 19:58:41 +00:00
Chris Sutcliffe 5e80d7d546 2009-14-09 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/shlobj.h (IDO_SHGIOI_SHARE, IDO_SHGIOI_LINK, IDO_SHGIOI_SLOWFILE,
        IDO_SHGIOI_DEFAULT, SHGetIconOverlayIndexW, SHGetIconOverlayIndexA,
        SHGetIconOverlayIndex): Define.

        Thanks to Tim Kosse for report.
2009-11-14 19:47:23 +00:00
Chris Sutcliffe 8b121daba4 2009-11-13 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/io.h (_open_osfhandle): Correct definition.

        Thanks to Alexander Shaduri for the information.
2009-11-14 00:54:58 +00:00
Chris Sutcliffe 3d330d8115 2009-13-09 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/wincon.h (AttachConsole): Correct guard.

        Thanks to Alexander Shaduri for report.
2009-11-14 00:50:50 +00:00
Chris Sutcliffe 35d6a288b2 2009-13-09 Robert Moerland <rjmoerland@users.sourceforge.net>
* include/wininet.h (NTERNET_CACHE_ENTRY_INFOW): Correct definition.
        (DeleteUrlCacheEntryW, DeleteUrlCacheEntryA): Define.
2009-11-14 00:45:35 +00:00