Commit Graph

6440 Commits

Author SHA1 Message Date
Danny Smith 9a08dde11a 2007-01-11 Gisle Vanem <giva@users.sourceforge.net>
* include/winbase.h (struct _OVERLAPPED): Change type of
	Internal, InternalHigh members to ULONG_PTR.
	(PAPCFUNC): Change DWORD parameter to ULONG_PTR.
	(CreateIoCompletionPort): Likewise.
	(PostQueuedCompletionStatus): Likewise.
	(QueueUserAPC): Likewise.
	(GetQueuedCompletionStatus): Change PDWORD parm to PULONG_PTR.
2007-01-11 07:11:39 +00:00
Corinna Vinschen 3452cdd3c5 * mmap.cc (mmap64): Pre-Reserve space for the whole mapping to get a
useful, valid address before the actual mappings take place.
	Fix typo in comment.
2007-01-10 09:30:38 +00:00
Corinna Vinschen ac924d61de * syscalls.cc (sync): Use b_drive for B: drive (Thanks to Howard Chu). 2007-01-10 09:06:20 +00:00
Corinna Vinschen 1656b94637 * syscalls.cc (getpagesize): Change condition for clarity.
(getsystempagesize): Ditto.
2007-01-09 15:46:41 +00:00
Corinna Vinschen ca9029913a * cygpath.cc (usage): Add -O and -F, remove tabs.
(get_special_folder): New function.
	(get_user_folder): New function.
	(dowin): Add -O and -F, better -D, -P error handling.
	(main): Add -O and -F.
	* utils.sgml (cygpath): Document -O and -F.
2007-01-09 12:17:05 +00:00
Corinna Vinschen d5b45d2f38 * mmap.cc: Do bookkeeping in 4K pages, rather than in 64K chunks. 2007-01-09 11:18:57 +00:00
Danny Smith 1e848f5e32 2007-02-06 Pierre A. Humblet <Pierre.Humblet@ieee.org>
* windns.h (DNS_TYPE_RP, DNS_TYPE_AFSDB, DNS_TYPE_X25,
	DNS_TYPE_ISDN, DNS_TYPE_RT, DNS_TYPE_NSAP, DNS_TYPE_NSAPPTR,
	DNS_TYPE_SIG, DNS_TYPE_KEY, DNS_TYPE_PX, DNS_TYPE_GPOS,
	DNS_TYPE_AAAA, DNS_TYPE_LOC, DNS_TYPE_NXT, DNS_TYPE_EID,
	DNS_TYPE_NIMLOC, DNS_TYPE_SRV, DNS_TYPE_ATMA, DNS_TYPE_NAPTR,
	DNS_TYPE_KX, DNS_TYPE_CERT, DNS_TYPE_A6, DNS_TYPE_DNAME,
	DNS_TYPE_SINK, DNS_TYPE_OPT, DNS_TYPE_UINFO, DNS_TYPE_UID,
	DNS_TYPE_GID, DNS_TYPE_UNSPEC, DNS_TYPE_ADDRS, DNS_TYPE_TKEY,
	DNS_TYPE_TSIG, DNS_TYPE_IXFR, DNS_TYPE_AXFR, DNS_TYPE_MAILB,
	DNS_TYPE_MAILA, DNS_TYPE_ALL, DNS_TYPE_ANY): Add enum values.
2007-01-08 08:09:15 +00:00
Corinna Vinschen 6bcc8fd7b1 * security.h (setacl): Add parameter for writability flag.
* sec_acl.cc (setacl): Ditto.  Set to true if any ACE with write
	permissions is created.
	* fhandler_disk_file.cc (fhandler_disk_file::facl): Reset
	FILE_ATTRIBUTE_READONLY if ACL contains an ACE with write permissions.
2007-01-07 12:44:10 +00:00
Corinna Vinschen 7ce031f211 * include/strings.h: Don't include string.h. Only declare functions
according to SUSv3.
2007-01-05 15:09:22 +00:00
Corinna Vinschen 0a9e977f62 (get_ifconf): Set MTU for loopback to more correct value. 2007-01-04 10:48:57 +00:00
Corinna Vinschen bcdf742178 * fhandler_socket.cc (fhandler_socket::ioctl): Don't fake results
for SIOCGIFFLAGS here.  Call get_ifconf instead.
	* net.cc (get_2k_ifconf): Clean up code to generate interface name.
	Handle SIOCGIFFLAGS here.
	(get_nt_ifconf): Fake SIOCGIFFLAGS here.
	(get_95_ifconf): Ditto.
	(get_ifconf): Don't fake loopback on systems with IP Helper Lib.
	Set MTU for loopback to a more "modern" value.
2007-01-04 10:11:27 +00:00
Corinna Vinschen 7bef7db5cc * fhandler.h (PREFERRED_IO_BLKSIZE): Define as 64K.
* fhandler.cc (fhandler_base::fstat): Set st_blksize to
	PREFERRED_IO_BLKSIZE.
	* fhandler_disk_file.cc (fhandler_base::fstat_helper): Ditto.
	* fhandler_mailslot.cc (fhandler_mailslot::fstat): Ditto.
	* fhandler_raw.cc (fhandler_dev_raw::fstat): Ditto.
2007-01-04 09:17:55 +00:00
Corinna Vinschen 960725d6ed * ChangeLog: Happy New Year.
* ChangeLog-2006: Move 2006 changelogs here.
	* spawn.cc: Bump copyright.
2007-01-03 11:14:53 +00:00
Christopher Faylor e734fdcae9 * spawn.cc (spawn_guts): Don't expect synchronization from a non-cygwin
_P_NOWAIT process.
2007-01-01 19:37:19 +00:00
Keith Marshall 724dbeea36 * include/libgen.h: New file; required by...
* mingwex/basename.c, mingwex/dirname.c: New files.
* mingwex/Makefile.in (DISTFILES): Add them...
(POSIX_OBJS): ...with corresponding basename.o, dirname.o
(Dependencies): Typo; s/Dependancies/Dependencies/
2006-12-31 18:03:33 +00:00
Corinna Vinschen 65c3750e65 * fhandler_disk_file.cc (fhandler_disk_file::readdir): Improve debug
output.
2006-12-21 10:59:47 +00:00
Corinna Vinschen f2af71ea96 * dumper.cc: Include ansidecl.h before including bfd.h to woraround
a problem with the order in which system include files are included.
2006-12-21 09:59:04 +00:00
Corinna Vinschen 97b09fe1c5 Partially revert change from 2006-10-22. GetSecurityInfo messes up
user information on NT4.
	* sec_helper.cc (security_descriptor::malloc): Drop LocalAlloc
	considerations.
	(security_descriptor::realloc): Ditto.
	(security_descriptor::free): Ditto.
	* security.cc (get_reg_security): Reinstantiate.
	(get_nt_object_security): Revert to using NtQuerySecurityObject.
	* security.h (class security_descriptor): Drop type member.
	Accommodate throughout.
	(security_descriptor::size): Constify.
	(security_descriptor::copy): Ditto.
2006-12-20 17:14:23 +00:00
Christopher Faylor e09c8fde55 * pinfo.cc (set_myself): Use a more foolproof method for determining if the
current process was started from another cygiwn process.
2006-12-18 21:28:31 +00:00
Corinna Vinschen c21efb9a85 * libc/minires-os-if.c (cygwin_query): Remove ERROR_PROC_NOT_FOUND case.
(get_dns_info): Verify DnsQuery exists. Use autoloaded GetNetworkParams.
2006-12-15 09:50:32 +00:00
Corinna Vinschen 1fd82398bb * winsup.h (clear_procimptoken): Close hProcImpToken in a safer way. 2006-12-13 11:18:39 +00:00
Corinna Vinschen 56face1741 * security.cc (lsaauth): Initialize lsa to INVALID_HANDLE_VALUE to
avoid potential access violation.
2006-12-13 09:53:42 +00:00
Corinna Vinschen 524e6a5ad9 * Makefile.in (subauth): Drop rule.
* configure.in: Remove subauth related check.
	* configure: Regenerate.
2006-12-12 20:26:27 +00:00
Corinna Vinschen 67f85328b2 Remove subauth directory. 2006-12-12 19:22:07 +00:00
Corinna Vinschen 26684e48d2 * environ.cc (subauth_id_init): Remove.
(parse_thing): Drop "subauth_id" option.
	* security.cc (get_token_group_sidlist): Drop comments concerning
	subauthentication.
	(create_token): Back out subauthentication related changes.
	(subauth): Remove.
	* security.h (create_token): Remove declaration.
	(subauth): Ditto.
	* syscalls.cc (seteuid32): Drop subauthentication handling entirely.
2006-12-12 19:18:56 +00:00
Corinna Vinschen 31fdd91f9b * cygwinenv.sgml: Drop description of "traverse" option. 2006-12-12 18:48:35 +00:00
Corinna Vinschen a889232410 * environ.cc (set_traverse): Remove.
(parse_thing): Drop "traverse" option.
	* path.cc (fs_info::update): Don't request SE_CHANGE_NOTIFY_PRIV
	privilege.
	* sec_helper.cc (set_cygwin_privileges): Ditto.
	* security.cc (allow_traverse): Remove.
	(alloc_sd): Drop special allow_traverse code.
	* security.h (allow_traverse): Drop declaration.
	* syscalls.cc (statvfs): Don't request SE_CHANGE_NOTIFY_PRIV privilege.
2006-12-12 18:47:25 +00:00
Corinna Vinschen 5684cfebba Partially revert change from 2005-04-03, always running under an
impersonation token, which collides with Vista UAC.
	* cygheap.h (deimpersonate): revert to self instead of impersonating
	hProcImpToken.
	(reimpersonate): Only impersonate if setuid.
	* dcrt0.cc (dll_crt0_0): Don't initialize hProcImpToken here.
	(dll_crt0_1): Set privileges on hProcToken.
	* fork.cc (frok::child): Set privileges on hProcToken.  Close handle to
	hProcImpToken.
	* grp.cc (internal_getgroups): Use hProcToken instead of hProcImpToken.
	* security.cc (check_access): Create hProcImpToken on demand here.
	* security.h (set_process_privilege): Set privileges on hProcToken.
	(_push_thread_privilege): Use hProcToken instead of hProcImpToken.
	(pop_thread_privilege): If not setuid'ed, revert to self.
	* syscalls.cc (setegid32): Drop setting primary group on hProcImpToken.
	Close handle to hProcImpToken.
	* uinfo.cc (internal_getlogin): Ditto.
	* winsup.h (clear_procimptoken): New inline function.
