Commit Graph

1938 Commits

Author SHA1 Message Date
Christopher Faylor 8adfbe93d9 remove extra mask info 2001-12-04 04:15:15 +00:00
Christopher Faylor de057251e2 remove extra mask info 2001-12-04 04:14:37 +00:00
Christopher Faylor 48f939e29f * cygcheck.cc (usage): Add -c description.
* cygpath.cc (usage): Alphabetize options.
* strace.cc (usage): Ditto.
2001-12-04 04:12:39 +00:00
Christopher Faylor 7543995b74 * net.cc (cygwin_getsockopt): Allow NULL optval.
* path.cc (mount_info::read_cygdrive_info_from_registry): Don't write cygdrive
to registry if it doesn't exist.
2001-12-03 20:09:33 +00:00
Earnie Boyd 6dfcb5a3a9 2001-12-03 Earnie Boyd <earnie@users.sf.net>
* include/accctrl.h: Change \r\n to \n.

2001-11-30  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/ipexport.h (IP_UNIDIRECTIONAL_ADAPTER_ADDRESS):
	Add structure definition.
	* include/iptypes.h (IP_PER_ADAPTER_INFO): Ditto.
	* include/iphlpapi.h (AddIPAddress,CreateProxyArpEntry,
	DeleteIPAddress,DeleteProxyArpEntry,EnableRouter,
	FlushIpNetTable,GetAdapterIndex,GetPerAdapterInfo,
	GetUniDirectionalAdapterInfo,SendARP,SetAdapterIpAddress,
	UnenableRouter) Declare functions.
	* lib/iphlpapi.def: Add function names to import lib.

2001-11-24  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/winnt.h (PACCESS_MASK): Add typedef.
	* include/aclapi.h: New file.
	* include/acctrl.h: New file.
	* lib/advapi32.def: Add missing symbols.
	* lib/test.c: Add #include <aclapi.h>.

2001-11-23  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/winbase.h (OSVERSIONINFO[AW],VER_PLATFORM_WIN32s,
	VER_PLATFORM_WIN32_WINDOWS,VER_PLATFORM_WIN32_NT): Move from
	here ...
	* include/winnt.h: ... to here.
	* include/winbase.h (VerifyVersionInfo[AW]): Add declaration.
	* include/winnt.h (OSVERSIONINFOEX[AW]): Add structure definitions
	and typedefs.
	(VER_NT_WORKSTATION,VER_NT_DOMAIN_CONTROLLER,VER_NT_SERVER):
	Add defines.

2001-11-19  Pierre Muller  <muller@ics.u-strasbg.fr>

	* w32api/include/winnt.h: prepare SSE register support.
	(CONTEXT_EXTENDED_REGISTERS): Add new define.
	(MAXIMUM_SUPPORTED_EXTENSION): New define.
	(struct CONTEXT): ExtendedRegisters field added.

2001-11-16  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/winuser.h (tagALTTABINFO, tagCOMBOBOXINFO,
	tagCURSORINFO, tagMENUBARINFO, tagMENUINFO, tagMONITORINFO
	tagSCROLLBARINFO, tagTITLEBARINFO. tagWINDOWINFO,
	tagLASTINPUTINFO ): Define new structures.
	(EndMenu, GetAltTabInfo[AW],GetComboBoxInfo,GetCursorInfo,
	GetLastInputInfo, GetListBoxInfo, GetMenuBarInfo,
	GetMonitorInfo[AW], GetScrollBarInfo, GetTitleBarInfo,
	GetWindowInfo, GetWindowModuleFileName[AW],GetMenuInfo
	SetMenuInfo): Add new prototypes.
	* lib/user32.def: Add import stubs for above functions.

	* include/winuser.h (IDC_STATIC): Protect against prior
	definition.

2001-11-12  Corinna Vinschen  <corinna@vinschen.de>

	* include/winbase.h (OSVERSIONINFOEX): Add definition.
	* include/winnt.h: Add VER_NT_* and VER_SUITE_* defines.

2001-11-10  Robert Collins  <rbtcollins@hotmail.com>

	* include/winnt.h: Add Danny Smith's text comment about gcc compiler
	warnings with _AUTHORITY #defines.

2001-11-09  Robert Collins  <rbtcollins@hotmail.com>

	* include/winnt.h (GetCurrentFiber): Create a prototype before the
	implementation;
	(GetFiberData): Ditto.

2001-11-09  Robert Collins  <rbtcollins@hotmail.com>

	* include/winnt.h: Backout last change.
2001-12-03 19:59:34 +00:00
Christopher Faylor 2a50e3df6f * path.cc (mount_info::conv_to_win32_path): Avoid returning error if cygdrive
== '/'.
(mount_info::cygdrive_win32_path): Return 0 if invalid cygdrive path.
2001-12-03 16:47:18 +00:00
Christopher Faylor 7b80d68f4c minor reformatting. 2001-12-02 05:23:26 +00:00
Christopher Faylor 1cf0d8510a * debug.cc (makethread): Eliminate unneeded function call.
* miscfuncs.cc (tls_ix): Predefine.
* perthread.h (set_reent): Eliminate.
(get_reent): Ditto.
* winbase.h (my_tlsalloc): Use global stack base pointer.  Set newly allocated
location to NULL.
(my_tlssetvalue): Use global stack base pointer.
(my_tlsgetvalue): Ditto.
2001-11-30 06:19:58 +00:00
Christopher Faylor 558f1fb418 * winsup.h: Reorganize to avoid use of experimental stuff.
* shortcut.cc: Move winsup.h first in include order.
2001-11-28 02:36:32 +00:00
Christopher Faylor 0caa03b00a Add attribution. 2001-11-28 01:54:05 +00:00
Christopher Faylor 4d029f3940 * cygwin.din (ualarm): New export.
* dcrt0.cc (_dll_crt0): Add experimental tls storage declaration.
(dll_crt0): Ditto.
* debug.cc (thread_stub): Ditto.
* thread.cc: Minor cleanup.
(__pthread_create): Add experimental tls storage declaration.
* miscfuncs.cc: Define tls index.
* winsup.h: Declare experimental tls storage.
* window.cc (alarm): Use old timer return from setitimer.
(ualarm): New function.
2001-11-28 00:06:35 +00:00
Christopher Faylor 505f9ba17a Revert erroneous checkin. 2001-11-26 20:21:27 +00:00
Christopher Faylor 94c0e197f0 * Makefile.in (libcygwin.a): Use ar commands to build libcygwin.a since adding
an archive doesn't work the way we want it to.
2001-11-26 20:20:42 +00:00
Corinna Vinschen c74b8922ae Add missing ChangeLog entries. 2001-11-25 09:55:15 +00:00
Christopher Faylor ded250563f * fhandler_disk_file.cc (fhandler_cygdrive::readdir): Avoid reporting
inaccessible drives.
2001-11-25 03:28:16 +00:00
Corinna Vinschen 21e379455a * net.cc (cygwin_hstrerror): Allow s == NULL.
(cygwin_rcmd): Add parameter checking.
	(cygwin_rexec): Ditto.
2001-11-24 21:52:28 +00:00
Corinna Vinschen b0fa0e6e0f * net.cc (cygwin_inet_ntoa): Add parameter checking.
(cygwin_inet_network): Return INADDR_NONE instead of 0 in case of
	EFAULT.
	(cygwin_hstrerror): Add parameter checking.
	(cygwin_rresvport): Ditto.
	(socketpair): Ditto.
	* winsup.h (check_null_str): Add extern declaration.
2001-11-24 21:10:00 +00:00
Christopher Faylor 28d3cc021d * path.cc (path_conv::check): Tighten FH_CYGDRIVE check to avoid matching
trailing component, like other devices.
2001-11-24 21:05:00 +00:00
Christopher Faylor 3409763ff3 * autoload.cc (IsDebuggerPresent): Make conditional load since it is not
available everywhere.
* path.cc (mount_info::conv_to_win32_path): Only consider /cygdrive to be
FH_CYGDRIVE, not /cygdrive/x.
2001-11-24 20:57:19 +00:00
Christopher Faylor 53a12585ac * net.cc (inet_makeaddr): Revert previous change. 2001-11-24 17:31:15 +00:00
Christopher Faylor 4e5289d848 * path.cc (chdir): Allow 'cd /cygdrive'. 2001-11-24 03:35:58 +00:00
Christopher Faylor c7cf3563f0 Fix typo. 2001-11-24 03:25:07 +00:00
Christopher Faylor c123b1f3a1 fix typo. 2001-11-24 03:12:41 +00:00
Christopher Faylor 5a64d86941 * dtable.cc (dtable::vfork_parent_restore): Add debugging statement.
* exceptions.cc (try_to_debug): Spin only as long as we don't have a debugger
attached.
* fhandler.h (fhandler_base::set_nohandle): New method.
(fhandler_base::get_nohandle): New method.
* fhandler.cc (fhandler_base::dup): Avoid duplicating handle if there is no
handle.
* fhandler_disk_file.cc (fhandler_disk_file::opendir): Set nohandle flag on
dummy fd.
* Makefile.in: Make intermediate library for eventual inclusion in libcygwin.a
* fhandler.h (fhandler_pipe::fhandler_pipe): Remove default argument setting
since it is no longer used.
* miscfuncs.cc (check_null_str): New function.
(+check_null_str_errno): Ditto.
* net.cc: Add defensive buffer checking throughout.
(cygwin_sendto): Protect against invalid fd.
(cygwin_recvfrom): Ditto.
(cygwin_getpeername): Ditto.
(cygwin_recv): Ditto.
(cygwin_send): Ditto.
* winsup.h: Declare a new function.
* select.cc (set_bits): Fix conditional for setting fd in exceptfds.
* dtable.cc (dtable::build_fhandler): Create fhandler_pipe using correct device
type.
* path.cc (get_devn): Set correct pipe device type from device name.
2001-11-24 03:11:39 +00:00
Christopher Faylor 97a2e0756d * path.cc (conv_path_list): Fix wild indexing into path due to conflicting
methods for setting src pointer.
* dir.cc (opendir): Only pass path_conv argument to opendir, since name is
already part of the fhandler.
* dtable.cc (dtable::build_fhandler): Accomodate new FH_CYGDRIVE type.
* fhandler.cc (fhandler_base::opendir): Nuke name argument.
* fhandler.h: Add FH_CYGDRIVE to "device" enum.
(fhandler_base::opendir): Nuke name argument.
(fhandler_disk_file::opendir): Ditto.
(fhandler_disk_file::fhandler_disk_file): Declare new method which passes
devtype through.
(fhandler_cygdrive): Add elements for tracking drives.
(fhandler_cygdrive::set_drives): Declare new method.
(fhandler_cygdrive::iscygdrive_root): Declare new method.
(fhandler_cygdrive::opendir): Declare new method.
(fhandler_cygdrive::readdir): Declare new method.
(fhandler_cygdrive::telldir): Declare new method.
(fhandler_cygdrive::seekdir): Declare new method.
(fhandler_cygdrive::rewinddir): Declare new method.
(fhandler_cygdrive::closedir): Declare new method.
(fhandler_cygdrive::fstat): Declare new method.
* fhandler_disk_file.cc (fhandler_disk_file::fhandler_disk_file): Define new
method which passes devtype through.
(fhandler_disk_file::open): Tweak debug output.
(fhandler_disk_file::opendir): Nuke first argument.  Use info from path_conv
and class rather than calling fstat.
(fhandler_cygdrive::set_drives): New method.
(fhandler_cygdrive::iscygdrive_root): New method.
(fhandler_cygdrive::opendir): New method.
(fhandler_cygdrive::readdir): New method.
(fhandler_cygdrive::telldir): New method.
(fhandler_cygdrive::seekdir): New method.
(fhandler_cygdrive::rewinddir): New method.
(fhandler_cygdrive::closedir): New method.
(fhandler_cygdrive::fstat): New method.
* path.cc (iscygdrive_device): Assume cygdriveness is already verified.
(path_conv::check): Treat FH_CYGDRIVE "method" as a special case, setting file
attributes as needed.
(mount_info::conv_to_win32_path): Allow stand-alone /cygdrive, meaning "the
directory which contains all of the drives on the system".
(fillout_mntent): Use cyg_tolower for conversions.
(mount_info::cygdrive_win32_path): Replace unused argument with unit number.
* shared_info.h (mount_info::cygdrive_win32_path): Reflect argument change.
2001-11-22 05:59:07 +00:00
Christopher Faylor 53e61a867b * path.cc (cygpath): Don't consider cygpath stuff when trying to derive native
paths.
2001-11-22 00:29:04 +00:00
Corinna Vinschen 87f1a487ed Patch by Pierre Muller <muller@ics.u-strasbg.fr>:
* w32api/include/winnt.h: prepare SSE register support.
	(CONTEXT_EXTENDED_REGISTERS): Add new define.
	(MAXIMUM_SUPPORTED_EXTENSION): New define.
	(struct CONTEXT): ExtendedRegisters field added.
