Commit Graph

1938 Commits

Author SHA1 Message Date
Christopher Faylor f417fcf315 Strip path when installing library. 2001-12-31 06:24:15 +00:00
Christopher Faylor 6d218bb5c6 * include/getopt.h: Fix define. 2001-12-31 04:00:07 +00:00
Christopher Faylor e56f4d7fc4 * speclib: New file.
* Makefile.in: Create library versions of automode.o, textmode.o, and binmode.o
for easier use on command line.  Create libpthread.a, libm.a, and libc.a with
subsets of exports found in libcygwin.a.
2001-12-31 03:19:29 +00:00
Christopher Faylor cdd3a8bd67 * cygmagic: Eliminate unneeded use of 'tr' and 'bc'. 2001-12-30 18:52:19 +00:00
Corinna Vinschen 5d3949b064 * security.cc (open_local_policy): Use POLICY_EXECUTE instead of
enumerating user rights.
2001-12-30 17:38:24 +00:00
Corinna Vinschen e37f6c57cd * security.cc (open_local_policy): Initialize lsa handle to NULL.
Request only needed access rights in call to LsaOpenPolicy().
	(create_token): Check for NULL lsa pointer.
2001-12-29 22:03:32 +00:00
Corinna Vinschen 971ec8d310 * cygwin.din: Add symbols for endutent(), getutent(), getutid(),
getutline(), setutent() and utmpname().
	* syscalls.cc (setutent): New function.
	(endutent): Ditto.
	(utmpname): Ditto.
	(getutent): Ditto.
	(getutid): Ditto.
	(getutline): Ditto.
	* include/cygwin/version.h: Bump API minor version.
2001-12-28 15:53:27 +00:00
Christopher Faylor aaf219f01e * cygmagic: Add define name to warning.
* dcrt0.cc (_dll_crt0): Check for changes in child_info size.
(multiple_cygwin_problem): Avoid "proc" errors when testing.  Just assume new
cygwin proc.
* shared_info.h (mount_info): Add 'cb' element for sanity checks.
(shared_info): Ditto.
* child_info.h (child_info): Add fhandler_union_size element for sanity
checking.
* shared.cc (open_shared): Detect shared region size mismatch between parent
and child.
(shared_info::initialize): Detect shared region size mismatch with expectation.
(memory_Init): Ditto.
* sigproc.cc (init_child_info): Correctly set cb in passed structure.
* shared.cc (open_shared):
2001-12-26 21:35:16 +00:00
Christopher Faylor dcd8b9be82 * include/getopt.h: Protect a declaratin. 2001-12-26 17:48:44 +00:00
Christopher Faylor c02e32c9bd * cygpath.cc (doit): Detect and warn about an empty path. Detect and warn
about errors converting a path.
(main): Set prog_name correctly -- don't leave an extra slash or backslash at
the beginning of it.
2001-12-26 17:46:12 +00:00
Robert Collins 028ee5466b Remove accenidentally left >>> marker 2001-12-26 12:48:12 +00:00
Robert Collins cbce49804f 2001-12-26 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_cond::Signal): Use a separate flag for signal detection
        and broadcast semantics.
        (__pthread_cond_dowait): Ditto.
        * thread.h (pthread_cond): New flag for testing when a waiter has woken.