2006-12-12 16:27:32 +00:00
Christopher Faylor 815122d842 Add missing ChangeLog. 2006-12-12 15:59:26 +00:00
Christopher Faylor a10c6f0312 * sigproc.cc (child_info::child_info): Initialize msv_count. 2006-12-12 15:58:08 +00:00
Corinna Vinschen 46b51548b1 Revert erroneous checkin. 2006-12-12 15:10:56 +00:00
Corinna Vinschen d6a6da338b * libc/minires.c (res_ninit): Drop handling for LOCALDOMAIN environment
variable.
2006-12-12 08:29:37 +00:00
Corinna Vinschen 0c365c631f * Makefile.in (DLL_OFILES): Add minires-os-if.o and minires.o.
(SUBLIBS): Add libresolv.a.
	Add rule for libresolv.a.
	* autoload.cc: Fix return code handling for IP Helper API in case
	of being unable to load iphlpapi.dll.
	(DnsQuery_A): Define.
	(DnsRecordListFree): Define.
	* cygwin.din: Export resolver functions.
	* include/resolv.h: New header.
	* include/arpa/nameser.h: New header.
	* include/arpa/nameser_compat.h: New header.
	* include/cygwin/version.h: Bump API minor number.
	* libc/minires-os-if.c: New file.
	* libc/minires.c: New file.
	* libc/minires.h: New file.
2006-12-11 19:59:06 +00:00
Christopher Faylor 7dfad3a0c6 * sigproc.cc (child_info::child_info): Move old comment about msv_count here.
Edit it slightly to reflect new sensibilities.
2006-12-11 19:17:20 +00:00
Christopher Faylor 6dcb2ec441 * dumper.cc: Add an include to accommodate new include/elf usage. 2006-12-11 19:17:17 +00:00
Christopher Faylor fc32d70841 correct email address 2006-12-11 18:58:40 +00:00
Christopher Faylor c16548b2a2 * child_info.h (child_info_spawn::__stdin): New element.
(child_info_spawn::__stdin): Ditto.
(CURR_CHILD_INFO_MAGIC): Regenerate.
* dcrt0.cc (check_sanity_and_sync): Minor cleanup.
(child_info_spawn::handle_spawn): Handle new __std* elements by calling
move_fd.
* dtable.cc (dtable::move_fd): Define new function.
* dtable.h (dtable::move_fd): Declare new function.
* fhandler.h (fhandler_pipe::popen_pid): Declare new element.
* fhandler.h (fhandler_pipe::get_popen_pid): Define new function.
* fhandler.h (fhandler_pipe::set_popen_pid): Ditto.
* pipe.cc (fhandler_pipe::fhandler_pipe): Zero popen_pid.
(fhandler_pipe::dup): Ditto.
* spawn.cc (handle): Change second argument to bool.
(spawn_guts): Accept __stdin/__stdout arguments and set them appropriately in
child_info structure and in STARTUPINFO structure.
* syscalls.cc (popen): New cygwin-specific implementation using spawn.
(pclose): Ditto.
* winsup.h (spawn_guts): Accommodate new arguments for spawn_guts.
* fhandler.cc (fhandler_base::set_no_inheritance): Make second arg a bool.
* fhandler.h (fhandler_base::set_no_inheritance): Ditto for declaration.
* child_info.h (child_info::msv_count): Rename from the now-inappropriate
"zero".
(child_info_spawn::filler): Add filler to work around Vista bug.
(child_info_fork::filler): Ditto.
* dcrt0.cc (get_cygwin_startup_info): Remove "zero" check since it is now
always filled out.
* fork.cc (frok::parent): Move ch.zero manipulation to constructor.
* spawn.cc (spawn_guts): Ditto.  Remove _ch wrapper.
* sigproc.cc (child_info::child_info): Initialize starter[].
* shared.cc (shared_info::heap_slop_size): Remove noisy system_printfs.
* shared_info.h (CURR_SHARED_MAGIC): Regenerate.
2006-12-11 18:55:29 +00:00
Corinna Vinschen e79c01f84e * fhandler.cc (rootdir): Fix typo in comment.
* syscalls.cc (try_to_bin): Ditto.
2006-12-11 09:07:22 +00:00
Christopher Faylor c2b8862303 * mount.cc (do_mount): Avoid unnecessary cygwin_conv_to_win32_path and pass
POSIX path directly - this avoids a cygwin DLL warning.
2006-12-10 21:50:06 +00:00
Corinna Vinschen cbfb7b1b23 * autoload.cc (SHFileOperationA): Drop definition.
* ntdll.h (struct _FILE_RENAME_INFORMATION): Define.
	* path.cc (fs_info::update): Note length of rootdir prefix in
	root_len.
	(get_nt_native_path): New function, taking over functionality of
	path_conv::get_nt_native_path.
	(path_conv::get_nt_native_path): Just call get_nt_native_path.
	* path.h (get_nt_native_path): Declare.
	(struct fs_info): New member root_len.
	(fs_info::length): New inline method returning root_len.
	(path_conv::rootdir): New inline method returning rootdir prefix.
	* syscalls.cc (try_to_bin): Rewrite using only system calls.
	(unlink_nt): Call try_to_bin with additional handle to open file
	parameter.
	(statvfs): Use path_conv::rootdir method.
	* wincap.h: Define has_recycle_dot_bin throughout.
	* wincap.cc: Ditto.
2006-12-10 16:43:30 +00:00
Corinna Vinschen 6c64fb2fda * fhandler.cc (rootdir): Clarify comment. 2006-12-10 16:20:43 +00:00
Corinna Vinschen 37ae69e8b1 * fhandler.cc (rootdir): Don't look for volume mount points on remote
shares.
2006-12-10 16:18:51 +00:00
Corinna Vinschen 30cf835f7e * fhandler.cc (rootdir): Drop useless post-increment. Take volume
mount points into account.
	(check_posix_perm): Allocate space for root directory big enough.
2006-12-10 12:56:50 +00:00
Corinna Vinschen 8af19fdb25 * syscalls.cc (try_to_bin): Add comment that this is not possibly
the final version.
2006-12-09 09:29:47 +00:00
Corinna Vinschen e563a4d5b8 * syscalls.cc (unlink_nt): Open native symlinks with
FILE_OPEN_REPARSE_POINT flag.
2006-12-07 17:53:05 +00:00
Corinna Vinschen 1c9b2968fa * ntdll.h (STATUS_DELETE_PENDING): Define.
(struct _FILE_DISPOSITION_INFORMATION): Define.
	* syscalls.cc (unlink_9x): new function to delete file on 9x.
	* syscalls.cc (unlink_nt): new function to delete file on NT.
	(unlink): Simplify.  Move OS dependent stuff into aforementioned
	functions.  Also handle FILE_ATTRIBUTE_HIDDEN as R/O-like flag.
2006-12-07 17:40:24 +00:00
Corinna Vinschen 398e28fbbc * autoload.cc (SHFileOperationA): Define.
* syscalls.cc (try_to_bin): New function trying to move a file to
	the recycle bin.
	(unlink): Fix arguments used in CreateFile for delete on close.
	Before closing the handle, try to move the file to the recycle bin.
2006-12-07 11:53:46 +00:00
Corinna Vinschen 2ffc166d07 * cygheap.h (struct cwdstuff): Add "sync" member and accompanying
"keep_in_sync" methods.
	* external.cc (cygwin_internal): Call above keep_in_sync method when
	CW_SYNC_WINENV is requested.
	* path.cc (cwdstuff::init): Don't change to windows_system_directory
	if keep_in_sync is requested.
	(cwdstuff::keep_in_sync): New method.
	(cwdstuff::set): Take sync flag into account.
2006-12-07 10:04:52 +00:00
Corinna Vinschen 63f33caadc * termios.cc: Change include order to accomodate change to sys/ioctl.h. 2006-12-06 19:44:07 +00:00
Corinna Vinschen 8b8273781b * fhandler_mem.cc (fhandler_dev_mem::open): Fix comment.
* wincap.cc (has_physical_mem_access): Reflect the fact that physical
	memory access has been made a protected operation beginning with
	2003 Server.
2006-12-06 16:33:03 +00:00
Corinna Vinschen bf8ea306ec * include/sys/ioctl.h: Pick up termios.h, for TIOCGWINSZ. 2006-12-06 14:08:08 +00:00
Corinna Vinschen 6acc178a24 * winsup.h (WINVER): Set to 0x0600 to cover Vista. 2006-12-06 14:06:38 +00:00
Corinna Vinschen ad7915ffca * fhandler_disk_file.cc (fhandler_disk_file::rmdir): Fix typo. 2006-12-06 14:05:59 +00:00
Corinna Vinschen 3c788ea42a * path.cc (cwdstuff::init): Don't change to windows_system_directory
if Cygwin DLL has been loaded dynamically.
2006-12-05 21:46:26 +00:00
Corinna Vinschen 2156546df2 * path.cc (cwdstuff::set): Don't try to open directory on systems not
supporting that.
2006-12-05 13:20:38 +00:00
Corinna Vinschen a83c59fbc3 * dcrt0.cc (get_cygwin_startup_info): Fix comment.
* wincap.cc (wincapc::init): Always reset needs_count_in_si_lpres2 to
	false on non 64-bit systems.
2006-12-05 13:16:24 +00:00
Corinna Vinschen 301cd37dda Fix date. 2006-12-05 11:07:12 +00:00
Corinna Vinschen c6674b53d3 * dcrt0.cc (get_cygwin_startup_info): Change zeros to DWORD array.
Expect first DWORD in child_info struct being set to non-zero if
	wincap.needs_count_in_si_lpres2 is set.  Add comment to explain why.
	* fork.cc (frok::parent): Set ch.zero[0] to a sensible count value
	if wincap.needs_count_in_si_lpres2 is set.
	* spawn.cc (spawn_guts): Ditto.  Add filler bytes after ch on stack
	to accomodate needs_count_in_si_lpres2.
	* wincap.h: Define needs_count_in_si_lpres2 throughout.
	* wincap.cc: Ditto.