2001-11-21 23:13:59 +00:00
Corinna Vinschen 1d3dc11398 Patch by Mark Bradshaw <bradshaw@staff.crosswalk.com>:
* mkpasswd.c: include lmerr.h
	(main): New -u option to allow specifying a
	specific user.  If specified, groups aren't displayed and
	output is limited to only the specified user.
	(enum_users): If specific user is specified, via -u option,
	display only that user's record.  With -u use NetUserGetInfo
	instead of NetUserEnum.
	(load_netapi): Added netusergetinfo.
2001-11-21 10:39:43 +00:00
Christopher Faylor 7903ee6955 * Makefile.in (DLL_OFILES): Add fhandler_disk_file.o.
* cygheap.h (cygheap_fdnew::operator =): New operator.
* dir.cc: Add invalid struct checking throughout.  Use methods for all
directory manipulation throughout.
* fhandler.cc: Move fhandler_disk_file stuff to own file.
(fhandler_base::opendir): New method.
(fhandler_base::readdir): New method.
(fhandler_base::telldir): New method.
(fhandler_base::seekdir): New method.
(fhandler_base::rewinddir): New method.
(fhandler_base::closedir): New method.
* fhandler_disk_file.cc: New file.
* fhandler.h (fhandler_base): Declare new virtual methods.
(fhandler_disk_file): Ditto.
(fhandler_cygdrive): New class.
* path.cc (conv_path_list): Use strccpy to break apart path.
2001-11-21 06:47:57 +00:00
Christopher Faylor f6a6c2a358 Change copyright. 2001-11-21 04:21:36 +00:00
Egor Duda 62a602939b * winsup.api/pthread/condvar3_1.c: Fix debugging output. 2001-11-17 21:15:47 +00:00
Christopher Faylor 9c6a5c6ea8 * path.cc (conv_path_list): Copy source paths before modifying them. 2001-11-17 20:19:19 +00:00
Corinna Vinschen 33f0f67db7 * strace.cc (main): Change getopt() to getopt_long().
Add support for help and version info.
	Use new parse_mask() function for -m/--mask option.
	(longopts): Add long options structure.
	(opts): Move options string from getopts call to static var.
	(usage): Print usage information.
	(SCCSid): Version info.
	(version): New function for displaying version info.
	(parse_mask): New function supporting parsing of mnemonics,
	hex, and basic expressions in masks.
	(mnemonic2ul): New mnemonic parsing function.
	(tag_mask_mnemonic): New type.
	(mnemonic_table): New table of mnemonics for mnemonic2ul() to
	search through.
2001-11-17 09:48:09 +00:00
Corinna Vinschen 42d292493b * fhandler_raw.cc (fhandler_dev_raw::clear): Don't reset unit.
* fhandler_tape.cc (fhandler_dev_tape::fhandler_dev_tape): Add debug
	output.
2001-11-16 23:28:56 +00:00
Egor Duda 112ef24b52 Fix typo. 2001-11-15 11:27:15 +00:00
Egor Duda 4800c7477b * winsup.api/pthread/: New directory. Ports of pthread functionality
tests ported from pthreads-win32 project.
* winsup.api/pthread/test.h: Commmon declaraions for pthread tests.
* winsup.api/pthread/cleanup2.c: New test.
* winsup.api/pthread/cleanup3.c: Ditto.
* winsup.api/pthread/condvar1.c: Ditto.
* winsup.api/pthread/condvar2.c: Ditto.
* winsup.api/pthread/condvar2_1.c: Ditto.
* winsup.api/pthread/condvar3.c: Ditto.
* winsup.api/pthread/condvar3_1.c: Ditto.
* winsup.api/pthread/condvar3_2.c: Ditto.
* winsup.api/pthread/condvar3_3.c: Ditto.
* winsup.api/pthread/condvar4.c: Ditto.
* winsup.api/pthread/condvar5.c: Ditto.
* winsup.api/pthread/condvar6.c: Ditto.
* winsup.api/pthread/condvar8.c: Ditto.
* winsup.api/pthread/count1.c: Ditto.
* winsup.api/pthread/create1.c: Ditto.
* winsup.api/pthread/create2.c: Ditto.
* winsup.api/pthread/equal1.c: Ditto.
* winsup.api/pthread/exit1.c: Ditto.
* winsup.api/pthread/exit2.c: Ditto.
* winsup.api/pthread/exit3.c: Ditto.
* winsup.api/pthread/inherit1.c: Ditto.
* winsup.api/pthread/join0.c: Ditto.
* winsup.api/pthread/join1.c: Ditto.
* winsup.api/pthread/join2.c: Ditto.
* winsup.api/pthread/mutex1.c: Ditto.
* winsup.api/pthread/mutex1r.c: Ditto.
* winsup.api/pthread/mutex2.c: Ditto.
* winsup.api/pthread/mutex3.c: Ditto.
* winsup.api/pthread/mutex6r.c: Ditto.
* winsup.api/pthread/once1.c: Ditto.
* winsup.api/pthread/priority1.c: Ditto.
* winsup.api/pthread/priority2.c: Ditto.
* winsup.api/pthread/self1.c: Ditto.
* winsup.api/pthread/self2.c: Ditto.
* winsup.api/pthread/tsd1.c: Ditto.
2001-11-15 11:19:48 +00:00
Egor Duda f38ac9b70c * include/pthread.h (PTHREAD_COND_INITIALIZER): Define.
* thread.cc (__pthread_cond_destroy): Add support for
PTHREAD_COND_INITIALIZER.
(__pthread_cond_init): Ditto.
(__pthread_cond_broadcast): Ditto.
(__pthread_cond_signal): Ditto.
(__pthread_cond_dowait): Ditto.
(__pthread_mutex_init): Handle PTHREAD_MUTEX_INITIALIZER correctly,
don't return error when it's passed as parameter.
* winsup.h (check_null_invalid_struct): Call correct function.
2001-11-15 11:10:38 +00:00
Christopher Faylor e2b3dc2580 * exceptions.cc: Add stdlib.h include for alloca declaration.
* poll.cc: Ditto.
* termios.cc: Ditto.
* syscalls.cc (_write): Only allow zero length when fd is valid.
2001-11-15 03:25:52 +00:00
Corinna Vinschen 7158264315 * fhandler.cc (fhandler_disk_file::fstat): Add setting access time
and creation time to last modification time for files on filesystems
	not supporting multiple timestamps.
	(fhandler_disk_file::fstat_helper): Set access time and creation
	time in incoming Windows structure instead of in stat buf to avoid
	incorrectly overwriting Epoch timestamp.
2001-11-14 21:47:41 +00:00
Corinna Vinschen ac0ac6534d * winsup.h: Remove alloca definition since it's now defined through
inclusion of stdlib.h.
	* lib/cygwin_crt0.c: Ditto.
2001-11-14 10:47:54 +00:00
Christopher Faylor 65814395b6 * syscalls.cc (_write): Allow zero length as per SUSv2. 2001-11-14 04:12:11 +00:00
Corinna Vinschen 03adcc0fda * dir.cc (mkdir): Add HIDDEN file attribute if file has leading dot
and HIDDEN_DOT_FILES is defined.
	* fhandler.cc (fhandler_base::open): Ditto.
	* path.cc (symlink): Ditto.
	* syscalls.cc (_rename): Ditto and remove HIDDEN file attribute if
	new filename does not begin with a dot.
2001-11-13 21:49:06 +00:00
Corinna Vinschen 1716f3b52e Fix ChangeLog entry. 2001-11-12 21:56:31 +00:00
Corinna Vinschen d1ba802d67 * cygcheck.cc (dump_sysinfo): Redefine output format slightly. 2001-11-12 21:55:39 +00:00
Christopher Faylor e1af9739e0 * cygcheck.cc (main): Slight formatting tweak. 2001-11-12 21:28:32 +00:00
Corinna Vinschen 5e051b1bf7 * cygcheck.cc (dump_sysinfo): Add some more details. 2001-11-12 20:21:43 +00:00
Christopher Faylor daccfdf9ef Add missing ChangeLog entry. 2001-11-12 18:22:41 +00:00
Corinna Vinschen e4087b7526 * cygcheck.cc (dump_sysinfo): Print more detailed OS information string
using OSVERSIONINFOEX information.
2001-11-12 17:55:52 +00:00
Corinna Vinschen 192b4f6261 * include/winbase.h (OSVERSIONINFOEX): Add definition.
* include/winnt.h: Add VER_NT_* and VER_SUITE_* defines.
2001-11-12 17:53:47 +00:00
Christopher Faylor 697b8c0c32 * fhandler_console.cc (fhandler_console::read): Revert 2001-10-23 change to
only honor keydown events.
2001-11-12 17:06:50 +00:00
Christopher Faylor a36ee0b6b9 * include/cygwin/version.h: Bump version to 1.3.6. 2001-11-12 00:40:29 +00:00
Christopher Faylor 64bd8a83af * path.h: New file. 2001-11-12 00:19:17 +00:00
Christopher Faylor 71f90de808 * cygcheck.cc (scan_registry): Open registry with read-only access.
(main): Reflect argument change for dump_setup.
* dump_setup.cc (dump_setup): Add preliminary extra argument for future use.
* path.cc (read_mounts): Open registry with read-only access.
2001-11-12 00:14:27 +00:00
Christopher Faylor fcc8ea58ce fix typo. 2001-11-11 06:55:35 +00:00
Christopher Faylor da9e28d0fa * cygcheck.cc (main): Display package info when '-s' is specified.
* dump_setup.cc (dump_setup): Change header.  Remove typo.  Always sort
packages output.
2001-11-11 06:16:18 +00:00
Christopher Faylor d0d517913c * dump_setup.cc: New file.
* Makefile.in: Add info for dump_setup.o.
* cygcheck.cc (main): Recognize '-c' option for checking setup installed base.
* path.cc (cygpath): Read mount table if not loaded.
2001-11-11 06:07:36 +00:00
Christopher Faylor 2fac517df4 * Makefile.in (cygcheck.exe): Compile as -mno-cygwin executable.
* path.cc: New file.
* cygcheck.cc (init_paths): Use MS-DOS path syntax.
(cygwin_info): Properly display cygwin version numbers.  Prettify some output.
(dump_sysinfo): Calculate max names of posix and ms-dos paths for prettier
output.
2001-11-11 03:06:59 +00:00
Christopher Faylor c8b3452829 * dtable.cc (dtable::build_fhandler): Don't increment console fd count if new
operation fails.  Increment fork_fixup field here.
(dtable::dup2): Don't increment fork_fixup field here.
(fdsock): Ditto.
2001-11-10 19:46:15 +00:00
Corinna Vinschen 9a6c0a241b * cygcheck.cc (dump_sysinfo): Print more detailed OS information string. 2001-11-09 17:18:36 +00:00
Robert Collins 4d1fdcb6f8 2001-11-10 Robert Collins <rbtcollins@hotmail.com>
* include/winnt.h: Add Danny Smith's text comment about gcc compiler warnings
        with _AUTHORITY #defines.
2001-11-09 13:23:54 +00:00
Robert Collins d0d69f141d 2001-11-09 Robert Collins <rbtcollins@hotmail.com>
* include/winnt.h (GetCurrentFiber): Create a prototype before the implementation;
        (GetFiberData): Ditto.
2001-11-09 11:34:26 +00:00
Robert Collins 29c63d063f 2001-11-09 Robert Collins <rbtcollins@hotmail.com>
* include/winnt.h: Backout last change.
2001-11-09 08:31:37 +00:00
Corinna Vinschen 461903013c * checksignal.c: New testcase. 2001-11-08 21:04:05 +00:00
Corinna Vinschen 80a429d20a * select.cc: Set errno using set_sig_errno() throughout.
* signal.cc (signal): Always set SA_RESTART flag.
	* syscalls.cc (_read): Revert previous patch.
2001-11-08 17:49:52 +00:00
Corinna Vinschen 036fd823dc * select.cc (fhandler_tty_slave::ready_for_read): Return 0 on EBADF.
* syscalls.cc (_read): If ready_for_read() failed, save errno from
	being overwritten by signal handler call.
