Commit Graph

1558 Commits

Author SHA1 Message Date
Corinna Vinschen 8b6234ca12 * miscfuncs.cc (__check_invalid_read_ptr_errno): Return error, if any. 2001-10-22 11:31:39 +00:00
Christopher Faylor d055070040 * resource.cc (fill_rusage): Perform paranoid zero structure passed to
GetProcessMemoryInfo.
2001-10-22 00:10:46 +00:00
Christopher Faylor 1f0191e542 * autoload.cc: Autoload GetProcessMemoryInfo.
* resource.cc (fill_rusage): Calculate ru_maxrss and ru_majflt entries.
(Bug report on this from Guido Serassio in the squid project).  This requires
including psapi.h.
2001-10-21 23:44:43 +00:00
Christopher Faylor c43c5c1643 * dll_init.cc (dll_list::alloc): Increase retry count to 1000. 2001-10-21 03:38:41 +00:00
Christopher Faylor 3ddb57fb3f fix typo. 2001-10-20 17:35:27 +00:00
Corinna Vinschen 011ec894d2 * mkgroup.c: Avoid compiler warnings.
(print_special): New function.
        (main): Print special accounts by calling print_special().
        * mkpasswd.c: Avoid compiler warnings.
        (enum_users): Print additional U-domain\username info in gecos
        field when SIDs are printed.
        (print_special): New function.
        (main): Print special accounts by calling print_special().
2001-10-20 13:56:09 +00:00
Corinna Vinschen b07891c58b * include/winnetwk.h (WNetGetResourceInformationA): Add declaration.
(WNetGetResourceInformationW): Ditto.
        (WNetGetResourceInformation): Add define.
2001-10-20 10:41:09 +00:00
Christopher Faylor 6fdd213161 * miscfuncs.cc (+__check_invalid_read_ptr_errno): New function.
* syscalls.c (_write): Validate that write buffer is accessible for reading,
not writing.
* winsup.h: Declare new function, increase regparmization of check_* functions.
2001-10-20 05:08:21 +00:00
Corinna Vinschen 5318c49833 * path.cc (getcwd): Allow len == 0 when buf == NULL. 2001-10-19 19:17:04 +00:00
Christopher Faylor da8f3291d1 * syscalls.cc (_read): Validate input pointer.
(_write): Ditto.
(system): Ditto.
2001-10-19 02:27:19 +00:00
Corinna Vinschen e34027611a Patch from Frederic Devernay <Frederic.Devernay@sophia.inria.fr>:
* poll.cc (poll): Call cygwin_select() if any fd is valid.
2001-10-17 18:52:06 +00:00
Corinna Vinschen 081be67e75 * fhandler_raw.cc (fhandler_dev_raw::open): Eliminate compatibility
code since no Win32 device names are used anymore.
        * fhandler_tape.cc (fhandler_dev_tape::tape_set_blocksize): Allow
        0 as blocksize to indicate variable blocksize.
        * path.cc (win32_device_name): Generate NT internal device names
        using upper/lower case names for readability.
        Generate \DosDevices\<letter>: device name for mount table
        compatibility devices.