2006-12-05 10:59:21 +00:00
Corinna Vinschen 8eca536272 * dir.cc (mkdir): Check last path component for "..".
(rmdir): Don't check last path component for "..".
	* fhandler_disk_file.cc (fhandler_disk_file::rmdir): Drop kludge
	which tries to allow deleting the current working directory.
	* path.cc (has_dot_last_component): Add parameter to indicate testing
	for "..".  Take trailing slash into account.
	(symlink_info::posixify): Rely on cygheap->cwd.win32 having a
	useful value.
	(cwdstuff::init): Initialize cygheap->cwd with current working
	directory.  Change to windows_system_directory afterwards.
	(cwdstuff::set): Never call SetCurrentDirectory here.  Just check
	if changing into target directory would be allowed.  Add comment to
	explain why.
	* path.h (has_dot_last_component): Declare with second parameter.
	* pinfo.cc (pinfo::zap_cwd): Remove.
	(pinfo::exit): Drop call to zap_cwd.
	* pinfo.h (class pinfo): Remove declaration of zap_cwd.
	* spawn.cc (spawn_guts): Set current working directory for non-Cygwin
	child applications.  Drop call to zap_cwd.
2006-11-30 10:17:24 +00:00
Corinna Vinschen 75bb63452d * security.cc (create_token): Revert erroneous change to test
subauth_token for INVAILD_HANDLE_VALUE.
	* syscalls.cc (seteuid32): Set create_token's subauth_token parameter
	back to NULL.
2006-11-28 23:15:01 +00:00
Corinna Vinschen 902716e599 * fhandler.cc (fhandler_base::open): Fix previous patch to handle the
SYSTEM attribute as well.
2006-11-28 09:57:01 +00:00
Corinna Vinschen ef26cc9307 * fhandler.cc (fhandler_base::open): Fix handling of files with
HIDDEN attribute set.
2006-11-27 19:14:24 +00:00
Christopher Faylor f64b151f59 * include/cygwin/signal.h: Add __extension__ to various anonymous unions and
structs.  (thanks to V.Haisman)
2006-11-27 16:43:34 +00:00
Corinna Vinschen 8e4735df6c Initial release of the Cygwin LSA authentication package.
* ChangeLog: New file.
	* Makefile.in: Ditto.
	* aclocal.m4: Ditto.
	* configure.in: Ditto.
	* configure: Ditto. Generated from configure.in.
	* cyglsa-config: Ditto.
	* cyglsa.c: Ditto.
	* cyglsa.din: Ditto.
	* cyglsa64.dll: Ditto.
	* make-64bit-version-with-visual-c.bat: Ditto.
	* mslsa.def: Ditto.
2006-11-27 13:05:54 +00:00
Corinna Vinschen c6caaa3429 * Makefile.in: Add dependencies for lsaauth.
* configure.in: Disable building subauth.  Add building lsaauth.
	* configure: Regenerate.
2006-11-27 13:01:36 +00:00
Corinna Vinschen b825c587ba * cyglsa.h: New header file.
* environ.cc: Disable subauth settings.
	* grp.cc: Accomodate cygsidlist's count now being a method.
	* sec_helper.cc (SECURITY_MANDATORY_INTEGRITY_AUTHORITY): Remove.
	(mandatory_medium_integrity_sid): Remove.
	(mandatory_high_integrity_sid): Remove.
	(mandatory_system_integrity_sid): Remove.
	(fake_logon_sid): Add.
	(cygsid::get_sid): Add well_known parameter.  Set well_known_sid
	accordingly.
	(cygsid::getfromstr): Ditto.
	(cygsidlist::alloc_sids): Move here from security.cc.
	(cygsidlist::free_sids): Ditto.
	(cygsidlist::add): Move here from security.h.  Add well_known parameter.
	Set well_known_sid accordingly.  Don't allow duplicate SIDs.
	* security.cc: Include cyglsa.h and cygwin/version.h.  Throughout
	accomodate cygsidlist's count now being a method.  Throughout drop
	redundant "contains" tests.
	(get_user_local_groups): Add local groups as well known SIDs.
	(get_token_group_sidlist): Add well known groups as well known SIDs.
	(get_server_groups): Ditto.  Only call get_unix_group_sidlist after
	get_user_local_groups to maintain "well_known_sid" attribute.
	(get_initgroups_sidlist): Add well known groups as well known SIDs.
	(get_setgroups_sidlist): Add usersid and struct passwd parameter to
	allow calling get_server_groups from here.
	(get_system_priv_list): Make static.  Return size of TOKEN_PRIVILEGES
	structure.
	(get_priv_list): Ditto.
	(create_token): Accomodate above changes.  Drop misguided attempt to
	add MIC SIDs to created user token.  Print returned token as hex value.
	(subauth): Disable.
	(lsaauth): New function implementing client side of LSA authentication.
	* security.h (class cygsid): Add well_known_sid attribute.  Accomodate
	throughout.  Add *= operator to create a well known SID.
	(class cygsidlist): Rename count to cnt.  Make count a method.
	(cygsidlist::add): Move to sec_helper.cc.
	(cygsidlist::operator *=): New method to add well known SID.
	(cygsidlist::non_well_known_count): New method returning number of
	non well known SIDs in list.
	(cygsidlist::next_non_well_known_sid): New method returning next non
	well known SID by index.
	(mandatory_medium_integrity_sid): Drop declaration.
	(mandatory_high_integrity_sid): Drop declaration.
	(mandatory_system_integrity_sid): Drop declaration.
	(fake_logon_sid): Add declaration.
	(subauth): Disable declaration.
	(lsaauth): Add declaration.
	* syscalls.cc (seteuid32): Disable subauthentication.  Add LSA
	authentication.
	* wincap.h: Define needs_logon_sid_in_sid_list throughout.
	* wincap.cc: Ditto.
2006-11-27 12:59:59 +00:00
Keith Marshall b6bb405954 configure.in: Update to autoconf 2.5x syntax; fix macro argument quoting;
remove invalid use of AC_ALLOCA; remove redundant use of AC_SUBST.
2006-11-25 15:55:05 +00:00
Corinna Vinschen 124b187f16 * security.h (DBGSID): Define for debugging purposes.
(MKSID): Rename from SID so as to not hide SID definition from winnt.h.
	* sec_helper.cc: Change SID to MKSID throughout.
2006-11-23 16:44:55 +00:00
Corinna Vinschen 23f710014d * net.cc (get_ipv6_funcs): Fix formatting. 2006-11-23 16:30:12 +00:00
Corinna Vinschen 86404692c6 * path.cc (fs_info::update): Define GETVOLINFO_VALID_MASK and TEST_GVI.
Change FS_IS_SAMBA and FS_IS_SAMBA_WITH_QUOTA and their usage
	accordingly.  Define FS_IS_NETAPP_DATAONTAP.  Recognize NetApp device
	and store in is_netapp flag.  Mark NetApp device as having no good
	inodes.
	* path.h (struct fs_info): Add is_netapp flag.  Add matching accessors.
2006-11-23 11:28:52 +00:00
Corinna Vinschen bf4071fad0 * fhandler_console.cc (set_color): Avoid (again) inappropriate
intensity interchanging that used to render reverse output unreadable
	when (non-reversed) text is bright.
	See http://sourceware.org/bugzilla/show_bug.cgi?id=514
2006-11-23 10:08:04 +00:00
Corinna Vinschen 9e3f289f51 * devices.h: Add additional SCSI disk block device numbers per
http://www.kernel.org/pub/linux/docs/device-list/devices.txt
	up to 128 devices.
	* devices.in: Ditto.
	(device::parsedisk): Add additonal else-if cases for decoding base
	and drive indices.
	* devices.cc: Regenerate.
	* dtable.cc (build_fh_pc): Add additional DEV_SD{2..7}_MAJOR cases.
2006-11-23 09:55:55 +00:00
Danny Smith d22713e25d * Makefile.in: Add aclocal.m4 to source release. 2006-11-21 09:36:00 +00:00
Danny Smith 5f2d9e5fac * Makefile.in: Add aclocal.m4:to source release.
* mingwex/Makefile.in: Ditto.
	* profile/Makefile.in: Ditto.
2006-11-21 09:30:15 +00:00
Chris Sutcliffe a44ecdf5ae 2006-11-18 Chris Sutcliffe <ir0nh34d@users.sf.net>
* include/w32api.h: Increment version to 3.8.
        * Makefile.in: Ditto.
2006-11-18 22:39:52 +00:00
Chris Sutcliffe c6bf4f2a19 2006-11-18 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Include/_mingw.h: Increment version to 3.11.
        * Makefile.in: Ditto.
2006-11-18 22:26:49 +00:00
Danny Smith 96da86f7e8 2006-11-13 Daniel Schlyder <thrug@users.sourceforge.net>
* include/winnt.h (VER_SUITE_EMBEDDEDNT, VER_SUITE_SINGLEUSERTS,
	VER_SUITE_STORAGE_SERVER, VER_SUITE_COMPUTE_SERVER): Define.

	* include/winuser.h (SM_STARTER, SM_SERVERR2): Define.
2006-11-13 02:11:45 +00:00
Corinna Vinschen c3a0492e16 * autoload.cc (EqualPrefixSid): Define.
* security.cc (create_token): Drop grps_buf.  Use alloca instead.
	Only add the MIC SID to the TOKEN_GROUPS list for the NtCreateToken
	call.  If the subauthentication token exists, use its MIC SID.
	Set SID Attributes for the MIC SID to 0.
2006-11-09 15:24:34 +00:00
Danny Smith cb505ee695 [ mingw-Bugs-1590623 ]
* include/_mingw.h (__CRT_INLINE): Use __gnu_inline__ attribute
	in C99 mode.