2001-11-08 15:01:44 +00:00
Robert Collins 418c02db8f 2001-11-08 Robert Collins <rbtcollins@hotmail.com>
* include/winnt.h: Define *_SID_AUTHORITY appropriately. (nested
        structures.)
        GetCurrentFiber: Create a prototype before the implementation;
        GetFiberData: Ditto.
2001-11-07 14:11:41 +00:00
Robert Collins 4cecec6cde 2001-11-08 Robert Collins <rbtcollins@hotmail.com>
* include/errno.h: Fix "errno is not a prototype" warning.
2001-11-07 14:10:25 +00:00
Corinna Vinschen e2c07930f7 * lib/getopt.c (getopt_internal): Reset optind to 1 only if optreset
is not set.
2001-11-07 11:47:23 +00:00
Christopher Faylor d0e406c653 * select.cc (fhandler_tty_slave::ready_for_read): Correct inverted not_open
test.
2001-11-06 18:02:56 +00:00
Christopher Faylor 82105181d8 * include/cygwin/version.h: Bump version to 1.3.5. 2001-11-05 23:13:47 +00:00
Corinna Vinschen 910e57ec84 * mmap.cc (mmap_record::find_empty): Add input parameter check. 2001-11-05 20:58:22 +00:00
Egor Duda 48da07548b * Makefile.in: Delete unused executable after creating base-files. 2001-11-05 13:16:41 +00:00
Christopher Faylor 9c510edc61 Eliminate excess whitespace. 2001-11-05 06:09:15 +00:00
Christopher Faylor a9ae96dde4 Add strace debugging section. 2001-11-05 03:16:58 +00:00
Christopher Faylor 58eac090a3 * dtable.cc (dtable::build_fhandler): Fix debug_printf to avoid SEGV due to
incorrect parameter placement.
2001-11-05 02:45:42 +00:00
Christopher Faylor e25e893d6b * fhandler.h (fhandler_pipe::broken_pipe): Renamed from saweof.
(fhandler_pipe::set_eof): Reflect above change.
* pipe.cc (fhandler_pipe::fhandler_pipe): Ditto.
(fhandler_pipe::read): Ditto.
(fhandler_pipe::hiteof): Ditto.
2001-11-05 01:52:20 +00:00
Christopher Faylor 6e8b4dcdf1 * pipe.cc (fhandler_pipe::read): Narrow eof return to just the "broken pipe"
test.
2001-11-05 01:44:02 +00:00
Christopher Faylor 915d1824f7 * select.cc: Add more comments throughout. Use bool 'true' where appropriate
throughout.
(fhandler_socket::select_read): Remove duplicate setting for *_ready which
inadvertently overrode previous, correct setting.
(fhandler_socket::select_write): Ditto.
2001-11-05 00:29:27 +00:00
Christopher Faylor 79ec82139e * lib/Makefile.in: Add .NOTPARALLEL target since dlltool cannot run in parallel
invocations.
* lib/scrnsave.c (WinMain): Trivial change to avoid a compiler warning.
2001-11-04 20:38:00 +00:00
Corinna Vinschen 56c29a3c87 * getfacl.c (username): New function.
(groupname): Ditto.
	(usage): Ditto.  Add more user friendly help text.
	(main): Add -n and --help option.  Print names instead of IDs
	unless -n option is given.
	* setfacl.c (getperm): Tolerate whitespace and comment chars in input.
	(getaclentry): Fix several input string misdetections.
	(getaclentries): Allow - as input file name to read from stdin.
	Tolerate whitespace and comment chars in input.
	(usage): Add more user friendly help text.
	(main): Add --help option.
2001-11-04 17:24:24 +00:00
Egor Duda 86fbc3d90b * strace.cc (main): New option '-w'. Start traced process in separate
window. New option '-S x'. Flush buffered output every x seconds.
(create_child): Start child process in new window, when requested.
When requested, periodically flush debugging output.
2001-11-04 12:57:55 +00:00
Christopher Faylor 7cf5e175fe * Makefile.in: Force configure in testsuite directory if config.status does not
exist.
2001-11-04 05:15:16 +00:00
Christopher Faylor c5900b959b * Makefile.in: Oops. Revert previous change. Add Makefile/Makefile.in
dependency.
2001-11-04 05:14:16 +00:00
Christopher Faylor 35a0c9377f * Makefile.in: Add check target. 2001-11-04 05:06:23 +00:00
Christopher Faylor e8f1743129 * configure.in: Disable subauth directory test.
* configure: Regenerate.
* Makefile.in: Use MAKE variable in directory builds.
2001-11-04 03:48:36 +00:00
Christopher Faylor 15d0cbd6df * Makefile.in: Add directory dependencies to ensure ordering when using 'make
-jN'.
2001-11-04 03:42:19 +00:00
Christopher Faylor 763f09b97d * select.cc (verify_console): New function.
(verify_windows): Ditto.
(fhandler_console::select_read): Really do need to verify that there is
something to read.
(fhandler_console::select_windows): Ditto.
2001-11-04 03:29:15 +00:00
Christopher Faylor 476dfb657b * fhandler.h (fhandler_base::ready_for_read): Remove unused argument.
(fhandler_tty_slave::ready_for_read): Ditto.
(select_record): Remove poll, initialize peek.
* select.cc: Remove all poll functions, throughout.  Change second argument of
peek_* functions to 'bool' throughout.  Specifically initialize *_ready
variables throughout.
(select_stuff::poll): Subsume previous poll functionality.
(peek_pipe): Don't grab guard mutex when in select loop.  select()/read() is
racy by design so there is no need to worry about a race in select().
(fhandler_base::ready_for_read): Remove unused argument.
(fhandler_tty_slave::ready_for_read): Ditto.
* syscalls.cc (_read): Eliminate third argument in ready_for_read call.
2001-11-04 02:31:58 +00:00
Corinna Vinschen f41d24a14d * security.cc (get_supplementary_group_sidlist): New function.
(get_group_sidlist): Call get_supplementary_group_sidlist() to
	retrieve list of supplementary groups SIDs from /etc/group and
	add them to the user's group list.
2001-11-03 21:19:50 +00:00
Christopher Faylor ed14f73cc2 * Makefile.common: Remove preferred-stack-boundary setting since gcc 2.95.3
doesn't work well with it.
2001-11-03 19:56:52 +00:00
Christopher Faylor c41570695a * fhandler.cc (fhandler_base::read): Return just read ahead characters if slow
device.
* fhandler.h (fhandler_base::set_eof): New virtual method.
(fhandler_pipe::set_eof): New method.
* pipe.cc (fhandler_pipe::fhandler_pipe): Clear saweof flag.
(fhandler_pipe::read): Return immediately if hit eof.
(fhandler_pipe::hit_eof): Return true if saweof flag is set.
* select.cc (peek_pipe): Don't call PeekNamedPipe if we couldn't grab the guard
mutex.
2001-11-03 05:42:21 +00:00
Christopher Faylor 243a041bd0 * dll_init.h (class dll_list): Reorder functions to avoid compiler "can't
inline" warnings.
* security.h (class cygsid): Ditto.
* sigproc.cc (get_proc_lock): Ditto.
* sigproc.h (class sigframe): Ditto.
* sync.h (class muto): Ditto.
* fhandler.h (fhandler_base::get_guard): Actually MAKE virtual as previously
indicated.
* pipe.cc (make_pipe): Remove extraneous set_errno.
* syscalls.cc (_open): Ditto.
* select.cc (peek_pipe): Need to check that there is still something to read
from the pipe after acquiring the mutex since another process/thread could have
eaten the input before we got to acquiring the lock.  (Thanks to Nick Duffek
for this inspiration.)
2001-11-03 03:32:27 +00:00
Egor Duda 01432054cb * libltp/lib/forker.c: Include proper header to avoid compiler
warning.
2001-11-02 20:45:00 +00:00
Christopher Faylor d58f43a1bc * Makefile.common: Add some stuff to common CFLAGS. 2001-11-02 04:44:42 +00:00
Christopher Faylor 0378d00f52 * fhandler.h: Change Windows 'BOOL's to c++ 'bool's for all variables.
* select.cc (fhandler_base::ready_for_read): Set read_ready to zero prior to
testing it or it will be uninitialized.
* Makefile.in (CFLAGS): Move setting to Makefile.common.
2001-11-02 04:44:06 +00:00
Christopher Faylor 53f0029081 * cygheap.h (cygheap_fdmanip::isopen): Set appropriate errno if fd not open.
* select.cc (fhandler_base::ready_for_read): Release an open guard mutex when
exiting with an error condition.
* syscalls.cc (_read): Check frequently for closed fd as a kludge until
something better is invented.
2001-11-01 23:48:34 +00:00
Christopher Faylor 1229d4f4ee * dtable.cc (dtable::build_fhandler): Issue internal error on unknown device.
* fhandler.cc (fhandler_base::close): Show both name and handle in debugging
output.
* fhandler.h (fhandler_base::get_guard): New virtual method.
(fhandler_pipe::get_guard): New method.
(fhandler_socket::ready_for_read): Delete declaration.
(fhandler_pipe::ready_for_read): Ditto.
(fhandler_serial::ready_for_read): Ditto.
(fhandler_console::ready_for_read): Ditto.
(fhandler_tty_common::ready_for_read): Ditto.
(fhandler_windows::ready_for_read): Ditto.
(struct select_record::peek): Declare new method.
* select.cc (MAKEready): Delete.
(peek_pipe): Use get_guard method to retrieve potential guard mutex handle.
(fhandler_base::ready_for_read): Rewrite as generic ready-for-read handler.
Should only be called for "slow" devices.
(fhandler_socket::ready_for_read): Delete definition.
(fhandler_pipe::ready_for_read): Ditto.
(fhandler_serial::ready_for_read): Ditto.
(fhandler_console::ready_for_read): Ditto.
(fhandler_tty_common::ready_for_read): Ditto.
(fhandler_windows::ready_for_read): Ditto.
(fhandler_pipe::select_read): Fill in new peek record in select_record
structure.
(fhandler_console::select_read): Ditto.
(fhandler_tty_common::select_read): Ditto.
(fhandler_serial::select_read): Ditto.
(fhandler_socket::select_read): Ditto.
(fhandler_socket::select_read): Ditto.
(fhandler_tty_slave::ready_for_read): Check for tty not open.  Set errnos
appropriately.
* syscalls.cc (_read): Allow ready_for_read to set errno.
* pinfo.cc (pinfo::init): Return spawn/NO_WAIT process as valid if it is
initializing.
* sigproc.cc (getsem): Adjust wait for process to initialize downward to avoid
huge waits.
2001-11-01 21:15:53 +00:00
Earnie Boyd 5cf6708ef4 2001-10-30 Danny Smith <dannysmith@users.sourceforge.net>
* include/io.h (_commit): Add declaration.
	Thanks to: "stefan" <stefan@lkcc.org>

2001-10-30  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/sys/stat.h: Make S_IS* macros safer.

2001-10-27  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/stdlib.h (EXIT_FAILURE): Change value to 1.

2001-10-12  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/stdlib.h (__p__environ, __p__wenviron): Use
	__STDC__ prototypes.
2001-11-01 19:51:50 +00:00
Earnie Boyd 44506780d9 2001-11-01 Danny Smith <dannysmith@users.sourceforge.net>
* include/basetyps.h (DECLARE_INTERFACE): Don't add
	__attribute__((com_interface)) for __GNUC__ >= 3.

2001-11-01  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/commdlg.h (PRINTPAGERANGE): Add structure
	definition.
	(PRINTDLGEX[AW]): Likewise.
	(PrintDlgEx[AW]): Add function declaration.
	* lib/comdlg32.def (PrintDlgEx[AW]): Add function stubs.
	* ChangeLog: Fix typo in last entry.


2001-11-01  TAMURA Kent  <tkent@users.sourceforge.net>

	* include/objbase.h (CoGetClassObject): Change third parameter
	to COSERVERINFO*.

2001-10-30  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/winuser.h (MOUSEEVENTF_WHEEL): Define.
	Thanks to: Kim Saunders.
	* include/oleauto.h: Define VARIANT* flags for VariantChangeType.
	Thanks to: Pat Thoyts.
	* include/winnt.h: Change C++ style comment to C style.
 	* include/shlobj.h: Ditto.
	* include/objbase.h (enum tagCOINIT): Remove comma at end of
	list.
	* include/oledlg.h (enum tagOLEUIPASTEFLAG): Ditto.
	* include/oleidl.h (enum tagDROPEFFECT): Mark as __extension__
	(enum not limited to range of int).
	* include/oaidl.h (struct tagVARIANT): Mark as __extension__
	(struct with no named members), ifndef NONAMELESSUNION.