2001-10-16 20:17:23 +00:00
Corinna Vinschen 2de2be2235 Forgot ChangeLog 2001-10-16 17:32:42 +00:00
Christopher Faylor 1a2cca85d2 * fhandler.cc (fhandler_base::fork_fixup): Guard against compiler warning. 2001-10-16 16:58:28 +00:00
Corinna Vinschen b20e2ee663 * fhandler_tape.cc (fhandler_dev_tape::tape_status): Report
EOTWarningZoneSize in get->mt_eotwarningzonesize.
        * include/cygwin/mtio.h: Define DEFTAPE.
        (struct mtget): Add member `mt_eotwarningzonesize'. Add a comment.
        * include/cygwin/version.h: Bump API minor version to 47.
2001-10-16 16:28:39 +00:00
Corinna Vinschen 0aa019b960 * pathnames.sgml: Cleanup raw device text to be more coherent. 2001-10-16 16:03:22 +00:00
Corinna Vinschen 7b46bb01e1 * pathnames.sgml: Add description for new fixed device paths. 2001-10-16 15:16:02 +00:00
Corinna Vinschen 990690655c * autoload.cc: Add load statement for `NtOpenFile'.
* fhandler.h (fhandler_dev_raw::get_unit): New method.
	(fhandler_dev_tape::norewind): Eliminate.
	(fhandler_dev_tape::is_rewind_device): New method.
	* fhandler_raw.cc (fhandler_dev_raw::open): Open new
	fixed device name devices using NT internal method.
	Keep calling fhandler_base::open() for old mount table
	device mapping compatibility devices.
	(fhandler_dev_raw::fstat): Eliminate.  Settings are done
	by fhandler_base::fstat() already.
	* fhandler_tape.cc: Remove `norewind' usage throughout.
	* ntdll.h: Define FILE_SYNCHRONOUS_IO_NONALERT.
	Define struct _IO_STATUS_BLOCK.
	Declare NtOpenFile().
	* path.cc (get_raw_device_number): Add new approach for
	using fixed device names.
	(win32_device_name): Ditto.
	(get_device_number): Ditto.  Require POSIX path to begin
	with "/dev/".
	(mount_info::conv_to_win32_path): Call win32_device_name()
	instead of get_device_number() after evaluating mount points
	to allow changing the win32 destination path again.
	* security.cc (str2buf2uni): Remove `static' to be able to
	call function from fhandler_dev_raw::open().
	* wincap.cc: Set flag has_raw_devices appropriately.
	* wincap.h: Add flag has_raw_devices.
2001-10-16 14:53:26 +00:00
Christopher Faylor 2ac3bab68d * cygheap.h (cygheap_fdget::cygheap_fdget): Remove debugging operation from
set_errno.
2001-10-16 14:43:36 +00:00
Christopher Faylor 5a23087628 * mmap.cc (mmap): Assign 'fh' from cygheap_fdget. Use 'fh' everywhere. 2001-10-16 14:04:26 +00:00
Christopher Faylor f636c08124 minor reformat. 2001-10-16 13:49:38 +00:00
Christopher Faylor 0f4db8cbe0 * cygerrno.h (set_errno): Define more informative version of this function for
debugging.
(__set_errno): Declare when DEBUGGING.
* cygheap.h (cygheap_fdget::cygheap_fdget): Add a flag to control when errno is
set.
* debug.cc (__set_errno): New function.
* fcntl.cc (_fcntl): Fix so that correct fd is used for second argument to
dup2.
* syscalls.cc (_cygwin_istext_for_stdio): Don't set errno here when using
cygheap_fdget.
2001-10-16 03:31:50 +00:00
Christopher Faylor df63bd490a * fhandler.cc (fhandler_base::fork_fixup): Don't protect handle.
* dlfcn.cc: Fix to confirm to coding standards.  Reorganize includes throughout
to accomodate new cygheap.h usage.
* cygheap.h (cygheap_fdmanip): New class: simplifies locking and retrieval of
fds from cygheap->fdtab.
(cygheap_fdget): Ditto.
(cygheap_fdnew): Ditto.
* fcntl.cc (_fcntl): Use new method to lock fdtab and retrieve info.
* ioctl.cc (ioctl): Ditto.
* mmap.cc (mmap): Ditto.
* net.cc: Ditto, throughout.
* passwd.cc (getpass): Ditto.
* path.cc (fchdir): Ditto.
* pipe.cc (make_pipe): Ditto.
* sec_acl.cc (facl): Ditto.
* syscalls.cc: Ditto, throughout.
* termios.cc: Ditto, throughout.
2001-10-15 23:39:33 +00:00
David Starks-Browning fff126983e new known problem "hang or core-dump during make" 2001-10-15 22:32:46 +00:00
David Starks-Browning 97eab19f83 cvs+ssh problem on Win9x now FITNR. 2001-10-15 21:51:36 +00:00
Christopher Faylor c2198f849c * mkpasswd.cc (enum_users): Shorten "unused" passwd field. 2001-10-15 15:44:37 +00:00
Corinna Vinschen 271a33443c * uname.cc (uname): Use `wProcessorLevel' unless OS sets it wrong.
Use `dwProcessorType' then instead.
        * wincap.cc: Set flag has_valid_processorlevel appropriately.
        * wincap.h: Add flag has_valid_processorlevel.