2006-11-08 21:58:18 +00:00
Corinna Vinschen 2fd2ddf3f5 * sec_helper.cc (sid_auth): Remove.
(well_known_this_org_sid): New well known sid.
	(SECURITY_MANDATORY_INTEGRITY_AUTHORITY): Define.
	(mandatory_medium_integrity_sid): New well known sid.
	(mandatory_high_integrity_sid): Ditto.
	(mandatory_system_integrity_sid): Ditto.
	(cygsid::get_sid): Use local SID_IDENTIFIER_AUTHORITY.  Allow all
	authorities fitting in a UCHAR.
	* security.cc (get_token_group_sidlist): Always add the local
	group to the token.  Add comment.  Add "This Organization" group
	if available in incoming group list.
	(get_server_groups): Only add world and authenticated users groups
	if not already in list.
	(create_token): Add matching mandatory integrity SID to group list
	on systems supporting Mandatory Integrity Control.
	* security.h (well_known_this_org_sid): Define.
	(mandatory_medium_integrity_sid): Define.
	(mandatory_high_integrity_sid): Define.
	(mandatory_system_integrity_sid): Define.
	* wincap.h: Define has_mandatory_integrity_control throughout.
	* wincap.cc: Ditto.
2006-11-08 11:38:05 +00:00
Corinna Vinschen 86bc8fadff * fhandler.cc (check_posix_perm): Moved here from syscalls.cc.
(fhandler_base::fpathconf): New method implementing (f)pathconf.
	* fhandler.h (class fhandler_base): Declare fpathconf method.
	* path.cc (path_conv::check): Replace MAX_LINK_DEPTH with SYMLOOP_MAX.
	* path.h (MAX_LINK_DEPTH): Delete.
	* syscalls.cc (check_posix_perm): Move to fhandler.cc.
	(fpathconf): Call fhandler's fpathconf method.
	(pathconf): Build fhandler and call fhandler's fpathconf method.
	* sysconf.cc (sysconf): Reorder switch according to order of flags
	in sys/unistd.h.  Add handling for some missing flags.
	* include/limits.h: Reorder according to SUSv3 description.  Add some
	missing definitions.  Add comments.
	* include/sys/syslimits.h: New file overriding newlib's syslimits.h
	file.
2006-11-07 17:59:54 +00:00
Corinna Vinschen cc9dbc905c * dtable.cc (build_fh_pc): Add missing DEV_SD1_MAJOR case (Thanks to
Joe Loh for noticing).
2006-11-06 13:46:24 +00:00
Corinna Vinschen 2228ff0267 * path.cc (symlink_info::posixify): Fix comment. 2006-11-02 13:39:44 +00:00
Corinna Vinschen 4521c4bd0c * path.cc (symlink_info::check): Eliminate PATH_REP bit from pflags. 2006-11-02 12:19:16 +00:00
Corinna Vinschen 5fc8f227dc * path.cc (symlink_info::posixify): New mothod converting NT and DOS
paths in symlinks to POSIX.
	(symlink_info::check_shortcut): Allocate buf allowing for a trailing 0.
	Call posixify on the result.
	(symlink_info::check_sysfile): Read from file into local buffer.
	Eliminate old b16 considerations.  Call posixify on the result.
	(symlink_info::check_reparse_point): Don't use PrintName but
	SubstituteName which is relevant for Windows' path handling.
	Call posixify on the result.
2006-11-02 11:45:03 +00:00
Danny Smith a45b9181ea * include/winuser.h (LR_DEFAULTSIZE): Remove duplicate.
C99 'extern inline' patrol.
	* include/winnt.h (GetCurrentFiber): Remove extern declaration.  Make
	inline static.
	(GetFiberData): Likewise.
	* lib/kernel32.c: Remove.
	* lib/Makefile.in: Remove reference to kernel32.[co].
2006-11-02 00:54:46 +00:00
Corinna Vinschen b904c35100 * security.h (cygpriv_idx): Add privileges new in Vista.
* security.cc (sys_privs): Ditto.
	* sec_helper.cc (cygpriv): Ditto.  Fix comment.
2006-11-01 09:00:14 +00:00
Corinna Vinschen 87abdb3df9 * include/winnt.h (SE_RELABEL_NAME): Define.
(SE_INCREASE_WORKING_SET_NAME): Define.
	(SE_TIME_ZONE_NAME): Define.
	(SE_CREATE_SYMBOLIC_LINK_NAME): Define.
2006-11-01 08:57:57 +00:00
Corinna Vinschen c2b10dc4d8 * cygheap.h (struct user_heap_info): Add slop member.
* heap.cc (heap_init): Add slop factor to heap allocation.  Add
	comment.
	* mmap.cc (MapViewNT): Allocate memory maps top down.
	(fhandler_dev_zero::mmap): Ditto.
	* shared.cc (shared_info::heap_slop_size): New method.
	(shared_info::heap_chunk_size): Don't use debug_printf at early stage.
	* shared_info.h (SHARED_INFO_CB): Accomodate change to shared_info.
	(CURR_SHARED_MAGIC): Ditto.
	(class shared_info): Add heap_slop member.  Declare heap_slop_size.
	* wincap.h: Define heapslop throughout.
	* wincap.cc: Ditto.
2006-10-31 18:41:16 +00:00
Corinna Vinschen 9740f34d11 * fhandler_disk_file.cc (fhandler_base::fstat_by_handle): Drop
directory attribute for reparse points to avoid mistreating.
	(fhandler_base::fstat_by_name): Ditto.
	* path.cc (symlink_info::check_reparse_point): New method testing
	reparse points for symbolic links.
	(symlink_info::check_shortcut): Move file attribute tesat to calling
	function.
	(symlink_info::check): Add handling for reparse points.
	* path.h (enum path_types): Add PATH_REP to denote reparse point based
	symlinks.
	(path_conv::is_rep_symlink): New method.
	* syscalls.cc (unlink): Handle reparse points.
2006-10-31 11:40:47 +00:00
Corinna Vinschen 3ddf69712b * include/winnt.h (IO_REPARSE_TAG_SYMLINK): Define.
(struct _REPARSE_DATA_BUFFER): Add missing Flags field to
	SymbolicLinkReparseBuffer substructure.
2006-10-31 11:39:58 +00:00
Danny Smith cf8c18dd47 2006-10-29 Daniel Atallah <datallah@users.sourceforge.net>
* lib/ws2_32.def (WSANSPIoctl): Add to lib.
2006-10-29 22:37:10 +00:00
Corinna Vinschen fa9e684236 * shared.cc (open_shared): Drop useless attempt from 2006-08-11. 2006-10-27 10:51:25 +00:00
Corinna Vinschen 17f3068d4e * dcrt0.cc (__api_fatal): Drop spare argument to __small_sprintf.
* smallprint.c (__small_vsprintf): Preserve GetLastError value.
	* winsup.h (api_fatal): Simplify.  Drop duplicate filename arg.
2006-10-27 10:41:51 +00:00
Chris Sutcliffe 6aea277648 2006-10-26 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* lib/Makefile.in: Fix order for 'all' rule.
2006-10-27 01:02:29 +00:00
Corinna Vinschen 74cab745fc * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Fix comment. 2006-10-23 16:41:10 +00:00
Corinna Vinschen 7a229db654 * fhandler_disk_file.cc (fhandler_disk_file::rewinddir): Accomodate
buggy RestartScan behaviour of Windows 2000.
	* wincap.h: Define has_buggy_restart_scan throughout.
	* wincap.cc: Ditto.
2006-10-23 15:13:55 +00:00
Corinna Vinschen fc545fe933 * fhandler_disk_file.cc (fhandler_disk_file::facl): Fix whitespace.
* external.cc: Update copyright.
	* fhandler.cc: Ditto.
	* sec_helper.cc: Ditto.
	* security.h: Ditto.
	* security.cc: Ditto.
	(check_registry_access): Return -1 if W_OK is requested.
2006-10-22 19:31:33 +00:00
Corinna Vinschen 2be593d961 * external.cc (cygwin_internal): Use security_descriptor::copy method.
* sec_helper.cc (security_descriptor::malloc): Use own free method.
	Set type.
	(security_descriptor::realloc): Handle the case that psd has been
	allocated using LocalAlloc.  Set type.
	(security_descriptor::free): Ditto.
	* security.cc (get_nt_attribute): Remove.
	(get_reg_security): Remove.
	(get_nt_object_security): Use GetSecurityInfo which handles all
	securable objects.
	(get_nt_object_attribute): Remove.
	(get_object_attribute): Call get_nt_object_security instead of
	get_nt_object_attribute.
	(get_file_attribute): Ditto.
	(check_registry_access): Call get_nt_object_security instead of
	get_reg_security.
	* security.h (cygpsid::operator PSID): Make method const, not the
	result.
	(class security_descriptor): Add type member.  Accomodate throughout.
	(security_descriptor::copy): New method.
	(security_descriptor::operator PSECURITY_DESCRIPTOR *): New operator.
2006-10-22 14:57:43 +00:00
Corinna Vinschen 2b26c2fc41 * fhandler.cc (fhandler_base::fhaccess): Check if opening registry
actually created a handle.  This handles the registry root dir.
	* fhandler_registry.cc (fhandler_registry::open): Set io_handle in
	case of opening one of the predefined registry keys.
2006-10-22 09:38:47 +00:00
Corinna Vinschen 70158cafd7 * regtool.cc (key_type): Drop.
(REG_AUTO): Define.
	(value_type): Replace key_type.  Use REG_xxx values directly.
	Accomodate change throughout.
	(longopts): Add --dword, --dword-le, --none, --qword and --hex options.
	(opts): Add -d, -D, -n, -Q and -x options.
	(types): Array to convert REG_xxx into strings.
	(hex): New variable to keep value of --hex option.
	(usage): Accomodate new options.  Print only the necessary by default.
	Only be verbose in case of -h/--help option.
	(cmd_list): Use key separator from -K option when printing.
	Print value type when verbose option is given.  Handle so far not
	handled REG_xxx types.
	(cmd_set): Avoid SEGV due to missing argument.  Handle so far not
	handled REG_xxx types.
	(cmd_get): Handle --binary option type agnostic.  Handle so far not
	handled REG_xxx types.
	(main): Handle new options.