2001-10-30  Danny Smith  <dannysmith@users.sourceforge.net>

	* include/winuser.h (CREATESTRUCT): UNICODE it.
	(CBT_CREATEWND): Likewise.

2001-10-20  Corinna Vinschen  <corinna@vinschen.de>

	* include/winnetwk.h (WNetGetResourceInformationA): Add declaration.
	(WNetGetResourceInformationW): Ditto.
	(WNetGetResourceInformation): Add define.

2001-10-12  Pedro A Aranda  <paaguti@hotmail.com>

	* include/winuser.h (POINTSTOPOINT): Use explicit casts
	before extracting words.
2001-11-01 19:42:57 +00:00
Christopher Faylor 747e577331 * environ.cc: Set reset_com to false to mimic linux behavior more closely. 2001-10-31 16:30:46 +00:00
Corinna Vinschen 928eca7a58 * dtable.cc (dtable::vfork_child_dup): Revert impersonation
before duplicating fhandler.
2001-10-31 12:03:45 +00:00
Christopher Faylor 34397675de remove garbage ChangeLog entry. 2001-10-31 05:35:28 +00:00
Christopher Faylor 774cd790fc * sigproc.cc (sigproc_terminate): Don't signal main thread when exiting.
* sigproc.h (sigframe): Decorate some methods with `inline'.
(new_muto): Coerce pointer to new to void *.
2001-10-31 02:58:38 +00:00
Christopher Faylor 0fc07e4d69 * fhandler.cc (fhandler_base::fork_fixup): Pass old handle to setclexec_pid. 2001-10-31 02:03:00 +00:00
Christopher Faylor 6ea0c04e7c * cygheap.h (cygheap_fdmanip::cygheap_fdmanip): Clear fh.
(cygheap_fdmanip::isopen): New method.
* syscalls.cc (_read): Avoid accessing closed fd.
* path.h (fe_types): New enum.
(path_conv::set_path): New method.
(find_exec): Change null_if_not_found argument to something more generic.
* spawn.cc (find_exec): Default to returning the POSIX path rather than the
windows path, unless instructed otherwise.
(spawn_guts): Force call to find_exec to use native paths.
* dlfcn.cc (check_path_access): Accommodate new find_exec arguments.
* environ.h (win_env::get_posix): New method.
2001-10-31 00:55:32 +00:00
Corinna Vinschen 05230a4a29 * fhandler_socket.cc (fhandler_socket::close): Add error handling.
Fixed ChangeLog entries.
2001-10-30 11:48:36 +00:00
Corinna Vinschen fc79ce17c7 * (fhandler_socket::dup): Revert previous change. 2001-10-30 10:07:39 +00:00
Christopher Faylor 19ba6f2195 * dtable.cc (dtable::dup2): Add some debugging. Use methods from passed in
class rather than cygheap->fdtab.
* fhandler_socket.cc (fhandler_socket::fixup_before_fork_exec): Add more
debugging output.
(fhandler_socket::dup): Allocate new space for prot_info_ptr for duplicated
entry.
* syscalls.cc (stat_worker): Always delete fh if it has been created.
2001-10-30 07:43:46 +00:00
Corinna Vinschen 3d4b75dec2 * security.cc (is_group_member): Call NetLocalGroupGetMembers() for
local machine only.
	(get_user_local_groups): Ditto for NetLocalGroupEnum().
2001-10-30 00:02:36 +00:00
Christopher Faylor 7a47ed496c * Makefile.in: Propagate 'clean' to subdirs properly. 2001-10-29 20:32:27 +00:00
Christopher Faylor 8dd6060b98 * fhandler.cc (fhandler_base::set_name): Set namehash here to catch name
changes.
(fhandler_base::open): Remove namehash setting.
(fhandler_base::fstat): Subtract 1 from arbitrary time setting to avoid strange
ls -l granularity problem.
* shared_info.h (MOUNT_VE
2001-10-29 20:30:47 +00:00
Egor Duda 3fbfb55efe * winsup.api/ltp/stat03.c: Supress compiler warning. 2001-10-29 20:03:06 +00:00
Egor Duda bd65358b34 * winsup.api/signal-into-win32-api.c: Supress compiler warning. 2001-10-29 19:45:43 +00:00
Christopher Faylor cdd8cb1f2a * select.cc (MAKEready): Remove extraneous select_read. 2001-10-29 16:12:47 +00:00
Corinna Vinschen ac19c8dcf6 * uinfo.cc (internal_getlogin): Set environment variable $HOME
from either /etc/passwd or $HOMEDRIVE/$HOMEPATH if necessary.
2001-10-29 11:53:52 +00:00
Christopher Faylor 711ded6d28 * fhandler.h (fhandler_serial::fhandler_serial): Change to only accept unit
argument.
* fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
(fhandler_serial::open): Avoid else when previous clause is a return().
* path.cc (get_devn): Alias /dev/ttyS0 -> /dev/com1, etc.
(get_device_number): Reallow standalone "com1" as a valid name for /dev/com1.
2001-10-29 05:28:24 +00:00
Christopher Faylor aa9d50a1c1 fix spelling errors 2001-10-28 23:05:49 +00:00
Christopher Faylor 451386f769 fix consistent spelling errors. 2001-10-28 18:10:44 +00:00
Corinna Vinschen be846a19d7 * configure: Regenerate, removing erroneous SUBDIRS substitution. 2001-10-26 15:01:08 +00:00
Christopher Faylor fe00cca93e * select.cc (MAKEready): Check for read_ready in loop since select_read could
set it.
(peek_socket): Check ready/write/except specifically since they could have been
set even prior to peek_socket call.
2001-10-26 04:06:27 +00:00
Christopher Faylor 53c79b98c9 Clarify checkin comment slightly. 2001-10-24 23:56:45 +00:00
Christopher Faylor 7ee2c95756 * shared_info.h (MOUNT_VERSION): Change to a smaller, still arbitrary number.
* shared.cc (open_shared): Accept a number to denote the shared memory region.
(memory_init): Use shared memory version as part of the object name of the
shared region.  Ditto for the mount table.
* path.cc (CYGWIN_REGNAME): New define used in place of
CYGWIN_INFO_CYGWIN_REGISTRY_NAME throughout.
* external.cc (cygwin_internal): Implement CW_[GS]ET_CYGWIN_REGISTRY_NAME.
* cygheap.h (init_cygheap::cygwin_regname): New element.
2001-10-24 22:10:06 +00:00
Christopher Faylor ae21eea62e * Makefile.in: Remove EXEEXT consideration. We always need EXEEXT. 2001-10-24 22:09:37 +00:00
Christopher Faylor a9f20457f3 * Makefile.in: Only build testsuite directory on first 'make check'.
* configure.in: Remove testsuite from SUBDIRS.
* configure: Regenerate.
2001-10-24 21:56:54 +00:00
Christopher Faylor a830378213 Remove merge conflict indicator. 2001-10-24 15:40:24 +00:00
Christopher Faylor a0626ebe27 Ensure that all fhandler_*::read definitions are __stdcall throughout.
* fhandler.cc (fhandler_base::set_inheritance): Be more defensive in debugging
code.
* fhandler.h: Adjust regparms throughout to reflect passing 'this' parameter.
* fhandler_console.cc (fhandler_console::read): Remove unneeded test.  Only
honor "key down" events.
* miscfuncs.cc (strcasestr): Reorganize for efficient code use.
(check_null_empty_str_errno): Ditto.
(__check_null_invalid_struct_errno): Ditto.
(__check_invalid_read_ptr_errno): Ditto.
* syscalls.cc (_read): Return 0 when length == 0, as per Single UNIX
Specification.
2001-10-24 04:16:45 +00:00
Christopher Faylor a05d38a8b4 * debug.cc (set_errno): Return value of errno that was set, just like the
macro.
(setclexec_pid): Replace old handle with new handle.
* debug.h: Reflect change in arguments for setclexec_pid.
* fhandler.cc (fhandler_base::set_inheritance): Ditto.
(fhandler_base::fork_fixup): Ditto.
* cygerrno.h: Reflect return value change for set_errno.
2001-10-22 21:09:41 +00:00
Christopher Faylor e7e231e531 Remove 'cb' parameter and modify fhandler_* constructors throughout.
* dtable.cc (dtable::build_fhandler): Remove debugging output which uses 'cb'.
* exec.cc (execvp): New function.
(execvpe): Ditto.
* fhandler.cc (fhandler_base::fhandler_base): Use constructor initialization.
* fhandler.h (fhandler_tty_common::fhandler_tty_common): Ditto.
* fhandler_clipboard.cc (fhandler_dev_clipboard::fhandler_dev_clipboard):
Ditto.
* fhandler_console.cc (fhandler_console::fhandler_console): Ditto.
* fhandler_raw.cc (fhandler_dev_raw::fhandler_dev_raw): Ditto.
* fhandler_serial.cc (fhandler_serial::fhandler_serial): Ditto.
* fhandler_tty.cc (fhandler_tty_master::fhandler_tty_master): Ditto.
(fhandler_tty_slave::fhandler_tty_slave): Ditto.
(fhandler_pty_master::fhandler_pty_master): Ditto.
* fhandler_windows.cc (fhandler_windows::fhandler_windows): Ditto.
2001-10-22 18:39:22 +00:00
Corinna Vinschen 65d1068cb8 Patch suggested by Ian Ray <ian.ray@nokia.com>:
* syscalls.cc (seteuid): Unset environment variables HOMEDRIVE and
	HOMEPATH before calling internal_getlogin().
	* uinfo.cc (internal_getlogin): Use default HOMEPATH and HOMEDRIVE
	from environment if both are present, else query NetUserGetInfo().
2001-10-22 18:31:00 +00:00
Corinna Vinschen c270dc2555 * net.cc (get_2k_ifconf): Change multiple IP address naming scheme
to Linux style.

	Patch by Alexander Gottwald <ago@informatik.tu-chemnitz.de>:
        * net.cc (get_2k_ifconf): Added support for multiple IP addresses on
        one interface.
2001-10-22 12:23:33 +00:00
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
Christopher Faylor c27a29813a * path.cc (normalize_posix_path): Don't eat a '.' after a '\\' since it has
special meaning on NT.
* syscalls.cc (access): Use stat_worker.
2001-10-07 21:16:36 +00:00
Christopher Faylor dca779339f fix typo 2001-10-06 04:04:14 +00:00
Christopher Faylor a448b8cf34 * fhandler.cc (fhandler_base::fork_fixup): Protect dup'ed handle and record it
as non-inheritable for debugging purposes in case there is a subsequent fork or
exec.
* fhandler_tty.cc (fhandler_tty_common::fixup_after_fork): Allow fork_fixup to
call ProtecHandle.
2001-10-06 01:04:24 +00:00
Christopher Faylor 3cf6936e3b * path.cc (get_raw_device_number): Correct length arguments for wdeveqn. 2001-10-05 18:23:49 +00:00
Christopher Faylor 547d07cae8 * winsup.api/nullgetcwd.c: New file. Check that NULL first argument to getcwd
works.
2001-10-05 16:52:43 +00:00
Christopher Faylor 19639f4139 * path.cc (getcwd): Allow NULL first argument. 2001-10-05 15:05:07 +00:00
Christopher Faylor b3fa795ab9 Revert incorrect checkins. 2001-10-05 04:37:33 +00:00
Christopher Faylor f978840bee * heap.h (inheap): Check for NULL. 2001-10-05 04:36:14 +00:00
Christopher Faylor 8d817b0f9e Add second path_conv * argument to fstat()s throughout.
* fhandler.h: Change read and fstat to regparm/stdcall throughout.
(fhandler_base::fstat): Just declare.  Don't define.
(fhandler_disk_file::fstat_helper): Declare.
* fhandler.cc (fhandler_base::fstat): Move here from fhandler.h, adapt from
former stat_dev().
(fhandler_disk_file::fstat): Move most of the disk-file-specific logic from
stat_worker to here.  Use fstat_helper to derive final fstat output.
(fhandler_disk_file::fstat_helper): New method, renamed from former fstat
method.
(num_entries): Moved here from syscalls.cc.
* fhandler_mem.cc (fhandler_dev_mem::fstat): Use base class to initialize most
stuff.  Invert has_physical_mem_access test for establishing permissions.
* fhandler_raw.cc (fhandler_dev_raw::fstat): Eliminate unneed test and memory
clearing.  Use base class to initialize most stuff.
* syscalls.cc (stat_dev): Eliminate.
(stat_worker): Simply call fstat method to generate fstat output.  Move all
device specific code to appropriate fstats.
* dir.cc (opendir): Pass correct arg to stat_worker to allow following
symlinks.
2001-10-05 04:21:41 +00:00
Christopher Faylor 291ae2c1e7 * winsup.api/systemcall.c (main): Change some messages for clarity. 2001-10-05 02:47:28 +00:00
Christopher Faylor ca7320ac2c * winsup.api/systemcall.c: New file. Check for system call problems. 2001-10-05 02:29:46 +00:00
Christopher Faylor af39152f4c * spawn.cc (perhaps_suffix): Return NULL on non-existence of file as well as
"directoryness".  Previous code modified on 2001/09/30 actually had an arguable
bug which was unmasked by the change on that day.
2001-10-05 01:39:08 +00:00
Christopher Faylor cbed6474df * path.cc (path_conv::check): Return ENOTDIR when leading device and trailing
component.
2001-10-05 00:52:41 +00:00
Christopher Faylor 32fb80db07 * syscalls.cc (stat_worker): Make global. Accept path_conv parameter for
passing information back to caller.
* winsup.h: Declare stat_worker.
* dir.cc (opendir): Use stat_worker rather than stat and pass path_conv
parameter to stat_worker for later inspection.
* syslog.cc (syslog): Teach syslog about syslog priorities other than LOG_ERR,
LOG_WARNING and LOG_INFO
* path.cc (path_conv::check): Don't perform file system or rootdir checks on
devices.
2001-10-05 00:17:57 +00:00
Christopher Faylor 8af0f81d52 * dcrt0.cc (dll_crt0_1): Don't close hexec_proc if it is NULL.
* fork.cc (vfork): Add debugging statements.
* path.cc (get_device_number): Make static.  Rewrite to inspect both unix and
windows paths.
(get_raw_device_number): Just check for parts of raw device that we care about.
(get_devn): New function, pulled from get_device_number.
(win32_device_name): Accomodate arg changes to get_device_number.
(mount_info::get_device_number): Call get_device_number on translated Windows
path.
* spawn.cc (spawn_guts): Don't treat P_VFORK differently from P_NOWAIT.  Add
handle to child's shared region to child so that it will be preserved if the
parent goes away.
* fhandler.h: Throughout, simplify to one open method for all fhandler classes,
requiring a path_conv first element.
* fhandler.cc (fhandler_base::open): Remove obsolete method.  Generalize to
require path_conv * as first argument.
(fhandler_disk_file::open): Remove obsolete method.
(fhandler_disk_file::open): Use path_conv pointer rather than reference.
* fhandler_clipboard.cc (fhandler_dev_clipboard::dup): Use new open method.
(fhandler_dev_clipboard::open): Accomodate new argument for open methods.
* fhandler_console.cc (fhandler_console::open): Ditto.
(fhandler_console::dup): Use new open method.
(fhandler_console::fixup_after_fork): Ditto.
(fhandler_console::fixup_after_exec): Ditto.
* fhandler_dsp.cc (fhandler_dev_dsp::open): Accomodate new argument for open
methods.
* fhandler_floppy.cc (fhandler_dev_floppy::open): Ditto.
* fhandler_mem.cc (fhandler_dev_mem::open): Ditto.
* fhandler_random (fhandler_dev_random::open): Ditto.
* fhandler_raw.cc (fhandler_dev_raw::open): Ditto.
* fhandler_serial.cc (fhandler_serial::open): Ditto.
* fhandler_tape.cc (fhandler_dev_tape::open): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::open): Ditto.
(fhandler_pty_master::open): Ditto.
* fhandler_windows.cc (fhandler_windows::open): Ditto.
* fhandler_zero.cc (fhandler_dev_zero::open): Ditto.
* fhandler_socket.cc (fhandler_socket::set_connect_secret): Accomodate new
argument for open methods.
* syscalls.cc (_open): Ditto.
(stat_worker): Ditto.
2001-10-04 02:34:20 +00:00
Christopher Faylor ebd645e7e6 * cygheap.cc (cfree): Remove malloc debugging probe.
* dlmalloc.c (errprint): Remove abort() call which causes interesting error
message printing to abort prematurely.
* environ.cc: Sprinkle MALLOC_CHECKs liberally throughout.
(_addenv): Allocate two empty elements at end of environ to
(apparently) work around problems with some buggy applications.
(winenv): Avoid calling alloca if no forced environment variable is present.

* exceptions.cc (open_stackdumpfile): Don't print "Dumping stack trace to..."
when running in a cygwin environment (i.e., the parent is a cygwin process).

* dtable.cc (dtable::init_std_file_from_handle): Move device type detection
code from build_fhandler here since it is only used by this function.
(dtable::build_fhandler_from_name): New method.  Renamed from
dtable::build_fhandler.
(dtable::build_fhandler): Use build_fhandler_from_name.
(cygwin_attach_handle_to_fd): Ditto.
* syscalls.cc (_open): Ditto.
(stat_worker): Ditto.
* dtable.h (dtable::build_fhandler_from_name): Rename declaration from
dtable::build_fhandler.
2001-10-03 03:49:26 +00:00
Robert Collins 2f17ab1689 Tue Oct 2 22:25:23 2001 Robert Collins <rbtcollins@hotmail.com>
* how-fhandlers-work.txt: New file.
2001-10-02 12:27:03 +00:00
Christopher Faylor 4ab6034f50 * dtable.h (dtable::build_fhandler): Make path_conv parameter non-optional.
(dtable::init_std_file_from_handle): Eliminate name parameter.
* dtable.cc (stdio_init): Don't pass bogus name to init_std_file_from_handle.
The function will figure out the name itself.
(dtable::init_std_file_from_handle): Eliminate name parameter.  Assume that
we're always called with an appropriate fd.  Pass name as NULL if we can't
simply figure it out from context.
(cygwin_attach_handle_to_fd): Pass path_conv argument to build_fhandler.
(dtable::build_fhandler): Make path_conv argument mandatory.  Eliminate
specific call to get_device_number.  With unknown device names, set name from
handle context for parsing by path_conv.
(dtable::build_fhandler): Pass path_conv argument to build_fhandler.
* path.h (path_conv::set_isdisk): Set disk device type.
(path_conv::is_device): Don't consider FH_DISK a "device".
* syscalls.cc (_open): Pass path_conv argument by reference.
(stat_worker): Ditto.
(_rename): Use path_conv operators.  Add bounds to DeleteFile/MoveFile for
loop.
2001-10-02 01:58:06 +00:00
Christopher Faylor 47af76d8c8 * cygwin.din: export strtoll and strtoull 2001-10-01 19:47:37 +00:00
Christopher Faylor 47063f00e4 Add "path.h" include throughout, where needed. Use new path_conv methods and
operators to simplify testing for directory and attributes, throughout.
* path.h (path_conv::exists): New method.
(path_conv::has_attribute): Ditto.
(path_conv::isdir): Ditto.
(path_conv::DWORD &): New operator.
(path_conv::int &): Ditto.
* dir.cc (rmdir): Eliminate a goto.
* dtable.cc (dtable::build_fhandler): Accept opt and suffix info for
path_conv.check.  Return fh == NULL on path_conv error.  Pass unit to set_name
as appropriate.
(dtable::reset_unix_path_name): New method.
* dtable.h (dtable): Declare new method.  Reflect arg changes to
build_fhandler.
* fhandler.cc (fhandler_disk_dummy_name): Eliminate.
(fhandler_base::set_name): Expect paths to be NULL.  Build unix_path_name from
win32_path_name when it is a device.
(fhandler_base::reset_unix_path_name): New method.
(fhandler_base::raw_read): Report EISDIR when ERROR_INVALID_FUNCTION or
ERROR_INVALID_PARAMETER and reading a directory.
(fhandler_disk_file::fstat): Don't call stat_dev since we should now never be
calling fhandler_disk_file methods with devices.
(fhandler_base::fhandler_base): Clear {unix,win32}_path_name.
(fhandler_base::~fhandler_base): Always free {unix,win32}_path_name.
(fhandler_disk_file::fhandler_disk_file): Remove set_no_free_names kludge.
(fhandler_disk_file::open): Ditto.
* fhandler.h (fhandler_base::no_free_names): Eliminate.
(fhandler_base::set_no_free_names): Ditto.
* fhandler_tty.cc (fhandler_tty_slave::fhandler_tty_slave): Don't set
unix_path_name here.
* path.cc (fchdir): Lock fd table throughout.  Use new
dtable::reset_unix_path_name method to reset path.
* syscalls.cc (stat_worker): Reorganize to always call fstat method.  Pass
path_conv method to fhandler_*::open.
(chroot): Elminate a goto.
2001-10-01 04:10:07 +00:00
Christopher Faylor c25c4c5ffc * environ.cc (winenv): Allocate exact amount of space needed for forced windows
environment variable rather than just using MAX_PATH.
2001-09-30 21:37:53 +00:00
Christopher Faylor bb6c3d5832 * Makefile.in: Depend on stamp to ensure rebuilding. Remove stamp file when
we've just built the DLL.
2001-09-30 21:10:38 +00:00
Robert Collins 38102913c8 Mon Oct 1 00:34:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_cond_dowait): Hopefully eliminate a race on multiple thread
        wakeups.
2001-09-30 14:39:55 +00:00
Robert Collins 86336f4fea Sat Sep 29 18:26:00 2001 Robert Collins <rbtcollins@hotmail.com>
* pthread.cc (pthread_cond_timedwait): Deleted - exported from thread.cc.
        (pthread_cond_wait): Deleted - exported from thread.cc.
        * thread.cc (pthread_cond::BroadCast): Update to use the new syntax for
        verifyable_object_isvalid ().
        (pthread_cond::Signal): Ditto. Also attempt to fix the lost signal race
        with pthread_cond::TimedWait().
        (check_valid_pointer): Change definiton to void const *.
        (verifyable_object_isvalid): Add new parameter to allow identification of
        static initializers, and return a enum rather than magic numbers.
        (__pthread_create): Ditto.
        (__pthread_cleanup): Ditto.
        (__pthread_attr_init): Ditto.
        (__pthread_attr_getinheritsched): Ditto.
        (__pthread_attr_getschedparam): Ditto.
        (__pthread_attr_getschedpolicy): Ditto.
        (__pthread_attr_getscope): Ditto.
        (__pthread_attr_setdetachstate): Ditto.
        (__pthread_attr_getdetachstate): Ditto.
        (__pthread_attr_setinheritsched): Ditto.
        (__pthread_attr_setschedparam): Ditto.
        (__pthread_attr_setschedpolicy): Ditto.
        (__pthread_attr_setscope): Ditto.
        (__pthread_attr_setstacksize): Ditto.
        (__pthread_attr_getstacksize): Ditto.
        (__pthread_attr_destroy): Ditto.
        (__pthread_join): Ditto.
        (__pthread_detach): Ditto.
        (__pthread_suspend): Ditto.
        (__pthread_continue): Ditto.
        (__pthread_getschedparam): Ditto.
        (__pthread_getsequence_np): Ditto.
        (__pthread_key_create): Ditto.
        (__pthread_key_delete): Ditto.
        (__pthread_setschedparam): Ditto.
        (__pthread_setspecific): Ditto.
        (__pthread_getspecific): Ditto.
        (__pthread_cond_destroy): Ditto.
        (__pthread_cond_init): Ditto.
        (__pthread_cond_broadcast): Ditto.
        (__pthread_cond_signal): Ditto.
        (__pthread_condattr_init): Ditto.
        (__pthread_condattr_getpshared): Ditto.
        (__pthread_condattr_setpshared): Ditto.
        (__pthread_condattr_destroy): Ditto.
        (__pthread_kill): Ditto.
        (__pthread_mutex_init): Ditto.
        (__pthread_mutex_getprioceiling): Ditto.
        (__pthread_mutex_lock): Ditto.
        (__pthread_mutex_trylock): Ditto.
        (__pthread_mutex_unlock): Ditto.
        (__pthread_mutex_destroy): Ditto.
        (__pthread_mutex_setprioceiling): Ditto.
        (__pthread_mutexattr_getprotocol): Ditto.
        (__pthread_mutexattr_getpshared): Ditto.
        (__pthread_mutexattr_gettype): Ditto.
        (__pthread_mutexattr_init): Ditto.
        (__pthread_mutexattr_destroy): Ditto.
        (__pthread_mutexattr_setprotocol): Ditto.
        (__pthread_mutexattr_setprioceiling): Ditto.
        (__pthread_mutexattr_getprioceiling): Ditto.
        (__pthread_mutexattr_setpshared): Ditto.
        (__pthread_mutexattr_settype): Ditto.
        (__sem_init): Ditto.
        (__sem_destroy): Ditto.
        (__sem_wait): Ditto.
        (__sem_trywait): Ditto.
        (__sem_post): Ditto.
        (__pthread_cond_dowait): New function, contains core logic from
        __pthread_cond_wait and __pthread_cond_timedwait. Decrement (*cond)->waiting
        before reentering the cond access mutex to allow detection of lost signals.
        (__pthread_cond_timedwait): Rename to pthread_cond_timedwait, and call
        __pthread_cond_dowait after calculating the wait length.
        (__pthread_cond_wait): Rename to pthread_cond_wait, and call
        __pthread_cond_dowait.
        * thread.h: New enum for use with verifyable_object_isvalid.
        Remove the extern exporting of __pthread_cond_timedwait and __pthread_cond_wait.
2001-09-29 09:01:01 +00:00
Christopher Faylor a1dc0932f4 * pipe.cc (fhandler_pipe::fixup_after_fork): New method.
* fhandler.h (fhandler_pipe::fixup_after_fork): Declare new method.
2001-09-29 01:23:06 +00:00
Christopher Faylor 1795c53d86 * passwd.cc (read_etc_passwd): Bother with unlocking when not in cygwin
initialization.
* grp.cc (read_etc_group): Ditto.
2001-09-28 07:23:18 +00:00
Christopher Faylor 8b51edbfa6 * passwd.cc (read_etc_passwd): Don't bother with locking when
in cygwin initialization since there is only one thread.
* grp.cc (read_etc_group): Ditto.
2001-09-28 07:01:22 +00:00
Christopher Faylor 9c61aed684 * pipe.cc (fhandler_pipe::hit_eof): Return correct value when there is no EOF
event available.
2001-09-28 06:06:45 +00:00
Corinna Vinschen f4f30cf140 * mmap.cc (mmap): Move setting the access after evaluating fd.
Remove useless comment.  Explain copy-on-write problem of 9x
        more detailed.  Don't set access to FILE_MAP_COPY on 9x only
        when anonymous mapping is requested.
        (fhandler_disk_file::mmap): Remove useless device check.
        Add debug output.
2001-09-27 22:39:50 +00:00
Robert Collins c814d12f04 Thu Sep 27 22:00:00 2001 Robert Collins rbtcollins@itdomain.com.au
* Makefile.in: Only stamp winver_stamp on success.
2001-09-27 21:35:16 +00:00
Christopher Faylor 5fe74396e9 * select.cc (peek_pipe): REALLY only grab mutex when we actually got something
from the pipe.
2001-09-26 22:24:09 +00:00
Robert Collins c918cf9421 Tue Sep 25 21:25:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_cond::BroadCast): Use address with verifyable_object_isvalid().
        (pthread_cond::Signal): Ditto.
        (__pthread_create): Ditto.
        (__pthread_cleanup): Ditto.
        (__pthread_attr_init): Ditto.
        (__pthread_attr_getinheritsched): Ditto.
        (__pthread_attr_getschedparam): Ditto.
        (__pthread_attr_getschedpolicy): Ditto.
        (__pthread_attr_getscope): Ditto.
        (__pthread_attr_setdetachstate): Ditto.
        (__pthread_attr_getdetachstate): Ditto.
        (__pthread_attr_setinheritsched): Ditto.
        (__pthread_attr_setschedparam): Ditto.
        (__pthread_attr_setschedpolicy): Ditto.
        (__pthread_attr_setscope): Ditto.
        (__pthread_attr_setstacksize): Ditto.
        (__pthread_attr_getstacksize): Ditto.
        (__pthread_attr_destroy): Ditto.
        (__pthread_join): Ditto.
        (__pthread_detach): Ditto.
        (__pthread_suspend): Ditto.
        (__pthread_continue): Ditto.
        (__pthread_getschedparam): Ditto.
        (__pthread_getsequence_np): Ditto.
        (__pthread_key_create): Ditto.
        (__pthread_key_delete): Ditto.
        (__pthread_setschedparam): Ditto.
        (__pthread_setspecific): Ditto.
        (__pthread_getspecific): Ditto.
        (__pthread_cond_destroy): Ditto.
        (__pthread_cond_init): Ditto.
        (__pthread_cond_broadcast): Ditto.
        (__pthread_cond_signal): Ditto.
        (__pthread_cond_timedwait): Ditto.
        (__pthread_cond_wait): Ditto.
        (__pthread_condattr_init): Ditto.
        (__pthread_condattr_getpshared): Ditto.
        (__pthread_condattr_setpshared): Ditto.
        (__pthread_condattr_destroy): Ditto.
        (__pthread_kill): Ditto.
        (__pthread_mutex_init): Ditto.
        (__pthread_mutex_getprioceiling): Ditto.
        (__pthread_mutex_lock): Ditto.
        (__pthread_mutex_trylock): Ditto.
        (__pthread_mutex_unlock): Ditto.
        (__pthread_mutex_destroy): Ditto.
        (__pthread_mutex_setprioceiling): Ditto.
        (__pthread_mutexattr_getprotocol): Ditto.
        (__pthread_mutexattr_getpshared): Ditto.
        (__pthread_mutexattr_gettype): Ditto.
        (__pthread_mutexattr_init): Ditto.
        (__pthread_mutexattr_destroy): Ditto.
        (__pthread_mutexattr_setprotocol): Ditto.
        (__pthread_mutexattr_setprioceiling): Ditto.
        (__pthread_mutexattr_getprioceiling): Ditto.
        (__pthread_mutexattr_setpshared): Ditto.
        (__pthread_mutexattr_settype): Ditto.
        (__sem_init): Ditto.
        (__sem_destroy): Ditto.
        (__sem_wait): Ditto.
        (__sem_trywait): Ditto.
        (__sem_post): Ditto.
        (verifyable_object_isvalid): Recieve a pointer to a pointer for verification.
        (__pthread_mutexattr_getprotocol): Fix typo in magic number.
        (__pthread_mutexattr_getpshared): Ditto.
        (__pthread_mutexattr_gettype): Ditto.
        * thread.h (verifyable_object_isvalid): Change prototype to recieve a pointer to a
        pointer for verification.
        * include/pthread.h: Fix typo for __cleanup_routine_type typedef. (Contrib from Net).
2001-09-25 11:45:26 +00:00
Christopher Faylor 79776fc2cc * select.cc (fhandler_tty_common::ready_for_read): Rewrite to correctly
call peek_pipe.
2001-09-25 06:19:10 +00:00
Christopher Faylor 3263838430 * select.cc (peek_pipe): Only grab mutex when we actually got something from
the pipe.
2001-09-24 22:49:12 +00:00
Christopher Faylor 35f879a6d0 * fhandler.h (fhandler_pipe::hit_eof): New method.
(writepipe_exists): New class element.
(orig_pid): Ditto.
(id): Ditto.
(is_slow): Eliminate.
* pipe.cc (fhandler_pipe::set_close_on_exec): Set inheritance on
writepipe_exists, if it exists.
(fhandler_pipe::hit_eof): New method, modelled after tty.
(fhandler_pipe::dup): Duplicate writepipe_exists, if it exists.
(make_pipe): Set up a dummy event for pipes on windows 9x.  The nonexistence
of this event means that the write side of the pipe has closed.
(_dup): Move to syscalls.cc
(_dup2): Ditto.

* dtable.cc (dtable::build_fhandler): Fill out set_names here, if appropriate.
* syscalls.cc (_open): Call set_names in build_fhandler.
2001-09-24 21:50:44 +00:00
Corinna Vinschen 4367ec036f * syscalls.cc (_open): Set name in fhandler object after successful
creation.
        (stat_dev): Set device type to block device in FH_FLOPPY case.
2001-09-23 15:35:02 +00:00
Corinna Vinschen e3fbb5f5ce * dtable.cc (dtable::build_fhandler): Initialize unit when using
optional path_conv argument.
2001-09-23 14:39:16 +00:00
David Starks-Browning 991f7832e6 expand entry "How can I get bash filename completion to be case insensitive?" 2001-09-23 11:19:13 +00:00
David Starks-Browning b66101cda7 new entry "What versions of Windows are supported?" 2001-09-23 11:13:08 +00:00
David Starks-Browning 45b9eb3144 1.1.x -> 1.3.x in "recent history" 2001-09-23 10:06:32 +00:00
Christopher Faylor 9854ada754 * dtable.cc (dtable::build_fhandler): Accept an optional path_conv argument.
If available, use this to calculate path name and device number.
* dtable.h (dtable): Reflect above change.
* fhandler.h (fhandler_base): Declare virtual method which accepts path_conv
rather than path string as first argument.
* fhandler.cc (fhandler_base::open): Define above new method.
* syscalls.cc (_open): Set aside a path_conv variable for use in build_fhandler
and subsequent call to open.
2001-09-22 21:44:07 +00:00
David Starks-Browning 880230dc7c new entry "How much disk space does Cygwin require?" 2001-09-22 19:47:17 +00:00
David Starks-Browning ca60dce821 again revise license terms 2001-09-22 19:32:47 +00:00
Christopher Faylor 5e733918c0 * exceptions.cc (setup_handler): Always relinquish lock after we've
interrupted.
* fhandler.cc: Move pipe methods to pipe.cc.
* fhandler.h (fhandler_pipe): Add new methods.
* fork.cc (sync_with_parent): Make error messages more informative.
* pipe.cc (fhandler_pipe::fhandler_pipe): Move here from fhandler.cc.
(fhandler_pipe::lseek): Ditto.
(fhandler_pipe::set_close_on_exec): New method.
(fhandler_pipe::read): Ditto.
(fhandler_pipe::close): Ditto.
(fhandler_pipe::dup): Ditto.
(make_pipe): Create the guard mutex on the read side of the pipe.
* select.cc (peek_pipe): Use guard_mutex to discover if we have the right to
read on this pipe.
(fhandler_pipe::readh_for_read): Pass the read pipe guard mutex to peek_pipe.
* syscalls.cc (_read): Always detect signal catchers, for now.
* debug.cc (makethread): Eliminate hack to make thread inheritable.
* sigproc.cc (subproc_init): Don't use hack to make thread inheritable.
2001-09-22 16:55:02 +00:00
David Starks-Browning 142920f65a revise license explanation 2001-09-22 08:45:27 +00:00
Christopher Faylor 99426172cc Add recent developments. 2001-09-22 01:37:47 +00:00
Christopher Faylor e0197c5ea5 typo, words. 2001-09-22 01:29:07 +00:00
Christopher Faylor 53df7e2aaf * Makefile.in (mingw_getopt.o): Ensure that newlib include directories are not
searched.
2001-09-22 00:40:37 +00:00
David Starks-Browning a997e6ea10 fix error 2001-09-21 20:42:47 +00:00
David Starks-Browning 38300b88f1 Update contents.
Expanded anti-virus information.
How to uninstall a package.
2001-09-21 20:40:50 +00:00
David Starks-Browning 99059a8c38 new entry "Can I build a Cygwin program that does not require cygwin1.dll at runtime?" 2001-09-21 18:20:21 +00:00
Christopher Faylor 7700f3718e * Makefile.in (MINGW_INCLUDES): Still need cygwin/include directory. 2001-09-21 01:01:27 +00:00
David Starks-Browning 24f19d84e0 New entry "Why doesn't //c (for C:) work anymore?" 2001-09-20 21:23:17 +00:00
Christopher Faylor c50d56bc43 * fhandler.cc (fhandler_base::set_inheritance): Just use DUPLICATE_CLOSE_SOURCE
to change inheritance.  Eliminate all other logic dealing with closed handles.
* fhandler.h (fhandler_base::set_inheritance): Reflect above change.
* fhandler_tty.cc (fhandler_tty_common::set_close_on_exec): Ditto.
2001-09-20 20:58:29 +00:00
Egor Duda b1711a1f96 * libltp/lib/get_high_address.c (get_high_address): Get inaccessible
address more robustly.
* winsup.api/ltp/stat06.c (high_address_setup): Use generic function
from ltp library to obtain inaccessible address.
2001-09-20 15:44:41 +00:00
Corinna Vinschen a2db3c9288 * fhandler_socket.cc (fhandler_socket::fixup_after_exec): Close
socket only when not using Winsock2.
2001-09-20 11:35:49 +00:00
Corinna Vinschen 8e54fb88f3 * fhandler.h (fhandler_socket::fixup_after_exec): Remove inline
implementation.
        (fhandler_dev_raw::fixup_after_exec): Ditto.
        * fhandler_raw.cc (fhandler_dev_raw::fixup_after_fork): Don't
        duplicate buffer on fork to avoid memory leak.
        (fhandler_dev_raw::fixup_after_exec): New implementation equal to
        former fixup_after_fork() implementation.
        * fhandler_socket.cc (fhandler_socket::fixup_after_fork): Do
        nothing when not using Winsock2.
        (fhandler_socket::fixup_after_exec): New implementation.
        (fhandler_socket::set_close_on_exec): Never call set_inheritance().
2001-09-20 11:29:48 +00:00
Corinna Vinschen f4e6b76a05 * fhandler.cc (fhandler_base::set_inheritance): If available,
use SetHandleInformation() to set inheritance.
        * wincap.cc: Set flag has_set_handle_information_on_console_handles
        appropriately.
        * wincap.h: Add flag has_set_handle_information_on_console_handles.
2001-09-20 08:02:01 +00:00
Earnie Boyd 7141383a86 2001-09-18 Danny Smith <dannysmith@users.sourceforge.net>
* include/winnt.h (_[U]LARGE_INTEGER): Mark nameless structure
	field as _ANONYMOUS_STRUCT.
	* include/setupapi.h (SP_DEVINSTALL_PARAMS): Add missing typedef
	for UNICODE.
	* include/ipexport.h (icmp_echo_reply): Remove extra ';'.
	* lib/makefile.in: Add -pedantic switch to TEST_OPTIONS for header
	test.

2001-09-17  Mattia Barbon  <mbarbon@dsi.unive.it>

	* include/commctrl.h: Add some ListView constants.

2001-09-17  Earnie Boyd  <earnie@sf.net>

	* lib/Makefile.in (inst_includedir): Add FIXME and remove the usr/
	portion of the directory from the install.
	(inst_libdir): Ditto.
	* Makefile.in (VERSION): Increment.
	* include/w32api.h: Increment version.
2001-09-19 23:56:12 +00:00
Christopher Faylor 2f02f21831 Add -t option. 2001-09-19 22:06:33 +00:00
Christopher Faylor 9e5ad282f0 * lib/getopt.c (__progname): Don't declare if not compiling for cygwin. 2001-09-19 16:24:10 +00:00
Christopher Faylor de6305a0e4 * Makefile.in: Filter newlib includes from mingw compilation. 2001-09-19 16:22:47 +00:00
Corinna Vinschen 09376842d4 * lib/getopt.c (getopt_long): Avoid compiler warning. 2001-09-19 16:08:33 +00:00
Christopher Faylor 596f3269b0 * lib/getopt.c: Use __progname==__argv[0] when not compiling for cygwin.
* scandir.cc (scandir): Use correct default when compar == NULL.
2001-09-19 15:54:12 +00:00
Corinna Vinschen 487fb5f1c4 * fhandler_socket.cc (fhandler_socket::fhandler_socket): Revert
memory allocation to use cmalloc again.
2001-09-19 15:50:54 +00:00
Earnie Boyd 18508302f9 2001-09-19 Earnie Boyd <earnie@SF.net>
* Makefile.in: Remove the /usr from the install target.
	(VERSION): Increment.
	include/_mingw.h: Ditto.
2001-09-19 15:37:19 +00:00
Christopher Faylor 5733509e25 * cygwin.din (__argv): Export.
(__argc): Ditto.
(__progname): Ditto.
* include/getopt.h (getopt_long): constify arguments.
* lib/getopt.c: Import new file from NetBSD.
2001-09-19 01:07:11 +00:00
Corinna Vinschen 7cffc34564 * mmap.cc (mmap): Don't reuse anonymous memory in MAP_FIXED case. 2001-09-18 17:10:09 +00:00
Christopher Faylor c98b577d40 * include/io.h: Add access declaration. 2001-09-17 21:29:19 +00:00
Christopher Faylor 8238a68bb2 * syscalls.cc (rmdir): Set cwd to some other location if attempting to rmdir
current working directory.
2001-09-17 18:10:02 +00:00
Earnie Boyd 3e985c99c0 2001-09-17 Earnie Boyd <earnie@sf.net>
* lib/Makefile.in (inst_includedir): Add FIXME and remove the usr/
	portion of the directory from the install.
	(inst_libdir): Ditto.
	* Makefile.in (VERSION): Increment.
	* include/w32api.h: Increment version.
2001-09-17 16:15:54 +00:00
Earnie Boyd f244c34bae * Makefile.in: Increment version.
* include/_mingw.h: Ditto.
2001-09-17 12:38:45 +00:00
Christopher Faylor 60136eb0b2 * dtable.h (not_open): Assure inline.
* fhandler.h (operator []): Make const.
* sync.cc (muto::~muto): Fix typo which stopped muto event handle from ever
being closed.
2001-09-17 03:05:05 +00:00
Egor Duda 0aca521ab8 * path.cc (symlink): Check arguments for validity.
(getcwd): Ditto.
* syscalls.cc (ftruncate): Ditto.
* times.cc (times): Ditto.
* uname.cc (uname): Ditto.
2001-09-16 14:26:11 +00:00
Christopher Faylor d595839939 * net.cc (dup_servent_ptr): Detect old Windows 95 misaligned structure and
realign appropriately.
2001-09-16 02:56:58 +00:00
Christopher Faylor 1d1c6baa7b minor typo fixes. 2001-09-16 02:56:48 +00:00
Egor Duda 615643cb12 * winsup.api/ltp/sbrk01.c (main): Force output at startup to
make sure that stdio file buffer get allocated.
* winsup.api/ltp/stat06.c (high_address_setup): On cygwin, area
after sbrk(0) may be available, use 0xffff0000 as "high address".
* winsup.api/ltp/symlink01.c: Perform all tests. Mark those tests that
don't work on cygwin with '-1'. Close open files so that temporary
directory can be deleted on exit.
* winsup.api/ltp/vfork01.c: New test.
2001-09-15 19:54:04 +00:00
Christopher Faylor 74509af276 * Makefile.in: Generate libcygwin.a during the link pass rather than as a
separate dlltool step.
* dcrt0.cc (_dll_crt0): pppid_handle could be NULL.  Don't close it if so.
2001-09-15 04:36:43 +00:00
Christopher Faylor d409c077df *** empty log message *** 2001-09-15 00:50:28 +00:00
Christopher Faylor 9661a0c8b7 * dcrt0.cc (dll_crt0_1): Create vfork main storage here so that it can be
queried in waitsig later.
* sigproc.cc (wait_sig): Don't deliver a signal if in a vfork.
* fork.cc (vfork): Deliver all signals on parent return from vfork.
2001-09-15 00:47:44 +00:00
Egor Duda 696a88a431 Hints and tips on debugging cygwin 2001-09-14 17:43:17 +00:00
Christopher Faylor 772944d3a5 add copyrights. 2001-09-14 16:57:32 +00:00
Christopher Faylor 64a2f70b43 more words 2001-09-14 16:13:00 +00:00
Egor Duda d353d5d6f8 * dumper.cc (dumper::dumper): Print error code in case of error.
(dumper::add_thread): Ditto.
(dumper::collect_memory_sections): Ditto.
(dumper::dump_memory_region): Ditto.
(dumper::collect_process_information): Ditto.
(print_section_name): Fix formatting.
2001-09-14 15:07:31 +00:00
Corinna Vinschen 4856e91471 * dcrt0.cc (_dll_crt0()): Don't call wincap.init() here. 2001-09-14 08:23:46 +00:00
Christopher Faylor 5654f240f1 *** empty log message *** 2001-09-14 04:39:56 +00:00
Christopher Faylor 25e40ae6aa * fork.cc (vfork): Avoid recursive vforks. 2001-09-14 04:37:57 +00:00
Christopher Faylor 02a9889121 * fhandler.h (fhandler_pipe::is_slow): Return true only if pipes are reliable
(i.e., not Win9x).
* wincap.cc: Make statics NO_COPY to avoid fork overhead.
2001-09-14 04:22:05 +00:00
Christopher Faylor cd6ed3f9f5 * grp.cc (read_etc_group): Just reuse group_buf storage for subsequent reread
of /etc/group.
* passwd.cc (read_etc_passwd): Just reuse passwd_buf storage for subsequent
reread of /etc/passwd.
2001-09-14 03:01:47 +00:00
Christopher Faylor e2e078278c * cygheap.cc (dup_now): New function.
(cygheap_setup_for_child): Accept new argument controlling whether to delay
copying of cygheap to shared memory region.
(cygheap_setup_for_child_cleanup): Accept new arguments controlling whether to
copy cygheap at this point.
* cygheap.h: Reflect above changes.
* fork.cc (fork_parent): Break copying of cygheap into two parts when
fork_fixup is required so that the child can see the parent's changes.
(vfork): Do stack cleanup prior to forcing a fork error.
* spawn.cc (spawn_guts): Ditto.
2001-09-14 00:49:00 +00:00
Christopher Faylor 3e2d8af0b9 * cygheap.cc (ccalloc): Pass correct length to creturn so that cygheap_max is
correctly calculated.
2001-09-13 21:15:34 +00:00
Egor Duda 3900c377d8 * winsup.api/winsup.exp: Run only selected test if environment
variable CYGWIN_TESTSUITE_TESTS is set. Use its value as regular
expression to filter test names.
* winsup.api/ltp/symlink01.c (creat_path_max): Provide explicit
buffer to getcwd to conform to standards and avoid memory leak.
(do_chdir): Ditto.
2001-09-13 19:00:48 +00:00
Earnie Boyd e9f2bf3049 2001-09-13 Earnie Boyd <earnie@SF.net>
* lib/Makefile.in (inst_includedir): Change to always use w32api
	subdirectory for target == cygwin.
	(inst_libdir): Ditto.
2001-09-13 17:45:55 +00:00
Egor Duda 50ab44e0a7 * libltp/lib/tst_sig.c: Pass SIGSEGV to application to consider
whether it's expected or not.
* winsup.api/known_bugs.tcl: lseek10 is known to fail because mknod
is not implemented.
* winsup.api/ltp/rename02.c: Fix formatting.
* libltp/lib/libtestsuite.c: New file.
* winsup.api/signal-into-win32-api.c: New test.
* winsup.api/ltp/access04.c: Ditto.
* winsup.api/ltp/access05.c: Ditto.
* winsup.api/ltp/alarm07.c: Ditto.
* winsup.api/ltp/chdir04.c: Ditto.
* winsup.api/ltp/chmod01.c: Ditto.
* winsup.api/ltp/close01.c: Ditto.
* winsup.api/ltp/close02.c: Ditto.
* winsup.api/ltp/creat01.c: Ditto.
* winsup.api/ltp/creat03.c: Ditto.
* winsup.api/ltp/exit01.c: Ditto.
* winsup.api/ltp/exit02.c: Ditto.
* winsup.api/ltp/fchdir01.c: Ditto.
* winsup.api/ltp/fchdir02.c: Ditto.
* winsup.api/ltp/fork02.c: Ditto.
* winsup.api/ltp/fork03.c: Ditto.
* winsup.api/ltp/fork06.c: Ditto.
* winsup.api/ltp/fork07.c: Ditto.
* winsup.api/ltp/fork09.c: Ditto.
* winsup.api/ltp/fork10.c: Ditto.
* winsup.api/ltp/fork11.c: Ditto.
* winsup.api/ltp/fstat02.c: Ditto.
* winsup.api/ltp/fstat03.c: Ditto.
* winsup.api/ltp/fstat04.c: Ditto.
* winsup.api/ltp/ftruncate01.c: Ditto.
* winsup.api/ltp/ftruncate02.c: Ditto.
* winsup.api/ltp/ftruncate03.c: Ditto.
* winsup.api/ltp/getgid02.c: Ditto.
* winsup.api/ltp/getgid03.c: Ditto.
* winsup.api/ltp/getpgid01.c: Ditto.
* winsup.api/ltp/getpgid02.c: Ditto.
* winsup.api/ltp/getpid02.c: Ditto.
* winsup.api/ltp/getppid02.c: Ditto.
* winsup.api/ltp/getuid02.c: Ditto.
* winsup.api/ltp/getuid03.c: Ditto.
* winsup.api/ltp/kill01.c: Ditto.
* winsup.api/ltp/kill02.c: Ditto.
* winsup.api/ltp/kill03.c: Ditto.
* winsup.api/ltp/kill04.c: Ditto.
* winsup.api/ltp/lseek06.c: Ditto.
* winsup.api/ltp/lseek07.c: Ditto.
* winsup.api/ltp/lseek08.c: Ditto.
* winsup.api/ltp/lseek09.c: Ditto.
* winsup.api/ltp/lseek10.c: Ditto.
* winsup.api/ltp/mmap02.c: Ditto.
* winsup.api/ltp/mmap03.c: Ditto.
* winsup.api/ltp/mmap04.c: Ditto.
* winsup.api/ltp/mmap05.c: Ditto.
* winsup.api/ltp/mmap06.c: Ditto.
* winsup.api/ltp/mmap07.c: Ditto.
* winsup.api/ltp/mmap08.c: Ditto.
* winsup.api/ltp/munmap01.c: Ditto.
* winsup.api/ltp/munmap02.c: Ditto.
* winsup.api/ltp/open02.c: Ditto.
* winsup.api/ltp/pipe01.c: Ditto.
* winsup.api/ltp/pipe08.c: Ditto.
* winsup.api/ltp/pipe09.c: Ditto.
* winsup.api/ltp/pipe10.c: Ditto.
* winsup.api/ltp/pipe11.c: Ditto.
* winsup.api/ltp/poll01.c: Ditto.
* winsup.api/ltp/read04.c: Ditto.
* winsup.api/ltp/readlink01.c: Ditto.
* winsup.api/ltp/readlink03.c: Ditto.
* winsup.api/ltp/rename01.c: Ditto.
* winsup.api/ltp/rename08.c: Ditto.
* winsup.api/ltp/rename10.c: Ditto.
* winsup.api/ltp/rmdir01.c: Ditto.
* winsup.api/ltp/stat01.c: Ditto.
* winsup.api/ltp/stat02.c: Ditto.
* winsup.api/ltp/stat03.c: Ditto.
* winsup.api/ltp/symlink03.c: Ditto.
* winsup.api/ltp/symlink04.c: Ditto.
* winsup.api/ltp/symlink05.c: Ditto.
* winsup.api/ltp/sync02.c: Ditto.
* winsup.api/ltp/time02.c: Ditto.
* winsup.api/ltp/times02.c: Ditto.
* winsup.api/ltp/times03.c: Ditto.
* winsup.api/ltp/truncate01.c: Ditto.
* winsup.api/ltp/truncate02.c: Ditto.
* winsup.api/ltp/umask02.c: Ditto.
* winsup.api/ltp/umask03.c: Ditto.
* winsup.api/ltp/wait401.c: Ditto.
* winsup.api/ltp/wait402.c: Ditto.
* winsup.api/ltp/write02.c: Ditto.
* winsup.api/ltp/write03.c: Ditto.
2001-09-13 17:30:23 +00:00
Egor Duda 4e8b5fc387 * dumper.cc (main): Properly recognize negative pids (used by w9x). 2001-09-13 15:06:25 +00:00
Earnie Boyd 36d19bdddb 2001-09-13 Earnie Boyd <earnie@SF.net>
* lib/Makefile.in (config_prefix): New variable.
	(inst_includedir): Manipulate special value only if target == cygwin
	and build == target and prefix != config_prefix.
	(inst_libdir): Ditto.
2001-09-13 12:06:28 +00:00
Christopher Faylor dc02f343bf * sync.cc (muto::acquire): Fix while/if typo. 2001-09-13 01:07:25 +00:00
Corinna Vinschen 4b081513cc * wincap.cc (wincapc::init): Simplify W2K/XP case. 2001-09-12 21:07:13 +00:00
Corinna Vinschen 09dcaf6922 * wincap.cc (wincapc::init): Set os name to "NT" on XP, too. 2001-09-12 21:03:53 +00:00
Earnie Boyd 1176fb61c9 2001-09-12 Earnie Boyd <earnie@SF.net>
* Makefile.in (TARFLAGS): New variable.
	(TARFILEEXT): Ditto.
2001-09-12 20:24:06 +00:00
Corinna Vinschen ba94682838 * Makefile.in: Build wincap.o.
* wincap.cc: New file.
        * wincap.h: Ditto.
        * autoload.cc: Add dynamic load statement for `CreateHardLinkA'.
        * dcrt0.cc (os_being_run): Eliminated.
        (osname): Ditto.
        (iswinnt): Ditto.
        (set_os_type): Ditto.
        (dll_crt0_1): Call wincap.init() instead of set_os_type().
        (_dll_crt0): Ditto.
        * environ.cc (set_chunksize): New function.
        (parse_thing): `forkchunk' setting now invokes function `set_chunksize'.
        * fork.cc (chunksize): Eliminated. Moved to be member of wincap.
        * host_dependent.h: Removed.
        * syscalls.cc (_link): Try using `CreateHardLinkA' first, if available.
        * cygheap.cc, dcrt0.cc, delqueue.cc, dir.cc,
        environ.cc, fhandler.cc, fhandler.h, fhandler_console.cc,
        fhandler_mem.cc, fork.cc, mmap.cc, net.cc, pinfo.cc, pinfo.h,
        security.cc, syscalls.cc, sysconf.cc, syslog.cc, thread.cc,
        times.cc, tty.cc, uinfo.cc, uname.cc, winsup.h: Use new wincap
        capability check throughout.
        * winsup.h: Include wincap.h. Eliminate extern declarations of
        `os_being_run' and `iswinnt'. Eliminate `os_type" definition.
        * include/cygwin/version.h: Bump version to 1.3.4.
2001-09-12 17:46:37 +00:00
Earnie Boyd c88bb51c3c 2001-09-12 Earnie Boyd <earnie@SF.net>
* Makefile.in: Increment version.
	* include/w32api.h: Ditto.
	* lib/Makefile.in: Add usr/ to install directory special for cygwin.
2001-09-12 14:48:07 +00:00
Earnie Boyd e078566ced 2001-09-11 Danny Smith <dannysmith@users.sourceforge.net>
* include/winnt.h (_[U]LARGE_INTEGER): Protect nameless struct with
	!defined(NONAMELESSUNION), rather than defined(_ANONYMOUS_STRUCT).
	(_REPARSE_DATA_BUFFER): Name union field DUMMYUNIONNAME.
2001-09-12 14:08:53 +00:00
Christopher Faylor aed6988a36 * exceptions.cc (call_signal_handler_now): Add additional guard against
inappropriately calling signal handler.
* syscalls.cc (_read): Reset errno if not exiting due to signal.
2001-09-12 05:09:24 +00:00
Christopher Faylor ff6e295ebf minor cleanups 2001-09-12 04:47:47 +00:00
Robert Collins 8e4d969260 Wed Sep 12 13:03:00 2001 Robert Collins <rbtcollins@hotmail.com>
* autoload.cc (LoadDLLfuncEx): Auto load TryEnterCriticalSection - its a
n NT only call.
        * thread.cc (pthread_cond::TimedWait): Use critical sections for NT.
        (pthread_cond::fixup_after_fork): Don't detect bad apps.
        (pthread_mutex::pthread_mutex): Use critical sections for NT.
        (pthread_mutex::~pthread_mutex): Ditto.
        (pthread_mutex::Lock): Ditto.
        (pthread_mutex::TryLock): Ditto.
        (pthread_mutex::UnLock): Ditto.
        (pthread_mutex::fixup_after_fork): Ditto. Also do not detect bad apps.
        (__pthread_mutex_trylock): Move WIN32 specific test into the class metho
d.
        (__pthread_mutex_destroy): Prevent dereferencing passed pointer without
valid address.
        * thread.h (pthread_mutex): Use critical sections for NT.
2001-09-12 03:18:05 +00:00
Christopher Faylor 101f820da2 * sigproc.h (sigframe::unregister): Return true/false whether this frame is
capable of responding to signals.
* exceptions.cc (sigframe::call_signal_handler): Don't call signal handler if
it is not armed for this thread.
2001-09-12 01:56:32 +00:00
Christopher Faylor e3c25c4a47 Update copyrights. 2001-09-11 20:01:02 +00:00
Christopher Faylor 824b5c453d fix some typos. 2001-09-11 19:40:14 +00:00
Christopher Faylor dc3543aa46 change copyright. 2001-09-11 17:02:23 +00:00
Christopher Faylor dbc82a87a3 * cygwin.din: Remove cygwin_getshared.
* shared.cc: Ditto.
* include/cygwin/version.h: Bump API minor number.
* dtable.cc (dtable::build_fhandler): Fix incorrect test for socket.
2001-09-11 15:25:08 +00:00
Robert Collins 24a930fa23 Tue Sep 11 21:22:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_cond::~pthread_cond): Bugfix: Incorrect use of InterlockExchangePointer.
	(pthread_mutex::~pthread_mutex): Ditto.
	(semaphore::~semaphore): Ditto.
2001-09-11 11:23:41 +00:00
Robert Collins f9229ef74b Tue Sep 11 18:15:00 2001 Robert Collins <rbtcollins@hotmail.com>
* dcrt0.cc (cygwin_finished_initializing): Copy _mtinterf on fork;
        * fork.cc (fork_child): fixup thread-related structures after fork;
        * thread.cc (MTinterface::Init): Initialise the new mutex, condition and semaphore lists.
        (MTinterface::fixup_after_fork): Iterate through each list and fixup the objects.
        (pthread_cond::pthread_cond): Add this to the condition list.
        (pthread_cond::~pthread_cond): Remove this from the condition list.
        (pthread_cond::fixup_after_fork): Recreate as best we can the pre-fork state.
        (pthread_mutex::pthread_mutex): Add this to the mutex list.
        (pthread_mutex::~pthread_mutex): Remove this from the mutex list.
        (pthread_mutex::fixup_after_fork): Recreate as best we can the pre-fork state.
        (semaphore::semaphore): Store the initial value, and add this to the semaphore list.
        (semaphore::~semaphore): Remove this from the semaphore list.
        (semaphore::Post): Increment the current semaphore value.
        (semaphore::TryWait): Decrement the current semaphore value.
        (semaphore::Wait): Ditto.
        (semaphote::fixup_after_fork): Recreate the pre-fork state as best we can.
        * thread.h (pthread_mutex): New members to allow fixup_after_fork.
        (pthread_cond): Ditto.
        (semaphore): Ditto.
        (MTinterface): New list heads for tracking conds and semaphores.
2001-09-11 08:15:39 +00:00
Earnie Boyd bb36822663 2001-09-05 Danny Smith <dannysmith@users.sourceforge.net>
* include/wininet.h (InternetAutodial): Add prototype.
	(InternetAutodialHangup): Ditto.
	(InternetDial): Ditto.
	(InternetGetConnectedState): Ditto.
	(InternetGoOnline): Ditto.
	(InternetHangUp): Ditto.
	(InternetSetDialState): Ditto.
	Add associated INTERNET_* auto dial flags.
	Guard typedefs and prototypes with #ifndef RC_INVOKED.
2001-09-10 16:50:06 +00:00
Earnie Boyd 34ed8fcee6 2001-09-10 Earnie Boyd <earnie@SF.net>
* dossh: Remove inadvertantly imported file.

2001-09-10  Danny Smith  <dannysmith@users.sourceforge.net>

	* dirent.c (opendir): Use GetFileAttributes rather than stat
	to determine if input arg is dir.
2001-09-10 15:41:46 +00:00
Christopher Faylor f3acbe3e3f * dtable.cc (dtable::fixup_after_fork): Use SetStdHandle appropriately on
inherited fds.
2001-09-10 02:11:59 +00:00
Christopher Faylor 6409b03b1a * sigproc.cc (NZOMBIES): Reduce substantially to minimize memory use. 2001-09-10 00:19:06 +00:00
Robert Collins ac9841a070 Mon Sep 10 08:28:00 2001 Robert Collins <rbtcollins@hotmail.com>
* thread.h (MT_Interface): Remove pshared mutex array.
        Add a threadsafe list for mutex tracking (for fixupafter fork).
        * thread.cc (MTInterface::Init): Remove pshared mutex array.
        (pthread_mutex::pthread_mutex): Remove pshared mutex functionality.
        Fail with EINVAL on attempts to use pshared functionality.
        (__pthread_mutex_getpshared): Remove.
        (__pthread_cond_timedwait): Remove pshared mutex functionality.
        (__pthread_cond_wait): Ditto.
        (__pthread_mutex_init): Ditto.
        (__pthread_mutex_getprioceiling): Ditto.
        (__pthread_mutex_lock): Ditto.
        (__pthread_mutex_trylock): Ditto.
        (__pthread_mutex_unlock): Ditto.
        (__pthread_mutex_destroy): Ditto.
        (__pthread_mutex_setprioceiling): Ditto.
        (__pthread_mutexattr_setpshared): Ditto.
2001-09-09 22:39:35 +00:00
Corinna Vinschen e3a4f8ef6f * pwdgrp.h (pwdgrp_check::set_last_modified): Call GetFileTime()
instead of GetFileInformationByHandle().
2001-09-09 21:57:44 +00:00
Christopher Faylor 3800a9e7d7 * heap.h (inheap): Rewrite macro to accomodate removal of brk macros below. 2001-09-09 20:00:29 +00:00