2001-12-26 12:46:26 +00:00
Christopher Faylor 7a0252e203 comment 2001-12-26 06:18:41 +00:00
Christopher Faylor a2b75539a2 * Makefile.in: Quote arguments to shell scripts.
(clean): Remove new *_magic.h autogenerated files.
2001-12-26 05:02:07 +00:00
Christopher Faylor 77f4a25028 * Makefile.in: Autogenerate some header files which provide magic numbers.
Force dependencies for files which depend on autogenerated headers to ensure
that they are always built.
* child_info.h (child_info): Add new fields to accommodate new magic number
header stuff.
* dcrt0.cc: Rely on "child_info_magic.h" to ensure that correct child_info
magic numbers are used.
(dll_crt0_1): Temporarily remove _cygwin_testing_magic test.
(_dll_crt0): Do more testing on magic numbers from fork_info structure.  Call
"multiple_cygwin_problem" where appropriate.
(multiple_cygwin_problem): Rename from multiple_cygwin_die.  Issue a warning or
die, as appropriate based on cygwin version/magic number mismatch.
* pinfo.cc (pinfo::exit): Don't attempt to dereference `this' if it doesn't
exist.  This can happen when a fatal error occurs early in process
initialization.
* shared.cc: Rely on "shared_info_magic.h" to accommodate that new magic number
header stuff.
(shared_info::initialize): Use new magic number stuff, for shared region.
(memory_init): Ditto, for mount table.
* shared_info.h: Accomodate new magic number stuff for shared region and mount
table.
* sigproc.cc: Rely on "child_info_magic.h" to accommodate new magic number
header stuff.
(init_child_info): Initialize new fields in child_info) to accomodate magic
numbers.
* winsup.h: Rename multiple_cygwin_die to multiple_cygwin_problem.
* include/cygwin/version.h: Define macros for manipulating version magic.
* cygmagic: New shell script for generating magic numbers.
2001-12-26 04:53:34 +00:00
Robert Collins a3e320f3c9 2001-12-21 Robert Collins <rbtcollins@hotmail.com>
* include/wingdi.h: Add GetRandomRgn and SYSRGN.
2001-12-21 06:53:56 +00:00
Christopher Faylor 7b5ea138a2 * lib/Makefile.in: Revert inst_installdir definitions to working versions. 2001-12-21 04:42:05 +00:00
Christopher Faylor 4f235c9559 * include/cygwin/version.h: Bump API minor version for below changes. 2001-12-20 18:54:30 +00:00
Christopher Faylor 93034cfc7c Remove obsolete include. 2001-12-20 03:03:59 +00:00
Christopher Faylor 48beacf6e4 * Makefile.in (VPATH): Add regex directory.
(NM): new variable.
(OBSOLETE_FUNCTIONS): Ditto.
(NEW_FUNCTIONS): Ditto.
(install-headers): Install regex.h.
(install-man): New target.
(install): Use new target.
(DLL_OFILES): Add v8_reg* stuff.
(new-cygwin1.dll): Eliminate stamp-cygwin-lib creation.
(libcygwin.a): Remove obsolete functions from import lib.  Add new functions.
* configure.in: Detect 'nm' tool.
* configure: Regenerate.
* cygwin.din: Export posix_reg* functions.  Eliminate export of v8 reg*
functions.  This is now handled in object files themselves.
* regex/*: New files.
* regexp/v8_*.c: New files, renamed from non v8_ equivalents.
2001-12-20 02:55:11 +00:00
Christopher Faylor 4b31ae795b Fix up comments. 2001-12-19 20:10:03 +00:00
Christopher Faylor aa053fd461 * Makefile.in: Don't attempt to use zlib directory as a dependency if it
doesn't exist.
2001-12-19 03:35:36 +00:00
Corinna Vinschen 6d114a5dea * include/getopt.h: Don't define getopt_long() and friends when
included through unistd.h.
2001-12-17 21:34:59 +00:00
Christopher Faylor 513a848fe6 * dtable.cc (dtable::init_std_file_from_handle): Avoid initializing using an
invalid handle.
2001-12-17 19:55:58 +00:00
Christopher Faylor a318eb217d * include/limits.h: Define LLONG_MIN, LLONG_MAX, ULLONG_MAX. 2001-12-17 01:41:07 +00:00
Robert Collins 4706b72837 2001-12-17 Guido Serassio <serassio@libero.it>
* include/winsvc.h: Add ChangeServiceConfig2() &
        QueryServiceConfig2() definition
2001-12-16 21:57:36 +00:00
Robert Collins 990d6d89b6 2001-12-17 Robret Collins <rbtcollins@hotmail.com>
* include/commctrl.h: New typedefs for HDLAYOUT and LPHDLAYOUT based
	on MSDN documentation for XP.
2001-12-16 21:55:40 +00:00
Corinna Vinschen 8606f0058e * mkpasswd.c (enum_users): Change to unconditionally use
the --path-to-home option, if supplied by the user.  Use default
	--path-to-home option value, if appropriate.
	(usage): Change usage statement to reflect new semantics.
	(main): Remove defaulting of the --path-to-home option.
2001-12-14 20:01:53 +00:00
Christopher Faylor b6ddef77a4 Add missing ChangeLog.
* configure.in: Detect zlib subdirectory.
* configure: Regenerate
2001-12-14 18:26:43 +00:00
Christopher Faylor 94597cd05f * Makefile.in: Exit immediately if a sub-make fails. 2001-12-14 18:23:19 +00:00
Christopher Faylor bdc7392ce3 * mkpasswd.c (opts): Add indication that '-p' option requires an argument. 2001-12-14 17:15:37 +00:00
Christopher Faylor e05f3227be * Makefile.in: Add define to CXXFLAGS. 2001-12-11 22:51:01 +00:00
Christopher Faylor 9b02812029 * include/getopt.h: Add HAVE_DECL_GETOPT to save pain elsewhere. 2001-12-11 22:22:43 +00:00
Christopher Faylor c4d15ff443 * what.texinfo: Clarify XP. 2001-12-11 17:16:02 +00:00
Christopher Faylor 40139114ea * fhandler.h (fhandler_serial::ev): New class member.
* fhandler_serial.cc (fhandler_serial::raw_read): Use class member for event
status.
* select.cc (peek_serial): Ditto.
2001-12-11 00:24:46 +00:00
Christopher Faylor cf77faefc8 whitespace cleanup 2001-12-10 03:35:54 +00:00
Christopher Faylor 397f94082d * path.cc (path_conv::check): Use full path name for determining attributes
when /cygdrive/x/foo.
2001-12-08 01:27:10 +00:00
Earnie Boyd 15a1d3f2fc * Makefile.in: Increment VERSION.
* include/_mingw.h: Ditto.
2001-12-07 21:38:03 +00:00
Earnie Boyd ddd50f72b5 * Makefile.in: Increment VERSION.
* include/w32api.h: Ditto.
2001-12-07 21:29:30 +00:00
Earnie Boyd 17e6a0014b merge changes from MinGW 2001-12-07 14:15:24 +00:00
Christopher Faylor a12a3466b1 * path.cc (path_conv::check): Reset FH_CYGDRIVE if iterating through path. 2001-12-07 05:03:32 +00:00
Christopher Faylor a0c1938145 * path.cc (path_conv::check): Don't complain if /dev/x/foo when x doesn't
exist.
(mount_info::conv_to_win32_path): Keep translating when a /cygdrive is found.
Don't attempt to translate to a device name when devn == FH_CYGDRIVE.
(cygwin_conv_to_win32_path): Set buffer to empty on error.
(cygwin_conv_to_full_win32_path): Ditto.
* window.cc: Include unistd.h to verify definitions.
2001-12-06 22:36:08 +00:00
Christopher Faylor 5a88f2554a * dir.cc (opendir): Detect error return from build_fhandler_from_name. 2001-12-05 23:05:15 +00:00
Earnie Boyd 98a05abd05 Merge MinGW CVS differences 2001-12-05 15:01:06 +00:00
Earnie Boyd ff1924262a * include/strings.h: New file. 2001-12-05 13:55:19 +00:00
Christopher Faylor d653df0d95 Add missing ChangeLog entries. 2001-12-05 04:48:15 +00:00
Christopher Faylor 958348a4cf * net.cc (cygwin_getsockopt): Dereference optlen pointer when passing to
__check_null_invalid_struct_errno.
2001-12-04 22:01:03 +00:00
Earnie Boyd 937b5e4d04 2001-12-04 Earnie Boyd <earnie@users.sf.net>
* include/winuser.h (IDC_STATIC): Don't define.
2001-12-04 14:36:40 +00:00
Earnie Boyd 9d2dfde225 2001-12-04 Danny Smith <dannysmith@users.sourceforge.net>
Cleanup merge between SourceForge and winsup CVS.
        * include/winbase.h (OSVERSIONINFO[AW], OSVERSIONINFOEX[AW]: Remove
	definitions.
        * include/winnt.h (VER_NT*): Remove duplicate defines.
        (VER_SUITE*): Group with VER_PLATFORM*, VER_NT* defines.
2001-12-04 13:35:34 +00:00
Christopher Faylor 63928f6088 Cleanup copyrights and Cygnus'isms throughout.
* setup.sgml: Nuke ancient instructions.
2001-12-04 04:20:31 +00:00
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