2006-10-21 17:19:29 +00:00
Corinna Vinschen 1b4153db74 * fhandler.cc (fhandler_base::fhaccess): Call check_registry_access
for registry keys/values if ntsec is on.
	* security.cc (check_access): New static function derived from
	check_file_access, but object type agnostic.
	(check_file_access): Only do file specific stuff.  Call check_access.
	(check_registry_access): New access check function for registry keys/
	values.
	* security.h (check_registry_access): Declare.
2006-10-21 11:05:32 +00:00
Corinna Vinschen 9367c0dcff * fhandler_registry.cc (fhandler_registry::fstat): Set restrictive
permission and ownership if key can't be opened for reading security.
	(open_key): If opening key fails, retry opening with backup intent.
2006-10-21 10:58:35 +00:00
Corinna Vinschen d698e833cd * net.cc (cygwin_getnameinfo): Fix typo in comment. 2006-10-20 12:57:25 +00:00
Corinna Vinschen 20f9af5348 * fhandler.h (fhandler_base::set_name): Make virtual.
(class fhandler_registry): Add wow64 and prefix_len members.
	Declare set_name method.
	* fhandler_proc.cc (PROC_REGISTRY32): Define.
	(PROC_REGISTRY64): Define.
	(proc_listing): Add "registry32" and "registry64" elements.
	(proc_fhandlers): Add corresponding FH_REGISTRY values.
	* fhandler_registry.cc (registry_len): Drop static value in favor of
	class member prefix_len.  Use preifx_len instead of registry_len
	throughout.
	(fhandler_registry::set_name): Define.  Set wow64 and prefix_len
	according to directory prefix.
	(fhandler_registry::fhandler_registry): Set wow64 and prefix_len to
	default values.
	(open_key): Add wow64 argument.  Handle wow64 in call to RegOpenKeyEx.
	Use fhandler_registry member wow64 in this place throughout.
2006-10-19 10:01:03 +00:00
Corinna Vinschen d145878a07 * fhandler_proc.cc: Drop superfluous definition of _WIN32_WINNT.
* miscfuncs.cc: Ditto.
	* sched.cc: Ditto.
2006-10-19 09:15:26 +00:00
Corinna Vinschen 3c256e38f9 * regtool.cc (longopts): Add --wow32 option.
(opts): Add -W option.
	(usage): Add text for --wow32/-W option.
	(main): Handle --wow32/-W option.
	* utils.sgml: Document the new -W option.
2006-10-19 09:08:44 +00:00
Corinna Vinschen 733c9ed374 * glob.c: Remove.
* glob.cc: New file.  Latest glob version from FreeBSD plus Cygwin
	specific changes (__stat64/__stat32, ignore_case_with_glob,
	drop collate functions).
	(glob3): Return GLOB_ABORTED in case directory is unreadable and
	GLOB_ERR is set, as demanded by SUSv3.
	* glob.h: Import latest version from FreeBSD.
2006-10-17 17:34:56 +00:00
Corinna Vinschen bf4875e4b0 * winsup.h (WINVER): Define instead of _WIN32_WINNT. Set to 0x0502.
(_NO_W32_PSEUDO_MODIFIERS): Define.
2006-10-17 13:55:05 +00:00
Corinna Vinschen 53930874cb * regtool.cc (KEY_WOW64_64KEY): Drop definition. Instead define
WINVER to 0x0502 before including windows.h.
2006-10-16 19:34:27 +00:00
Corinna Vinschen 40c60b89d5 * regtool.cc (KEY_WOW64_64KEY): Define.
(longopts): Add --wow64 option.
	(opts): Add -w option.
	(wow64): New variable to control usage of KEY_WOW64_64KEY access flag.
	(usage): Add text for --wow64/-w option.
	(print_version): Fix copyright.
	(find_key): Use wow64 value in calls to RegOpenKeyEx and RegCreateKeyEx.
	(cmd_add): Use wow64 value in call to RegCreateKeyEx.
	(regDeleteKeyEx): New function pointer to load RegDeleteKeyEx function
	dynamically.
	(cmd_remove): Load and use regDeleteKeyEx when wow64 is set.
	(main): Handle --wow64/-w option.
	* utils.sgml: Document the new -w option.
2006-10-16 18:00:06 +00:00
Corinna Vinschen 0b8affca5e * fhandler_disk_file.cc (fhandler_disk_file::opendir): Drop redundant
access check.
2006-10-16 13:11:29 +00:00
Corinna Vinschen c28fea1bdc * include/asm/byteorder.h: Fix copyright dates.
Fix typos in ChangeLog.
2006-10-16 12:34:34 +00:00
Corinna Vinschen b031f5c3c5 Fix pathnames. 2006-10-16 12:31:19 +00:00
Corinna Vinschen 2c1ffdbf5e * autoload.cc (PrivilegeCheck): Define.
* fhandler.cc (fhandler_base::open): Always try opening with backup
	resp. restore intent.
	* fhandler_disk_file.cc (fhandler_disk_file::opendir): Always try
	opening with backup intent.
	(fhandler_disk_file::readdir): Ditto when trying to retrieve file id
	explicitely.
	* security.cc (check_file_access): Replace pbuf with correctly
	PPRIVILEGE_SET typed pset.  Check explicitely for backup and/or restore
	privileges when AccessCheck fails, to circumvent AccessCheck
	shortcoming.  Add comment to explain.
2006-10-16 12:26:59 +00:00
Christopher Faylor 7af26e0cc0 * winsup.h: Turn off DEBUGGING. 2006-10-13 12:49:18 +00:00
Corinna Vinschen ace7360b45 * Makefile.in (CFLAGS): Drop -nostdinc.
* cygsuba.c: Reorder includes to allow building with VC++.
	* make-64bit-version-with-visual-c.bat: New file.
2006-10-13 11:55:05 +00:00
Corinna Vinschen fb7dc2480c * autoload.cc (Wow64DisableWow64FsRedirection): Define.
(Wow64RevertWow64FsRedirection): Define.
	* security.cc (cygsuba_installed): New shared variable to store result
	of cygsuba.dll installation test.
	(subauth): Check if cygsuba.dll has been installed and registered
	before issuing the (sub)authentication.
2006-10-13 11:10:28 +00:00
Corinna Vinschen 208e95c2f2 * security.cc (create_token): Fix condition for source identifier. 2006-10-12 15:38:26 +00:00
Danny Smith 0d94042d8f * include/winuser.h (LR_DEFAULTSIZE, LR_VGACOLOUR): Define. 2006-10-12 04:25:56 +00:00
Corinna Vinschen 9565e2333c * select.cc (struct socketinf): Convert ser_num and w4 to dynamically
allocated arrays.  Add max_w4 member to keep track.
	(thread_socket): Make timeout depending on number of sockets to wait
	for.  Loop WFMO over all sockets.
	(start_thread_socket): Handle any number of sockets.  Fix typo.  Don't
	close socket event in out of memory condition.
	(socket_cleanup): Free ser_num and w4.
2006-10-11 16:21:12 +00:00
Corinna Vinschen b9c7deed9a * path.cc (path_conv::get_nt_native_path): Properly detect \\?\ paths.
(mount_info::conv_to_win32_path): Update comment.
	* fhandler_disk_file.cc (path_conv::ndisk_links): Use backslashes
	to make NT kernel functions work for \\?\GLOBALROOT paths.
2006-10-09 14:01:52 +00:00
Corinna Vinschen 5623fbd4ca * devices.in: Raise number of handled serial ports to 64.
* devices.cc: Regenerate.
2006-10-09 08:27:23 +00:00
Christopher Faylor 16b6142ad4 . 2006-10-06 22:32:09 +00:00
Corinna Vinschen cea9b62102 * cygcheck.cc (get_word, get_dword): Move to path.cc.
(LINK_EXTENSION): New macro.
	(check_existence): New static function.
	(find_on_path): Check for symbolic links if asked.
	(dll_info): New error handling.
	(track_down): Only call dll_info() for executables, display
	an error for symlinks, and print magic number for others.
	(find_app_on_path): New static function.
	(cygcheck, dump_sysinfo): Call find_app_on_path() instead of
	find_on_path().
	* path.cc (cmp_shortcut_header): New static function.
	(get_word, get_dword): Moved from cygcheck.cc.
	(EXE_MAGIC, SHORTCUT_MAGIC, SYMLINK_COOKIE, SYMLINK_MAGIC): New
	macros.
	(is_exe, is_symlink, readlink): New functions.
	* path.h (is_exe, is_symlink, readlink): Declare.
	(get_word, get_dword): Ditto.
2006-10-05 17:24:13 +00:00
Danny Smith 66845c62b1 * include/winreg.h (RegDeleteKeyEx{A|W}): Add prototype and UNICODE
mappings.
	(KEY_WOW64_32KEY, KEY_WOW64_64KEY): Define.
	* lib/advapi.def (RegDeleteKeyEx{A|W}): Export.
2006-10-05 07:36:06 +00:00
Corinna Vinschen fbcc8bbe74 * Makefile.in: Semi-revert semi-reversion of 2006-08-30 change, now
correctly parenthesized.
2006-10-04 12:52:42 +00:00
Danny Smith e4aebff6e8 * include/winnt.h (CASSERT): Define.
[mingw-Bugs-1568067]
	* include/winuser.h: (DISP_CHANGE_BADDUALVIEW): Define.
	* include/wingdi.h: (DM_POSITION): Define.
2006-10-04 08:57:27 +00:00
Danny Smith b3fc0d3bf5 * lib/rpcrt4.def: Remove "_imp__"-prefixed export symbols.
* lib/user32.def: Likewise.
2006-10-03 08:43:40 +00:00
Danny Smith c0b5e094e2 * mingwex/mb_wc_common.h (get_codepage): Get it
from __lc_codepage.
2006-09-19 09:09:58 +00:00
Christopher Faylor b44ba33a1f * byteorder.h: Correct typo. 2006-09-17 23:22:10 +00:00
Christopher Faylor 22aa38a0a8 * byteorder.h: Don't #define n* macros if -fnoinline is specified. 2006-09-17 22:34:45 +00:00
Danny Smith dad3363707 * mingwex/gdtoa/g_xfmt.c (g_xfmt): Fix representation of infinity. Use fpclassify.
* mingwex/gdtoa/strtopx (__strtopx): Avoid cast of long double* to void*.
	* mingwex/gdtoa/gdtoa.h (__g_fmt): Make declaration consistent with others.