2001-10-15 09:41:18 +00:00
Christopher Faylor 48372ea6f1 * dtable.cc (dtable::build_fhandler_from_name): Use PC_FULL to determine path
name.
* fork.cc (fork_parent): Correct the "unable to allocate forker_finished event"
error message.  It named the wrong event before.
2001-10-14 15:49:13 +00:00
Christopher Faylor 611d92e24c * autoload.cc (load_wsock32): Declare dummy function to force loading of
winsock.
* fhandler.cc (fhandler_base::set_inheritance): Make debugging output more
verbose.
* fhandler_socket.cc (fhandler_socket::fixup_after_fork): Force loading of
winsock32 if winsock2 not available.
* net.cc (set_socket_inheritance): Use DuplicateHandle in all cases to set
inheritance correctly.
(fdsock): Use winsock2_active macro to determine when to set socket
inheritance.  Remove fdtab resource locking since this function should already
be protected.
(cygwin_accept): Simplify logic.  Ensure that fdtab unlock is not called
inappropriately.
(cygwin_rcmd): Use fdtab locking.
(cygwin_rresvport): Ditto.
(cygwin_rexec): Ditto.
* select.cc (peek_socket): Set errno appropriately if winsock select fails.
* winsup.h: Declare check_pty_fds.
* syscalls.cc (check_pty_fds): Rename from check_ttys_fds.  Also check pty
master.
(setsid): Use check_pty_fds.
* dtable.cc (dtable::dec_console_fds): Add check on pty fds.
2001-10-14 04:14:24 +00:00
Christopher Faylor 0476bae576 * fhandler_dsp.cc (fhandler_dsp::ioctl): Return 0 for successful
SNDCTL_DSP_GETBLKSIZE operation.  Remove obsolete 'name' arg from fhandler_*
constructors throughout.
* winsup.h (winsock_active): New macro.
(winsock2_active): Ditto.
* autoload.cc (wsock_init): Use new macros to decide if winsock or winsock2 is
loaded.
(nonexist_wsock32): Dummy function to force winsock load.
(nonexist_ws2_32): Dummy function to force winsock2 load.
* fhandler.h (fhandler_socket::fstat): Declare new method.  Currently unused.
* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Check that
winsock2 is active before trying WSADuplicateSocketA.
(fhandler_socket::fixup_after_fork): Add extra check for winsock2_active.
Otherwise use iffy procedures for Windows 95.
(fhandler_socket::fixup_after_exec): Add debugging.
(fhandler_socket::dup): Add debugging.
(fhandler_socket::fstat): New method.
(fhandler_socket::set_close_on_exec): Attempt to perform iffy stuff on Windows
95.
* errno.cc (_sys_nerr): Work around compiler strangeness.
* pinfo.cc (winpids::add): Add extra element at end of allocated array for
setting to NULL.
(winpids::enumNT): Ditto.
(winpids::init): Don't modify pidlist if it hasn't been allocated
(possibly due to malloc problem).
2001-10-13 17:23:35 +00:00
Christopher Faylor 5dec13e179 * Makefile.in: Allow stdinc searching for dumper. 2001-10-13 05:33:47 +00:00
Christopher Faylor bc6ed54986 * autoload.cc (wsock_init): Reorganize slightly to accomodate a new compiler. 2001-10-13 01:35:15 +00:00
Christopher Faylor cb1826572c * Makefile.in: Add -nostdinc to CXXFLAGS. 2001-10-13 00:59:20 +00:00
Christopher Faylor 338420c918 * Makefile.in: Comment out install for now. 2001-10-12 20:02:41 +00:00
Christopher Faylor 0aa753540a * Makefile.in: Accomodate changes to w32api_include macro. 2001-10-12 19:49:29 +00:00
Christopher Faylor 0055a6c6c9 * Makefile.common: Perform more include file testing trickery. 2001-10-12 12:52:05 +00:00
Christopher Faylor c5e7ccacff Red Hatize 2001-10-12 01:51:21 +00:00
Egor Duda 5844588b74 * net.cc (cygwin_sendto): Use correct socket address when sending
data to AF_UNIX socket.
2001-10-11 09:46:21 +00:00
Corinna Vinschen f6a85cddc8 * net.cc (get_95_ifconf): Using other registry values pointing to
correct networkdevice identification for Windows95.
2001-10-10 19:28:19 +00:00
David Starks-Browning a0d03b7eaf New entries:
My application cannot locate cygncurses5.dll!!!
	Why is Cygwin suddenly @emph{so} slow?