2006-09-17 22:27:56 +00:00
Danny Smith 3e231d9a38 * mingwex/gdtoa/strtopx.c (strtopx): Fix (sic) infinity. 2006-09-16 07:35:45 +00:00
Christopher Faylor 8552e20ec4 white space 2006-09-13 15:33:37 +00:00
Christopher Faylor aa45b3b73d Check in previously mentioned change to cygcheck.cc 2006-09-13 15:32:04 +00:00
Christopher Faylor 56ec0f9c9c * Makefile.in: Fix -ntdll typo.
* cygcheck.cc (main): Restore POSIXLY_CORRECT before displaying user's
environment.
2006-09-12 15:14:51 +00:00
Chris Sutcliffe 1a0a1d3218 Forgot ChangeLog in last commit 2006-09-12 00:29:39 +00:00
Chris Sutcliffe 3742ca27a4 2006-09-11 Chris Sutcliffe <ir0n3h4d@users.sourceforge.net>
* lib/Makefile.in: fix typo.
        * lib/ddk/Makefile.in: fix typo.
        * lib/directx/Makefile.in: fix typo.

        Thanks to Keith Marshall (keithmarshall at users dot sourceforge dot net)
        for pointing it out.
2006-09-12 00:29:04 +00:00
Christopher Faylor c48cea17a8 * Makefile.in: Semi-revert 2006-08-30 change. 2006-09-11 16:06:35 +00:00
Chris Sutcliffe 08b5122764 2006-09-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* Makefile.in: Remove files from lib directory with distclean target
2006-09-10 22:55:43 +00:00
Danny Smith 910edf4a02 * include/_mingw.h (__MINGW_ATTRIB_DEPRECATED): Define.
(__MINGW_IMPORT): Ansify.
	* include/stdlib.h (_sleep, _beep, _seterrormode): Add
	__MINGW_ATTRIB_DEPRECATED.
2006-09-10 21:16:05 +00:00
Chris Sutcliffe 88a815f3c0 2006-09-10 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/winuser.h (CS_DROPSHADOW): Define.
2006-09-10 14:55:24 +00:00
Keith Marshall 7146ace87f * aclocal.m4 (LIB_AC_PROG_CC, LIB_AC_PROG_CC_GNU, LIB_AC_PROG_CXX):
Redundant macros; deleted.

	* configure.in (LIB_AC_PROG_CC): Replaced by...
	(AC_PROG_CC): ...this.

	* configure: Regenerated.
2006-09-10 14:44:55 +00:00
Danny Smith 635f4bd398 2006-09-08 Michael Gerdau <mgdde@users.sourceforge.net>
* include/uxtheme.h: (TMT_GRADIENTCOLOR4, TMT_GRADIENTCOLOR5,
	TMT_SHADOWCOLOR, TMT_GLOWCOLOR, TMT_TEXTBORDERCOLOR,
	TMT_TEXTSHADOWCOLOR, TMT_GLYPHTEXTCOLOR, TMT_GLYPHTRANSPARENTCOLOR,
	TMT_FILLCOLORHINT, TMT_BORDERCOLORHINT, TMT_ACCENTCOLORHINT):
	Increase each constant by 1.
2006-09-08 01:16:46 +00:00
Christopher Faylor d6b1ac7faa * environ.cc (build_env): Don't put an empty environment variable into the
environment.  Optimize use of "len".
* errno.cc (ERROR_MORE_DATA): Translate to EMSGSIZE rather than EAGAIN.
2006-09-07 20:42:53 +00:00
Danny Smith 19ff420025 [mingw-Bugs-1553275]
* include/wingdi.h (SetLayout): Add prototype.
	(GetLayout): Likewise.
2006-09-07 09:09:13 +00:00
Danny Smith ab1d66234a * mingwex/gdtoa/misc.c (pow5mult): Restore original code.
* mingwex/gdtoa/gdtoa.h. Add comment that files have been modified.
	* mingwex/gdtoa/gdtoaimp.h: Include system headers with <> brackets.
2006-09-06 22:03:16 +00:00
Danny Smith a046f426ed [mingw-Bugs-1550139]
* include/oleauto.h (GetRecordInfoFromTypeInfo): Add prototype.
	(GetRecordInfoFromGuids): Add prototype.
2006-09-02 09:00:45 +00:00
Danny Smith 1202770601 * include/winbase.h: Add comment about 'missing' SEM flag. 2006-09-01 01:28:30 +00:00
Danny Smith e635b30956 Import David Gay's gdtoa library.
* mingwex/gdtoa: New directory.
	* mingwex/gdtoa/(arithchk.c, dmisc.c, dtoa.c, g__fmt.c, g_dfmt.c,
	g_ffmt.c, g_xfmt.c, gd_arith.h, gd_qnan.h, gdtoa.c, gdtoa.h,
	gdtoaimp.h, gethex.c, gmisc.c, hd_init.c, hexnan.c, misc.c, qnan.c,
	README, smisc.c, strtodg.c, strtodnrp.c, strtof.c, strtopx.c, sum.c,
	ulp.c): New files.
	* mingwex/(strtof.c, strtold.c, ldtoa.c): Remove files.
	* mingwex/math/(cephes-emath.c, cephes-emath.h): Remove files.
	* mingwex/mb_wc_common.h (get_cp_from_locale); Rename to get_codepage().
        * mingwex/(btowc.c, wctob.c, mbrtowc.c, wcrtomb.c): Adjust call to get_codepage().
	* mingwex/wcstold.c: Avoid using strtold internals.
	* mingwex/wcstof.c: Rewrite.
	* mingwex/Makefile.in (GDTOA_DISTFILES): Add to distribution.
	(GDTOA_OBJS): Add to library.
	(DISTFILES): Remove strtof.c strtold.c ldtoa.c cephes-emath.c cephes-emath.h.
	(STDLIB_OBJS): Remove.
	(STDLIB_STUB_OBJS): Remove strtof.o wcstof,o.
	(Q8_OBJS): Add wcstof.o wcstold.o.
	* include/stdlib.h (strtof): Remove inline definition.
	(wcstof): Likewise.
	* include/wchar.h (wcstof): Remove inline definition.
2006-08-31 23:48:56 +00:00
Corinna Vinschen 55283468e6 * grp.cc (initgroups32): Run get_server_groups under original token.
* syscalls.cc (seteuid32): Slightly reorganize code creating a token.
2006-08-31 15:57:56 +00:00
Christopher Faylor c9f1f4b438 * Makefile.in: Make install-license .PHONY. Make sure that doc directory is
created before copying to it.
2006-08-31 00:53:48 +00:00
Corinna Vinschen 7e5d0e9f95 * Makefile.in: Make installation of CYGWIN_LICENSE configurable.
* aclocal.m4: Regenerate.
	* configure.in: Add GCC_NO_EXECUTABLES call. Add configuration for
	INSTALL_LICENSE.  Make cygwin subdirectory optional.  Add sanity
	check for cygwin resp. mingw subdirectories dependent of the target.
	* configure: Regenerate.
2006-08-30 13:05:46 +00:00
Corinna Vinschen 3cdac9e9d4 * Makefile.in: Add with_cross_host to allow more granular checks.
Set installation directories accordingly.  Override CC setting only
	if building a Cygwin target.
	* aclocal.m4: Regenerate.
	* configure.in: Move AC_CANONICAL_SYSTEM check up.  Add
	GCC_NO_EXECUTABLES.  Substitute with_cross_host in depending files.
	Test AC_ALLOCA only if building on a native system.
	* configure: Regenerate.
2006-08-30 13:05:05 +00:00
Corinna Vinschen fc0256b600 * configure.in: Substitute with_cross_host in depending files.
* configure: Regenerate.
	* lib/Makefile.in: Add with_cross_host to allow more granular checks.
	Set installation directories accordingly.
	* lib/ddk/Makefile.in: Ditto.
	* lib/directx/Makefile.in: Ditto.
2006-08-30 13:04:41 +00:00
Christopher Faylor 1cc0c5d6f9 * child_info.h (child_info_spawn::~child_info_spawn): Don't close myself_pinfo
handle when spawning.
2006-08-27 16:46:27 +00:00
Chris Sutcliffe d9baa656ed 2006-08-27 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* include/ctype.h: Fix typo.
2006-08-27 12:14:58 +00:00
Joshua Daniel Franklin 1e069c300d * faq-setup.xml (faq.setup.uninstall): Mention Safe Mode
requirement for accessing the Security tab in XP Home.
        * faq-using.xml (faq.using.chmod): Mention FAT32.
2006-08-26 19:11:00 +00:00
Danny Smith 80f52ae1dd * include/ctype.h: Expose iswblank if __cplusplus.
* include/wctype.h: Expose iswblank if __cplusplus.
2006-08-25 09:10:05 +00:00
Corinna Vinschen f1f69c58bf * fhandler_disk_file.cc (fhandler_disk_file::opendir): Fix formatting. 2006-08-20 12:31:07 +00:00
Corinna Vinschen b0662a051b * fhandler_disk_file.cc (DIR_NUM_ENTRIES): Set to 100 to maximize
performance on remote shares.
	(fhandler_disk_file::opendir): Move comment about Samba weirdness into
	fhandler_disk_file::readdir.  Don't disallow
	FileIdBothDirectoryInformation on Samba.
	(fhandler_disk_file::readdir): Workaround Samba problem with
	FileIdBothDirectoryInformation by rereading already read entries
	using FileBothDirectoryInformation.  Change comment about Samba
	weirdness explaining this change.
2006-08-20 12:18:12 +00:00
Christopher Faylor ffa6849093 * fhandler_disk_file.cc (fhandler_disk_file::pread): Properly check for
non-error return from lseek.
2006-08-19 21:44:58 +00:00
Corinna Vinschen 30691bd756 * fhandler_serial.cc (raw_read): Evaluate minchars taking the
vmin_ > ulen case into account.  Simplify evaluating the bytes to read.
	Don't use bytes in Queue value from ClearCommError call in case vtime_
	is > 0.  Reformat GetOverlappedResult call.  Simplify call to ReadFile.
2006-08-17 14:51:48 +00:00
Corinna Vinschen 94dc73adc5 * security.cc (subauth): Initialize user_token to NULL. Add comment. 2006-08-14 11:32:11 +00:00
Corinna Vinschen e39a29e36b * shared.cc (open_shared): Desperately try to get shared memory, only
when DEBUGGING enabled for now.
2006-08-11 15:40:07 +00:00
Danny Smith fc43c1d925 * lib/wtsapi32.def (WTSGetActiveConsoleSessionId). Move from here...
* lib/kernel32.def (WTSGetActiveConsoleSessionId). ...to here.
2006-08-10 21:06:01 +00:00
Christopher Faylor 1767b8d028 * pinfo.cc (_onreturn::~onreturn): Don't attempt to close a NULL handle. 2006-08-10 20:25:54 +00:00
Christopher Faylor 2f98d8bdc7 revert erroneous checkin 2006-08-10 14:16:24 +00:00
Christopher Faylor 44d67b9b31 * winsup.h: Turn on DEBUGGING by default for now. 2006-08-10 14:15:00 +00:00
Corinna Vinschen 887e02e478 * fhandler_disk_file.cc (fhandler_disk_file::lock): Handle
ERROR_NOT_LOCKED returned from UnlockFileEx.
2006-08-10 08:44:43 +00:00
Christopher Faylor eab543a1d6 * overview2.sgml: Remove inaccurate "full support for windows pathnames"
clause.
2006-08-09 16:13:56 +00:00
Corinna Vinschen 6f3105405d * path.h (SYMLINK_EA_NAME): Remove.
(SHORTCUT_HDR_SIZE): Ditto.
2006-08-09 15:33:46 +00:00
Christopher Faylor bbf38a55c6 * autoload.cc (GetHandleInformation): Declare new function.
(SetHandleInformation): Ditto.
* debug.cc (add_handle): Use SetHandleInformation to protect handle.
(close_handle): Use SetHandleInformation to unprotect handle.
* spawn.cc (spawn_guts): Move detached test outside of P_OVERLAY block.
2006-08-09 15:04:32 +00:00
Corinna Vinschen 7636b58590 * autoload.cc (NtSetInformationFile): Define.
* cygwin.din: Export posix_fadvise and posix_fallocate.
	* fhandler.cc (fhandler_base::fadvise): New method.
	(fhandler_base::ftruncate): Add allow_truncate parameter.
	* fhandler.h (class fhandler_base): Add fadvise method.  Accomodate
	new parameter to ftruncate.
	(class fhandler_pipe): Add fadvise and ftruncate methods.
	(class fhandler_disk_file): Add fadvise method.  Accomodate new
	parameter to ftruncate.
	* fhandler_disk_file.cc (fhandler_disk_file::fadvise): New method.
	(fhandler_disk_file::ftruncate): Accomodate new allow_truncate
	parameter.  Set EOF using NtSetInformationFile on NT.
	* ntdll.h (struct _FILE_END_OF_FILE_INFORMATION): Define.
	(NtSetInformationFile): Declare.
	* pipe.cc (fhandler_pipe::fadvise): New method.
	(fhandler_pipe::ftruncate): Ditto.
	* syscalls.cc (posix_fadvise): New function.
	(posix_fallocate): Ditto.
	(ftruncate64): Accomodate second parameter to fhandler's ftruncate
	method.
	* include/fcntl.h: Add POSIX_FADV_* flags.  Add declarations of
	posix_fadvise and posix_fallocate.
	* include/cygwin/version.h: Bump API minor number.
2006-08-07 19:29:14 +00:00
Danny Smith 840d9c1abe * include/ctype.h: Remove stray ')'. 2006-08-03 21:05:05 +00:00
Corinna Vinschen fb43e6237c * path.cc (vconcat): Don't convert backslahes to slashes.
(cygpath): Return native path with all backslashes.
2006-08-03 15:29:30 +00:00
Danny Smith bb1a7afa67 * include/ctype.h (_BLANK): Expand comment.
(isblank): Add prototype and inline definition.
	(iswblank): Add prototype and inline definition.
	* include/wctype.h (iswblank): Add prototype and inline definition.
	* mingwex/isblank.c: New file.
	* mingwex/iswblank.c: New file.
	* mingwex/Makefile.in: Add isblank, iswblank to libmingwex.a
2006-08-03 07:44:30 +00:00
Christopher Faylor 9e4051d4b7 fix typo 2006-08-03 03:59:27 +00:00
Christopher Faylor bee65cb860 * Makefile.in (subauth): Add dependency on mingw. 2006-08-03 03:47:54 +00:00
Christopher Faylor 6f1d48621e * environ.cc (env_win32_to_posix_path_list): Declare.
(conv_envvars): Use env_win32_to_posix_path_list rather than
cygwin_win32_to_posix_path_list.
(posify): Translate back to win32 path if errno is EIDRM.
* environ.h: Update copyright.  Define ENV_CVT.
* path.cc (conv_path_list): If converting for the environment and removed an
element set errno to ENV_CVT.
(env_win32_to_posix_path_list): New function.
2006-08-02 15:11:48 +00:00
Corinna Vinschen 2dba45f4aa * Makefile.in (cygpath.exe): Add rule to link cygpath against ntdll.dll.
* cygpath.cc: Include DDK headers.
	(RtlAllocateUnicodeString): New static inline function.
	(get_device_name): New static function to evaluate DOS path from
	native NT path.
	(get_device_paths): New function to do the same for path lists.
	(doit): Call get_device_paths/get_device_name where appropriate.
2006-08-02 09:48:18 +00:00
Christopher Faylor 8fe03354d9 * cygwinenv.sgml: Document [no]dosfilewarning option. 2006-08-01 18:06:49 +00:00
Christopher Faylor 01bbb24d15 * environ.cc (dos_file_warning): Declare.
(parse_thing): Add "dosfilewarning".  Alphabetize.
* path.cc (normalize_posix_path): Return -1 when MS-DOS path detected.
(warn_msdos): New function.
(path_conv::check): Call if !PC_NOWARN and MS-DOS path detected.
(cygwin_conv_to_win32_path): Set PC_NOWARN when calling path_conv.
(cygwin_conv_to_full_win32_path): Ditto.
* path.h (pathconv_arg::PC_NOWARN): Define.
* shared_info.h (user_info::warned_msdos): New field.
(CURR_USER_MAGIC): Reset.
2006-08-01 18:00:44 +00:00
Corinna Vinschen b23bc8c33c * fhandler_socket.cc (fhandler_socket::recv_internal): Fix a problem
with poll(2) after shutdown(SHUT_RD) has been called on the local side.
	* poll.cc (poll): Use POSIX type nfds_t for second parameter.  Drop
	special socket handling for POLLIN.  Add comment to explain why.
	* include/sys/poll.h: Declare nfds_t.  Use as type for second parameter
	in poll(2) declaration.
2006-07-31 14:27:56 +00:00
Corinna Vinschen 1f7dbb011a * fhandler_socket.cc (fhandler_socket::evaluate_events): Circumvent
potential race condition.
	(fhandler_socket::recv_internal): Fix MSG_PEEK bug on blocking sockets
	and simplify recv loop.
	(fhandler_socket::send_internal): Only lock when changing wsock_events.
2006-07-31 12:55:20 +00:00
Corinna Vinschen a947b6879f * autoload.cc: Drop LoadDLLprime for wsock32 since no wsock32 function
is used anymore.  Drop all unused ws2_32.dll functions.
2006-07-31 08:59:56 +00:00
Corinna Vinschen acc31d1a90 * cygpath.cc (get_long_name): Fallback to get_long_path_name_w32impl. 2006-07-31 07:31:56 +00:00
Danny Smith 4838aa88d9 Update more IMAGE relocation type indicators
to PECOFF v8 (May, 2006) specs.

	* include/winnt.h (IMAGE_REL_SH3_ABSOLUTE,
	IMAGE_REL_SH3_DIRECT16, IMAGE_REL_SH3_DIRECT32,
	IMAGE_REL_SH3_DIRECT8, IMAGE_REL_SH3_DIRECT8_WORD,
	IMAGE_REL_SH3_DIRECT8_LONG, IMAGE_REL_SH3_DIRECT4,
	IMAGE_REL_SH3_DIRECT4_WORD, IMAGE_REL_SH3_DIRECT4_LONG,
	IMAGE_REL_SH3_PCREL8_WORD, IMAGE_REL_SH3_PCREL8_LONG,
	IMAGE_REL_SH3_PCREL12_WORD, IMAGE_REL_SH3_STARTOF_SECTION,
	IMAGE_REL_SH3_SIZEOF_SECTION, IMAGE_REL_SH3_SECTION,
	IMAGE_REL_SH3_SECREL, IMAGE_REL_SH3_DIRECT32_NB,
	IMAGE_REL_SH3_GPREL4_LONG, IMAGE_REL_SH3_TOKEN,
	IMAGE_REL_SHM_PCRELPT, IMAGE_REL_SHM_REFLO,
	IMAGE_REL_SHM_REFHALF, IMAGE_REL_SHM_RELLO,
	IMAGE_REL_SHM_RELHALF, IMAGE_REL_SHM_PAIR,
	IMAGE_REL_SHM_NOMODE): Add defines.

	(IMAGE_REL_M32R_ABSOLUTE, IMAGE_REL_M32R_ADDR32,
	IMAGE_REL_M32R_ADDR32NB, IMAGE_REL_M32R_ADDR24,
	IMAGE_REL_M32R_GPREL16, IMAGE_REL_M32R_PCREL24,
	IMAGE_REL_M32R_PCREL16, IMAGE_REL_M32R_PCREL8,
	IMAGE_REL_M32R_REFHALF, IMAGE_REL_M32R_REFHI,
	IMAGE_REL_M32R_REFLO, IMAGE_REL_M32R_PAIR,
	IMAGE_REL_M32R_SECTION, IMAGE_REL_M32R_SECREL,
	IMAGE_REL_M32R_TOKEN): Add defines.

	(IMAGE_REL_MIPS_JMPADDR16): Add define.