Modified:
	Why doesn't //c (for C:) work anymore?
2001-10-10 09:21:55 +00:00
Christopher Faylor 57013c31ec Throughout, rename PROC_FORK1 to PROC_FORK.
* child_info.h: Rename PROC_* to _PROC_*.  Define PROC_* with additional
testing magic.  Eliminate old PROC_FORK and rename PROC_FORK1 to PROC_FORK.
* dcrt0.cc (_cygwin_testing_magic): New variable.  Added to magic number in
proc_info.
(alloc_stack): Eliminate old PROC_FORK test.
(dll_crt0_1): Ditto.  Use _PROC_* enums for test.  Subtract
_cygwin_testing_magic from child_proc_info->type so that normal cygwin programs
invoked by test suite programs do not consider themselves to be in a cygwin
environment.
(_dll_crt0): Ditto.  Move environment checks to initial_env function to
conserve on stack space.
(initial_env): New function.  Checks for testing and debugging environment
variables.
* init.cc (cygwin_hmodule): Move declaration.
* winsup.h: Declare variables used for cygwin testing.
2001-10-10 02:32:12 +00:00
Christopher Faylor b2a8510b89 * Makefile.in (MINGW_INCLUDES): Accomodate changes in Makefile.common. 2001-10-10 01:58:33 +00:00
Christopher Faylor bc6aa7e1b4 * Makefile.common: Avoid adding -I options to compile if they already exist in
CC or C*FLAGS.  This prevents warnings from newer versions of gcc.
2001-10-10 01:57:43 +00:00
Christopher Faylor d3fee5eccb * uinfo.cc (internal_getlogin): Reorganize slightly to minimize work in default
condition.
2001-10-09 23:28:24 +00:00
Egor Duda 132a3b30b9 fix typos 2001-10-09 18:12:51 +00:00
Corinna Vinschen e898b6c0c7 * fhandler.cc (fhandler_disk_file::open): Add missing case clash check. 2001-10-09 16:54:18 +00:00
Corinna Vinschen d7f6398556 * winsup.api/mmaptest01.c: Add several tests on mmaps. Use libltp.
* winsup.api/winsup.exp: Link all tests agains libltp.
2001-10-08 12:18:38 +00:00
Christopher Faylor 97405ef5b0 * dtable.cc (dtable::build_fhandler): Allocate correct amount for given
fhandler class.
* fhandler.h (fhandler_union): Properly define rather than relying on
fhandler_console being "big enough".
2001-10-08 05:50:33 +00:00
Christopher Faylor 2c774ac3f3 * external.cc (fillout_pinfo): Reset counter whenever we initialize the pid
list.
2001-10-08 04:26:27 +00:00
Christopher Faylor 12f6d7bc9c * kill.cc (main): Set exit value to 1 on invalid pid. Perform minor cleanup. 2001-10-08 03:06:25 +00:00