2006-07-29 09:25:45 +00:00
Corinna Vinschen 8f713b6b08 * fhandler.h (struct wsa_event): Define here.
(class fhandler_socket): Make wsock_evt private again.
	(fhandler_socket::wsock_event): New read accessor for wsock_evt.
	(fhandler_socket::serial_number): New read accessor to get the
	socket's serial number.
	(fhandler_socket::ready_for_read): Just return true.
	* fhandler_socket.cc (struct wsa_event): Move definition to fhandler.h.
	* select.cc (struct socketinf): Add serial number vector.
	(start_thread_socket): Identify duplicate sockets by their serial
	number, not (wrongly) by their wsock_evt.
2006-07-28 08:50:46 +00:00
Corinna Vinschen bc31293a0d * cygpath.c (get_long_name): Cover the case that GetLongPathName
doesn't return valid information for non-existant files.  Just return
	incoming filename in that case.
2006-07-27 21:07:33 +00:00
Corinna Vinschen fd5879c110 * fhandler_socket.cc: Revert misguided attempt to handle FD_CLOSE error
conditions in evaluate_events.
	(search_wsa_event_slot): Move wrongly placed memset in
	fhandler_socket::init_events here.
	(fhandler_socket::init_events): Initially set FD_WRITE event for
	connectionless sockets.
	* poll.cc (poll): Don't add sockets always to except_fds since select
	is now supposed to do it right.
	* select.cc (set_bits): Set connection state correctly for failed
	af_local_connect on local sockets.  Remove socket special handling
	for except_selected descriptors.
	(peek_socket): Try to set the read/write/exception bits actually
	correctly.
2006-07-27 13:58:54 +00:00
Corinna Vinschen 883861544a * fhandler_socket.cc (fhandler_socket::recvmsg): Remove unused tot
argument.  All callers changed.
	(fhandler_socket::sendmsg): Likewise.
	* net.cc (cygwin_recvmsg): Likewise.
	(cygwin_sendmsg): Likewise, and prevent calling sendmsg whith an
	invalid iovec.
	* fhandler.h (fhandler_socket::recvmsg): Adjust prototype.
	(fhandler_socket::sendmsg): Likewise.
2006-07-27 09:18:28 +00:00
Corinna Vinschen 9869e006f3 * fhandler.h (class fhandler_socket): Remove prot_info_ptr.
(fhandler_socket::fixup_before_fork_exec): Remove.
	(fhandler_socket::fixup_after_exec): Remove.
	(fhandler_socket::need_fixup_before): Remove.
	* fhandler_socket.cc (fhandler_socket::fhandler_socket): Drop
	initializing prot_info_ptr.  Remove unused code.
	(fhandler_socket::~fhandler_socket): Drop free'ing prot_info_ptr.
	(struct wsa_event): Rename connect_errorcode to errorcode.
	(fhandler_socket::evaluate_events): Handle FD_CLOSE error condition
	as FD_CONNECT error condition, except, never reset an FD_CLOSE error
	condition.  Always set FD_WRITE after successfully recorded FD_CONNECT.
	(fhandler_socket::fixup_before_fork_exec): Remove.
	(fhandler_socket::fixup_after_fork): Revert to using handle duplication.
	(fhandler_socket::fixup_after_exec): Remove.
	(fhandler_socket::dup): Revert to using handle duplication.
	(fhandler_socket::send_internal): Only call wait_for_events in case
	of WSAEWOULDBLOCK condition.
	(fhandler_socket::set_close_on_exec): Call
	fhandler_base::set_close_on_exec.
	* net.cc (fdsock): Just set socket to inheritable on non-NT.  Don't
	call inc_need_fixup_before.
	* select.cc (peek_socket): Don't set except_ready on every FD_CLOSE,
	just on error.
2006-07-27 09:11:38 +00:00
Danny Smith 40f67ea198 Update some IMAGE flags to PECOFF v8 (May, 2006) specs.
* include/winnt.h (IMAGE_FILE_MACHINE_AM33,
	IMAGE_FILE_MACHINE_ARM, IMAGE_FILE_MACHINE_EBC,
	IMAGE_FILE_MACHINE_M32R, IMAGE_FILE_MACHINE_MIPS16,
	IMAGE_FILE_MACHINE_MIPSFPU, IMAGE_FILE_MACHINE_MIPSFPU16,
	IMAGE_FILE_MACHINE_POWERPCFP, IMAGE_FILE_MACHINE_R4000,
	IMAGE_FILE_MACHINE_SH3, IMAGE_FILE_MACHINE_SH3DSP,
	IMAGE_FILE_MACHINE_SH4, IMAGE_FILE_MACHINE_SH5,
	IMAGE_FILE_MACHINE_THUMB, IMAGE_FILE_MACHINE_WCEMIPSV2):
	Add defines.

	(IMAGE_SUBSYSTEM_EFI_APPLICATION,
	IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER,
	IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER, IMAGE_SUBSYSTEM_EFI_ROM):
	Add defines.

	(IMAGE_SYM_CLASS_CLR_TOKEN): Add define

	(IMAGE_DLL_CHARACTERISTICS_DYNAMIC_BASE,
	IMAGE_DLL_CHARACTERISTICS_FORCE_INTEGRITY,
	IMAGE_DLL_CHARACTERISTICS_NX_COMPAT,
	IMAGE_DLLCHARACTERISTICS_NO_ISOLATION, IMAGE_DLLCHARACTERISTICS_NO_SEH,
	IMAGE_DLLCHARACTERISTICS_NO_BIND,
	IMAGE_DLLCHARACTERISTICS_TERMINAL_SERVER_AWARE): Add defines.


	(IMAGE_REL_I386_TOKEN, IMAGE_REL_I386_SECREL7): Add defines.

	(IMAGE_REL_AMD64_ABSOLUTE, IMAGE_REL_AMD64_ADDR64,
	IMAGE_REL_AMD64_ADDR32, IMAGE_REL_AMD64_ADDR32NB, IMAGE_REL_AMD64_REL32,
	IMAGE_REL_AMD64_REL32_1, IMAGE_REL_AMD64_REL32_2,
	IMAGE_REL_AMD64_REL32_3, IMAGE_REL_AMD64_REL32_4,
	IMAGE_REL_AMD64_REL32_5, IMAGE_REL_AMD64_SECTION,
	IMAGE_REL_AMD64_SECREL, IMAGE_REL_AMD64_SECREL7, IMAGE_REL_AMD64_TOKEN,
	IMAGE_REL_AMD64_SREL32, IMAGE_REL_AMD64_PAIR, IMAGE_REL_AMD64_SSPAN32):
	Add defines.

	(IMAGE_REL_IA64_ABSOLUTE, IMAGE_REL_IA64_IMM14, IMAGE_REL_IA64_IMM22,
	IMAGE_REL_IA64_IMM64, IMAGE_REL_IA64_DIR32, IMAGE_REL_IA64_DIR64,
	IMAGE_REL_IA64_PCREL21B, IMAGE_REL_IA64_PCREL21M,
	IMAGE_REL_IA64_PCREL21F, IMAGE_REL_IA64_GPREL22, IMAGE_REL_IA64_LTOFF22,
	IMAGE_REL_IA64_SECTION, IMAGE_REL_IA64_SECREL22,
	IMAGE_REL_IA64_SECREL64I, IMAGE_REL_IA64_SECREL32,
	IMAGE_REL_IA64_DIR32NB, IMAGE_REL_IA64_SREL14, IMAGE_REL_IA64_SREL22,
	IMAGE_REL_IA64_SREL32, IMAGE_REL_IA64_UREL32, IMAGE_REL_IA64_PCREL60X,
	IMAGE_REL_IA64_PCREL60B, IMAGE_REL_IA64_PCREL60F,
	IMAGE_REL_IA64_PCREL60I, IMAGE_REL_IA64_PCREL60M,
	IMAGE_REL_IA64_IMMGPREL64, IMAGE_REL_IA64_TOKEN, IMAGE_REL_IA64_GPREL32,
	IMAGE_REL_IA64_ADDEND): Add defines.

	(IMAGE_SCN_GPREL): Add define.
2006-07-27 08:30:33 +00:00
Christopher Faylor 5ecd1ea663 * fhandler.cc (fhandler_base::read): Call get_readahead_into_buffer instead of
duplicating it.
2006-07-27 03:32:51 +00:00
Corinna Vinschen a0bb355ffe * shared.cc (offsets): Define as offsets relative to cygwin_hmodule
instead of addresses.
	(off_addr): New macro.
	(open_shared): Use offsets array accordingly.  Remove unused code.
	* shared_info.h (cygwin_shared_address): Remove.
2006-07-26 21:02:01 +00:00
Corinna Vinschen 5faa48850f * cygheap.h (struct init_cygheap): Remove shared_h and mt_h members.
* fhandler_tape.cc (mt): Define as DLL shared area in
	.cygwin_dll_common instead of as dynamically allocated area.
	Change referencing throughout.
	* mtinfo.h (mt_h): Remove entirely.
	(mt): Remove extern declaration.
	* shared.cc (cygwin_shared_area): New global cygwin_shared
	variable located in .cygwin_dll_common.
	(offsets): Define shared region addresses descending from
	cygwin_shared_address.
	(open_shared): Replace usage of SH_CYGWIN_SHARED by SH_USER_SHARED.
	(memory_init): Set cygwin_shared just by pointing to cygwin_shared_area.
	* shared_info.h (shared_locations): Remove SH_CYGWIN_SHARED and
	SH_MTINFO.
	(cygwin_shared_address): Define as DLL start address.
	* tty.h (tty_min::tty_min): Remove constructor.
2006-07-26 15:59:39 +00:00
Corinna Vinschen 020a7b4711 * include/cygwin/in6.h: Guard in_port_t typedef more restrictive to
avoid compiler warning.
2006-07-25 20:01:38 +00:00
Christopher Faylor 724c4ed146 * security.cc (get_logon_server): Remove nret and use dret for everything to
avoid a g++ warning.
2006-07-25 19:44:17 +00:00